/russian/kde4-l10n/

/'>index : gsoc2013-evolution
Google Summer of Code 2013 - GNOME - Archive Integration workspace
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat
-rw-r--r--.cvsignore26
-rw-r--r--AUTHORS78
-rw-r--r--COPYING340
-rw-r--r--COPYING-DOCS355
-rw-r--r--ChangeLog6407
-rw-r--r--HACKING0
-rw-r--r--INSTALL182
-rw-r--r--MAINTAINERS5
-rw-r--r--Makefile.am39
-rw-r--r--NEWS992
-rw-r--r--README217
-rw-r--r--acconfig.h32
-rw-r--r--addressbook/.cvsignore6
-rw-r--r--addressbook/ChangeLog5077
-rw-r--r--addressbook/Makefile.am7
-rw-r--r--addressbook/backend/.cvsignore6
-rw-r--r--addressbook/backend/Makefile.am1
-rw-r--r--addressbook/backend/ebook/.cvsignore22
-rw-r--r--addressbook/backend/ebook/GNOME_Evolution_Addressbook_GnomeCard_Importer.oaf.in29
-rw-r--r--addressbook/backend/ebook/Makefile.am164
-rw-r--r--addressbook/backend/ebook/TODO2
-rw-r--r--addressbook/backend/ebook/e-book-listener.c712
-rw-r--r--addressbook/backend/ebook/e-book-listener.h106
-rw-r--r--addressbook/backend/ebook/e-book-types.h38
-rw-r--r--addressbook/backend/ebook/e-book-util.c443
-rw-r--r--addressbook/backend/ebook/e-book-util.h64
-rw-r--r--addressbook/backend/ebook/e-book-view-listener.c464
-rw-r--r--addressbook/backend/ebook/e-book-view-listener.h78
-rw-r--r--addressbook/backend/ebook/e-book-view.c308
-rw-r--r--addressbook/backend/ebook/e-book-view.h57
-rw-r--r--addressbook/backend/ebook/e-book.c1258
-rw-r--r--addressbook/backend/ebook/e-book.h148
-rw-r--r--addressbook/backend/ebook/e-card-cursor.c235
-rw-r--r--addressbook/backend/ebook/e-card-cursor.h52
-rw-r--r--addressbook/backend/ebook/e-card-pairs.h118
-rw-r--r--addressbook/backend/ebook/e-card-simple.c1111
-rw-r--r--addressbook/backend/ebook/e-card-simple.h218
-rw-r--r--addressbook/backend/ebook/e-card-types.h89
-rw-r--r--addressbook/backend/ebook/e-card.c3673
-rw-r--r--addressbook/backend/ebook/e-card.h167
-rw-r--r--addressbook/backend/ebook/e-destination.c313
-rw-r--r--addressbook/backend/ebook/e-destination.h76
-rw-r--r--addressbook/backend/ebook/evolution-gnomecard-importer.c214
-rw-r--r--addressbook/backend/ebook/load-gnomecard-addressbook.c91
-rw-r--r--addressbook/backend/ebook/load-pine-addressbook.c172
-rw-r--r--addressbook/backend/ebook/test-card.c196
-rw-r--r--addressbook/backend/ebook/test-client-list.c76
-rw-r--r--addressbook/backend/ebook/test-client.c199
-rw-r--r--addressbook/backend/idl/.cvsignore6
-rw-r--r--addressbook/backend/idl/Makefile.am6
-rw-r--r--addressbook/backend/idl/addressbook.idl170
-rw-r--r--addressbook/backend/pas/.cvsignore11
-rw-r--r--addressbook/backend/pas/Makefile.am56
-rw-r--r--addressbook/backend/pas/TODO2
-rw-r--r--addressbook/backend/pas/evolutionperson.schema166
-rw-r--r--addressbook/backend/pas/pas-backend-file.c1605
-rw-r--r--addressbook/backend/pas/pas-backend-file.h32
-rw-r--r--addressbook/backend/pas/pas-backend-ldap.c2397
-rw-r--r--addressbook/backend/pas/pas-backend-ldap.h32
-rw-r--r--addressbook/backend/pas/pas-backend.c178
-rw-r--r--addressbook/backend/pas/pas-backend.h77
-rw-r--r--addressbook/backend/pas/pas-book-factory.c610
-rw-r--r--addressbook/backend/pas/pas-book-factory.h50
-rw-r--r--addressbook/backend/pas/pas-book-view.c315
-rw-r--r--addressbook/backend/pas/pas-book-view.h55
-rw-r--r--addressbook/backend/pas/pas-book.c884
-rw-r--r--addressbook/backend/pas/pas-book.h117
-rw-r--r--addressbook/backend/pas/pas-card-cursor.c226
-rw-r--r--addressbook/backend/pas/pas-card-cursor.h58
-rw-r--r--addressbook/conduit/.cvsignore9
-rw-r--r--addressbook/conduit/Makefile.am47
-rw-r--r--addressbook/conduit/address-conduit-config.h121
-rw-r--r--addressbook/conduit/address-conduit.c1140
-rw-r--r--addressbook/conduit/address-conduit.h77
-rw-r--r--addressbook/conduit/e-address.conduit.in9
-rw-r--r--addressbook/contact-editor/.cvsignore8
-rw-r--r--addressbook/contact-editor/Makefile.am62
-rw-r--r--addressbook/contact-editor/arrow.pngbin174 -> 0 bytes
-rw-r--r--addressbook/contact-editor/contact-editor.glade2453
-rw-r--r--addressbook/contact-editor/e-contact-editor-address.c243
-rw-r--r--addressbook/contact-editor/e-contact-editor-address.h78
-rw-r--r--addressbook/contact-editor/e-contact-editor-confirm-delete.glade83
-rw-r--r--addressbook/contact-editor/e-contact-editor-fullname.c243
-rw-r--r--addressbook/contact-editor/e-contact-editor-fullname.h78
-rw-r--r--addressbook/contact-editor/e-contact-editor.c2125
-rw-r--r--addressbook/contact-editor/e-contact-editor.h124
-rw-r--r--addressbook/contact-editor/e-contact-quick-add.c393
-rw-r--r--addressbook/contact-editor/e-contact-quick-add.h41
-rw-r--r--addressbook/contact-editor/e-contact-save-as.c80
-rw-r--r--addressbook/contact-editor/e-contact-save-as.h41
-rw-r--r--addressbook/contact-editor/fulladdr.glade475
-rw-r--r--addressbook/contact-editor/fullname.glade389
-rw-r--r--addressbook/contact-editor/test-editor.c145
-rw-r--r--addressbook/gui/.cvsignore6
-rw-r--r--addressbook/gui/Makefile.am1
-rw-r--r--addressbook/gui/component/.cvsignore11
-rw-r--r--addressbook/gui/component/GNOME_Evolution_Addressbook.oaf.in147
-rw-r--r--addressbook/gui/component/Makefile.am88
-rw-r--r--addressbook/gui/component/addressbook-component.c214
-rw-r--r--addressbook/gui/component/addressbook-component.h33
-rw-r--r--addressbook/gui/component/addressbook-config.c965
-rw-r--r--addressbook/gui/component/addressbook-config.glade158
-rw-r--r--addressbook/gui/component/addressbook-config.h31
-rw-r--r--addressbook/gui/component/addressbook-factory.c85
-rw-r--r--addressbook/gui/component/addressbook-storage.c539
-rw-r--r--addressbook/gui/component/addressbook-storage.h81
-rw-r--r--addressbook/gui/component/addressbook.c771
-rw-r--r--addressbook/gui/component/addressbook.h9
-rw-r--r--addressbook/gui/component/e-address-popup.c521
-rw-r--r--addressbook/gui/component/e-address-popup.h86
-rw-r--r--addressbook/gui/component/e-address-widget.c577
-rw-r--r--addressbook/gui/component/e-address-widget.h103
-rw-r--r--addressbook/gui/component/e-cardlist-model.c225
-rw-r--r--addressbook/gui/component/e-cardlist-model.h42
-rw-r--r--addressbook/gui/component/select-names/.cvsignore12
-rw-r--r--addressbook/gui/component/select-names/Evolution-Addressbook-SelectNames.idl39
-rw-r--r--addressbook/gui/component/select-names/GNOME_Evolution_Addressbook_SelectNames.oaf.in29
-rw-r--r--addressbook/gui/component/select-names/Makefile.am86
-rw-r--r--addressbook/gui/component/select-names/e-select-names-bonobo.c330
-rw-r--r--addressbook/gui/component/select-names/e-select-names-bonobo.h71
-rw-r--r--addressbook/gui/component/select-names/e-select-names-completion.c1027
-rw-r--r--addressbook/gui/component/select-names/e-select-names-completion.h65
-rw-r--r--addressbook/gui/component/select-names/e-select-names-factory.c59
-rw-r--r--addressbook/gui/component/select-names/e-select-names-factory.h31
-rw-r--r--addressbook/gui/component/select-names/e-select-names-manager.c434
-rw-r--r--addressbook/gui/component/select-names/e-select-names-manager.h60
-rw-r--r--addressbook/gui/component/select-names/e-select-names-model.c546
-rw-r--r--addressbook/gui/component/select-names/e-select-names-model.h67
-rw-r--r--addressbook/gui/component/select-names/e-select-names-popup.c325
-rw-r--r--addressbook/gui/component/select-names/e-select-names-popup.h36
-rw-r--r--addressbook/gui/component/select-names/e-select-names-table-model.c344
-rw-r--r--addressbook/gui/component/select-names/e-select-names-table-model.h51
-rw-r--r--addressbook/gui/component/select-names/e-select-names-text-model.c722
-rw-r--r--addressbook/gui/component/select-names/e-select-names-text-model.h45
-rw-r--r--addressbook/gui/component/select-names/e-select-names.c650
-rw-r--r--addressbook/gui/component/select-names/e-select-names.h102
-rw-r--r--addressbook/gui/component/select-names/recipient.glade61
-rw-r--r--addressbook/gui/component/select-names/select-names.glade268
-rw-r--r--addressbook/gui/contact-editor/.cvsignore8
-rw-r--r--addressbook/gui/contact-editor/Makefile.am62
-rw-r--r--addressbook/gui/contact-editor/arrow.pngbin174 -> 0 bytes
-rw-r--r--addressbook/gui/contact-editor/contact-editor.glade2453
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor-address.c243
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor-address.h78
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor-confirm-delete.glade83
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor-fullname.c243
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor-fullname.h78
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c2125
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.h124
-rw-r--r--addressbook/gui/contact-editor/e-contact-quick-add.c393
-rw-r--r--addressbook/gui/contact-editor/e-contact-quick-add.h41
-rw-r--r--addressbook/gui/contact-editor/e-contact-save-as.c80
-rw-r--r--addressbook/gui/contact-editor/e-contact-save-as.h41
-rw-r--r--addressbook/gui/contact-editor/fulladdr.glade475
-rw-r--r--addressbook/gui/contact-editor/fullname.glade389
-rw-r--r--addressbook/gui/contact-editor/test-editor.c145
-rw-r--r--addressbook/gui/search/.cvsignore7
-rw-r--r--addressbook/gui/search/Makefile.am23
-rw-r--r--addressbook/gui/search/addresstypes.xml61
-rw-r--r--addressbook/gui/search/e-addressbook-search-dialog.c235
-rw-r--r--addressbook/gui/search/e-addressbook-search-dialog.h71
-rw-r--r--addressbook/gui/widgets/.cvsignore12
-rw-r--r--addressbook/gui/widgets/Makefile.am128
-rw-r--r--addressbook/gui/widgets/alphabet.glade355
-rw-r--r--addressbook/gui/widgets/e-addressbook-model.c482
-rw-r--r--addressbook/gui/widgets/e-addressbook-model.h64
-rw-r--r--addressbook/gui/widgets/e-addressbook-view.c1019
-rw-r--r--addressbook/gui/widgets/e-addressbook-view.h100
-rw-r--r--addressbook/gui/widgets/e-minicard-control.c335
-rw-r--r--addressbook/gui/widgets/e-minicard-control.h8
-rw-r--r--addressbook/gui/widgets/e-minicard-label.c457
-rw-r--r--addressbook/gui/widgets/e-minicard-label.h85
-rw-r--r--addressbook/gui/widgets/e-minicard-view-widget.c329
-rw-r--r--addressbook/gui/widgets/e-minicard-view-widget.h79
-rw-r--r--addressbook/gui/widgets/e-minicard-view.c663
-rw-r--r--addressbook/gui/widgets/e-minicard-view.h110
-rw-r--r--addressbook/gui/widgets/e-minicard-widget-test.c114
-rw-r--r--addressbook/gui/widgets/e-minicard-widget.c250
-rw-r--r--addressbook/gui/widgets/e-minicard-widget.h77
-rw-r--r--addressbook/gui/widgets/e-minicard.c1034
-rw-r--r--addressbook/gui/widgets/e-minicard.h115
-rw-r--r--addressbook/gui/widgets/gal-view-factory-minicard.c120
-rw-r--r--addressbook/gui/widgets/gal-view-factory-minicard.h35
-rw-r--r--addressbook/gui/widgets/gal-view-minicard.c154
-rw-r--r--addressbook/gui/widgets/gal-view-minicard.h38
-rw-r--r--addressbook/gui/widgets/test-minicard-label.c129
-rw-r--r--addressbook/gui/widgets/test-minicard-view.c204
-rw-r--r--addressbook/gui/widgets/test-minicard.c119
-rw-r--r--addressbook/gui/widgets/test-reflow.c198
-rw-r--r--addressbook/printing/.cvsignore9
-rw-r--r--addressbook/printing/Makefile.am69
-rw-r--r--addressbook/printing/e-contact-print-envelope.c221
-rw-r--r--addressbook/printing/e-contact-print-envelope.h31
-rw-r--r--addressbook/printing/e-contact-print-style-editor.c150
-rw-r--r--addressbook/printing/e-contact-print-style-editor.h74
-rw-r--r--addressbook/printing/e-contact-print-types.h74
-rw-r--r--addressbook/printing/e-contact-print.c1119
-rw-r--r--addressbook/printing/e-contact-print.glade2007
-rw-r--r--addressbook/printing/e-contact-print.h32
-rw-r--r--addressbook/printing/medbook.ecps30
-rw-r--r--addressbook/printing/phonelist.ecps29
-rw-r--r--addressbook/printing/smallbook.ecps30
-rw-r--r--addressbook/printing/test-contact-print-style-editor.c90
-rw-r--r--addressbook/printing/test-print.c87
-rw-r--r--art/.cvsignore2
-rw-r--r--art/Makefile.am130
-rw-r--r--art/add-attachment.pngbin746 -> 0 bytes
-rw-r--r--art/add-service.pngbin505 -> 0 bytes
-rw-r--r--art/all_contacts.xpm136
-rw-r--r--art/attachment.xpm21
-rw-r--r--art/bell.xpm83
-rw-r--r--art/briefcase.pngbin2358 -> 0 bytes
-rw-r--r--art/butterfly.pngbin12117 -> 0 bytes
-rw-r--r--art/cellphone.pngbin3440 -> 0 bytes
-rw-r--r--art/check-filled.xpm21
-rw-r--r--art/compose-message.pngbin803 -> 0 bytes
-rw-r--r--art/configure_16_addressbook.xpm77
-rw-r--r--art/configure_16_calendar.xpm76
-rw-r--r--art/configure_16_folder.xpm85
-rw-r--r--art/configure_16_mail.xpm61
-rw-r--r--art/copy-message.pngbin863 -> 0 bytes
-rw-r--r--art/copy_16_message.xpm58
-rw-r--r--art/dayview.xpm34
-rw-r--r--art/delete_message.xpm79
-rw-r--r--art/edit.xpm84
-rw-r--r--art/empty.xpm21
-rw-r--r--art/encrypt.xpm80
-rw-r--r--art/envelope.pngbin2393 -> 0 bytes
-rw-r--r--art/evo-16-address-conduit.pngbin498 -> 0 bytes
-rw-r--r--art/evo-16-calendar-conduit.pngbin505 -> 0 bytes
-rw-r--r--art/evo-16-todo-conduit.pngbin702 -> 0 bytes
-rw-r--r--art/evo-48-address-conduit.pngbin2919 -> 0 bytes
-rw-r--r--art/evo-48-calendar-conduit.pngbin2889 -> 0 bytes
-rw-r--r--art/evo-48-todo-conduit.pngbin3677 -> 0 bytes
-rw-r--r--art/evolution-calendar-mini.pngbin496 -> 0 bytes
-rw-r--r--art/evolution-calendar.pngbin3152 -> 0 bytes
-rw-r--r--art/evolution-contacts-mini.pngbin452 -> 0 bytes
-rw-r--r--art/evolution-contacts-plain.pngbin2341 -> 0 bytes
-rw-r--r--art/evolution-contacts.pngbin3274 -> 0 bytes
-rw-r--r--art/evolution-inbox-mini.pngbin478 -> 0 bytes
-rw-r--r--art/evolution-inbox.pngbin3275 -> 0 bytes
-rw-r--r--art/evolution-notes-mini.pngbin516 -> 0 bytes
-rw-r--r--art/evolution-notes.pngbin3400 -> 0 bytes
-rw-r--r--art/evolution-tasks-mini.pngbin708 -> 0 bytes
-rw-r--r--art/evolution-tasks.pngbin3947 -> 0 bytes
-rw-r--r--art/evolution-today-mini.pngbin536 -> 0 bytes
-rw-r--r--art/evolution-today.pngbin4253 -> 0 bytes
-rw-r--r--art/evolution-trash-mini.pngbin433 -> 0 bytes
-rw-r--r--art/evolution-trash.pngbin2913 -> 0 bytes
-rw-r--r--art/evolution.pngbin4281 -> 0 bytes
-rw-r--r--art/executive-summary-bg.pngbin86508 -> 0 bytes
-rw-r--r--art/executive-summary-curve.pngbin1786 -> 0 bytes
-rw-r--r--art/fetch-mail.pngbin1027 -> 0 bytes
-rw-r--r--art/filters.xpm71
-rw-r--r--art/find_contact.xpm127
-rw-r--r--art/folder.xpm73
-rw-r--r--art/forget_passwords.xpm125
-rw-r--r--art/forward.pngbin1016 -> 0 bytes
-rw-r--r--art/forward.xpm51
-rw-r--r--art/globe.pngbin3328 -> 0 bytes
-rw-r--r--art/hide_deleted_messages.xpm39
-rw-r--r--art/hide_read_messages.xpm23
-rw-r--r--art/hide_selected_messages.xpm33
-rw-r--r--art/house.pngbin4135 -> 0 bytes
-rw-r--r--art/import.pngbin2309 -> 0 bytes
-rw-r--r--art/import.xpm59
-rw-r--r--art/jump.xpm14
-rw-r--r--art/mail-new.xpm67
-rw-r--r--art/mail-read.xpm70
-rw-r--r--art/mail-replied.xpm52
-rw-r--r--art/malehead.pngbin4220 -> 0 bytes
-rw-r--r--art/mark.xpm21
-rw-r--r--art/marlboro_filters.xpm45
-rw-r--r--art/meeting.xpm64
-rw-r--r--art/meeting_widget.pngbin14168 -> 0 bytes
-rw-r--r--art/monthview.xpm34
-rw-r--r--art/move-message.pngbin777 -> 0 bytes
-rw-r--r--art/move_message.xpm59
-rw-r--r--art/new-message.xpm38
-rw-r--r--art/new_appointment.pngbin931 -> 0 bytes
-rw-r--r--art/new_appointment.xpm123
-rw-r--r--art/new_contact.xpm137
-rw-r--r--art/pin.pngbin354 -> 0 bytes
-rw-r--r--art/print-preview.xpm95
-rw-r--r--art/print.xpm54
-rw-r--r--art/priority-high.xpm22
-rw-r--r--art/priority-low.xpm21
-rw-r--r--art/recur.xpm21
-rw-r--r--art/reply-to-all.pngbin1264 -> 0 bytes
-rw-r--r--art/reply.pngbin1107 -> 0 bytes
-rw-r--r--art/reply.xpm46
-rw-r--r--art/reply_to_all.xpm52
-rw-r--r--art/save.xpm45
-rw-r--r--art/score-high.xpm26
-rw-r--r--art/score-higher.xpm26
-rw-r--r--art/score-highest.xpm26
-rw-r--r--art/score-low.xpm26
-rw-r--r--art/score-lower.xpm26
-rw-r--r--art/score-lowest.xpm26
-rw-r--r--art/score-normal.xpm24
-rw-r--r--art/send-24-receive.pngbin726 -> 0 bytes
-rw-r--r--art/send-48-receive.pngbin2788 -> 0 bytes
-rw-r--r--art/send-receive.xpm43
-rw-r--r--art/send.pngbin1041 -> 0 bytes
-rw-r--r--art/service-close.pngbin360 -> 0 bytes
-rw-r--r--art/service-configure.pngbin341 -> 0 bytes
-rw-r--r--art/service-down-disabled.pngbin331 -> 0 bytes
-rw-r--r--art/service-down.pngbin249 -> 0 bytes
-rw-r--r--art/service-left-disabled.pngbin319 -> 0 bytes
-rw-r--r--art/service-left.pngbin268 -> 0 bytes
-rw-r--r--art/service-right-disabled.pngbin318 -> 0 bytes
-rw-r--r--art/service-right.pngbin270 -> 0 bytes
-rw-r--r--art/service-up-disabled.pngbin347 -> 0 bytes
-rw-r--r--art/service-up.pngbin267 -> 0 bytes
-rw-r--r--art/show_all_messages.xpm27
-rw-r--r--art/splash.pngbin97154 -> 0 bytes
-rw-r--r--art/task-assigned-to.xpm30
-rw-r--r--art/task-assigned.xpm30
-rw-r--r--art/task-recurring.xpm59
-rw-r--r--art/task.xpm27
-rw-r--r--art/tree-expanded.xpm22
-rw-r--r--art/tree-unexpanded.xpm22
-rw-r--r--art/undelete_message.xpm77
-rw-r--r--art/weekview.xpm34
-rw-r--r--art/work_offline.xpm33
-rw-r--r--art/workweekview.xpm34
-rw-r--r--art/yearview.xpm44
-rwxr-xr-xautogen.sh10
-rw-r--r--calendar/.cvsignore6
-rw-r--r--calendar/AUTHORS5
-rw-r--r--calendar/ChangeLog9959
-rw-r--r--calendar/Makefile.am7
-rw-r--r--calendar/TODO88
-rw-r--r--calendar/cal-client/.cvsignore15
-rw-r--r--calendar/cal-client/Makefile.am87
-rw-r--r--calendar/cal-client/cal-client-types.c53
-rw-r--r--calendar/cal-client/cal-client-types.h51
-rw-r--r--calendar/cal-client/cal-client.c1533
-rw-r--r--calendar/cal-client/cal-client.h133
-rw-r--r--calendar/cal-client/cal-listener.c387
-rw-r--r--calendar/cal-client/cal-listener.h93
-rw-r--r--calendar/cal-client/cal-query.c406
-rw-r--r--calendar/cal-client/cal-query.h81
-rw-r--r--calendar/cal-client/client-test.c216
-rw-r--r--calendar/cal-client/query-listener.c281
-rw-r--r--calendar/cal-client/query-listener.h96
-rw-r--r--calendar/cal-client/test.ics318
-rw-r--r--calendar/cal-util/.cvsignore7
-rw-r--r--calendar/cal-util/Makefile.am49
-rw-r--r--calendar/cal-util/cal-component.c4071
-rw-r--r--calendar/cal-util/cal-component.h361
-rw-r--r--calendar/cal-util/cal-recur.c3758
-rw-r--r--calendar/cal-util/cal-recur.h57
-rw-r--r--calendar/cal-util/cal-util.c75
-rw-r--r--calendar/cal-util/cal-util.h58
-rw-r--r--calendar/cal-util/calobj.c2008
-rw-r--r--calendar/cal-util/calobj.h312
-rw-r--r--calendar/cal-util/test-recur.c196
-rw-r--r--calendar/cal-util/timeutil.c385
-rw-r--r--calendar/cal-util/timeutil.h70
-rw-r--r--calendar/conduits/.cvsignore2
-rw-r--r--calendar/conduits/Makefile.am1
-rw-r--r--calendar/conduits/calendar/.cvsignore9
-rw-r--r--calendar/conduits/calendar/Makefile.am45
-rw-r--r--calendar/conduits/calendar/calendar-conduit-config.h120
-rw-r--r--calendar/conduits/calendar/calendar-conduit.c1198
-rw-r--r--calendar/conduits/calendar/calendar-conduit.h79
-rw-r--r--calendar/conduits/calendar/e-calendar-conduit-control-applet.desktop.in8
-rw-r--r--calendar/conduits/calendar/e-calendar.conduit.in9
-rw-r--r--calendar/conduits/todo/.cvsignore9
-rw-r--r--calendar/conduits/todo/Makefile.am46
-rw-r--r--calendar/conduits/todo/e-todo-conduit-control-applet.desktop.in7
-rw-r--r--calendar/conduits/todo/e-todo.conduit.in9
-rw-r--r--calendar/conduits/todo/todo-conduit-config.h120
-rw-r--r--calendar/conduits/todo/todo-conduit.c1012
-rw-r--r--calendar/conduits/todo/todo-conduit.h78
-rw-r--r--calendar/gui/.cvsignore17
-rw-r--r--calendar/gui/Evolution-Composer.h353
-rw-r--r--calendar/gui/GNOME_Evolution_Calendar.oaf.in120
-rw-r--r--calendar/gui/Makefile.am162
-rw-r--r--calendar/gui/alarm-notify.c963
-rw-r--r--calendar/gui/alarm-notify.h35
-rw-r--r--calendar/gui/alarm-notify/.cvsignore10
-rw-r--r--calendar/gui/alarm-notify/GNOME_Evolution_Calendar_AlarmNotify.oaf.in24
-rw-r--r--calendar/gui/alarm-notify/Makefile.am76
-rw-r--r--calendar/gui/alarm-notify/alarm-notify-dialog.c231
-rw-r--r--calendar/gui/alarm-notify/alarm-notify-dialog.h45
-rw-r--r--calendar/gui/alarm-notify/alarm-notify.c404
-rw-r--r--calendar/gui/alarm-notify/alarm-notify.glade228
-rw-r--r--calendar/gui/alarm-notify/alarm-notify.h67
-rw-r--r--calendar/gui/alarm-notify/alarm-queue.c964
-rw-r--r--calendar/gui/alarm-notify/alarm-queue.h36
-rw-r--r--calendar/gui/alarm-notify/alarm.c357
-rw-r--r--calendar/gui/alarm-notify/alarm.h44
-rw-r--r--calendar/gui/alarm-notify/client-main.c178
-rw-r--r--calendar/gui/alarm-notify/notify-main.c120
-rw-r--r--calendar/gui/calendar-commands.c479
-rw-r--r--calendar/gui/calendar-commands.h43
-rw-r--r--calendar/gui/calendar-component.c175
-rw-r--r--calendar/gui/calendar-component.h32
-rw-r--r--calendar/gui/calendar-config.c535
-rw-r--r--calendar/gui/calendar-config.h130
-rw-r--r--calendar/gui/calendar-model.c2229
-rw-r--r--calendar/gui/calendar-model.h93
-rw-r--r--calendar/gui/calendar-summary.c772
-rw-r--r--calendar/gui/calendar-summary.h36
-rw-r--r--calendar/gui/comp-util.c58
-rw-r--r--calendar/gui/comp-util.h30
-rw-r--r--calendar/gui/component-factory.c175
-rw-r--r--calendar/gui/component-factory.h32
-rw-r--r--calendar/gui/control-factory.c212
-rw-r--r--calendar/gui/control-factory.h31
-rw-r--r--calendar/gui/dialogs/.cvsignore3
-rw-r--r--calendar/gui/dialogs/Makefile.am35
-rw-r--r--calendar/gui/dialogs/alarm-notify-dialog.c231
-rw-r--r--calendar/gui/dialogs/alarm-notify-dialog.h45
-rw-r--r--calendar/gui/dialogs/alarm-notify.glade228
-rw-r--r--calendar/gui/dialogs/cal-prefs-dialog.c456
-rw-r--r--calendar/gui/dialogs/cal-prefs-dialog.glade1241
-rw-r--r--calendar/gui/dialogs/cal-prefs-dialog.h70
-rw-r--r--calendar/gui/dialogs/delete-comp.c108
-rw-r--r--calendar/gui/dialogs/delete-comp.h31
-rw-r--r--calendar/gui/dialogs/save-comp.c63
-rw-r--r--calendar/gui/dialogs/save-comp.h30
-rw-r--r--calendar/gui/dialogs/task-editor-dialog.glade695
-rw-r--r--calendar/gui/dialogs/task-editor.c1288
-rw-r--r--calendar/gui/dialogs/task-editor.h70
-rw-r--r--calendar/gui/dialogs/task-page.glade695
-rw-r--r--calendar/gui/e-calendar-table.c852
-rw-r--r--calendar/gui/e-calendar-table.h123
-rw-r--r--calendar/gui/e-day-view-main-item.c660
-rw-r--r--calendar/gui/e-day-view-main-item.h66
-rw-r--r--calendar/gui/e-day-view-time-item.c660
-rw-r--r--calendar/gui/e-day-view-time-item.h75
-rw-r--r--calendar/gui/e-day-view-top-item.c651
-rw-r--r--calendar/gui/e-day-view-top-item.h66
-rw-r--r--calendar/gui/e-day-view.c6662
-rw-r--r--calendar/gui/e-day-view.h615
-rw-r--r--calendar/gui/e-itip-control.c1081
-rw-r--r--calendar/gui/e-itip-control.glade478
-rw-r--r--calendar/gui/e-itip-control.h30
-rw-r--r--calendar/gui/e-meeting-dialog.glade489
-rw-r--r--calendar/gui/e-meeting-edit.c1001
-rw-r--r--calendar/gui/e-meeting-edit.h45
-rw-r--r--calendar/gui/e-tasks.c597
-rw-r--r--calendar/gui/e-tasks.h75
-rw-r--r--calendar/gui/e-week-view-event-item.c816
-rw-r--r--calendar/gui/e-week-view-event-item.h71
-rw-r--r--calendar/gui/e-week-view-main-item.c389
-rw-r--r--calendar/gui/e-week-view-main-item.h67
-rw-r--r--calendar/gui/e-week-view-titles-item.c311
-rw-r--r--calendar/gui/e-week-view-titles-item.h67
-rw-r--r--calendar/gui/e-week-view.c3626
-rw-r--r--calendar/gui/e-week-view.h452
-rw-r--r--calendar/gui/event-editor-dialog.glade1408
-rw-r--r--calendar/gui/event-editor.c3368
-rw-r--r--calendar/gui/event-editor.h77
-rw-r--r--calendar/gui/evolution-calendar-control.c201
-rw-r--r--calendar/gui/gnome-cal.c1708
-rw-r--r--calendar/gui/gnome-cal.h130
-rw-r--r--calendar/gui/gnome-cal.html44
-rw-r--r--calendar/gui/gnome-calendar-conduit.pngbin3000 -> 0 bytes
-rw-r--r--calendar/gui/goto-dialog.glade154
-rw-r--r--calendar/gui/goto.c220
-rw-r--r--calendar/gui/goto.h32
-rw-r--r--calendar/gui/itip-utils.c49
-rw-r--r--calendar/gui/itip-utils.h15
-rw-r--r--calendar/gui/main.c89
-rw-r--r--calendar/gui/meeting-mockup.glade488
-rw-r--r--calendar/gui/print.c1327
-rw-r--r--calendar/gui/print.h41
-rw-r--r--calendar/gui/tag-calendar.c172
-rw-r--r--calendar/gui/tag-calendar.h32
-rw-r--r--calendar/gui/tasks-control-factory.c77
-rw-r--r--calendar/gui/tasks-control-factory.h31
-rw-r--r--calendar/gui/tasks-control.c242
-rw-r--r--calendar/gui/tasks-control.h32
-rw-r--r--calendar/gui/tasks-migrate.c308
-rw-r--r--calendar/gui/tasks-migrate.h29
-rw-r--r--calendar/gui/test.vcf133
-rw-r--r--calendar/gui/test2.vcf133
-rw-r--r--calendar/gui/topic.dat2
-rw-r--r--calendar/gui/weekday-picker.c575
-rw-r--r--calendar/gui/weekday-picker.h73
-rw-r--r--calendar/gui/widget-util.c54
-rw-r--r--calendar/gui/widget-util.h31
-rw-r--r--calendar/idl/.cvsignore2
-rw-r--r--calendar/idl/Makefile.am7
-rw-r--r--calendar/idl/evolution-calendar.idl260
-rw-r--r--calendar/pcs/.cvsignore11
-rw-r--r--calendar/pcs/Makefile.am48
-rw-r--r--calendar/pcs/cal-backend-db.c1503
-rw-r--r--calendar/pcs/cal-backend-db.h57
-rw-r--r--calendar/pcs/cal-backend-file.c1623
-rw-r--r--calendar/pcs/cal-backend-file.h63
-rw-r--r--calendar/pcs/cal-backend.c542
-rw-r--r--calendar/pcs/cal-backend.h153
-rw-r--r--calendar/pcs/cal-common.h42
-rw-r--r--calendar/pcs/cal-factory.c799
-rw-r--r--calendar/pcs/cal-factory.h81
-rw-r--r--calendar/pcs/cal.c707
-rw-r--r--calendar/pcs/cal.h73
-rw-r--r--calendar/pcs/job.c99
-rw-r--r--calendar/pcs/job.h36
-rw-r--r--calendar/pcs/query.c1215
-rw-r--r--calendar/pcs/query.h69
-rw-r--r--camel/.cvsignore11
-rw-r--r--camel/CODING.STYLE19
-rw-r--r--camel/ChangeLog12134
-rw-r--r--camel/Makefile.am202
-rw-r--r--camel/README57
-rw-r--r--camel/README.COPYRIGHT47
-rw-r--r--camel/README.HACKING14
-rw-r--r--camel/README.mt171
-rw-r--r--camel/broken-date-parser.c318
-rw-r--r--camel/broken-date-parser.h32
-rw-r--r--camel/camel-address.c240
-rw-r--r--camel/camel-address.h70
-rw-r--r--camel/camel-charset-map-private.h4345
-rw-r--r--camel/camel-charset-map.c322
-rw-r--r--camel/camel-charset-map.h40
-rw-r--r--camel/camel-cipher-context.c448
-rw-r--r--camel/camel-cipher-context.h122
-rw-r--r--camel/camel-data-wrapper.c294
-rw-r--r--camel/camel-data-wrapper.h94
-rw-r--r--camel/camel-exception-list.def37
-rw-r--r--camel/camel-exception.c281
-rw-r--r--camel/camel-exception.h88
-rw-r--r--camel/camel-filter-driver.c911
-rw-r--r--camel/camel-filter-driver.h94
-rw-r--r--camel/camel-filter-search.c465
-rw-r--r--camel/camel-filter-search.h44
-rw-r--r--camel/camel-folder-search.c905
-rw-r--r--camel/camel-folder-search.h122
-rw-r--r--camel/camel-folder-summary.c2840
-rw-r--r--camel/camel-folder-summary.h334
-rw-r--r--camel/camel-folder-thread.c784
-rw-r--r--camel/camel-folder-thread.h58
-rw-r--r--camel/camel-folder.c1741
-rw-r--r--camel/camel-folder.h308
-rw-r--r--camel/camel-internet-address.c509
-rw-r--r--camel/camel-internet-address.h55
-rw-r--r--camel/camel-lock.c407
-rw-r--r--camel/camel-lock.h64
-rw-r--r--camel/camel-medium.c271
-rw-r--r--camel/camel-medium.h92
-rw-r--r--camel/camel-mime-filter-basic.c222
-rw-r--r--camel/camel-mime-filter-basic.h58
-rw-r--r--camel/camel-mime-filter-bestenc.c289
-rw-r--r--camel/camel-mime-filter-bestenc.h88
-rw-r--r--camel/camel-mime-filter-charset.c243
-rw-r--r--camel/camel-mime-filter-charset.h52
-rw-r--r--camel/camel-mime-filter-crlf.c150
-rw-r--r--camel/camel-mime-filter-crlf.h62
-rw-r--r--camel/camel-mime-filter-from.c221
-rw-r--r--camel/camel-mime-filter-from.h49
-rw-r--r--camel/camel-mime-filter-html.c322
-rw-r--r--camel/camel-mime-filter-html.h46
-rw-r--r--camel/camel-mime-filter-index.c156
-rw-r--r--camel/camel-mime-filter-index.h55
-rw-r--r--camel/camel-mime-filter-linewrap.c140
-rw-r--r--camel/camel-mime-filter-linewrap.h51
-rw-r--r--camel/camel-mime-filter-save.c144
-rw-r--r--camel/camel-mime-filter-save.h50
-rw-r--r--camel/camel-mime-filter.c256
-rw-r--r--camel/camel-mime-filter.h84
-rw-r--r--camel/camel-mime-message.c827
-rw-r--r--camel/camel-mime-message.h134
-rw-r--r--camel/camel-mime-parser.c1955
-rw-r--r--camel/camel-mime-parser.h133
-rw-r--r--camel/camel-mime-part-utils.c247
-rw-r--r--camel/camel-mime-part-utils.h45
-rw-r--r--camel/camel-mime-part.c748
-rw-r--r--camel/camel-mime-part.h130
-rw-r--r--camel/camel-mime-utils.c3617
-rw-r--r--camel/camel-mime-utils.h197
-rw-r--r--camel/camel-movemail.c598
-rw-r--r--camel/camel-movemail.h45
-rw-r--r--camel/camel-multipart.c522
-rw-r--r--camel/camel-multipart.h105
-rw-r--r--camel/camel-news-address.c65
-rw-r--r--camel/camel-news-address.h45
-rw-r--r--camel/camel-object.c984
-rw-r--r--camel/camel-object.h146
-rw-r--r--camel/camel-operation.c663
-rw-r--r--camel/camel-operation.h67
-rw-r--r--camel/camel-pgp-context.c1325
-rw-r--r--camel/camel-pgp-context.h80
-rw-r--r--camel/camel-pgp-mime.c514
-rw-r--r--camel/camel-pgp-mime.h64
-rw-r--r--camel/camel-private.h181
-rw-r--r--camel/camel-provider.c155
-rw-r--r--camel/camel-provider.h161
-rw-r--r--camel/camel-remote-store.c562
-rw-r--r--camel/camel-remote-store.h86
-rw-r--r--camel/camel-sasl-anonymous.c150
-rw-r--r--camel/camel-sasl-anonymous.h70
-rw-r--r--camel/camel-sasl-cram-md5.c142
-rw-r--r--camel/camel-sasl-cram-md5.h59
-rw-r--r--camel/camel-sasl-digest-md5.c895
-rw-r--r--camel/camel-sasl-digest-md5.h62
-rw-r--r--camel/camel-sasl-kerberos4.c223
-rw-r--r--camel/camel-sasl-kerberos4.h62
-rw-r--r--camel/camel-sasl-login.c134
-rw-r--r--camel/camel-sasl-login.h61
-rw-r--r--camel/camel-sasl-plain.c104
-rw-r--r--camel/camel-sasl-plain.h59
-rw-r--r--camel/camel-sasl.c256
-rw-r--r--camel/camel-sasl.h77
-rw-r--r--camel/camel-search-private.c471
-rw-r--r--camel/camel-search-private.h46
-rw-r--r--camel/camel-seekable-stream.c203
-rw-r--r--camel/camel-seekable-stream.h88
-rw-r--r--camel/camel-seekable-substream.c304
-rw-r--r--camel/camel-seekable-substream.h70
-rw-r--r--camel/camel-service.c630
-rw-r--r--camel/camel-service.h130
-rw-r--r--camel/camel-session.c564
-rw-r--r--camel/camel-session.h140
-rw-r--r--camel/camel-store.c779
-rw-r--r--camel/camel-store.h191
-rw-r--r--camel/camel-stream-buffer.c456
-rw-r--r--camel/camel-stream-buffer.h109
-rw-r--r--camel/camel-stream-filter.c382
-rw-r--r--camel/camel-stream-filter.h52
-rw-r--r--camel/camel-stream-fs.c374
-rw-r--r--camel/camel-stream-fs.h75
-rw-r--r--camel/camel-stream-mem.c251
-rw-r--r--camel/camel-stream-mem.h75
-rw-r--r--camel/camel-stream-null.c93
-rw-r--r--camel/camel-stream-null.h44
-rw-r--r--camel/camel-stream.c275
-rw-r--r--camel/camel-stream.h91
-rw-r--r--camel/camel-tcp-stream-openssl.c562
-rw-r--r--camel/camel-tcp-stream-openssl.h64
-rw-r--r--camel/camel-tcp-stream-raw.c445
-rw-r--r--camel/camel-tcp-stream-raw.h64
-rw-r--r--camel/camel-tcp-stream-ssl.c454
-rw-r--r--camel/camel-tcp-stream-ssl.h65
-rw-r--r--camel/camel-tcp-stream.c180
-rw-r--r--camel/camel-tcp-stream.h122
-rw-r--r--camel/camel-transport.c108
-rw-r--r--camel/camel-transport.h88
-rw-r--r--camel/camel-types.h77
-rw-r--r--camel/camel-uid-cache.c192
-rw-r--r--camel/camel-uid-cache.h56
-rw-r--r--camel/camel-url.c553
-rw-r--r--camel/camel-url.h87
-rw-r--r--camel/camel-vee-folder.c1052
-rw-r--r--camel/camel-vee-folder.h69
-rw-r--r--camel/camel-vee-store.c140
-rw-r--r--camel/camel-vee-store.h51
-rw-r--r--camel/camel-vtrash-folder.c142
-rw-r--r--camel/camel-vtrash-folder.h51
-rw-r--r--camel/camel.c87
-rw-r--r--camel/camel.h84
-rw-r--r--camel/devel-docs/camel_data_wrapper.diabin3062 -> 0 bytes
-rw-r--r--camel/devel-docs/camel_parser_states.diabin2505 -> 0 bytes
-rw-r--r--camel/devel-docs/camel_stream.diabin2669 -> 0 bytes
-rw-r--r--camel/gstring-util.c217
-rw-r--r--camel/gstring-util.h66
-rw-r--r--camel/hash-table-utils.c79
-rw-r--r--camel/hash-table-utils.h48
-rw-r--r--camel/providers/.cvsignore2
-rw-r--r--camel/providers/Makefile.am11
-rw-r--r--camel/providers/cache/.cvsignore11
-rw-r--r--camel/providers/cache/Makefile.am35
-rw-r--r--camel/providers/cache/camel-cache-folder.c810
-rw-r--r--camel/providers/cache/camel-cache-folder.h88
-rw-r--r--camel/providers/cache/camel-cache-map.c259
-rw-r--r--camel/providers/cache/camel-cache-map.h64
-rw-r--r--camel/providers/cache/camel-cache-provider.c54
-rw-r--r--camel/providers/cache/camel-cache-store.c299
-rw-r--r--camel/providers/cache/camel-cache-store.h68
-rw-r--r--camel/providers/cache/libcamelcache.urls1
-rw-r--r--camel/providers/imap/.cvsignore11
-rw-r--r--camel/providers/imap/Makefile.am50
-rw-r--r--camel/providers/imap/camel-imap-command.c599
-rw-r--r--camel/providers/imap/camel-imap-command.h61
-rw-r--r--camel/providers/imap/camel-imap-folder.c1345
-rw-r--r--camel/providers/imap/camel-imap-folder.h90
-rw-r--r--camel/providers/imap/camel-imap-message-cache.c293
-rw-r--r--camel/providers/imap/camel-imap-message-cache.h86
-rw-r--r--camel/providers/imap/camel-imap-private.h89
-rw-r--r--camel/providers/imap/camel-imap-provider.c149
-rw-r--r--camel/providers/imap/camel-imap-search.c152
-rw-r--r--camel/providers/imap/camel-imap-search.h51
-rw-r--r--camel/providers/imap/camel-imap-store.c1388
-rw-r--r--camel/providers/imap/camel-imap-store.h96
-rw-r--r--camel/providers/imap/camel-imap-summary.c200
-rw-r--r--camel/providers/imap/camel-imap-summary.h69
-rw-r--r--camel/providers/imap/camel-imap-types.h40
-rw-r--r--camel/providers/imap/camel-imap-utils.c568
-rw-r--r--camel/providers/imap/camel-imap-utils.h64
-rw-r--r--camel/providers/imap/camel-imap-wrapper.c220
-rw-r--r--camel/providers/imap/camel-imap-wrapper.h71
-rw-r--r--camel/providers/imap/libcamelimap.urls1
-rw-r--r--camel/providers/local/.cvsignore11
-rw-r--r--camel/providers/local/Makefile.am58
-rw-r--r--camel/providers/local/camel-local-folder.c351
-rw-r--r--camel/providers/local/camel-local-folder.h96
-rw-r--r--camel/providers/local/camel-local-private.h60
-rw-r--r--camel/providers/local/camel-local-provider.c80
-rw-r--r--camel/providers/local/camel-local-store.c312
-rw-r--r--camel/providers/local/camel-local-store.h68
-rw-r--r--camel/providers/local/camel-local-summary.c560
-rw-r--r--camel/providers/local/camel-local-summary.h86
-rw-r--r--camel/providers/local/camel-maildir-folder.c229
-rw-r--r--camel/providers/local/camel-maildir-folder.h59
-rw-r--r--camel/providers/local/camel-maildir-store.c200
-rw-r--r--camel/providers/local/camel-maildir-store.h56
-rw-r--r--camel/providers/local/camel-maildir-summary.c758
-rw-r--r--camel/providers/local/camel-maildir-summary.h84
-rw-r--r--camel/providers/local/camel-mbox-folder.c436
-rw-r--r--camel/providers/local/camel-mbox-folder.h63
-rw-r--r--camel/providers/local/camel-mbox-store.c171
-rw-r--r--camel/providers/local/camel-mbox-store.h59
-rw-r--r--camel/providers/local/camel-mbox-summary.c888
-rw-r--r--camel/providers/local/camel-mbox-summary.h63
-rw-r--r--camel/providers/local/camel-mh-folder.c214
-rw-r--r--camel/providers/local/camel-mh-folder.h59
-rw-r--r--camel/providers/local/camel-mh-store.c136
-rw-r--r--camel/providers/local/camel-mh-store.h56
-rw-r--r--camel/providers/local/camel-mh-summary.c397
-rw-r--r--camel/providers/local/camel-mh-summary.h53
-rw-r--r--camel/providers/local/libcamellocal.urls3
-rw-r--r--camel/providers/nntp/.cvsignore12
-rw-r--r--camel/providers/nntp/Makefile.am53
-rw-r--r--camel/providers/nntp/camel-nntp-auth.c94
-rw-r--r--camel/providers/nntp/camel-nntp-auth.h43
-rw-r--r--camel/providers/nntp/camel-nntp-folder.c265
-rw-r--r--camel/providers/nntp/camel-nntp-folder.h74
-rw-r--r--camel/providers/nntp/camel-nntp-grouplist.c214
-rw-r--r--camel/providers/nntp/camel-nntp-grouplist.h49
-rw-r--r--camel/providers/nntp/camel-nntp-newsrc.c645
-rw-r--r--camel/providers/nntp/camel-nntp-newsrc.h34
-rw-r--r--camel/providers/nntp/camel-nntp-provider.c112
-rw-r--r--camel/providers/nntp/camel-nntp-resp-codes.h53
-rw-r--r--camel/providers/nntp/camel-nntp-store.c852
-rw-r--r--camel/providers/nntp/camel-nntp-store.h113
-rw-r--r--camel/providers/nntp/camel-nntp-types.h34
-rw-r--r--camel/providers/nntp/camel-nntp-utils.c256
-rw-r--r--camel/providers/nntp/camel-nntp-utils.h42
-rw-r--r--camel/providers/nntp/libcamelnntp.urls2
-rw-r--r--camel/providers/nntp/test-newsrc.c10
-rw-r--r--camel/providers/pop3/.cvsignore10
-rw-r--r--camel/providers/pop3/Makefile.am37
-rw-r--r--camel/providers/pop3/camel-pop3-folder.c357
-rw-r--r--camel/providers/pop3/camel-pop3-folder.h72
-rw-r--r--camel/providers/pop3/camel-pop3-provider.c113
-rw-r--r--camel/providers/pop3/camel-pop3-store.c648
-rw-r--r--camel/providers/pop3/camel-pop3-store.h79
-rw-r--r--camel/providers/pop3/libcamelpop3.urls1
-rw-r--r--camel/providers/sendmail/.cvsignore11
-rw-r--r--camel/providers/sendmail/Makefile.am31
-rw-r--r--camel/providers/sendmail/camel-sendmail-provider.c63
-rw-r--r--camel/providers/sendmail/camel-sendmail-transport.c250
-rw-r--r--camel/providers/sendmail/camel-sendmail-transport.h64
-rw-r--r--camel/providers/sendmail/libcamelsendmail.urls1
-rw-r--r--camel/providers/smtp/.cvsignore10
-rw-r--r--camel/providers/smtp/Makefile.am36
-rw-r--r--camel/providers/smtp/camel-smtp-provider.c65
-rw-r--r--camel/providers/smtp/camel-smtp-transport.c1082
-rw-r--r--camel/providers/smtp/camel-smtp-transport.h81
-rw-r--r--camel/providers/smtp/libcamelsmtp.urls1
-rw-r--r--camel/string-utils.c209
-rw-r--r--camel/string-utils.h68
-rw-r--r--camel/tests/.cvsignore7
-rw-r--r--camel/tests/Makefile.am3
-rw-r--r--camel/tests/README44
-rwxr-xr-xcamel/tests/data/gendoc.pl65
-rwxr-xr-xcamel/tests/data/genline.pl72
-rwxr-xr-xcamel/tests/data/getaddr.pl32
-rw-r--r--camel/tests/folder/.cvsignore12
-rw-r--r--camel/tests/folder/Makefile.am29
-rw-r--r--camel/tests/folder/README11
-rw-r--r--camel/tests/folder/test1.c59
-rw-r--r--camel/tests/folder/test2.c60
-rw-r--r--camel/tests/folder/test3.c344
-rw-r--r--camel/tests/folder/test4.c73
-rw-r--r--camel/tests/folder/test5.c73
-rw-r--r--camel/tests/folder/test6.c74
-rw-r--r--camel/tests/folder/test7.c74
-rw-r--r--camel/tests/folder/test8.c223
-rw-r--r--camel/tests/folder/test9.c234
-rw-r--r--camel/tests/lib/.cvsignore12
-rw-r--r--camel/tests/lib/Makefile.am13
-rw-r--r--camel/tests/lib/address-data.h93
-rw-r--r--camel/tests/lib/addresses.c51
-rw-r--r--camel/tests/lib/addresses.h5
-rw-r--r--camel/tests/lib/camel-test.c350
-rw-r--r--camel/tests/lib/camel-test.h68
-rw-r--r--camel/tests/lib/folders.c526
-rw-r--r--camel/tests/lib/folders.h20
-rw-r--r--camel/tests/lib/messages.c153
-rw-r--r--camel/tests/lib/messages.h12
-rw-r--r--camel/tests/lib/streams.c244
-rw-r--r--camel/tests/lib/streams.h12
-rw-r--r--camel/tests/message/.cvsignore15
-rw-r--r--camel/tests/message/Makefile.am23
-rw-r--r--camel/tests/message/README5
-rw-r--r--camel/tests/message/test1.c200
-rw-r--r--camel/tests/message/test2.c327
-rw-r--r--camel/tests/message/test3.c199
-rw-r--r--camel/tests/misc/.cvsignore11
-rw-r--r--camel/tests/misc/Makefile.am21
-rw-r--r--camel/tests/misc/README3
-rw-r--r--camel/tests/misc/url.c103
-rw-r--r--camel/tests/smime/.cvsignore5
-rw-r--r--camel/tests/smime/Makefile.am20
-rw-r--r--camel/tests/smime/README2
-rw-r--r--camel/tests/smime/pgp-mime.c101
-rw-r--r--camel/tests/smime/pgp.c110
-rw-r--r--camel/tests/stream/.cvsignore11
-rw-r--r--camel/tests/stream/Makefile.am21
-rw-r--r--camel/tests/stream/README4
-rw-r--r--camel/tests/stream/test1.c119
-rw-r--r--camel/tests/stream/test2.c53
-rw-r--r--camel/tests/stream/test3.c104
-rw-r--r--cmdline/.cvsignore5
-rw-r--r--cmdline/Makefile.am18
-rw-r--r--cmdline/compose.151
-rw-r--r--cmdline/compose.c152
-rw-r--r--composer/.cvsignore20
-rw-r--r--composer/ChangeLog1554
-rw-r--r--composer/Composer.idl4
-rw-r--r--composer/Evolution-Composer.idl96
-rw-r--r--composer/Makefile.am92
-rw-r--r--composer/bad-icon.xpm53
-rw-r--r--composer/e-icon-list.c2675
-rw-r--r--composer/e-icon-list.h178
-rw-r--r--composer/e-msg-composer-attachment-bar.c808
-rw-r--r--composer/e-msg-composer-attachment-bar.h75
-rw-r--r--composer/e-msg-composer-attachment.c466
-rw-r--r--composer/e-msg-composer-attachment.glade332
-rw-r--r--composer/e-msg-composer-attachment.h74
-rw-r--r--composer/e-msg-composer-hdrs.c926
-rw-r--r--composer/e-msg-composer-hdrs.h117
-rw-r--r--composer/e-msg-composer-select-file.c178
-rw-r--r--composer/e-msg-composer-select-file.h32
-rw-r--r--composer/e-msg-composer.c2801
-rw-r--r--composer/e-msg-composer.h162
-rw-r--r--composer/evolution-composer.c376
-rw-r--r--composer/evolution-composer.h70
-rw-r--r--composer/listener.c230
-rw-r--r--composer/listener.h56
-rw-r--r--configure.in832
-rw-r--r--data/.cvsignore4
-rw-r--r--data/Makefile.am14
-rw-r--r--data/evolution.desktop.in7
-rw-r--r--data/evolution.keys.in24
-rw-r--r--data/evolution.mime2
-rw-r--r--default_user/.cvsignore2
-rw-r--r--default_user/ChangeLog173
-rw-r--r--default_user/Makefile.am9
-rw-r--r--default_user/addressbook-sources.xml43
-rw-r--r--default_user/local/.cvsignore2
-rw-r--r--default_user/local/Calendar/.cvsignore2
-rw-r--r--default_user/local/Calendar/Makefile.am3
-rw-r--r--default_user/local/Calendar/folder-metadata.xml5
-rw-r--r--default_user/local/Contacts/.cvsignore2
-rw-r--r--default_user/local/Contacts/Makefile.am5
-rw-r--r--default_user/local/Contacts/create-initial0
-rw-r--r--default_user/local/Contacts/folder-metadata.xml5
-rw-r--r--default_user/local/Drafts/.cvsignore2
-rw-r--r--default_user/local/Drafts/Makefile.am4
-rw-r--r--default_user/local/Drafts/folder-metadata.xml5
-rw-r--r--default_user/local/Executive-Summary/.cvsignore2
-rw-r--r--default_user/local/Executive-Summary/Makefile.am6
-rw-r--r--default_user/local/Executive-Summary/folder-metadata.xml5
-rw-r--r--default_user/local/Inbox/.cvsignore2
-rw-r--r--default_user/local/Inbox/Makefile.am7
-rw-r--r--default_user/local/Inbox/folder-metadata.xml5
-rw-r--r--default_user/local/Inbox/mbox2225
-rw-r--r--default_user/local/Makefile.am10
-rw-r--r--default_user/local/Outbox/.cvsignore2
-rw-r--r--default_user/local/Outbox/Makefile.am4
-rw-r--r--default_user/local/Outbox/folder-metadata.xml5
-rw-r--r--default_user/local/Sent/.cvsignore2
-rw-r--r--default_user/local/Sent/Makefile.am4
-rw-r--r--default_user/local/Sent/folder-metadata.xml5
-rw-r--r--default_user/local/Tasks/.cvsignore2
-rw-r--r--default_user/local/Tasks/Makefile.am3
-rw-r--r--default_user/local/Tasks/folder-metadata.xml5
-rw-r--r--default_user/local/Trash/.cvsignore2
-rw-r--r--default_user/local/Trash/Makefile.am4
-rw-r--r--default_user/local/Trash/folder-metadata.xml5
-rw-r--r--default_user/searches.xml73
-rw-r--r--default_user/shortcuts.xml19
-rw-r--r--devel-docs/.cvsignore3
-rw-r--r--devel-docs/Makefile.am3
-rw-r--r--devel-docs/camel/.cvsignore12
-rw-r--r--devel-docs/camel/Makefile.am101
-rw-r--r--devel-docs/camel/README_AND_TODO.txt43
-rw-r--r--devel-docs/camel/camel-docs.sgml28
-rw-r--r--devel-docs/camel/camel-sections.txt154
-rw-r--r--devel-docs/camel/camel.types9
-rw-r--r--devel-docs/camel/tmpl/.cvsignore2
-rw-r--r--devel-docs/camel/tmpl/camel-data-wrapper.sgml26
-rw-r--r--devel-docs/camel/tmpl/camel-folder.sgml96
-rw-r--r--devel-docs/camel/tmpl/camel-mime-message.sgml171
-rw-r--r--devel-docs/camel/tmpl/camel-mime-part.sgml151
-rw-r--r--devel-docs/camel/tmpl/camel-recipient.sgml88
-rw-r--r--devel-docs/camel/tmpl/camel-service.sgml72
-rw-r--r--devel-docs/camel/tmpl/camel-store.sgml45
-rw-r--r--devel-docs/camel/tmpl/camel-stream.sgml101
-rw-r--r--devel-docs/misc/ref_and_id_proposition.txt237
-rw-r--r--devel-docs/query/virtual-folder-in-depth.sgml407
-rw-r--r--devel-docs/query/virtual-folder-in-depth.txt309
-rw-r--r--doc/.cvsignore2
-rw-r--r--doc/C/.cvsignore9
-rw-r--r--doc/C/Makefile.am57
-rw-r--r--doc/C/POTFILES.in16
-rw-r--r--doc/C/apx-authors.sgml75
-rw-r--r--doc/C/apx-bugs.sgml23
-rw-r--r--doc/C/apx-gloss.sgml459
-rw-r--r--doc/C/config-prefs.sgml646
-rw-r--r--doc/C/config-setupassist.sgml213
-rw-r--r--doc/C/config-sync.sgml124
-rw-r--r--doc/C/evolution.sgml145
-rw-r--r--doc/C/fig/calendar.pngbin30227 -> 0 bytes
-rw-r--r--doc/C/fig/config-cal.pngbin6898 -> 0 bytes
-rw-r--r--doc/C/fig/config-mail.pngbin8680 -> 0 bytes
-rw-r--r--doc/C/fig/contact-editor.pngbin37707 -> 0 bytes
-rw-r--r--doc/C/fig/contact.pngbin27020 -> 0 bytes
-rw-r--r--doc/C/fig/filter-assist-fig.pngbin6644 -> 0 bytes
-rw-r--r--doc/C/fig/filter-new-fig.pngbin7826 -> 0 bytes
-rw-r--r--doc/C/fig/mail-composer.pngbin15277 -> 0 bytes
-rw-r--r--doc/C/fig/mail-druid-pic.pngbin35959 -> 0 bytes
-rw-r--r--doc/C/fig/mail-inbox.pngbin31474 -> 0 bytes
-rw-r--r--doc/C/fig/mainwindow-pic.pngbin166348 -> 0 bytes
-rw-r--r--doc/C/fig/print-dest.pngbin7219 -> 0 bytes
-rw-r--r--doc/C/fig/print-preview.pngbin26643 -> 0 bytes
-rw-r--r--doc/C/fig/vfolder-createrule-fig.pngbin7621 -> 0 bytes
-rw-r--r--doc/C/menuref.sgml1470
-rw-r--r--doc/C/preface.sgml438
-rw-r--r--doc/C/usage-calendar.sgml371
-rw-r--r--doc/C/usage-contact.sgml617
-rw-r--r--doc/C/usage-exec-summary.sgml91
-rw-r--r--doc/C/usage-mail.sgml1539
-rw-r--r--doc/C/usage-mainwindow.sgml453
-rw-r--r--doc/C/usage-notes.sgml49
-rw-r--r--doc/C/usage-print.sgml105
-rw-r--r--doc/C/usage-sync.sgml20
-rw-r--r--doc/COPYING-DOCS355
-rw-r--r--doc/Camel-Classes35
-rw-r--r--doc/ChangeLog699
-rw-r--r--doc/Design201
-rw-r--r--doc/Keybindings13
-rw-r--r--doc/Makefile.am1
-rw-r--r--doc/NAMESPACE65
-rw-r--r--doc/README_Translations45
-rw-r--r--doc/devel/.cvsignore4
-rw-r--r--doc/devel/ChangeLog159
-rw-r--r--doc/devel/Makefile.am84
-rw-r--r--doc/devel/calendar/.cvsignore2
-rw-r--r--doc/devel/calendar/Makefile.am7
-rw-r--r--doc/devel/calendar/alarm-generation.sgml139
-rw-r--r--doc/devel/calendar/architecture.sgml162
-rw-r--r--doc/devel/calendar/cal-client/.cvsignore3
-rw-r--r--doc/devel/calendar/cal-client/Makefile.am131
-rw-r--r--doc/devel/calendar/cal-client/evolution-cal-client-decl.txt161
-rw-r--r--doc/devel/calendar/cal-client/evolution-cal-client-sections.txt44
-rw-r--r--doc/devel/calendar/cal-client/evolution-cal-client.args0
-rw-r--r--doc/devel/calendar/cal-client/evolution-cal-client.hierarchy2
-rw-r--r--doc/devel/calendar/cal-client/evolution-cal-client.signals21
-rw-r--r--doc/devel/calendar/cal-client/evolution-cal-client.types4
-rw-r--r--doc/devel/calendar/cal-client/tmpl/cal-client.sgml303
-rw-r--r--doc/devel/calendar/cal-client/tmpl/evolution-cal-client-unused.sgml84
-rw-r--r--doc/devel/calendar/cal-util/.cvsignore3
-rw-r--r--doc/devel/calendar/cal-util/Makefile.am142
-rw-r--r--doc/devel/calendar/cal-util/evolution-cal-util-decl.txt780
-rw-r--r--doc/devel/calendar/cal-util/evolution-cal-util-sections.txt161
-rw-r--r--doc/devel/calendar/cal-util/evolution-cal-util.args0
-rw-r--r--doc/devel/calendar/cal-util/evolution-cal-util.hierarchy2
-rw-r--r--doc/devel/calendar/cal-util/evolution-cal-util.signals0
-rw-r--r--doc/devel/calendar/cal-util/evolution-cal-util.types4
-rw-r--r--doc/devel/calendar/cal-util/tmpl/cal-component.sgml991
-rw-r--r--doc/devel/calendar/cal-util/tmpl/cal-recur.sgml42
-rw-r--r--doc/devel/calendar/cal-util/tmpl/cal-util.sgml48
-rw-r--r--doc/devel/calendar/cal-util/tmpl/evolution-cal-util-unused.sgml228
-rw-r--r--doc/devel/calendar/cal-util/tmpl/timeutil.sgml176
-rw-r--r--doc/devel/calendar/evolution-calendar.sgml52
-rw-r--r--doc/devel/calendar/public-reference.sgml24
-rw-r--r--doc/devel/evolution-devel-guide.sgml97
-rw-r--r--doc/devel/executive-summary/.cvsignore2
-rw-r--r--doc/devel/executive-summary/Makefile.am125
-rw-r--r--doc/devel/executive-summary/evolution-services-decl.txt599
-rw-r--r--doc/devel/executive-summary/evolution-services-sections.txt95
-rw-r--r--doc/devel/executive-summary/evolution-services.args0
-rw-r--r--doc/devel/executive-summary/evolution-services.hierarchy15
-rw-r--r--doc/devel/executive-summary/evolution-services.signals0
-rw-r--r--doc/devel/executive-summary/evolution-services.types10
-rw-r--r--doc/devel/executive-summary/private-reference.sgml20
-rw-r--r--doc/devel/executive-summary/public-reference.sgml22
-rw-r--r--doc/devel/executive-summary/tmpl/evolution-services-unused.sgml0
-rw-r--r--doc/devel/executive-summary/tmpl/executive-summary-component-factory-client.sgml53
-rw-r--r--doc/devel/executive-summary/tmpl/executive-summary-component-factory.sgml46
-rw-r--r--doc/devel/executive-summary/tmpl/executive-summary-component.sgml37
-rw-r--r--doc/devel/executive-summary/tmpl/executive-summary-html-view.sgml75
-rw-r--r--doc/devel/fdl.sgml671
-rw-r--r--doc/devel/importer/.cvsignore3
-rw-r--r--doc/devel/importer/Makefile.am127
-rw-r--r--doc/devel/importer/evolution-shell-importer-sections.txt79
-rw-r--r--doc/devel/importer/evolution-shell-importer.args0
-rw-r--r--doc/devel/importer/evolution-shell-importer.heirarchy5
-rw-r--r--doc/devel/importer/evolution-shell-importer.hierarchy14
-rw-r--r--doc/devel/importer/evolution-shell-importer.types9
-rw-r--r--doc/devel/importer/private-reference.sgml21
-rw-r--r--doc/devel/importer/public-reference.sgml20
-rw-r--r--doc/devel/importer/tmpl/evolution-importer-client.sgml83
-rw-r--r--doc/devel/importer/tmpl/evolution-importer.sgml86
-rw-r--r--doc/devel/importer/tmpl/evolution-shell-importer-unused.sgml10
-rw-r--r--doc/devel/preface.sgml113
-rw-r--r--doc/devel/reference.sgml49
-rw-r--r--doc/es.po/apx-authors.sgml.po178
-rw-r--r--doc/es.po/apx-bugs.sgml.po56
-rw-r--r--doc/es.po/apx-gloss.sgml.po745
-rw-r--r--doc/es.po/config-prefs.sgml.po1364
-rw-r--r--doc/es.po/config-setupassist.sgml.po445
-rw-r--r--doc/es.po/config-sync.sgml.po264
-rw-r--r--doc/es.po/evolution.sgml.po165
-rw-r--r--doc/es.po/menuref.sgml.po3062
-rw-r--r--doc/es.po/preface.sgml.po934
-rw-r--r--doc/es.po/usage-calendar.sgml.po812
-rw-r--r--doc/es.po/usage-contact.sgml.po1119
-rw-r--r--doc/es.po/usage-mail.sgml.po2302
-rw-r--r--doc/es.po/usage-mainwindow.sgml.po746
-rw-r--r--doc/es.po/usage-notes.sgml.po111
-rw-r--r--doc/es.po/usage-print.sgml.po196
-rw-r--r--doc/es.po/usage-sync.sgml.po60
-rw-r--r--doc/es/Makefile.in321
-rw-r--r--doc/es/apx-authors.sgml75
-rw-r--r--doc/es/apx-bugs.sgml23
-rw-r--r--doc/es/apx-gloss.sgml462
-rw-r--r--doc/es/config-prefs.sgml646
-rw-r--r--doc/es/config-setupassist.sgml211
-rw-r--r--doc/es/config-sync.sgml122
-rw-r--r--doc/es/evolution.sgml147
-rw-r--r--doc/es/menuref.sgml1477
-rw-r--r--doc/es/preface.sgml444
-rw-r--r--doc/es/usage-calendar.sgml373
-rw-r--r--doc/es/usage-contact.sgml619
-rw-r--r--doc/es/usage-mail.sgml1526
-rw-r--r--doc/es/usage-mainwindow.sgml453
-rw-r--r--doc/es/usage-notes.sgml49
-rw-r--r--doc/es/usage-print.sgml104
-rw-r--r--doc/es/usage-sync.sgml20
-rwxr-xr-xdoc/update_po.pl203
-rwxr-xr-xdoc/update_translation.pl240
-rw-r--r--doc/white-papers/calendar/calendar.sgml209
-rw-r--r--doc/white-papers/mail/camel.sgml339
-rw-r--r--doc/white-papers/mail/ibex.sgml158
-rw-r--r--doc/white-papers/widgets/e-table.sgml279
-rw-r--r--e-util/.cvsignore6
-rw-r--r--e-util/ChangeLog1125
-rw-r--r--e-util/Makefile.am74
-rw-r--r--e-util/e-bit-array.c412
-rw-r--r--e-util/e-bit-array.h82
-rw-r--r--e-util/e-corba-utils.c37
-rw-r--r--e-util/e-corba-utils.h30
-rw-r--r--e-util/e-dbhash.c200
-rw-r--r--e-util/e-dbhash.h45
-rw-r--r--e-util/e-dialog-widgets.c832
-rw-r--r--e-util/e-dialog-widgets.h60
-rw-r--r--e-util/e-gtk-utils.c161
-rw-r--r--e-util/e-gtk-utils.h45
-rw-r--r--e-util/e-gui-utils.c120
-rw-r--r--e-util/e-gui-utils.h23
-rw-r--r--e-util/e-html-utils.c381
-rw-r--r--e-util/e-html-utils.h38
-rw-r--r--e-util/e-i18n.h63
-rw-r--r--e-util/e-iterator.c186
-rw-r--r--e-util/e-iterator.h69
-rw-r--r--e-util/e-list-iterator.c242
-rw-r--r--e-util/e-list-iterator.h45
-rw-r--r--e-util/e-list.c176
-rw-r--r--e-util/e-list.h63
-rw-r--r--e-util/e-memory.c891
-rw-r--r--e-util/e-memory.h65
-rw-r--r--e-util/e-msgport.c868
-rw-r--r--e-util/e-msgport.h81
-rw-r--r--e-util/e-path.c119
-rw-r--r--e-util/e-path.h26
-rw-r--r--e-util/e-pilot-map.c304
-rw-r--r--e-util/e-pilot-map.h54
-rw-r--r--e-util/e-pilot-util.c62
-rw-r--r--e-util/e-pilot-util.h29
-rw-r--r--e-util/e-sexp.c1282
-rw-r--r--e-util/e-sexp.h162
-rw-r--r--e-util/e-sorter.c142
-rw-r--r--e-util/e-sorter.h59
-rw-r--r--e-util/e-text-event-processor-emacs-like.c499
-rw-r--r--e-util/e-text-event-processor-emacs-like.h67
-rw-r--r--e-util/e-text-event-processor-types.h133
-rw-r--r--e-util/e-text-event-processor.c146
-rw-r--r--e-util/e-text-event-processor.h75
-rw-r--r--e-util/e-time-utils.c330
-rw-r--r--e-util/e-time-utils.h49
-rw-r--r--e-util/e-url.c86
-rw-r--r--e-util/e-url.h37
-rw-r--r--e-util/e-util.c1050
-rw-r--r--e-util/e-util.h205
-rw-r--r--e-util/e-xml-utils.c420
-rw-r--r--e-util/e-xml-utils.h99
-rw-r--r--e-util/ename/.cvsignore8
-rw-r--r--e-util/ename/Makefile.am57
-rw-r--r--e-util/ename/TODO2
-rw-r--r--e-util/ename/e-address-western.c446
-rw-r--r--e-util/ename/e-address-western.h21
-rw-r--r--e-util/ename/e-name-western-tables.h74
-rw-r--r--e-util/ename/e-name-western.c870
-rw-r--r--e-util/ename/e-name-western.h21
-rw-r--r--e-util/ename/test-ename-western-gtk.c157
-rw-r--r--e-util/ename/test-ename-western.c71
-rw-r--r--e-util/md5-utils.c362
-rw-r--r--e-util/md5-utils.h52
-rw-r--r--executive-summary/.cvsignore4
-rw-r--r--executive-summary/ChangeLog802
-rw-r--r--executive-summary/GNOME_Evolution_Summary.oaf.in29
-rw-r--r--executive-summary/Makefile.am12
-rw-r--r--executive-summary/component/.cvsignore10
-rw-r--r--executive-summary/component/Makefile.am91
-rw-r--r--executive-summary/component/component-factory.c155
-rw-r--r--executive-summary/component/component-factory.h31
-rw-r--r--executive-summary/component/e-summary-callbacks.c321
-rw-r--r--executive-summary/component/e-summary-callbacks.h12
-rw-r--r--executive-summary/component/e-summary-factory.c186
-rw-r--r--executive-summary/component/e-summary-factory.h35
-rw-r--r--executive-summary/component/e-summary-prefs.c123
-rw-r--r--executive-summary/component/e-summary-prefs.h46
-rw-r--r--executive-summary/component/e-summary-url.c849
-rw-r--r--executive-summary/component/e-summary-url.h37
-rw-r--r--executive-summary/component/e-summary-util.c132
-rw-r--r--executive-summary/component/e-summary-util.h30
-rw-r--r--executive-summary/component/e-summary.c1339
-rw-r--r--executive-summary/component/e-summary.h116
-rw-r--r--executive-summary/component/executive-summary-config.glade223
-rw-r--r--executive-summary/component/executive-summary.pngbin25562 -> 0 bytes
-rw-r--r--executive-summary/component/main.c80
-rw-r--r--executive-summary/default-header.html14
-rw-r--r--executive-summary/evolution-services/.cvsignore11
-rw-r--r--executive-summary/evolution-services/Makefile.am58
-rw-r--r--executive-summary/evolution-services/executive-summary-client.c172
-rw-r--r--executive-summary/evolution-services/executive-summary-client.h65
-rw-r--r--executive-summary/evolution-services/executive-summary-component-client.c178
-rw-r--r--executive-summary/evolution-services/executive-summary-component-client.h68
-rw-r--r--executive-summary/evolution-services/executive-summary-component-factory-client.c178
-rw-r--r--executive-summary/evolution-services/executive-summary-component-factory-client.h57
-rw-r--r--executive-summary/evolution-services/executive-summary-component-view.c401
-rw-r--r--executive-summary/evolution-services/executive-summary-component-view.h93
-rw-r--r--executive-summary/evolution-services/executive-summary-component.c354
-rw-r--r--executive-summary/evolution-services/executive-summary-component.h84
-rw-r--r--executive-summary/evolution-services/executive-summary-html-view.c341
-rw-r--r--executive-summary/evolution-services/executive-summary-html-view.h65
-rw-r--r--executive-summary/evolution-services/executive-summary.c267
-rw-r--r--executive-summary/evolution-services/executive-summary.h68
-rw-r--r--executive-summary/idl/.cvsignore2
-rw-r--r--executive-summary/idl/Executive-Summary.idl4
-rw-r--r--executive-summary/idl/HtmlView.idl25
-rw-r--r--executive-summary/idl/Makefile.am23
-rw-r--r--executive-summary/idl/Summary.idl20
-rw-r--r--executive-summary/idl/SummaryComponent.idl36
-rw-r--r--executive-summary/summary.html45
-rw-r--r--executive-summary/test-service/.cvsignore9
-rw-r--r--executive-summary/test-service/GNOME_Evolution_Summary_rdf.oaf.in27
-rw-r--r--executive-summary/test-service/GNOME_Evolution_Summary_test.oaf.in53
-rw-r--r--executive-summary/test-service/Makefile.am43
-rw-r--r--executive-summary/test-service/main.c297
-rw-r--r--executive-summary/test-service/rdf-summary.c971
-rw-r--r--executive-summary/widgets/.cvsignore5
-rw-r--r--executive-summary/widgets/Makefile.am32
-rw-r--r--executive-summary/widgets/e-summary-subwindow.c301
-rw-r--r--executive-summary/widgets/e-summary-subwindow.h68
-rw-r--r--executive-summary/widgets/e-summary-title-button.c403
-rw-r--r--executive-summary/widgets/e-summary-title-button.h55
-rw-r--r--executive-summary/widgets/e-summary-titlebar.c412
-rw-r--r--executive-summary/widgets/e-summary-titlebar.h56
-rw-r--r--executive-summary/widgets/edit.xpm19
-rw-r--r--executive-summary/widgets/esummary-window-test.c45
-rw-r--r--executive-summary/widgets/shade.xpm19
-rw-r--r--executive-summary/widgets/x.xpm19
-rw-r--r--filter/.cvsignore9
-rw-r--r--filter/ChangeLog1698
-rw-r--r--filter/Makefile.am84
-rw-r--r--filter/filter-code.c122
-rw-r--r--filter/filter-code.h51
-rw-r--r--filter/filter-colour.c224
-rw-r--r--filter/filter-colour.h54
-rw-r--r--filter/filter-context.c152
-rw-r--r--filter/filter-context.h58
-rw-r--r--filter/filter-datespec.c747
-rw-r--r--filter/filter-datespec.h64
-rw-r--r--filter/filter-driver.c778
-rw-r--r--filter/filter-editor.c188
-rw-r--r--filter/filter-editor.h54
-rw-r--r--filter/filter-element.c309
-rw-r--r--filter/filter-element.h85
-rw-r--r--filter/filter-filter.c500
-rw-r--r--filter/filter-filter.h59
-rw-r--r--filter/filter-folder.c316
-rw-r--r--filter/filter-folder.h55
-rw-r--r--filter/filter-input.c338
-rw-r--r--filter/filter-input.h58
-rw-r--r--filter/filter-message-search.c806
-rw-r--r--filter/filter-option.c351
-rw-r--r--filter/filter-option.h62
-rw-r--r--filter/filter-part.c488
-rw-r--r--filter/filter-part.h77
-rw-r--r--filter/filter-rule.c765
-rw-r--r--filter/filter-rule.h104
-rw-r--r--filter/filter-score.c235
-rw-r--r--filter/filter-score.h56
-rw-r--r--filter/filter-source.c352
-rw-r--r--filter/filter-source.h56
-rw-r--r--filter/filter.glade721
-rw-r--r--filter/filtertypes.xml616
-rw-r--r--filter/libfilter-i18n.h53
-rw-r--r--filter/rule-context.c444
-rw-r--r--filter/rule-context.h115
-rw-r--r--filter/rule-editor.c478
-rw-r--r--filter/rule-editor.h74
-rw-r--r--filter/score-context.c104
-rw-r--r--filter/score-context.h51
-rw-r--r--filter/score-editor.c149
-rw-r--r--filter/score-editor.h53
-rw-r--r--filter/score-rule.c220
-rw-r--r--filter/score-rule.h54
-rw-r--r--filter/vfolder-context.c119
-rw-r--r--filter/vfolder-context.h53
-rw-r--r--filter/vfolder-editor.c149
-rw-r--r--filter/vfolder-editor.h54
-rw-r--r--filter/vfolder-rule.c408
-rw-r--r--filter/vfolder-rule.h58
-rw-r--r--filter/vfoldertypes.xml342
-rw-r--r--help/.cvsignore2
-rw-r--r--help/C/.cvsignore9
-rw-r--r--help/C/Makefile.am57
-rw-r--r--help/C/POTFILES.in16
-rw-r--r--help/C/apx-authors.sgml75
-rw-r--r--help/C/apx-bugs.sgml23
-rw-r--r--help/C/apx-gloss.sgml459
-rw-r--r--help/C/config-prefs.sgml646
-rw-r--r--help/C/config-setupassist.sgml213
-rw-r--r--help/C/config-sync.sgml124
-rw-r--r--help/C/evolution.sgml145
-rw-r--r--help/C/fig/calendar.pngbin30227 -> 0 bytes
-rw-r--r--help/C/fig/config-cal.pngbin6898 -> 0 bytes
-rw-r--r--help/C/fig/config-mail.pngbin8680 -> 0 bytes
-rw-r--r--help/C/fig/contact-editor.pngbin37707 -> 0 bytes
-rw-r--r--help/C/fig/contact.pngbin27020 -> 0 bytes
-rw-r--r--help/C/fig/filter-assist-fig.pngbin6644 -> 0 bytes
-rw-r--r--help/C/fig/filter-new-fig.pngbin7826 -> 0 bytes
-rw-r--r--help/C/fig/mail-composer.pngbin15277 -> 0 bytes
-rw-r--r--help/C/fig/mail-druid-pic.pngbin35959 -> 0 bytes
-rw-r--r--help/C/fig/mail-inbox.pngbin31474 -> 0 bytes
-rw-r--r--help/C/fig/mainwindow-pic.pngbin166348 -> 0 bytes
-rw-r--r--help/C/fig/print-dest.pngbin7219 -> 0 bytes
-rw-r--r--help/C/fig/print-preview.pngbin26643 -> 0 bytes
-rw-r--r--help/C/fig/vfolder-createrule-fig.pngbin7621 -> 0 bytes
-rw-r--r--help/C/menuref.sgml1470
-rw-r--r--help/C/preface.sgml438
-rw-r--r--help/C/usage-calendar.sgml371
-rw-r--r--help/C/usage-contact.sgml617
-rw-r--r--help/C/usage-exec-summary.sgml91
-rw-r--r--help/C/usage-mail.sgml1539
-rw-r--r--help/C/usage-mainwindow.sgml453
-rw-r--r--help/C/usage-notes.sgml49
-rw-r--r--help/C/usage-print.sgml105
-rw-r--r--help/C/usage-sync.sgml20
-rw-r--r--help/COPYING-DOCS355
-rw-r--r--help/Camel-Classes35
-rw-r--r--help/ChangeLog699
-rw-r--r--help/Design201
-rw-r--r--help/Keybindings13
-rw-r--r--help/Makefile.am1
-rw-r--r--help/NAMESPACE65
-rw-r--r--help/README_Translations45
-rw-r--r--help/devel/.cvsignore4
-rw-r--r--help/devel/ChangeLog159
-rw-r--r--help/devel/Makefile.am84
-rw-r--r--help/devel/calendar/.cvsignore2
-rw-r--r--help/devel/calendar/Makefile.am7
-rw-r--r--help/devel/calendar/alarm-generation.sgml139
-rw-r--r--help/devel/calendar/architecture.sgml162
-rw-r--r--help/devel/calendar/cal-client/.cvsignore3
-rw-r--r--help/devel/calendar/cal-client/Makefile.am131
-rw-r--r--help/devel/calendar/cal-client/evolution-cal-client-decl.txt161
-rw-r--r--help/devel/calendar/cal-client/evolution-cal-client-sections.txt44
-rw-r--r--help/devel/calendar/cal-client/evolution-cal-client.args0
-rw-r--r--help/devel/calendar/cal-client/evolution-cal-client.hierarchy2
-rw-r--r--help/devel/calendar/cal-client/evolution-cal-client.signals21
-rw-r--r--help/devel/calendar/cal-client/evolution-cal-client.types4
-rw-r--r--help/devel/calendar/cal-client/tmpl/cal-client.sgml303
-rw-r--r--help/devel/calendar/cal-client/tmpl/evolution-cal-client-unused.sgml84
-rw-r--r--help/devel/calendar/cal-util/.cvsignore3
-rw-r--r--help/devel/calendar/cal-util/Makefile.am142
-rw-r--r--help/devel/calendar/cal-util/evolution-cal-util-decl.txt780
-rw-r--r--help/devel/calendar/cal-util/evolution-cal-util-sections.txt161
-rw-r--r--help/devel/calendar/cal-util/evolution-cal-util.args0
-rw-r--r--help/devel/calendar/cal-util/evolution-cal-util.hierarchy2
-rw-r--r--help/devel/calendar/cal-util/evolution-cal-util.signals0
-rw-r--r--help/devel/calendar/cal-util/evolution-cal-util.types4
-rw-r--r--help/devel/calendar/cal-util/tmpl/cal-component.sgml991
-rw-r--r--help/devel/calendar/cal-util/tmpl/cal-recur.sgml42
-rw-r--r--help/devel/calendar/cal-util/tmpl/cal-util.sgml48
-rw-r--r--help/devel/calendar/cal-util/tmpl/evolution-cal-util-unused.sgml228
-rw-r--r--help/devel/calendar/cal-util/tmpl/timeutil.sgml176
-rw-r--r--help/devel/calendar/evolution-calendar.sgml52
-rw-r--r--help/devel/calendar/public-reference.sgml24
-rw-r--r--help/devel/evolution-devel-guide.sgml97
-rw-r--r--help/devel/executive-summary/.cvsignore2
-rw-r--r--help/devel/executive-summary/Makefile.am125
-rw-r--r--help/devel/executive-summary/evolution-services-decl.txt599
-rw-r--r--help/devel/executive-summary/evolution-services-sections.txt95
-rw-r--r--help/devel/executive-summary/evolution-services.args0
-rw-r--r--help/devel/executive-summary/evolution-services.hierarchy15
-rw-r--r--help/devel/executive-summary/evolution-services.signals0
-rw-r--r--help/devel/executive-summary/evolution-services.types10
-rw-r--r--help/devel/executive-summary/private-reference.sgml20
-rw-r--r--help/devel/executive-summary/public-reference.sgml22
-rw-r--r--help/devel/executive-summary/tmpl/evolution-services-unused.sgml0
-rw-r--r--help/devel/executive-summary/tmpl/executive-summary-component-factory-client.sgml53
-rw-r--r--help/devel/executive-summary/tmpl/executive-summary-component-factory.sgml46
-rw-r--r--help/devel/executive-summary/tmpl/executive-summary-component.sgml37
-rw-r--r--help/devel/executive-summary/tmpl/executive-summary-html-view.sgml75
-rw-r--r--help/devel/fdl.sgml671
-rw-r--r--help/devel/importer/.cvsignore3
-rw-r--r--help/devel/importer/Makefile.am127
-rw-r--r--help/devel/importer/evolution-shell-importer-sections.txt79
-rw-r--r--help/devel/importer/evolution-shell-importer.args0
-rw-r--r--help/devel/importer/evolution-shell-importer.heirarchy5
-rw-r--r--help/devel/importer/evolution-shell-importer.hierarchy14
-rw-r--r--help/devel/importer/evolution-shell-importer.types9
-rw-r--r--help/devel/importer/private-reference.sgml21
-rw-r--r--help/devel/importer/public-reference.sgml20
-rw-r--r--help/devel/importer/tmpl/evolution-importer-client.sgml83
-rw-r--r--help/devel/importer/tmpl/evolution-importer.sgml86
-rw-r--r--help/devel/importer/tmpl/evolution-shell-importer-unused.sgml10
-rw-r--r--help/devel/preface.sgml113
-rw-r--r--help/devel/reference.sgml49
-rw-r--r--help/es.po/apx-authors.sgml.po178
-rw-r--r--help/es.po/apx-bugs.sgml.po56
-rw-r--r--help/es.po/apx-gloss.sgml.po745
-rw-r--r--help/es.po/config-prefs.sgml.po1364
-rw-r--r--help/es.po/config-setupassist.sgml.po445
-rw-r--r--help/es.po/config-sync.sgml.po264
-rw-r--r--help/es.po/evolution.sgml.po165
-rw-r--r--help/es.po/menuref.sgml.po3062
-rw-r--r--help/es.po/preface.sgml.po934
-rw-r--r--help/es.po/usage-calendar.sgml.po812
-rw-r--r--help/es.po/usage-contact.sgml.po1119
-rw-r--r--help/es.po/usage-mail.sgml.po2302
-rw-r--r--help/es.po/usage-mainwindow.sgml.po746
-rw-r--r--help/es.po/usage-notes.sgml.po111
-rw-r--r--help/es.po/usage-print.sgml.po196
-rw-r--r--help/es.po/usage-sync.sgml.po60
-rw-r--r--help/es/Makefile.in321
-rw-r--r--help/es/apx-authors.sgml75
-rw-r--r--help/es/apx-bugs.sgml23
-rw-r--r--help/es/apx-gloss.sgml462
-rw-r--r--help/es/config-prefs.sgml646
-rw-r--r--help/es/config-setupassist.sgml211
-rw-r--r--help/es/config-sync.sgml122
-rw-r--r--help/es/evolution.sgml147
-rw-r--r--help/es/menuref.sgml1477
-rw-r--r--help/es/preface.sgml444
-rw-r--r--help/es/usage-calendar.sgml373
-rw-r--r--help/es/usage-contact.sgml619
-rw-r--r--help/es/usage-mail.sgml1526
-rw-r--r--help/es/usage-mainwindow.sgml453
-rw-r--r--help/es/usage-notes.sgml49
-rw-r--r--help/es/usage-print.sgml104
-rw-r--r--help/es/usage-sync.sgml20
-rwxr-xr-xhelp/update_po.pl203
-rwxr-xr-xhelp/update_translation.pl240
-rw-r--r--help/white-papers/calendar/calendar.sgml209
-rw-r--r--help/white-papers/mail/camel.sgml339
-rw-r--r--help/white-papers/mail/ibex.sgml158
-rw-r--r--help/white-papers/widgets/e-table.sgml279
-rw-r--r--libibex/.cvsignore9
-rw-r--r--libibex/COPYING.LIB481
-rw-r--r--libibex/ChangeLog398
-rw-r--r--libibex/Makefile.am40
-rw-r--r--libibex/TODO61
-rw-r--r--libibex/block.c595
-rw-r--r--libibex/block.h114
-rw-r--r--libibex/diskarray.c255
-rw-r--r--libibex/disktail.c817
-rw-r--r--libibex/dumpindex.c63
-rw-r--r--libibex/hash.c859
-rw-r--r--libibex/ibex.h106
-rw-r--r--libibex/ibex_block.c345
-rw-r--r--libibex/ibex_db.c512
-rw-r--r--libibex/ibex_internal.h51
-rw-r--r--libibex/index.h103
-rw-r--r--libibex/lookup.c83
-rw-r--r--libibex/mkindex.c84
-rw-r--r--libibex/testindex.c319
-rw-r--r--libibex/wordindex.c646
-rw-r--r--libibex/wordindex.h74
-rw-r--r--libibex/wordindexmem.c891
-rw-r--r--libical/.cvsignore19
-rw-r--r--libical/AUTHORS1
-rw-r--r--libical/COPYING0
-rw-r--r--libical/ChangeLog570
-rw-r--r--libical/INSTALL24
-rw-r--r--libical/Makefile.am12
-rw-r--r--libical/NEWS396
-rw-r--r--libical/README100
-rw-r--r--libical/TEST4
-rw-r--r--libical/THANKS48
-rw-r--r--libical/TODO39
-rw-r--r--libical/acconfig.h16
-rwxr-xr-xlibical/autogen.sh80
-rw-r--r--libical/configure.in85
-rw-r--r--libical/configure.scan30
-rw-r--r--libical/design-data/.cvsignore2
-rw-r--r--libical/design-data/Makefile.am10
-rw-r--r--libical/design-data/components.txt22
-rw-r--r--libical/design-data/param-c-types.txt23
-rw-r--r--libical/design-data/params-in-prop.txt55
-rw-r--r--libical/design-data/prop-to-value.txt57
-rw-r--r--libical/design-data/property-tokens.txt65
-rw-r--r--libical/design-data/restrictions.csv1348
-rw-r--r--libical/design-data/status.txt56
-rw-r--r--libical/design-data/value-c-types.txt23
-rw-r--r--libical/design-data/value-mem-semantics.txt19
-rw-r--r--libical/doc/.cvsignore2
-rw-r--r--libical/doc/Makefile.am1
-rw-r--r--libical/doc/UsingLibical.lyx2414
-rw-r--r--libical/doc/UsingLibical.ps2327
-rw-r--r--libical/doc/UsingLibical.txt1316
-rw-r--r--libical/examples/.cvsignore5
-rw-r--r--libical/examples/Makefile.am15
-rw-r--r--libical/examples/access_components.c319
-rw-r--r--libical/examples/access_properties_and_parameters.c144
-rw-r--r--libical/examples/errors.c70
-rw-r--r--libical/examples/main.c12
-rw-r--r--libical/examples/parse_text.c68
-rwxr-xr-xlibical/install-sh119
-rwxr-xr-xlibical/missing190
-rw-r--r--libical/scripts/.cvsignore2
-rw-r--r--libical/scripts/Makefile.am8
-rwxr-xr-xlibical/scripts/mkderivedcomponents.pl170
-rwxr-xr-xlibical/scripts/mkderivedparameters.pl277
-rwxr-xr-xlibical/scripts/mkderivedproperties.pl291
-rwxr-xr-xlibical/scripts/mkderivedvalues.pl316
-rwxr-xr-xlibical/scripts/mkparameterrestrictions.pl85
-rwxr-xr-xlibical/scripts/mkrestrictionrecords.pl109
-rwxr-xr-xlibical/scripts/mkrestrictiontable.pl98
-rw-r--r--libical/src/.cvsignore2
-rw-r--r--libical/src/Makefile.am4
-rw-r--r--libical/src/libical/.cvsignore22
-rw-r--r--libical/src/libical/Makefile.am183
-rw-r--r--libical/src/libical/icalcomponent.c1421
-rw-r--r--libical/src/libical/icalcomponent.h223
-rw-r--r--libical/src/libical/icalenums.c631
-rw-r--r--libical/src/libical/icalenums.h446
-rw-r--r--libical/src/libical/icalerror.c167
-rw-r--r--libical/src/libical/icalerror.h144
-rw-r--r--libical/src/libical/icallangbind.c171
-rw-r--r--libical/src/libical/icallangbind.h32
-rw-r--r--libical/src/libical/icallexer.l161
-rw-r--r--libical/src/libical/icalmemory.c287
-rw-r--r--libical/src/libical/icalmemory.h80
-rw-r--r--libical/src/libical/icalmime.c386
-rw-r--r--libical/src/libical/icalmime.h43
-rw-r--r--libical/src/libical/icalparameter.c.in1246
-rw-r--r--libical/src/libical/icalparameter.h.in57
-rw-r--r--libical/src/libical/icalparser.c1036
-rw-r--r--libical/src/libical/icalparser.h93
-rw-r--r--libical/src/libical/icalproperty.c.in616
-rw-r--r--libical/src/libical/icalproperty.h.in57
-rw-r--r--libical/src/libical/icalrecur.c1968
-rw-r--r--libical/src/libical/icalrecur.h168
-rw-r--r--libical/src/libical/icalrestriction.c.in447
-rw-r--r--libical/src/libical/icalrestriction.h64
-rw-r--r--libical/src/libical/icaltime.c915
-rw-r--r--libical/src/libical/icaltime.h157
-rw-r--r--libical/src/libical/icaltypes.c263
-rw-r--r--libical/src/libical/icaltypes.h107
-rw-r--r--libical/src/libical/icalvalue.c.in1411
-rw-r--r--libical/src/libical/icalvalue.h.in74
-rw-r--r--libical/src/libical/icalversion.h.in7
-rw-r--r--libical/src/libical/icalyacc.y404
-rw-r--r--libical/src/libical/pvl.c761
-rw-r--r--libical/src/libical/pvl.h94
-rw-r--r--libical/src/libical/sspm.c1613
-rw-r--r--libical/src/libical/sspm.h143
-rw-r--r--libical/src/libical/vsnprintf.c167
-rw-r--r--libical/src/libicalss/.cvsignore6
-rw-r--r--libical/src/libicalss/Makefile.am59
-rw-r--r--libical/src/libicalss/icalcalendar.c265
-rw-r--r--libical/src/libicalss/icalcalendar.h67
-rw-r--r--libical/src/libicalss/icalclassify.c701
-rw-r--r--libical/src/libicalss/icalclassify.h73
-rw-r--r--libical/src/libicalss/icalcomponent.h115
-rw-r--r--libical/src/libicalss/icalcsdb.h67
-rw-r--r--libical/src/libicalss/icalcstp.c416
-rw-r--r--libical/src/libicalss/icalcstp.h165
-rw-r--r--libical/src/libicalss/icaldirset.c753
-rw-r--r--libical/src/libicalss/icaldirset.h82
-rw-r--r--libical/src/libicalss/icaldirsetimpl.h47
-rw-r--r--libical/src/libicalss/icalfileset.c639
-rw-r--r--libical/src/libicalss/icalfileset.h104
-rw-r--r--libical/src/libicalss/icalfilesetimpl.h49
-rw-r--r--libical/src/libicalss/icalgauge.c447
-rw-r--r--libical/src/libicalss/icalgauge.h51
-rw-r--r--libical/src/libicalss/icalgaugeimpl.h63
-rw-r--r--libical/src/libicalss/icalmessage.c376
-rw-r--r--libical/src/libicalss/icalmessage.h71
-rw-r--r--libical/src/libicalss/icalset.c367
-rw-r--r--libical/src/libicalss/icalset.h101
-rw-r--r--libical/src/libicalss/icalspanlist.c309
-rw-r--r--libical/src/libicalss/icalspanlist.h54
-rw-r--r--libical/src/libicalss/icalsslexer.l113
-rw-r--r--libical/src/libicalss/icalssutil.c29
-rw-r--r--libical/src/libicalss/icalssutil.h27
-rw-r--r--libical/src/libicalss/icalssyacc.h22
-rw-r--r--libical/src/libicalss/icalssyacc.y245
-rw-r--r--libical/src/libicalvcal/.cvsignore12
-rw-r--r--libical/src/libicalvcal/Makefile.am30
-rw-r--r--libical/src/libicalvcal/README.TXT951
-rw-r--r--libical/src/libicalvcal/icalvcal.c517
-rw-r--r--libical/src/libicalvcal/icalvcal.h39
-rw-r--r--libical/src/libicalvcal/port.h88
-rw-r--r--libical/src/libicalvcal/vcaltest.c118
-rw-r--r--libical/src/libicalvcal/vcaltmp.c337
-rw-r--r--libical/src/libicalvcal/vcaltmp.h128
-rw-r--r--libical/src/libicalvcal/vcc.h80
-rw-r--r--libical/src/libicalvcal/vcc.y1176
-rw-r--r--libical/src/libicalvcal/vctest.c95
-rw-r--r--libical/src/libicalvcal/vobject.c1452
-rw-r--r--libical/src/libicalvcal/vobject.h366
-rw-r--r--libical/src/test/.cvsignore18
-rw-r--r--libical/src/test/Makefile.am25
-rw-r--r--libical/src/test/copycluster.c117
-rw-r--r--libical/src/test/findobj.c72
-rw-r--r--libical/src/test/icaltestparser.c122
-rw-r--r--libical/src/test/process.c446
-rw-r--r--libical/src/test/recur.c110
-rw-r--r--libical/src/test/regression.c3291
-rw-r--r--libical/src/test/storage.c459
-rw-r--r--libical/src/test/stow.c862
-rw-r--r--libical/src/test/testclassify.c157
-rw-r--r--libical/src/test/testmime.c340
-rw-r--r--libical/src/test/testvcal.c56
-rw-r--r--libical/test-data/.cvsignore2
-rw-r--r--libical/test-data/05
-rw-r--r--libical/test-data/139
-rw-r--r--libical/test-data/1.113
-rw-r--r--libical/test-data/222
-rw-r--r--libical/test-data/2445.ics331
-rw-r--r--libical/test-data/2446.ics1004
-rw-r--r--libical/test-data/321
-rw-r--r--libical/test-data/423
-rw-r--r--libical/test-data/516
-rw-r--r--libical/test-data/612
-rw-r--r--libical/test-data/714
-rw-r--r--libical/test-data/Makefile.am26
-rw-r--r--libical/test-data/calendar.ics47
-rw-r--r--libical/test-data/classify.ics43
-rw-r--r--libical/test-data/complex-mime.txt81
-rw-r--r--libical/test-data/incoming.ics168
-rw-r--r--libical/test-data/overlaps.ics32
-rw-r--r--libical/test-data/process-incoming.ics107
-rw-r--r--libical/test-data/recur.txt398
-rw-r--r--libical/test-data/restriction.ics49
-rw-r--r--libical/test-data/simple-mime.txt26
-rw-r--r--libical/test-data/smallcluster.ics13
-rw-r--r--libical/test-data/stresstest.ics178
-rw-r--r--libical/test-data/user-cal.vcf76
-rw-r--r--libversit/.cvsignore9
-rw-r--r--libversit/Makefile.am15
-rw-r--r--libversit/README.TXT951
-rw-r--r--libversit/port.h88
-rw-r--r--libversit/vcaltest.c118
-rw-r--r--libversit/vcaltmp.c337
-rw-r--r--libversit/vcaltmp.h128
-rw-r--r--libversit/vcc.h80
-rw-r--r--libversit/vcc.y1262
-rw-r--r--libversit/vctest.c95
-rw-r--r--libversit/vobject.c1452
-rw-r--r--libversit/vobject.h366
-rw-r--r--mail/.cvsignore19
-rw-r--r--mail/ChangeLog10581
-rw-r--r--mail/GNOME_Evolution_Mail.oaf.in105
-rw-r--r--mail/Mail.idl32
-rw-r--r--mail/Makefile.am188
-rw-r--r--mail/README.async360
-rw-r--r--mail/component-factory.c510
-rw-r--r--mail/component-factory.h29
-rw-r--r--mail/e-attchmt.pngbin169 -> 0 bytes
-rw-r--r--mail/evolution-mbox-importer.c222
-rw-r--r--mail/evolution-mbox-importer.h35
-rw-r--r--mail/evolution-outlook-importer.c289
-rw-r--r--mail/evolution-outlook-importer.h35
-rw-r--r--mail/folder-browser-factory.c387
-rw-r--r--mail/folder-browser-factory.h22
-rw-r--r--mail/folder-browser.c1058
-rw-r--r--mail/folder-browser.h119
-rw-r--r--mail/importers/.cvsignore12
-rw-r--r--mail/importers/GNOME_Evolution_Mail_Elm_Intelligent_Importer.oaf.in21
-rw-r--r--mail/importers/GNOME_Evolution_Mail_Mbox_Importer.oaf.in29
-rw-r--r--mail/importers/GNOME_Evolution_Mail_Netscape_Intelligent_Importer.oaf.in21
-rw-r--r--mail/importers/GNOME_Evolution_Mail_Outlook_Importer.oaf.in29
-rw-r--r--mail/importers/GNOME_Evolution_Mail_Pine_Intelligent_Importer.oaf.in21
-rw-r--r--mail/importers/Makefile.am42
-rw-r--r--mail/importers/elm-importer.c451
-rw-r--r--mail/importers/evolution-mbox-importer.c257
-rw-r--r--mail/importers/evolution-outlook-importer.c319
-rw-r--r--mail/importers/netscape-importer.c473
-rw-r--r--mail/importers/pine-importer.c416
-rw-r--r--mail/local-config.glade221
-rw-r--r--mail/mail-account-editor.c204
-rw-r--r--mail/mail-account-editor.h65
-rw-r--r--mail/mail-account-gui.c1192
-rw-r--r--mail/mail-account-gui.h110
-rw-r--r--mail/mail-accounts.c650
-rw-r--r--mail/mail-accounts.h97
-rw-r--r--mail/mail-autofilter.c361
-rw-r--r--mail/mail-autofilter.h51
-rw-r--r--mail/mail-callbacks.c1662
-rw-r--r--mail/mail-callbacks.h112
-rw-r--r--mail/mail-config-druid.c531
-rw-r--r--mail/mail-config-druid.h84
-rw-r--r--mail/mail-config.c1060
-rw-r--r--mail/mail-config.glade2097
-rw-r--r--mail/mail-config.h146
-rw-r--r--mail/mail-crypto.c219
-rw-r--r--mail/mail-crypto.h56
-rw-r--r--mail/mail-display.c1287
-rw-r--r--mail/mail-display.h65
-rw-r--r--mail/mail-format.c1917
-rw-r--r--mail/mail-identify.c96
-rw-r--r--mail/mail-importer.c254
-rw-r--r--mail/mail-importer.h48
-rw-r--r--mail/mail-local.c1053
-rw-r--r--mail/mail-local.h38
-rw-r--r--mail/mail-mlist-magic.c271
-rw-r--r--mail/mail-mlist-magic.h33
-rw-r--r--mail/mail-mt.c1095
-rw-r--r--mail/mail-mt.h90
-rw-r--r--mail/mail-ops.c1904
-rw-r--r--mail/mail-ops.h147
-rw-r--r--mail/mail-search-dialogue.c176
-rw-r--r--mail/mail-search-dialogue.h61
-rw-r--r--mail/mail-send-recv.c787
-rw-r--r--mail/mail-send-recv.h42
-rw-r--r--mail/mail-session.h55
-rw-r--r--mail/mail-summary.c523
-rw-r--r--mail/mail-summary.h32
-rw-r--r--mail/mail-tools.c438
-rw-r--r--mail/mail-tools.h81
-rw-r--r--mail/mail-types.h40
-rw-r--r--mail/mail-vfolder.c469
-rw-r--r--mail/mail-vfolder.h29
-rw-r--r--mail/mail-view.c256
-rw-r--r--mail/mail.h72
-rw-r--r--mail/main.c145
-rw-r--r--mail/message-list.c2483
-rw-r--r--mail/message-list.h132
-rw-r--r--mail/session.c376
-rw-r--r--mail/subscribe-dialog.c1103
-rw-r--r--mail/subscribe-dialog.glade298
-rw-r--r--mail/subscribe-dialog.h78
-rw-r--r--mail/test-mail.c78
-rw-r--r--mail/test-thread.c230
-rw-r--r--notes/.cvsignore4
-rw-r--r--notes/GNOME_Evolution_Notes.oaf.in54
-rw-r--r--notes/Makefile.am35
-rw-r--r--notes/component-factory.c155
-rw-r--r--notes/component-factory.h7
-rw-r--r--notes/e-bevel-button-util.c189
-rw-r--r--notes/e-bevel-button-util.h12
-rw-r--r--notes/e-bevel-button.c175
-rw-r--r--notes/e-bevel-button.h37
-rw-r--r--notes/e-note.c382
-rw-r--r--notes/e-note.h37
-rw-r--r--notes/main.c52
-rw-r--r--notes/test-notes.c34
-rw-r--r--po/.cvsignore10
-rw-r--r--po/ChangeLog1740
-rw-r--r--po/Makefile.i18npatch63
-rw-r--r--po/POTFILES.in223
-rw-r--r--po/POTFILES.skip10
-rw-r--r--po/az.po10151
-rw-r--r--po/ca.po10707
-rw-r--r--po/da.po8015
-rw-r--r--po/de.po8814
-rw-r--r--po/el.po9326
-rw-r--r--po/en_GB.po8441
-rw-r--r--po/es.po8948
-rw-r--r--po/fi.po8441
-rw-r--r--po/flu-danish114
-rw-r--r--po/fr.po10371
-rwxr-xr-xpo/ga.po8761
-rw-r--r--po/gl.po10095
-rw-r--r--po/hu.po10179
-rw-r--r--po/it.po7871
-rw-r--r--po/ja.po8360
-rw-r--r--po/ko.po8055
-rw-r--r--po/lt.po8416
-rw-r--r--po/nl.po11768
-rw-r--r--po/nn.po9979
-rw-r--r--po/no.po10020
-rw-r--r--po/pl.po6711
-rw-r--r--po/pt.po6392
-rw-r--r--po/pt_BR.po7328
-rw-r--r--po/ru.po8707
-rw-r--r--po/sk.po8559
-rw-r--r--po/sl.po10054
-rw-r--r--po/sv.po9919
-rw-r--r--po/tr.po8477
-rw-r--r--po/uk.po6462
-rwxr-xr-xpo/update.sh45
-rw-r--r--shell/.cvsignore12
-rw-r--r--shell/ChangeLog4538
-rw-r--r--shell/Evolution-LocalStorage.idl31
-rw-r--r--shell/Evolution-Session.idl41
-rw-r--r--shell/Evolution-Shell.idl92
-rw-r--r--shell/Evolution-ShellComponent.idl91
-rw-r--r--shell/Evolution-ShellComponentDnd.idl94
-rw-r--r--shell/Evolution-ShellView.idl23
-rw-r--r--shell/Evolution-Storage.idl109
-rw-r--r--shell/Evolution-StorageSetView.idl34
-rw-r--r--shell/Evolution.idl20
-rw-r--r--shell/GNOME_Evolution_Shell.oaf.in15
-rw-r--r--shell/Makefile.am169
-rw-r--r--shell/README14
-rw-r--r--shell/e-component-registry.c377
-rw-r--r--shell/e-component-registry.h75
-rw-r--r--shell/e-corba-storage-registry.c256
-rw-r--r--shell/e-corba-storage-registry.h69
-rw-r--r--shell/e-corba-storage.c529
-rw-r--r--shell/e-corba-storage.h76
-rw-r--r--shell/e-folder-tree.c414
-rw-r--r--shell/e-folder-tree.h57
-rw-r--r--shell/e-folder-type-registry.c439
-rw-r--r--shell/e-folder-type-registry.h94
-rw-r--r--shell/e-folder.c327
-rw-r--r--shell/e-folder.h91
-rw-r--r--shell/e-local-folder.c262
-rw-r--r--shell/e-local-folder.h72
-rw-r--r--shell/e-local-storage.c1059
-rw-r--r--shell/e-local-storage.h71
-rw-r--r--shell/e-setup.c313
-rw-r--r--shell/e-setup.h31
-rw-r--r--shell/e-shell-constants.h36
-rw-r--r--shell/e-shell-folder-creation-dialog.c445
-rw-r--r--shell/e-shell-folder-creation-dialog.h49
-rw-r--r--shell/e-shell-folder-selection-dialog.c413
-rw-r--r--shell/e-shell-folder-selection-dialog.h79
-rw-r--r--shell/e-shell-folder-title-bar.c556
-rw-r--r--shell/e-shell-folder-title-bar.h77
-rw-r--r--shell/e-shell-utils.c110
-rw-r--r--shell/e-shell-utils.h32
-rw-r--r--shell/e-shell-view-menu.c552
-rw-r--r--shell/e-shell-view-menu.h33
-rw-r--r--shell/e-shell-view.c1851
-rw-r--r--shell/e-shell-view.h101
-rw-r--r--shell/e-shell.c1259
-rw-r--r--shell/e-shell.h101
-rw-r--r--shell/e-shortcuts-view-model.c297
-rw-r--r--shell/e-shortcuts-view-model.h67
-rw-r--r--shell/e-shortcuts-view.c591
-rw-r--r--shell/e-shortcuts-view.h74
-rw-r--r--shell/e-shortcuts.c919
-rw-r--r--shell/e-shortcuts.h120
-rw-r--r--shell/e-splash.c425
-rw-r--r--shell/e-splash.h72
-rw-r--r--shell/e-storage-set-view.c1945
-rw-r--r--shell/e-storage-set-view.h87
-rw-r--r--shell/e-storage-set.c694
-rw-r--r--shell/e-storage-set.h114
-rw-r--r--shell/e-storage.c607
-rw-r--r--shell/e-storage.h163
-rw-r--r--shell/evolution-local-storage.c218
-rw-r--r--shell/evolution-local-storage.h75
-rw-r--r--shell/evolution-session.c214
-rw-r--r--shell/evolution-session.h68
-rw-r--r--shell/evolution-shell-client.c371
-rw-r--r--shell/evolution-shell-client.h76
-rw-r--r--shell/evolution-shell-component-client.c698
-rw-r--r--shell/evolution-shell-component-client.h114
-rw-r--r--shell/evolution-shell-component.c597
-rw-r--r--shell/evolution-shell-component.h160
-rw-r--r--shell/evolution-shell-view.c273
-rw-r--r--shell/evolution-shell-view.h74
-rw-r--r--shell/evolution-storage-listener.c356
-rw-r--r--shell/evolution-storage-listener.h86
-rw-r--r--shell/evolution-storage-set-view-factory.c60
-rw-r--r--shell/evolution-storage-set-view-factory.h31
-rw-r--r--shell/evolution-storage-set-view-listener.c288
-rw-r--r--shell/evolution-storage-set-view-listener.h81
-rw-r--r--shell/evolution-storage-set-view.c403
-rw-r--r--shell/evolution-storage-set-view.h70
-rw-r--r--shell/evolution-storage.c898
-rw-r--r--shell/evolution-storage.h136
-rw-r--r--shell/glade/.cvsignore4
-rw-r--r--shell/glade/Makefile.am5
-rw-r--r--shell/glade/e-shell-folder-creation-dialog.glade169
-rw-r--r--shell/importer/.cvsignore10
-rw-r--r--shell/importer/GNOME_Evolution_Importer.idl95
-rw-r--r--shell/importer/Makefile.am63
-rw-r--r--shell/importer/evolution-importer-client.c253
-rw-r--r--shell/importer/evolution-importer-client.h72
-rw-r--r--shell/importer/evolution-importer-listener.c225
-rw-r--r--shell/importer/evolution-importer-listener.h71
-rw-r--r--shell/importer/evolution-importer.c230
-rw-r--r--shell/importer/evolution-importer.h95
-rw-r--r--shell/importer/evolution-intelligent-importer.c198
-rw-r--r--shell/importer/evolution-intelligent-importer.h74
-rw-r--r--shell/importer/import.glade91
-rw-r--r--shell/importer/importer.c665
-rw-r--r--shell/importer/importer.h33
-rw-r--r--shell/importer/intelligent.c232
-rw-r--r--shell/importer/intelligent.h29
-rw-r--r--shell/main.c236
-rw-r--r--stamp.h.in1
-rw-r--r--tests/.cvsignore24
-rw-r--r--tests/Makefile.am73
-rw-r--r--tests/test-movemail.c164
-rw-r--r--tests/test-url.c37
-rw-r--r--tests/test1.c136
-rw-r--r--tests/test10.c127
-rw-r--r--tests/test11.c136
-rw-r--r--tests/test12.c56
-rw-r--r--tests/test13.c123
-rw-r--r--tests/test14.c177
-rw-r--r--tests/test2.c48
-rw-r--r--tests/test3.c29
-rw-r--r--tests/test4.c65
-rw-r--r--tests/test5.c59
-rw-r--r--tests/test6.c49
-rw-r--r--tests/test8.c75
-rw-r--r--tests/test9.c80
-rw-r--r--tests/ui-tests/.cvsignore8
-rw-r--r--tests/ui-tests/Makefile.am39
-rw-r--r--tests/ui-tests/filter.c30
-rw-r--r--tests/ui-tests/filterdescription.xml99
-rw-r--r--tests/ui-tests/mail-atchmt-image.msg67
-rw-r--r--tests/ui-tests/mail-atchmt-postscript.msg8069
-rw-r--r--tests/ui-tests/mail-atchmt-svg.msg418
-rw-r--r--tests/ui-tests/message-browser.c819
-rw-r--r--tests/ui-tests/saveoptions.xml37
-rw-r--r--tests/ui-tests/store_listing.c424
-rw-r--r--tests/ui-tests/store_listing.glade489
-rw-r--r--tests/ui-tests/test-multipart-alt.msg17738
-rw-r--r--tests/ui-tests/test-multipart-mixed.msg377
-rw-r--r--tools/.cvsignore3
-rw-r--r--tools/Makefile.am3
-rwxr-xr-xtools/evolution-move-tasks135
-rwxr-xr-xtools/killev29
-rwxr-xr-xtools/verify-evolution-install.sh640
-rw-r--r--ui/.cvsignore8
-rw-r--r--ui/ChangeLog557
-rw-r--r--ui/Makefile.am17
-rw-r--r--ui/evolution-addressbook.h25
-rw-r--r--ui/evolution-addressbook.xml88
-rw-r--r--ui/evolution-calendar.xml133
-rw-r--r--ui/evolution-contact-editor.xml257
-rw-r--r--ui/evolution-event-editor.xml225
-rw-r--r--ui/evolution-executive-summary.xml27
-rw-r--r--ui/evolution-mail.xml374
-rw-r--r--ui/evolution-message-composer.h53
-rw-r--r--ui/evolution-message-composer.xml169
-rw-r--r--ui/evolution-subscribe.xml55
-rw-r--r--ui/evolution-task-editor-dialog.xml255
-rw-r--r--ui/evolution-tasks.xml84
-rw-r--r--ui/evolution.xml171
-rw-r--r--views/.cvsignore2
-rw-r--r--views/ChangeLog40
-rw-r--r--views/Makefile.am1
-rw-r--r--views/addressbook/.cvsignore2
-rw-r--r--views/addressbook/By_Company.galview16
-rw-r--r--views/addressbook/Makefile.am3
-rw-r--r--views/addressbook/Phone_List.galview13
-rw-r--r--views/addressbook/galview.xml6
-rw-r--r--views/mail/.cvsignore2
-rw-r--r--views/mail/By_Sender.galview11
-rw-r--r--views/mail/By_Status.galview11
-rw-r--r--views/mail/By_Subject.galview11
-rw-r--r--views/mail/Makefile.am3
-rw-r--r--views/mail/Messages.galview10
-rw-r--r--views/mail/galview.xml7
-rw-r--r--views/tasks/.cvsignore2
-rw-r--r--views/tasks/Makefile.am3
-rw-r--r--views/tasks/Tasks.galview7
-rw-r--r--views/tasks/With_Category.galview8
-rw-r--r--views/tasks/galview.xml5
-rw-r--r--widgets/.cvsignore9
-rw-r--r--widgets/ChangeLog180
-rw-r--r--widgets/LICENSE1
-rw-r--r--widgets/Makefile.am5
-rw-r--r--widgets/meeting-time-sel/.cvsignore8
-rw-r--r--widgets/meeting-time-sel/ChangeLog71
-rw-r--r--widgets/meeting-time-sel/LICENSE1
-rw-r--r--widgets/meeting-time-sel/Makefile.am35
-rw-r--r--widgets/meeting-time-sel/e-meeting-time-sel-item.c993
-rw-r--r--widgets/meeting-time-sel/e-meeting-time-sel-item.h79
-rw-r--r--widgets/meeting-time-sel/e-meeting-time-sel-list-item.c397
-rw-r--r--widgets/meeting-time-sel/e-meeting-time-sel-list-item.h73
-rw-r--r--widgets/meeting-time-sel/e-meeting-time-sel-mail.xpm135
-rw-r--r--widgets/meeting-time-sel/e-meeting-time-sel-no-mail.xpm123
-rw-r--r--widgets/meeting-time-sel/e-meeting-time-sel.c3306
-rw-r--r--widgets/meeting-time-sel/e-meeting-time-sel.h521
-rw-r--r--widgets/meeting-time-sel/test-meeting-time-sel.c251
-rw-r--r--widgets/menus/.cvsignore8
-rw-r--r--widgets/menus/Makefile.am12
-rw-r--r--widgets/menus/gal-define-views-dialog.c329
-rw-r--r--widgets/menus/gal-define-views-dialog.h75
-rw-r--r--widgets/menus/gal-define-views-model.c315
-rw-r--r--widgets/menus/gal-define-views-model.h50
-rw-r--r--widgets/menus/gal-define-views.glade311
-rw-r--r--widgets/menus/gal-view-collection.c578
-rw-r--r--widgets/menus/gal-view-collection.h95
-rw-r--r--widgets/menus/gal-view-etable.c199
-rw-r--r--widgets/menus/gal-view-etable.h44
-rw-r--r--widgets/menus/gal-view-factory-etable.c126
-rw-r--r--widgets/menus/gal-view-factory-etable.h39
-rw-r--r--widgets/menus/gal-view-factory.c112
-rw-r--r--widgets/menus/gal-view-factory.h56
-rw-r--r--widgets/menus/gal-view-menus.c297
-rw-r--r--widgets/menus/gal-view-menus.h36
-rw-r--r--widgets/menus/gal-view-new-dialog.c218
-rw-r--r--widgets/menus/gal-view-new-dialog.glade220
-rw-r--r--widgets/menus/gal-view-new-dialog.h76
-rw-r--r--widgets/menus/gal-view.c210
-rw-r--r--widgets/menus/gal-view.h74
-rw-r--r--widgets/misc/.cvsignore11
-rw-r--r--widgets/misc/ChangeLog458
-rw-r--r--widgets/misc/Makefile.am78
-rw-r--r--widgets/misc/e-calendar-item.c2885
-rw-r--r--widgets/misc/e-calendar-item.h320
-rw-r--r--widgets/misc/e-calendar.c601
-rw-r--r--widgets/misc/e-calendar.h102
-rw-r--r--widgets/misc/e-canvas-utils.c137
-rw-r--r--widgets/misc/e-canvas-utils.h36
-rw-r--r--widgets/misc/e-canvas-vbox.c350
-rw-r--r--widgets/misc/e-canvas-vbox.h88
-rw-r--r--widgets/misc/e-canvas.c760
-rw-r--r--widgets/misc/e-canvas.h129
-rw-r--r--widgets/misc/e-cell-date-edit.c872
-rw-r--r--widgets/misc/e-cell-date-edit.h84
-rw-r--r--widgets/misc/e-clipped-label.c379
-rw-r--r--widgets/misc/e-clipped-label.h90
-rw-r--r--widgets/misc/e-colors.c81
-rw-r--r--widgets/misc/e-colors.h21
-rw-r--r--widgets/misc/e-cursors.c136
-rw-r--r--widgets/misc/e-cursors.h45
-rw-r--r--widgets/misc/e-dateedit.c1731
-rw-r--r--widgets/misc/e-dateedit.h155
-rw-r--r--widgets/misc/e-dropdown-button.c252
-rw-r--r--widgets/misc/e-dropdown-button.h72
-rw-r--r--widgets/misc/e-filter-bar.c471
-rw-r--r--widgets/misc/e-filter-bar.h108
-rw-r--r--widgets/misc/e-gui-utils.c213
-rw-r--r--widgets/misc/e-gui-utils.h24
-rw-r--r--widgets/misc/e-hsv-utils.c166
-rw-r--r--widgets/misc/e-hsv-utils.h31
-rw-r--r--widgets/misc/e-messagebox.c356
-rw-r--r--widgets/misc/e-messagebox.h85
-rw-r--r--widgets/misc/e-popup-menu.c156
-rw-r--r--widgets/misc/e-popup-menu.h34
-rw-r--r--widgets/misc/e-printable.c207
-rw-r--r--widgets/misc/e-printable.h76
-rw-r--r--widgets/misc/e-reflow.c863
-rw-r--r--widgets/misc/e-reflow.h115
-rw-r--r--widgets/misc/e-search-bar.c511
-rw-r--r--widgets/misc/e-search-bar.h105
-rw-r--r--widgets/misc/e-selection-model-array.c466
-rw-r--r--widgets/misc/e-selection-model-array.h64
-rw-r--r--widgets/misc/e-selection-model-simple.c101
-rw-r--r--widgets/misc/e-selection-model-simple.h48
-rw-r--r--widgets/misc/e-selection-model.c592
-rw-r--r--widgets/misc/e-selection-model.h132
-rw-r--r--widgets/misc/e-title-bar.c402
-rw-r--r--widgets/misc/e-title-bar.h87
-rw-r--r--widgets/misc/e-unicode.c2994
-rw-r--r--widgets/misc/e-unicode.h92
-rw-r--r--widgets/misc/gal-categories.glade175
-rw-r--r--widgets/misc/pixmaps/.cvsignore2
-rw-r--r--widgets/misc/pixmaps/cursor_cross.xpm38
-rw-r--r--widgets/misc/pixmaps/cursor_hand_closed.xpm38
-rw-r--r--widgets/misc/pixmaps/cursor_hand_open.xpm38
-rw-r--r--widgets/misc/pixmaps/cursor_zoom_in.xpm37
-rw-r--r--widgets/misc/pixmaps/cursor_zoom_out.xpm37
-rw-r--r--widgets/misc/test-calendar.c220
-rw-r--r--widgets/misc/test-color.c47
-rw-r--r--widgets/misc/test-dateedit.c284
-rw-r--r--widgets/misc/test-dropdown-button.c101
-rw-r--r--widgets/misc/test-title-bar.c77
-rw-r--r--widgets/table/.cvsignore13
-rw-r--r--widgets/table/add-col.xpm22
-rw-r--r--widgets/table/arrow-down.xpm21
-rw-r--r--widgets/table/arrow-up.xpm21
-rw-r--r--widgets/table/check-empty.xpm21
-rw-r--r--widgets/table/check-filled.xpm21
-rw-r--r--widgets/table/clip.pngbin192 -> 0 bytes
-rw-r--r--widgets/table/e-cell-checkbox.c53
-rw-r--r--widgets/table/e-cell-checkbox.h28
-rw-r--r--widgets/table/e-cell-combo.c619
-rw-r--r--widgets/table/e-cell-combo.h62
-rw-r--r--widgets/table/e-cell-date.c140
-rw-r--r--widgets/table/e-cell-date.h32
-rw-r--r--widgets/table/e-cell-float.c93
-rw-r--r--widgets/table/e-cell-float.h53
-rw-r--r--widgets/table/e-cell-number.c69
-rw-r--r--widgets/table/e-cell-number.h32
-rw-r--r--widgets/table/e-cell-pixbuf.c242
-rw-r--r--widgets/table/e-cell-pixbuf.h36
-rw-r--r--widgets/table/e-cell-popup.c504
-rw-r--r--widgets/table/e-cell-popup.h93
-rw-r--r--widgets/table/e-cell-size.c91
-rw-r--r--widgets/table/e-cell-size.h32
-rw-r--r--widgets/table/e-cell-spin-button.c663
-rw-r--r--widgets/table/e-cell-spin-button.h97
-rw-r--r--widgets/table/e-cell-string.c9
-rw-r--r--widgets/table/e-cell-text.c2426
-rw-r--r--widgets/table/e-cell-text.h81
-rw-r--r--widgets/table/e-cell-toggle.c342
-rw-r--r--widgets/table/e-cell-toggle.h39
-rw-r--r--widgets/table/e-cell-tree.c721
-rw-r--r--widgets/table/e-cell-tree.h52
-rw-r--r--widgets/table/e-cell.c354
-rw-r--r--widgets/table/e-cell.h113
-rw-r--r--widgets/table/e-table-click-to-add.c544
-rw-r--r--widgets/table/e-table-click-to-add.h55
-rw-r--r--widgets/table/e-table-col-dnd.h14
-rw-r--r--widgets/table/e-table-col.c207
-rw-r--r--widgets/table/e-table-col.h71
-rw-r--r--widgets/table/e-table-column-specification.c119
-rw-r--r--widgets/table/e-table-column-specification.h51
-rw-r--r--widgets/table/e-table-column.c293
-rw-r--r--widgets/table/e-table-config-field.c278
-rw-r--r--widgets/table/e-table-config-field.h47
-rw-r--r--widgets/table/e-table-config.c790
-rw-r--r--widgets/table/e-table-config.glade1870
-rw-r--r--widgets/table/e-table-config.h78
-rw-r--r--widgets/table/e-table-defines.h22
-rw-r--r--widgets/table/e-table-example-1.c286
-rw-r--r--widgets/table/e-table-example-2.c329
-rw-r--r--widgets/table/e-table-extras.c191
-rw-r--r--widgets/table/e-table-extras.h52
-rw-r--r--widgets/table/e-table-field-chooser-dialog.c190
-rw-r--r--widgets/table/e-table-field-chooser-dialog.h75
-rw-r--r--widgets/table/e-table-field-chooser-item.c561
-rw-r--r--widgets/table/e-table-field-chooser-item.h50
-rw-r--r--widgets/table/e-table-field-chooser.c248
-rw-r--r--widgets/table/e-table-field-chooser.glade129
-rw-r--r--widgets/table/e-table-field-chooser.h80
-rw-r--r--widgets/table/e-table-group-container.c1364
-rw-r--r--widgets/table/e-table-group-container.h74
-rw-r--r--widgets/table/e-table-group-leaf.c477
-rw-r--r--widgets/table/e-table-group-leaf.h58
-rw-r--r--widgets/table/e-table-group.c650
-rw-r--r--widgets/table/e-table-group.glade206
-rw-r--r--widgets/table/e-table-group.h149
-rw-r--r--widgets/table/e-table-header-item.c1593
-rw-r--r--widgets/table/e-table-header-item.h83
-rw-r--r--widgets/table/e-table-header-utils.c430
-rw-r--r--widgets/table/e-table-header-utils.h65
-rw-r--r--widgets/table/e-table-header.c834
-rw-r--r--widgets/table/e-table-header.h94
-rw-r--r--widgets/table/e-table-item.c2741
-rw-r--r--widgets/table/e-table-item.h150
-rw-r--r--widgets/table/e-table-memory-callbacks.c254
-rw-r--r--widgets/table/e-table-memory-callbacks.h72
-rw-r--r--widgets/table/e-table-memory.c284
-rw-r--r--widgets/table/e-table-memory.h58
-rw-r--r--widgets/table/e-table-model.c541
-rw-r--r--widgets/table/e-table-model.h148
-rw-r--r--widgets/table/e-table-one.c236
-rw-r--r--widgets/table/e-table-one.h39
-rw-r--r--widgets/table/e-table-scrolled.c211
-rw-r--r--widgets/table/e-table-scrolled.h54
-rw-r--r--widgets/table/e-table-selection-model.c303
-rw-r--r--widgets/table/e-table-selection-model.h55
-rw-r--r--widgets/table/e-table-simple.c269
-rw-r--r--widgets/table/e-table-simple.h75
-rw-r--r--widgets/table/e-table-size-test.c287
-rw-r--r--widgets/table/e-table-sort-info.c452
-rw-r--r--widgets/table/e-table-sort-info.h83
-rw-r--r--widgets/table/e-table-sorted-variable.c210
-rw-r--r--widgets/table/e-table-sorted-variable.h46
-rw-r--r--widgets/table/e-table-sorted.c273
-rw-r--r--widgets/table/e-table-sorted.h46
-rw-r--r--widgets/table/e-table-sorter.c395
-rw-r--r--widgets/table/e-table-sorter.h49
-rw-r--r--widgets/table/e-table-sorting-utils.c328
-rw-r--r--widgets/table/e-table-sorting-utils.h61
-rw-r--r--widgets/table/e-table-specification.c374
-rw-r--r--widgets/table/e-table-specification.h65
-rw-r--r--widgets/table/e-table-state.c243
-rw-r--r--widgets/table/e-table-state.h54
-rw-r--r--widgets/table/e-table-subset-variable.c227
-rw-r--r--widgets/table/e-table-subset-variable.h63
-rw-r--r--widgets/table/e-table-subset.c390
-rw-r--r--widgets/table/e-table-subset.h62
-rw-r--r--widgets/table/e-table-tooltip.h22
-rw-r--r--widgets/table/e-table-tree.h23
-rw-r--r--widgets/table/e-table-utils.c111
-rw-r--r--widgets/table/e-table-utils.h22
-rw-r--r--widgets/table/e-table.c2244
-rw-r--r--widgets/table/e-table.diabin4514 -> 0 bytes
-rw-r--r--widgets/table/e-table.h286
-rw-r--r--widgets/table/e-tree-memory-callbacks.c262
-rw-r--r--widgets/table/e-tree-memory-callbacks.h97
-rw-r--r--widgets/table/e-tree-memory.c627
-rw-r--r--widgets/table/e-tree-memory.h78
-rw-r--r--widgets/table/e-tree-model.c876
-rw-r--r--widgets/table/e-tree-model.h184
-rw-r--r--widgets/table/e-tree-scrolled.c208
-rw-r--r--widgets/table/e-tree-scrolled.h54
-rw-r--r--widgets/table/e-tree-selection-model.c1242
-rw-r--r--widgets/table/e-tree-selection-model.h52
-rw-r--r--widgets/table/e-tree-simple.c200
-rw-r--r--widgets/table/e-tree-simple.h67
-rw-r--r--widgets/table/e-tree-sorted-variable.c458
-rw-r--r--widgets/table/e-tree-sorted-variable.h62
-rw-r--r--widgets/table/e-tree-sorted.c1282
-rw-r--r--widgets/table/e-tree-sorted.h58
-rw-r--r--widgets/table/e-tree-table-adapter.c1030
-rw-r--r--widgets/table/e-tree-table-adapter.h64
-rw-r--r--widgets/table/e-tree.c2206
-rw-r--r--widgets/table/e-tree.h256
-rw-r--r--widgets/table/image1.pngbin1858 -> 0 bytes
-rw-r--r--widgets/table/image2.pngbin1987 -> 0 bytes
-rw-r--r--widgets/table/image3.pngbin2051 -> 0 bytes
-rw-r--r--widgets/table/remove-col.xpm22
-rw-r--r--widgets/table/sample.table11
-rw-r--r--widgets/table/spec.xml21
-rw-r--r--widgets/table/table-test.c45
-rw-r--r--widgets/table/table-test.h4
-rw-r--r--widgets/table/test-check.c206
-rw-r--r--widgets/table/test-cols.c250
-rw-r--r--widgets/table/test-table.c394
-rw-r--r--widgets/table/tree-expanded.xpm23
-rw-r--r--widgets/table/tree-unexpanded.xpm23
-rw-r--r--widgets/text/.cvsignore10
-rw-r--r--widgets/text/e-completion-test.c192
-rw-r--r--widgets/text/e-completion-view.c691
-rw-r--r--widgets/text/e-completion-view.h103
-rw-r--r--widgets/text/e-completion.c478
-rw-r--r--widgets/text/e-completion.h93
-rw-r--r--widgets/text/e-entry-test.c79
-rw-r--r--widgets/text/e-entry.c1138
-rw-r--r--widgets/text/e-entry.h93
-rw-r--r--widgets/text/e-table-text-model.c226
-rw-r--r--widgets/text/e-table-text-model.h60
-rw-r--r--widgets/text/e-text-model-repos.c73
-rw-r--r--widgets/text/e-text-model-repos.h55
-rw-r--r--widgets/text/e-text-model-test.c74
-rw-r--r--widgets/text/e-text-model-uri.c345
-rw-r--r--widgets/text/e-text-model-uri.h42
-rw-r--r--widgets/text/e-text-model.c592
-rw-r--r--widgets/text/e-text-model.h113
-rw-r--r--widgets/text/e-text-test.c155
-rw-r--r--widgets/text/e-text.c3870
-rw-r--r--widgets/text/e-text.h240
-rw-r--r--wombat/.cvsignore14
-rw-r--r--wombat/ChangeLog214
-rw-r--r--wombat/GNOME_Evolution_Wombat.oaf.in50
-rw-r--r--wombat/Makefile.am58
-rw-r--r--wombat/wombat-moniker.c159
-rw-r--r--wombat/wombat-moniker.h11
-rw-r--r--wombat/wombat.c257
-rw-r--r--wombat/wombat.idl14
2170 files changed, 0 insertions, 861906 deletions
diff --git a/.cvsignore b/.cvsignore
deleted file mode 100644
index 5d4ce997d6..0000000000
--- a/.cvsignore
+++ /dev/null
@@ -1,26 +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
-evolution.spec
-xml-i18n-*
diff --git a/AUTHORS b/AUTHORS
deleted file mode 100644
index ac9da57868..0000000000
--- a/AUTHORS
+++ /dev/null
@@ -1,78 +0,0 @@
-Evolution was written by:
-
-Addressbook
- Arturo Esponosa <arturo@nuclecu.unam.mx> (Original Gnomecard author)
- Nat Friedman <nat@ximian.com>
- Chris Lahey <clahey@ximian.com>
- Chris Toshok <toshok@ximian.com>
- Jon Trowbridge <trow@ximian.com>
-
-Artwork
- Tuomas Kuosmanen <tigert@ximian.com>
- Jakub Steiner <jimmac@ximian.com>
-
-Calendar
- Seth Alves <seth@ximian.com>
- Eric Busboom <eric@softwarestudio.org> (libical author)
- Arturo Esponosa <arturo@nuclecu.unam.mx> (Gnomecal contributor)
- Damon Chaplin <damon@ximian.com>
- Federico Mena-Quintero <federico@ximian.com>
- Jesse Pavel <jesse@ximian.com>
- JP Rosevear <jpr@ximian.com>
- Russell Steinthal <rms39@columbia.edu> (Gnomecal maintainer)
-
-Documentation
- Kevin Breit <battery841@mypad.com>
- Aaron Weber <aaron@ximian.com>
-
-Mailer
- Bertrand Guiheneuf <bertrand@ximian.com>
- Matt Loper <matt@ximian.com>
- Ettore Perazzoli <ettore@ximian.com>
- Jeff Stedfast <fejj@ximian.com>
- Peter Williams <peterw@ximian.com>
- Dan Winship <danw@ximian.com>
- Michael Zucchi <notzed@ximian.com>
-
-Notes
- Anders Carlsson <andersca@gnu.org>
-
-Pilot
- JP Rosevear <jpr@ximian.com>
-
-Shell
- Miguel de Icaza <miguel@ximian.com>
- Ettore Perazzoli <ettore@ximian.com>
-
-Translations
- Akira TAGOH <tagoh@gnome.gr.jp>
- Andraz Tori <andraz.tori1@guest.arnes.si>
- Andreas Hyden <a.hyden@cyberpoint.se>
- Arjan Scherpenisse <acscherp@wins.uva.nl>
- Clara Tattoni <clara.tattoni@libero.it>
- Fatih Demir <kabalak@gmx.net>
- Gediminas Paulauskas <menesis@delfi.lt>
- GNOME PL Team <gnomepl@pandora.info.bielsko.pl>
- Gustavo Maciel Dias Vieira <gdvieira@zaz.com.br>
- Héctor García Alvarez <hector@scouts-es.org>
- Jesús Bravo Álvarez <jba@pobox.com>
- Keld Simonsen <keld@dkuug.dk>
- Kjartan Maraas <kmaraas@gnome.org>
- Matthias Warkus <mawa@iname.com>
- Spiros Papadimitriou <spapadim+@cs.cmu.edu>
- Sung-Hyun Nam <namsh@kldp.org>
- Szabolcs BAN <shooby@gnome.hu>
- Tiago Antão <tiagoantao@bigfoot.com>
- Valek Filippov <frob@df.ru>
- Vincent Renardias <vincent@redhat.com>
- Yuri Syrota <rasta@renome.rovno.ua>
-
-UI
- Anna Dirks <anna@ximian.com>
-
-Widgets
- Damon Chaplin <damon@ximian.com>
- Miguel de Icaza <miguel@ximian.com>
- Chris Lahey <clahey@ximian.com>
- Federico Mena-Quintero <federico@ximian.com>
- Chris Toshok <toshok@ximian.com>
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.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public 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.
-
- <signature of Ty Coon>, 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/COPYING-DOCS b/COPYING-DOCS
deleted file mode 100644
index b42936beb3..0000000000
--- a/COPYING-DOCS
+++ /dev/null
@@ -1,355 +0,0 @@
- GNU Free Documentation License
- Version 1.1, March 2000
-
- Copyright (C) 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: How to use this License for your documents
-
-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 (c) 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.
diff --git a/ChangeLog b/ChangeLog
deleted file mode 100644
index c8dbd2ccf3..0000000000
--- a/ChangeLog
+++ /dev/null
@@ -1,6407 +0,0 @@
-2001-04-12 Christopher James Lahey <clahey@ximian.com>
-
- * configure.in: Updated the required version of gal to 0.6.99.0.
-
-2001-04-11 JP Rosevear <jpr@ximian.com>
-
- * configure.in: Check if gethostbyname_r take five params
-
- * acconfig.h: add GETHOSTBYNAME_R_FIVE_ARGS
-
-2001-04-10 Gediminas Paulauskas <menesis@delfi.lt>
-
- * AUTHORS: /me is a translator.
- * configure.in (EVO_CHECK_LIB): fail with AC_MSG_ERROR, not echo &&
- exit 1.
-
-2001-04-10 Jeffrey Stedfast <fejj@ximian.com>
-
- * configure.in (EVOLUTION_DIR): create the makefile in
- camel/tests/smime
-
-2001-04-08 Chris Toshok <toshok@ximian.com>
-
- * tools/killev (sysname): add some more 16 character versions for
- freebsd.
-
-2001-04-04 Kjartan Maraas <kmaraas@gnome.org>
-
- * AUTHORS: Brag.
-
-2001-04-04 Gediminas Paulauskas <menesis@delfi.lt>
-
- * art/evolution-today-mini.png: converted from exec-16-summary.xpm,
- removed the latter.
- * art/evolution-trash.png, art/evolution-trash-mini.png: images for
- trash folder, one converted from deleted_message.xpm, another from mc.
- * art/Makefile.am: install.
-
-2001-04-02 Jeffrey Stedfast <fejj@ximian.com>
-
- * README (SSL): Remind users that they will currently have to copy
- their cert database from their mozilla directory into ~/evolution.
-
-2001-04-01 Gediminas Paulauskas <menesis@delfi.lt>
-
- * art/Makefile.am: added missing (new) files.
-
-2001-03-30 Dan Winship <danw@ximian.com>
-
- * configure.in (EVOLUTION_MICRO_VERSION): Bump this to 10. (We
- forgot to do this before branching *again*...)
-
-2001-03-28 Dan Winship <danw@ximian.com>
-
- * README: add a bit mentioning that if configure claims you don't
- have something installed when you think you do, that it's probably
- because you installed it in the wrong prefix, or because you need
- a -devel package.
-
- * configure.in: Add a new macro EVO_CHECK_LIB that checks for a
- gnome-config-based library of a given version or later, correctly,
- and if doesn't find it, suggests that you consult the README. Fix
- the various library checks to use this. Meanwhile, remove a bunch
- of old cruft and reorganize a little.
-
- * acconfig.h: Remove cruft
-
-2001-03-28 Jon Trowbridge <trow@ximian.com>
-
- * AUTHORS: In a burst of egomania, added myself.
-
-2001-03-26 Radek Doulik <rodo@ximian.com>
-
- * configure.in: create camel/misc/Makefile
-
-2001-03-22 Dan Winship <danw@ximian.com>
-
- * README: Update xml-i18n-tools version
-
-2001-03-22 Jakub Steiner <jimmac@ximian.com>
-
- * art/new-message.xpm: file->new->mail message
- * art/folder.xpm: file->new->folder
- * art/new_appointment.xpm: file->new->appontment
- * art/print-preview.xpm: file->print preview
- * art/configure_16_calendar.xpm: for the tools menu
-
-2001-03-22 Jakub Steiner <jimmac@ximian.com>
-
- * art/splash.png: move it a bit up so the icons fit better
-
-2001-03-22 Christopher James Lahey <clahey@ximian.com>
-
- * configure.in: Bumped gal requirement to 0.5.99.11.
-
-2001-03-22 Jakub Steiner <jimmac@ximian.com>
-
- * art/configure_16_folder.xpm, configure_16_mail.xpm,
- copy_16_message.xpm, edit.xpm, encrypt.xpm,
- evo-16-address-conduit.png, evo-16-calendar-conduit.png,
- evo-16-todo-conduit.png, exec-16-summary.xpm, import.xpm,
- print.xpm, reply_to_all.xpm, reply.xpm, save.xpm,
- send-receive.xpm, work_offline.xpm, find_contact.xpm,
- send-24-receive.png, evo-48-calendar-conduit.png,
- evo-48-todo-conduit.png, import.png, send-48-receive.png,
- move_message.xpm, all_contacts.xpm, forward.xpm,
- configure_16_addressbook.xpm, Makefile.am,
- evo-48-address-conduit.png: renamed icons to make Miguel's
- speedups possible
- * art/evolution-inbox.png: color coded one
- * art/envelope.png: reverted back to the non-color coded one
- * art/evolution-contacts-plain.png: non-color coded one for
- the "new contact" dialogue
-
-2001-03-21 Dan Winship <danw@ximian.com>
-
- * configure.in: Require bison, not yacc (for vcc.y)
-
-2001-03-20 Miguel de Icaza <miguel@ximian.com>
-
- * art/Makefile.am (images_DATA): Added all the new icons to the
- distribution.
-
-2001-03-20 Jeffrey Stedfast <fejj@ximian.com>
-
- * configure.in: More fixes for NSPR and NSS checks - use fixed it
- to use AC_CHECK_HEADERS instead of AC_CHECK_FILES. Also made it
- not default the nspr lib path to /usr/lib/mozilla which may not be
- in the user's library path when checking for nspr libs.
-
-2001-03-20 Jakub Steiner <jimmac@ximian.com>
-
- * art/48_send-receive.png: send-receive for the s/r dialog
- * art/24_send-receive.png: send-receive to replace the
- fetch-mail-doggie
- * art/16_send-receive.xpm: send-receive for (future) menu
- item
- * art/16_import.xpm: for the file menu
- * art/16_work_offline.xpm: for the file menu
- * AUTHORS: so I can show off
- * art/splash.png: making radek famous ;)
- * art/envelope.png, evolution-calendar.png, evolution-contacts.png,
- evolution-tasks.png, evolution-today.png:
- new concept of color coded apps:
- - mailer: #efb43e
- - calendar: #bab5ab
- - contacts: #9794ab
- - tasks: #6e9e6e
- - exec. summary: #c4757e
-
-2001-03-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * configure.in: Fix ettore's fix ;-)
-
-2001-03-19 Christopher James Lahey <clahey@ximian.com>
-
- * configure.in: Bumped gal requirement to 0.5.99.8.
-
-2001-03-19 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: Make sure we never define `NSPR_CFLAGS' or
- `NSS_CFLAGS' as just "-I".
-
-2001-03-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * NEWS: pulled from the 0.9 release.
-
-2001-03-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * configure.in: Updated the checks for NSS and NSPR
-
-2001-03-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * README: Added directions on how to build with SSL support.
-
- * configure.in: Updated the checks for NSS and NSPR
-
-2001-03-16 Jakub Steiner <jimmac@ximian.com>
-
- * art/48_import.png: for the import druid
-
-2001-03-15 Dan Winship <danw@ximian.com>
-
- * configure.in: Bump gal requirement to 0.5.99.7
-
-2001-03-15 Gediminas Paulauskas <menesis@delfi.lt>
-
- * configure.in: create doc/devel/executive-summary/Makefile
- * evolution.png: moved to art/.
- * evolution.desktop: moved to data/.
- * Makefile.am: reflect those moves.
- * art/*.xpm: moved 8 files from calendar/gui here.
- * art/Makefile.am: added moved files.
- distribute *.xpm, install *.png and *view.xpm.
-
-2001-03-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * configure.in: Updated to AC_SUBST the NSPR/NSS flags.
-
-2001-03-14 Dan Winship <danw@ximian.com>
-
- * README: Pull up some of the clarifications from the 0.9 branch
-
-2001-03-13 Chris Toshok <toshok@ximian.com>
-
- * configure.in: add -lresolv to LDAP_LIBS if it's there.
-
-2001-03-13 Iain Holmes <iain@ximian.com>
-
- * configure.in: Added the mail/importers dir.
-
-2001-03-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * README: Rearranged some of the dependencies to try to get them
- into a more correct order (needed for people building all of these
- packages by hand).
-
-2001-03-12 JP Rosevear <jpr@ximian.com>
-
- * README: Update
-
-2001-03-09 Dan Winship <danw@ximian.com>
-
- * configure.in (EVOLUTION_MICRO_VERSION): Hm... probably would be
- clever to be calling this 0.9 rather than 0.8, since it's almost
- 0.10.
-
-2001-03-09 Christopher James Lahey <clahey@ximian.com>
-
- * libversit/vcc.y: Changed int to char when returning a character
- from a stream (since it needs to be able to hold EOF.)
-
-2001-03-07 Jeffrey Stedfast <fejj@ximian.com>
-
- * configure.in: Removed --enable-assbarn-security and replaced it
- with the real options:
- --with-nspr-includes=PREFIX
- --with-nspr-libs=PREFIX
- --with-nss=PREFIX
-
- * acconfig.h: #undef HAVE_NSS
-
-2001-03-07 Ettore Perazzoli <ettore@ximian.com>
-
- * configure.in: Require GAL 0.5.99.6 or later.
-
-2001-03-07 Kjartan Maraas <kmaraas@gnome.org>
-
- * shell/main: /* xgettext:no-c-format */ before the welcome
- message.
- * configure.in: Don't try to generate a Makefile in
- camel/providers/vee as it's empty.
-
-2001-03-05 JP Rosevear <jpr@ximian.com>
-
- * README: Update pilot instructions
-
-2001-03-05 Christopher James Lahey <clahey@ximian.com>
-
- * configure.in: Check for gal 0.5.99.4.
-
-2001-03-04 Dan Winship <danw@ximian.com>
-
- * configure.in: Reorganize a bit to get rid of warnings about
- AC_TRY_COMPILE being used before AC_ISC_POSIX
-
-2001-03-04 Christopher James Lahey <clahey@ximian.com>
-
- * configure.in: Added views/addressbook/Makefile.
-
-2001-03-02 JP Rosevear <jpr@ximian.com>
-
- * art/Makefile.am: install conduit icons
-
-2001-03-02 Chris Toshok <toshok@ximian.com>
-
- * configure.in: add logic to make sure we're building against OpenLDAP >= 2
-
-2001-03-01 Christopher James Lahey <clahey@ximian.com>
-
- * Makefile.am (SUBDIRS), configure.in: Added views stuff.
-
-2001-03-01 Dan Winship <danw@ximian.com>
-
- * configure.in: Redo the Kerberos stuff again to deal with the
- stuff currently on my machine. I think it should deal with both
- the MIT and KTH versions of both krb4 and krb5 now.
-
-2001-03-01 Jakub Steiner <jimmac@ximian.com>
-
- * art/48_evo-address-conduit.png: 48^2 version of the
- addressbook pilot conduit. (for the new control center)
- * art/16_evo-address-conduit.png: 16x16 version for current
- gnomecc
- * art/48_evo-todo-conduit.png: for new gnomecc
- * art/16_evo-todo-conduit.png: for old gnomecc
- * art/48_evo-calendar-conduit.png: for new gnomecc
- * art/16_evo-calendar-conduit.png: for old gnomecc
-
-2001-03-01 Christopher James Lahey <clahey@ximian.com>
-
- * configure.in: Check for gal 0.5.99.2.
-
-2001-02-19 Christopher James Lahey <clahey@ximian.com>
-
- * configure.in: Check for gal 0.5.99.1.
-
-2001-02-15 Christopher James Lahey <clahey@ximian.com>
-
- * configure.in: Check for gal 0.5.99.0.
-
-2001-02-14 Dan Winship <danw@ximian.com>
-
- * various .cvsignore files: Ignore generated .oaf files
-
-2001-02-13 JP Rosevear <jpr@ximian.com>
-
- * art/Makefile.am: install new files
-
- * art/*view.xpm: add files from calendar/gui
-
-2001-02-11 Chris Toshok <toshok@ximian.com>
-
- * configure.in: rework ldap check logic so it'll work to
- --disable-ldap if you've previously configured with --enable-ldap.
-
-2001-02-11 Gediminas Paulauskas <menesis@delfi.lt>
-
- * data/evolution.keys, evolution.desktop: removed, they are generated.
- * data/evolution.keys.in, evolution.desktop.in: new untranslated files.
- * data/evolution.desktop: removed, it duplicates above.
- * Makefile.am, data/Makefile.am: reflect above changes, merge
- translations.
-
-2001-02-09 Jeffrey Stedfast <fejj@ximian.com>
-
- * configure.in: Added hacks to check for Mozilla libs like nspr
- and nss that we will need for SSL and S/MIME.
-
-2001-02-09 Michael Meeks <michael@ximian.com>
-
- * configure.in: depend on bonobo >= 0.36
-
-2001-02-08 Christopher James Lahey <clahey@ximian.com>
-
- * configure.in: Upped the version number of gal required to 0.5.
-
-2001-02-07 JP Rosevear <jpr@ximian.com>
-
- * README: Update to latest requirements
-
-2001-02-05 Jeffrey Stedfast <fejj@ximian.com>
-
- * .cvsignore: Added xml-* files.
-
-2001-02-05 Gustavo Maciel Dias Vieira <gdvieira@zaz.com.br>
-
- * configure.in (ALL_LINGUAS): Added pt_BR to ALL_LINGUAS.
-
-2001-02-04 Christopher James Lahey <clahey@ximian.com>
-
- * configure.in: Require version 0.4.99.8 of gal.
-
-2001-02-03 Federico Mena Quintero <federico@ximian.com>
-
- * configure.in: Make sure we have gnome-libs 1.2.9 or higher.
-
-2001-02-01 Chris Toshok <toshok@ximian.com>
-
- * configure.in: allow --enable/disable-ldap.
-
-2001-02-01 Jason Leach <jasonleach@usa.net>
-
- * tools/killev: Fix this script to make it work with Solaris.
- Patch from Louise Miller.
-
-2001-01-29 Eskil Heyn Olsen <eskil@eazel.com>
-
- reviewed by: JP Rosevear <jpr@ximian.com>
-
- * acconfig.h:
- Added the ENABLE_NNTP define
-
- * configure.in:
- Fixed the NNTP m4 section.
-
-2001-01-29 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
-
- * configure.in: added sk to ALL_LINGUAS.
- * evolution.desktop: added Slovak messages.
-
-2001-01-27 Jason Leach <jasonleach@usa.net>
-
- * configure.in (AC_OUTPUT): remove
- widgets/shortcut-bar/Makefile from here.
-
-2001-01-25 Christopher James Lahey <clahey@helixcode.com>
-
- * configure.in: Upped the required version of gal in evolution.
-
-2001-01-25 Ettore Perazzoli <ettore@ximian.com>
-
- * art/Makefile.am (images_DATA): Add the missing .xpm files.
-
-2001-01-25 Ettore Perazzoli <ettore@ximian.com>
-
- * art/Makefile.am (images_DATA): Add `24_find_contacts.xpm',
- `16_print_xpm', `16_configure_addressbook'.
-
-2001-01-25 Ettore Perazzoli <ettore@ximian.com>
-
- * art/Makefile.am (images_DATA): Add `24_all_contacts.xpm'.
-
-2001-01-24 Christopher James Lahey <clahey@helixcode.com>
-
- * configure.in: Upped the required version of gal in evolution.
-
-2001-01-22 Tuomas Kuosmanen <tigert@ximian.com>
-
- * art/splash.png: From the "Ideas from the shower" department:
- new splash screen.
-
-2001-01-17 JP Rosevear <jpr@ximian.com>
-
- * README: Update package requirements
-
-2001-01-19 Jason Leach <jasonleach@usa.net>
-
- * configure.in: Changed a leftover $with_x_mailer to
- $with_sub_version. Made it so that if $with_sub_version isn't
- specified, we don't try to output it, and also corrected the way
- SUB_VERSION is defined.
-
-2001-01-18 Federico Mena Quintero <federico@ximian.com>
-
- * Makefile.am: Um, why was the doc directory removed from SUBDIRS?
-
-2001-01-17 Larry Ewing <lewing@helixcode.com>
-
- * configure.in (EVOLUTION_DIR): add the
- doc/devel/importer/Makefile as a target.
-
-2001-01-17 Ettore Perazzoli <ettore@ximian.com>
-
- * acconfig.h: Add `SUB_VERSION', remove `XMAILER_VERSION'.
-
- * configure.in: Removed `--with-x-mailer' option; replaced with a
- more generic `--with-sub-version' option. So, don't define
- `X_MAILER'; instead, define `SUB_VERSION'.
-
-2001-01-16 Chris Toshok <toshok@helixcode.com>
-
- * configure.in: add --enable-nntp switch. default is no.
-
-2001-01-16 Dan Winship <danw@ximian.com>
-
- * configure.in, acconfig.h: Add --with-x-mailer to set the version
- string that appears in the X-Mailer header.
-
-2001-01-15 Christopher James Lahey <clahey@ximian.com>
-
- * configure.in: Changed the required version of gal.
-
-2001-01-15 Tuomas Kuosmanen <tigert@ximian.com>
-
- * art/16_copy_message.xpm, art/16_move_message.xpm: icons for the
- Message->Move/Copy to folder -menu entries.
-
-2001-01-15 Tuomas Kuosmanen <tigert@ximian.com>
-
- * art/evolution-calendar-mini.png: New version of calendar icon that
- looks more like a calendar and not a dictionary or something :)
-
- Btw, the icons get scaled for some reason, even though that is
- not necessary as all of those should be 16x16 pixels. Can anyone look
- into this?
-
-2001-01-15 Dietmar Maurer <dietmar@ximian.com>
-
- * *.c: changed the signature of the property_bag get/set
- functions.
-
-2001-01-14 JP Rosevear <jpr@ximian.com>
-
- * configure.in: remove old config message
-
-2001-01-14 Damon Chaplin <damon@helixcode.com>
-
- * tools/evolution-move-tasks: new script to move tasks from the
- Calendar folder to the new Tasks folder, so people won't lose tasks.
- This can be deleted after a few releases.
-
- * tools/Makefile.am (bin_SCRIPTS): added above.
-
- * configure.in: added default_user/local/Tasks/Makefile to AC_OUTPUT.
-
-2001-01-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * config.h.in: Removed GPG stuff.
-
- * acconfig.h: Take out all refs to PGP and GPG stuff.
-
- * configure.in: Take out the PGP/GPG detection stuff.
-
-2001-01-12 Federico Mena Quintero <federico@ximian.com>
-
- * configure.in: Suggest what to do if gtk-doc is not found.
-
-2001-01-12 Christopher James Lahey <clahey@helixcode.com>
-
- * configure.in: Make evolution depend on the new version of gal.
-
-2001-01-12 Dan Winship <danw@ximian.com>
-
- * MAINTAINERS, AUTHORS, README: Ximianize. Also update the README
- a bit and mention the OAF stable branch.
-
-2001-01-11 Dan Winship <danw@helixcode.com>
-
- * art/priority-high.xpm: Add a white outline around the "!" so it
- still shows up clearly in selected rows when your theme selection
- color is reddish. (Problem pointed out by Federico.)
-
-2001-01-11 Federico Mena Quintero <federico@helixcode.com>
-
- * configure.in: At the end of the configure process, report
- whether the documentation files will be built or not.
-
-2001-01-10 Tuomas Kuosmanen <tigert@helixcode.com>
-
- * art/move-message.png, art/move-message.png: New versions.
-
-2001-01-09 Federico Mena Quintero <federico@helixcode.com>
-
- * configure.in (AC_OUTPUT): Added calendar/gui/alarm-notify/Makefile.
-
-2001-01-05 Tuomas Kuosmanen <tigert@helixcode.com>
-
- * art/evolution-contacts-mini.png: This looks more pretty.
-
-2001-01-03 Christopher James Lahey <clahey@helixcode.com>
-
- * configure.in: Removed camel/providers/mbox/Makefile and
- camel/providers/mh/Makefile.
-
-2001-01-01 Michael Meeks <michael@helixcode.com>
-
- * configure.in: Require bonobo 0.31
-
-2000-12-24 Not Zed <NotZed@HelixCode.com>
-
- * configure.in: If we find threads ok, then always turn on
- ENABLE_THREADS.
-
-2000-12-14 Christopher James Lahey <clahey@helixcode.com>
-
- * NEWS (Addressbook): Added a bit of addressbook NEWS.
-
- * configure.in: Updated the gal check to require gal 0.4.
-
-2000-12-14 Christopher James Lahey <clahey@helixcode.com>
-
- * art/mail-new.xpm, art/mail-read.xpm, art/mail-replied.xpm: Moved
- these images each up one pixel.
-
-2000-12-14 Jeffrey Stedfast <fejj@helixcode.com>
-
- * NEWS: Update.
-
-2000-12-14 JP Rosevear <jpr@helixcode.com>
-
- * NEWS: Update
-
-2000-12-14 Christopher James Lahey <clahey@helixcode.com>
-
- * art/splash.png: New splash from Jimmac.
-
-2000-12-12 Christopher James Lahey <clahey@helixcode.com>
-
- * README: Removed mention of ETable and EText in widgets
- directory.
-
-2000-12-12 Dan Winship <danw@helixcode.com>
-
- * README: Mention the gconf stable branch.
-
-2000-12-07 Christopher James Lahey <clahey@helixcode.com>
-
- * configure.in: Updated the required version of gal.
-
-2000-12-07 Radek Doulik <rodo@helixcode.com>
-
- * configure.in (GTKHTML_LIBS): renamed HTMLEditor.idl to
- Editor.idl
-
-2000-12-06 Kjartan Maraas <kmaraas@gnome.org>
-
- * data/evolution.keys: Added some Norwegian translations.
-
-2000-12-06 Christopher James Lahey <clahey@helixcode.com>
-
- * configure.in: Increased the required version of gal.
-
-2000-12-05 JP Rosevear <jpr@helixcode.com>
-
- * README: minor tweak
-
-2000-12-05 Not Zed <NotZed@HelixCode.com>
-
- * configure.in: Added camel/tests/stream/Makefile.am.
-
-2000-12-01 Dan Winship <danw@helixcode.com>
-
- * README: gnome-vfs depends on gconf, so add that.
-
-2000-11-30 Jeffrey Stedfast <fejj@helixcode.com>
-
- * configure.in: Bumped required gal version to 0.2.99.4 for
- e_str_make_safe.
-
- * README: Added some necessary :'s in the pilot-link cvs stuff.
-
-2000-11-30 Gediminas Paulauskas <menesis@delfi.lt>
-
- * calendar/gui/main.c, executive-summary/component/main.c, mail/main.c,
- shell/main.c, notes/main.c,
- addressbook/gui/component/addressbook-factory.c:
- removed #ifdef ENABLE_NLS/#endif on Miguel's request.
-
-2000-11-29 JP Rosevear <jpr@helixcode.com>
-
- * README: Update pilot info
-
-2000-11-29 Dan Winship <danw@helixcode.com>
-
- * configure.in: Bump required gal version to 0.2.99.3 for iconv
- changes
-
-2000-11-29 Federico Mena Quintero <federico@helixcode.com>
-
- * COPYING-DOCS: Added a copy of the GNU Free Documentation
- License.
-
- * Makefile.am (EXTRA_DIST): Added COPYING-DOCS.
-
-2000-11-28 JP Rosevear <jpr@helixcode.com>
-
- * acconfig.h: Add USE_FLOCK, USE_FCNTL, USE_FLOCK
-
- * configure.in: Auto* magic for various camel locking types
-
-2000-11-28 Not Zed <NotZed@HelixCode.com>
-
- * configure.in (AC_OUTPUT): Added camel/tests/folder/Makefile
-
-2000-11-27 JP Rosevear <jpr@helixcode.com>
-
- * AUTHORS: Update - hopefully I assigned blame correctly :-)
-
- * MAINTAINERS: ditto
-
-2000-11-27 JP Rosevear <jpr@helixcode.com>
-
- * configure.in: Correct the bonobo version error message
-
- * README: Update
-
-2000-11-24 Not Zed <NotZed@HelixCode.com>
-
- * configure.in: Added camel/tests stuff to output macro.
-
-2000-11-14 Not Zed <NotZed@HelixCode.com>
-
- * configure.in: Added local provider dir to output macro.
-
-2000-11-21 Dan Winship <danw@helixcode.com>
-
- * configure.in: Check for libgpgme. (Support not added to mail
- yet.)
-
-2000-11-21 Federico Mena Quintero <federico@helixcode.com>
-
- * configure.in (EVOLUTION_DIR): Removed the
- default_user/local/Tasks/Makefile until the relevant files are on
- CVS.
-
-2000-11-18 Miguel de Icaza <miguel@helixcode.com>
-
- * Added widgets/menus that contains the gal-view-menus.c code from
- Gal that depended on Bonobo.
-
- * configure.in: Update list of Makefiles;
-
- * widgets/Makefile.am: Update.
-
-2000-11-13 Christopher James Lahey <clahey@helixcode.com>
-
- * configure.in: Update the gal reqiurement version.
-
-2000-11-10 Michael Meeks <michael@helixcode.com>
-
- * configure.in: Require Bonobo >= 0.29, due to the XSync
- fix.
-
-2000-11-09 Christopher James Lahey <clahey@helixcode.com>
-
- * configure.in: Require gal 0.2.99.1.
-
-2000-11-06 Jeffrey Stedfast <fejj@helixcode.com>
-
- * configure.in: Require gal 0.2.1.3
-
-2000-11-06 Dan Winship <danw@helixcode.com>
-
- * configure.in (GTKHTML_LIBS): ${prefix} doesn't get defaulted
- until the end of configure, so check if it's "NONE" and use
- ${ac_default_prefix} if so.
-
-2000-11-06 Radek Doulik <rodo@helixcode.com>
-
- * configure.in (GTKHTML_LIBS): also look for HTMLEditor.idl in
- ${prefix}/share/gtkhtml
-
-2000-11-03 Radek Doulik <rodo@helixcode.com>
-
- * configure.in (BONOBO_HTML_GNOME_CFLAGS): raise required version
- number to 0.8
- added check for HTMLEditor.idl file
-
-2000-11-02 Christopher James Lahey <clahey@helixcode.com>
-
- * configure.in: Require gal 0.2.1.2.
-
-2000-11-02 Michael Meeks <michael@helixcode.com>
-
- * configure.in: Require Bonobo-0.27+
-
-2000-11-01 Gediminas Paulauskas <menesis@delfi.lt>
-
- * addressbook/ename/.cvsignore, addressbook/gui/minicard/.cvsignore,
- calendar/doc/.cvsignore, widgets/e-paned/.cvsignore,
- widgets/e-table/.cvsignore, widgets/e-text/.cvsignore: added these
- files.
- * calendar/gui/.cvsignore, composer/.cvsignore,
- executive-summary/.cvsignore, executive-summary/component/.cvsignore,
- po/.cvsignore: added some files to ignore.
-
- * addressbook/gui/component/addressbook-factory.c, mail/main.c,
- shell/main.c, calendar/gui/main.c, notes/main.c,
- executive-summary/component/main.c: call *textdomain() only if
- ENABLE_NLS is defined.
-
-2000-11-01 Gediminas Paulauskas <menesis@delfi.lt>
-
- * configure.in: added lt to ALL_LINGUAS.
-
-2000-10-30 Dan Winship <danw@helixcode.com>
-
- * configure.in: fix up printing of kerberos configuration status
-
-2000-10-27 Christopher James Lahey <clahey@helixcode.com>
-
- * configure.in: Require gal cvs version.
-
-2000-10-27 <jpr@helixcode.com>
-
- * tools/killev: Kill executive summary components
-
-2000-10-25 Iain Holmes <iain@helixcode.com>
-
- * configure.in: Added executive-summary stuff
-
- * Makefile.am: Added the executive-summary subdirs.
-
-2000-10-23 Dan Winship <danw@helixcode.com>
-
- * notes/Makefile.am (INCLUDES): Update EVOLUTION_LOCALEDIR
-
- * configure.in: set localedir here to use in Makefiles.
- (AM_GNOME_GETTEXT doesn't actually always set it to
- $(datadir)/locale).
-
-2000-10-23 Christopher James Lahey <clahey@helixcode.com>
-
- * configure.in: Updated the gal check to check for gal 0.2.1.
-
-2000-10-22 Robert Brady <rwb197@zepler.org>
-
- * configure.in: Added "en_GB" to ALL_LINGUAS.
-
-2000-10-20 Michael Meeks <michael@helixcode.com>
-
- * notes/component-factory.c (control_activate_cb):
-
-2000-10-19 Christopher James Lahey <clahey@helixcode.com>
-
- * NEWS (General, Addressbook): Updated NEWS for addressbook and
- ETable.
-
-2000-10-19 Christopher James Lahey <clahey@helixcode.com>
-
- * configure.in: Updated the gal check to check for gal 0.2.
-
-2000-10-19 Ettore Perazzoli <ettore@helixcode.com>
-
- * configure.in (EVOLUTION_MICRO_VERSION): 6.
-
- * Makefile.am (EXTRA_DIST): Remove `evolution.spec.in'.
- (dist-hook:): Removed.
-
-2000-10-18 Michael Meeks <michael@helixcode.com>
-
- * notes/component-factory.c (control_activate, control_deactivate),
- (create_view): cripple, not worth updating to new UI code.
-
-2000-10-17 Tuomas Kuosmanen <tigert@helixcode.com>
-
- * art/splash.png: This looks happier than the dark piece of rusty
- metal. And the Big Dig in Boston is ugly looking too. Finnish
- road poles are much more cool!
-
-2000-10-15 Peter Williams <peterw@helixcode.com>
-
- * tools/verify-evolution-install.sh (libcamelvee): Check
- for linkage against version 0.5 libcamelvee, not version 0.3.
- This should track with the version of Evolution itself.
- (rm -f $ldddfile): Remove a temporary file.
-
-2000-10-15 Kjartan Maraas <kmaraas@gnome.org>
-
- * configure.in: Added "nn" to ALL_LINGUAS.
-
-2000-10-14 Ettore Perazzoli <ettore@helixcode.com>
-
- * art/Makefile.am (images_DATA): Add `splash.png'.
-
-2000-10-14 Tuomas Kuosmanen <tigert@helixcode.com>
-
- * art/splash.png: umm.. it's a splash screen image.
-
-2000-10-11 JP Rosevear <jpr@helixcode.com>
-
- * configure.in: Fix bonobo error message
-
-2000-10-11 Jesse Pavel <jpavel@helixcode.com>
-
- * data/evolution.keys: Added support for the text/calendar and
- text/x-calendar MIME types.
-
-2000-10-10 Gediminas Paulauskas <menesis@delfi.lt>
-
- * configure.in: Added lt to ALL_LINGUAS.
-
-2000-10-10 Tuomas Kuosmanen <tigert@helixcode.com>
-
- * calendar/gui/recur.xpm: Updated round-we-go-thingy icon..
-
-2000-10-06 Chris Toshok <toshok@helixcode.com>
-
- * art/empty.xpm: make it transparent instead of white.
-
-2000-10-06 Christophe Merlet <christophe@merlet.net>
-
- * *.desktop: Added french strings.
-
-2000-10-05 Dan Winship <danw@helixcode.com>
-
- * tools/Makefile.am (EXTRA_DIST): Add verify-evolution-install.sh
- to EXTRA_DIST
-
-2000-10-05 Jeffrey Stedfast <fejj@helixcode.com>
-
- * configure.in: Check for isblank
-
- * config.h.in:
- * acconfig.h: #undef HAVE_ISBLANK
-
-2000-10-05 Michael Meeks <michael@helixcode.com>
-
- * configure.in: Bump Bonobo requirement to >= 0.20
-
-2000-10-05 Iain Holmes <iain@helixcode.com>
-
- * executive-summary/*: Added the executive summary stuff.
-
- * ui/evolution-executive-summary.xml: New.
-
- * art/add-service.png: New icon.
-
-2000-10-03 Matt Bissiri <bissiri@eecs.umich.edu>
-
- * ui/evolution-addressbook-ldap.xml,
- * ui/evolution-addressbook.xml,
- * ui/evolution-calendar.xml,
- * ui/evolution-contact-editor.xml:
- Fixed typo `_decr' -> `_descr', so some missing tooltips will appear.
- Also fixed some typos in descr values.
-
-2000-09-29 Peter Williams <peterw@helixcode.com>
-
- * ui/Makefile.am (XML_FILES): Install the new evolution-subscribe.xml
- file.
-
-2000-09-29 Chris Toshok <toshok@helixcode.com>
-
- * ui/evolution-mail.xml: add a Settings/Manage Subscriptions...
- menu item.
-
- * ui/evolution-subscribe.xml: add a File/Close menu item.
-
-2000-09-28 Chris Toshok <toshok@helixcode.com>
-
- * ui/evolution-subscribe.xml: add a FolderSearch control, and
- change "Refresh" to "RefreshList".
-
-2000-09-27 Chris Toshok <toshok@helixcode.com>
-
- * ui/evolution-subscribe.xml: add an Refresh List button..
-
-2000-09-27 Chris Toshok <toshok@helixcode.com>
-
- * ui/Makefile.am (XML_FILES): add evolution-subscribe.xml.
-
- * ui/evolution-subscribe.xml: new file.
-
-2000-09-25 Jeffrey Stedfast <fejj@helixcode.com>
-
- * ui/evolution-mail.xml: Moved the (un)select all menu items over
- to the Edit menu - this looks nicer.
-
-2000-09-25 Jeffrey Stedfast <fejj@helixcode.com>
-
- * ui/evolution-mail.xml: Added some new menu items to the Message
- menu like (un)select all and moved "mark as read" to the Message
- menu.
-
-2000-09-25 Jeffrey Stedfast <fejj@helixcode.com>
-
- * configure.in: Moved addressbook/ename to e-util/ename so
- generate e-util/ename/Makefile and don't generate
- addressbook/ename/Makefile
-
-2000-09-23 Tuomas Kuosmanen <tigert@localhost>
-
- * art/attachment.xpm
- * art/add-attachment.png: OOPS. The attachment.xpm was not the one
- I thought, so I accidentally replaced the paperclip icon in the mail
- list column, which wasnt my intention. I hope this works now. The old
- one is back, instead the toolbar icon to add attachment is now called
- "add-attachment.png" as you can see also from above. Bummer. Sorry :)
-
-2000-09-22 Christopher James Lahey <clahey@helixcode.com>
-
- * libversit/vcc.y: Fixed some warnings. Fixed a bug where quoted
- printable fields were reading in semi-colons that should have been
- field separators.
-
-2000-09-22 Christopher James Lahey <clahey@helixcode.com>
-
- * ui/Makefile.am: Added evolution-addressbook-ldap.xml.
-
- * ui/evolution-addressbook-ldap.xml: New file. (A Variation on
- evolution-addressbook.xml)
-
- * ui/evolution-addressbook.xml: Added View All and Stop buttons.
-
-2000-09-21 Federico Mena Quintero <federico@helixcode.com>
-
- * ui/evolution-calendar.xml: Removed the AboutCalendar stuff.
-
- * ui/evolution.xml: Fix mis-spelling of "calendar".
-
-2000-09-21 Michael Meeks <michael@helixcode.com>
-
- * notes/component-factory.c (control_activate): upd.
-
-2000-09-20 Christopher James Lahey <clahey@helixcode.com>
-
- * ui/.cvsignore: Added a cvsignore file here.
-
-2000-09-20 Christopher James Lahey <clahey@helixcode.com>
-
- * ui/Makefile.am (XML_FILES): Added evolution-contact-editor.xml.
-
- * ui/evolution-contact-editor.xml: New file for the UI for the
- evolution contact editor.
-
-2000-09-20 Tuomas Kuosmanen <tigert@gimp.org>
-
- * art/attachment.xpm
- * art/send.png: new icons for "compose mail" dialog...
-
-2000-09-19 Dan Winship <danw@helixcode.com>
-
- * configure.in: alter the krb4 check a bit to deal with configure
- cache suckage. (If you do AC_CHECK_LIB with the same library and
- function name but different LDFLAGS, it will still use the result
- of the previous check. So use a different function the second
- time.)
-
-2000-09-18 Dan Winship <danw@helixcode.com>
-
- * README: add gal as a dependency
-
-2000-09-18 Jeffrey Stedfast <fejj@helixcode.com>
-
- * art/score-*.xpm: stupid looking icons for use with displaying
- scores in the message-list view. These need a makeover BADLY ;-)
-
-2000-09-18 Christopher James Lahey <clahey@helixcode.com>
-
- * configure.in: Added check for gnome-app-lib. Removed
- directories that have been moved to gal.
-
-2000-09-15 Dan Winship <danw@helixcode.com>
-
- * configure.in, evolution.spec.in: remove spec file. We haven't
- been keeping it up to date, and it's only good for RH anyway, and
- if people really want a spec file they can get it from our SRPMs.
-
-2000-09-07 Michael Meeks <michael@helixcode.com>
-
- * configure.in: Require Bonobo 0.19
-
-2000-09-13 Christopher James Lahey <clahey@helixcode.com>
-
- * configure.in: Added widgets/e-reflow/Makefile. Replaced
- addressbook/gui/minicard/Makefile with
- addressbook/gui/widgets/Makefile.
-
-2000-09-13 Tuomas Kuosmanen <tigert@localhost>
-
- * art/pin.png: added icon for the folder tree "pin down" button
-
-2000-09-12 JP Rosevear <jpr@helixcode.com>
-
- * NEWS (Calendar): Pilot stuff
-
-2000-09-12 Ettore Perazzoli <ettore@helixcode.com>
-
- * configure.in: The notes subdir isn't actually used, so remove
- it.
-
-2000-09-12 Ettore Perazzoli <ettore@helixcode.com>
-
- * configure.in: 0.5.
-
-2000-09-12 Jeffrey Stedfast <fejj@helixcode.com>
-
- * NEWS (Mailer): Added Sent/Outbox feature descriptions
-
-2000-09-12 Dan Winship <danw@helixcode.com>
-
- * NEWS (Mailer): add most (but not all) 0.5 Mailer features
-
- * configure.in: s/Sentbox/Sent/
-
-2000-09-12 Ettore Perazzoli <ettore@helixcode.com>
-
- * art/Makefile.am (buttonsdir): Install the new button icons into
- `$(datadir)/images/evolution/buttons'.
-
-2000-09-11 Tuomas Kuosmanen <tigert@helixcode.com>
-
- * art/fetch-mail.png
- * art/compose-message.png
- * art/reply.png
- * art/reply-to-all.png
- * art/forward.png
- * art/move-message.png
- * art/copy-message.png: New icons for the main window toolbar
-
-2000-09-11 Christopher James Lahey <clahey@helixcode.com>
-
- * NEWS: Added 0.5 changes for ETable and Addressbook.
-
-2000-09-07 Dan Winship <danw@helixcode.com>
-
- * README: Add a mention of the verify-evolution-install.sh script
- in tools/.
-
-2000-09-03 Jeffrey Stedfast <fejj@helixcode.com>
-
- Reversed my last change as it broke configure, how do I get it so
- that we can do folders with spaces in the name!?
-
-2000-09-03 Jeffrey Stedfast <fejj@helixcode.com>
-
- * configure.in: Renamed default_user/local/Sentbox to
- default_user/local/Sent\ Mail as Ettore and Danw are picky about
- folder names
-
-2000-09-02 Christopher James Lahey <clahey@helixcode.com>
-
- * configure.in: Added calendar/conduits/Makefile,
- calendar/conduits/calendar/Makefile and
- calendar/conduits/todo/Makefile to the list of makefiles to
- output.
-
-2000-09-01 Jeffrey Stedfast <fejj@helixcode.com>
-
- * configure.in: Add default_user/local/Sentbox/Makefile to the
- list of makefiles to output
-
-2000-08-31 Peter Williams <peterw@helixcode.com>
-
- * configure.in (kerberos): Check and see if krb_sendauth needs
- prototyping. (#define NEED_KRB_SENDAUTH_PROTO). Also check
- for a libkrb that doesn't need -ldes.
-
- * acconfig.h: #undef it
-
-2000-08-30 Lauris Kaplinski <lauris@helixcode.com>
-
- * configure.in: AC_DEFINE(USING_GNOME_PRINT_0_20)
-
- * acconfig.h: #undef that
-
-2000-08-30 Peter Williams <peterw@helixcode.com>
-
- * configure.in: Robustify the kerberos checks.
-
-2000-08-29 Dan Winship <danw@helixcode.com>
-
- * configure.in, acconfig.h: decruft
-
-2000-08-28 Jesus Bravo Alvarez <jba@pobox.com>
-
- * configure.in: Added Portuguese (pt) to ALL_LINGUAS
-
-2000-08-26 JP Rosevear <jpr@helixcode.com>
-
- * configure.in: Require oafized bonobo
-
-2000-08-24 Federico Mena Quintero <federico@helixcode.com>
-
- * configure.in: Ahem. If you add dependencies on libraries, make
- sure things still build. Fixed the libunicode foo.
-
-2000-08-22 Lauris Kaplinski <lauris@helixcode.com>
-
- * widgets/e-text/e-text.c (_get_position_from_xy): Don't crash on illegal string
-
-2000-08-22 Lauris Kaplinski <lauris@helixcode.com>
-
- * widgets/e-text/e-text.c (e_text_event): Use e_utf8_from_gtk_event_key
- to translate GDK_KEY_PRESS to insertable UTF-8 string
-
-2000-08-22 Christopher James Lahey <clahey@helixcode.com>
-
- * announcement-0.4.1.txt: Updated dependency list.
-
-2000-08-22 Lauris Kaplinski <lauris@helixcode.com>
-
- * widgets/e-text/e-text.c: Use byte based UTF-8 syntax
-
-2000-08-22 Christopher James Lahey <clahey@helixcode.com>
-
- * announcement-0.4.1.txt: Announcement message
-
-2000-08-19 Mathieu Lacage <mathieu@gnu.org>
-
- Fixes compile for non-standard prefixes. Mainly in idl
- compilation where -I`gnome-config --datadir`/idl is replaced
- by `gnome-config --cflags idl` (ugly but it works at least)
- and add some random _CFLAGS here and there and _LIBS for linking.
- * addressbook/gui/component/select-names/Makefile.am
- * composer/Makefile.am
- * e-util/Makefile.am
- * filter/Makefile.am
- * mail/Makefile.am
- * shell/Makefile.am
- * widgets/e-text/Makefile.am
-
-
-2000-08-21 Christopher James Lahey <clahey@helixcode.com>
-
- * widgets/e-paned/e-hpaned.c, widgets/e-paned/e-paned.c,
- widgets/e-paned/e-paned.h, widgets/e-paned/e-vpaned.c: Added code
- to make handle position persist across resizes.
-
-2000-08-20 Christopher James Lahey <clahey@helixcode.com>
-
- * widgets/e-text/e-text.c: Fixed a warning.
-
-2000-08-20 arik devens <arik@helixcode.com>
-
- * widgets/e-text/Makefile.am (INCLUDES): added UNICODE_CFLAGS
- support so that compiling in an alternate prefix works.
-
-2000-08-19 Lauris Kaplinski <lauris@helixcode.com>
-
- * widgets/e-text/e-text.h: Commented out Suckfont, added EFont
- * widgets/e-text/e-text.c: Ported to UTF-8
-
-2000-08-18 Peter Williams <peterw@helixcode.com>
-
- * configure.in (gnome-vfs): Check for new enough gnome-vfs
- (needs gnome_vfs_mime_get_default_action_without_fallback)
-
-2000-08-14 Federico Mena Quintero <federico@helixcode.com>
-
- * configure.in (AC_OUTPUT): Generate
- doc/devel/calendar/cal-util/Makefile.
-
-2000-08-14 Peter Williams <peterw@helixcode.com>
-
- * configure.in: Check for db1/db.h too, which is what
- RH 7.0 uses for the old db headers. Patch from Kenny Graunke
- <kwg@teleport.com>
-
-2000-08-13 Chris Toshok <toshok@helixcode.com>
-
- * configure.in: offer --enable-pilot-conduits to add pilot
- conduits if the user wants them.
-
-2000-08-13 Dan Winship <danw@helixcode.com>
-
- * configure.in: Fix the name of the binary to look for for PGP5
-
-2000-08-12 Michael Meeks <michael@helixcode.com>
-
- * configure.in: Check for Bonobo 0.17
-
-2000-08-12 Christopher James Lahey <clahey@helixcode.com>
-
- * configure.in: Added addressbook/gui/search/Makefile.
-
-2000-08-12 Dan Winship <danw@helixcode.com>
-
- * configure.in, README: Depend on gnome-vfs 0.3
-
-2000-08-10 Christopher James Lahey <clahey@helixcode.com>
-
- * widgets/e-text/.cvsignore, widgets/e-text/Makefile.am,
- widgets/e-text/e-entry-test.c: Added a test for the EEntry widget.
-
-2000-08-09 Dan Winship <danw@helixcode.com>
-
- * data/evolution.keys: New file containing MIME keys for
- Evolution. Currently just the addressbook minicard display.
-
- * data/Makefile.am (mime_DATA): add evolution.keys
-
-2000-08-09 Peter Williams <peterw@helixcode.com>
-
- * configure.in (EVOLUTION_DIR): Remove the warning about camel-async.
-
-2000-08-08 Peter Williams <peterw@helixcode.com>
-
- * Makefile.am (SUBDIRS): Reenable the calendar. Oops.
-
-2000-08-05 Dan Winship <danw@helixcode.com>
-
- * tools/verify-evolution-install.sh: Look for oafinfo files in
- oaf's prefix, not gnome-libs's. Allow binaries to be installed
- anywhere in $PATH.
-
- * configure.in, README: Update the README and the text of the
- Bonobo configure check to match reality. Remove the 0.15 vs
- 0.15-and-a-half check since we require post-0.16 now.
-
-2000-08-03 JP Rosevear <jpr@helixcode.com>
-
- * configure.in: Remove gconf check
-
-2000-08-03 Alastair McKinstry <mckinstry@computer.org>
-
- * configure.in (ALL_LINGUAS): Add Irish translation
-
-2000-08-02 Michael Meeks <michael@helixcode.com>
-
- * configure.in: update for BonoboX
-
-2000-08-02 Dan Winship <danw@helixcode.com>
-
- * configure.in (AC_OUTPUT): Add camel/providers/nntp
-
-2000-08-02 Christopher James Lahey <clahey@helixcode.com>
-
- * widgets/e-text/e-text.c: Made clicking choose the right
- character even if show_borders is on.
-
-2000-08-01 Dan Winship <danw@helixcode.com>
-
- * configure.in, acconfig.h: Add checks for GPG, PGP 5 and PGP 2.
- Only record the first one found.
-
-2000-08-01 Damon Chaplin <damon@helixcode.com>
-
- * configure.in (AC_OUTPUT): removed calendar/doc/*
-
-2000-08-01 Not Zed <NotZed@HelixCode.com>
-
- * configure.in: Added mh provider.
-
-2000-07-27 Dan Winship <danw@helixcode.com>
-
- * configure.in: Check for gconf_client_get_default (gconf 0.5 vs
- newer)
-
-2000-07-26 Ettore Perazzoli <ettore@helixcode.com>
-
- * configure.in: Bump version number to 0.3.
-
-2000-07-26 Peter Williams <peterw@helixcode.com>
-
- * widgets/e-table/e-table-scrolled.c (right_click_proxy): Default
- the return value to 0.
-
-2000-07-25 Dan Winship <danw@helixcode.com>
-
- * configure.in: some unrelated changes: check for mkdtemp,
- gnome_vfs_mime_get_default_action_without_fallback, and a
- setuid/setgid movemail binary.
-
- * acconfig.h: add MOVEMAIL_PATH
-
-2000-07-25 Christopher James Lahey <clahey@helixcode.com>
-
- * configure.in: Added addressbook/conduit/Makefile.
-
-2000-07-21 Christopher James Lahey <clahey@helixcode.com>
-
- * widgets/e-text/e-text.c: Made focus in not change your selection
- position.
-
-2000-07-21 Szabolcs BAN <shooby@gnome.hu>
-
- * calendar/gui/event-editor.c: Typo fix
-
-2000-07-20 Peter Williams <peterw@helixcode.com>
-
- * configure.in (THREADS_CFLAGS): Make threads mandatory
- again.
-
-2000-07-19 Fatih Demir <kabalak@gmx.net>
-
- * evolution.desktop & data/evolution.desktop: Added
- the Turkish desktop entries.
-
-2000-07-17 Federico Mena Quintero <federico@helixcode.com>
-
- * configure.in (EVOLUTION_DIR): Typo fix.
-
- * configure.in (AC_OUTPUT): Added the doc/devel Makefiles.
- (EVOLUTION_DIR): Substitute EVOLUTION_DIR for the top_srcdir.
- Added checks for gtk-doc.
-
-2000-07-13 Peter Williams <peterw@curious-george.helixcode.com>
-
- * configure.in (end): Bigass warnings for camel-async branch
- (remove them later).
-
-2000-07-12 Federico Mena Quintero <federico@helixcode.com>
-
- * configure.in: Make gnome-print-0.20 mandatory. We will bail out
- with CVS HEAD versions to avoid breakage.
-
-2000-07-10 Ettore Perazzoli <ettore@helixcode.com>
-
- * Version 0.2.
-
- * configure.in: Reverse the GtkHTML check.
-
-2000-07-10 Jeffrey Stedfast <fejj@helixcode.com>
-
- * configure.in: Updated to check for required GtkHTML and
- gnome-print
-
-2000-07-10 Ettore Perazzoli <ettore@helixcode.com>
-
- * configure.in: Remove the conduits stuff for now. They depend on
- CVS gnome-pilot, and this is not good for the release.
-
-2000-07-10 Dan Winship <danw@helixcode.com>
-
- * README: updates
-
-2000-07-10 Seth Alves <alves@hungry.com>
-
- * configure.in: added makefiles for calendar conduits
-
-2000-07-10 Dan Winship <danw@helixcode.com>
-
- * configure.in: Add a check for Bonobo 0.15 vs Bonobo post-0.15
-
-2000-07-09 Christopher James Lahey <clahey@helixcode.com>
-
- * widgets/e-text/e-text.c: Don't draw quite as large a "flat_box".
- If draw_borders is TRUE, cause the cursor to change even if not
- editing.
-
-2000-07-09 Christopher James Lahey <clahey@helixcode.com>
-
- * widgets/e-text/e-entry.c: Removed some border padding and set
- the "draw_borders" argument of the contained GtkText.
-
- * widgets/e-text/e-text.c, widget/e-text/e-text.h: Added a
- "draw_borders" argument which, if set, makes the EText look more
- like a GtkEntry.
-
-2000-07-09 Tuomas Kuosmanen <tigert@gimp.org>
-
- * art/evolution-contacts.png: updated so it has better contrast
- against the background.
-
- * art/evolution-contacts-small.png: Fits the style of the new contacts
- icon, this is a sigle card.
-
-2000-07-09 Christopher James Lahey <clahey@helixcode.com>
-
- * widgets/e-text/e-text-model.c (e_text_model_real_get_text):
- Return "" instead of NULL.
-
-2000-07-07 Christopher James Lahey <clahey@helixcode.com>
-
- * art/Makefile.am: Fixed EXTRA_DIST for make distcheck.
-
-2000-07-07 Christopher James Lahey <clahey@helixcode.com>
-
- * widgets/e-text/e-entry.c: Set "anchor" and "fill_clip_rectangle"
- arguments.
-
- * widgets/e-text/e-text.c, widgets/e-text/e-text.h: Added
- "fill_clip_rectangle" argument which describes whether to accept
- clicks throughout the clipping rectangle.
-
-2000-07-07 Christopher James Lahey <clahey@helixcode.com>
-
- * widgets/e-text/e-entry.c: Fixed some typos.
-
-2000-07-07 Tuomas Kuosmanen <tigert@gimp.org>
-
- * art/evolution-contacts.png: Changed icon (hi ettore)
- The old handshake one was a little too firm handshake..
- this is a rolodex icon..
-
-2000-07-07 Dan Winship <danw@helixcode.com>
-
- * configure.in: make pthreads not required again, since they
- aren't, and remove widgets/e-toolbar/Makefile from AC_OUTPUT since
- that dir doesn't exist any more.
-
-2000-07-06 Chris Toshok <toshok@helixcode.com>
-
- * configure.in (AC_OUTPUT): remove the default_user Directories
- dir.
-
-2000-07-06 Christopher James Lahey <clahey@helixcode.com>
-
- * Makefile.am, libical/configure.in: Fixed some make distcheck
- errors.
-
-2000-07-05 Ettore Perazzoli <ettore@helixcode.com>
-
- * configure.in (GNOME_VFS_CFLAGS): Define.
- (GNOME_VFS_LIBS): Define.
-
-2000-07-03 Ettore Perazzoli <ettore@helixcode.com>
-
- * configure.in: Add
- `addressbook/gui/component/select-names/Makefile' to the
- `AC_OUTPUT()' list.
-
-2000-07-03 Christopher James Lahey <clahey@helixcode.com>
-
- * widgets/e-text/Makefile.am: Added e-entry.c and e-entry.h.
-
- * widgets/e-text/e-entry.c, widgets/e-text/e-entry.h: New files to
- be a widget containing a text item.
-
- * widgets/e-text/e-text.c: Fixed some spacing.
-
-2000-06-29 Ettore Perazzoli <ettore@helixcode.com>
-
- * notes/component-factory.c (owner_set_cb): Get an
- EvolutionShellClient instead of an Evolution_Shell to match the
- changes in libeshell.
-
-2000-06-29 Peter Williams <peterw@helixcode.com>
-
- * configure.in: Re-enable GNOME_PILOT_CHECK.
- Change AC_MSG_CHECKING([For...]) to [for...]. It's the little
- things that matter.
-
-2000-06-28 Ettore Perazzoli <ettore@helixcode.com>
-
- * configure.in: `AM_PATH_GCONF'.
-
-2000-06-27 Peter Williams <peterw@curious-george.helixcode.com>
-
- * configure.in (ctime_r): Check for whether ctime_r takes
- two (Linux) or three (Solaris) arguments.
- (AC_OUTPUT): Don't create notes/Makefile twice.
-
- * acconfig.h: Add CTIME_R_THREE_ARGS to the list.
-
-2000-06-26 Christopher James Lahey <clahey@helixcode.com>
-
- * widgets/e-text/e-text.c: Calculate height including if
- clip_height is set to -1.
-
-2000-06-26 Peter Williams <peterw@curious-george.helixcode.com>
-
- * configure.in (THREADS_CFLAGS): Add option --enable-broken-threads
- to turn on the threading stuff in evolution-mail. Defaults to no.
-
- * acconfig.h: Add USE_BROKEN_THREADS to the list.
-
-2000-06-25 Ettore Perazzoli <ettore@helixcode.com>
-
- * configure.in: Use `glib-config' instead of `$GLIB_CONFIG' as the
- latter is not actually defined anywhere.
-
-2000-06-25 Peter Williams <peterw@helixcode.com>
-
- * configure.in (pthread stuff): Make threads required due
- to threaded evolution-mail. Subst in the THREADS_LIBS et
- al.
-
- * tests/Makefile.am: Remove USE_THREADS conditional as we
- always use threads now.
-
-2000-06-21 Christopher James Lahey <clahey@helixcode.com>
-
- * widgets/e-text/e-text.c: Fixed some vertical scroll bugs.
-
-2000-06-21 Christopher James Lahey <clahey@helixcode.com>
-
- * widgets/e-text/e-text.c: Fix a bug with intial vertical scroll.
-
-2000-06-21 Christopher James Lahey <clahey@helixcode.com>
-
- * notes/e-note.c, widgets/meeting-time-sel/e-meeting-time-sel.c,
- widgets/shortcut-bar/e-icon-bar.c: Removed the usage of "x" and
- "y" arguments to EText.
-
- * widgets/e-text/e-text.c, widgets/e-text/e-text.h: Removed the
- "x" and "y" arguments to EText. Added vertical scrolling.
-
-2000-06-20 Damon Chaplin <damon@helixcode.com>
-
- * widgets/meeting-time-sel/e-meeting-time-sel-item.c:
- * widgets/meeting-time-sel/e-meeting-time-sel.c: fixed a few warnings.
-
-2000-06-17 Christopher James Lahey <clahey@helixcode.com>
-
- * widgets/e-text/e-text.c: Made EText use the font from the
- canvas's style if one isn't set.
-
-2000-06-17 Damon Chaplin <damon@helixcode.com>
-
- * widgets/meeting-time-sel/*: updated to use EText items rather than
- GtkEntry widgets and added support for adding new rows.
-
-2000-06-15 Dan Winship <danw@helixcode.com>
-
- * README: bye bye goad
-
-2000-06-14 Damon Chaplin <damon@helixcode.com>
-
- * README (http): added command to co ORBit.
-
-2000-06-13 Jeffrey Stedfast <fejj@helixcode.com>
-
- * configure.in: Added IMAP into the build
-
-2000-06-13 Ettore Perazzoli <ettore@helixcode.com>
-
- * notes/Makefile.am (SHELL_OBJS): Removed.
- (evolution_notes_LDADD): Link with
- `$(top_builddir)/shell/libeshell.a'.
-
-2000-06-12 Ettore Perazzoli <ettore@helixcode.com>
-
- * widgets/Makefile.am (SUBDIRS): build `misc' before everything
- else.
-
- * Makefile.am: Install `evolution.png' and `evolution.desktop'
- where appropriate.
-
- * evolution.png: New. For now, it's just a copy of
- `art/evolution-inbox.png'.
-
- * evolution.desktop: New.
-
-2000-06-10 Zbigniew Chyla <chyla@buy.pl>
-
- * configure.in: Added pl (Polish) to ALL_LINGUAS
-
-2000-06-09 Ettore Perazzoli <ettore@helixcode.com>
-
- * configure.in: Added new directory `shell/glade'.
-
-2000-06-07 Christopher James Lahey <clahey@helixcode.com>
-
- * widgets/e-paned/e-hpaned.c, widgets/e-paned/e-paned.c,
- widgets/e-paned/e-paned.h, widgets/e-paned/e-vpaned.c: Added a
- "quantum" argument for making the panes move in jumps.
-
-2000-06-07 Anders Carlsson <andersca@gnu.org>
-
- * configure.in: Create notes/Makefile
-
- * notes/*: Add preliminary yellow sticky notes.
-
-2000-06-05 Mathieu Lacage <mathieu@gnome.org>
-
- * addressbook/contact-editor/Makefile.am: make it
- compile: add proper bonobo linking params.
- * addressbook/gui/minicard/Makefile.am: idem.
- * wombat/Makefile.am: add BONOBO_VFS_GNOME_CFLAGS.
- cleanup some useless includes and libs.
-
-2000-06-02 Ettore Perazzoli <ettore@helixcode.com>
-
- * configure.in (ALL_LINGUAS): Add `it' and `de'.
-
-2000-06-02 Christopher James Lahey <clahey@helixcode.com>
-
- * configure.in: Released Evolution 0.1.
-
-2000-06-02 Christopher James Lahey <clahey@helixcode.com>
-
- * tests/test-movemail.c: Reverted removal of e_setup_base_dir.
-
-2000-06-02 Jesus Bravo Alvarez <jba@pobox.com>
-
- * configure.in: Added pt (Portuguese) to ALL_LINGUAS
-
-2000-06-02 Dan Winship <danw@helixcode.com>
-
- * README: Update dependencies. Rewrite the GOAD vs OAF thing some
- more to reflect OAF's new ascendency. Make the fact that you don't
- need pilot stuff clearer. Add some new directories to the
- directory layout section.
-
-2000-06-02 Christopher James Lahey <clahey@helixcode.com>
-
- * widgets/misc/e-clipped-label.c: Free the finish data.
-
-2000-06-01 Christopher James Lahey <clahey@helixcode.com>
-
- * tests/test-movemail.c (main): Don't call e_setup_base_dir.
-
-2000-06-01 Dan Winship <danw@helixcode.com>
-
- * configure.in (AC_OUTPUT): add doc, doc/C
-
- * Makefile.am (SUBDIRS): add doc
-
-2000-05-31 Federico Mena Quintero <federico@helixcode.com>
-
- * widgets/misc/e-scroll-frame.[ch]: Imported GtkScrollFrame from
- EOG and renamed it to EScrollFrame.
-
- * widgets/misc/Makefile.am (libemiscwidgets_a_SOURCES): Added
- e-scroll-frame.[ch].
-
-2000-05-30 Ettore Perazzoli <ettore@helixcode.com>
-
- * widgets/e-paned/e-vpaned.c (e_vpaned_handle_shown): Show the
- handle even if the requisition for the child is zero.
- * widgets/e-paned/e-hpaned.c (e_hpaned_handle_shown): Likewise.
-
-2000-05-26 Héctor García Alvarez <hector@scouts-es.org>
-
- * configure.in: Added Spanish language
-
-2000-05-25 Christopher James Lahey <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <fejj@helixcode.com>
-
- * configure.in: Readded camel/providers/smtp
-
-2000-05-22 Szabolcs BAN <shooby@gnome.hu>
-
- * configure.in: Added Hungarian language
-
-2000-05-18 Dan Winship <danw@helixcode.com>
-
- * configure.in (AC_OUTPUT): add camel/providers/vee
-
-2000-05-16 Ettore Perazzoli <ettore@helixcode.com>
-
- * art/Makefile.am: Install the mini icons.
-
-2000-05-16 Chris Toshok <toshok@helixcode.com>
-
- * 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 <tigert@gimp.org>
-
- * 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 <federico@helixcode.com>
-
- * configure.in (AC_OUTPUT): Added calendar/gui/dialogs/Makefile.am.
-
-2000-05-10 Matt Loper <matt@helixcode.com>
-
- * README: Added version and availability of required libunicode
- library.
-
-2000-05-10 Dan Winship <danw@helixcode.com>
-
- * configure.in: Update versions needed for gnome-print, bonobo,
- and gtkhtml.
-
-2000-05-10 Christopher James Lahey <clahey@helixcode.com>
-
- * HACKING: We need a HACKING file.
-
-2000-05-10 Christopher James Lahey <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * art/Makefile.am: Added briefcase.png to get installed.
-
-2000-05-09 Christopher James Lahey <clahey@helixcode.com>
-
- * widgets/e-text/e-text.c: Remove the tooltip callback when
- destroyed.
-
-2000-05-09 Matt Loper <matt@helixcode.com>
-
- * calendar/pcs/cal-backend.c (cal_backend_add_cal): Return nothing
- for a 'void' function.
-
-2000-05-08 Christopher James Lahey <clahey@helixcode.com>
-
- * widget/e-text/e-text.c, widgets/e-text/e-text.h: Added an
- activate signal.
-
-2000-05-06 Chris Toshok <toshok@helixcode.com>
-
- * configure.in: Added new Directories section for the default_user.
-
-2000-05-06 Ettore Perazzoli <ettore@helixcode.com>
-
- * configure.in: Updated for the new `default_user' directory
- setup.
-
-2000-05-06 Chris Toshok <toshok@helixcode.com>
-
- * configure.in: check for purify.
-
-2000-05-06 Christopher James Lahey <clahey@helixcode.com>
-
- * 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 <ettore@helixcode.com>
-
- * Added `--enable-purify' flag.
-
-2000-05-05 Chris Toshok <toshok@helixcode.com>
-
- * shell/Makefile.am: add support for building purified evolution.
-
- * shell/.cvsignore: ignore evolution.pure
-
-2000-05-05 Chris Toshok <toshok@helixcode.com>
-
- * 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 <danw@helixcode.com>
-
- * 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 <michael@helixcode.com>
-
- * configure.in (xmlversion): Fix to remove older 'libxml' prefix.
-
-2000-05-02 Ettore Perazzoli <ettore@helixcode.com>
-
- * configure.in: Do not output `doc/Makefile' because there is
- nothing to generate it from.
-
-2000-05-02 Dan Winship <danw@helixcode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * 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 <matt@helixcode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * tests/test11.c (main): *sigh* moved back to sync api.
-
-2000-05-01 NotZed <NotZed@HelixCode.com>
-
- * tests/test11.c (search_cb): Try deleting messages ...
- (main): Fix for provider api changes.
-
-2000-05-01 Anders Carlsson <andersca@gnu.org>
-
- * configure.in: Check if bonobo uses oaf, so you don't
- need to specify --enable-oaf.
-
-2000-04-27 Ettore Perazzoli <ettore@helixcode.com>
-
- * 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 <mjs@eazel.com>.
-
-2000-04-27 NotZed <NotZed@HelixCode.com>
-
- * 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 <clahey@helixcode.com>
-
- * configure.in: Added addressbook/ename/Makefile.
-
-2000-04-27 Matt Loper <matt@helixcode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * 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 <matt@helixcode.com>
-
- * 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 <danw@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <ih@csd.abdn.ac.uk>
-
- * 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 <kabalak@gmx.net>
-
- * configure.in : Added tr to ALL_LINGUAS .
-
-2000-04-24 NotZed <NotZed@HelixCode.com>
-
- * tests/test13.c (main): Fixed for method movements.
-
- * tests/test3.c (main): Removed from build, data-wrapper-repository removed.
-
-2000-04-23 NotZed <NotZed@HelixCode.com>
-
- * 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 <matt@helixcode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * tests/test10.c: Removed some unecessary includes. From
- Ali Abdin <aliabdin@aucegypt.edu>
- (create_sample_mime_message): Changed for date api change.
-
- * tests/Makefile.am (noinst_PROGRAMS): Put test10 back.
-
-2000-04-22 NotZed <NotZed@HelixCode.com>
-
- * tests/test1.c (main): Changed for date api change.
-
-2000-04-20 NotZed <NotZed@HelixCode.com>
-
- * 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 <nakai@gnome.gr.jp>
-
- * configure.in: Add Japanese to ALL_LINGUAS
-
-2000-04-19 Dan Winship <danw@helixcode.com>
-
- * README: More detail on exactly what versions of what libraries
- are needed.
-
-2000-04-18 Dan Winship <danw@helixcode.com>
-
- * tests/*: remove camel-log references
-
-2000-04-17 Dan Winship <danw@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <matt@helixcode.com>
-
- * 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 <toshok@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <ettore@helixcode.com>
-
- * 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 <toshok@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <toshok@helixcode.com>
-
- * 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 <toshok@helixcode.com>
-
- * 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 <matt@helixcode.com>
-
- * 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 <tigert@gimp.org>
-
- * 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 <toshok@helixcode.com>
-
- * 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 <miguel@gnu.org>
-
- * configure.in (have_pthread): Properly use AC_ARG_WITH
-
-2000-04-11 Chris Toshok <toshok@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * configure.in: Changed AC_DEFUN to AC_DEFINE.
-
- * acconfig.h: Added HAVE_TIMEZONE and HAVE_TM_GMTOFF.
-
-2000-04-11 Chris Toshok <toshok@helixcode.com>
-
- * configure.in: check for timezone as a variable (as it is in
- linux, but not in freebsd or netbsd.)
-
-2000-04-11 Larry Ewing <lewing@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * widgets/e-text/e-text.c: Moved some logic a bit. Minor changes.
-
-00-04-11 Iain Holmes <ih@csd.abdn.ac.uk>
-
- * 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 <toshok@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <toshok@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <toshok@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <toshok@helixcode.com>
-
- * 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 <miguel@gnu.org>
-
- * configure.in (GNOME_PRINT_CFLAGS): Update to support
- --disable-threads correctly.
-
-2000-04-10 Chris Toshok <toshok@helixcode.com>
-
- * 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 <danw@helixcode.com>
-
- * configure.in: check for mkstemp
-
-2000-04-10 Damon Chaplin <damon@helixcode.com>
-
- * configure.in (AC_OUTPUT): removed libical stuff since it has its
- own configure.in.
-
-2000-04-10 Christopher James Lahey <clahey@helixcode.com>
-
- * 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 <matt@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * addressbook/backend/ebook/e-card.c (e_card_get_vcard): Fixed a
- small typo.
-
-2000-04-08 Dan Winship <danw@helixcode.com>
-
- * art/Makefile.am: pixmap_DATA should have been images_DATA (after
- pixmapdir was renamed to imagesdir)
-
-2000-04-08 Christopher James Lahey <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <danw@helixcode.com>
-
- * configure.in, acconfig.h: add SYSTEM_MAIL_DIR
-
-2000-04-08 Jesus Bravo Alvarez <jba@pobox.com>
-
- * configure.in (ALL_LINGUAS): Added Galician (gl).
-
-2000-04-07 Jeffrey Stedfast <fejj@stampede.org>
- * configure.in: Modified to create camel/providers/smtp/Makefile
-
-2000-04-07 Christopher James Lahey <clahey@helixcode.com>
-
- * 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 <matt@helixcode.com>
-
- * 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 <toshok@laptoph.xtoph.org>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <miguel@gnu.org>
-
- * art/Makefile.am (images_DATA): Renamed from pixmaps to images.
-
-2000-04-05 Matt Loper <matt@helixcode.com>
-
- * README: Added wombat.
-
-2000-04-04 Christopher James Lahey <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * widgets/e-minicard/e-minicard.c: Fixed some referencing and
- lifetime issues.
-
-2000-04-04 Christopher James Lahey <clahey@helixcode.com>
-
- * widgets/e-text/e-text.c: Removed an unnecessary get_bounds call.
-
- (From a patch by Iain Holmes <ih@csd.abdn.ac.uk>)
-
- * 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 <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <rasta@renome.rovno.ua>
-
- * configure.in: Added uk to ALL_LINGUAS.
-
-2000-04-04 Andreas Hyden <a.hyden@cyberpoint.se>
-
- * configure.in: Added no and sv to ALL_LINGUAS.
-
-2000-04-03 Christopher James Lahey <clahey@helixcode.com>
-
- * 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 <matt@helixcode.com>
-
- * tests/.cvsignore: Added test-movemail.
-
- * art/.cvsignore: New file.
-
-2000-03-31 Christopher James Lahey <clahey@helixcode.com>
-
- * addressbook/demo/demo.c, addressbook/demo/addressbook-widget.c:
- Added some missing gtk_object_refs.
-
-2000-03-30 Matt Loper <matt@helixcode.com>
-
- * 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 <toshok@laptoph.xtoph.org>
-
- * addressbook/backend/pas/pas-backend-ldap.h: new-file
- * addressbook/backend/pas/pas-backend-ldap.c: new file
-
-2000-03-30 Dan Winship <danw@helixcode.com>
-
- * configure.in:
- * Makefile.am:
- * art/Makefile.am: install new shortcut bar pixmaps.
-
-2000-03-30 Tuomas Kuosmanen <tigert@gimp.org>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <matt@helixcode.com>
-
- * 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 <matt@helixcode.com>
-
- * 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 <toshok@laptoph.xtoph.org>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <toshok@laptoph.xtoph.org>
-
- * 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 <danw@helixcode.com>
-
- * tests/test-movemail.c: new test program. Can be used to copy POP
- mail into your evolution inbox.
-
-2000-03-27 Chris Toshok <toshok@laptoph.xtoph.org>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * 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 <tigert@gimp.org>
- * 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 <toshok@laptoph.xtoph.org>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <toshok@laptoph.xtoph.org>
-
- * addressbook/backend/ebook/test-client.c: create a card and then
- look it up.
-
-2000-03-26 Chris Toshok <toshok@laptoph.xtoph.org>
-
- * 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 <clahey@helixcode.com>
-
- * addressbook/backend/ebook/e-book.c: Set the card id properly
- when retrieving a card.
-
-2000-03-22 NotZed <NotZed@HelixCode.com>
-
- * e-util/e-sexp.h: Formatting cleanup.
-
-2000-03-07 NotZed <NotZed@HelixCode.com>
-
- * 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 <toshok@laptoph.xtoph.org>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <matt@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * addressbook/backend/ebook/.cvsignore,
- addressbook/backend/pas/.cvsignore,
- addressbook/backend/idl/.cvsignore,
- addressbook/backend/.cvsignore: Updated .cvsignore files.
-
-2000-03-22 Christopher James Lahey <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * widgets/e-text/e-text.c: Changed gnome_canvas_item_grab_focus to
- e_canvas_item_grab_focus.
-
-2000-03-21 Christopher James Lahey <clahey@helixcode.com>
-
- * addressbook/demo/addressbook-widget.c: Make background pixmap
- get properly set to NULL.
-
-2000-03-20 Christopher James Lahey <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <matt@helixcode.com>
-
- * tests/ui-tests/.cvsignore: added filter.
-
- * addressbook/demo/.cvsignore: added test-addressbook.
-
-2000-03-17 Elliot Lee <sopwith@redhat.com>
- * 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 <danw@helixcode.com>
-
- * Makefile.am (SUBDIRS): build shell before mail, since mail
- relies on the shell idl files being compiled.
-
-2000-03-13 Christopher James Lahey <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <matt.loper@splashtech.com>
-
- * 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 <bertrand@helixcode.com>
-
- * 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 <bertrand@helixcode.com>
-
- * 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 <ettore@helixcode.com>
-
- * 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 <federico@helixcode.com>
-
- * 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 <ih@csd.abdn.ac.uk>
-
- * 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 <NotZed@HelixCode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * 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 <clahey@umich.edu>
-
- * widgets/e-text/e-text.c: Compilation error.
-
-2000-02-28 Chris Lahey <clahey@umich.edu>
-
- * 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 <danw@helixcode.com>
-
- * acconfig.h:
- * configure.in: define SENDMAIL_PATH with the path to sendmail.
-
-2000-02-24 Christopher James Lahey <clahey@helixcode.com>
-
- * 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 <matt@helixcode.com>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * tests/ui-tests/message-browser.c (on_link_clicked):
- uggly hack to test part saving and
- b64 streams.
-
-2000-02-21 Dan Winship <danw@helixcode.com>
-
- * tests/test10.c:
- * tests/test11.c: update for camel changes
-
-2000-02-20 Matt Loper <matt@helixcode.com>
-
- * 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 <ih@csd.abdn.ac.uk>
-
- * 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 <matt@helixcode.com>
-
- * .cvsignore: added ABOUT-NLS.
- * ABOUT-NLS: removed.
-
-2000-02-19 Matt Loper <matt@helixcode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * tests/test11.c (main): Use a relative path to the mbox provider
- module.
-
-2000-02-18 Matt Loper <matt@helixcode.com>
-
- * 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 <miguel@nuclecu.unam.mx>
-
- * 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 <matt@helixcode.com>
-
- * 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 <notzed@zedzone.helixcode.com>
-
- * configure.in (EXTRA_GNOME_CFLAGS): Add libunicode to CFLAGS/LIBS.
-
-2000-02-13 NotZed <notzed@zedzone.helixcode.com>
-
- * 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 <matt@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * widgets/e-text/e-text.h: Removed some arguments from the .h that
- will never be implemented.
-
-
-2000-02-10 bertrand <Bertrand.Guiheneuf@aful.org>
-
- * 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 <notzed@zedzone.helixcode.com>
-
- * camel/camel-simple-data-wrapper-stream.h: The superclass is
- actually a seekable stream, not just a stream.
-
-2000-02-10 bertrand <Bertrand.Guiheneuf@aful.org>
-
- * 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 <notzed@zedzone.helixcode.com>
-
- * camel/hash-table-utils.c (g_strcase_hash): Removed a bizarre
- comparison construct for converting case.
-
-2000-02-09 NotZed <notzed@zedzone.helixcode.com>
-
- * 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 <matt@helixcode.com>
-
- * tests/ui-tests/test-multipart-alt.msg: New test file; run
- message-browser on it, and it will crash.
-
-2000-02-09 bertrand <Bertrand.Guiheneuf@aful.org>
-
- * 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 <matt@helixcode.com>
-
- * tests/ui-tests/message-browser.c (print_usage_and_quit): Minor
- cleanup.
-
-2000-02-09 NotZed <notzed@zedzone.helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <matt@helixcode.com>
-
- * 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 <br> 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 <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * addressbook/printing/e-contact-print.c: Removed an unneccessary
- include of libhnj. All uses of libhnj are commented out.
-
-2000-02-07 Matt Loper <matt@helixcode.com>
-
- * 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
- '&gt;', etc.
-
-2000-02-03 bertrand <Bertrand.Guiheneuf@aful.org>
-
- * 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 <matt@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <matt@helixcode.com>
-
- * 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 <mathieu@advogato.org>
-
- * .cvsignore s: cvs shutup.
-
-2000-01-25 Christopher James Lahey <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <bertrand@helixcode.com>
-
- * 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 <federico@helixcode.com>
-
- * 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 <bertrand@helixcode.com>
-
- * 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 <matt@helixcode.com>
-
- * 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 <bertrand@helixcode.com>
-
- * 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 <bertrand@helixcode.com>
-
- * 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 <bertrand@helixcode.com>
-
- * 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 <federico@helixcode.com>
-
- * 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 <matt@helixcode.com>
-
- * 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 <federico@helixcode.com>
-
- * configure.in (AC_OUTPUT): Added libversit/Makefile and
- calendar/Makefile.
-
- * Makefile.am (SUBDIRS): Added libversit and calendar.
-
-2000-01-20 bertrand <bertrand@helixcode.com>
-
- * camel/providers/mbox/camel-mbox-parser.c (camel_mbox_parse_file):
- compute and return the file size.
-
-
-2000-01-20 Matt Loper <matt@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <bertrand@helixcode.com>
-
- * 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 <bertrand@helixcode.com>
-
- * 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 <bertrand@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <bertrand@helixcode.com>
-
- * tests/test9.c (main): test for the mbox utils.
-
-2000-01-17 Federico Mena Quintero <federico@helixcode.com>
-
- * configure.in: Add the gnomecanvaspixbuf argument to gnome-config
- invocations.
-
-2000-01-17 bertrand <bertrand@helixcode.com>
-
- * 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 <bertrand@helixcode.com>
-
- * 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 <bertrand@helixcode.com>
-
- * 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 <clahey@galapagos.helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <bertrand@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <miguel@gnu.org>
-
- * configure.in: Add Bonobo detection, Bonobo flags for compilation
- for the components and the shell.
-
-2000-01-06 Elliot Lee <sopwith@redhat.com>
- * composer/Makefile.am, widgets/e-table/Makefile.am: Work with
- builddir != srcdir
-
-2000-01-05 Miguel de Icaza <miguel@gnu.org>
-
- * 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 <miguel@gnu.org>
-
- * configure.in (PACKAGE): Raise warning level.
-
-2000-01-04 bertrand <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <damon@karuna.freeserve.co.uk>
-
- * configure.in (AC_OUTPUT): added widgets/meeting-time-sel/Makefile
-
-1999-12-19 bertrand <Bertrand.Guiheneuf@aful.org>
-
- * camel/camel-folder-utils.c: include camel-log.h
- to avoid unresolved symbols.
-
-1999-12-18 bertrand <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <nat@helixcode.com>
-
- * 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 <ettore@gnu.org>
-
- * 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 <ettore@gnu.org>
-
- * 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 <ettore@gnu.org>
-
- * 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 <ettore@gnu.org>
-
- * 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 <ettore@gnu.org>
-
- * 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 <config.h>.
- * camel/data-wrapper-repository.h: Likewise.
-
-1999-11-05 Ettore Perazzoli <ettore@gnu.org>
-
- * tests/Makefile.am (INCLUDES): Add `-I$(top_srcdir)'.
-
-1999-10-13 bertrand <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * camel/providers/maildir: Added (experimental) maildir
- provider written by Jukka Zitting <hukka@greywolves.org>
-
- * camel/providers/Makefile.am (SUBDIRS): build maildir
- provider.
-
- * camel/camel-provider.c (camel_provider_get_for_protocol):
- bug fix. patch from Jukka Zitting <hukka@greywolves.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * MAINTAINERS: updated my e-mail address.
-
-1999-08-28 bertrand <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <rwb197@ecs.soton.ac.uk>
-
- * camel/gmime-rfc2047.c: more work on encoder.
-
-1999-08-17 bertrand <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * devel-docs/misc/ref_and_id_proposition.txt:
- new file. Document message UID and vfolder
- implementation.
-
-1999-08-08 Robert Brady <rwb197@ecs.soton.ac.uk>
-
- * camel/gmime-rfc2047.c: more advanced RFC2047 encoder started.
-
-1999-08-08 bertrand <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <rwb197@ecs.soton.ac.uk>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <rwb197@ecs.soton.ac.uk>
-
- * tests/test5.c: test for RFC2047 decoder.
-
- * camel/gmime-rfc2047.c: Improved RFC2047 decoder.
-
-1999-08-06 bertrand <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <rwb197@ecs.soton.ac.uk>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * camel/gmime-utils.c (gmime_read_line_from_stream):
- Don't return crlf at end of line.
-
-1999-07-30 bertrand <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * camel/camel-multipart.c (_write_to_stream):
- implemented output of multipart.
-
- * tests/test1.c (main): testing content objects operations.
-
-1999-07-25 bertrand <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * camel/gmime-content-field.c (gmime_content_field_get_parameter):
- New function. Returns the value associated to a
- mime parameter.
-
-
-1999-07-22 bertrand <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * camel/gmime-content-field.c (gmime_content_field_construct_from_string):
- GString -> gchar
- use const to indicate copied parameter.
-
-1999-07-15 bertrand <Bertrand.Guiheneuf@aful.org>
-
- * camel/camel-simple-data-wrapper.c:
- * camel/camel-simple-data-wrapper.h:
- Gstring -> gchar
-
-1999-07-15 bertrand <Bertrand.Guiheneuf@aful.org>
-
- * 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 <miguel@gnu.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * camel/camel-data-wrapper.h:
- s/content_type/mime_type/
-
-1999-06-24 bertrand <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * camel/camel-mime-message.c (_write_one_recipient_to_stream):
- includes gmime-utils header.
- patch from Ulrich Drepper <drepper at cygnus.com>
- set separator string in write_header_with_glist_to_stream()
-
- * camel/camel-log.c (camel_log):
- patch from Ulrich Drepper <drepper at cygnus.com>
- Do not use stderr in initialization of logfile descriptor.
-
- * camel/camel-stream-fs.c (camel_stream_fs_new_with_name):
- patch from Ulrich Drepper <drepper at cygnus.com>
- initialize mode field in open().
-
-1999-06-22 bertrand <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * devel-docs/query/virtual-folder-in-depth.sgml:
- sgmlized Giao's doc about virtual folders.
-
-1999-05-31 bertrand <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * camel/camel-mime-part.c
- (_parse_header_pair):
- (_init_header_name_table):
- More header parsing code.
-
-
-1999-05-27 bertrand <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * camel/camel-mime-message.c (_write_to_file):
- recipient list printing
-
- * tests/test1.c (main): more tests.
-
-1999-05-19 bertrand <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * camel/camel-mime-message.c (*_flag):
- flags handling methods
-
-1999-05-14 bertrand <Bertrand.Guiheneuf@aful.org>
-
- * camel/camel-mime-message.c (camel_mime_message_class_init):
- added recipient handling class funcs.
-
-1999-05-13 bertrand <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * camel/camel-folder.c (camel_folder_create):
- new public function.
-
-1999-04-25 bertrand <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * camel/url-util.[ch]:
- Utility functions to parse URLs.
- Stolen shamelessly from gzilla (www.gzilla.com)
- written by Raph Levien <raph@acm.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * camel/providers/MH/camel-mh-store.c:
- more test implementation.
-
- * camel/camel-store.c (camel_store_get_type): typo fix
-
-
-1999-04-21 bertrand <Bertrand.Guiheneuf@aful.org>
-
- * camel/providers/MH/camel-mh-folder.c (camel_mh_folder_get_type):
- start test provider.
-
-1999-04-20 bertrand <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * camel/README: added some (few) explanations.
-
-1999-04-18 bertrand <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * autogen.sh (PKG_NAME): groomf -> gnome-mailer
-
diff --git a/HACKING b/HACKING
deleted file mode 100644
index e69de29bb2..0000000000
--- a/HACKING
+++ /dev/null
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 602e3bf73b..0000000000
--- a/MAINTAINERS
+++ /dev/null
@@ -1,5 +0,0 @@
-Email: ettore@ximian.com
-Email: danw@ximian.com
-Email: chris@ximian.com
-Email: federico@ximian.com
-Email: iain@ximian.com
diff --git a/Makefile.am b/Makefile.am
deleted file mode 100644
index cc6c804035..0000000000
--- a/Makefile.am
+++ /dev/null
@@ -1,39 +0,0 @@
-changelogs = \
- ChangeLog
-
-EXTRA_DIST = \
- AUTHORS \
- $(changelogs) \
- COPYING-DOCS \
- README \
- HACKING \
- MAINTAINERS \
- NEWS \
- xml-i18n-merge.in \
- xml-i18n-update.in \
- xml-i18n-extract.in
-
-SUBDIRS = \
- intl \
- macros \
- data \
- e-util \
- widgets \
- shell \
- executive-summary \
- libibex \
- camel \
- filter \
- composer \
- mail \
- libical \
- libversit \
- addressbook \
- calendar \
- wombat \
- art \
- ui \
- default_user \
- views \
- tools \
- po
diff --git a/NEWS b/NEWS
deleted file mode 100644
index 820c398eb4..0000000000
--- a/NEWS
+++ /dev/null
@@ -1,992 +0,0 @@
-Version 0.9 "Platypus", 2001-03-12
-----------------------------------
-
-Shell:
-
- - Importing framework. (Iain)
-
- - Made the splash screen a regular window. (Miguel)
-
- - Added a menu item to hide the shortcut bar to the shortuct bar
- right-click menu. (Jason)
-
- - Update the shortcut labels to contain the number of unread
- messages as well. (Jason)
-
- - Pre-select a newly created folder in the folder selection dialog.
- (Ettore)
-
-Mail:
-
- - GPG/PGP support is now mostly working and sort of configurable.
- Except that the pretty pictures are missing. (Jeff)
-
- - Exciting new configuration druid (Anna, Jeff) and configuration
- editor-of-the-month (Jeff). You can now have multiple identities
- that use different transports. (Jeff)
-
- - The folder-tree unread message counts now work much better. But
- vfolders only display their unread message counts *after you've
- looked at the folder for the first time*. (Dan)
-
- - New mail send/receive stuff with status dialog. (NotZed)
-
- - "Stop" button and support for cancelling operations. (NotZed)
-
- - Various fixes involving IMAP folders and subscriptions. (Dan)
-
- - Fake messages to root threads in the message list are now gone. (NotZed)
-
- - NNTP support is no longer configured by default, as this code is
- not expected to be completed by 1.0.
-
- - Interface for hiding messages matching certain criteria. (NotZed)
-
- - Quick search bar now includes "Sender contains" option (Tuomas? Eek!)
-
- - The mailer now properly launches "gnome_segv" when it crashes. I
- mean, if it were to crash. (Dan)
-
- - IMAP attachments are now not loaded unless you look at them. (Dan)
-
- - The X-Mailer header can now include a compile-time-specified
- string (for specifying package version, etc). (Dan)
-
- - The Date header in the message list now formats dates differently
- depending on how long ago they are. (Chris)
-
- - The composer doesn't ask if you want to save before closing if you
- haven't changed anything. Also, it has more useful window titles
- (Jason Leach) And you can now turn off the "are you sure you
- didn't mean to enter a subject?" dialog box. (Jeff)
-
- - The "Menu" key on a Windows keyboard (the one with the picture of
- a pop-up menu) now pops up the message list right-click menu.
- (Dan)
-
- - Lots of internal stuff that doesn't much affect the user-visible
- functionality, particularly involving multithreading, message
- threading, filters/searching, and regression testing. (NotZed)
-
- - Importers for Outlook Express 4 and mbox (used by most mailers like
- Netscape, Pine, Elm, Eudora) (Iain & Jeff)
-
-Addressbook:
-
- - Fixed crashing bug on PPC. (Clahey)
-
- - Updated to work with both OpenLDAP 1 and OpenLDAP 2. (Toshok)
-
- - Added configuration dialog for LDAP. (Toshok)
-
- - Plenty of bug fixes. (Clahey, Toshok, Meeks, JP, Larry, Jason,
- Federico, Dan, Zucchi, Gediminas Paulauskas, Ettore)
-
- - Moved category dialog to gal. (JP)
-
- - Worked on LDAP authentication. (Toshok)
-
- - Worked on status messages. (Toshok)
-
- - Worked on GalView stuff. (Clahey)
-
- - Improved the select names dialog GUI. (Clahey)
-
-Calendar:
-
- - New "go to date" dialog. (JP)
-
- - Categories support for appointments. (JP)
-
- - New alarms page in event editor. (Anna, JP)
-
- - Weekday picker now follows the week start setting. (Federico)
-
- - Date-editing widgets are more consistent with each other.
- (Federico)
-
- - Colorization fixes to the views. (Damon)
-
- - Optimizations to the views. (Damon)
-
- - New, simpler loading interface for calendars in the Wombat. (Federico)
-
- - Removal of lots of old Gnomecal code. (Federico, JP)
-
- - Alarm instance generation support for the Wombat. (Federico)
-
- - Alarm trigger queueing for the GUI. (Federico)
-
- - More robust launching and registration of the components. (Federico)
-
- - More i18n friendliness. (JP, Federico)
-
- - Start of the alarm notification daemon. (Federico)
-
- - Cosmetic and focus fixes all over the place. (Federico, JP)
-
-Tasks:
-
- - New, stand-alone tasks component. (Damon)
-
- - Categories support. (JP, Damon)
-
- - Your old tasks are migrated automatically to the new tasks folder.
- (Federico)
-
- - You get asked for confirmation when trying to delete a task entry.
- (Federico)
-
-Conduits:
-
- - Many bug fixes and cleanups. (JP)
-
-Executive Summary:
-
- - Bugfixes and memory leaks removed. (Iain)
-
- - Calendar summary component. (Iain)
-
- - RDF Summary saves it's state. (Iain)
-
- - Mail summary shows vFolder summaries as well. (Iain)
-
- - User changable number of columns. (Iain)
-
-
-Version 0.8 "Archaeopteryx", 2000-12-14
----------------------------------------
-
-Shell:
-
- - Added a `--no-splash' option. (Ettore)
-
- - Plugged a number of memory leaks. (Federico)
-
- - Added interfaces to display an arbitrary string associated with a
- folder, and highlight it on demand. (Ettore, Dan)
-
- - Changed the Storage IDLs so that you can associate a physical URI
- to the toplevel node as well. (Ettore)
-
- - If a shell is already running, `evolution' will just make it
- create a new view instead of creating a new shell. (Ettore)
-
-Mail:
-
- Display:
-
- - The folder tree now shows unread message counts for mail
- folders. For local folders, this updates in real time. For IMAP, it
- only updates when you "Get Mail". To be continued. (Dan)
-
- - New "important" column in the message list. User-settable. (Dan)
-
- - The message list "Size" column now displays more prettily and
- sorts correctly. (Jeff)
-
- - New command to view the raw source to a message. (Jeff)
-
- - More reliable MIME icon code in the mailer and the composer.
- (Dan, Iain)
-
- - Lots of internationalization fixes. (Dan, Kjartan)
-
- Composer / Outgoing mail
-
- - Various fixes to use the best charset and MIME encoding for
- outgoing messages. (Michael, Jeff)
-
- - You can now forward messages inline, instead of attaching them.
- Forwarding multiple messages now results in a multipart/digest
- attachment. (Jeff)
-
- - Replies are now preceded by "On DATE, PERSON wrote:" (Jeff)
-
- - Better reply editing, automagically sets indentation and paragraph
- style to Normal. (Radek)
-
- - HTML signature support. (Radek)
-
- - Inline image support. (Radek)
-
- - Fixes for addresses with commas. (Jeff, Michael)
-
- - Fix to not allow attaching directories, devices, etc.
- (Jeff)
-
- - Fixed the sign of the GMT offset in generated Date headers.
- (Michael)
-
- - Fixed a bug in base64 encoding. (Michael)
-
- - Fixed a problem in connecting to non-ESMTP SMTP servers. (Jeff)
-
- Miscellaneous Commands / Features:
-
- - The mailer will now remember your passwords, if you configure
- that option for a service. (Dan)
-
- - New "Apply Filters" command to apply filter rules to selected
- messages. (Jeff)
-
- - No more "No new mail" dialog. (Jeff)
-
- - Individual messages can now be saved to disk. (Jeff)
-
- - Synced the Message menu with the right-click menu. (Jeff)
-
- - Mailer now uses the same search bar as the addressbook. (Anna,
- Chris, Jeff)
-
- Filters:
-
- - Now supports filtering on system flags (ie Answered, Seen,
- Unseen). (Jeff)
-
- - Regular expression searches are now moved to their own Option
- menu. (Jeff)
-
- - Allows regex searching on the entire message header. (Jeff)
-
- - Now has soundex filters (x sounds like y). (Jeff)
-
- IMAP:
-
- - "Get Mail" now scans all folders. (Dan)
-
- - IMAP password dialog no longer pops up at startup: click on the
- server in the folder tree to connect. (Dan)
-
- - Folder subscription support. (Chris Toshok, Dan)
-
- - Various IMAP folder naming fixes. (May fix Cyrus support) (Dan)
-
- - Seen/deleted flags are preserved across "Get Mail". (Jeff)
-
- - Fixed a bug that could cause messages to be marked as seen
- even when the UI thought they weren't. (Dan)
-
- - Fixes for IMAP folders with spaces in their names (again).
- (Jeff)
-
- - IMAP Kerberos 4 authentication support. (Dan)
-
- POP3:
-
- - Fixed a bunch of error cases in POP3 connection. (Dan)
-
- - Fixed POP3 to more reliably delete messages when it was supposed
- to be doing so. (Dan)
-
- Local mail:
-
- - Major local mail rewrite that fixed memory leaks, reduced
- memory consumption, improved efficiency, etc. (Michael)
-
- - Maildir support. (Michael)
-
- - Local mail folders are now locked (via dot locking and/or
- fcntl/flock) while Evolution is modifying them, and it will
- notice if they've changed while it's not looking. (Michael)
-
-Calendar:
-
- - To-do and calendar conduits working except for extended
- character support (ie accented chars) (JP)
-
- - Updated wombat implementation of change reporting (JP)
-
- - Majorly kick-ass new recurrence page in the event editor with an
- easy UI, a preview of what will happen, and lots of love. (Anna)
-
- - Imported a new libical with the APIs we require for alarms, the
- start of the timezone code. This may be the last Evolution
- release that uses a CVS-imported libical; in the future we should
- depend on official tarballs. (Federico)
-
- - Event editor now deals gracefully with iCalendar recurrences we
- cannot edit. (Federico)
-
- - Plenty of fixes to the ETable calendar model for the task list
- (Damon).
-
- - The task list now saves its state, selected columns and sort order
- (Damon).
-
- - Lots of love to the iTIP engine and user interface. Scheduling
- appointments via email should be working fine, and they should
- also work when you receive them. (Jesse)
-
- - Lots of work on the calendar preferences code. (Damon)
-
- - Many functional and cosmetic fixes to the day and week
- views. (Damon)
-
- - Event and task editors now ask if you try to close them without
- saving changes. (Damon)
-
- - You are now prompted if you are sure that you want to delete an
- appointment. (Federico)
-
- - Plenty of memory leaks fixed. (JP, Federico)
-
- - Prettified the event editor a bit by making widget spacings
- consistent. (Federico)
-
- - Fixed semantics for handling exception dates (Federico)
-
- - Some fixes to the recurrence instance generation engine. (Damon)
-
- - Fixed insertion of new objects via notification into the task
- list. (JP, Federico)
-
- - Misc. polishing for the event editor's innards. (Damon, Federico)
-
- - Misc. cruft removal from old Gnomecal code (Federico, Miguel)
-
- - Prettier icons for the task list. (Federico)
-
-Addressbook:
-
- - Addressbook conduit now working, experimentally, except for
- extended character support (ie accented chars.) (JP)
-
- - Extended wombat functionality with getChanges call. (JP)
-
- - Full name and address dialogs in contact editor fixed. (Chris)
-
-Executive Summary: (iain)
-
- - Now compiled by default.
-
- - Prettier default dialogs.
-
- - Customisable background.
-
- - RDF Summary, and Mail Summary components.
-
- - Fixes and optimisations.
-
- - Can restore state.
-
-Version 0.7, "Loch Ness Monster", ????
---------------------------------------
-
-There have been no verified sightings of this release.
-
-
-Version 0.6, "Procompsognathus", 2000-10-19
--------------------------------------------
-
-General:
-
- - Split out lots of functionality to gal. Evolution now depends on
- gal. (Chris Lahey, Gal Team)
-
-Shell:
-
- - Added a cute splash screen. (Ettore, TigerT)
-
- - Improved the way `~/evolution' is initialized the first time.
- (Iain)
-
- - Fixed the problem with the folder bar disappearing too son when
- clicking on the scrollbar. (Ettore)
-
- - Updated to use the new toolbar and UI merging code from Bonobo.
- (Michael Meeks, Ettore)
-
-Mail:
-
- - Numerous i18n encoding, decoding, and display fixes. Non-ASCII
- text should be displayed correctly in most context in the mailer
- now. The composer no longer sends undeclared 8bit data. (Jeff)
-
- - The IMAP provider now caches summary info between sessions, so
- startup should be much faster for large folders. (Dan)
-
- - Subscribe/unsubscribe UI for newsgroups. (IMAP subscriptions will
- be supported in a later release.) NNTP authentication support.
- Various other NNTP fixes. (Chris Toshok)
-
- - New "full search" button to do more complicated searches. (NotZed)
-
- - Composer attachment bar improvements. You can now drag files to
- the composer window to attach them to the message. (Iain)
-
- - Message list state (columns selected, sorting, etc) is now saved
- between sessions. (NotZed)
-
- - "Get Mail" now works for IMAP. IMAP mail no longer arrives
- asynchronously (although if you delete mail from another client,
- it will be deleted asynchronously). (Dan)
-
- - Image attachments now use thumbnail images rather than a generic
- image icon. (Iain)
-
- - Various IMAP provider bugs (Dan, Jeff)
-
- - Filter code cleanup/improvements. (NotZed) Filtering can read and
- write message scores. (Jeff) On-demand filters no longer expunge
- the source folder, and don't filter deleted messages. (Jeff)
- Filters now log their actions. (Jeff)
-
- - Drafts, Outbox, and Sent folders now default to showing "To"
- instead of "From" in the header list. Messages output to the Sent
- folder are marked as "Seen". "Send later" on a reply will mark the
- message as having been replied to. (Jeff)
-
- - Message list "attachment" column is now functional. The
- read/unread state of a fake thread header now matches the state of
- the thread. (NotZed) Message list sorting is more clever (Jeff)
-
- - The "Print" toolbar button now opens a Print dialog rather than a
- Print Preview window. (Miguel)
-
- - New "Select All" command. "Mark all messages as seen" became "Mark
- (selected) messages seen". (Jeff)
-
-Calendar:
-
- - Improved todo list and calendar view gui (Damon)
-
- - Printing works again (Federico)
-
- - Config dialog improvement and implementation (Damon)
-
- - Todo and calendar conduits working, except for archiving (JP)
-
-Addressbook:
-
- - Lots of internal refactoring of addressbook, including changes due
- to gal. (Chris, Chris)
-
- - Lots of bug fixes. (Chris, Chris, Matt Bissiri, Iain, Dan)
-
- - Added a working field to save whether the contact wants
- HTML. (Chris Lahey)
-
- - Added "Stop" and "View All" toolbar buttons. (Chris Lahey)
-
- - Lots of work on modifiable LDAP. (Chris Toshok)
-
- - Recognizes a lot more Prefixes and Suffixes when parsing names. (Nat)
-
- - The card view doesn't write out cards unless they've changed. (Chris Lahey)
-
- - New layout of address editor dialog. (Anna, Chris Lahey)
-
-Version 0.5.1, "Salamended", 2000-09-15
----------------------------------------
-
-General:
-
- - Fixed a font-handling problem that would cause Evolution to crash
- at startup with certain Gtk themes. (Chris)
-
- - Fixed some build problems. (Chris)
-
- - We no longer ship an out-of-date Red Hat-only RPM spec file.
-
-Shell:
-
- - The shell now installs the `Sent' folder at startup if it doesn't
- exist yet. (Ettore)
-
- - If a component crashes unexpectedly, the shell displays a dialog
- box informing the user of that. (Ettore)
-
- - Fixed a bug in the folder selector dialog that would result in
- crashes while trying to move messages in the mailer. (Dan)
-
-Addressbook:
-
- - Fixed a bug that would cause the addressbook to crash when
- embedded in the composer. (Dan)
-
-Mail:
-
- - Fixed a display problem caused by expunging an IMAP folder. (Dan)
-
- - Fixed POP mail so that "keep on server" is obeyed correctly. (Dan,
- Jeff)
-
- - Fixed replies so that replying to a message twice doesn't turn off
- the "replied" flag. (Dan)
-
- - Fixed a bug that prevented "Send later" from working. (Dan)
-
-
-Version 0.5, "Salamander", 2000-09-13
--------------------------------------
-
-Shell:
-
- - Switched to using ETree for the folder view. (Chris Toshok,
- Ettore)
-
- - Added interfaces to change the string displayed in the tree view
- as the name of the folder. (Ettore)
-
-Calendar:
-
- - Uses only the new iCalendar standard internally; this means future
- interoperability with new calendaring programs. (JP, Federico)
-
- - New ultra-cool date range selector, aka little calendar. (Damon)
-
- - Plenty of internal refactoring. (JP, Damon, Federico)
-
- - Pilot synch work, mostly on pcs infrastructure and some todo work (JP)
- <EXPERIMENTAL>
-
- - Pilot synch work, mostly on pcs infrastructure and some todo work (JP)
- <EXPERIMENTAL>
-
-Addressbook:
-
- - New advanced search dialog. (Michael Zucchi, Chris Lahey)
-
- - Added parsing of addresses. (Jesse Pavel)
-
- - Converted most of addressbook to UTF8. (Lauris)
-
-Mailer:
-
- - Filters (but not vfolders) are now more powerful: they can check
- any message header, and can do regexp searches on the headers and
- body. (Jeff)
-
- - A first draft of an automated mailing list recognizer
- has been added. (It will need more/better rules.) (Ettore)
-
- - Attachments are handled differently now. All attachments always
- have an icon and a header, and you can right-click on the icon to
- view/hide, save, or launch an external viewer. (Dan)
-
- - It is no longer necessary to quit and restart after adding a new
- IMAP server. (Peter)
-
- - Lots of i18n/charset fixing. (Lauris)
-
- - Shiny new toolbar icons. (Tuomas)
-
- - Giant menu reorganization. Most message operations are now in the
- "Message" menu, and folder operations in the "Folder" menu.
- (Ettore, Dan, Peter)
-
- - "Mark as seen" timeout is now configurable. Mail view remembers
- the location of the message list/message display split. (Richard
- Hult)
-
- - New filter category: "On-demand", for filters to be applied
- at arbitrary times rather than during mail incorporation. (Peter)
-
- - POP/IMAP config pages allow you to specify a port... this may
- go away in a later release when we support ssl/ssh tunneling
- directly. (Peter)
-
- - Reply To All will now remove your own addresses from the recipient
- lists. (Jesse Pavel)
-
- - Folders are synced when you switch to another folder now. (Dan)
-
- - An IMAP bug that caused all messages to be marked as read before
- they were read has been fixed. (Dan)
-
- - The IMAP provider is now more robust about dealing with other
- concurrent IMAP clients. (Jeff)
-
- - POP and IMAP are better about when they do and don't try to
- reconnect. This was part of Camel operation cancellation support,
- which unfortunately didn't make it into 0.5. (Peter)
-
- - Sent and Outbox folders are now functional. You now have 2
- options when sending a message - "Send Now" which will send the
- message imediately and "Send Later" which will queue the message in
- Outbox for later sending. When a message is successfully sent, it
- is copied to the Sent folder for your records. (Jeff)
-
-ETable:
-
- - ETree fixes. (Chris Toshok)
-
- - Lots of small usability fixes. (Chris Lahey)
-
- - Lots of grouping bug fixes. Specifically, fixed crashes when
- grouping in trees and made ETable not go crazy when you change
- data and the table is grouped. (Chris Lahey)
-
- - Improved table printing when grouped. (Chris Lahey)
-
- - Converted most of ETable to UTF8. (Lauris)
-
-
-Version 0.4, "Alewife", 2000-08-14
-----------------------------------
-
-Shell:
-
- - Added interfaces to display messages and a progress bar when the
- component is busy. (Ettore)
-
- - Changed the shell BonoboUIHandler code to allow placing menu items
- such as "Print" in the right places. (Ettore)
-
- - Added code to check if an existing `~/evolution' directory
- actually has the content we expect and, if not, complain to the
- user. (Dan)
-
- - Fixed some Bonobo-related refcounting problems. (Michael Meeks)
-
- - Removed the GConf dependency. (JP)
-
- - Improved the API for the folder selection dialog. (Ettore)
-
- - Memory leak fixes. (Peter)
-
-Calendar:
-
- The calendar is in the middle of major rewrite. Evolution 0.4
- ships with essentially the same calendar component as 0.3 did.
-
-Addressbook:
-
- - More work on the Palm Pilot conduits. (Chris Toshok)
-
- - Fixed some LDAP-related crashes. (Chris Toshok)
-
- - Added support for displaying embedded vCards through a Bonobo
- component. (Chris Lahey)
-
- - Added support for generic fields. (Chris Lahey)
-
- - Fixed the navigation order for the Tab key in the contact editor
- window. (Chris Lahey)
-
- - Fixed some Bonobo-related bugs and crashes. (Chris Lahey, Michael
- Meeks)
-
- - Only display entries that have an email address in the address
- selector dialog. (Chris Lahey)
-
- - Added an utility program to import vCards from Gnomecard. (Chris
- Lahey)
-
-Mailer:
-
- Generic
-
- - Long mailer operations (such as fetching new mail) now run
- asynchronously rather than blocking the UI. This involved
- a major rewrite of much of the Camel and mailer code. (Peter)
-
- - GPG/PGP message decryption support (Nathan Thompson-Amato, Dan)
-
- - Unfinished messages in the composer can be saved to the "Drafts"
- folder and finished later. (Jeff)
-
- - Double-clicking on a message in the message view now opens it in a
- separate window. (Jeff)
-
- - vCards attached to messages now bring up a minicard view with a
- button to add the vCard to the addressbook (Chris Lahey, Dan)
-
- - Inline uuencoded/binhexed "attachment" support (Dan)
-
- - "Mark All Messages Seen" command. (Cody Russell)
-
- Filters / VFolders
-
- - Major filter/vfolder dialog rewrite (Michael Zucchi) VFolders can
- now search any (searchable) folder, not just Inbox.
-
- - Auto-filter/auto-vfolder code (right click on a message in the
- list and pick one of the options at the bottom of the menu to
- create a filter/vfolder rule for similar messages). (Michael)
-
- - You can now set the color of messages in the message list, based
- on filter rules. (Local stores can also now store arbitrary user
- flags, although there is not yet UI code to set/view them.)
- (Michael)
-
- - Added "Save" button to the quicksearch bar to save a search as a
- vfolder. (Michael)
-
- Configuration
-
- - Major mail config dialog rewrite (JP).
-
- - The mailer now remembers your threaded/unthreaded message view
- setting between sessions. (Jeremy Wise).
-
- - Support for multiple identities (JP, Jeff), sources (JP, Peter), and
- IMAP servers (JP, Dan)
-
- Providers
-
- - You can now leave POP mail on the server. (This will [currently]
- only work right with POP servers that support the UIDL command.
- On other servers, it will never download some messages unless you
- never delete mail.)
-
- - There is now an MH-like local store available, and code to convert
- a folder from one type to the other. (Michael)
-
- - The mbox provider now writes out "From " lines that are more
- compatible with other mailers (like Mutt) that are picky about
- their exact format. (Michael)
-
- - The IMAP provider now supports searching (Jeff). Also various
- other speed/efficiency/robustness improvements (Jeff), and support
- for old IMAP4 servers as well as IMAP4rev1 (Jon K Hellan).
-
-
-Version 0.3, "Jellyfish", 2000-07-21
-------------------------------------
-
-Shell:
-
- - Pop-up folder selection. (Ettore)
-
- - Added support for multiple views. (Ettore)
-
- - Added support for saving component-specific settings, and
- some initial code to save the view's configuration.
- (Ettore)
-
- - Fixed the Bonobo menu code so that it works with all the
- locales. (Ettore)
-
-Mailer:
-
- - Lots of IMAP fixes. (Jeff)
-
- - You can use an external setuid/setgid movemail program
- (although we don't ship our own yet). If you have one
- installed with emacs, the configure script will find
- that. Otherwise, you can specify --with-movemail=/path.
- (Dan)
-
- - You can toggle HTML/plain text for an individual message
- in the composer now. (Ettore)
-
- - Bonobo embedding sort of works again, but there are
- problems with size allocation somewhere. Attachments can now
- also be handled by external applications. (Dan)
-
- - text/plain mail is now line-wrapped in the mail display,
- to deal with people who don't put newlines in their mail.
- (Dan)
-
- - Allow user to specify IMAP namespace in the mail config
- dialog. (Dan, Jeff)
-
- - Quoted-printable encoder fixes. (Michael Zucchi)
-
- - Various NNTP fixes, include a news pane in the config
- dialog. (Chris Toshok)
-
- - Some memory corruption fixes. (Peter Williams)
-
- - Fix for message not being re-drawn as deleted. (Peter
- Williams, Jeff)
-
- - Moving a message to another folder copies the flags now
- (Jeff)
-
- - Close signature in HTML mail with </PRE>, not <PRE>, and
- default to ~/.signature. (Michael Meeks)
-
- - Fixed some confusing behavior in the message threading
- algorithm. (Dan)
-
- - Improvements to the item selection code. (Chris Lahey)
-
-Calendar:
-
- - Added support for a bunch of previously unsupported iCalendar
- properties. (Federico)
-
- - Conduit for synchronizing the calendar with gnome-pilot
- (requires gnome-pilot from CVS). (Seth)
-
- - ETable-based to-do list view ("taskpad"), for your viewing
- pleasure.
-
-Addressbook:
-
- - Conduit for synchronizing the addressbook with gnome-pilot
- (requires gnome-pilot from CVS). (Chris Toshok)
-
- - Conduit for synchronizing the addressbook with gnome-pilot
- (requires gnome-pilot from CVS). (Chris Toshok)
-
- - Fixed some random crashes. (Chris Lahey)
-
- - Implemented a vCard Bonobo control so that we can support
- inline vCard viewing in the mailer. (Chris Lahey)
-
- - Quick search looks at both the name and the company name now.
- (Chris Lahey)
-
- - Added more functionality to the contact editor's toolbar. (Chris
- Lahey)
-
- - Support for printing single cards. (Chris Lahey)
-
-Version 0.2, "Saccharomyces", 2000-07-11
-----------------------------------------
-
-Shell:
-
- * Folder selection dialog (Ettore).
-
- * Folder creation dialog (Ettore).
-
-Addressbook:
-
- * LDAP server configuration dialog (Chris Toshok).
-
- * Integration of LDAP servers in the shell's tree view (Chris Toshok).
-
- * ETable-based view (Chris Lahey).
-
- * Printing support for the ETable-based view (Chris Lahey).
-
- * Address selection dialog integrated with the message composer (Chris
- Lahey).
-
- * Many miscellaneous bugs fixed (everyone).
-
-Calendar:
-
- * Printing support (Michael, Federico).
-
- * Many, many behavior fixes and polishing to the day/week/month view
- widgets (Damon).
-
- * New glade-based event editor. This is unfinished but usable (Seth,
- Federico).
-
- * Mouse wheel scrolling support (Anders).
-
- * We have an awesome new engine for computing recurring events
- (Damon). This will be plugged in to the new iCalendar code.
-
- * Internal and public API fixes (Federico, Seth).
-
- * Shell-related changes (Ettore).
-
- * Data model for ETable; this is not used yet (Federico).
-
- * New iCalendar support; this is not used yet (Federico).
-
- * Pilot syncing updates; this is not used yet (Seth).
-
- * Many miscellaneous bugs fixed (everyone).
-
-
-Mailer:
-
- Major features:
-
- * Basic IMAP support (Jeff)
-
- * Threaded message view (Michael, Chris Toshok)
-
- * Filters now work (original work by Michael, bugfixes by Dan)
-
-
- Smaller features:
-
- * Implemented moving messages between folders (Dan)
-
- * Very basic printing support (Dan, but it was only like 5 lines
- of code, because gnome-print kicks ass)
-
- * "Delete", "Forward", and "Refile" operations now work on
- multiple messages. (Chris Lahey, Peter Williams, Dan)
-
- * Toggle read/unread flag when the user clicks on the envelope
- icon (Chris Lahey, Dan).
-
- * The "New folder" menu item now works (Ettore, Dan).
-
- * The filter/vfolder druid now uses the new shell folder selection
- UI (Michael)
-
- * Added "Cc" to the set of filter/vfolderable headers and make the
- filter/vfolder "messages to address" rule work with to or cc.
- (Dan)
-
- * New key bindings: "Delete" deletes the current message and jumps
- to the next undeleted message. "N" and "P" go to next/previous
- unread message. (Dan)
-
- * Keep asking for POP/IMAP password until the user gets it correct
- or hits Cancel, and remember the result until the user exits (or
- chooses "Forget Passwords"). (Dan, Jeff)
-
- * Kludge Camel to output ISO-8859-1 instead of UTF-8, since
- neither GtkHTML nor ETable supports UTF-8 still. (Dan)
-
- * Use the gnome-vfs "sniff buffer" interface to try to identify
- the MIME type of attachments without useful type information
- (Dan)
-
- * Allow saving drafts in the composer (Ettore)
-
- * Added "Received date" header to the set of possible message list
- headers. (Dan)
-
- * Partial gladification of the config dialog (JP Rosevear)
-
-
- Bug fixes:
-
- * Message read/unread/deleted flags should now be saved reliably
- when you exit, and summary should not be rebuilt when a rebuild
- isn't needed. Expunging should work reliably (Dan, Ettore,
- Jeff).
-
- * Fix disappearing toolbar bug (Dan).
-
- * Fixed a bug that made downloading of very large messages over
- POP incredibly slow, and various other smaller POP bugs. (Dan)
-
- * Fixed bugs that made large attachments sometimes get dropped and
- small ones sometimes get truncated. (Dan)
-
- * Fixed filter/vfolder "messages to address" rule to correctly
- match "to" rather than "from". (Michael)
-
- * Fix some text/plain formatting bugs in the composer. (Dan,
- Ettore)
-
- * Turn off search mode when getting new mail (to avoid corrupting
- the display). Make "get mail" always put unfiltered mail into
- Inbox rather than the current folder. (Dan)
-
- * Fixed a bug that caused "Re:" to be prepended even to subjects
- that started with "Re:" when replying. Added a default subject
- to forwarded messages. (Dan)
-
- * Make the "Attach" dialog in the composer remember the last
- directory it was in. (Dan)
-
- * Code to parse invalid date formats since some mailers generate
- them... (Jeff)
-
- * Fixed various small SMTP bugs (Jeff, Chris Lahey)
-
- * Fixed some memory leaks (Peter, Jeff)
-
- * Make replies use the text/plain part of a multipart/alternative
- if the user configured plain text rather than HTML mail sending.
- (Dan)
-
- * Various config dialog fixes (Jeff)
-
- * Partial filter/vfolder GUI facelift (Jacob)
diff --git a/README b/README
deleted file mode 100644
index d385f0b97c..0000000000
--- a/README
+++ /dev/null
@@ -1,217 +0,0 @@
-Evolution is the integrated mail, calendar and address book
-distributed suite from Ximian, Inc.
-
-See http://www.ximian.com/apps/evolution.php3 for more information.
-
-Note that Evolution is still beta. This means it may delete all of
-your mail if you give it the chance.
-
-If you are using Evolution, you should subscribe to the Evolution
-mailing list. If you are interested in hacking on it, you should
-subscribe to the Evolution Hackers mailing list. Send mail to
-"evolution-request@ximian.com" or
-"evolution-hackers-request@ximian.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 are mailing list archives available at
-http://lists.ximian.com/archives/public/evolution/ and
-http://lists.ximian.com/archives/public/evolution-hackers/
-
-There is also an #evolution IRC channel on irc.gnome.org.
-
-
-IF IT DOESN'T WORK
-------------------
-
-Did you read the "How to build" section below? :-)
-
-If you have built Evolution and it doesn't work, or you can't get it
-or one of its dependencies to compile, try running the
-"verify-evolution-install.sh" script in the tools/ subdirectory. It
-may be able to figure out what went wrong.
-
-If the configure script complains that you don't have a library that
-you know you have installed, it usually means either that you've
-installed things into multiple prefixes (see the bits on GNOME_PATH
-below) or (if you're on Linux) that you installed the "foo" package
-but forgot the "foo-devel" package.
-
-
-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
-------------------
-
-First you have to decide whether you want to install Evolution (and
-its dependencies) into the same prefix as the rest of your GNOME
-install, or into a new prefix. Installing everything into the same
-prefix as the rest of your GNOME install will make it much easier to
-build and run programs, and easier to switch between using packages
-and building it yourself, but it may also 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" or "autogen.sh"
-when building the other packages you need. Eg:
-
- ./configure --prefix=/usr --sysconfdir=/etc
-
-
-If you build in another prefix instead, you will need to set the
-GNOME_PATH environment variable (and ACLOCAL_FLAGS as well if building
-from CVS) to include the prefix you install into. Eg:
-
- export GNOME_PATH=/usr/local
- export ACLOCAL_FLAGS="-I /usr/local/share/aclocal"
-
-(Assuming your shell is bash, and you installed into /usr/local.) You
-need to set GNOME_PATH both during compiling AND when you run
-evolution. Remember also that if you're installing into an odd prefix
-such as /evolution, that you also need to make sure to put
-${prefix}/bin in your PATH and ${prefix}/lib in your LD_LIBRARY_PATH.
-
-
-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 Ximian GNOME
-(http://www.ximian.com/desktop/) Other packages may be available from
-the Ximian GNOME evolution preview mirror.
-
-If installing from packages, remember that you need both the runtime
-and -devel packages for each library.
-
- - xml-i18n-tools - lates from xml-i18n-tools-stable-1-x branch in
- GNOME CVS (0.8.2 is too old)
-
- - gnome-xml - 1.8.10 or later in the 1.0 series, but not from the 2.0
- series (If you get this from GNOME CVS, use the tag "LIB_XML_1_X".)
- (*)
-
- - gnome-print - 0.25 or later (*)
-
- - gdk-pixbuf - 0.8.0 or later (*)
-
- - ORBit - 0.5.6 or later (*) (If you get this from GNOME CVS, use the
- tag "orbit-stable-0-5".)
-
- - oaf - 0.6.2 or later (If you get this from GNOME CVS, use the tag
- "oaf-stable-0-6")
-
- *** If you are using oaf from CVS, you should use the flag
- *** "--disable-more-warnings" when configure, or it may fail to
- *** build.
-
- - gconf - 0.6 or later.
-
- - gnome-vfs - 0.4.2 or later (If you get this from GNOME CVS, use
- the tag "gnome-vfs-1-0")
-
- *** If you are using gnome-vfs from CVS, you should use the flag
- *** "--disable-more-warnings" when configuring, or it may fail to
- *** build.
-
- - libglade (*)
-
- - bonobo - 0.37 or later
-
- *** Note that bonobo must be installed with the same --prefix as
- *** either gnome-libs or evolution for the Makefiles to work
- *** properly.
-
- - libunicode - 0.4.gnome (*)
-
- - gal (GNOME Application Library) - 0.5.99.5 or later
-
- - gtkhtml - 0.8.2 or later
-
-If you want support for PalmPilot syncing (currently experimental so
-please back up your pilot) you will also need to do the following:
-
-1) pilot-link
-cvs -d :pserver:anonymous@cvs.gnu-designs.com:/cvs/pilot-link login
-The password is just <ENTER>.
-cvs -d :pserver:anonymous@cvs.gnu-designs.com:/cvs/pilot-link co pilot-link
-./configure --prefix=<pilot-link-prefix> --with-perl=no --with-java=no
---with-tcl=no --with-python=no
-make
-make install
-
-2) gnome-pilot
-cvs -z3 co gnome-pilot
-./autogen.sh --prefix=<gnome-pilot-prefix> --with-pisock=<pilot-link-prefix>
-make
-make install
-
-3) evolution
-in your evo source dir do ./autogen.sh --prefix=<evo-prefix>
---with-pisock=<pilot-link-prefix> --enable-pilot-conduits=yes
-make
-make install
-
-
-If you want support SSL (and someday S/MIME), you will also need libnspr4 and
-libnss3 which can be found at http://www.mozilla.org.
-
-Once you have libnspr4 and libnss3 (and their respective includes) installed,
-in your evolution source dir do:
-./autogen.sh --prefix=<evo-prefix> --with-nspr-includes=<nspr-includes-prefix>
---with-nspr-libs=<nspr-libs-prefix> --with-nss-includes=<nss-includes-prefix>
---with-nss-libs=<nss-libs-prefix>
-
-You'll need to `cp ~/.mozilla/default/*.db ~/evolution` on you've
-installed Evolution in order to get a functional SSL-enabled
-Evolution.
-
-The layout of the source tree is:
-
-addressbook: the Address Book UI
-art: graphics used by evolution
-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).
-composer: the message composer UI
-data: the .desktop file for Evolution
-default_user: initial Evolution config files for new users
-devel-docs: entirely inadequate documentation
-doc: more adequate documentation
-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
-tools: utilities, notably "killev", a script to kill of all
- of the Evolution components
-widgets: widgets used by Evolution, including the shortcut bar
-wombat: Has source code that will load in the addressbook
- and calendar backend, and will form the server
- process we'll be using
diff --git a/acconfig.h b/acconfig.h
deleted file mode 100644
index 1bb33c8042..0000000000
--- a/acconfig.h
+++ /dev/null
@@ -1,32 +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 ENABLE_THREADS
-#undef SENDMAIL_PATH
-#undef SYSTEM_MAIL_DIR
-#undef HAVE_LDAP
-#undef HAVE_TIMEZONE
-#undef HAVE_TM_GMTOFF
-#undef HAVE_KRB4
-#undef NEED_KRB_SENDAUTH_PROTO
-#undef HAVE_KRB5
-#undef HAVE_NSS
-#undef MOVEMAIL_PATH
-#undef USE_DOT
-#undef USE_FCNTL
-#undef USE_FLOCK
-#undef ENABLE_NNTP
-
-/* Sub-version identification string. */
-#undef SUB_VERSION
-
-/* Define if ctime_r takes three arguments */
-#undef CTIME_R_THREE_ARGS
-
-/* Define if gethostbyname_r takes five arguments */
-#undef GETHOSTBYNAME_R_FIVE_ARGS
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 f4bbac447a..0000000000
--- a/addressbook/ChangeLog
+++ /dev/null
@@ -1,5077 +0,0 @@
-2001-04-14 Christopher James Lahey <clahey@ximian.com>
-
- * backend/ebook/e-book-view-listener.c,
- backend/ebook/e-book-view-listener.h: Added the function
- e_book_view_listener_stop to tell the book view listener to stop
- sending signals.
-
- * backend/ebook/e-book-view.c (e_book_view_destroy): Tell the
- EBookViewListener to stop when we're destroyed.
-
- * backend/pas/pas-backend-file.c (view_destroy,
- pas_backend_file_process_get_book_view,
- pas_backend_file_process_get_changes): Cleaned these up a bit
- using bonobo_object_ref and bonobo_object_unref.
- (pas_backend_file_process_get_book_view,
- pas_backend_file_process_get_changes): bonobo_object_release_unref
- the EBookListener here.
-
- * backend/pas/pas-backend-ldap.c
- (pas_backend_ldap_process_get_book_view): Cleaned this up a bit
- using bonobo_object_ref. Make sure to unref the listener when
- we're done with it. Put the new book_view in the list before
- telling the book_listener that it's ready.
-
- * backend/pas/pas-book-view.c (pas_book_view_construct): Cleaned
- this up a bit using bonobo_object_dup_ref.
- (pas_book_view_destroy): Cleaned this up a bit using
- bonobo_object_release_unref.
-
- * backend/pas/pas-book.c (pas_book_queue_get_book_view,
- pas_book_queue_get_changes): bonobo_object_dup_ref here instead of
- just duplicating.
-
-2001-04-14 Christopher James Lahey <clahey@ximian.com>
-
- * backend/ebook/e-book-listener.c
- (impl_BookListener_respond_get_cursor): Ref the cursor here when
- we receive it.
- (impl_BookListener_respond_get_view,
- impl_BookListener_respond_get_changes): Ref the book_view here
- when we receive it.
- (impl_BookListener_respond_open_book): Ref the book here when we
- receive it.
- (e_book_listener_destroy): Unref the objects in our queue here.
-
- * backend/ebook/e-book-view.c (e_book_view_construct): Cleaned
- this up using bonobo_object_dup_ref.
- (e_book_view_destroy): Cleaned this up using
- bonobo_object_release_unref.
-
- * backend/ebook/e-book.c (e_book_do_response_get_cursor,
- e_book_do_response_get_view, e_book_do_response_get_changes,
- e_book_unload_uri): Cleaned this up using
- bonobo_object_release_unref.
-
-2001-04-13 Christopher James Lahey <clahey@ximian.com>
-
- * gui/component/select-names/e-select-names-bonobo.c
- (entry_get_property_fn): Get the ESelectNamesModel from the
- widget's text model instead of storing it as a gtk_object_set_data
- since it may change.
-
-2001-04-12 Jason Leach <jasonleach@usa.net>
-
- * backend/pas/pas-backend-file.c (INITIAL_VCARD): Update the Voice
- and Fax phone numbers too, finishing off bug #1667.
-
-2001-04-11 Christopher James Lahey <clahey@ximian.com>
-
- * backend/pas/pas-backend-file.c (INITIAL_VCARD): Update the built
- in VCard.
-
-2001-04-12 JP Rosevear <jpr@ximian.com>
-
- * conduit/address-conduit.c (local_record_from_ecard): put the
- business address into the pilot record as that is what we put into
- the desktop record
- (ecard_from_remote_record): set both the address label and
- delivery address to avoid bad parser guessing, fixes #2143
-
- * backend/ebook/e-card-types.h: remove deprecated pilot code
-
- * backend/ebook/e-card.c: ditto
-
- * backend/ebook/e-card.h: ditto
-
-2001-04-11 JP Rosevear <jpr@ximian.com>
-
- * conduit/address-conduit.c (local_record_from_ecard): Don't add
- more than five phone numbers and set the remaining blank entries
- to some reasonable defaults
-
-2001-04-11 Christopher James Lahey <clahey@ximian.com>
-
- * backend/ebook/e-card-simple.h: Added
- E_CARD_SIMPLE_FIELD_LAST_SIMPLE_STRING.
-
- * gui/component/addressbook-component.c (accepted_dnd_types):
- Fixed a warning here.
-
- * gui/widgets/e-addressbook-model.c: Modified this to have more
- columns, but not let them be edited if they're not a simple
- string.
-
- * gui/widgets/e-minicard-view.c (e_minicard_view_init): Fixed a
- warning and a memory leak here.
-
-2001-04-10 Gediminas Paulauskas <menesis@delfi.lt>
-
- * backend/ebook/evolution-gnomecard-importer.c: added missing #include.
- * contact-editor/e-contact-editor.c (_arrow_pressed): popup menu items were
- not translated after selecting one of them.
- * gui/widgets/e-addressbook-view.c: mark popup menu items with N_().
- Updated list[] for translators.
- * gui/widgets/e-minicard.c: same.
- * gui/widgets/e-minicard-view-widget.c (e_minicard_view_widget_set_arg): fix warning
- for "editable" arg.
- * gui/widgets/e-minicard-view.c: convert "empty_message" to utf8.
-
-2001-04-09 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook-component.c (remove_folder): stubbed,
- #if 0'ed
- (xfer_folder): same.
- (populate_context_menu): same.
- (get_dnd_selection): same.
- (factory_fn): add the accepted drag types ("text/x-vard") to
- folder_types.
-
-2001-04-09 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-minicard.c (e_minicard_event): on BUTTON_PRESS: if
- it's button 1, store the button x, y, and set drag_button_down to
- TRUE. on BUTTON_RELEASE: always set drag_button_down to FALSE.
- for MOTION_NOTIFY: initiate drag if the pointer has moved 3
- pixels.
-
- * gui/widgets/e-minicard.h (struct _EMinicard): add fields for
- button x, y, and a bit for if the button has been pressed so we
- can tell whether a motion should be a drag.
- (struct _EMinicardClass): add drag_begin signal.
-
- * gui/widgets/e-minicard-view.c (e_minicard_view_drag_begin): new
- function, starts the drag.
- (book_view_loaded): connect the "drag_data_get" signal.
- (e_minicard_view_drag_data_get): new function.
-
- * gui/widgets/e-minicard-view.h (struct _EMinicardView): add
- drag_card and id for canvas_drag_data_get_id.
-
- * gui/widgets/e-addressbook-view.c (table_drag_data_get): new
- function.
- (create_table_view): add d&d stuff.
-
-2001-04-08 Chris Toshok <toshok@ximian.com>
-
- * printing/e-contact-print.c: add #include <sys/types.h> since
- gnome-print.h uses time_t without including it. this really
- should be fixed in gnome-print.
-
-2001-04-08 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-ldap.c (pas_backend_ldap_add_client):
- make sure to notify new clients to the writable status of an
- already open (and authenticated) book.
-
-2001-04-04 Kjartan Maraas <kmaraas@gnome.org>
-
- * contact-editor/e-contact-editor.[ch]: Fix headers.
- * component/addressbook-storage.c: Same here.
- * gui/search/e-addressbook-search-dialog.c: Same here.
- * gui/widgets/e-addressbook-view.c: Same here.
- * gui/widgets/e-minicard-label.c: Same here.
- * gui/widgets/e-minicard-view-widget.c: Same here.
- * gui/widgets/e-minicard-view.c: Same here.
- * gui/widgets/e-minicard-widget-test.c: Same here.
- * gui/widgets/e-minicard-widget.c: Same here.
- * gui/widgets/e-minicard.c: Same here.
- * gui/widgets/test-minicard-label.c: Same here.
-
-2001-04-03 Christopher James Lahey <clahey@ximian.com>
-
- * gui/widgets/e-addressbook-view.c (table_double_click): Fixed a
- crash here.
-
-2001-04-03 Christopher James Lahey <clahey@ximian.com>
-
- * gui/widgets/e-addressbook-model.c (COLS): Made this table model
- more consistent in the number of columns it has.
- (addressbook_append_row): Fixed this function. We removed the col
- offset.
-
-2001-04-02 Iain Holmes <iain@ximian.com>
-
- * backend/ebook/evolution-gnomecard-importer.c (importer_init): Shut
- down and unregister the factory on exit.
-
-2001-04-01 Gediminas Paulauskas <menesis@delfi.lt>
-
- * contact-editor/contact-editor.glade: changed icon to
- evolution-contacts-plain.png.
- * gui/component/addressbook.c: use new pixmap cache. Added icon for new
- contact, print, print preview, changed filenames of renamed icons.
-
-2001-03-31 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/select-names/e-select-names.c
- (real_add_address_cb): Call e_select_names_model_clean after
- adding address. This should deal with the bug reports related
- to stray commas.
-
- * gui/component/select-names/e-select-names-model.c
- (e_select_names_model_clean): Added. Remove all empty destinations.
-
- * backend/ebook/e-destination.c (e_destination_is_empty): Added. Check
- if an EDestination is in essentially a null state.
-
-2001-03-30 Christopher James Lahey <clahey@ximian.com>
-
- * backend/pas/pas-backend-file.c (pas_backend_file_add_client):
- Tell new clients that are added whether they're writable.
-
-2001-03-29 Jon Trowbridge <trow@ximian.com>
-
- * printing/e-contact-print.c: Added #include <libgnome/gnome-paper.h>
-
- * printing/e-contact-print-envelope.c: Added #include <time.h>
- and #include <libgnome/gnome-paper.h>
-
-2001-04-03 Christopher James Lahey <clahey@ximian.com>
-
- * gui/component/select-names/e-select-names-completion.c
- (match_email): Better handle matching of "nameless" contacts.
-
- * backend/ebook/e-destination.c (e_destination_get_string): Better
- handle the case of a "nameless" contact.
-
-2001-03-29 Kjartan Maraas <kmaraas@gnome.org>
-
- * *.*: Clean up #includes. Replace <gnome.h>, <bonobo.h> and
- <gtk/gtk.h> with more finegrained headers where needed.
-
-2001-03-28 Christopher James Lahey <clahey@ximian.com>
-
- * backend/ebook/e-card.c (e_card_set_arg): Fixed some crashes.
-
-2001-03-28 Christopher James Lahey <clahey@ximian.com>
-
- * gui/component/select-names/e-select-names-table-model.c
- (fill_in_info): Use E_CARD_SIMPLE_FIELD_NAME_OR_ORG instead of
- getting the NAME and then the ORG. That way if we expand
- NAME_OR_ORG, this will use it.
-
- * gui/component/select-names/e-select-names.c
- (e_addressbook_create_ebook_table, SPEC): Use the correct column
- in the SPEC.
-
-2001-03-25 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/select-names/e-select-names-completion.c
- (e_select_names_completion_seq_complete_cb): Rather than starting
- the pending query by directly calling
- e_select_names_completion_do_query, call
- e_completion_begin_search. Circumventing the ECompletion API was
- causing it to get confused in some cases.
-
-2001-03-23 Jon Trowbridge <trow@ximian.com>
-
- * gui/widgets/e-minicard-widget.c (e_minicard_widget_set_card):
- Added. Call me old-fashioned, but I just prefer to have a real
- API rather than doing everything via gtk_object_get/set-type
- calls.
- (e_minicard_widget_set_arg): Changed to call
- e_minicard_widget_set_card.
-
- * backend/ebook/e-book-util.c: Small changes to get rid of
- compiler warnings. (Casting out const, removed unused variables,
- etc.) Removed some debugging messages.
-
- * gui/component/addressbook-factory.c (main): Added call
- to e_address_popup_factory_init.
-
- * gui/component/e-address-popup.c: Added. A popup gadget that is
- invoked (as a bonobo control) when an address is left-clicked in
- the mailer. The addressbook is queries, and the address is either
- displayed as a minicard (if it already exists) or in a "generic
- format". A button is provided for editting/adding the contact.
- Some of the semantics of this widget are a bit... non-standard,
- because of bonobo issues. I can't really seem to replicate
- popup-menu behavior because of how bonobo propogates events, etc.
- so I've tried to produce something that I think is non-annoying.
- YMMV.
-
-2001-03-22 Iain Holmes <iain@ximian.com>
-
- * backend/ebook/evolution-gnomecard-importer.c: Update to the new
- IDL.
-
-2001-03-20 Miguel de Icaza <miguel@ximian.com>
-
- * gui/component/addressbook.c (update_pixmaps): Added artwork from
- Jakub.
-
-2001-03-19 Christopher James Lahey <clahey@ximian.com>
-
- * Merged branch:
-
-2001-03-14 Christopher James Lahey <clahey@ximian.com>
-
- * gui/widgets/e-minicard-view.c: Call
- e_selection_model_simple_insert_rows and
- e_selection_model_simple_delete_rows instead of
- e_selection_model_simple_insert_row and
- e_selection_model_simple_delete_row.
-
-End of branch
-
-2001-03-17 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/select-names/e-select-names-completion.c: Brutally
- refactored to boost performance in large-addressbook situations.
- These fixes give accepable performance (even with the suboptimal
- pas-backend-file searching) using tigert's addressbook-of-death.
-
- * backend/pas/pas-backend-file.c (pas_backend_file_search):
- Start feeding query matches back to the caller before the
- entire search is complete; this gives us some "instant feedback"
- rather than causing evolution to totally lock up...
-
- * backend/ebook/e-book.c (e_book_queue_op): Tag all queued ops.
- (e_book_cancel_op): Added. Search for a pending op with a given
- tag, and mark it as inactive.
- (e_book_do_response_get_cursor): Don't execute callback if this
- operations has been cancelled.
- (e_book_do_response_get_view): Ditto.
- (e_book_do_response_get_changes): Ditto.
- (e_book_do_response_get_supported_fields): Ditto.
- (e_book_get_supported_fields): Return an operation tag (that can
- be used to cancel the operation) rather than just TRUE/FALSE.
- Zero is always an invalid tag and is returned in the case of an
- error, so this shouldn't break any code that looked at the return
- value (unless it did so in a particularly stupid way, of course).
- (e_book_get_cursor): Ditto.
- (e_book_get_book_view): Ditto.
- (e_book_get_changes): Ditto.
- (e_book_cancel): Added. Cancel a pending operation. (Basically
- a call to e_book_cancel_op with error checking, etc.)
-
- * backend/ebook/e-book-types.h: Added E_BOOK_STATUS_CANCELLED.
-
-2001-03-17 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/e-book-listener.c
- (e_book_listener_queue_writable_status): new function.
- (impl_BookListener_report_writable): new function.
- (e_book_listener_get_epv): fill in epv->notifyWritable.
-
- * backend/ebook/e-book-listener.h: add writable status entries.
-
- * backend/ebook/e-book.c (e_book_do_writable_event): new function.
- (e_book_check_listener_queue): add WritableStatusEvent to the
- switch.
- (e_book_class_init): register writable_status signal.
-
- * backend/ebook/e-book.h: add writable_status signal.
-
- * backend/idl/addressbook.idl: add notifyWritable method to
- BookListener.
-
- * gui/widgets/e-minicard.c (e_minicard_class_init): add "editable"
- arg.
- (e_minicard_init): init editable.
- (e_minicard_set_arg): loop over the minicard fields setting their
- "editable".
- (e_minicard_get_arg): add editable.
- (supported_fields_cb): use editable when creating the
- contact_editor.
- (add_field): set "editable" when creatin the e_minicard.
-
- * gui/widgets/e-minicard.h (struct _EMinicard): add "editable".
-
- * gui/widgets/e-minicard-view.c (e_minicard_view_class_init): add
- editable arg.
- (e_minicard_view_init): init editable.
- (create_card): pass editable to e_minicard canvas item.
- (e_minicard_view_set_arg): bit of a hack - loop over all the
- canvas items setting their "editable."
- (e_minicard_view_get_arg): add editable.
- (supported_fields_cb): use editable when creating the contact
- editor.
-
- * gui/widgets/e-minicard-view.h (struct _EMinicardView): add
- "editable."
-
- * gui/widgets/e-minicard-view-widget.c
- (e_minicard_view_widget_class_init): add "editable" field.
- (e_minicard_view_widget_init): init editable to FALSE.
- (e_minicard_view_widget_set_arg): save editable, and pass it along
- the e-minicard-view.
- (e_minicard_view_widget_realize): same.
- (e_minicard_view_widget_get_arg): add editable.
-
- * gui/widgets/e-minicard-view-widget.h (struct
- _EMinicardViewWidget): add "editable" field.
-
- * gui/widgets/e-minicard-label.h (struct _EMinicardLabel): add
- "editable" field.
-
- * gui/widgets/e-minicard-label.c (e_minicard_label_class_init):
- add "editable" arg.
- (e_minicard_label_set_arg): editable, set it on the e_text too.
- (e_minicard_label_get_arg): editable.
- (e_minicard_label_construct): set the "editable" field when we
- create the e_text cavas item
-
- * gui/widgets/e-addressbook-view.c (e_addressbook_view_init):
- default editable to FALSE.
- (book_writable_cb): new function, set our editable field and
- gtk_object_set it on the active view.
- (e_addressbook_view_set_arg): set the active view's editable when
- we set the view's book, and connect the "writable_status" signal
- to book_writable_cb.
- (change_view_type): same.
- (supported_fields_cb): use our "editable" when creating the
- contact editor.
-
- * gui/widgets/e-addressbook-view.h (struct _EAddressbookView): add
- editable field.
-
- * gui/widgets/e-addressbook-model.c (e_addressbook_model_init):
- change the default of editable to FALSE.
-
- * backend/pas/pas-book.c (pas_book_report_writable): new function.
-
- * backend/pas/pas-book.h: prototype for pas_book_report_writable.
-
- * backend/pas/pas-backend-file.c (pas_backend_file_load_uri): if
- we open the file O_RDWR (or create it) report it as writable. if
- we can't open it as O_RDWR, try opening it read-only before we
- attempt to create it.
-
- * backend/pas/pas-backend-ldap.c
- (pas_backend_ldap_process_authenticate_user): if we authenticate
- successfully, grant write permissions (this is lacking but there's
- really nothing we can do to determine the extent of the access
- afforded a user.)
-
-
-2001-03-15 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/e-address-widget.c: Added addressbook querying and
- "cardification" functions, which are turned off by default for now
- because of addressbook bugs. Added a popup menu option to turn
- queries on, so that others can enjoy the thrill of massive flaming
- death.
-
- * gui/component/addressbook-factory.c (main): Made warnings always
- be fatal.
-
- * backend/pas/pas-book-view.c: Added some debugging spew.
-
- * backend/pas/pas-backend-file.c (pas_backend_file_search): Added
- a little experimental code to try to make file searches scale
- better. #if 0/#endif-ed out for now.
-
- * contact-editor/e-contact-quick-add.c: #included e-book-util.h.
-
- * backend/ebook/e-card.c (e_card_name_match_string): Added.
- Looser name-matching function.
- (e_card_email_match_string): Added. Loose e-mail matching.
-
- * backend/ebook/e-book-view-listener.c
- (e_book_view_listener_check_queue): Added code to cause us to
- abort rather than get trapped in a 100%-CPU-consuming loop in
- certain situations. Now we just need to figure out how to avoid
- these situations altogether.
-
- * backend/ebook/e-book-util.c: Added. Now contains the simple
- query stuff and the open local addressbook functions.
-
- * backend/ebook/e-book.c: Moved simple query stuff and open local
- addressbook functions into e-book-util.c.
-
-2001-03-15 Dan Winship <danw@ximian.com>
-
- * gui/widgets/e-minicard-label.c (e_minicard_label_set_arg):
- * gui/widgets/e-minicard.c (e_minicard_set_arg, e_minicard_event):
- Update arguments to e_canvas_item_grab_focus.
-
-2001-03-13 Christopher James Lahey <clahey@ximian.com>
-
- * gui/component/addressbook.c (update_pixmaps): Fix a warning
- here.
-
-2001-03-13 Christopher James Lahey <clahey@ximian.com>
-
- * gui/widgets/Makefile.am (minicard_label_test_LDADD): Change to
- ld order from Greg Williams.
-
-2001-03-13 Christopher James Lahey <clahey@ximian.com>
-
- * backend/pas/pas-backend-file.c
- (pas_backend_file_process_get_book_view): Moved where we call
- pas_book_respond_get_book_view.
-
-2001-03-12 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-ldap.c: add E_STRING_PROP for
- categories.
-
- * backend/pas/evolutionperson.schema: add categories attribute.
-
- * backend/ebook/e-card-simple.c (field_data): add
- E_CARD_SIMPLE_FIELD_CATEGORIES.
-
- * backend/ebook/e-card-simple.h: add
- E_CARD_SIMPLE_FIELD_CATEGORIES.
-
-2001-03-12 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-minicard.c (supported_fields_cb): add is_read_only
- param.
-
- * gui/widgets/e-minicard-view.c (supported_fields_cb): add
- is_read_only param.
-
- * gui/widgets/e-addressbook-view.c (supported_fields_cb): add
- is_read_only param.
-
- * gui/component/select-names/e-select-names-text-model.c
- (e_select_names_text_model_activate_obj): add is_read_only param.
- also, include a little policy here and make it TRUE, as the user
- shouldn't be editting in this context anyway (imo).
-
- * gui/component/addressbook.c (supported_fields_cb): add
- is_read_only param.
-
- * contact-editor/test-editor.c (main): add is_read_only param.
-
- * contact-editor/e-contact-editor.c (set_read_only): new function,
- that either enables or disables all the text fields, combo boxes,
- and some buttons, depending on the state of is_read_only.
- (e_contact_editor_class_init): add read/write arg "is_read_only".
- (full_name_clicked): set the is_read_only of the fullname dialog
- to the editor's.
- (full_addr_clicked): same.
- (e_contact_editor_new): add is_read_only param, that gets set
- along with the other params.
- (e_contact_editor_set_arg): add setter for is_read_only.
- (e_contact_editor_get_arg): add getter for is_read_only.
- (_phone_arrow_pressed): change TRUE to !editor->is_read_only for
- entry.
- (_email_arrow_pressed): same.
- (_address_arrow_pressed): same.
- (enable_writable_fields): same.
-
- * contact-editor/e-contact-editor-fullname.c
- (e_contact_editor_fullname_class_init): add read/write arg
- "is_read_only".
- (e_contact_editor_fullname_set_arg): add setter for is_read_only
- that enables/disables all the entries/combos.
- (e_contact_editor_fullname_get_arg): add getter for is_read_only.
-
- * contact-editor/e-contact-editor-fullname.h (struct
- _EContactEditorFullname): add is_read_only flag.
-
- * contact-editor/e-contact-editor-address.c
- (e_contact_editor_address_class_init): add read/write arg
- "is_read_only".
- (e_contact_editor_address_set_arg): add setter for is_read_only
- that disables/enables all the entries/combos.
- (e_contact_editor_address_get_arg): add getter for is_read_only.
-
- * contact-editor/e-contact-editor-address.h (struct
- _EContactEditorAddress): add is_read_only flag.
-
-2001-03-13 Iain Holmes <iain@ximian.com>
-
- * backend/ebook/Makefile.am: Change the importer includes around a bit.
-
- * backend/ebook/evolution-gnomecard-importer.c: Correctly add the includes.
-
-2001-03-09 JP Rosevear <jpr@ximian.com>
-
- * conduit/Makefile.am: PISOCK_INCLUDEDIR has become
- PISOCK_CFLAGS in gnome-pilot.m4 and remove capplet foo
-
-2001-03-11 Jon Trowbridge <trow@ximian.com>
-
- * backend/ebook/e-book.c (e_book_simple_query): Added. A
- simplified, cancellable query mechanism that lets you avoid
- dealing with EBookView.
- (e_book_simple_query_cancel): Added. Cancels a running query.
-
- * backend/ebook/e-book-types.h: Add enum EBookSimpleQueryStatus.
-
-2001-03-08 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/select-names/e-select-names-popup.c
- (quick_add_cb): Switched to use e_contact_quick_add_free_form.
- Removed debugging code, hopefully without introducing any bugs
- in the process.
-
- * gui/component/select-names/e-select-names-text-model.c
- (e_select_names_text_model_insert_length): Fix bug with commas
- inside of name/address combos. As long as the comma is inside of
- quotes, it will be treated as part of the name rather than as a
- break between addresses.
-
- * gui/component/select-names/e-select-names-completion.c
- (match_nickname): Use e_card_name_to_string for nickname match
- strings.
- (match_email): Use e_card_name_to_string for email match strings.
- (e_select_names_completion_begin): Strip quotes out of query text,
- so we don't produce malformed sexps.
- Added William Blake quote easter egg.
-
- * contact-editor/e-contact-quick-add.c: Further attempts to fix...
- mostly unsuccessful.
- (e_contact_quick_add_free_form): Added. Takes a single string
- and tries to parse out (using some simple, loose rules) the
- name and e-mail -- then calls e_contact_quick_add. An attempt to
- get the computer to automatically Do The Right Thing.
-
- * backend/ebook/e-book.c: Fixed some broken indentation. Yes, I'm
- anal.
-
- * gui/component/GNOME_Evolution_Addressbook.oafinfo: Added oaf_server
- info for EAddressWidget.
-
- * gui/component/GNOME_Evolution_Addressbook.oaf.in: Added oaf_server
- info for EAddressWidget.
-
- * gui/component/addressbook-factory.c (main): Add call to
- e_address_widget_factory_init.
-
- * gui/component/e-address-widget.h:
- * gui/component/e-address-widget.c: Added. A little widget (and a
- Bonobo control, BTW) for displaying addresses, with a left-click
- menu. Used to display addresses in the mail viewer (as embedded
- GtkHTML objects, replacing the text previously used). Still quite
- incomplete.
-
-2001-03-08 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/addressbook-component.c (factory_fn): Specify a
- NULL `EvolutionShellComponentGetDndSelectionFn'.
-
-2001-03-06 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/select-names/e-select-names-text-model.c
- (e_select_names_text_model_insert_length): Fix glitch with
- inserting comma-delimited stuff when length > 1.
-
-2001-03-06 Jon Trowbridge <trow@ximian.com>
-
- * backend/ebook/e-book.c (e_book_load_local_address_book): Added.
- Just encapsulates opening
- file://~username/evolution/local/Contactes/addressbook.db, so that
- path doesn't need to be hardwired in throughout the code.
-
-2001-03-06 Benjamin Kahn <xkahn@cybersites.com>
-
- * contact-editor/e-contact-quick-add.c (clicked_cb):
- Added the third argument to e_contact_editor_new. (Cheated
- and send NULL for the field argument, which is probably
- troublesome. It will be fixed soon by either clahey or
- toshok.)
-
-2001-03-06 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/select-names/e-select-names-model.c
- (e_select_names_model_replace): Fix a reference counting bug.
-
- * gui/component/select-names/e-select-names-manager.c (popup_cb):
- A callback for creating the appropriate popup by calling
- e_select_names_popup.
- (e_select_names_manager_create_entry): Connect popup_cb to the
- entry's popup signal
-
- * gui/component/select-names/e-select-names-popup.c: Added. Code
- for popup right-click menus for recipient entries. Still a bit
- incomplete.
-
- * backend/ebook/e-destination.c (e_destination_get_email_num):
- Added.
-
- * contact-editor/e-contact-quick-add.c: Added. Some code and a
- dialog for very quickly adding entries to the address book.
- Still not fully working.
-
-2001-03-04 Christopher James Lahey <clahey@ximian.com>
-
- * backend/ebook/e-card-simple.c: Cleaned up the formatting in this
- file a bit.
-
- * contact-editor/e-contact-editor.c (e_contact_editor_set_arg):
- Made it so that passing in NULL to the writable_fields arg sets
- the set of writable fields to the empty set.
-
- * gui/component/select-names/e-select-names-text-model.c
- (e_select_names_text_model_activate_obj): Pass NULL as the
- writable_fields argument here.
-
- * gui/widgets/e-addressbook-model.c: Don't offset by one here.
- This way we will get the file_as field as one of our
- ETableColumns.
-
- * gui/widgets/e-addressbook-view.c (SPEC): Updated this for the
- changes in ECardSimple.
-
- * gui/widgets/e-minicard.c (remodel): Don't remodel if the item
- isn't realized.
-
-2001-03-02 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-ldap.c: doh, track renaming of
- objectclass from evolvePerson to evolutionPerson.
-
-2001-03-02 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/evolutionperson.schema: rename evolveperson.schema
- to this, and add remaining attributes.
-
- * backend/pas/pas-backend-ldap.c: add remaining fields, and fix up
- ones that were incorrent (either the ldap_attr or the query prop).
-
-2001-03-02 JP Rosevear <jpr@ximian.com>
-
- * conduit/Makefile.am: update sed script
-
- * conduit/e-address.conduit.in: update for new pilot foo
-
-2001-03-02 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/e-select-names-text-model.c
- (e_select_names_text_model_activate_obj): track change to
- e_contact_editor_new.
-
-2001-03-02 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-ldap.c (add_objectclass_mod): add
- objectclasses for "person", "organizationalPerson", and "top" as
- well, just to be complete.
- (check_schema_support): rename check_for_evolve_person to this, to
- reflect that we're doing more than just checking for that
- objectClass.
- (add_oc_attributes_to_supported_fields): new function.
- (add_to_supported_fields): new function.
- (pas_backend_ldap_destroy): unref supported_fields.
-
-2001-03-02 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-minicard-view.c (supported_fields_cb): new
- function.
- (e_minicard_view_event): split out the creation of the contact
- editor to the supported_fields callback.
-
- * gui/widgets/e-minicard.c (supported_fields_cb): new function.
- (e_minicard_event): split out the creation of the contact editor
- to the supported_fields callback.
-
- * gui/widgets/e-addressbook-view.c (table_double_click): split
- function into two functions, since e_book_get_supported_fields
- requires a callback now.
- (supported_fields_cb): new function.
-
- * gui/component/addressbook.c (new_contact_cb): split this into
- two functions, since e_book_get_supported_fields requires a
- callback now.
- (supported_fields_cb): new function.
-
- * contact-editor/test-editor.c (main): track change to
- e_contact_editor_new (pass NULL for the writable_fields arg.)
-
- * contact-editor/contact-editor.glade: fix several labels so they
- make better sense (since we look them up in e-contact-editor.c.)
-
- * contact-editor/e-contact-editor.h (struct _EContactEditor): add
- writable_fields. also, add it to e_contact_editor_new.
-
- * contact-editor/e-contact-editor.c (e_contact_editor_class_init):
- add writable_fields arg.
- (e_contact_editor_destroy): unref the writable_fields list.
- (e_contact_editor_new): pass @fields as the writable_fields arg.
- (e_contact_editor_set_arg): add writable_fields support.
- (enable_writable_fields): new (very hairy) function, to disable
- everything and reenable just the fields listed in the
- writable_fields list.
- (_email_arrow_pressed): set label-email1, entry-email1, and
- checkbutton-htmlmail to be sensitive since the only way to get
- here is to activate a writable field in the menu.
- (_address_arrow_pressed): set label-address, button-fulladdr, and
- text-address to be sensitive for the same reason.
- (_phone_arrow_pressed): sensitize the label and entry for the same
- reason.
-
-2001-03-02 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/e-card-simple.c (field_data): add new entries for
- phone enums, and fill in the ecard_field with (bogus in all but a
- few cases) strings. these are the strings sent from wombat to
- evolution-addressbook for supported_fields.
- (e_card_simple_get_ecard_field): new function.
- (e_card_simple_map_phone_to_field): new function.
- (e_card_simple_map_email_to_field): new function.
- (e_card_simple_map_address_to_field): new function.
-
- * backend/ebook/e-card-simple.h: add a few phone entries to the
- ECardSimpleField enum, and add prototypes for mapping the list
- types (phone, email, address) to ECardSimpleField. Also, add
- prototype for e_card_simple_get_ecard_field.
-
- * backend/ebook/e-book.c
- (e_book_do_response_get_supported_fields): don't build the EList
- here, it's already built.
-
- * backend/ebook/e-book-listener.h: change fields from the CORBA
- sequence to the EList in our reponse struct.
-
- * backend/ebook/e-book-listener.c
- (e_book_listener_queue_get_supported_fields_response): we make the
- EList here, since after we return the CORBA list is freed up.
-
-2001-03-02 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-file.c
- (pas_backend_file_process_get_supported_fields): implement
- properly, we support everything.
-
-2001-03-01 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/select-names/e-select-names-bonobo.c
- (entry_set_property_fn): Oops, we do need to be able to write to
- "text" after all (for things like Reply-to: to work properly).
- Fixed.
- (impl_SelectNames_get_entry_for_section): Made "text" a writeable
- property again.
-
- * gui/component/select-names/e-select-names-text-model.c
- (e_select_names_text_model_insert_length): Increment pos so that
- we don't reverse strings when length > 1 (a particularly amusing
- bug).
-
- * gui/component/select-names/e-select-names-completion.c
- (e_select_names_completion_destroy): Check for NULL before calling
- gtk_object_unref (GTK_OBJECT (---)), to get rid of annoying error
- messages.
-
-2001-03-01 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/select-names/e-select-names-completion.c: I am an
- idiot.
-
-2001-03-01 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/select-names/e-select-names-table-model.c
- (fill_in_info): Change for new EDestination/ESelectNamesModel API.
-
- * gui/component/select-names/e-select-names-manager.c
- (e_select_names_manager_get_source): Added. A function for
- looking up the ESelectNamesModel by id. (I didn't end up using
- this function, but it might come in handy later.)
- (e_select_names_manager_get_cards): #if 0/#endif out this
- function.
- (e_select_names_manager_create_entry): Modified to attach an
- ESelectNamesCompletion to the entry we create.
- (completion_handler): A post-completion handler for our EEntry, to
- take the completion's extra data (an EDestination) and properly
- stick it into our ESelectNamesModel.
-
- * gui/component/select-names/e-select-names.c
- (real_add_address_cb): Changed to operate on EDestinations rather
- than ECards and to use the new ESelectNamesModel API. This leads
- to a rather nice code simplication.
- (remove_address): Changed for new ESelectNamesModel API.
-
- * gui/component/select-names/e-select-names-bonobo.c
- (entry_get_property_fn): Rather than just passing the entry's text
- through the property bag, get the "address text" from the model.
- This returns a nice, verbose string of addresses with names
- expanded when the address is tied to an ECard (i.e. "Jon
- Trowbridge <trow@ximian.com>").
- (impl_SelectNames_get_entry_for_section): Make the text property
- read-only.
- (entry_set_property_fn): ...and since it is read-only now, chop
- out the setter code.
-
- * gui/component/select-names/e-select-names-text-model.h:
- * gui/component/select-names/e-select-names-text-model.c: Again,
- this code has been (pretty much) totally rewritten to convert all
- text operations into changes on the ESelectNamesModel. This lets
- us give the associated EEntry some (IMHO) nice semantics regarding
- whitespace, etc. Includes object activation, so destinations tied
- to ECards are underlined and can be double-clicked to bring up a
- contact editor.
-
- * gui/component/select-names/e-select-names-model.h:
- * gui/component/select-names/e-select-names-model.c: I've heavily
- modified this object to both hide all implementation details
- (which the old version exposed a bit too much for my peculiar
- tastes) and to act as an EDestination container. The old code put
- the text model operations here. I've moved them all to
- ESelectNamesTextModel --- so the text model actions (insert,
- delete, etc.) are all done through the API rather than operating on
- ESelectNamesModel internals.
-
- * gui/component/select-names/e-select-names-completion.c: Added. A
- fairly complicated object derived from ECompletion that searches
- our local addressbook in various and sundry ways.
-
- * gui/component/select-names/e-select-names-completion.h:
-
- * backend/ebook/e-destination.h:
- * backend/ebook/e-destination.c: Added. This object encapsulates
- a place to sent an email to, which can either be just a address as
- a string ("trow@ximian.com"), a fancier string ("Jon Trowbridge
- <trow@ximian.com>"), or an ECard and a specific address within
- that ECard.
-
-2001-03-01 Christopher James Lahey <clahey@ximian.com>
-
- * gui/widgets/e-minicard-view.c, gui/widgets/e-minicard-view.h,
- gui/widgets/e-minicard.c, gui/widgets/e-minicard.h: Used
- ESelectionModelSimple and the changes to EReflow and EReflowSorted
- to get multiple selection in the minicard view.
-
- * gui/widgets/test-reflow.c: Changed this to get it to compile
- with the changes to EReflow.
-
-2001-02-21 Christopher James Lahey <clahey@ximian.com>
-
- * backend/pas/pas-backend-file.c (pas_backend_file_search): Made
- this pay attention to the return value of e_sexp_parse.
-
- * gui/component/select-names/e-select-names-text-model.c
- (e_select_names_text_model_activate_obj): Fixed a const
- inconsistency here.
-
-2001-02-21 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-book.c (pas_book_queue_get_supported_fields):
- new function.
- (impl_GNOME_Evolution_Addressbook_Book_getSupportedFields): track
- change to idl.
- (pas_book_respond_get_supported_fields): new function.
-
- * backend/pas/pas-book.h: add GetSupportedFields to the
- PASOperation enum. Also, add a stringlist field to the PASRequest
- struct. lastly, add a prototype for
- pas_book_respond_get_supported_fields.
-
- * backend/pas/pas-backend.h: remove prototype for
- pas_backend_get_supported_fields, and remove it from the vtable.
-
- * backend/pas/pas-backend.c (pas_backend_get_supported_fields):
- remove.
- (pas_backend_class_init): no vtable entry for get_supported_fields
- anymore.
-
- * backend/pas/pas-backend-ldap.c
- (pas_backend_ldap_process_get_supported_fields): new function.
- (pas_backend_ldap_process_client_requests): add case for
- GetSupportedFields.
- (pas_backend_ldap_class_init): get_supported_fields isn't in
- vtable anymore.
-
- * backend/pas/pas-backend-file.c
- (pas_backend_file_process_get_supported_fields): new function.
- (pas_backend_file_process_client_requests): add case for
- GetSupportedFields.
- (pas_backend_file_class_init): get_supported_fields isn't in
- vtable anymore.
-
- * backend/idl/addressbook.idl: Book::getSupportedFields now
- returns void and add BookListener::notifySupportedFields.
-
- * backend/ebook/test-client.c (get_fields_cb): new function.
- (auth_user_cb): track change to e_book_get_supported_fields.
-
- * backend/ebook/e-book.c
- (e_book_do_response_get_supported_fields): new function.
- (e_book_check_listener_queue): add case
- GetSupportedFieldsResponse.
- (e_book_get_supported_fields): switch to async model.
-
- * backend/ebook/e-book.h: switch e_book_get_supported_fields to an
- async model.
-
- * backend/ebook/e-book-listener.c
- (e_book_listener_queue_get_supported_fields_response): new
- function.
- (impl_BookListener_response_get_supported_fields): new function.
- (e_book_listener_get_epv): fill in epv's "notifySupportedFields"
-
- * backend/ebook/e-book-listener.h: add an async response for
- GetSupportedFields and add a stringlist member to the
- EBookListenerResponse struct.
-
-2001-02-20 Federico Mena Quintero <federico@ximian.com>
-
- * backend/pas/pas-book-factory.c (pas_book_factory_activate):
- Moved the register_factory() code to here, since it was the only
- thing being called anyways.
- (PasBookFactoryPrivate): Added a "registered" flag.
- (pas_book_factory_activate): Set the registered flag.
- (pas_book_factory_destroy): Deactivate the factory when we go away.
-
-2001-02-20 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/e-book.c (e_book_get_supported_fields): new function.
-
- * backend/ebook/e-book.h: add e-book interface to getting
- supported fields.
-
- * backend/ebook/test-client.c (auth_user_cb): shoe-horn in some
- spew about supported fields.
-
-2001-02-19 JP Rosevear <jpr@ximian.com>
-
- * conduit/Makefile.am: Remove PISOCK_LIBDIR
-
-2001-02-19 Jon Trowbridge <trow@ximian.com>
-
- * gui/component/select-names/e-select-names-manager.c
- (e_select_names_manager_create_entry): When creating the entry,
- open up an ebook (corresponding to the local addressbook) and make
- the entry use an EAddressCompletion.
- (completion_handler): Added; this is the actual completion
- handler, which manipulates the entry when the user selects
- something from the drop-down.
-
- * gui/component/select-names/e-select-names-model.c: Various hacks
- by clahey to unbreak e_select_names_model_add_item,
- e_select_names_model_replace_item (which I added) and
- e_select_names_model_remove_item.
-
- * gui/component/select-names/e-select-names-text-model.c
- (e_select_names_text_model_obj_count,
- e_select_names_text_model_get_nth_obj): Make chunks of text that
- correspond to ECards in the ESelectNamesModel be embedded objects.
- (e_select_names_text_model_activate_obj): On activation, pop up a
- contact editor for the embedded object's card.
- (e_select_names_text_model_model_changed): Fixed to work with
- ETextModel API changes.
- (e_select_names_text_model_set_text): Make const correct.
- (e_select_names_text_model_insert): Make const correct.
- (e_select_names_text_model_insert_length): Make const correct.
-
- * backend/ebook/e-address-completion.h,
- backend/ebook/e-address-completion.c: Added. EAddressCompletion
- is a derived class of ECompletion that does asynchronous address
- lookups for completions.
-
-2001-02-17 Chris Toshok <toshok@ximian.com>
-
- * backend/idl/addressbook.idl: add sequence<string> typedef, and
- add getSupportedFields method.
-
- * backend/pas/pas-book.c
- (impl_GNOME_Evolution_Addressbook_Book_getSupportedFields): new
- function.
-
- * backend/pas/pas-backend.c (pas_backend_class_init): init
- get_supported_fields = NULL.
- (pas_backend_get_supported_fields): new function.
-
- * backend/pas/pas-backend.h: add prototype for
- pas_backend_get_supported_fields.
-
- * backend/pas/pas-backend-file.c
- (pas_backend_file_get_supported_fields): new function.
- (pas_backend_file_class_init): fill in get_supported_fields.
-
- * backend/pas/pas-backend-ldap.c
- (pas_backend_ldap_get_supported_fields): new function.
- (pas_backend_ldap_class_init): fill in get_supported_fields.
-
-2001-02-14 Christopher James Lahey <clahey@ximian.com>
-
- * backend/pas/pas-backend-ldap.c: Undefine E_STRING_PROP and
- E_LIST_PROP here.
-
- * contact-editor/e-contact-editor.c,
- contact-editor/e-contact-editor.h (e_contact_editor_raise): Added
- this function.
-
- * gui/widgets/e-minicard.c, gui/widgets/e-minicard.h
- (e_minicard_event): Added an editor field to the EMinicard object.
- Made it so that if you double click on the same card twice, it
- doesn't open a new window, but instead raises the old.
-
-2001-02-08 Iain Holmes <iain@ximian.com>
-
- * gui/component/addressbook-storage.c (addressbook_source_free):
- Free the ldap.binddn.
-
- * gui/widgets/e-addressbook-view.c
- (e_addressbook_view_setup_menus): Free the dir strings.
-
-2001-02-08 Christopher James Lahey <clahey@ximian.com>
-
- * contact-editor/e-contact-editor.c (categories_clicked): Set the
- header on the category dialog we pop up.
-
-2001-02-12 Kjartan Maraas <kmaraas@gnome.org>
-
- * backend/ebook/GNOME_Evolution_Addressbook_GnomeCard_Importer.oaf.in: Translations.
- * gui/component/select-names/GNOME_Evolution_Addressbook_SelectNames.oaf.in:
- Marked strings for translation in this newly created file.
- * gui/component/select-names/Makefile.am: Hook up the .oaf.in files in the
- xml-i18n-tools framework.
- * gui/component/Makefile.am: Same as above.
- * gui/component/GNOME_Evolution_Addressbook.oaf.in: Marked stuff for translation here
- too.
-
-2001-02-11 Jason Leach <jasonleach@usa.net>
-
- * gui/component/addressbook.c: Removed an ancient #include
- <libgnorba/gnorba.h>
-
-2001-02-11 Gediminas Paulauskas <menesis@delfi.lt>
-
- Really use xml-i18n-tools.
-
- * conduit/e-address-conduit-control-applet.desktop: removed.
- * conduit/e-address-conduit-control-applet.desktop.in: added empty.
- * conduit/Makefile.am: reflect above changes, merge translations.
-
- * contact-editor/e-contact-editor-strings.h,
- contact-editor/fulladdr.glade.h, contact-editor/fullname-strings.h,
- contact-editor/e-contact-editor-confirm-delete.glade.h,
- gui/component/select-names/select-names.glade.h:
- removed these files, xml-i18n-extract takes care of strings itself.
-
- * contact-editor/*.glade,
- gui/component/select-names/select-names.glade,
- gui/widgets/alphabet.glade, printing/e-contact-print.glade:
- changed project options to not output_translatable_strings.
-
- * contact-editor/Makefile.am, gui/widgets/Makefile.am,
- gui/component/select-names/Makefile.am, printing/Makefile.am:
- do not include removed files in EXTRA_DIST.
-
-2001-02-07 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-ldap.c (check_for_evolve_person): flesh
- out this check. #ifdef the entire thing OPENLDAP2, as it only
- works with the new schema stuff in openldap 2.x (both on server
- and client, so upgrade your server.)
-
-2001-02-07 Christopher James Lahey <clahey@ximian.com>
-
- * gui/widgets/e-addressbook-view.c: Added N_("* Click here to add
- a contact *").
-
-2001-02-07 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-ldap.c (pas_backend_ldap_connect): only
- set the DEBUG_LEVEL if we're OPENLDAP2.
-
-2001-02-06 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-ldap.c (email_compare): return TRUE if
- equal, FALSE otherwise.
- (business_compare): same.
- (homephone_compare): same.
- (email_ber): return NULL if there are no elements in our list.
- (homephone_ber): same.
- (business_ber): same.
- (build_mods_from_ecards): add smarts to handle list elements
- properly (like email, business_phone, home_phone.) now we'll
- properly send updates if any element in the list changes.
-
-2001-02-06 Christopher James Lahey <clahey@ximian.com>
-
- * gui/widgets/Makefile.am (INCLUDES): Added
- -DEVOLUTION_DATADIR=\""$(datadir)"\".
-
- * gui/widgets/e-addressbook-view.c
- (e_addressbook_view_setup_menus): Changed the local and system
- directories.
-
-2001-02-06 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-ldap.c (create_card_handler): doh,
- didn't mean to commit this.
-
-2001-02-06 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/evolveperson.schema: new file. this will eventually
- form the suggested additions to an existing openldap server that,
- along with support for inetorgperson, will allow people to store
- all evolution attributes in ldap.
-
-2001-02-06 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-ldap.c (pas_backend_ldap_init): don't
- need the = NULL's since we g_new0.
- (check_for_evolve_person): new function.
- (pas_backend_ldap_connect): check to see if the evolvePerson
- objectclass is there.
- (build_mods_from_ecards): right now, just silently skip the extra
- attributes if we don't support evolvePerson.
- (add_objectclass_mod): new function, add both inetOrgPerson and
- (if it's available) evolvePerson as objectclasses.
- (pas_backend_ldap_process_authenticate_user): also check to see if
- evolvePerson is there, if we couldn't do it (due to auth reasons)
- in the connect method.
- (prop_info): change the telephoneNumber LDAP attribute to be used
- for evolution's business phone numbers. the primary phone number
- will be a single valued attribute on evolvePerson.
- (business_populate): new function.
- (business_ber): new function.
- (business_compare): new function.
-
-2001-02-05 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-ldap.c (create_card_handler): err,
- allocate 2 char*s when i assign 2 char*s.
-
-2001-02-05 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-ldap.c (modify_card_handler): switch to
- ldap_modify_ext_s if OPENLDAP2, as ldap_modify_s is deprecated.
- (build_mods_from_ecards): don't include the mod if the value is ""
- - this isn't valid on schema checking ldap servers.
- (homephone_populate): new function.
- (homephone_ber): new function.
- (homephone_compare): new function.
- (create_card_handler): add spew when adding cards so I can see
- what's going on.
-2001-02-05 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/component/addressbook-config.c (table_add_elem): Save the
- help_text in the closure.
-
-2001-02-05 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/widgets/Makefile.am (libeminicard_a_SOURCES): Added
- gal-view-factory-minicard.c, gal-view-factory-minicard.h,
- gal-view-minicard.c, and gal-view-minicard.h.
-
- * gui/widgets/gal-view-factory-minicard.c,
- gui/widgets/gal-view-factory-minicard.h,
- gui/widgets/gal-view-minicard.c, and
- gui/widgets/gal-view-minicard.h: New classes for minicard view
- type.
-
- * gui/widgets/e-addressbook-view.c: Deploy gal-view stuff
- properly.
-
-2001-02-05 Christopher James Lahey <clahey@helixcode.com>
-
- * backend/ebook/e-card.c (e_card_get_vcard): Make the Note field
- be quoted printable.
-
-2001-01-27 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/search/e-addressbook-search-dialog.c
- (e_addressbook_search_dialog_init): This should be a close button,
- not a cancel button.
-
-2001-02-04 Christopher James Lahey <clahey@ximian.com>
-
- * gui/component/select-names/e-select-names-manager.c
- (e_select_names_manager_activate_dialog): Call
- e_select_names_set_default when appropriate.
-
- * gui/component/select-names/e-select-names.c,
- gui/component/select-names/e-select-names.h: Added support for
- double clicking sending the selected contacts to the default
- section. Added a set_default function. Made multiple selection
- work.
-
-2001-01-29 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook-config.c
- (addressbook_config_source_label): #ifdef INCLUDE_FILE_SOURCE.
- (table_add_elem): add help_text parameter and set up focus_in
- events to display the help in the dialog's html area.
- (focus_help): new function, calls put_html on the help text.
- (addressbook_ldap_auth_item_new): add help texts.
- (addressbook_source_item_new): add help texts.
- (addressbook_source_dialog): add help texts.
-
-2001-01-27 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/select-names/e-select-names.c
- (e_select_names_add_section): Remove the butt-ugly arrow icon and
- replace it with a less invasive "->" icon.
-
-2001-01-25 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-ldap.c (build_mods_from_ecards): add
- comment about the else block here.
- (prop_info): add home_address, business_address, business_fax,
- assistant, and isdn.
-
-2001-01-25 Christopher James Lahey <clahey@helixcode.com>
-
- * backend/pas/pas-backend-file.c (pas_backend_file_load_uri): Made
- this only add the initial VCard if it finds a file
- "create-initial" in the directory it's creating the database in.
-
- * gui/component/addressbook-component.c (factory_fn): Added a
- create_folder function.
-
- * gui/search/e-addressbook-search-dialog.c
- (e_addressbook_search_dialog_init): Fixed an unused variable
- warning.
-
-2001-01-25 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/widgets/e-addressbook-view.c
- (e_addressbook_view_setup_menus): Setup the view collection
- properly and handle the "display_view" signal.
-
-2001-01-25 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/addressbook.c (update_pixmaps): Consider the
- placeholder in the path for the "Print" item.
-
-2001-01-25 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/addressbook.c (update_pixmaps): Set the icon for
- "/Toolbar/Find" to "24_find_contact.xpm".
-
-2001-01-25 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/addressbook.c (set_pixmap): New.
- (update_pixmaps): New function, setting the pixmaps for the items
- of type "pixbuf", using `set_pixmap'.
- (control_activate): Call it.
-
-2001-01-25 Not Zed <NotZed@Ximian.com>
-
- * backend/pas/pas-backend-ldap.c: esexp api change fixes.
-
- * backend/pas/pas-backend-file.c (entry_compare): Fix for e_sexp api changes.
- (vcard_matches_search): esexp api fixes.
- (pas_backend_file_search): Ouch, unref the e-sexp properly (not gtk object).
-
-2001-01-24 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-ldap.c (email_ber_func): make sure to
- add the lengths here (include the \0? anyone?).
- (build_mods_from_ecards): if we're filling in mod->mod_bvalues,
- set mod_op |= LDAP_MOD_BVALUES.
-
-2001-01-23 Jason Leach <jasonleach@usa.net>
-
- (Fix #1225: advanced search cancel/close)
-
- * gui/search/e-addressbook-search-dialog.c
- (e_addressbook_search_dialog_init): Set it up with Search and a
- Cancel button, Search is still the default.
-
-2001-01-23 JP Rosevear <jpr@ximian.com>
-
- * conduit/address-conduit.c (local_record_from_ecard): properly ref
- the ecard. still need to kill some memory leaks.
-
-2001-01-22 JP Rosevear <jpr@ximian.com>
-
- * conduit/Makefile.am: remove vfs dependency
-
-2001-01-21 JP Rosevear <jpr@ximian.com>
-
- * conduit/address-conduit.c (delete_record): Remove
- deleted records from the pilot map so we don't have dupes in the future
-
-2001-01-19 Dan Winship <danw@ximian.com>
-
- * gui/widgets/e-addressbook-view.c (table_right_click):
- * gui/widgets/e-minicard.c (e_minicard_event): Update for
- e_popup_menu_run prototype change.
-
-2001-01-19 Jason Leach <jasonleach@usa.net>
-
- (Adding a boolean "entry_changed" BonoboPropertyBag arg)
-
- * gui/component/select-names/e-select-names-bonobo.c
- (entry_set_property_fn): Use a gtk_object_set_data to set the
- property to TRUE here.
-
- (entry_changed): New function, calls bonobo_control_set_property
- if entry_changed hasn't been set to TRUE yet.
-
- (impl_SelectNames_get_entry_for_section): Connect "changed" on
- each entry_widget to the new entry_changed() func.
-
-2001-01-19 JP Rosevear <jpr@ximian.com>
-
- * conduit/address-conduit.c (ecard_from_remote_record): always free
- the delivery elements and correct embarrassingly stupid memory error
- that was causing the addressbook conduit problems.
-
- * backend/ebook/e-book-view-listener.c
- (e_book_view_listener_check_queue): ref/unref ourself when processing
- in case someone we signal unrefs us.
-
- * conduit/address-conduit.c (sequence_complete): disconnect signals
- when complete
-
-2001-01-17 Federico Mena Quintero <federico@ximian.com>
-
- * backend/pas/pas-book-factory.c (pas_book_factory_activate): Made
- it return a gboolean; it was completely ignoring the return value
- from register_factory().
-
-2001-01-17 Larry Ewing <lewing@helixcode.com>
-
- * backend/ebook/.cvsignore: add evolution-gnomecard-importer.
-
- * backend/ebook/Makefile.am (oaf_DATA): don't require the pine
- oainfo file until it is actually added to the repository. We need
- to keep the build working for nightlies to work.
-
-2001-01-16 Jason Leach <jasonleach@usa.net>
-
- * backend/pas/pas-backend-file.c (INITIAL_VCARD): s/Helix
- Code/Ximian/ for the initial contact card.
-
-2001-01-15 JP Rosevear <jpr@ximian.com>
-
- * conduit/address-conduit.c (print_local): prevent segfaults and
- buffer overflows
- (print_remote): ditto
-
-2001-01-14 JP Rosevear <jpr@ximian.com>
-
- * conduit/Makefile.am: pass -module and -avoid-version to conduit
- linker
-
-2001-01-12 Ettore Perazzoli <ettore@helixcode.com>
-
- * gui/component/addressbook-component.c (factory_fn): Pass NULL as
- the @copy_folder_fn arg to `evolution_shell_component_new'.
-
-2001-01-12 Miguel de Icaza <miguel@ximian.com>
-
- * gui/widgets/e-addressbook-view.c: added i18n for etable.
-
-2001-01-11 Chris Toshok <toshok@helixcode.com>
-
- * backend/pas/pas-backend-ldap.c
- (pas_backend_ldap_process_create_card): get a book view from
- somewhere so we can give status messages - choose the first one in
- the list.
- (pas_backend_ldap_process_modify_card): same.
- (pas_backend_ldap_process_remove_card): same.
- (prop_info): add more properties, like home_phone, mobile, pager,
- uri, org_unit, office, title, and manager.
-
-2001-01-09 Miguel de Icaza <miguel@gnu.org>
-
- * gui/widgets/Makefile.am (minicard_widget_test_LDADD): Put GNOME
- libraries at the end to make the thing compile.
-
- * printing/Makefile.am: Order LDADD flags correctly so it compiles.
-
-2001-01-09 Chris Toshok <toshok@helixcode.com>
-
- * gui/component/addressbook.c (addressbook_factory_new_control):
- connect with the EAddressbookView's status_message signal.
- (set_status_message): set the status message on the ShellView
- Interface associated with our control.
- (retrieve_shell_view_interface_from_control): new function. get
- the shell view inteface associated with a control.
-
- * gui/widgets/e-addressbook-view.c
- (e_addressbook_view_class_init): register status_message signal.
- (status_message): new function, emit our status_message signal.
- (change_view_type): connect with the view->object's
- "status_message" signal.
-
- * gui/widgets/e-addressbook-view.h (struct
- _EAddressbookViewClass): add status_message signal.
-
-2001-01-09 Chris Toshok <toshok@helixcode.com>
-
- * gui/widgets/e-minicard-view-widget.c
- (e_minicard_view_widget_class_init): register our status_message
- signal.
- (status_message): new function, emit our status_message signal.
- (e_minicard_view_widget_realize): connect to the EMinicardView's
- status_message signal.
-
- * gui/widgets/e-minicard-view-widget.h: add status_message signal.
-
- * gui/widgets/e-minicard-view.c (e_minicard_view_class_init):
- register our status_message signal.
- (e_minicard_view_init): init status_message_id.
- (status_message): new function, emit our status_message signal.
- (book_view_loaded): connect to the EBookView's status_message
- signal.
- (disconnect_signals): disconnect status_message_id.
-
- * gui/widgets/e-minicard-view.h: add status_mesage_id, and
- status_message signal.
-
- * gui/widgets/e-addressbook-model.c (status_message): new
- function, emit our status_message.
- (e_addressbook_model_class_init): register our "status_message"
- signal.
- (book_view_loaded): connect to the EBookView's status_message
- signal, so we can chain it to our parent.
- (e_addressbook_model_init): init status_message_id.
- (remove_book_view): disconnect status_message_id.
-
- * gui/widgets/e-addressbook-model.h: add status_message_id, and
- status_message signal.
-
- * backend/pas/pas-backend-ldap.c change the objectclass we create
- objects with to "inetOrgPerson" as it encompasses the fields we
- use.
- (create_dn_from_ecard): remove the mail/org handling from
- here. we just prepend cn=$cn onto the base dn.
- (create_card_handler): remove the NULL that build_mods_from_ecards
- adds at the end, and insert our objectClass.
- (modify_card_handler): call search_for_dn to get the ECardSimple
- of the old card, since it might (and does in the current code)
- doing a brute force search.
- (search_for_dn): new function, to search for an entry by its dn.
- right now we brute force (objectclass=*) under the base dn and
- compare dn's. going to add a first pass that explodes the dn and
- searches that way, using (objectclass=*) as a last resort. also,
- here's where we'd put the extensibleMatch code if we want to go
- that route.
-
- * backend/ebook/e-card.c (e_card_set_arg): if we're setting the
- full name regenerate ecard->name.
-
-2001-01-04 Chris Toshok <toshok@helixcode.com>
-
- * backend/ebook/e-book-listener.c
- (e_book_listener_queue_authentication_response): new function.
- (impl_BookListener_respond_authentication_result): new function.
- (e_book_listener_get_epv): fill in
- epv->notifyAuthenticationResult.
-
- * backend/ebook/e-book-listener.h: add AuthenticationResponse to
- EBookListenerOperation.
-
- * backend/ebook/e-book.c (e_book_authenticate_user): new function.
-
- * backend/ebook/e-book.h: add prototype for
- e_book_authenticate_user.
-
- * backend/idl/addressbook.idl (GNOME:Evolution:Addressbook:Book):
- add authenticateUser method.
- (GNOME:Evolution:Addressbook:BookListener): add
- AuthenticationFailed and AuthenticationRequired to CallStatus.
- also add notifyAuthenticationResult method.
-
- * backend/pas/pas-backend-file.c
- (pas_backend_file_process_authenticate_user): dummy
- authenticate_user function that always succeeds.
- (pas_backend_file_process_client_requests): respond to the
- AuthenticateUser request.
-
- * backend/pas/pas-backend-ldap.c (pas_backend_ldap_build_query):
- gtk_object_unref(sexp) => s_exp_unref(sexp).
- (pas_backend_ldap_process_authenticate_user): fill in to use
- ldap_simple_bind_s.
- (pas_backend_ldap_process_client_requests): respond to the
- AuthenticateUser request.
-
- * backend/pas/pas-book.c (pas_book_queue_authenticate_user): new
- function.
- (impl_GNOME_Evolution_Addressbook_Book_authenticateUser): new
- function.
- (pas_book_respond_authenticate_user): new function.
- (pas_book_get_epv): fill in epv->authenticateUser.
-
- * backend/pas/pas-book.h: add AuthenticateUser operation type, and
- add user/passwd to the PASRequest struct.
-
- * gui/component/addressbook-storage.c
- (addressbook_storage_get_source_by_uri): new function. should use
- a hashtable, perhaps, but the lists will generally be small
- anyway.
-
- * gui/component/addressbook-storage.h: add prototype for
- addressbook_storage_get_source_by_uri.
-
- * gui/component/addressbook-config.c
- (addressbook_source_dialog_set_source): fill in the binddn if the
- auth page is shown.
-
- * gui/component/addressbook.c (book_open_cb): shoe-horn
- authentication in here. if the source was configured to use
- authentication, authenticate the user after opening the ebook.
- also, be paranoid and clear out the password after authenticating.
- (book_auth_cb): callback for auth. set the "book" arg on the
- view->view here.
- (passwd_cb): set the view's passwd that'll be used in
- book_open_cb.
- (addressbook_view_free): g_free view->passwd.
-
-2001-01-04 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/component/addressbook-component.c,
- gui/component/addressbook-component.h
- (addressbook_component_get_shell_client): Added this function.
-
- * gui/component/select-names/e-select-names.c,
- gui/component/select-names/e-select-names.h: Added code for the
- ability to switch between different folders. This doesn't work
- yet.
-
- * gui/component/select-names/select-names.glade,
- gui/component/select-names/select-names.glade.h: Added an option
- menu to this dialog.
-
-2001-01-04 JP Rosevear <jpr@helixcode.com>
-
- * conduit/Makefile.am: Fix hard coded library names that were
- accidentally committed (i'm looking at you miggie)
-
- * contact-editor/e-contact-editor.c (categories_clicked): Reflect
- renaming.
-
- * contact-editor/e-contact-editor-categories.[hc]: These are
- living in gal now
-
-2001-01-04 JP Rosevear <jpr@helixcode.com>
-
- * backend/pas/pas-backend-file.c (pas_backend_file_book_view_free):
- Need to e_sexp_unref the the sexp, not gtk_object_unref it.
-
-2001-01-03 Michael Meeks <michael@helixcode.com>
-
- * gui/widgets/e-addressbook-model.c (get_view): check
- capabilities is valid before doing a strstr.
-
-2001-01-03 Michael Meeks <michael@helixcode.com>
-
- * backend/pas/pas-backend-file.c (pas_backend_file_search):
- g_strdup things we g_free.
-
-2001-01-02 Christopher James Lahey <clahey@helixcode.com>
-
- * contact-editor/e-contact-editor.c (delete_cb): Make sure this
- won't crash if the given contact is removed from the database
- while this function is being called.
-
- * gui/widgets/e-minicard.c: Made sure this won't crash if the
- given contact is removed from the database while the right click
- menu is being displayed.
-
-2000-12-30 Chris Toshok <toshok@helixcode.com>
-
- * gui/component/addressbook-config.c (edit_source_clicked): copy
- the dialog's source, destroy the dialog after we're done, and make
- sure to update both columns in the clist.
- (add_source_clicked): copy the dialog's source, and destroy the
- dialog when we're done.
- (addressbook_source_dialog_destroy): free up all the dialog's
- memory.
-
- * gui/component/addressbook.c (set_prop): allow file: uri's that
- point to files, not just dirs that contain addressbook.db. The
- rule is the addressbook file has to end in .db.
-
- * gui/component/addressbook-storage.c (file_source_foreach):
- contactserver => contactfile. cut and paste error.
- (addressbook_storage_init_source_uri): use file://%s to build the
- uri.
-
- * gui/component/e-ldap-server-dialog.[ch]: forgot to remove these
- in my last commit.
-
-2000-12-29 Chris Toshok <toshok@helixcode.com>
-
- * gui/component/addressbook.c (config_cb): new function, calling
- our new config ui code.
- (control_activate): no longer load evolution-addressbook-ldap.xml,
- as it's not there.
-
- * gui/component/addressbook-component.c (owner_set_cb):
- setup_ldap_storage => addressbook_storage_setup.
-
- * gui/component/Makefile.am (evolution_addressbook_SOURCES):
- remove e-ldap-storage.[ch] and add addressbook-storage.[ch].
- (glade_DATA): remove ldap-server-dialog.glade and add
- addressbook-config.glade.
- (EXTRA_DIST): same.
-
- * gui/component/addressbook-config.[ch]: add another dialog to
- give a list of our sources and offer the Add/Delete/Edit
- interface. This plugs into the previous dialog work (the source
- editor.)
-
- * gui/component/addressbook-storage.[ch]: new files, containing
- the remains of e-ldap-storage.[ch] and adding the new
- AddressbookSource type and it's subordinates. Also, the xml
- format has changed slightly and the file name is no longer
- ~/evolution/ldap-servers.xml - it's
- ~/evolution/addressbook-sources.xml.
-
- * gui/component/addressbook-config.glade: new file, new config
- interface.
-
- * gui/component/ldap-server-dialog.glade: removed.
-
- * gui/component/e-ldap-storage.[ch]: removed.
-
-2000-12-28 Chris Toshok <toshok@helixcode.com>
-
- * gui/component/Makefile.am (evolution_addressbook_SOURCES): add
- addressbook-config.[ch].
-
- * gui/component/addressbook-config.c,
- gui/component/addressbook-config.h: new files, containing at the
- moment a beautiful "new/edit source dialog" inspired by the
- mail-config-gui code. It'll be ready for prime time after rev'ing
- the .xml file the addressbook uses to store it's "other sources"
- to include files, and the addition of the ldap auth stuff.
-
-2000-12-25 Miguel de Icaza <miguel@helixcode.com>
-
- * gui/widgets/e-minicard.c (e_minicard_realize): Set draw
- background to FALSE.
-
- * gui/widgets/e-minicard-label.c (e_minicard_label_construct): ditto.
- (e_minicard_label_construct): ditto
-
-2000-12-23 Christopher James Lahey <clahey@helixcode.com>
-
- * contact-editor/fullname-strings.h,
- contact-editor/fullname.glade: Added Ms. and Miss to the prefix
- drop down box. Patch submitted by Martin Hicks <mort@bork.org>.
-
-2000-12-21 JP Rosevear <jpr@helixcode.com>
-
- * conduit/address-conduit.c (cursor_cb): Ref the cards that get put
- in the change list
- (next_changed_item): util function to get the real next changed item
- (compute_status): really compute the status of the record
- (local_record_from_uid): Set the id of the temporary card
- (check_for_slow_setting): Make this check a little saner
- (card_added): Only record the CardObjectChange if the card is not
- archived
- (card_changed): ditto
- (card_removed): ditto
- (set_status_cleared): actually clear the status
- (for_each_modified): Clean out cruft and use next_changed_item
- (add_record): Set the new id properly in our local card copy
- (replace_record): handle the case where the record has been deleted
- and we need to call add. need to update the changed_hash entry
- (delete_record): Don't panic if the card is not found, its already
- been deleted.
-
- * backend/pas/pas-backend-file.c (pas_backend_file_book_view_copy):
- The change_context no longer has a del_cards member
- (pas_backend_file_book_view_free): ditto
- (pas_backend_file_process_get_changes): ditto
- (pas_backend_file_changes_foreach_key): just record the id
- (pas_backend_file_changes): notify_remove needs an id not a vcard
-
-2000-12-20 JP Rosevear <jpr@helixcode.com>
-
- * conduit/address-conduit.c (match): Use my own wrapper
- functions instead of trying to *directly* access the the data
- structures my self
- (post_sync): Put in hack to prevent syncing the same records twice
- (local_record_from_uid): set the card id when creating a blank one
- (add_record): Set the id of the card we have and don't go to the
- server to get the latest version
-
-2000-12-19 JP Rosevear <jpr@helixcode.com>
-
- * conduit/address-conduit.c (ecard_from_remote_record): Convert
- pilot strings to utf for the e-cards.
-
-2000-12-19 JP Rosevear <jpr@helixcode.com>
-
- * conduit/address-conduit.c (local_record_from_ecard): Convert ecard
- strings to pilot encodings
-
-2000-12-19 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/widgets/e-addressbook-view.c (delete): Made it so that if
- you select multiple contacts, the right click menu to delete
- deletes them all.
-
-2000-12-18 Chris Toshok <toshok@helixcode.com>
-
- * backend/pas/pas-backend-ldap.c (ldap_error_to_response): always
- use LDAP_NAME_ERROR (in the openldap1 case it's #defined to
- NAME_ERROR).
- (build_card_from_entry): ldap_get_values can return NULL. also,
- openldap2 keeps us from getting at ldap->ld_errno, so we can't
- tell if there was a decoding error like we used to. the double
- free problem where ldap would free the ber if there was a decoding
- problem might be fixed now.. further investigation is needed.
- for now we leak in openldap2.
- (ldap_search_handler): the ldap structure is opaque, so use
- ldap_search_ext to give the extra information (the max responses,
- timeout, etc.) in the openldap2 case.
-
-2000-12-13 Christopher James Lahey <clahey@helixcode.com>
-
- * backend/pas/pas-backend-ldap.c (ldap_error_to_response): Test
- for the existance of LDAP_NAME_ERROR and if it exists as a macro,
- use it instead of NAME_ERROR.
-
-2000-12-14 Michael Meeks <michael@helixcode.com>
-
- * gui/component/GNOME_Evolution_Addressbook.oafinfo: update cut
- and paste description error.
-
-2000-12-13 Dan Winship <danw@helixcode.com>
-
- * gui/widgets/e-minicard-control.c (stream_read): NULL-terminate
- the returned vcard so we don't sometimes end up with trailing
- junk that makes libversit unhappy.
-
-2000-12-13 Iain Holmes <iain@helixcode.com>
-
- * gui/component/select-names/e-select-names.c
- (e_select_names_add_section): Make the -> into a GNOME stock image.
-
-2000-12-09 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/component/select-names/e-select-names.c
- (e_select_names_init): Connect to the "cursor_change" signal on
- the ETable here instead of the ETableScrolled.
- (remove_address): Added the col and event parameters to this
- callback to match the added parameters to the double click signal.
- (e_select_names_add_section): Connect to the "double_click" signal
- on the ETable here instead of the ETableScrolled.
-
-2000-12-09 Christopher James Lahey <clahey@helixcode.com>
-
- * backend/ebook/e-card.c (e_card_set_arg): When setting the "name"
- argument, copy the incoming name. This fixes a crash.
-
-2000-12-09 Christopher James Lahey <clahey@helixcode.com>
-
- * contact-editor/e-contact-editor.c: Made editing the name using
- the full name button set the file as entry properly. Made it
- so that the address parse that the user chooses after
- clicking on the Full Address... button gets saved.
-
-2000-12-08 Christopher James Lahey <clahey@helixcode.com>
-
- * contact-editor/e-contact-editor.c (full_name_clicked): Made it
- so that the editor->name is set after the entry is changed. This
- means that the reparse that the person chose is saved.
-
-2000-12-07 Ettore Perazzoli <ettore@helixcode.com>
-
- * gui/component/e-ldap-storage.c (setup_ldap_storage): Pass NULL
- as the @toplevel_node_handler_id argument to
- `evolution_storage_new'.
-
-2000-12-08 Christopher James Lahey <clahey@helixcode.com>
-
- * backend/ebook/e-card.c: Fixed some formatting.
-
- * contact-editor/e-contact-editor-categories.h: Removed an
- unneeded #include.
-
- * gui/widgets/e-addressbook-view.c: Connect to the signals on the
- ETable instead of the ETableScrolled.
-
-2000-12-07 JP Rosevear <jpr@helixcode.com>
-
- * conduit/address-conduit.c (local_record_from_uid): Pass "" rather
- than NULL to e_card_new.
- (local_record_from_ecard): Make sure ecard->name is valid
- (check_for_slow_setting): Remove hard coded test value
- (card_added): g_strdup the resul of e_card_get_id
- (card_changed): ditto
-
-2000-12-07 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/widgets/e-addressbook-view.c: Got rid of code referencing
- the ETableScrolled proxy functions.
-
-2000-12-06 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/component/addressbook.c: Moved the gal view menu stuff from
- here to EAddressbookView.
-
- * gui/widgets/e-addressbook-view.c,
- gui/widgets/e-addressbook-view.h: New function to set up the menus
- for the EAddressbookView.
-
-2000-12-06 JP Rosevear <jpr@helixcode.com>
-
- * conduit/Makefile.am: Another conduit build fix
-
-2000-12-05 JP Rosevear <jpr@helixcode.com>
-
- * backend/pas/pas-backend-file.c (pas_backend_file_changes_foreach_key):
- Create an empty vcard with the appropriate id for deleted cards
-
- * conduit/address-conduit.c (ecard_from_remote_record): Ensure the
- address fields are added sensibly
-
-2000-12-05 Ettore Perazzoli <ettore@helixcode.com>
-
- * gui/component/e-ldap-storage.c (setup_ldap_storage): Updated the
- call to `evolution_storage_new()': pass NULL for
- @toplevel_node_uri.
-
-2000-11-28 JP Rosevear <jpr@helixcode.com>
-
- * conduit/address-conduit.c (local_record_to_pilot_record): Return
- a struct rather than a pointer to a struct
- (view_cb): kill warning
- (compare): local_record_to_pilot_record now returns a struct
- (prepare): ditto
- (free_prepare): remove as per gnome-pilot changes
- (conduit_get_gpilot_conduit): don't listen for free_prepare signal
-
-2000-11-27 JP Rosevear <jpr@helixcode.com>
-
- * conduit/address-conduit.h: Remove "complete" field
-
- * conduit/address-conduit.c (print_local): Make it print useful debug
- info
- (print_remote): ditto
- (local_record_from_ecard): Make sure phone numbers get out to the pilot
- (ecard_from_remote_record): Set phone strings to "" if they are null
- (sequence_complete): unref the book view
- (view_cb): ref the book view
- (free_prepare): do nothing
-
- * backend/pas/pas-backend-file.c (pas_backend_file_book_view_free):
- Destroy the card lists with the rest of the view.
- (pas_backend_file_changes): Don't destroy the card lists here
- (pas_backend_file_book_view_free): Free the card/id lists in the
- change context here, the correct place.
- (pas_backend_file_changes): instead of here...
-
-2000-11-22 Christopher James Lahey <clahey@helixcode.com>
-
- * backend/pas/pas-backend-file.c: Set view.change_context to NULL
- in pas_backend_file_process_get_book_view. Changed
- pas_backend_file_book_view_copy a bit.
-
- * backend/pas/pas-backend-ldap.c: Got rid of a warning.
-
-2000-11-18 Matt Bissiri <matt@bissiri.org>
-
- * gui/component/Makefile.am:
- Add widgets/menus/libmenus.la to evolution_addressbook_LDADD
- so that it will link properly now that gal-view-menus.[ch]
- was moved from gal into evolution.
-
-2000-11-15 JP Rosevear <jpr@helixcode.com>
-
- * backend/pas/pas-backend-file.c (pas_backend_file_book_view_copy):
- Initialize destination struct with '0's.
-
-2000-11-12 Christopher James Lahey <clahey@helixcode.com>
-
- * backend/ebook/e-card.c: Changed the mime type from "text/vcard"
- to "text/x-vcard".
-
-2000-11-11 Matt Bissiri <bissiri@eecs.umich.edu>
-
- * backend/ebook/.cvsignore: Add idl-generated files.
- * backend/ebook/e-book.c: (e_book_do_response_get_changes):
- * backend/ebook/e-card.c: (e_card_send):
- s/Evolution_/GNOME_Evolution_/g;
-
-2000-11-11 Christopher James Lahey <clahey@helixcode.com>
-
- * backend/ebook/Makefile.am: Link in composer bonobo code.
-
- * backend/ebook/e-card.c, backend/ebook/e-card.h: Added code to
- send mail to an ECard or send an ECard as a VCard attachment.
-
- * contact-editor/e-contact-editor.c: Add verbs to send the contact
- as a VCard or send mail to the contact.
-
- * gui/search/e-addressbook-search-dialog.c: Removed some unused
- variables.
-
- * gui/widgets/e-addressbook-view.c, gui/widgets/e-minicard.c:
- Added menu items to send the contact as a VCard or send mail to
- the contact.
-
-2000-11-11 Matt Bissiri <bissiri@eecs.umich.edu>
-
- * gui/component/addressbook.oafinfo:
- * gui/component/select-names/evolution-addressbook-select-names.oafinfo:
- Update the remaining "IDL:Evolution*" to "IDL:GNOME/Evolution*"
- to sync up with yesterday's IDL re-scoping.
-
-2000-11-09 Christopher James Lahey <clahey@helixcode.com>
-
- * backend/pas/pas-backend-ldap.c: Fixed a warning.
-
- * gui/component/addressbook.c: Put in gal view menus for testing
- purposes.
-
- * printing/e-contact-print-envelope.c: Fixed up envelope printing
- a bit. Added code for printing return addresses.
-
-2000-11-09 JP Rosevear <jpr@helixcode.com>
-
- * conduit/address-conduit.h: Add changed_hash, change list and complete bool
-
- * conduit/address-conduit.c (local_record_from_ecard): Add empty field checks
- (card_added): callback for book view
- (card_changed): ditto
- (card_removed): ditto
- (sequence_complete): ditto
- (view_cb): callback for the get changes call
- (pre_sync): force synchronous loading of book view
- (for_each): we already have the card so create the local record directly
- (for_each_modified): Uncomment and fix
- (delete_record): ditto
-
- * conduit/Makefile.am: link against gal for ebook - needs fixing
-
- * backend/ebook/e-book.c (e_book_do_response_get_changes): Properly respond
- to a get_changes call
- (e_book_check_listener_queue): define the get changes response operation
-
- * backend/ebook/e-book-listener.c (e_book_listener_queue_get_changes_response):
- Queue up a get changes response
- (impl_BookListener_respond_get_changes): Implement the get_changes method
- (e_book_listener_get_epv): add get_changes implementation to epv
-
- * backend/pas/pas-backend-file.c (pas_backend_file_book_view_copy): Only
- copy the search_context and change_context elements if they actually exist
- (pas_backend_file_changes): Hard code a path for now, only notify if
- there is something to notify about
-
-2000-11-07 JP Rosevear <jpr@helixcode.com>
-
- * backend/pas/pas-book.h: Update PASRequest structure
-
- * backend/pas/pas-book.c (impl_Evolution_Book_get_changes): update param name
- (pas_book_queue_get_changes): Use PASRequest change_id slot
-
- * backend/pas/pas-backend-file.c (pas_backend_file_book_view_copy):
- Properly copy change_id and change_context
- (pas_backend_file_book_view_free): Free change_id/change_context
- (pas_backend_file_changes_foreach_key): Callback to figure out the
- deleted cards
- (pas_backend_file_changes): Use new e-dbhash stuff to implement.
- Write out updated hash
-
- * backend/idl/addressbook.idl: Rename get_changes param
-
-2000-11-06 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/component/addressbook.c: Switched from EAddressbookSearch to
- ESearchBar.
-
- * gui/widgets/Makefile.am, gui/widgets/e-addressbook-search.c,
- gui/widgets/e-addressbook-search.h: Removed EAddressbookSearch.
- This has been moved to filter/ and renamed ESearchBar.
-
- * printing/e-contact-print-envelope.c: Forgot to set the font.
- This works for me now.
-
-2000-11-06 Ettore Perazzoli <ettore@helixcode.com>
-
- * gui/component/select-names/e-select-names-bonobo.c
- (impl_SelectNames_get_entry_for_section): Duplicate the object
- reference before returning.
-
-2000-11-05 Christopher James Lahey <clahey@helixcode.com>
-
- * contact-editor/e-contact-editor.c,
- gui/widgets/e-addressbook-view.c, gui/widgets/e-minicard.c: Add
- menus items to the envelope printing stuff.
-
- * gui/component/addressbook.c: Hook up the search menu.
-
- * gui/widgets/e-addressbook-search.c,
- gui/widgets/e-addressbook-search.h: Add the search menu.
-
- * printing/Makefile.am: Add e-contact-print-envelope.c and
- e-contact-print-envelope.h.
-
- * printing/e-contact-print-envelope.c,
- printing/e-contact-print-envelope.h: Added envelope printing.
-
-2000-11-03 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/component/select-names/Makefile.am: Clean the idl-generated
- files properly.
-
-2000-11-02 Christopher James Lahey <clahey@helixcode.com>
-
- * ename/.cvsignore, gui/minicard/.cvsignore: Removed these
- unnecessary .cvsignores.
-
- * gui/component/addressbook.c: Switch to using EAddressbookSearch
- instead of custom quick search widget.
-
- * gui/component/select-names/e-select-names.c: Made this do a
- slightly better job of rendering names.
-
- * gui/widgets/Makefile.am: Added e-addressbook-search.c and
- e-addressbook-search.h.
-
- * gui/widgets/e-addressbook-search.c,
- gui/widgets/e-addressbook-search.h: New class that puts up an
- entry and a combo box.
-
-2000-11-01 Dan Winship <danw@helixcode.com>
-
- * gui/component/e-ldap-storage.c (load_ldap_data):
- (e_ldap_storage_add_server): Add "highlighted" flag to
- evolution_storage_new_folder
-
-2000-10-31 JP Rosevear <jpr@helixcode.com>
-
- * conduit/address-conduit.c (cursor_cb): Let the warning make sense
- (compute_pid): remove
- (local_record_from_ecard): Create local record from ecard - not finished
- (local_record_from_uid): Obtain local_record from uid with the proper
- e-book way
- (set_status_cleared): Add empty callback
- (add_archive_record): kill
- (delete_archive_record): kill
- (archive_record): Add empty callback
- (conduit_get_gpilot_conduit): Update signal connects
-
- * backend/pas/pas-backend-file.c (vcard_change_type): Function to determine
- the type of change - not finished
- (pas_backend_file_search_changes): Create a view and callback based on
- how the cards have changed
- (pas_backend_file_process_get_changes): Implement the get changes operation
- for files
- (pas_backend_file_process_client_requests): Add GetChanges method for
- processing
-
- * backend/pas/pas-book.c (pas_book_queue_get_changes): Add changes to
- the list
- (impl_Evolution_Book_get_changes): implement object method
- (pas_book_get_epv): Add get changes to epv
- (pas_book_respond_get_changes): Respond to the get changes operation
-
- * backend/pas/pas-book.h: Add GetChanges PASOperation
-
- * backend/idl/addressbook.idl: add get_changes and respond_get_changes
- methods
-
- * backend/ebook/e-book.c (e_book_get_changes): Client function
- to a view of the changed objects
-
- * backend/ebook/e-book.h: New prototype
-
-2000-10-30 Kjartan Maraas <kmaraas@gnome.org>
-
- * backend/e-book/e-card.c: Fixed marking of strings
- for translation. Use "_(" instead of "_ (".
- * gui/component/addressbook-factory.c: Add missing
- calls to bindtextdomain() and textdomain noticed by
- Dan Winship.
- * gui/component/addressbook.c: Marked string for translation.
-
-2000-10-27 Christopher James Lahey <clahey@helixcode.com>
-
- * backend/pas/Makefile.am, gui/search/Makefile.am,
- printing/Makefile.am: Fixed these to include EXTRA_GNOME_CFLAGS.
-
- * gui/component/select-names/e-select-names-manager.c: Turned off
- newlines in header fields.
-
-2000-10-26 Michael Meeks <michael@helixcode.com>
-
- * printing/e-contact-print.c (e_contact_print_letter_tab),
- (complete_sequence, e_contact_do_print_phone_list, lowify):
- unsigned charness.
-
-2000-10-25 Chris Toshok <toshok@helixcode.com>
-
- * backend/pas/pas-backend-ldap.c (ldap_op_process_current): only
- call the handler if the if we're connected, and if we fail to
- connect finish the op and post a message.
- (pas_backend_ldap_connect): add debug spew if DEBUG is defined.
- (modify_card_handler): LDAP_RES_SEARCH_ENTRY => LDAP_SUCCESS.
- (modify_card_handler): only perform the ldap_modify_s if we have a
- list of modifications.
- (get_cursor_handler): use ldap_error_to_response here.
- (pas_backend_ldap_load_uri): use LDAP_PORT instead of the constant
- 389.
-
-2000-10-23 Dan Winship <danw@helixcode.com>
-
- * gui/component/select-names/Makefile.am (INCLUDES):
- * gui/component/Makefile.am (INCLUDES): Update EVOLUTION_LOCALEDIR
-
- * backend/pas/Makefile.am (INCLUDES):
- * backend/ebook/Makefile.am (INCLUDES): Update GNOMELOCALEDIR.
-
-2000-10-23 JP Rosevear <jpr@helixcode.com>
-
- * conduit/address-conduit.h: Use new libeconduit calls and
- abstraction
-
- * conduit/address-conduit.c: ditto
-
-2000-10-23 JP Rosevear <jpr@helixcode.com>
-
- * conduit/address-conduit.c (pre_sync): Use e_pilot_map_read
- (post_sync): Use e_pilot_map_write
-
- * conduit/Makefile.am: Link libeconduit and not libical
-
-2000-10-20 Michael Meeks <michael@helixcode.com>
-
- * contact-editor/e-contact-editor.c (tb_save_and_close_cb):
-
- * gui/component/addressbook.c (toggle_view_as_cb):
-
-2000-10-20 JP Rosevear <jpr@helixcode.com>
-
- * conduit/address-conduit.h: New structure of file - similar
- to calendar/todo conduits
-
- * conduit/address-conduit.c: ditto
-
- * conduit/address-conduit-config.h: Config stuff for conduit
-
- * conduit/.cvsignore: Update
-
- * conduit/Makefile.am: Build fixes
-
- * conduit/address-conduit-control-applet.desktop: Renamed
- to e-address-conduit-control-applet.desktop
-
- * conduit/address.conduit.in: Renamed to e-address.conduit.in
-
-2000-10-19 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/widgets/e-addressbook-view.c (SPEC): Remove Family name
- column since it's a bit weird. This also fixes the initial state
- since all of the column choices were off by one.
-
-2000-10-19 Ettore Perazzoli <ettore@helixcode.com>
-
- * printing/Makefile.am (glade_DATA): Remove
- `e-contact-print.glade.h'.
- (EXTRA_DIST): Move here.
-
- * gui/component/Makefile.am (glade_DATA): Remove
- `ldap-server-dialog.glade.h'.
- (EXTRA_DIST): Move here.
-
-2000-10-19 Christopher James Lahey <clahey@helixcode.com>
-
- * backend/ebook/e-card.c: Change how the extension field acts when
- converting delivery addresses to labels.
-
-2000-10-18 Christopher James Lahey <clahey@helixcode.com>
-
- * backend/ebook/e-card.c, backend/ebook/e-card.h: Added the
- function e_card_delivery_address_to_label.
-
- * contact-editor/e-contact-editor-address.c: Fixed a potential
- crash.
-
- * contact-editor/e-contact-editor.c: Made this save the changed
- data to the string version of the address.
-
-2000-10-19 Michael Meeks <michael@helixcode.com>
-
- * gui/component/addressbook.c (change_view_type): update to new
- UI handler.
- (update_view_type): split from (change_view_type).
- (control_activate): add an update_view_type.
-
-2000-10-18 Christopher James Lahey <clahey@helixcode.com>
-
- * backend/ebook/e-card-simple.c: Change NAME_OR_ORG to return the
- email address if both name and organization are taken.
-
- * gui/component/select-names/e-select-names.c: Fixed up the spec
- strings in this class. Removed the "cursor_mode" argument to
- ETable since it's part of the spec now.
-
-2000-10-17 Iain Holmes <iain@helixcode.com>
-
- * contact-editor/contact-editor.glade: Change the initial dialog
- visibility to FALSE
- so the contact editor doesn't flash when it appears.
-
-2000-10-16 Iain Holmes <iain@helixcode.com>
-
- * gui/component/select-names/e-select-names-manager.c
- (e_select_names_manager_activate_dialog): Only allow one dialog
- per manager.
-
-2000-10-16 Christopher James Lahey <clahey@helixcode.com>
-
- * contact-editor/fulladdr.glade: Fixed a typo. Made this look a
- bit better.
-
-2000-10-15 Dan Winship <danw@helixcode.com>
-
- * gui/component/select-names/Makefile.am:
- * gui/component/Makefile.am: Remove CPPFLAGS since they just
- duplicate flags that were already in INCLUDES.
-
- * printing/Makefile.am (ecpsdir):
- * gui/widgets/Makefile.am:
- * contact-editor/Makefile.am: Move -D flags from CPPFLAGS to
- INCLUDES so they don't override any CPPFLAGS set at configure
- time.
-
-2000-10-14 Michael Meeks <michael@helixcode.com>
-
- * gui/component/addressbook.c (control_activate): if we are in
- LDAP mode then merge in the extra few items, otherwise just merge
- the standard thing; saves duplication.
-
-2000-10-14 Ettore Perazzoli <ettore@helixcode.com>
-
- * gui/component/addressbook.oafinfo: Added
- "evolution:shell-component-icon" property.
-
-2000-10-14 Iain Holmes <iain@helixcode.com>
-
- * gui/component/select-names/e-select-names.c
- (e_select_names_manager_activate_dialog): Only allow one dialog
- per id.
- (e_select_names_manager_destroy): Destroy the hashtable.
- (e_select_names_manager_init): Init the hashtable.
-
-2000-10-13 Christopher James Lahey <clahey@helixcode.com>
-
- * contact-editor/fulladdr.glade, contact-editor/fulladdr.glade.h:
- Rearranged these fields a bit more.
-
-2000-10-13 Christopher James Lahey <clahey@helixcode.com>
-
- * contact-editor/e-contact-editor-categories.c,
- gui/component/select-names/e-select-names.c,
- gui/widgets/e-addressbook-view.c: Changed these for boolean
- ascending attribute instead of int ascending attribute. Fixed
- e-select-names to not use a column past the end of its array.
-
- * contact-editor/e-contact-editor-address.c,
- contact-editor/fulladdr.glade, contact-editor/fulladdr.glade.h:
- Rearranged the address editor dialog.
-
-2000-10-11 Christopher James Lahey <clahey@helixcode.com>
-
- * contact-editor/e-contact-editor-categories.c: Fixed the column
- elements, the no-headers attribute and added a cursor-mode=line
- attribute.
-
- * gui/component/select-names/e-select-names.c,
- gui/widgets/e-addressbook-view.c: Fixed the column elements here.
-
-2000-10-11 Christopher James Lahey <clahey@helixcode.com>
-
- * contact-editor/e-contact-editor-categories.c,
- gui/component/select-names/e-select-names.c,
- gui/widgets/e-addressbook-view.c: Updated these to the new style
- ETables.
-
-2000-10-06 Not Zed <NotZed@HelixCode.com>
-
- * gui/search/e-addressbook-search-dialog.c (get_widget): Removed
- ondemand callback nonsense from rule_context_load().
-
-2000-10-05 Michael Meeks <michael@helixcode.com>
-
- * contact-editor/e-contact-editor.c (create_ui): upd.
- (e_contact_editor_init): upd.
-
- * gui/component/addressbook.c (control_activate_cb): upd.
- (control_deactivate): kill.
- (control_activate): upd.
-
-2000-09-22 Michael Meeks <michael@helixcode.com>
-
- * gui/component/addressbook.c (control_activate): update.
-
- * contact-editor/e-contact-editor.c (create_ui): upd.
-
-Fri Sep 29 07:33:54 2000 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/widgets/e-minicard.c, gui/widgets/e-minicard.h: Made it so
- that minicard doesn't write out changes to the backend unless
- something's actually changed.
-
-Tue Sep 26 16:28:47 2000 Christopher James Lahey <clahey@helixcode.com>
-
- * backend/ebook/e-card.c: Make sure that card->name and
- card->full_name are always valid.
-
- * contact-editor/e-contact-editor.c: Removed some unused
- variables.
-
-2000-09-22 Matt Bissiri <bissiri@eecs.umich.edu>
-
- * contact-editor/e-contact-editor-fullname.c (extract_info): If
- (editor->name == NULL), store ptr to newly allocated ECardName in
- editor->name, not just in a stack variable. This fixes a crash
- which happened when you click "New", then click "Full Name...",
- then enter name, then click "OK".
-
- * backend/ebook/e-card.c (e_card_name_to_string): Add
- g_return_val_if_fail.
-
-2000-09-25 Jeffrey Stedfast <fejj@helixcode.com>
-
- * gui/widgets/Makefile.am:
- * gui/component/Makefile.am:
- * contact-editor/Makefile.am:
- * printing/Makefile.am: Look for ename in /e-util/ename instead of
- /addressbook/ename
-
- * backend/ebook/e-card.c: Updated to include e-util/ename/*.h
-
- * ename: Moved to /e-util so it could be shared
-
- * Makefile.am (SUBDIRS): took out ename
-
-2000-09-25 Nat Friedman <nat@helixcode.com>
-
- * ename/e-name-western-tables.h: Added a ton of new prefixes and
- suffixes.
-
-2000-09-22 Michael Meeks <michael@helixcode.com>
-
- * gui/component/addressbook.c (control_activate): update.
-
- * contact-editor/e-contact-editor.c (create_ui): upd.
-
-2000-09-22 Chris Toshok <toshok@helixcode.com>
-
- * backend/pas/pas-backend-ldap.c: lots of changes. flesh out the
- remove/modify/create functions. add another flag for the property
- table, PROP_DN, which makes it easy for us to determine when we
- need to create a new DN for a record when we're modifying. also
- add a ber_func to the table for PROP_TYPE_LIST fields, which fills
- in the list of bvalues that we send to the ldap server. The
- add/modify/delete stuff hasn't been tested yet, and it hopelessly
- complex (yay ldap).
- (ldap_search_handler): act synchronous when ldap_search responds
- with -1.
- (view_destroy): use pas_book_view_notify_status_message.
- (ldap_op_process_current): same
- (ldap_op_process): same
- (poll_ldap): same
- (ldap_search_handler): same
-
-2000-09-22 Chris Toshok <toshok@helixcode.com>
-
- * backend/ebook/e-card-simple.h: add
- E_CARD_SIMPLE_FIELD_FAMILY_NAME to the enum.
-
- * backend/ebook/e-card-simple.c (field_data): add
- E_CARD_SIMPLE_FIELD_FAMILY_NAME.
- (e_card_simple_get): add getter for FAMILY_NAME.
-
-2000-09-22 Christopher James Lahey <clahey@helixcode.com>
-
- * backend/ebook/e-card.c: Made addresses be quoted printable again
- so that they will encode properly if they have carriage returns in
- them. This is possible now because of a fix in libversit.
-
-2000-09-22 Christopher James Lahey <clahey@helixcode.com>
-
- * backend/ebook/e-book-view-listener.c,
- backend/ebook/e-book-view-listener.h, backend/ebook/e-book-view.c,
- backend/ebook/e-book-view.h, backend/idl/addressbook.idl,
- backend/pas/pas-book-view.c, backend/pas/pas-book-view.h: Added a
- function to set the status message associated with a given view.
- This is not yet implemented in the gui.
-
-2000-09-22 Christopher James Lahey <clahey@helixcode.com>
-
- * backend/ebook/e-book.c, backend/ebook/e-book.h,
- backend/idl/addressbook.idl, backend/pas/pas-backend-file.c,
- backend/pas/pas-backend-ldap.c, backend/pas-backend.c,
- backend/pas/pas-backend.h, backend/pas/pas-book.c,
- backend/pas/pas-book.h: Added a function to query static
- capabilities (capabilities that can be reported immediately) and
- implemented them in the 2 servers.
-
- * gui/component/addressbook.c: Added a View All button and a Stop
- button. Sorted out the new directory server stuff a bit.
-
- * gui/widgets/e-addressbook-model.c,
- gui/widgets/e-addressbook-model.h: Cleaned up a bit. Added a stop
- function. Check for capabilities before deciding whether to load
- all cards when initially viewed.
-
- * gui/widgets/e-addressbook-view.c,
- gui/widgets/e-addressbook-view.h: Added stop and view all
- functions.
-
- * gui/widgets/e-minicard-view-widget.c,
- gui/widgets/e-minicard-view-widget.h,
- gui/widgets/e-minicard-view.c, gui/widgets/e-minicard-view.h:
- Added a stop function. Check for capabilities before deciding
- whether to load all cards when initially viewed.
-
-2000-09-21 Michael Meeks <michael@helixcode.com>
-
- * gui/component/addressbook.c (control_activate): remove _UIHandler
-
-2000-09-21 Christopher James Lahey <clahey@helixcode.com>
-
- * backend/ebook/load-pine-addressbook.c: Added a missing include
- of ctype.h.
-
- * backend/pas/pas-backend-file.c: Fixed a problem where using a
- GList was causing us to not be reentrant. We now use an EList
- here and so now this is reentrant. This should fix the "wombat
- crashes every time you run evolution" bug.
-
- * contact-editor/e-contact-editor.c: Fixed a type mismatch.
-
-2000-09-21 Christopher James Lahey <clahey@helixcode.com>
-
- * backend/ebook/load-pine-addressbook.c: Make this work when a
- field is spread across multiple lines.
-
-2000-09-20 Christopher James Lahey <clahey@helixcode.com>
-
- * backend/ebook/e-card.c, backend/ebook/e-card.h: Added a
- wants_html field to cards. Uses "x-mozilla-html".
-
- * contact-editor/Makefile.am: Added definition of
- EVOLUTION_DATADIR.
-
- * contact-editor/contact-editor.glade: Make Wants HTML check
- button visible.
-
- * contact-editor/e-contact-editor.c,
- contact-editor/e-contact-editor.h: Make Wants HTML check button
- active. Fix UI stuff to use XML. Set parent window of
- confirm_delete dialog.
-
- * gui/widgets/e-addressbook-view.c, gui/widgets/e-minicard.c: Set
- the parent window of the confirm_delete dialog.
-
-2000-09-20 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/widgets/e-addressbook-view.c: Fixed display of the minicards
- when the addressbook was first loading. (It was overwriting a
- string with NULL during init.)
-
-2000-09-19 Dan Winship <danw@helixcode.com>
-
- * gui/search/Makefile.am (ruledir): Use $(datadir), not
- $(prefix)/share
-
-2000-09-18 Christopher James Lahey <clahey@helixcode.com>
-
- * backend/ebook/Makefile.am, contact-editor/Makefile.am,
- ename/Makefile.am, gui/component/Makefile.am,
- gui/widgets/Makefile.am: Added $(EXTRA_GNOME_CFLAGS) and
- $(EXTRA_GNOME_LIBS). Removed unneeded libraries.
-
- * backend/ebook/e-card.c, backend/pas/pas-backend-file.c,
- contact-editor/e-contact-editor-address.c,
- contact-editor/e-contact-editor-categories.c,
- contact-editor/e-contact-editor-categories.h,
- contact-editor/e-contact-editor-fullname.c,
- contact-editor/e-contact-editor.c,
- contact-editor/e-contact-save-as.c, ename/e-address-western.c,
- ename/test-ename-western-gtk.c,
- gui/component/addressbook-factory.c, gui/component/addressbook.c,
- gui/component/e-cardlist-model.h, gui/component/e-ldap-storage.c,
- gui/component/select-names/e-select-names-bonobo.c,
- gui/component/select-names/e-select-names-manager.c,
- gui/component/select-names/e-select-names-model.c,
- gui/component/select-names/e-select-names-table-model.c,
- gui/component/select-names/e-select-names-table-model.h,
- gui/component/select-names/e-select-names-text-model.h,
- gui/component/select-names/e-select-names.c,
- gui/component/select-names/e-select-names.h,
- gui/search/e-addressbook-search-dialog.c,
- gui/widgets/e-addressbook-model.h,
- gui/widgets/e-addressbook-view.c, gui/widgets/e-minicard-label.c,
- gui/widgets/e-minicard-view-widget.c,
- gui/widgets/e-minicard-view-widget.h,
- gui/widgets/e-minicard-view.c, gui/widgets/e-minicard-view.h,
- gui/widgets/e-minicard-widget.h, gui/widgets/e-minicard.c,
- gui/widgets/test-minicard-label.c, gui/widgets/test-reflow.c,
- printing/e-contact-print.c: Fixed the #include lines to deal
- properly with gal.
-
-2000-09-15 Christopher James Lahey <clahey@helixcode.com>
-
- * contact-editor/e-contact-editor.h,
- contact-editor/e-contact-save-as.h,
- gui/widgets/e-addressbook-model.h,
- gui/widgets/e-minicard-view-widget.h,
- gui/widgets/e-minicard-view.h, gui/widgets/e-minicard.c,
- gui/widgets/e-minicard.h: Fixed the paths of some .h #includes.
-
- * gui/component/addressbook.c: Removed all of the code to actually
- create and display the correct view of the addressbook and moved
- it to the new class gui/widgets/e-addressbook-view.c.
-
- * gui/widgets/Makefile.am: Added everything necessary for
- e-addressbook-view.c and e-addressbook-view.h.
-
- * gui/widgets/e-addressbook-view.c,
- gui/widgets/e-addressbook-view.h: New class to deal with actual
- display of addresses and switching between card view and table
- view.
-
- * gui/widgets/e-minicard-view-widget.c: Made this deal more
- gracefully with having the book set to NULL.
-
-2000-09-16 Michael Meeks <michael@helixcode.com>
-
- * gui/component/select-names/e-select-names.c: fix broken include.
-
- * gui/component/Makefile.am (INCLUDES): define datadir.
- (evolution_addressbook_SOURCES): remove e-addressbook-model.[ch]
-
- * gui/component/addressbook.c (control_activate): use datadir.
-
-2000-09-16 Ettore Perazzoli <ettore@helixcode.com>
-
- * gui/widgets/Makefile.am (gladedir): Define.
- (glade_DATA): Install `alphabet.glade'.
- (EXTRA_DIST): Define.
-
- * gui/component/Makefile.am (glade_DATA): Remove `alphabet.glade'.
- (EXTRA_DIST): Remove `alphabet.glade.h'.
-
- * gui/widgets/Makefile.am (libeminicard_a_SOURCES): Add
- `e-addressbook-model.c' and `e-addressbook-model.h'. I hope this
- is what Chris meant to do.
-
- * gui/component/Makefile.am (INCLUDES): Add
- `-I$(top_srcdir)/addressbook/gui/widgets'.
- (evolution_addressbook_SOURCES): Remove `e-addressbook-model.c'
- and `e-addressbook-model.h'.
-
- * gui/component/select-names/e-select-names.c: #include
- "e-addressbook-model.h" from "addressbook/gui/widgets" instead of
- "addressbook/gui/component", as it has been moved there.
-
-2000-09-15 Chris Toshok <toshok@helixcode.com>
-
- * backend/pas/pas-backend-ldap.c: split all the ldap operations
- into 2 halves, a handler, and destructor, and create a structure
- containing two function pointers and any data they need. this
- allows us queue up pending operations (since the LDAP*'s are no
- longer view specific. there's one per backend.) also, add
- support for restarting async operations if the SERVER DOWN error
- isn't communicated until sometime after the handler is called (as
- is the case with the async search stuff.)
-
-2000-09-14 Dan Winship <danw@helixcode.com>
-
- * gui/component/addressbook-factory.c (main): Call unicode_init
- for e-font stuff.
-
-2000-09-14 Christopher James Lahey <clahey@helixcode.com>
-
- * contact-editor/Makefile.am, gui/widgets/Makefile.am: Added
- $(GNOME_PRINT_LIBS) to all of the test files in these directories.
-
-2000-09-14 Michael Meeks <michael@helixcode.com>
-
- * gui/component/Makefile.am (evolution_addressbook_LDADD): fix path.
-
- * gui/component/addressbook.c: update include.
-
- * gui/component/addressbook-factory.c: update include.
-
- * gui/widgets/e-minicard-view.h: update include.
-
- * gui/search/e-addressbook-search-dialog.c: update include path.
-
-2000-09-13 Michael Meeks <michael@helixcode.com>
-
- * contact-editor/e-contact-editor.c (e_contact_editor_init): hack.
- (create_toolbar): ditto.
-
-2000-09-07 Michael Meeks <michael@helixcode.com>
-
- * gui/component/addressbook.c: Radicaly update UI handler code.
-
-2000-09-13 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/widgets/*, gui/minicard/*: Moved gui/minicard to
- gui/widgets, except for e-reflow.c, e-reflow.h, e-reflow-sorted.c,
- and e-reflow-sorted.h.
-
- * gui/widgets/Makefile.am: Added e-reflow to the INCLUDES list and
- libereflow.a to a bunch of LDADD lines.
-
- * gui/component/Makefile.am (evolution_addressbook_LDADD): Added
- libereflow.a here.
-
- * gui/Makefile.am (SUBDIRS): Replaced minicard with widgets.
-
-2000-09-12 Ettore Perazzoli <ettore@helixcode.com>
-
- * gui/component/select-names/Makefile.am: Add space after `-I'
- when invoking `orbit-idl'.
-
-2000-09-12 Ettore Perazzoli <ettore@helixcode.com>
-
- * gui/component/Makefile.am (EXTRA_DIST): Remove `ui.xml'.
-
-2000-09-11 Christopher James Lahey <clahey@helixcode.com>
-
- * contact-editor/e-contact-editor.c: Fixed a crash error.
-
-2000-09-11 Christopher James Lahey <clahey@helixcode.com>
-
- * ename/e-address-western.c: Fixed some warnings.
-
-2000-09-11 Jesse Pavel <jpavel@helixcode.com>
-
- * ename/e-address-western.c: fixed certain address parsing
- problems.
-
-2000-09-11 Christopher James Lahey <clahey@helixcode.com>
-
- * contact-editor/fulladdr.glade: Made this a bit better balanced.
-
- * gui/component/addressbook.c: Make the toolbar button for find do
- the same thing that the menu item for search does.
-
- * gui/search/e-addressbook-search-dialog.c: Made the top half of
- this not expand.
-
-2000-09-11 Christopher James Lahey <clahey@helixcode.com>
-
- * backend/ebook/e-card-simple.c, backend/ebook/e-card-simple.h:
- Removed a bunch of redundant code. Made it so that when you set
- an address label, it sets the delivery address as well. Added
- functions to set and get the delivery address.
-
- * backend/ebook/e-card.c, backend/ebook/e-card.h: Added code to
- convert and address label to a delivery address.
-
- * contact-editor/Makefile.am: Added e-contact-editor-address.[ch],
- fulladdr.glade, fulladdr.glade.h.
-
- * contact-editor/contact-editor.glade,
- contact-editor/e-contact-editor-strings.h: Switched from a label
- to a button to show the parsed address.
-
- * contact-editor/e-contact-editor-address.c,
- contact-editor/e-contact-editor-address.h: New class to implement
- the parsed address dialog.
-
- * contact-editor/e-contact-editor-fullname.c,
- contact-editor/e-contact-editor-fullname.h: Added const to the
- _new function.
-
- * contact-editor/e-contact-editor.c: Implemented clicking on the
- address button.
-
- * contact-editor/fulladdr.glade, contact-editor/fulladdr.glade.h:
- New glade files for the parsed address dialog.
-
- * contact-editor/fullname-strings.h, fullname.glade: Changed these
- accellabels to labels.
-
- * ename/Makefile.am: Added e-address-western.c.
-
- * ename/e-address-western.c: Fixed some warnings.
-
-2000-09-10 Christopher James Lahey <clahey@helixcode.com>
-
- * ename/e-address-western.c: Added by Jesse.
-
-2000-09-08 Lauris Kaplinski <lauris@helixcode.com>
-
- * gui/minicard/e-minicard-label.c (e_minicard_label_construct):
- Use canvas default font
-
- * gui/minicard/e-minicard.c (e_minicard_realize): Ditto
- (get_left_width): Ditto
-
-2000-09-08 Christopher James Lahey <clahey@helixcode.com>
-
- * contact-editor/e-contact-editor-categories.c: Fixed a few warnings.
-
-2000-09-02 Lauris kaplinski <lauris@helixcode.com>
-
- * contact-editor/e-contact-editor-categories.c: e_utf8 wrappers
-
- * contact-editor/e-contact-editor.c: e_utf8 wrappers
-
-2000-09-01 Ettore Perazzoli <ettore@helixcode.com>
-
- * gui/component/e-ldap-storage.c (load_ldap_data): Updated for the
- extra arg now needed by `evolution_storage_new_folder()'.
- (e_ldap_storage_add_server): Likewise.
-
-2000-08-31 Ettore Perazzoli <ettore@helixcode.com>
-
- * conduit/Makefile.am (INCLUDES): Add `BONOBO_GNOME_CFLAGS' and
- `-I$(top_srcdir)'.
-
-2000-08-31 Christopher James Lahey <clahey@helixcode.com>
-
- * backend/ebook/Makefile.am: Install load-gnomecard-addressbook
- and load-pine-addressbook.
-
-2000-08-30 Lauris Kaplinski <lauris@helixcode.com>
-
- * printing/e-contact-print.c: Countless small changes for gnome-print 0.21+
-
-2000-08-30 Dan Winship <danw@helixcode.com>
-
- * gui/component/addressbook.oafinfo: Add a name to the minicard
- viewer.
-
-2000-08-29 Dan Winship <danw@helixcode.com>
-
- * backend/ebook/e-book.c:
- * backend/ebook/test-client.c:
- * backend/ebook/test-client-list.c:
- * backend/ebook/load-gnomecard-addressbook.c:
- * backend/ebook/load-pine-addressbook.c:
- * backend/pas/pas-book-factory.c:
- * conduit/address-conduit.h: Remove USING_OAF checks
-
-2000-08-28 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/component/addressbook.c: Use the right argument name to turn
- on grid lines.
-
-2000-08-26 JP Rosevear <jpr@helixcode.com>
-
- * gui/minicard/Makefile.am: Comment out minicard-view-test
- since its gnorba dependent
-
-2000-08-26 JP Rosevear <jpr@helixcode.com>
-
- * gui/component/addressbook-component.c: Remove gnorba stuff
-
- * gui/minicard/e-minicard-control.c (e_minicard_control_factory_init):
- ditto
-
- * gui/component/addressbook.c: ditto
-
- * gui/component/addressbook-factory.c: ditto
-
-2000-08-25 Christopher James Lahey <clahey@helixcode.com>
-
- * demo/* Removed the demo directory since it's no longer used.
-
-2000-08-26 JP Rosevear <jpr@helixcode.com>
-
- * gui/minicard/Makefile.am: Remove gnorba stuff
-
- * gui/minicard/e-minicard-control.gnorba: Kill
-
-2000-08-26 JP Rosevear <jpr@helixcode.com>
-
- * gui/component/addressbook.gnorba: Kill
-
- * gui/component/Makefile.am: Remove gnorba stuff
-
-2000-08-25 Dan Winship <danw@helixcode.com>
-
- * gui/component/Makefile.am (evolution_addressbook_LDFLAGS): Add
- -export-dynamic so libglade will be able to resolve custom widget
- callbacks.
-
-2000-08-23 Lauris Kaplinski <lauris@helixcode.com>
-
- * backend/pas/pas-backend-file.c (func_contains): Use e_utf8_strstrcase
-
- * contact-editor/e-contact-editor-fullname.c (fill_in_field): Use e_utf8 wrapper
- (extract_field): Same
-
- * contact-editor/e-contact-editor.c (full_name_clicked): Don't crash
-
- * ename/Makefile.am: Link demo with libeutil.la
-
- * ename/test-ename-western-gtk.c (full_changed_cb): Use e_utf8 wrapper
-
- * gui/component/addressbook.c (find_contact_cb): Use e_utf8 wrapper
- (search_entry_activated): Same
-
-2000-08-22 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/search/e-addressbook-search-dialog.c: Fix an error in the
- arguments to rule_context_load.
-
- * backend/ebook/e-card.c: Fix this to not mess up if the person
- passes a VCard with a carriage return in the mailing address.
-
-2000-08-14 Not Zed <NotZed@HelixCode.com>
-
- * gui/search/addresstypes.xml: Fixed fullname->full_name for
- search field.
-
- * gui/search/e-addressbook-search-dialog.c (get_widget): Check we
- actually got any parts to build the dialogue with.
-
-2000-08-13 Not Zed <NotZed@HelixCode.com>
-
- * gui/component/addressbook-component.c (owner_set_cb): Set the
- global_shell_client nastyhack when we know it.
- This is only required to link with the filter code ...
-
- * gui/component/Makefile.am (evolution_addressbook_LDADD): Added
- libfilter.a to the link line.
-
- * gui/search/Makefile.am (noinst_LIBRARIES): Change library name
- from libaddressbooksearchdialog to libaddressbooksearch, as used
- elsewhere.
-
- * gui/search/e-addressbook-search-dialog.c (get_widget):
- Implement.
- (get_query): Likewise.
- (e_addressbook_search_dialog_destroy): Unref filter stuff when
- done.
-
- * gui/component/addressbook.c (control_deactivate): Added chris's
- patch to put the meny in
-
-2000-08-22 Lauris Kaplinski <lauris@helixcode.com>
-
- * contact-editor/e-contact-editor.c: Use e_utf8 wrappers everywhere
-
-2000-08-22 Christopher James Lahey <clahey@helixcode.com>
-
- * backend/e-card.h: Started adding a time zone field to ECard.
-
- * gui/component/e-addressbook-model.c: Added
- e_table_model_pre_change where appropriate.
-
- * gui/minicard/e-minicard-control.c: Added a ref and unref pair.
-
-2000-08-22 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/component/addressbook.c: Linked in the search dialog again.
- It looks like some changes in the shell made this not work.
-
-2000-08-19 Christopher James Lahey <clahey@helixcode.com>
-
- * conduit/address-conduit.c, conduit/address-conduit.h: Changed
- this to use ECardSimple.
-
- * contact-editor/e-contact-editor.c: Fixed a memory leak.
-
- * gui/component/addressbook.c: Added stuff to the right click
- menu. Activated the new search dialog that doesn't quite work
- yet.
-
- * gui/minicard/e-minicard-view.c: Fixed some run time warnings.
-
-2000-08-15 Larry Ewing <lewing@helixcode.com>
-
- * gui/minicard/e-minicard.c (e_minicard_event): use style colors
- for the selected state. This doesn't properly redraw the minicard
- when there is a style_change event, that is next.
- (e_minicard_realize): use style colors.
-
-2000-08-14 Peter Williams <peterw@helixcode.com>
-
- * backend/pas/pas-backend-file.c: Include the proper db1/db.h
- as in RedHat 7.0 -- patch from Kenny Graunke <kwg@teleport.com>
-
-2000-08-13 Chris Toshok <toshok@helixcode.com>
-
- * conduit/Makefile.am (libaddress_conduit_la_SOURCES): add
- address-conduit.h
-
- * Makefile.am (CONDUIT_SUBDIR): only set subdir if
- ENABLE_PILOT_CONDUITS is set.
-
-2000-08-13 Chris Toshok <toshok@helixcode.com>
-
- * Makefile.am (SUBDIRS): add conduit subdir.
-
-2000-08-13 Chris Toshok <toshok@helixcode.com>
-
- * conduit/address-conduit.c (conduit_get_gpilot_conduit): add
- special oaf initialization hack so conduit can find wombat, and
- accept all cookies so that we can actually talk to oaf.
-
-2000-08-13 Christopher James Lahey <clahey@helixcode.com>
-
- * backend/pas/pas-backend-file.c: Fixed a typo that cause the
- wrong field to be searched.
-
- * gui/component/select-names/e-select-names.c: Made the select
- names dialog only display entries with email addresses.
-
-2000-08-12 Christopher James Lahey <clahey@helixcode.com>
-
- * contact-editor/contact-editor.glade: Fixed a typo in the name of
- the first phone entry.
-
-2000-08-12 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/search/Makefile.am,
- gui/search/e-addressbook-search-dialog.c,
- gui/search/e-addressbook-search-dialog.h: A few small interface
- fixes.
-
- * gui/component/Makefile.am: Link in the addressbook search
- dialog.
-
-2000-08-12 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/Makefile.am: Added the search directory.
-
- * backend/ebook/e-book.c: Fixed a potential crash.
-
- * gui/minicard/e-reflow-sorted.h: Fixed an include line.
-
- * gui/search/.cvsignore, gui/search/Makefile.am: New files.
-
- * gui/search/e-addressbook-search-dialog.c: Fixed compilation.
-
-2000-08-12 Christopher James Lahey <clahey@helixcode.com>
-
- * printing/Makefile.am: Ettore fixed compilation.
-
-2000-08-12 Christopher James Lahey <clahey@helixcode.com>
-
- * backend/ebook/.cvsignore: Added load-gnomecard-addressbook.
-
-2000-08-12 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/search/e-addressbook-search-dialog.c,
- gui/search/e-addressbook-search-dialog.h: Made this into a Gtk
- object.
-
-2000-08-12 Christopher James Lahey <clahey@helixcode.com>
-
- * backend/pas/pas-book-view.c: Ref our book view listener.
-
- * gui/component/addressbook.c: Updated to use new minicard view
- widget.
-
- * gui/minicard/Makefile.am: Added e-minicard-view-widget.c and
- e-minicard-view-widget.h.
-
- * gui/minicard/e-minicard-view-widget.c,
- gui/minicard/e-minicard-view-widget.h: New class that's just a
- minicard view in an ECanvas.
-
- * gui/search/e-addressbook-search-dialog.c: New file for
- implementing a search dialog.
-
-2000-08-11 Chris Toshok <toshok@helixcode.com>
-
- * conduit/address-conduit.c (transmit): implement code to encode
- the first email address and send to the pilot.
- (get_phone_label_by_flag): rename find_phone_label_for_flags to
- this, and implement by calling get_phone_label_by_name.
-
-2000-08-11 Chris Toshok <toshok@helixcode.com>
-
- * conduit/address-conduit.c (ecard_from_remote_record): add code
- for handling email addresses from pilot (which stores it as a
- phone number entry. go figure.)
- (check_for_slow_setting): #if 0 out, since we don't use it (yet).
- (update_record): un #if 0 the code to handle the case where the
- pilot info has changed for a local record.
- (merge_ecard_with_remote_record): implement function, but for now
- just return the existing (desktop) record - we still don't allow
- merge from the pilot.
-
-
-2000-08-10 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/search/addresstypes.xml: Changed a couple of input field
- names.
-
-2000-08-10 Ettore Perazzoli <ettore@helixcode.com>
-
- * gui/component/addressbook-component.c: Remove prototype for
- `setup_ldap_storage()', which shouldn't be here anyway.
-
-2000-08-10 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/search/, gui/search/addresstypes.xml: New search dialog for
- addressbook.
-
-2000-08-10 Dan Winship <danw@helixcode.com>
-
- * gui/component/addressbook-component.c (owner_set_cb): Update for
- changed prototype, pass evolution_homedir arg to
- setup_ldap_storage.
-
- * gui/component/e-ldap-storage.c (setup_ldap_storage): Now takes
- an evolution_homedir arg, uses that to generate the path to the
- ldapservers.xml file, and stores the result in a static variable.
- (e_ldap_storage_add_server, e_ldap_storage_remove_server): Use that
- static variable rather than hardcoding the path to the file.
-
-2000-08-10 Christopher James Lahey <clahey@helixcode.com>
-
- * backend/pas/pas-backend-file.c: Fixed any search to not crash on
- missing phone numbers or email addresses.
-
-2000-08-09 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/minicard/e-minicard-control.c: Added a button to save to
- your addressbook.
-
-2000-08-09 Cody Russell <bratsche@gnome.org>
-
- * gui/component/addressbook.c: Make the toolbar honor the user's
- gnomecc settings for detachable toolbars.
-
-2000-08-09 Nat Friedman <nat@helixcode.com>
-
- * ename/e-name-western-tables.h: Added some military prefixes.
-
-2000-08-09 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/component/addressbook.c: Fixed a warning.
-
-2000-08-09 Ettore Perazzoli <ettore@helixcode.com>
-
- * gui/component/addressbook.c (control_activate): Add the stock
- print icon to the print item.
-
-2000-08-09 Ettore Perazzoli <ettore@helixcode.com>
-
- * gui/component/addressbook.c (control_activate): Put the print
- item in the right placeholder so that it gets the right position
- in the "File" menu.
- (control_deactivate): Updated accordingly.
-
-2000-08-09 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/component/addressbook.c, gui/minicard/e-minicard.c: Changed
- e_popup_menu_run call to match the new arguments.
-
- * gui/component/addressbook.oafinfo: Fixed this file to work
- properly.
-
- * gui/minicard/e-minicard-control.c: Use the correct oafinfo ID
- here. Also cleaned up the code a bit with the help of Michael
- Meeks.
-
-2000-08-08 Chris Toshok <toshok@helixcode.com>
-
- * gui/component/e-addressbook-model.c (e_addressbook_model_init):
- use x-evolution-any-field.
-
- * gui/component/addressbook.c (search_entry_activated): use
- x-evolution-any-field.
- (change_view_type): same.
-
- * gui/minicard/e-minicard-view.c (e_minicard_view_init): set query
- to x-evolution-any-field.
-
- * backend/pas/pas-backend-ldap.c (func_contains): support
- x-evolution-any-field for matching any evolution supported field.
-
- * backend/pas/pas-backend-file.c (compare_email): switch to using
- ECardSimple calls.
- (compare_phone): same.
- (compare_address): same.
- (entry_compare): switch to using ECardSimple calls, and support a
- 'x-evolution-any-field' wildcard field.
- (vcard_matches_search): use an ECardSimple.
-
-2000-08-07 Christopher James Lahey <clahey@helixcode.com>
-
- * contact-editor/e-contact-editor.c: Removed the next and prev
- toolbar buttons since they don't do anything.
-
-2000-08-07 Christopher James Lahey <clahey@helixcode.com>
-
- * contact-editor/contact-editor.glade,
- contact-editor/e-contact-editor.c: Fixed the tab order to not
- repeat the web page address field.
-
-2000-08-07 Christopher James Lahey <clahey@helixcode.com>
-
- * contact-editor/e-contact-editor.c: Fixed the tab order for this
- dialog.
-
-2000-08-05 Christopher James Lahey <clahey@helixcode.com>
-
- * backend/ebook/e-card-simple.c: Fixed a warning.
-
- * backend/ebook/e-card.c: Cast to (char *) in
- e_card_load_cards_from_file since libversit isn't const correct.
-
- * backend/pas/pas-backend-file.c: Fixed a warning.
-
-2000-08-04 Michael Meeks <michael@helixcode.com>
-
- * gui/component/addressbook.c (control_activate): unref.
-
- * demo/addressbook.c (control_activate): unref.
-
-2000-08-02 Christopher James Lahey <clahey@helixcode.com>
-
- * contact-editor/e-contact-editor-categories.c,
- gui/component/e-addressbook-model.c: Emit "model_pre_change"
- signal as appropriate.
-
-2000-08-02 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/component/e-addressbook-model.c: Adapted this to supply the
- new append_row API of ETableModel.
-
-2000-07-31 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/component/addressbook.c: Changed the default set of columns.
-
-2000-07-29 Christopher James Lahey <clahey@helixcode.com>
-
- * backend/ebook/Makefile.am: Added load-gnomecard-addressbook
- compilation.
-
- * backend/ebook/e-card.c, backend/ebook/e-card.h: Added
- e_card_load_cards_from_file helper function to load multiple cards
- from a single file.
-
- * backend/ebook/load-gnomecard-addressbook.c: New file to load
- vcard files. I think this is the format that gnomecard uses so if
- you copy your gnomecard file to gnomecard.vcf and then run this
- program in the same directory, it'll copy all your gnome contacts
- into evolution. It needs to be changed to take a filename as a
- parameter. Some fields (phone and address information, for
- example) aren't displayed properly, but are saved. This is new
- code, so some other than phone and address may be lost.
-
-2000-07-28 Ettore Perazzoli <ettore@helixcode.com>
-
- * backend/pas/Makefile.am: Add `pas-backend-ldap.c' and
- `pas-backend-ldap.h' to `EXTRA_DIST' so they get distributed even
- if the OpenLDAP support is not enabled.
-
-2000-07-27 Christopher James Lahey <clahey@helixcode.com>
-
- * backend/ebook/load-pine-addressbook.c: Changed the URI to load
- to.
-
-2000-07-26 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/minicard/e-minicard-widget-test.c: Fixed a warning.
-
-2000-07-26 Chris Toshok <toshok@helixcode.com>
-
- * backend/pas/pas-backend-ldap.c (view_destroy): wait to free the
- view until we've taken care of freeing its internals. also, close
- the ldap connection here.
- (pas_backend_ldap_connect): rename p_b_l_ensure_connected to this,
- since it's always called when we create a view.
- (pas_backend_ldap_build_all_cards_list): open an ldap connection
- in this function and close it at the end.
- (poll_ldap): make sure to call ldap_unbind to close the view's
- connection here.
- (pas_backend_ldap_search): call pas_backend_ldap_connect here -
- ldap_unbind will either be called from poll_ldap or from
- view_destroy.
- (pas_backend_ldap_get_vcard): the PASBackendLDAP no longer has an
- LDAP*.
-
-2000-07-26 Chris Toshok <toshok@helixcode.com>
-
- * backend/pas/pas-backend-ldap.c
- (pas_backend_ldap_build_all_cards_list): add support for user settable scope.
- (pas_backend_ldap_search): same.
- (pas_backend_ldap_load_uri): same.
-
-2000-07-26 Dan Winship <danw@helixcode.com>
-
- * gui/component/addressbook.oafinfo: lowercasify the
- supported_mime_types
-
-2000-07-25 Chris Toshok <toshok@helixcode.com>
-
- * backend/ebook/e-card-types.h: add enum for e-card pilot status.
-
- * conduit/address-conduit.c: #ifdef out all the archiving code with SUPPORT_ARCHIVING.
- (purge): implement correctly - deleting ecards whose pilot status is DELETED.
- (set_status): implement.
- (set_pilot_id): add gtk_main call here to change commit_card into a synchronous
- (delete_all): implement correctly - don't delete the records, just set their status to DELETED.
- (local_record_from_ecard): get the current status from the ecard.
-
- * backend/ebook/e-card.c (e_card_get_vcard): add vcard support for pilot status.
- (parse_pilot_status): new function.
- (e_card_class_init): add pilot status object arg.
- (e_card_set_arg): add pilot status support.
- (e_card_get_arg): same.
- (e_card_init): initialize pilot_status to 0.
-
-2000-07-25 Chris Toshok <toshok@helixcode.com>
-
- * conduit/address-conduit.c: add comment headers to signals that
- didn't have any.
-
-2000-07-25 Chris Toshok <toshok@helixcode.com>
-
- * conduit/address-conduit.c (start_address_server): use the user's
- Contact db. not toshok's.
-
-2000-07-25 Michael Meeks <michael@helixcode.com>
-
- * backend/ebook/load-pine-addressbook.c (book_open_cb): check we
- opened ok.
-
-2000-07-25 Seth Alves <alves@hungry.com>
-
- * ename/Makefile.am (libename_static_la_LDFLAGS): build static
- version of the library for address conduit to use
-
- * backend/ebook/Makefile.am: build a static version of the library
- to link into the conduit
-
-2000-07-25 Christopher James Lahey <clahey@helixcode.com>
-
- * backend/ebook/e-card.c: Added a #define for
- "X-EVOLUTION-PILOTID". Added a parse_pilot_id to read pilot id's
- in properly from VCards. Rearranged some field orders. Added a
- get_arg case for ARG_PILOTID. Initialize pilot_id field to 0.
-
-2000-07-24 Chris Toshok <toshok@helixcode.com>
-
- * backend/ebook/e-card.h: add pilot_id.
-
- * backend/ebook/e-card.c (e_card_get_vcard): add support for
- X-EVOLUTION-PILOTD vcard field.
- (e_card_class_init): add pilot_id arg.
- (e_card_set_arg): handle pilot_id arg.
-
-2000-07-23 Christopher James Lahey <clahey@helixcode.com>
-
- * backend/ebook/e-book-view-listener.c: Remove the idle handler
- when we're destroyed.
-
- * printing/e-contact-print.c: Fixed the spacing on the card
- header.
-
-2000-07-20 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/component/addressbook.oafinfo: Fixed the oaf info.
-
- * gui/minicard/.cvsignore, gui/minicard/Makefile.am,
- gui/minicard/e-minicard-widget-test.c: Added a test for the
- minicard widget.
-
- * gui/minicard/e-minicard-control.c: Fixed the mime type.
-
- * gui/minicard/e-minicard.c: Fixed some crashes if your parent
- isn't a minicard view.
-
- * gui/minicard/e-minicard-control.oafinfo: Removed.
-
-2000-07-20 Ettore Perazzoli <ettore@helixcode.com>
-
- * gui/component/addressbook-component.c (factory_fn): Update for
- the new `evolution_shell_component_new()'.
-
-2000-07-19 Fatih Demir <kabalak@gmx.net>
-
- * conduit/address-conduit-control-applet.desktop:
- Added the Turkish desktop entry.
-
-2000-07-18 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/minicard/e-minicard-control.c: Added "text/vCard" to the
- list of mime types we support.
-
-2000-07-18 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/minicard/Makefile.am: Added
- gui/minicard/e-minicard-control.c,
- gui/minicard/e-minicard-control.h,
- gui/minicard/e-minicard-widget.c, and
- gui/minicard/e-minicard-widget.h.
-
- * gui/minicard/e-minicard-control.c,
- gui/minicard/e-minicard-control.h,
- gui/minicard/e-minicard-widget.c,
- gui/minicard/e-minicard-widget.h: Got these to compile.
-
- * gui/minicard/e-minicard-control.gnorba,
- gui/minicard/e-minicard-control.oafinfo: Copied directly from
- bonobo-clock-control. These aren't done yet.
-
-2000-07-18 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/minicard/e-minicard-control.c,
- gui/minicard/e-minicard-control.h,
- gui/minicard/e-minicard-widget.c,
- gui/minicard/e-minicard-widget.h: New files for using a minicard
- as a widget or a bonobo control.
-
-2000-07-14 Chris Toshok <toshok@helixcode.com>
-
- * gui/component/e-ldap-storage.c (ldap_server_foreach): duh.
- don't save the port in the host slot either.
-
-2000-07-13 Christopher James Lahey <clahey@helixcode.com>
-
- * contact-editor/e-contact-editor-confirm-delete.glade,
- contact-editor/e-contact-editor-confirm-delete.glade.h: Added
- these.
-
-2000-07-13 Christopher James Lahey <clahey@helixcode.com>
-
- * Makefile.am: Switched the order of compilation of printing and
- contact-editor.
-
- * contact-editor/Makefile.am: Added printing libraries and a
- confirm delete dialog glade file.
-
- * contact-editor/e-contact-editor.c,
- contact-editor/e-contact-editor.h: Enabled the delete and print
- functions as well as providing a confirm delete dialog to the
- outside world.
-
- * gui/component/addressbook.c: Made the delete button on new cards
- active.
-
- * gui/minicard/Makefile.am: Added printing libraries to a number
- of test programs.
-
- * gui/minicard/e-minicard.c: Added print and delete to the right
- click menu. Made the delete button on the card editor active.
-
- * printing/e-contact-print.c, printing/e-contact-print.h: Added a
- function to print a single card.
-
-2000-07-12 Chris Toshok <toshok@helixcode.com>
-
- * gui/component/e-ldap-storage.c (ldap_server_foreach): oops. fix
- typo that was saving the port in the rootdn spot.
- (save_ldap_data): make this a bit safer - writing to a new file
- and renaming it.
- (load_ldap_data): make this a bit smarter - if parsing the
- ldapservers.xml file fails and there's a .new file there,
- rename it.
-
-2000-07-12 Christopher James Lahey <clahey@helixcode.com>
-
- * backend/pas/pas-backend-file.c: Do case insensitive compares.
-
- * addressbook/gui/component/addressbook.c: Make quick search
- search both name and company name.
-
-2000-07-12 Christopher James Lahey <clahey@helixcode.com>
-
- * contact-editor/e-contact-editor.c: Add icons to the toolbars.
-
-2000-07-12 Christopher James Lahey <clahey@helixcode.com>
-
- * contact-editor/Makefile.am: Added installation of arrow.png.
-
- * contact-editor/e-contact-editor.c: Use EVOLUTIONDIR #define.
-
-2000-07-11 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/component/addressbook.c: Removed an unused function
-
-2000-07-10 Dan Winship <danw@helixcode.com>
-
- * gui/component/select-names/Makefile.am (EXTRA_DIST): add idl
- file to EXTRA_DIST
-
-2000-07-10 Ettore Perazzoli <ettore@helixcode.com>
-
- * gui/component/addressbook.c (control_activate): Remove the
- SelectNames test.
-
-2000-07-10 Peter Williams <peterw@curious-george.helixcode.com>
-
- * gui/component/select-names/e-select-names-model.c: (Clahey's fix)
- Make multiple addresses be concatenated correctly.
-
-2000-07-09 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/component/addressbook.c,
- gui/component/select-names/e-select-names.c,
- gui/component/select-names/e-select-names.h: Switched from ETable
- to ETableScrolled.
-
- * addressbook/gui/minicard/e-minicard.c: Don't display mailer or
- "name or org" fields.
-
-2000-07-09 Christopher James Lahey <clahey@helixcode.com>
-
- * backend/ebook/e-card-simple.c, backend/ebook/e-card-simple.h:
- Added a field that gives the name if it exists and the company
- name otherwise.
-
- * gui/component/e-addressbook-model.c: Formatting changes.
-
- * gui/component/select-names/e-select-names-table-model.c: Added
- stripping of names and display of company name if name doesn't
- exist.
-
- * gui/component/select-names/e-select-names.c: Fixed up the
- display so that we display both name and email address.
-
-2000-07-09 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/component/select-names/e-select-names-model.c: Fixed a small
- off by one error that was causing an extra character to get
- deleted sometimes.
-
-2000-07-09 Anders Carlsson <andersca@gnu.org>
-
- * gui/minicard/test-reflow.c (allocate_callback): Fix off by one bug with
- scroll region setting.
- (resize): Likewise.
- (main): Put the contacts list in an EScrolledFrame instead of using a
- separate GtkScrollbar.
-
- * gui/minicard/e-reflow.c (e_reflow_event): Don't change mouse cursor and
- don't allow drags on dividers that aren't visible.
-
- * gui/component/addressbook.c (allocate_callback): Fix off by one bug with
- scroll region setting.
- (resize): Likewise.
- (create_minicard_view): Put the contacts list in an EScrolledFrame instead of
- using a separate GtkScrollbar.
-
-2000-07-09 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/component/addressbook.c: Removed unused do_nothing_cb
- function.
-
- * gui/component/select-names/e-select-names-manager.c,
- gui/component/select-names/e-select-names-manager.h: Made the OK
- and Cancel buttons in the ESelectNames dialog we create work
- properly.
-
- * gui/component/select-names/e-select-names-model.c,
- gui/component/select-names/e-select-names-model.h: Added
- e_select_names_model_duplicate.
-
- * gui/component/select-names/e-select-names-text-model.c: Made the
- text be set correctly if there's already data in the source when
- the text model is created.
-
- * gui/component/select-names/e-select-names.c,
- gui/component/select-names/e-select-names.h: Removed handling of
- the buttons (the user of this dialog will have to handle them.)
- Added e_select_names_get_source. Fixed some typos.
-
-2000-07-09 Not Zed <NotZed@HelixCode.com>
-
- * gui/component/addressbook.c: Link the toolbar print button to
- the print callback.
-
-2000-07-08 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/component/select-names/e-select-names.c
- (e_select_names_clicked): Hitting OK or Cancel at least closes the
- dialog now.
-
-2000-07-08 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/component/select-names/e-select-names-manager.c
- (e_select_names_manager_create_entry): Set the returned entry to
- use the ellipsis.
-
-2000-07-08 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/component/addressbook-factory.c: Include
- e-select-names-factory.h.
-
- * gui/component/select-names/e-select-names-model.c: Handle a NULL
- iterator properly in the replace function.
-
- * gui/component/select-names/e-select-names-table-model.c: Fill in
- info properly in the value_at function.
-
- * gui/component/select-names/e-select-names-text-model.c: Don't
- strlen a NULL text object.
-
- * gui/component/select-names/e-select-names.c: Close if the person
- hits ok or cancel (doesn't yet actually undo changes if Cancel is
- hit.) Handle removing addresses when they're double clicked on.
-
- * gui/component/select-names/select-names.glade,
- gui/component/select-names/select-names.glade.h: Hid some unused
- fields and changed the text at the top of the dialog.
-
-2000-07-08 Jeffrey Stedfast <fejj@helixcode.com>
-
- * gui/component/select-names/.cvsignore: Ignore dynamically
- created source files
-
-2000-07-08 Ettore Perazzoli <ettore@helixcode.com>
-
- * gui/component/select-names/e-select-names-bonobo.c
- (entry_get_property_fn): New function to set the properties.
-
-2000-07-08 Ettore Perazzoli <ettore@helixcode.com>
-
- * gui/component/addressbook-factory.c (main): Start up the factory
- for `Evolution::Addressbook::SelectNames'.
-
- * gui/component/select-names/evolution-addressbook-select-names.oafinfo:
- New.
-
- * gui/component/select-names/e-select-names-factory.c: New.
- * gui/component/select-names/e-select-names-factory.h: New.
-
- * gui/component/select-names/e-select-names-bonobo.c: New.
- * gui/component/select-names/e-select-names-bonobo.h: New.
-
- * gui/component/addressbook-factory.c (main): Call
- `e_select_names_factory_init()'.
-
- * gui/component/select-names/e-select-names-manager.c
- (e_select_names_manager_add_section): Made const-aware.
- (e_select_names_manager_create_entry): Made const-aware.
- (e_select_names_manager_activate_dialog): Made const-aware.
-
- * gui/component/select-names/Evolution-Addressbook-SelectNames.idl:
- New.
-
-2000-07-08 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/component/e-addressbook-model.c,
- gui/component/e-addressbook-model.h: Added an "editable" argument.
-
- * gui/component/select-names/e-select-names.c: Set our
- EAddressModel to not be editable.
-
-2000-07-07 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/component/select-names/e-select-names.c: Changed to line
- mode.
-
-2000-07-07 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/component/select-names/e-select-names-manager.c,
- gui/component/select-names/e-select-names-model.c: Implemented the
- get_cards function.
-
- * gui/component/select-names/e-select-names.c: Implemented adding
- cards through the interface.
-
-2000-07-07 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/component/select-names/e-select-names-manager.c: Make the
- entry widgets we create editable.
-
- * gui/component/select-names/e-select-names-model.c: Use
- e_strsplit instead of g_strsplit. Fixed an off by 1 error.
-
- * gui/component/select-names/e-select-names-table-model.c: When
- the model changes, send a model changed signal.
-
- * gui/component/select-names/e-select-names-text-model.c: Made
- changing this work correctly if it's empty. Made change signals
- propagate properly. Is a bit better about freeing iterators when
- done.
-
- * gui/component/select-names/e-select-names.c: Made the finished
- lists be in order instead of being sorted.
-
-2000-07-07 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/component/addressbook.c (new_server_cb): Since
- ELDAPServer->port is a char *, allocate a string with the number
- 389 contained.
-
- * gui/component/addressbook.c: Make the select names test test the
- new code instead of the old way of getting to an ESelectNames
- dialog.
-
- * gui/component/select-names/e-select-names-manager.c: Coded
- storing the model for each section, creating an entry and
- returning it, and for activating the dialog. Wrote a bit of the
- get_cards code, but not all of it.
-
- * gui/component/select-names/e-select-names-model.c,
- gui/component/select-names/e-select-names-model.h: Coded all of
- the code needed to make ESelectNamesTextModel work (it doesn't
- yet, but all the code should be there.) Removed
- E_SELECT_NAMES_MODEL_DATA_TYPE_SEPARATION_MATERIAL.
-
- * gui/component/select-names/e-select-names-table-model.c,
- gui/component/select-names/e-select-names-text-model.c: Changed
- these to compensate for removal of
- E_SELECT_NAMES_MODEL_DATA_TYPE_SEPARATION_MATERIAL.
-
- * gui/component/select-names/e-select-names-table-model.h,
- gui/component/select-names/e-select-names-text-model.h: Fixed some
- silly typos.
-
- * gui/component/select-names/e-select-names.c,
- gui/component/select-names/e-select-names.h: Added a parameter to
- add_section that lets you specify the source ESelectNamesModel.
-
-2000-07-06 Chris Toshok <toshok@helixcode.com>
-
- * gui/component/e-ldap-storage.h: add scope to ELDAPServer, and
- make port a string.
-
- * gui/component/e-ldap-storage.c (load_ldap_data): don't load a
- uri, load all the bits and pieces and build up the uri when
- creating the folder, according to the openldap url format.
- (ldap_server_foreach): store out each of the individual uri
- pieces.
- (e_ldap_storage_remove_server): free the new fields.
- (get_string_value): if the text is empty, return the empty string
- instead of NULL.
-
- * gui/component/e-ldap-server-dialog.c (extract_server_info): port is a string now.
- (fill_in_server_info): port is a string now.
-
-2000-07-06 Christopher James Lahey <clahey@helixcode.com>
-
- * contact-editor/e-contact-editor.c: Changed "FIXME: Save and
- Close" to "Save and Close". Removed some toolbar items that will
- never be used.
-
- * gui/component/select-names/e-select-names-model.c,
- gui/component/select-names/e-select-names-model.h: Added functions
- to allow you to modify the model (not implemented yet.)
-
- * gui/component/select-names/e-select-names-table-model.c,
- gui/component/select-names/e-select-names-table-model.h: Finished
- this. Doesn't support changing the model at all.
-
- * gui/component/select-names/e-select-names-text-model.c: Finished
- this. Changing the model by typing is done, but doesn't work
- since none of the functions in the base model are implemented.
-
-2000-07-05 Chris Toshok <toshok@helixcode.com>
-
- * gui/component/addressbook.c (new_server_cb): call
- e_ldap_storage_add_server call.
-
- * gui/component/ldap-server-dialog.glade: add name row.
-
- * gui/component/e-ldap-server-dialog.h: remove the ELDAPServer type.
-
- * gui/component/e-ldap-server-dialog.c (extract_server_info): add
- support for the name-entry.
-
- * gui/component/e-ldap-server-dialog.c (fill_in_server_info): same.
-
- * gui/component/e-ldap-storage.h: add ELDAPServer type, and add
- prototypes for e_ldap_storage_add_server and
- e_ldap_storage_remove_server.
-
- * gui/component/e-ldap-storage.c (e_ldap_storage_add_server): new
- function, add it to our hash table, add a shell folder, and save
- out the metadata.
- (ldap_server_foreach): add the ldap server info under a
- "contactserver" node.
- (setup_ldap_storage): create our hashtable.
-
-2000-07-05 Chris Toshok <toshok@helixcode.com>
-
- * gui/component/addressbook.c (set_prop): remove hack to read
- "uri" file from local directory.
-
- * gui/component/Makefile.am (evolution_addressbook_SOURCES): add
- e-ldap-storage.{c,h}
-
- * gui/component/addressbook-component.c (owner_set_cb): call
- setup_ldap_storage.
-
- * gui/component/e-ldap-storage.c (setup_ldap_storage): Register
- the LDAP storage and load the .xml file.
- (load_ldap_data): function to load our xml file.
- (save_ldap_data): function to save our xml file.
-
- * gui/component/e-ldap-storage.h: new file.
-
-2000-07-03 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/component/select-names/e-select-names-manager.c,
- gui/component/select-names/e-select-names-text-model.c,
- gui/component/select-names/e-select-names.c: Fixed more compile
- errors.
-
-2000-07-03 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/component/select-names/Makefile.am: Fixed compile error.
-
-2000-07-03 Christopher James Lahey <clahey@helixcode.com>
-
- * backend/ebook/Makefile.am: Removed e-card-iterator.c,
- e-card-iterator.h, e-card-list-iterator.c, e-card-list-iterator.h,
- e-card-list.c, e-card-list.h.
-
- * backend/ebook/e-card-iterator.c,
- backend/ebook/e-card-iterator.h,
- backend/ebook/e-card-list-iterator.c,
- backend/ebook/e-card-list-iterator.h, backend/ebook/e-card-list.c,
- backend/ebook/e-card-list.h: Removed in favor or versions without
- the -card in the e-util directory since these classes are not
- specific to cards at all.
-
- * backend/ebook/e-card-simple.c, backend/ebook/e-card-simple.h,
- backend/ebook/e-card.c, backend/ebook/e-card.h,
- backend/ebook/load-pine-addressbook.c, backend/ebook/test-card.c,
- backend/pas/pas-backend-file.c: Changed the references to
- e-card-list.c and friends to e-list.c and friends.
-
- * contact-editor/e-contact-editor.c: Added #include
- <e-contact-save-as.h> to fix a warning.
-
- * gui/component/Makefile.am: Moved a number of classes associated
- with the select-names object to the new select-names directory.
-
- * gui/component/addressbook.c: Changed the reference to
- e-select-names.h.
-
- * gui/component/e-select-names.c, gui/component/e-select-names.h,
- gui/component/select-names.glade,
- gui/component/select-names.glade.h: Moved these files into
- select-names/.
-
- * gui/component/select-names/.cvsignore,
- gui/component/select-names/Makefile.am,
- gui/component/select-names/e-select-names-manager.c,
- gui/component/select-names/e-select-names-manager.h,
- gui/component/select-names/e-select-names-model.c,
- gui/component/select-names/e-select-names-model.h,
- gui/component/select-names/e-select-names-table-model.c,
- gui/component/select-names/e-select-names-table-model.h,
- gui/component/select-names/e-select-names-text-model.c,
- gui/component/select-names/e-select-names-text-model.h,
- gui/component/select-names/e-select-names.c,
- gui/component/select-names/e-select-names.h,
- gui/component/select-names/recipient.glade,
- gui/component/select-names/select-names.glade,
- gui/component/select-names/select-names.glade.h: New files for
- select names dialog (e-select-names.c, e-select-names.h,
- select-names.glade, select-names.glade.h and recipient.glade moved
- from gui/component/.)
-
-2000-06-29 Ettore Perazzoli <ettore@helixcode.com>
-
- * gui/component/addressbook-component.c (owner_set_cb): Get an
- EvolutionShellClient instead of an Evolution_Shell to match the
- changes in libeshell.
-
-2000-06-28 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/component/select-names/,
- gui/component/select-names/e-select-names-manager.c,
- gui/component/select-names/e-select-names-manager.h: New select
- names manager interface (Not complete.)
-
-2000-06-26 Christopher James Lahey <clahey@helixcode.com>
-
- * contact-editor/e-contact-editor-categories.c,
- addressbook/gui/component/e-cardlist-model.c: Added
- value_to_string handlers.
-
- * demo/addressbook-widget.c, demo/demo.c: Removed usage of "x" and
- "y" arguments.
-
- * addressbook/gui/component/addressbook.c: Activated Click To Add
- and set the click to add message.
-
- * addressbook/gui/component/e-addressbook-model.c: Added
- value_to_string and append_row handlers.
-
- * addressbook/gui/component/e-select-names.c: Added a column.
-
-2000-06-26 Chris Toshok <toshok@helixcode.com>
-
- * backend/pas/pas-backend-ldap.c (poll_ldap): remove spew.
- (pas_backend_ldap_ensure_connected): duh, don't access a pointer
- we know to be NULL.
- (query_prop_to_ldap): rename map_e_card_prop_to_ldap to this.
- easier to type.
-
-2000-06-21 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/minicard/test-minicard-label.c,
- gui/minicard/test-minicard.c, gui/minicard/test-reflow.c: Remove
- usage of "x" and "y" arguments.
-
-2000-06-18 <ettore@helixcode.com>
-
- * contact-editor/Makefile.am (INCLUDES): Use
- `$(BONOBO_GNOME_CFLAGS)' so that we compile when Bonobo is not in
- the default GNOME prefix.
-
-2000-06-17 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/minicard/e-minicard-label.c,
- gui/minicard/e-minicard-label.h, gui/minicard/e-minicard.c: Made
- the left column of minicards not get any wider than the widest
- possible name.
-
-2000-06-13 Ettore Perazzoli <ettore@helixcode.com>
-
- * gui/component/Makefile.am (SHELL_OBJS): Removed.
- (evolution_addressbook_LDADD): Link with
- `$(top_builddir)/shell/libeshell.a'.
-
-2000-06-12 Federico Mena Quintero <federico@helixcode.com>
-
- * contact-editor/e-contact-editor-categories.c: Removed the
- ETableModel thaw handler.
- * gui/component/e-cardlist-model.c: Likewise.
-
-2000-06-11 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/component/e-select-names.c: Fixed the widget reparenting.
-
-2000-06-11 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/component/Makefile.am: Added glade files.
-
- * gui/component/addressbook.c: Added a test of the Select Names
- functionality.
-
- * gui/component/e-addressbook-model.c: Made this class_init
- function a bit cleaner.
-
- * gui/component/e-select-names.c: Tested this and fixed some
- obvious errors.
-
- * gui/component/select-names.glade: The main window shouldn't be
- visible by default.
-
-2000-06-11 Ettore Perazzoli <ettore@helixcode.com>
-
- * contact-editor/Makefile.am (contact_editor_test_LDADD): Link
- with libemiscwidgets.a.
- * gui/component/Makefile.am (evolution_addressbook_LDADD): Likewise.
- * gui/minicard/Makefile.am (minicard_test_LDADD): Likewise.
- (reflow_test_LDADD): Likewise.
- (minicard_view_test_LDADD): Likewise.
-
-2000-06-10 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/component/e-cardlist-model.c: Renamed a bunch of functions
- for better readability.
-
- * gui/component/e-select-names.c, gui/component/e-select-names.h:
- This should be a working dialog now.
-
- * gui/component/select-names.glade: Changed the name & creation
- function of the ETable here.
-
-2000-06-10 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/component/select-names.glade,
- gui/component/select-names.glade.h: Glade files for Select Names
- dialog.
-
-2000-06-10 Christopher James Lahey <clahey@helixcode.com>
-
- * contact-editor/e-contact-editor.c: Do e_card_simple_sync and
- extract_info more often.
-
- * gui/component/addressbook.c: Added table printing code.
-
-2000-06-09 Ettore Perazzoli <ettore@helixcode.com>
-
- * gui/component/addressbook-component.c (factory_fn): Pass NULL
- for the new args @create_folder_fn and @remove_folder_fn.
-
-2000-06-08 Ettore Perazzoli <ettore@helixcode.com>
-
- * gui/component/addressbook-component.c (create_view): Updated for
- the new `EvolutionShellComponentCreateViewFn'. Return
- `EVOLUTION_SHELL_COMPONENT_UNSUPPORTEDTYPE' if @type is not
- "contacts".
-
-2000-06-08 Christopher James Lahey <clahey@helixcode.com>
-
- * contact-editor/e-contact-editor.c: Bind Save As to save the
- current view of the contact as a vcard.
-
-2000-06-08 Federico Mena Quintero <federico@helixcode.com>
-
- * contact-editor/e-contact-editor.c (save_card): Doh, sync the
- card simple and extract the card info.
-
-2000-06-08 Federico Mena Quintero <federico@helixcode.com>
-
- * contact-editor/e-contact-editor.h (EContactEditor): Now this
- derives from GtkObject. It follows the same strategy as the
- EventEditor in the calendar.
- (EContactEditor): Added an is_new_card field so that we can know
- whether to add() or commit() the card.
-
- * contact-editor/e-contact-editor.c (e_contact_editor_get_type):
- Derive from GtkObject.
- (e_contact_editor_class_init): Likewise.
- (e_contact_editor_class_init): Added an "is_new_card" argument.
- (e_contact_editor_set_arg): Handle ARG_IS_NEW_CARD.
- (e_contact_editor_get_arg): Likewise.
- (e_contact_editor_new): Take in an is_new_arg argument and set it
- on the object.
- (e_contact_editor_init): Load the app widget into the app field of
- the EContactEditor structure. Create its UIHandler as well.
- (e_contact_editor_class_init): New "add_card", "commit_card", and
- "editor_closed" signals.
-
- * contact-editor/test-editor.c (main): Modified for the new API.
- (editor_closed_cb): Tweaked for the new API.
- Since this test program does not use Bonobo, it doesn't work,
- though.
-
- * gui/component/addressbook.c (new_contact_cb): Use the new
- contact editor API.
- (table_double_click): Ditto.
-
- * gui/minicard/e-minicard-view.c (e_minicard_view_event): Use the
- new contact editor API.
-
- * gui/minicard/e-minicard.c (e_minicard_event): Use the new
- contact editor API.
-
-2000-06-08 Ettore Perazzoli <ettore@helixcode.com>
-
- * contact-editor/Makefile.am (contact_editor_test_LDADD): Remove
- the `$(srcdir)/' prefix from `libecontacteditor.a' because [of
- course] the library is built in the build directory, not in the
- source directory.
- * gui/minicard/Makefile.am (minicard_test_LDADD): Likewise with
- `libeminicard.a'.
- (minicard_label_test_LDADD): Likewise.
- (reflow_test_LDADD): Likewise.
- (minicard_view_test_LDADD): Likewise.
-
-2000-06-06 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/component/addressbook.c: Bind right click on the ETable to
- "Save to VCard."
-
-2000-06-02 Christopher James Lahey <clahey@helixcode.com>
-
- * contact-editor/e-contact-editor.c: Made phone/email/address
- labels change correctly again.
-
-2000-06-02 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/component/addressbook-component.c: Made
- evolution-addressbook shut down when the shell is done with it.
-
-2000-06-02 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/minicard/e-minicard-view.c, gui/minicard/e-minicard.c: Made
- double click only work on the first button.
-
-2000-06-01 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/minicard/e-minicard.c: return TRUE if opening a contact
- editor so that we don't get a "new dialog" contact editor.
-
-2000-06-01 Ettore Perazzoli <ettore@helixcode.com>
-
- * gui/component/addressbook.c (new_contact_cb): Use the stock
- cancel button for the dialog.
- (table_double_click): Likewise.
- (find_contact_cb): Likewise.
-
-2000-05-31 Miguel de Icaza <miguel@helixcode.com>
-
- * contact-editor/contact-editor.glade: Added accelerators for
- the remaining items.
-
- Add spacing, beautify the dialogs.
-
-2000-06-01 Ettore Perazzoli <ettore@helixcode.com>
-
- * gui/component/addressbook.c (control_activate): Put the toolbar
- into a frame to make it look like standard GNOME toolbars. Also,
- set `GNOME_DOCK_ITEM_BEH_NEVER_VERTICAL' so that it does not do
- evil things when its moved to the left or the right of the window.
-
-2000-05-30 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/component/e-cardlist-model.c,
- gui/component/e-cardlist-model.h: New files for card list.
-
-2000-05-30 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/component/addressbook.c: Fixed a memory leak.
-
-2000-05-30 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/component/alphabet.glade: Made the alphabet buttons not
- focusable.
-
- * gui/minicard/e-minicard-view.c: Made the "123" button work.
-
- * gui/minicard/e-reflow-sorted.c: Made all buttons past the last
- letter available work.
-
-2000-05-30 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/component/alphabet.glade: Added a bit of space around the
- alphabet bar.
-
-2000-05-30 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/component/Makefile.am: Added alphabet.glade and
- alphabet.glade.h.
-
- * gui/component/addressbook.c, gui/component/alphabet.glade,
- gui/component/alphabet.glade.h: Added an alphabet bar.
-
- * gui/minicard/e-minicard-view.c, gui/minicard/e-minicard-view.h,
- gui/minicard/e-reflow-sorted.c, gui/minicard/e-reflow-sorted.h:
- Added the ability to just to a particular spot in the reflow.
-
-2000-05-30 Christopher James Lahey <clahey@helixcode.com>
-
- * printing/Makefile.am: Added BONOBO_GNOME_CFLAGS to CPPFLAGS.
-
-2000-05-30 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/minicard/e-minicard-view.c: Made double clicking create a
- new card. Set the empty message.
-
- * gui/minicard/e-minicard.c: Made sorting be case insensitive.
-
- * gui/minicard/e-reflow-sorted.c, e-reflow.c, e-reflow.h: Added a
- message for when the reflow is empty.
-
- * printing/e-contact-print.c, printing/medbook.ecps: Made the
- default printout be full page. Made sorting case insensitive.
-
-2000-05-30 Christopher James Lahey <clahey@helixcode.com>
-
- * backend/ebook/e-book-view-listener.c,
- backend/ebook/e-book-view-listener.h, backend/ebook/e-book-view.c,
- backend/ebook/e-book-view.h, backend/idl/addressbook.idl,
- backend/pas/pas-backend-file.c, backend/pas/pas-backend-ldap.c,
- backend/pas/pas-book-factory.c, backend/pas/pas-book-view.c,
- backend/pas/pas-book-view.h: Added "sequence_complete" signal.
-
- * printing/e-contact-print.c: Made printing wait for
- "sequence_complete" signal and made it sort.
-
-2000-05-25 Christopher James Lahey <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * gui/component/addressbook.c: Removed some columns.
-
-2000-05-25 Ettore Perazzoli <ettore@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * contact-editor/e-contact-save-as.c: Fixed some memory leaks.
-
-2000-05-23 Christopher James Lahey <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * contact-editor/e-contact-editor.c: Fixed a bug that broke
- address field support.
-
-2000-05-19 Christopher James Lahey <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * backend/ebook/e-card.c: Fixed the code to write out and read in
- arbitrary fields.
-
-2000-05-18 Christopher James Lahey <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <toshok@helixcode.com>
-
- * backend/pas/pas-backend-ldap.c (construct_email_list): convert to use ECardSimple.
- (poll_ldap): same.
-
-2000-05-16 Chris Toshok <toshok@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * backend/ebook/e-card.c (e_card_get_vcard): Fixed a large memory leak.
-
-2000-05-16 Christopher James Lahey <clahey@helixcode.com>
-
- * backend/ebook/e-card.c (add_list_unique): Fixed another memory
- leak.
-
-2000-05-16 Christopher James Lahey <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * contact-editor/e-contact-editor-categories.c: Fixed a reference
- leak.
-
-2000-05-16 Christopher James Lahey <clahey@helixcode.com>
-
- * contact-editor/e-contact-editor-categories.c: Fixed a compile
- error.
-
-2000-05-16 Christopher James Lahey <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * contact-editor/e-contact-editor-categories.c: Use the correct
- policy for resize.
-
-2000-05-14 Christopher James Lahey <clahey@helixcode.com>
-
- * 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 <miguel@gnu.org>
-
- * contact-editor/fulname.glade: Use accelerators here.
-
-2000-05-13 Valek Filippov <frob@df.ru>
-
- * 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 <danw@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * gui/component/addressbook.c: Make the table view be sorted by
- name initially.
-
-2000-05-10 Christopher James Lahey <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * gui/component/addressbook.c: Added a dialog for when you can't
- open an addressbook.
-
-2000-05-10 Christopher James Lahey <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * contact-editor/e-contact-editor.c: Make sure that the canvas
- doesn't intercept keyboard focus.
-
-2000-05-09 Christopher James Lahey <clahey@helixcode.com>
-
- * contact-editor/e-contact-editor.c: Use new art.
-
-2000-05-09 Christopher James Lahey <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * gui/minicard/e-minicard.c: Reenable editting.
-
- * gui/minicard/e-reflow-sorted.c: Make reflow flow on deletion.
-
-2000-05-09 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/component/addressbook.c: Destroy the view object when
- leaving the minicard view.
-
-2000-05-09 Christopher James Lahey <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * backend/pas/pas-backend-ldap.c: Enabled a couple more fields
-
-2000-05-09 Christopher James Lahey <clahey@helixcode.com>
-
- * backend/pas/pas-backend-file.c: Added a default card to all new
- file backends.
-
-2000-05-09 Christopher James Lahey <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * backend/ebook/e-card-simple.c: Fixed this up a bit. Syncing
- should work better now.
-
-2000-05-08 Christopher James Lahey <clahey@helixcode.com>
-
- * 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 <toshok@the-dot-in.helixcode.com>
-
- * 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 <toshok@helixcode.com>
-
- * ename/e-name-western.c (e_name_western_extract_middle): comment
- function, and fix an ABR.
-
-2000-05-07 Chris Toshok <toshok@helixcode.com>
-
- * ename/e-name-western.c (e_name_western_cleanup_string): comment
- function, and fix an ABR.
-
-2000-05-08 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/minicard/e-minicard.c: Added saving in minicard view.
-
-2000-05-07 Christopher James Lahey <clahey@helixcode.com>
-
- * backend/pas/pas-backend-file.c: Fixed an off by 2 error.
-
-2000-05-07 Chris Toshok <toshok@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * gui/component/e-addressbook-model.c: Replaced some model_changed
- calls with row_inserted calls.
-
-2000-05-07 Christopher James Lahey <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <toshok@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <toshok@helixcode.com>
-
- * gui/component/.cvsignore: ignore evolution-addressbook.pure
-
- * gui/component/Makefile.am: add support for generating
- evolution-addressbook.pure.
-
-2000-05-06 Chris Toshok <toshok@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * gui/component/addressbook.c: Made this take a uri through its
- property bag.
-
-2000-05-05 Christopher James Lahey <clahey@helixcode.com>
-
- * 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 <toshok@helixcode.com>
-
- * gui/component/addressbook.c (control_deactivate): #ifdef
- HAVE_LDAP the ldap specific stuff.
- (null_cb): same.
- (control_activate): same.
-
-2000-05-02 Ettore Perazzoli <ettore@helixcode.com>
-
- * backend/ebook/Makefile.am (INCLUDES): Add
- `-I$(top_srcdir)/addressbook/ename'.
-
-2000-05-02 Matt Loper <matt@helixcode.com>
-
- * demo/Makefile.am: set G_LOG_DOMAIN.
- * printing/Makefile.am: same.
-
-2000-05-01 Christopher James Lahey <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * Makefile.am: Switched the subdirs order since backend depends on
- ename.
-
-2000-05-01 Larry Ewing <lewing@helixcode.com>
-
- * backend/pas/pas-backend-ldap.c (pas_backend_ldap_remove_client):
- fix a typo in the for loop.
-
-2000-05-01 Michael Meeks <michael@helixcode.com>
-
- * backend/pas/pas-book-factory.c: include gtk.
-
-2000-04-30 Federico Mena Quintero <federico@helixcode.com>
-
- * 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 <toshok@helixcode.com>
-
- * 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 <toshok@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * backend/ebook/.cvsignore: Added load-pine-addressbook.
-
-2000-04-30 Christopher James Lahey <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * contact-editor/e-contact-editor-fullname.c,
- contact-editor/fullname.glade: Fixed a string mismatch.
-
-2000-04-30 Christopher James Lahey <clahey@helixcode.com>
-
- * 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 <toshok@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <lewing@helixcode.com>
-
- * 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 <ettore@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * contact-editor/e-contact-editor.c: Added proper handling of the
- email field.
-
-2000-04-26 Christopher James Lahey <clahey@helixcode.com>
-
- * 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 <ettore@helixcode.com>
-
- * 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 <federico@helixcode.com>
-
- * 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 cc89ee5aeb..0000000000
--- a/addressbook/Makefile.am
+++ /dev/null
@@ -1,7 +0,0 @@
-if ENABLE_PILOT_CONDUITS
-CONDUIT_SUBDIR=conduit
-endif
-
-SUBDIRS = \
- backend printing contact-editor gui $(CONDUIT_SUBDIR)
-
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 9d1d6f19ae..0000000000
--- a/addressbook/backend/ebook/.cvsignore
+++ /dev/null
@@ -1,22 +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
-load-gnomecard-addressbook
-evolution-gnomecard-importer
-Evolution-Composer-stubs.c
-Evolution-Composer-skels.c
-Evolution-Composer-common.c
-Evolution-Composer.h
-GNOME_Evolution_Addressbook_GnomeCard_Importer.oaf
diff --git a/addressbook/backend/ebook/GNOME_Evolution_Addressbook_GnomeCard_Importer.oaf.in b/addressbook/backend/ebook/GNOME_Evolution_Addressbook_GnomeCard_Importer.oaf.in
deleted file mode 100644
index 69dfa90871..0000000000
--- a/addressbook/backend/ebook/GNOME_Evolution_Addressbook_GnomeCard_Importer.oaf.in
+++ /dev/null
@@ -1,29 +0,0 @@
-<oaf_info>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Addressbook_GnomeCard_ImporterFactory"
- type="exe"
- location="evolution-gnomecard-importer">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/ObjectFactory:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="description" type="string"
- _value="Factory to import GnomeCard files into Evolution."/>
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Addressbook_GnomeCard_Importer"
- type="factory"
- location="OAFIID:GNOME_Evolution_Addressbook_GnomeCard_ImporterFactory">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/Evolution/Importer:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="evolution:menu-name" type="string"
- value="GnomeCard (.vcf, .gcrd)"/>
- <oaf_attribute name="description" type="string"
- _value="Imports GnomeCard files into Evolution."/>
-</oaf_server>
-
-</oaf_info>
diff --git a/addressbook/backend/ebook/Makefile.am b/addressbook/backend/ebook/Makefile.am
deleted file mode 100644
index c729d71624..0000000000
--- a/addressbook/backend/ebook/Makefile.am
+++ /dev/null
@@ -1,164 +0,0 @@
-noinst_PROGRAMS = test-card test-client test-client-list
-
-bin_PROGRAMS = evolution-gnomecard-importer \
- load-pine-addressbook load-gnomecard-addressbook
-
-CORBA_SOURCE = \
- addressbook.h \
- addressbook-common.c \
- addressbook-stubs.c \
- addressbook-skels.c \
- Evolution-Composer.h \
- Evolution-Composer-common.c \
- Evolution-Composer-skels.c \
- Evolution-Composer-stubs.c
-
-idls = \
- $(srcdir)/../idl/addressbook.idl \
- $(srcdir)/../../../composer/Evolution-Composer.idl
-
-idl_flags = `$(GNOME_CONFIG) --cflags idl` -I $(datadir)/idl
-
-$(CORBA_SOURCE): $(idls)
- $(ORBIT_IDL) -I $(srcdir) $(idls) $(idl_flags)
-
-INCLUDES = \
- -DGNOMELOCALEDIR=\""$(localedir)"\" \
- -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 \
- -I$(top_builddir)/shell \
- -I$(top_srcdir)/shell \
- $(BONOBO_GNOME_CFLAGS) \
- $(EXTRA_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-book-util.c \
- e-card-cursor.c \
- e-card-simple.c \
- e-card.c \
- e-destination.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-book-util.h \
- e-card-cursor.h \
- e-card-pairs.h \
- e-card-simple.h \
- e-card-types.h \
- e-card.h \
- e-destination.h
-
-
-#
-# make a static library for use by addressbook's conduit's shared library
-#
-noinst_LTLIBRARIES = libebook-static.la
-libebook_static_la_SOURCES = $(libebook_la_SOURCES)
-libebook_static_la_LDFLAGS = --all-static
-
-
-test_client_SOURCES = \
- test-client.c
-
-test_client_LDADD = \
- libebook.la \
- $(BONOBO_GNOME_LIBS) \
- $(EXTRA_GNOME_LIBS) \
- $(top_builddir)/libversit/libversit.la \
- $(top_builddir)/e-util/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) \
- $(EXTRA_GNOME_LIBS) \
- $(top_builddir)/e-util/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) \
- $(EXTRA_GNOME_LIBS) \
- $(top_builddir)/e-util/ename/libename.la \
- $(top_builddir)/libversit/libversit.la \
- $(top_builddir)/e-util/libeutil.la
-
-evolution_gnomecard_importer_SOURCES = \
- evolution-gnomecard-importer.c
-evolution_gnomecard_importer_LDADD = \
- libebook.la \
- $(BONOBO_GNOME_LIBS) \
- $(EXTRA_GNOME_LIBS) \
- $(top_builddir)/e-util/ename/libename.la \
- $(top_builddir)/libversit/libversit.la \
- $(top_builddir)/e-util/libeutil.la \
- $(top_builddir)/shell/importer/libevolution-importer.la
-
-load_pine_addressbook_SOURCES = \
- load-pine-addressbook.c
-
-load_pine_addressbook_LDADD = \
- libebook.la \
- $(BONOBO_GNOME_LIBS) \
- $(EXTRA_GNOME_LIBS) \
- $(top_builddir)/e-util/ename/libename.la \
- $(top_builddir)/libversit/libversit.la \
- $(top_builddir)/e-util/libeutil.la
-
-
-load_gnomecard_addressbook_SOURCES = \
- load-gnomecard-addressbook.c
-
-load_gnomecard_addressbook_LDADD = \
- libebook.la \
- $(BONOBO_GNOME_LIBS) \
- $(EXTRA_GNOME_LIBS) \
- $(top_builddir)/e-util/ename/libename.la \
- $(top_builddir)/libversit/libversit.la \
- $(top_builddir)/e-util/libeutil.la
-
-
-BUILT_SOURCES = $(CORBA_SOURCE)
-CLEANFILES += $(BUILT_SOURCES)
-
-dist-hook:
- cd $(distdir); rm -f $(BUILT_SOURCES)
-
-oafdir = $(datadir)/oaf
-oaf_in_files = GNOME_Evolution_Addressbook_GnomeCard_Importer.oaf.in
-oaf_DATA = $(oaf_in_files:.oaf.in=.oaf)
-
-@XML_I18N_MERGE_OAF_RULE@
-
-# add this back when you add the file to the archive ;)
-# GNOME_Evolution_Addressbook_Pine_Importer.oafinfo
-
-EXTRA_DIST = $(oaf_in_files) $(oaf_DATA)
-
-
-
-
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 ee4107190b..0000000000
--- a/addressbook/backend/ebook/e-book-listener.c
+++ /dev/null
@@ -1,712 +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 <config.h>
-#include <gtk/gtksignal.h>
-#include "e-book-listener.h"
-
-static EBookStatus e_book_listener_convert_status (GNOME_Evolution_Addressbook_BookListener_CallStatus status);
-
-enum {
- RESPONSES_QUEUED,
- LAST_SIGNAL
-};
-
-static guint e_book_listener_signals [LAST_SIGNAL];
-
-static BonoboObjectClass *e_book_listener_parent_class;
-POA_GNOME_Evolution_Addressbook_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,
- GNOME_Evolution_Addressbook_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,
- GNOME_Evolution_Addressbook_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,
- GNOME_Evolution_Addressbook_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_get_changes_response (EBookListener *listener,
- EBookStatus status,
- GNOME_Evolution_Addressbook_BookView book_view)
-{
- EBookListenerResponse *resp;
-
- resp = g_new0 (EBookListenerResponse, 1);
-
- resp->op = GetChangesResponse;
- 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
-e_book_listener_queue_writable_status (EBookListener *listener,
- gboolean writable)
-{
- EBookListenerResponse *resp;
-
- resp = g_new0 (EBookListenerResponse, 1);
-
- resp->op = WritableStatusEvent;
- resp->writable = writable;
-
- e_book_listener_queue_response (listener, resp);
-}
-
-static void
-e_book_listener_queue_authentication_response (EBookListener *listener,
- EBookStatus status)
-{
- EBookListenerResponse *resp;
-
- resp = g_new0 (EBookListenerResponse, 1);
-
- resp->op = AuthenticationResponse;
- resp->status = status;
-
- e_book_listener_queue_response (listener, resp);
-}
-
-static void
-e_book_listener_queue_get_supported_fields_response (EBookListener *listener,
- EBookStatus status,
- const GNOME_Evolution_Addressbook_stringlist *fields)
-{
- EBookListenerResponse *resp;
- int i;
-
- resp = g_new0 (EBookListenerResponse, 1);
-
- resp->op = GetSupportedFieldsResponse;
- resp->status = status;
- resp->fields = e_list_new ((EListCopyFunc)g_strdup, (EListFreeFunc)g_free, NULL);
-
- for (i = 0; i < fields->_length; i ++) {
- e_list_append (resp->fields, g_strdup (fields->_buffer[i]));
- }
-
- e_book_listener_queue_response (listener, resp);
-}
-
-static void
-impl_BookListener_respond_create_card (PortableServer_Servant servant,
- const GNOME_Evolution_Addressbook_BookListener_CallStatus status,
- const GNOME_Evolution_Addressbook_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 GNOME_Evolution_Addressbook_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 GNOME_Evolution_Addressbook_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 GNOME_Evolution_Addressbook_BookListener_CallStatus status,
- const GNOME_Evolution_Addressbook_CardCursor cursor,
- CORBA_Environment *ev)
-{
- EBookListener *listener = E_BOOK_LISTENER (bonobo_object_from_servant (servant));
- GNOME_Evolution_Addressbook_CardCursor cursor_copy;
-
- cursor_copy = bonobo_object_dup_ref (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 GNOME_Evolution_Addressbook_BookListener_CallStatus status,
- const GNOME_Evolution_Addressbook_BookView book_view,
- CORBA_Environment *ev)
-{
- EBookListener *listener = E_BOOK_LISTENER (bonobo_object_from_servant (servant));
- GNOME_Evolution_Addressbook_BookView book_view_copy;
-
- book_view_copy = bonobo_object_dup_ref (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_get_changes (PortableServer_Servant servant,
- const GNOME_Evolution_Addressbook_BookListener_CallStatus status,
- const GNOME_Evolution_Addressbook_BookView book_view,
- CORBA_Environment *ev)
-{
- EBookListener *listener = E_BOOK_LISTENER (bonobo_object_from_servant (servant));
- GNOME_Evolution_Addressbook_BookView book_view_copy;
-
- book_view_copy = bonobo_object_dup_ref (book_view, ev);
-
- if (ev->_major != CORBA_NO_EXCEPTION) {
- g_warning ("EBookListener: Exception while duplicating BookView.\n");
- return;
- }
-
- e_book_listener_queue_get_changes_response (
- listener,
- e_book_listener_convert_status (status),
- book_view_copy);
-}
-
-static void
-impl_BookListener_respond_open_book (PortableServer_Servant servant,
- const GNOME_Evolution_Addressbook_BookListener_CallStatus status,
- const GNOME_Evolution_Addressbook_Book book,
- CORBA_Environment *ev)
-{
- EBookListener *listener = E_BOOK_LISTENER (bonobo_object_from_servant (servant));
- GNOME_Evolution_Addressbook_Book book_copy;
-
- book_copy = bonobo_object_dup_ref (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_respond_authentication_result (PortableServer_Servant servant,
- const GNOME_Evolution_Addressbook_BookListener_CallStatus status,
- CORBA_Environment *ev)
-{
- EBookListener *listener = E_BOOK_LISTENER (bonobo_object_from_servant (servant));
-
- e_book_listener_queue_authentication_response (
- listener, status);
-}
-
-static void
-impl_BookListener_response_get_supported_fields (PortableServer_Servant servant,
- const GNOME_Evolution_Addressbook_BookListener_CallStatus status,
- const GNOME_Evolution_Addressbook_stringlist *fields,
- CORBA_Environment *ev)
-{
- EBookListener *listener = E_BOOK_LISTENER (bonobo_object_from_servant (servant));
-
- e_book_listener_queue_get_supported_fields_response (
- listener, status, fields);
-}
-
-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);
-}
-
-static void
-impl_BookListener_report_writable (PortableServer_Servant servant,
- const CORBA_boolean writable,
- CORBA_Environment *ev)
-{
- EBookListener *listener = E_BOOK_LISTENER (bonobo_object_from_servant (servant));
-
- e_book_listener_queue_writable_status (listener, writable);
-}
-
-/**
- * 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 GNOME_Evolution_Addressbook_BookListener_CallStatus status)
-{
- switch (status) {
- case GNOME_Evolution_Addressbook_BookListener_Success:
- return E_BOOK_STATUS_SUCCESS;
- case GNOME_Evolution_Addressbook_BookListener_RepositoryOffline:
- return E_BOOK_STATUS_REPOSITORY_OFFLINE;
- case GNOME_Evolution_Addressbook_BookListener_PermissionDenied:
- return E_BOOK_STATUS_PERMISSION_DENIED;
- case GNOME_Evolution_Addressbook_BookListener_CardNotFound:
- return E_BOOK_STATUS_CARD_NOT_FOUND;
- case GNOME_Evolution_Addressbook_BookListener_ProtocolNotSupported:
- return E_BOOK_STATUS_PROTOCOL_NOT_SUPPORTED;
- case GNOME_Evolution_Addressbook_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_GNOME_Evolution_Addressbook_BookListener *servant;
- CORBA_Environment ev;
- CORBA_Object obj;
-
- g_assert (listener != NULL);
- g_assert (E_IS_BOOK_LISTENER (listener));
-
- servant = (POA_GNOME_Evolution_Addressbook_BookListener *) g_new0 (BonoboObjectServant, 1);
- servant->vepv = &e_book_listener_vepv;
-
- CORBA_exception_init (&ev);
-
- POA_GNOME_Evolution_Addressbook_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);
-
- bonobo_object_release_unref (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);
-
- bonobo_object_release_unref (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);
-
- bonobo_object_release_unref (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_GNOME_Evolution_Addressbook_BookListener__epv *
-e_book_listener_get_epv (void)
-{
- POA_GNOME_Evolution_Addressbook_BookListener__epv *epv;
-
- epv = g_new0 (POA_GNOME_Evolution_Addressbook_BookListener__epv, 1);
-
- epv->notifyOpenBookProgress = impl_BookListener_report_open_book_progress;
- epv->notifyBookOpened = impl_BookListener_respond_open_book;
-
- epv->notifyCardCreated = impl_BookListener_respond_create_card;
- epv->notifyCardRemoved = impl_BookListener_respond_remove_card;
- epv->notifyCardModified = impl_BookListener_respond_modify_card;
-
- epv->notifyAuthenticationResult = impl_BookListener_respond_authentication_result;
- epv->notifySupportedFields = impl_BookListener_response_get_supported_fields;
-
- epv->notifyCursorRequested = impl_BookListener_respond_get_cursor;
- epv->notifyViewRequested = impl_BookListener_respond_get_view;
- epv->notifyChangesRequested = impl_BookListener_respond_get_changes;
-
- epv->notifyConnectionStatus = impl_BookListener_report_connection_status;
- epv->notifyWritable = impl_BookListener_report_writable;
-
- 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.GNOME_Evolution_Addressbook_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 84cdfecced..0000000000
--- a/addressbook/backend/ebook/e-book-listener.h
+++ /dev/null
@@ -1,106 +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 <libgnome/gnome-defs.h>
-#include <bonobo/bonobo-object.h>
-#include <ebook/addressbook.h>
-#include <ebook/e-book-types.h>
-#include <e-util/e-list.h>
-
-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,
- GetChangesResponse,
- AuthenticationResponse,
- GetSupportedFieldsResponse,
-
- /* Async events */
- LinkStatusEvent,
- WritableStatusEvent,
- OpenProgressEvent,
-} EBookListenerOperation;
-
-typedef struct {
- EBookListenerOperation op;
-
- /* For most Response notifications */
- EBookStatus status;
-
- /* For OpenBookResponse */
- GNOME_Evolution_Addressbook_Book book;
-
- /* For GetCursorResponse */
- GNOME_Evolution_Addressbook_CardCursor cursor;
-
- /* For GetBookViewReponse */
- GNOME_Evolution_Addressbook_BookView book_view;
-
- /* For GetSupportedFields */
- EList *fields;
-
- /* For OpenProgressEvent */
- char *msg;
- short percent;
-
- /* For LinkStatusEvent */
- gboolean connected;
-
- /* For WritableStatusEvent */
- gboolean writable;
-
- /* 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_GNOME_Evolution_Addressbook_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 d7eee35ede..0000000000
--- a/addressbook/backend/ebook/e-book-types.h
+++ /dev/null
@@ -1,38 +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 <libgnome/gnome-defs.h>
-
-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_CANCELLED,
- E_BOOK_STATUS_OTHER_ERROR
-} EBookStatus;
-
-typedef enum {
- E_BOOK_SIMPLE_QUERY_STATUS_SUCCESS,
- E_BOOK_SIMPLE_QUERY_STATUS_CANCELLED,
- E_BOOK_SIMPLE_QUERY_STATUS_OTHER_ERROR
-} EBookSimpleQueryStatus;
-
-END_GNOME_DECLS
-
-#endif /* ! __E_BOOK_TYPES_H__ */
diff --git a/addressbook/backend/ebook/e-book-util.c b/addressbook/backend/ebook/e-book-util.c
deleted file mode 100644
index aa7ead900f..0000000000
--- a/addressbook/backend/ebook/e-book-util.c
+++ /dev/null
@@ -1,443 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * e-book-util.c
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Developed by Jon Trowbridge <trow@ximian.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 <gtk/gtkobject.h>
-#include <gtk/gtksignal.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-util.h>
-#include "e-book-util.h"
-
-gboolean
-e_book_load_local_address_book (EBook *book, EBookCallback open_response, gpointer closure)
-{
- gchar *filename;
- gchar *uri;
- gboolean rv;
-
- g_return_val_if_fail (book != NULL, FALSE);
- g_return_val_if_fail (E_IS_BOOK (book), FALSE);
- g_return_val_if_fail (open_response != NULL, FALSE);
-
- filename = gnome_util_prepend_user_home ("evolution/local/Contacts/addressbook.db");
- uri = g_strdup_printf ("file://%s", filename);
-
- rv = e_book_load_uri (book, uri, open_response, closure);
-
- g_free (filename);
- g_free (uri);
-
- return rv;
-}
-
-/*
- *
- * Simple Query Stuff
- *
- */
-
-typedef struct _SimpleQueryInfo SimpleQueryInfo;
-struct _SimpleQueryInfo {
- guint tag;
- EBook *book;
- gchar *query;
- EBookSimpleQueryCallback cb;
- gpointer closure;
- EBookView *view;
- guint add_tag;
- guint seq_complete_tag;
- GList *cards;
-};
-
-static void
-book_add_simple_query (EBook *book, SimpleQueryInfo *info)
-{
- GList *pending = gtk_object_get_data (GTK_OBJECT (book), "sq_pending");
- pending = g_list_prepend (pending, info);
- gtk_object_set_data (GTK_OBJECT (book), "sq_pending", pending);
-}
-
-static SimpleQueryInfo *
-book_lookup_simple_query (EBook *book, guint tag)
-{
- GList *pending = gtk_object_get_data (GTK_OBJECT (book), "sq_pending");
- while (pending) {
- SimpleQueryInfo *sq = pending->data;
- if (sq->tag == tag)
- return sq;
- pending = g_list_next (pending);
- }
- return NULL;
-}
-
-static void
-book_remove_simple_query (EBook *book, SimpleQueryInfo *info)
-{
- GList *pending = gtk_object_get_data (GTK_OBJECT (book), "sq_pending");
- GList *i;
-
- for (i=pending; i != NULL; i = g_list_next (i)) {
- if (i->data == info) {
- pending = g_list_remove_link (pending, i);
- g_list_free_1 (i);
- break;
- }
- }
- gtk_object_set_data (GTK_OBJECT (book), "sq_pending", pending);
-}
-
-static guint
-book_issue_tag (EBook *book)
-{
- gpointer ptr = gtk_object_get_data (GTK_OBJECT (book), "sq_tag");
- guint tag = GPOINTER_TO_UINT (ptr);
- if (tag == 0)
- tag = 1;
- gtk_object_set_data (GTK_OBJECT (book), "sq_tag", GUINT_TO_POINTER (tag+1));
- return tag;
-}
-
-#ifdef USE_WORKAROUND
-static GList *WORKAROUND_sq_queue = NULL;
-static gboolean WORKAROUND_running_query = FALSE;
-#endif
-
-static SimpleQueryInfo *
-simple_query_new (EBook *book, const char *query, EBookSimpleQueryCallback cb, gpointer closure)
-{
- SimpleQueryInfo *sq = g_new0 (SimpleQueryInfo, 1);
-
- sq->tag = book_issue_tag (book);
- sq->book = book;
- gtk_object_ref (GTK_OBJECT (book));
- sq->query = g_strdup_printf (query);
- sq->cb = cb;
- sq->closure = closure;
-
- /* Automatically add ourselves to the EBook's pending list. */
- book_add_simple_query (book, sq);
-
-#ifdef USE_WORKAROUND
- /* Add ourselves to the queue. */
- WORKAROUND_sq_queue = g_list_append (WORKAROUND_sq_queue, sq);
-#endif
-
- return sq;
-}
-
-static void
-simple_query_free (SimpleQueryInfo *sq)
-{
- /* Remove ourselves from the EBook's pending list. */
- book_remove_simple_query (sq->book, sq);
-
-#ifdef USE_WORKAROUND
- Glist *i;
-
- /* If we are still in the queue, remove ourselves. */
- for (i = WORKAROUND_sq_queue; i != NULL; i = g_list_next (i)) {
- if (i->data == sq) {
- WORKAROUND_sq_queue = g_list_remove_link (WORKAROUND_sq_queue, i);
- g_list_free_1 (i);
- break;
- }
- }
-#endif
-
- g_free (sq->query);
-
- if (sq->add_tag)
- gtk_signal_disconnect (GTK_OBJECT (sq->view), sq->add_tag);
- if (sq->seq_complete_tag)
- gtk_signal_disconnect (GTK_OBJECT (sq->view), sq->seq_complete_tag);
-
-#ifdef USE_WORKAROUND
- if (sq->view)
- WORKAROUND_running_query = FALSE;
-#endif
-
- if (sq->view)
- gtk_object_unref (GTK_OBJECT (sq->view));
-
- if (sq->book)
- gtk_object_unref (GTK_OBJECT (sq->book));
-
- g_list_foreach (sq->cards, (GFunc) gtk_object_unref, NULL);
- g_list_free (sq->cards);
-
- g_free (sq);
-}
-
-static void
-simple_query_card_added_cb (EBookView *view, const GList *cards, gpointer closure)
-{
- SimpleQueryInfo *sq = closure;
-
- sq->cards = g_list_concat (sq->cards, g_list_copy ((GList *) cards));
- g_list_foreach ((GList *) cards, (GFunc) gtk_object_ref, NULL);
-}
-
-static void
-simple_query_sequence_complete_cb (EBookView *view, gpointer closure)
-{
- SimpleQueryInfo *sq = closure;
-
- sq->cb (sq->book, E_BOOK_SIMPLE_QUERY_STATUS_SUCCESS, sq->cards, sq->closure);
- simple_query_free (sq);
-}
-
-static void
-simple_query_book_view_cb (EBook *book, EBookStatus status, EBookView *book_view, gpointer closure)
-{
- SimpleQueryInfo *sq = closure;
-
- if (status != E_BOOK_STATUS_SUCCESS) {
- sq->cb (sq->book, E_BOOK_SIMPLE_QUERY_STATUS_OTHER_ERROR, NULL, sq->closure);
- simple_query_free (sq);
- return;
- }
-
- sq->view = book_view;
- gtk_object_ref (GTK_OBJECT (book_view));
-
- sq->add_tag = gtk_signal_connect (GTK_OBJECT (sq->view),
- "card_added",
- GTK_SIGNAL_FUNC (simple_query_card_added_cb),
- sq);
- sq->seq_complete_tag = gtk_signal_connect (GTK_OBJECT (sq->view),
- "sequence_complete",
- GTK_SIGNAL_FUNC (simple_query_sequence_complete_cb),
- sq);
-}
-
-#ifdef USE_WORKAROUND
-static gint
-WORKAROUND_try_queue (gpointer foo)
-{
- if (WORKAROUND_sq_queue) {
- SimpleQueryInfo *sq;
- GList *i;
-
- if (WORKAROUND_running_query)
- return TRUE;
-
- WORKAROUND_running_query = TRUE;
- sq = WORKAROUND_sq_queue->data;
-
- i = WORKAROUND_sq_queue;
- WORKAROUND_sq_queue = g_list_remove_link (WORKAROUND_sq_queue, WORKAROUND_sq_queue);
- g_list_free_1 (i);
-
- e_book_get_book_view (sq->book, sq->query, simple_query_book_view_cb, sq);
- }
-
- return FALSE;
-}
-#endif
-
-guint
-e_book_simple_query (EBook *book, const char *query, EBookSimpleQueryCallback cb, gpointer closure)
-{
- SimpleQueryInfo *sq;
-
- g_return_val_if_fail (book && E_IS_BOOK (book), 0);
- g_return_val_if_fail (query, 0);
- g_return_val_if_fail (cb, 0);
-
- sq = simple_query_new (book, query, cb, closure);
-#ifdef USE_WORKAROUND
- gtk_timeout_add (50, WORKAROUND_try_queue, NULL);
-#else
- e_book_get_book_view (book, (gchar *) query, simple_query_book_view_cb, sq);
-#endif
-
- return sq->tag;
-}
-
-void
-e_book_simple_query_cancel (EBook *book, guint tag)
-{
- SimpleQueryInfo *sq;
-
- g_return_if_fail (book && E_IS_BOOK (book));
-
- sq = book_lookup_simple_query (book, tag);
-
- if (sq) {
- sq->cb (sq->book, E_BOOK_SIMPLE_QUERY_STATUS_CANCELLED, NULL, sq->closure);
- simple_query_free (sq);
- } else {
- g_warning ("Simple query tag %d is unknown", tag);
- }
-}
-
-/*
- *
- * Specialized Queries
- *
- */
-
-typedef struct _NameEmailQueryInfo NameEmailQueryInfo;
-struct _NameEmailQueryInfo {
- gchar *name;
- gchar *email;
- EBookSimpleQueryCallback cb;
- gpointer closure;
-};
-
-static void
-name_email_query_info_free (NameEmailQueryInfo *info)
-{
- if (info) {
- g_free (info->name);
- g_free (info->email);
- g_free (info);
- }
-}
-
-static void
-name_and_email_cb (EBook *book, EBookSimpleQueryStatus status, const GList *cards, gpointer closure)
-{
- NameEmailQueryInfo *info = closure;
- GList *filtered_cards = NULL;
-
- while (cards) {
- ECard *card = E_CARD (cards->data);
- if ((info->name == NULL || e_card_name_match_string (card->name, info->name))
- && (info->email == NULL || e_card_email_match_string (card, info->email)))
- filtered_cards = g_list_append (filtered_cards, card);
- cards = g_list_next (cards);
- }
-
- info->cb (book, status, filtered_cards, info->closure);
-
- g_list_free (filtered_cards);
-
- name_email_query_info_free (info);
-}
-
-guint
-e_book_name_and_email_query (EBook *book,
- const gchar *name,
- const gchar *email,
- EBookSimpleQueryCallback cb,
- gpointer closure)
-{
- NameEmailQueryInfo *info;
- gchar *email_query=NULL, *name_query=NULL, *query;
- guint tag;
-
- g_return_val_if_fail (book && E_IS_BOOK (book), 0);
- g_return_val_if_fail (cb != NULL, 0);
-
- if (name && !*name)
- name = NULL;
- if (email && !*email)
- email = NULL;
-
- if (name == NULL && email == NULL)
- return 0;
-
- /* Build our e-mail query.
- * We only query against the username part of the address, to avoid not matching
- * fred@foo.com and fred@mail.foo.com. While their may be namespace collisions
- * in the usernames of everyone out there, it shouldn't be that bad. (Famous last words.)
- */
- if (email) {
- const gchar *t=email;
- while (*t && *t != '@')
- ++t;
- if (*t == '@') {
- email_query = g_strdup_printf ("(beginswith \"email\" \"%.*s@\")", t-email, email);
-
- } else {
- email_query = g_strdup_printf ("(beginswith \"email\" \"%s\")", email);
- }
- }
-
- /* Build our name query.
- * We only do name-query stuff if we don't have an e-mail address. Our basic assumption
- * is that the username part of the email is good enough to keep the amount of stuff returned
- * in the query relatively small.
- */
- if (name && !email) {
- gchar *name_cpy = g_strdup (name), *qjoined;
- gchar **namev;
- gint i, count=0;
-
- g_strstrip (name_cpy);
- namev = g_strsplit (" ", name_cpy, 0);
- for (i=0; namev[i]; ++i) {
- if (*namev[i]) {
- namev[i] = g_strdup_printf ("(contains \"file_as\" \"%s\")", namev[i]);
- ++count;
- }
- }
-
- qjoined = g_strjoinv (" ", namev);
- if (count > 1) {
- name_query = g_strdup_printf ("(or %s)", qjoined);
- } else {
- name_query = qjoined;
- qjoined = NULL;
- }
-
-
- g_free (name_cpy);
- for (i=0; namev[i]; ++i)
- if (*namev[i])
- g_free (namev[i]);
- g_free (namev);
- g_free (qjoined);
- }
-
- /* Assemble our e-mail & name queries */
- if (email_query && name_query) {
- query = g_strdup_printf ("(and %s %s)", email_query, name_query);
- } else if (email_query) {
- query = email_query;
- email_query = NULL;
- } else if (name_query) {
- query = name_query;
- name_query = NULL;
- } else
- return 0;
-
- info = g_new0 (NameEmailQueryInfo, 1);
- info->name = g_strdup (name);
- info->email = g_strdup (email);
- info->cb = cb;
- info->closure = closure;
-
- tag = e_book_simple_query (book, query, name_and_email_cb, info);
-
- g_free (email_query);
- g_free (name_query);
- g_free (query);
-
- return tag;
-}
diff --git a/addressbook/backend/ebook/e-book-util.h b/addressbook/backend/ebook/e-book-util.h
deleted file mode 100644
index cf0103bfea..0000000000
--- a/addressbook/backend/ebook/e-book-util.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * e-book-util.h
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Developed by Jon Trowbridge <trow@ximian.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 __E_BOOK_UTIL_H__
-#define __E_BOOK_UTIL_H__
-
-#include <libgnome/gnome-defs.h>
-#include "e-book.h"
-
-BEGIN_GNOME_DECLS
-
-/* Callbacks for asynchronous functions. */
-typedef void (*EBookSimpleQueryCallback) (EBook *book, EBookSimpleQueryStatus status, const GList *cards, gpointer closure);
-
-gboolean e_book_load_local_address_book (EBook *book,
- EBookCallback open_response,
- gpointer closure);
-
-/* Simple Query Interface. */
-
-guint e_book_simple_query (EBook *book,
- const char *query,
- EBookSimpleQueryCallback cb,
- gpointer closure);
-void e_book_simple_query_cancel (EBook *book,
- guint tag);
-
-/* Specialized Name/Email Queries */
-
-guint e_book_name_and_email_query (EBook *book,
- const char *name,
- const char *email,
- EBookSimpleQueryCallback cb,
- gpointer closure);
-
-END_GNOME_DECLS
-
-
-#endif /* __E_BOOK_UTIL_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 5f25e7f22a..0000000000
--- a/addressbook/backend/ebook/e-book-view-listener.c
+++ /dev/null
@@ -1,464 +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 <config.h>
-#include <gtk/gtksignal.h>
-#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_GNOME_Evolution_Addressbook_BookViewListener__vepv e_book_view_listener_vepv;
-
-struct _EBookViewListenerPrivate {
- GList *response_queue;
- gint idle_id;
-
- guint stopped : 1;
-};
-
-static gboolean
-e_book_view_listener_check_queue (EBookViewListener *listener)
-{
- static gint thrash = 0;
- gint queue_len;
-
- if (listener->priv->stopped) {
- listener->priv->idle_id = 0;
- return TRUE;
- }
-
- queue_len = g_list_length (listener->priv->response_queue);
-
- bonobo_object_ref (BONOBO_OBJECT (listener));
- if (listener->priv->response_queue != NULL) {
- gtk_signal_emit (GTK_OBJECT (listener),
- e_book_view_listener_signals [RESPONSES_QUEUED]);
- }
-
- /* This means we didn't make any progress in dealing with what is on our
- response queue. */
- if (queue_len == g_list_length (listener->priv->response_queue))
- ++thrash;
- else
- thrash = 0;
-
- if (thrash > 20) {
- g_error ("e_book_view_listener_check_queue thrashing!");
- thrash = 0;
- listener->priv->idle_id = 0;
- return FALSE;
- }
-
- if (listener->priv->response_queue == NULL) {
- listener->priv->idle_id = 0;
- bonobo_object_unref (BONOBO_OBJECT (listener));
- return FALSE;
- }
- bonobo_object_unref (BONOBO_OBJECT (listener));
-
- 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_empty_event (EBookViewListener *listener,
- EBookViewListenerOperation op)
-{
- EBookViewListenerResponse *resp;
-
- if (listener->priv->stopped)
- return;
-
- resp = g_new0 (EBookViewListenerResponse, 1);
-
- resp->op = op;
- resp->id = NULL;
- resp->cards = NULL;
- resp->message = NULL;
-
- e_book_view_listener_queue_response (listener, resp);
-}
-
-/* Add, Remove, Modify */
-static void
-e_book_view_listener_queue_id_event (EBookViewListener *listener,
- EBookViewListenerOperation op,
- const char *id)
-{
- EBookViewListenerResponse *resp;
-
- if (listener->priv->stopped)
- return;
-
- resp = g_new0 (EBookViewListenerResponse, 1);
-
- resp->op = op;
- resp->id = g_strdup (id);
- resp->cards = NULL;
- resp->message = 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 GNOME_Evolution_Addressbook_VCardList *cards)
-{
- EBookViewListenerResponse *resp;
- int i;
-
- if (listener->priv->stopped)
- return;
-
- resp = g_new0 (EBookViewListenerResponse, 1);
-
- resp->op = op;
- resp->id = NULL;
- resp->cards = NULL;
- resp->message = 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);
-}
-
-/* Status Message */
-static void
-e_book_view_listener_queue_message_event (EBookViewListener *listener,
- EBookViewListenerOperation op,
- const char *message)
-{
- EBookViewListenerResponse *resp;
-
- if (listener->priv->stopped)
- return;
-
- resp = g_new0 (EBookViewListenerResponse, 1);
-
- resp->op = op;
- resp->id = NULL;
- resp->cards = NULL;
- resp->message = g_strdup(message);
-
- e_book_view_listener_queue_response (listener, resp);
-}
-
-static void
-impl_BookViewListener_notify_card_added (PortableServer_Servant servant,
- const GNOME_Evolution_Addressbook_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_notify_card_removed (PortableServer_Servant servant,
- const GNOME_Evolution_Addressbook_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_notify_card_changed (PortableServer_Servant servant,
- const GNOME_Evolution_Addressbook_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);
-}
-
-static void
-impl_BookViewListener_notify_sequence_complete (PortableServer_Servant servant,
- CORBA_Environment *ev)
-{
- EBookViewListener *listener = E_BOOK_VIEW_LISTENER (bonobo_object_from_servant (servant));
-
- e_book_view_listener_queue_empty_event (listener, SequenceCompleteEvent);
-}
-
-static void
-impl_BookViewListener_notify_status_message (PortableServer_Servant servant,
- const char *message,
- CORBA_Environment *ev)
-{
- EBookViewListener *listener = E_BOOK_VIEW_LISTENER (bonobo_object_from_servant (servant));
-
- e_book_view_listener_queue_message_event (listener, StatusMessageEvent, message);
-}
-
-/**
- * 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_GNOME_Evolution_Addressbook_BookViewListener *servant;
- CORBA_Environment ev;
- CORBA_Object obj;
-
- g_assert (listener != NULL);
- g_assert (E_IS_BOOK_VIEW_LISTENER (listener));
-
- servant = (POA_GNOME_Evolution_Addressbook_BookViewListener *) g_new0 (BonoboObjectServant, 1);
- servant->vepv = &e_book_view_listener_vepv;
-
- CORBA_exception_init (&ev);
-
- POA_GNOME_Evolution_Addressbook_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;
- listener->priv->stopped = FALSE;
-}
-
-void
-e_book_view_listener_stop (EBookViewListener *listener)
-{
- GList *l;
-
- if (listener->priv->stopped)
- return;
-
- if (listener->priv->idle_id) {
- g_source_remove(listener->priv->idle_id);
- listener->priv->idle_id = 0;
- }
-
- for (l = listener->priv->response_queue; l != NULL; l = l->next) {
- EBookViewListenerResponse *resp = l->data;
-
- g_free(resp->id);
-
- g_list_foreach(resp->cards, (GFunc) gtk_object_unref, NULL);
- g_list_free(resp->cards);
-
- g_free (resp->message);
-
- g_free (resp);
- }
- g_list_free (listener->priv->response_queue);
- listener->priv->response_queue = NULL;
-
- listener->priv->stopped = TRUE;
-}
-
-static void
-e_book_view_listener_destroy (GtkObject *object)
-{
- EBookViewListener *listener = E_BOOK_VIEW_LISTENER (object);
-
- e_book_view_listener_stop (listener);
- g_free (listener->priv);
-
- GTK_OBJECT_CLASS (e_book_view_listener_parent_class)->destroy (object);
-}
-
-POA_GNOME_Evolution_Addressbook_BookViewListener__epv *
-e_book_view_listener_get_epv (void)
-{
- POA_GNOME_Evolution_Addressbook_BookViewListener__epv *epv;
-
- epv = g_new0 (POA_GNOME_Evolution_Addressbook_BookViewListener__epv, 1);
-
- epv->notifyCardChanged = impl_BookViewListener_notify_card_changed;
- epv->notifyCardRemoved = impl_BookViewListener_notify_card_removed;
- epv->notifyCardAdded = impl_BookViewListener_notify_card_added;
- epv->notifySequenceComplete = impl_BookViewListener_notify_sequence_complete;
- epv->notifyStatusMessage = impl_BookViewListener_notify_status_message;
-
- 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.GNOME_Evolution_Addressbook_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 5d85d86c3a..0000000000
--- a/addressbook/backend/ebook/e-book-view-listener.h
+++ /dev/null
@@ -1,78 +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 <libgnome/gnome-defs.h>
-#include <bonobo/bonobo-object.h>
-#include <addressbook/backend/ebook/addressbook.h>
-
-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,
- SequenceCompleteEvent,
- StatusMessageEvent,
-} EBookViewListenerOperation;
-
-typedef struct {
- EBookViewListenerOperation op;
-
- /* For CardRemovedEvent */
- char *id;
-
- /* For Card[Added|Modified]Event */
- GList *cards; /* Of type ECard. */
-
- /* For StatusMessageEvent */
- char *message;
-
-} 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);
-void e_book_view_listener_stop (EBookViewListener *listener);
-
-POA_GNOME_Evolution_Addressbook_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 f20531a50a..0000000000
--- a/addressbook/backend/ebook/e-book-view.c
+++ /dev/null
@@ -1,308 +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 <config.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtkmarshal.h>
-
-#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 {
- GNOME_Evolution_Addressbook_BookView corba_book_view;
-
- EBookViewListener *listener;
-
- int responses_queued_id;
-};
-
-enum {
- CARD_CHANGED,
- CARD_REMOVED,
- CARD_ADDED,
- SEQUENCE_COMPLETE,
- STATUS_MESSAGE,
- 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);
-}
-
-static void
-e_book_view_do_complete_event (EBookView *book_view,
- EBookViewListenerResponse *resp)
-{
- gtk_signal_emit (GTK_OBJECT (book_view), e_book_view_signals [SEQUENCE_COMPLETE]);
-}
-
-static void
-e_book_view_do_status_message_event (EBookView *book_view,
- EBookViewListenerResponse *resp)
-{
- gtk_signal_emit (GTK_OBJECT (book_view), e_book_view_signals [STATUS_MESSAGE],
- resp->message);
- g_free(resp->message);
-}
-
-
-/*
- * 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;
- case SequenceCompleteEvent:
- e_book_view_do_complete_event (book_view, resp);
- break;
- case StatusMessageEvent:
- e_book_view_do_status_message_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, GNOME_Evolution_Addressbook_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 = bonobo_object_dup_ref(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);
- 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 (GNOME_Evolution_Addressbook_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);
-
- bonobo_object_release_unref (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);
- e_book_view_listener_stop (book_view->priv->listener);
- 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);
-
- e_book_view_signals [SEQUENCE_COMPLETE] =
- gtk_signal_new ("sequence_complete",
- GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (EBookViewClass, sequence_complete),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
-
- e_book_view_signals [STATUS_MESSAGE] =
- gtk_signal_new ("status_message",
- GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (EBookViewClass, status_message),
- gtk_marshal_NONE__STRING,
- GTK_TYPE_NONE, 1,
- GTK_TYPE_STRING);
-
- gtk_object_class_add_signals (object_class, e_book_view_signals,
- LAST_SIGNAL);
-
- klass->card_changed = NULL;
- klass->card_added = NULL;
- klass->card_removed = NULL;
- klass->sequence_complete = NULL;
- klass->status_message = NULL;
-
- 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 35126d4fce..0000000000
--- a/addressbook/backend/ebook/e-book-view.h
+++ /dev/null
@@ -1,57 +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 <libgnome/gnome-defs.h>
-
-#include <addressbook/backend/ebook/e-card.h>
-#include <addressbook/backend/ebook/e-book-view-listener.h>
-
-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);
- void (* sequence_complete) (EBookView *book_view);
- void (* status_message) (EBookView *book_view, const char *message);
-};
-
-/* Creating a new addressbook. */
-EBookView *e_book_view_new (GNOME_Evolution_Addressbook_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 a5231f8303..0000000000
--- a/addressbook/backend/ebook/e-book.c
+++ /dev/null
@@ -1,1258 +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 <config.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtkmarshal.h>
-#include <libgnome/gnome-defs.h>
-#include <liboaf/liboaf.h>
-
-#include "addressbook.h"
-#include "e-card-cursor.h"
-#include "e-book-listener.h"
-#include "e-book.h"
-
-GtkObjectClass *e_book_parent_class;
-
-#define CARDSERVER_OAF_ID "OAFIID:GNOME_Evolution_Wombat_ServerFactory"
-
-typedef enum {
- URINotLoaded,
- URILoading,
- URILoaded
-} EBookLoadState;
-
-struct _EBookPrivate {
- GNOME_Evolution_Addressbook_BookFactory book_factory;
- EBookListener *listener;
-
- GNOME_Evolution_Addressbook_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;
-
- guint op_tag;
-};
-
-enum {
- OPEN_PROGRESS,
- WRITABLE_STATUS,
- LINK_STATUS,
- LAST_SIGNAL
-};
-
-static guint e_book_signals [LAST_SIGNAL];
-
-typedef struct {
- guint tag;
- gboolean active;
- gpointer cb;
- gpointer closure;
- EBookViewListener *listener;
-} EBookOp;
-
-/*
- * Local response queue management.
- */
-static guint
-e_book_queue_op (EBook *book,
- gpointer cb,
- gpointer closure,
- EBookViewListener *listener)
-{
- EBookOp *op;
-
- op = g_new0 (EBookOp, 1);
- op->tag = book->priv->op_tag++;
- op->active = TRUE;
- op->cb = cb;
- op->closure = closure;
- op->listener = listener;
-
- book->priv->pending_ops =
- g_list_append (book->priv->pending_ops, op);
-
- return op->tag;
-}
-
-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 gboolean
-e_book_cancel_op (EBook *book, guint tag)
-{
- GList *iter;
- gboolean cancelled = FALSE;
-
- for (iter = book->priv->pending_ops; iter != NULL && !cancelled; iter = g_list_next (iter)) {
- EBookOp *op = iter->data;
- if (op->tag == tag) {
- op->active = FALSE;
- cancelled = TRUE;
- }
- }
-
- return cancelled;
-}
-
-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) {
- if (op->active)
- ((EBookCursorCallback) op->cb) (book, resp->status, cursor, op->closure);
- else
- ((EBookCursorCallback) op->cb) (book, E_BOOK_STATUS_CANCELLED, NULL, op->closure);
- }
-
- /*
- * Release the remote GNOME_Evolution_Addressbook_Book in the PAS.
- */
- CORBA_exception_init (&ev);
-
- bonobo_object_release_unref (resp->cursor, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("e_book_do_response_get_cursor: Exception releasing "
- "remote GNOME_Evolution_Addressbook_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);
-
- /* Only execute the callback if the operation is still flagged as active (i.e. hasn't
- been cancelled. This is mildly wasteful since we unnecessaryily create the
- book_view, etc... but I'm leery of tinkering with the CORBA magic. */
- if (op->cb) {
- if (op->active)
- ((EBookBookViewCallback) op->cb) (book, resp->status, book_view, op->closure);
- else
- ((EBookBookViewCallback) op->cb) (book, E_BOOK_STATUS_CANCELLED, NULL, op->closure);
- }
-
- /*
- * Release the remote GNOME_Evolution_Addressbook_Book in the PAS.
- */
- CORBA_exception_init (&ev);
-
- bonobo_object_release_unref (resp->book_view, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("e_book_do_response_get_view: Exception releasing "
- "remote GNOME_Evolution_Addressbook_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_get_changes (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_changes: Cannot find operation "
- "in local op queue!\n");
- return;
- }
-
- book_view = e_book_view_new (resp->book_view, op->listener);
-
- if (op->cb) {
- if (op->active)
- ((EBookBookViewCallback) op->cb) (book, resp->status, book_view, op->closure);
- else
- ((EBookBookViewCallback) op->cb) (book, E_BOOK_STATUS_CANCELLED, NULL, op->closure);
- }
-
- /*
- * Release the remote GNOME_Evolution_Addressbook_BookView in the PAS.
- */
- CORBA_exception_init (&ev);
-
- bonobo_object_release_unref (resp->book_view, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("e_book_do_response_get_changes: Exception releasing "
- "remote GNOME_Evolution_Addressbook_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);
-}
-
-static void
-e_book_do_writable_event (EBook *book,
- EBookListenerResponse *resp)
-{
- gtk_signal_emit (GTK_OBJECT (book), e_book_signals [WRITABLE_STATUS],
- resp->writable);
-}
-
-static void
-e_book_do_response_get_supported_fields (EBook *book,
- EBookListenerResponse *resp)
-{
- EBookOp *op;
-
- op = e_book_pop_op (book);
-
- if (op == NULL) {
- g_warning ("e_book_do_response_get_supported_fields: Cannot find operation "
- "in local op queue!\n");
- return;
- }
-
- if (op->cb) {
- if (op->active)
- ((EBookFieldsCallback) op->cb) (book, resp->status, resp->fields, op->closure);
- else
- ((EBookFieldsCallback) op->cb) (book, E_BOOK_STATUS_CANCELLED, NULL, op->closure);
- }
-
- g_free (op);
-}
-
-/*
- * 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:
- case AuthenticationResponse:
- 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 GetChangesResponse:
- e_book_do_response_get_changes(book, resp);
- break;
- case OpenBookResponse:
- e_book_do_response_open (book, resp);
- break;
- case GetSupportedFieldsResponse:
- e_book_do_response_get_supported_fields (book, resp);
- break;
-
- case OpenProgressEvent:
- e_book_do_progress_event (book, resp);
- break;
- case LinkStatusEvent:
- e_book_do_link_event (book, resp);
- break;
- case WritableStatusEvent:
- e_book_do_writable_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);
-
- GNOME_Evolution_Addressbook_BookFactory_openBook (
- 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 != URILoaded) {
- g_warning ("e_book_unload_uri: No URI is loaded!\n");
- return;
- }
-
- /*
- * Release the remote GNOME_Evolution_Addressbook_Book in the PAS.
- */
- CORBA_exception_init (&ev);
-
- bonobo_object_release_unref (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;
-}
-
-char *
-e_book_get_static_capabilities (EBook *book)
-{
- CORBA_Environment ev;
- char *temp;
- char *ret_val;
-
- CORBA_exception_init (&ev);
-
- if (book->priv->load_state != URILoaded) {
- g_warning ("e_book_unload_uri: No URI is loaded!\n");
- return g_strdup("");
- }
-
- temp = GNOME_Evolution_Addressbook_Book_getStaticCapabilities(book->priv->corba_book, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("e_book_get_static_capabilities: Exception "
- "during get_static_capabilities!\n");
- CORBA_exception_free (&ev);
- return NULL;
- }
-
- ret_val = g_strdup(temp);
- CORBA_free(temp);
-
- CORBA_exception_free (&ev);
-
- return ret_val;
-}
-
-guint
-e_book_get_supported_fields (EBook *book,
- EBookFieldsCallback cb,
- gpointer closure)
-{
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
-
- if (book->priv->load_state != URILoaded) {
- g_warning ("e_book_unload_uri: No URI is loaded!\n");
- return 0;
- }
-
- GNOME_Evolution_Addressbook_Book_getSupportedFields(book->priv->corba_book, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("e_book_get_supported_fields: Exception "
- "during get_supported_fields!\n");
- CORBA_exception_free (&ev);
- return 0;
- }
-
- CORBA_exception_free (&ev);
-
- return e_book_queue_op (book, cb, closure, NULL);
-}
-
-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.
- */
-
- book->priv->book_factory = (GNOME_Evolution_Addressbook_BookFactory)
- oaf_activate_from_id (CARDSERVER_OAF_ID, 0, NULL, NULL);
- 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;
-}
-
-/* User authentication. */
-
-void
-e_book_authenticate_user (EBook *book,
- const char *user,
- const char *passwd,
- EBookCallback cb,
- gpointer closure)
-{
- CORBA_Environment ev;
-
- g_return_if_fail (book != NULL);
- g_return_if_fail (E_IS_BOOK (book));
-
- if (book->priv->load_state != URILoaded) {
- g_warning ("e_book_authenticate_user: No URI loaded!\n");
- return;
- }
-
- CORBA_exception_init (&ev);
-
- GNOME_Evolution_Addressbook_Book_authenticateUser (book->priv->corba_book,
- user,
- passwd,
- &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("e_book_authenticate_user: Exception authenticating user with the PAS!\n");
- CORBA_exception_free (&ev);
- return;
- }
-
- CORBA_exception_free (&ev);
-
- e_book_queue_op (book, cb, closure, NULL);
-}
-
-/* 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 = GNOME_Evolution_Addressbook_Book_getVCard (book->priv->corba_book,
- (GNOME_Evolution_Addressbook_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);
-
- GNOME_Evolution_Addressbook_Book_removeCard (
- book->priv->corba_book, (const GNOME_Evolution_Addressbook_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);
-
- GNOME_Evolution_Addressbook_Book_addCard (
- book->priv->corba_book, (const GNOME_Evolution_Addressbook_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);
-
- GNOME_Evolution_Addressbook_Book_modifyCard (
- book->priv->corba_book, (const GNOME_Evolution_Addressbook_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);
-
- GNOME_Evolution_Addressbook_Book_checkConnection (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;
-}
-
-guint
-e_book_get_cursor (EBook *book,
- gchar *query,
- EBookCursorCallback cb,
- gpointer closure)
-{
- CORBA_Environment ev;
-
- g_return_val_if_fail (book != NULL, 0);
- g_return_val_if_fail (E_IS_BOOK (book), 0);
-
- if (book->priv->load_state != URILoaded) {
- g_warning ("e_book_check_connection: No URI loaded!\n");
- return 0;
- }
-
- CORBA_exception_init (&ev);
-
- GNOME_Evolution_Addressbook_Book_getCursor (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 0;
- }
-
- CORBA_exception_free (&ev);
-
- return e_book_queue_op (book, cb, closure, NULL);
-
- return TRUE;
-}
-
-guint
-e_book_get_book_view (EBook *book,
- const gchar *query,
- EBookBookViewCallback cb,
- gpointer closure)
-{
- CORBA_Environment ev;
- EBookViewListener *listener;
-
- g_return_val_if_fail (book != NULL, 0);
- g_return_val_if_fail (E_IS_BOOK (book), 0);
-
- if (book->priv->load_state != URILoaded) {
- g_warning ("e_book_get_book_view: No URI loaded!\n");
- return 0;
- }
-
- listener = e_book_view_listener_new();
-
- CORBA_exception_init (&ev);
-
- GNOME_Evolution_Addressbook_Book_getBookView (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 0;
- }
-
- CORBA_exception_free (&ev);
-
- return e_book_queue_op (book, cb, closure, listener);
-}
-
-guint
-e_book_get_changes (EBook *book,
- gchar *changeid,
- EBookBookViewCallback cb,
- gpointer closure)
-{
- CORBA_Environment ev;
- EBookViewListener *listener;
-
- g_return_val_if_fail (book != NULL, 0);
- g_return_val_if_fail (E_IS_BOOK (book), 0);
-
- if (book->priv->load_state != URILoaded) {
- g_warning ("e_book_get_changes: No URI loaded!\n");
- return FALSE;
- }
-
- listener = e_book_view_listener_new();
-
- CORBA_exception_init (&ev);
-
- GNOME_Evolution_Addressbook_Book_getChanges (book->priv->corba_book, bonobo_object_corba_objref(BONOBO_OBJECT(listener)), changeid, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("e_book_changes: Exception "
- "getting changes!\n");
- CORBA_exception_free (&ev);
- return 0;
- }
-
- CORBA_exception_free (&ev);
-
- return e_book_queue_op (book, cb, closure, listener);
-}
-
-/**
- * e_book_cancel
- */
-
-void
-e_book_cancel (EBook *book, guint tag)
-{
- g_return_if_fail (book != NULL);
- g_return_if_fail (E_IS_BOOK (book));
- g_return_if_fail (tag != 0);
-
- /* In an attempt to be useful, we take a bit of extra care in reporting
- errors. This might come in handy someday. */
- if (tag >= book->priv->op_tag)
- g_warning ("Attempt to cancel unassigned operation (%u)", tag);
- else if (! e_book_cancel_op (book, tag))
- g_warning ("Attempt to cancel unknown operation (%u)", tag);
-}
-
-/**
- * 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 = GNOME_Evolution_Addressbook_Book_getName (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;
- book->priv->op_tag = 1;
-}
-
-static void
-e_book_destroy (GtkObject *object)
-{
- EBook *book = E_BOOK (object);
- CORBA_Environment ev;
-
- if (book->priv->load_state == URILoaded)
- 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);
-
- e_book_signals [WRITABLE_STATUS] =
- gtk_signal_new ("writable_status",
- GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (EBookClass, writable_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 ed635dcace..0000000000
--- a/addressbook/backend/ebook/e-book.h
+++ /dev/null
@@ -1,148 +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 <libgnome/gnome-defs.h>
-
-#include <addressbook/backend/ebook/e-card.h>
-#include <addressbook/backend/ebook/e-card-cursor.h>
-#include <addressbook/backend/ebook/e-book-view.h>
-#include <addressbook/backend/ebook/e-book-types.h>
-
-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);
- void (* writable_status) (EBook *book, gboolean writable);
-};
-
-/* 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);
-typedef void (*EBookFieldsCallback) (EBook *book, EBookStatus status, EList *fields, 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);
-
-char *e_book_get_static_capabilities (EBook *book);
-
-guint e_book_get_supported_fields (EBook *book,
- EBookFieldsCallback cb,
- gpointer closure);
-
-
-/* User authentication. */
-void e_book_authenticate_user (EBook *book,
- const char *user,
- const char *passwd,
- EBookCallback cb,
- gpointer closure);
-
-/* 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);
-guint e_book_get_cursor (EBook *book,
- char *query,
- EBookCursorCallback cb,
- gpointer closure);
-
-guint e_book_get_book_view (EBook *book,
- const gchar *query,
- EBookBookViewCallback cb,
- gpointer closure);
-
-guint e_book_get_changes (EBook *book,
- char *changeid,
- EBookBookViewCallback cb,
- gpointer closure);
-
-/* Cancel a pending operation. */
-void e_book_cancel (EBook *book,
- guint tag);
-
-
-/* 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 cccc493352..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 <clahey@helixcode.com.
- */
-
-#include <config.h>
-#include <gtk/gtkobject.h>
-#include "addressbook.h"
-#include "e-card-cursor.h"
-
-struct _ECardCursorPrivate {
- GNOME_Evolution_Addressbook_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);
-
- GNOME_Evolution_Addressbook_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 = GNOME_Evolution_Addressbook_CardCursor_count (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 = GNOME_Evolution_Addressbook_CardCursor_getNth(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 #GNOME_Evolution_Addressbook_CardCursor
- *
- * Wraps an #GNOME_Evolution_Addressbook_CardCursor object inside the #ECardCursor
- * @cursor object.
- *
- * Returns: a new #ECardCursor on success, or %NULL on failure.
- */
-ECardCursor *
-e_card_cursor_construct (ECardCursor *cursor,
- GNOME_Evolution_Addressbook_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);
- }
-
- GNOME_Evolution_Addressbook_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 #GNOME_Evolution_Addressbook_CardCursor to be wrapped
- *
- * Creates a new #ECardCursor, which wraps an #GNOME_Evolution_Addressbook_CardCursor
- * object.
- *
- * Returns: a new #ECardCursor on success, or %NULL on failure.
- */
-ECardCursor *
-e_card_cursor_new (GNOME_Evolution_Addressbook_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 a4dad0ff5b..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 <gtk/gtkobject.h>
-#include <libgnome/gnome-defs.h>
-#include <addressbook/backend/ebook/addressbook.h>
-#include <addressbook/backend/ebook/e-card.h>
-
-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 (GNOME_Evolution_Addressbook_CardCursor corba_cursor);
-ECardCursor *e_card_cursor_construct (ECardCursor *cursor,
- GNOME_Evolution_Addressbook_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-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 <libversit/vcc.h>
-#include <ebook/e-card.h>
-
-
-#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 6d5619d135..0000000000
--- a/addressbook/backend/ebook/e-card-simple.c
+++ /dev/null
@@ -1,1111 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Chris Lahey <clahey@helixcode.com>
- * 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 <config.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <gtk/gtkobject.h>
-
-#include <libversit/vcc.h>
-#include "e-card-simple.h"
-
-/* Object argument IDs */
-enum {
- ARG_0,
- ARG_CARD,
-};
-
-
-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,
- E_CARD_SIMPLE_INTERNAL_TYPE_SPECIAL,
-};
-
-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. */
-
-/* the ecard_field data below should only be used for TYPE_STRING,
- TYPE_DATE, and TYPE_SPECIAL fields. that is, it's only valid for
- e-cards for those types. it is used as a unique name for fields
- for the get_supported functionality. */
-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_FAMILY_NAME, "family_name", "Family Name", "Family Name", 0, E_CARD_SIMPLE_INTERNAL_TYPE_SPECIAL },
- { E_CARD_SIMPLE_FIELD_EMAIL, "email", "Email", "Email", E_CARD_SIMPLE_EMAIL_ID_EMAIL, E_CARD_SIMPLE_INTERNAL_TYPE_EMAIL },
- { E_CARD_SIMPLE_FIELD_PHONE_PRIMARY, "primary_phone", "Primary", "Prim", E_CARD_SIMPLE_PHONE_ID_PRIMARY, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE },
- { E_CARD_SIMPLE_FIELD_PHONE_ASSISTANT, "assistant_phone", "Assistant", "Assistant",E_CARD_SIMPLE_PHONE_ID_ASSISTANT, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE },
- { E_CARD_SIMPLE_FIELD_PHONE_BUSINESS, "business_phone", "Business", "Bus", E_CARD_SIMPLE_PHONE_ID_BUSINESS, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE },
- { E_CARD_SIMPLE_FIELD_PHONE_CALLBACK, "callback_phone", "Callback", "Callback", E_CARD_SIMPLE_PHONE_ID_CALLBACK, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE },
- { E_CARD_SIMPLE_FIELD_PHONE_COMPANY, "company_phone", "Company", "Comp", E_CARD_SIMPLE_PHONE_ID_COMPANY, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE },
- { E_CARD_SIMPLE_FIELD_PHONE_HOME, "home_phone", "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_address","Business", "Bus", E_CARD_SIMPLE_ADDRESS_ID_BUSINESS, E_CARD_SIMPLE_INTERNAL_TYPE_ADDRESS },
- { E_CARD_SIMPLE_FIELD_ADDRESS_HOME, "home_address", "Home", "Home", E_CARD_SIMPLE_ADDRESS_ID_HOME, E_CARD_SIMPLE_INTERNAL_TYPE_ADDRESS },
- { E_CARD_SIMPLE_FIELD_PHONE_MOBILE, "mobile_phone", "Mobile", "Mobile", E_CARD_SIMPLE_PHONE_ID_MOBILE, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE },
- { E_CARD_SIMPLE_FIELD_PHONE_CAR, "car_phone", "Car", "Car", E_CARD_SIMPLE_PHONE_ID_CAR, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE },
- { E_CARD_SIMPLE_FIELD_PHONE_BUSINESS_FAX, "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", "Home Fax", E_CARD_SIMPLE_PHONE_ID_HOME_FAX, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE },
- { E_CARD_SIMPLE_FIELD_PHONE_BUSINESS_2, "business_phone_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_phone_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", "ISDN", E_CARD_SIMPLE_PHONE_ID_ISDN, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE },
- { E_CARD_SIMPLE_FIELD_PHONE_OTHER, "other_phone", "Other", "Other", E_CARD_SIMPLE_PHONE_ID_OTHER, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE },
- { E_CARD_SIMPLE_FIELD_PHONE_OTHER_FAX, "other_fax", "Other Fax", "Other Fax", E_CARD_SIMPLE_PHONE_ID_OTHER_FAX, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE },
- { E_CARD_SIMPLE_FIELD_PHONE_PAGER, "pager", "Pager", "Pager", E_CARD_SIMPLE_PHONE_ID_PAGER, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE },
- { E_CARD_SIMPLE_FIELD_PHONE_RADIO, "radio", "Radio", "Radio", E_CARD_SIMPLE_PHONE_ID_RADIO, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE },
- { E_CARD_SIMPLE_FIELD_PHONE_TELEX, "telex", "Telex", "Telex", E_CARD_SIMPLE_PHONE_ID_TELEX, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE },
- { E_CARD_SIMPLE_FIELD_PHONE_TTYTTD, "tty", "TTY", "TTY", E_CARD_SIMPLE_PHONE_ID_TTYTTD, E_CARD_SIMPLE_INTERNAL_TYPE_PHONE },
- { E_CARD_SIMPLE_FIELD_ADDRESS_OTHER, "other_address", "Other", "Other", E_CARD_SIMPLE_ADDRESS_ID_OTHER, E_CARD_SIMPLE_INTERNAL_TYPE_ADDRESS },
- { E_CARD_SIMPLE_FIELD_EMAIL_2, "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", "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 },
- { E_CARD_SIMPLE_FIELD_NAME_OR_ORG, "nameororg", "", "", 0, E_CARD_SIMPLE_INTERNAL_TYPE_SPECIAL },
- { E_CARD_SIMPLE_FIELD_CATEGORIES, "categories", "Categories", "Categories", 0, E_CARD_SIMPLE_INTERNAL_TYPE_STRING },
-};
-static int field_data_count = sizeof (field_data) / sizeof (field_data[0]);
-
-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);
-
- 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;
- 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;
- 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) {
- EList *address_list;
- EList *phone_list;
- EList *email_list;
- EList *delivery_list;
- const ECardPhone *phone;
- const char *email;
- const ECardAddrLabel *address;
- const ECardDeliveryAddress *delivery;
- int i;
-
- EIterator *iterator;
-
- gtk_object_get(GTK_OBJECT(card),
- "address_label", &address_list,
- "address", &delivery_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_list_get_iterator(phone_list); e_iterator_is_valid(iterator); e_iterator_next(iterator)) {
- phone = e_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_list_get_iterator(email_list); e_iterator_is_valid(iterator); e_iterator_next(iterator)) {
- email = e_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_list_get_iterator(address_list); e_iterator_is_valid(iterator); e_iterator_next(iterator)) {
- address = e_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));
-
- for (i = 0; i < E_CARD_SIMPLE_ADDRESS_ID_LAST; i++) {
- e_card_delivery_address_free(simple->delivery[i]);
- simple->delivery[i] = NULL;
- }
- for (iterator = e_list_get_iterator(delivery_list); e_iterator_is_valid(iterator); e_iterator_next(iterator)) {
- delivery = e_iterator_get(iterator);
- for (i = 0; i < E_CARD_SIMPLE_ADDRESS_ID_LAST; i ++) {
- if (((delivery->flags & addr_correspondences[i]) == addr_correspondences[i]) && (simple->delivery[i] == NULL)) {
- simple->delivery[i] = e_card_delivery_address_copy(delivery);
- break;
- }
- }
- }
- gtk_object_unref(GTK_OBJECT(iterator));
- }
-}
-
-void
-e_card_simple_sync_card(ECardSimple *simple)
-{
- ECard *card = simple->card;
- if (card) {
- EList *address_list;
- EList *phone_list;
- EList *email_list;
- EList *delivery_list;
- const ECardPhone *phone;
- const ECardAddrLabel *address;
- const ECardDeliveryAddress *delivery;
- const char *email;
- int i;
- int iterator_next = 1;
-
- EIterator *iterator;
-
- gtk_object_get(GTK_OBJECT(card),
- "address_label", &address_list,
- "address", &delivery_list,
- "phone", &phone_list,
- "email", &email_list,
- NULL);
-
- for (iterator = e_list_get_iterator(phone_list); e_iterator_is_valid(iterator); iterator_next ? e_iterator_next(iterator) : FALSE ) {
- int i;
- phone = e_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_iterator_set(iterator, simple->phone[i]);
- } else {
- e_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_list_append(phone_list, simple->phone[i]);
- e_card_phone_free(simple->phone[i]);
- simple->phone[i] = NULL;
- }
- }
-
- for (iterator = e_list_get_iterator(email_list); e_iterator_is_valid(iterator); iterator_next ? e_iterator_next(iterator) : FALSE ) {
- int i;
- email = e_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_iterator_set(iterator, simple->email[i]);
- } else {
- e_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_list_append(email_list, simple->email[i]);
- g_free(simple->email[i]);
- simple->email[i] = NULL;
- }
- }
-
- for (iterator = e_list_get_iterator(address_list); e_iterator_is_valid(iterator); iterator_next ? e_iterator_next(iterator) : FALSE ) {
- int i;
- address = e_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_iterator_set(iterator, simple->address[i]);
- } else {
- e_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_list_append(address_list, simple->address[i]);
- e_card_address_label_free(simple->address[i]);
- simple->address[i] = NULL;
- }
- }
-
- for (iterator = e_list_get_iterator(delivery_list); e_iterator_is_valid(iterator); iterator_next ? e_iterator_next(iterator) : FALSE ) {
- int i;
- delivery = e_iterator_get(iterator);
- iterator_next = 1;
- for (i = 0; i < E_CARD_SIMPLE_ADDRESS_ID_LAST; i ++) {
- if ((delivery->flags & addr_correspondences[i]) == addr_correspondences[i]) {
- if (simple->delivery[i]) {
- simple->delivery[i]->flags = addr_correspondences[i];
- if (!e_card_delivery_address_is_empty(simple->delivery[i])) {
- e_iterator_set(iterator, simple->delivery[i]);
- } else {
- e_iterator_delete(iterator);
- iterator_next = 0;
- }
- e_card_delivery_address_free(simple->delivery[i]);
- simple->delivery[i] = NULL;
- break;
- }
- }
- }
- }
- gtk_object_unref(GTK_OBJECT(iterator));
- for (i = 0; i < E_CARD_SIMPLE_ADDRESS_ID_LAST; i ++) {
- if (simple->delivery[i]) {
- simple->delivery[i]->flags = addr_correspondences[i];
- e_list_append(delivery_list, simple->delivery[i]);
- e_card_delivery_address_free(simple->delivery[i]);
- simple->delivery[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];
-}
-
-const ECardDeliveryAddress *e_card_simple_get_delivery_address (ECardSimple *simple,
- ECardSimpleAddressId id)
-{
- return simple->delivery[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);
- if (simple->delivery[id])
- e_card_delivery_address_free(simple->delivery[id]);
- simple->delivery[id] = e_card_delivery_address_from_label(simple->address[id]);
-}
-
-void e_card_simple_set_delivery_address (ECardSimple *simple,
- ECardSimpleAddressId id,
- const ECardDeliveryAddress *delivery)
-{
- if (simple->delivery[id])
- e_card_delivery_address_free(simple->delivery[id]);
- simple->delivery[id] = e_card_delivery_address_copy(delivery);
-}
-
-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;
- ECardName *name;
- 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);
- case E_CARD_SIMPLE_INTERNAL_TYPE_SPECIAL:
- switch (field) {
- case E_CARD_SIMPLE_FIELD_NAME_OR_ORG:
- gtk_object_get(GTK_OBJECT(simple->card),
- "full_name", &string,
- NULL);
- if (string && *string)
- return g_strdup(string);
- gtk_object_get(GTK_OBJECT(simple->card),
- "org", &string,
- NULL);
- if (string && *string)
- return g_strdup(string);
- string = e_card_simple_get_email(simple,
- E_CARD_SIMPLE_EMAIL_ID_EMAIL);
- return g_strdup(string);
- case E_CARD_SIMPLE_FIELD_FAMILY_NAME:
- gtk_object_get (GTK_OBJECT(simple->card),
- "name", &name,
- NULL);
- return g_strdup (name->family);
- default:
- return NULL;
- }
- 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;
- case E_CARD_SIMPLE_INTERNAL_TYPE_SPECIAL:
- 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;
-
- case E_CARD_SIMPLE_INTERNAL_TYPE_SPECIAL:
- return E_CARD_SIMPLE_TYPE_STRING;
- }
-}
-
-const char *e_card_simple_get_ecard_field (ECardSimple *simple,
- ECardSimpleField field)
-{
- return field_data[field].ecard_field;
-}
-
-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) {
- EList *list;
- EIterator *iterator;
- gtk_object_get(GTK_OBJECT(simple->card),
- "arbitrary", &list,
- NULL);
- for (iterator = e_list_get_iterator(list); e_iterator_is_valid(iterator); e_iterator_next(iterator)) {
- const ECardArbitrary *arbitrary = e_iterator_get(iterator);
- if (callback)
- (*callback) (arbitrary, closure);
- }
- }
-}
-
-const ECardArbitrary *e_card_simple_get_arbitrary (ECardSimple *simple,
- const char *key)
-{
- if (simple->card) {
- EList *list;
- EIterator *iterator;
- gtk_object_get(GTK_OBJECT(simple->card),
- "arbitrary", &list,
- NULL);
- for (iterator = e_list_get_iterator(list); e_iterator_is_valid(iterator); e_iterator_next(iterator)) {
- const ECardArbitrary *arbitrary = e_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;
- EList *list;
- EIterator *iterator;
- gtk_object_get(GTK_OBJECT(simple->card),
- "arbitrary", &list,
- NULL);
- for (iterator = e_list_get_iterator(list); e_iterator_is_valid(iterator); e_iterator_next(iterator)) {
- const ECardArbitrary *arbitrary = e_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_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_list_append(list, new_arb);
- e_card_arbitrary_free(new_arb);
- }
-}
-
-/* These map between the individual list types and ECardSimpleField */
-ECardSimpleField
-e_card_simple_map_phone_to_field (ECardSimplePhoneId phone_id)
-{
- int i;
-
- g_return_val_if_fail (phone_id < E_CARD_SIMPLE_PHONE_ID_LAST, 0);
-
- for (i = 0; i < field_data_count; i ++)
- if (field_data[i].list_type_index == phone_id
- && field_data[i].type == E_CARD_SIMPLE_INTERNAL_TYPE_PHONE)
- return i;
-
- g_warning ("couldn't find phone id %d, returning 0 (which is almost assuredly incorrect)\n", phone_id);
-
- return 0;
-}
-
-ECardSimpleField
-e_card_simple_map_email_to_field (ECardSimpleEmailId email_id)
-{
- int i;
-
- g_return_val_if_fail (email_id < E_CARD_SIMPLE_EMAIL_ID_LAST, 0);
-
- for (i = 0; i < field_data_count; i ++)
- if (field_data[i].list_type_index == email_id
- && field_data[i].type == E_CARD_SIMPLE_INTERNAL_TYPE_EMAIL)
- return i;
-
- g_warning ("couldn't find email id %d, returning 0 (which is almost assuredly incorrect)\n", email_id);
- return 0;
-}
-
-ECardSimpleField
-e_card_simple_map_address_to_field (ECardSimpleAddressId address_id)
-{
- int i;
-
- g_return_val_if_fail (address_id < E_CARD_SIMPLE_ADDRESS_ID_LAST, 0);
-
- for (i = 0; i < field_data_count; i ++)
- if (field_data[i].list_type_index == address_id
- && field_data[i].type == E_CARD_SIMPLE_INTERNAL_TYPE_ADDRESS)
- return i;
-
- g_warning ("couldn't find address id %d, returning 0 (which is almost assuredly incorrect)\n", address_id);
- return 0;
-}
diff --git a/addressbook/backend/ebook/e-card-simple.h b/addressbook/backend/ebook/e-card-simple.h
deleted file mode 100644
index 608e7488df..0000000000
--- a/addressbook/backend/ebook/e-card-simple.h
+++ /dev/null
@@ -1,218 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Chris Lahey <clahey@helixcode.com>
- * 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 <time.h>
-#include <gtk/gtk.h>
-#include <stdio.h>
-#include <addressbook/backend/ebook/e-card.h>
-#include <addressbook/backend/ebook/e-card-types.h>
-#include <e-util/e-list.h>
-
-#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_FAMILY_NAME,
- E_CARD_SIMPLE_FIELD_EMAIL,
- E_CARD_SIMPLE_FIELD_PHONE_PRIMARY,
- E_CARD_SIMPLE_FIELD_PHONE_ASSISTANT,
- E_CARD_SIMPLE_FIELD_PHONE_BUSINESS,
- E_CARD_SIMPLE_FIELD_PHONE_CALLBACK,
- E_CARD_SIMPLE_FIELD_PHONE_COMPANY,
- 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_OTHER_FAX,
- E_CARD_SIMPLE_FIELD_PHONE_PAGER,
- E_CARD_SIMPLE_FIELD_PHONE_RADIO,
- E_CARD_SIMPLE_FIELD_PHONE_TELEX,
- E_CARD_SIMPLE_FIELD_PHONE_TTYTTD,
- 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_LAST_SIMPLE_STRING = 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_NAME_OR_ORG,
- E_CARD_SIMPLE_FIELD_CATEGORIES,
- 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];
- ECardDeliveryAddress *delivery[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_ecard_field (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);
-const ECardDeliveryAddress *e_card_simple_get_delivery_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_set_delivery_address (ECardSimple *simple,
- ECardSimpleAddressId id,
- const ECardDeliveryAddress *delivery);
-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);
-
-/* These map between the individual list types and ECardSimpleField */
-ECardSimpleField e_card_simple_map_phone_to_field (ECardSimplePhoneId phone_id);
-ECardSimpleField e_card_simple_map_email_to_field (ECardSimpleEmailId email_id);
-ECardSimpleField e_card_simple_map_address_to_field (ECardSimpleAddressId address_id);
-
-/* 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 ca160f0905..0000000000
--- a/addressbook/backend/ebook/e-card.c
+++ /dev/null
@@ -1,3673 +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 <config.h>
-#include <ctype.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <gtk/gtkobject.h>
-#include <bonobo/bonobo-object-client.h>
-#include <gal/util/e-util.h>
-
-#include <libversit/vcc.h>
-#include "e-util/ename/e-name-western.h"
-#include "e-util/ename/e-address-western.h"
-
-#include "e-card.h"
-#include "e-card-pairs.h"
-
-#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_WANTS_HTML "X-MOZILLA-HTML"
-#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_WANTS_HTML,
- ARG_WANTS_HTML_SET,
- 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_wants_html(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_WANTS_HTML, parse_wants_html },
- { 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;
- }
- if (card->name == NULL)
- card->name = e_card_name_new();
- if (card->file_as == NULL)
- card->file_as = g_strdup("");
- if (card->fname == NULL)
- card->fname = g_strdup("");
- 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);
- else if (card->fname)
- addProp(vobj, VCFullNameProp);
-
- 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);
- }
- else if (card->name)
- addProp(vobj, VCNameProp);
-
-
- if ( card->address ) {
- EIterator *iterator = e_list_get_iterator(card->address);
- for ( ; e_iterator_is_valid(iterator) ;e_iterator_next(iterator) ) {
- VObject *addressprop;
- ECardDeliveryAddress *address = (ECardDeliveryAddress *) e_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);
- addProp(addressprop, VCQuotedPrintableProp);
- }
- gtk_object_unref(GTK_OBJECT(iterator));
- }
-
- if ( card->address_label ) {
- EIterator *iterator = e_list_get_iterator(card->address_label);
- for ( ; e_iterator_is_valid(iterator) ;e_iterator_next(iterator) ) {
- VObject *labelprop;
- ECardAddrLabel *address_label = (ECardAddrLabel *) e_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 ) {
- EIterator *iterator = e_list_get_iterator(card->phone);
- for ( ; e_iterator_is_valid(iterator) ;e_iterator_next(iterator) ) {
- VObject *phoneprop;
- ECardPhone *phone = (ECardPhone *) e_iterator_get(iterator);
- phoneprop = addPropValue(vobj, VCTelephoneProp, phone->number);
-
- set_phone_flags (phoneprop, phone->flags);
- }
- gtk_object_unref(GTK_OBJECT(iterator));
- }
-
- if ( card->email ) {
- EIterator *iterator = e_list_get_iterator(card->email);
- for ( ; e_iterator_is_valid(iterator) ;e_iterator_next(iterator) ) {
- VObject *emailprop;
- emailprop = addPropValue(vobj, VCEmailAddressProp, (char *) e_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) {
- VObject *noteprop;
-
- noteprop = addPropValue(vobj, VCNoteProp, card->note);
- addProp(noteprop, VCQuotedPrintableProp);
- }
-
- if (card->categories) {
- EIterator *iterator;
- int length = 0;
- char *string;
- char *stringptr;
- for (iterator = e_list_get_iterator(card->categories); e_iterator_is_valid(iterator); e_iterator_next(iterator)) {
- length += strlen(e_iterator_get(iterator)) + 1;
- }
- string = g_new(char, length + 1);
- stringptr = string;
- *stringptr = 0;
- for (e_iterator_reset(iterator); e_iterator_is_valid(iterator); e_iterator_next(iterator)) {
- strcpy(stringptr, e_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->wants_html_set) {
- addPropValue (vobj, XEV_WANTS_HTML, card->wants_html ? "TRUE" : "FALSE");
- }
-
- if (card->arbitrary) {
- EIterator *iterator;
- for (iterator = e_list_get_iterator(card->arbitrary); e_iterator_is_valid(iterator); e_iterator_next(iterator)) {
- const ECardArbitrary *arbitrary = e_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;
- EList *list;
-
- assign_string(vobj, &next_email);
- gtk_object_get(GTK_OBJECT(card),
- "email", &list,
- NULL);
- e_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);
- EList *list;
-
- assign_string(vobj, &(next_phone->number));
- next_phone->flags = get_phone_flags(vobj);
-
- gtk_object_get(GTK_OBJECT(card),
- "phone", &list,
- NULL);
- e_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);
- EList *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_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);
- EList *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_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, EList *list, char *string)
-{
- char *temp = e_strdup_strip(string);
- EIterator *iterator;
-
- if (!*temp) {
- g_free(temp);
- return;
- }
- for ( iterator = e_list_get_iterator(list); e_iterator_is_valid(iterator); e_iterator_next(iterator)) {
- if (!strcmp(e_iterator_get(iterator), temp)) {
- break;
- }
- }
- if (!e_iterator_is_valid(iterator)) {
- e_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;
- EList *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);
- }
-}
-
-static void
-parse_wants_html(ECard *card, VObject *vobj)
-{
- if ( vObjectValueType (vobj) ) {
- char *str = fakeCString (vObjectUStringZValue (vobj));
- if (!strcasecmp(str, "true")) {
- card->wants_html = TRUE;
- card->wants_html_set = TRUE;
- }
- if (!strcasecmp(str, "false")) {
- card->wants_html = FALSE;
- card->wants_html_set = TRUE;
- }
- 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;
- EList *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_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->fname) {
- card->fname = g_strdup("");
- }
- if (!card->name) {
- card->name = e_card_name_from_string(card->fname);
- }
- if (!card->file_as) {
- 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;
- }
-}
-
-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::wants_html",
- GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_WANTS_HTML);
- gtk_object_add_arg_type ("ECard::wants_html_set",
- GTK_TYPE_BOOL, GTK_ARG_READABLE, ARG_WANTS_HTML);
- 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;
-}
-
-gboolean
-e_card_delivery_address_is_empty (const ECardDeliveryAddress *addr)
-{
- return (((addr->po == NULL) || (*addr->po == 0)) &&
- ((addr->ext == NULL) || (*addr->ext == 0)) &&
- ((addr->street == NULL) || (*addr->street == 0)) &&
- ((addr->city == NULL) || (*addr->city == 0)) &&
- ((addr->region == NULL) || (*addr->region == 0)) &&
- ((addr->code == NULL) || (*addr->code == 0)) &&
- ((addr->country == NULL) || (*addr->country == 0)));
-}
-
-ECardDeliveryAddress *
-e_card_delivery_address_from_label(const ECardAddrLabel *label)
-{
- ECardDeliveryAddress *addr = g_new(ECardDeliveryAddress, 1);
- EAddressWestern *western = e_address_western_parse (label->data);
-
- addr->po = g_strdup (western->po_box );
- addr->ext = g_strdup (western->extended );
- addr->street = g_strdup (western->street );
- addr->city = g_strdup (western->locality );
- addr->region = g_strdup (western->region );
- addr->code = g_strdup (western->postal_code);
- addr->country = g_strdup (western->country );
- addr->flags = label->flags;
-
- e_address_western_free(western);
-
- return addr;
-}
-
-char *
-e_card_delivery_address_to_string(const ECardDeliveryAddress *addr)
-{
- char *strings[5], **stringptr = strings;
- char *line1, *line22, *line2;
- char *final;
- if (addr->po && *addr->po)
- *(stringptr++) = addr->po;
- if (addr->street && *addr->street)
- *(stringptr++) = addr->street;
- *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 (addr->ext && *addr->ext)
- *(stringptr++) = addr->ext;
- 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_delivery_address_to_label (const ECardDeliveryAddress *addr)
-{
- ECardAddrLabel *label;
- label = e_card_address_label_new();
- label->flags = addr->flags;
- label->data = e_card_delivery_address_to_string(addr);
-
- return label;
-}
-
-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;
-
- g_return_val_if_fail (name != NULL, NULL);
-
- 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;
-}
-
-
-/* This *so* doesn't belong here... at least not implemented in a
- sucky way like this. But by getting it in here now, I can fix it
- up w/o adding a new feature when we are in feature freeze. :-) */
-
-/* This is very Anglocentric. Maybe it should be by locale? */
-static gchar *name_synonyms[][2] = {
- { "Jon", "John" }, /* Ah, the hacker's perogative */
- { "Jon", "Jonathan" },
- { "Daniel", "Dan" },
- { "Joseph", "Joe" },
- { "Robert", "Rob" },
- { "Robert", "Bob" },
- { "Richard", "Rich" },
- { "Richard", "Dick" },
- { "William", "Will" },
- { "William", "Bill" },
- { "Anthony", "Tony" },
- { "Steven", "Steve" },
- { "Michael", "Mike" },
- { "Douglas", "Doug" },
- { "Sidney", "Sid" },
- { "Eric", "Erik" },
- { "Chris", "Christopher" },
- { "Chris", "Christine" },
- { "Chris", "Christy" },
- { "Elizabeth", "Liz" },
- { "Jeff", "Geoff" },
- { "Jeff", "Jeffrey" },
- { "Jeff", "Geoffrey" },
- { "Jim", "James" },
- { "Abigal", "Abby" },
- { "Amanda", "Amy" },
- { "Amanda", "Manda" },
- { "Di", "Diana" },
- { "Di", "Diane" },
- { "Maxine", "Max" },
- { "Rebecca", "Becca" },
- { "Rebecca", "Becky" },
- { "Jennifer", "Jen" },
- { "Jennifer", "Jenny" },
- /* We could go on and on... */
- { NULL, NULL }
-};
-
-static gboolean
-name_fragment_match (const gchar *a, const gchar *b)
-{
- gint i;
- gboolean nickname_match = FALSE;
-
- if (!g_strcasecmp (a, b))
- return TRUE;
-
- /* Check for nicknames. Yes, the linear search blows. */
- for (i=0; name_synonyms[i][0]; ++i) {
- if (!g_strcasecmp (name_synonyms[i][1], a)) {
- a = name_synonyms[i][0];
- nickname_match = TRUE;
- break;
- }
- }
-
- for (i=0; name_synonyms[i][0]; ++i) {
- if (!g_strcasecmp (name_synonyms[i][1], b)) {
- b = name_synonyms[i][0];
- nickname_match = TRUE;
- break;
- }
- }
-
- return nickname_match && !g_strcasecmp (a, b);
-}
-
-gboolean
-e_card_name_match_string (const ECardName *name, const gchar *str)
-{
- gchar *cpy, *name_str;
- gchar **strv, **namev;
- gint i, j, match_count;
- gboolean matched = FALSE;
-
- g_return_val_if_fail (name != NULL, FALSE);
- g_return_val_if_fail (str != NULL, FALSE);
-
- cpy = g_strdup (str);
- strv = g_strsplit (cpy, " ", 0);
- for (i=0; strv[i]; ++i)
- g_strstrip (strv[i]);
-
- name_str = e_card_name_to_string (name);
- namev = g_strsplit (name_str, " ", 0);
- for (i=0; namev[i]; ++i)
- g_strstrip (namev[i]);
-
- match_count = 0;
- i = j = 0;
- while (strv[i] && namev[j]) {
- gint k1, k2;
-
- for (k1=0; strv[i+k1]; ++k1) {
- if (name_fragment_match (strv[i+k1], namev[j]))
- break;
- }
-
- for (k2=0; namev[j+k2]; ++k2) {
- if (name_fragment_match (strv[i], namev[j+k2]))
- break;
- }
-
- if (strv[i+k1] == NULL && namev[j+k2] == NULL) {
- matched = FALSE;
- goto cleanup_and_return;
- }
-
- ++match_count;
-
- if (k1 < k2) {
- i += k1+1;
- ++j;
- } else if (k2 < k1) {
- ++i;
- j += k2+1;
- } else if (k1 == k2) {
- i += k1+1;
- j += k2+1;
- }
- }
-
- /* This rule could be made more precise.
- As it is, it will say that "Joe Smith" will match the name
- "Joe Allen Smith" (which is good), but "de Icaza" will match
- either "Miguel de Icaza" as well as Miguel's shiftless
- brother "Roger de Icaza". In this sort of a case, the match
- threshold should go up to 3. */
- if (match_count >= 2)
- matched = TRUE;
-
-
- cleanup_and_return:
- g_free (strv);
- g_free (cpy);
- g_free (namev);
- g_free (name_str);
-
- return matched;
-}
-
-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);
-}
-
-/* EMail matching */
-static gboolean
-e_card_email_match_single_string (const gchar *a, const gchar *b)
-{
- const gchar *xa = NULL, *xb = NULL;
- gboolean match = TRUE;
-
- for (xa=a; *xa && *xa != '@'; ++xa);
- for (xb=b; *xb && *xb != '@'; ++xb);
-
- if (xa-a != xb-b || *xa != *xb || g_strncasecmp (a, b, xa-a))
- return FALSE;
-
- if (*xa == '\0')
- return TRUE;
-
- /* Find the end of the string, then walk through backwards comparing.
- This is so that we'll match joe@foobar.com and joe@mail.foobar.com.
- */
- while (*xa)
- ++xa;
- while (*xb)
- ++xb;
-
- while (match && *xa != '@' && *xb != '@') {
- match = (*xa == *xb);
- --xa;
- --xb;
- }
-
- match = match && ((*xa == *xb) || (*xa == '.') || (*xb == '.'));
-
- return match;
-}
-
-gboolean
-e_card_email_match_string (const ECard *card, const gchar *str)
-{
- EIterator *iter;
-
- g_return_val_if_fail (card && E_IS_CARD (card), FALSE);
- g_return_val_if_fail (str != NULL, FALSE);
-
- iter = e_list_get_iterator (card->email);
- for (e_iterator_reset (iter); e_iterator_is_valid (iter); e_iterator_next (iter)) {
- if (e_card_email_match_single_string (e_iterator_get (iter), str))
- return TRUE;
- }
- gtk_object_unref (GTK_OBJECT (iter));
-
- return FALSE;
-}
-
-/*
- * 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));
- if (card->file_as == NULL)
- card->file_as = g_strdup("");
- break;
- case ARG_FULL_NAME:
- g_free(card->fname);
- card->fname = g_strdup(GTK_VALUE_STRING(*arg));
- if (card->name)
- e_card_name_free (card->name);
- if (card->fname == NULL)
- card->fname = g_strdup("");
- card->name = e_card_name_from_string (card->fname);
- break;
- case ARG_NAME:
- if ( card->name )
- e_card_name_free(card->name);
- card->name = e_card_name_copy(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_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_WANTS_HTML:
- card->wants_html = GTK_VALUE_BOOL(*arg);
- card->wants_html_set = TRUE;
- break;
- case ARG_ARBITRARY:
- if (card->arbitrary)
- gtk_object_unref(GTK_OBJECT(card->arbitrary));
- card->arbitrary = E_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_list_new((EListCopyFunc) e_card_delivery_address_copy,
- (EListFreeFunc) 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_list_new((EListCopyFunc) e_card_address_label_copy,
- (EListFreeFunc) 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_list_new((EListCopyFunc) e_card_phone_copy,
- (EListFreeFunc) e_card_phone_free,
- NULL);
- GTK_VALUE_OBJECT(*arg) = GTK_OBJECT(card->phone);
- break;
- case ARG_EMAIL:
- if (!card->email)
- card->email = e_list_new((EListCopyFunc) g_strdup,
- (EListFreeFunc) g_free,
- NULL);
- GTK_VALUE_OBJECT(*arg) = GTK_OBJECT(card->email);
- break;
- case ARG_CATEGORIES:
- {
- int i;
- char ** strs;
- int length;
- EIterator *iterator;
- if (!card->categories)
- card->categories = e_list_new((EListCopyFunc) g_strdup,
- (EListFreeFunc) g_free,
- NULL);
- length = e_list_length(card->categories);
- strs = g_new(char *, length + 1);
- for (iterator = e_list_get_iterator(card->categories), i = 0; e_iterator_is_valid(iterator); e_iterator_next(iterator), i++) {
- strs[i] = (char *)e_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_list_new((EListCopyFunc) g_strdup,
- (EListFreeFunc) 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_WANTS_HTML:
- GTK_VALUE_BOOL(*arg) = card->wants_html;
- break;
- case ARG_WANTS_HTML_SET:
- GTK_VALUE_BOOL(*arg) = card->wants_html_set;
- break;
- case ARG_ARBITRARY:
- if (!card->arbitrary)
- card->arbitrary = e_list_new((EListCopyFunc) e_card_arbitrary_copy,
- (EListFreeFunc) 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->wants_html = FALSE;
- card->wants_html_set = FALSE;
- 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
-}
-
-GList *
-e_card_load_cards_from_file(const char *filename)
-{
- VObject *vobj = Parse_MIME_FromFileName((char *) filename);
- GList *list = NULL;
- while(vobj) {
- VObject *next;
- ECard *card = E_CARD(gtk_type_new(e_card_get_type()));
- parse(card, vobj);
- next = nextVObjectInList(vobj);
- cleanVObject(vobj);
- vobj = next;
- list = g_list_prepend(list, card);
- }
- list = g_list_reverse(list);
- return list;
-}
-
-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, N_("\nName: "));
- add_strProp_to_string (string, N_("\n Prefix: "), crd->name.prefix);
- add_strProp_to_string (string, N_("\n Given: "), crd->name.given);
- add_strProp_to_string (string, N_("\n Additional: "), crd->name.additional);
- add_strProp_to_string (string, N_("\n Family: "), crd->name.family);
- add_strProp_to_string (string, N_("\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, N_("\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, N_("\nAddress:"));
- add_strAddrType (string, deladdr->type);
- add_strProp_to_string (string, N_("\n Postal Box: "), deladdr->po);
- add_strProp_to_string (string, N_("\n Ext: "), deladdr->ext);
- add_strProp_to_string (string, N_("\n Street: "), deladdr->street);
- add_strProp_to_string (string, N_("\n City: "), deladdr->city);
- add_strProp_to_string (string, N_("\n Region: "), deladdr->region);
- add_strProp_to_string (string, N_("\n Postal Code: "), deladdr->code);
- add_strProp_to_string (string, N_("\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, N_("\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, N_("\nTelephones:\n"));
- } else {
- sep = " ";
- g_string_append (string, N_("\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, N_("\nE-mail:\n"));
- } else {
- sep = " ";
- g_string_append (string, N_("\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, N_("\nMailer: "), &crd->mailer);
-
- if (crd->timezn.prop.used) {
- char *str;
-
- str = card_timezn_str (crd->timezn);
- add_strProp_to_string (string, N_("\nTime Zone: "), str);
- free (str);
- }
-
- if (crd->geopos.prop.used) {
- char *str;
-
- str = card_geopos_str (crd->geopos);
- add_strProp_to_string (string, N_("\nGeo Location: "), str);
- free (str);
- }
-
- add_CardStrProperty_to_string (string, N_("\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, N_("\nOrg: "));
- add_strProp_to_string (string, N_("\n Name: "), crd->org.name);
- add_strProp_to_string (string, N_("\n Unit: "), crd->org.unit1);
- add_strProp_to_string (string, N_("\n Unit2: "), crd->org.unit2);
- add_strProp_to_string (string, N_("\n Unit3: "), crd->org.unit3);
- add_strProp_to_string (string, N_("\n Unit4: "), crd->org.unit4);
- g_string_append_c (string, '\n');
- }
-
- add_CardStrProperty_to_string (string, N_("\nCategories: "), &crd->categories);
- add_CardStrProperty_to_string (string, N_("\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, N_("\nUnique String: "), &crd->uid);
-
- if (crd->key.prop.used) {
- add_strProp_to_string (string, N_("\nPublic Key: "), crd->key.data);
- add_strKeyType (string, crd->key.type);
- }
-
- ret = g_strdup (string->str);
- g_string_free (string, TRUE);
-
- return ret;
-}
-#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);
- }
- }
-}
-
-#include <Evolution-Composer.h>
-
-#define COMPOSER_OAFID "OAFIID:GNOME_Evolution_Mail_Composer"
-
-void
-e_card_send (ECard *card, ECardDisposition disposition)
-{
- BonoboObjectClient *bonobo_server;
- GNOME_Evolution_Composer composer_server;
- CORBA_Environment ev;
-
- /* First, I obtain an object reference that represents the Composer. */
- bonobo_server = bonobo_object_activate (COMPOSER_OAFID, 0);
-
- g_return_if_fail (bonobo_server != NULL);
-
- composer_server = bonobo_object_corba_objref (BONOBO_OBJECT (bonobo_server));
-
- CORBA_exception_init (&ev);
-
- if (disposition == E_CARD_DISPOSITION_AS_TO) {
- GNOME_Evolution_Composer_RecipientList *to_list, *cc_list, *bcc_list;
- CORBA_char *subject;
- char *name;
- EList *email;
- EIterator *iterator;
- GNOME_Evolution_Composer_Recipient *recipient;
- /* Now I have to make a CORBA sequence that represents a recipient list with
- one item, for the card. */
- to_list = GNOME_Evolution_Composer_RecipientList__alloc ();
- to_list->_maximum = 1;
- to_list->_length = 1;
- to_list->_buffer = CORBA_sequence_GNOME_Evolution_Composer_Recipient_allocbuf (1);
-
- gtk_object_get(GTK_OBJECT(card),
- "full_name", &name,
- "email", &email,
- NULL);
-
- recipient = &(to_list->_buffer[0]);
-
- iterator = e_list_get_iterator(email);
- if (e_iterator_is_valid(iterator)) {
- recipient->address = CORBA_string_dup(e_iterator_get(iterator));
- } else {
- recipient->address = CORBA_string_dup("");
- }
- gtk_object_unref(GTK_OBJECT(iterator));
-
- recipient->name = CORBA_string_dup(name);
-
- cc_list = GNOME_Evolution_Composer_RecipientList__alloc ();
- cc_list->_maximum = cc_list->_length = 0;
- bcc_list = GNOME_Evolution_Composer_RecipientList__alloc ();
- bcc_list->_maximum = bcc_list->_length = 0;
-
- subject = CORBA_string_dup ("");
-
- GNOME_Evolution_Composer_setHeaders (composer_server, to_list, cc_list, bcc_list, subject, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_printerr ("gui/e-meeting-edit.c: I couldn't set the composer headers via CORBA! Aagh.\n");
- CORBA_exception_free (&ev);
- return;
- }
-
- if (CORBA_sequence_get_release (to_list) != FALSE)
- CORBA_free (to_list->_buffer);
-
- CORBA_free (to_list);
- CORBA_free (cc_list);
- CORBA_free (bcc_list);
- CORBA_free (subject);
- }
-
- if (disposition == E_CARD_DISPOSITION_AS_ATTACHMENT) {
- CORBA_char *content_type, *filename, *description, *attach_data;
- CORBA_boolean show_inline;
- char *tempstr;
- char *name;
-
- gtk_object_get(GTK_OBJECT(card),
- "full_name", &name,
- NULL);
-
- content_type = CORBA_string_dup ("text/x-vcard");
- filename = CORBA_string_dup ("");
-
- tempstr = g_strdup_printf ("VCard for %s", name);
- description = CORBA_string_dup (tempstr);
- g_free (tempstr);
-
- show_inline = FALSE;
-
- tempstr = e_card_get_vcard(card);
- attach_data = CORBA_string_dup (tempstr);
- g_free(tempstr);
-
- GNOME_Evolution_Composer_attachData (composer_server,
- content_type, filename, description,
- show_inline, attach_data,
- &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_printerr ("gui/e-meeting-edit.c: I couldn't attach data to the composer via CORBA! Aagh.\n");
- CORBA_exception_free (&ev);
- return;
- }
-
- CORBA_free (content_type);
- CORBA_free (filename);
- CORBA_free (description);
- CORBA_free (attach_data);
- }
-
- GNOME_Evolution_Composer_show (composer_server, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_printerr ("gui/e-meeting-edit.c: I couldn't show the composer via CORBA! Aagh.\n");
- CORBA_exception_free (&ev);
- return;
- }
-
- CORBA_exception_free (&ev);
-}
diff --git a/addressbook/backend/ebook/e-card.h b/addressbook/backend/ebook/e-card.h
deleted file mode 100644
index 90d345b62c..0000000000
--- a/addressbook/backend/ebook/e-card.h
+++ /dev/null
@@ -1,167 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Chris Lahey <clahey@helixcode.com>
- * 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 <time.h>
-#include <gtk/gtkobject.h>
-#include <stdio.h>
-#include <addressbook/backend/ebook/e-card-types.h>
-#include <e-util/e-list.h>
-
-#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. */
- EList *address; /* Delivery addresses (ECardDeliveryAddress *) */
- EList *address_label; /* Delivery address labels
- * (ECardAddrLabel *) */
-
- EList *phone; /* Phone numbers (ECardPhone *) */
- EList *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 */
-
- gint timezone; /* number of minutes from UTC as an int */
-
- EList *categories; /* Categories. */
-
- EList *arbitrary; /* Arbitrary fields. */
-
- guint32 wants_html : 1; /* Wants html mail. */
- guint32 wants_html_set : 1; /* Wants html mail. */
-
-#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. */
-
- EList xtension;
-#endif
-};
-
-struct _ECardClass {
- GtkObjectClass parent_class;
- GHashTable *attribute_jump_table;
-};
-
-
-/* Simple functions */
-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 manipulation */
-ECardPhone *e_card_phone_new (void);
-ECardPhone *e_card_phone_copy (const ECardPhone *phone);
-void e_card_phone_free (ECardPhone *phone);
-
-/* ECardDeliveryAddress manipulation */
-ECardDeliveryAddress *e_card_delivery_address_new (void);
-ECardDeliveryAddress *e_card_delivery_address_copy (const ECardDeliveryAddress *addr);
-void e_card_delivery_address_free (ECardDeliveryAddress *addr);
-gboolean e_card_delivery_address_is_empty (const ECardDeliveryAddress *addr);
-char *e_card_delivery_address_to_string (const ECardDeliveryAddress *addr);
-ECardDeliveryAddress *e_card_delivery_address_from_label (const ECardAddrLabel *label);
-ECardAddrLabel *e_card_delivery_address_to_label (const ECardDeliveryAddress *addr);
-
-/* ECardAddrLabel manipulation */
-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 manipulation */
-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);
-gboolean e_card_name_match_string (const ECardName *name,
- const gchar *str);
-
-/* ECardArbitrary manipulation */
-ECardArbitrary *e_card_arbitrary_new (void);
-ECardArbitrary *e_card_arbitrary_copy (const ECardArbitrary *arbitrary);
-void e_card_arbitrary_free (ECardArbitrary *arbitrary);
-
-/* ECard email manipulation */
-gboolean e_card_email_match_string (const ECard *card,
- const gchar *str);
-
-/* Specialized functionality */
-GList *e_card_load_cards_from_file (const char *filename);
-
-enum _ECardDisposition {
- E_CARD_DISPOSITION_AS_ATTACHMENT,
- E_CARD_DISPOSITION_AS_TO,
-};
-typedef enum _ECardDisposition ECardDisposition;
-void e_card_send (ECard *card,
- ECardDisposition disposition);
-
-/* Standard Gtk function */
-GtkType e_card_get_type (void);
-
-#endif /* ! __E_CARD_H__ */
diff --git a/addressbook/backend/ebook/e-destination.c b/addressbook/backend/ebook/e-destination.c
deleted file mode 100644
index a44ce3ddc8..0000000000
--- a/addressbook/backend/ebook/e-destination.c
+++ /dev/null
@@ -1,313 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * e-destination.c
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Developed by Jon Trowbridge <trow@ximian.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 <string.h>
-#include <gtk/gtkobject.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include "e-destination.h"
-
-struct _EDestinationPrivate {
- ECard *card;
- gint card_email_num;
-
- gchar *string;
- gchar *string_email;
- gchar *string_email_verbose;
-};
-
-static void e_destination_clear_card (EDestination *);
-static void e_destination_clear_strings (EDestination *);
-
-static GtkObjectClass *parent_class;
-
-static void
-e_destination_destroy (GtkObject *obj)
-{
- EDestination *dest = E_DESTINATION (obj);
-
- e_destination_clear_card (dest);
- e_destination_clear_strings (dest);
-
- g_free (dest->priv);
-
- if (parent_class->destroy)
- parent_class->destroy (obj);
-}
-
-static void
-e_destination_class_init (EDestinationClass *klass)
-{
- GtkObjectClass *object_class = GTK_OBJECT_CLASS (klass);
-
- parent_class = GTK_OBJECT_CLASS (gtk_type_class (GTK_TYPE_OBJECT));
-
- object_class->destroy = e_destination_destroy;
-}
-
-static void
-e_destination_init (EDestination *dest)
-{
- dest->priv = g_new0 (struct _EDestinationPrivate, 1);
-}
-
-GtkType
-e_destination_get_type (void)
-{
- static GtkType dest_type = 0;
-
- if (!dest_type) {
- GtkTypeInfo dest_info = {
- "EDestination",
- sizeof (EDestination),
- sizeof (EDestinationClass),
- (GtkClassInitFunc) e_destination_class_init,
- (GtkObjectInitFunc) e_destination_init,
- NULL, NULL, /* reserved */
- (GtkClassInitFunc) NULL
- };
-
- dest_type = gtk_type_unique (gtk_object_get_type (), &dest_info);
- }
-
- return dest_type;
-}
-
-EDestination *
-e_destination_new (void)
-{
- return E_DESTINATION (gtk_type_new (E_TYPE_DESTINATION));
-}
-
-EDestination *
-e_destination_copy (EDestination *dest)
-{
- EDestination *new_dest;
-
- g_return_val_if_fail (dest && E_IS_DESTINATION (dest), NULL);
-
- new_dest = e_destination_new ();
-
- new_dest->priv->card = dest->priv->card;
- if (new_dest->priv->card)
- gtk_object_ref (GTK_OBJECT (new_dest->priv->card));
-
- new_dest->priv->card_email_num = dest->priv->card_email_num;
-
- new_dest->priv->string = g_strdup (dest->priv->string);
- new_dest->priv->string_email = g_strdup (dest->priv->string_email);
- new_dest->priv->string_email_verbose = g_strdup (dest->priv->string_email_verbose);
-
- return new_dest;
-}
-
-gboolean
-e_destination_is_empty (EDestination *dest)
-{
- g_return_val_if_fail (dest && E_IS_DESTINATION (dest), TRUE);
-
- return !(dest->priv->card || (dest->priv->string && *dest->priv->string));
-}
-
-static void
-e_destination_clear_card (EDestination *dest)
-{
- if (dest->priv->card)
- gtk_object_unref (GTK_OBJECT (dest->priv->card));
- dest->priv->card = NULL;
-
- dest->priv->card_email_num = -1;
-}
-
-static void
-e_destination_clear_strings (EDestination *dest)
-{
- g_free (dest->priv->string);
- g_free (dest->priv->string_email);
- g_free (dest->priv->string_email_verbose);
-
- dest->priv->string = NULL;
- dest->priv->string_email = NULL;
- dest->priv->string_email_verbose = NULL;
-}
-
-void
-e_destination_set_card (EDestination *dest, ECard *card, gint email_num)
-{
- g_return_if_fail (dest && E_IS_DESTINATION (dest));
- g_return_if_fail (card && E_IS_CARD (card));
-
- if (dest->priv->card != card) {
- if (dest->priv->card)
- gtk_object_unref (GTK_OBJECT (dest->priv->card));
- dest->priv->card = card;
- gtk_object_ref (GTK_OBJECT (card));
- }
-
- dest->priv->card_email_num = email_num;
-
- e_destination_clear_strings (dest);
-}
-
-void
-e_destination_set_string (EDestination *dest, const gchar *string)
-{
- g_return_if_fail (dest && E_IS_DESTINATION (dest));
- g_return_if_fail (string != NULL);
-
- g_free (dest->priv->string);
- dest->priv->string = g_strdup (string);
-}
-
-ECard *
-e_destination_get_card (const EDestination *dest)
-{
- g_return_val_if_fail (dest && E_IS_DESTINATION (dest), NULL);
-
- return dest->priv->card;
-}
-
-gint
-e_destination_get_email_num (const EDestination *dest)
-{
- g_return_val_if_fail (dest && E_IS_DESTINATION (dest), -1);
-
- return dest->priv->card_email_num;
-}
-
-const gchar *
-e_destination_get_string (const EDestination *dest)
-{
- struct _EDestinationPrivate *priv;
-
- g_return_val_if_fail (dest && E_IS_DESTINATION (dest), NULL);
-
- priv = (struct _EDestinationPrivate *)dest->priv; /* cast out const */
-
- if (priv->string == NULL) {
-
- if (priv->card) {
-
- priv->string = e_card_name_to_string (priv->card->name);
- if (priv->string) {
- g_strstrip (priv->string);
- if (*(priv->string) == '\0') {
- g_free (priv->string);
- priv->string = NULL;
- }
- }
-
- if (priv->string == NULL)
- priv->string = g_strdup (e_destination_get_email (dest));
-
- if (priv->string == NULL)
- priv->string = g_strdup (_("???"));
- }
- }
-
- return priv->string;
-}
-
-gint
-e_destination_get_strlen (const EDestination *dest)
-{
- const gchar *str;
-
- g_return_val_if_fail (dest && E_IS_DESTINATION (dest), 0);
-
- str = e_destination_get_string (dest);
- return str ? strlen (str) : 0;
-}
-
-const gchar *
-e_destination_get_email (const EDestination *dest)
-{
- struct _EDestinationPrivate *priv;
-
- g_return_val_if_fail (dest && E_IS_DESTINATION (dest), NULL);
-
- priv = (struct _EDestinationPrivate *)dest->priv; /* cast out const */
-
- if (priv->string_email == NULL) {
-
- if (priv->card) { /* Pull the address out of the card. */
-
- EIterator *iter = e_list_get_iterator (priv->card->email);
- gint n = priv->card_email_num;
-
- if (n >= 0) {
- while (n > 0) {
- e_iterator_next (iter);
- --n;
- }
-
- if (e_iterator_is_valid (iter)) {
- gconstpointer ptr = e_iterator_get (iter);
- priv->string_email = g_strdup ((gchar *) ptr);
- }
- }
-
- } else if (priv->string) { /* Use the string as an e-mail address */
- return priv->string;
- }
-
- /* else we just return NULL */
- }
-
- return priv->string_email;
-}
-
-const gchar *
-e_destination_get_email_verbose (const EDestination *dest)
-{
- struct _EDestinationPrivate *priv;
-
- g_return_val_if_fail (dest && E_IS_DESTINATION (dest), NULL);
-
- priv = (struct _EDestinationPrivate *)dest->priv; /* cast out const */
-
- if (priv->string_email_verbose == NULL) {
-
- const gchar *email = e_destination_get_email (dest);
-
- if (priv->card) {
-
- priv->string_email_verbose = g_strdup_printf ("%s <%s>",
- e_card_name_to_string (priv->card->name),
- email);
- } else {
-
- return email;
- }
-
- }
-
- return priv->string_email_verbose;
-}
-
-
diff --git a/addressbook/backend/ebook/e-destination.h b/addressbook/backend/ebook/e-destination.h
deleted file mode 100644
index d0af6b0d23..0000000000
--- a/addressbook/backend/ebook/e-destination.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * e-destination.h
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Developed by Jon Trowbridge <trow@ximian.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 __E_DESTINATION_H__
-#define __E_DESTINATION_H__
-
-#include <gtk/gtkobject.h>
-#include <addressbook/backend/ebook/e-card.h>
-
-#define E_TYPE_DESTINATION (e_destination_get_type ())
-#define E_DESTINATION(o) (GTK_CHECK_CAST ((o), E_TYPE_DESTINATION, EDestination))
-#define E_DESTINATION_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), E_TYPE_DESTINATION, EDestinationClass))
-#define E_IS_DESTINATION(o) (GTK_CHECK_TYPE ((o), E_TYPE_DESTINATION))
-#define E_IS_DESTINATION_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_TYPE_DESTINATION))
-
-typedef struct _EDestination EDestination;
-typedef struct _EDestinationClass EDestinationClass;
-
-struct _EDestinationPrivate;
-
-struct _EDestination {
- GtkObject object;
-
- struct _EDestinationPrivate *priv;
-};
-
-struct _EDestinationClass {
- GtkObjectClass parent_class;
-};
-
-GtkType e_destination_get_type (void);
-
-EDestination *e_destination_new (void);
-EDestination *e_destination_copy (EDestination *);
-
-gboolean e_destination_is_empty (EDestination *);
-
-void e_destination_set_card (EDestination *, ECard *card, gint email_num);
-void e_destination_set_string (EDestination *, const gchar *string);
-
-ECard *e_destination_get_card (const EDestination *);
-gint e_destination_get_email_num (const EDestination *);
-const gchar *e_destination_get_string (const EDestination *);
-gint e_destination_get_strlen (const EDestination *); /* a convenience function... */
-
-const gchar *e_destination_get_email (const EDestination *);
-const gchar *e_destination_get_email_verbose (const EDestination *);
-
-
-
-#endif /* __E_DESTINATION_H__ */
-
diff --git a/addressbook/backend/ebook/evolution-gnomecard-importer.c b/addressbook/backend/ebook/evolution-gnomecard-importer.c
deleted file mode 100644
index bb5e45cdd6..0000000000
--- a/addressbook/backend/ebook/evolution-gnomecard-importer.c
+++ /dev/null
@@ -1,214 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-#include <config.h>
-#include <stdio.h>
-
-#include <liboaf/liboaf.h>
-#include <bonobo/bonobo-context.h>
-#include <bonobo/bonobo-generic-factory.h>
-#include <bonobo/bonobo-main.h>
-
-#include <e-book.h>
-
-#include <importer/evolution-importer.h>
-#include <importer/GNOME_Evolution_Importer.h>
-
-#define COMPONENT_FACTORY_IID "OAFIID:GNOME_Evolution_Addressbook_GnomeCard_ImporterFactory"
-
-static BonoboGenericFactory *factory = NULL;
-
-typedef struct {
- char *filename;
- GList *cardlist;
- GList *iterator;
- EBook *book;
- gboolean ready;
-} GnomeCardImporter;
-
-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)
-{
- GnomeCardImporter *gci = (GnomeCardImporter *) closure;
-
- gci->cardlist = e_card_load_cards_from_file(gci->filename);
- gci->ready = TRUE;
-}
-
-static void
-ebook_create (GnomeCardImporter *gci)
-{
- gchar *path, *uri;
-
- gci->book = e_book_new ();
-
- if (!gci->book) {
- printf ("%s: %s(): Couldn't create EBook, bailing.\n",
- __FILE__,
- __FUNCTION__);
- return;
- }
-
- path = g_concat_dir_and_file (g_get_home_dir (),
- "evolution/local/Contacts/addressbook.db");
- uri = g_strdup_printf ("file://%s", path);
- g_free (path);
-
- if (! e_book_load_uri (gci->book, uri, book_open_cb, gci)) {
- printf ("error calling load_uri!\n");
- }
- g_free(uri);
-}
-
-/* EvolutionImporter methods */
-static void
-process_item_fn (EvolutionImporter *importer,
- CORBA_Object listener,
- void *closure,
- CORBA_Environment *ev)
-{
- GnomeCardImporter *gci = (GnomeCardImporter *) closure;
- ECard *card;
-
- if (gci->iterator == NULL)
- gci->iterator = gci->cardlist;
-
- if (gci->ready == FALSE) {
- GNOME_Evolution_ImporterListener_notifyResult (listener,
- GNOME_Evolution_ImporterListener_NOT_READY,
- gci->iterator ? TRUE : FALSE,
- ev);
- return;
- }
-
- if (gci->iterator == NULL) {
- GNOME_Evolution_ImporterListener_notifyResult (listener,
- GNOME_Evolution_ImporterListener_UNSUPPORTED_OPERATION,
- FALSE, ev);
- return;
- }
-
- card = gci->iterator->data;
- e_book_add_card (gci->book, card, add_card_cb, card);
-
- gci->iterator = gci->iterator->next;
-
- GNOME_Evolution_ImporterListener_notifyResult (listener,
- GNOME_Evolution_ImporterListener_OK,
- gci->iterator ? TRUE : FALSE,
- ev);
- if (ev->_major != CORBA_NO_EXCEPTION) {
- g_warning ("Error notifying listeners.");
- }
-
- return;
-}
-
-static char *supported_extensions[3] = {
- ".vcf", ".gcrd", NULL
-};
-
-static gboolean
-support_format_fn (EvolutionImporter *importer,
- const char *filename,
- void *closure)
-{
- char *ext;
- int i;
-
- ext = strrchr (filename, '.');
- for (i = 0; supported_extensions[i] != NULL; i++) {
- if (strcmp (supported_extensions[i], ext) == 0)
- return TRUE;
- }
-
- return FALSE;
-}
-
-static void
-importer_destroy_cb (GtkObject *object,
- GnomeCardImporter *gci)
-{
- gtk_main_quit ();
-}
-
-static gboolean
-load_file_fn (EvolutionImporter *importer,
- const char *filename,
- const char *folderpath,
- void *closure)
-{
- GnomeCardImporter *gci;
-
- gci = (GnomeCardImporter *) closure;
- gci->filename = g_strdup (filename);
- gci->cardlist = NULL;
- gci->iterator = NULL;
- gci->ready = FALSE;
- ebook_create (gci);
-
- return TRUE;
-}
-
-static BonoboObject *
-factory_fn (BonoboGenericFactory *_factory,
- void *closure)
-{
- EvolutionImporter *importer;
- GnomeCardImporter *gci;
-
- gci = g_new (GnomeCardImporter, 1);
- importer = evolution_importer_new (support_format_fn, load_file_fn,
- process_item_fn, NULL, gci);
-
- gtk_signal_connect (GTK_OBJECT (importer), "destroy",
- GTK_SIGNAL_FUNC (importer_destroy_cb), gci);
-
- return BONOBO_OBJECT (importer);
-}
-
-static void
-importer_init (void)
-{
- if (factory != NULL)
- return;
-
- factory = bonobo_generic_factory_new (COMPONENT_FACTORY_IID,
- factory_fn, NULL);
-
- if (factory == NULL) {
- g_error ("Unable to create factory");
- }
-
- bonobo_running_context_auto_exit_unref (BONOBO_OBJECT (factory));
-}
-
-int
-main (int argc,
- char **argv)
-{
- CORBA_ORB orb;
-
- gnome_init_with_popt_table ("Evolution-GnomeCard-Importer",
- "0.0", argc, argv, oaf_popt_options, 0,
- NULL);
- orb = oaf_init (argc, argv);
- if (bonobo_init (orb, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL) == FALSE) {
- g_error ("Could not initialize Bonobo.");
- }
-
- importer_init ();
- bonobo_main ();
-
- return 0;
-}
-
-
diff --git a/addressbook/backend/ebook/load-gnomecard-addressbook.c b/addressbook/backend/ebook/load-gnomecard-addressbook.c
deleted file mode 100644
index 5d16a26a7c..0000000000
--- a/addressbook/backend/ebook/load-gnomecard-addressbook.c
+++ /dev/null
@@ -1,91 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-#include <config.h>
-#include <stdio.h>
-#include <glib.h>
-#include <gtk/gtkmain.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnome/gnome-util.h>
-#include <libgnomeui/gnome-init.h>
-#include <bonobo/bonobo-main.h>
-#include <liboaf/liboaf.h>
-
-#include "e-book.h"
-
-static CORBA_Environment ev;
-
-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)
-{
- GList *list = e_card_load_cards_from_file("gnomecard.vcf");
- GList *iterator;
- for (iterator = list; iterator; iterator = g_list_next(iterator)) {
- ECard *card = iterator->data;
- e_book_add_card(book, card, add_card_cb, card);
- }
- g_list_free(list);
-}
-
-static guint
-ebook_create (void)
-{
- EBook *book;
- gchar *path, *uri;
-
- book = e_book_new ();
-
- if (!book) {
- printf ("%s: %s(): Couldn't create EBook, bailing.\n",
- __FILE__,
- __FUNCTION__);
- return FALSE;
- }
-
-
- path = g_concat_dir_and_file (g_get_home_dir (),
- "evolution/local/Contacts/addressbook.db");
- uri = g_strdup_printf ("file://%s", path);
- g_free (path);
-
- if (! e_book_load_uri (book, uri, book_open_cb, NULL)) {
- printf ("error calling load_uri!\n");
- }
- g_free(uri);
-
-
- return FALSE;
-}
-
-int
-main (int argc, char **argv)
-{
-
- CORBA_exception_init (&ev);
-
- gnome_init_with_popt_table("blah", "0.0", argc, argv, NULL, 0, NULL);
- oaf_init (argc, argv);
- init_bonobo (argc, argv);
-
- gtk_idle_add ((GtkFunction) ebook_create, NULL);
-
- bonobo_main ();
-
- return 0;
-}
diff --git a/addressbook/backend/ebook/load-pine-addressbook.c b/addressbook/backend/ebook/load-pine-addressbook.c
deleted file mode 100644
index 2c18efb7c8..0000000000
--- a/addressbook/backend/ebook/load-pine-addressbook.c
+++ /dev/null
@@ -1,172 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-#include <config.h>
-#include <ctype.h>
-#include <stdio.h>
-#include <glib.h>
-#include <gtk/gtkmain.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnome/gnome-util.h>
-#include <libgnomeui/gnome-init.h>
-#include <bonobo/bonobo-main.h>
-#include <liboaf/liboaf.h>
-
-#include "e-book.h"
-
-static CORBA_Environment ev;
-
-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
-parse_line (EBook *book, char *line)
-{
- char **strings;
- ECardName *name;
- ECard *card;
- EList *list;
-
- card = e_card_new("");
- strings = g_strsplit(line, "\t", 3);
- if (strings[0] && strings[1] && strings[2]) {
- 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_list_append(list, strings[2]);
- g_strfreev(strings);
- e_book_add_card(book, card, add_card_cb, card);
- }
-}
-
-static void
-book_open_cb (EBook *book, EBookStatus status, gpointer closure)
-{
- FILE *fp = fopen (".addressbook", "r");
- char line[2 * 1024];
- int which = 0;
- char *lastline = NULL;
-
- if (!fp) {
- g_warning ("Can't find .addressbook");
- return;
- }
-
- while(fgets(line + which * 1024, 1024, fp)) {
- int length;
- char *thisline = line + which * 1024;
- length = strlen(thisline);
- if (thisline[length - 1] == '\n')
- line[--length] = 0;
- if (lastline && *thisline && isspace(*thisline)) {
- char *temp;
- while(*thisline && isspace(*thisline))
- thisline ++;
- temp = lastline;
- lastline = g_strdup_printf("%s%s", lastline, thisline);
- g_free(temp);
- continue;
- }
- if (lastline) {
- parse_line (book, lastline);
- g_free(lastline);
- }
- lastline = g_strdup(thisline);
- }
-
- if (lastline) {
- parse_line (book, lastline);
- g_free(lastline);
- }
-}
-
-static guint
-ebook_create (void)
-{
- EBook *book;
- gchar *path, *uri;
-
- book = e_book_new ();
-
- if (!book) {
- printf ("%s: %s(): Couldn't create EBook, bailing.\n",
- __FILE__,
- __FUNCTION__);
- return FALSE;
- }
-
-
- path = g_concat_dir_and_file (g_get_home_dir (),
- "evolution/local/Contacts/addressbook.db");
- uri = g_strdup_printf ("file://%s", path);
- g_free (path);
-
- if (! e_book_load_uri (book, uri, book_open_cb, NULL)) {
- printf ("error calling load_uri!\n");
- }
- g_free(uri);
-
-
- 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);
-
- gnome_init_with_popt_table("blah", "0.0", argc, argv, NULL, 0, NULL);
- oaf_init (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 a2f10e5aca..0000000000
--- a/addressbook/backend/ebook/test-card.c
+++ /dev/null
@@ -1,196 +0,0 @@
-#include <string.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnomeui/gnome-init.h>
-#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;
- EList *address;
- EList *phone;
- EList *email;
- EIterator *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_list_get_iterator(address);
- for (; e_iterator_is_valid(iterator); e_iterator_next(iterator)) {
- printf("Email : %s\n", (char *) e_iterator_get(iterator));
- }
- gtk_object_unref(GTK_OBJECT(iterator));
- }
- if ( phone ) {
- iterator = e_list_get_iterator(address);
- for (; e_iterator_is_valid(iterator); e_iterator_next(iterator)) {
- ECardPhone *e_card_phone = (ECardPhone *) e_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_list_get_iterator(address);
- for (; e_iterator_is_valid(iterator); e_iterator_next(iterator)) {
- ECardDeliveryAddress *del_address = (ECardDeliveryAddress *) e_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 0de62d701c..0000000000
--- a/addressbook/backend/ebook/test-client-list.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-#include <config.h>
-
-#include <glib.h>
-#include <gtk/gtkmain.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-init.h>
-#include <liboaf/liboaf.h>
-#include <bonobo/bonobo-main.h>
-
-#include "e-book.h"
-
-CORBA_Environment ev;
-
-static void
-init_bonobo (int argc, char **argv)
-{
- gnome_init ("blah", "0.0", argc, argv);
- oaf_init (argc, 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;
-
- 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 36115d848a..0000000000
--- a/addressbook/backend/ebook/test-client.c
+++ /dev/null
@@ -1,199 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-#include <config.h>
-#include <glib.h>
-#include <gtk/gtkmain.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-init.h>
-#include <bonobo/bonobo-main.h>
-#include <liboaf/liboaf.h>
-
-#include "e-book.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;
-" \
-"END:VCARD
-" \
-"
-"
-
-static CORBA_Environment ev;
-static char *cardstr;
-
-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
-get_fields_cb (EBook *book, EBookStatus status, EList *fields, gpointer closure)
-{
- if (fields) {
- EIterator *iter = e_list_get_iterator (fields);
-
- printf ("Supported fields:\n");
-
- for (; e_iterator_is_valid (iter); e_iterator_next (iter)) {
- printf (" %s\n", (char*)e_iterator_get (iter));
- }
-
- gtk_object_unref(GTK_OBJECT(fields));
- }
- else {
- printf ("No supported fields?\n");
- }
-
- e_book_add_vcard(book, cardstr, add_card_cb, NULL);
-}
-
-
-static void
-auth_user_cb (EBook *book, EBookStatus status, gpointer closure)
-{
- printf ("user authenticated\n");
- e_book_get_supported_fields (book, get_fields_cb, closure);
-}
-
-static void
-book_open_cb (EBook *book, EBookStatus status, gpointer closure)
-{
- e_book_authenticate_user (book, "username", "password", auth_user_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);
-
- gnome_init_with_popt_table ("blah", "0.0", argc, argv, NULL, 0, NULL);
- oaf_init (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 877813e5d3..0000000000
--- a/addressbook/backend/idl/addressbook.idl
+++ /dev/null
@@ -1,170 +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 <Bonobo.idl>
-
-module GNOME {
-module Evolution {
-module Addressbook {
- typedef string CardId;
- typedef string VCard;
- typedef sequence<VCard> VCardList;
- typedef sequence<string> stringlist;
-
- interface CardCursor : Bonobo::Unknown {
- long count ();
- string getNth (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 notifyCardAdded (in VCardList cards);
- void notifyCardRemoved (in CardId id);
- void notifyCardChanged (in VCardList cards);
- void notifySequenceComplete ();
- void notifyStatusMessage (in string message);
- };
-
- interface BookView : Bonobo::Unknown {
- };
-
- interface Book : Bonobo::Unknown {
- /*
- * Fetching cards in the addresbook.
- */
- VCard getVCard (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 isWriteable ();
- boolean isCardWriteable (in CardId Id);
-
- void authenticateUser (in string user, in string passwd);
-
- /*
- * Adding and deleting cards in the book.
- */
- void addCard (in VCard vcard);
- void removeCard (in CardId Id);
-
- /*
- * Modifying cards in the addressbook.
- */
- void modifyCard (in VCard vcard);
-
- /*
- * This function returns 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 getCursor (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 getBookView (in BookViewListener listener, in string query);
-
- void getChanges (in BookViewListener listener, in string change_id);
-
- void checkConnection ();
-
- void getSupportedFields ();
-
- string getStaticCapabilities ();
-
- string getName ();
- };
-
- interface BookListener : Bonobo::Unknown {
-
- enum CallStatus {
- Success,
- RepositoryOffline,
- PermissionDenied,
- CardNotFound,
- ProtocolNotSupported,
- AuthenticationFailed,
- AuthenticationRequired,
- UnsupportedField,
- OtherError
- };
-
- void notifyCardCreated (in CallStatus status, in CardId Id);
-
- void notifyCardRemoved (in CallStatus status);
-
- void notifyCardModified (in CallStatus status);
-
- void notifyOpenBookProgress (in string status_message, in short percent);
-
- void notifyBookOpened (in CallStatus status, in Book book);
-
- void notifyCursorRequested (in CallStatus status, in CardCursor cursor);
-
- void notifyViewRequested (in CallStatus status, in BookView view);
-
- void notifyChangesRequested (in CallStatus status, in BookView view);
-
- void notifyAuthenticationResult (in CallStatus status);
-
- void notifySupportedFields (in CallStatus status, in stringlist fields);
-
- /**
- * notifyConnectionStatus:
- *
- * 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 notifyConnectionStatus (in boolean connected);
-
- /**
- * notifyWritable:
- *
- * Used to report whether or not a backend can write
- * to a given addressbook. All books default to
- * read-only, so unless you receive a notification
- * saying otherwise, treat the book as read-only. It
- * is presumed that this notification will be sent
- * early (just after a connection is opened, usually),
- * but it may also be sent later, if/when the backend
- * notices a change.
- */
- void notifyWritable (in boolean writable);
- };
-
- interface BookFactory : Bonobo::Unknown {
- exception ProtocolNotSupported {};
-
- void openBook (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 5ed8753a39..0000000000
--- a/addressbook/backend/pas/Makefile.am
+++ /dev/null
@@ -1,56 +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) -I $(srcdir) $(srcdir)/../idl/addressbook.idl $(idl_flags)
-
-INCLUDES = \
- -DGNOMELOCALEDIR=\""$(localedir)"\" \
- -DG_LOG_DOMAIN=\"wombat-pas\" \
- -I$(top_srcdir) \
- -I$(top_srcdir)/addressbook/backend \
- -I$(top_builddir)/addressbook/backend \
- $(BONOBO_GNOME_CFLAGS) \
- $(EXTRA_GNOME_CFLAGS)
-
-LDAP_BACKEND_SOURCES = pas-backend-ldap.c pas-backend-ldap.h
-
-if ENABLE_LDAP
-LDAP_BACKEND = $(LDAP_BACKEND_SOURCES)
-else
-LDAP_BACKEND =
-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)
-
-dist-hook:
- cd $(distdir); rm -f $(BUILT_SOURCES)
-
-EXTRA_DIST = $(LDAP_BACKEND_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/evolutionperson.schema b/addressbook/backend/pas/evolutionperson.schema
deleted file mode 100644
index abd85fc01c..0000000000
--- a/addressbook/backend/pas/evolutionperson.schema
+++ /dev/null
@@ -1,166 +0,0 @@
-#
-# Depends upon
-# Definition of an X.500 Attribute Type and an Object Class to Hold
-# Uniform Resource Identifiers (URIs) [RFC2079]
-# (core.schema)
-#
-# A Summary of the X.500(96) User Schema for use with LDAPv3 [RFC2256]
-# (core.schema)
-#
-# The COSINE and Internet X.500 Schema [RFC1274] (cosine.schema)
-#
-# The Internet Organizational Person Schema (inetorgperson)
-
-# primaryPhone
-attributetype ( 666.666.666.1.1
- NAME 'primaryPhone'
- DESC 'preferred phone number used to contact a person'
- EQUALITY caseIgnoreMatch
- SUBSTR caseIgnoreSubstringsMatch
- SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
- SINGLE-VALUE )
-
-# carPhone
-attributetype ( 666.666.666.1.2
- NAME 'carPhone'
- DESC 'car phone telephone number of the person'
- EQUALITY telephoneNumberMatch
- SUBSTR telephoneNumberSubstringsMatch
- SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
- SINGLE-VALUE )
-
-attributetype ( 666.666.666.1.3
- NAME ( 'homeFacsimileTelephoneNumber' 'homeFax' )
- EQUALITY caseIgnoreMatch
- SUBSTR caseIgnoreSubstringsMatch
- SYNTAX 1.3.6.1.4.1.1466.115.121.1.22 )
-
-attributetype ( 666.666.666.1.4
- NAME 'otherPhone'
- EQUALITY telephoneNumberMatch
- SUBSTR telephoneNumberSubstringsMatch
- SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
-
-attributetype ( 666.666.666.1.5
- NAME 'businessRole'
- EQUALITY caseIgnoreMatch
- SUBSTR caseIgnoreSubstringsMatch
- SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
-
-attributetype ( 666.666.666.1.6
- NAME 'managerName'
- SUP name )
-
-attributetype ( 666.666.666.1.7
- NAME 'assistantName'
- SUP name )
-
-# spouseName
-# single valued (/me smirks)
-attributetype ( 666.666.666.1.8
- NAME 'spouseName'
- SUP name
- SINGLE-VALUE )
-
-attributetype ( 666.666.666.1.9
- NAME 'otherPostalAddress'
- EQUALITY caseIgnoreListMatch
- SUBSTR caseIgnoreListSubstringsMatch
- SYNTAX 1.3.6.1.4.1.1466.115.121.1.41 )
-
-attributetype ( 666.666.666.1.10
- NAME ( 'mailer' 'mua' )
- EQUALITY caseIgnoreMatch
- SUBSTR caseIgnoreSubstringsMatch
- SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{32} )
-
-attributetype ( 666.666.666.1.11
- NAME ( 'birthDate' 'dob' )
- EQUALITY caseIgnoreMatch
- SUBSTR caseIgnoreSubstringsMatch
- SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{128} )
-
-attributetype ( 666.666.666.1.12
- NAME 'anniversary'
- EQUALITY caseIgnoreMatch
- SUBSTR caseIgnoreSubstringsMatch
- SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{128} )
-
-attributetype ( 666.666.666.1.13
- NAME 'note'
- EQUALITY caseIgnoreMatch
- SUBSTR caseIgnoreSubstringsMatch
- SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{1024} )
-
-attributetype ( 666.666.666.1.14
- NAME 'evolutionArbitrary'
- EQUALITY caseIgnoreMatch
- SUBSTR caseIgnoreSubstringsMatch
- SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{4096} )
- )
-
-attributetype ( 666.666.666.1.15
- NAME 'fileAs'
- SUP name )
-
-attributetype ( 666.666.666.1.16
- NAME 'assistantPhone'
- EQUALITY telephoneNumberMatch
- SUBSTR telephoneNumberSubstringsMatch
- SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
-
-attributetype ( 666.666.666.1.17
- NAME 'companyPhone'
- EQUALITY telephoneNumberMatch
- SUBSTR telephoneNumberSubstringsMatch
- SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
-
-attributetype ( 666.666.666.1.18
- NAME 'callbackPhone'
- EQUALITY telephoneNumberMatch
- SUBSTR telephoneNumberSubstringsMatch
- SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
-
-attributetype ( 666.666.666.1.19
- NAME ( 'otherFacsimileTelephoneNumber' 'otherFax' )
- EQUALITY telephoneNumberMatch
- SUBSTR telephoneNumberSubstringsMatch
- SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
-
-attributetype ( 666.666.666.1.20
- NAME 'radio'
- EQUALITY telephoneNumberMatch
- SUBSTR telephoneNumberSubstringsMatch
- SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
-
-attributetype ( 666.666.666.1.21
- NAME 'telex'
- EQUALITY telephoneNumberMatch
- SUBSTR telephoneNumberSubstringsMatch
- SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
-
-attributetype ( 666.666.666.1.22
- NAME 'tty'
- EQUALITY telephoneNumberMatch
- SUBSTR telephoneNumberSubstringsMatch
- SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
-
-attributetype ( 666.666.666.1.23
- NAME 'categories'
- EQUALITY caseIgnoreMatch
- SUBSTR caseIgnoreSubstringsMatch
- SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{4096} )
-
-# evolutionPerson
-objectclass ( 666.666.666.2.1
- NAME 'evolutionPerson'
- DESC 'Objectclass geared to Evolution Usage'
- SUP inetOrgPerson
- STRUCTURAL
- MAY (
- fileAs $ primaryPhone $ carPhone $ homeFacsimileTelephoneNumber $
- otherPhone $ businessRole $ managerName $ assistantName $ assistantPhone $
- otherPostalAddress $ mailer $ birthDate $ anniversary $ spouseName $
- note $ companyPhone $ callbackPhone $ otherFacsimileTelephoneNumber $
- radio $ telex $ tty $ categories )
- )
diff --git a/addressbook/backend/pas/pas-backend-file.c b/addressbook/backend/pas/pas-backend-file.c
deleted file mode 100644
index ec7bdfcd7f..0000000000
--- a/addressbook/backend/pas/pas-backend-file.c
+++ /dev/null
@@ -1,1605 +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 <stdio.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <time.h>
-#ifdef HAVE_DB_185_H
-#include <db_185.h>
-#else
-#ifdef HAVE_DB1_DB_H
-#include <db1/db.h>
-#else
-#include <db.h>
-#endif
-#endif
-
-#include <gtk/gtksignal.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-util.h>
-#include <gal/util/e-util.h>
-#include <gal/widgets/e-unicode.h>
-
-#include <ebook/e-card-simple.h>
-#include <e-util/e-sexp.h>
-#include <e-util/e-dbhash.h>
-#include "pas-backend-file.h"
-#include "pas-book.h"
-#include "pas-card-cursor.h"
-
-#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;
-typedef struct _PasBackendFileChangeContext PASBackendFileChangeContext;
-
-struct _PASBackendFilePrivate {
- GList *clients;
- gboolean loaded;
- char *uri;
- DB *file_db;
- EList *book_views;
- gboolean writable;
-};
-
-struct _PASBackendFileCursorPrivate {
- PASBackend *backend;
- PASBook *book;
-
- GList *elements;
- guint32 num_elements;
-};
-
-struct _PASBackendFileBookView {
- PASBookView *book_view;
- gchar *search;
- ESExp *search_sexp;
- PASBackendFileSearchContext *search_context;
- gchar *change_id;
- PASBackendFileChangeContext *change_context;
-};
-
-struct _PASBackendFileSearchContext {
- ECardSimple *card;
-};
-
-struct _PasBackendFileChangeContext {
- DB *db;
-
- GList *add_cards;
- GList *add_ids;
- GList *mod_cards;
- GList *mod_ids;
- GList *del_ids;
-};
-
-static PASBackendFileBookView *
-pas_backend_file_book_view_copy(const PASBackendFileBookView *book_view, void *closure)
-{
- PASBackendFileBookView *new_book_view;
- new_book_view = g_new (PASBackendFileBookView, 1);
- new_book_view->book_view = book_view->book_view;
-
- new_book_view->search = g_strdup(book_view->search);
- new_book_view->search_sexp = book_view->search_sexp;
- if (new_book_view->search_sexp)
- gtk_object_ref(GTK_OBJECT(new_book_view->search_sexp));
- if (book_view->search_context) {
- new_book_view->search_context = g_new(PASBackendFileSearchContext, 1);
- new_book_view->search_context->card = book_view->search_context->card;
- } else
- new_book_view->search_context = NULL;
-
- new_book_view->change_id = g_strdup(book_view->change_id);
- if (book_view->change_context) {
- new_book_view->change_context = g_new(PASBackendFileChangeContext, 1);
- new_book_view->change_context->db = book_view->change_context->db;
- new_book_view->change_context->add_cards = book_view->change_context->add_cards;
- new_book_view->change_context->add_ids = book_view->change_context->add_ids;
- new_book_view->change_context->mod_cards = book_view->change_context->mod_cards;
- new_book_view->change_context->mod_ids = book_view->change_context->mod_ids;
- new_book_view->change_context->del_ids = book_view->change_context->del_ids;
- } else
- new_book_view->change_context = NULL;
-
- return new_book_view;
-}
-
-static void
-pas_backend_file_book_view_free(PASBackendFileBookView *book_view, void *closure)
-{
- g_free(book_view->search);
- if (book_view->search_sexp)
- e_sexp_unref (book_view->search_sexp);
- g_free(book_view->search_context);
-
- g_free(book_view->change_id);
- if (book_view->change_context) {
- g_list_foreach (book_view->change_context->add_cards, (GFunc)g_free, NULL);
- g_list_foreach (book_view->change_context->add_ids, (GFunc)g_free, NULL);
- g_list_foreach (book_view->change_context->mod_cards, (GFunc)g_free, NULL);
- g_list_foreach (book_view->change_context->mod_ids, (GFunc)g_free, NULL);
- g_list_foreach (book_view->change_context->del_ids, (GFunc)g_free, NULL);
- g_list_free (book_view->change_context->add_cards);
- g_list_free (book_view->change_context->add_ids);
- g_list_free (book_view->change_context->mod_cards);
- g_list_free (book_view->change_context->mod_ids);
- g_list_free (book_view->change_context->del_ids);
- }
- g_free(book_view->change_context);
-
- g_free(book_view);
-}
-
-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;
- GNOME_Evolution_Addressbook_Book corba_book;
- PASBackendFileCursorPrivate *cursor_data = (PASBackendFileCursorPrivate *) data;
-
- corba_book = bonobo_object_corba_objref(BONOBO_OBJECT(cursor_data->book));
-
- CORBA_exception_init(&ev);
-
- GNOME_Evolution_Addressbook_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)
-{
- PASBook *book = (PASBook *)data;
- PASBackendFile *bf;
- EIterator *iterator;
- gboolean success = FALSE;
-
- bf = PAS_BACKEND_FILE(pas_book_get_backend(book));
- for (iterator = e_list_get_iterator(bf->priv->book_views); e_iterator_is_valid(iterator); e_iterator_next(iterator)) {
- const PASBackendFileBookView *view = e_iterator_get(iterator);
- if (view->book_view == PAS_BOOK_VIEW(object)) {
- e_iterator_delete(iterator);
- success = TRUE;
- break;
- }
- }
- if (!success)
- g_warning ("Failed to remove from book_views list");
- gtk_object_unref(GTK_OBJECT(iterator));
-
- bonobo_object_unref(BONOBO_OBJECT(book));
-}
-
-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 (ECardSimple *card, const char *str,
- char *(*compare)(const char*, const char*))
-{
- int i;
-
- for (i = E_CARD_SIMPLE_EMAIL_ID_EMAIL; i < E_CARD_SIMPLE_EMAIL_ID_LAST; i ++) {
- const char *email = e_card_simple_get_email (card, i);
-
- if (email && compare(email, str))
- return TRUE;
- }
-
- return FALSE;
-}
-
-static gboolean
-compare_phone (ECardSimple *card, const char *str,
- char *(*compare)(const char*, const char*))
-{
- int i;
-
- for (i = E_CARD_SIMPLE_PHONE_ID_ASSISTANT; i < E_CARD_SIMPLE_PHONE_ID_LAST; i ++) {
- const ECardPhone *phone = e_card_simple_get_phone (card, i);
-
- if (phone && compare(phone->number, str))
- return TRUE;
- }
-
- return FALSE;
-}
-
-static gboolean
-compare_address (ECardSimple *card, const char *str,
- char *(*compare)(const char*, const char*))
-{
- g_warning("address searching not implemented\n");
- return FALSE;
-}
-
-static struct prop_info {
- ECardSimpleField field_id;
- 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)(ECardSimple *ecard, const char *str,
- char *(*compare)(const char*, const char*));
-
-} prop_info_table[] = {
-#define NORMAL_PROP(f,q,e) {f, q, e, PROP_TYPE_NORMAL, NULL}
-#define LIST_PROP(q,e,c) {0, q, e, PROP_TYPE_LIST, c}
-
- /* query prop, ecard prop, type, list compare function */
- NORMAL_PROP ( E_CARD_SIMPLE_FIELD_FILE_AS, "file_as", "file_as" ),
- NORMAL_PROP ( E_CARD_SIMPLE_FIELD_FULL_NAME, "full_name", "full_name" ),
- NORMAL_PROP ( E_CARD_SIMPLE_FIELD_URL, "url", "url" ),
- NORMAL_PROP ( E_CARD_SIMPLE_FIELD_MAILER, "mailer", "mailer"),
- NORMAL_PROP ( E_CARD_SIMPLE_FIELD_ORG, "org", "org"),
- NORMAL_PROP ( E_CARD_SIMPLE_FIELD_ORG_UNIT, "org_unit", "org_unit"),
- NORMAL_PROP ( E_CARD_SIMPLE_FIELD_OFFICE, "office", "office"),
- NORMAL_PROP ( E_CARD_SIMPLE_FIELD_TITLE, "title", "title"),
- NORMAL_PROP ( E_CARD_SIMPLE_FIELD_ROLE, "role", "role"),
- NORMAL_PROP ( E_CARD_SIMPLE_FIELD_MANAGER, "manager", "manager"),
- NORMAL_PROP ( E_CARD_SIMPLE_FIELD_ASSISTANT, "assistant", "assistant"),
- NORMAL_PROP ( E_CARD_SIMPLE_FIELD_NICKNAME, "nickname", "nickname"),
- NORMAL_PROP ( E_CARD_SIMPLE_FIELD_SPOUSE, "spouse", "spouse" ),
- NORMAL_PROP ( E_CARD_SIMPLE_FIELD_NOTE, "note", "note"),
- LIST_PROP ( "email", "email", compare_email ),
- LIST_PROP ( "phone", "phone", compare_phone ),
- LIST_PROP ( "address", "address", compare_address ),
-};
-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;
- gboolean any_field;
-
- propname = argv[0]->value.string;
-
- any_field = !strcmp(propname, "x-evolution-any-field");
- for (i = 0; i < num_prop_infos; i ++) {
- if (any_field
- || !strcmp (prop_info_table[i].query_prop, propname)) {
- info = &prop_info_table[i];
-
- if (info->prop_type == PROP_TYPE_NORMAL) {
- char *prop = NULL;
- /* searches where the query's property
- maps directly to an ecard property */
-
- prop = e_card_simple_get (ctx->card, info->field_id);
-
- 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->card, argv[1]->value.string, compare);
- }
-
- /* if we're looking at all fields and find a match,
- or if we're just looking at this one field,
- break. */
- if ((any_field && truth)
- || !any_field)
- break;
- }
- }
-
- }
- r = e_sexp_result_new(f, 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, (char *(*)(const char*, const char*)) e_utf8_strstrcase);
-}
-
-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 (const PASBackendFileBookView *view, char *vcard_string)
-{
- ESExpResult *r;
- gboolean retval;
- ECard *card;
-
- card = e_card_new (vcard_string);
- view->search_context->card = e_card_simple_new (card);
- gtk_object_unref(GTK_OBJECT(card));
-
- /* if it's not a valid vcard why is it in our db? :) */
- if (!view->search_context->card)
- 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->card));
-
- e_sexp_result_free(view->search_sexp, r);
-
- return retval;
-}
-
-static void
-pas_backend_file_search (PASBackendFile *bf,
- PASBook *book,
- const PASBackendFileBookView *cnstview)
-{
- int db_error = 0;
- GList *cards = NULL;
- gint card_count = 0, card_threshold = 20, card_threshold_max = 200;
- DB *db = bf->priv->file_db;
- DBT id_dbt, vcard_dbt;
- int i, file_version_name_len;
- int esexp_error;
- PASBackendFileBookView *view = (PASBackendFileBookView *)cnstview;
-
- if (!bf->priv->loaded)
- return;
-
- if (view->search_sexp)
- e_sexp_unref(view->search_sexp);
- view->search_sexp = e_sexp_new();
-
- for(i=0;i<sizeof(symbols)/sizeof(symbols[0]);i++) {
- if (symbols[i].type == 1) {
- e_sexp_add_ifunction(view->search_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));
- esexp_error = e_sexp_parse(view->search_sexp);
-
- file_version_name_len = strlen (PAS_BACKEND_FILE_VERSION_NAME);
-
- if (esexp_error == -1) {
- pas_book_view_notify_complete (view->book_view);
- return;
- }
-
- 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 != file_version_name_len+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_prepend (cards, g_strdup (vcard_string));
- ++card_count;
-
- /* If we've accumulated a number of matches, pass them off to the client. */
- if (card_count > card_threshold) {
- pas_book_view_notify_add (view->book_view, cards);
- /* Clean up the handed-off data. */
- g_list_foreach (cards, (GFunc)g_free, NULL);
- g_list_free (cards);
- cards = NULL;
- card_count = 0;
-
- /* Yeah, this scheme is over-complicated. But I like it. */
- if (card_threshold <= card_threshold_max) {
- card_threshold = MIN (2*card_threshold, card_threshold_max);
- }
- }
-
- }
- }
-
- 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");
- }
-
- if (card_count)
- pas_book_view_notify_add (view->book_view, cards);
-
- pas_book_view_notify_complete (view->book_view);
-
- /*
- ** 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 void
-pas_backend_file_changes_foreach_key (const char *key, gpointer user_data)
-{
- PASBackendFileChangeContext *ctx = user_data;
- DB *db = ctx->db;
- DBT id_dbt, vcard_dbt;
- int db_error = 0;
-
- string_to_dbt (key, &id_dbt);
- db_error = db->get (db, &id_dbt, &vcard_dbt, 0);
-
- if (db_error == 1) {
- char *id = id_dbt.data;
-
- ctx->del_ids = g_list_append (ctx->del_ids, strdup(id));
- }
-}
-
-static void
-pas_backend_file_changes (PASBackendFile *bf,
- PASBook *book,
- const PASBackendFileBookView *cnstview)
-{
- int db_error = 0;
- DBT id_dbt, vcard_dbt;
- char *filename;
- EDbHash *ehash;
- GList *i, *v;
- DB *db = bf->priv->file_db;
- PASBackendFileBookView *view = (PASBackendFileBookView *)cnstview;
- PASBackendFileChangeContext *ctx = cnstview->change_context;
-
- if (!bf->priv->loaded)
- return;
-
- /* Find the changed ids - FIX ME, path should not be hard coded */
- filename = g_strdup_printf ("%s/evolution/local/Contacts/%s.db", g_get_home_dir (), view->change_id);
- ehash = e_dbhash_new (filename);
- g_free (filename);
-
- 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 *id = id_dbt.data;
- char *vcard_string = vcard_dbt.data;
-
- /* check what type of change has occurred, if any */
- switch (e_dbhash_compare (ehash, id, vcard_string)) {
- case E_DBHASH_STATUS_SAME:
- break;
- case E_DBHASH_STATUS_NOT_FOUND:
- ctx->add_cards = g_list_append (ctx->add_cards, strdup(vcard_string));
- ctx->add_ids = g_list_append (ctx->add_ids, strdup(id));
- break;
- case E_DBHASH_STATUS_DIFFERENT:
- ctx->mod_cards = g_list_append (ctx->mod_cards, strdup(vcard_string));
- ctx->mod_ids = g_list_append (ctx->mod_ids, strdup(id));
- break;
- }
- }
-
- db_error = db->seq(db, &id_dbt, &vcard_dbt, R_NEXT);
- }
-
- e_dbhash_foreach_key (ehash, (EDbHashFunc)pas_backend_file_changes_foreach_key, view->change_context);
-
- /* Update the hash */
- for (i = ctx->add_ids, v = ctx->add_cards; i != NULL; i = i->next, v = v->next){
- char *id = i->data;
- char *vcard = v->data;
- e_dbhash_add (ehash, id, vcard);
- }
- for (i = ctx->mod_ids, v = ctx->mod_cards; i != NULL; i = i->next, v = v->next){
- char *id = i->data;
- char *vcard = v->data;
- e_dbhash_add (ehash, id, vcard);
- }
- for (i = ctx->del_ids; i != NULL; i = i->next){
- char *id = i->data;
- e_dbhash_remove (ehash, id);
- }
-
- e_dbhash_write (ehash);
- e_dbhash_destroy (ehash);
-
- /* Send the changes */
- if (db_error == -1) {
- g_warning ("pas_backend_file_changes: error building list\n");
- } else {
- if (ctx->add_cards != NULL)
- pas_book_view_notify_add (view->book_view, ctx->add_cards);
-
- if (ctx->mod_cards != NULL)
- pas_book_view_notify_change (view->book_view, ctx->mod_cards);
-
- for (v = ctx->del_ids; v != NULL; v = v->next){
- char *id = v->data;
- pas_book_view_notify_remove (view->book_view, id);
- }
-
- pas_book_view_notify_complete (view->book_view);
- }
-}
-
-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;
- EIterator *iterator;
- PASBackendFile *bf = PAS_BACKEND_FILE (backend);
-
- id = do_create(backend, req->vcard, &vcard);
- if (id) {
- for (iterator = e_list_get_iterator(bf->priv->book_views); e_iterator_is_valid(iterator); e_iterator_next(iterator)) {
- const PASBackendFileBookView *view = e_iterator_get(iterator);
- if (vcard_matches_search (view, vcard)) {
- pas_book_view_notify_add_1 (view->book_view, vcard);
- pas_book_view_notify_complete (view->book_view);
- }
- }
- gtk_object_unref(GTK_OBJECT(iterator));
-
- pas_book_respond_create (
- book,
- GNOME_Evolution_Addressbook_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,
- GNOME_Evolution_Addressbook_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;
- EIterator *iterator;
- 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,
- GNOME_Evolution_Addressbook_BookListener_CardNotFound);
- g_free (req->id);
- return;
- }
-
- db_error = db->del (db, &id_dbt, 0);
- if (0 != db_error) {
- pas_book_respond_remove (
- book,
- GNOME_Evolution_Addressbook_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 (iterator = e_list_get_iterator (bf->priv->book_views); e_iterator_is_valid(iterator); e_iterator_next(iterator)) {
- const PASBackendFileBookView *view = e_iterator_get(iterator);
- if (vcard_matches_search (view, vcard_string)) {
- pas_book_view_notify_remove (view->book_view, req->id);
- pas_book_view_notify_complete (view->book_view);
- }
- }
- gtk_object_unref(GTK_OBJECT(iterator));
-
- pas_book_respond_remove (
- book,
- GNOME_Evolution_Addressbook_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;
- EIterator *iterator;
- 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,
- GNOME_Evolution_Addressbook_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 (iterator = e_list_get_iterator(bf->priv->book_views); e_iterator_is_valid(iterator); e_iterator_next(iterator)) {
- CORBA_Environment ev;
- const PASBackendFileBookView *view = e_iterator_get(iterator);
- gboolean old_match, new_match;
-
- CORBA_exception_init(&ev);
-
- bonobo_object_dup_ref(bonobo_object_corba_objref(BONOBO_OBJECT(view->book_view)), &ev);
-
- 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_view_notify_complete (view->book_view);
-
- bonobo_object_release_unref(bonobo_object_corba_objref(BONOBO_OBJECT(view->book_view)), &ev);
- }
- gtk_object_unref(GTK_OBJECT(iterator));
-
- pas_book_respond_modify (
- book,
- GNOME_Evolution_Addressbook_BookListener_Success);
- }
- else {
- pas_book_respond_modify (
- book,
- GNOME_Evolution_Addressbook_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;
- GNOME_Evolution_Addressbook_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);
-
- GNOME_Evolution_Addressbook_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
- ? GNOME_Evolution_Addressbook_BookListener_Success
- : GNOME_Evolution_Addressbook_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;
- PASBackendFileBookView view;
- PASBackendFileSearchContext ctx;
- EIterator *iterator;
-
- g_return_if_fail (req->listener != NULL);
-
- bonobo_object_ref(BONOBO_OBJECT(book));
-
- book_view = pas_book_view_new (req->listener);
-
- gtk_signal_connect(GTK_OBJECT(book_view), "destroy",
- GTK_SIGNAL_FUNC(view_destroy), book);
-
- view.book_view = book_view;
- view.search = req->search;
- view.search_sexp = NULL;
- view.search_context = &ctx;
- view.change_context = NULL;
- ctx.card = NULL;
-
- e_list_append(bf->priv->book_views, &view);
-
- pas_book_respond_get_book_view (book,
- (book_view != NULL
- ? GNOME_Evolution_Addressbook_BookListener_Success
- : GNOME_Evolution_Addressbook_BookListener_CardNotFound /* XXX */),
- book_view);
-
- iterator = e_list_get_iterator(bf->priv->book_views);
- e_iterator_last(iterator);
- pas_backend_file_search (bf, book, e_iterator_get(iterator));
- gtk_object_unref(GTK_OBJECT(iterator));
-
- g_free(req->search);
- CORBA_exception_init(&ev);
-
- bonobo_object_release_unref (req->listener, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning("pas_backend_file_process_get_book_view: Exception unreffing "
- "listener.\n");
- }
-
- CORBA_exception_free(&ev);
-}
-
-static void
-pas_backend_file_process_get_changes (PASBackend *backend,
- PASBook *book,
- PASRequest *req)
-{
- PASBackendFile *bf = PAS_BACKEND_FILE (backend);
- CORBA_Environment ev;
- PASBookView *book_view;
- PASBackendFileBookView view;
- PASBackendFileChangeContext ctx;
- EIterator *iterator;
-
- g_return_if_fail (req->listener != NULL);
-
- bonobo_object_ref(BONOBO_OBJECT(book));
-
- 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_changes (book,
- (book_view != NULL
- ? GNOME_Evolution_Addressbook_BookListener_Success
- : GNOME_Evolution_Addressbook_BookListener_CardNotFound /* XXX */),
- book_view);
-
- view.book_view = book_view;
- view.change_id = req->change_id;
- view.change_context = &ctx;
- ctx.db = bf->priv->file_db;
- ctx.add_cards = NULL;
- ctx.add_ids = NULL;
- ctx.mod_cards = NULL;
- ctx.mod_ids = NULL;
- ctx.del_ids = NULL;
- view.search = NULL;
- view.search_sexp = NULL;
- view.search_context = NULL;
-
- e_list_append(bf->priv->book_views, &view);
-
- iterator = e_list_get_iterator(bf->priv->book_views);
- e_iterator_last(iterator);
- pas_backend_file_changes (bf, book, e_iterator_get(iterator));
- gtk_object_unref(GTK_OBJECT(iterator));
-
- g_free(req->search);
- CORBA_exception_init(&ev);
- bonobo_object_release_unref (req->listener, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning("pas_backend_file_process_get_changed: Exception unreffing "
- "listener.\n");
- }
-
- CORBA_exception_free(&ev);
-}
-
-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 void
-pas_backend_file_process_authenticate_user (PASBackend *backend,
- PASBook *book,
- PASRequest *req)
-{
- pas_book_respond_authenticate_user (book,
- GNOME_Evolution_Addressbook_BookListener_Success);
-}
-
-static void
-pas_backend_file_process_get_supported_fields (PASBackend *backend,
- PASBook *book,
- PASRequest *req)
-{
- EList *fields = e_list_new ((EListCopyFunc)g_strdup, (EListFreeFunc)g_free, NULL);
- ECardSimple *card;
- int i;
-
- /* we support everything, so instantiate an e-card, and loop
- through all fields, adding their ecard_fields. */
-
- card = e_card_simple_new (e_card_new (""));
-
- for (i = 0; i < E_CARD_SIMPLE_FIELD_LAST; i ++)
- e_list_append (fields, e_card_simple_get_ecard_field (card, i));
-
- gtk_object_unref (GTK_OBJECT (card));
-
- pas_book_respond_get_supported_fields (book,
- GNOME_Evolution_Addressbook_BookListener_Success,
- fields);
-}
-
-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;
-
- case GetChanges:
- pas_backend_file_process_get_changes (backend, book, req);
- break;
-
- case AuthenticateUser:
- pas_backend_file_process_authenticate_user (backend, book, req);
- break;
-
- case GetSupportedFields:
- pas_backend_file_process_get_supported_fields (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:Ximian, Inc.\n\
-LABEL;WORK;QUOTED-PRINTABLE:401 Park Drive 3 West=0ABoston, MA 02215=0AUSA\n\
-TEL;WORK;VOICE:(617) 236-0442\n\
-TEL;WORK;FAX:(617) 236-8630\n\
-EMAIL;INTERNET:hello@ximian.com\n\
-URL:http://www.ximian.com/\n\
-ORG:Ximian, Inc.;\n\
-NOTE:Welcome to the Ximian Addressbook.\n\
-END:VCARD"
-
-static gboolean
-pas_backend_file_load_uri (PASBackend *backend,
- const char *uri)
-{
- PASBackendFile *bf = PAS_BACKEND_FILE (backend);
- char *filename;
- gboolean writable = FALSE;
- GList *l;
-
- 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) {
- writable = TRUE;
- }
- else {
- /* try to open the file read-only */
- bf->priv->file_db = dbopen (filename, O_RDONLY, 0666, DB_HASH, NULL);
-
- if (!bf->priv->file_db) {
- /* lastly, try and create the file */
- bf->priv->file_db = dbopen (filename, O_RDWR | O_CREAT, 0666, DB_HASH, NULL);
-
- if (bf->priv->file_db) {
- char *create_initial_file;
- char *dir;
-
- dir = g_dirname(filename);
- create_initial_file = g_concat_dir_and_file(dir, "create-initial");
-
- if (g_file_exists(create_initial_file)) {
- char *id;
- id = do_create(backend, INITIAL_VCARD, NULL);
- g_free (id);
- }
-
- g_free(create_initial_file);
- g_free(dir);
-
- writable = TRUE;
- }
- }
- }
-
- 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;
-
- /* report the writable status of the book to all its clients */
- for (l = bf->priv->clients; l; l = g_list_next (l)) {
- PASBook *book = l->data;
-
- pas_book_report_writable (book, writable);
- }
-
- bf->priv->writable = writable;
-
- 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,
- GNOME_Evolution_Addressbook_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, GNOME_Evolution_Addressbook_BookListener_Success);
- if (bf->priv->writable)
- pas_book_report_writable (book, bf->priv->writable);
- } else {
- /* Open the book. */
- pas_book_respond_open (
- book, GNOME_Evolution_Addressbook_BookListener_Success);
- if (bf->priv->writable)
- pas_book_report_writable (book, bf->priv->writable);
- }
-
- 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 char *
-pas_backend_file_get_static_capabilities (PASBackend *backend)
-{
- return g_strdup("local");
-}
-
-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);
-
- gtk_object_unref(GTK_OBJECT(bf->priv->book_views));
- 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;
- parent_class->get_static_capabilities = pas_backend_file_get_static_capabilities;
-
- 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 = e_list_new((EListCopyFunc) pas_backend_file_book_view_copy, (EListFreeFunc) pas_backend_file_book_view_free, NULL);
- priv->uri = NULL;
- priv->writable = FALSE;
-
- 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 <libgnome/gnome-defs.h>
-#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 c8cd900f87..0000000000
--- a/addressbook/backend/pas/pas-backend-ldap.c
+++ /dev/null
@@ -1,2397 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author:
- * Chris Toshok (toshok@helixcode.com)
- *
- * Copyright 2000, Helix Code, Inc.
- */
-
-#define DEBUG
-
-#include "config.h"
-#include <fcntl.h>
-#include <time.h>
-#include <lber.h>
-#include <gtk/gtksignal.h>
-
-#ifdef DEBUG
-#define LDAP_DEBUG
-#define LDAP_DEBUG_ADD
-#endif
-#include <ldap.h>
-#ifdef DEBUG
-#undef LDAP_DEBUG
-#endif
-
-#if LDAP_VENDOR_VERSION > 20000
-#define OPENLDAP2
-#else
-#define OPENLDAP1
-#endif
-
-#if 0
-#ifdef OPENLDAP1
-#define LDAP_NAME_ERROR(x) NAME_ERROR(x)
-#endif
-#endif
-
-#ifdef OPENLDAP2
-#include "ldap_schema.h"
-#endif
-
-#include <e-util/e-sexp.h>
-#include <ebook/e-card-simple.h>
-
-#include "pas-backend-ldap.h"
-#include "pas-book.h"
-#include "pas-card-cursor.h"
-
-
-#define LDAP_MAX_SEARCH_RESPONSES 100
-
-/* the objectClasses we need */
-#define TOP "top"
-#define PERSON "person"
-#define ORGANIZATIONALPERSON "organizationalPerson"
-#define INETORGPERSON "inetOrgPerson"
-#define EVOLUTIONPERSON "evolutionPerson"
-
-static gchar *query_prop_to_ldap(gchar *query_prop);
-
-static PASBackendClass *pas_backend_ldap_parent_class;
-typedef struct _PASBackendLDAPCursorPrivate PASBackendLDAPCursorPrivate;
-typedef struct _PASBackendLDAPBookView PASBackendLDAPBookView;
-typedef struct LDAPOp LDAPOp;
-
-struct _PASBackendLDAPPrivate {
- char *uri;
- gboolean connected;
- GList *clients;
- gchar *ldap_host;
- gchar *ldap_rootdn;
- int ldap_port;
- int ldap_scope;
- GList *book_views;
-
- LDAP *ldap;
-
- EList *supported_fields;
-
- /* whether or not there's support for the objectclass we need
- to store all our additional fields */
- gboolean evolutionPersonSupported;
- gboolean evolutionPersonChecked;
-
- gboolean writable;
-
- /* whether or not there's a request in process on our LDAP* */
- LDAPOp *current_op;
- GList *pending_ops;
- int op_idle;
-};
-
-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;
- LDAPOp *search_op;
-};
-
-typedef gboolean (*LDAPOpHandler)(PASBackend *backend, LDAPOp *op);
-typedef void (*LDAPOpDtor)(PASBackend *backend, LDAPOp *op);
-
-struct LDAPOp {
- LDAPOpHandler handler;
- LDAPOpDtor dtor;
- PASBackend *backend;
- PASBook *book;
- PASBookView *view;
-};
-
-static void ldap_op_init (LDAPOp *op, PASBackend *backend, PASBook *book, PASBookView *view, LDAPOpHandler handler, LDAPOpDtor dtor);
-static void ldap_op_process_current (PASBackend *backend);
-static void ldap_op_process (LDAPOp *op);
-static void ldap_op_restart (LDAPOp *op);
-static gboolean ldap_op_process_on_idle (PASBackend *backend);
-static void ldap_op_finished (LDAPOp *op);
-
-static ECardSimple *build_card_from_entry (LDAP *ldap, LDAPMessage *e);
-
-static void email_populate (ECardSimple *card, char **values);
-struct berval** email_ber (ECardSimple *card);
-gboolean email_compare (ECardSimple *ecard1, ECardSimple *ecard2);
-
-static void homephone_populate (ECardSimple *card, char **values);
-struct berval** homephone_ber (ECardSimple *card);
-gboolean homephone_compare (ECardSimple *ecard1, ECardSimple *ecard2);
-
-static void business_populate (ECardSimple *card, char **values);
-struct berval** business_ber (ECardSimple *card);
-gboolean business_compare (ECardSimple *ecard1, ECardSimple *ecard2);
-
-struct prop_info {
- ECardSimpleField field_id;
- char *query_prop;
- char *ldap_attr;
-#define PROP_TYPE_STRING 0x01
-#define PROP_TYPE_LIST 0x02
-#define PROP_DN 0x04
-#define PROP_EVOLVE 0x08
- int prop_type;
-
- /* the remaining items are only used for the TYPE_LIST props */
-
- /* used when reading from the ldap server populates ECard with the values in **values. */
- void (*populate_ecard_func)(ECardSimple *card, char **values);
- /* used when writing to an ldap server. returns a NULL terminated array of berval*'s */
- struct berval** (*ber_func)(ECardSimple *card);
- /* used to compare list attributes */
- gboolean (*compare_func)(ECardSimple *card1, ECardSimple *card2);
-
-} prop_info[] = {
-
-#define LIST_PROP(fid,q,a,ctor,ber,cmp) {fid, q, a, PROP_TYPE_LIST, ctor, ber, cmp}
-#define E_LIST_PROP(fid,q,a,ctor,ber,cmp) {fid, q, a, PROP_TYPE_LIST | PROP_EVOLVE, ctor, ber, cmp}
-#define STRING_PROP(fid,q,a) {fid, q, a, PROP_TYPE_STRING}
-#define E_STRING_PROP(fid,q,a) {fid, q, a, PROP_TYPE_STRING | PROP_EVOLVE}
-
-
- /* name fields */
- STRING_PROP (E_CARD_SIMPLE_FIELD_FULL_NAME, "full_name", "cn" ),
- STRING_PROP (E_CARD_SIMPLE_FIELD_FAMILY_NAME, "family_name", "sn" ),
-
- /* email addresses */
- LIST_PROP (E_CARD_SIMPLE_FIELD_EMAIL, "email", "mail", email_populate, email_ber, email_compare),
-
- /* phone numbers */
- E_STRING_PROP (E_CARD_SIMPLE_FIELD_PHONE_PRIMARY, "primary_phone", "primaryPhone"),
- LIST_PROP (E_CARD_SIMPLE_FIELD_PHONE_BUSINESS, "business_phone", "telephoneNumber", business_populate, business_ber, business_compare),
- LIST_PROP (E_CARD_SIMPLE_FIELD_PHONE_HOME, "home_phone", "homePhone", homephone_populate, homephone_ber, homephone_compare),
- STRING_PROP (E_CARD_SIMPLE_FIELD_PHONE_MOBILE, "mobile_phone", "mobile"),
- E_STRING_PROP (E_CARD_SIMPLE_FIELD_PHONE_CAR, "car_phone", "carPhone"),
- STRING_PROP (E_CARD_SIMPLE_FIELD_PHONE_BUSINESS_FAX, "business_fax", "facsimileTelephoneNumber"),
- E_STRING_PROP (E_CARD_SIMPLE_FIELD_PHONE_HOME_FAX, "home_fax", "homeFacsimileTelephoneNumber"),
- E_STRING_PROP (E_CARD_SIMPLE_FIELD_PHONE_OTHER, "other_phone", "otherPhone"),
- E_STRING_PROP (E_CARD_SIMPLE_FIELD_PHONE_OTHER, "other_fax", "otherFacsimileTelephoneNumber"),
- STRING_PROP (E_CARD_SIMPLE_FIELD_PHONE_ISDN, "isdn", "internationaliSDNNumber"),
- STRING_PROP (E_CARD_SIMPLE_FIELD_PHONE_PAGER, "pager", "pager"),
- E_STRING_PROP (E_CARD_SIMPLE_FIELD_PHONE_RADIO, "radio", "radio"),
- E_STRING_PROP (E_CARD_SIMPLE_FIELD_PHONE_TELEX, "telex", "telex"),
- E_STRING_PROP (E_CARD_SIMPLE_FIELD_PHONE_ASSISTANT, "assistant_phone", "assistantPhone"),
- E_STRING_PROP (E_CARD_SIMPLE_FIELD_PHONE_COMPANY, "company_phone", "companyPhone"),
- E_STRING_PROP (E_CARD_SIMPLE_FIELD_PHONE_CALLBACK, "callback_phone", "callbackPhone"),
- E_STRING_PROP (E_CARD_SIMPLE_FIELD_PHONE_TTYTTD, "tty", "tty"),
-
- /* org information */
- STRING_PROP (E_CARD_SIMPLE_FIELD_ORG, "org", "o"),
- STRING_PROP (E_CARD_SIMPLE_FIELD_ORG_UNIT, "org_unit", "ou"),
- STRING_PROP (E_CARD_SIMPLE_FIELD_OFFICE, "office", "roomNumber"),
- STRING_PROP (E_CARD_SIMPLE_FIELD_TITLE, "title", "title"),
- E_STRING_PROP (E_CARD_SIMPLE_FIELD_ROLE, "role", "businessRole"),
- E_STRING_PROP (E_CARD_SIMPLE_FIELD_MANAGER, "manager", "managerName"),
- E_STRING_PROP (E_CARD_SIMPLE_FIELD_ASSISTANT, "assistant", "assistantName"),
-
- /* addresses */
- STRING_PROP (E_CARD_SIMPLE_FIELD_ADDRESS_BUSINESS, "business_address", "postalAddress"),
- STRING_PROP (E_CARD_SIMPLE_FIELD_ADDRESS_HOME, "home_address", "homePostalAddress"),
- E_STRING_PROP (E_CARD_SIMPLE_FIELD_ADDRESS_OTHER, "other_address", "otherPostalAddress"),
-
- /* misc fields */
- STRING_PROP (E_CARD_SIMPLE_FIELD_URL, "url", "labeledURI"),
- /* map nickname to displayName */
- STRING_PROP (E_CARD_SIMPLE_FIELD_NICKNAME, "nickname", "displayName"),
- E_STRING_PROP (E_CARD_SIMPLE_FIELD_SPOUSE, "spouse", "spouseName"),
- E_STRING_PROP (E_CARD_SIMPLE_FIELD_NOTE, "note", "note"),
- E_STRING_PROP (E_CARD_SIMPLE_FIELD_ANNIVERSARY, "anniversary", "anniversary"),
- E_STRING_PROP (E_CARD_SIMPLE_FIELD_BIRTH_DATE, "birth_date", "birthDate"),
- E_STRING_PROP (E_CARD_SIMPLE_FIELD_MAILER, "mailer", "mailer"),
-
- E_STRING_PROP (E_CARD_SIMPLE_FIELD_FILE_AS, "file_as", "fileAs"),
- E_STRING_PROP (E_CARD_SIMPLE_FIELD_CATEGORIES, "categories", "categories"),
-
-/* E_CARD_SIMPLE_FIELD_FBURL, */
-/* E_CARD_SIMPLE_FIELD_NAME_OR_ORG, */
-
-
-#undef E_STRING_PROP
-#undef STRING_PROP
-#undef E_LIST_PROP
-#undef LIST_PROP
-};
-
-static int num_prop_infos = sizeof(prop_info) / sizeof(prop_info[0]);
-
-static void
-view_destroy(GtkObject *object, gpointer data)
-{
- CORBA_Environment ev;
- GNOME_Evolution_Addressbook_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)) {
- if (view->search_idle != 0) {
- /* we have a search running on the
- ldap connection. remove the idle
- handler and anbandon the msg id */
- g_source_remove(view->search_idle);
- pas_book_view_notify_status_message (view->book_view, "Abandoning pending search");
- if (view->search_msgid != -1)
- ldap_abandon (bl->priv->ldap, view->search_msgid);
-
- /* if the search op is the current op,
- finish it. else, remove it from the
- list and nuke it ourselves. */
- if (view->search_op == bl->priv->current_op)
- ldap_op_finished (view->search_op);
- else {
- bl->priv->pending_ops = g_list_remove (bl->priv->pending_ops,
- view->search_op);
- view->search_op->dtor (view->search_op->backend,
- view->search_op);
- }
- }
- g_free (view->search);
- g_free (view);
- 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);
-
- GNOME_Evolution_Addressbook_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
-add_to_supported_fields (PASBackendLDAP *bl, char **attrs, GHashTable *attr_hash)
-{
- int i;
- for (i = 0; attrs[i]; i ++) {
- char *query_prop = g_hash_table_lookup (attr_hash, attrs[i]);
-
- if (query_prop) {
- e_list_append (bl->priv->supported_fields, g_strdup(query_prop));
-
- /* handle the list attributes here */
- if (!strcmp (query_prop, "email")) {
- e_list_append (bl->priv->supported_fields, g_strdup("email_2"));
- e_list_append (bl->priv->supported_fields, g_strdup("email_3"));
- }
- else if (!strcmp (query_prop, "business_phone")) {
- e_list_append (bl->priv->supported_fields, g_strdup("business_phone_2"));
- }
- else if (!strcmp (query_prop, "home_phone")) {
- e_list_append (bl->priv->supported_fields, g_strdup("home_phone_2"));
- }
- }
- }
-}
-
-static void
-add_oc_attributes_to_supported_fields (PASBackendLDAP *bl, LDAPObjectClass *oc)
-{
- int i;
- GHashTable *attr_hash = g_hash_table_new (g_str_hash, g_str_equal);
-
- for (i = 0; i < num_prop_infos; i ++)
- g_hash_table_insert (attr_hash, prop_info[i].ldap_attr, prop_info[i].query_prop);
-
- if (oc->oc_at_oids_must)
- add_to_supported_fields (bl, oc->oc_at_oids_must, attr_hash);
-
- if (oc->oc_at_oids_may)
- add_to_supported_fields (bl, oc->oc_at_oids_may, attr_hash);
-
- g_hash_table_destroy (attr_hash);
-}
-
-static void
-check_schema_support (PASBackendLDAP *bl)
-{
- char *attrs[2];
- LDAPMessage *resp;
- LDAP *ldap = bl->priv->ldap;
-
- bl->priv->evolutionPersonChecked = TRUE;
-
- bl->priv->supported_fields = e_list_new ((EListCopyFunc)g_strdup, (EListFreeFunc)g_free, NULL);
-
- attrs[0] = "objectClasses";
- attrs[1] = NULL;
-
- if (ldap_search_ext_s (ldap, "cn=Subschema", LDAP_SCOPE_BASE,
- "(objectClass=subschema)", attrs, 0,
- NULL, NULL, NULL, 0, &resp) == LDAP_SUCCESS) {
- char **values;
-
- values = ldap_get_values (ldap, resp, "objectClasses");
-
- if (values) {
- int i;
- for (i = 0; values[i]; i ++) {
- int j;
- int code;
- const char *err;
- LDAPObjectClass *oc = ldap_str2objectclass (values[i], &code, &err, 0);
-
- if (!oc)
- continue;
-
- for (j = 0; oc->oc_names[j]; j++)
- if (!g_strcasecmp (oc->oc_names[j], EVOLUTIONPERSON)) {
- g_print ("support found on ldap server for objectclass evolutionPerson\n");
- bl->priv->evolutionPersonSupported = TRUE;
-
- add_oc_attributes_to_supported_fields (bl, oc);
- }
- else if (!g_strcasecmp (oc->oc_names[j], INETORGPERSON)
- || !g_strcasecmp (oc->oc_names[j], ORGANIZATIONALPERSON)
- || !g_strcasecmp (oc->oc_names[j], PERSON)) {
- add_oc_attributes_to_supported_fields (bl, oc);
- }
-
- ldap_objectclass_free (oc);
- }
- }
- }
-}
-
-static void
-pas_backend_ldap_connect (PASBackendLDAP *bl)
-{
- PASBackendLDAPPrivate *blpriv = bl->priv;
-
- /* close connection first if it's open first */
- if (blpriv->ldap)
- ldap_unbind (blpriv->ldap);
-
- blpriv->ldap = ldap_open (blpriv->ldap_host, blpriv->ldap_port);
-#ifdef DEBUG
- {
- int debug_level = ~0;
- ldap_set_option (blpriv->ldap, LDAP_OPT_DEBUG_LEVEL, &debug_level);
- }
-#endif
-
- if (NULL != blpriv->ldap) {
- ldap_simple_bind_s(blpriv->ldap,
- NULL /*binddn*/, NULL /*passwd*/);
- blpriv->connected = TRUE;
- }
- else {
- g_warning ("pas_backend_ldap_connect failed for "
- "'ldap://%s:%d/%s'\n",
- blpriv->ldap_host,
- blpriv->ldap_port,
- blpriv->ldap_rootdn ? blpriv->ldap_rootdn : "");
- blpriv->connected = FALSE;
- }
-
- /* check to see if evolutionPerson is supported, if we can (me
- might not be able to if we can't authenticate. if we
- can't, try again in auth_user.) */
- check_schema_support (bl);
-}
-
-static void
-ldap_op_init (LDAPOp *op, PASBackend *backend,
- PASBook *book, PASBookView *view,
- LDAPOpHandler handler, LDAPOpDtor dtor)
-{
- op->backend = backend;
- op->book = book;
- op->view = view;
- op->handler = handler;
- op->dtor = dtor;
-}
-
-static void
-ldap_op_process_current (PASBackend *backend)
-{
- PASBackendLDAP *bl = PAS_BACKEND_LDAP (backend);
- LDAPOp *op = bl->priv->current_op;
-
- if (!bl->priv->connected) {
- if (op->view)
- pas_book_view_notify_status_message (op->view, "Connecting to LDAP server");
- pas_backend_ldap_connect(bl);
- }
-
- if (bl->priv->connected) {
- if (op->handler (backend, op))
- ldap_op_finished (op);
- }
- else {
- if (op->view)
- pas_book_view_notify_status_message (op->view, "Unable to connect to LDAP server");
-
- ldap_op_finished (op);
- }
-}
-
-static void
-ldap_op_process (LDAPOp *op)
-{
- PASBackendLDAP *bl = PAS_BACKEND_LDAP (op->backend);
-
- if (bl->priv->current_op) {
- /* operation in progress. queue this op for later and return. */
- if (op->view)
- pas_book_view_notify_status_message (op->view, "Waiting for connection to ldap server...");
- bl->priv->pending_ops = g_list_append (bl->priv->pending_ops, op);
- }
- else {
- /* nothing going on, do this op now */
- bl->priv->current_op = op;
- ldap_op_process_current (op->backend);
- }
-}
-
-static gboolean
-ldap_op_process_on_idle (PASBackend *backend)
-{
- PASBackendLDAP *bl = PAS_BACKEND_LDAP (backend);
-
- bl->priv->op_idle = 0;
-
- ldap_op_process_current (backend);
-
- return FALSE;
-}
-
-static void
-ldap_op_restart (LDAPOp *op)
-{
- PASBackend *backend = op->backend;
- PASBackendLDAP *bl = PAS_BACKEND_LDAP (backend);
-
- g_return_if_fail (op == bl->priv->current_op);
-
- bl->priv->op_idle = g_idle_add((GSourceFunc)ldap_op_process_on_idle, backend);
-}
-
-static void
-ldap_op_finished (LDAPOp *op)
-{
- PASBackend *backend = op->backend;
- PASBackendLDAP *bl = PAS_BACKEND_LDAP (backend);
-
- g_return_if_fail (op == bl->priv->current_op);
-
- op->dtor (backend, op);
-
- if (bl->priv->pending_ops) {
- bl->priv->current_op = bl->priv->pending_ops->data;
- bl->priv->pending_ops = g_list_remove_link (bl->priv->pending_ops, bl->priv->pending_ops);
-
- bl->priv->op_idle = g_idle_add((GSourceFunc)ldap_op_process_on_idle, backend);
- }
- else {
- bl->priv->current_op = NULL;
- }
-}
-
-static int
-ldap_error_to_response (int ldap_error)
-{
- if (ldap_error == LDAP_SUCCESS)
- return GNOME_Evolution_Addressbook_BookListener_Success;
- else if (LDAP_NAME_ERROR (ldap_error))
- return GNOME_Evolution_Addressbook_BookListener_CardNotFound;
- else if (ldap_error == LDAP_INSUFFICIENT_ACCESS)
- return GNOME_Evolution_Addressbook_BookListener_PermissionDenied;
- else if (ldap_error == LDAP_SERVER_DOWN)
- return GNOME_Evolution_Addressbook_BookListener_RepositoryOffline;
- else
- return GNOME_Evolution_Addressbook_BookListener_OtherError;
-}
-
-
-static char *
-create_dn_from_ecard (ECardSimple *card, const char *root_dn)
-{
- char *cn, *cn_part = NULL;
- char *dn;
- gboolean need_comma = FALSE;
-
- cn = e_card_simple_get (card, E_CARD_SIMPLE_FIELD_FULL_NAME);
- if (cn) {
- cn_part = g_strdup_printf ("cn=%s%s", cn, need_comma ? "," : "");
- }
- else {
- cn_part = g_strdup ("");
- }
-
- dn = g_strdup_printf ("%s%s%s", cn_part,
- (root_dn && strlen(root_dn)) ? "," : "",
- (root_dn && strlen(root_dn)) ? root_dn: "");
-
- g_free (cn_part);
-
- g_print ("generated dn: %s\n", dn);
-
- return dn;
-}
-
-static void
-free_mods (GPtrArray *mods)
-{
- int i = 0;
- LDAPMod *mod;
-
- while ((mod = g_ptr_array_index (mods, i++))) {
- int j;
- g_free (mod->mod_type);
-
- if (mod->mod_op & LDAP_MOD_BVALUES) {
- for (j = 0; mod->mod_bvalues[j]; j++) {
- g_free (mod->mod_bvalues[j]->bv_val);
- g_free (mod->mod_bvalues[j]);
- }
- }
- else {
- for (j = 0; mod->mod_values[j]; j++)
- g_free (mod->mod_values[j]);
- }
- g_free (mod);
- }
-
- g_ptr_array_free (mods, TRUE /* XXX ? */);
-}
-
-static GPtrArray*
-build_mods_from_ecards (PASBackendLDAP *bl, ECardSimple *current, ECardSimple *new, gboolean *new_dn_needed)
-{
- gboolean adding = (current == NULL);
- GPtrArray *result = g_ptr_array_new();
- int i;
-
- if (new_dn_needed)
- *new_dn_needed = FALSE;
-
- /* we walk down the list of properties we can deal with (that
- big table at the top of the file) */
-
- for (i = 0; i < num_prop_infos; i ++) {
- gboolean include;
- gboolean new_prop_present = FALSE;
- gboolean current_prop_present = FALSE;
- struct berval** new_prop_bers = NULL;
- char *new_prop = NULL;
- char *current_prop = NULL;
-
- /* XXX if it's an evolutionPerson prop and the ldap
- server doesn't support that objectclass, skip it. */
- if (prop_info[i].prop_type & PROP_EVOLVE && !bl->priv->evolutionPersonSupported)
- continue;
-
- /* get the value for the new card, and compare it to
- the value in the current card to see if we should
- update it -- if adding is TRUE, short circuit the
- check. */
- if (prop_info[i].prop_type & PROP_TYPE_STRING) {
- new_prop = e_card_simple_get (new, prop_info[i].field_id);
- new_prop_present = (new_prop != NULL);
- }
- else {
- new_prop_bers = prop_info[i].ber_func (new);
- new_prop_present = (new_prop_bers != NULL);
- }
-
- /* need to set INCLUDE to true if the field needs to
- show up in the ldap modify request */
- if (adding) {
- /* if we're creating a new card, include it if the
- field is there at all */
- if (prop_info[i].prop_type & PROP_TYPE_STRING)
- include = (new_prop_present && *new_prop); /* empty strings cause problems */
- else
- include = new_prop_present;
- }
- else {
- /* if we're modifying an existing card,
- include it if the current field value is
- different than the new one, if it didn't
- exist previously, or if it's been
- removed. */
- if (prop_info[i].prop_type & PROP_TYPE_STRING) {
- current_prop = e_card_simple_get (current, prop_info[i].field_id);
- current_prop_present = (current_prop != NULL);
-
- if (new_prop && current_prop)
- include = *new_prop && strcmp (new_prop, current_prop);
- else
- include = (!!new_prop != !!current_prop);
- }
- else {
- int j;
- struct berval **current_prop_bers = prop_info[i].ber_func (current);
-
- current_prop_present = (current_prop_bers != NULL);
-
- /* free up the current_prop_bers */
- if (current_prop_bers) {
- for (j = 0; current_prop_bers[j]; j++) {
- g_free (current_prop_bers[j]->bv_val);
- g_free (current_prop_bers[j]);
- }
- g_free (current_prop_bers);
- }
-
- include = !prop_info[i].compare_func (new, current);
- }
- }
-
- if (include) {
- LDAPMod *mod = g_new (LDAPMod, 1);
-
- /* the included attribute has changed - we
- need to update the dn if it's one of the
- attributes we compute the dn from. */
- if (new_dn_needed)
- *new_dn_needed |= prop_info[i].prop_type & PROP_DN;
-
- if (adding) {
- mod->mod_op = LDAP_MOD_ADD;
- }
- else {
- if (!new_prop_present)
- mod->mod_op = LDAP_MOD_DELETE;
- else if (!current_prop_present)
- mod->mod_op = LDAP_MOD_ADD;
- else
- mod->mod_op = LDAP_MOD_REPLACE;
- }
-
- mod->mod_type = g_strdup (prop_info[i].ldap_attr);
-
- if (prop_info[i].prop_type & PROP_TYPE_STRING) {
- mod->mod_values = g_new (char*, 2);
- mod->mod_values[0] = new_prop;
- mod->mod_values[1] = NULL;
- }
- else { /* PROP_TYPE_LIST */
- mod->mod_op |= LDAP_MOD_BVALUES;
- mod->mod_bvalues = new_prop_bers;
- }
-
- g_ptr_array_add (result, mod);
- }
-
- }
-
- /* NULL terminate the list of modifications */
- g_ptr_array_add (result, NULL);
-
- return result;
-}
-
-static void
-add_objectclass_mod (PASBackendLDAP *bl, GPtrArray *mod_array)
-{
- LDAPMod *objectclass_mod;
-
- objectclass_mod = g_new (LDAPMod, 1);
- objectclass_mod->mod_op = LDAP_MOD_ADD;
- objectclass_mod->mod_type = g_strdup ("objectClass");
- objectclass_mod->mod_values = g_new (char*, bl->priv->evolutionPersonSupported ? 6 : 5);
- objectclass_mod->mod_values[0] = g_strdup (TOP);
- objectclass_mod->mod_values[1] = g_strdup (PERSON);
- objectclass_mod->mod_values[2] = g_strdup (ORGANIZATIONALPERSON);
- objectclass_mod->mod_values[3] = g_strdup (INETORGPERSON);
- if (bl->priv->evolutionPersonSupported) {
- objectclass_mod->mod_values[4] = g_strdup (EVOLUTIONPERSON);
- objectclass_mod->mod_values[5] = NULL;
- }
- else {
- objectclass_mod->mod_values[4] = NULL;
- }
- g_ptr_array_add (mod_array, objectclass_mod);
-}
-
-typedef struct {
- LDAPOp op;
- char *vcard;
-} LDAPCreateOp;
-
-static gboolean
-create_card_handler (PASBackend *backend, LDAPOp *op)
-{
- LDAPCreateOp *create_op = (LDAPCreateOp*)op;
- PASBackendLDAP *bl = PAS_BACKEND_LDAP (backend);
- ECard *new_ecard;
- ECardSimple *new_card;
- char *dn;
- int response;
- int ldap_error;
- GPtrArray *mod_array;
- LDAPMod **ldap_mods;
- LDAP *ldap;
-
- printf ("vcard = %s\n", create_op->vcard);
-
- new_ecard = e_card_new (create_op->vcard);
- new_card = e_card_simple_new (new_ecard);
-
- dn = create_dn_from_ecard (new_card, bl->priv->ldap_rootdn);
-
- ldap = bl->priv->ldap;
-
- /* build our mods */
- mod_array = build_mods_from_ecards (bl, NULL, new_card, NULL);
-
-#if 0
- if (!mod_array) {
- /* there's an illegal field in there. report
- UnsupportedAttribute back */
- g_free (dn);
-
- gtk_object_unref (GTK_OBJECT(new_card));
-
- pas_book_respond_create (create_op->op.book,
- GNOME_Evolution_Addressbook_BookListener_UnsupportedField,
- dn);
-
- return TRUE;
- }
-#endif
-
- /* remove the NULL at the end */
- g_ptr_array_remove (mod_array, NULL);
-
- /* add our objectclass(es) */
- add_objectclass_mod (bl, mod_array);
-
- /* then put the NULL back */
- g_ptr_array_add (mod_array, NULL);
-
-#ifdef LDAP_DEBUG_ADD
- {
- int i;
- printf ("Sending the following to the server as ADD\n");
-
- for (i = 0; g_ptr_array_index(mod_array, i); i ++) {
- LDAPMod *mod = g_ptr_array_index(mod_array, i);
- if (mod->mod_op & LDAP_MOD_DELETE)
- printf ("del ");
- else if (mod->mod_op & LDAP_MOD_REPLACE)
- printf ("rep ");
- else
- printf ("add ");
- if (mod->mod_op & LDAP_MOD_BVALUES)
- printf ("ber ");
- else
- printf (" ");
-
- printf (" %s:\n", mod->mod_type);
-
- if (mod->mod_op & LDAP_MOD_BVALUES) {
- int j;
- for (j = 0; mod->mod_bvalues[j] && mod->mod_bvalues[j]->bv_val; j++)
- printf ("\t\t'%s'\n", mod->mod_bvalues[j]->bv_val);
- }
- else {
- int j;
-
- for (j = 0; mod->mod_values[j]; j++)
- printf ("\t\t'%s'\n", mod->mod_values[j]);
- }
- }
- }
-#endif
-
- ldap_mods = (LDAPMod**)mod_array->pdata;
-
- if (op->view)
- pas_book_view_notify_status_message (op->view, "Adding card to LDAP server");
-
- /* actually perform the ldap add */
- ldap_error = ldap_add_s (ldap, dn, ldap_mods);
-
- if (op->view)
- pas_book_view_notify_status_message (op->view, "");
-
- if (ldap_error != LDAP_SUCCESS)
- ldap_perror (ldap, "ldap_add_s");
-
- /* and clean up */
- free_mods (mod_array);
- g_free (dn);
-
- gtk_object_unref (GTK_OBJECT(new_card));
-
- /* and lastly respond */
- response = ldap_error_to_response (ldap_error);
- pas_book_respond_create (create_op->op.book,
- response,
- dn);
-
- /* we're synchronous */
- return TRUE;
-}
-
-static void
-create_card_dtor (PASBackend *backend, LDAPOp *op)
-{
- LDAPCreateOp *create_op = (LDAPCreateOp*)op;
-
- g_free (create_op->vcard);
- g_free (create_op);
-}
-
-static void
-pas_backend_ldap_process_create_card (PASBackend *backend,
- PASBook *book,
- PASRequest *req)
-{
- LDAPCreateOp *create_op = g_new (LDAPCreateOp, 1);
- PASBackendLDAP *bl = PAS_BACKEND_LDAP (backend);
- PASBookView *book_view = NULL;
-
- if (bl->priv->book_views) {
- PASBackendLDAPBookView *v = bl->priv->book_views->data;
- book_view = v->book_view;
- }
-
- ldap_op_init ((LDAPOp*)create_op, backend, book,
- book_view,
- create_card_handler, create_card_dtor);
-
- create_op->vcard = req->vcard;
-
- ldap_op_process ((LDAPOp*)create_op);
-}
-
-
-typedef struct {
- LDAPOp op;
- char *id;
-} LDAPRemoveOp;
-
-static gboolean
-remove_card_handler (PASBackend *backend, LDAPOp *op)
-{
- LDAPRemoveOp *remove_op = (LDAPRemoveOp*)op;
- PASBackendLDAP *bl = PAS_BACKEND_LDAP (backend);
- int response;
- int ldap_error;
-
- ldap_error = ldap_delete_s (bl->priv->ldap, remove_op->id);
- if (ldap_error != LDAP_SUCCESS)
- ldap_perror (bl->priv->ldap, "ldap_delete_s");
-
- response = ldap_error_to_response (ldap_error);
-
- pas_book_respond_remove (remove_op->op.book,
- response);
-
- /* we're synchronous */
- return TRUE;
-}
-
-static void
-remove_card_dtor (PASBackend *backend, LDAPOp *op)
-{
- LDAPRemoveOp *remove_op = (LDAPRemoveOp*)op;
-
- g_free (remove_op->id);
- g_free (remove_op);
-}
-
-static void
-pas_backend_ldap_process_remove_card (PASBackend *backend,
- PASBook *book,
- PASRequest *req)
-{
- LDAPRemoveOp *remove_op = g_new (LDAPRemoveOp, 1);
- PASBackendLDAP *bl = PAS_BACKEND_LDAP (backend);
- PASBookView *book_view = NULL;
-
- if (bl->priv->book_views) {
- PASBackendLDAPBookView *v = bl->priv->book_views->data;
- book_view = v->book_view;
- }
-
- ldap_op_init ((LDAPOp*)remove_op, backend, book,
- book_view,
- remove_card_handler, remove_card_dtor);
-
- remove_op->id = req->id;
-
- ldap_op_process ((LDAPOp*)remove_op);
-}
-
-
-typedef struct {
- LDAPOp op;
- char *vcard;
-} LDAPModifyOp;
-
-static ECardSimple *
-search_for_dn (PASBackendLDAP *bl, const char *dn)
-{
-#if 0
- char **attrs;
-#endif
- char *query;
- LDAP *ldap = bl->priv->ldap;
- LDAPMessage *res, *e;
- ECardSimple *result = NULL;
-
-#if 0
- /* this is broken because if we (say) modify the cn and can't
- modify the dn (because it overlaps), we lose the ability to
- search by that component of the dn. */
- attrs = ldap_explode_dn (dn, 0);
- query = g_strdup_printf ("(%s)", attrs[0]);
- printf ("searching for %s\n", query);
-#else
- query = g_strdup ("(objectclass=*)");
-#endif
-
- if (ldap_search_s (ldap,
- bl->priv->ldap_rootdn,
- bl->priv->ldap_scope,
- query,
- NULL, 0, &res) != -1) {
- e = ldap_first_entry (ldap, res);
- while (NULL != e) {
- if (!strcmp (ldap_get_dn (ldap, e), dn)) {
- printf ("found it\n");
- result = build_card_from_entry (ldap, e);
- break;
- }
- e = ldap_next_entry (ldap, e);
- }
-
- ldap_msgfree(res);
- }
-
- g_free (query);
- return result;
-}
-
-static gboolean
-modify_card_handler (PASBackend *backend, LDAPOp *op)
-{
- LDAPModifyOp *modify_op = (LDAPModifyOp*)op;
- PASBackendLDAP *bl = PAS_BACKEND_LDAP (backend);
- ECard *new_ecard;
- char *id;
- int response;
- int ldap_error = LDAP_SUCCESS;
- GPtrArray *mod_array;
- LDAPMod **ldap_mods;
- LDAP *ldap;
- ECardSimple *current_card;
-
- new_ecard = e_card_new (modify_op->vcard);
- id = e_card_get_id(new_ecard);
-
- ldap = bl->priv->ldap;
-
- current_card = search_for_dn (bl, id);
-
- if (current_card) {
- ECardSimple *new_card = e_card_simple_new (new_ecard);
- gboolean need_new_dn;
-
- /* build our mods */
- mod_array = build_mods_from_ecards (bl, current_card, new_card, &need_new_dn);
- if (mod_array->len > 0) {
- ldap_mods = (LDAPMod**)mod_array->pdata;
-
- /* actually perform the ldap modify */
- ldap_error = ldap_modify_ext_s (ldap, id, ldap_mods, NULL, NULL);
- if (ldap_error != LDAP_SUCCESS)
- ldap_perror (ldap, "ldap_modify_s");
- }
- else {
- g_print ("modify list empty. no modification sent\n");
- }
-
- /* and clean up */
- free_mods (mod_array);
- gtk_object_unref (GTK_OBJECT(new_card));
- gtk_object_unref (GTK_OBJECT(current_card));
- }
- else {
- g_print ("didn't find original card\n");
- }
-
- response = ldap_error_to_response (ldap_error);
- pas_book_respond_modify (modify_op->op.book,
- response);
-
- /* we're synchronous */
- return TRUE;
-}
-
-static void
-modify_card_dtor (PASBackend *backend, LDAPOp *op)
-{
- LDAPModifyOp *modify_op = (LDAPModifyOp*)op;
-
- g_free (modify_op->vcard);
- g_free (modify_op);
-}
-
-static void
-pas_backend_ldap_process_modify_card (PASBackend *backend,
- PASBook *book,
- PASRequest *req)
-{
- LDAPModifyOp *modify_op = g_new (LDAPModifyOp, 1);
- PASBackendLDAP *bl = PAS_BACKEND_LDAP (backend);
- PASBookView *book_view = NULL;
-
- if (bl->priv->book_views) {
- PASBackendLDAPBookView *v = bl->priv->book_views->data;
- book_view = v->book_view;
- }
-
- ldap_op_init ((LDAPOp*)modify_op, backend, book,
- book_view,
- modify_card_handler, modify_card_dtor);
-
- modify_op->vcard = req->vcard;
-
- ldap_op_process ((LDAPOp*)modify_op);
-}
-
-
-typedef struct {
- LDAPOp op;
- PASBook *book;
-} LDAPGetCursorOp;
-
-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)
-{
- PASBackendLDAPCursorPrivate *cursor_data = (PASBackendLDAPCursorPrivate *) data;
-
- g_return_val_if_fail (n < cursor_data->num_elements, NULL);
-
- return (char*)g_list_nth (cursor_data->elements, n);
-}
-
-static void
-cursor_destroy(GtkObject *object, gpointer data)
-{
- CORBA_Environment ev;
- GNOME_Evolution_Addressbook_Book corba_book;
- PASBackendLDAPCursorPrivate *cursor_data = (PASBackendLDAPCursorPrivate *) data;
-
- corba_book = bonobo_object_corba_objref(BONOBO_OBJECT(cursor_data->book));
-
- CORBA_exception_init(&ev);
-
- GNOME_Evolution_Addressbook_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_list_foreach (cursor_data->elements, (GFunc)g_free, NULL);
- g_list_free (cursor_data->elements);
-
- g_free(cursor_data);
-}
-
-static void
-pas_backend_ldap_build_all_cards_list(PASBackend *backend,
- PASBackendLDAPCursorPrivate *cursor_data)
-{
- PASBackendLDAP *bl = PAS_BACKEND_LDAP (backend);
- LDAP *ldap = bl->priv->ldap;
- int ldap_error;
- LDAPMessage *res, *e;
-
- if ((ldap_error = ldap_search_s (ldap,
- bl->priv->ldap_rootdn,
- bl->priv->ldap_scope,
- "(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 gboolean
-get_cursor_handler (PASBackend *backend, LDAPOp *op)
-{
- LDAPGetCursorOp *cursor_op = (LDAPGetCursorOp*)op;
- CORBA_Environment ev;
- int ldap_error = 0;
- PASCardCursor *cursor;
- GNOME_Evolution_Addressbook_Book corba_book;
- PASBackendLDAPCursorPrivate *cursor_data;
- PASBook *book = cursor_op->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);
-
- GNOME_Evolution_Addressbook_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_to_response (ldap_error),
- cursor);
-
- /* we're synchronous */
- return TRUE;
-}
-
-static void
-get_cursor_dtor (PASBackend *backend, LDAPOp *op)
-{
- g_free (op);
-}
-
-static void
-pas_backend_ldap_process_get_cursor (PASBackend *backend,
- PASBook *book,
- PASRequest *req)
-{
- LDAPGetCursorOp *op = g_new (LDAPGetCursorOp, 1);
-
- ldap_op_init ((LDAPOp*)op, backend, book, NULL, get_cursor_handler, get_cursor_dtor);
-
- ldap_op_process ((LDAPOp*)op);
-}
-
-
-/* List property functions */
-static void
-email_populate(ECardSimple *card, char **values)
-{
- int i;
-
- for (i = 0; values[i] && i < 3; i ++) {
- e_card_simple_set_email (card, i, values[i]);
- }
-}
-
-struct berval**
-email_ber(ECardSimple *card)
-{
- struct berval** result;
- const char *emails[3];
- int i, j, num;
-
- num = 0;
- for (i = 0; i < 3; i ++) {
- emails[i] = e_card_simple_get_email (card, E_CARD_SIMPLE_EMAIL_ID_EMAIL + i);
- if (emails[i])
- num++;
- }
-
- if (num == 0)
- return NULL;
-
- result = g_new (struct berval*, num + 1);
-
- for (i = 0; i < num; i ++)
- result[i] = g_new (struct berval, 1);
-
- j = 0;
- for (i = 0; i < 3; i ++) {
- if (emails[i]) {
- result[j]->bv_val = g_strdup (emails[i]);
- result[j++]->bv_len = strlen (emails[i]);
- }
- }
-
- result[num] = NULL;
-
- return result;
-}
-
-gboolean
-email_compare (ECardSimple *ecard1, ECardSimple *ecard2)
-{
- const char *email1, *email2;
- int i;
-
- for (i = 0; i < 3; i ++) {
- gboolean equal;
- email1 = e_card_simple_get_email (ecard1, E_CARD_SIMPLE_EMAIL_ID_EMAIL + i);
- email2 = e_card_simple_get_email (ecard2, E_CARD_SIMPLE_EMAIL_ID_EMAIL + i);
-
- if (email1 && email2)
- equal = !strcmp (email1, email2);
- else
- equal = (!!email1 == !!email2);
-
- if (!equal)
- return equal;
- }
-
- return TRUE;
-}
-
-static void
-homephone_populate(ECardSimple *card, char **values)
-{
- if (values[0])
- e_card_simple_set (card, E_CARD_SIMPLE_FIELD_PHONE_HOME, values[0]);
- if (values[1])
- e_card_simple_set (card, E_CARD_SIMPLE_FIELD_PHONE_HOME_2, values[1]);
-}
-
-struct berval**
-homephone_ber(ECardSimple *card)
-{
- struct berval** result;
- const char *homephones[3];
- int i, j, num;
-
- num = 0;
- if ((homephones[0] = e_card_simple_get (card, E_CARD_SIMPLE_FIELD_PHONE_HOME)))
- num++;
- if ((homephones[1] = e_card_simple_get (card, E_CARD_SIMPLE_FIELD_PHONE_HOME_2)))
- num++;
-
- if (num == 0)
- return NULL;
-
- result = g_new (struct berval*, num + 1);
-
- for (i = 0; i < num; i ++)
- result[i] = g_new (struct berval, 1);
-
- j = 0;
- for (i = 0; i < 2; i ++) {
- if (homephones[i]) {
- result[j]->bv_val = g_strdup (homephones[i]);
- result[j++]->bv_len = strlen (homephones[i]);
- }
- }
-
- result[num] = NULL;
-
- return result;
-}
-
-gboolean
-homephone_compare (ECardSimple *ecard1, ECardSimple *ecard2)
-{
- int phone_ids[2] = { E_CARD_SIMPLE_FIELD_PHONE_HOME, E_CARD_SIMPLE_FIELD_PHONE_HOME_2 };
- const char *phone1, *phone2;
- int i;
-
- for (i = 0; i < 2; i ++) {
- gboolean equal;
- phone1 = e_card_simple_get (ecard1, phone_ids[i]);
- phone2 = e_card_simple_get (ecard2, phone_ids[i]);
-
- if (phone1 && phone2)
- equal = !strcmp (phone1, phone2);
- else
- equal = (!!phone1 == !!phone2);
-
- if (!equal)
- return equal;
- }
-
- return TRUE;
-}
-
-static void
-business_populate(ECardSimple *card, char **values)
-{
- if (values[0])
- e_card_simple_set (card, E_CARD_SIMPLE_FIELD_PHONE_BUSINESS, values[0]);
- if (values[1])
- e_card_simple_set (card, E_CARD_SIMPLE_FIELD_PHONE_BUSINESS_2, values[1]);
-}
-
-struct berval**
-business_ber(ECardSimple *card)
-{
- struct berval** result;
- const char *business_phones[3];
- int i, j, num;
-
- num = 0;
- if ((business_phones[0] = e_card_simple_get (card, E_CARD_SIMPLE_FIELD_PHONE_BUSINESS)))
- num++;
- if ((business_phones[1] = e_card_simple_get (card, E_CARD_SIMPLE_FIELD_PHONE_BUSINESS_2)))
- num++;
-
- if (num == 0)
- return NULL;
-
- result = g_new (struct berval*, num + 1);
-
- for (i = 0; i < num; i ++)
- result[i] = g_new (struct berval, 1);
-
- j = 0;
- for (i = 0; i < 2; i ++) {
- if (business_phones[i]) {
- result[j]->bv_val = g_strdup (business_phones[i]);
- result[j++]->bv_len = strlen (business_phones[i]);
- }
- }
-
- result[num] = NULL;
-
- return result;
-}
-
-gboolean
-business_compare (ECardSimple *ecard1, ECardSimple *ecard2)
-{
- int phone_ids[2] = { E_CARD_SIMPLE_FIELD_PHONE_BUSINESS, E_CARD_SIMPLE_FIELD_PHONE_BUSINESS_2 };
- const char *phone1, *phone2;
- int i;
-
- for (i = 0; i < 2; i ++) {
- gboolean equal;
- phone1 = e_card_simple_get (ecard1, phone_ids[i]);
- phone2 = e_card_simple_get (ecard2, phone_ids[i]);
-
- if (phone1 && phone2)
- equal = !strcmp (phone1, phone2);
- else
- equal = (!!phone1 == !!phone2);
-
- if (!equal)
- return equal;
- }
-
- return TRUE;
-}
-
-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(f, 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(f, 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(f, 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;
- gboolean one_star = FALSE;
-
- if (strlen(str) == 0)
- one_star = TRUE;
-
- if (!strcmp (propname, "x-evolution-any-field")) {
- int i;
- int query_length;
- char *big_query;
- char *header, *footer;
- char *match_str;
-
- header = g_malloc0((num_prop_infos - 1) * 2 + 1);
- footer = g_malloc0(num_prop_infos + 1);
- for (i = 0; i < num_prop_infos - 1; i ++) {
- strcat (header, "(|");
- strcat (footer, ")");
- }
-
- match_str = g_strdup_printf("=*%s%s)",
- str, one_star ? "" : "*");
-
- query_length = strlen (header);
-
- for (i = 0; i < num_prop_infos; i ++) {
- query_length += 1 + strlen(prop_info[i].ldap_attr) + strlen (match_str);
- }
-
- big_query = g_malloc0(query_length + 1);
- strcat (big_query, header);
- for (i = 0; i < num_prop_infos; i ++) {
- strcat (big_query, "(");
- strcat (big_query, prop_info[i].ldap_attr);
- strcat (big_query, match_str);
- }
- strcat (big_query, footer);
-
- *list = g_list_prepend(*list, big_query);
-
- g_free (match_str);
- g_free (header);
- g_free (footer);
- }
- else {
- char *ldap_attr = query_prop_to_ldap(propname);
-
- if (ldap_attr)
- *list = g_list_prepend(*list,
- g_strdup_printf("(%s=*%s%s)",
- ldap_attr,
- str,
- one_star ? "" : "*"));
- }
- }
-
- r = e_sexp_result_new(f, 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 = query_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(f, 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 = query_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(f, 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 = query_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(f, 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;i<sizeof(symbols)/sizeof(symbols[0]);i++) {
- if (symbols[i].type == 1) {
- e_sexp_add_ifunction(sexp, 0, symbols[i].name,
- (ESExpIFunc *)symbols[i].func, &list);
- } else {
- e_sexp_add_function(sexp, 0, symbols[i].name,
- symbols[i].func, &list);
- }
- }
-
- e_sexp_input_text(sexp, query, strlen(query));
- e_sexp_parse(sexp);
-
- r = e_sexp_eval(sexp);
-
- e_sexp_result_free(sexp, r);
- e_sexp_unref (sexp);
-
- if (list->next) {
- 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 gchar *
-query_prop_to_ldap(gchar *query_prop)
-{
- int i;
-
- for (i = 0; i < num_prop_infos; i ++)
- if (!strcmp (query_prop, prop_info[i].query_prop))
- return prop_info[i].ldap_attr;
-
- return NULL;
-}
-
-
-typedef struct {
- LDAPOp op;
- char *ldap_query;
- PASBackendLDAP *bl;
- PASBackendLDAPBookView *view;
-} LDAPSearchOp;
-
-static ECardSimple *
-build_card_from_entry (LDAP *ldap, LDAPMessage *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;
-
- g_print ("build_card_from_entry, dn = %s\n", dn);
- 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[i].ldap_attr))
- info = &prop_info[i];
-
- if (info) {
- char **values;
- values = ldap_get_values (ldap, e, attr);
-
- if (values) {
- if (info->prop_type & PROP_TYPE_STRING) {
- /* 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 ecard-populate function,
- which calls gtk_object_set to set the property */
- info->populate_ecard_func(card,
- values);
- }
-
- ldap_value_free (values);
- }
- }
- }
-
-#ifndef OPENLDAP2
- /* 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);
-#endif
-
- e_card_simple_sync_card (card);
-
- return card;
-}
-
-static gboolean
-poll_ldap (LDAPSearchOp *op)
-{
- PASBackendLDAPBookView *view = op->view;
- PASBackendLDAP *bl = op->bl;
- LDAP *ldap = bl->priv->ldap;
- int rc;
- LDAPMessage *res, *e;
- GList *cards = NULL;
- static int received = 0;
-
- pas_book_view_notify_status_message (view->book_view, "Polling for LDAP search result");
-
- rc = ldap_result (ldap, view->search_msgid, 0, NULL, &res);
-
- if (rc == -1 && received == 0) {
- pas_book_view_notify_status_message (view->book_view, "Restarting search");
- /* connection went down and we never got any. */
- bl->priv->connected = FALSE;
-
- /* this will reopen the connection */
- ldap_op_restart ((LDAPOp*)op);
- return FALSE;
- }
-
- if (rc != LDAP_RES_SEARCH_ENTRY) {
- view->search_idle = 0;
- pas_book_view_notify_complete (view->book_view);
- ldap_op_finished ((LDAPOp*)op);
- received = 0;
- pas_book_view_notify_status_message (view->book_view, "Search complete");
- return FALSE;
- }
-
- received = 1;
-
- e = ldap_first_entry(ldap, res);
-
- while (NULL != e) {
- ECardSimple *card = build_card_from_entry (ldap, e);
-
- 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 gboolean
-ldap_search_handler (PASBackend *backend, LDAPOp *op)
-{
- LDAPSearchOp *search_op = (LDAPSearchOp*) op;
-
- if (op->view)
- pas_book_view_notify_status_message (op->view, "Searching...");
-
- /* it might not be NULL if we've been restarted */
- if (search_op->ldap_query == NULL)
- search_op->ldap_query = pas_backend_ldap_build_query(search_op->view->search);
-
- if (search_op->ldap_query != NULL) {
- PASBackendLDAP *bl = PAS_BACKEND_LDAP (backend);
- PASBackendLDAPBookView *view = search_op->view;
- LDAP *ldap = bl->priv->ldap;
- int ldap_err;
-
- ldap_err = ldap_search_ext (ldap, bl->priv->ldap_rootdn,
- bl->priv->ldap_scope,
- search_op->ldap_query,
- NULL, 0,
- NULL, /* XXX */
- NULL, /* XXX */
- NULL,
- LDAP_MAX_SEARCH_RESPONSES, &view->search_msgid);
-
- if (ldap_err != LDAP_SUCCESS) {
- pas_book_view_notify_status_message (view->book_view, ldap_err2string(ldap_err));
- return TRUE; /* act synchronous in this case */
- }
-
- if (view->search_msgid == -1) {
- pas_book_view_notify_status_message (view->book_view, ldap_err2string(ldap_err));
- return TRUE; /* act synchronous in this case */
- }
- else {
- view->search_idle = g_idle_add((GSourceFunc)poll_ldap, search_op);
- }
-
- /* we're async */
- return FALSE;
- }
- else {
- /* error doing the conversion to an ldap query, let's
- end this now by acting like we're synchronous. */
- g_warning ("LDAP problem converting search query %s\n", search_op->view->search);
- return TRUE;
- }
-}
-
-static void
-ldap_search_dtor (PASBackend *backend, LDAPOp *op)
-{
- LDAPSearchOp *search_op = (LDAPSearchOp*) op;
-
- g_free (search_op->ldap_query);
- g_free (search_op);
-}
-
-static void
-pas_backend_ldap_search (PASBackendLDAP *bl,
- PASBook *book,
- PASBackendLDAPBookView *view)
-{
- LDAPSearchOp *op = g_new (LDAPSearchOp, 1);
-
- ldap_op_init ((LDAPOp*)op, PAS_BACKEND(bl), book, view->book_view, ldap_search_handler, ldap_search_dtor);
-
- op->ldap_query = NULL;
- op->view = view;
- op->bl = bl;
-
- /* keep track of the search op so we can delete it from the
- list if the view is destroyed */
- view->search_op = (LDAPOp*)op;
-
- ldap_op_process ((LDAPOp*)op);
-}
-
-static void
-pas_backend_ldap_process_get_book_view (PASBackend *backend,
- PASBook *book,
- PASRequest *req)
-{
- PASBackendLDAP *bl = PAS_BACKEND_LDAP (backend);
- CORBA_Environment ev;
- PASBookView *book_view;
- PASBackendLDAPBookView *view;
-
- g_return_if_fail (req->listener != NULL);
-
- book_view = pas_book_view_new (req->listener);
-
- bonobo_object_ref(BONOBO_OBJECT(book));
- gtk_signal_connect(GTK_OBJECT(book_view), "destroy",
- GTK_SIGNAL_FUNC(view_destroy), book);
-
- view = g_new0(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_book_respond_get_book_view (book,
- (book_view != NULL
- ? GNOME_Evolution_Addressbook_BookListener_Success
- : GNOME_Evolution_Addressbook_BookListener_CardNotFound /* XXX */),
- book_view);
-
- pas_backend_ldap_search (bl, book, view);
-
- g_free (req->search);
- CORBA_exception_init(&ev);
- bonobo_object_release_unref(req->listener, &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);
-
-}
-
-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 void
-pas_backend_ldap_process_authenticate_user (PASBackend *backend,
- PASBook *book,
- PASRequest *req)
-{
- PASBackendLDAP *bl = PAS_BACKEND_LDAP (backend);
- int ldap_error = ldap_simple_bind_s(bl->priv->ldap,
- req->user,
- req->passwd);
-
- pas_book_respond_authenticate_user (book,
- ldap_error_to_response (ldap_error));
-
- bl->priv->writable = (ldap_error == LDAP_SUCCESS);
- pas_book_report_writable (book, bl->priv->writable);
-
- if (!bl->priv->evolutionPersonChecked)
- check_schema_support (bl);
-}
-
-static void
-pas_backend_ldap_process_get_supported_fields (PASBackend *backend,
- PASBook *book,
- PASRequest *req)
-
-{
- PASBackendLDAP *bl = PAS_BACKEND_LDAP (backend);
-
- pas_book_respond_get_supported_fields (book,
- GNOME_Evolution_Addressbook_BookListener_Success,
- bl->priv->supported_fields);
-}
-
-static gboolean
-pas_backend_ldap_can_write (PASBook *book)
-{
- return TRUE; /* XXX */
-}
-
-static gboolean
-pas_backend_ldap_can_write_card (PASBook *book,
- const char *id)
-{
- return TRUE; /* 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;
-
- case GetChanges:
- /* FIXME: Code this. */
- break;
-
- case AuthenticateUser:
- pas_backend_ldap_process_authenticate_user (backend, book, req);
- break;
-
- case GetSupportedFields:
- pas_backend_ldap_process_get_supported_fields (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;
- int ldap_error = LDAP_SUCCESS; /* XXX */
-
- bl = PAS_BACKEND_LDAP (pas_book_get_backend (book));
-
- /* 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 LDAP_PORT */
- if (bl->priv->ldap_port == 0)
- bl->priv->ldap_port = LDAP_PORT;
- bl->priv->ldap_rootdn = g_strdup(lud->lud_dn);
- bl->priv->ldap_scope = lud->lud_scope;
-
- ldap_free_urldesc(lud);
-
- pas_backend_ldap_connect (bl);
- if (bl->priv->ldap == NULL)
- return FALSE;
- else
- 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,
- GNOME_Evolution_Addressbook_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, GNOME_Evolution_Addressbook_BookListener_Success);
- } else {
- /* Open the book. */
- pas_book_respond_open (
- book, GNOME_Evolution_Addressbook_BookListener_Success);
- }
-
- pas_book_report_writable (book, bl->priv->writable);
-
- 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 char *
-pas_backend_ldap_get_static_capabilites (PASBackend *backend)
-{
- return g_strdup("net");
-}
-
-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;
- }
-
- return PAS_BACKEND (backend);
-}
-
-static void
-call_dtor (LDAPOp *op, gpointer data)
-{
- op->dtor (op->backend, op);
-}
-
-static void
-pas_backend_ldap_destroy (GtkObject *object)
-{
- PASBackendLDAP *bl;
-
- bl = PAS_BACKEND_LDAP (object);
-
- g_list_foreach (bl->priv->pending_ops, (GFunc)call_dtor, NULL);
- g_list_free (bl->priv->pending_ops);
-
- if (bl->priv->supported_fields)
- gtk_object_unref (GTK_OBJECT (bl->priv->supported_fields));
-
- 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;
- parent_class->get_static_capabilities = pas_backend_ldap_get_static_capabilites;
-
- object_class->destroy = pas_backend_ldap_destroy;
-}
-
-static void
-pas_backend_ldap_init (PASBackendLDAP *backend)
-{
- PASBackendLDAPPrivate *priv;
-
- priv = g_new0 (PASBackendLDAPPrivate, 1);
-
- 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 <libgnome/gnome-defs.h>
-#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 22b7184813..0000000000
--- a/addressbook/backend/pas/pas-backend.c
+++ /dev/null
@@ -1,178 +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 <gtk/gtkobject.h>
-#include <gtk/gtksignal.h>
-#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,
- GNOME_Evolution_Addressbook_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);
-}
-
-char *
-pas_backend_get_static_capabilities (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_static_capabilities != NULL);
-
- return CLASS (backend)->get_static_capabilities (backend);
-}
-
-/**
- * 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);
-
- klass->add_client = NULL;
- klass->remove_client = NULL;
- klass->get_static_capabilities = NULL;
-}
-
-/**
- * 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 be08d48950..0000000000
--- a/addressbook/backend/pas/pas-backend.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * 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
- * GNOME_Evolution_Addressbook_Book interface.
- *
- * Author:
- * Nat Friedman (nat@helixcode.com)
- *
- * Copyright 2000, Helix Code, Inc.
- */
-
-#ifndef __PAS_BACKEND_H__
-#define __PAS_BACKEND_H__
-
-#include <libgnome/gnome-defs.h>
-#include <gtk/gtkobject.h>
-#include <pas/addressbook.h>
-
-typedef struct _PASBackend PASBackend;
-typedef struct _PASBackendPrivate PASBackendPrivate;
-
-#include <pas/pas-book.h>
-
-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, GNOME_Evolution_Addressbook_BookListener listener);
- void (*remove_client) (PASBackend *backend, PASBook *book);
- char *(*get_static_capabilities) (PASBackend *backend);
-
- /* 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,
- GNOME_Evolution_Addressbook_BookListener listener);
-void pas_backend_remove_client (PASBackend *backend,
- PASBook *book);
-char *pas_backend_get_static_capabilities (PASBackend *backend);
-
-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 052205b81d..0000000000
--- a/addressbook/backend/pas/pas-book-factory.c
+++ /dev/null
@@ -1,610 +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 <ctype.h>
-
-#include <gtk/gtksignal.h>
-#include <liboaf/liboaf.h>
-#include "addressbook.h"
-#include "pas-book-factory.h"
-
-#define PAS_BOOK_FACTORY_OAF_ID "OAFIID:GNOME_Evolution_Wombat_ServerFactory"
-
-static BonoboObjectClass *pas_book_factory_parent_class;
-POA_GNOME_Evolution_Addressbook_BookFactory__vepv pas_book_factory_vepv;
-
-typedef struct {
- char *uri;
- GNOME_Evolution_Addressbook_BookListener listener;
-} PASBookFactoryQueuedRequest;
-
-struct _PASBookFactoryPrivate {
- gint idle_id;
- GHashTable *backends;
- GHashTable *active_server_map;
- GList *queued_requests;
-
- /* Whether the factory has been registered with OAF yet */
- guint registered : 1;
-};
-
-/* 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,
- GNOME_Evolution_Addressbook_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);
- GNOME_Evolution_Addressbook_BookListener_notifyBookOpened (
- listener,
- GNOME_Evolution_Addressbook_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);
- GNOME_Evolution_Addressbook_BookListener_notifyBookOpened (
- listener,
- GNOME_Evolution_Addressbook_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;
- GNOME_Evolution_Addressbook_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 GNOME_Evolution_Addressbook_BookListener listener)
-{
- PASBookFactoryQueuedRequest *request;
- GNOME_Evolution_Addressbook_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_GNOME_Evolution_Addressbook_BookFactory_openBook (PortableServer_Servant servant,
- const CORBA_char *uri,
- const GNOME_Evolution_Addressbook_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) {
- GNOME_Evolution_Addressbook_BookListener_notifyBookOpened (
- listener,
- GNOME_Evolution_Addressbook_BookListener_ProtocolNotSupported,
- CORBA_OBJECT_NIL,
- ev);
-
- return;
- }
-
- pas_book_factory_queue_request (factory, uri, listener);
-}
-
-static gboolean
-pas_book_factory_construct (PASBookFactory *factory)
-{
- POA_GNOME_Evolution_Addressbook_BookFactory *servant;
- CORBA_Environment ev;
- CORBA_Object obj;
-
- g_assert (factory != NULL);
- g_assert (PAS_IS_BOOK_FACTORY (factory));
-
- servant = (POA_GNOME_Evolution_Addressbook_BookFactory *) g_new0 (BonoboObjectServant, 1);
- servant->vepv = &pas_book_factory_vepv;
-
- CORBA_exception_init (&ev);
-
- POA_GNOME_Evolution_Addressbook_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;
-}
-
-/**
- * pas_book_factory_activate:
- */
-gboolean
-pas_book_factory_activate (PASBookFactory *factory)
-{
- PASBookFactoryPrivate *priv;
- CORBA_Object obj;
- OAF_RegistrationResult result;
-
- g_return_val_if_fail (factory != NULL, FALSE);
- g_return_val_if_fail (PAS_IS_BOOK_FACTORY (factory), FALSE);
-
- priv = factory->priv;
-
- g_return_val_if_fail (!priv->registered, FALSE);
-
- puts ("about to register addressbook");
-
- obj = bonobo_object_corba_objref (BONOBO_OBJECT (factory));
-
- result = oaf_active_server_register (PAS_BOOK_FACTORY_OAF_ID, obj);
-
- switch (result) {
- case OAF_REG_SUCCESS:
- priv->registered = TRUE;
- 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;
- }
-}
-
-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;
- factory->priv->registered = FALSE;
-}
-
-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;
-
- if (factory->priv->registered) {
- CORBA_Object obj;
-
- obj = bonobo_object_corba_objref (BONOBO_OBJECT (factory));
- oaf_active_server_unregister (PAS_BOOK_FACTORY_OAF_ID, obj);
- factory->priv->registered = FALSE;
- }
-
- g_free (factory->priv);
-
- GTK_OBJECT_CLASS (pas_book_factory_parent_class)->destroy (object);
-}
-
-static POA_GNOME_Evolution_Addressbook_BookFactory__epv *
-pas_book_factory_get_epv (void)
-{
- POA_GNOME_Evolution_Addressbook_BookFactory__epv *epv;
-
- epv = g_new0 (POA_GNOME_Evolution_Addressbook_BookFactory__epv, 1);
-
- epv->openBook = impl_GNOME_Evolution_Addressbook_BookFactory_openBook;
-
- 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.GNOME_Evolution_Addressbook_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 7f8754ce2f..0000000000
--- a/addressbook/backend/pas/pas-book-factory.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright 2000, Helix Code, Inc.
- */
-
-#include <bonobo/bonobo-object.h>
-#include <libgnome/gnome-defs.h>
-
-#include <pas/pas-backend.h>
-
-#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);
-
-gboolean 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 58f2e79cda..0000000000
--- a/addressbook/backend/pas/pas-book-view.c
+++ /dev/null
@@ -1,315 +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 <config.h>
-#include <glib.h>
-#include "pas-book-view.h"
-
-static BonoboObjectClass *pas_book_view_parent_class;
-POA_GNOME_Evolution_Addressbook_BookView__vepv pas_book_view_vepv;
-
-struct _PASBookViewPrivate {
- GNOME_Evolution_Addressbook_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_GNOME_Evolution_Addressbook_VCard card_sequence;
-
- length = g_list_length((GList *) cards);
-
- card_sequence._buffer = CORBA_sequence_GNOME_Evolution_Addressbook_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);
-
- GNOME_Evolution_Addressbook_BookViewListener_notifyCardChanged (
- 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);
-
- GNOME_Evolution_Addressbook_BookViewListener_notifyCardRemoved (
- book_view->priv->listener, (GNOME_Evolution_Addressbook_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_GNOME_Evolution_Addressbook_VCard card_sequence;
-
- length = g_list_length((GList *)cards);
-
- card_sequence._buffer = CORBA_sequence_GNOME_Evolution_Addressbook_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);
-
- GNOME_Evolution_Addressbook_BookViewListener_notifyCardAdded (
- 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);
-}
-
-void
-pas_book_view_notify_complete (PASBookView *book_view)
-{
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
-
- GNOME_Evolution_Addressbook_BookViewListener_notifySequenceComplete (
- book_view->priv->listener, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("pas_book_view_notify_complete: Exception signaling BookViewListener!\n");
- }
-
- CORBA_exception_free (&ev);
-}
-
-void
-pas_book_view_notify_status_message (PASBookView *book_view,
- const char *message)
-{
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
-
- GNOME_Evolution_Addressbook_BookViewListener_notifyStatusMessage (
- book_view->priv->listener, message, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("pas_book_view_notify_status_message: Exception signaling BookViewListener!\n");
- }
-
- CORBA_exception_free (&ev);
-}
-
-static gboolean
-pas_book_view_construct (PASBookView *book_view,
- GNOME_Evolution_Addressbook_BookViewListener listener)
-{
- POA_GNOME_Evolution_Addressbook_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_GNOME_Evolution_Addressbook_BookView *) g_new0 (BonoboObjectServant, 1);
- servant->vepv = &pas_book_view_vepv;
-
- CORBA_exception_init (&ev);
-
- POA_GNOME_Evolution_Addressbook_BookView__init ((PortableServer_Servant) servant, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_free (servant);
- CORBA_exception_free (&ev);
-
- return FALSE;
- }
-
- bonobo_object_dup_ref (listener, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning("Unable to duplicate & ref listener object in pas-book-view.c\n");
- 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 (GNOME_Evolution_Addressbook_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);
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
- bonobo_object_release_unref (book_view->priv->listener, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- CORBA_exception_free (&ev);
-
- return;
- }
- CORBA_exception_free (&ev);
-
- g_free (book_view->priv);
-
- GTK_OBJECT_CLASS (pas_book_view_parent_class)->destroy (object);
-}
-
-static POA_GNOME_Evolution_Addressbook_BookView__epv *
-pas_book_view_get_epv (void)
-{
- POA_GNOME_Evolution_Addressbook_BookView__epv *epv;
-
- epv = g_new0 (POA_GNOME_Evolution_Addressbook_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.GNOME_Evolution_Addressbook_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 fb9e892dfd..0000000000
--- a/addressbook/backend/pas/pas-book-view.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * A wrapper object which exports the GNOME_Evolution_Addressbook_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 <bonobo/bonobo-object.h>
-#include <libgnome/gnome-defs.h>
-#include <pas/addressbook.h>
-
-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 (GNOME_Evolution_Addressbook_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);
-void pas_book_view_notify_complete (PASBookView *book_view);
-void pas_book_view_notify_status_message (PASBookView *book_view,
- const char *message);
-
-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 74e95a8ab3..0000000000
--- a/addressbook/backend/pas/pas-book.c
+++ /dev/null
@@ -1,884 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * pas-book.c
- *
- * Copyright 2000, Helix Code, Inc.
- */
-
-#include <config.h>
-#include <gtk/gtksignal.h>
-#include "e-util/e-list.h"
-#include "pas-book.h"
-
-static BonoboObjectClass *pas_book_parent_class;
-POA_GNOME_Evolution_Addressbook_Book__vepv pas_book_vepv;
-
-enum {
- REQUESTS_QUEUED,
- LAST_SIGNAL
-};
-
-static guint pas_book_signals [LAST_SIGNAL];
-
-struct _PASBookPrivate {
- PASBackend *backend;
- GNOME_Evolution_Addressbook_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_authenticate_user (PASBook *book,
- const char *user, const char *passwd)
-{
- PASRequest *req;
-
- req = g_new0 (PASRequest, 1);
- req->op = AuthenticateUser;
- req->user = g_strdup(user);
- req->passwd = g_strdup(passwd);
-
- pas_book_queue_request (book, req);
-}
-
-static void
-pas_book_queue_get_supported_fields (PASBook *book)
-{
- PASRequest *req;
-
- req = g_new0 (PASRequest, 1);
- req->op = GetSupportedFields;
-
- pas_book_queue_request (book, req);
-}
-
-
-static void
-pas_book_queue_get_book_view (PASBook *book, const GNOME_Evolution_Addressbook_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 = bonobo_object_dup_ref(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_get_changes (PASBook *book, const GNOME_Evolution_Addressbook_BookViewListener listener, const char *change_id)
-{
- PASRequest *req;
- CORBA_Environment ev;
-
- req = g_new0 (PASRequest, 1);
- req->op = GetChanges;
- req->change_id= g_strdup(change_id);
-
- CORBA_exception_init (&ev);
-
- req->listener = bonobo_object_dup_ref(listener, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("pas_book_queue_get_changes: 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_GNOME_Evolution_Addressbook_Book_getVCard (PortableServer_Servant servant,
- const GNOME_Evolution_Addressbook_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_GNOME_Evolution_Addressbook_Book_isWriteable (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_GNOME_Evolution_Addressbook_Book_isCardWriteable (PortableServer_Servant servant,
- const GNOME_Evolution_Addressbook_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_GNOME_Evolution_Addressbook_Book_authenticateUser (PortableServer_Servant servant,
- const char* user,
- const char* passwd,
- CORBA_Environment *ev)
-{
- PASBook *book = PAS_BOOK (bonobo_object_from_servant (servant));
-
- pas_book_queue_authenticate_user (book, user, passwd);
-}
-
-static void
-impl_GNOME_Evolution_Addressbook_Book_addCard (PortableServer_Servant servant,
- const GNOME_Evolution_Addressbook_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_GNOME_Evolution_Addressbook_Book_removeCard (PortableServer_Servant servant,
- const GNOME_Evolution_Addressbook_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_GNOME_Evolution_Addressbook_Book_modifyCard (PortableServer_Servant servant,
- const GNOME_Evolution_Addressbook_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_GNOME_Evolution_Addressbook_Book_getCursor (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_GNOME_Evolution_Addressbook_Book_getBookView (PortableServer_Servant servant,
- const GNOME_Evolution_Addressbook_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_GNOME_Evolution_Addressbook_Book_getChanges (PortableServer_Servant servant,
- const GNOME_Evolution_Addressbook_BookViewListener listener,
- const CORBA_char *change_id,
- CORBA_Environment *ev)
-{
- PASBook *book = PAS_BOOK (bonobo_object_from_servant (servant));
-
- pas_book_queue_get_changes (book, listener, change_id);
-}
-
-static void
-impl_GNOME_Evolution_Addressbook_Book_checkConnection (PortableServer_Servant servant,
- CORBA_Environment *ev)
-{
- PASBook *book = PAS_BOOK (bonobo_object_from_servant (servant));
-
- pas_book_queue_check_connection (book);
-}
-
-static char *
-impl_GNOME_Evolution_Addressbook_Book_getStaticCapabilities (PortableServer_Servant servant,
- CORBA_Environment *ev)
-{
- PASBook *book = PAS_BOOK (bonobo_object_from_servant (servant));
- char *temp;
- char *ret_val;
-
- temp = pas_backend_get_static_capabilities (book->priv->backend);
- ret_val = CORBA_string_dup(temp);
- g_free(temp);
- return ret_val;
-}
-
-static void
-impl_GNOME_Evolution_Addressbook_Book_getSupportedFields (PortableServer_Servant servant,
- CORBA_Environment *ev)
-{
- PASBook *book = PAS_BOOK (bonobo_object_from_servant (servant));
-
- pas_book_queue_get_supported_fields (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:
- */
-GNOME_Evolution_Addressbook_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,
- GNOME_Evolution_Addressbook_BookListener_CallStatus status)
-{
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
-
- if (status == GNOME_Evolution_Addressbook_BookListener_Success) {
- GNOME_Evolution_Addressbook_BookListener_notifyBookOpened (
- book->priv->listener, status,
- bonobo_object_corba_objref (BONOBO_OBJECT (book)),
- &ev);
- } else {
- GNOME_Evolution_Addressbook_BookListener_notifyBookOpened (
- 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,
- GNOME_Evolution_Addressbook_BookListener_CallStatus status,
- const char *id)
-{
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
-
- GNOME_Evolution_Addressbook_BookListener_notifyCardCreated (
- 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,
- GNOME_Evolution_Addressbook_BookListener_CallStatus status)
-{
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
-
- GNOME_Evolution_Addressbook_BookListener_notifyCardRemoved (
- 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,
- GNOME_Evolution_Addressbook_BookListener_CallStatus status)
-{
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
-
- GNOME_Evolution_Addressbook_BookListener_notifyCardModified (
- 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_authenticate_user:
- */
-void
-pas_book_respond_authenticate_user (PASBook *book,
- GNOME_Evolution_Addressbook_BookListener_CallStatus status)
-{
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
-
- GNOME_Evolution_Addressbook_BookListener_notifyAuthenticationResult (
- book->priv->listener, status, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("pas_book_respond_authenticate_user: Exception "
- "responding to BookListener!\n");
- }
-
- CORBA_exception_free (&ev);
-}
-
-void
-pas_book_respond_get_supported_fields (PASBook *book,
- GNOME_Evolution_Addressbook_BookListener_CallStatus status,
- EList *fields)
-{
- CORBA_Environment ev;
- GNOME_Evolution_Addressbook_stringlist stringlist;
- int num_fields;
- EIterator *iter;
- int i;
-
- CORBA_exception_init (&ev);
-
- num_fields = e_list_length (fields);
-
- stringlist._buffer = CORBA_sequence_CORBA_string_allocbuf (num_fields);
- stringlist._maximum = num_fields;
- stringlist._length = num_fields;
-
- iter = e_list_get_iterator (fields);
-
- for (i = 0; e_iterator_is_valid (iter); e_iterator_next (iter), i ++) {
- stringlist._buffer[i] = CORBA_string_dup (e_iterator_get(iter));
- }
-
- gtk_object_unref (GTK_OBJECT (fields));
-
- GNOME_Evolution_Addressbook_BookListener_notifySupportedFields (
- book->priv->listener, status,
- &stringlist,
- &ev);
-
- CORBA_exception_free (&ev);
-
- CORBA_free(stringlist._buffer);
-}
-
-/**
- * pas_book_respond_get_cursor:
- */
-void
-pas_book_respond_get_cursor (PASBook *book,
- GNOME_Evolution_Addressbook_BookListener_CallStatus status,
- PASCardCursor *cursor)
-{
- CORBA_Environment ev;
- CORBA_Object object;
-
- CORBA_exception_init (&ev);
-
- object = bonobo_object_corba_objref(BONOBO_OBJECT(cursor));
-
- GNOME_Evolution_Addressbook_BookListener_notifyCursorRequested (
- 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_book_view:
- */
-void
-pas_book_respond_get_book_view (PASBook *book,
- GNOME_Evolution_Addressbook_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));
-
- GNOME_Evolution_Addressbook_BookListener_notifyViewRequested (
- 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_respond_get_changes:
- */
-void
-pas_book_respond_get_changes (PASBook *book,
- GNOME_Evolution_Addressbook_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));
-
- GNOME_Evolution_Addressbook_BookListener_notifyChangesRequested (
- book->priv->listener, status, object, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("pas_book_respond_get_changes: 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);
-
- GNOME_Evolution_Addressbook_BookListener_notifyConnectionStatus (
- 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);
-}
-
-/**
- * pas_book_report_writable:
- */
-void
-pas_book_report_writable (PASBook *book,
- gboolean writable)
-{
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
-
- GNOME_Evolution_Addressbook_BookListener_notifyWritable (
- book->priv->listener, (CORBA_boolean) writable, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("pas_book_report_writable: Exception "
- "responding to BookListener!\n");
- }
-
- CORBA_exception_free (&ev);
-}
-
-static gboolean
-pas_book_construct (PASBook *book,
- PASBackend *backend,
- GNOME_Evolution_Addressbook_BookListener listener,
- PASBookGetVCardFn get_vcard,
- PASBookCanWriteFn can_write,
- PASBookCanWriteCardFn can_write_card)
-{
- POA_GNOME_Evolution_Addressbook_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_GNOME_Evolution_Addressbook_Book *) g_new0 (BonoboObjectServant, 1);
- servant->vepv = &pas_book_vepv;
-
- CORBA_exception_init (&ev);
-
- POA_GNOME_Evolution_Addressbook_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,
- GNOME_Evolution_Addressbook_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_GNOME_Evolution_Addressbook_Book__epv *
-pas_book_get_epv (void)
-{
- POA_GNOME_Evolution_Addressbook_Book__epv *epv;
-
- epv = g_new0 (POA_GNOME_Evolution_Addressbook_Book__epv, 1);
-
- epv->getVCard = impl_GNOME_Evolution_Addressbook_Book_getVCard;
- epv->isWriteable = impl_GNOME_Evolution_Addressbook_Book_isWriteable;
- epv->isCardWriteable = impl_GNOME_Evolution_Addressbook_Book_isCardWriteable;
- epv->authenticateUser = impl_GNOME_Evolution_Addressbook_Book_authenticateUser;
- epv->addCard = impl_GNOME_Evolution_Addressbook_Book_addCard;
- epv->removeCard = impl_GNOME_Evolution_Addressbook_Book_removeCard;
- epv->modifyCard = impl_GNOME_Evolution_Addressbook_Book_modifyCard;
- epv->checkConnection = impl_GNOME_Evolution_Addressbook_Book_checkConnection;
- epv->getStaticCapabilities = impl_GNOME_Evolution_Addressbook_Book_getStaticCapabilities;
- epv->getSupportedFields = impl_GNOME_Evolution_Addressbook_Book_getSupportedFields;
- epv->getCursor = impl_GNOME_Evolution_Addressbook_Book_getCursor;
- epv->getBookView = impl_GNOME_Evolution_Addressbook_Book_getBookView;
- epv->getChanges = impl_GNOME_Evolution_Addressbook_Book_getChanges;
-
- return epv;
-
-}
-
-static void
-pas_book_corba_class_init (void)
-{
- pas_book_vepv.Bonobo_Unknown_epv = bonobo_object_get_epv ();
- pas_book_vepv.GNOME_Evolution_Addressbook_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 12c780e282..0000000000
--- a/addressbook/backend/pas/pas-book.h
+++ /dev/null
@@ -1,117 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * A wrapper object which exports the GNOME_Evolution_Addressbook_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 <bonobo/bonobo-object.h>
-#include <libgnome/gnome-defs.h>
-#include <pas/addressbook.h>
-#include <pas/pas-book-view.h>
-#include "e-util/e-list.h"
-
-typedef struct _PASBook PASBook;
-typedef struct _PASBookPrivate PASBookPrivate;
-
-#include <pas/pas-backend.h>
-#include <pas/pas-card-cursor.h>
-
-typedef enum {
- CreateCard,
- RemoveCard,
- ModifyCard,
- GetCursor,
- GetBookView,
- GetChanges,
- CheckConnection,
- AuthenticateUser,
- GetSupportedFields
-} PASOperation;
-
-typedef struct {
- PASOperation op;
- char *id;
- char *vcard;
- char *search;
- char *change_id;
- char *user;
- char *passwd;
- GNOME_Evolution_Addressbook_BookViewListener listener;
- GNOME_Evolution_Addressbook_stringlist fields;
-} 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,
- GNOME_Evolution_Addressbook_BookListener listener,
- PASBookGetVCardFn get_vcard,
- PASBookCanWriteFn can_write,
- PASBookCanWriteCardFn can_write_card);
-PASBackend *pas_book_get_backend (PASBook *book);
-GNOME_Evolution_Addressbook_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,
- GNOME_Evolution_Addressbook_BookListener_CallStatus status);
-void pas_book_respond_create (PASBook *book,
- GNOME_Evolution_Addressbook_BookListener_CallStatus status,
- const char *id);
-void pas_book_respond_remove (PASBook *book,
- GNOME_Evolution_Addressbook_BookListener_CallStatus status);
-void pas_book_respond_modify (PASBook *book,
- GNOME_Evolution_Addressbook_BookListener_CallStatus status);
-void pas_book_respond_authenticate_user (PASBook *book,
- GNOME_Evolution_Addressbook_BookListener_CallStatus status);
-void pas_book_respond_get_supported_fields (PASBook *book,
- GNOME_Evolution_Addressbook_BookListener_CallStatus status,
- EList *fields);
-
-void pas_book_respond_get_cursor (PASBook *book,
- GNOME_Evolution_Addressbook_BookListener_CallStatus status,
- PASCardCursor *cursor);
-void pas_book_respond_get_book_view (PASBook *book,
- GNOME_Evolution_Addressbook_BookListener_CallStatus status,
- PASBookView *book_view);
-void pas_book_respond_get_changes (PASBook *book,
- GNOME_Evolution_Addressbook_BookListener_CallStatus status,
- PASBookView *book_view);
-void pas_book_report_connection (PASBook *book,
- gboolean connected);
-
-void pas_book_report_writable (PASBook *book,
- gboolean writable);
-
-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 aeb1eddd48..0000000000
--- a/addressbook/backend/pas/pas-card-cursor.c
+++ /dev/null
@@ -1,226 +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 <clahey@helixcode.com.
- */
-
-#include <config.h>
-#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_GNOME_Evolution_Addressbook_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_GNOME_Evolution_Addressbook_CardCursor__epv *
-pas_card_cursor_get_epv (void)
-{
- POA_GNOME_Evolution_Addressbook_CardCursor__epv *epv;
-
- epv = g_new0 (POA_GNOME_Evolution_Addressbook_CardCursor__epv, 1);
-
- /*
- * This is the method invoked by CORBA
- */
- epv->count = impl_pas_card_cursor_get_length;
- epv->getNth = 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.GNOME_Evolution_Addressbook_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,
- GNOME_Evolution_Addressbook_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 GNOME_Evolution_Addressbook_CardCursor
-create_cursor (BonoboObject *cursor)
-{
- POA_GNOME_Evolution_Addressbook_CardCursor *servant;
- CORBA_Environment ev;
-
- servant = (POA_GNOME_Evolution_Addressbook_CardCursor *) g_new0 (BonoboObjectServant, 1);
- servant->vepv = &cursor_vepv;
-
- CORBA_exception_init (&ev);
- POA_GNOME_Evolution_Addressbook_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 (GNOME_Evolution_Addressbook_CardCursor) bonobo_object_activate_servant (cursor, servant);
-}
-
-PASCardCursor *
-pas_card_cursor_new (PASCardCursorLengthFunc get_length,
- PASCardCursorNthFunc get_nth,
- gpointer data)
-{
- PASCardCursor *cursor;
- GNOME_Evolution_Addressbook_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 d7d19ecebd..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 <libgnome/gnome-defs.h>
-#include <bonobo/bonobo-object.h>
-#include <pas/addressbook.h>
-
-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,
- GNOME_Evolution_Addressbook_CardCursor corba_cursor,
- PASCardCursorLengthFunc get_length,
- PASCardCursorNthFunc get_nth,
- gpointer data);
-
-GtkType pas_card_cursor_get_type (void);
-POA_GNOME_Evolution_Addressbook_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/conduit/.cvsignore b/addressbook/conduit/.cvsignore
deleted file mode 100644
index 87b35d3be5..0000000000
--- a/addressbook/conduit/.cvsignore
+++ /dev/null
@@ -1,9 +0,0 @@
-.deps
-.libs
-*.lo
-Makefile.in
-Makefile
-libeaddress_conduit.la
-e-address-conduit-control-applet
-e-address-conduit-control-applet.desktop
-e-address.conduit
diff --git a/addressbook/conduit/Makefile.am b/addressbook/conduit/Makefile.am
deleted file mode 100644
index ab5ea0ec50..0000000000
--- a/addressbook/conduit/Makefile.am
+++ /dev/null
@@ -1,47 +0,0 @@
-INCLUDES = \
- -I$(top_srcdir) \
- -I$(top_srcdir)/addressbook \
- -I$(top_srcdir)/addressbook/backend \
- -I$(top_builddir)/e-util \
- $(BONOBO_GNOME_CFLAGS) \
- $(PISOCK_CFLAGS) \
- $(GNOME_PILOT_CFLAGS)
-
-# Address Conduit
-e_address_conduitsdir=$(libdir)/gnome-pilot/conduits
-e_address_conduits_LTLIBRARIES = libeaddress_conduit.la
-
-libeaddress_conduit_la_SOURCES = \
- address-conduit.c \
- address-conduit.h \
- address-conduit-config.h
-
-libeaddress_conduit_la_LDFLAGS = -module -avoid-version
-libeaddress_conduit_la_LIBADD = \
- $(top_builddir)/addressbook/backend/ebook/libebook-static.la \
- $(top_builddir)/e-util/libeutil-static.la \
- $(top_builddir)/e-util/ename/libename-static.la \
- $(top_builddir)/libversit/libversit.la \
- $(top_builddir)/e-util/libeconduit-static.la \
- $(GNOME_PILOT_LIBS) \
- $(PISOCK_LIBS) \
- $(BONOBO_GNOME_LIBS) \
- $(EXTRA_GNOME_LIBS) \
- $(GNOME_LIBDIR) \
- $(GNOME_LIBS)
-
-e-address.conduit: e-address.conduit.in Makefile
- sed -e 's^\@prefix\@^$(prefix)^g' \
- -e 's^\@datadir\@^$(datadir)^g' \
- < $(srcdir)/e-address.conduit.in > e-address.conduit.tmp \
- && mv e-address.conduit.tmp e-address.conduit
-
-
-Conduitdir = $(datadir)/gnome-pilot/conduits/
-Conduit_DATA = e-address.conduit
-
-EXTRA_DIST = \
- e-address.conduit.in
-
-install-data-local:
- $(mkinstalldirs) $(Conduitdir)
diff --git a/addressbook/conduit/address-conduit-config.h b/addressbook/conduit/address-conduit-config.h
deleted file mode 100644
index d0981af6bf..0000000000
--- a/addressbook/conduit/address-conduit-config.h
+++ /dev/null
@@ -1,121 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* Evolution calendar - ToDo Conduit Configuration
- *
- * Copyright (C) 1998 Free Software Foundation
- * Copyright (C) 2000 Helix Code, Inc.
- *
- * Authors: Eskil Heyn Olsen <deity@eskil.dk>
- * JP Rosevear <jpr@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 __ADDR_CONDUIT_CONFIG_H__
-#define __ADDR_CONDUIT_CONFIG_H__
-
-#include <gnome.h>
-#include <libgpilotdCM/gnome-pilot-conduit-management.h>
-#include <gpilotd/gnome-pilot-conduit.h>
-#include <libgpilotdCM/gnome-pilot-conduit-config.h>
-
-/* Configuration info */
-typedef struct _EAddrConduitCfg EAddrConduitCfg;
-struct _EAddrConduitCfg {
- gboolean open_secret;
- guint32 pilot_id;
- GnomePilotConduitSyncType sync_type; /* only used by capplet */
-};
-
-#ifdef ADDR_CONFIG_LOAD
-/* Loads the configuration data */
-static void
-addrconduit_load_configuration (EAddrConduitCfg **c, guint32 pilot_id)
-{
- gchar prefix[256];
- g_snprintf (prefix, 255, "/gnome-pilot.d/e-todo-conduit/Pilot_%u/",
- pilot_id);
-
- *c = g_new0 (EAddrConduitCfg,1);
- g_assert (*c != NULL);
-
- gnome_config_push_prefix (prefix);
- (*c)->open_secret = gnome_config_get_bool ("open_secret=FALSE");
-
- /* set in capplets main */
- (*c)->sync_type = GnomePilotConduitSyncTypeCustom;
- gnome_config_pop_prefix ();
-
- (*c)->pilot_id = pilot_id;
-}
-#endif
-
-#ifdef ADDR_CONFIG_SAVE
-/* Saves the configuration data. */
-static void
-addrconduit_save_configuration (EAddrConduitCfg *c)
-{
- gchar prefix[256];
-
- g_snprintf (prefix, 255, "/gnome-pilot.d/e-todo-conduit/Pilot_%u/",
- c->pilot_id);
-
- 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 ();
-}
-#endif
-
-#ifdef ADDR_CONFIG_DUPE
-/* Creates a duplicate of the configuration data */
-static EAddrConduitCfg*
-addrconduit_dupe_configuration (EAddrConduitCfg *c)
-{
- EAddrConduitCfg *retval;
-
- g_return_val_if_fail (c != NULL, NULL);
-
- retval = g_new0 (EAddrConduitCfg, 1);
- retval->sync_type = c->sync_type;
- retval->open_secret = c->open_secret;
- retval->pilot_id = c->pilot_id;
-
- return retval;
-}
-#endif
-
-#ifdef ADDR_CONFIG_DESTROY
-/* Destroy a configuration */
-static void
-addrconduit_destroy_configuration (EAddrConduitCfg **c)
-{
- g_return_if_fail (c != NULL);
- g_return_if_fail (*c != NULL);
-
- g_free (*c);
- *c = NULL;
-}
-#endif
-
-#endif __ADDR_CONDUIT_CONFIG_H__
-
-
-
-
-
-
-
diff --git a/addressbook/conduit/address-conduit.c b/addressbook/conduit/address-conduit.c
deleted file mode 100644
index 428584b9c4..0000000000
--- a/addressbook/conduit/address-conduit.c
+++ /dev/null
@@ -1,1140 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* Evolution addressbook - Address Conduit
- *
- * Copyright (C) 1998 Free Software Foundation
- * Copyright (C) 2000 Helix Code, Inc.
- *
- * Authors: Eskil Heyn Olsen <deity@eskil.dk>
- * JP Rosevear <jpr@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 <liboaf/liboaf.h>
-#include <bonobo.h>
-#include <gnome-xml/parser.h>
-#include <pi-source.h>
-#include <pi-socket.h>
-#include <pi-file.h>
-#include <pi-dlp.h>
-#include <ebook/e-book.h>
-#include <ebook/e-card-types.h>
-#include <ebook/e-card-cursor.h>
-#include <ebook/e-card.h>
-#include <ebook/e-card-simple.h>
-#include <e-pilot-util.h>
-
-#define ADDR_CONFIG_LOAD 1
-#define ADDR_CONFIG_DESTROY 1
-#include "address-conduit-config.h"
-#undef ADDR_CONFIG_LOAD
-#undef ADDR_CONFIG_DESTROY
-
-#include "address-conduit.h"
-
-GnomePilotConduit * conduit_get_gpilot_conduit (guint32);
-void conduit_destroy_gpilot_conduit (GnomePilotConduit*);
-
-#define CONDUIT_VERSION "0.1.1"
-#ifdef G_LOG_DOMAIN
-#undef G_LOG_DOMAIN
-#endif
-#define G_LOG_DOMAIN "eaddrconduit"
-
-#define DEBUG_CONDUIT 1
-/* #undef DEBUG_CONDUIT */
-
-#ifdef DEBUG_CONDUIT
-#define LOG(e...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, e)
-#else
-#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)
-
-typedef struct {
- EBookStatus status;
- char *id;
-} CardObjectChangeStatus;
-
-typedef enum {
- CARD_ADDED,
- CARD_MODIFIED,
- CARD_DELETED
-} CardObjectChangeType;
-
-typedef struct
-{
- ECard *card;
- CardObjectChangeType type;
-} CardObjectChange;
-
-/* Debug routines */
-static char *
-print_local (EAddrLocalRecord *local)
-{
- static char buff[ 4096 ];
-
- if (local == NULL) {
- sprintf (buff, "[NULL]");
- return buff;
- }
-
- if (local->addr) {
- g_snprintf (buff, 4096, "['%s' '%s' '%s']",
- local->addr->entry[entryLastname] ?
- local->addr->entry[entryLastname] : "",
- local->addr->entry[entryFirstname] ?
- local->addr->entry[entryFirstname] : "",
- local->addr->entry[entryCompany] ?
- local->addr->entry[entryCompany] : "");
- return buff;
- }
-
- return "";
-}
-
-static char *print_remote (GnomePilotRecord *remote)
-{
- static char buff[ 4096 ];
- struct Address addr;
-
- if (remote == NULL) {
- sprintf (buff, "[NULL]");
- return buff;
- }
-
- memset (&addr, 0, sizeof (struct Address));
- unpack_Address (&addr, remote->record, remote->length);
-
- g_snprintf (buff, 4096, "['%s' '%s' '%s']",
- addr.entry[entryLastname] ?
- addr.entry[entryLastname] : "",
- addr.entry[entryFirstname] ?
- addr.entry[entryFirstname] : "",
- addr.entry[entryCompany] ?
- addr.entry[entryCompany] : "");
-
- return buff;
-}
-
-/* Context Routines */
-static void
-e_addr_context_new (EAddrConduitContext **ctxt, guint32 pilot_id)
-{
- *ctxt = g_new0 (EAddrConduitContext,1);
- g_assert (ctxt!=NULL);
-
- addrconduit_load_configuration (&(*ctxt)->cfg, pilot_id);
-}
-
-static void
-e_addr_context_destroy (EAddrConduitContext **ctxt)
-{
- g_return_if_fail (ctxt!=NULL);
- g_return_if_fail (*ctxt!=NULL);
-
- if ((*ctxt)->cfg != NULL)
- addrconduit_destroy_configuration (&(*ctxt)->cfg);
-
- g_free (*ctxt);
- *ctxt = NULL;
-}
-
-/* Addressbok Server routines */
-static void
-add_card_cb (EBook *ebook, EBookStatus status, const char *id, gpointer closure)
-{
- CardObjectChangeStatus *cons = closure;
-
- cons->status = status;
- cons->id = g_strdup (id);
-
- gtk_main_quit();
-}
-
-static void
-status_cb (EBook *ebook, EBookStatus status, gpointer closure)
-{
- (*(EBookStatus*)closure) = status;
- gtk_main_quit();
-}
-
-static void
-cursor_cb (EBook *book, EBookStatus status, ECardCursor *cursor, gpointer closure)
-{
- EAddrConduitContext *ctxt = (EAddrConduitContext*)closure;
-
- if (status == E_BOOK_STATUS_SUCCESS) {
- long length;
- int i;
-
- ctxt->address_load_success = TRUE;
-
- length = e_card_cursor_get_length (cursor);
- ctxt->cards = NULL;
- for (i = 0; i < length; i ++) {
- ECard *card = e_card_cursor_get_nth (cursor, i);
-
- gtk_object_ref (GTK_OBJECT (card));
- ctxt->cards = g_list_append (ctxt->cards, card);
- }
-
- gtk_main_quit(); /* end the sub event loop */
- }
- else {
- WARN (_("Cursor could not be loaded\n"));
- gtk_main_quit(); /* end the sub event loop */
- }
-}
-
-static void
-book_open_cb (EBook *book, EBookStatus status, gpointer closure)
-{
- EAddrConduitContext *ctxt = (EAddrConduitContext*)closure;
-
- if (status == E_BOOK_STATUS_SUCCESS) {
- e_book_get_cursor (book, "(contains \"full_name\" \"\")", cursor_cb, ctxt);
- } else {
- WARN (_("EBook not loaded\n"));
- gtk_main_quit(); /* end the sub event loop */
- }
-}
-
-static int
-start_addressbook_server (EAddrConduitContext *ctxt)
-{
- gchar *uri, *path;
-
- g_return_val_if_fail(ctxt!=NULL,-2);
-
- ctxt->ebook = e_book_new ();
-
- path = g_concat_dir_and_file (g_get_home_dir (),
- "evolution/local/Contacts/addressbook.db");
- uri = g_strdup_printf ("file://%s", path);
- g_free (path);
-
- e_book_load_uri (ctxt->ebook, uri, book_open_cb, ctxt);
-
- /* run a sub event loop to turn ebook's async loading into a
- synchronous call */
- gtk_main ();
-
- g_free (uri);
-
- if (ctxt->address_load_success)
- return 0;
-
- return -1;
-}
-
-/* Utility routines */
-static char *
-map_name (EAddrConduitContext *ctxt)
-{
- char *filename = NULL;
-
- filename = g_strdup_printf ("%s/evolution/local/Contacts/pilot-map-%d.xml", g_get_home_dir (), ctxt->cfg->pilot_id);
-
- return filename;
-}
-
-static GList *
-next_changed_item (EAddrConduitContext *ctxt, GList *changes)
-{
- CardObjectChange *coc;
- GList *l;
-
- for (l = changes; l != NULL; l = l->next) {
- coc = l->data;
-
- if (g_hash_table_lookup (ctxt->changed_hash, e_card_get_id (coc->card)))
- return l;
- }
-
- return NULL;
-}
-
-static char *
-get_entry_text (struct Address address, int field)
-{
- if (address.entry[field])
- return e_pilot_utf8_from_pchar (address.entry[field]);
-
- return g_strdup ("");
-}
-
-static void
-compute_status (EAddrConduitContext *ctxt, EAddrLocalRecord *local, const char *uid)
-{
- CardObjectChange *coc;
-
- local->local.archived = FALSE;
- local->local.secret = FALSE;
-
- coc = g_hash_table_lookup (ctxt->changed_hash, uid);
-
- if (coc == NULL) {
- local->local.attr = GnomePilotRecordNothing;
- return;
- }
-
- switch (coc->type) {
- case CARD_ADDED:
- local->local.attr = GnomePilotRecordNew;
- break;
- case CARD_MODIFIED:
- local->local.attr = GnomePilotRecordModified;
- break;
- case CARD_DELETED:
- local->local.attr = GnomePilotRecordDeleted;
- break;
- }
-}
-
-static GnomePilotRecord
-local_record_to_pilot_record (EAddrLocalRecord *local,
- EAddrConduitContext *ctxt)
-{
- GnomePilotRecord p;
-
- g_assert (local->addr != NULL );
-
- LOG ("local_record_to_pilot_record\n");
-
- p.ID = local->local.ID;
- p.category = 0;
- p.attr = local->local.attr;
- p.archived = local->local.archived;
- p.secret = local->local.secret;
-
- /* Generate pilot record structure */
- p.record = g_new0 (char,0xffff);
- p.length = pack_Address (local->addr, p.record, 0xffff);
-
- return p;
-}
-
-static void
-local_record_from_ecard (EAddrLocalRecord *local, ECard *ecard, EAddrConduitContext *ctxt)
-{
- ECardSimple *simple;
- const ECardDeliveryAddress *delivery;
- int phone = entryPhone1;
- int i;
-
- g_return_if_fail (local != NULL);
- g_return_if_fail (ecard != NULL);
-
- local->ecard = ecard;
- gtk_object_ref (GTK_OBJECT (ecard));
- simple = e_card_simple_new (ecard);
-
- local->local.ID = e_pilot_map_lookup_pid (ctxt->map, ecard->id);
-
- compute_status (ctxt, local, ecard->id);
-
- local->addr = g_new0 (struct Address, 1);
-
- if (ecard->name) {
- if (ecard->name->given)
- local->addr->entry[entryFirstname] = e_pilot_utf8_to_pchar (ecard->name->given);
- if (ecard->name->family)
- local->addr->entry[entryLastname] = e_pilot_utf8_to_pchar (ecard->name->family);
- if (ecard->org)
- local->addr->entry[entryCompany] = e_pilot_utf8_to_pchar (ecard->org);
- if (ecard->title)
- local->addr->entry[entryTitle] = e_pilot_utf8_to_pchar (ecard->title);
- }
-
- delivery = e_card_simple_get_delivery_address (simple, E_CARD_SIMPLE_ADDRESS_ID_BUSINESS);
- if (delivery) {
- local->addr->entry[entryAddress] = e_pilot_utf8_to_pchar (delivery->street);
- local->addr->entry[entryCity] = e_pilot_utf8_to_pchar (delivery->city);
- local->addr->entry[entryState] = e_pilot_utf8_to_pchar (delivery->region);
- local->addr->entry[entryZip] = e_pilot_utf8_to_pchar (delivery->code);
- local->addr->entry[entryCountry] = e_pilot_utf8_to_pchar (delivery->country);
- }
-
- for (i = 0; i <= 7 && phone <= entryPhone5; i++) {
- const char *phone_str = NULL;
- char *phonelabel = ctxt->ai.phoneLabels[i];
-
- if (!strcmp (phonelabel, "E-mail"))
- phone_str = e_card_simple_get_const (simple, E_CARD_SIMPLE_FIELD_EMAIL);
- else if (!strcmp (phonelabel, "Home"))
- phone_str = e_card_simple_get_const (simple, E_CARD_SIMPLE_FIELD_PHONE_HOME);
- else if (!strcmp (phonelabel, "Work"))
- phone_str = e_card_simple_get_const (simple, E_CARD_SIMPLE_FIELD_PHONE_BUSINESS);
- else if (!strcmp (phonelabel, "Fax"))
- phone_str = e_card_simple_get_const (simple, E_CARD_SIMPLE_FIELD_PHONE_BUSINESS_FAX);
- else if (!strcmp (phonelabel, "Other"))
- phone_str = e_card_simple_get_const (simple, E_CARD_SIMPLE_FIELD_PHONE_OTHER);
- else if (!strcmp (phonelabel, "Main"))
- phone_str = e_card_simple_get_const (simple, E_CARD_SIMPLE_FIELD_PHONE_PRIMARY);
- else if (!strcmp (phonelabel, "Pager"))
- phone_str = e_card_simple_get_const (simple, E_CARD_SIMPLE_FIELD_PHONE_PAGER);
- else if (!strcmp (phonelabel, "Mobile"))
- phone_str = e_card_simple_get_const (simple, E_CARD_SIMPLE_FIELD_PHONE_MOBILE);
-
- if (phone_str) {
- local->addr->entry[phone] = e_pilot_utf8_to_pchar (phone_str);
- local->addr->phoneLabel[phone - entryPhone1] = i;
- phone++;
- }
- }
- for (; phone <= entryPhone5; phone++)
- local->addr->phoneLabel[phone - entryPhone1] = phone - entryPhone1;
-
- gtk_object_unref (GTK_OBJECT (simple));
-}
-
-static void
-local_record_from_uid (EAddrLocalRecord *local,
- char *uid,
- EAddrConduitContext *ctxt)
-{
- ECard *ecard = NULL;
-
- g_assert (local != NULL);
-
- ecard = e_book_get_card (ctxt->ebook, uid);
-
- if (ecard != NULL) {
- local_record_from_ecard (local, ecard, ctxt);
- } else {
- ecard = e_card_new ("");
- e_card_set_id (ecard, uid);
- local_record_from_ecard (local, ecard, ctxt);
- }
-}
-
-static ECard *
-ecard_from_remote_record(EAddrConduitContext *ctxt,
- GnomePilotRecord *remote,
- ECard *in_card)
-{
- struct Address address;
- ECard *ecard;
- ECardSimple *simple;
- ECardDeliveryAddress delivery;
- ECardAddrLabel label;
- char *string;
- char *stringparts[3];
- int i;
-
- g_return_val_if_fail(remote!=NULL,NULL);
- memset (&address, 0, sizeof (struct Address));
- unpack_Address (&address, remote->record, remote->length);
-
- if (in_card == NULL)
- ecard = e_card_new("");
- else
- ecard = e_card_duplicate (in_card);
- simple = e_card_simple_new (ecard);
-
- /* Name and company */
- i = 0;
- if (address.entry[entryFirstname] && *address.entry[entryFirstname])
- stringparts[i++] = address.entry[entryFirstname];
- if (address.entry[entryLastname] && *address.entry[entryLastname])
- stringparts[i++] = address.entry[entryLastname];
- stringparts[i] = NULL;
-
- string = g_strjoinv(" ", stringparts);
- e_card_simple_set(simple, E_CARD_SIMPLE_FIELD_FULL_NAME, e_pilot_utf8_from_pchar (string));
- g_free(string);
-
- if (address.entry[entryTitle]) {
- char *txt = get_entry_text (address, entryTitle);
- e_card_simple_set(simple, E_CARD_SIMPLE_FIELD_TITLE, txt);
- g_free (txt);
- }
-
- if (address.entry[entryCompany]) {
- char *txt = get_entry_text (address, entryCompany);
- e_card_simple_set(simple, E_CARD_SIMPLE_FIELD_ORG, txt);
- g_free (txt);
- }
-
- /* Address */
- memset (&delivery, 0, sizeof (ECardDeliveryAddress));
- delivery.flags = E_CARD_ADDR_WORK;
- if (address.entry[entryAddress])
- delivery.street = get_entry_text (address, entryAddress);
- if (address.entry[entryCity])
- delivery.city = get_entry_text (address, entryCity);
- if (address.entry[entryState])
- delivery.region = get_entry_text (address, entryState);
- if (address.entry[entryCountry])
- delivery.country = get_entry_text (address, entryCountry);
- if (address.entry[entryZip])
- delivery.code = get_entry_text (address, entryZip);
-
- label.flags = E_CARD_ADDR_WORK;
- label.data = e_card_delivery_address_to_string (&delivery);
-
- e_card_simple_set_address (simple, E_CARD_SIMPLE_ADDRESS_ID_BUSINESS, &label);
- e_card_simple_set_delivery_address (simple, E_CARD_SIMPLE_ADDRESS_ID_BUSINESS, &delivery);
-
- free (delivery.street);
- free (delivery.city);
- free (delivery.region);
- free (delivery.country);
- free (delivery.code);
- g_free (label.data);
-
- /* Phone numbers */
- for (i = entryPhone1; i <= entryPhone5; i++) {
- char *phonelabel = ctxt->ai.phoneLabels[address.phoneLabel[i - entryPhone1]];
- char *phonenum = get_entry_text (address, i);
-
- if (!strcmp (phonelabel, "E-mail"))
- e_card_simple_set(simple, E_CARD_SIMPLE_FIELD_EMAIL, phonenum);
- else if (!strcmp (phonelabel, "Home"))
- e_card_simple_set(simple, E_CARD_SIMPLE_FIELD_PHONE_HOME, phonenum);
- else if (!strcmp (phonelabel, "Work"))
- e_card_simple_set(simple, E_CARD_SIMPLE_FIELD_PHONE_BUSINESS, phonenum);
- else if (!strcmp (phonelabel, "Fax"))
- e_card_simple_set(simple, E_CARD_SIMPLE_FIELD_PHONE_BUSINESS_FAX, phonenum);
- else if (!strcmp (phonelabel, "Other"))
- e_card_simple_set(simple, E_CARD_SIMPLE_FIELD_PHONE_OTHER, phonenum);
- else if (!strcmp (phonelabel, "Main"))
- e_card_simple_set(simple, E_CARD_SIMPLE_FIELD_PHONE_PRIMARY, phonenum);
- else if (!strcmp (phonelabel, "Pager"))
- e_card_simple_set(simple, E_CARD_SIMPLE_FIELD_PHONE_PAGER, phonenum);
- else if (!strcmp (phonelabel, "Mobile"))
- e_card_simple_set(simple, E_CARD_SIMPLE_FIELD_PHONE_MOBILE, phonenum);
-
- g_free (phonenum);
- }
-
- e_card_simple_sync_card (simple);
- gtk_object_unref(GTK_OBJECT(simple));
-
- free_Address(&address);
-
- return ecard;
-}
-
-static void
-check_for_slow_setting (GnomePilotConduit *c, EAddrConduitContext *ctxt)
-{
- int count, map_count;
-
- count = g_list_length (ctxt->cards);
- map_count = g_hash_table_size (ctxt->map->pid_map);
-
- if (map_count == 0) {
- GnomePilotConduitStandard *conduit;
- LOG (" doing slow sync\n");
- conduit = GNOME_PILOT_CONDUIT_STANDARD (c);
- gnome_pilot_conduit_standard_set_slow (conduit);
- } else {
- LOG (" doing fast sync\n");
- }
-}
-
-static void
-card_added (EBookView *book_view, const GList *cards, EAddrConduitContext *ctxt)
-{
- const GList *l;
-
- for (l = cards; l != NULL; l = l->next) {
- CardObjectChange *coc = g_new0 (CardObjectChange, 1);
-
- coc->card = E_CARD (l->data);
- coc->type = CARD_ADDED;
-
- gtk_object_ref (GTK_OBJECT (coc->card));
- ctxt->changed = g_list_prepend (ctxt->changed, coc);
- if (!e_pilot_map_uid_is_archived (ctxt->map, e_card_get_id (coc->card)))
- g_hash_table_insert (ctxt->changed_hash, e_card_get_id (coc->card), coc);
- }
-}
-
-static void
-card_changed (EBookView *book_view, const GList *cards, EAddrConduitContext *ctxt)
-{
- const GList *l;
-
- for (l = cards; l != NULL; l = l->next) {
- CardObjectChange *coc = g_new0 (CardObjectChange, 1);
-
- coc->card = E_CARD (l->data);
- coc->type = CARD_MODIFIED;
-
- gtk_object_ref (GTK_OBJECT (coc->card));
- ctxt->changed = g_list_prepend (ctxt->changed, coc);
- if (!e_pilot_map_uid_is_archived (ctxt->map, e_card_get_id (coc->card)))
- g_hash_table_insert (ctxt->changed_hash, e_card_get_id (coc->card), coc);
- }
-}
-
-
-static void
-card_removed (EBookView *book_view, const char *id, EAddrConduitContext *ctxt)
-{
- CardObjectChange *coc = g_new0 (CardObjectChange, 1);
-
- coc->card = e_card_new ("");
- e_card_set_id (coc->card, id);
- coc->type = CARD_DELETED;
-
- ctxt->changed = g_list_prepend (ctxt->changed, coc);
- if (!e_pilot_map_uid_is_archived (ctxt->map, id))
- g_hash_table_insert (ctxt->changed_hash, e_card_get_id (coc->card), coc);
-}
-
-static void
-sequence_complete (EBookView *book_view, EAddrConduitContext *ctxt)
-{
- gtk_signal_disconnect_by_data (GTK_OBJECT (book_view), ctxt);
- gtk_object_unref (GTK_OBJECT (book_view));
- gtk_main_quit ();
-}
-
-static void
-view_cb (EBook *book, EBookStatus status, EBookView *book_view, gpointer data)
-{
- EAddrConduitContext *ctxt = data;
-
- gtk_object_ref (GTK_OBJECT (book_view));
-
- gtk_signal_connect (GTK_OBJECT (book_view), "card_added",
- (GtkSignalFunc) card_added, ctxt);
- gtk_signal_connect (GTK_OBJECT (book_view), "card_changed",
- (GtkSignalFunc) card_changed, ctxt);
- gtk_signal_connect (GTK_OBJECT (book_view), "card_removed",
- (GtkSignalFunc) card_removed, ctxt);
- gtk_signal_connect (GTK_OBJECT (book_view), "sequence_complete",
- (GtkSignalFunc) sequence_complete, ctxt);
-
-}
-
-/* Pilot syncing callbacks */
-static gint
-pre_sync (GnomePilotConduit *conduit,
- GnomePilotDBInfo *dbi,
- EAddrConduitContext *ctxt)
-{
- GnomePilotConduitSyncAbs *abs_conduit;
-/* GList *l; */
- int len;
- unsigned char *buf;
- char *filename;
- char *change_id;
-/* gint num_records; */
-
- abs_conduit = GNOME_PILOT_CONDUIT_SYNC_ABS (conduit);
-
- LOG ("---------------------------------------------------------\n");
- LOG ("pre_sync: Addressbook Conduit v.%s", CONDUIT_VERSION);
- g_message ("Addressbook Conduit v.%s", CONDUIT_VERSION);
-
- ctxt->ebook = NULL;
-
- if (start_addressbook_server (ctxt) != 0) {
- WARN(_("Could not start wombat server"));
- gnome_pilot_conduit_error (conduit, _("Could not start wombat"));
- return -1;
- }
-
- /* Load the uid <--> pilot id mappings */
- filename = map_name (ctxt);
- e_pilot_map_read (filename, &ctxt->map);
- g_free (filename);
-
- /* Count and hash the changes */
- change_id = g_strdup_printf ("pilot-sync-evolution-addressbook-%d", ctxt->cfg->pilot_id);
- ctxt->changed_hash = g_hash_table_new (g_str_hash, g_str_equal);
- e_book_get_changes (ctxt->ebook, change_id, view_cb, ctxt);
-
- /* Force the view loading to be synchronous */
- gtk_main ();
- g_free (change_id);
-
- /* Set the count information */
-/* num_records = cal_client_get_n_objects (ctxt->client, CALOBJ_TYPE_TODO); */
-/* gnome_pilot_conduit_sync_abs_set_num_local_records(abs_conduit, num_records); */
-/* gnome_pilot_conduit_sync_abs_set_num_new_local_records (abs_conduit, add_records); */
-/* gnome_pilot_conduit_sync_abs_set_num_updated_local_records (abs_conduit, mod_records); */
-/* gnome_pilot_conduit_sync_abs_set_num_deleted_local_records(abs_conduit, del_records); */
-
- gtk_object_set_data (GTK_OBJECT (conduit), "dbinfo", dbi);
-
- buf = (unsigned char*)g_malloc (0xffff);
- len = dlp_ReadAppBlock (dbi->pilot_socket, dbi->db_handle, 0,
- (unsigned char *)buf, 0xffff);
-
- if (len < 0) {
- WARN (_("Could not read pilot's Address application block"));
- WARN ("dlp_ReadAppBlock(...) = %d", len);
- gnome_pilot_conduit_error (conduit,
- _("Could not read pilot's Address application block"));
- return -1;
- }
- unpack_AddressAppInfo (&(ctxt->ai), buf, len);
- g_free (buf);
-
- check_for_slow_setting (conduit, ctxt);
-
- return 0;
-}
-
-static gint
-post_sync (GnomePilotConduit *conduit,
- GnomePilotDBInfo *dbi,
- EAddrConduitContext *ctxt)
-{
- gchar *filename, *change_id;
-
- LOG ("post_sync: Address Conduit v.%s", CONDUIT_VERSION);
- LOG ("---------------------------------------------------------\n");
-
- filename = map_name (ctxt);
- e_pilot_map_write (filename, ctxt->map);
- g_free (filename);
-
- /* FIX ME ugly hack - our changes musn't count, this does introduce
- * a race condition if anyone changes a record elsewhere during sycnc
- */
- change_id = g_strdup_printf ("pilot-sync-evolution-addressbook-%d", ctxt->cfg->pilot_id);
- e_book_get_changes (ctxt->ebook, change_id, view_cb, ctxt);
- g_free (change_id);
- gtk_main ();
-
- return 0;
-}
-
-static gint
-set_pilot_id (GnomePilotConduitSyncAbs *conduit,
- EAddrLocalRecord *local,
- guint32 ID,
- EAddrConduitContext *ctxt)
-{
- LOG ("set_pilot_id: setting to %d\n", ID);
-
- e_pilot_map_insert (ctxt->map, ID, local->ecard->id, FALSE);
-
- return 0;
-}
-
-static gint
-set_status_cleared (GnomePilotConduitSyncAbs *conduit,
- EAddrLocalRecord *local,
- EAddrConduitContext *ctxt)
-{
- LOG ("set_status_cleared: clearing status\n");
-
- g_hash_table_remove (ctxt->changed_hash, e_card_get_id (local->ecard));
-
- return 0;
-}
-
-static gint
-for_each (GnomePilotConduitSyncAbs *conduit,
- EAddrLocalRecord **local,
- EAddrConduitContext *ctxt)
-{
- static GList *cards, *iterator;
- static int count;
-
- g_return_val_if_fail (local != NULL, -1);
-
- if (*local == NULL) {
- LOG ("beginning for_each");
-
- cards = ctxt->cards;
- count = 0;
-
- if (cards != NULL) {
- LOG ("iterating over %d records", g_list_length (cards));
-
- *local = g_new0 (EAddrLocalRecord, 1);
- local_record_from_ecard (*local, cards->data, ctxt);
-
- iterator = cards;
- } else {
- LOG ("no events");
- (*local) = NULL;
- return 0;
- }
- } else {
- count++;
- if (g_list_next (iterator)) {
- iterator = g_list_next (iterator);
-
- *local = g_new0 (EAddrLocalRecord, 1);
- local_record_from_ecard (*local, iterator->data, ctxt);
- } else {
- LOG ("for_each ending");
-
- /* Tell the pilot the iteration is over */
- *local = NULL;
-
- return 0;
- }
- }
-
- return 0;
-}
-
-static gint
-for_each_modified (GnomePilotConduitSyncAbs *conduit,
- EAddrLocalRecord **local,
- EAddrConduitContext *ctxt)
-{
- static GList *iterator;
- static int count;
-
- g_return_val_if_fail (local != NULL, 0);
-
- if (*local == NULL) {
- LOG ("beginning for_each_modified: beginning\n");
-
- iterator = ctxt->changed;
-
- count = 0;
-
- iterator = next_changed_item (ctxt, iterator);
- if (iterator != NULL) {
- CardObjectChange *coc = iterator->data;
-
- LOG ("iterating over %d records", g_hash_table_size (ctxt->changed_hash));
-
- *local = g_new0 (EAddrLocalRecord, 1);
- local_record_from_ecard (*local, coc->card, ctxt);
- } else {
- LOG ("no events");
-
- *local = NULL;
- }
- } else {
- count++;
- iterator = g_list_next (iterator);
- if (iterator && (iterator = next_changed_item (ctxt, iterator))) {
- CardObjectChange *coc = iterator->data;
-
- *local = g_new0 (EAddrLocalRecord, 1);
- local_record_from_ecard (*local, coc->card, ctxt);
- } else {
- LOG ("for_each_modified ending");
-
- /* Signal the iteration is over */
- *local = NULL;
-
- return 0;
- }
- }
-
- return 0;
-}
-
-static gint
-compare (GnomePilotConduitSyncAbs *conduit,
- EAddrLocalRecord *local,
- GnomePilotRecord *remote,
- EAddrConduitContext *ctxt)
-{
- /* used by the quick compare */
- GnomePilotRecord local_pilot;
- int retval = 0;
-
- LOG ("compare: local=%s remote=%s...\n",
- print_local (local), print_remote (remote));
-
- g_return_val_if_fail (local!=NULL,-1);
- g_return_val_if_fail (remote!=NULL,-1);
-
- local_pilot = local_record_to_pilot_record (local, ctxt);
-
- if (remote->length != local_pilot.length
- || memcmp (local_pilot.record, remote->record, remote->length))
- retval = 1;
-
- if (retval == 0)
- LOG (" equal");
- else
- LOG (" not equal");
-
- return retval;
-}
-
-static gint
-add_record (GnomePilotConduitSyncAbs *conduit,
- GnomePilotRecord *remote,
- EAddrConduitContext *ctxt)
-{
- ECard *ecard;
- CardObjectChangeStatus cons;
- int retval = 0;
-
- g_return_val_if_fail (remote != NULL, -1);
-
- LOG ("add_record: adding %s to desktop\n", print_remote (remote));
-
- ecard = ecard_from_remote_record (ctxt, remote, NULL);
-
- /* add the ecard to the server */
- e_book_add_card (ctxt->ebook, ecard, add_card_cb, &cons);
-
- gtk_main(); /* enter sub mainloop */
-
- if (cons.status != E_BOOK_STATUS_SUCCESS) {
- WARN ("add_record: failed to add card to ebook\n");
- return -1;
- }
-
- e_card_set_id (ecard, cons.id);
- e_pilot_map_insert (ctxt->map, remote->ID, ecard->id, FALSE);
-
- return retval;
-}
-
-static gint
-replace_record (GnomePilotConduitSyncAbs *conduit,
- EAddrLocalRecord *local,
- GnomePilotRecord *remote,
- EAddrConduitContext *ctxt)
-{
- ECard *new_ecard;
- EBookStatus commit_status;
- CardObjectChange *coc;
- CardObjectChangeStatus cons;
- char *old_id;
- int retval = 0;
-
- g_return_val_if_fail (remote != NULL, -1);
-
- LOG ("replace_record: replace %s with %s\n",
- print_local (local), print_remote (remote));
-
- old_id = g_strdup (e_card_get_id (local->ecard));
- coc = g_hash_table_lookup (ctxt->changed_hash, old_id);
-
- new_ecard = ecard_from_remote_record (ctxt, remote, local->ecard);
- gtk_object_unref (GTK_OBJECT (local->ecard));
- local->ecard = new_ecard;
-
- if (coc && coc->type == CARD_DELETED)
- e_book_add_card (ctxt->ebook, local->ecard, add_card_cb, &cons);
- else
- e_book_commit_card (ctxt->ebook, local->ecard, status_cb, &commit_status);
-
- gtk_main (); /* enter sub mainloop */
-
- /* Adding a record causes wombat to assign a new uid so we must tidy */
- if (coc && coc->type == CARD_DELETED) {
- gboolean arch = e_pilot_map_uid_is_archived (ctxt->map, e_card_get_id (local->ecard));
-
- e_card_set_id (local->ecard, cons.id);
- e_pilot_map_insert (ctxt->map, remote->ID, cons.id, arch);
-
- coc = g_hash_table_lookup (ctxt->changed_hash, old_id);
- if (coc) {
- g_hash_table_remove (ctxt->changed_hash, e_card_get_id (coc->card));
- coc->card = local->ecard;
- g_hash_table_insert (ctxt->changed_hash, e_card_get_id (coc->card), coc);
-
- }
-
- commit_status = cons.status;
- }
-
- if (commit_status != E_BOOK_STATUS_SUCCESS)
- WARN ("replace_record: failed to update card in ebook\n");
-
- return retval;
-}
-
-static gint
-delete_record (GnomePilotConduitSyncAbs *conduit,
- EAddrLocalRecord *local,
- EAddrConduitContext *ctxt)
-{
- EBookStatus commit_status;
- int retval = 0;
-
- g_return_val_if_fail (local != NULL, -1);
- g_return_val_if_fail (local->ecard != NULL, -1);
-
- LOG ("delete_record: delete %s\n", print_local (local));
-
- e_pilot_map_remove_by_uid (ctxt->map, local->ecard->id);
- e_book_remove_card_by_id (ctxt->ebook, local->ecard->id, status_cb, &commit_status);
-
- gtk_main (); /* enter sub mainloop */
-
- if (commit_status != E_BOOK_STATUS_SUCCESS && commit_status != E_BOOK_STATUS_CARD_NOT_FOUND)
- WARN ("delete_record: failed to delete card in ebook\n");
-
- return retval;
-}
-
-static gint
-archive_record (GnomePilotConduitSyncAbs *conduit,
- EAddrLocalRecord *local,
- gboolean archive,
- EAddrConduitContext *ctxt)
-{
- int retval = 0;
-
- g_return_val_if_fail (local != NULL, -1);
-
- LOG ("archive_record: %s\n", archive ? "yes" : "no");
-
- e_pilot_map_insert (ctxt->map, local->local.ID, local->ecard->id, archive);
-
- return retval;
-}
-
-static gint
-match (GnomePilotConduitSyncAbs *conduit,
- GnomePilotRecord *remote,
- EAddrLocalRecord **local,
- EAddrConduitContext *ctxt)
-{
- char *uid;
-
- LOG ("match: looking for local copy of %s\n",
- print_remote (remote));
-
- g_return_val_if_fail (local != NULL, -1);
- g_return_val_if_fail (remote != NULL, -1);
-
- *local = NULL;
- uid = e_pilot_map_lookup_uid (ctxt->map, remote->ID);
-
- if (!uid)
- return 0;
-
- LOG (" matched\n");
-
- *local = g_new0 (EAddrLocalRecord, 1);
- local_record_from_uid (*local, uid, ctxt);
-
- return 0;
-}
-
-static gint
-free_match (GnomePilotConduitSyncAbs *conduit,
- EAddrLocalRecord *local,
- EAddrConduitContext *ctxt)
-{
- LOG ("free_match: freeing\n");
-
- g_return_val_if_fail (local != NULL, -1);
-
- gtk_object_unref (GTK_OBJECT (local->ecard));
- g_free (local);
-
- return 0;
-}
-
-static gint
-prepare (GnomePilotConduitSyncAbs *conduit,
- EAddrLocalRecord *local,
- GnomePilotRecord *remote,
- EAddrConduitContext *ctxt)
-{
- LOG ("prepare: encoding local %s\n", print_local (local));
-
- *remote = local_record_to_pilot_record (local, ctxt);
-
- return 0;
-}
-
-static ORBit_MessageValidationResult
-accept_all_cookies (CORBA_unsigned_long request_id,
- CORBA_Principal *principal,
- CORBA_char *operation)
-{
- /* allow ALL cookies */
- return ORBIT_MESSAGE_ALLOW_ALL;
-}
-
-
-GnomePilotConduit *
-conduit_get_gpilot_conduit (guint32 pilot_id)
-{
- GtkObject *retval;
- EAddrConduitContext *ctxt;
-
- LOG ("in address's conduit_get_gpilot_conduit\n");
-
- /* we need to find wombat with oaf, so make sure oaf
- is initialized here. once the desktop is converted
- to oaf and gpilotd is built with oaf, this can go away */
- if (!oaf_is_initialized ()) {
- char *argv[ 1 ] = {"hi"};
- oaf_init (1, argv);
-
- if (bonobo_init (CORBA_OBJECT_NIL,
- CORBA_OBJECT_NIL,
- CORBA_OBJECT_NIL) == FALSE)
- g_error (_("Could not initialize Bonobo"));
-
- ORBit_set_request_validation_handler (accept_all_cookies);
- }
-
- retval = gnome_pilot_conduit_sync_abs_new ("AddressDB", 0x61646472);
- g_assert (retval != NULL);
-
- gnome_pilot_conduit_construct (GNOME_PILOT_CONDUIT (retval),
- "e_addr_conduit");
-
- e_addr_context_new (&ctxt, pilot_id);
- gtk_object_set_data (GTK_OBJECT (retval), "addrconduit_context", ctxt);
-
- gtk_signal_connect (retval, "pre_sync", (GtkSignalFunc) pre_sync, ctxt);
- gtk_signal_connect (retval, "post_sync", (GtkSignalFunc) post_sync, ctxt);
-
- gtk_signal_connect (retval, "set_pilot_id", (GtkSignalFunc) set_pilot_id, ctxt);
- gtk_signal_connect (retval, "set_status_cleared", (GtkSignalFunc) set_status_cleared, ctxt);
-
- gtk_signal_connect (retval, "for_each", (GtkSignalFunc) for_each, ctxt);
- gtk_signal_connect (retval, "for_each_modified", (GtkSignalFunc) for_each_modified, ctxt);
- gtk_signal_connect (retval, "compare", (GtkSignalFunc) compare, ctxt);
-
- gtk_signal_connect (retval, "add_record", (GtkSignalFunc) add_record, ctxt);
- gtk_signal_connect (retval, "replace_record", (GtkSignalFunc) replace_record, ctxt);
- gtk_signal_connect (retval, "delete_record", (GtkSignalFunc) delete_record, ctxt);
- gtk_signal_connect (retval, "archive_record", (GtkSignalFunc) archive_record, ctxt);
-
- gtk_signal_connect (retval, "match", (GtkSignalFunc) match, ctxt);
- gtk_signal_connect (retval, "free_match", (GtkSignalFunc) free_match, ctxt);
-
- gtk_signal_connect (retval, "prepare", (GtkSignalFunc) prepare, ctxt);
-
- return GNOME_PILOT_CONDUIT (retval);
-}
-
-void
-conduit_destroy_gpilot_conduit (GnomePilotConduit *conduit)
-{
- EAddrConduitContext *ctxt;
-
- ctxt = gtk_object_get_data (GTK_OBJECT (conduit),
- "addrconduit_context");
-
- e_addr_context_destroy (&ctxt);
-
- gtk_object_destroy (GTK_OBJECT (conduit));
-}
diff --git a/addressbook/conduit/address-conduit.h b/addressbook/conduit/address-conduit.h
deleted file mode 100644
index 8b901a5da7..0000000000
--- a/addressbook/conduit/address-conduit.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* Evolution calendar - ToDo Conduit Capplet
- *
- * Copyright (C) 1998 Free Software Foundation
- * Copyright (C) 2000 Helix Code, Inc.
- *
- * Authors: Eskil Heyn Olsen <deity@eskil.dk>
- * JP Rosevear <jpr@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 __ADDR_CONDUIT_H__
-#define __ADDR_CONDUIT_H__
-
-#include <sys/types.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <gnome.h>
-#include <pi-address.h>
-#include <gpilotd/gnome-pilot-conduit.h>
-#include <gpilotd/gnome-pilot-conduit-sync-abs.h>
-#include <e-pilot-map.h>
-
-/* This is the local record structure for the Evolution ToDo conduit. */
-typedef struct _EAddrLocalRecord EAddrLocalRecord;
-struct _EAddrLocalRecord {
- /* 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.
- */
- GnomePilotDesktopRecord local;
-
- /* The corresponding ECard object */
- ECard *ecard;
-
- /* pilot-link todo structure, used for implementing Transmit. */
- struct Address *addr;
-};
-
-/* This is the context for all the GnomeCal conduit methods. */
-typedef struct _EAddrConduitContext EAddrConduitContext;
-struct _EAddrConduitContext {
- EAddrConduitCfg *cfg;
-
- struct AddressAppInfo ai;
-
- EBook *ebook;
- GList *cards;
- GList *changed;
- GHashTable *changed_hash;
-
- gboolean address_load_tried;
- gboolean address_load_success;
-
- EPilotMap *map;
-};
-
-#endif __ADDR_CONDUIT_H__
-
-
-
-
-
-
diff --git a/addressbook/conduit/e-address.conduit.in b/addressbook/conduit/e-address.conduit.in
deleted file mode 100644
index 99b5a15221..0000000000
--- a/addressbook/conduit/e-address.conduit.in
+++ /dev/null
@@ -1,9 +0,0 @@
-<gnome-pilot-conduit version="1.0">
- <conduit id="e_address_conduit" type="shlib" location="@prefix@/lib/gnome-pilot/conduits/libeaddress_conduit.so"/>
- <name value="EAddress"/>
- <conduit-attribute name="description" value="Synchronizes Addressbook with Evolution"/>
- <conduit-attribute name="default-synctype" value="synchronize"/>
- <conduit-attribute name="valid-synctypes" value="synchronize copy_from_pilot copy_to_pilot merge_from_pilot merge_to_pilot"/>
- <conduit-attribute name="settings" value="FALSE"/>
- <conduit-attribute name="icon" value="@datadir@/images/evolution/conduits/48_evo-address-conduit.png"/>
-</gnome-pilot-conduit>
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 700be0ff35..0000000000
--- a/addressbook/contact-editor/Makefile.am
+++ /dev/null
@@ -1,62 +0,0 @@
-INCLUDES = \
- $(BONOBO_GNOME_CFLAGS) \
- $(EXTRA_GNOME_CFLAGS) \
- -I$(top_srcdir) \
- -I$(top_srcdir)/addressbook/ \
- -I$(top_srcdir)/addressbook/backend \
- -I$(top_srcdir)/widgets/e-table \
- -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \
- -DDATADIR=\""$(datadir)"\" \
- -DEVOLUTION_DATADIR=\""$(datadir)"\" \
- -DEVOLUTIONDIR=\""$(evolutiondir)"\" \
- -DG_LOG_DOMAIN=\"contact-editor\"
-
-noinst_LIBRARIES = \
- libecontacteditor.a
-
-libecontacteditor_a_SOURCES = \
- e-contact-editor-address.c \
- e-contact-editor-address.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 \
- e-contact-quick-add.c \
- e-contact-quick-add.h
-
-noinst_PROGRAMS = \
- contact-editor-test
-
-contact_editor_test_SOURCES = \
- test-editor.c
-
-contact_editor_test_LDADD = \
- libecontacteditor.a \
- $(top_builddir)/e-util/libeutil.la \
- $(top_builddir)/addressbook/printing/libecontactprint.a \
- $(top_builddir)/addressbook/backend/ebook/libebook.la \
- $(top_builddir)/e-util/ename/libename.la \
- $(top_builddir)/libversit/libversit.la \
- $(GNOMEGNORBA_LIBS) \
- $(BONOBO_GNOME_LIBS) \
- $(top_builddir)/widgets/misc/libemiscwidgets.a \
- $(top_builddir)/e-util/libeutil.la \
- $(GNOME_PRINT_LIBS) \
- $(EXTRA_GNOME_LIBS)
-
-evolutiondir = $(datadir)/evolution
-
-evolution_DATA = arrow.png
-
-gladedir = $(datadir)/evolution/glade
-
-glade_DATA = \
- contact-editor.glade \
- fulladdr.glade \
- fullname.glade \
- e-contact-editor-confirm-delete.glade
-
-EXTRA_DIST = $(evolution_DATA) \
- $(glade_DATA)
diff --git a/addressbook/contact-editor/arrow.png b/addressbook/contact-editor/arrow.png
deleted file mode 100644
index b102356c78..0000000000
--- a/addressbook/contact-editor/arrow.png
+++ /dev/null
Binary files differ
diff --git a/addressbook/contact-editor/contact-editor.glade b/addressbook/contact-editor/contact-editor.glade
deleted file mode 100644
index c6afe583f5..0000000000
--- a/addressbook/contact-editor/contact-editor.glade
+++ /dev/null
@@ -1,2453 +0,0 @@
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <name>Contact-editor</name>
- <program_name>contact-editor</program_name>
- <directory></directory>
- <source_directory>src</source_directory>
- <pixmaps_directory>pixmaps</pixmaps_directory>
- <language>C</language>
- <gnome_support>True</gnome_support>
- <gettext_support>True</gettext_support>
- <use_widget_names>True</use_widget_names>
- <output_main_file>False</output_main_file>
- <output_support_files>False</output_support_files>
- <output_build_files>False</output_build_files>
- <backup_source_files>False</backup_source_files>
- <main_source_file>interface.c</main_source_file>
- <main_header_file>interface.h</main_header_file>
- <handler_source_file>callbacks.c</handler_source_file>
- <handler_header_file>callbacks.h</handler_header_file>
- <support_source_file>support.c</support_source_file>
- <support_header_file>support.h</support_header_file>
-</project>
-
-<widget>
- <class>GnomeDialog</class>
- <name>dialog2</name>
- <border_width>2</border_width>
- <cxx_use_heap>True</cxx_use_heap>
- <visible>False</visible>
- <type>GTK_WINDOW_TOPLEVEL</type>
- <position>GTK_WIN_POS_NONE</position>
- <modal>False</modal>
- <allow_shrink>False</allow_shrink>
- <allow_grow>False</allow_grow>
- <auto_shrink>False</auto_shrink>
- <auto_close>False</auto_close>
- <hide_on_close>False</hide_on_close>
-
- <widget>
- <class>GtkVBox</class>
- <child_name>GnomeDialog:vbox</child_name>
- <name>dialog-vbox2</name>
- <cxx_use_heap>True</cxx_use_heap>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>4</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkTable</class>
- <name>table2</name>
- <cxx_use_heap>True</cxx_use_heap>
- <rows>2</rows>
- <columns>2</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>0</row_spacing>
- <column_spacing>2</column_spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry2</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>0</left_attach>
- <right_attach>2</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox1</name>
- <cxx_use_heap>True</cxx_use_heap>
- <homogeneous>False</homogeneous>
- <spacing>2</spacing>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>True</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>button31</name>
- <border_width>2</border_width>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <label>_Add</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button32</name>
- <border_width>2</border_width>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <label>_Delete</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkScrolledWindow</class>
- <name>scrolledwindow1</name>
- <height>200</height>
- <cxx_use_heap>True</cxx_use_heap>
- <hscrollbar_policy>GTK_POLICY_ALWAYS</hscrollbar_policy>
- <vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
- <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
- <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>True</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkCList</class>
- <name>clist1</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <columns>1</columns>
- <column_widths>80</column_widths>
- <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
- <show_titles>True</show_titles>
- <shadow_type>GTK_SHADOW_NONE</shadow_type>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>CList:title</child_name>
- <name>label20</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>Phone Types</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHButtonBox</class>
- <child_name>GnomeDialog:action_area</child_name>
- <name>dialog-action_area2</name>
- <cxx_use_heap>True</cxx_use_heap>
- <layout_style>GTK_BUTTONBOX_END</layout_style>
- <spacing>8</spacing>
- <child_min_width>85</child_min_width>
- <child_min_height>27</child_min_height>
- <child_ipad_x>7</child_ipad_x>
- <child_ipad_y>0</child_ipad_y>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- <pack>GTK_PACK_END</pack>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>button28</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button29</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_APPLY</stock_button>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button30</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
- </widget>
- </widget>
- </widget>
-</widget>
-
-<widget>
- <class>GnomeDialog</class>
- <name>dialog-add-phone</name>
- <cxx_use_heap>True</cxx_use_heap>
- <visible>False</visible>
- <title>New phone type</title>
- <type>GTK_WINDOW_TOPLEVEL</type>
- <position>GTK_WIN_POS_NONE</position>
- <modal>False</modal>
- <allow_shrink>False</allow_shrink>
- <allow_grow>False</allow_grow>
- <auto_shrink>False</auto_shrink>
- <auto_close>False</auto_close>
- <hide_on_close>False</hide_on_close>
-
- <widget>
- <class>GtkVBox</class>
- <child_name>GnomeDialog:vbox</child_name>
- <name>vbox2</name>
- <cxx_use_heap>True</cxx_use_heap>
- <homogeneous>False</homogeneous>
- <spacing>8</spacing>
- <child>
- <padding>4</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame-add-phone</name>
- <border_width>4</border_width>
- <cxx_use_heap>True</cxx_use_heap>
- <label>New phone type</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment9</name>
- <border_width>9</border_width>
- <cxx_use_heap>True</cxx_use_heap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xscale>1</xscale>
- <yscale>1</yscale>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-add-phone</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <has_focus>True</has_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHButtonBox</class>
- <child_name>GnomeDialog:action_area</child_name>
- <name>hbuttonbox1</name>
- <cxx_use_heap>True</cxx_use_heap>
- <layout_style>GTK_BUTTONBOX_END</layout_style>
- <spacing>8</spacing>
- <child_min_width>85</child_min_width>
- <child_min_height>27</child_min_height>
- <child_ipad_x>7</child_ipad_x>
- <child_ipad_y>0</child_ipad_y>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- <pack>GTK_PACK_END</pack>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>button43</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_default>True</can_default>
- <has_default>True</has_default>
- <can_focus>True</can_focus>
- <label>Add</label>
- <stock_pixmap>GNOME_STOCK_PIXMAP_ADD</stock_pixmap>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button44</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
- </widget>
- </widget>
- </widget>
-</widget>
-
-<widget>
- <class>GnomeApp</class>
- <name>contact editor</name>
- <cxx_use_heap>True</cxx_use_heap>
- <visible>False</visible>
- <title>Contact Editor</title>
- <type>GTK_WINDOW_TOPLEVEL</type>
- <position>GTK_WIN_POS_NONE</position>
- <modal>False</modal>
- <allow_shrink>False</allow_shrink>
- <allow_grow>True</allow_grow>
- <auto_shrink>False</auto_shrink>
- <enable_layout_config>True</enable_layout_config>
-
- <widget>
- <class>GnomeDock</class>
- <child_name>GnomeApp:dock</child_name>
- <name>dock1</name>
- <cxx_use_heap>True</cxx_use_heap>
- <allow_floating>True</allow_floating>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkNotebook</class>
- <child_name>GnomeDock:contents</child_name>
- <name>notebook-contact-editor</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <show_tabs>True</show_tabs>
- <show_border>True</show_border>
- <tab_pos>GTK_POS_TOP</tab_pos>
- <scrollable>False</scrollable>
- <tab_hborder>2</tab_hborder>
- <tab_vborder>2</tab_vborder>
- <popup_enable>False</popup_enable>
-
- <widget>
- <class>GtkTable</class>
- <name>table-contact-editor-general</name>
- <border_width>7</border_width>
- <cxx_use_heap>True</cxx_use_heap>
- <rows>14</rows>
- <columns>8</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>4</row_spacing>
- <column_spacing>4</column_spacing>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-phone1</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>7</left_attach>
- <right_attach>8</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-phone2</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>7</left_attach>
- <right_attach>8</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-phone3</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>7</left_attach>
- <right_attach>8</right_attach>
- <top_attach>2</top_attach>
- <bottom_attach>3</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-phone4</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>7</left_attach>
- <right_attach>8</right_attach>
- <top_attach>3</top_attach>
- <bottom_attach>4</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkText</class>
- <name>text-address</name>
- <width>1</width>
- <height>1</height>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text></text>
- <child>
- <left_attach>7</left_attach>
- <right_attach>8</right_attach>
- <top_attach>5</top_attach>
- <bottom_attach>9</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button-fullname</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <label>_Full Name...</label>
- <child>
- <left_attach>1</left_attach>
- <right_attach>3</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkAccelLabel</class>
- <name>accellabel-fileas</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>File As:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>1</left_attach>
- <right_attach>3</right_attach>
- <top_attach>3</top_attach>
- <bottom_attach>4</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkAccelLabel</class>
- <name>accellabel-web</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>Web page address:</label>
- <justify>GTK_JUSTIFY_LEFT</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>1</left_attach>
- <right_attach>3</right_attach>
- <top_attach>8</top_attach>
- <bottom_attach>9</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment3</name>
- <cxx_use_heap>True</cxx_use_heap>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xscale>0</xscale>
- <yscale>1</yscale>
- <child>
- <left_attach>2</left_attach>
- <right_attach>3</right_attach>
- <top_attach>5</top_attach>
- <bottom_attach>6</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>button-email1</name>
- <cxx_use_heap>True</cxx_use_heap>
-
- <widget>
- <class>Placeholder</class>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment5</name>
- <cxx_use_heap>True</cxx_use_heap>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xscale>0</xscale>
- <yscale>0</yscale>
- <child>
- <left_attach>6</left_attach>
- <right_attach>7</right_attach>
- <top_attach>3</top_attach>
- <bottom_attach>4</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>button-phone4</name>
- <cxx_use_heap>True</cxx_use_heap>
-
- <widget>
- <class>Placeholder</class>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment7</name>
- <cxx_use_heap>True</cxx_use_heap>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xscale>0</xscale>
- <yscale>0</yscale>
- <child>
- <left_attach>6</left_attach>
- <right_attach>7</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>button-phone2</name>
- <cxx_use_heap>True</cxx_use_heap>
-
- <widget>
- <class>Placeholder</class>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment8</name>
- <cxx_use_heap>True</cxx_use_heap>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xscale>0</xscale>
- <yscale>0</yscale>
- <child>
- <left_attach>6</left_attach>
- <right_attach>7</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>button-phone1</name>
- <cxx_use_heap>True</cxx_use_heap>
-
- <widget>
- <class>Placeholder</class>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHSeparator</class>
- <name>hseparator4</name>
- <cxx_use_heap>True</cxx_use_heap>
- <child>
- <left_attach>4</left_attach>
- <right_attach>8</right_attach>
- <top_attach>4</top_attach>
- <bottom_attach>5</bottom_attach>
- <xpad>0</xpad>
- <ypad>2</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment6</name>
- <cxx_use_heap>True</cxx_use_heap>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xscale>0</xscale>
- <yscale>0</yscale>
- <child>
- <left_attach>6</left_attach>
- <right_attach>7</right_attach>
- <top_attach>2</top_attach>
- <bottom_attach>3</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>button-phone3</name>
- <cxx_use_heap>True</cxx_use_heap>
-
- <widget>
- <class>Placeholder</class>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-fullname</name>
- <cxx_use_heap>True</cxx_use_heap>
- <has_default>True</has_default>
- <can_focus>True</can_focus>
- <has_focus>True</has_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>3</left_attach>
- <right_attach>4</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-jobtitle</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>3</left_attach>
- <right_attach>4</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-company</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>3</left_attach>
- <right_attach>4</right_attach>
- <top_attach>2</top_attach>
- <bottom_attach>3</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-email1</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>3</left_attach>
- <right_attach>4</right_attach>
- <top_attach>5</top_attach>
- <bottom_attach>6</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-web</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>3</left_attach>
- <right_attach>4</right_attach>
- <top_attach>8</top_attach>
- <bottom_attach>9</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkHSeparator</class>
- <name>hseparator5</name>
- <cxx_use_heap>True</cxx_use_heap>
- <child>
- <left_attach>0</left_attach>
- <right_attach>4</right_attach>
- <top_attach>4</top_attach>
- <bottom_attach>5</bottom_attach>
- <xpad>0</xpad>
- <ypad>2</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkCombo</class>
- <name>combo-file-as</name>
- <cxx_use_heap>True</cxx_use_heap>
- <value_in_list>False</value_in_list>
- <ok_if_empty>True</ok_if_empty>
- <case_sensitive>True</case_sensitive>
- <use_arrows>True</use_arrows>
- <use_arrows_always>False</use_arrows_always>
- <items></items>
- <child>
- <left_attach>3</left_attach>
- <right_attach>4</right_attach>
- <top_attach>3</top_attach>
- <bottom_attach>4</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
-
- <widget>
- <class>GtkEntry</class>
- <child_name>GtkCombo:entry</child_name>
- <name>entry-file-as</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHSeparator</class>
- <name>hseparator6</name>
- <cxx_use_heap>True</cxx_use_heap>
- <child>
- <left_attach>0</left_attach>
- <right_attach>4</right_attach>
- <top_attach>7</top_attach>
- <bottom_attach>8</bottom_attach>
- <xpad>0</xpad>
- <ypad>2</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment10</name>
- <cxx_use_heap>True</cxx_use_heap>
- <xalign>0.5</xalign>
- <yalign>0</yalign>
- <xscale>1</xscale>
- <yscale>1</yscale>
- <child>
- <left_attach>3</left_attach>
- <right_attach>4</right_attach>
- <top_attach>6</top_attach>
- <bottom_attach>7</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>True</xshrink>
- <yshrink>True</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>checkbutton-htmlmail</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>Wants to receive _HTML mail</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- </widget>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment4</name>
- <cxx_use_heap>True</cxx_use_heap>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xscale>0</xscale>
- <yscale>0</yscale>
- <child>
- <left_attach>6</left_attach>
- <right_attach>7</right_attach>
- <top_attach>5</top_attach>
- <bottom_attach>6</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>button-address</name>
- <cxx_use_heap>True</cxx_use_heap>
-
- <widget>
- <class>Placeholder</class>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkEventBox</class>
- <name>eventbox1</name>
- <cxx_use_heap>True</cxx_use_heap>
- <child>
- <left_attach>5</left_attach>
- <right_attach>6</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label-phone1</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>_Business</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
-
- <widget>
- <class>GtkEventBox</class>
- <name>eventbox2</name>
- <cxx_use_heap>True</cxx_use_heap>
- <child>
- <left_attach>5</left_attach>
- <right_attach>6</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label-phone2</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>_Home</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>entry-phone2</focus_target>
- </widget>
- </widget>
-
- <widget>
- <class>GtkEventBox</class>
- <name>eventbox3</name>
- <cxx_use_heap>True</cxx_use_heap>
- <child>
- <left_attach>5</left_attach>
- <right_attach>6</right_attach>
- <top_attach>2</top_attach>
- <bottom_attach>3</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label-phone3</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>Business _Fax</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>entry-phone3</focus_target>
- </widget>
- </widget>
-
- <widget>
- <class>GtkEventBox</class>
- <name>eventbox4</name>
- <cxx_use_heap>True</cxx_use_heap>
- <child>
- <left_attach>5</left_attach>
- <right_attach>6</right_attach>
- <top_attach>3</top_attach>
- <bottom_attach>4</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label-phone4</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>_Mobile</label>
- <justify>GTK_JUSTIFY_LEFT</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>entry-phone4</focus_target>
- </widget>
- </widget>
-
- <widget>
- <class>GtkEventBox</class>
- <name>eventbox5</name>
- <cxx_use_heap>True</cxx_use_heap>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>5</top_attach>
- <bottom_attach>6</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label-email1</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>Primary Email</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>entry-email1</focus_target>
- </widget>
- </widget>
-
- <widget>
- <class>GtkEventBox</class>
- <name>eventbox-business</name>
- <cxx_use_heap>True</cxx_use_heap>
- <child>
- <left_attach>5</left_attach>
- <right_attach>6</right_attach>
- <top_attach>5</top_attach>
- <bottom_attach>6</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label-address</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>B_usiness</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>text-address</focus_target>
- </widget>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment2</name>
- <cxx_use_heap>True</cxx_use_heap>
- <xalign>0</xalign>
- <yalign>0</yalign>
- <xscale>0</xscale>
- <yscale>0</yscale>
- <child>
- <left_attach>7</left_attach>
- <right_attach>8</right_attach>
- <top_attach>9</top_attach>
- <bottom_attach>10</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>checkbutton-mailingaddress</name>
- <cxx_use_heap>True</cxx_use_heap>
- <visible>False</visible>
- <label>_This is the mailing address</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHSeparator</class>
- <name>hseparator9</name>
- <cxx_use_heap>True</cxx_use_heap>
- <child>
- <left_attach>0</left_attach>
- <right_attach>4</right_attach>
- <top_attach>11</top_attach>
- <bottom_attach>12</bottom_attach>
- <xpad>0</xpad>
- <ypad>2</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkHSeparator</class>
- <name>hseparator10</name>
- <cxx_use_heap>True</cxx_use_heap>
- <child>
- <left_attach>4</left_attach>
- <right_attach>8</right_attach>
- <top_attach>11</top_attach>
- <bottom_attach>12</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment-contacts</name>
- <cxx_use_heap>True</cxx_use_heap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xscale>1</xscale>
- <yscale>0</yscale>
- <child>
- <left_attach>1</left_attach>
- <right_attach>3</right_attach>
- <top_attach>12</top_attach>
- <bottom_attach>13</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>button-contacts</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <label>C_ontacts...</label>
- </widget>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment15</name>
- <cxx_use_heap>True</cxx_use_heap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xscale>1</xscale>
- <yscale>0</yscale>
- <child>
- <left_attach>7</left_attach>
- <right_attach>8</right_attach>
- <top_attach>12</top_attach>
- <bottom_attach>13</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-categories</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- </widget>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment14</name>
- <cxx_use_heap>True</cxx_use_heap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xscale>1</xscale>
- <yscale>0</yscale>
- <child>
- <left_attach>3</left_attach>
- <right_attach>4</right_attach>
- <top_attach>12</top_attach>
- <bottom_attach>13</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-contacts</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- </widget>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment16</name>
- <cxx_use_heap>True</cxx_use_heap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xscale>1</xscale>
- <yscale>0</yscale>
- <child>
- <left_attach>5</left_attach>
- <right_attach>7</right_attach>
- <top_attach>12</top_attach>
- <bottom_attach>13</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>button-categories</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <label>Ca_tegories...</label>
- </widget>
- </widget>
-
- <widget>
- <class>GtkEventBox</class>
- <name>eventbox7</name>
- <cxx_use_heap>True</cxx_use_heap>
- <child>
- <left_attach>1</left_attach>
- <right_attach>3</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label-jobtitle</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>_Job title:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>entry-jobtitle</focus_target>
- </widget>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>custom1</name>
- <cxx_use_heap>True</cxx_use_heap>
- <creation_function>e_create_image_widget</creation_function>
- <string1>malehead.png</string1>
- <string2></string2>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Thu, 18 May 2000 12:19:47 GMT</last_modification_time>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>4</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>custom2</name>
- <cxx_use_heap>True</cxx_use_heap>
- <creation_function>e_create_image_widget</creation_function>
- <string1>cellphone.png</string1>
- <string2></string2>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Thu, 18 May 2000 12:20:02 GMT</last_modification_time>
- <child>
- <left_attach>4</left_attach>
- <right_attach>5</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>4</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>custom3</name>
- <cxx_use_heap>True</cxx_use_heap>
- <creation_function>e_create_image_widget</creation_function>
- <string1>envelope.png</string1>
- <string2></string2>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Thu, 18 May 2000 12:19:51 GMT</last_modification_time>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>5</top_attach>
- <bottom_attach>7</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>custom4</name>
- <cxx_use_heap>True</cxx_use_heap>
- <creation_function>e_create_image_widget</creation_function>
- <string1>house.png</string1>
- <string2></string2>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Thu, 18 May 2000 12:20:06 GMT</last_modification_time>
- <child>
- <left_attach>4</left_attach>
- <right_attach>5</right_attach>
- <top_attach>5</top_attach>
- <bottom_attach>10</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>custom5</name>
- <cxx_use_heap>True</cxx_use_heap>
- <creation_function>e_create_image_widget</creation_function>
- <string1>evolution-contacts-plain.png</string1>
- <string2></string2>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Thu, 18 May 2000 12:19:59 GMT</last_modification_time>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>12</top_attach>
- <bottom_attach>14</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>custom6</name>
- <cxx_use_heap>True</cxx_use_heap>
- <creation_function>e_create_image_widget</creation_function>
- <string1>briefcase.png</string1>
- <string2></string2>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Thu, 18 May 2000 12:20:09 GMT</last_modification_time>
- <child>
- <left_attach>4</left_attach>
- <right_attach>5</right_attach>
- <top_attach>12</top_attach>
- <bottom_attach>14</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>custom10</name>
- <cxx_use_heap>True</cxx_use_heap>
- <creation_function>e_create_image_widget</creation_function>
- <string1>globe.png</string1>
- <string2></string2>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Thu, 18 May 2000 12:19:56 GMT</last_modification_time>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>8</top_attach>
- <bottom_attach>10</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label-company</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>_Company:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>entry-company</focus_target>
- <child>
- <left_attach>1</left_attach>
- <right_attach>3</right_attach>
- <top_attach>2</top_attach>
- <bottom_attach>3</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button-fulladdr</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <label>_Address...</label>
- <child>
- <left_attach>5</left_attach>
- <right_attach>7</right_attach>
- <top_attach>6</top_attach>
- <bottom_attach>7</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label15</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>General</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
-
- <widget>
- <class>GtkTable</class>
- <name>table-contact-editor-details</name>
- <border_width>7</border_width>
- <cxx_use_heap>True</cxx_use_heap>
- <rows>9</rows>
- <columns>6</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>4</row_spacing>
- <column_spacing>4</column_spacing>
-
- <widget>
- <class>GtkLabel</class>
- <name>label-department</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>_Department:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>entry-department</focus_target>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label-office</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>_Office:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>entry-office</focus_target>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label-profession</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>_Profession:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>entry-profession</focus_target>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>2</top_attach>
- <bottom_attach>3</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label-nickname</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>_Nickname:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>entry-nickname</focus_target>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>4</top_attach>
- <bottom_attach>5</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label-spouse</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>_Spouse:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>entry-spouse</focus_target>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>5</top_attach>
- <bottom_attach>6</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label-birthday</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>_Birthday:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>3</left_attach>
- <right_attach>4</right_attach>
- <top_attach>4</top_attach>
- <bottom_attach>5</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label-assistant</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>_Assistant's name:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>entry-assistant</focus_target>
- <child>
- <left_attach>3</left_attach>
- <right_attach>4</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label-manager</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>_Manager's Name:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>entry-manager</focus_target>
- <child>
- <left_attach>3</left_attach>
- <right_attach>4</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label-anniversary</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>Anni_versary:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>3</left_attach>
- <right_attach>4</right_attach>
- <top_attach>5</top_attach>
- <bottom_attach>6</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-spouse</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>2</left_attach>
- <right_attach>3</right_attach>
- <top_attach>5</top_attach>
- <bottom_attach>6</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-department</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>2</left_attach>
- <right_attach>3</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-office</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>2</left_attach>
- <right_attach>3</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-profession</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>2</left_attach>
- <right_attach>3</right_attach>
- <top_attach>2</top_attach>
- <bottom_attach>3</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-nickname</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>2</left_attach>
- <right_attach>3</right_attach>
- <top_attach>4</top_attach>
- <bottom_attach>5</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GnomeDateEdit</class>
- <name>dateedit-anniversary</name>
- <cxx_use_heap>True</cxx_use_heap>
- <show_time>False</show_time>
- <use_24_format>False</use_24_format>
- <week_start_monday>False</week_start_monday>
- <lower_hour>7</lower_hour>
- <upper_hour>19</upper_hour>
- <child>
- <left_attach>4</left_attach>
- <right_attach>6</right_attach>
- <top_attach>5</top_attach>
- <bottom_attach>6</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GnomeDateEdit</class>
- <name>dateedit-birthday</name>
- <cxx_use_heap>True</cxx_use_heap>
- <show_time>False</show_time>
- <use_24_format>False</use_24_format>
- <week_start_monday>False</week_start_monday>
- <lower_hour>7</lower_hour>
- <upper_hour>19</upper_hour>
- <child>
- <left_attach>4</left_attach>
- <right_attach>6</right_attach>
- <top_attach>4</top_attach>
- <bottom_attach>5</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-assistant</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>4</left_attach>
- <right_attach>6</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-manager</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>4</left_attach>
- <right_attach>6</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkHSeparator</class>
- <name>hseparator7</name>
- <cxx_use_heap>True</cxx_use_heap>
- <child>
- <left_attach>0</left_attach>
- <right_attach>6</right_attach>
- <top_attach>3</top_attach>
- <bottom_attach>4</bottom_attach>
- <xpad>0</xpad>
- <ypad>2</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label-comments</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>No_tes:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>7</top_attach>
- <bottom_attach>8</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkHSeparator</class>
- <name>hseparator8</name>
- <cxx_use_heap>True</cxx_use_heap>
- <child>
- <left_attach>0</left_attach>
- <right_attach>6</right_attach>
- <top_attach>6</top_attach>
- <bottom_attach>7</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>custom7</name>
- <cxx_use_heap>True</cxx_use_heap>
- <creation_function>e_create_image_widget</creation_function>
- <string1>briefcase.png</string1>
- <string2></string2>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Thu, 18 May 2000 12:20:13 GMT</last_modification_time>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>custom8</name>
- <cxx_use_heap>True</cxx_use_heap>
- <creation_function>e_create_image_widget</creation_function>
- <string1>malehead.png</string1>
- <string2></string2>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Thu, 18 May 2000 12:20:16 GMT</last_modification_time>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>4</top_attach>
- <bottom_attach>6</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkScrolledWindow</class>
- <name>scrolledwindow2</name>
- <cxx_use_heap>True</cxx_use_heap>
- <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
- <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
- <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
- <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
- <child>
- <left_attach>1</left_attach>
- <right_attach>6</right_attach>
- <top_attach>8</top_attach>
- <bottom_attach>9</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>True</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkText</class>
- <name>text-comments</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text></text>
- </widget>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>custom9</name>
- <cxx_use_heap>True</cxx_use_heap>
- <creation_function>e_create_image_widget</creation_function>
- <string1>globe.png</string1>
- <string2></string2>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Thu, 18 May 2000 12:20:19 GMT</last_modification_time>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>7</top_attach>
- <bottom_attach>9</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label16</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>Details</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GnomeAppBar</class>
- <child_name>GnomeApp:appbar</child_name>
- <name>appbar1</name>
- <cxx_use_heap>True</cxx_use_heap>
- <has_progress>True</has_progress>
- <has_status>True</has_status>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
-</widget>
-
-</GTK-Interface>
diff --git a/addressbook/contact-editor/e-contact-editor-address.c b/addressbook/contact-editor/e-contact-editor-address.c
deleted file mode 100644
index 777a3cb617..0000000000
--- a/addressbook/contact-editor/e-contact-editor-address.c
+++ /dev/null
@@ -1,243 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-contact-editor-address.c
- * Copyright (C) 2000 Helix Code, Inc.
- * Author: Chris Lahey <clahey@helixcode.com>
- *
- * 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 <libgnomeui/gnome-stock.h>
-#include <gal/widgets/e-unicode.h>
-#include <e-contact-editor-address.h>
-
-static void e_contact_editor_address_init (EContactEditorAddress *card);
-static void e_contact_editor_address_class_init (EContactEditorAddressClass *klass);
-static void e_contact_editor_address_set_arg (GtkObject *o, GtkArg *arg, guint arg_id);
-static void e_contact_editor_address_get_arg (GtkObject *object, GtkArg *arg, guint arg_id);
-static void e_contact_editor_address_destroy (GtkObject *object);
-
-static void fill_in_info(EContactEditorAddress *editor);
-static void extract_info(EContactEditorAddress *editor);
-
-static GnomeDialogClass *parent_class = NULL;
-
-/* The arguments we take */
-enum {
- ARG_0,
- ARG_ADDRESS,
- ARG_IS_READ_ONLY
-};
-
-GtkType
-e_contact_editor_address_get_type (void)
-{
- static GtkType contact_editor_address_type = 0;
-
- if (!contact_editor_address_type)
- {
- static const GtkTypeInfo contact_editor_address_info =
- {
- "EContactEditorAddress",
- sizeof (EContactEditorAddress),
- sizeof (EContactEditorAddressClass),
- (GtkClassInitFunc) e_contact_editor_address_class_init,
- (GtkObjectInitFunc) e_contact_editor_address_init,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
- };
-
- contact_editor_address_type = gtk_type_unique (gnome_dialog_get_type (), &contact_editor_address_info);
- }
-
- return contact_editor_address_type;
-}
-
-static void
-e_contact_editor_address_class_init (EContactEditorAddressClass *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 ("EContactEditorAddress::address", GTK_TYPE_POINTER,
- GTK_ARG_READWRITE, ARG_ADDRESS);
- gtk_object_add_arg_type ("EContactEditorAddress::is_read_only", GTK_TYPE_BOOL,
- GTK_ARG_READWRITE, ARG_IS_READ_ONLY);
-
- object_class->set_arg = e_contact_editor_address_set_arg;
- object_class->get_arg = e_contact_editor_address_get_arg;
- object_class->destroy = e_contact_editor_address_destroy;
-}
-
-static void
-e_contact_editor_address_init (EContactEditorAddress *e_contact_editor_address)
-{
- GladeXML *gui;
- GtkWidget *widget;
-
- gnome_dialog_append_button ( GNOME_DIALOG(e_contact_editor_address),
- GNOME_STOCK_BUTTON_OK);
-
- gnome_dialog_append_button ( GNOME_DIALOG(e_contact_editor_address),
- GNOME_STOCK_BUTTON_CANCEL);
-
- gtk_window_set_policy(GTK_WINDOW(e_contact_editor_address), FALSE, TRUE, FALSE);
-
- e_contact_editor_address->address = NULL;
-
- gui = glade_xml_new (EVOLUTION_GLADEDIR "/fulladdr.glade", NULL);
- e_contact_editor_address->gui = gui;
-
- widget = glade_xml_get_widget(gui, "table-checkaddress");
- gtk_widget_ref(widget);
- gtk_container_remove(GTK_CONTAINER(widget->parent), widget);
- gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (e_contact_editor_address)->vbox), widget, TRUE, TRUE, 0);
- gtk_widget_unref(widget);
-}
-
-void
-e_contact_editor_address_destroy (GtkObject *object)
-{
- EContactEditorAddress *e_contact_editor_address = E_CONTACT_EDITOR_ADDRESS(object);
-
- if (e_contact_editor_address->gui)
- gtk_object_unref(GTK_OBJECT(e_contact_editor_address->gui));
- e_card_delivery_address_free(e_contact_editor_address->address);
-}
-
-GtkWidget*
-e_contact_editor_address_new (const ECardDeliveryAddress *address)
-{
- GtkWidget *widget = GTK_WIDGET (gtk_type_new (e_contact_editor_address_get_type ()));
- gtk_object_set (GTK_OBJECT(widget),
- "address", address,
- NULL);
- return widget;
-}
-
-static void
-e_contact_editor_address_set_arg (GtkObject *o, GtkArg *arg, guint arg_id)
-{
- EContactEditorAddress *e_contact_editor_address;
-
- e_contact_editor_address = E_CONTACT_EDITOR_ADDRESS (o);
-
- switch (arg_id){
- case ARG_ADDRESS:
- if (e_contact_editor_address->address)
- e_card_delivery_address_free(e_contact_editor_address->address);
- e_contact_editor_address->address = e_card_delivery_address_copy(GTK_VALUE_POINTER (*arg));
- fill_in_info(e_contact_editor_address);
- break;
- case ARG_IS_READ_ONLY: {
- int i;
- char *entry_names[] = {
- "entry-street",
- "entry-city",
- "entry-ext",
- "entry-po",
- "entry-region",
- "combo-country",
- "entry-code",
- NULL
- };
- e_contact_editor_address->is_read_only = GTK_VALUE_BOOL (*arg) ? TRUE : FALSE;
- for (i = 0; entry_names[i] != NULL; i ++) {
- gtk_widget_set_sensitive (glade_xml_get_widget(e_contact_editor_address->gui, entry_names[i]), !e_contact_editor_address->is_read_only);
- }
- break;
- }
- }
-}
-
-static void
-e_contact_editor_address_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
-{
- EContactEditorAddress *e_contact_editor_address;
-
- e_contact_editor_address = E_CONTACT_EDITOR_ADDRESS (object);
-
- switch (arg_id) {
- case ARG_ADDRESS:
- extract_info(e_contact_editor_address);
- GTK_VALUE_POINTER (*arg) = e_card_delivery_address_copy(e_contact_editor_address->address);
- break;
- case ARG_IS_READ_ONLY:
- GTK_VALUE_BOOL (*arg) = e_contact_editor_address->is_read_only ? TRUE : FALSE;
- break;
- default:
- arg->type = GTK_TYPE_INVALID;
- break;
- }
-}
-
-static void
-fill_in_field(EContactEditorAddress *editor, char *field, char *string)
-{
- GtkEditable *editable = GTK_EDITABLE(glade_xml_get_widget(editor->gui, field));
- if (editable) {
- e_utf8_gtk_editable_set_text(editable, string);
- }
-}
-
-static void
-fill_in_info(EContactEditorAddress *editor)
-{
- ECardDeliveryAddress *address = editor->address;
- if (address) {
- fill_in_field(editor, "entry-street" , address->street );
- fill_in_field(editor, "entry-po" , address->po );
- fill_in_field(editor, "entry-ext" , address->ext );
- fill_in_field(editor, "entry-city" , address->city );
- fill_in_field(editor, "entry-region" , address->region );
- fill_in_field(editor, "entry-code" , address->code );
- fill_in_field(editor, "entry-country", address->country);
- }
-}
-
-static char *
-extract_field(EContactEditorAddress *editor, char *field)
-{
- GtkEditable *editable = GTK_EDITABLE(glade_xml_get_widget(editor->gui, field));
- if (editable)
- return e_utf8_gtk_editable_get_text(editable);
- else
- return NULL;
-}
-
-static void
-extract_info(EContactEditorAddress *editor)
-{
- ECardDeliveryAddress *address = editor->address;
- if (!address) {
- address = e_card_delivery_address_new();
- editor->address = address;
- }
- address->street = extract_field(editor, "entry-street" );
- address->po = extract_field(editor, "entry-po" );
- address->ext = extract_field(editor, "entry-ext" );
- address->city = extract_field(editor, "entry-city" );
- address->region = extract_field(editor, "entry-region" );
- address->code = extract_field(editor, "entry-code" );
- address->country = extract_field(editor, "entry-country");
-}
diff --git a/addressbook/contact-editor/e-contact-editor-address.h b/addressbook/contact-editor/e-contact-editor-address.h
deleted file mode 100644
index 48d88aab85..0000000000
--- a/addressbook/contact-editor/e-contact-editor-address.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* e-contact-editor-address.h
- * Copyright (C) 2000 Helix Code, Inc.
- * Author: Chris Lahey <clahey@helixcode.com>
- *
- * 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_ADDRESS_H__
-#define __E_CONTACT_EDITOR_ADDRESS_H__
-
-#include <libgnomeui/gnome-dialog.h>
-#include <glade/glade.h>
-#include <ebook/e-card.h>
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-/* EContactEditorAddress - 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_ADDRESS_TYPE (e_contact_editor_address_get_type ())
-#define E_CONTACT_EDITOR_ADDRESS(obj) (GTK_CHECK_CAST ((obj), E_CONTACT_EDITOR_ADDRESS_TYPE, EContactEditorAddress))
-#define E_CONTACT_EDITOR_ADDRESS_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_CONTACT_EDITOR_ADDRESS_TYPE, EContactEditorAddressClass))
-#define E_IS_CONTACT_EDITOR_ADDRESS(obj) (GTK_CHECK_TYPE ((obj), E_CONTACT_EDITOR_ADDRESS_TYPE))
-#define E_IS_CONTACT_EDITOR_ADDRESS_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_CONTACT_EDITOR_ADDRESS_TYPE))
-
-
-typedef struct _EContactEditorAddress EContactEditorAddress;
-typedef struct _EContactEditorAddressClass EContactEditorAddressClass;
-
-struct _EContactEditorAddress
-{
- GnomeDialog parent;
-
- /* item specific fields */
- ECardDeliveryAddress *address;
-
- guint is_read_only : 1;
-
- GladeXML *gui;
-};
-
-struct _EContactEditorAddressClass
-{
- GnomeDialogClass parent_class;
-};
-
-
-GtkWidget *e_contact_editor_address_new(const ECardDeliveryAddress *name);
-GtkType e_contact_editor_address_get_type (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-#endif /* __E_CONTACT_EDITOR_ADDRESS_H__ */
diff --git a/addressbook/contact-editor/e-contact-editor-confirm-delete.glade b/addressbook/contact-editor/e-contact-editor-confirm-delete.glade
deleted file mode 100644
index b91a040d46..0000000000
--- a/addressbook/contact-editor/e-contact-editor-confirm-delete.glade
+++ /dev/null
@@ -1,83 +0,0 @@
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <name>e-contact-editor-confirm-delete</name>
- <program_name>e-contact-editor-confirm-delete</program_name>
- <directory></directory>
- <source_directory>src</source_directory>
- <pixmaps_directory>pixmaps</pixmaps_directory>
- <language>C</language>
- <gnome_support>True</gnome_support>
- <gettext_support>True</gettext_support>
- <use_widget_names>True</use_widget_names>
- <output_main_file>False</output_main_file>
- <output_support_files>False</output_support_files>
- <output_build_files>False</output_build_files>
- <gnome_help_support>True</gnome_help_support>
-</project>
-
-<widget>
- <class>GnomeMessageBox</class>
- <name>confirm-dialog</name>
- <message_box_type>GNOME_MESSAGE_BOX_QUESTION</message_box_type>
- <message>Are you sure you want
-to delete this contact?</message>
- <title>Delete Contact?</title>
- <position>GTK_WIN_POS_NONE</position>
- <modal>False</modal>
- <allow_shrink>False</allow_shrink>
- <allow_grow>False</allow_grow>
- <auto_shrink>False</auto_shrink>
- <auto_close>True</auto_close>
- <hide_on_close>False</hide_on_close>
-
- <widget>
- <class>GtkVBox</class>
- <child_name>GnomeDialog:vbox</child_name>
- <name>dialog-vbox1</name>
- <homogeneous>False</homogeneous>
- <spacing>8</spacing>
- <child>
- <padding>4</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkHButtonBox</class>
- <child_name>GnomeDialog:action_area</child_name>
- <name>dialog-action_area1</name>
- <layout_style>GTK_BUTTONBOX_END</layout_style>
- <spacing>8</spacing>
- <child_min_width>85</child_min_width>
- <child_min_height>27</child_min_height>
- <child_ipad_x>7</child_ipad_x>
- <child_ipad_y>0</child_ipad_y>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- <pack>GTK_PACK_END</pack>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>button1</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button2</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
- </widget>
- </widget>
- </widget>
-</widget>
-
-</GTK-Interface>
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 69477d3325..0000000000
--- a/addressbook/contact-editor/e-contact-editor-fullname.c
+++ /dev/null
@@ -1,243 +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 <clahey@helixcode.com>
- *
- * 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 <libgnomeui/gnome-stock.h>
-#include <gal/widgets/e-unicode.h>
-#include "e-contact-editor-fullname.h"
-
-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,
- ARG_IS_READ_ONLY
-};
-
-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);
-
- gtk_object_add_arg_type ("EContactEditorFullname::is_read_only", GTK_TYPE_BOOL,
- GTK_ARG_READWRITE, ARG_IS_READ_ONLY);
-
- 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 (const 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;
- case ARG_IS_READ_ONLY: {
- int i;
- char *entry_names[] = {
- "combo-title",
- "combo-suffix",
- "entry-first",
- "entry-middle",
- "entry-last",
- NULL
- };
- e_contact_editor_fullname->is_read_only = GTK_VALUE_BOOL (*arg) ? TRUE : FALSE;
- for (i = 0; entry_names[i] != NULL; i ++) {
- gtk_widget_set_sensitive (glade_xml_get_widget(e_contact_editor_fullname->gui,
- entry_names[i]),
- !e_contact_editor_fullname->is_read_only);
- }
- 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;
- case ARG_IS_READ_ONLY:
- GTK_VALUE_BOOL (*arg) = e_contact_editor_fullname->is_read_only ? TRUE : FALSE;
- 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)
- e_utf8_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 e_utf8_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();
- editor->name = name;
- }
-
- 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 70bb793d0a..0000000000
--- a/addressbook/contact-editor/e-contact-editor-fullname.h
+++ /dev/null
@@ -1,78 +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 <clahey@helixcode.com>
- *
- * 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 <libgnomeui/gnome-dialog.h>
-#include <glade/glade.h>
-#include <ebook/e-card.h>
-
-#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;
-
- /* Whether the dialog will accept modifications */
- guint is_read_only : 1;
-};
-
-struct _EContactEditorFullnameClass
-{
- GnomeDialogClass parent_class;
-};
-
-
-GtkWidget *e_contact_editor_fullname_new(const 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.c b/addressbook/contact-editor/e-contact-editor.c
deleted file mode 100644
index 8c9b7519a3..0000000000
--- a/addressbook/contact-editor/e-contact-editor.c
+++ /dev/null
@@ -1,2125 +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 <clahey@helixcode.com>
- *
- * 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 <time.h>
-#include <gtk/gtkcheckbutton.h>
-#include <gtk/gtkcheckmenuitem.h>
-#include <gtk/gtkcombo.h>
-#include <gtk/gtktext.h>
-#include <libgnomeui/gnome-popup-menu.h>
-#include <libgnomeui/gnome-dateedit.h>
-#include <libgnome/gnome-i18n.h>
-
-#include <bonobo/bonobo-ui-container.h>
-#include <bonobo/bonobo-ui-util.h>
-#include <gdk-pixbuf/gdk-pixbuf.h>
-#include <gdk-pixbuf/gnome-canvas-pixbuf.h>
-#include <gal/widgets/e-categories.h>
-#include <gal/widgets/e-gui-utils.h>
-#include <gal/widgets/e-unicode.h>
-
-#include "addressbook/printing/e-contact-print.h"
-#include "addressbook/printing/e-contact-print-envelope.h"
-#include "e-util/e-gui-utils.h"
-
-#include "e-contact-editor.h"
-#include "e-contact-editor-address.h"
-#include "e-contact-editor-fullname.h"
-#include "e-contact-save-as.h"
-
-/* Signal IDs */
-enum {
- ADD_CARD,
- COMMIT_CARD,
- DELETE_CARD,
- EDITOR_CLOSED,
- LAST_SIGNAL
-};
-
-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 enable_writable_fields(EContactEditor *editor);
-static void set_read_only(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 GtkObjectClass *parent_class = NULL;
-
-static guint contact_editor_signals[LAST_SIGNAL];
-
-/* The arguments we take */
-enum {
- ARG_0,
- ARG_CARD,
- ARG_IS_NEW_CARD,
- ARG_IS_READ_ONLY,
- ARG_WRITABLE_FIELDS
-};
-
-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_TYPE_OBJECT, &contact_editor_info);
- }
-
- return contact_editor_type;
-}
-
-static void
-e_contact_editor_class_init (EContactEditorClass *klass)
-{
- GtkObjectClass *object_class;
-
- object_class = (GtkObjectClass*) klass;
-
- parent_class = gtk_type_class (GTK_TYPE_OBJECT);
-
- gtk_object_add_arg_type ("EContactEditor::card", GTK_TYPE_OBJECT,
- GTK_ARG_READWRITE, ARG_CARD);
- gtk_object_add_arg_type ("EContactEditor::is_new_card", GTK_TYPE_BOOL,
- GTK_ARG_READWRITE, ARG_IS_NEW_CARD);
- gtk_object_add_arg_type ("EContactEditor::writable_fields", GTK_TYPE_POINTER,
- GTK_ARG_READWRITE, ARG_WRITABLE_FIELDS);
- gtk_object_add_arg_type ("EContactEditor::is_read_only", GTK_TYPE_BOOL,
- GTK_ARG_READWRITE, ARG_IS_READ_ONLY);
-
- contact_editor_signals[ADD_CARD] =
- gtk_signal_new ("add_card",
- GTK_RUN_FIRST,
- object_class->type,
- GTK_SIGNAL_OFFSET (EContactEditorClass, add_card),
- gtk_marshal_NONE__OBJECT,
- GTK_TYPE_NONE, 1,
- GTK_TYPE_OBJECT);
-
- contact_editor_signals[COMMIT_CARD] =
- gtk_signal_new ("commit_card",
- GTK_RUN_FIRST,
- object_class->type,
- GTK_SIGNAL_OFFSET (EContactEditorClass, commit_card),
- gtk_marshal_NONE__OBJECT,
- GTK_TYPE_NONE, 1,
- GTK_TYPE_OBJECT);
-
- contact_editor_signals[DELETE_CARD] =
- gtk_signal_new ("delete_card",
- GTK_RUN_FIRST,
- object_class->type,
- GTK_SIGNAL_OFFSET (EContactEditorClass, delete_card),
- gtk_marshal_NONE__OBJECT,
- GTK_TYPE_NONE, 1,
- GTK_TYPE_OBJECT);
-
- contact_editor_signals[EDITOR_CLOSED] =
- gtk_signal_new ("editor_closed",
- GTK_RUN_FIRST,
- object_class->type,
- GTK_SIGNAL_OFFSET (EContactEditorClass, editor_closed),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
-
- gtk_object_class_add_signals (object_class, contact_editor_signals, LAST_SIGNAL);
-
- 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", EVOLUTIONDIR, 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
-wants_html_changed (GtkWidget *widget, EContactEditor *editor)
-{
- gboolean wants_html;
- gtk_object_get(GTK_OBJECT(widget),
- "active", &wants_html,
- NULL);
- gtk_object_set(GTK_OBJECT(editor->card),
- "wants_html", wants_html,
- NULL);
-}
-
-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 = e_utf8_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);
-#if 0
- phone->number = NULL;
-#endif
- 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 = e_utf8_gtk_entry_get_text(entry);
-
- e_card_simple_set_email(editor->simple, editor->email_choice, string);
-
- g_free (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 = e_utf8_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 && ((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) {
- 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) {
- 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) {
- 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;
- char *trystring;
- ECardName *name = editor->name;
- int i;
- int style;
-
- if (!(file_as && GTK_IS_ENTRY(file_as)))
- return -1;
-
- filestring = e_utf8_gtk_entry_get_text(file_as);
-
- style = -1;
- for (i = 0; i < 5; i++) {
- trystring = name_to_style(name, editor->company, i);
- if (!strcmp(trystring, filestring)) {
- g_free(trystring);
- g_free(filestring);
- return i;
- }
- g_free(trystring);
- }
- g_free (filestring);
- 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 (!(file_as && GTK_IS_ENTRY(file_as)))
- return;
-
- if (style == -1) {
- string = e_utf8_gtk_entry_get_text(file_as);
- strings = g_list_append(strings, string);
- }
-
- widget = glade_xml_get_widget(editor->gui, "combo-file-as");
-
- for (i = 0; i < 5; i++) {
- if (style_makes_sense(editor->name, editor->company, i)) {
- char *u;
- u = name_to_style(editor->name, editor->company, i);
- string = e_utf8_to_gtk_string (widget, u);
- g_free (u);
- if (string) strings = g_list_append(strings, string);
- }
- }
-
- 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);
- e_utf8_gtk_entry_set_text(file_as, string);
- g_free(string);
- }
-}
-
-static void
-name_entry_changed (GtkWidget *widget, EContactEditor *editor)
-{
- int style = 0;
- char *string;
-
- style = file_as_get_style(editor);
-
- e_card_name_free(editor->name);
-
- string = e_utf8_gtk_entry_get_text (GTK_ENTRY(widget));
- editor->name = e_card_name_from_string(string);
- g_free (string);
-
- file_as_set_style(editor, style);
-}
-
-static void
-company_entry_changed (GtkWidget *widget, EContactEditor *editor)
-{
- int style = 0;
-
- style = file_as_get_style(editor);
-
- g_free(editor->company);
-
- editor->company = e_utf8_gtk_entry_get_text(GTK_ENTRY(widget));
-
- 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_object_set (GTK_OBJECT (dialog),
- "is_read_only", editor->is_read_only,
- NULL);
- gtk_widget_show(GTK_WIDGET(dialog));
- result = gnome_dialog_run (dialog);
-
- if (result == 0) {
- ECardName *name;
- GtkWidget *fname_widget;
- int style = 0;
-
- gtk_object_get(GTK_OBJECT(dialog),
- "name", &name,
- NULL);
-
- style = file_as_get_style(editor);
-
- 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);
- e_utf8_gtk_entry_set_text(GTK_ENTRY(fname_widget), full_name);
- g_free(full_name);
- }
-
- e_card_name_free(editor->name);
- editor->name = e_card_name_copy(name);
-
- file_as_set_style(editor, style);
- }
- gtk_object_unref(GTK_OBJECT(dialog));
-}
-
-static void
-full_addr_clicked(GtkWidget *button, EContactEditor *editor)
-{
- GnomeDialog *dialog;
- int result;
- const ECardDeliveryAddress *address;
-
- address = e_card_simple_get_delivery_address(editor->simple, editor->address_choice);
-
- dialog = GNOME_DIALOG(e_contact_editor_address_new(address));
- gtk_object_set (GTK_OBJECT (dialog),
- "is_read_only", editor->is_read_only,
- NULL);
- gtk_widget_show(GTK_WIDGET(dialog));
-
- result = gnome_dialog_run (dialog);
- if (result == 0) {
- ECardDeliveryAddress *new_address;
- GtkWidget *address_widget;
-
- gtk_object_get(GTK_OBJECT(dialog),
- "address", &new_address,
- NULL);
-
- address_widget = glade_xml_get_widget(editor->gui, "text-address");
- if (address_widget && GTK_IS_EDITABLE(address_widget)) {
- char *string = e_card_delivery_address_to_string(new_address);
- e_utf8_gtk_editable_set_text(GTK_EDITABLE(address_widget), string);
- g_free(string);
- } else {
- ECardAddrLabel *address = e_card_delivery_address_to_label(new_address);
- e_card_simple_set_address(editor->simple, editor->address_choice, address);
- e_card_address_label_free(address);
- }
-
- e_card_simple_set_delivery_address(editor->simple, editor->address_choice, new_address);
-
- e_card_delivery_address_free(new_address);
- }
- 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 = e_utf8_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_categories_new(categories));
- gtk_object_set(GTK_OBJECT(dialog),
- "header", _("This contact belongs to these categories:"),
- NULL);
- gtk_widget_show(GTK_WIDGET(dialog));
- result = gnome_dialog_run (dialog);
- g_free (categories);
- if (result == 0) {
- gtk_object_get(GTK_OBJECT(dialog),
- "categories", &categories,
- NULL);
- if (entry && GTK_IS_ENTRY(entry))
- e_utf8_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 0
- if (!entry)
- g_free(categories);
-#endif
-}
-
-/* Emits the signal to request saving a card */
-static void
-save_card (EContactEditor *ce)
-{
- extract_info (ce);
- e_card_simple_sync_card (ce->simple);
-
- if (ce->is_new_card)
- gtk_signal_emit (GTK_OBJECT (ce), contact_editor_signals[ADD_CARD],
- ce->card);
- else
- gtk_signal_emit (GTK_OBJECT (ce), contact_editor_signals[COMMIT_CARD],
- ce->card);
-
- /* FIXME: should we set the ce->is_new_card here or have the client code
- * set the "is_new_card" argument on the contact editor object?
- */
-
- ce->is_new_card = FALSE;
-}
-
-/* Closes the dialog box and emits the appropriate signals */
-static void
-close_dialog (EContactEditor *ce)
-{
- g_assert (ce->app != NULL);
-
- gtk_widget_destroy (ce->app);
- ce->app = NULL;
-
- gtk_signal_emit (GTK_OBJECT (ce), contact_editor_signals[EDITOR_CLOSED]);
-}
-
-/* Menu callbacks */
-
-/* File/Save callback */
-static void
-file_save_cb (GtkWidget *widget, gpointer data)
-{
- EContactEditor *ce;
-
- ce = E_CONTACT_EDITOR (data);
- save_card (ce);
-}
-
-/* File/Close callback */
-static void
-file_close_cb (GtkWidget *widget, gpointer data)
-{
- EContactEditor *ce;
-
- ce = E_CONTACT_EDITOR (data);
- close_dialog (ce);
-}
-
-static void
-file_save_as_cb (GtkWidget *widget, gpointer data)
-{
- EContactEditor *ce;
- ECard *card;
-
- ce = E_CONTACT_EDITOR (data);
-
- extract_info (ce);
- e_card_simple_sync_card (ce->simple);
-
- card = ce->card;
- e_contact_save_as("Save as VCard", card);
-}
-
-static void
-file_send_as_cb (GtkWidget *widget, gpointer data)
-{
- EContactEditor *ce;
- ECard *card;
-
- ce = E_CONTACT_EDITOR (data);
-
- extract_info (ce);
- e_card_simple_sync_card (ce->simple);
-
- card = ce->card;
- e_card_send(card, E_CARD_DISPOSITION_AS_ATTACHMENT);
-}
-
-static void
-file_send_to_cb (GtkWidget *widget, gpointer data)
-{
- EContactEditor *ce;
- ECard *card;
-
- ce = E_CONTACT_EDITOR (data);
-
- extract_info (ce);
- e_card_simple_sync_card (ce->simple);
-
- card = ce->card;
- e_card_send(card, E_CARD_DISPOSITION_AS_TO);
-}
-
-gboolean
-e_contact_editor_confirm_delete(GtkWindow *parent)
-{
- GnomeDialog *dialog;
- GladeXML *gui;
- int result;
-
- gui = glade_xml_new (EVOLUTION_GLADEDIR "/e-contact-editor-confirm-delete.glade", NULL);
-
- dialog = GNOME_DIALOG(glade_xml_get_widget(gui, "confirm-dialog"));
-
- gnome_dialog_set_parent(dialog, parent);
-
- result = gnome_dialog_run_and_close(dialog);
-
- gtk_object_unref(GTK_OBJECT(gui));
-
- return !result;
-}
-
-static void
-delete_cb (GtkWidget *widget, gpointer data)
-{
- EContactEditor *ce = E_CONTACT_EDITOR (data);
- ECard *card = ce->card;
- ECardSimple *simple = ce->simple;
-
- gtk_object_ref(GTK_OBJECT(card));
- gtk_object_ref(GTK_OBJECT(simple));
-
- if (e_contact_editor_confirm_delete(GTK_WINDOW(ce->app))) {
-
- extract_info (ce);
- e_card_simple_sync_card (simple);
-
- if (!ce->is_new_card)
- gtk_signal_emit (GTK_OBJECT (ce), contact_editor_signals[DELETE_CARD],
- card);
-
- file_close_cb(widget, data);
- }
-
- gtk_object_unref(GTK_OBJECT(card));
- gtk_object_unref(GTK_OBJECT(simple));
-}
-
-/* Emits the signal to request printing a card */
-static void
-print_cb (BonoboUIComponent *uih, void *data, const char *path)
-{
- EContactEditor *ce;
-
- ce = E_CONTACT_EDITOR (data);
-
- extract_info (ce);
- e_card_simple_sync_card (ce->simple);
-
- gtk_widget_show(e_contact_print_card_dialog_new(ce->card));
-}
-
-/* Emits the signal to request printing a card */
-static void
-print_envelope_cb (BonoboUIComponent *uih, void *data, const char *path)
-{
- EContactEditor *ce;
-
- ce = E_CONTACT_EDITOR (data);
-
- extract_info (ce);
- e_card_simple_sync_card (ce->simple);
-
- gtk_widget_show(e_contact_print_envelope_dialog_new(ce->card));
-}
-
-/* Toolbar/Save and Close callback */
-static void
-tb_save_and_close_cb (BonoboUIComponent *uih, void *data, const char *path)
-{
- EContactEditor *ce;
-
- ce = E_CONTACT_EDITOR (data);
- save_card (ce);
- close_dialog (ce);
-}
-
-static
-BonoboUIVerb verbs [] = {
- BONOBO_UI_UNSAFE_VERB ("ContactEditorSave", file_save_cb),
- BONOBO_UI_UNSAFE_VERB ("ContactEditorSaveAs", file_save_as_cb),
- BONOBO_UI_UNSAFE_VERB ("ContactEditorSaveClose", tb_save_and_close_cb),
- BONOBO_UI_UNSAFE_VERB ("ContactEditorSendAs", file_send_as_cb),
- BONOBO_UI_UNSAFE_VERB ("ContactEditorSendTo", file_send_to_cb),
- BONOBO_UI_UNSAFE_VERB ("ContactEditorDelete", delete_cb),
- BONOBO_UI_UNSAFE_VERB ("ContactEditorPrint", print_cb),
- BONOBO_UI_UNSAFE_VERB ("ContactEditorPrintEnvelope", print_envelope_cb),
- /* BONOBO_UI_UNSAFE_VERB ("ContactEditorPageSetup", file_page_setup_menu), */
- BONOBO_UI_UNSAFE_VERB ("ContactEditorClose", file_close_cb),
-
- BONOBO_UI_VERB_END
-};
-
-static void
-create_ui (EContactEditor *ce)
-{
- bonobo_ui_component_add_verb_list_with_data (
- ce->uic, verbs, ce);
-
- bonobo_ui_util_set_ui (ce->uic, EVOLUTION_DATADIR,
- "evolution-contact-editor.xml",
- "evolution-contact-editor");
-}
-
-/* Callback used when the dialog box is destroyed */
-static gint
-app_delete_event_cb (GtkWidget *widget, GdkEvent *event, gpointer data)
-{
- EContactEditor *ce;
-
- ce = E_CONTACT_EDITOR (data);
-
- close_dialog (ce);
- return TRUE;
-}
-
-static GList *
-add_to_tab_order(GList *list, GladeXML *gui, char *name)
-{
- GtkWidget *widget = glade_xml_get_widget(gui, name);
- return g_list_prepend(list, widget);
-}
-
-static void
-setup_tab_order(GladeXML *gui)
-{
- GtkWidget *container;
- GList *list = NULL;
-
- container = glade_xml_get_widget(gui, "table-contact-editor-general");
-
- if (container) {
- list = add_to_tab_order(list, gui, "entry-fullname");
- list = add_to_tab_order(list, gui, "entry-jobtitle");
- list = add_to_tab_order(list, gui, "entry-company");
- list = add_to_tab_order(list, gui, "combo-file-as");
- list = add_to_tab_order(list, gui, "entry-phone1");
- list = add_to_tab_order(list, gui, "entry-phone2");
- list = add_to_tab_order(list, gui, "entry-phone3");
- list = add_to_tab_order(list, gui, "entry-phone4");
- list = g_list_reverse(list);
- e_container_change_tab_order(GTK_CONTAINER(container), list);
- g_list_free(list);
-
- list = NULL;
- list = add_to_tab_order(list, gui, "entry-email1");
- list = add_to_tab_order(list, gui, "entry-web");
- list = add_to_tab_order(list, gui, "text-address");
- list = add_to_tab_order(list, gui, "alignment-contacts");
- list = g_list_reverse(list);
- e_container_change_tab_order(GTK_CONTAINER(container), list);
- g_list_free(list);
- }
-}
-
-static void
-e_contact_editor_init (EContactEditor *e_contact_editor)
-{
- GladeXML *gui;
- GtkWidget *widget;
- GtkWidget *bonobo_win;
- GtkWidget *wants_html;
- BonoboUIContainer *container;
-
- 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 = e_card_name_new();
- 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;
-
- setup_tab_order(gui);
-
- e_contact_editor->app = glade_xml_get_widget (gui, "contact editor");
-
- e_container_foreach_leaf (GTK_CONTAINER (e_contact_editor->app),
- (GtkCallback) add_field_callback,
- e_contact_editor);
-
- _replace_buttons(e_contact_editor);
- set_entry_changed_signals(e_contact_editor);
-
- wants_html = glade_xml_get_widget(e_contact_editor->gui, "checkbutton-htmlmail");
- if (wants_html && GTK_IS_TOGGLE_BUTTON(wants_html))
- gtk_signal_connect(GTK_OBJECT(wants_html), "toggled",
- wants_html_changed, 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-fulladdr");
- if (widget && GTK_IS_BUTTON(widget))
- gtk_signal_connect(GTK_OBJECT(widget), "clicked",
- full_addr_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);
-
-
- /* Construct the app */
- bonobo_win = bonobo_window_new ("contact-editor-dialog", "Contact Editor");
-
- /* FIXME: The sucking bit */
- {
- GtkWidget *contents;
-
- contents = gnome_dock_get_client_area (
- GNOME_DOCK (GNOME_APP (e_contact_editor->app)->dock));
- if (!contents) {
- g_message ("contact_editor_construct(): Could not get contents");
- return;
- }
- gtk_widget_ref (contents);
- gtk_container_remove (GTK_CONTAINER (contents->parent), contents);
- bonobo_window_set_contents (BONOBO_WINDOW (bonobo_win), contents);
- gtk_widget_destroy (e_contact_editor->app);
- e_contact_editor->app = bonobo_win;
- }
-
- /* Build the menu and toolbar */
-
- container = bonobo_ui_container_new ();
- bonobo_ui_container_set_win (container, BONOBO_WINDOW (e_contact_editor->app));
-
- e_contact_editor->uic = bonobo_ui_component_new_default ();
- if (!e_contact_editor->uic) {
- g_message ("e_contact_editor_init(): eeeeek, could not create the UI handler!");
- return;
- }
- bonobo_ui_component_set_container (e_contact_editor->uic,
- bonobo_object_corba_objref (
- BONOBO_OBJECT (container)));
-
- create_ui (e_contact_editor);
-
- /* Connect to the deletion of the dialog */
-
- gtk_signal_connect (GTK_OBJECT (e_contact_editor->app), "delete_event",
- GTK_SIGNAL_FUNC (app_delete_event_cb), e_contact_editor);
-}
-
-void
-e_contact_editor_destroy (GtkObject *object) {
- EContactEditor *e_contact_editor = E_CONTACT_EDITOR(object);
-
- if (e_contact_editor->writable_fields) {
- gtk_object_unref(GTK_OBJECT(e_contact_editor->writable_fields));
- }
- 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));
-
- if (e_contact_editor->name)
- e_card_name_free(e_contact_editor->name);
-
- g_free (e_contact_editor->company);
-
- gtk_object_unref(GTK_OBJECT(e_contact_editor->gui));
-}
-
-EContactEditor *
-e_contact_editor_new (ECard *card,
- gboolean is_new_card,
- EList *fields,
- gboolean is_read_only)
-{
- EContactEditor *ce;
-
- ce = E_CONTACT_EDITOR (gtk_type_new (E_CONTACT_EDITOR_TYPE));
-
- gtk_object_set (GTK_OBJECT (ce),
- "card", card,
- "is_new_card", is_new_card,
- "writable_fields", fields,
- "is_read_only", is_read_only,
- NULL);
-
- gtk_widget_show (ce->app);
- return ce;
-}
-
-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;
-
- case ARG_IS_NEW_CARD:
- editor->is_new_card = GTK_VALUE_BOOL (*arg) ? TRUE : FALSE;
- break;
-
- case ARG_IS_READ_ONLY: {
- gboolean new_value = GTK_VALUE_BOOL (*arg) ? TRUE : FALSE;
- gboolean changed = (editor->is_read_only != new_value);
-
- editor->is_read_only = new_value;
-
- if (changed)
- set_read_only (editor);
- break;
- }
- case ARG_WRITABLE_FIELDS:
- if (editor->writable_fields)
- gtk_object_unref(GTK_OBJECT(editor->writable_fields));
- editor->writable_fields = GTK_VALUE_POINTER (*arg);
- if (editor->writable_fields)
- gtk_object_ref (GTK_OBJECT (editor->writable_fields));
- else
- editor->writable_fields = e_list_new(NULL, NULL, NULL);
- enable_writable_fields (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;
-
- case ARG_IS_NEW_CARD:
- GTK_VALUE_BOOL (*arg) = e_contact_editor->is_new_card ? TRUE : FALSE;
- break;
-
- case ARG_IS_READ_ONLY:
- GTK_VALUE_BOOL (*arg) = e_contact_editor->is_read_only ? TRUE : FALSE;
- break;
-
- case ARG_WRITABLE_FIELDS:
- if (e_contact_editor->writable_fields)
- GTK_VALUE_POINTER (*arg) = e_list_duplicate (e_contact_editor->writable_fields);
- else
- GTK_VALUE_POINTER (*arg) = NULL;
- 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 *label_widget = glade_xml_get_widget(editor->gui, label);
- if (label_widget && GTK_IS_LABEL(label_widget)) {
- gtk_object_set(GTK_OBJECT(label_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;
-}
-
-static void
-e_contact_editor_build_phone_ui (EContactEditor *editor)
-{
- int i;
-
- 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);
- }
-}
-
-static void
-e_contact_editor_build_email_ui (EContactEditor *editor)
-{
- int i;
-
- 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);
- }
-}
-
-static void
-e_contact_editor_build_address_ui (EContactEditor *editor)
-{
- int i;
-
- 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);
- }
-}
-#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, e_utf8_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);
-
- e_contact_editor_build_phone_ui (editor);
-
- 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);
- gtk_widget_set_sensitive (glade_xml_get_widget (editor->gui, label), TRUE);
- gtk_widget_set_sensitive (glade_xml_get_widget (editor->gui, entry), !editor->is_read_only);
- }
-
- g_free(label);
- g_free(entry);
-}
-
-static void
-_email_arrow_pressed (GtkWidget *widget, GdkEventButton *button, EContactEditor *editor)
-{
- int i;
- int result;
-
- e_contact_editor_build_email_ui (editor);
-
- 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);
-
- /* make sure the buttons/entry is/are sensitive */
- gtk_widget_set_sensitive (glade_xml_get_widget (editor->gui, "label-email1"), TRUE);
- gtk_widget_set_sensitive (glade_xml_get_widget (editor->gui, "entry-email1"), !editor->is_read_only);
- gtk_widget_set_sensitive (glade_xml_get_widget (editor->gui, "checkbutton-htmlmail"), !editor->is_read_only);
- }
-}
-
-static void
-_address_arrow_pressed (GtkWidget *widget, GdkEventButton *button, EContactEditor *editor)
-{
- int i;
- int result;
-
- e_contact_editor_build_address_ui (editor);
-
- 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);
-
- /* make sure the buttons/entry is/are sensitive */
- gtk_widget_set_sensitive (glade_xml_get_widget (editor->gui, "label-address"), TRUE);
- gtk_widget_set_sensitive (glade_xml_get_widget (editor->gui, "button-fulladdr"), !editor->is_read_only);
- gtk_widget_set_sensitive (glade_xml_get_widget (editor->gui, "text-address"), !editor->is_read_only);
- }
-}
-
-static void
-set_field(GtkEntry *entry, const char *string)
-{
- char *oldstring = e_utf8_gtk_entry_get_text(entry);
- if (!string)
- string = "";
- if (strcmp(string, oldstring))
- e_utf8_gtk_entry_set_text(entry, string);
- g_free (oldstring);
-}
-
-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) {
- gchar *u = e_utf8_to_gtk_string ((GtkWidget *) editable, address->data);
- gtk_editable_insert_text(editable, u, strlen(u), &position);
- g_free (u);
- }
-
- 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) {
- gchar *u = e_utf8_to_gtk_string ((GtkWidget *) editable, value);
- gtk_editable_insert_text(editable, u, strlen(u), &position);
- g_free (u);
- }
- }
-}
-
-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) {
- gchar *u = e_utf8_to_gtk_string ((GtkWidget *) editable, arbitrary->value);
- gtk_editable_insert_text(editable, u, strlen(u), &position);
- g_free (u);
- }
- }
-}
-
-static void
-disable_widget_foreach (char *key, GtkWidget *widget, gpointer closure)
-{
- gtk_widget_set_sensitive (widget, FALSE);
-}
-
-static struct {
- char *widget_name;
- ECardSimpleField field_id;
- gboolean desensitize_for_read_only;
-} widget_field_mappings[] = {
- { "entry-web", E_CARD_SIMPLE_FIELD_URL, TRUE },
- { "accellabel-web", E_CARD_SIMPLE_FIELD_URL },
-
- { "entry-jobtitle", E_CARD_SIMPLE_FIELD_TITLE, TRUE },
- { "label-jobtitle", E_CARD_SIMPLE_FIELD_TITLE },
-
- { "entry-company", E_CARD_SIMPLE_FIELD_ORG, TRUE },
- { "label-company", E_CARD_SIMPLE_FIELD_ORG },
-
- { "combo-file-as", E_CARD_SIMPLE_FIELD_FILE_AS, TRUE },
- { "entry-file-as", E_CARD_SIMPLE_FIELD_FILE_AS, TRUE },
- { "accellabel-fileas", E_CARD_SIMPLE_FIELD_FILE_AS },
-
- { "label-department", E_CARD_SIMPLE_FIELD_ORG_UNIT },
- { "entry-department", E_CARD_SIMPLE_FIELD_ORG_UNIT, TRUE },
-
- { "label-office", E_CARD_SIMPLE_FIELD_OFFICE },
- { "entry-office", E_CARD_SIMPLE_FIELD_OFFICE, TRUE },
-
- { "label-profession", E_CARD_SIMPLE_FIELD_ROLE },
- { "entry-profession", E_CARD_SIMPLE_FIELD_ROLE, TRUE },
-
- { "label-manager", E_CARD_SIMPLE_FIELD_MANAGER },
- { "entry-manager", E_CARD_SIMPLE_FIELD_MANAGER, TRUE },
-
- { "label-assistant", E_CARD_SIMPLE_FIELD_ASSISTANT },
- { "entry-assistant", E_CARD_SIMPLE_FIELD_ASSISTANT, TRUE },
-
- { "label-nickname", E_CARD_SIMPLE_FIELD_NICKNAME },
- { "entry-nickname", E_CARD_SIMPLE_FIELD_NICKNAME, TRUE },
-
- { "label-spouse", E_CARD_SIMPLE_FIELD_SPOUSE },
- { "entry-spouse", E_CARD_SIMPLE_FIELD_SPOUSE, TRUE },
-
- { "label-birthday", E_CARD_SIMPLE_FIELD_BIRTH_DATE },
- { "dateedit-birthday", E_CARD_SIMPLE_FIELD_BIRTH_DATE, TRUE },
-
- { "label-anniversary", E_CARD_SIMPLE_FIELD_ANNIVERSARY },
- { "dateedit-anniversary", E_CARD_SIMPLE_FIELD_ANNIVERSARY, TRUE },
-
- { "label-comments", E_CARD_SIMPLE_FIELD_NOTE },
- { "text-comments", E_CARD_SIMPLE_FIELD_NOTE, TRUE },
-
- { "button-fullname", E_CARD_SIMPLE_FIELD_FULL_NAME },
- { "entry-fullname", E_CARD_SIMPLE_FIELD_FULL_NAME, TRUE },
-
- { "button-categories", E_CARD_SIMPLE_FIELD_CATEGORIES, TRUE },
- { "entry-categories", E_CARD_SIMPLE_FIELD_CATEGORIES, TRUE }
-};
-static int num_widget_field_mappings = sizeof(widget_field_mappings) / sizeof (widget_field_mappings[0]);
-
-static void
-enable_writable_fields(EContactEditor *editor)
-{
- EList *fields = editor->writable_fields;
- EIterator *iter;
- GHashTable *dropdown_hash, *supported_hash;
- int i;
- ECardSimple *card;
- char *widget_name;
-
- if (!fields)
- return;
-
- card = e_card_simple_new (e_card_new (""));
-
- dropdown_hash = g_hash_table_new (g_str_hash, g_str_equal);
- supported_hash = g_hash_table_new (g_str_hash, g_str_equal);
-
- /* build our hashtable of the drop down menu items */
- e_contact_editor_build_phone_ui (editor);
- for (i = 0; i < E_CARD_SIMPLE_PHONE_ID_LAST; i ++)
- g_hash_table_insert (dropdown_hash,
- (char*)e_card_simple_get_ecard_field(card, e_card_simple_map_phone_to_field (i)),
- editor->phone_info[i].widget);
- e_contact_editor_build_email_ui (editor);
- for (i = 0; i < E_CARD_SIMPLE_EMAIL_ID_LAST; i ++)
- g_hash_table_insert (dropdown_hash,
- (char*)e_card_simple_get_ecard_field(card, e_card_simple_map_email_to_field (i)),
- editor->email_info[i].widget);
- e_contact_editor_build_address_ui (editor);
- for (i = 0; i < E_CARD_SIMPLE_ADDRESS_ID_LAST; i ++)
- g_hash_table_insert (dropdown_hash,
- (char*)e_card_simple_get_ecard_field(card, e_card_simple_map_address_to_field (i)),
- editor->address_info[i].widget);
-
- /* then disable them all */
- g_hash_table_foreach (dropdown_hash, (GHFunc)disable_widget_foreach, NULL);
-
- /* disable the label widgets for the dropdowns (4 phone, 1
- email and the toggle button, and 1 address and one for
- the full adress button */
- for (i = 0; i < 4; i ++) {
- widget_name = g_strdup_printf ("label-phone%d", i+1);
- gtk_widget_set_sensitive (glade_xml_get_widget (editor->gui, widget_name), FALSE);
- g_free (widget_name);
- widget_name = g_strdup_printf ("entry-phone%d", i+1);
- gtk_widget_set_sensitive (glade_xml_get_widget (editor->gui, widget_name), FALSE);
- g_free (widget_name);
- }
- gtk_widget_set_sensitive (glade_xml_get_widget (editor->gui, "label-email1"), FALSE);
- gtk_widget_set_sensitive (glade_xml_get_widget (editor->gui, "entry-email1"), FALSE);
- gtk_widget_set_sensitive (glade_xml_get_widget (editor->gui, "checkbutton-htmlmail"), FALSE);
- gtk_widget_set_sensitive (glade_xml_get_widget (editor->gui, "label-address"), FALSE);
- gtk_widget_set_sensitive (glade_xml_get_widget (editor->gui, "button-fulladdr"), FALSE);
- gtk_widget_set_sensitive (glade_xml_get_widget (editor->gui, "text-address"), FALSE);
-
- /* enable widgets that map directly from a field to a widget (the drop down items) */
- iter = e_list_get_iterator (fields);
- for (; e_iterator_is_valid (iter); e_iterator_next (iter)) {
- char *field = (char*)e_iterator_get (iter);
- GtkWidget *widget = g_hash_table_lookup (dropdown_hash, field);
-
- if (widget) {
- gtk_widget_set_sensitive (widget, TRUE);
- }
- else {
- /* if it's not a field that's handled by the
- dropdown items, add it to the has to be
- used in the second step */
- g_hash_table_insert (supported_hash, field, field);
- }
-
- /* ugh - this is needed to make sure we don't have a
- disabled label next to a drop down when the item in
- the menu (the one reflected in the label) is
- enabled. */
- if (!strcmp (field, e_card_simple_get_ecard_field (card, e_card_simple_map_email_to_field(editor->email_choice)))) {
- gtk_widget_set_sensitive (glade_xml_get_widget (editor->gui, "label-email1"), TRUE);
- gtk_widget_set_sensitive (glade_xml_get_widget (editor->gui, "entry-email1"), !editor->is_read_only);
- gtk_widget_set_sensitive (glade_xml_get_widget (editor->gui, "checkbutton-htmlmail"), TRUE);
- }
- else if (!strcmp (field, e_card_simple_get_ecard_field (card, e_card_simple_map_address_to_field(editor->address_choice)))) {
- gtk_widget_set_sensitive (glade_xml_get_widget (editor->gui, "label-address"), TRUE);
- gtk_widget_set_sensitive (glade_xml_get_widget (editor->gui, "button-fulladdr"), !editor->is_read_only);
- gtk_widget_set_sensitive (glade_xml_get_widget (editor->gui, "text-address"), !editor->is_read_only);
- }
- else for (i = 0; i < 4; i ++) {
- if (!strcmp (field, e_card_simple_get_ecard_field (card, e_card_simple_map_phone_to_field(editor->phone_choice[i])))) {
- widget_name = g_strdup_printf ("label-phone%d", i+1);
- gtk_widget_set_sensitive (glade_xml_get_widget (editor->gui, widget_name), TRUE);
- g_free (widget_name);
- widget_name = g_strdup_printf ("entry-phone%d", i+1);
- gtk_widget_set_sensitive (glade_xml_get_widget (editor->gui, widget_name), !editor->is_read_only);
- g_free (widget_name);
- }
- }
- }
-
- /* handle the label next to the dropdown widgets */
-
- for (i = 0; i < num_widget_field_mappings; i ++) {
- gboolean enabled = g_hash_table_lookup (supported_hash,
- e_card_simple_get_ecard_field (card,
- widget_field_mappings[i].field_id)) != NULL;
- gtk_widget_set_sensitive (glade_xml_get_widget(editor->gui,
- widget_field_mappings[i].widget_name), enabled);
- }
-
- g_hash_table_destroy (dropdown_hash);
- g_hash_table_destroy (supported_hash);
-}
-
-static void
-set_read_only (EContactEditor *editor)
-{
- int i;
- char *label, *entry;
- /* set the sensitivity of all the non-dropdown entry/texts/dateedits */
- for (i = 0; i < num_widget_field_mappings; i ++) {
- if (widget_field_mappings[i].desensitize_for_read_only)
- gtk_widget_set_sensitive (glade_xml_get_widget(editor->gui,
- widget_field_mappings[i].widget_name), !editor->is_read_only);
- }
-
- /* handle the phone dropdown entries */
- for (i = 0; i < 4; i ++) {
- label = g_strdup_printf ("label-phone%d", i+1);
- entry = g_strdup_printf ("entry-phone%d", i+1);
-
- if (GTK_WIDGET_IS_SENSITIVE (glade_xml_get_widget (editor->gui, label)))
- gtk_widget_set_sensitive (glade_xml_get_widget(editor->gui,
- entry), !editor->is_read_only);
-
- g_free (label);
- g_free (entry);
- }
-
- /* handle the email dropdown entry */
- label = "label-email1";
- entry = "entry-email1";
- if (GTK_WIDGET_IS_SENSITIVE (glade_xml_get_widget (editor->gui, label))) {
- gtk_widget_set_sensitive (glade_xml_get_widget(editor->gui,
- entry), !editor->is_read_only);
- gtk_widget_set_sensitive (glade_xml_get_widget(editor->gui,
- "checkbutton-htmlmail"), !editor->is_read_only);
- }
-
- /* handle the address dropdown entry */
- label = "label-address";
- entry = "text-address";
- if (GTK_WIDGET_IS_SENSITIVE (glade_xml_get_widget (editor->gui, label)))
- gtk_widget_set_sensitive (glade_xml_get_widget(editor->gui,
- entry), !editor->is_read_only);
-}
-
-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;
- gboolean wants_html, wants_html_set;
-
- gtk_object_get(GTK_OBJECT(card),
- "file_as", &file_as,
- "name", &name,
- "anniversary", &anniversary,
- "birth_date", &bday,
- "wants_html_set",&wants_html_set,
- "wants_html", &wants_html,
- 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);
- }
-
- if (wants_html_set) {
- GtkWidget *widget = glade_xml_get_widget(editor->gui, "checkbutton-htmlmail");
- if (widget && GTK_IS_CHECK_BUTTON(widget)) {
- gtk_object_set(GTK_OBJECT(widget),
- "active", wants_html,
- NULL);
- }
- }
-
- /* 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 = e_utf8_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);
-
- if (string) 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 = e_utf8_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);
- if (string) 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 = e_utf8_gtk_editable_get_chars(editable, 0, -1);
-
- if (string && *string)
- gtk_object_set(GTK_OBJECT(card),
- "file_as", string,
- NULL);
-
- if (string) 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);
- }
- }
-}
-
-/**
- * e_contact_editor_raise:
- * @config: The %EContactEditor object.
- *
- * Raises the dialog associated with this %EContactEditor object.
- */
-void
-e_contact_editor_raise (EContactEditor *editor)
-{
- gdk_window_raise (GTK_WIDGET (editor->app)->window);
-}
diff --git a/addressbook/contact-editor/e-contact-editor.h b/addressbook/contact-editor/e-contact-editor.h
deleted file mode 100644
index bc54dd02b0..0000000000
--- a/addressbook/contact-editor/e-contact-editor.h
+++ /dev/null
@@ -1,124 +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 <clahey@helixcode.com>
- *
- * 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 <libgnomeui/gnome-app.h>
-#include <libgnomeui/gnome-app-helper.h>
-#include <bonobo/bonobo-ui-component.h>
-#include <glade/glade.h>
-
-#include "addressbook/backend/ebook/e-card.h"
-#include "addressbook/backend/ebook/e-card-simple.h"
-
-#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
-{
- GtkObject object;
-
- /* item specific fields */
- ECard *card;
- ECardSimple *simple;
-
- /* UI handler */
- BonoboUIComponent *uic;
-
- GladeXML *gui;
- GtkWidget *app;
- 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;
-
- /* Whether we are editing a new card or an existing one */
- guint is_new_card : 1;
-
- /* Whether the contact editor will accept modifications */
- guint is_read_only : 1;
-
- EList *writable_fields;
-};
-
-struct _EContactEditorClass
-{
- GtkObjectClass parent_class;
-
- /* Notification signals */
-
- void (* add_card) (EContactEditor *ce, ECard *card);
- void (* commit_card) (EContactEditor *ce, ECard *card);
- void (* delete_card) (EContactEditor *ce, ECard *card);
- void (* editor_closed) (EContactEditor *ce);
-};
-
-EContactEditor *e_contact_editor_new (ECard *card,
- gboolean is_new_card,
- EList *writable_fields,
- gboolean is_read_only);
-GtkType e_contact_editor_get_type (void);
-void e_contact_editor_raise (EContactEditor *editor);
-
-
-gboolean e_contact_editor_confirm_delete (GtkWindow *parent);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-#endif /* __E_CONTACT_EDITOR_H__ */
diff --git a/addressbook/contact-editor/e-contact-quick-add.c b/addressbook/contact-editor/e-contact-quick-add.c
deleted file mode 100644
index 0ab39701d3..0000000000
--- a/addressbook/contact-editor/e-contact-quick-add.c
+++ /dev/null
@@ -1,393 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * e-contact-quick-add.c
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Developed by Jon Trowbridge <trow@ximian.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 <ctype.h>
-#include <glib.h>
-#include <gtk/gtkentry.h>
-#include <gtk/gtklabel.h>
-#include <gtk/gtktable.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-app.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-stock.h>
-#include <addressbook/backend/ebook/e-book.h>
-#include <addressbook/backend/ebook/e-book-util.h>
-#include <addressbook/backend/ebook/e-card.h>
-#include "e-contact-editor.h"
-#include "e-contact-quick-add.h"
-
-static void
-e_card_quick_set_name (ECard *card, const gchar *str)
-{
- ECardSimple *simple;
-
- g_return_if_fail (card && E_IS_CARD (card));
-
- if (str == NULL)
- return;
-
- simple = e_card_simple_new (card);
- e_card_simple_set (simple, E_CARD_SIMPLE_FIELD_FULL_NAME, str);
- e_card_simple_sync_card (simple);
- gtk_object_unref (GTK_OBJECT (simple));
-}
-
-static void
-e_card_quick_set_email (ECard *card, const gchar *str)
-{
- ECardSimple *simple;
-
- g_return_if_fail (card && E_IS_CARD (card));
-
- if (str == NULL)
- return;
-
- simple = e_card_simple_new (card);
- e_card_simple_set (simple, E_CARD_SIMPLE_FIELD_EMAIL, str);
- e_card_simple_sync_card (simple);
- gtk_object_unref (GTK_OBJECT (simple));
-}
-
-
-static void
-book_ready_cb (EBook *book, EBookStatus status, gpointer user_data)
-{
- ECard *card = E_CARD (user_data);
-
- EContactQuickAddCallback cb = gtk_object_get_data (GTK_OBJECT (card), "e-contact-quick-add-cb");
- gpointer cb_user_data = gtk_object_get_data (GTK_OBJECT (card), "e-contact-quick-add-user-data");
-
- if (status == E_BOOK_STATUS_SUCCESS) {
- e_book_add_card (book, card, NULL, NULL);
- if (cb)
- cb (card, cb_user_data);
- } else {
- /* Something went wrong... */
- if (cb)
- cb (NULL, cb_user_data);
-
- gtk_object_unref (GTK_OBJECT (book));
- }
-}
-
-static void
-add_card (ECard *card)
-{
- EBook *book = e_book_new ();
- e_book_load_local_address_book (book, book_ready_cb, card);
-}
-
-/*
- * Raise a contact editor with all fields editable, and hook up all signals accordingly.
- */
-
-static void
-add_card_cb (EContactEditor *ce, ECard *card, gpointer user_data)
-{
- add_card (card);
-}
-
-static void
-editor_closed_cb (GtkWidget *w, gpointer user_data)
-{
- /* w is the contact editor, user_data is an ECard. */
- if (user_data)
- gtk_object_unref (user_data);
- gtk_object_unref (GTK_OBJECT (w));
-}
-
-static void
-ce_book_found_fields (EBook *book, EBookStatus status, EList *fields, gpointer user_data)
-{
- ECard *card = E_CARD (user_data);
- EContactEditor *contact_editor;
-
- if (status != E_BOOK_STATUS_SUCCESS) {
- g_warning ("Couldn't find supported fields for local address book.");
- return;
- }
-
- contact_editor = e_contact_editor_new (card, TRUE, fields, FALSE /* XXX */);
-
- gtk_signal_connect (GTK_OBJECT (contact_editor),
- "add_card",
- GTK_SIGNAL_FUNC (add_card_cb),
- NULL);
- gtk_signal_connect (GTK_OBJECT (contact_editor),
- "editor_closed",
- GTK_SIGNAL_FUNC (editor_closed_cb),
- user_data);
-
- e_contact_editor_raise (contact_editor);
-}
-
-static void
-ce_book_ready (EBook *book, EBookStatus status, gpointer user_data)
-{
- if (status != E_BOOK_STATUS_SUCCESS) {
- g_warning ("Couldn't open local address book.");
- return;
- }
-
- e_book_get_supported_fields (book, ce_book_found_fields, user_data);
-}
-
-static void
-edit_card (ECard *card)
-{
- e_book_load_local_address_book (e_book_new (), ce_book_ready, card);
-}
-
-static void
-clicked_cb (GtkWidget *w, gint button, gpointer user_data)
-{
- ECard *card = E_CARD (user_data);
-
- /* Get data out of entries. */
- if (button == 0 || button == 1) {
- gpointer name_entry;
- gpointer email_entry;
- gchar *name = NULL;
- gchar *email = NULL;
-
- name_entry = gtk_object_get_data (GTK_OBJECT (card), "e-contact-quick-add-name-entry");
- email_entry = gtk_object_get_data (GTK_OBJECT (card), "e-contact-quick-add-email-entry");
-
- if (name_entry)
- name = gtk_editable_get_chars (GTK_EDITABLE (name_entry), 0, -1);
- if (email_entry)
- email = gtk_editable_get_chars (GTK_EDITABLE (email_entry), 0, -1);
-
- e_card_quick_set_name (card, name);
- e_card_quick_set_email (card, email);
-
- g_free (name);
- g_free (email);
- }
-
- gtk_widget_destroy (w);
-
- if (button == 0) { /* OK */
-
- add_card (card);
-
- } else if (button == 1) {
-
- /* EDIT FULL */
- edit_card (card);
-
- } else {
- /* CANCEL */
- gtk_object_unref (user_data);
- }
-
-}
-
-static GtkWidget *
-build_quick_add_dialog (ECard *new_card, EContactQuickAddCallback cb, gpointer user_data)
-{
- GtkWidget *dialog;
- GtkTable *table;
- GtkWidget *name_entry;
- GtkWidget *email_entry;
- const gint xpad=1, ypad=1;
-
- g_return_val_if_fail (new_card && E_IS_CARD (new_card), NULL);
-
- dialog = gnome_dialog_new (_("Contact Quick-Add"),
- GNOME_STOCK_BUTTON_OK,
- _("Edit Full"),
- GNOME_STOCK_BUTTON_CANCEL,
- NULL);
-
- gtk_signal_connect (GTK_OBJECT (dialog),
- "clicked",
- clicked_cb,
- new_card);
-
- name_entry = gtk_entry_new ();
-
- if (new_card->name) {
- gchar *str = e_card_name_to_string (new_card->name);
- gtk_entry_set_text (GTK_ENTRY (name_entry), str);
- g_free (str);
- }
-
-
- email_entry = gtk_entry_new ();
-
- if (new_card->email && e_list_length (new_card->email)) {
- EIterator *iterator = e_list_get_iterator (new_card->email);
- if (iterator) {
- e_iterator_reset (iterator);
- if (e_iterator_is_valid (iterator)) {
- const gchar *str = e_iterator_get (iterator);
- gtk_entry_set_text (GTK_ENTRY (email_entry), str);
- }
- }
- }
-
- gtk_object_set_data (GTK_OBJECT (new_card), "e-contact-quick-add-name-entry", name_entry);
- gtk_object_set_data (GTK_OBJECT (new_card), "e-contact-quick-add-email-entry", email_entry);
-
-
- table = GTK_TABLE (gtk_table_new (2, 2, FALSE));
-
- gtk_table_attach (table, gtk_label_new (_("Full Name")),
- 0, 1, 0, 1,
- 0, 0, xpad, ypad);
- gtk_table_attach (table, name_entry,
- 1, 2, 0, 1,
- GTK_EXPAND | GTK_FILL, GTK_EXPAND, xpad, ypad);
- gtk_table_attach (table, gtk_label_new (_("E-mail")),
- 0, 1, 1, 2,
- 0, 0, xpad, ypad);
- gtk_table_attach (table, email_entry,
- 1, 2, 1, 2,
- GTK_EXPAND | GTK_FILL, GTK_EXPAND, xpad, ypad);
-
- gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox),
- GTK_WIDGET (table),
- TRUE, TRUE, 0);
- gtk_widget_show_all (GTK_WIDGET (table));
-
-
- return dialog;
-}
-
-void
-e_contact_quick_add (const gchar *name, const gchar *email,
- EContactQuickAddCallback cb, gpointer user_data)
-{
- ECard *new_card;
- GtkWidget *dialog;
-
- /* We need to have *something* to work with. */
- if (name == NULL && email == NULL) {
- if (cb)
- cb (NULL, user_data);
- return;
- }
-
- new_card = e_card_new ("");
- if (cb)
- gtk_object_set_data (GTK_OBJECT (new_card), "e-contact-quick-add-cb", cb);
- if (user_data)
- gtk_object_set_data (GTK_OBJECT (new_card), "e-contact-quick-add-user-data", user_data);
-
-
- e_card_quick_set_name (new_card, name);
- e_card_quick_set_email (new_card, email);
-
- dialog = build_quick_add_dialog (new_card, cb, user_data);
-
- gtk_widget_show_all (dialog);
-}
-
-void
-e_contact_quick_add_free_form (const gchar *text, EContactQuickAddCallback cb, gpointer user_data)
-{
- gchar *name=NULL, *email=NULL;
- const gchar *last_at, *s;
- gboolean in_quote;
-
- if (text == NULL) {
- e_contact_quick_add (NULL, NULL, cb, user_data);
- return;
- }
-
- /* Look for things that look like e-mail addresses embedded in text */
- in_quote = FALSE;
- last_at = NULL;
- for (s = text; *s; ++s) {
- if (*s == '@' && !in_quote)
- last_at = s;
- else if (*s == '"')
- in_quote = !in_quote;
- }
-
-
- if (last_at == NULL) {
- /* No at sign, so we treat it all as the name */
- name = g_strdup (text);
- } else {
- gboolean bad_char = FALSE;
-
- /* walk backwards to whitespace or a < or a quote... */
- while (last_at >= text && !bad_char
- && !(isspace ((gint) *last_at) || *last_at == '<' || *last_at == '"')) {
- /* Check for some stuff that can't appear in a legal e-mail address. */
- if (*last_at == '['
- || *last_at == ']'
- || *last_at == '('
- || *last_at == ')')
- bad_char = TRUE;
- --last_at;
- }
- if (last_at < text)
- last_at = text;
-
- /* ...and then split the text there */
- if (!bad_char) {
- if (text < last_at)
- name = g_strndup (text, last_at-text);
- email = g_strdup (last_at);
- }
- }
-
- /* If all else has failed, make it the name. */
- if (name == NULL && email == NULL)
- name = g_strdup (text);
-
-
- /* Clean up name */
- if (name && *name)
- g_strstrip (name);
-
- /* Clean up email, remove bracketing <>s */
- if (email && *email) {
- gboolean changed = FALSE;
- g_strstrip (email);
- if (*email == '<') {
- *email = ' ';
- changed = TRUE;
- }
- if (email[strlen (email)-1] == '>') {
- email[strlen (email)-1] = ' ';
- changed = TRUE;
- }
- if (changed)
- g_strstrip (email);
- }
-
-
- e_contact_quick_add (name, email, cb, user_data);
- g_free (name);
- g_free (email);
-}
diff --git a/addressbook/contact-editor/e-contact-quick-add.h b/addressbook/contact-editor/e-contact-quick-add.h
deleted file mode 100644
index 81e3fdaab5..0000000000
--- a/addressbook/contact-editor/e-contact-quick-add.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * e-contact-quick-add.h
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Developed by Jon Trowbridge <trow@ximian.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 __E_CONTACT_QUICK_ADD_H__
-#define __E_CONTACT_QUICK_ADD_H__
-
-#include <addressbook/backend/ebook/e-card.h>
-
-typedef void (*EContactQuickAddCallback) (ECard *new_card, gpointer user_data);
-
-void e_contact_quick_add (const gchar *name, const gchar *email,
- EContactQuickAddCallback cb, gpointer user_data);
-
-void e_contact_quick_add_free_form (const gchar *text, EContactQuickAddCallback cb, gpointer user_data);
-
-#endif /* __E_CONTACT_QUICK_ADD_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 5381fb8b2d..0000000000
--- a/addressbook/contact-editor/e-contact-save-as.c
+++ /dev/null
@@ -1,80 +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 <clahey@helixcode.com>
- *
- * 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 <unistd.h>
-#include <fcntl.h>
-#include <gtk/gtkfilesel.h>
-#include <gtk/gtksignal.h>
-#include <gal/util/e-util.h>
-#include "e-contact-save-as.h"
-
-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 d304d4d558..0000000000
--- a/addressbook/contact-editor/e-contact-save-as.h
+++ /dev/null
@@ -1,41 +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 <clahey@helixcode.com>
- *
- * 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 <glade/glade.h>
-#include "addressbook/backend/ebook/e-card.h"
-#include "addressbook/backend/ebook/e-card-simple.h"
-
-#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/fulladdr.glade b/addressbook/contact-editor/fulladdr.glade
deleted file mode 100644
index 46d1a180b6..0000000000
--- a/addressbook/contact-editor/fulladdr.glade
+++ /dev/null
@@ -1,475 +0,0 @@
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <name>fulladdr</name>
- <program_name>fulladdr</program_name>
- <directory></directory>
- <source_directory>src</source_directory>
- <pixmaps_directory>pixmaps</pixmaps_directory>
- <language>C</language>
- <gnome_support>True</gnome_support>
- <gettext_support>True</gettext_support>
- <use_widget_names>True</use_widget_names>
- <output_main_file>False</output_main_file>
- <output_support_files>False</output_support_files>
- <output_build_files>False</output_build_files>
-</project>
-
-<widget>
- <class>GnomeDialog</class>
- <name>dialog-checkaddress</name>
- <visible>False</visible>
- <title>Check Address</title>
- <type>GTK_WINDOW_TOPLEVEL</type>
- <position>GTK_WIN_POS_NONE</position>
- <modal>True</modal>
- <allow_shrink>False</allow_shrink>
- <allow_grow>True</allow_grow>
- <auto_shrink>False</auto_shrink>
- <auto_close>False</auto_close>
- <hide_on_close>False</hide_on_close>
-
- <widget>
- <class>GtkVBox</class>
- <child_name>GnomeDialog:vbox</child_name>
- <name>vbox-container</name>
- <homogeneous>False</homogeneous>
- <spacing>8</spacing>
- <child>
- <padding>4</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkHButtonBox</class>
- <child_name>GnomeDialog:action_area</child_name>
- <name>hbuttonbox1</name>
- <layout_style>GTK_BUTTONBOX_END</layout_style>
- <spacing>8</spacing>
- <child_min_width>85</child_min_width>
- <child_min_height>27</child_min_height>
- <child_ipad_x>7</child_ipad_x>
- <child_ipad_y>0</child_ipad_y>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- <pack>GTK_PACK_END</pack>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>button1</name>
- <can_default>True</can_default>
- <has_default>True</has_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button2</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
- </widget>
- </widget>
-
- <widget>
- <class>GtkTable</class>
- <name>table-checkaddress</name>
- <border_width>8</border_width>
- <rows>4</rows>
- <columns>4</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>6</row_spacing>
- <column_spacing>6</column_spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label2</name>
- <label>_Address:</label>
- <justify>GTK_JUSTIFY_LEFT</justify>
- <wrap>False</wrap>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>entry-street</focus_target>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label4</name>
- <label>_City:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>entry-city</focus_target>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>2</top_attach>
- <bottom_attach>3</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-city</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>2</top_attach>
- <bottom_attach>3</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-ext</name>
- <width>100</width>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label8</name>
- <label>_PO Box:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>entry-po</focus_target>
- <child>
- <left_attach>2</left_attach>
- <right_attach>3</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label3</name>
- <label>Address _2:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>entry-ext</focus_target>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-po</name>
- <width>100</width>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>3</left_attach>
- <right_attach>4</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-street</name>
- <can_focus>True</can_focus>
- <has_focus>True</has_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>1</left_attach>
- <right_attach>4</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label5</name>
- <label>_State/Province:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>entry-region</focus_target>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>3</top_attach>
- <bottom_attach>4</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-region</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>3</top_attach>
- <bottom_attach>4</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkCombo</class>
- <name>combo-country</name>
- <width>100</width>
- <value_in_list>False</value_in_list>
- <ok_if_empty>True</ok_if_empty>
- <case_sensitive>False</case_sensitive>
- <use_arrows>True</use_arrows>
- <use_arrows_always>False</use_arrows_always>
- <items>USA
-Canada
-Finland
-</items>
- <child>
- <left_attach>3</left_attach>
- <right_attach>4</right_attach>
- <top_attach>3</top_attach>
- <bottom_attach>4</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkEntry</class>
- <child_name>GtkCombo:entry</child_name>
- <name>entry-country</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- </widget>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-code</name>
- <width>100</width>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>3</left_attach>
- <right_attach>4</right_attach>
- <top_attach>2</top_attach>
- <bottom_attach>3</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label6</name>
- <label>_ZIP Code:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>entry-code</focus_target>
- <child>
- <left_attach>2</left_attach>
- <right_attach>3</right_attach>
- <top_attach>2</top_attach>
- <bottom_attach>3</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label7</name>
- <label>Countr_y:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>entry-country</focus_target>
- <child>
- <left_attach>2</left_attach>
- <right_attach>3</right_attach>
- <top_attach>3</top_attach>
- <bottom_attach>4</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
- </widget>
- </widget>
-</widget>
-
-</GTK-Interface>
diff --git a/addressbook/contact-editor/fullname.glade b/addressbook/contact-editor/fullname.glade
deleted file mode 100644
index 17be70647c..0000000000
--- a/addressbook/contact-editor/fullname.glade
+++ /dev/null
@@ -1,389 +0,0 @@
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <name>fullname</name>
- <program_name>fullname</program_name>
- <directory></directory>
- <source_directory>src</source_directory>
- <pixmaps_directory>pixmaps</pixmaps_directory>
- <language>C</language>
- <gnome_support>True</gnome_support>
- <gettext_support>True</gettext_support>
- <use_widget_names>True</use_widget_names>
- <output_main_file>False</output_main_file>
- <output_support_files>False</output_support_files>
- <output_build_files>False</output_build_files>
-</project>
-
-<widget>
- <class>GnomeDialog</class>
- <name>dialog-checkfullname</name>
- <visible>False</visible>
- <title>Check Full Name</title>
- <type>GTK_WINDOW_TOPLEVEL</type>
- <position>GTK_WIN_POS_NONE</position>
- <modal>True</modal>
- <allow_shrink>True</allow_shrink>
- <allow_grow>True</allow_grow>
- <auto_shrink>False</auto_shrink>
- <auto_close>False</auto_close>
- <hide_on_close>False</hide_on_close>
-
- <widget>
- <class>GtkVBox</class>
- <child_name>GnomeDialog:vbox</child_name>
- <name>vbox-container</name>
- <homogeneous>False</homogeneous>
- <spacing>8</spacing>
- <child>
- <padding>4</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkHButtonBox</class>
- <child_name>GnomeDialog:action_area</child_name>
- <name>hbuttonbox1</name>
- <layout_style>GTK_BUTTONBOX_END</layout_style>
- <spacing>8</spacing>
- <child_min_width>85</child_min_width>
- <child_min_height>27</child_min_height>
- <child_ipad_x>7</child_ipad_x>
- <child_ipad_y>0</child_ipad_y>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- <pack>GTK_PACK_END</pack>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>button1</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button2</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
- </widget>
- </widget>
-
- <widget>
- <class>GtkTable</class>
- <name>table-checkfullname</name>
- <border_width>8</border_width>
- <rows>5</rows>
- <columns>3</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>6</row_spacing>
- <column_spacing>21</column_spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkCombo</class>
- <name>combo-title</name>
- <value_in_list>False</value_in_list>
- <ok_if_empty>True</ok_if_empty>
- <case_sensitive>False</case_sensitive>
- <use_arrows>True</use_arrows>
- <use_arrows_always>False</use_arrows_always>
- <items>
-Mr.
-Mrs.
-Ms.
-Miss
-Dr.
-</items>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
-
- <widget>
- <class>GtkEntry</class>
- <child_name>GtkCombo:entry</child_name>
- <name>entry-title</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- </widget>
- </widget>
-
- <widget>
- <class>GtkCombo</class>
- <name>combo-suffix</name>
- <value_in_list>False</value_in_list>
- <ok_if_empty>True</ok_if_empty>
- <case_sensitive>False</case_sensitive>
- <use_arrows>True</use_arrows>
- <use_arrows_always>False</use_arrows_always>
- <items>
-Sr.
-Jr.
-I
-II
-III
-Esq.
-</items>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>4</top_attach>
- <bottom_attach>5</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
-
- <widget>
- <class>GtkEntry</class>
- <child_name>GtkCombo:entry</child_name>
- <name>entry-suffix</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- </widget>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-first</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>1</left_attach>
- <right_attach>3</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-middle</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>1</left_attach>
- <right_attach>3</right_attach>
- <top_attach>2</top_attach>
- <bottom_attach>3</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-last</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>1</left_attach>
- <right_attach>3</right_attach>
- <top_attach>3</top_attach>
- <bottom_attach>4</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label2</name>
- <label>_First:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>entry-first</focus_target>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label1</name>
- <label>_Title:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>entry-title</focus_target>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label3</name>
- <label>_Middle:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>entry-middle</focus_target>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>2</top_attach>
- <bottom_attach>3</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label5</name>
- <label>_Last:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>entry-last</focus_target>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>3</top_attach>
- <bottom_attach>4</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label4</name>
- <label>_Suffix:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>entry-suffix</focus_target>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>4</top_attach>
- <bottom_attach>5</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
- </widget>
- </widget>
-</widget>
-
-</GTK-Interface>
diff --git a/addressbook/contact-editor/test-editor.c b/addressbook/contact-editor/test-editor.c
deleted file mode 100644
index 22c871c693..0000000000
--- a/addressbook/contact-editor/test-editor.c
+++ /dev/null
@@ -1,145 +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 <clahey@helixcode.com>
- *
- * 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 <stdlib.h>
-#include <gtk/gtkmain.h>
-#include <libgnomeui/gnome-app.h>
-#include <libgnomeui/gnome-init.h>
-#include <glade/glade.h>
-#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);
-}
-
-/* Callback used when a contact editor is closed */
-static void
-editor_closed_cb (EContactEditor *ce, gpointer data)
-{
- static int count = 2;
-
- count--;
- gtk_object_unref (GTK_OBJECT (ce));
-
- if (count == 0)
- exit (0);
-}
-
-#if 0
-static void about_callback( GtkWidget *widget, gpointer data )
-{
-
- const gchar *authors[] =
- {
- "Christopher James Lahey <clahey@umich.edu>",
- 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;
- EContactEditor *ce;
-
- /* bindtextdomain (PACKAGE, GNOMELOCALEDIR);
- textdomain (PACKAGE);*/
-
- gnome_init( "Contact Editor Test", VERSION, argc, argv);
-
- glade_gnome_init ();
-
- cardstr = NULL;
- if (argc == 2)
- cardstr = read_file (argv [1]);
-
- if (cardstr == NULL)
- cardstr = TEST_VCARD;
-
- ce = e_contact_editor_new (e_card_new (cardstr), TRUE, NULL, FALSE);
- gtk_signal_connect (GTK_OBJECT (ce), "editor_closed",
- GTK_SIGNAL_FUNC (editor_closed_cb), NULL);
-
- ce = e_contact_editor_new (e_card_new (cardstr), TRUE, NULL, FALSE);
- gtk_signal_connect (GTK_OBJECT (ce), "editor_closed",
- GTK_SIGNAL_FUNC (editor_closed_cb), NULL);
-
- gtk_main();
-
- /* Not reached. */
- 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 cd8fe38705..0000000000
--- a/addressbook/gui/Makefile.am
+++ /dev/null
@@ -1 +0,0 @@
-SUBDIRS = widgets search component
diff --git a/addressbook/gui/component/.cvsignore b/addressbook/gui/component/.cvsignore
deleted file mode 100644
index 8bcb766191..0000000000
--- a/addressbook/gui/component/.cvsignore
+++ /dev/null
@@ -1,11 +0,0 @@
-.deps
-.libs
-.pure
-Makefile
-Makefile.in
-*.lo
-*.la
-evolution-addressbook
-evolution-addressbook.pure
-test-addressbook
-GNOME_Evolution_Addressbook.oaf \ No newline at end of file
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 7350b4925e..0000000000
--- a/addressbook/gui/component/GNOME_Evolution_Addressbook.oaf.in
+++ /dev/null
@@ -1,147 +0,0 @@
-<oaf_info>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Addressbook_MiniCard_ControlFactory"
- type="exe"
- location="evolution-addressbook">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/ObjectFactory:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="description" type="string"
- _value="Factory for the Addressbook Minicard control"/>
-
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Addressbook_MiniCard_Control"
- type="factory"
- location="OAFIID:GNOME_Evolution_Addressbook_MiniCard_ControlFactory">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:Bonobo/Control:1.0"/>
- <item value="IDL:Bonobo/PersistStream:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="bonobo:supported_mime_types" type="stringv">
- <item value="text/vcard"/>
- <item value="text/x-vcard"/>
- </oaf_attribute>
-
- <oaf_attribute name="name" type="string"
- _value="Evolution Addressbook minicard viewer"/>
- <oaf_attribute name="description" type="string"
- _value="Control that displays an Evolution addressbook minicard."/>
-
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Addressbook_ControlFactory"
- type="exe"
- location="evolution-addressbook">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/ObjectFactory:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="description" type="string"
- _value="Factory for the sample Addressbook control"/>
-
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Addressbook_Control"
- type="factory"
- location="OAFIID:GNOME_Evolution_Addressbook_ControlFactory">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:BonoboControl/addressbook-control:1.0"/>
- <item value="IDL:GNOME/Control:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="description" type="string"
- _value="A sample Bonobo control which displays an addressbook."/>
-
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Addressbook_ShellComponentFactory"
- type="exe"
- location="evolution-addressbook">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/ObjectFactory:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="description" type="string"
- _value="Factory for the Evolution addressbook component."/>
-
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Addressbook_ShellComponent"
- type="factory"
- location="OAFIID:GNOME_Evolution_Addressbook_ShellComponentFactory">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/Evolution/ShellComponent:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="description" type="string"
- _value="Evolution component for handling contacts."/>
-
- <oaf_attribute name="evolution:shell-component-icon" type="string"
- value="evolution-contacts.png"/>
-
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Addressbook_AddressWidgetFactory"
- type="exe"
- location="evolution-addressbook">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/ObjectFactory:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="description" type="string"
- _value="Factory for the Addressbook's address displayer"/>
-
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Addressbook_AddressWidget"
- type="factory"
- location="OAFIID:GNOME_Evolution_Addressbook_AddressWidgetFactory">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:BonoboControl/address-widget:1.0"/>
- <item value="IDL:GNOME/Control:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="description" type="string"
- _value="A Bonobo control for displaying an address."/>
-
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Addressbook_AddressPopupFactory"
- type="exe"
- location="evolution-addressbook">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/ObjectFactory:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="description" type="string"
- _value="Factory for the Addressbook's address popup"/>
-
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Addressbook_AddressPopup"
- type="factory"
- location="OAFIID:GNOME_Evolution_Addressbook_AddressPopupFactory">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:BonoboControl/address-widget:1.0"/>
- <item value="IDL:GNOME/Control:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="description" type="string"
- _value="A Bonobo control for an address popup."/>
-
-</oaf_server>
-
-</oaf_info>
diff --git a/addressbook/gui/component/Makefile.am b/addressbook/gui/component/Makefile.am
deleted file mode 100644
index 3089f53901..0000000000
--- a/addressbook/gui/component/Makefile.am
+++ /dev/null
@@ -1,88 +0,0 @@
-SUBDIRS = select-names
-
-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/misc \
- -I$(top_srcdir)/addressbook/gui/minicard \
- -I$(top_srcdir)/addressbook/gui/widgets \
- -I$(top_srcdir)/addressbook/contact-editor \
- -I$(top_srcdir)/addressbook/backend \
- -I$(top_builddir)/addressbook/backend \
- $(BONOBO_HTML_GNOME_CFLAGS) \
- -DEVOLUTION_VERSION=\""$(VERSION)"\" \
- -DEVOLUTION_DATADIR=\""$(datadir)"\" \
- -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \
- -DEVOLUTION_ICONSDIR=\""$(iconsdir)"\" \
- -DEVOLUTION_LOCALEDIR=\""$(localedir)"\" \
- -DCAMEL_PROVIDERDIR=\""$(providerdir)"\"
-
-bin_PROGRAMS = \
- evolution-addressbook
-
-evolution_addressbook_SOURCES = \
- addressbook-component.c \
- addressbook-component.h \
- addressbook-config.c \
- addressbook-config.h \
- addressbook-factory.c \
- addressbook-storage.c \
- addressbook-storage.h \
- addressbook.c \
- addressbook.h \
- e-cardlist-model.c \
- e-cardlist-model.h \
- e-address-widget.h \
- e-address-widget.c \
- e-address-popup.h \
- e-address-popup.c
-
-evolution_addressbook_LDADD = \
- select-names/libeselectnames.la \
- $(top_builddir)/shell/libeshell.a \
- $(EXTRA_GNOME_LIBS) \
- $(BONOBO_HTML_GNOME_LIBS) \
- $(top_builddir)/addressbook/gui/widgets/libeminicard.a \
- $(top_builddir)/addressbook/backend/ebook/libebook.la \
- $(top_builddir)/e-util/ename/libename.la \
- $(top_builddir)/addressbook/contact-editor/libecontacteditor.a \
- $(top_builddir)/libversit/libversit.la \
- $(top_builddir)/widgets/misc/libemiscwidgets.a \
- $(top_builddir)/addressbook/printing/libecontactprint.a \
- $(top_builddir)/addressbook/gui/search/libeaddressbooksearch.a \
- $(top_builddir)/filter/libfilter.la \
- $(top_builddir)/e-util/libeutil.la \
- $(top_builddir)/widgets/menus/libmenus.la
-
-evolution_addressbook_LDFLAGS = `gnome-config --libs gdk_pixbuf` -export-dynamic
-
-@XML_I18N_MERGE_OAF_RULE@
-
-oafdir = $(datadir)/oaf
-oaf_in_files = GNOME_Evolution_Addressbook.oaf.in
-oaf_DATA = $(oaf_in_files:.oaf.in=.oaf)
-
-gladedir = $(datadir)/evolution/glade
-glade_DATA = addressbook-config.glade
-
-EXTRA_DIST = \
- $(glade_DATA) \
- $(oaf_DATA) \
- addressbook-config.glade\
- $(oaf_in_files)
-
-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 250d13dc36..0000000000
--- a/addressbook/gui/component/addressbook-component.c
+++ /dev/null
@@ -1,214 +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 <config.h>
-#endif
-
-#include <bonobo/bonobo-generic-factory.h>
-
-#include "evolution-shell-component.h"
-#include "evolution-storage.h"
-
-#include "addressbook-storage.h"
-#include "addressbook-component.h"
-#include "addressbook.h"
-
-
-
-#define GNOME_EVOLUTION_ADDRESSBOOK_COMPONENT_FACTORY_ID "OAFIID:GNOME_Evolution_Addressbook_ShellComponentFactory"
-
-EvolutionShellClient *global_shell_client;
-
-EvolutionShellClient *
-addressbook_component_get_shell_client (void)
-{
- return global_shell_client;
-}
-
-static BonoboGenericFactory *factory = NULL;
-
-static char *accepted_dnd_types[] = {
- "text/x-vcard",
- NULL
-};
-
-static const EvolutionShellComponentFolderType folder_types[] = {
- { "contacts", "evolution-contacts.png", accepted_dnd_types },
- { NULL, NULL, NULL, NULL }
-};
-
-
-/* EvolutionShellComponent methods and signals. */
-
-static EvolutionShellComponentResult
-create_view (EvolutionShellComponent *shell_component,
- const char *physical_uri,
- const char *type,
- BonoboControl **control_return,
- void *closure)
-{
- BonoboControl *control;
-
- if (g_strcasecmp (type, "contacts") != 0)
- return EVOLUTION_SHELL_COMPONENT_UNSUPPORTEDTYPE;
-
- control = addressbook_factory_new_control ();
- bonobo_control_set_property (control, "folder_uri", physical_uri, NULL);
-
- *control_return = control;
-
- return EVOLUTION_SHELL_COMPONENT_OK;
-}
-
-static void
-create_folder (EvolutionShellComponent *shell_component,
- const char *physical_uri,
- const char *type,
- const GNOME_Evolution_ShellComponentListener listener,
- void *closure)
-{
- CORBA_Environment ev;
- GNOME_Evolution_ShellComponentListener_Result result;
-
- if (g_strcasecmp (type, "contacts") != 0)
- result = GNOME_Evolution_ShellComponentListener_UNSUPPORTED_TYPE;
- else
- result = GNOME_Evolution_ShellComponentListener_OK;
-
- CORBA_exception_init(&ev);
- GNOME_Evolution_ShellComponentListener_notifyResult(listener, result, &ev);
- CORBA_exception_free(&ev);
-}
-
-#if 0
-static void
-remove_folder (EvolutionShellComponent *shell_component,
- const char *physical_uri,
- const GNOME_Evolution_ShellComponentListener listener,
- void *closure)
-{
- printf ("should remove %s\n", physical_uri);
-}
-
-static void
-xfer_folder (EvolutionShellComponent *shell_component,
- const char *source_physical_uri,
- const char *destination_physical_uri,
- gboolean remove_source,
- const GNOME_Evolution_ShellComponentListener listener,
- void *closure)
-{
- printf ("should transfer %s to %s, %s source\n", source_physical_uri,
- destination_physical_uri, remove_source ? "removing" : "not removing");
-}
-
-static void
-populate_context_menu (EvolutionShellComponent *shell_component,
- BonoboUIComponent *uic,
- const char *physical_uri,
- const char *type,
- void *closure)
-{
- printf ("should populate context menu for %s (%s)\n", physical_uri, type);
-}
-
-static char*
-get_dnd_selection (EvolutionShellComponent *shell_component,
- const char *physical_uri,
- int type,
- int *format_return,
- const char **selection_return,
- int *selection_length_return,
- void *closure)
-{
- printf ("should get dnd selection for %s\n", physical_uri);
- return NULL;
-}
-#endif
-
-static int owner_count = 0;
-
-static void
-owner_set_cb (EvolutionShellComponent *shell_component,
- EvolutionShellClient *shell_client,
- const char *evolution_homedir,
- gpointer user_data)
-{
- owner_count ++;
-
- if (global_shell_client == NULL)
- global_shell_client = shell_client;
-
- addressbook_storage_setup (shell_component, evolution_homedir);
-}
-
-static void
-owner_unset_cb (EvolutionShellComponent *shell_component,
- GNOME_Evolution_Shell shell_interface,
- gpointer user_data)
-{
- owner_count --;
- if (owner_count == 0)
- gtk_main_quit();
-}
-
-
-/* The factory function. */
-
-static BonoboObject *
-factory_fn (BonoboGenericFactory *factory,
- void *closure)
-{
- EvolutionShellComponent *shell_component;
-
- shell_component = evolution_shell_component_new (folder_types, create_view, create_folder,
- NULL, NULL, NULL, NULL,
-#if 0
- remove_folder, xfer_folder,
- populate_context_menu, get_dnd_selection,
-#endif
- NULL);
-
- gtk_signal_connect (GTK_OBJECT (shell_component), "owner_set",
- GTK_SIGNAL_FUNC (owner_set_cb), NULL);
-
- gtk_signal_connect (GTK_OBJECT (shell_component), "owner_unset",
- GTK_SIGNAL_FUNC (owner_unset_cb), NULL);
-
- return BONOBO_OBJECT (shell_component);
-}
-
-
-void
-addressbook_component_factory_init (void)
-{
- if (factory != NULL)
- return;
-
- factory = bonobo_generic_factory_new (GNOME_EVOLUTION_ADDRESSBOOK_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 ea0d8b9a46..0000000000
--- a/addressbook/gui/component/addressbook-component.h
+++ /dev/null
@@ -1,33 +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
-
-#include "evolution-shell-component.h"
-#include "evolution-storage.h"
-
-void addressbook_component_factory_init (void);
-EvolutionShellClient *addressbook_component_get_shell_client (void);
-
-#endif /* _ADDRESSBOOK_COMPONENT_H */
diff --git a/addressbook/gui/component/addressbook-config.c b/addressbook/gui/component/addressbook-config.c
deleted file mode 100644
index e56c1fa799..0000000000
--- a/addressbook/gui/component/addressbook-config.c
+++ /dev/null
@@ -1,965 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-#include <config.h>
-
-#include <glib.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-propertybox.h>
-#include <libgnomeui/gnome-stock.h>
-#include <glade/glade.h>
-#include <gal/widgets/e-unicode.h>
-#include <gtkhtml/gtkhtml.h>
-#include <e-util/e-html-utils.h>
-#include "addressbook-config.h"
-#include "addressbook-storage.h"
-
-/* #define INCLUDE_FILE_SOURCE */
-
-typedef struct _AddressbookSourceDialog AddressbookSourceDialog;
-typedef struct _AddressbookSourcePageItem AddressbookSourcePageItem;
-typedef struct _LDAPAuthPageItem LDAPAuthPageItem;
-
-struct _AddressbookSourceDialog {
- GtkWidget *html;
- GtkWidget *dialog;
- GtkWidget *vbox;
- GtkWidget *name;
- GtkWidget *description;
- GtkWidget *source_option;
- GtkWidget *notebook;
-
- GList *source_pages;
- AddressbookSourcePageItem *source_page;
-
- gint id; /* button we closed the dialog with */
-
- AddressbookSource *source; /* our result if the Ok button was clicked */
-};
-
-struct _AddressbookSourcePageItem {
- gint pnum;
-
- AddressbookSourceType source_type;
-
- AddressbookSourceDialog *dialog;
-
- GtkWidget *item;
- GtkWidget *vbox;
-
- /* file: addressbook's */
- GtkWidget *path;
- GtkWidget *creat;
-
- /* ldap: addressbook's */
- GtkWidget *host;
- GtkWidget *port;
- GtkWidget *rootdn;
- GtkWidget *scope_optionmenu;
- GtkWidget *auth_optionmenu;
- GtkWidget *auth_notebook;
-
- GList *auths;
- LDAPAuthPageItem *auth;
-};
-
-struct _LDAPAuthPageItem {
- gint pnum;
-
- AddressbookLDAPAuthType auth_type;
-
- AddressbookSourceDialog *dialog;
- AddressbookSourcePageItem *page;
-
- GtkWidget *item;
- GtkWidget *vbox;
-
- /* simple (password) auth */
- GtkWidget *binddn;
- GtkWidget *remember_passwd;
-};
-
-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, "<HTML><BODY>", 12);
- gtk_html_write (html, handle, text, strlen (text));
- gtk_html_write (html, handle, "</BODY></HTML>", 14);
- g_free (text);
- gtk_html_end (html, handle, GTK_HTML_STREAM_OK);
-}
-
-#ifdef INCLUDE_FILE_SOURCE
-static const char *
-addressbook_config_source_label (AddressbookSourceType type)
-{
- switch (type) {
- case ADDRESSBOOK_SOURCE_LDAP:
- return _("LDAP Server");
- case ADDRESSBOOK_SOURCE_FILE:
- return _("File");
- default:
- g_assert(0);
- return _("Unknown addressbook type");
- }
-}
-#endif
-
-static const char *
-addressbook_config_auth_label (AddressbookLDAPAuthType type)
-{
- switch (type) {
- case ADDRESSBOOK_LDAP_AUTH_NONE:
- return _("None (anonymous mode)");
- case ADDRESSBOOK_LDAP_AUTH_SIMPLE:
- return _("Password");
- case ADDRESSBOOK_LDAP_AUTH_SASL:
- return _("SASL");
- default:
- g_assert(0);
- return _("Unknown auth type");
- }
-}
-
-static const char *
-addressbook_config_scope_label (AddressbookLDAPScopeType scope)
-{
- switch (scope) {
- case ADDRESSBOOK_LDAP_SCOPE_BASE:
- return _("Base");
- case ADDRESSBOOK_LDAP_SCOPE_ONELEVEL:
- return _("One");
- case ADDRESSBOOK_LDAP_SCOPE_SUBTREE:
- return _("Subtree");
- default:
- g_assert (0);
- return _("Unknown scope type");
- }
-}
-
-static void
-addressbook_source_edit_changed (GtkWidget *item, AddressbookSourceDialog *dialog)
-{
- char *data;
- gboolean complete = TRUE;
- AddressbookSourcePageItem *source_page = dialog->source_page;
-
- if (source_page == NULL)
- complete = FALSE;
-
- if (complete) {
- data = e_utf8_gtk_editable_get_chars (GTK_EDITABLE (dialog->name), 0, -1);
- if (!data || !*data)
- complete = FALSE;
- g_free (data);
- }
-
- if (complete) {
- if (source_page->source_type == ADDRESSBOOK_SOURCE_FILE) {
- if (complete) {
- data = e_utf8_gtk_editable_get_chars (GTK_EDITABLE (source_page->path), 0, -1);
- if (!data || !*data)
- complete = FALSE;
- g_free (data);
- }
- }
- else {
- if (complete) {
- data = e_utf8_gtk_editable_get_chars (GTK_EDITABLE (source_page->host), 0, -1);
- if (!data || !*data)
- complete = FALSE;
- g_free (data);
- }
-
- if (complete) {
- data = e_utf8_gtk_editable_get_chars (GTK_EDITABLE (source_page->port), 0, -1);
- if (!data || !*data)
- complete = FALSE;
- /* XXX more validation on port here */
- g_free (data);
- }
-
- if (complete) {
- LDAPAuthPageItem *auth_page = source_page->auth;
-
- if (auth_page->auth_type == ADDRESSBOOK_LDAP_AUTH_SIMPLE) {
- data = e_utf8_gtk_editable_get_chars (GTK_EDITABLE (auth_page->binddn), 0, -1);
- if (!data || !*data)
- complete = FALSE;
- g_free (data);
- }
- else if (auth_page->auth_type == ADDRESSBOOK_LDAP_AUTH_SASL) {
- }
- data = e_utf8_gtk_editable_get_chars (GTK_EDITABLE (source_page->port), 0, -1);
- if (!data || !*data)
- complete = FALSE;
- /* XXX more validation on port here */
- g_free (data);
- }
- }
- }
-
- gnome_dialog_set_sensitive (GNOME_DIALOG (dialog->dialog), 0, complete);
-}
-
-static void
-source_type_menuitem_activate (GtkWidget *item, gpointer data)
-{
- AddressbookSourcePageItem *sitem = data;
-
- gtk_notebook_set_page (GTK_NOTEBOOK(sitem->dialog->notebook), sitem->pnum);
- sitem->dialog->source_page = sitem;
-
- addressbook_source_edit_changed (item, sitem->dialog);
-}
-
-typedef struct {
- AddressbookSourceDialog *dialog;
- char *help_text;
-} FocusHelpClosure;
-
-static void
-free_focus_help_closure (gpointer data)
-{
- FocusHelpClosure *closure = data;
- g_free(closure->help_text);
- g_free(closure);
-}
-
-static gint
-focus_help (GtkWidget *widget, GdkEventFocus *event, FocusHelpClosure *closure)
-{
- put_html (GTK_HTML(closure->dialog->html), closure->help_text);
- return FALSE;
-}
-
-static GtkWidget *
-table_add_elem (AddressbookSourceDialog *dialog, GtkWidget *table,
- int row,
- const char *label_text,
- const char *help_text)
-{
- GtkWidget *label, *entry;
- FocusHelpClosure *focus_closure;
-
- 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 (GTK_OBJECT (entry), "changed",
- GTK_SIGNAL_FUNC (addressbook_source_edit_changed), dialog);
-
- focus_closure = g_new0 (FocusHelpClosure, 1);
- focus_closure->dialog = dialog;
- focus_closure->help_text = g_strdup(help_text);
-
- gtk_signal_connect_full (GTK_OBJECT (entry),
- "focus_in_event" /* XXX */,
- (GtkSignalFunc) focus_help, NULL,
- focus_closure,
- (GtkDestroyNotify) free_focus_help_closure,
- FALSE, FALSE);
- return entry;
-}
-
-static void
-ldap_auth_type_menuitem_activate (GtkWidget *item, gpointer data)
-{
- LDAPAuthPageItem *auth_item = data;
-
- gtk_notebook_set_page (GTK_NOTEBOOK(auth_item->page->auth_notebook), auth_item->pnum);
-
- auth_item->page->auth = auth_item;
-
- addressbook_source_edit_changed (item, auth_item->dialog);
-}
-
-static LDAPAuthPageItem *
-addressbook_ldap_auth_item_new (AddressbookSourceDialog *dialog,
- AddressbookSourcePageItem *page,
- AddressbookLDAPAuthType type)
-{
- LDAPAuthPageItem *item = g_new0 (LDAPAuthPageItem, 1);
- GtkWidget *table = NULL;
- int row = 0;
-
- item->pnum = type;
- item->auth_type = type;
- item->dialog = dialog;
- item->page = page;
- item->vbox = gtk_vbox_new (FALSE, 0);
-
- switch (type) {
- case ADDRESSBOOK_LDAP_AUTH_NONE:
- break;
- case ADDRESSBOOK_LDAP_AUTH_SIMPLE:
- table = gtk_table_new (2, 2, FALSE);
- item->binddn = table_add_elem (dialog, table, row++,
- _("Bind DN:"),
- _("FIXME Bind DN Help text here"));
-
- item->remember_passwd = gtk_check_button_new_with_label (_("Remember this password"));
-
- gtk_table_attach (GTK_TABLE (table), item->remember_passwd, 1, 2,
- row, row + 1, GTK_FILL, 0, 0, 0);
-
- gtk_box_pack_start (GTK_BOX (item->vbox), table,
- TRUE, TRUE, 0);
- break;
- case ADDRESSBOOK_LDAP_AUTH_SASL:
- break;
- default:
- g_assert (0);
- return item;
- }
-
- if (table) {
- 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_widget_show_all (item->vbox);
-
- return item;
-}
-
-static AddressbookSourcePageItem *
-addressbook_source_item_new (AddressbookSourceDialog *dialog, AddressbookSourceType type)
-{
- AddressbookSourcePageItem *item = g_new0 (AddressbookSourcePageItem, 1);
- GtkWidget *table = NULL;
- int row = 0;
-
- item->pnum = type;
- item->source_type = type;
- item->dialog = dialog;
-
- item->vbox = gtk_vbox_new (FALSE, 0);
-
- switch (type) {
- case ADDRESSBOOK_SOURCE_LDAP: {
- GtkWidget *label;
- GtkWidget *menu;
- int i;
- LDAPAuthPageItem *first_item = NULL;
- int position;
-
- table = gtk_table_new (5, 2, FALSE);
-
- item->host = table_add_elem (dialog, table, row++,
- _("Host:"),
- _("FIXME Host help text here."));
- item->port = table_add_elem (dialog, table, row++,
- _("Port:"),
- _("FIXME Port help text here."));
- gtk_editable_insert_text (GTK_EDITABLE (item->port), "389", 3, &position);
-
- item->rootdn = table_add_elem (dialog, table, row++,
- _("Root DN:"),
- _("FIXME Root DN help text here."));
-
- item->scope_optionmenu = gtk_option_menu_new ();
- menu = gtk_menu_new ();
-
- for (i = 0; i < ADDRESSBOOK_LDAP_SCOPE_LAST; i ++) {
- GtkWidget *scope_item = gtk_menu_item_new_with_label (addressbook_config_scope_label (i));
-
- gtk_signal_connect (GTK_OBJECT (scope_item), "activate",
- GTK_SIGNAL_FUNC (addressbook_source_edit_changed),
- dialog);
-
- gtk_menu_append (GTK_MENU (menu), scope_item);
- gtk_widget_show (scope_item);
- }
-
- gtk_option_menu_set_menu (GTK_OPTION_MENU (item->scope_optionmenu), menu);
- // ldap_auth_type_menuitem_activate (first_item->item, first_item);
- gtk_option_menu_set_history (GTK_OPTION_MENU(item->scope_optionmenu), 0);
-
- label = gtk_label_new (_("Search Scope:"));
- 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);
-
- gtk_table_attach (GTK_TABLE (table),
- item->scope_optionmenu,
- 1, 2, row, row + 1,
- GTK_EXPAND | GTK_FILL, 0,
- 0, 0);
-
- row++;
-
- gtk_box_pack_start (GTK_BOX (item->vbox), table,
- TRUE, FALSE, 0);
-
- item->auth_optionmenu = gtk_option_menu_new ();
- menu = gtk_menu_new ();
-
- item->auth_notebook = gtk_notebook_new();
- gtk_notebook_set_show_tabs (GTK_NOTEBOOK (item->auth_notebook), FALSE);
-
- for (i = 0; i < ADDRESSBOOK_LDAP_AUTH_LAST; i++) {
- LDAPAuthPageItem *auth_item;
-
-#ifndef LDAP_SASL
- /* skip the sasl stuff if we're not configured for it. */
- if (i == ADDRESSBOOK_LDAP_AUTH_SASL)
- continue;
-#endif
- auth_item = addressbook_ldap_auth_item_new (dialog, item, i);
-
- item->auths = g_list_append (item->auths, auth_item);
-
- if (!first_item)
- first_item = auth_item;
-
- auth_item->item = gtk_menu_item_new_with_label (addressbook_config_auth_label (i));
-
- gtk_notebook_append_page (GTK_NOTEBOOK (item->auth_notebook),
- auth_item->vbox, NULL);
-
- gtk_signal_connect (GTK_OBJECT (auth_item->item), "activate",
- GTK_SIGNAL_FUNC (ldap_auth_type_menuitem_activate),
- auth_item);
-
- gtk_menu_append (GTK_MENU (menu), auth_item->item);
- gtk_widget_show (auth_item->item);
- }
-
- gtk_option_menu_set_menu (GTK_OPTION_MENU (item->auth_optionmenu), menu);
- ldap_auth_type_menuitem_activate (first_item->item, first_item);
- gtk_option_menu_set_history (GTK_OPTION_MENU(item->auth_optionmenu), 0);
-
- label = gtk_label_new (_("Authentication:"));
- 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);
-
- gtk_table_attach (GTK_TABLE (table),
- item->auth_optionmenu,
- 1, 2, row, row + 1,
- GTK_EXPAND | GTK_FILL, 0,
- 0, 0);
-
- gtk_box_pack_start (GTK_BOX (item->vbox), item->auth_notebook,
- TRUE, TRUE, 0);
- break;
- }
- case ADDRESSBOOK_SOURCE_FILE: {
- table = gtk_table_new (2, 2, FALSE);
- item->path = table_add_elem (dialog, table, row++,
- _("Path:"),
- _("FIXME Path Help text here"));
-
- gtk_box_pack_start (GTK_BOX (item->vbox), table,
- TRUE, TRUE, 0);
-
- item->creat = gtk_check_button_new_with_label (_("Create path if it doesn't exist."));
- gtk_table_attach (GTK_TABLE (table), item->creat, 1, 2,
- row, row + 1, GTK_FILL, 0, 0, 0);
- break;
- }
- default:
- g_assert(0);
- return item;
- }
-
- 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_widget_show_all (item->vbox);
-
- return item;
-}
-
-static void
-addressbook_source_dialog_set_source (AddressbookSourceDialog *dialog, AddressbookSource *source)
-{
- AddressbookSourcePageItem *source_page;
-
- e_utf8_gtk_entry_set_text (GTK_ENTRY (dialog->name), source->name);
- e_utf8_gtk_entry_set_text (GTK_ENTRY (dialog->description), source->description);
-
- /* choose the correct server page */
- source_page = g_list_nth_data (dialog->source_pages, source->type);
- source_type_menuitem_activate (source_page->item, source_page);
- gtk_option_menu_set_history (GTK_OPTION_MENU(dialog->source_option), source->type);
-
- if (source->type == ADDRESSBOOK_SOURCE_LDAP) {
- LDAPAuthPageItem *auth_page;
-
- e_utf8_gtk_entry_set_text (GTK_ENTRY (source_page->host), source->ldap.host);
- e_utf8_gtk_entry_set_text (GTK_ENTRY (source_page->port), source->ldap.port);
- e_utf8_gtk_entry_set_text (GTK_ENTRY (source_page->rootdn), source->ldap.rootdn);
-
- gtk_option_menu_set_history (GTK_OPTION_MENU(source_page->scope_optionmenu), source->ldap.scope);
-
- auth_page = g_list_nth_data (source_page->auths, source->ldap.auth);
- ldap_auth_type_menuitem_activate (auth_page->item, auth_page);
- gtk_option_menu_set_history (GTK_OPTION_MENU(source_page->auth_optionmenu), auth_page->auth_type);
-
- if (auth_page->auth_type == ADDRESSBOOK_LDAP_AUTH_SIMPLE) {
- e_utf8_gtk_entry_set_text (GTK_ENTRY (auth_page->binddn), source->ldap.binddn);
- }
- }
- else {
- e_utf8_gtk_entry_set_text (GTK_ENTRY (source_page->path), source->file.path);
- }
-}
-
-static AddressbookSource *
-addressbook_source_dialog_get_source (AddressbookSourceDialog *dialog)
-{
- AddressbookSource *source = g_new0 (AddressbookSource, 1);
- AddressbookSourcePageItem *source_page;
-
- source_page = dialog->source_page;
-
- source->name = e_utf8_gtk_entry_get_text (GTK_ENTRY (dialog->name));
- source->description = e_utf8_gtk_entry_get_text (GTK_ENTRY (dialog->description));
- source->type = source_page->source_type;
-
- if (source->type == ADDRESSBOOK_SOURCE_FILE) {
- source->file.path = e_utf8_gtk_entry_get_text (GTK_ENTRY (source_page->path));
- }
- else {
- LDAPAuthPageItem *auth_page;
-
- source->ldap.host = e_utf8_gtk_entry_get_text (GTK_ENTRY (source_page->host));
- source->ldap.port = e_utf8_gtk_entry_get_text (GTK_ENTRY (source_page->port));
- source->ldap.rootdn = e_utf8_gtk_entry_get_text (GTK_ENTRY (source_page->rootdn));
-
- auth_page = source_page->auth;
-
- source->ldap.auth = auth_page->auth_type;
- if (source->ldap.auth == ADDRESSBOOK_LDAP_AUTH_SIMPLE) {
- source->ldap.binddn = e_utf8_gtk_entry_get_text (GTK_ENTRY (auth_page->binddn));
- source->ldap.remember_passwd = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (auth_page->remember_passwd));
- }
-
- ldap_auth_type_menuitem_activate (auth_page->item, auth_page);
- gtk_option_menu_set_history (GTK_OPTION_MENU(source_page->auth_optionmenu), auth_page->auth_type);
- }
-
- addressbook_storage_init_source_uri (source);
-
- return source;
-}
-
-static void
-addressbook_source_dialog_ok_clicked (GtkWidget *widget, AddressbookSourceDialog *dialog)
-{
- dialog->source = addressbook_source_dialog_get_source (dialog);
-}
-
-static void
-addressbook_source_dialog_destroy (AddressbookSourceDialog *dialog)
-{
- GList *s;
-
- for (s = dialog->source_pages; s; s = s->next) {
- AddressbookSourcePageItem *source_item = s->data;
-
- g_list_foreach (source_item->auths, (GFunc)g_free, NULL);
- g_list_free (source_item->auths);
- g_free (source_item);
- }
-
- g_list_free (dialog->source_pages);
-
- if (dialog->source)
- addressbook_source_free (dialog->source);
- g_free (dialog);
-}
-
-static AddressbookSourceDialog*
-addressbook_source_dialog (AddressbookSource *source, GtkWidget *parent)
-{
- GtkWidget *table;
- AddressbookSourceDialog *dialog = g_new0 (AddressbookSourceDialog, 1);
- GtkWidget *vbox, *dialog_vbox;
-#ifdef INCLUDE_FILE_SOURCE
- GtkWidget *menu;
- AddressbookSourcePageItem *first_item = NULL;
-#endif
- GtkWidget *area;
- int i;
- int row = 0;
-
- if (source)
- dialog->dialog = gnome_dialog_new (_("Edit Addressbook"), NULL);
- else
- dialog->dialog = gnome_dialog_new (_("Add Addressbook"), NULL);
-
- gtk_window_set_modal (GTK_WINDOW (dialog->dialog), TRUE);
- gtk_window_set_policy (GTK_WINDOW (dialog->dialog),
- FALSE, TRUE, FALSE);
- gtk_window_set_default_size (GTK_WINDOW (dialog->dialog), 300, 350);
- gnome_dialog_set_parent (GNOME_DIALOG (dialog->dialog),
- GTK_WINDOW (parent));
-
- dialog->vbox = gtk_vbox_new (FALSE, 5);
- dialog_vbox = GNOME_DIALOG (dialog->dialog)->vbox;
-
- vbox = gtk_vbox_new (FALSE, 0);
-
- dialog->html = html_new (FALSE);
- put_html (GTK_HTML (dialog->html),
- _("Select the kind of addressbook you have, and enter "
- "the relevant information about it."));
-
- table = gtk_table_new (2, 2, FALSE);
-
- dialog->name = table_add_elem (dialog, table, row++,
- _("Name:"),
- _("FIXME Name help text here"));
- dialog->description = table_add_elem (dialog, table, row++,
- _("Description:"),
- _("FIXME Description help text here"));
-
- 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);
-
- dialog->notebook = gtk_notebook_new();
- gtk_notebook_set_show_tabs (GTK_NOTEBOOK (dialog->notebook), FALSE);
-
-#ifdef INCLUDE_FILE_SOURCE
- dialog->source_option = gtk_option_menu_new ();
- menu = gtk_menu_new ();
-#endif
-
- for (i =
-#ifndef INCLUDE_FILE_SOURCE
- ADDRESSBOOK_SOURCE_LDAP;
-#else
- ADDRESSBOOK_SOURCE_FILE;
-#endif
- i < ADDRESSBOOK_SOURCE_LAST;
- i ++) {
- AddressbookSourcePageItem *item;
-
- item = addressbook_source_item_new (dialog, i);
-
- dialog->source_pages = g_list_append (dialog->source_pages, item);
-
-#ifdef INCLUDE_FILE_SOURCE
- item->item = gtk_menu_item_new_with_label (addressbook_config_source_label (i));
-
- if (!first_item)
- first_item = item;
-#endif
-
- gtk_notebook_append_page (GTK_NOTEBOOK (dialog->notebook),
- item->vbox, NULL);
-
- gtk_signal_connect (GTK_OBJECT (item->item), "activate",
- GTK_SIGNAL_FUNC (source_type_menuitem_activate),
- item);
-
-#ifdef INCLUDE_FILE_SOURCE
- gtk_menu_append (GTK_MENU (menu), item->item);
-#endif
- gtk_widget_show (item->item);
- }
-
-#ifdef INCLUDE_FILE_SOURCE
- gtk_option_menu_set_menu (GTK_OPTION_MENU (dialog->source_option), menu);
- source_type_menuitem_activate (first_item->item, first_item);
- gtk_option_menu_set_history (GTK_OPTION_MENU(dialog->source_option), 0);
-#endif
-
- gtk_box_pack_start (GTK_BOX (vbox), dialog->html->parent,
- FALSE, TRUE, 0);
-
- gtk_box_pack_start (GTK_BOX (vbox), table,
- FALSE, FALSE, 0);
-
-#ifdef INCLUDE_FILE_SOURCE
- gtk_box_pack_start (GTK_BOX (vbox), dialog->source_option,
- FALSE, FALSE, 0);
-#endif
-
- gtk_box_pack_start (GTK_BOX (dialog->vbox), vbox, FALSE, TRUE, 0);
-
- gtk_box_pack_start (GTK_BOX (dialog->vbox), dialog->notebook,
- TRUE, TRUE, 0);
-
- /* hook our ui into the gnome-dialog */
- gtk_box_pack_start (GTK_BOX (dialog_vbox), dialog->vbox, TRUE, TRUE, 0);
-
- gtk_widget_show_all (dialog->vbox);
-
- /* Buttons */
- area = GNOME_DIALOG (dialog->dialog)->action_area;
- gtk_widget_show (area);
- gtk_button_box_set_layout (GTK_BUTTON_BOX (area), GTK_BUTTONBOX_END);
- gtk_button_box_set_spacing (GTK_BUTTON_BOX (area), 8);
-
- gnome_dialog_append_button (GNOME_DIALOG (dialog->dialog),
- GNOME_STOCK_BUTTON_OK);
- gnome_dialog_append_button (GNOME_DIALOG (dialog->dialog),
- GNOME_STOCK_BUTTON_CANCEL);
-
- gnome_dialog_set_default (GNOME_DIALOG (dialog->dialog), 0);
-
- /* fill in source info if there is some */
- if (source)
- addressbook_source_dialog_set_source (dialog, source);
-
- gnome_dialog_set_sensitive (GNOME_DIALOG (dialog->dialog), 0, FALSE);
-
- gnome_dialog_button_connect( GNOME_DIALOG (dialog->dialog), 0,
- GTK_SIGNAL_FUNC (addressbook_source_dialog_ok_clicked),
- dialog);
-
- return dialog;
-}
-
-static AddressbookSourceDialog *
-addressbook_config_source (AddressbookSource *source, GtkWidget *parent)
-{
- AddressbookSourceDialog* dialog = addressbook_source_dialog (source, parent);
-
- dialog->id = gnome_dialog_run_and_close (GNOME_DIALOG (dialog->dialog));
-
- return dialog;
-}
-
-
-
-typedef struct {
- GladeXML *gui;
- GNOME_Evolution_Shell shell;
- GtkWidget *dialog;
- GtkWidget *clistSources;
- GtkWidget *addSource;
- GtkWidget *editSource;
- GtkWidget *deleteSource;
- gint source_row;
-} AddressbookDialog;
-
-static void
-update_sensitivity (AddressbookDialog *dialog)
-{
- gboolean sensitive = dialog->source_row != -1;
-
- gtk_widget_set_sensitive (dialog->editSource, sensitive);
- gtk_widget_set_sensitive (dialog->deleteSource, sensitive);
-}
-
-static void
-add_source_clicked (GtkWidget *widget, AddressbookDialog *dialog)
-{
- AddressbookSourceDialog *sdialog;
-
- sdialog = addressbook_config_source (NULL, dialog->dialog);
- if (sdialog->id == 0) {
- /* Ok was clicked */
- AddressbookSource *source = addressbook_source_copy(sdialog->source);
- gint row;
- gchar *text[2];
-
- text[0] = source->name;
- text[1] = source->uri;
-
- row = e_utf8_gtk_clist_append (GTK_CLIST(dialog->clistSources), text);
- gtk_clist_set_row_data_full (GTK_CLIST(dialog->clistSources), row, source, (GtkDestroyNotify) addressbook_source_free);
- gnome_property_box_changed (GNOME_PROPERTY_BOX (dialog->dialog));
- update_sensitivity (dialog);
- }
-
- addressbook_source_dialog_destroy (sdialog);
-}
-
-static void
-edit_source_clicked (GtkWidget *widget, AddressbookDialog *dialog)
-{
- AddressbookSource *source;
- AddressbookSourceDialog *sdialog;
-
- source = gtk_clist_get_row_data (GTK_CLIST (dialog->clistSources), dialog->source_row);
-
- sdialog = addressbook_config_source (source, dialog->dialog);
- if (sdialog->id == 0) {
- /* Ok was clicked */
- source = addressbook_source_copy(sdialog->source);
-
- e_utf8_gtk_clist_set_text (GTK_CLIST (dialog->clistSources), dialog->source_row, 0, source->name);
- e_utf8_gtk_clist_set_text (GTK_CLIST (dialog->clistSources), dialog->source_row, 1, source->uri);
- gtk_clist_set_row_data (GTK_CLIST (dialog->clistSources), dialog->source_row, source);
- gnome_property_box_changed (GNOME_PROPERTY_BOX (dialog->dialog));
- update_sensitivity (dialog);
- }
-
- addressbook_source_dialog_destroy (sdialog);
-}
-
-static void
-delete_source_clicked (GtkWidget *widget, AddressbookDialog *dialog)
-{
- gtk_clist_remove (GTK_CLIST (dialog->clistSources), dialog->source_row);
- dialog->source_row = -1;
- gnome_property_box_changed (GNOME_PROPERTY_BOX(dialog->dialog));
- update_sensitivity (dialog);
-}
-
-static void
-sources_select_row (GtkWidget *widget, gint row, gint column,
- GdkEventButton *event, AddressbookDialog *dialog)
-{
- dialog->source_row = row;
-
- update_sensitivity (dialog);
-}
-
-static void
-addressbook_dialog_apply (GnomePropertyBox *property_box, gint page_num, AddressbookDialog *dialog)
-{
- int i;
-
- if (page_num != -1)
- return;
-
- addressbook_storage_clear_sources();
-
- for (i = 0; i < GTK_CLIST(dialog->clistSources)->rows; i ++) {
- AddressbookSource *source = (AddressbookSource*)gtk_clist_get_row_data (GTK_CLIST (dialog->clistSources), i);
- addressbook_storage_add_source (addressbook_source_copy (source));
- }
-}
-
-static void
-addressbook_dialog_close (GnomePropertyBox *property_box, AddressbookDialog *dialog)
-{
- gtk_object_unref (GTK_OBJECT (dialog->gui));
- g_free (dialog);
-}
-
-void
-addressbook_config (GNOME_Evolution_Shell shell)
-{
- AddressbookDialog *dialog;
- GladeXML *gui;
- GtkWidget *clist;
- GList *l;
-
- dialog = g_new0 (AddressbookDialog, 1);
-
- dialog->source_row = -1;
-
- gui = glade_xml_new (EVOLUTION_GLADEDIR "/addressbook-config.glade", NULL);
- dialog->gui = gui;
- dialog->shell = shell;
-
- dialog->dialog = glade_xml_get_widget (gui, "dialog");
-
- clist = glade_xml_get_widget (gui, "clistSources");
- dialog->clistSources = clist;
-
- gtk_clist_column_titles_passive (GTK_CLIST (clist));
- gtk_clist_set_column_width (GTK_CLIST (clist), 0, 80);
-
- dialog->addSource = glade_xml_get_widget (gui, "addSource");
- gtk_signal_connect (GTK_OBJECT(dialog->addSource), "clicked",
- GTK_SIGNAL_FUNC (add_source_clicked),
- dialog);
-
- dialog->editSource = glade_xml_get_widget (gui, "editSource");
- gtk_signal_connect (GTK_OBJECT(dialog->editSource), "clicked",
- GTK_SIGNAL_FUNC (edit_source_clicked),
- dialog);
-
- dialog->deleteSource = glade_xml_get_widget (gui, "deleteSource");
- gtk_signal_connect (GTK_OBJECT(dialog->deleteSource), "clicked",
- GTK_SIGNAL_FUNC (delete_source_clicked),
- dialog);
-
- update_sensitivity (dialog);
-
- l = addressbook_storage_get_sources ();
- for (; l != NULL; l = l->next) {
- AddressbookSource *source;
- gint row;
- gchar *text[2];
-
- source = addressbook_source_copy ((AddressbookSource*)l->data);
-
- text[0] = source->name;
- text[1] = source->uri;
-
- row = e_utf8_gtk_clist_append (GTK_CLIST(clist), text);
- gtk_clist_set_row_data_full (GTK_CLIST(clist), row, source, (GtkDestroyNotify) addressbook_source_free);
- }
-
- gtk_signal_connect (GTK_OBJECT (clist), "select_row",
- GTK_SIGNAL_FUNC (sources_select_row),
- dialog);
-
- gtk_signal_connect (GTK_OBJECT (dialog->dialog), "apply",
- addressbook_dialog_apply, dialog);
-
- gtk_signal_connect (GTK_OBJECT (dialog->dialog), "destroy",
- addressbook_dialog_close, dialog);
-
- gtk_window_set_default_size (GTK_WINDOW (dialog->dialog), 300, 350);
-
- gtk_widget_show (dialog->dialog);
-}
diff --git a/addressbook/gui/component/addressbook-config.glade b/addressbook/gui/component/addressbook-config.glade
deleted file mode 100644
index 9194a27c5d..0000000000
--- a/addressbook/gui/component/addressbook-config.glade
+++ /dev/null
@@ -1,158 +0,0 @@
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <directory></directory>
- <source_directory>src</source_directory>
- <pixmaps_directory>pixmaps</pixmaps_directory>
- <language>C</language>
- <gnome_support>True</gnome_support>
- <gettext_support>True</gettext_support>
-</project>
-
-<widget>
- <class>GnomePropertyBox</class>
- <name>dialog</name>
- <width>460</width>
- <height>360</height>
- <position>GTK_WIN_POS_NONE</position>
- <modal>False</modal>
- <allow_shrink>False</allow_shrink>
- <allow_grow>False</allow_grow>
- <auto_shrink>False</auto_shrink>
-
- <widget>
- <class>GtkNotebook</class>
- <child_name>GnomePropertyBox:notebook</child_name>
- <name>notebook1</name>
- <can_focus>True</can_focus>
- <show_tabs>True</show_tabs>
- <show_border>True</show_border>
- <tab_pos>GTK_POS_TOP</tab_pos>
- <scrollable>False</scrollable>
- <tab_hborder>2</tab_hborder>
- <tab_vborder>2</tab_vborder>
- <popup_enable>False</popup_enable>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox2</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkScrolledWindow</class>
- <name>scrolledwindow1</name>
- <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
- <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
- <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
- <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkCList</class>
- <name>clistSources</name>
- <can_focus>True</can_focus>
- <columns>2</columns>
- <column_widths>80,80</column_widths>
- <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
- <show_titles>True</show_titles>
- <shadow_type>GTK_SHADOW_IN</shadow_type>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>CList:title</child_name>
- <name>label10</name>
- <label>Name</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>CList:title</child_name>
- <name>label11</name>
- <label>URI</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkVButtonBox</class>
- <name>vbuttonbox2</name>
- <layout_style>GTK_BUTTONBOX_START</layout_style>
- <spacing>10</spacing>
- <child_min_width>85</child_min_width>
- <child_min_height>27</child_min_height>
- <child_ipad_x>7</child_ipad_x>
- <child_ipad_y>0</child_ipad_y>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>addSource</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <label>Add</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>editSource</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <label>Edit</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>deleteSource</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <label>Delete</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label8</name>
- <label>Addressbook Sources</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
-</widget>
-
-</GTK-Interface>
diff --git a/addressbook/gui/component/addressbook-config.h b/addressbook/gui/component/addressbook-config.h
deleted file mode 100644
index 51fe555f00..0000000000
--- a/addressbook/gui/component/addressbook-config.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* addressbook-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: Chris Toshok
- */
-
-#ifndef __ADDRESSBOOK_CONFIG_H__
-#define __ADDRESSBOOK_CONFIG_H__
-
-#include "addressbook-storage.h"
-
-void addressbook_config (GNOME_Evolution_Shell shell);
-
-#endif /* __ADDRESSBOOK_CONFIG_H__ */
diff --git a/addressbook/gui/component/addressbook-factory.c b/addressbook/gui/component/addressbook-factory.c
deleted file mode 100644
index 89514d6527..0000000000
--- a/addressbook/gui/component/addressbook-factory.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/**
- * sample-control-factory.c
- *
- * Copyright 1999, Helix Code, Inc.
- *
- * Author:
- * Nat Friedman (nat@nat.org)
- *
- */
-
-#include <config.h>
-#include <glib.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-init.h>
-#include <liboaf/liboaf.h>
-#include <bonobo/bonobo-main.h>
-#include <glade/glade.h>
-#include <gal/widgets/e-cursors.h>
-#include <unicode.h>
-
-#include "addressbook.h"
-#include "addressbook-component.h"
-#include "e-address-widget.h"
-#include "e-address-popup.h"
-#include "addressbook/gui/widgets/e-minicard-control.h"
-#include "select-names/e-select-names-factory.h"
-
-
-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);
-}
-
-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)
-{
- bindtextdomain (PACKAGE, EVOLUTION_LOCALEDIR);
- textdomain (PACKAGE);
-
- 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_select_names_factory_init ();
-
- e_minicard_control_factory_init ();
-
- e_address_widget_factory_init ();
- e_address_popup_factory_init ();
-
- e_cursors_init();
-
- unicode_init();
-
-#if 0
- g_log_set_always_fatal (G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING);
-#endif
-
- bonobo_main ();
-
- return 0;
-}
diff --git a/addressbook/gui/component/addressbook-storage.c b/addressbook/gui/component/addressbook-storage.c
deleted file mode 100644
index 5fcebee68d..0000000000
--- a/addressbook/gui/component/addressbook-storage.c
+++ /dev/null
@@ -1,539 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-ldap-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: Chris Toshok
- */
-
-/* The ldap server file goes like this:
-
- <?xml version="1.0"?>
- <addressbooks>
- <contactserver>
- <name>LDAP Server</name>
- <description>This is my company address book.</description>
- <host>ldap.server.com</host>
- <port>389</port>
- <rootdn></rootdn>
- <authmethod>simple</authmethod>
- <binddn>cn=Chris Toshok,dc=helixcode,dc=com</binddn>
- <rememberpass/>
- </contactserver>
- <contactfile>
- <name>On Disk Contacts</name>
- <description>This is one of my private contact dbs.</description>
- <path>/home/toshok/contacts/work-contacts.db</path>
- </contactfile>
- </addressbooks>
-
- FIXME: Do we want to use a namespace for this?
- FIXME: Do we want to have an internationalized description?
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <sys/stat.h>
-#include <errno.h>
-
-#include <glib.h>
-#include <gnome-xml/parser.h>
-#include <gnome-xml/xmlmemory.h>
-
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <bonobo/bonobo-object.h>
-
-#include <gal/util/e-util.h>
-#include <gal/util/e-xml-utils.h>
-#include <libgnome/gnome-i18n.h>
-
-#include "evolution-shell-component.h"
-#include "evolution-storage.h"
-
-#include "addressbook-storage.h"
-
-#define ADDRESSBOOK_SOURCES_XML "addressbook-sources.xml"
-
-static gboolean load_source_data (EvolutionStorage *storage, const char *file_path);
-static gboolean save_source_data (const char *file_path);
-
-GList *sources;
-EvolutionStorage *storage;
-static char *storage_path;
-
-void
-addressbook_storage_setup (EvolutionShellComponent *shell_component,
- const char *evolution_homedir)
-{
- EvolutionShellClient *shell_client;
- GNOME_Evolution_Shell corba_shell;
-
- shell_client = evolution_shell_component_get_owner (shell_component);
- if (shell_client == CORBA_OBJECT_NIL) {
- g_warning ("We have no shell!?");
- return;
- }
-
- corba_shell = bonobo_object_corba_objref (BONOBO_OBJECT (shell_client));
-
- storage = evolution_storage_new (_("Other Contacts"), NULL, NULL);
- if (evolution_storage_register_on_shell (storage, corba_shell) != EVOLUTION_STORAGE_OK) {
- g_warning ("Cannot register storage");
- return;
- }
-
- sources = NULL;
-
- gtk_object_set_data (GTK_OBJECT (shell_component), "e-storage", storage);
-
- if (storage_path)
- g_free (storage_path);
- storage_path = g_strdup_printf ("%s/" ADDRESSBOOK_SOURCES_XML, evolution_homedir);
- load_source_data (storage, storage_path);
-}
-
-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) /* there's no text between the tags, return the empty string */
- return g_strdup("");
-
- xml_string = xmlNodeListGetString (node->doc, p, 1);
- retval = g_strdup ((char *) xml_string);
- xmlFree (xml_string);
-
- return retval;
-}
-
-static char *
-ldap_unparse_auth (AddressbookLDAPAuthType auth_type)
-{
- switch (auth_type) {
- case ADDRESSBOOK_LDAP_AUTH_NONE:
- return "none";
- case ADDRESSBOOK_LDAP_AUTH_SIMPLE:
- return "simple";
- case ADDRESSBOOK_LDAP_AUTH_SASL:
- return "sasl";
- default:
- g_assert(0);
- return "none";
- }
-}
-
-static AddressbookLDAPAuthType
-ldap_parse_auth (const char *auth)
-{
- if (!auth)
- return ADDRESSBOOK_LDAP_AUTH_NONE;
-
- if (!strcmp (auth, "simple"))
- return ADDRESSBOOK_LDAP_AUTH_SIMPLE;
- else if (!strcmp (auth, "sasl"))
- return ADDRESSBOOK_LDAP_AUTH_SASL;
- else
- return ADDRESSBOOK_LDAP_AUTH_NONE;
-}
-
-static char *
-ldap_unparse_scope (AddressbookLDAPScopeType scope_type)
-{
- switch (scope_type) {
- case ADDRESSBOOK_LDAP_SCOPE_BASE:
- return "base";
- case ADDRESSBOOK_LDAP_SCOPE_ONELEVEL:
- return "one";
- case ADDRESSBOOK_LDAP_SCOPE_SUBTREE:
- return "sub";
- default:
- g_assert(0);
- return "";
- }
-}
-
-static AddressbookLDAPScopeType
-ldap_parse_scope (const char *scope)
-{
- if (!scope)
- return ADDRESSBOOK_LDAP_SCOPE_SUBTREE; /* XXX good default? */
-
- if (!strcmp (scope, "base"))
- return ADDRESSBOOK_LDAP_SCOPE_BASE;
- else if (!strcmp (scope, "one"))
- return ADDRESSBOOK_LDAP_SCOPE_ONELEVEL;
- else
- return ADDRESSBOOK_LDAP_SCOPE_SUBTREE;
-}
-
-void
-addressbook_storage_init_source_uri (AddressbookSource *source)
-{
- if (source->uri)
- g_free (source->uri);
-
- if (source->type == ADDRESSBOOK_SOURCE_LDAP)
- source->uri = g_strdup_printf ("ldap://%s:%s/%s??%s",
- source->ldap.host, source->ldap.port,
- source->ldap.rootdn, ldap_unparse_scope(source->ldap.scope));
- else
- source->uri = g_strdup_printf ("file://%s",
- source->file.path);
-}
-
-static gboolean
-load_source_data (EvolutionStorage *storage,
- const char *file_path)
-{
- xmlDoc *doc;
- xmlNode *root;
- xmlNode *child;
-
- tryagain:
- doc = xmlParseFile (file_path);
- if (doc == NULL) {
- /* check to see if a ldapserver.xml.new file is
- there. if it is, rename it and run with it */
- char *new_path = g_strdup_printf ("%s.new", file_path);
- struct stat sb;
-
- if (stat (new_path, &sb) == 0) {
- int rv;
-
- rv = rename (new_path, file_path);
- g_free (new_path);
-
- if (0 > rv) {
- g_error ("Failed to rename %s: %s\n",
- ADDRESSBOOK_SOURCES_XML,
- strerror(errno));
- return FALSE;
- }
- else {
- goto tryagain;
- }
- }
-
- g_free (new_path);
- return TRUE;
- }
-
- root = xmlDocGetRootElement (doc);
- if (root == NULL || strcmp (root->name, "addressbooks") != 0) {
- xmlFreeDoc (doc);
- return FALSE;
- }
-
- for (child = root->childs; child; child = child->next) {
- char *path;
- AddressbookSource *source;
-
- source = g_new0 (AddressbookSource, 1);
-
- if (!strcmp (child->name, "contactserver")) {
- source->type = ADDRESSBOOK_SOURCE_LDAP;
- source->ldap.port = get_string_value (child, "port");
- source->ldap.host = get_string_value (child, "host");
- source->ldap.rootdn = get_string_value (child, "rootdn");
- source->ldap.scope = ldap_parse_scope (get_string_value (child, "scope"));
- source->ldap.auth = ldap_parse_auth (get_string_value (child, "authmethod"));
- source->ldap.binddn = get_string_value (child, "binddn");
- }
- else if (!strcmp (child->name, "contactfile")) {
- source->type = ADDRESSBOOK_SOURCE_FILE;
- source->file.path = get_string_value (child, "path");
- }
- else {
- g_warning ("unknown node '%s' in %s", child->name, file_path);
- g_free (source);
- continue;
- }
-
- addressbook_storage_init_source_uri (source);
-
- source->name = get_string_value (child, "name");
- source->description = get_string_value (child, "description");
-
- path = g_strdup_printf ("/%s", source->name);
- evolution_storage_new_folder (storage, path, source->name,
- "contacts", source->uri,
- source->description, FALSE);
-
- sources = g_list_append (sources, source);
-
- g_free (path);
- }
-
- xmlFreeDoc (doc);
-
- return TRUE;
-}
-
-static void
-ldap_source_foreach(AddressbookSource *source, xmlNode *root)
-{
- xmlNode *source_root = xmlNewNode (NULL,
- (xmlChar *) "contactserver");
-
- xmlAddChild (root, source_root);
-
- xmlNewChild (source_root, NULL, (xmlChar *) "name",
- (xmlChar *) source->name);
- xmlNewChild (source_root, NULL, (xmlChar *) "description",
- (xmlChar *) source->description);
-
- xmlNewChild (source_root, NULL, (xmlChar *) "port",
- (xmlChar *) source->ldap.port);
- xmlNewChild (source_root, NULL, (xmlChar *) "host",
- (xmlChar *) source->ldap.host);
- xmlNewChild (source_root, NULL, (xmlChar *) "rootdn",
- (xmlChar *) source->ldap.rootdn);
- xmlNewChild (source_root, NULL, (xmlChar *) "scope",
- (xmlChar *) ldap_unparse_scope(source->ldap.scope));
- xmlNewChild (source_root, NULL, (xmlChar *) "authmethod",
- (xmlChar *) ldap_unparse_auth(source->ldap.auth));
- if (source->ldap.auth == ADDRESSBOOK_LDAP_AUTH_SIMPLE) {
- xmlNewChild (source_root, NULL, (xmlChar *) "binddn",
- (xmlChar *) source->ldap.binddn);
- if (source->ldap.remember_passwd)
- xmlNewChild (source_root, NULL, (xmlChar *) "rememberpass",
- NULL);
- }
-}
-
-static void
-file_source_foreach (AddressbookSource *source, xmlNode *root)
-{
- xmlNode *source_root = xmlNewNode (NULL,
- (xmlChar *) "contactfile");
-
- xmlAddChild (root, source_root);
-
- xmlNewChild (source_root, NULL, (xmlChar *) "name",
- (xmlChar *) source->name);
- xmlNewChild (source_root, NULL, (xmlChar *) "description",
- (xmlChar *) source->description);
-
- xmlNewChild (source_root, NULL, (xmlChar *) "path",
- (xmlChar *) source->file.path);
-}
-
-static void
-source_foreach(gpointer value, gpointer user_data)
-{
- AddressbookSource *source = value;
- xmlNode *root = user_data;
-
- if (source->type == ADDRESSBOOK_SOURCE_LDAP)
- ldap_source_foreach(source, root);
- else
- file_source_foreach(source, root);
-}
-
-static gboolean
-save_source_data (const char *file_path)
-{
- xmlDoc *doc;
- xmlNode *root;
- int fd, rv;
- xmlChar *buf;
- int buf_size;
- char *new_path = g_strdup_printf ("%s.new", file_path);
-
- doc = xmlNewDoc ((xmlChar *) "1.0");
- root = xmlNewDocNode (doc, NULL, (xmlChar *) "addressbooks", NULL);
- xmlDocSetRootElement (doc, root);
-
- g_list_foreach (sources, source_foreach, root);
-
- fd = open (new_path, O_CREAT | O_TRUNC | O_WRONLY, 0600);
- fchmod (fd, 0600);
-
- xmlDocDumpMemory (doc, &buf, &buf_size);
-
- if (buf == NULL) {
- g_error ("Failed to write %s: xmlBufferCreate() == NULL", ADDRESSBOOK_SOURCES_XML);
- return FALSE;
- }
-
- rv = write (fd, buf, buf_size);
- xmlFree (buf);
- close (fd);
-
- if (0 > rv) {
- g_error ("Failed to write new %s: %s\n", ADDRESSBOOK_SOURCES_XML, strerror(errno));
- unlink (new_path);
- return FALSE;
- }
- else {
- if (0 > rename (new_path, file_path)) {
- g_error ("Failed to rename %s: %s\n", ADDRESSBOOK_SOURCES_XML, strerror(errno));
- unlink (new_path);
- return FALSE;
- }
- return TRUE;
- }
-}
-
-void
-addressbook_storage_add_source (AddressbookSource *source)
-{
- char *path;
-
- sources = g_list_append (sources, source);
-
- /* and then to the ui */
- path = g_strdup_printf ("/%s", source->name);
- evolution_storage_new_folder (storage, path, source->name, "contacts",
- source->uri, source->description, FALSE);
-
- g_free (path);
-
- save_source_data (storage_path);
-}
-
-void
-addressbook_storage_remove_source (const char *name)
-{
- char *path;
- AddressbookSource *source = NULL;
- GList *l;
-
- /* remove it from our hashtable */
- for (l = sources; l; l = l->next) {
- AddressbookSource *s = l->data;
- if (!strcmp (s->name, name)) {
- source = s;
- break;
- }
- }
-
- if (!source)
- return;
-
- sources = g_list_remove_link (sources, l);
- g_list_free_1 (l);
-
- addressbook_source_free (source);
-
- /* and then from the ui */
- path = g_strdup_printf ("/%s", name);
- evolution_storage_removed_folder (storage, path);
-
- g_free (path);
-
- save_source_data (storage_path);
-}
-
-GList *
-addressbook_storage_get_sources ()
-{
- return sources;
-}
-
-AddressbookSource *
-addressbook_storage_get_source_by_uri (const char *uri)
-{
- GList *l;
-
- for (l = sources; l ; l = l->next) {
- AddressbookSource *source = l->data;
- if (!strcmp (uri, source->uri))
- return source;
- }
-
- return NULL;
-}
-
-void
-addressbook_source_free (AddressbookSource *source)
-{
- g_free (source->name);
- g_free (source->description);
- g_free (source->uri);
- if (source->type == ADDRESSBOOK_SOURCE_LDAP) {
- g_free (source->ldap.host);
- g_free (source->ldap.port);
- g_free (source->ldap.rootdn);
- g_free (source->ldap.binddn);
- } else {
- g_free (source->file.path);
- }
-
- g_free (source);
-}
-
-static void
-addressbook_source_foreach (AddressbookSource *source, gpointer data)
-{
- char *path = g_strdup_printf ("/%s", source->name);
-
- evolution_storage_removed_folder (storage, path);
-
- g_free (path);
-
- addressbook_source_free (source);
-}
-
-void
-addressbook_storage_clear_sources ()
-{
- g_list_foreach (sources, (GFunc)addressbook_source_foreach, NULL);
- g_list_free (sources);
- sources = NULL;
-}
-
-AddressbookSource *
-addressbook_source_copy (const AddressbookSource *source)
-{
- AddressbookSource *copy;
-
- copy = g_new0 (AddressbookSource, 1);
- copy->name = g_strdup (source->name);
- copy->description = g_strdup (source->description);
- copy->type = source->type;
- copy->uri = g_strdup (source->uri);
-
- if (copy->type == ADDRESSBOOK_SOURCE_LDAP) {
- copy->ldap.host = g_strdup (source->ldap.host);
- copy->ldap.port = g_strdup (source->ldap.port);
- copy->ldap.rootdn = g_strdup (source->ldap.rootdn);
- copy->ldap.scope = source->ldap.scope;
- copy->ldap.auth = source->ldap.auth;
- copy->ldap.binddn = source->ldap.binddn;
- copy->ldap.remember_passwd = source->ldap.remember_passwd;
- }
- else {
- copy->file.path = g_strdup (source->file.path);
- }
- return copy;
-}
diff --git a/addressbook/gui/component/addressbook-storage.h b/addressbook/gui/component/addressbook-storage.h
deleted file mode 100644
index 518977598e..0000000000
--- a/addressbook/gui/component/addressbook-storage.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* addressbook-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: Chris Toshok
- */
-
-#ifndef __ADDRESSBOOK_STORAGE_H__
-#define __ADDRESSBOOK_STORAGE_H__
-
-#include "evolution-shell-component.h"
-
-typedef enum {
- ADDRESSBOOK_SOURCE_FILE,
- ADDRESSBOOK_SOURCE_LDAP,
- ADDRESSBOOK_SOURCE_LAST
-} AddressbookSourceType;
-
-typedef enum {
- ADDRESSBOOK_LDAP_AUTH_NONE,
- ADDRESSBOOK_LDAP_AUTH_SIMPLE,
- ADDRESSBOOK_LDAP_AUTH_SASL, /* XXX currently unsupported */
- ADDRESSBOOK_LDAP_AUTH_LAST
-} AddressbookLDAPAuthType;
-
-typedef enum {
- ADDRESSBOOK_LDAP_SCOPE_SUBTREE,
- ADDRESSBOOK_LDAP_SCOPE_BASE,
- ADDRESSBOOK_LDAP_SCOPE_ONELEVEL,
- ADDRESSBOOK_LDAP_SCOPE_LAST
-} AddressbookLDAPScopeType;
-
-typedef struct {
- AddressbookSourceType type;
- char *name;
- char *description;
- struct {
- char *path;
- } file;
- struct {
- char *host;
- char *port;
- char *rootdn;
- AddressbookLDAPScopeType scope;
- AddressbookLDAPAuthType auth;
- char *binddn; /* used in AUTH_SIMPLE */
- gboolean remember_passwd;
- } ldap;
- char *uri; /* filled in from the above */
-} AddressbookSource;
-
-void addressbook_storage_setup (EvolutionShellComponent *shell_component,
- const char *evolution_homedir);
-
-GList *addressbook_storage_get_sources (void);
-AddressbookSource *addressbook_storage_get_source_by_uri (const char *uri);
-void addressbook_storage_clear_sources (void);
-AddressbookSource *addressbook_source_copy (const AddressbookSource *source);
-void addressbook_source_free (AddressbookSource *source);
-void addressbook_storage_init_source_uri (AddressbookSource *source);
-
-void addressbook_storage_add_source (AddressbookSource *source);
-void addressbook_storage_remove_source (const char *name);
-
-#endif /* __ADDRESSBOOK_STORAGE_H__ */
diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c
deleted file mode 100644
index f165217f14..0000000000
--- a/addressbook/gui/component/addressbook.c
+++ /dev/null
@@ -1,771 +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 <config.h>
-
-#include <glib.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-app.h>
-#include <libgnomeui/gnome-stock.h>
-#include <libgnomeui/gnome-uidefs.h>
-#include <bonobo/bonobo-generic-factory.h>
-#include <bonobo/bonobo-ui-util.h>
-#include <gal/util/e-util.h>
-#include <gal/widgets/e-unicode.h>
-
-#include "select-names/e-select-names.h"
-#include "select-names/e-select-names-manager.h"
-
-#include "e-util/e-gui-utils.h"
-#include "e-contact-editor.h"
-#include "e-contact-save-as.h"
-#include "addressbook-config.h"
-#include "addressbook.h"
-#include "addressbook/gui/search/e-addressbook-search-dialog.h"
-#include "addressbook/gui/widgets/e-addressbook-view.h"
-#include "addressbook/printing/e-contact-print.h"
-
-#include <ebook/e-book.h>
-#include <widgets/misc/e-search-bar.h>
-
-#define PROPERTY_FOLDER_URI "folder_uri"
-
-#define PROPERTY_FOLDER_URI_IDX 1
-
-typedef struct {
- EAddressbookView *view;
- ESearchBar *search;
- GtkWidget *vbox;
- BonoboControl *control;
- BonoboPropertyBag *properties;
- char *uri;
- char *passwd;
-} AddressbookView;
-
-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__);
-}
-
-/* Callback for the add_card signal from the contact editor */
-static void
-add_card_cb (EContactEditor *ce, ECard *card, gpointer data)
-{
- EBook *book;
-
- book = E_BOOK (data);
- e_book_add_card (book, card, card_added_cb, NULL);
-}
-
-/* Callback for the commit_card signal from the contact editor */
-static void
-commit_card_cb (EContactEditor *ce, ECard *card, gpointer data)
-{
- EBook *book;
-
- book = E_BOOK (data);
- e_book_commit_card (book, card, card_modified_cb, NULL);
-}
-
-/* Callback for the delete_card signal from the contact editor */
-static void
-delete_card_cb (EContactEditor *ce, ECard *card, gpointer data)
-{
- EBook *book;
-
- book = E_BOOK (data);
- e_book_remove_card (book, card, card_modified_cb, NULL);
-}
-
-/* Callback used when the contact editor is closed */
-static void
-editor_closed_cb (EContactEditor *ce, gpointer data)
-{
- gtk_object_unref (GTK_OBJECT (ce));
-}
-
-static void
-supported_fields_cb (EBook *book, EBookStatus status, EList *fields, gpointer closure)
-{
- EContactEditor *ce;
- ECard *card;
-
- card = e_card_new("");
-
- ce = e_contact_editor_new (card, TRUE, fields, FALSE);
-
- gtk_signal_connect (GTK_OBJECT (ce), "add_card",
- GTK_SIGNAL_FUNC (add_card_cb), book);
- gtk_signal_connect (GTK_OBJECT (ce), "commit_card",
- GTK_SIGNAL_FUNC (commit_card_cb), book);
- gtk_signal_connect (GTK_OBJECT (ce), "delete_card",
- GTK_SIGNAL_FUNC (delete_card_cb), book);
- gtk_signal_connect (GTK_OBJECT (ce), "editor_closed",
- GTK_SIGNAL_FUNC (editor_closed_cb), NULL);
-
- gtk_object_sink(GTK_OBJECT(card));
-}
-
-static void
-new_contact_cb (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- EBook *book;
- AddressbookView *view = (AddressbookView *) user_data;
-
- gtk_object_get(GTK_OBJECT(view->view),
- "book", &book,
- NULL);
-
- g_assert (E_IS_BOOK (book));
-
- e_book_get_supported_fields (book, supported_fields_cb, view);
-}
-
-static void
-config_cb (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- addressbook_config (NULL /* XXX */);
-}
-
-static void
-search_cb (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- EBook *book;
- AddressbookView *view = (AddressbookView *) user_data;
-
- gtk_object_get(GTK_OBJECT(view->view),
- "book", &book,
- NULL);
- g_assert (E_IS_BOOK (book));
-
- gtk_widget_show(e_addressbook_search_dialog_new(book));
-}
-
-#if 0
-static void
-find_contact_cb (BonoboUIComponent *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",
- GNOME_STOCK_BUTTON_CANCEL, NULL);
-
- gtk_object_get (view->view,
- "query", &search_text,
- NULL);
- e_utf8_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 = e_utf8_gtk_entry_get_text(GTK_ENTRY(search_entry));
- gtk_object_set (view->view,
- "query", query,
- NULL);
- g_free (search_text);
- }
-}
-#endif
-
-static void
-delete_contact_cb (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- AddressbookView *view = (AddressbookView *) user_data;
- e_addressbook_view_delete_selection(view->view);
-}
-
-static void
-print_cb (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- AddressbookView *view = (AddressbookView *) user_data;
- e_addressbook_view_print(view->view);
-}
-
-static void
-show_all_contacts_cb (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- AddressbookView *view = (AddressbookView *) user_data;
- e_addressbook_view_show_all(view->view);
-}
-
-static void
-stop_loading_cb (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- AddressbookView *view = (AddressbookView *) user_data;
- e_addressbook_view_stop(view->view);
-}
-
-static void
-update_view_type (AddressbookView *view)
-{
- BonoboUIComponent *uic = bonobo_control_get_ui_component (view->control);
- EAddressbookViewType view_type;
-
- if (!uic || bonobo_ui_component_get_container (uic) == CORBA_OBJECT_NIL)
- return;
-
- gtk_object_get (GTK_OBJECT (view->view), "type", &view_type, NULL);
-
- switch (view_type) {
- case E_ADDRESSBOOK_VIEW_TABLE:
- if (uic)
- bonobo_ui_component_set_prop (uic, "/menu/View/AsTable",
- "label", _("As _Minicards"), NULL);
-
- break;
- case E_ADDRESSBOOK_VIEW_MINICARD:
- if (uic)
- bonobo_ui_component_set_prop (uic, "/menu/View/AsTable",
- "label", _("As _Table"), NULL);
- break;
- default:
- g_warning ("view_type must be either TABLE or MINICARD\n");
- return;
- }
-}
-
-static void
-change_view_type (AddressbookView *view, EAddressbookViewType view_type)
-{
- gtk_object_set (GTK_OBJECT (view->view), "type", view_type, NULL);
-
- update_view_type (view);
-}
-
-static void
-toggle_view_as_cb (BonoboUIComponent *uih, void *user_data, const char *path)
-{
- AddressbookView *view = user_data;
- EAddressbookViewType view_type;
-
- gtk_object_get (GTK_OBJECT (view->view), "type", &view_type, NULL);
-
- if (view_type == E_ADDRESSBOOK_VIEW_TABLE)
- change_view_type (view, E_ADDRESSBOOK_VIEW_MINICARD);
- else
- change_view_type (view, E_ADDRESSBOOK_VIEW_TABLE);
-}
-
-BonoboUIVerb verbs [] = {
- BONOBO_UI_UNSAFE_VERB ("ContactsPrint", print_cb),
- BONOBO_UI_UNSAFE_VERB ("ViewAsTable", toggle_view_as_cb),
- BONOBO_UI_UNSAFE_VERB ("ViewNewContact", new_contact_cb),
- BONOBO_UI_UNSAFE_VERB ("ToolSearch", search_cb),
-
- BONOBO_UI_UNSAFE_VERB ("AddressbookConfig", config_cb),
-
- BONOBO_UI_UNSAFE_VERB ("ContactNew", new_contact_cb),
-/* BONOBO_UI_UNSAFE_VERB ("ContactFind", find_contact_cb),*/
- BONOBO_UI_UNSAFE_VERB ("ContactDelete", delete_contact_cb),
- BONOBO_UI_UNSAFE_VERB ("ContactViewAll", show_all_contacts_cb),
- BONOBO_UI_UNSAFE_VERB ("ContactStop", stop_loading_cb),
-
- BONOBO_UI_VERB_END
-};
-
-static EPixmap pixmaps [] = {
- E_PIXMAP ("/menu/File/New/NewFirstItem/New", "evolution-contacts-mini.png"),
- E_PIXMAP ("/menu/File/Print/Print", "print.xpm"),
- E_PIXMAP ("/menu/File/Print/Print Preview", "print-preview.xpm"),
- E_PIXMAP ("/menu/Tools/Component/AddressbookConfig", "configure_16_addressbook.xpm"),
-
- E_PIXMAP ("/Toolbar/View All", "all_contacts.xpm"),
- E_PIXMAP ("/Toolbar/Find", "find_contact.xpm"),
- E_PIXMAP ("/Toolbar/New", "new_contact.xpm"),
-
- E_PIXMAP_END
-};
-
-static void
-control_activate (BonoboControl *control,
- BonoboUIComponent *uic,
- AddressbookView *view)
-{
- Bonobo_UIContainer remote_ui_container;
-
- remote_ui_container = bonobo_control_get_remote_ui_container (control);
- bonobo_ui_component_set_container (uic, remote_ui_container);
- bonobo_object_release_unref (remote_ui_container, NULL);
-
- bonobo_ui_component_add_verb_list_with_data (
- uic, verbs, view);
-
- bonobo_ui_component_freeze (uic, NULL);
-
- bonobo_ui_util_set_ui (uic, EVOLUTION_DATADIR,
- "evolution-addressbook.xml",
- "evolution-addressbook");
-
- e_addressbook_view_setup_menus (view->view, uic);
-
- update_view_type (view);
-
- e_pixmaps_update (uic, pixmaps);
-
- bonobo_ui_component_thaw (uic, NULL);
-}
-
-static void
-control_activate_cb (BonoboControl *control,
- gboolean activate,
- AddressbookView *view)
-{
- BonoboUIComponent *uic;
-
- uic = bonobo_control_get_ui_component (control);
- g_assert (uic != NULL);
-
- if (activate)
- control_activate (control, uic, view);
- else
- bonobo_ui_component_unset_container (uic);
-}
-
-static void
-addressbook_view_free(AddressbookView *view)
-{
- if (view->properties)
- bonobo_object_unref(BONOBO_OBJECT(view->properties));
- g_free(view->passwd);
- g_free(view->uri);
- g_free(view);
-}
-
-static void
-book_auth_cb (EBook *book, EBookStatus status, gpointer closure)
-{
- AddressbookView *view = closure;
- if (status == E_BOOK_STATUS_SUCCESS) {
- gtk_object_set(GTK_OBJECT(view->view),
- "book", book,
- NULL);
- }
- else {
- /* pop up a nice dialog, or redo the authentication
- bit some number of times. */
- }
-}
-
-static void
-passwd_cb (gchar *string, gpointer data)
-{
- AddressbookView *view = (AddressbookView*)data;
-
- view->passwd = g_strdup (string);
-}
-
-static void
-book_open_cb (EBook *book, EBookStatus status, gpointer closure)
-{
- if (status == E_BOOK_STATUS_SUCCESS) {
- AddressbookView *view = closure;
- AddressbookSource *source;
-
- /* check if the addressbook needs authentication */
-
- source = addressbook_storage_get_source_by_uri (view->uri);
- if (source &&
- source->type == ADDRESSBOOK_SOURCE_LDAP &&
- source->ldap.auth == ADDRESSBOOK_LDAP_AUTH_SIMPLE) {
- int button;
- char *msg = g_strdup_printf (_("Enter password for %s"), source->ldap.binddn);
- /* give a password prompt for the binddn */
- GtkWidget *dialog = gnome_request_dialog (TRUE, msg, NULL,
- 0, passwd_cb, view, NULL);
-
- button = gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
-
- if (button == 0 && *(view->passwd)) {
- e_book_authenticate_user (book, source->ldap.binddn, view->passwd,
- book_auth_cb, closure);
- memset (view->passwd, 0, strlen (view->passwd)); /* clear out the passwd */
- g_free (view->passwd);
- view->passwd = NULL;
- return;
- }
- }
-
-
- /* if they either didn't configure the source to use
- authentication, or they canceled the dialog,
- proceed without authenticating */
- gtk_object_set(GTK_OBJECT(view->view),
- "book", book,
- NULL);
-
- } 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
-get_prop (BonoboPropertyBag *bag,
- BonoboArg *arg,
- guint arg_id,
- CORBA_Environment *ev,
- 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,
- CORBA_Environment *ev,
- gpointer user_data)
-{
- AddressbookView *view = user_data;
-
- char *uri_data;
- EBook *book;
-
- switch (arg_id) {
-
- case PROPERTY_FOLDER_URI_IDX:
- gtk_object_get(GTK_OBJECT(view->view),
- "book", &book,
- NULL);
- if (view->uri) {
- /* we've already had a uri set on this view, so unload it */
- e_book_unload_uri (book);
- g_free (view->uri);
- } else {
- book = e_book_new ();
- }
-
- view->uri = g_strdup(BONOBO_ARG_GET_STRING (arg));
-
- if (!strncmp (view->uri, "file:", 5)) {
-
- if (strlen (view->uri + 7) > 3
- && !strcmp (view->uri + strlen(view->uri) - 3, ".db")) {
- /* it's a .db file */
- uri_data = g_strdup (view->uri);
- }
- else {
- char *file_name;
- /* we assume it's a dir and glom addressbook.db onto the end. */
- 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);
- }
-
- }
- else {
- uri_data = g_strdup (view->uri);
- }
-
- if (! e_book_load_uri (book, uri_data, book_open_cb, view))
- printf ("error calling load_uri!\n");
-
- g_free(uri_data);
-
- break;
-
- default:
- g_warning ("Unhandled arg %d\n", arg_id);
- break;
- }
-}
-
-enum {
- ESB_SHOW_ALL,
- ESB_ADVANCED,
-};
-
-static ESearchBarItem addressbook_search_menu_items[] = {
- { N_("Show All"), ESB_SHOW_ALL },
- { NULL, 0 },
- { N_("Advanced..."), ESB_ADVANCED},
- { NULL, -1 }
-};
-
-static void
-addressbook_menu_activated (ESearchBar *esb, int id, AddressbookView *view)
-{
- EBook *book;
- switch (id) {
- case ESB_SHOW_ALL:
- e_addressbook_view_show_all(view->view);
- break;
- case ESB_ADVANCED:
- gtk_object_get(GTK_OBJECT(view->view),
- "book", &book,
- NULL);
- g_assert (E_IS_BOOK (book));
-
- gtk_widget_show(e_addressbook_search_dialog_new(book));
- break;
- }
-}
-
-enum {
- ESB_ANY,
- ESB_FULL_NAME,
- ESB_EMAIL,
-};
-
-static ESearchBarItem addressbook_search_option_items[] = {
- { N_("Any field contains"), ESB_ANY },
- { N_("Name contains"), ESB_FULL_NAME },
- { N_("Email contains"), ESB_EMAIL },
- { NULL, -1 }
-};
-
-static void
-addressbook_query_changed (ESearchBar *esb, AddressbookView *view)
-{
- char *search_word, *search_query;
- int search_type;
-
- gtk_object_get(GTK_OBJECT(esb),
- "text", &search_word,
- "option_choice", &search_type,
- NULL);
-
- if (search_word && strlen (search_word)) {
- switch (search_type) {
- case ESB_ANY:
- search_query = g_strdup_printf ("(contains \"x-evolution-any-field\" \"%s\")",
- search_word);
- break;
- case ESB_FULL_NAME:
- search_query = g_strdup_printf ("(contains \"full_name\" \"%s\")",
- search_word);
- break;
- case ESB_EMAIL:
- search_query = g_strdup_printf ("(contains \"email\" \"%s\")",
- search_word);
- break;
- default:
- search_query = g_strdup ("(contains \"full_name\" \"\")");
- break;
- }
- } else
- search_query = g_strdup ("(contains \"full_name\" \"\")");
-
- gtk_object_set (GTK_OBJECT(view->view),
- "query", search_query,
- NULL);
-
- g_free (search_query);
- g_free (search_word);
-}
-
-static GNOME_Evolution_ShellView
-retrieve_shell_view_interface_from_control (BonoboControl *control)
-{
- Bonobo_ControlFrame control_frame;
- GNOME_Evolution_ShellView shell_view_interface;
- CORBA_Environment ev;
-
- shell_view_interface = gtk_object_get_data (GTK_OBJECT (control),
- "shell_view_interface");
-
- if (shell_view_interface)
- return shell_view_interface;
-
- control_frame = bonobo_control_get_control_frame (control);
-
- if (control_frame == NULL)
- return CORBA_OBJECT_NIL;
-
- CORBA_exception_init (&ev);
- shell_view_interface = Bonobo_Unknown_queryInterface (control_frame,
- "IDL:GNOME/Evolution/ShellView:1.0",
- &ev);
- CORBA_exception_free (&ev);
-
- if (shell_view_interface != CORBA_OBJECT_NIL)
- gtk_object_set_data (GTK_OBJECT (control),
- "shell_view_interface",
- shell_view_interface);
- else
- g_warning ("Control frame doesn't have Evolution/ShellView.");
-
- return shell_view_interface;
-}
-
-static void
-set_status_message (EAddressbookView *eav, const char *message, AddressbookView *view)
-{
- CORBA_Environment ev;
- GNOME_Evolution_ShellView shell_view_interface;
-
- CORBA_exception_init (&ev);
-
- shell_view_interface = retrieve_shell_view_interface_from_control (view->control);
-
- if (message == NULL || message[0] == 0) {
- printf ("clearing message\n");
- GNOME_Evolution_ShellView_unsetMessage (shell_view_interface, &ev);
- }
- else {
- printf ("setting message %s\n", message);
- GNOME_Evolution_ShellView_setMessage (shell_view_interface,
- message, 0 /* XXX */, &ev);
- }
-
- CORBA_exception_free (&ev);
-}
-
-BonoboControl *
-addressbook_factory_new_control (void)
-{
- AddressbookView *view;
-
- view = g_new0 (AddressbookView, 1);
-
- view->vbox = gtk_vbox_new(FALSE, GNOME_PAD);
-
- gtk_container_set_border_width(GTK_CONTAINER(view->vbox), GNOME_PAD_SMALL);
-
- 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->search = E_SEARCH_BAR(e_search_bar_new(addressbook_search_menu_items,
- addressbook_search_option_items));
- gtk_box_pack_start (GTK_BOX (view->vbox), GTK_WIDGET (view->search),
- FALSE, FALSE, 0);
- gtk_signal_connect (GTK_OBJECT (view->search), "query_changed",
- GTK_SIGNAL_FUNC (addressbook_query_changed), view);
- gtk_signal_connect (GTK_OBJECT (view->search), "menu_activated",
- GTK_SIGNAL_FUNC (addressbook_menu_activated), view);
-
- view->view = E_ADDRESSBOOK_VIEW(e_addressbook_view_new());
- gtk_box_pack_start(GTK_BOX(view->vbox), GTK_WIDGET(view->view),
- TRUE, TRUE, 0);
-
- /* create the initial view */
- change_view_type (view, E_ADDRESSBOOK_VIEW_MINICARD);
-
- gtk_widget_show( view->vbox );
- gtk_widget_show( GTK_WIDGET(view->view) );
- gtk_widget_show( GTK_WIDGET(view->search) );
-
- 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_properties (view->control,
- view->properties);
-
- gtk_signal_connect (GTK_OBJECT (view->view),
- "status_message",
- GTK_SIGNAL_FUNC(set_status_message),
- view);
-
- 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 (
- "OAFIID:GNOME_Evolution_Addressbook_ControlFactory",
- addressbook_factory, NULL);
-
- if (addressbook_control_factory == NULL) {
- g_error ("I could not register a Addressbook factory.");
- }
-}
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 <bonobo/bonobo-control.h>
-
-BonoboControl *addressbook_factory_new_control (void);
-void addressbook_factory_init (void);
-
-#endif /* __ADDRESSBOOK_H__ */
diff --git a/addressbook/gui/component/e-address-popup.c b/addressbook/gui/component/e-address-popup.c
deleted file mode 100644
index 19afd29baf..0000000000
--- a/addressbook/gui/component/e-address-popup.c
+++ /dev/null
@@ -1,521 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * e-address-popup.c
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Developed by Jon Trowbridge <trow@ximian.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 "e-address-popup.h"
-#include <bonobo/bonobo-control.h>
-#include <bonobo/bonobo-property-bag.h>
-#include <bonobo/bonobo-generic-factory.h>
-#include <gal/widgets/e-popup-menu.h>
-#include <addressbook/backend/ebook/e-book.h>
-#include <addressbook/backend/ebook/e-book-util.h>
-#include <addressbook/contact-editor/e-contact-editor.h>
-#include <addressbook/contact-editor/e-contact-quick-add.h>
-#include <addressbook/gui/widgets/e-minicard-widget.h>
-
-static GtkObjectClass *parent_class;
-static EBook *common_book = NULL; /* still sort of lame */
-
-static void e_address_popup_destroy (GtkObject *);
-static void e_address_popup_realize (GtkWidget *);
-static gint e_address_popup_button_press_event (GtkWidget *, GdkEventButton *ev);
-static gint e_address_popup_enter_notify_event (GtkWidget *, GdkEventCrossing *ev);
-static gint e_address_popup_leave_notify_event (GtkWidget *, GdkEventCrossing *ev);
-
-static void e_address_popup_query (EAddressPopup *);
-
-
-static void
-e_address_popup_class_init (EAddressPopupClass *klass)
-{
- GtkObjectClass *object_class = (GtkObjectClass *) klass;
- GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
-
- parent_class = GTK_OBJECT_CLASS (gtk_type_class (gtk_event_box_get_type ()));
-
- object_class->destroy = e_address_popup_destroy;
-
- widget_class->realize = e_address_popup_realize;
- widget_class->button_press_event = e_address_popup_button_press_event;
- widget_class->enter_notify_event = e_address_popup_enter_notify_event;
- widget_class->leave_notify_event = e_address_popup_leave_notify_event;
-}
-
-static void
-e_address_popup_init (EAddressPopup *pop)
-{
-
-}
-
-static void
-e_address_popup_destroy (GtkObject *obj)
-{
- EAddressPopup *pop = E_ADDRESS_POPUP (obj);
-
- if (pop->card)
- gtk_object_unref (GTK_OBJECT (pop->card));
-
- if (pop->leave_timeout_tag)
- gtk_timeout_remove (pop->leave_timeout_tag);
-
- g_free (pop->name);
- g_free (pop->email);
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- GTK_OBJECT_CLASS (parent_class)->destroy (obj);
-}
-
-static void
-e_address_popup_realize (GtkWidget *w)
-{
- EAddressPopup *pop = E_ADDRESS_POPUP (w);
-
- if (GTK_WIDGET_CLASS (parent_class)->realize)
- GTK_WIDGET_CLASS (parent_class)->realize (w);
-
- /* Start the death count. */
- pop->leave_timeout_tag = gtk_timeout_add (10000, (GtkFunction) gtk_widget_destroy, pop);
-}
-
-static gint
-e_address_popup_button_press_event (GtkWidget *w, GdkEventButton *ev)
-{
- gtk_widget_destroy (w);
- return FALSE;
-}
-
-static gint
-e_address_popup_enter_notify_event (GtkWidget *w, GdkEventCrossing *ev)
-{
- EAddressPopup *pop = E_ADDRESS_POPUP (w);
-
- if (pop->leave_timeout_tag) {
- gtk_timeout_remove (pop->leave_timeout_tag);
- pop->leave_timeout_tag = 0;
- }
-
- return FALSE;
-}
-
-static gint
-e_address_popup_leave_notify_event (GtkWidget *w, GdkEventCrossing *ev)
-{
- EAddressPopup *pop = E_ADDRESS_POPUP (w);
- const gint slack=5;
- gint x, y;
-
- /* Manually check our "leave" events to avoid weird erroneous leaves
- that seem related to bonobo... */
- gdk_window_get_pointer (w->window, &x, &y, NULL);
- if (slack <= x && x < w->allocation.width-slack && slack <= y && y < w->allocation.height-slack)
- return FALSE;
-
- if (pop->leave_timeout_tag == 0)
- pop->leave_timeout_tag = gtk_timeout_add (1000, (GtkFunction) gtk_widget_destroy, pop);
-
- return FALSE;
-}
-
-GtkType
-e_address_popup_get_type (void)
-{
- static GtkType pop_type = 0;
-
- if (!pop_type) {
- GtkTypeInfo pop_info = {
- "EAddressPopup",
- sizeof (EAddressPopup),
- sizeof (EAddressPopupClass),
- (GtkClassInitFunc) e_address_popup_class_init,
- (GtkObjectInitFunc) e_address_popup_init,
- NULL, NULL,
- (GtkClassInitFunc) NULL
- };
-
- pop_type = gtk_type_unique (gtk_event_box_get_type (), &pop_info);
- }
-
- return pop_type;
-}
-
-static void
-e_address_popup_refresh_names (EAddressPopup *pop)
-{
- if (pop->name_widget) {
- if (pop->name && *pop->name) {
- gtk_label_set_text (GTK_LABEL (pop->name_widget), pop->name);
- gtk_widget_show (pop->name_widget);
- } else {
- gtk_widget_hide (pop->name_widget);
- }
- }
-
- if (pop->email_widget) {
- if (pop->email && *pop->email) {
- gtk_label_set_text (GTK_LABEL (pop->email_widget), pop->email);
- gtk_widget_show (pop->email_widget);
- } else {
- gtk_widget_hide (pop->email_widget);
- }
- }
-
- e_address_popup_query (pop);
-}
-
-void
-e_address_popup_set_name (EAddressPopup *pop, const gchar *name)
-{
- g_return_if_fail (pop && E_IS_ADDRESS_POPUP (pop));
-
- g_free (pop->name);
- pop->name = g_strdup (name);
- g_strstrip (pop->name);
-
- ++pop->set_count;
-
- if (pop->set_count >= 2)
- e_address_popup_refresh_names (pop);
-}
-
-void
-e_address_popup_set_email (EAddressPopup *pop, const gchar *email)
-{
- g_return_if_fail (pop && E_IS_ADDRESS_POPUP (pop));
-
- g_free (pop->email);
- pop->email = g_strdup (email);
- g_strstrip (pop->email);
-
- ++pop->set_count;
-
- if (pop->set_count >= 2)
- e_address_popup_refresh_names (pop);
-}
-
-void
-e_address_popup_construct (EAddressPopup *pop)
-{
- GtkWidget *vbox, *name_holder;
- GdkColor color = { 0x0, 0xffff, 0xffff, 0xffff };
-
- g_return_if_fail (pop && E_IS_ADDRESS_POPUP (pop));
-
- pop->main_vbox = gtk_vbox_new (FALSE, 0);
-
- /* Build Generic View */
-
- name_holder = gtk_event_box_new ();
- vbox = gtk_vbox_new (FALSE, 2);
- pop->name_widget = gtk_label_new ("");
- pop->email_widget = gtk_label_new ("");
-
- gtk_box_pack_start (GTK_BOX (vbox), pop->name_widget, TRUE, TRUE, 2);
- gtk_box_pack_start (GTK_BOX (vbox), pop->email_widget, TRUE, TRUE, 2);
- gtk_container_add (GTK_CONTAINER (name_holder), GTK_WIDGET (vbox));
-
- if (gdk_colormap_alloc_color (gtk_widget_get_colormap (GTK_WIDGET (name_holder)), &color, FALSE, TRUE)) {
- GtkStyle *style = gtk_style_copy (gtk_widget_get_style (GTK_WIDGET (name_holder)));
- style->bg[0] = color;
- gtk_widget_set_style (GTK_WIDGET (name_holder), style);
- }
-
- pop->generic_view = gtk_frame_new (NULL);
- gtk_container_add (GTK_CONTAINER (pop->generic_view), name_holder);
- gtk_box_pack_start (GTK_BOX (pop->main_vbox), pop->generic_view, TRUE, TRUE, 0);
- gtk_widget_show_all (pop->generic_view);
-
- pop->query_msg = gtk_label_new ("Querying Addressbook...");
- gtk_box_pack_start (GTK_BOX (pop->main_vbox), pop->query_msg, TRUE, TRUE, 0);
- gtk_widget_show (pop->query_msg);
-
- /* Build Minicard View */
- pop->minicard_view = e_minicard_widget_new ();
- gtk_box_pack_start (GTK_BOX (pop->main_vbox), pop->minicard_view, TRUE, TRUE, 0);
-
-
- /* Final assembly */
-
- gtk_container_add (GTK_CONTAINER (pop), pop->main_vbox);
- gtk_widget_show (pop->main_vbox);
-
- gtk_container_set_border_width (GTK_CONTAINER (vbox), 3);
- gtk_container_set_border_width (GTK_CONTAINER (pop), 2);
-}
-
-GtkWidget *
-e_address_popup_new (void)
-{
- EAddressPopup *pop = gtk_type_new (E_ADDRESS_POPUP_TYPE);
- e_address_popup_construct (pop);
- return GTK_WIDGET (pop);
-}
-
-static GtkWidget *
-e_address_popup_popup (EAddressPopup *pop)
-{
- GtkWidget *win, *fr;
- gint x, y;
-
- win = gtk_window_new (GTK_WINDOW_POPUP);
- fr = gtk_frame_new (NULL);
- gtk_container_add (GTK_CONTAINER (win), fr);
- gtk_container_add (GTK_CONTAINER (fr), GTK_WIDGET (pop));
-
- gtk_window_set_policy (GTK_WINDOW (win), FALSE, FALSE, FALSE);
-
- gdk_window_get_pointer (NULL, &x, &y, NULL);
- x = MAX (x-10, 0);
- y = MAX (y-10, 0);
- gtk_widget_set_uposition (win, x, y);
-
- gtk_signal_connect_object (GTK_OBJECT (pop),
- "destroy",
- GTK_SIGNAL_FUNC(gtk_widget_destroy),
- GTK_OBJECT (win));
-
- gtk_widget_show (GTK_WIDGET (pop));
- gtk_widget_show (fr);
- gtk_widget_show (win);
-
- return win;
-}
-
-static void
-found_fields_cb (EBook *book, EBookStatus status, EList *writable_fields, gpointer closure)
-{
- EAddressPopup *pop = E_ADDRESS_POPUP (closure);
- EContactEditor *ce = e_contact_editor_new (pop->card, FALSE, writable_fields, FALSE);
- e_contact_editor_raise (ce);
- gtk_widget_destroy (GTK_WIDGET (pop));
-}
-
-static void
-edit_contact_info_cb (EAddressPopup *pop)
-{
- e_book_get_supported_fields (common_book, found_fields_cb, pop);
-}
-
-static void
-e_address_popup_cardify (EAddressPopup *pop, ECard *card)
-{
- GtkWidget *b;
-
- g_return_if_fail (pop && E_IS_ADDRESS_POPUP (pop));
- g_return_if_fail (card && E_IS_CARD (card));
- g_return_if_fail (pop->card == NULL);
-
- pop->card = card;
- gtk_object_ref (GTK_OBJECT (pop->card));
-
- e_minicard_widget_set_card (E_MINICARD_WIDGET (pop->minicard_view), card);
- gtk_widget_show (pop->minicard_view);
- gtk_widget_hide (pop->generic_view);
-
- b = gtk_button_new_with_label ("Edit Contact Info");
- gtk_box_pack_start (GTK_BOX (pop->main_vbox), b, TRUE, TRUE, 0);
- gtk_signal_connect_object (GTK_OBJECT (b),
- "clicked",
- GTK_SIGNAL_FUNC (edit_contact_info_cb),
- GTK_OBJECT (pop));
- gtk_widget_show (b);
-}
-
-static void
-add_contacts_cb (EAddressPopup *pop)
-{
- e_contact_quick_add (pop->name, pop->email, NULL, NULL);
- gtk_widget_destroy (GTK_WIDGET (pop));
-}
-
-static void
-e_address_popup_no_matches (EAddressPopup *pop)
-{
- GtkWidget *b;
-
- g_return_if_fail (pop && E_IS_ADDRESS_POPUP (pop));
-
- b = gtk_button_new_with_label ("Add to Contacts");
- gtk_box_pack_start (GTK_BOX (pop->main_vbox), b, TRUE, TRUE, 0);
- gtk_signal_connect_object (GTK_OBJECT (b),
- "clicked",
- GTK_SIGNAL_FUNC (add_contacts_cb),
- GTK_OBJECT (pop));
- gtk_widget_show (b);
-}
-
-static void
-e_address_popup_multiple_matches (EAddressPopup *pop)
-{
-
-}
-
-
-/** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **/
-
-/*
- * Addressbook Query Fun
- */
-
-static void
-query_cb (EBook *book, EBookSimpleQueryStatus status, const GList *cards, gpointer closure)
-{
- EAddressPopup *pop;
-
- if (status != E_BOOK_SIMPLE_QUERY_STATUS_SUCCESS)
- return;
-
- pop = E_ADDRESS_POPUP (closure);
-
- pop->have_queried = TRUE;
- gtk_widget_hide (pop->query_msg);
-
- if (cards == NULL) {
-
- e_address_popup_no_matches (pop);
-
- } else {
- if (g_list_length ((GList *) cards) == 1)
- e_address_popup_cardify (pop, E_CARD (cards->data));
- else
- e_address_popup_multiple_matches (pop);
- }
-
- pop->query_tag = 0;
-}
-
-static void
-start_query (EAddressPopup *pop)
-{
- g_assert (common_book != NULL);
- g_return_if_fail (pop && E_IS_ADDRESS_POPUP (pop));
-
- if (pop->query_tag)
- e_book_simple_query_cancel (common_book, pop->query_tag);
-
- pop->query_tag = e_book_name_and_email_query (common_book, pop->name, pop->email, query_cb, pop);
-}
-
-static void
-loaded_book_cb (EBook *book, EBookStatus status, gpointer closure)
-{
- g_return_if_fail (status == E_BOOK_STATUS_SUCCESS);
- g_return_if_fail (book != NULL);
-
- if (common_book == NULL) {
- common_book = book;
- gtk_object_ref (GTK_OBJECT (common_book));
- }
-
- start_query (E_ADDRESS_POPUP (closure));
-}
-
-static void
-e_address_popup_query (EAddressPopup *pop)
-{
- g_return_if_fail (pop && E_IS_ADDRESS_POPUP (pop));
-
- if (common_book == NULL) {
- EBook *book = e_book_new ();
- e_book_load_local_address_book (book, loaded_book_cb, pop);
- } else {
- start_query (pop);
- }
-}
-
-/** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **/
-
-enum {
- PROPERTY_NAME,
- PROPERTY_EMAIL
-};
-
-static void
-set_prop (BonoboPropertyBag *bag, const BonoboArg *arg, guint arg_id, CORBA_Environment *ev, gpointer user_data)
-{
- EAddressPopup *pop = E_ADDRESS_POPUP (user_data);
-
- switch (arg_id) {
-
- case PROPERTY_NAME:
- e_address_popup_set_name (pop, BONOBO_ARG_GET_STRING (arg));
- break;
-
- case PROPERTY_EMAIL:
- e_address_popup_set_email (pop, BONOBO_ARG_GET_STRING (arg));
- break;
-
- default:
- g_assert_not_reached ();
- }
-
-}
-
-static BonoboControl *
-e_address_popup_factory_new_control (void)
-{
- BonoboControl *control;
- BonoboPropertyBag *bag;
- GtkWidget *w;
-
- w = e_address_popup_new ();
- control = bonobo_control_new (e_address_popup_popup (E_ADDRESS_POPUP (w)));
-
- bag = bonobo_property_bag_new (NULL, set_prop, w);
- bonobo_property_bag_add (bag, "name", PROPERTY_NAME,
- BONOBO_ARG_STRING, NULL, NULL,
- BONOBO_PROPERTY_WRITEABLE);
-
- bonobo_property_bag_add (bag, "email", PROPERTY_EMAIL,
- BONOBO_ARG_STRING, NULL, NULL,
- BONOBO_PROPERTY_WRITEABLE);
-
- bonobo_control_set_properties (control, bag);
- bonobo_object_unref (BONOBO_OBJECT (bag));
-
- return control;
-}
-
-static BonoboObject *
-e_address_popup_factory (BonoboGenericFactory *factory, gpointer user_data)
-{
- return BONOBO_OBJECT (e_address_popup_factory_new_control ());
-}
-
-void
-e_address_popup_factory_init (void)
-{
- static BonoboGenericFactory *factory = NULL;
-
- if (factory != NULL)
- return;
-
- factory = bonobo_generic_factory_new ("OAFIID:GNOME_Evolution_Addressbook_AddressPopupFactory",
- e_address_popup_factory, NULL);
-
- if (factory == NULL)
- g_error ("I could not register an AddressPopup factory.");
-}
diff --git a/addressbook/gui/component/e-address-popup.h b/addressbook/gui/component/e-address-popup.h
deleted file mode 100644
index cac060fb4a..0000000000
--- a/addressbook/gui/component/e-address-popup.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * e-address-popup.h
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Developed by Jon Trowbridge <trow@ximian.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 __E_ADDRESS_POPUP_H__
-#define __E_ADDRESS_POPUP_H__
-
-#include <gtk/gtk.h>
-#include <libgnome/gnome-defs.h>
-#include <addressbook/backend/ebook/e-card.h>
-
-BEGIN_GNOME_DECLS
-
-#define E_ADDRESS_POPUP_TYPE (e_address_popup_get_type ())
-#define E_ADDRESS_POPUP(o) (GTK_CHECK_CAST ((o), E_ADDRESS_POPUP_TYPE, EAddressPopup))
-#define E_ADDRESS_POPUP_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), E_ADDRESS_POPUP_TYPE, EAddressPopupClass))
-#define E_IS_ADDRESS_POPUP(o) (GTK_CHECK_TYPE ((o), E_ADDRESS_POPUP_TYPE))
-#define E_IS_ADDRESS_POPUP_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_ADDRESS_POPUP_TYPE))
-
-typedef struct _EAddressPopup EAddressPopup;
-typedef struct _EAddressPopupClass EAddressPopupClass;
-
-struct _EAddressPopup {
- GtkEventBox parent;
-
- guint leave_timeout_tag;
- gboolean grabbed;
-
- gint set_count;
- gchar *name;
- gchar *email;
-
- GtkWidget *name_widget;
- GtkWidget *email_widget;
- GtkWidget *query_msg;
-
- GtkWidget *main_vbox;
- GtkWidget *generic_view;
- GtkWidget *minicard_view;
-
- guint query_tag;
- gboolean have_queried, multiple_matches;
- ECard *card;
-};
-
-struct _EAddressPopupClass {
- GtkEventBoxClass parent_class;
-};
-
-GtkType e_address_popup_get_type (void);
-
-void e_address_popup_set_name (EAddressPopup *, const gchar *name);
-void e_address_popup_set_email (EAddressPopup *, const gchar *email);
-
-void e_address_popup_construct (EAddressPopup *);
-GtkWidget *e_address_popup_new (void);
-
-void e_address_popup_factory_init (void);
-
-END_GNOME_DECLS
-
-#endif /* __E_ADDRESS_POPUP_H__ */
-
diff --git a/addressbook/gui/component/e-address-widget.c b/addressbook/gui/component/e-address-widget.c
deleted file mode 100644
index f69ce5c58d..0000000000
--- a/addressbook/gui/component/e-address-widget.c
+++ /dev/null
@@ -1,577 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * e-address-widget.c
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Developed by Jon Trowbridge <trow@ximian.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 <ctype.h>
-#include <bonobo/bonobo-control.h>
-#include <bonobo/bonobo-property-bag.h>
-#include <bonobo/bonobo-generic-factory.h>
-#include <addressbook/contact-editor/e-contact-quick-add.h>
-#include "e-address-widget.h"
-
-static void e_address_widget_class_init (EAddressWidgetClass *klass);
-static void e_address_widget_init (EAddressWidget *obj);
-static void e_address_widget_destroy (GtkObject *obj);
-
-static gint e_address_widget_button_press_handler (GtkWidget *w, GdkEventButton *ev);
-static void e_address_widget_popup (EAddressWidget *, GdkEventButton *ev);
-static void e_address_widget_schedule_query (EAddressWidget *);
-
-static GtkObjectClass *parent_class;
-
-static EBook *common_book = NULL; /* sort of lame */
-
-static gboolean doing_queries = FALSE;
-
-static void
-e_address_widget_class_init (EAddressWidgetClass *klass)
-{
- GtkObjectClass *object_class = (GtkObjectClass *) klass;
- GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
-
- parent_class = GTK_OBJECT_CLASS (gtk_type_class (gtk_event_box_get_type ()));
-
- object_class->destroy = e_address_widget_destroy;
-
- widget_class->button_press_event = e_address_widget_button_press_handler;
-}
-
-static void
-e_address_widget_init (EAddressWidget *addr)
-{
-
-}
-
-static void
-e_address_widget_destroy (GtkObject *obj)
-{
- EAddressWidget *addr = E_ADDRESS_WIDGET (obj);
-
- g_free (addr->name);
- g_free (addr->email);
-
- if (addr->query_tag)
- e_book_simple_query_cancel (common_book, addr->query_tag);
-
- if (addr->query_idle_tag)
- gtk_idle_remove (addr->query_idle_tag);
-}
-
-static gint
-e_address_widget_button_press_handler (GtkWidget *w, GdkEventButton *ev)
-{
- EAddressWidget *addr = E_ADDRESS_WIDGET (w);
- if (ev->button == 3 && ev->state == 0) {
- e_address_widget_popup (addr, ev);
- return TRUE;
- }
-
- return FALSE;
-}
-
-GtkType
-e_address_widget_get_type (void)
-{
- static GtkType aw_type = 0;
-
- if (!aw_type) {
- GtkTypeInfo aw_info = {
- "EAddressWidget",
- sizeof (EAddressWidget),
- sizeof (EAddressWidgetClass),
- (GtkClassInitFunc) e_address_widget_class_init,
- (GtkObjectInitFunc) e_address_widget_init,
- NULL, NULL, /* reserved... but for what sinister purpose? */
- (GtkClassInitFunc) NULL
- };
-
- aw_type = gtk_type_unique (gtk_event_box_get_type (), &aw_info);
- }
-
- return aw_type;
-}
-
-static void
-gtk_widget_visible (GtkWidget *w, gboolean x)
-{
- if (x)
- gtk_widget_show (w);
- else
- gtk_widget_hide (w);
-}
-
-static void
-e_address_widget_refresh (EAddressWidget *addr)
-{
- gchar *str;
- gboolean have_name, have_email;
-
- g_return_if_fail (addr && E_IS_ADDRESS_WIDGET (addr));
-
- have_name = addr->name && *addr->name;
- have_email = addr->email && *addr->email && (addr->card == NULL || !addr->known_email);
-
- gtk_label_set_text (GTK_LABEL (addr->name_widget), have_name ? addr->name : "");
- gtk_widget_visible (addr->name_widget, have_name);
- if (addr->card) {
- gint i, N = strlen (addr->name);
- gchar *pattern = g_malloc (N+1);
- for (i=0; i<N; ++i)
- pattern[i] = '_';
- pattern[i] = '\0';
- gtk_label_set_pattern (GTK_LABEL (addr->name_widget), pattern);
- g_free (pattern);
- } else {
- gtk_label_set_pattern (GTK_LABEL (addr->name_widget), "");
- }
-
- if (have_email) {
- str = g_strdup_printf (have_name ? "<%s>" : "%s", addr->email);
- gtk_label_set_text (GTK_LABEL (addr->email_widget), str);
- g_free (str);
- } else {
- gtk_label_set_text (GTK_LABEL (addr->email_widget), "");
- }
- gtk_widget_visible (addr->email_widget, have_email);
-
- gtk_widget_visible (addr->spacer, have_name && have_email);
-
- /* Launch a query to find the appropriate card, if necessary. */
- if (addr->card == NULL)
- e_address_widget_schedule_query (addr);
-}
-
-void
-e_address_widget_set_name (EAddressWidget *addr, const gchar *name)
-{
- g_return_if_fail (addr && E_IS_ADDRESS_WIDGET (addr));
-
- g_free (addr->name);
- addr->name = g_strdup (name);
-
- e_address_widget_refresh (addr);
-}
-
-void
-e_address_widget_set_email (EAddressWidget *addr, const gchar *email)
-{
- g_return_if_fail (addr && E_IS_ADDRESS_WIDGET (addr));
-
- g_free (addr->email);
- addr->email = g_strdup (email);
-
- e_address_widget_refresh (addr);
-}
-
-
-void
-e_address_widget_set_text (EAddressWidget *addr, const gchar *text)
-{
- g_return_if_fail (addr && E_IS_ADDRESS_WIDGET (addr));
-
- e_address_widget_set_email (addr, text); /* CRAP */
-}
-
-void
-e_address_widget_construct (EAddressWidget *addr)
-{
- GtkWidget *box;
-
- g_return_if_fail (addr && E_IS_ADDRESS_WIDGET (addr));
-
- box = gtk_hbox_new (FALSE, 2);
-
- addr->name_widget = gtk_label_new ("");
- addr->spacer = gtk_label_new (" ");
- addr->email_widget = gtk_label_new ("");
-
- gtk_box_pack_start (GTK_BOX (box), addr->name_widget, FALSE, FALSE, 0);
- gtk_box_pack_start (GTK_BOX (box), addr->spacer, FALSE, FALSE, 0);
- gtk_box_pack_start (GTK_BOX (box), addr->email_widget, FALSE, FALSE, 0);
-
- gtk_container_add (GTK_CONTAINER (addr), box);
-
- gtk_widget_show (box);
- gtk_widget_show (addr->name_widget);
- gtk_widget_show (addr->email_widget);
-}
-
-GtkWidget *
-e_address_widget_new (void)
-{
- EAddressWidget *addr = gtk_type_new (e_address_widget_get_type ());
- e_address_widget_construct (addr);
- return GTK_WIDGET (addr);
-}
-
-/*
- *
- * Cardification
- *
- */
-
-static void
-e_address_widget_cardify (EAddressWidget *addr, ECard *card, gboolean known_email)
-{
- if (addr->card != card || addr->known_email != known_email) {
-
- if (addr->card != card) {
- if (addr->card)
- gtk_object_unref (GTK_OBJECT (addr->card));
- addr->card = card;
- gtk_object_ref (GTK_OBJECT (addr->card));
- }
-
- addr->known_email = known_email;
-
- if (!(addr->name && *addr->name)) {
- gchar *s = e_card_name_to_string (card->name);
- e_address_widget_set_name (addr, s);
- g_free (s);
- }
-
- e_address_widget_refresh (addr);
- }
-}
-
-static void
-query_results_cb (EBook *book, EBookSimpleQueryStatus status, const GList *cards, gpointer user_data)
-{
- EAddressWidget *addr = user_data;
-
- if (g_list_length ((GList *) cards) == 1) {
- ECard *card = E_CARD (cards->data);
- e_address_widget_cardify (addr, card, TRUE);
- }
-
- addr->query_tag = 0;
-}
-
-static void
-e_address_widget_do_query (EAddressWidget *addr)
-{
- e_book_name_and_email_query (common_book, addr->name, addr->email, query_results_cb, addr);
-}
-
-static void
-book_ready_cb (EBook *book, EBookStatus status, gpointer user_data)
-{
- EAddressWidget *addr = E_ADDRESS_WIDGET (user_data);
-
- if (common_book == NULL) {
- common_book = book;
- gtk_object_ref (GTK_OBJECT (common_book));
- } else
- gtk_object_unref (GTK_OBJECT (book));
-
- e_address_widget_do_query (addr);
-}
-
-static gint
-query_idle_fn (gpointer ptr)
-{
- EAddressWidget *addr = E_ADDRESS_WIDGET (ptr);
-
- if (common_book) {
- e_address_widget_do_query (addr);
- } else {
- e_book_load_local_address_book (e_book_new (), book_ready_cb, addr);
- }
-
- addr->query_idle_tag = 0;
- return FALSE;
-}
-
-static void
-e_address_widget_schedule_query (EAddressWidget *addr)
-{
- if (addr->query_idle_tag || !doing_queries)
- return;
- addr->query_idle_tag = gtk_idle_add (query_idle_fn, addr);
-}
-
-/*
- *
- * Popup Menu
- *
- */
-
-#define ARBITRARY_UIINFO_LIMIT 64
-
-static gint
-popup_add_name_and_address (EAddressWidget *addr, GnomeUIInfo *uiinfo, gint i)
-{
- gboolean flag = FALSE;
-
- if (addr->name && *addr->name) {
- uiinfo[i].type = GNOME_APP_UI_ITEM;
- uiinfo[i].label = addr->name;
- ++i;
- flag = TRUE;
- }
-
- if (addr->email && *addr->email) {
- uiinfo[i].type = GNOME_APP_UI_ITEM;
- uiinfo[i].label = addr->email;
- ++i;
- flag = TRUE;
- }
-
- if (flag) {
- uiinfo[i].type = GNOME_APP_UI_SEPARATOR;
- ++i;
- }
-
- return i;
-}
-
-static void
-flip_queries_flag_cb (GtkWidget *w, gpointer user_data)
-{
- doing_queries = !doing_queries;
-}
-
-static gint
-popup_add_query_change (EAddressWidget *addr, GnomeUIInfo *uiinfo, gint i)
-{
- uiinfo[i].type = GNOME_APP_UI_SEPARATOR;
- ++i;
-
- uiinfo[i].type = GNOME_APP_UI_ITEM;
- uiinfo[i].label = doing_queries ? _("Disable Queries") : _("Enable Queries (Dangerous!)");
- uiinfo[i].moreinfo = flip_queries_flag_cb;
- ++i;
-
- return i;
-}
-
-
-static GtkWidget *
-popup_menu_card (EAddressWidget *addr)
-{
- GnomeUIInfo uiinfo[ARBITRARY_UIINFO_LIMIT];
- GtkWidget *pop;
- gint i=0;
- ECard *card = E_CARD (addr->card);
-
- g_return_val_if_fail (card != NULL, NULL);
-
- memset (uiinfo, 0, sizeof (uiinfo));
-
- i = popup_add_name_and_address (addr, uiinfo, i);
-
- uiinfo[i].type = GNOME_APP_UI_ITEM;
- uiinfo[i].label = _("Edit Contact Info");
- ++i;
-
- i = popup_add_query_change (addr, uiinfo, i);
-
- uiinfo[i].type = GNOME_APP_UI_ENDOFINFO;
- pop = gnome_popup_menu_new (uiinfo);
- return pop;
-}
-
-static void
-post_quick_add_cb (ECard *card, gpointer user_data)
-{
- e_address_widget_cardify (E_ADDRESS_WIDGET (user_data), card, TRUE);
-}
-
-static void
-add_contacts_cb (GtkWidget *w, gpointer user_data)
-{
- EAddressWidget *addr = E_ADDRESS_WIDGET (user_data);
-
- e_contact_quick_add (addr->name, addr->email, post_quick_add_cb, addr);
-}
-
-static GtkWidget *
-popup_menu_nocard (EAddressWidget *addr)
-{
- GnomeUIInfo uiinfo[ARBITRARY_UIINFO_LIMIT];
- GtkWidget *pop;
- gint i=0;
-
- memset (uiinfo, 0, sizeof (uiinfo));
-
- i = popup_add_name_and_address (addr, uiinfo, i);
-
- uiinfo[i].type = GNOME_APP_UI_ITEM;
- uiinfo[i].label = _("Add to Contacts");
- uiinfo[i].moreinfo = add_contacts_cb;
- ++i;
-
- i = popup_add_query_change (addr, uiinfo, i);
-
- uiinfo[i].type = GNOME_APP_UI_ENDOFINFO;
- pop = gnome_popup_menu_new (uiinfo);
- return pop;
-}
-
-static void
-e_address_widget_popup (EAddressWidget *addr, GdkEventButton *ev)
-{
- GtkWidget *pop;
-
- g_return_if_fail (addr && E_IS_ADDRESS_WIDGET (addr));
-
- pop = addr->card ? popup_menu_card (addr) : popup_menu_nocard (addr);
-
- if (pop)
- gnome_popup_menu_do_popup (pop, NULL, NULL, ev, addr);
-}
-
-/*
- *
- * Bonobo Control Magic
- *
- */
-
-enum {
- ADDRESS_PROPERTY_NAME,
- ADDRESS_PROPERTY_EMAIL,
- ADDRESS_PROPERTY_TEXT,
- ADDRESS_PROPERTY_BACKGROUND_RGB
-};
-
-
-static void
-get_prop (BonoboPropertyBag *bag, BonoboArg *arg, guint arg_id, CORBA_Environment *ev, gpointer user_data)
-{
- EAddressWidget *addr = E_ADDRESS_WIDGET (user_data);
-
- switch (arg_id) {
-
- case ADDRESS_PROPERTY_NAME:
- BONOBO_ARG_SET_STRING (arg, addr->name ? addr->name :"");
- break;
-
- case ADDRESS_PROPERTY_EMAIL:
- BONOBO_ARG_SET_STRING (arg, addr->email ? addr->email : "");
- break;
-
- case ADDRESS_PROPERTY_TEXT:
- BONOBO_ARG_SET_STRING (arg, "?");
- break;
- }
-}
-
-static void
-set_prop (BonoboPropertyBag *bag, const BonoboArg *arg, guint arg_id, CORBA_Environment *ev, gpointer user_data)
-{
- EAddressWidget *addr = E_ADDRESS_WIDGET (user_data);
-
- switch (arg_id) {
- case ADDRESS_PROPERTY_NAME:
- e_address_widget_set_name (addr, BONOBO_ARG_GET_STRING (arg));
- break;
-
- case ADDRESS_PROPERTY_EMAIL:
- e_address_widget_set_email (addr, BONOBO_ARG_GET_STRING (arg));
- break;
-
- case ADDRESS_PROPERTY_TEXT:
- e_address_widget_set_text (addr, BONOBO_ARG_GET_STRING (arg));
- break;
-
-
- case ADDRESS_PROPERTY_BACKGROUND_RGB:
- {
- gint bg = BONOBO_ARG_GET_INT (arg);
- GdkColor color;
-
- color.red = (bg & 0xff0000) >> 8;
- color.green = (bg & 0x00ff00);
- color.blue = (bg & 0x0000ff) << 8;
-
- if (gdk_colormap_alloc_color (gtk_widget_get_colormap (GTK_WIDGET (addr)), &color, FALSE, TRUE)) {
- GtkStyle *style = gtk_style_copy (gtk_widget_get_style (GTK_WIDGET (addr)));
- style->bg[0] = color;
- gtk_widget_set_style (GTK_WIDGET (addr), style);
- }
- }
-
- break;
- }
-}
-
-static BonoboControl *
-e_address_widget_factory_new_control (void)
-{
- BonoboControl *control;
- BonoboPropertyBag *bag;
- GtkWidget *w;
-
- w = e_address_widget_new ();
- gtk_widget_show (w);
-
- control = bonobo_control_new (w);
-
- bag = bonobo_property_bag_new (get_prop, set_prop, w);
- bonobo_property_bag_add (bag, "name", ADDRESS_PROPERTY_NAME,
- BONOBO_ARG_STRING, NULL, NULL,
- BONOBO_PROPERTY_READABLE | BONOBO_PROPERTY_WRITEABLE);
-
- bonobo_property_bag_add (bag, "email", ADDRESS_PROPERTY_EMAIL,
- BONOBO_ARG_STRING, NULL, NULL,
- BONOBO_PROPERTY_READABLE | BONOBO_PROPERTY_WRITEABLE);
-
- bonobo_property_bag_add (bag, "text", ADDRESS_PROPERTY_TEXT,
- BONOBO_ARG_STRING, NULL, NULL,
- BONOBO_PROPERTY_READABLE | BONOBO_PROPERTY_WRITEABLE);
-
- bonobo_property_bag_add (bag, "background_rgb", ADDRESS_PROPERTY_BACKGROUND_RGB,
- BONOBO_ARG_INT, NULL, NULL,
- BONOBO_PROPERTY_WRITEABLE);
-
- bonobo_control_set_properties (control, bag);
- bonobo_object_unref (BONOBO_OBJECT (bag));
-
- return control;
-}
-
-static BonoboObject *
-e_address_widget_factory (BonoboGenericFactory *factory, gpointer user_data)
-{
- return BONOBO_OBJECT (e_address_widget_factory_new_control ());
-}
-
-void
-e_address_widget_factory_init (void)
-{
- static BonoboGenericFactory *factory = NULL;
-
- if (factory != NULL)
- return;
-
- factory = bonobo_generic_factory_new ("OAFIID:GNOME_Evolution_Addressbook_AddressWidgetFactory",
- e_address_widget_factory, NULL);
-
- if (factory == NULL)
- g_error ("I could not register an AddressWidget factory.");
-}
-
diff --git a/addressbook/gui/component/e-address-widget.h b/addressbook/gui/component/e-address-widget.h
deleted file mode 100644
index 8cf425d5c9..0000000000
--- a/addressbook/gui/component/e-address-widget.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * e-address-widget.h
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Developed by Jon Trowbridge <trow@ximian.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 __E_ADDRESS_WIDGET_H__
-#define __E_ADDRESS_WIDGET_H__
-
-#include <gtk/gtkeventbox.h>
-#include <gtk/gtkhbox.h>
-#include <gtk/gtkobject.h>
-#include <gtk/gtkwidget.h>
-#include <libgnome/gnome-defs.h>
-#include <addressbook/backend/ebook/e-book.h>
-#include <addressbook/backend/ebook/e-book-util.h>
-#include <addressbook/backend/ebook/e-card.h>
-
-BEGIN_GNOME_DECLS
-
-#define E_ADDRESS_WIDGET_TYPE (e_address_widget_get_type ())
-#define E_ADDRESS_WIDGET(o) (GTK_CHECK_CAST ((o), E_ADDRESS_WIDGET_TYPE, EAddressWidget))
-#define E_ADDRESS_WIDGET_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), E_ADDRESS_WIDGET_TYPE, EAddressWidgetClass))
-#define E_IS_ADDRESS_WIDGET(o) (GTK_CHECK_TYPE ((o), E_ADDRESS_WIDGET_TYPE))
-#define E_IS_ADDRESS_WIDGET_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_ADDRESS_WIDGET_TYPE))
-
-typedef struct _EAddressWidget EAddressWidget;
-typedef struct _EAddressWidgetClass EAddressWidgetClass;
-
-struct _EAddressWidget {
- GtkEventBox parent;
-
- gchar *name;
- gchar *email;
-
- GtkWidget *name_widget;
- GtkWidget *email_widget;
- GtkWidget *spacer;
-
- guint query_idle_tag;
- guint query_tag;
-
- ECard *card;
- gboolean known_email;
-};
-
-struct _EAddressWidgetClass {
- GtkEventBoxClass parent_class;
-};
-
-GtkType e_address_widget_get_type (void);
-
-void e_address_widget_set_name (EAddressWidget *, const gchar *name);
-void e_address_widget_set_email (EAddressWidget *, const gchar *email);
-void e_address_widget_set_text (EAddressWidget *, const gchar *text);
-
-void e_address_widget_construct (EAddressWidget *);
-GtkWidget *e_address_widget_new (void);
-
-
-void e_address_widget_factory_init (void);
-
-
-
-END_GNOME_DECLS
-
-#endif /* __E_ADDRESS_WIDGET_H__ */
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/addressbook/gui/component/e-cardlist-model.c b/addressbook/gui/component/e-cardlist-model.c
deleted file mode 100644
index 007aa395d9..0000000000
--- a/addressbook/gui/component/e-cardlist-model.c
+++ /dev/null
@@ -1,225 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- *
- * Author:
- * Christopher James Lahey <clahey@helixcode.com>
- *
- * (C) 1999 Helix Code, Inc.
- */
-
-#include <config.h>
-#include <gnome-xml/tree.h>
-#include <gnome-xml/parser.h>
-#include <gnome-xml/xmlmemory.h>
-#include "e-cardlist-model.h"
-
-#define PARENT_TYPE e_table_model_get_type()
-
-static void
-e_cardlist_model_destroy(GtkObject *object)
-{
- ECardlistModel *model = E_CARDLIST_MODEL(object);
- int i;
-
- 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
-e_cardlist_model_col_count (ETableModel *etc)
-{
- return E_CARD_SIMPLE_FIELD_LAST;
-}
-
-/* This function returns the number of rows in our ETableModel. */
-static int
-e_cardlist_model_row_count (ETableModel *etc)
-{
- ECardlistModel *e_cardlist_model = E_CARDLIST_MODEL(etc);
- return e_cardlist_model->data_count;
-}
-
-/* This function returns the value at a particular point in our ETableModel. */
-static void *
-e_cardlist_model_value_at (ETableModel *etc, int col, int row)
-{
- ECardlistModel *e_cardlist_model = E_CARDLIST_MODEL(etc);
- const char *value;
- if ( col >= E_CARD_SIMPLE_FIELD_LAST - 1|| row >= e_cardlist_model->data_count )
- return NULL;
- value = e_card_simple_get_const(e_cardlist_model->data[row],
- col + 1);
- return (void *)(value ? value : "");
-}
-
-/* This function sets the value at a particular point in our ETableModel. */
-static void
-e_cardlist_model_set_value_at (ETableModel *etc, int col, int row, const void *val)
-{
- ECardlistModel *e_cardlist_model = E_CARDLIST_MODEL(etc);
- ECard *card;
- if ( col >= E_CARD_SIMPLE_FIELD_LAST - 1|| row >= e_cardlist_model->data_count )
- return;
- e_card_simple_set(e_cardlist_model->data[row],
- col + 1,
- val);
- gtk_object_get(GTK_OBJECT(e_cardlist_model->data[row]),
- "card", &card,
- NULL);
-
- e_table_model_cell_changed(etc, col, row);
-}
-
-/* This function returns whether a particular cell is editable. */
-static gboolean
-e_cardlist_model_is_cell_editable (ETableModel *etc, int col, int row)
-{
- return TRUE;
-}
-
-/* This function duplicates the value passed to it. */
-static void *
-e_cardlist_model_duplicate_value (ETableModel *etc, int col, const void *value)
-{
- return g_strdup(value);
-}
-
-/* This function frees the value passed to it. */
-static void
-e_cardlist_model_free_value (ETableModel *etc, int col, void *value)
-{
- g_free(value);
-}
-
-static void *
-e_cardlist_model_initialize_value (ETableModel *etc, int col)
-{
- return g_strdup("");
-}
-
-static gboolean
-e_cardlist_model_value_is_empty (ETableModel *etc, int col, const void *value)
-{
- return !(value && *(char *)value);
-}
-
-static char *
-e_cardlist_model_value_to_string (ETableModel *etc, int col, const void *value)
-{
- return g_strdup(value);
-}
-
-void
-e_cardlist_model_add(ECardlistModel *model,
- ECard **cards,
- int count)
-{
- int i;
- model->data = g_realloc(model->data, model->data_count + count * sizeof(ECard *));
- for (i = 0; i < count; i++) {
- gboolean found = FALSE;
- gchar *id = e_card_get_id(cards[i]);
- for ( i = 0; i < model->data_count; i++) {
- if ( !strcmp(e_card_simple_get_id(model->data[i]), id) ) {
- found = TRUE;
- }
- }
- if (!found) {
- gtk_object_ref(GTK_OBJECT(cards[i]));
- model->data[model->data_count++] = e_card_simple_new (cards[i]);
- e_table_model_row_inserted(E_TABLE_MODEL(model), model->data_count - 1);
- }
- }
-}
-
-void
-e_cardlist_model_remove(ECardlistModel *model,
- const char *id)
-{
- 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
-e_cardlist_model_class_init (GtkObjectClass *object_class)
-{
- ETableModelClass *model_class = (ETableModelClass *) object_class;
-
- object_class->destroy = e_cardlist_model_destroy;
-
- model_class->column_count = e_cardlist_model_col_count;
- model_class->row_count = e_cardlist_model_row_count;
- model_class->value_at = e_cardlist_model_value_at;
- model_class->set_value_at = e_cardlist_model_set_value_at;
- model_class->is_cell_editable = e_cardlist_model_is_cell_editable;
- model_class->duplicate_value = e_cardlist_model_duplicate_value;
- model_class->free_value = e_cardlist_model_free_value;
- model_class->initialize_value = e_cardlist_model_initialize_value;
- model_class->value_is_empty = e_cardlist_model_value_is_empty;
- model_class->value_to_string = e_cardlist_model_value_to_string;
-}
-
-static void
-e_cardlist_model_init (GtkObject *object)
-{
- ECardlistModel *model = E_CARDLIST_MODEL(object);
- model->data = NULL;
- model->data_count = 0;
-}
-
-ECard *
-e_cardlist_model_get(ECardlistModel *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;
-}
-
-GtkType
-e_cardlist_model_get_type (void)
-{
- static GtkType type = 0;
-
- if (!type){
- GtkTypeInfo info = {
- "ECardlistModel",
- sizeof (ECardlistModel),
- sizeof (ECardlistModelClass),
- (GtkClassInitFunc) e_cardlist_model_class_init,
- (GtkObjectInitFunc) e_cardlist_model_init,
- NULL, /* reserved 1 */
- NULL, /* reserved 2 */
- (GtkClassInitFunc) NULL
- };
-
- type = gtk_type_unique (PARENT_TYPE, &info);
- }
-
- return type;
-}
-
-ETableModel *
-e_cardlist_model_new (void)
-{
- ECardlistModel *et;
-
- et = gtk_type_new (e_cardlist_model_get_type ());
-
- return E_TABLE_MODEL(et);
-}
diff --git a/addressbook/gui/component/e-cardlist-model.h b/addressbook/gui/component/e-cardlist-model.h
deleted file mode 100644
index 0b9a7a2265..0000000000
--- a/addressbook/gui/component/e-cardlist-model.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-#ifndef _E_CARDLIST_MODEL_H_
-#define _E_CARDLIST_MODEL_H_
-
-#include <gal/e-table/e-table-model.h>
-#include <ebook/e-book.h>
-#include <ebook/e-book-view.h>
-#include <ebook/e-card-simple.h>
-
-#define E_CARDLIST_MODEL_TYPE (e_cardlist_model_get_type ())
-#define E_CARDLIST_MODEL(o) (GTK_CHECK_CAST ((o), E_CARDLIST_MODEL_TYPE, ECardlistModel))
-#define E_CARDLIST_MODEL_CLASS(k) (GTK_CHECK_CLASS_CAST((k), E_CARDLIST_MODEL_TYPE, ECardlistModelClass))
-#define E_IS_CARDLIST_MODEL(o) (GTK_CHECK_TYPE ((o), E_CARDLIST_MODEL_TYPE))
-#define E_IS_CARDLIST_MODEL_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_CARDLIST_MODEL_TYPE))
-
-typedef struct {
- ETableModel parent;
-
- /* item specific fields */
- ECardSimple **data;
- int data_count;
-} ECardlistModel;
-
-
-typedef struct {
- ETableModelClass parent_class;
-} ECardlistModelClass;
-
-
-GtkType e_cardlist_model_get_type (void);
-ETableModel *e_cardlist_model_new (void);
-
-/* Returns object with an extra ref count. */
-ECard *e_cardlist_model_get (ECardlistModel *model,
- int row);
-void e_cardlist_model_add (ECardlistModel *model,
- ECard **card,
- int count);
-void e_cardlist_model_remove (ECardlistModel *model,
- const char *id);
-
-#endif /* _E_CARDLIST_MODEL_H_ */
diff --git a/addressbook/gui/component/select-names/.cvsignore b/addressbook/gui/component/select-names/.cvsignore
deleted file mode 100644
index cd669499fa..0000000000
--- a/addressbook/gui/component/select-names/.cvsignore
+++ /dev/null
@@ -1,12 +0,0 @@
-.deps
-.libs
-.pure
-Makefile
-Makefile.in
-*.lo
-*.la
-Evolution-Addressbook-SelectNames-stubs.c
-Evolution-Addressbook-SelectNames-skels.c
-Evolution-Addressbook-SelectNames-common.c
-Evolution-Addressbook-SelectNames.h
-GNOME_Evolution_Addressbook_SelectNames.oaf
diff --git a/addressbook/gui/component/select-names/Evolution-Addressbook-SelectNames.idl b/addressbook/gui/component/select-names/Evolution-Addressbook-SelectNames.idl
deleted file mode 100644
index c38d714cf4..0000000000
--- a/addressbook/gui/component/select-names/Evolution-Addressbook-SelectNames.idl
+++ /dev/null
@@ -1,39 +0,0 @@
-/* -*- Mode: IDL; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * CORBA interface for the SelectNames dialog.
- *
- * Authors:
- * Ettore Perazzoli <ettore@helixcode.com>
- *
- * Copyright (C) 2000 Helix Code, Inc.
- */
-
-#include <Bonobo.idl>
-
-module GNOME {
-module Evolution {
-module Addressbook {
-
- interface SelectNames : Bonobo::Unknown {
- struct Section {
- string id;
- string title;
- };
-
- typedef sequence<Section> SectionList;
-
- exception DuplicateID {};
- exception SectionNotFound {};
-
- void addSection (in string id, in string title)
- raises (DuplicateID);
-
- Bonobo::Control getEntryBySection (in string section_id)
- raises (SectionNotFound);
-
- void activateDialog (in string section_id);
- };
-
-};
-};
-};
diff --git a/addressbook/gui/component/select-names/GNOME_Evolution_Addressbook_SelectNames.oaf.in b/addressbook/gui/component/select-names/GNOME_Evolution_Addressbook_SelectNames.oaf.in
deleted file mode 100644
index 7f26e2aaed..0000000000
--- a/addressbook/gui/component/select-names/GNOME_Evolution_Addressbook_SelectNames.oaf.in
+++ /dev/null
@@ -1,29 +0,0 @@
-<oaf_info>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Addressbook_SelectNamesFactory"
- type="exe"
- location="evolution-addressbook">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/ObjectFactory:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="description" type="string"
- _value="Factory for the Addressbook's name selection interface"/>
-
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Addressbook_SelectNames"
- type="factory"
- location="OAFIID:GNOME_Evolution_Addressbook_SelectNamesFactory">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/Evolution/Addressbook/SelectNames"/>
- </oaf_attribute>
-
- <oaf_attribute name="description" type="string"
- _value="Evolution's addressbook name selection interface."/>
-
-</oaf_server>
-
-</oaf_info> \ No newline at end of file
diff --git a/addressbook/gui/component/select-names/Makefile.am b/addressbook/gui/component/select-names/Makefile.am
deleted file mode 100644
index 2d877fdf6e..0000000000
--- a/addressbook/gui/component/select-names/Makefile.am
+++ /dev/null
@@ -1,86 +0,0 @@
-# CORBA stuff
-
-IDLS = \
- Evolution-Addressbook-SelectNames.idl
-
-IDL_GENERATED = \
- Evolution-Addressbook-SelectNames.h \
- Evolution-Addressbook-SelectNames-common.c \
- Evolution-Addressbook-SelectNames-skels.c \
- Evolution-Addressbook-SelectNames-stubs.c
-
-Evolution-Addressbook-SelectNames-impl.o: Evolution-Addressbook-SelectNames.h
-
-$(IDL_GENERATED): $(IDLS)
- $(ORBIT_IDL) -I $(srcdir) -I $(datadir)/idl `$(GNOME_CONFIG) --cflags idl` \
- $(srcdir)/Evolution-Addressbook-SelectNames.idl
-
-oafdir = $(datadir)/oaf
-
-oaf_in_files = GNOME_Evolution_Addressbook_SelectNames.oaf.in
-oaf_DATA = $(oaf_in_files:.oaf.in=.oaf)
-
-@XML_I18N_MERGE_OAF_RULE@
-
-
-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/gui/widgets \
- -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=\""$(localedir)"\" \
- -DCAMEL_PROVIDERDIR=\""$(providerdir)"\"
-
-lib_LTLIBRARIES = libeselectnames.la
-
-libeselectnames_la_SOURCES = \
- $(IDL_GENERATED) \
- e-select-names-bonobo.c \
- e-select-names-bonobo.h \
- e-select-names-completion.c \
- e-select-names-completion.h \
- e-select-names-factory.c \
- e-select-names-factory.h \
- e-select-names-manager.c \
- e-select-names-manager.h \
- e-select-names-model.c \
- e-select-names-model.h \
- e-select-names-popup.c \
- e-select-names-popup.h \
- e-select-names-table-model.c \
- e-select-names-table-model.h \
- e-select-names-text-model.c \
- e-select-names-text-model.h \
- e-select-names.c \
- e-select-names.h
-
-gladedir = $(datadir)/evolution/glade
-glade_DATA = select-names.glade
-
-
-
-EXTRA_DIST = \
- $(glade_DATA) \
- $(oaf_in_files) \
- $(oaf_DATA) \
- $(IDLS)
-
-BUILT_SOURCES = $(IDL_GENERATED)
-CLEANFILES += $(BUILT_SOURCES)
-
-dist-hook:
- cd $(distdir); rm -f $(BUILT_SOURCES)
diff --git a/addressbook/gui/component/select-names/e-select-names-bonobo.c b/addressbook/gui/component/select-names/e-select-names-bonobo.c
deleted file mode 100644
index 98c235c067..0000000000
--- a/addressbook/gui/component/select-names/e-select-names-bonobo.c
+++ /dev/null
@@ -1,330 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-select-names-bonobo.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 <config.h>
-#endif
-
-#include "e-select-names-bonobo.h"
-
-#include <bonobo/bonobo-property-bag.h>
-#include <bonobo/bonobo-control.h>
-
-#include <gal/util/e-util.h>
-#include <gal/e-text/e-entry.h>
-
-#include "Evolution-Addressbook-SelectNames.h"
-
-#include "e-select-names-manager.h"
-
-#include "e-select-names-model.h"
-#include "e-select-names-text-model.h"
-
-
-
-#define PARENT_TYPE bonobo_object_get_type ()
-static BonoboObjectClass *parent_class = NULL;
-
-struct _ESelectNamesBonoboPrivate {
- ESelectNamesManager *manager;
-};
-
-enum _EntryPropertyID {
- ENTRY_PROPERTY_ID_TEXT,
- ENTRY_PROPERTY_ID_ENTRY_CHANGED
-};
-typedef enum _EntryPropertyID EntryPropertyID;
-
-
-/* PropertyBag implementation for the entry widgets. */
-
-static void
-entry_get_property_fn (BonoboPropertyBag *bag,
- BonoboArg *arg,
- unsigned int arg_id,
- CORBA_Environment *ev,
- void *user_data)
-{
- GtkWidget *w;
- const char *text;
-
- w = GTK_WIDGET (user_data);
-
- switch (arg_id) {
- case ENTRY_PROPERTY_ID_TEXT:
- {
- ESelectNamesTextModel *text_model;
- ESelectNamesModel *model;
-
- gtk_object_get(GTK_OBJECT(w),
- "model", &text_model,
- NULL);
- gtk_object_get(GTK_OBJECT(text_model),
- "source", &model,
- NULL);
- text = e_select_names_model_get_address_text (model);
- BONOBO_ARG_SET_STRING (arg, text);
- }
- break;
- default:
- break;
- }
-}
-
-static void
-entry_set_property_fn (BonoboPropertyBag *bag,
- const BonoboArg *arg,
- guint arg_id,
- CORBA_Environment *ev,
- gpointer user_data)
-{
- GtkWidget *widget;
-
- widget = GTK_WIDGET (user_data);
-
- switch (arg_id) {
-
- case ENTRY_PROPERTY_ID_TEXT:
- e_entry_set_text (E_ENTRY (widget), BONOBO_ARG_GET_STRING (arg));
- break;
-
- case ENTRY_PROPERTY_ID_ENTRY_CHANGED:
- gtk_object_set_data (GTK_OBJECT (widget), "entry_property_id_changed", GUINT_TO_POINTER (1));
- break;
- default:
- break;
- }
-}
-
-
-/* CORBA interface implementation. */
-
-static POA_GNOME_Evolution_Addressbook_SelectNames__vepv SelectNames_vepv;
-
-static POA_GNOME_Evolution_Addressbook_SelectNames *
-create_servant (void)
-{
- POA_GNOME_Evolution_Addressbook_SelectNames *servant;
- CORBA_Environment ev;
-
- servant = (POA_GNOME_Evolution_Addressbook_SelectNames *) g_new0 (BonoboObjectServant, 1);
- servant->vepv = &SelectNames_vepv;
-
- CORBA_exception_init (&ev);
-
- POA_GNOME_Evolution_Addressbook_SelectNames__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_SelectNames_add_section (PortableServer_Servant servant,
- const CORBA_char *id,
- const CORBA_char *title,
- CORBA_Environment *ev)
-{
- BonoboObject *bonobo_object;
- ESelectNamesBonobo *select_names;
- ESelectNamesBonoboPrivate *priv;
-
- bonobo_object = bonobo_object_from_servant (servant);
- select_names = E_SELECT_NAMES_BONOBO (bonobo_object);
- priv = select_names->priv;
-
- e_select_names_manager_add_section (priv->manager, id, title);
-}
-
-static void
-entry_changed (GtkWidget *widget, BonoboControl *control)
-{
- gboolean changed = GPOINTER_TO_UINT (gtk_object_get_data (GTK_OBJECT (widget), "entry_property_id_changed"));
-
- if (!changed)
- bonobo_control_set_property (control, "entry_changed", TRUE, NULL);
-}
-
-static Bonobo_Control
-impl_SelectNames_get_entry_for_section (PortableServer_Servant servant,
- const CORBA_char *section_id,
- CORBA_Environment *ev)
-{
- BonoboObject *bonobo_object;
- ESelectNamesBonobo *select_names;
- ESelectNamesBonoboPrivate *priv;
- GtkWidget *entry_widget;
- BonoboControl *control;
- BonoboPropertyBag *property_bag;
-
- bonobo_object = bonobo_object_from_servant (servant);
- select_names = E_SELECT_NAMES_BONOBO (bonobo_object);
- priv = select_names->priv;
-
- entry_widget = e_select_names_manager_create_entry (priv->manager, section_id);
- gtk_widget_show (entry_widget);
-
- if (entry_widget == NULL) {
- CORBA_exception_set (ev,
- CORBA_USER_EXCEPTION,
- ex_GNOME_Evolution_Addressbook_SelectNames_SectionNotFound,
- NULL);
- return CORBA_OBJECT_NIL;
- }
-
- control = bonobo_control_new (entry_widget);
-
- property_bag = bonobo_property_bag_new (entry_get_property_fn, entry_set_property_fn, entry_widget);
- bonobo_property_bag_add (property_bag, "text", ENTRY_PROPERTY_ID_TEXT,
- BONOBO_ARG_STRING, NULL, NULL,
- BONOBO_PROPERTY_READABLE | BONOBO_PROPERTY_WRITEABLE);
- bonobo_property_bag_add (property_bag, "entry_changed", ENTRY_PROPERTY_ID_ENTRY_CHANGED,
- BONOBO_ARG_BOOLEAN, NULL, NULL,
- BONOBO_PROPERTY_WRITEABLE);
-
- bonobo_control_set_properties (control, property_bag);
-
- gtk_signal_connect (GTK_OBJECT (entry_widget), "changed",
- GTK_SIGNAL_FUNC (entry_changed), control);
-
- return CORBA_Object_duplicate (bonobo_object_corba_objref (BONOBO_OBJECT (control)), ev);
-}
-
-static void
-impl_SelectNames_activate_dialog (PortableServer_Servant servant,
- const CORBA_char *section_id,
- CORBA_Environment *ev)
-{
- BonoboObject *bonobo_object;
- ESelectNamesBonobo *select_names;
- ESelectNamesBonoboPrivate *priv;
-
- bonobo_object = bonobo_object_from_servant (servant);
- select_names = E_SELECT_NAMES_BONOBO (bonobo_object);
- priv = select_names->priv;
-
- e_select_names_manager_activate_dialog (priv->manager, section_id);
-}
-
-
-/* GtkObject methods. */
-
-static void
-impl_destroy (GtkObject *object)
-{
- ESelectNamesBonobo *select_names;
- ESelectNamesBonoboPrivate *priv;
-
- select_names = E_SELECT_NAMES_BONOBO (object);
- priv = select_names->priv;
-
- gtk_object_unref (GTK_OBJECT (priv->manager));
-
- g_free (priv);
-}
-
-
-static void
-corba_class_init ()
-{
- POA_GNOME_Evolution_Addressbook_SelectNames__vepv *vepv;
- POA_GNOME_Evolution_Addressbook_SelectNames__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_GNOME_Evolution_Addressbook_SelectNames__epv, 1);
- epv->addSection = impl_SelectNames_add_section;
- epv->getEntryBySection = impl_SelectNames_get_entry_for_section;
- epv->activateDialog = impl_SelectNames_activate_dialog;
-
- vepv = &SelectNames_vepv;
- vepv->Bonobo_Unknown_epv = bonobo_object_get_epv ();
- vepv->GNOME_Evolution_Addressbook_SelectNames_epv = epv;
-}
-
-static void
-class_init (ESelectNamesBonoboClass *klass)
-{
- GtkObjectClass *object_class;
-
- object_class = GTK_OBJECT_CLASS (klass);
- parent_class = gtk_type_class (bonobo_object_get_type ());
-
- object_class->destroy = impl_destroy;
-
- corba_class_init ();
-}
-
-static void
-init (ESelectNamesBonobo *select_names)
-{
- ESelectNamesBonoboPrivate *priv;
-
- priv = g_new (ESelectNamesBonoboPrivate, 1);
-
- priv->manager = e_select_names_manager_new ();
-
- select_names->priv = priv;
-}
-
-
-void
-e_select_names_bonobo_construct (ESelectNamesBonobo *select_names,
- GNOME_Evolution_Addressbook_SelectNames corba_object)
-{
- g_return_if_fail (select_names != NULL);
- g_return_if_fail (E_IS_SELECT_NAMES_BONOBO (select_names));
-
- bonobo_object_construct (BONOBO_OBJECT (select_names), corba_object);
-}
-
-ESelectNamesBonobo *
-e_select_names_bonobo_new (void)
-{
- POA_GNOME_Evolution_Addressbook_SelectNames *servant;
- GNOME_Evolution_Addressbook_SelectNames corba_object;
- ESelectNamesBonobo *select_names;
-
- servant = create_servant ();
- if (servant == NULL)
- return NULL;
-
- select_names = gtk_type_new (e_select_names_bonobo_get_type ());
-
- corba_object = bonobo_object_activate_servant (BONOBO_OBJECT (select_names), servant);
- e_select_names_bonobo_construct (select_names, corba_object);
-
- return select_names;
-}
-
-
-E_MAKE_TYPE (e_select_names_bonobo, "ESelectNamesBonobo", ESelectNamesBonobo, class_init, init, PARENT_TYPE)
diff --git a/addressbook/gui/component/select-names/e-select-names-bonobo.h b/addressbook/gui/component/select-names/e-select-names-bonobo.h
deleted file mode 100644
index 87fbfa0fab..0000000000
--- a/addressbook/gui/component/select-names/e-select-names-bonobo.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-select-names-bonobo.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_SELECT_NAMES_BONOBO_H__
-#define __E_SELECT_NAMES_BONOBO_H__
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <bonobo/bonobo-object.h>
-
-#include "Evolution-Addressbook-SelectNames.h"
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#define E_TYPE_SELECT_NAMES_BONOBO (e_select_names_bonobo_get_type ())
-#define E_SELECT_NAMES_BONOBO(obj) (GTK_CHECK_CAST ((obj), E_TYPE_SELECT_NAMES_BONOBO, ESelectNamesBonobo))
-#define E_SELECT_NAMES_BONOBO_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_SELECT_NAMES_BONOBO, ESelectNamesBonoboClass))
-#define E_IS_SELECT_NAMES_BONOBO(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_SELECT_NAMES_BONOBO))
-#define E_IS_SELECT_NAMES_BONOBO_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_TYPE_SELECT_NAMES_BONOBO))
-
-
-typedef struct _ESelectNamesBonobo ESelectNamesBonobo;
-typedef struct _ESelectNamesBonoboPrivate ESelectNamesBonoboPrivate;
-typedef struct _ESelectNamesBonoboClass ESelectNamesBonoboClass;
-
-struct _ESelectNamesBonobo {
- BonoboObject parent;
-
- ESelectNamesBonoboPrivate *priv;
-};
-
-struct _ESelectNamesBonoboClass {
- BonoboObjectClass parent_class;
-};
-
-
-GtkType e_select_names_bonobo_get_type (void);
-void e_select_names_bonobo_construct (ESelectNamesBonobo *select_names,
- GNOME_Evolution_Addressbook_SelectNames corba_object);
-ESelectNamesBonobo *e_select_names_bonobo_new (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __E_SELECT_NAMES_BONOBO_H__ */
diff --git a/addressbook/gui/component/select-names/e-select-names-completion.c b/addressbook/gui/component/select-names/e-select-names-completion.c
deleted file mode 100644
index 88ab176bf6..0000000000
--- a/addressbook/gui/component/select-names/e-select-names-completion.c
+++ /dev/null
@@ -1,1027 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * e-select-names-completion.c
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Developed by Jon Trowbridge <trow@ximian.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 <ctype.h>
-#include <stdio.h>
-#include <string.h>
-
-#include <gtk/gtksignal.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-util.h>
-
-#include <addressbook/backend/ebook/e-book-util.h>
-#include <addressbook/backend/ebook/e-destination.h>
-#include "e-select-names-completion.h"
-
-struct _ESelectNamesCompletionPrivate {
-
- ESelectNamesModel *model;
-
- EBook *book;
- gboolean book_ready;
- gboolean cancelled;
-
- guint book_view_tag;
- EBookView *book_view;
-
- gchar *waiting_query;
- gint waiting_pos, waiting_limit;
- gchar *query_text;
-
- gchar *cached_query_text;
- GList *cached_cards;
-
- gboolean primary_only;
-};
-
-static void e_select_names_completion_class_init (ESelectNamesCompletionClass *);
-static void e_select_names_completion_init (ESelectNamesCompletion *);
-static void e_select_names_completion_destroy (GtkObject *object);
-
-static void e_select_names_completion_got_book_view_cb (EBook *book, EBookStatus status, EBookView *view, gpointer user_data);
-static void e_select_names_completion_card_added_cb (EBookView *, const GList *cards, gpointer user_data);
-static void e_select_names_completion_seq_complete_cb (EBookView *, gpointer user_data);
-
-static void e_select_names_completion_do_query (ESelectNamesCompletion *, const gchar *query_text, gint pos, gint limit);
-
-static void e_select_names_completion_begin (ECompletion *, const gchar *txt, gint pos, gint limit);
-static void e_select_names_completion_end (ECompletion *);
-static void e_select_names_completion_cancel (ECompletion *);
-
-static GtkObjectClass *parent_class;
-
-static FILE *out;
-
-/*
- *
- * Query builders
- *
- */
-
-typedef gchar *(*BookQuerySExp) (ESelectNamesCompletion *);
-typedef gchar *(*BookQueryMatchTester) (ESelectNamesCompletion *, EDestination *, double *score);
-
-/*
- * Nickname query
- */
-
-static gchar *
-sexp_nickname (ESelectNamesCompletion *comp)
-{
- return g_strdup_printf ("(beginswith \"nickname\" \"%s\")", comp->priv->query_text);
-
-}
-
-static gchar *
-match_nickname (ESelectNamesCompletion *comp, EDestination *dest, double *score)
-{
- gint len = strlen (comp->priv->query_text);
- ECard *card = e_destination_get_card (dest);
-
- if (card->nickname
- && !g_strncasecmp (comp->priv->query_text, card->nickname, len)) {
- gchar *name = e_card_name_to_string (card->name);
- gchar *str;
-
- *score = len * 10; /* nickname gives 10 points per matching character */
-
- str = g_strdup_printf ("(%s) %s", card->nickname, name);
- g_free (name);
- return str;
- }
-
- return NULL;
-}
-
-/*
- * E-Mail Query
- */
-
-static gchar *
-sexp_email (ESelectNamesCompletion *comp)
-{
- return g_strdup_printf ("(beginswith \"email\" \"%s\")", comp->priv->query_text);
-}
-
-static gchar *
-match_email (ESelectNamesCompletion *comp, EDestination *dest, double *score)
-{
- gint len = strlen (comp->priv->query_text);
- ECard *card = e_destination_get_card (dest);
- const gchar *email = e_destination_get_email (dest);
-
- if (email && !g_strncasecmp (comp->priv->query_text, email, len)) {
- gchar *name, *str;
- *score = len * 2; /* 2 points for each matching character */
- name = e_card_name_to_string (card->name);
- if (name && *name)
- str = g_strdup_printf ("<%s> %s", email, name);
- else
- str = g_strdup (email);
- g_free (name);
- return str;
- }
-
- return NULL;
-}
-
-/*
- * Name Query
- */
-
-static gchar *
-sexp_name (ESelectNamesCompletion *comp)
-{
- if (comp && comp->priv->query_text && *comp->priv->query_text) {
- gchar *cpy = g_strdup (comp->priv->query_text);
- gchar **strv;
- gchar *query;
- gint i, count=0;
-
- strv = g_strsplit (cpy, " ", 0);
- for (i=0; strv[i]; ++i) {
- ++count;
- g_strstrip (strv[i]);
- strv[i] = g_strdup_printf ("(contains \"full_name\" \"%s\")", strv[i]);
- }
-
- if (count == 1) {
- query = strv[0];
- strv[0] = NULL;
- } else {
- gchar *joined = g_strjoinv (" ", strv);
- query = g_strdup_printf ("(and %s)", joined);
- g_free (joined);
- }
-
- for (i=0; strv[i]; ++i)
- g_free (strv[i]);
- g_free (cpy);
- g_free (strv);
-
- return query;
- }
-
- return NULL;
-}
-
-enum {
- MATCHED_NOTHING = 0,
- MATCHED_GIVEN_NAME = 1<<0,
- MATCHED_ADDITIONAL_NAME = 1<<1,
- MATCHED_FAMILY_NAME = 1<<2
-};
-
-/*
- Match text against every substring in fragment that follows whitespace.
- This allows the fragment "de Icaza" to match against txt "ica".
-*/
-static gboolean
-match_name_fragment (const gchar *fragment, const gchar *txt)
-{
- gint len = strlen (txt);
-
- while (*fragment) {
- if (!g_strncasecmp (fragment, txt, len))
- return TRUE;
-
- while (*fragment && !isspace ((gint) *fragment))
- ++fragment;
- while (*fragment && isspace ((gint) *fragment))
- ++fragment;
- }
-
- return FALSE;
-}
-
-static gchar *
-match_name (ESelectNamesCompletion *comp, EDestination *dest, double *score)
-{
- ECard *card;
- gchar *cpy, **strv;
- gint len, i, match_len = 0;
- gint match = 0, first_match = 0;
-
- card = e_destination_get_card (dest);
-
- if (card->name == NULL)
- return NULL;
-
- cpy = g_strdup (comp->priv->query_text);
- strv = g_strsplit (cpy, " ", 0);
-
- for (i=0; strv[i] && !(match & MATCHED_NOTHING); ++i) {
- gint this_match = 0;
-
- g_strstrip (strv[i]);
- len = strlen (strv[i]);
-
- if (card->name->given
- && !(match & MATCHED_GIVEN_NAME)
- && match_name_fragment (card->name->given, strv[i])) {
-
- this_match = MATCHED_GIVEN_NAME;
-
- }
- else if (card->name->additional
- && !(match & MATCHED_ADDITIONAL_NAME)
- && match_name_fragment (card->name->additional, strv[i])) {
-
- this_match = MATCHED_ADDITIONAL_NAME;
-
- } else if (card->name->family
- && !(match & MATCHED_FAMILY_NAME)
- && match_name_fragment (card->name->family, strv[i])) {
-
- this_match = MATCHED_FAMILY_NAME;
- }
-
-
- if (this_match != MATCHED_NOTHING) {
- match_len += len;
- match |= this_match;
- if (first_match == 0)
- first_match = this_match;
- } else {
- match = first_match = 0;
- break;
- }
-
- }
-
- *score = match_len * 3; /* three points per match character */
-
- if (card->nickname) {
- /* We massively boost the score if the nickname exists and is the same as one of the "real" names. This keeps the
- nickname from matching ahead of the real name for this card. */
- len = strlen (card->nickname);
- if ((card->name->given && !g_strncasecmp (card->name->given, card->nickname, MIN (strlen (card->name->given), len)))
- || (card->name->family && !g_strncasecmp (card->name->family, card->nickname, MIN (strlen (card->name->family), len)))
- || (card->name->additional && !g_strncasecmp (card->name->additional, card->nickname, MIN (strlen (card->name->additional), len))))
- *score *= 100;
- }
-
- if (first_match == MATCHED_GIVEN_NAME)
- return g_strdup_printf ("%s %s", card->name->given, card->name->family);
- else if (first_match == MATCHED_ADDITIONAL_NAME)
- return g_strdup_printf ("%s, %s %s", card->name->family, card->name->given, card->name->additional);
- else if (first_match == MATCHED_FAMILY_NAME)
- return g_strdup_printf ("%s, %s", card->name->family, card->name->given);
-
- return NULL;
-}
-
-/*
- * Initials Query
- */
-
-static gchar *
-sexp_initials (ESelectNamesCompletion *comp)
-{
- return NULL;
-}
-
-static gchar *
-match_initials (ESelectNamesCompletion *comp, EDestination *dest, double *score)
-{
- return NULL;
-}
-
-
-typedef struct _BookQuery BookQuery;
-struct _BookQuery {
- gboolean primary;
- BookQuerySExp builder;
- BookQueryMatchTester tester;
-};
-
-static BookQuery book_queries[] = {
- { TRUE, sexp_nickname, match_nickname},
- { TRUE, sexp_email, match_email },
- { TRUE, sexp_name, match_name },
- { FALSE, sexp_initials, match_initials }
-};
-static gint book_query_count = sizeof (book_queries) / sizeof (BookQuery);
-
-/*
- * Build up a big compound sexp corresponding to all of our queries.
- */
-static gchar *
-book_query_sexp (ESelectNamesCompletion *comp)
-{
- gint i, j, count = 0;
- gchar **queryv, *query;
-
- g_return_val_if_fail (comp && E_IS_SELECT_NAMES_COMPLETION (comp), NULL);
-
- if (! (comp->priv->query_text && *comp->priv->query_text))
- return NULL;
-
- if (comp->priv->primary_only) {
- for (i=0; i<book_query_count; ++i)
- if (book_queries[i].primary)
- ++count;
- } else {
- count = book_query_count;
- }
-
- queryv = g_new0 (gchar *, count+1);
- for (i=0, j=0; i<count; ++i) {
- queryv[j] = book_queries[i].builder (comp);
- if (queryv[j])
- ++j;
- }
-
- if (j == 0) {
- query = NULL;
- } else if (j == 1) {
- query = queryv[0];
- queryv[0] = NULL;
- } else {
- gchar *tmp = g_strjoinv (" ", queryv);
- query = g_strdup_printf ("(or %s)", tmp);
- g_free (tmp);
- }
-
- for (i=0; i<count; ++i)
- g_free (queryv[i]);
- g_free (queryv);
-
- return query;
-}
-
-/*
- * Sweep across all of our query rules and find the best score/match
- * string that applies to a given destination.
- */
-static gchar *
-book_query_score (ESelectNamesCompletion *comp, EDestination *dest, double *score)
-{
- double best_score = -1;
- gchar *best_string = NULL;
- gint i;
-
- g_return_val_if_fail (score, NULL);
- *score = -1;
-
- g_return_val_if_fail (comp && E_IS_SELECT_NAMES_COMPLETION (comp), NULL);
- g_return_val_if_fail (dest && E_IS_DESTINATION (dest), NULL);
-
- for (i=0; i<book_query_count; ++i) {
- double this_score = -1;
- gchar *this_string = NULL;
-
- if (book_queries[i].primary || !comp->priv->primary_only) {
- if (book_queries[i].tester && e_destination_get_card (dest))
- this_string = book_queries[i].tester (comp, dest, &this_score);
- if (this_string) {
- if (this_score > best_score) {
- g_free (best_string);
- best_string = this_string;
- best_score = this_score;
- } else {
- g_free (this_string);
- }
- }
- }
- }
-
- /* If this destination corresponds to a card w/ multiple addresses, and if the
- address isn't already in the string, append it. */
- if (best_string) {
- ECard *card = e_destination_get_card (dest);
- if (e_list_length (card->email) > 1) {
- const gchar *email = e_destination_get_email (dest);
- if (email && strstr (best_string, email) == NULL) {
- gchar *tmp = g_strdup_printf ("%s <%s>", best_string, email);
- g_free (best_string);
- best_string = tmp;
- }
- }
- }
-
- *score = best_score;
- return best_string;
-}
-
-static void
-book_query_process_card_list (ESelectNamesCompletion *comp, const GList *cards)
-{
- while (cards) {
- ECard *card = E_CARD (cards->data);
-
- if (card->email) {
- gint i;
- for (i=0; i<e_list_length (card->email); ++i) {
- EDestination *dest = e_destination_new ();
- gchar *match_text;
- double score = -1;
-
- e_destination_set_card (dest, card, i);
-
- match_text = book_query_score (comp, dest, &score);
- if (match_text && score > 0) {
-
- e_completion_found_match_full (E_COMPLETION (comp), match_text, score, dest,
- (GtkDestroyNotify) gtk_object_unref);
- } else {
- gtk_object_unref (GTK_OBJECT (dest));
- }
- g_free (match_text);
- }
- }
-
- cards = g_list_next (cards);
- }
-}
-
-#if 0
-static gchar *
-initials_query_match_cb (QueryInfo *qi, ECard *card, double *score)
-{
- gint len;
- gchar f='\0', m='\0', l='\0'; /* initials */
- gchar cf, cm, cl;
-
- len = strlen (qi->comp->priv->query_text);
-
- if (len == 2) {
-
- f = qi->comp->priv->query_text[0];
- m = '\0';
- l = qi->comp->priv->query_text[1];
-
- } else if (len == 3) {
-
- f = qi->comp->priv->query_text[0];
- m = qi->comp->priv->query_text[1];
- l = qi->comp->priv->query_text[2];
-
- } else {
- return NULL;
- }
-
- cf = card->name->given ? *card->name->given : '\0';
- cm = card->name->additional ? *card->name->additional : '\0';
- cl = card->name->family ? *card->name->family : '\0';
-
- if (f && isupper ((gint) f))
- f = tolower ((gint) f);
- if (m && isupper ((gint) m))
- m = tolower ((gint) m);
- if (l && isupper ((gint) l))
- l = tolower ((gint) l);
-
- if (cf && isupper ((gint) cf))
- cf = tolower ((gint) cf);
- if (cm && isupper ((gint) cm))
- cm = tolower ((gint) cm);
- if (cl && isupper ((gint) cl))
- cl = tolower ((gint) cl);
-
- if ((f == '\0' || (f == cf)) && (m == '\0' || (m == cm)) && (l == '\0' || (l == cl))) {
- if (score)
- *score = 3;
- if (m)
- return g_strdup_printf ("%s %s %s", card->name->given, card->name->additional, card->name->family);
- else
- return g_strdup_printf ("%s %s", card->name->given, card->name->family);
- }
-
- return NULL;
-}
-
-static gboolean
-start_initials_query (ESelectNamesCompletion *comp)
-{
- gint len;
- gchar *query;
-
- if (comp && comp->priv->query_text && *(comp->priv->query_text)) {
-
- len = strlen (comp->priv->query_text);
- if (len < 2 || len > 3)
- return FALSE;
-
- query = g_strdup_printf ("(contains \"x-evolution-any-field\" \"%c\")", *(comp->priv->query_text));
- query_info_start (comp, comp->priv->query_text, query, initials_query_match_cb);
- g_free (query);
- return TRUE;
- }
-
- return FALSE;
-}
-#endif
-
-
-/*
- *
- * ESelectNamesCompletion code
- *
- */
-
-
-GtkType
-e_select_names_completion_get_type (void)
-{
- static GtkType select_names_complete_type = 0;
-
- if (!select_names_complete_type) {
- GtkTypeInfo select_names_complete_info = {
- "ESelectNamesCompletion",
- sizeof (ESelectNamesCompletion),
- sizeof (ESelectNamesCompletionClass),
- (GtkClassInitFunc) e_select_names_completion_class_init,
- (GtkObjectInitFunc) e_select_names_completion_init,
- NULL, NULL, /* reserved */
- (GtkClassInitFunc) NULL
- };
-
- select_names_complete_type = gtk_type_unique (e_completion_get_type (), &select_names_complete_info);
- }
-
- return select_names_complete_type;
-}
-
-static void
-e_select_names_completion_class_init (ESelectNamesCompletionClass *klass)
-{
- GtkObjectClass *object_class = GTK_OBJECT_CLASS (klass);
- ECompletionClass *completion_class = E_COMPLETION_CLASS (klass);
-
- parent_class = GTK_OBJECT_CLASS (gtk_type_class (e_completion_get_type ()));
-
- object_class->destroy = e_select_names_completion_destroy;
-
- completion_class->begin_completion = e_select_names_completion_begin;
- completion_class->end_completion = e_select_names_completion_end;
- completion_class->cancel_completion = e_select_names_completion_cancel;
-
- if (getenv ("EVO_DEBUG_SELECT_NAMES_COMPLETION")) {
- out = fopen ("/tmp/evo-debug-select-names-completion", "w");
- if (out)
- setvbuf (out, NULL, _IONBF, 0);
- }
-}
-
-static void
-e_select_names_completion_init (ESelectNamesCompletion *comp)
-{
- comp->priv = g_new0 (struct _ESelectNamesCompletionPrivate, 1);
-}
-
-static void
-e_select_names_completion_destroy (GtkObject *object)
-{
- ESelectNamesCompletion *comp = E_SELECT_NAMES_COMPLETION (object);
-
- if (comp->priv->model)
- gtk_object_unref (GTK_OBJECT (comp->priv->model));
-
- if (comp->priv->book)
- gtk_object_unref (GTK_OBJECT (comp->priv->book));
-
- if (comp->priv->book_view)
- gtk_object_unref (GTK_OBJECT (comp->priv->book_view));
-
- g_free (comp->priv->waiting_query);
- g_free (comp->priv->query_text);
-
- g_free (comp->priv->cached_query_text);
- g_list_foreach (comp->priv->cached_cards, (GFunc)gtk_object_unref, NULL);
- g_list_free (comp->priv->cached_cards);
-
- g_free (comp->priv);
-
- if (parent_class->destroy)
- parent_class->destroy (object);
-}
-
-
-/*
- *
- * EBook/EBookView Callbacks & Query Stuff
- *
- */
-
-static gchar *
-clean_query_text (const gchar *s)
-{
- gchar *q = g_new (gchar, strlen(s)+1), *t;
-
- t = q;
- while (*s) {
- if (*s != ',' && *s != '"') {
- *t = *s;
- ++t;
- }
- ++s;
- }
- *t = '\0';
-
- return q;
-}
-
-static void
-e_select_names_completion_clear_cache (ESelectNamesCompletion *comp)
-{
- g_free (comp->priv->cached_query_text);
- comp->priv->cached_query_text = NULL;
-
- g_list_foreach (comp->priv->cached_cards, (GFunc)gtk_object_unref, NULL);
- g_list_free (comp->priv->cached_cards);
- comp->priv->cached_cards = NULL;
-}
-
-static void
-e_select_names_completion_got_book_view_cb (EBook *book, EBookStatus status, EBookView *view, gpointer user_data)
-{
- ESelectNamesCompletion *comp;
-
- if (status != E_BOOK_STATUS_SUCCESS)
- return;
-
- comp = E_SELECT_NAMES_COMPLETION (user_data);
-
- comp->priv->cancelled = FALSE;
-
- comp->priv->book_view_tag = 0;
-
- comp->priv->book_view = view;
- gtk_object_ref (GTK_OBJECT (view));
-
- gtk_signal_connect (GTK_OBJECT (view),
- "card_added",
- GTK_SIGNAL_FUNC (e_select_names_completion_card_added_cb),
- comp);
- gtk_signal_connect (GTK_OBJECT (view),
- "sequence_complete",
- GTK_SIGNAL_FUNC (e_select_names_completion_seq_complete_cb),
- comp);
-}
-
-static void
-e_select_names_completion_card_added_cb (EBookView *book_view, const GList *cards, gpointer user_data)
-{
- ESelectNamesCompletion *comp = E_SELECT_NAMES_COMPLETION (user_data);
-
- if (! comp->priv->cancelled)
- book_query_process_card_list (comp, cards);
-
- /* Save the list of matching cards. */
- while (cards) {
- comp->priv->cached_cards = g_list_prepend (comp->priv->cached_cards, cards->data);
- gtk_object_ref (GTK_OBJECT (cards->data));
- cards = g_list_next (cards);
- }
-}
-
-static void
-e_select_names_completion_seq_complete_cb (EBookView *book_view, gpointer user_data)
-{
- ESelectNamesCompletion *comp = E_SELECT_NAMES_COMPLETION (user_data);
-
- gtk_object_unref (GTK_OBJECT (comp->priv->book_view));
-
- comp->priv->book_view = NULL;
-
- g_free (comp->priv->query_text);
- comp->priv->query_text = NULL;
-
- if (out)
- fprintf (out, "ending search ");
- if (out && !e_completion_searching (E_COMPLETION (comp)))
- fprintf (out, "while not searching!");
- if (out)
- fprintf (out, "\n");
- e_completion_end_search (E_COMPLETION (comp)); /* That's all folks! */
-
- /* Need to launch a new completion if another one is pending. */
- if (comp->priv->waiting_query) {
- gchar *s = comp->priv->waiting_query;
- comp->priv->waiting_query = NULL;
- e_completion_begin_search (E_COMPLETION (comp), s, comp->priv->waiting_pos, comp->priv->waiting_limit);
- g_free (s);
- }
-}
-
-static void
-e_select_names_completion_stop_query (ESelectNamesCompletion *comp)
-{
- g_return_if_fail (comp && E_IS_SELECT_NAMES_COMPLETION (comp));
-
- if (out)
- fprintf (out, "stopping query\n");
-
- if (comp->priv->waiting_query) {
- if (out)
- fprintf (out, "stopped waiting query\n");
- g_free (comp->priv->waiting_query);
- comp->priv->waiting_query = NULL;
- }
-
- g_free (comp->priv->query_text);
- comp->priv->query_text = NULL;
-
- if (comp->priv->book_view_tag) {
- if (out)
- fprintf (out, "cancelled book view creation\n");
- e_book_cancel (comp->priv->book, comp->priv->book_view_tag);
- comp->priv->book_view_tag = 0;
- }
-
- if (comp->priv->book_view) {
- if (out)
- fprintf (out, "unrefed book view\n");
- gtk_object_unref (GTK_OBJECT (comp->priv->book_view));
- comp->priv->book_view = NULL;
- }
-
- /* Clear the cache, which may contain partial results. */
- e_select_names_completion_clear_cache (comp);
-
-}
-
-static void
-e_select_names_completion_start_query (ESelectNamesCompletion *comp, const gchar *query_text)
-{
- g_return_if_fail (comp && E_IS_SELECT_NAMES_COMPLETION (comp));
- g_return_if_fail (query_text);
-
- e_select_names_completion_stop_query (comp); /* Stop any prior queries. */
-
- if (comp->priv->book_ready) {
- gchar *sexp;
-
- g_free (comp->priv->query_text);
- comp->priv->query_text = g_strdup (query_text);
-
- g_free (comp->priv->cached_query_text);
- comp->priv->cached_query_text = g_strdup (query_text);
-
- sexp = book_query_sexp (comp);
- if (sexp && *sexp) {
-
- if (out)
- fprintf (out, "\n\n**** starting query: \"%s\"\n", comp->priv->query_text);
-
- comp->priv->book_view_tag = e_book_get_book_view (comp->priv->book, sexp,
- e_select_names_completion_got_book_view_cb, comp);
-
- if (! comp->priv->book_view_tag)
- g_warning ("Exception calling e_book_get_book_view");
-
- } else {
- g_free (comp->priv->query_text);
- }
- g_free (sexp);
-
- } else {
-
- comp->priv->waiting_query = g_strdup (query_text);
-
- }
-}
-
-static void
-e_select_names_completion_do_query (ESelectNamesCompletion *comp, const gchar *query_text, gint pos, gint limit)
-{
- gchar *clean;
- gboolean query_is_still_running, can_reuse_cached_cards;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (E_IS_SELECT_NAMES_COMPLETION (comp));
-
- query_is_still_running = comp->priv->book_view_tag || comp->priv->book_view;
- clean = clean_query_text (query_text);
-
- if (out) {
- fprintf (out, "do_query: %s => %s\n", query_text, clean);
- if (query_is_still_running)
- fprintf (out, "a query is still running!\n");
- }
- if (comp->priv->cached_query_text && out)
- fprintf (out, "cached: %s\n", comp->priv->cached_query_text);
-
- can_reuse_cached_cards = (comp->priv->cached_query_text
- && (strlen (comp->priv->cached_query_text) <= strlen (clean))
- && !g_strncasecmp (comp->priv->cached_query_text, clean, strlen (comp->priv->cached_query_text)));
-
-
- if (can_reuse_cached_cards) {
-
- if (out)
- fprintf (out, "can reuse cached card!\n");
-
- if (query_is_still_running) {
- g_free (comp->priv->waiting_query);
- comp->priv->waiting_query = clean;
- comp->priv->waiting_pos = pos;
- comp->priv->waiting_limit = limit;
- if (out)
- fprintf (out, "waiting for running query to complete: %s\n", comp->priv->waiting_query);
- return;
- }
-
- g_free (comp->priv->query_text);
- comp->priv->query_text = clean;
- if (out)
- fprintf (out, "using existing query info: %s (vs %s)\n", comp->priv->query_text, comp->priv->cached_query_text);
- comp->priv->cancelled = FALSE;
- book_query_process_card_list (comp, comp->priv->cached_cards);
- e_completion_end_search (E_COMPLETION (comp));
- return;
- }
-
- e_select_names_completion_start_query (comp, clean);
- g_free (clean);
-}
-
-
-/*
- *
- * Completion Search Override - a Framework for Christian-Resurrection-Holiday Edible-Chicken-Embryos
- *
- */
-
-typedef struct _SearchOverride SearchOverride;
-struct _SearchOverride {
- const gchar *trigger;
- const gchar *text[4];
-};
-static SearchOverride override[] = {
- { "why?", { "\"I must create a system, or be enslaved by another man's.\"",
- " -- Wiliam Blake, \"Jerusalem\"",
- NULL } },
- { NULL, { NULL } } };
-
-static gboolean
-search_override_check (SearchOverride *over, const gchar *text)
-{
- if (over == NULL || text == NULL)
- return FALSE;
-
- return !g_strcasecmp (over->trigger, text);
-}
-
-
-/*
- *
- * Completion Callbacks
- *
- */
-
-static void
-e_select_names_completion_begin (ECompletion *comp, const gchar *text, gint pos, gint limit)
-{
- ESelectNamesCompletion *selcomp = E_SELECT_NAMES_COMPLETION (comp);
- const gchar *str;
- gint index, j;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (E_IS_SELECT_NAMES_COMPLETION (comp));
- g_return_if_fail (text != NULL);
-
- if (out) {
- fprintf (out, "\n\n**** requesting completion\n");
- fprintf (out, "text=\"%s\" pos=%d limit=%d\n", text, pos, limit);
- }
-
- e_select_names_model_text_pos (selcomp->priv->model, pos, &index, NULL, NULL);
- str = index >= 0 ? e_select_names_model_get_string (selcomp->priv->model, index) : NULL;
-
- if (out)
- fprintf (out, "index=%d str=\"%s\"\n", index, str);
-
- if (str == NULL || *str == '\0') {
- if (out)
- fprintf (out, "aborting empty query\n");
- e_completion_end_search (comp);
- return;
- }
-
- for (j=0; override[j].trigger; ++j) {
- if (search_override_check (&(override[j]), str)) {
- gint k;
-
- for (k=0; override[j].text[k]; ++k)
- e_completion_found_match (comp, override[j].text[k]);
-
- if (out)
- fprintf (out, "aborting on override \"%s\"\n", override[j].trigger);
- e_completion_end_search (comp);
- return;
- }
- }
-
- e_select_names_completion_do_query (selcomp, str, pos, limit);
-}
-
-static void
-e_select_names_completion_end (ECompletion *comp)
-{
- g_return_if_fail (comp != NULL);
- g_return_if_fail (E_IS_COMPLETION (comp));
-
- if (out)
- fprintf (out, "completion ended\n");
-}
-
-static void
-e_select_names_completion_cancel (ECompletion *comp)
-{
- g_return_if_fail (comp != NULL);
- g_return_if_fail (E_IS_COMPLETION (comp));
-
- E_SELECT_NAMES_COMPLETION (comp)->priv->cancelled = TRUE;
-
- if (out)
- fprintf (out, "completion cancelled\n");
-}
-
-static void
-e_select_names_completion_book_ready (EBook *book, EBookStatus status, ESelectNamesCompletion *comp)
-{
- comp->priv->book_ready = TRUE;
-
- g_return_if_fail (book != NULL);
- g_return_if_fail (E_IS_BOOK (book));
- g_return_if_fail (comp != NULL);
- g_return_if_fail (E_IS_SELECT_NAMES_COMPLETION (comp));
-
- /* If waiting_query is non-NULL, someone tried to start a query before the book was ready.
- Now that it is, get started. */
- if (comp->priv->waiting_query) {
- e_select_names_completion_start_query (comp, comp->priv->waiting_query);
- g_free (comp->priv->waiting_query);
- comp->priv->waiting_query = NULL;
- }
-
- gtk_object_unref (GTK_OBJECT (comp)); /* post-async unref */
-}
-
-
-/*
- *
- * Our Pseudo-Constructor
- *
- */
-
-ECompletion *
-e_select_names_completion_new (EBook *book, ESelectNamesModel *model)
-{
- ESelectNamesCompletion *comp;
-
- g_return_val_if_fail (book == NULL || E_IS_BOOK (book), NULL);
- g_return_val_if_fail (model, NULL);
- g_return_val_if_fail (E_IS_SELECT_NAMES_MODEL (model), NULL);
-
- comp = (ESelectNamesCompletion *) gtk_type_new (e_select_names_completion_get_type ());
-
- if (book == NULL) {
-
- comp->priv->book = e_book_new ();
- gtk_object_ref (GTK_OBJECT (comp->priv->book));
- gtk_object_sink (GTK_OBJECT (comp->priv->book));
-
- comp->priv->book_ready = FALSE;
- gtk_object_ref (GTK_OBJECT (comp)); /* ref ourself before our async call */
- e_book_load_local_address_book (comp->priv->book, (EBookCallback) e_select_names_completion_book_ready, comp);
-
- } else {
- comp->priv->book = book;
- gtk_object_ref (GTK_OBJECT (comp->priv->book));
- comp->priv->book_ready = TRUE;
- }
-
- comp->priv->model = model;
- gtk_object_ref (GTK_OBJECT (model));
-
- return E_COMPLETION (comp);
-}
-
diff --git a/addressbook/gui/component/select-names/e-select-names-completion.h b/addressbook/gui/component/select-names/e-select-names-completion.h
deleted file mode 100644
index 1f3de5ea3d..0000000000
--- a/addressbook/gui/component/select-names/e-select-names-completion.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * e-select-names-completion.h
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Developed by Jon Trowbridge <trow@ximian.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 E_SELECT_NAMES_COMPLETION_H
-#define E_SELECT_NAMES_COMPLETION_H
-
-#include <gal/e-text/e-completion.h>
-#include <addressbook/backend/ebook/e-book.h>
-#include "e-select-names-model.h"
-
-BEGIN_GNOME_DECLS
-
-#define E_SELECT_NAMES_COMPLETION_TYPE (e_select_names_completion_get_type ())
-#define E_SELECT_NAMES_COMPLETION(o) (GTK_CHECK_CAST ((o), E_SELECT_NAMES_COMPLETION_TYPE, ESelectNamesCompletion))
-#define E_SELECT_NAMES_COMPLETION_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), E_SELECT_NAMES_COMPLETION_TYPE, ESelectNamesCompletionClass))
-#define E_IS_SELECT_NAMES_COMPLETION(o) (GTK_CHECK_TYPE ((o), E_SELECT_NAMES_COMPLETION_TYPE))
-#define E_IS_SELECT_NAMES_COMPLETION_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_SELECT_NAMES_COMPLETION_TYPE))
-
-typedef struct _ESelectNamesCompletion ESelectNamesCompletion;
-typedef struct _ESelectNamesCompletionClass ESelectNamesCompletionClass;
-struct _ESelectNamesCompletionPrivate;
-
-struct _ESelectNamesCompletion {
- ECompletion parent;
-
- struct _ESelectNamesCompletionPrivate *priv;
-};
-
-struct _ESelectNamesCompletionClass {
- ECompletionClass parent_class;
-
-};
-
-GtkType e_select_names_completion_get_type (void);
-
-ECompletion *e_select_names_completion_new (EBook *, ESelectNamesModel *);
-
-END_GNOME_DECLS
-
-#endif /* E_SELECT_NAMES_COMPLETION_H */
-
diff --git a/addressbook/gui/component/select-names/e-select-names-factory.c b/addressbook/gui/component/select-names/e-select-names-factory.c
deleted file mode 100644
index 39fdcf8cee..0000000000
--- a/addressbook/gui/component/select-names/e-select-names-factory.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-select-names-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 <config.h>
-#endif
-
-#include <bonobo/bonobo-generic-factory.h>
-
-#include "e-select-names-bonobo.h"
-#include "e-select-names-factory.h"
-
-
-#define COMPONENT_FACTORY_ID "OAFIID:GNOME_Evolution_Addressbook_SelectNamesFactory"
-
-static BonoboGenericFactory *factory = NULL;
-
-
-static BonoboObject *
-factory_fn (BonoboGenericFactory *factory,
- void *closure)
-{
- return BONOBO_OBJECT (e_select_names_bonobo_new ());
-}
-
-
-gboolean
-e_select_names_factory_init (void)
-{
- if (factory != NULL)
- return TRUE;
-
- factory = bonobo_generic_factory_new (COMPONENT_FACTORY_ID, factory_fn, NULL);
-
- if (factory == NULL)
- return FALSE;
-
- return TRUE;
-}
diff --git a/addressbook/gui/component/select-names/e-select-names-factory.h b/addressbook/gui/component/select-names/e-select-names-factory.h
deleted file mode 100644
index f65d5aaa9e..0000000000
--- a/addressbook/gui/component/select-names/e-select-names-factory.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-select-names-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 _E_SECELT_NAMES_FACTORY_H
-#define _E_SECELT_NAMES_FACTORY_H
-
-#include <glib.h>
-
-gboolean e_select_names_factory_init (void);
-
-#endif
diff --git a/addressbook/gui/component/select-names/e-select-names-manager.c b/addressbook/gui/component/select-names/e-select-names-manager.c
deleted file mode 100644
index 6c06624918..0000000000
--- a/addressbook/gui/component/select-names/e-select-names-manager.c
+++ /dev/null
@@ -1,434 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Chris Lahey <clahey@helixcode.com>
- *
- * Copyright (C) 2000 Helix Code, Inc.
- */
-
-#include <config.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <gal/e-text/e-entry.h>
-
-#include "e-select-names-manager.h"
-#include "e-select-names-model.h"
-#include "e-select-names-text-model.h"
-#include "e-select-names.h"
-#include "e-select-names-completion.h"
-#include "e-select-names-popup.h"
-#include <addressbook/backend/ebook/e-destination.h>
-
-/* Object argument IDs */
-enum {
- ARG_0,
- ARG_CARD,
-};
-
-
-typedef struct {
- char *id;
- char *title;
- ESelectNamesModel *model;
-} ESelectNamesManagerSection;
-
-typedef struct {
- char *id;
- EEntry *entry;
-} ESelectNamesManagerEntry;
-
-static void e_select_names_manager_init (ESelectNamesManager *manager);
-static void e_select_names_manager_class_init (ESelectNamesManagerClass *klass);
-
-static void e_select_names_manager_destroy (GtkObject *object);
-static void e_select_names_manager_set_arg (GtkObject *object, GtkArg *arg, guint arg_id);
-static void e_select_names_manager_get_arg (GtkObject *object, GtkArg *arg, guint arg_id);
-
-/**
- * e_select_names_manager_get_type:
- * @void:
- *
- * Registers the &ESelectNamesManager class if necessary, and returns the type ID
- * associated to it.
- *
- * Return value: The type ID of the &ESelectNamesManager class.
- **/
-GtkType
-e_select_names_manager_get_type (void)
-{
- static GtkType manager_type = 0;
-
- if (!manager_type) {
- GtkTypeInfo manager_info = {
- "ESelectNamesManager",
- sizeof (ESelectNamesManager),
- sizeof (ESelectNamesManagerClass),
- (GtkClassInitFunc) e_select_names_manager_class_init,
- (GtkObjectInitFunc) e_select_names_manager_init,
- NULL, /* reserved_1 */
- NULL, /* reserved_2 */
- (GtkClassInitFunc) NULL
- };
-
- manager_type = gtk_type_unique (gtk_object_get_type (), &manager_info);
- }
-
- return manager_type;
-}
-
-/**
- * e_select_names_manager_new:
- * @VCard: a string in vCard format
- *
- * Returns: a new #ESelectNamesManager that wraps the @VCard.
- */
-ESelectNamesManager *
-e_select_names_manager_new (void)
-{
- ESelectNamesManager *manager = E_SELECT_NAMES_MANAGER(gtk_type_new(e_select_names_manager_get_type()));
- return manager;
-}
-
-static void
-e_select_names_manager_class_init (ESelectNamesManagerClass *klass)
-{
- GtkObjectClass *object_class;
-
- object_class = GTK_OBJECT_CLASS(klass);
-
- gtk_object_add_arg_type ("ESelectNamesManager::card",
- GTK_TYPE_OBJECT, GTK_ARG_READWRITE, ARG_CARD);
-
- object_class->destroy = e_select_names_manager_destroy;
- object_class->get_arg = e_select_names_manager_get_arg;
- object_class->set_arg = e_select_names_manager_set_arg;
-}
-
-/*
- * ESelectNamesManager lifecycle management and vcard loading/saving.
- */
-
-static void
-e_select_names_manager_destroy (GtkObject *object)
-{
- ESelectNamesManager *manager;
-
- manager = E_SELECT_NAMES_MANAGER (object);
-
- gtk_object_unref(GTK_OBJECT(manager->sections));
- gtk_object_unref(GTK_OBJECT(manager->entries));
-}
-
-
-/* Set_arg handler for the manager */
-static void
-e_select_names_manager_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
-{
- ESelectNamesManager *manager;
-
- manager = E_SELECT_NAMES_MANAGER (object);
-
- switch (arg_id) {
- case ARG_CARD:
- break;
- default:
- return;
- }
-}
-
-/* Get_arg handler for the manager */
-static void
-e_select_names_manager_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
-{
- ESelectNamesManager *manager;
-
- manager = E_SELECT_NAMES_MANAGER (object);
-
- switch (arg_id) {
- case ARG_CARD:
- break;
- default:
- arg->type = GTK_TYPE_INVALID;
- break;
- }
-}
-
-static void *
-section_copy(const void *sec, void *data)
-{
- const ESelectNamesManagerSection *section = sec;
- ESelectNamesManagerSection *newsec;
-
- newsec = g_new(ESelectNamesManagerSection, 1);
- newsec->id = g_strdup(section->id);
- newsec->title = g_strdup(section->title);
- newsec->model = section->model;
- if (newsec->model)
- gtk_object_ref(GTK_OBJECT(newsec->model));
- return newsec;
-}
-
-static void
-section_free(void *sec, void *data)
-{
- ESelectNamesManagerSection *section = sec;
- g_free(section->id);
- g_free(section->title);
- if (section->model)
- gtk_object_unref(GTK_OBJECT(section->model));
- g_free(section);
-}
-
-static void *
-entry_copy(const void *ent, void *data)
-{
- const ESelectNamesManagerEntry *entry = ent;
- ESelectNamesManagerEntry *newent;
-
- newent = g_new(ESelectNamesManagerEntry, 1);
- newent->id = g_strdup(entry->id);
- newent->entry = entry->entry;
- if (newent->entry)
- gtk_object_ref(GTK_OBJECT(newent->entry));
- return newent;
-}
-
-static void
-entry_free(void *ent, void *data)
-{
- ESelectNamesManagerEntry *entry = ent;
- g_free(entry->id);
- if (entry->entry)
- gtk_object_unref(GTK_OBJECT(entry->entry));
- g_free(entry);
-}
-
-/**
- * e_select_names_manager_init:
- */
-static void
-e_select_names_manager_init (ESelectNamesManager *manager)
-{
- manager->sections = e_list_new(section_copy, section_free, manager);
- manager->entries = e_list_new(entry_copy, entry_free, manager);
-}
-
-void
-e_select_names_manager_add_section (ESelectNamesManager *manager,
- const char *id,
- const char *title)
-{
- ESelectNamesManagerSection *section;
-
- section = g_new(ESelectNamesManagerSection, 1);
- section->id = g_strdup(id);
- section->title = g_strdup(title);
- section->model = e_select_names_model_new();
- e_list_append(manager->sections, section);
- section_free(section, manager);
-}
-
-ESelectNamesModel *
-e_select_names_manager_get_source (ESelectNamesManager *manager, const char *id)
-{
- EIterator *iterator;
-
- g_return_val_if_fail (manager && E_IS_SELECT_NAMES_MANAGER (manager), NULL);
- g_return_val_if_fail (id, NULL);
-
- iterator = e_list_get_iterator (manager->sections);
- for (e_iterator_reset (iterator); e_iterator_is_valid (iterator); e_iterator_next (iterator)) {
- const ESelectNamesManagerSection *section = e_iterator_get (iterator);
- if (!strcmp (section->id, id)) {
- return section->model;
- }
- }
-
- return NULL;
-}
-
-static void
-entry_destroyed(EEntry *entry, ESelectNamesManager *manager)
-{
- if(!GTK_OBJECT_DESTROYED(manager)) {
- EIterator *iterator = e_list_get_iterator(manager->entries);
- for (e_iterator_reset(iterator); e_iterator_is_valid(iterator); e_iterator_next(iterator)) {
- const ESelectNamesManagerEntry *this_entry = e_iterator_get(iterator);
- if(entry == this_entry->entry) {
- e_iterator_delete(iterator);
- break;
- }
- }
- }
- gtk_object_unref(GTK_OBJECT(manager));
-}
-
-static void
-completion_handler (EEntry *entry, const gchar *text, gpointer user_data)
-{
- ESelectNamesModel *snm;
- EDestination *dest;
- gint i, pos, start_pos, len;
-
- if (user_data == NULL)
- return;
-
- snm = E_SELECT_NAMES_MODEL (gtk_object_get_data (GTK_OBJECT (entry), "select_names_model"));
- dest = E_DESTINATION (user_data);
-
- /* Sometimes I really long for garbage collection. Reference
- counting makes you feel 31337, but sometimes it is just a
- bitch. */
- gtk_object_ref (GTK_OBJECT (dest));
-
- pos = e_entry_get_position (entry);
- e_select_names_model_text_pos (snm, pos, &i, NULL, NULL);
- e_select_names_model_replace (snm, i, dest);
- e_select_names_model_name_pos (snm, i, &start_pos, &len);
- e_entry_set_position (entry, start_pos+len);
-}
-
-static void
-popup_cb (EEntry *entry, GdkEventButton *ev, gint pos, ESelectNamesModel *model)
-{
- e_select_names_popup (model, ev, pos);
-}
-
-GtkWidget *
-e_select_names_manager_create_entry (ESelectNamesManager *manager, const char *id)
-{
- ETextModel *model;
- EIterator *iterator;
- iterator = e_list_get_iterator(manager->sections);
- for (e_iterator_reset(iterator); e_iterator_is_valid(iterator); e_iterator_next(iterator)) {
- const ESelectNamesManagerSection *section = e_iterator_get(iterator);
- if (!strcmp(section->id, id)) {
- ESelectNamesManagerEntry *entry;
- EEntry *eentry;
- ECompletion *comp;
-
- eentry = E_ENTRY (e_entry_new ());
- gtk_object_set_data (GTK_OBJECT (eentry), "select_names_model", section->model);
-
- gtk_signal_connect (GTK_OBJECT (eentry),
- "popup",
- GTK_SIGNAL_FUNC (popup_cb),
- section->model);
-
- entry = g_new (ESelectNamesManagerEntry, 1);
- entry->entry = eentry;
- entry->id = (char *)id;
-
- model = e_select_names_text_model_new (section->model);
- e_list_append (manager->entries, entry);
- g_free(entry);
-
- comp = e_select_names_completion_new (NULL, section->model); /* NULL == use local addressbook */
- e_entry_enable_completion_full (eentry, comp, 50, completion_handler);
-
- gtk_object_set(GTK_OBJECT(eentry),
- "model", model,
- "editable", TRUE,
- "use_ellipsis", TRUE,
- "allow_newlines", FALSE,
- NULL);
- gtk_signal_connect(GTK_OBJECT(eentry), "destroy",
- GTK_SIGNAL_FUNC(entry_destroyed), manager);
- gtk_object_ref(GTK_OBJECT(manager));
- return GTK_WIDGET(eentry);
- }
- }
- return NULL;
-}
-
-static void
-e_select_names_clicked(ESelectNames *dialog, gint button, ESelectNamesManager *manager)
-{
- switch(button) {
- case 0: {
- EList *list = manager->sections;
- EIterator *iterator = e_list_get_iterator(list);
- for (e_iterator_reset(iterator); e_iterator_is_valid(iterator); e_iterator_next(iterator)) {
- ESelectNamesManagerSection *section = (void *) e_iterator_get(iterator);
- ESelectNamesModel *source = e_select_names_get_source(dialog, section->id);
- if (section->model)
- gtk_object_unref(GTK_OBJECT(section->model));
- section->model = source;
- /* Don't ref because get_source returns a conceptual ref_count of 1. */
- }
- gtk_object_unref(GTK_OBJECT(iterator));
-
- list = manager->entries;
- iterator = e_list_get_iterator(list);
- for (e_iterator_reset(iterator); e_iterator_is_valid(iterator); e_iterator_next(iterator)) {
- ESelectNamesManagerEntry *entry = (void *) e_iterator_get(iterator);
- ESelectNamesModel *source = e_select_names_get_source(dialog, entry->id);
- if (source) {
- ETextModel *model = e_select_names_text_model_new(source);
- if (model) {
- gtk_object_set(GTK_OBJECT(entry->entry),
- "model", model,
- NULL);
- gtk_object_unref(GTK_OBJECT(source));
- }
- gtk_object_unref(GTK_OBJECT(model));
- }
- }
- gtk_object_unref(GTK_OBJECT(iterator));
- break;
- }
- }
- gnome_dialog_close(GNOME_DIALOG(dialog));
-}
-
-void
-e_select_names_manager_activate_dialog (ESelectNamesManager *manager,
- const char *id)
-{
- EIterator *iterator;
-
- if (manager->names) {
- g_assert (GTK_WIDGET_REALIZED (GTK_WIDGET (manager->names)));
- e_select_names_set_default(manager->names, id);
- gdk_window_show (GTK_WIDGET (manager->names)->window);
- gdk_window_raise (GTK_WIDGET (manager->names)->window);
- } else {
- manager->names = E_SELECT_NAMES (e_select_names_new ());
-
- iterator = e_list_get_iterator(manager->sections);
- for (e_iterator_reset(iterator); e_iterator_is_valid(iterator); e_iterator_next(iterator)) {
- const ESelectNamesManagerSection *section = e_iterator_get(iterator);
- ESelectNamesModel *newmodel = e_select_names_model_duplicate(section->model);
- e_select_names_add_section(manager->names, section->id, section->title, newmodel);
- gtk_object_unref(GTK_OBJECT(newmodel));
- }
- e_select_names_set_default(manager->names, id);
- gtk_signal_connect(GTK_OBJECT(manager->names), "clicked",
- GTK_SIGNAL_FUNC(e_select_names_clicked), manager);
- gtk_signal_connect(GTK_OBJECT(manager->names), "destroy",
- GTK_SIGNAL_FUNC(gtk_widget_destroyed),
- &manager->names);
- gtk_widget_show(GTK_WIDGET(manager->names));
- }
-}
-
-#if 0
-/* Of type ECard */
-EList *
-e_select_names_manager_get_cards (ESelectNamesManager *manager,
- const char *id)
-{
- EIterator *iterator;
- iterator = e_list_get_iterator(manager->sections);
- for (e_iterator_reset(iterator); e_iterator_is_valid(iterator); e_iterator_next(iterator)) {
- const ESelectNamesManagerSection *section = e_iterator_get(iterator);
- if (!strcmp(section->id, id)) {
- return e_select_names_model_get_cards(section->model);
- }
- }
- return NULL;
-}
-#endif
diff --git a/addressbook/gui/component/select-names/e-select-names-manager.h b/addressbook/gui/component/select-names/e-select-names-manager.h
deleted file mode 100644
index 4c177d1685..0000000000
--- a/addressbook/gui/component/select-names/e-select-names-manager.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Chris Lahey <clahey@helixcode.com>
- *
- * Copyright (C) 2000 Helix Code, Inc.
- */
-
-#ifndef __E_SELECT_NAMES_MANAGER_H__
-#define __E_SELECT_NAMES_MANAGER_H__
-
-#include <stdio.h>
-#include <time.h>
-#include <gtk/gtkobject.h>
-#include <e-util/e-list.h>
-#include "e-select-names.h"
-
-#define E_TYPE_SELECT_NAMES_MANAGER (e_select_names_manager_get_type ())
-#define E_SELECT_NAMES_MANAGER(obj) (GTK_CHECK_CAST ((obj), E_TYPE_SELECT_NAMES_MANAGER, ESelectNamesManager))
-#define E_SELECT_NAMES_MANAGER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_SELECT_NAMES_MANAGER, ESelectNamesManagerClass))
-#define E_IS_SELECT_NAMES_MANAGER(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_SELECT_NAMES_MANAGER))
-#define E_IS_SELECT_NAMES_MANAGER_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), E_TYPE_SELECT_NAMES_MANAGER))
-
-typedef struct _ESelectNamesManager ESelectNamesManager;
-typedef struct _ESelectNamesManagerClass ESelectNamesManagerClass;
-
-struct _ESelectNamesManager {
- GtkObject object;
-
- EList *sections;
- EList *entries;
-
- ESelectNames *names;
-};
-
-struct _ESelectNamesManagerClass {
- GtkObjectClass parent_class;
-};
-
-ESelectNamesManager *e_select_names_manager_new (void);
-void e_select_names_manager_add_section (ESelectNamesManager *manager,
- const char *id,
- const char *title);
-ESelectNamesModel *e_select_names_manager_get_source (ESelectNamesManager *manager,
- const char *id);
-GtkWidget *e_select_names_manager_create_entry (ESelectNamesManager *manager,
- const char *id);
-void e_select_names_manager_activate_dialog (ESelectNamesManager *manager,
- const char *id);
-
-#if 0
-/* Of type ECard */
-EList *e_select_names_manager_get_cards (ESelectNamesManager *manager,
- const char *id);
-#endif
-
-/* Standard Gtk function */
-GtkType e_select_names_manager_get_type (void);
-
-#endif /* ! __E_SELECT_NAMES_MANAGER_H__ */
diff --git a/addressbook/gui/component/select-names/e-select-names-model.c b/addressbook/gui/component/select-names/e-select-names-model.c
deleted file mode 100644
index 59d7bc7c24..0000000000
--- a/addressbook/gui/component/select-names/e-select-names-model.c
+++ /dev/null
@@ -1,546 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Chris Lahey <clahey@ximian.com>
- * Jon Trowbidge <trow@ximian.com>
- *
- * Copyright (C) 2000, 2001 Ximian, Inc.
- */
-
-#include <config.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <gtk/gtkmarshal.h>
-#include <gtk/gtksignal.h>
-
-#include <gal/util/e-util.h>
-
-#include "e-select-names-model.h"
-#include "addressbook/backend/ebook/e-card-simple.h"
-
-#define SEPARATOR ", "
-#define SEPLEN 2
-
-
-enum {
- E_SELECT_NAMES_MODEL_CHANGED,
- E_SELECT_NAMES_MODEL_RESIZED,
- E_SELECT_NAMES_MODEL_LAST_SIGNAL
-};
-
-static guint e_select_names_model_signals[E_SELECT_NAMES_MODEL_LAST_SIGNAL] = { 0 };
-
-/* Object argument IDs */
-enum {
- ARG_0,
- ARG_CARD,
-};
-
-enum {
- NAME_DATA_BLANK,
- NAME_DATA_CARD,
- NAME_DATA_STRING
-};
-
-enum {
- NAME_FORMAT_GIVEN_FIRST,
- NAME_FORMAT_FAMILY_FIRST
-};
-
-struct _ESelectNamesModelPrivate {
- gchar *id;
- gchar *title;
-
- GList *data; /* of EDestination */
- gchar *text;
- gchar *addr_text;
-};
-
-
-static void e_select_names_model_init (ESelectNamesModel *model);
-static void e_select_names_model_class_init (ESelectNamesModelClass *klass);
-
-static void e_select_names_model_destroy (GtkObject *object);
-static void e_select_names_model_set_arg (GtkObject *object, GtkArg *arg, guint arg_id);
-static void e_select_names_model_get_arg (GtkObject *object, GtkArg *arg, guint arg_id);
-
-GtkType
-e_select_names_model_get_type (void)
-{
- static GtkType model_type = 0;
-
- if (!model_type) {
- GtkTypeInfo model_info = {
- "ESelectNamesModel",
- sizeof (ESelectNamesModel),
- sizeof (ESelectNamesModelClass),
- (GtkClassInitFunc) e_select_names_model_class_init,
- (GtkObjectInitFunc) e_select_names_model_init,
- NULL, /* reserved_1 */
- NULL, /* reserved_2 */
- (GtkClassInitFunc) NULL
- };
-
- model_type = gtk_type_unique (gtk_object_get_type (), &model_info);
- }
-
- return model_type;
-}
-
-typedef void (*GtkSignal_NONE__INT_INT_INT) (GtkObject *object, gint arg1, gint arg2, gint arg3, gpointer user_data);
-static void
-local_gtk_marshal_NONE__INT_INT_INT (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args)
-{
- GtkSignal_NONE__INT_INT_INT rfunc;
- rfunc = (GtkSignal_NONE__INT_INT_INT) func;
- (* rfunc) (object,
- GTK_VALUE_INT(args[0]),
- GTK_VALUE_INT(args[1]),
- GTK_VALUE_INT(args[2]),
- func_data);
-}
-
-
-static void
-e_select_names_model_class_init (ESelectNamesModelClass *klass)
-{
- GtkObjectClass *object_class;
-
- object_class = GTK_OBJECT_CLASS(klass);
-
- e_select_names_model_signals[E_SELECT_NAMES_MODEL_CHANGED] =
- gtk_signal_new ("changed",
- GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (ESelectNamesModelClass, changed),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
-
- e_select_names_model_signals[E_SELECT_NAMES_MODEL_RESIZED] =
- gtk_signal_new ("resized",
- GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (ESelectNamesModelClass, resized),
- local_gtk_marshal_NONE__INT_INT_INT,
- GTK_TYPE_NONE, 3, GTK_TYPE_INT, GTK_TYPE_INT, GTK_TYPE_INT);
-
- gtk_object_class_add_signals (object_class, e_select_names_model_signals, E_SELECT_NAMES_MODEL_LAST_SIGNAL);
-
- gtk_object_add_arg_type ("ESelectNamesModel::card",
- GTK_TYPE_OBJECT, GTK_ARG_READWRITE, ARG_CARD);
-
- klass->changed = NULL;
-
- object_class->destroy = e_select_names_model_destroy;
- object_class->get_arg = e_select_names_model_get_arg;
- object_class->set_arg = e_select_names_model_set_arg;
-}
-
-/**
- * e_select_names_model_init:
- */
-static void
-e_select_names_model_init (ESelectNamesModel *model)
-{
- model->priv = g_new0 (struct _ESelectNamesModelPrivate, 1);
-}
-
-static void
-e_select_names_model_destroy (GtkObject *object)
-{
- ESelectNamesModel *model = E_SELECT_NAMES_MODEL (object);
-
- g_free (model->priv->title);
- g_free (model->priv->id);
-
- g_list_foreach (model->priv->data, (GFunc) gtk_object_unref, NULL);
- g_list_free (model->priv->data);
-
- g_free (model->priv->text);
- g_free (model->priv->addr_text);
-
- g_free (model->priv);
-
-}
-
-
-/* Set_arg handler for the model */
-static void
-e_select_names_model_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
-{
- ESelectNamesModel *model;
-
- model = E_SELECT_NAMES_MODEL (object);
-
- switch (arg_id) {
- case ARG_CARD:
- break;
- default:
- return;
- }
-}
-
-/* Get_arg handler for the model */
-static void
-e_select_names_model_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
-{
- ESelectNamesModel *model;
-
- model = E_SELECT_NAMES_MODEL (object);
-
- switch (arg_id) {
- case ARG_CARD:
- break;
- default:
- arg->type = GTK_TYPE_INVALID;
- break;
- }
-}
-
-/** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **/
-
-ESelectNamesModel *
-e_select_names_model_new (void)
-{
- ESelectNamesModel *model;
- model = E_SELECT_NAMES_MODEL (gtk_type_new (e_select_names_model_get_type ()));
- return model;
-}
-
-ESelectNamesModel *
-e_select_names_model_duplicate (ESelectNamesModel *old)
-{
- ESelectNamesModel *model = E_SELECT_NAMES_MODEL(gtk_type_new(e_select_names_model_get_type()));
- GList *iter;
-
- model->priv->id = g_strdup (old->priv->id);
- model->priv->title = g_strdup (old->priv->title);
-
- for (iter = old->priv->data; iter != NULL; iter = g_list_next (iter)) {
- EDestination *dup = e_destination_copy (E_DESTINATION (iter->data));
- model->priv->data = g_list_append (model->priv->data, dup);
- }
-
- return model;
-}
-
-const gchar *
-e_select_names_model_get_textification (ESelectNamesModel *model)
-{
- g_return_val_if_fail (model != NULL, NULL);
- g_return_val_if_fail (E_IS_SELECT_NAMES_MODEL (model), NULL);
-
- if (model->priv->text == NULL) {
-
- if (model->priv->data == NULL) {
-
- model->priv->text = g_strdup ("");
-
- } else {
- gchar **strv = g_new0 (gchar *, g_list_length (model->priv->data)+1);
- gint i = 0;
- GList *iter = model->priv->data;
-
- while (iter) {
- EDestination *dest = E_DESTINATION (iter->data);
- strv[i] = (gchar *) e_destination_get_string (dest);
- if (strv[i] == NULL)
- strv[i] = "";
- ++i;
- iter = g_list_next (iter);
- }
-
- model->priv->text = g_strjoinv (SEPARATOR, strv);
-
- g_free (strv);
- }
- }
-
- return model->priv->text;
-}
-
-const gchar *
-e_select_names_model_get_address_text (ESelectNamesModel *model)
-{
- g_return_val_if_fail (model != NULL, NULL);
- g_return_val_if_fail (E_IS_SELECT_NAMES_MODEL (model), NULL);
-
- if (model->priv->addr_text == NULL) {
-
- if (model->priv->data == NULL) {
-
- model->priv->addr_text = g_strdup ("");
-
- } else {
- gchar **strv = g_new0 (gchar *, g_list_length (model->priv->data)+1);
- gint i = 0;
- GList *iter = model->priv->data;
-
- while (iter) {
- EDestination *dest = E_DESTINATION (iter->data);
- strv[i] = (gchar *) e_destination_get_email_verbose (dest);
- if (strv[i])
- ++i;
- iter = g_list_next (iter);
- }
-
- model->priv->addr_text = g_strjoinv (SEPARATOR, strv);
-
- g_free (strv);
- }
- }
-
- return model->priv->addr_text;
-}
-
-gint
-e_select_names_model_count (ESelectNamesModel *model)
-{
- g_return_val_if_fail (model != NULL, 0);
- g_return_val_if_fail (E_IS_SELECT_NAMES_MODEL (model), 0);
-
- return g_list_length (model->priv->data);
-}
-
-const EDestination *
-e_select_names_model_get_destination (ESelectNamesModel *model, gint index)
-{
- g_return_val_if_fail (model != NULL, NULL);
- g_return_val_if_fail (E_IS_SELECT_NAMES_MODEL (model), NULL);
- g_return_val_if_fail (0 <= index, NULL);
- g_return_val_if_fail (index < g_list_length (model->priv->data), NULL);
-
- return E_DESTINATION (g_list_nth_data (model->priv->data, index));
-}
-
-ECard *
-e_select_names_model_get_card (ESelectNamesModel *model, gint index)
-{
- const EDestination *dest;
-
- g_return_val_if_fail (model && E_IS_SELECT_NAMES_MODEL (model), NULL);
- g_return_val_if_fail (0 <= index, NULL);
- g_return_val_if_fail (index < g_list_length (model->priv->data), NULL);
-
- dest = e_select_names_model_get_destination (model, index);
- return dest ? e_destination_get_card (dest) : NULL;
-
-}
-
-const gchar *
-e_select_names_model_get_string (ESelectNamesModel *model, gint index)
-{
- const EDestination *dest;
-
- g_return_val_if_fail (model && E_IS_SELECT_NAMES_MODEL (model), NULL);
- g_return_val_if_fail (0 <= index, NULL);
- g_return_val_if_fail (index < g_list_length (model->priv->data), NULL);
-
- dest = e_select_names_model_get_destination (model, index);
-
- return dest ? e_destination_get_string (dest) : "";
-}
-
-static void
-e_select_names_model_changed (ESelectNamesModel *model)
-{
- g_free (model->priv->text);
- model->priv->text = NULL;
-
- g_free (model->priv->addr_text);
- model->priv->addr_text = NULL;
-
- gtk_signal_emit(GTK_OBJECT(model), e_select_names_model_signals[E_SELECT_NAMES_MODEL_CHANGED]);
-}
-
-void
-e_select_names_model_insert (ESelectNamesModel *model, gint index, EDestination *dest)
-{
- g_return_if_fail (model != NULL);
- g_return_if_fail (E_IS_SELECT_NAMES_MODEL (model));
- g_return_if_fail (0 <= index && index <= g_list_length (model->priv->data));
- g_return_if_fail (dest && E_IS_DESTINATION (dest));
-
- model->priv->data = g_list_insert (model->priv->data, dest, index);
-
- gtk_object_ref (GTK_OBJECT (dest));
- gtk_object_sink (GTK_OBJECT (dest));
-
- e_select_names_model_changed (model);
-}
-
-void
-e_select_names_model_replace (ESelectNamesModel *model, gint index, EDestination *dest)
-{
- GList *node;
- gint old_strlen=0, new_strlen=0;
-
- g_return_if_fail (model != NULL);
- g_return_if_fail (E_IS_SELECT_NAMES_MODEL (model));
- g_return_if_fail (model->priv->data == NULL || (0 <= index && index < g_list_length (model->priv->data)));
- g_return_if_fail (dest && E_IS_DESTINATION (dest));
-
- new_strlen = e_destination_get_strlen (dest);
-
- if (model->priv->data == NULL) {
-
- model->priv->data = g_list_append (model->priv->data, dest);
- gtk_object_ref (GTK_OBJECT (dest));
- gtk_object_sink (GTK_OBJECT (dest));
-
- } else {
-
- node = g_list_nth (model->priv->data, index);
-
- if (node->data != dest) {
- old_strlen = e_destination_get_strlen (E_DESTINATION (node->data));
-
- gtk_object_unref (GTK_OBJECT (node->data));
-
- node->data = dest;
- gtk_object_ref (GTK_OBJECT (dest));
- gtk_object_sink (GTK_OBJECT (dest));
- }
- }
-
- e_select_names_model_changed (model);
-
- gtk_signal_emit (GTK_OBJECT (model), e_select_names_model_signals[E_SELECT_NAMES_MODEL_RESIZED],
- index, old_strlen, new_strlen);
-}
-
-void
-e_select_names_model_delete (ESelectNamesModel *model, gint index)
-{
- GList *node;
-
- g_return_if_fail (model != NULL);
- g_return_if_fail (E_IS_SELECT_NAMES_MODEL (model));
- g_return_if_fail (0 <= index && index < g_list_length (model->priv->data));
-
- node = g_list_nth (model->priv->data, index);
- gtk_object_unref (GTK_OBJECT (node->data));
-
- model->priv->data = g_list_remove_link (model->priv->data, node);
- g_list_free_1 (node);
-
- e_select_names_model_changed (model);
-}
-
-void
-e_select_names_model_clean (ESelectNamesModel *model)
-{
- GList *iter, *next;
- gboolean changed = FALSE;
-
- g_return_if_fail (model != NULL && E_IS_SELECT_NAMES_MODEL (model));
-
- iter = model->priv->data;
-
- while (iter) {
- EDestination *dest;
-
- next = g_list_next (iter);
- dest = iter->data ? E_DESTINATION (iter->data) : NULL;
-
- if (dest == NULL || e_destination_is_empty (dest)) {
- if (dest)
- gtk_object_unref (GTK_OBJECT (dest));
- model->priv->data = g_list_remove_link (model->priv->data, iter);
- g_list_free_1 (iter);
- changed = TRUE;
- }
-
- iter = next;
- }
-
- if (changed)
- e_select_names_model_changed (model);
-}
-
-void
-e_select_names_model_delete_all (ESelectNamesModel *model)
-{
- g_return_if_fail (model != NULL && E_IS_SELECT_NAMES_MODEL (model));
-
- g_list_foreach (model->priv->data, (GFunc) gtk_object_unref, NULL);
- g_list_free (model->priv->data);
- model->priv->data = NULL;
-
- e_select_names_model_changed (model);
-}
-
-void
-e_select_names_model_name_pos (ESelectNamesModel *model, gint index, gint *pos, gint *length)
-{
- gint rp = 0, i, len = 0;
- GList *iter;
-
- g_return_if_fail (model != NULL);
- g_return_if_fail (E_IS_SELECT_NAMES_MODEL (model));
-
- i = 0;
- iter = model->priv->data;
- while (iter && i <= index) {
- rp += len + (i > 0 ? SEPLEN : 0);
- len = e_destination_get_strlen (E_DESTINATION (iter->data));
- ++i;
- iter = g_list_next (iter);
- }
-
- if (i <= index) {
- rp = -1;
- len = 0;
- }
-
- if (pos)
- *pos = rp;
- if (length)
- *length = len;
-}
-
-void
-e_select_names_model_text_pos (ESelectNamesModel *model, gint pos, gint *index, gint *start_pos, gint *length)
-{
- GList *iter;
- gint len = 0, i = 0, sp = 0, adj = 0;
-
- g_return_if_fail (model != NULL);
- g_return_if_fail (E_IS_SELECT_NAMES_MODEL (model));
-
- iter = model->priv->data;
-
- while (iter != NULL) {
- len = e_destination_get_strlen (E_DESTINATION (iter->data));
-
- if (sp <= pos && pos <= sp + len + adj)
- break;
-
- sp += len + adj + 1;
- adj = 1;
- ++i;
-
- iter = g_list_next (iter);
- }
-
- if (i != 0)
- ++sp; /* skip past "magic space" */
-
- if (iter == NULL) {
- i = -1;
- sp = -1;
- len = 0;
- }
-
- if (index)
- *index = i;
- if (start_pos)
- *start_pos = sp;
- if (length)
- *length = len;
-}
diff --git a/addressbook/gui/component/select-names/e-select-names-model.h b/addressbook/gui/component/select-names/e-select-names-model.h
deleted file mode 100644
index ab7477762c..0000000000
--- a/addressbook/gui/component/select-names/e-select-names-model.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Authors:
- * Chris Lahey <clahey@ximian.com>
- * Jon Trowbridge <trow@ximian.com>
- *
- * Copyright (C) 2000, 2001 Ximian, Inc.
- */
-
-#ifndef __E_SELECT_NAMES_MODEL_H__
-#define __E_SELECT_NAMES_MODEL_H__
-
-#include <time.h>
-#include <gtk/gtkobject.h>
-#include <stdio.h>
-#include <e-util/e-list.h>
-#include <addressbook/backend/ebook/e-card.h>
-#include <addressbook/backend/ebook/e-destination.h>
-
-#define E_TYPE_SELECT_NAMES_MODEL (e_select_names_model_get_type ())
-#define E_SELECT_NAMES_MODEL(obj) (GTK_CHECK_CAST ((obj), E_TYPE_SELECT_NAMES_MODEL, ESelectNamesModel))
-#define E_SELECT_NAMES_MODEL_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_SELECT_NAMES_MODEL, ESelectNamesModelClass))
-#define E_IS_SELECT_NAMES_MODEL(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_SELECT_NAMES_MODEL))
-#define E_IS_SELECT_NAMES_MODEL_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), E_TYPE_SELECT_NAMES_MODEL))
-
-typedef struct _ESelectNamesModel ESelectNamesModel;
-typedef struct _ESelectNamesModelClass ESelectNamesModelClass;
-struct _ESelectNamesModelPrivate;
-
-struct _ESelectNamesModel {
- GtkObject object;
-
- struct _ESelectNamesModelPrivate *priv;
-};
-
-struct _ESelectNamesModelClass {
- GtkObjectClass parent_class;
-
- void (*changed) (ESelectNamesModel *model);
- void (*resized) (ESelectNamesModel *model, gint index, gint old_len, gint new_len);
-};
-
-GtkType e_select_names_model_get_type (void);
-
-ESelectNamesModel *e_select_names_model_new (void);
-ESelectNamesModel *e_select_names_model_duplicate (ESelectNamesModel *old);
-
-const gchar *e_select_names_model_get_textification (ESelectNamesModel *model);
-const gchar *e_select_names_model_get_address_text (ESelectNamesModel *model);
-
-gint e_select_names_model_count (ESelectNamesModel *model);
-const EDestination *e_select_names_model_get_destination (ESelectNamesModel *model, gint index);
-ECard *e_select_names_model_get_card (ESelectNamesModel *model, gint index);
-const gchar *e_select_names_model_get_string (ESelectNamesModel *model, gint index);
-
-void e_select_names_model_insert (ESelectNamesModel *model, gint index, EDestination *dest);
-void e_select_names_model_replace (ESelectNamesModel *model, gint index, EDestination *dest);
-void e_select_names_model_delete (ESelectNamesModel *model, gint index);
-void e_select_names_model_delete_all (ESelectNamesModel *model);
-
-void e_select_names_model_clean (ESelectNamesModel *model);
-
-void e_select_names_model_name_pos (ESelectNamesModel *model, gint index, gint *pos, gint *length);
-void e_select_names_model_text_pos (ESelectNamesModel *model, gint pos, gint *index, gint *start_pos, gint *length);
-
-#endif /* ! __E_SELECT_NAMES_MODEL_H__ */
diff --git a/addressbook/gui/component/select-names/e-select-names-popup.c b/addressbook/gui/component/select-names/e-select-names-popup.c
deleted file mode 100644
index f6164f0022..0000000000
--- a/addressbook/gui/component/select-names/e-select-names-popup.c
+++ /dev/null
@@ -1,325 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * e-select-names-popup.c
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Developed by Jon Trowbridge <trow@ximian.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 <stdio.h>
-#include <string.h>
-
-#include <glib.h>
-#include <gtk/gtkcheckmenuitem.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-app.h>
-#include <libgnomeui/gnome-app-helper.h>
-#include <libgnomeui/gnome-popup-menu.h>
-
-#include <addressbook/contact-editor/e-contact-quick-add.h>
-#include "e-select-names-popup.h"
-
-typedef struct _PopupInfo PopupInfo;
-struct _PopupInfo {
- ESelectNamesModel *model;
- const EDestination *dest;
- gint pos;
- gint index;
-};
-
-static PopupInfo *
-popup_info_new (ESelectNamesModel *model, const EDestination *dest, gint pos, gint index)
-{
- PopupInfo *info = g_new0 (PopupInfo, 1);
- info->model = model;
- info->dest = dest;
- info->pos = pos;
- info->index = index;
-
- if (model)
- gtk_object_ref (GTK_OBJECT (model));
-
- if (dest)
- gtk_object_ref (GTK_OBJECT (dest));
-
- return info;
-}
-
-static void
-popup_info_free (PopupInfo *info)
-{
- if (info) {
-
- if (info->model)
- gtk_object_unref (GTK_OBJECT (info->model));
-
- if (info->dest)
- gtk_object_unref (GTK_OBJECT (info->dest));
-
- g_free (info);
- }
-}
-
-static void
-popup_info_cleanup (GtkWidget *w, gpointer info)
-{
- popup_info_free ((PopupInfo *) info);
-}
-
-static void
-do_nothing (gpointer foo)
-{
-
-}
-
-static void
-change_email_num_cb (GtkWidget *w, gpointer user_data)
-{
- PopupInfo *info = (PopupInfo *) user_data;
- gint n;
- EDestination *dest;
-
- if (info == NULL)
- return;
-
- if (! GTK_CHECK_MENU_ITEM (w)->active)
- return;
-
- n = GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (w), "number"));
-
- if (n != e_destination_get_email_num (info->dest)) {
- dest = e_destination_new ();
- e_destination_set_card (dest, e_destination_get_card (info->dest), n);
- e_select_names_model_replace (info->model, info->index, dest);
-
- }
-}
-
-static void
-remove_recipient_cb (GtkWidget *w, gpointer user_data)
-{
- PopupInfo *info = (PopupInfo *) user_data;
- e_select_names_model_delete (info->model, info->index);
-}
-
-static void
-add_remove_recipient (GnomeUIInfo *uiinfo, PopupInfo *info)
-{
- uiinfo->type = GNOME_APP_UI_ITEM;
- uiinfo->label = _("Remove");
- uiinfo->moreinfo = remove_recipient_cb;
-}
-
-static void
-remove_all_recipients_cb (GtkWidget *w, gpointer user_data)
-{
- PopupInfo *info = (PopupInfo *) user_data;
- e_select_names_model_delete_all (info->model);
-}
-
-static void
-add_remove_all_recipients (GnomeUIInfo *uiinfo, PopupInfo *info)
-{
- uiinfo->type = GNOME_APP_UI_ITEM;
- uiinfo->label = _("Remove All");
- uiinfo->moreinfo = remove_all_recipients_cb;
-}
-
-#define ARBITRARY_UIINFO_LIMIT 64
-static GtkWidget *
-popup_menu_card (PopupInfo *info)
-{
- GnomeUIInfo uiinfo[ARBITRARY_UIINFO_LIMIT];
- GnomeUIInfo radioinfo[ARBITRARY_UIINFO_LIMIT];
- gboolean using_radio = FALSE;
- ECard *card;
- gint i=0;
- GtkWidget *pop;
- EIterator *iterator;
- gchar *name_str;
-
- /*
- * Build up our GnomeUIInfo array.
- */
-
- memset (uiinfo, 0, sizeof (uiinfo));
- memset (radioinfo, 0, sizeof (radioinfo));
-
- card = e_destination_get_card (info->dest);
- name_str = e_card_name_to_string (card->name);
-
- uiinfo[i].type = GNOME_APP_UI_ITEM;
- uiinfo[i].label = name_str;
- ++i;
-
- uiinfo[i].type = GNOME_APP_UI_SEPARATOR;
- ++i;
-
- if (e_list_length (card->email) > 1) {
- gint j = 0;
-
- using_radio = TRUE;
-
- iterator = e_list_get_iterator (card->email);
- for (e_iterator_reset (iterator); e_iterator_is_valid (iterator); e_iterator_next (iterator)) {
-
- radioinfo[j].type = GNOME_APP_UI_ITEM;
- radioinfo[j].label = (gchar *)e_iterator_get (iterator);
- radioinfo[j].moreinfo = change_email_num_cb;
- ++j;
- }
-
- radioinfo[j].type = GNOME_APP_UI_ENDOFINFO;
-
- uiinfo[i].type = GNOME_APP_UI_RADIOITEMS;
- uiinfo[i].moreinfo = radioinfo;
- ++i;
-
- } else {
- uiinfo[i].type = GNOME_APP_UI_ITEM;
- uiinfo[i].label = (gchar *) e_destination_get_email (info->dest);
- ++i;
- }
-
- uiinfo[i].type = GNOME_APP_UI_SEPARATOR;
- ++i;
-
- uiinfo[i].type = GNOME_APP_UI_ITEM;
- uiinfo[i].label = N_("Edit Contact Info");
- uiinfo[i].moreinfo = do_nothing;
- ++i;
-
- add_remove_recipient (&(uiinfo[i]), info);
- ++i;
-
- add_remove_all_recipients (&(uiinfo[i]), info);
- ++i;
-
- uiinfo[i].type = GNOME_APP_UI_ENDOFINFO;
-
- /*
- * Now do something with it...
- */
-
- pop = gnome_popup_menu_new (uiinfo);
- g_free (name_str);
-
- if (using_radio) {
- gint n = e_destination_get_email_num (info->dest);
- gint j;
- for (j=0; radioinfo[j].type != GNOME_APP_UI_ENDOFINFO; ++j) {
- gtk_object_set_data (GTK_OBJECT (radioinfo[j].widget), "number", GINT_TO_POINTER (j));
- if (j == n)
- gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (radioinfo[n].widget), TRUE);
- }
- }
-
- return pop;
-}
-
-static void
-quick_add_cb (GtkWidget *w, gpointer user_data)
-{
- PopupInfo *info = (PopupInfo *) user_data;
- e_contact_quick_add_free_form (e_destination_get_string (info->dest), NULL, NULL);
-}
-
-static GtkWidget *
-popup_menu_nocard (PopupInfo *info)
-{
- GnomeUIInfo uiinfo[ARBITRARY_UIINFO_LIMIT];
- gint i=0;
- GtkWidget *pop;
- const gchar *str;
-
- memset (uiinfo, 0, sizeof (uiinfo));
-
- str = e_destination_get_string (info->dest);
-
- uiinfo[i].type = GNOME_APP_UI_ITEM;
- uiinfo[i].label = (gchar *) str;
- ++i;
-
- uiinfo[i].type = GNOME_APP_UI_SEPARATOR;
- ++i;
-
- uiinfo[i].type = GNOME_APP_UI_ITEM;
- uiinfo[i].label = _("Add to Contacts");
- uiinfo[i].moreinfo = quick_add_cb;
- ++i;
-
- add_remove_recipient (&(uiinfo[i]), info);
- ++i;
-
- add_remove_all_recipients (&(uiinfo[i]), info);
- ++i;
-
- uiinfo[i].type = GNOME_APP_UI_ENDOFINFO;
-
- pop = gnome_popup_menu_new (uiinfo);
-
- return pop;
-}
-
-
-void
-e_select_names_popup (ESelectNamesModel *model, GdkEventButton *ev, gint pos)
-{
- GtkWidget *popup;
- PopupInfo *info;
- const EDestination *dest;
- ECard *card;
- gint index;
-
- g_return_if_fail (model && E_IS_SELECT_NAMES_MODEL (model));
- g_return_if_fail (ev);
- g_return_if_fail (0 <= pos);
-
- e_select_names_model_text_pos (model, pos, &index, NULL, NULL);
- if (index < 0 || index >= e_select_names_model_count (model))
- return;
-
- dest = e_select_names_model_get_destination (model, index);
- card = e_destination_get_card (dest);
-
- info = popup_info_new (model, dest, pos, index);
-
- popup = card ? popup_menu_card (info) : popup_menu_nocard (info);
-
- if (popup) {
- /* Clean up our info item after we've made our selection. */
- gtk_signal_connect (GTK_OBJECT (popup),
- "selection-done",
- GTK_SIGNAL_FUNC (popup_info_cleanup),
- info);
-
- gnome_popup_menu_do_popup (popup, NULL, NULL, ev, info);
-
- } else {
-
- popup_info_free (info);
-
- }
-}
diff --git a/addressbook/gui/component/select-names/e-select-names-popup.h b/addressbook/gui/component/select-names/e-select-names-popup.h
deleted file mode 100644
index cc93534181..0000000000
--- a/addressbook/gui/component/select-names/e-select-names-popup.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * e-select-names-popup.h
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Developed by Jon Trowbridge <trow@ximian.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 __E_SELECT_NAMES_POPUP_H__
-#define __E_SELECT_NAMES_POPUP_H__
-
-#include "e-select-names-model.h"
-
-void e_select_names_popup (ESelectNamesModel *model, GdkEventButton *ev, gint pos);
-
-#endif /* __E_SELECT_NAMES_POPUP_H__ */
-
diff --git a/addressbook/gui/component/select-names/e-select-names-table-model.c b/addressbook/gui/component/select-names/e-select-names-table-model.c
deleted file mode 100644
index f0dc52bad7..0000000000
--- a/addressbook/gui/component/select-names/e-select-names-table-model.c
+++ /dev/null
@@ -1,344 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Chris Lahey <clahey@helixcode.com>
- *
- * Copyright (C) 2000 Helix Code, Inc.
- */
-
-#include <config.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <gtk/gtksignal.h>
-#include <gal/util/e-util.h>
-
-#include "e-select-names-table-model.h"
-#include "addressbook/backend/ebook/e-card-simple.h"
-
-/* Object argument IDs */
-enum {
- ARG_0,
- ARG_SOURCE,
-};
-
-static void e_select_names_table_model_init (ESelectNamesTableModel *model);
-static void e_select_names_table_model_class_init (ESelectNamesTableModelClass *klass);
-
-static void e_select_names_table_model_destroy (GtkObject *object);
-static void e_select_names_table_model_set_arg (GtkObject *object, GtkArg *arg, guint arg_id);
-static void e_select_names_table_model_get_arg (GtkObject *object, GtkArg *arg, guint arg_id);
-
-static void e_select_names_table_model_model_changed (ESelectNamesModel *source,
- ESelectNamesTableModel *model);
-
-
-static void
-e_select_names_table_model_add_source (ESelectNamesTableModel *model,
- ESelectNamesModel *source)
-{
- model->source = source;
- if (model->source)
- gtk_object_ref(GTK_OBJECT(model->source));
- model->source_changed_id = gtk_signal_connect(GTK_OBJECT(model->source), "changed",
- GTK_SIGNAL_FUNC(e_select_names_table_model_model_changed),
- model);
-}
-
-static void
-e_select_names_table_model_drop_source (ESelectNamesTableModel *model)
-{
- if (model->source_changed_id)
- gtk_signal_disconnect(GTK_OBJECT(model->source), model->source_changed_id);
- if (model->source)
- gtk_object_unref(GTK_OBJECT(model->source));
- model->source = NULL;
- model->source_changed_id = 0;
-}
-
-/**
- * e_select_names_table_model_get_type:
- * @void:
- *
- * Registers the &ESelectNamesTableModel class if necessary, and returns the type ID
- * associated to it.
- *
- * Return value: The type ID of the &ESelectNamesTableModel class.
- **/
-GtkType
-e_select_names_table_model_get_type (void)
-{
- static GtkType model_type = 0;
-
- if (!model_type) {
- GtkTypeInfo model_info = {
- "ESelectNamesTableModel",
- sizeof (ESelectNamesTableModel),
- sizeof (ESelectNamesTableModelClass),
- (GtkClassInitFunc) e_select_names_table_model_class_init,
- (GtkObjectInitFunc) e_select_names_table_model_init,
- NULL, /* reserved_1 */
- NULL, /* reserved_2 */
- (GtkClassInitFunc) NULL
- };
-
- model_type = gtk_type_unique (e_table_model_get_type (), &model_info);
- }
-
- return model_type;
-}
-
-/**
- * e_select_names_table_model_new:
- * @VCard: a string in vCard format
- *
- * Returns: a new #ESelectNamesTableModel that wraps the @VCard.
- */
-ETableModel *
-e_select_names_table_model_new (ESelectNamesModel *source)
-{
- ETableModel *model = E_TABLE_MODEL(gtk_type_new(e_select_names_table_model_get_type()));
- gtk_object_set(GTK_OBJECT(model),
- "source", source,
- NULL);
- return model;
-}
-
-static void
-fill_in_info (ESelectNamesTableModel *model)
-{
- if (model->source) {
- int count = e_select_names_model_count (model->source);
- gint i;
-
- model->count = count;
- model->data = g_new(ESelectNamesTableModelData, count);
-
- for (i = 0; i < count; ++i) {
- const EDestination *dest = e_select_names_model_get_destination (model->source, i);
- ECard *card = dest ? e_destination_get_card (dest) : NULL;
-
- if (card) {
- ECardSimple *simple = e_card_simple_new(card);
- model->data[i].name = e_card_simple_get(simple, E_CARD_SIMPLE_FIELD_NAME_OR_ORG);
- if (model->data[i].name == 0)
- model->data[i].name = g_strdup("");
- model->data[i].email = e_card_simple_get(simple, E_CARD_SIMPLE_FIELD_EMAIL);
- if (model->data[i].email == 0)
- model->data[i].email = g_strdup("");
- gtk_object_unref(GTK_OBJECT(simple));
- } else {
- model->data[i].name = g_strdup (e_destination_get_string (dest));
- model->data[i].email = g_strdup (model->data[i].name);
- }
- }
- } else {
- model->count = 0;
- }
-}
-
-static void
-clear_info (ESelectNamesTableModel *model)
-{
- int i;
- for (i = 0; i < model->count; i++) {
- g_free(model->data[i].name);
- g_free(model->data[i].email);
- }
- g_free(model->data);
- model->data = NULL;
- model->count = -1;
-}
-
-/*
- * ESelectNamesTableModel lifecycle management and vcard loading/saving.
- */
-
-static void
-e_select_names_table_model_destroy (GtkObject *object)
-{
- ESelectNamesTableModel *model;
-
- model = E_SELECT_NAMES_TABLE_MODEL (object);
-
- e_select_names_table_model_drop_source (model);
- clear_info(model);
-}
-
-/* This function returns the number of columns in our ETableModel. */
-static int
-e_select_names_table_model_col_count (ETableModel *etc)
-{
- return 2;
-}
-
-/* This function returns the number of rows in our ETableModel. */
-static int
-e_select_names_table_model_row_count (ETableModel *etc)
-{
- ESelectNamesTableModel *e_select_names_table_model = E_SELECT_NAMES_TABLE_MODEL(etc);
- if (e_select_names_table_model->count == -1) {
- if (e_select_names_table_model->source) {
- fill_in_info(e_select_names_table_model);
- } else {
- return 0;
- }
- }
- return e_select_names_table_model->count;
-}
-
-/* This function returns the value at a particular point in our ETableModel. */
-static void *
-e_select_names_table_model_value_at (ETableModel *etc, int col, int row)
-{
- ESelectNamesTableModel *e_select_names_table_model = E_SELECT_NAMES_TABLE_MODEL(etc);
- if (e_select_names_table_model->data == NULL) {
- fill_in_info(e_select_names_table_model);
- }
- switch (col) {
- case 0:
- if (e_select_names_table_model->data[row].name == NULL) {
- fill_in_info(e_select_names_table_model);
- }
- return e_select_names_table_model->data[row].name;
- break;
- case 1:
- if (e_select_names_table_model->data[row].email == NULL) {
- fill_in_info(e_select_names_table_model);
- }
- return e_select_names_table_model->data[row].email;
- break;
- }
- return "";
-}
-
-/* This function sets the value at a particular point in our ETableModel. */
-static void
-e_select_names_table_model_set_value_at (ETableModel *etc, int col, int row, const void *val)
-{
-}
-
-/* This function returns whether a particular cell is editable. */
-static gboolean
-e_select_names_table_model_is_cell_editable (ETableModel *etc, int col, int row)
-{
- return FALSE;
-}
-
-/* This function duplicates the value passed to it. */
-static void *
-e_select_names_table_model_duplicate_value (ETableModel *etc, int col, const void *value)
-{
- return g_strdup(value);
-}
-
-/* This function frees the value passed to it. */
-static void
-e_select_names_table_model_free_value (ETableModel *etc, int col, void *value)
-{
- g_free(value);
-}
-
-static void *
-e_select_names_table_model_initialize_value (ETableModel *etc, int col)
-{
- return g_strdup("");
-}
-
-static gboolean
-e_select_names_table_model_value_is_empty (ETableModel *etc, int col, const void *value)
-{
- return !(value && *(char *)value);
-}
-
-static char *
-e_select_names_table_model_value_to_string (ETableModel *etc, int col, const void *value)
-{
- return g_strdup(value);
-}
-
-static void
-e_select_names_table_model_model_changed (ESelectNamesModel *source,
- ESelectNamesTableModel *model)
-{
- clear_info(model);
- e_table_model_changed(E_TABLE_MODEL(model));
-}
-
-/* Set_arg handler for the model */
-static void
-e_select_names_table_model_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
-{
- ESelectNamesTableModel *model;
-
- model = E_SELECT_NAMES_TABLE_MODEL (object);
-
- switch (arg_id) {
- case ARG_SOURCE:
- e_select_names_table_model_drop_source (model);
- e_select_names_table_model_add_source (model, E_SELECT_NAMES_MODEL(GTK_VALUE_OBJECT (*arg)));
- break;
- default:
- return;
- }
-}
-
-/* Get_arg handler for the model */
-static void
-e_select_names_table_model_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
-{
- ESelectNamesTableModel *model;
-
- model = E_SELECT_NAMES_TABLE_MODEL (object);
-
- switch (arg_id) {
- case ARG_SOURCE:
- GTK_VALUE_OBJECT(*arg) = GTK_OBJECT(model->source);
- break;
- default:
- arg->type = GTK_TYPE_INVALID;
- break;
- }
-}
-
-/**
- * e_select_names_table_model_init:
- */
-static void
-e_select_names_table_model_init (ESelectNamesTableModel *model)
-{
- model->source = NULL;
- model->source_changed_id = 0;
-
- model->count = -1;
- model->data = NULL;
-}
-
-static void
-e_select_names_table_model_class_init (ESelectNamesTableModelClass *klass)
-{
- GtkObjectClass *object_class;
- ETableModelClass *table_model_class;
-
- object_class = GTK_OBJECT_CLASS(klass);
- table_model_class = E_TABLE_MODEL_CLASS(klass);
-
- gtk_object_add_arg_type ("ESelectNamesTableModel::source",
- GTK_TYPE_OBJECT, GTK_ARG_READWRITE, ARG_SOURCE);
-
- object_class->destroy = e_select_names_table_model_destroy;
- object_class->get_arg = e_select_names_table_model_get_arg;
- object_class->set_arg = e_select_names_table_model_set_arg;
-
- table_model_class->column_count = e_select_names_table_model_col_count;
- table_model_class->row_count = e_select_names_table_model_row_count;
- table_model_class->value_at = e_select_names_table_model_value_at;
- table_model_class->set_value_at = e_select_names_table_model_set_value_at;
- table_model_class->is_cell_editable = e_select_names_table_model_is_cell_editable;
- table_model_class->duplicate_value = e_select_names_table_model_duplicate_value;
- table_model_class->free_value = e_select_names_table_model_free_value;
- table_model_class->initialize_value = e_select_names_table_model_initialize_value;
- table_model_class->value_is_empty = e_select_names_table_model_value_is_empty;
- table_model_class->value_to_string = e_select_names_table_model_value_to_string;
-}
diff --git a/addressbook/gui/component/select-names/e-select-names-table-model.h b/addressbook/gui/component/select-names/e-select-names-table-model.h
deleted file mode 100644
index a7feb4d9c1..0000000000
--- a/addressbook/gui/component/select-names/e-select-names-table-model.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Chris Lahey <clahey@helixcode.com>
- *
- * Copyright (C) 2000 Helix Code, Inc.
- */
-
-#ifndef __E_SELECT_NAMES_TABLE_MODEL_H__
-#define __E_SELECT_NAMES_TABLE_MODEL_H__
-
-#include <time.h>
-#include <stdio.h>
-#include <gtk/gtkobject.h>
-#include <gal/e-table/e-table-model.h>
-#include "e-select-names-model.h"
-
-#define E_TYPE_SELECT_NAMES_TABLE_MODEL (e_select_names_table_model_get_type ())
-#define E_SELECT_NAMES_TABLE_MODEL(obj) (GTK_CHECK_CAST ((obj), E_TYPE_SELECT_NAMES_TABLE_MODEL, ESelectNamesTableModel))
-#define E_SELECT_NAMES_TABLE_MODEL_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_SELECT_NAMES_TABLE_MODEL, ESelectNamesTableModelClass))
-#define E_IS_SELECT_NAMES_TABLE_MODEL(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_SELECT_NAMES_TABLE_MODEL))
-#define E_IS_SELECT_NAMES_TABLE_MODEL_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), E_TYPE_SELECT_NAMES_TABLE_MODEL))
-
-typedef struct {
- char *name;
- char *email;
-} ESelectNamesTableModelData;
-
-typedef struct _ESelectNamesTableModel ESelectNamesTableModel;
-typedef struct _ESelectNamesTableModelClass ESelectNamesTableModelClass;
-
-struct _ESelectNamesTableModel {
- ETableModel parent;
-
- ESelectNamesModel *source;
- int source_changed_id;
-
- int count;
- ESelectNamesTableModelData *data; /* This is used as an array. */
-};
-
-struct _ESelectNamesTableModelClass {
- ETableModelClass parent_class;
-};
-
-ETableModel *e_select_names_table_model_new (ESelectNamesModel *source);
-
-/* Standard Gtk function */
-GtkType e_select_names_table_model_get_type (void);
-
-#endif /* ! __E_SELECT_NAMES_TABLE_MODEL_H__ */
diff --git a/addressbook/gui/component/select-names/e-select-names-text-model.c b/addressbook/gui/component/select-names/e-select-names-text-model.c
deleted file mode 100644
index 6aa6a75a9a..0000000000
--- a/addressbook/gui/component/select-names/e-select-names-text-model.c
+++ /dev/null
@@ -1,722 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Chris Lahey <clahey@ximian.com>
- * Jon Trowbridge <trow@ximian.com>
- *
- * Copyright (C) 2000, 2001 Ximian, Inc.
- */
-
-#include <config.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-
-#include <gal/e-text/e-text-model-repos.h>
-
-#include <addressbook/contact-editor/e-contact-editor.h>
-#include "e-select-names-text-model.h"
-
-static FILE *out = NULL; /* stream for debugging spew */
-
-#define SEPLEN 2
-
-/* Object argument IDs */
-enum {
- ARG_0,
- ARG_SOURCE,
-};
-
-static void e_select_names_text_model_class_init (ESelectNamesTextModelClass *klass);
-static void e_select_names_text_model_init (ESelectNamesTextModel *model);
-static void e_select_names_text_model_destroy (GtkObject *object);
-static void e_select_names_text_model_set_arg (GtkObject *object, GtkArg *arg, guint arg_id);
-static void e_select_names_text_model_get_arg (GtkObject *object, GtkArg *arg, guint arg_id);
-
-static void e_select_names_text_model_set_source (ESelectNamesTextModel *model, ESelectNamesModel *source);
-
-static const gchar *e_select_names_text_model_get_text (ETextModel *model);
-static void e_select_names_text_model_set_text (ETextModel *model, const gchar *text);
-static void e_select_names_text_model_insert (ETextModel *model, gint position, const gchar *text);
-static void e_select_names_text_model_insert_length (ETextModel *model, gint position, const gchar *text, gint length);
-static void e_select_names_text_model_delete (ETextModel *model, gint position, gint length);
-
-static gint e_select_names_text_model_obj_count (ETextModel *model);
-static const gchar *e_select_names_text_model_get_nth_obj (ETextModel *model, gint n, gint *len);
-static void e_select_names_text_model_activate_obj (ETextModel *model, gint n);
-
-
-ETextModelClass *parent_class;
-#define PARENT_TYPE e_text_model_get_type()
-
-/**
- * e_select_names_text_model_get_type:
- * @void:
- *
- * Registers the &ESelectNamesTextModel class if necessary, and returns the type ID
- * associated to it.
- *
- * Return value: The type ID of the &ESelectNamesTextModel class.
- **/
-GtkType
-e_select_names_text_model_get_type (void)
-{
- static GtkType model_type = 0;
-
- if (!model_type) {
- GtkTypeInfo model_info = {
- "ESelectNamesTextModel",
- sizeof (ESelectNamesTextModel),
- sizeof (ESelectNamesTextModelClass),
- (GtkClassInitFunc) e_select_names_text_model_class_init,
- (GtkObjectInitFunc) e_select_names_text_model_init,
- NULL, /* reserved_1 */
- NULL, /* reserved_2 */
- (GtkClassInitFunc) NULL
- };
-
- model_type = gtk_type_unique (PARENT_TYPE, &model_info);
- }
-
- return model_type;
-}
-
-static void
-e_select_names_text_model_class_init (ESelectNamesTextModelClass *klass)
-{
- GtkObjectClass *object_class;
- ETextModelClass *text_model_class;
-
- object_class = GTK_OBJECT_CLASS(klass);
- text_model_class = E_TEXT_MODEL_CLASS(klass);
-
- parent_class = gtk_type_class(PARENT_TYPE);
-
- gtk_object_add_arg_type ("ESelectNamesTextModel::source",
- GTK_TYPE_OBJECT, GTK_ARG_READWRITE, ARG_SOURCE);
-
- object_class->destroy = e_select_names_text_model_destroy;
- object_class->get_arg = e_select_names_text_model_get_arg;
- object_class->set_arg = e_select_names_text_model_set_arg;
-
- text_model_class->get_text = e_select_names_text_model_get_text;
- text_model_class->set_text = e_select_names_text_model_set_text;
- text_model_class->insert = e_select_names_text_model_insert;
- text_model_class->insert_length = e_select_names_text_model_insert_length;
- text_model_class->delete = e_select_names_text_model_delete;
-
- text_model_class->obj_count = e_select_names_text_model_obj_count;
- text_model_class->get_nth_obj = e_select_names_text_model_get_nth_obj;
- text_model_class->object_activated = e_select_names_text_model_activate_obj;
-
- if (getenv ("EVO_DEBUG_SELECT_NAMES_TEXT_MODEL")) {
- out = fopen ("/tmp/evo-debug-select-names-text-model", "w");
- if (out)
- setvbuf (out, NULL, _IONBF, 0);
- }
-}
-
-static void
-dump_model (ESelectNamesTextModel *text_model)
-{
- ESelectNamesModel *model = text_model->source;
- gint i;
-
- if (out == NULL)
- return;
-
- fprintf (out, "\n*** Model State: count=%d\n", e_select_names_model_count (model));
-
- for (i=0; i<e_select_names_model_count (model); ++i)
- fprintf (out, "[%d] \"%s\" %s\n", i,
- e_select_names_model_get_string (model, i),
- e_select_names_model_get_card (model, i) ? "<card>" : "");
- fprintf (out, "\n");
-}
-
-static void
-e_select_names_text_model_init (ESelectNamesTextModel *model)
-{
-}
-
-static void
-e_select_names_text_model_destroy (GtkObject *object)
-{
- ESelectNamesTextModel *model;
-
- model = E_SELECT_NAMES_TEXT_MODEL (object);
-
- e_select_names_text_model_set_source (model, NULL);
-
- if (GTK_OBJECT_CLASS(parent_class)->destroy)
- GTK_OBJECT_CLASS(parent_class)->destroy(object);
-}
-
-static void
-e_select_names_text_model_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
-{
- ESelectNamesTextModel *model;
-
- model = E_SELECT_NAMES_TEXT_MODEL (object);
-
- switch (arg_id) {
- case ARG_SOURCE:
- e_select_names_text_model_set_source(model, E_SELECT_NAMES_MODEL (GTK_VALUE_OBJECT (*arg)));
- break;
- default:
- return;
- }
-}
-
-static void
-e_select_names_text_model_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
-{
- ESelectNamesTextModel *model;
-
- model = E_SELECT_NAMES_TEXT_MODEL (object);
-
- switch (arg_id) {
- case ARG_SOURCE:
- GTK_VALUE_OBJECT(*arg) = GTK_OBJECT(model->source);
- break;
- default:
- arg->type = GTK_TYPE_INVALID;
- break;
- }
-}
-
-static void
-resize_cb (ESelectNamesModel *source, gint index, gint old_len, gint new_len, ETextModel *model)
-{
- EReposDeleteShift repos_del;
- EReposInsertShift repos_ins;
- gint pos;
-
- e_select_names_model_name_pos (source, index, &pos, NULL);
-
- if (new_len < old_len) {
-
- repos_del.model = model;
- repos_del.pos = pos;
- repos_del.len = old_len - new_len;
- e_text_model_reposition (model, e_repos_delete_shift, &repos_del);
-
- } else if (old_len < new_len) {
-
- repos_ins.model = model;
- repos_ins.pos = pos;
- repos_ins.len = new_len - old_len;
- e_text_model_reposition (model, e_repos_insert_shift, &repos_ins);
-
- }
-}
-
-
-static void
-e_select_names_text_model_set_source (ESelectNamesTextModel *model,
- ESelectNamesModel *source)
-{
- if (source == model->source)
- return;
-
- if (model->source) {
- gtk_signal_disconnect (GTK_OBJECT (model->source), model->source_changed_id);
- gtk_signal_disconnect (GTK_OBJECT (model->source), model->source_resize_id);
- gtk_object_unref (GTK_OBJECT (model->source));
- }
-
- model->source = source;
-
- if (model->source) {
- gtk_object_ref (GTK_OBJECT (model->source));
- model->source_changed_id = gtk_signal_connect_object (GTK_OBJECT(model->source),
- "changed",
- GTK_SIGNAL_FUNC (e_text_model_changed),
- GTK_OBJECT (model));
- model->source_resize_id = gtk_signal_connect (GTK_OBJECT(model->source),
- "resized",
- GTK_SIGNAL_FUNC (resize_cb),
- model);
- }
-}
-
-ETextModel *
-e_select_names_text_model_new (ESelectNamesModel *source)
-{
- ETextModel *model = E_TEXT_MODEL (gtk_type_new (e_select_names_text_model_get_type()));
- e_select_names_text_model_set_source (E_SELECT_NAMES_TEXT_MODEL (model), source);
- return model;
-}
-
-static const gchar *
-e_select_names_text_model_get_text (ETextModel *model)
-{
- ESelectNamesTextModel *snm = E_SELECT_NAMES_TEXT_MODEL(model);
-
- return snm ? e_select_names_model_get_textification (snm->source) : "";
-}
-
-static void
-e_select_names_text_model_set_text (ETextModel *model, const gchar *text)
-{
- ESelectNamesTextModel *snm = E_SELECT_NAMES_TEXT_MODEL(model);
-
- e_select_names_model_delete_all (snm->source);
- e_select_names_text_model_insert (model, 0, text);
-}
-
-static void
-e_select_names_text_model_insert (ETextModel *model, gint position, const gchar *text)
-{
- e_select_names_text_model_insert_length (model, position, text, strlen (text));
-}
-
-static void
-e_select_names_text_model_insert_length (ETextModel *model, gint pos, const gchar *text, gint length)
-{
- ESelectNamesModel *source = E_SELECT_NAMES_TEXT_MODEL (model)->source;
- gint i;
-
- g_return_if_fail (model != NULL);
- g_return_if_fail (E_IS_SELECT_NAMES_TEXT_MODEL (model));
-
- if (out) {
- gchar *tmp = g_strndup (text, length);
- fprintf (out, ">> insert \"%s\" (len=%d) at %d\n", tmp, length, pos);
- g_free (tmp);
- }
-
- pos = CLAMP (pos, 0, strlen (e_select_names_model_get_textification (source)));
-
- /* We want to control all cursor motions ourselves, rather than taking hints
- from the ESelectNamesModel. */
- gtk_signal_handler_block (GTK_OBJECT (source), E_SELECT_NAMES_TEXT_MODEL (model)->source_resize_id);
-
- /* We handle this one character at a time. */
-
- for (i = 0; i < length && text[i]; ++i) {
- gint index, start_pos, text_len;
- gboolean inside_quote = FALSE;
-
- if (out)
- fprintf (out, "processing [%c]\n", text[i]);
-
- e_select_names_model_text_pos (source, pos, &index, &start_pos, &text_len);
-
- if (out)
- fprintf (out, "index=%d start_pos=%d text_len=%d\n", index, start_pos, text_len);
-
- if (text[i] == ',' && index >= 0) { /* Is this a quoted or an unquoted comma we are dealing with? */
- const EDestination *dest = e_select_names_model_get_destination (source, index);
- if (dest) {
- const gchar *str = e_destination_get_string (dest);
- gint j;
- if (out)
- fprintf (out, "str=%s pos=%d\n", str, pos);
- for (j=0; j<pos-start_pos && str[j]; ++j)
- if (str[j] == '"') {
- inside_quote = !inside_quote;
- if (out)
- fprintf (out, "flip to %d at %d\n", start_pos+j, inside_quote);
- }
- }
- if (out)
- fprintf (out, inside_quote ? "inside quote\n" : "not inside quote\n");
- }
-
-
- if (text[i] == ',' && !inside_quote) {
-
- /* This is the case of hitting , first thing in an empty entry */
- if (index == -1) {
- EReposAbsolute repos;
-
- e_select_names_model_insert (source, 0, e_destination_new ());
- e_select_names_model_insert (source, 0, e_destination_new ());
-
- repos.model = model;
- repos.pos = -1; /* At end */
- e_text_model_reposition (model, e_repos_absolute, &repos);
-
-
- } else if (pos <= start_pos || pos == start_pos + text_len) {
- EReposInsertShift repos;
- gint ins_point = index;
-
- if (text_len != 0 && pos == start_pos + text_len)
- ++ins_point;
-
- /* Block adjacent blank cards. */
- if (! ((ins_point < e_select_names_model_count (source) &&
- (e_select_names_model_get_string (source, ins_point) == NULL))
- || (ins_point > 0 && (e_select_names_model_get_string (source, ins_point-1) == NULL)))) {
-
- e_select_names_model_insert (source, ins_point, e_destination_new ());
-
- repos.model = model;
- repos.pos = pos;
- repos.len = SEPLEN;
- e_text_model_reposition (model, e_repos_insert_shift, &repos);
- pos += SEPLEN;
- }
-
- } else {
- EReposInsertShift repos;
- gint offset = MAX (pos - start_pos, 0);
- const gchar *str = e_select_names_model_get_string (source, index);
- gchar *str1 = g_strndup (str, offset);
- gchar *str2 = g_strdup (str+offset);
- EDestination *d1 = e_destination_new (), *d2 = e_destination_new ();
-
- e_destination_set_string (d1, str1);
- e_destination_set_string (d2, str2);
-
- e_select_names_model_replace (source, index, d1);
- e_select_names_model_insert (source, index+1, d2);
-
- g_free (str1);
- g_free (str2);
-
- repos.model = model;
- repos.pos = pos;
- repos.len = SEPLEN;
- e_text_model_reposition (model, e_repos_insert_shift, &repos);
- pos += SEPLEN;
- }
-
- } else {
- EReposInsertShift repos;
- gint offset = MAX (pos - start_pos, 0);
- const gchar *str;
- gchar *new_str = NULL;
- gint this_length = 1;
- gboolean whitespace = isspace ((gint) text[i]);
-
- str = index >= 0 ? e_select_names_model_get_string (source, index) : NULL;
- if (str) {
- if (pos <= start_pos) {
- if (whitespace) {
- /* swallow leading whitespace */
- this_length = 0;
- } else {
- /* Adjust for our "magic white space" */
- new_str = g_strdup_printf("%c%s%s", text[i], pos < start_pos ? " " : "", str);
- if (pos < start_pos)
- ++this_length;
- }
- } else {
- new_str = g_strdup_printf ("%.*s%c%s", offset, str, text[i], str + offset);
- }
- } else {
- if (whitespace) {
- /* swallow leading whitespace */
- this_length = 0;
- } else {
- new_str = g_strdup_printf ("%c", text[i]);
- }
- }
-
- if (new_str) {
-
- EDestination *dest = e_destination_new ();
- e_destination_set_string (dest, new_str);
-
- e_select_names_model_replace (source, index, dest);
-
- if (this_length > 0) {
- repos.model = model;
- repos.pos = pos;
- repos.len = this_length;
- e_text_model_reposition (model, e_repos_insert_shift, &repos);
-
- pos += this_length;
- }
-
- g_free (new_str);
- }
- }
- }
-
- dump_model (E_SELECT_NAMES_TEXT_MODEL (model));
-
- gtk_signal_handler_unblock (GTK_OBJECT (source), E_SELECT_NAMES_TEXT_MODEL (model)->source_resize_id);
-}
-
-
-static void
-e_select_names_text_model_delete (ETextModel *model, gint pos, gint length)
-{
- ESelectNamesModel *source = E_SELECT_NAMES_TEXT_MODEL (model)->source;
- gint index, start_pos, text_len, offset;
-
- if (out) {
- const gchar *str = e_select_names_model_get_textification (source);
- gint i, len;
-
- fprintf (out, ">> delete %d at pos %d\n", length, pos);
-
- len = strlen (str);
- for (i=0; i<pos && i<len; ++i)
- fprintf (out, "%c", str[i]);
- fprintf (out, "[");
- for (i=pos; i<pos+length && i<len; ++i)
- fprintf (out, "%c", str[i]);
- fprintf (out, "]");
- for (i=pos+length; i<len; ++i)
- fprintf (out, "%c", str[i]);
- fprintf (out, "\n");
- }
-
- if (length < 0)
- return;
-
- e_select_names_model_text_pos (source, pos, &index, &start_pos, &text_len);
-
- if (out)
- fprintf (out, "index=%d, start_pos=%d, text_len=%d\n", index, start_pos, text_len);
-
- /* We want to control all cursor motions ourselves, rather than taking hints
- from the ESelectNamesModel. */
- gtk_signal_handler_block (GTK_OBJECT (source), E_SELECT_NAMES_TEXT_MODEL (model)->source_resize_id);
-
- /* First, we handle a few tricky cases. */
-
- if (pos < start_pos) {
- EReposAbsolute repos;
-
- repos.model = model;
- repos.pos = pos;
- e_text_model_reposition (model, e_repos_absolute, &repos);
-
- length -= start_pos - pos;
-
- if (length > 0)
- e_select_names_text_model_delete (model, start_pos, length);
- goto finished;
- }
-
- if (pos == start_pos + text_len) {
- /* We are positioned right at the end of an entry, possibly right in front of a comma. */
-
- if (index+1 < e_select_names_model_count (source)) {
- EReposDeleteShift repos;
- EDestination *new_dest;
- const gchar *str1 = e_select_names_model_get_string (source, index);
- const gchar *str2 = e_select_names_model_get_string (source, index+1);
- gchar *new_str;
-
- while (str1 && *str1 && isspace ((gint) *str1))
- ++str1;
- while (str2 && *str2 && isspace ((gint) *str2))
- ++str2;
-
- if (str1 && str2)
- new_str = g_strdup_printf ("%s %s", str1, str2);
- else if (str1)
- new_str = g_strdup (str1);
- else if (str2)
- new_str = g_strdup (str2);
- else
- new_str = g_strdup ("");
-
- if (out)
- fprintf (out, "joining \"%s\" and \"%s\" to \"%s\"\n", str1, str2, new_str);
-
- e_select_names_model_delete (source, index+1);
-
- new_dest = e_destination_new ();
- e_destination_set_string (new_dest, new_str);
- e_select_names_model_replace (source, index, new_dest);
- g_free (new_str);
-
- repos.model = model;
- repos.pos = pos;
- repos.len = SEPLEN - 1;
-
- e_text_model_reposition (model, e_repos_delete_shift, &repos);
-
- if (length > 1)
- e_select_names_text_model_delete (model, pos, length-1);
- } else {
- /* If we are at the end of the last entry (which we must be if we end up in this block),
- we can just do nothing. So this else-block is here just to give us a place to
- put this comment. */
- }
-
- goto finished;
- }
-
- if (pos + length > start_pos + text_len) {
- /* Uh oh... our changes straddle two objects. */
-
- if (pos == start_pos) { /* Delete the whole thing */
- EReposDeleteShift repos;
-
- e_select_names_model_delete (source, index);
-
- if (out)
- fprintf (out, "deleted all of %d\n", index);
-
- repos.model = model;
- repos.pos = pos;
- repos.len = text_len + SEPLEN;
-
- e_text_model_reposition (model, e_repos_delete_shift, &repos);
-
- length -= text_len + SEPLEN;
- if (length > 0)
- e_select_names_text_model_delete (model, pos, length);
-
- } else {
- /* Delete right up to the end, and then call e_select_names_text_model_delete again
- to finish the job. */
- gint len1, len2;
-
- len1 = text_len - (pos - start_pos);
- len2 = length - len1;
-
- if (out)
- fprintf (out, "two-stage delete: %d, %d\n", len1, len2);
-
-
- e_select_names_text_model_delete (model, pos, len1);
- e_select_names_text_model_delete (model, pos, len2);
- }
-
- goto finished;
- }
-
- /* Our changes are confined to just one entry. */
- if (length > 0) {
- const gchar *str;
- gchar *new_str;
-
- offset = pos - start_pos;
-
- str = e_select_names_model_get_string (source, index);
- new_str = str ? g_strdup_printf ("%.*s%s", offset, str, str + offset + length) : NULL;
-
- if (new_str) {
- EReposDeleteShift repos;
- EDestination *dest;
-
- dest = e_destination_new ();
- e_destination_set_string (dest, new_str);
- e_select_names_model_replace (source, index, dest);
-
- if (out)
- fprintf (out, "new_str: \"%s\"\n", new_str);
-
- g_free (new_str);
-
- repos.model = model;
- repos.pos = pos;
- repos.len = length;
-
- e_text_model_reposition (model, e_repos_delete_shift, &repos);
-
- } else {
- EReposDeleteShift repos;
-
- e_select_names_model_delete (source, index);
-
- if (out)
- fprintf (out, "deleted %d\n", index);
-
-
- repos.model = model;
- repos.pos = pos;
- repos.len = SEPLEN;
-
- e_text_model_reposition (model, e_repos_delete_shift, &repos);
- }
- }
-
- finished:
- gtk_signal_handler_unblock (GTK_OBJECT (source), E_SELECT_NAMES_TEXT_MODEL (model)->source_resize_id);
- dump_model (E_SELECT_NAMES_TEXT_MODEL (model));
-}
-
-static gint
-e_select_names_text_model_obj_count (ETextModel *model)
-{
- ESelectNamesModel *source = E_SELECT_NAMES_TEXT_MODEL (model)->source;
- gint i, count;
-
- count = i = e_select_names_model_count (source);
- while (i > 0) {
- const EDestination *dest;
- --i;
- dest = e_select_names_model_get_destination (source, i);
- if (e_destination_get_card (dest) == NULL)
- --count;
- }
-
- return count;
-}
-
-static gint
-nth_obj_index (ESelectNamesModel *source, gint n)
-{
- gint i, N;
-
- i = 0;
- N = e_select_names_model_count (source);
-
- do {
- const EDestination *dest = e_select_names_model_get_destination (source, i);
- if (e_destination_get_card (dest))
- --n;
- ++i;
- } while (n >= 0 && i < N);
-
- if (i <= N)
- --i;
- else
- i = -1;
-
- return i;
-}
-
-static const gchar *
-e_select_names_text_model_get_nth_obj (ETextModel *model, gint n, gint *len)
-{
- ESelectNamesModel *source = E_SELECT_NAMES_TEXT_MODEL (model)->source;
- const gchar *txt;
- gint i, pos;
-
- i = nth_obj_index (source, n);
- if (i < 0)
- return NULL;
-
- e_select_names_model_name_pos (source, i, &pos, len);
- if (pos < 0)
- return NULL;
-
- txt = e_select_names_model_get_textification (source);
- return txt + pos;
-}
-
-static void
-e_select_names_text_model_activate_obj (ETextModel *model, gint n)
-{
- ESelectNamesModel *source = E_SELECT_NAMES_TEXT_MODEL (model)->source;
- EContactEditor *contact_editor;
- ECard *card;
- gint i;
-
- i = nth_obj_index (source, n);
- g_return_if_fail (i >= 0);
-
- card = e_select_names_model_get_card (source, i);
- g_return_if_fail (card);
-
- /* present read-only contact editor when someone double clicks from here */
- contact_editor = e_contact_editor_new ((ECard *) card, FALSE, NULL, TRUE);
- e_contact_editor_raise (contact_editor);
-}
-
-
-
diff --git a/addressbook/gui/component/select-names/e-select-names-text-model.h b/addressbook/gui/component/select-names/e-select-names-text-model.h
deleted file mode 100644
index 7a9e0a7396..0000000000
--- a/addressbook/gui/component/select-names/e-select-names-text-model.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Chris Lahey <clahey@ximian.com>
- * Jon Trowbridge <trow@ximian.com>
- *
- * Copyright (C) 2000, 2001 Ximian, Inc.
- */
-
-#ifndef __E_SELECT_NAMES_TEXT_MODEL_H__
-#define __E_SELECT_NAMES_TEXT_MODEL_H__
-
-#include <time.h>
-#include <stdio.h>
-#include <gtk/gtkobject.h>
-#include <gal/e-text/e-text-model.h>
-#include "e-select-names-model.h"
-
-#define E_TYPE_SELECT_NAMES_TEXT_MODEL (e_select_names_text_model_get_type ())
-#define E_SELECT_NAMES_TEXT_MODEL(obj) (GTK_CHECK_CAST ((obj), E_TYPE_SELECT_NAMES_TEXT_MODEL, ESelectNamesTextModel))
-#define E_SELECT_NAMES_TEXT_MODEL_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_SELECT_NAMES_TEXT_MODEL, ESelectNamesTextModelClass))
-#define E_IS_SELECT_NAMES_TEXT_MODEL(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_SELECT_NAMES_TEXT_MODEL))
-#define E_IS_SELECT_NAMES_TEXT_MODEL_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), E_TYPE_SELECT_NAMES_TEXT_MODEL))
-
-typedef struct _ESelectNamesTextModel ESelectNamesTextModel;
-typedef struct _ESelectNamesTextModelClass ESelectNamesTextModelClass;
-
-struct _ESelectNamesTextModel {
- ETextModel parent;
-
- ESelectNamesModel *source;
- gint source_changed_id;
- gint source_resize_id;
-};
-
-struct _ESelectNamesTextModelClass {
- ETextModelClass parent_class;
-};
-
-ETextModel *e_select_names_text_model_new (ESelectNamesModel *source);
-
-/* Standard Gtk function */
-GtkType e_select_names_text_model_get_type (void);
-
-#endif /* ! __E_SELECT_NAMES_TEXT_MODEL_H__ */
diff --git a/addressbook/gui/component/select-names/e-select-names.c b/addressbook/gui/component/select-names/e-select-names.c
deleted file mode 100644
index 30dc482e85..0000000000
--- a/addressbook/gui/component/select-names/e-select-names.c
+++ /dev/null
@@ -1,650 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* e-select-names.c
- * Copyright (C) 2000 Helix Code, Inc.
- * Author: Chris Lahey <clahey@helixcode.com>
- *
- * 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 <glib.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-stock.h>
-
-#include <gal/e-table/e-table-simple.h>
-#include <gal/widgets/e-font.h>
-
-#include <addressbook/gui/widgets/e-addressbook-model.h>
-#include <addressbook/gui/component/e-cardlist-model.h>
-#include <addressbook/backend/ebook/e-book.h>
-#include <addressbook/gui/component/addressbook-component.h>
-#include <shell/evolution-shell-client.h>
-
-#include "e-select-names.h"
-#include <addressbook/backend/ebook/e-card-simple.h>
-#include "e-select-names-table-model.h"
-
-static void e_select_names_init (ESelectNames *card);
-static void e_select_names_class_init (ESelectNamesClass *klass);
-static void e_select_names_set_arg (GtkObject *o, GtkArg *arg, guint arg_id);
-static void e_select_names_get_arg (GtkObject *object, GtkArg *arg, guint arg_id);
-static void e_select_names_destroy (GtkObject *object);
-
-static GnomeDialogClass *parent_class = NULL;
-#define PARENT_TYPE gnome_dialog_get_type()
-
-/* The arguments we take */
-enum {
- ARG_0,
-};
-
-typedef struct {
- char *title;
- ETableModel *model;
- ESelectNamesModel *source;
- ESelectNames *names;
- GtkWidget *label;
-} ESelectNamesChild;
-
-GtkType
-e_select_names_get_type (void)
-{
- static GtkType type = 0;
-
- if (!type) {
- static const GtkTypeInfo info =
- {
- "ESelectNames",
- sizeof (ESelectNames),
- sizeof (ESelectNamesClass),
- (GtkClassInitFunc) e_select_names_class_init,
- (GtkObjectInitFunc) e_select_names_init,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
- };
-
- type = gtk_type_unique (PARENT_TYPE, &info);
- }
-
- return type;
-}
-
-static void
-e_select_names_class_init (ESelectNamesClass *klass)
-{
- GtkObjectClass *object_class;
-
- object_class = (GtkObjectClass*) klass;
-
- parent_class = gtk_type_class (PARENT_TYPE);
-
- object_class->set_arg = e_select_names_set_arg;
- object_class->get_arg = e_select_names_get_arg;
- object_class->destroy = e_select_names_destroy;
-}
-
-#define SPEC "<ETableSpecification no-headers=\"true\" cursor-mode=\"line\"> \
- <ETableColumn model_col= \"%d\" _title=\"Name\" expansion=\"1.0\" minimum_width=\"20\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableState> \
- <column source=\"0\"/> \
- <grouping> <leaf column=\"0\" ascending=\"true\"/> </grouping> \
- </ETableState> \
-</ETableSpecification>"
-
-#define SPEC2 "<ETableSpecification no-headers=\"true\" cursor-mode=\"line\"> \
- <ETableColumn model_col= \"0\" _title=\"Name\" expansion=\"1.0\" minimum_width=\"20\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableState> \
- <column source=\"0\"/> \
- <grouping> <leaf column=\"0\" ascending=\"true\"/> </grouping> \
- </ETableState> \
-</ETableSpecification>"
-
-GtkWidget *e_addressbook_create_ebook_table(char *name, char *string1, char *string2, int num1, int num2);
-
-static void
-set_book(EBook *book, EBookStatus status, ETableModel *model)
-{
- gtk_object_set(GTK_OBJECT(model),
- "book", book,
- NULL);
- gtk_object_unref(GTK_OBJECT(book));
-}
-
-static void
-addressbook_model_set_uri(ETableModel *model, char *uri)
-{
- EBook *book;
- book = e_book_new();
- gtk_object_ref(GTK_OBJECT(model));
- gtk_object_ref(GTK_OBJECT(book));
- e_book_load_uri(book, uri, (EBookCallback) set_book, model);
-}
-
-static void
-real_add_address_cb (int model_row,
- gpointer closure)
-{
- ESelectNamesChild *child = closure;
- ESelectNames *names = child->names;
- ECard *card = e_addressbook_model_get_card(E_ADDRESSBOOK_MODEL(names->model), model_row);
- EDestination *dest = e_destination_new ();
-
- e_destination_set_card (dest, card, 0);
-
- e_select_names_model_insert (child->source,
- e_select_names_model_count (child->source),
- dest);
- e_select_names_model_clean (child->source);
-
- gtk_object_unref(GTK_OBJECT(card));
-}
-
-static void
-real_add_address(ESelectNames *names, ESelectNamesChild *child)
-{
- e_table_selected_row_foreach(e_table_scrolled_get_table(names->table),
- real_add_address_cb, child);
-}
-
-static void
-add_address(ETable *table, int row, int col, GdkEvent *event, ESelectNames *names)
-{
- ESelectNamesChild *child;
-
- child = g_hash_table_lookup(names->children, names->def);
- if (child) {
- real_add_address(names, child);
- }
-}
-
-GtkWidget *
-e_addressbook_create_ebook_table(char *name, char *string1, char *string2, int num1, int num2)
-{
- ETableModel *model;
- GtkWidget *table;
- char *filename;
- char *uri;
- char *spec;
-
- model = e_addressbook_model_new();
- gtk_object_set(GTK_OBJECT(model),
- "editable", FALSE,
- "query", "(contains \"email\" \"\")",
- NULL);
-
-
- filename = gnome_util_prepend_user_home("evolution/local/Contacts/addressbook.db");
- uri = g_strdup_printf("file://%s", filename);
-
- addressbook_model_set_uri(model, uri);
-
- g_free(uri);
- g_free(filename);
- spec = g_strdup_printf(SPEC, E_CARD_SIMPLE_FIELD_NAME_OR_ORG);
- table = e_table_scrolled_new (model, NULL, spec, NULL);
- g_free(spec);
-
- gtk_object_set_data(GTK_OBJECT(table), "model", model);
- return table;
-}
-
-static void
-set_current_selection(ETableScrolled *table, int row, ESelectNames *names)
-{
- names->currently_selected = row;
-}
-
-typedef struct {
- char *description;
- char *display_name;
- char *physical_uri;
-
-} ESelectNamesFolder;
-
-static void
-e_select_names_folder_free(ESelectNamesFolder *e_folder)
-{
- g_free(e_folder->description );
- g_free(e_folder->display_name);
- g_free(e_folder->physical_uri);
- g_free(e_folder);
-}
-
-static void
-e_select_names_option_activated(GtkWidget *widget, ESelectNames *e_select_names)
-{
- ESelectNamesFolder *e_folder = gtk_object_get_data (GTK_OBJECT (widget), "EsnChoiceFolder");
-
- addressbook_model_set_uri(e_select_names->model, e_folder->physical_uri);
-}
-
-typedef struct {
- ESelectNames *names;
- GtkWidget *menu;
-} NamesAndMenu;
-
-static void
-add_menu_item (gpointer key,
- gpointer value,
- gpointer user_data)
-{
- GtkWidget *menu;
- GtkWidget *item;
- ESelectNamesFolder *e_folder;
- NamesAndMenu *nnm;
- ESelectNames *e_select_names;
-
- nnm = user_data;
- e_folder = value;
- menu = nnm->menu;
- e_select_names = nnm->names;
-
- item = gtk_menu_item_new_with_label (e_folder->display_name);
- gtk_menu_append (GTK_MENU (menu), item);
- gtk_object_set_data (GTK_OBJECT (item), "EsnChoiceFolder", e_folder);
-
- gtk_signal_connect (GTK_OBJECT (item), "activate",
- GTK_SIGNAL_FUNC (e_select_names_option_activated),
- e_select_names);
-}
-
-static void
-update_option_menu(ESelectNames *e_select_names)
-{
- GtkWidget *menu;
- GtkWidget *option;
-
- option = glade_xml_get_widget (e_select_names->gui,
- "optionmenu-folder");
- if (option) {
- NamesAndMenu nnm;
- menu = gtk_menu_new ();
-
- nnm.names = e_select_names;
- nnm.menu = menu;
-
- g_hash_table_foreach (e_select_names->folders,
- add_menu_item,
- &nnm);
-
- gtk_widget_show_all (menu);
-
- gtk_option_menu_set_menu (GTK_OPTION_MENU (option),
- menu);
- gtk_option_menu_set_history (GTK_OPTION_MENU (option), 0);
- gtk_widget_set_sensitive (option, TRUE);
- }
-}
-
-static void
-new_folder (EvolutionStorageListener *storage_listener,
- const char *path,
- const GNOME_Evolution_Folder *folder,
- ESelectNames *e_select_names)
-{
- if (!strcmp(folder->type, "contacts")) {
- ESelectNamesFolder *e_folder = g_new(ESelectNamesFolder, 1);
- e_folder->description = g_strdup(folder->description );
- e_folder->display_name = g_strdup(folder->display_name);
- e_folder->physical_uri = g_strdup(folder->physical_uri);
- g_hash_table_insert(e_select_names->folders,
- g_strdup(path), e_folder);
- update_option_menu(e_select_names);
- }
-}
-
-static void
-update_folder (EvolutionStorageListener *storage_listener,
- const char *path,
- const char *display_name,
- ESelectNames *e_select_names)
-{
- ESelectNamesFolder *e_folder = g_hash_table_lookup(e_select_names->folders, path);
- if (e_folder) {
- g_free(e_folder->display_name);
- e_folder->display_name = g_strdup(e_folder->display_name);
- update_option_menu(e_select_names);
- }
-}
-
-static void
-removed_folder (EvolutionStorageListener *storage_listener,
- const char *path,
- ESelectNames *e_select_names)
-{
- ESelectNamesFolder *e_folder;
- char *orig_path;
-
- if (g_hash_table_lookup_extended(e_select_names->folders, path, (void **) &orig_path, (void **) &e_folder)) {
- g_hash_table_remove(e_select_names->folders, path);
- e_select_names_folder_free(e_folder);
- g_free(orig_path);
- update_option_menu(e_select_names);
- }
-}
-
-static void
-e_select_names_hookup_shell_listener (ESelectNames *e_select_names)
-{
- GNOME_Evolution_Storage storage;
- GNOME_Evolution_StorageListener listener;
- CORBA_Environment ev;
-
- CORBA_exception_init(&ev);
-
- storage = (GNOME_Evolution_Storage) (evolution_shell_client_get_local_storage(addressbook_component_get_shell_client()));
- e_select_names->listener = evolution_storage_listener_new();
-
- listener = evolution_storage_listener_corba_objref(e_select_names->listener);
-
- gtk_signal_connect(GTK_OBJECT(e_select_names->listener), "new_folder",
- GTK_SIGNAL_FUNC(new_folder), e_select_names);
- gtk_signal_connect(GTK_OBJECT(e_select_names->listener), "update_folder",
- GTK_SIGNAL_FUNC(update_folder), e_select_names);
- gtk_signal_connect(GTK_OBJECT(e_select_names->listener), "removed_folder",
- GTK_SIGNAL_FUNC(removed_folder), e_select_names);
-
- GNOME_Evolution_Storage_addListener(storage, listener, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("e_select_names_init: Exception adding listener to "
- "remote GNOME_Evolution_Storage interface.\n");
- CORBA_exception_free (&ev);
- return;
- }
-
- bonobo_object_release_unref(storage, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("e_select_names_init: Exception unref'ing "
- "remote GNOME_Evolution_Storage interface.\n");
- CORBA_exception_free (&ev);
- return;
- }
-
- CORBA_exception_free(&ev);
-}
-
-static void
-e_select_names_init (ESelectNames *e_select_names)
-{
- GladeXML *gui;
- GtkWidget *widget;
-
- gui = glade_xml_new (EVOLUTION_GLADEDIR "/select-names.glade", NULL);
- e_select_names->gui = gui;
-
- e_select_names->children = g_hash_table_new(g_str_hash, g_str_equal);
- e_select_names->child_count = 0;
- e_select_names->def = NULL;
-
- widget = glade_xml_get_widget(gui, "table-top");
- if (!widget) {
- return;
- }
- gtk_widget_ref(widget);
- gtk_widget_unparent(widget);
- gtk_box_pack_start(GTK_BOX(GNOME_DIALOG(e_select_names)->vbox), widget, TRUE, TRUE, 0);
- gtk_widget_unref(widget);
-
- gnome_dialog_append_buttons(GNOME_DIALOG(e_select_names),
- GNOME_STOCK_BUTTON_OK,
- GNOME_STOCK_BUTTON_CANCEL,
- NULL);
-
- gtk_window_set_policy(GTK_WINDOW(e_select_names), FALSE, TRUE, FALSE);
-
- e_select_names->table = E_TABLE_SCROLLED(glade_xml_get_widget(gui, "table-source"));
- e_select_names->model = gtk_object_get_data(GTK_OBJECT(e_select_names->table), "model");
-
- e_select_names->currently_selected = -1;
-
- e_select_names->folders = g_hash_table_new(g_str_hash, g_str_equal);
-
- e_select_names_hookup_shell_listener (e_select_names);
-
- gtk_signal_connect(GTK_OBJECT(e_table_scrolled_get_table(e_select_names->table)), "cursor_activated",
- GTK_SIGNAL_FUNC(set_current_selection), e_select_names);
-
- gtk_signal_connect(GTK_OBJECT(e_table_scrolled_get_table(e_select_names->table)), "double_click",
- GTK_SIGNAL_FUNC(add_address), e_select_names);
-}
-
-static void e_select_names_child_free(char *key, ESelectNamesChild *child, ESelectNames *e_select_names)
-{
- g_free(child->title);
- gtk_object_unref(GTK_OBJECT(child->model));
- gtk_object_unref(GTK_OBJECT(child->source));
- g_free(key);
-}
-
-static void
-e_select_names_destroy (GtkObject *object) {
- ESelectNames *e_select_names = E_SELECT_NAMES(object);
-
- gtk_signal_disconnect_by_data(GTK_OBJECT(e_select_names->listener), e_select_names);
- gtk_object_unref(GTK_OBJECT(e_select_names->listener));
-
- gtk_object_unref(GTK_OBJECT(e_select_names->gui));
- g_hash_table_foreach(e_select_names->children, (GHFunc) e_select_names_child_free, e_select_names);
- g_hash_table_destroy(e_select_names->children);
-
- g_free(e_select_names->def);
-}
-
-GtkWidget*
-e_select_names_new (void)
-{
- GtkWidget *widget = GTK_WIDGET (gtk_type_new (e_select_names_get_type ()));
- return widget;
-}
-
-static void
-e_select_names_set_arg (GtkObject *o, GtkArg *arg, guint arg_id)
-{
- ESelectNames *editor;
-
- editor = E_SELECT_NAMES (o);
-
- switch (arg_id){
- default:
- return;
- }
-}
-
-static void
-e_select_names_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
-{
- ESelectNames *e_select_names;
-
- e_select_names = E_SELECT_NAMES (object);
-
- switch (arg_id) {
- default:
- arg->type = GTK_TYPE_INVALID;
- break;
- }
-}
-
-static void
-button_clicked(GtkWidget *button, ESelectNamesChild *child)
-{
- real_add_address(child->names, child);
-}
-
-static void
-remove_address(ETable *table, int row, int col, GdkEvent *event, ESelectNamesChild *child)
-{
- e_select_names_model_delete (child->source, row);
-}
-
-void
-e_select_names_add_section(ESelectNames *e_select_names, char *name, char *id, ESelectNamesModel *source)
-{
- ESelectNamesChild *child;
- GtkWidget *button;
- GtkWidget *alignment;
- GtkWidget *label;
- GtkTable *table;
- char *label_text;
-
- ETableModel *model;
- GtkWidget *etable;
-
- if (g_hash_table_lookup(e_select_names->children, id)) {
- return;
- }
-
- table = GTK_TABLE(glade_xml_get_widget (e_select_names->gui, "table-recipients"));
-
- child = g_new(ESelectNamesChild, 1);
-
- child->names = e_select_names;
- child->title = g_strdup(_(name));
-
- e_select_names->child_count++;
-
- alignment = gtk_alignment_new(0, 0, 1, 0);
-
- button = gtk_button_new ();
-
- label_text = g_strconcat (child->title, " ->", NULL);
- label = gtk_label_new (label_text);
- g_free (label_text);
- gtk_container_add (GTK_CONTAINER (button), label);
- child->label = label;
-
- gtk_container_add(GTK_CONTAINER(alignment), button);
- gtk_widget_show_all(alignment);
- gtk_signal_connect(GTK_OBJECT(button), "clicked",
- GTK_SIGNAL_FUNC(button_clicked), child);
- gtk_table_attach(table, alignment,
- 0, 1,
- e_select_names->child_count,
- e_select_names->child_count + 1,
- GTK_FILL, GTK_FILL,
- 0, 0);
-
- model = e_select_names_table_model_new(source);
- etable = e_table_scrolled_new (model, NULL, SPEC2, NULL);
-
- gtk_signal_connect(GTK_OBJECT(e_table_scrolled_get_table(E_TABLE_SCROLLED(etable))), "double_click",
- GTK_SIGNAL_FUNC(remove_address), child);
-
- child->model = model;
- child->source = source;
- gtk_object_ref(GTK_OBJECT(child->model));
- gtk_object_ref(GTK_OBJECT(child->source));
-
- gtk_widget_show(etable);
-
- gtk_table_attach(table, etable,
- 1, 2,
- e_select_names->child_count,
- e_select_names->child_count + 1,
- GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND,
- 0, 0);
-
- g_hash_table_insert(e_select_names->children, g_strdup(id), child);
-}
-
-static void *
-card_copy(const void *value, void *closure)
-{
- gtk_object_ref(GTK_OBJECT(value));
- return (void *)value;
-}
-
-static void
-card_free(void *value, void *closure)
-{
- gtk_object_unref(GTK_OBJECT(value));
-}
-
-EList *
-e_select_names_get_section(ESelectNames *e_select_names, char *id)
-{
- ESelectNamesChild *child;
- int i;
- int rows;
- EList *list;
-
- child = g_hash_table_lookup(e_select_names->children, id);
- if (!child)
- return NULL;
- rows = e_table_model_row_count(child->model);
-
- list = e_list_new(card_copy, card_free, NULL);
- for (i = 0; i < rows; i++) {
- ECard *card = e_cardlist_model_get(E_CARDLIST_MODEL(child->model), i);
- e_list_append(list, card);
- gtk_object_unref(GTK_OBJECT(card));
- }
- return list;
-}
-
-ESelectNamesModel *
-e_select_names_get_source(ESelectNames *e_select_names,
- char *id)
-{
- ESelectNamesChild *child = g_hash_table_lookup(e_select_names->children, id);
- if (child) {
- if (child->source)
- gtk_object_ref(GTK_OBJECT(child->source));
- return child->source;
- } else
- return NULL;
-}
-
-void
-e_select_names_set_default (ESelectNames *e_select_names,
- const char *id)
-{
- ESelectNamesChild *child;
-
- if (e_select_names->def) {
- child = g_hash_table_lookup(e_select_names->children, e_select_names->def);
- if (child)
- gtk_widget_restore_default_style(child->label);
- }
-
- g_free(e_select_names->def);
- e_select_names->def = g_strdup(id);
-
- if (e_select_names->def) {
- child = g_hash_table_lookup(e_select_names->children, e_select_names->def);
- if (child) {
- EFont *efont;
- GdkFont *gdkfont;
- GtkStyle *style, *oldstyle;
-
- oldstyle = gtk_widget_get_style(child->label);
- style = gtk_style_copy(oldstyle);
-
- efont = e_font_from_gdk_font(style->font);
- gdkfont = e_font_to_gdk_font(efont, E_FONT_BOLD);
- e_font_unref(efont);
-
- gdk_font_ref(gdkfont);
- gdk_font_unref(style->font);
- style->font = gdkfont;
-
- gtk_widget_set_style(child->label, style);
-
- gtk_style_unref(oldstyle);
- }
- }
-}
diff --git a/addressbook/gui/component/select-names/e-select-names.h b/addressbook/gui/component/select-names/e-select-names.h
deleted file mode 100644
index d059de453d..0000000000
--- a/addressbook/gui/component/select-names/e-select-names.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* e-select-names.h
- * Copyright (C) 2000 Helix Code, Inc.
- * Author: Chris Lahey <clahey@helixcode.com>
- *
- * 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_SELECT_NAMES_H__
-#define __E_SELECT_NAMES_H__
-
-#include <glib.h>
-#include <gtk/gtkwidget.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-util.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <glade/glade.h>
-#include <gal/e-table/e-table.h>
-#include <gal/e-table/e-table-scrolled.h>
-
-#include "e-select-names-model.h"
-#include "e-util/e-list.h"
-#include "shell/evolution-storage-listener.h"
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-/* ESelectNames - A dialog displaying information about a contact.
- *
- * The following arguments are available:
- *
- * name type read/write description
- * --------------------------------------------------------------------------------
- */
-
-#define E_SELECT_NAMES_TYPE (e_select_names_get_type ())
-#define E_SELECT_NAMES(obj) (GTK_CHECK_CAST ((obj), E_SELECT_NAMES_TYPE, ESelectNames))
-#define E_SELECT_NAMES_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_SELECT_NAMES_TYPE, ESelectNamesClass))
-#define E_IS_SELECT_NAMES(obj) (GTK_CHECK_TYPE ((obj), E_SELECT_NAMES_TYPE))
-#define E_IS_SELECT_NAMES_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_SELECT_NAMES_TYPE))
-
-typedef struct _ESelectNames ESelectNames;
-typedef struct _ESelectNamesClass ESelectNamesClass;
-
-struct _ESelectNames
-{
- GnomeDialog parent;
-
- /* item specific fields */
- GladeXML *gui;
-
- GHashTable *children; /* Of type char * to ESelectNamesChild */
- int child_count;
- ETableScrolled *table;
- ETableModel *model;
- int currently_selected;
- EvolutionStorageListener *listener;
- GHashTable *folders;
- char *def;
-};
-
-struct _ESelectNamesClass
-{
- GnomeDialogClass parent_class;
-};
-
-
-GtkWidget *e_select_names_new (void);
-GtkType e_select_names_get_type (void);
-
-void e_select_names_add_section (ESelectNames *e_select_names,
- char *name,
- char *id,
- ESelectNamesModel *source);
-ESelectNamesModel *e_select_names_get_source (ESelectNames *e_select_names,
- char *id);
-void e_select_names_set_default (ESelectNames *e_select_names,
- const char *id);
-/* Returns a ref counted list of addresses. */
-EList *e_select_names_get_section (ESelectNames *e_select_names,
- char *id);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-#endif /* __E_SELECT_NAMES_H__ */
diff --git a/addressbook/gui/component/select-names/recipient.glade b/addressbook/gui/component/select-names/recipient.glade
deleted file mode 100644
index b60972d094..0000000000
--- a/addressbook/gui/component/select-names/recipient.glade
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <name>Recipient</name>
- <program_name>recipient</program_name>
- <directory></directory>
- <source_directory>src</source_directory>
- <pixmaps_directory>pixmaps</pixmaps_directory>
- <language>C</language>
- <gnome_support>True</gnome_support>
- <gettext_support>True</gettext_support>
- <use_widget_names>True</use_widget_names>
- <output_main_file>False</output_main_file>
- <output_support_files>False</output_support_files>
- <output_build_files>False</output_build_files>
- <gnome_help_support>True</gnome_help_support>
-</project>
-
-<widget>
- <class>GtkWindow</class>
- <name>window1</name>
- <visible>False</visible>
- <title>window1</title>
- <type>GTK_WINDOW_TOPLEVEL</type>
- <position>GTK_WIN_POS_NONE</position>
- <modal>False</modal>
- <allow_shrink>False</allow_shrink>
- <allow_grow>True</allow_grow>
- <auto_shrink>False</auto_shrink>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox-top</name>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment1</name>
- <xalign>1.08033e-07</xalign>
- <yalign>0</yalign>
- <xscale>1</xscale>
- <yscale>0</yscale>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>text-button</name>
- <can_focus>True</can_focus>
- <label>-&gt;</label>
- </widget>
- </widget>
- </widget>
-</widget>
-
-</GTK-Interface>
diff --git a/addressbook/gui/component/select-names/select-names.glade b/addressbook/gui/component/select-names/select-names.glade
deleted file mode 100644
index 4eb3599f85..0000000000
--- a/addressbook/gui/component/select-names/select-names.glade
+++ /dev/null
@@ -1,268 +0,0 @@
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <name>Select-names</name>
- <program_name>select-names</program_name>
- <directory></directory>
- <source_directory>src</source_directory>
- <pixmaps_directory>pixmaps</pixmaps_directory>
- <language>C</language>
- <gnome_support>True</gnome_support>
- <gettext_support>True</gettext_support>
- <output_main_file>False</output_main_file>
- <output_support_files>False</output_support_files>
- <output_build_files>False</output_build_files>
-</project>
-
-<widget>
- <class>GnomeDialog</class>
- <name>dialog-top</name>
- <visible>False</visible>
- <title>Select Names</title>
- <type>GTK_WINDOW_TOPLEVEL</type>
- <position>GTK_WIN_POS_NONE</position>
- <modal>False</modal>
- <allow_shrink>False</allow_shrink>
- <allow_grow>True</allow_grow>
- <auto_shrink>False</auto_shrink>
- <auto_close>False</auto_close>
- <hide_on_close>False</hide_on_close>
-
- <widget>
- <class>GtkVBox</class>
- <child_name>GnomeDialog:vbox</child_name>
- <name>dialog-vbox1</name>
- <homogeneous>False</homogeneous>
- <spacing>8</spacing>
- <child>
- <padding>4</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkHButtonBox</class>
- <child_name>GnomeDialog:action_area</child_name>
- <name>dialog-action_area1</name>
- <layout_style>GTK_BUTTONBOX_END</layout_style>
- <spacing>8</spacing>
- <child_min_width>85</child_min_width>
- <child_min_height>27</child_min_height>
- <child_ipad_x>7</child_ipad_x>
- <child_ipad_y>0</child_ipad_y>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- <pack>GTK_PACK_END</pack>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>button1</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button3</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
- </widget>
- </widget>
-
- <widget>
- <class>GtkTable</class>
- <name>table-top</name>
- <rows>4</rows>
- <columns>2</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>6</row_spacing>
- <column_spacing>6</column_spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox1</name>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>2</top_attach>
- <bottom_attach>3</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-find</name>
- <visible>False</visible>
- <can_focus>True</can_focus>
- <has_focus>True</has_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button-find</name>
- <visible>False</visible>
- <can_focus>True</can_focus>
- <label>Find...</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkAccelLabel</class>
- <name>accellabel1</name>
- <label>Select name from:</label>
- <justify>GTK_JUSTIFY_LEFT</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>table-source</name>
- <creation_function>e_addressbook_create_ebook_table</creation_function>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Sat, 10 Jun 2000 22:02:57 GMT</last_modification_time>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>3</top_attach>
- <bottom_attach>4</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>True</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkTable</class>
- <name>table-recipients</name>
- <rows>1</rows>
- <columns>2</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>4</row_spacing>
- <column_spacing>4</column_spacing>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>3</top_attach>
- <bottom_attach>4</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkAccelLabel</class>
- <name>accellabel2</name>
- <label>Message Recipients</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkOptionMenu</class>
- <name>optionmenu1</name>
- <can_focus>True</can_focus>
- <items></items>
- <initial_choice>0</initial_choice>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
- </widget>
- </widget>
-</widget>
-
-</GTK-Interface>
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 700be0ff35..0000000000
--- a/addressbook/gui/contact-editor/Makefile.am
+++ /dev/null
@@ -1,62 +0,0 @@
-INCLUDES = \
- $(BONOBO_GNOME_CFLAGS) \
- $(EXTRA_GNOME_CFLAGS) \
- -I$(top_srcdir) \
- -I$(top_srcdir)/addressbook/ \
- -I$(top_srcdir)/addressbook/backend \
- -I$(top_srcdir)/widgets/e-table \
- -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \
- -DDATADIR=\""$(datadir)"\" \
- -DEVOLUTION_DATADIR=\""$(datadir)"\" \
- -DEVOLUTIONDIR=\""$(evolutiondir)"\" \
- -DG_LOG_DOMAIN=\"contact-editor\"
-
-noinst_LIBRARIES = \
- libecontacteditor.a
-
-libecontacteditor_a_SOURCES = \
- e-contact-editor-address.c \
- e-contact-editor-address.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 \
- e-contact-quick-add.c \
- e-contact-quick-add.h
-
-noinst_PROGRAMS = \
- contact-editor-test
-
-contact_editor_test_SOURCES = \
- test-editor.c
-
-contact_editor_test_LDADD = \
- libecontacteditor.a \
- $(top_builddir)/e-util/libeutil.la \
- $(top_builddir)/addressbook/printing/libecontactprint.a \
- $(top_builddir)/addressbook/backend/ebook/libebook.la \
- $(top_builddir)/e-util/ename/libename.la \
- $(top_builddir)/libversit/libversit.la \
- $(GNOMEGNORBA_LIBS) \
- $(BONOBO_GNOME_LIBS) \
- $(top_builddir)/widgets/misc/libemiscwidgets.a \
- $(top_builddir)/e-util/libeutil.la \
- $(GNOME_PRINT_LIBS) \
- $(EXTRA_GNOME_LIBS)
-
-evolutiondir = $(datadir)/evolution
-
-evolution_DATA = arrow.png
-
-gladedir = $(datadir)/evolution/glade
-
-glade_DATA = \
- contact-editor.glade \
- fulladdr.glade \
- fullname.glade \
- e-contact-editor-confirm-delete.glade
-
-EXTRA_DIST = $(evolution_DATA) \
- $(glade_DATA)
diff --git a/addressbook/gui/contact-editor/arrow.png b/addressbook/gui/contact-editor/arrow.png
deleted file mode 100644
index b102356c78..0000000000
--- a/addressbook/gui/contact-editor/arrow.png
+++ /dev/null
Binary files differ
diff --git a/addressbook/gui/contact-editor/contact-editor.glade b/addressbook/gui/contact-editor/contact-editor.glade
deleted file mode 100644
index c6afe583f5..0000000000
--- a/addressbook/gui/contact-editor/contact-editor.glade
+++ /dev/null
@@ -1,2453 +0,0 @@
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <name>Contact-editor</name>
- <program_name>contact-editor</program_name>
- <directory></directory>
- <source_directory>src</source_directory>
- <pixmaps_directory>pixmaps</pixmaps_directory>
- <language>C</language>
- <gnome_support>True</gnome_support>
- <gettext_support>True</gettext_support>
- <use_widget_names>True</use_widget_names>
- <output_main_file>False</output_main_file>
- <output_support_files>False</output_support_files>
- <output_build_files>False</output_build_files>
- <backup_source_files>False</backup_source_files>
- <main_source_file>interface.c</main_source_file>
- <main_header_file>interface.h</main_header_file>
- <handler_source_file>callbacks.c</handler_source_file>
- <handler_header_file>callbacks.h</handler_header_file>
- <support_source_file>support.c</support_source_file>
- <support_header_file>support.h</support_header_file>
-</project>
-
-<widget>
- <class>GnomeDialog</class>
- <name>dialog2</name>
- <border_width>2</border_width>
- <cxx_use_heap>True</cxx_use_heap>
- <visible>False</visible>
- <type>GTK_WINDOW_TOPLEVEL</type>
- <position>GTK_WIN_POS_NONE</position>
- <modal>False</modal>
- <allow_shrink>False</allow_shrink>
- <allow_grow>False</allow_grow>
- <auto_shrink>False</auto_shrink>
- <auto_close>False</auto_close>
- <hide_on_close>False</hide_on_close>
-
- <widget>
- <class>GtkVBox</class>
- <child_name>GnomeDialog:vbox</child_name>
- <name>dialog-vbox2</name>
- <cxx_use_heap>True</cxx_use_heap>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>4</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkTable</class>
- <name>table2</name>
- <cxx_use_heap>True</cxx_use_heap>
- <rows>2</rows>
- <columns>2</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>0</row_spacing>
- <column_spacing>2</column_spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry2</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>0</left_attach>
- <right_attach>2</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox1</name>
- <cxx_use_heap>True</cxx_use_heap>
- <homogeneous>False</homogeneous>
- <spacing>2</spacing>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>True</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>button31</name>
- <border_width>2</border_width>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <label>_Add</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button32</name>
- <border_width>2</border_width>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <label>_Delete</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkScrolledWindow</class>
- <name>scrolledwindow1</name>
- <height>200</height>
- <cxx_use_heap>True</cxx_use_heap>
- <hscrollbar_policy>GTK_POLICY_ALWAYS</hscrollbar_policy>
- <vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
- <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
- <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>True</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkCList</class>
- <name>clist1</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <columns>1</columns>
- <column_widths>80</column_widths>
- <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
- <show_titles>True</show_titles>
- <shadow_type>GTK_SHADOW_NONE</shadow_type>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>CList:title</child_name>
- <name>label20</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>Phone Types</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHButtonBox</class>
- <child_name>GnomeDialog:action_area</child_name>
- <name>dialog-action_area2</name>
- <cxx_use_heap>True</cxx_use_heap>
- <layout_style>GTK_BUTTONBOX_END</layout_style>
- <spacing>8</spacing>
- <child_min_width>85</child_min_width>
- <child_min_height>27</child_min_height>
- <child_ipad_x>7</child_ipad_x>
- <child_ipad_y>0</child_ipad_y>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- <pack>GTK_PACK_END</pack>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>button28</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button29</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_APPLY</stock_button>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button30</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
- </widget>
- </widget>
- </widget>
-</widget>
-
-<widget>
- <class>GnomeDialog</class>
- <name>dialog-add-phone</name>
- <cxx_use_heap>True</cxx_use_heap>
- <visible>False</visible>
- <title>New phone type</title>
- <type>GTK_WINDOW_TOPLEVEL</type>
- <position>GTK_WIN_POS_NONE</position>
- <modal>False</modal>
- <allow_shrink>False</allow_shrink>
- <allow_grow>False</allow_grow>
- <auto_shrink>False</auto_shrink>
- <auto_close>False</auto_close>
- <hide_on_close>False</hide_on_close>
-
- <widget>
- <class>GtkVBox</class>
- <child_name>GnomeDialog:vbox</child_name>
- <name>vbox2</name>
- <cxx_use_heap>True</cxx_use_heap>
- <homogeneous>False</homogeneous>
- <spacing>8</spacing>
- <child>
- <padding>4</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame-add-phone</name>
- <border_width>4</border_width>
- <cxx_use_heap>True</cxx_use_heap>
- <label>New phone type</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment9</name>
- <border_width>9</border_width>
- <cxx_use_heap>True</cxx_use_heap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xscale>1</xscale>
- <yscale>1</yscale>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-add-phone</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <has_focus>True</has_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHButtonBox</class>
- <child_name>GnomeDialog:action_area</child_name>
- <name>hbuttonbox1</name>
- <cxx_use_heap>True</cxx_use_heap>
- <layout_style>GTK_BUTTONBOX_END</layout_style>
- <spacing>8</spacing>
- <child_min_width>85</child_min_width>
- <child_min_height>27</child_min_height>
- <child_ipad_x>7</child_ipad_x>
- <child_ipad_y>0</child_ipad_y>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- <pack>GTK_PACK_END</pack>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>button43</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_default>True</can_default>
- <has_default>True</has_default>
- <can_focus>True</can_focus>
- <label>Add</label>
- <stock_pixmap>GNOME_STOCK_PIXMAP_ADD</stock_pixmap>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button44</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
- </widget>
- </widget>
- </widget>
-</widget>
-
-<widget>
- <class>GnomeApp</class>
- <name>contact editor</name>
- <cxx_use_heap>True</cxx_use_heap>
- <visible>False</visible>
- <title>Contact Editor</title>
- <type>GTK_WINDOW_TOPLEVEL</type>
- <position>GTK_WIN_POS_NONE</position>
- <modal>False</modal>
- <allow_shrink>False</allow_shrink>
- <allow_grow>True</allow_grow>
- <auto_shrink>False</auto_shrink>
- <enable_layout_config>True</enable_layout_config>
-
- <widget>
- <class>GnomeDock</class>
- <child_name>GnomeApp:dock</child_name>
- <name>dock1</name>
- <cxx_use_heap>True</cxx_use_heap>
- <allow_floating>True</allow_floating>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkNotebook</class>
- <child_name>GnomeDock:contents</child_name>
- <name>notebook-contact-editor</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <show_tabs>True</show_tabs>
- <show_border>True</show_border>
- <tab_pos>GTK_POS_TOP</tab_pos>
- <scrollable>False</scrollable>
- <tab_hborder>2</tab_hborder>
- <tab_vborder>2</tab_vborder>
- <popup_enable>False</popup_enable>
-
- <widget>
- <class>GtkTable</class>
- <name>table-contact-editor-general</name>
- <border_width>7</border_width>
- <cxx_use_heap>True</cxx_use_heap>
- <rows>14</rows>
- <columns>8</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>4</row_spacing>
- <column_spacing>4</column_spacing>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-phone1</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>7</left_attach>
- <right_attach>8</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-phone2</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>7</left_attach>
- <right_attach>8</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-phone3</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>7</left_attach>
- <right_attach>8</right_attach>
- <top_attach>2</top_attach>
- <bottom_attach>3</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-phone4</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>7</left_attach>
- <right_attach>8</right_attach>
- <top_attach>3</top_attach>
- <bottom_attach>4</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkText</class>
- <name>text-address</name>
- <width>1</width>
- <height>1</height>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text></text>
- <child>
- <left_attach>7</left_attach>
- <right_attach>8</right_attach>
- <top_attach>5</top_attach>
- <bottom_attach>9</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button-fullname</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <label>_Full Name...</label>
- <child>
- <left_attach>1</left_attach>
- <right_attach>3</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkAccelLabel</class>
- <name>accellabel-fileas</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>File As:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>1</left_attach>
- <right_attach>3</right_attach>
- <top_attach>3</top_attach>
- <bottom_attach>4</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkAccelLabel</class>
- <name>accellabel-web</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>Web page address:</label>
- <justify>GTK_JUSTIFY_LEFT</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>1</left_attach>
- <right_attach>3</right_attach>
- <top_attach>8</top_attach>
- <bottom_attach>9</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment3</name>
- <cxx_use_heap>True</cxx_use_heap>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xscale>0</xscale>
- <yscale>1</yscale>
- <child>
- <left_attach>2</left_attach>
- <right_attach>3</right_attach>
- <top_attach>5</top_attach>
- <bottom_attach>6</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>button-email1</name>
- <cxx_use_heap>True</cxx_use_heap>
-
- <widget>
- <class>Placeholder</class>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment5</name>
- <cxx_use_heap>True</cxx_use_heap>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xscale>0</xscale>
- <yscale>0</yscale>
- <child>
- <left_attach>6</left_attach>
- <right_attach>7</right_attach>
- <top_attach>3</top_attach>
- <bottom_attach>4</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>button-phone4</name>
- <cxx_use_heap>True</cxx_use_heap>
-
- <widget>
- <class>Placeholder</class>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment7</name>
- <cxx_use_heap>True</cxx_use_heap>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xscale>0</xscale>
- <yscale>0</yscale>
- <child>
- <left_attach>6</left_attach>
- <right_attach>7</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>button-phone2</name>
- <cxx_use_heap>True</cxx_use_heap>
-
- <widget>
- <class>Placeholder</class>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment8</name>
- <cxx_use_heap>True</cxx_use_heap>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xscale>0</xscale>
- <yscale>0</yscale>
- <child>
- <left_attach>6</left_attach>
- <right_attach>7</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>button-phone1</name>
- <cxx_use_heap>True</cxx_use_heap>
-
- <widget>
- <class>Placeholder</class>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHSeparator</class>
- <name>hseparator4</name>
- <cxx_use_heap>True</cxx_use_heap>
- <child>
- <left_attach>4</left_attach>
- <right_attach>8</right_attach>
- <top_attach>4</top_attach>
- <bottom_attach>5</bottom_attach>
- <xpad>0</xpad>
- <ypad>2</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment6</name>
- <cxx_use_heap>True</cxx_use_heap>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xscale>0</xscale>
- <yscale>0</yscale>
- <child>
- <left_attach>6</left_attach>
- <right_attach>7</right_attach>
- <top_attach>2</top_attach>
- <bottom_attach>3</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>button-phone3</name>
- <cxx_use_heap>True</cxx_use_heap>
-
- <widget>
- <class>Placeholder</class>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-fullname</name>
- <cxx_use_heap>True</cxx_use_heap>
- <has_default>True</has_default>
- <can_focus>True</can_focus>
- <has_focus>True</has_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>3</left_attach>
- <right_attach>4</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-jobtitle</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>3</left_attach>
- <right_attach>4</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-company</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>3</left_attach>
- <right_attach>4</right_attach>
- <top_attach>2</top_attach>
- <bottom_attach>3</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-email1</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>3</left_attach>
- <right_attach>4</right_attach>
- <top_attach>5</top_attach>
- <bottom_attach>6</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-web</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>3</left_attach>
- <right_attach>4</right_attach>
- <top_attach>8</top_attach>
- <bottom_attach>9</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkHSeparator</class>
- <name>hseparator5</name>
- <cxx_use_heap>True</cxx_use_heap>
- <child>
- <left_attach>0</left_attach>
- <right_attach>4</right_attach>
- <top_attach>4</top_attach>
- <bottom_attach>5</bottom_attach>
- <xpad>0</xpad>
- <ypad>2</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkCombo</class>
- <name>combo-file-as</name>
- <cxx_use_heap>True</cxx_use_heap>
- <value_in_list>False</value_in_list>
- <ok_if_empty>True</ok_if_empty>
- <case_sensitive>True</case_sensitive>
- <use_arrows>True</use_arrows>
- <use_arrows_always>False</use_arrows_always>
- <items></items>
- <child>
- <left_attach>3</left_attach>
- <right_attach>4</right_attach>
- <top_attach>3</top_attach>
- <bottom_attach>4</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
-
- <widget>
- <class>GtkEntry</class>
- <child_name>GtkCombo:entry</child_name>
- <name>entry-file-as</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHSeparator</class>
- <name>hseparator6</name>
- <cxx_use_heap>True</cxx_use_heap>
- <child>
- <left_attach>0</left_attach>
- <right_attach>4</right_attach>
- <top_attach>7</top_attach>
- <bottom_attach>8</bottom_attach>
- <xpad>0</xpad>
- <ypad>2</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment10</name>
- <cxx_use_heap>True</cxx_use_heap>
- <xalign>0.5</xalign>
- <yalign>0</yalign>
- <xscale>1</xscale>
- <yscale>1</yscale>
- <child>
- <left_attach>3</left_attach>
- <right_attach>4</right_attach>
- <top_attach>6</top_attach>
- <bottom_attach>7</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>True</xshrink>
- <yshrink>True</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>checkbutton-htmlmail</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>Wants to receive _HTML mail</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- </widget>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment4</name>
- <cxx_use_heap>True</cxx_use_heap>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xscale>0</xscale>
- <yscale>0</yscale>
- <child>
- <left_attach>6</left_attach>
- <right_attach>7</right_attach>
- <top_attach>5</top_attach>
- <bottom_attach>6</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>button-address</name>
- <cxx_use_heap>True</cxx_use_heap>
-
- <widget>
- <class>Placeholder</class>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkEventBox</class>
- <name>eventbox1</name>
- <cxx_use_heap>True</cxx_use_heap>
- <child>
- <left_attach>5</left_attach>
- <right_attach>6</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label-phone1</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>_Business</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
-
- <widget>
- <class>GtkEventBox</class>
- <name>eventbox2</name>
- <cxx_use_heap>True</cxx_use_heap>
- <child>
- <left_attach>5</left_attach>
- <right_attach>6</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label-phone2</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>_Home</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>entry-phone2</focus_target>
- </widget>
- </widget>
-
- <widget>
- <class>GtkEventBox</class>
- <name>eventbox3</name>
- <cxx_use_heap>True</cxx_use_heap>
- <child>
- <left_attach>5</left_attach>
- <right_attach>6</right_attach>
- <top_attach>2</top_attach>
- <bottom_attach>3</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label-phone3</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>Business _Fax</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>entry-phone3</focus_target>
- </widget>
- </widget>
-
- <widget>
- <class>GtkEventBox</class>
- <name>eventbox4</name>
- <cxx_use_heap>True</cxx_use_heap>
- <child>
- <left_attach>5</left_attach>
- <right_attach>6</right_attach>
- <top_attach>3</top_attach>
- <bottom_attach>4</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label-phone4</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>_Mobile</label>
- <justify>GTK_JUSTIFY_LEFT</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>entry-phone4</focus_target>
- </widget>
- </widget>
-
- <widget>
- <class>GtkEventBox</class>
- <name>eventbox5</name>
- <cxx_use_heap>True</cxx_use_heap>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>5</top_attach>
- <bottom_attach>6</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label-email1</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>Primary Email</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>entry-email1</focus_target>
- </widget>
- </widget>
-
- <widget>
- <class>GtkEventBox</class>
- <name>eventbox-business</name>
- <cxx_use_heap>True</cxx_use_heap>
- <child>
- <left_attach>5</left_attach>
- <right_attach>6</right_attach>
- <top_attach>5</top_attach>
- <bottom_attach>6</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label-address</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>B_usiness</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>text-address</focus_target>
- </widget>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment2</name>
- <cxx_use_heap>True</cxx_use_heap>
- <xalign>0</xalign>
- <yalign>0</yalign>
- <xscale>0</xscale>
- <yscale>0</yscale>
- <child>
- <left_attach>7</left_attach>
- <right_attach>8</right_attach>
- <top_attach>9</top_attach>
- <bottom_attach>10</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>checkbutton-mailingaddress</name>
- <cxx_use_heap>True</cxx_use_heap>
- <visible>False</visible>
- <label>_This is the mailing address</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHSeparator</class>
- <name>hseparator9</name>
- <cxx_use_heap>True</cxx_use_heap>
- <child>
- <left_attach>0</left_attach>
- <right_attach>4</right_attach>
- <top_attach>11</top_attach>
- <bottom_attach>12</bottom_attach>
- <xpad>0</xpad>
- <ypad>2</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkHSeparator</class>
- <name>hseparator10</name>
- <cxx_use_heap>True</cxx_use_heap>
- <child>
- <left_attach>4</left_attach>
- <right_attach>8</right_attach>
- <top_attach>11</top_attach>
- <bottom_attach>12</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment-contacts</name>
- <cxx_use_heap>True</cxx_use_heap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xscale>1</xscale>
- <yscale>0</yscale>
- <child>
- <left_attach>1</left_attach>
- <right_attach>3</right_attach>
- <top_attach>12</top_attach>
- <bottom_attach>13</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>button-contacts</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <label>C_ontacts...</label>
- </widget>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment15</name>
- <cxx_use_heap>True</cxx_use_heap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xscale>1</xscale>
- <yscale>0</yscale>
- <child>
- <left_attach>7</left_attach>
- <right_attach>8</right_attach>
- <top_attach>12</top_attach>
- <bottom_attach>13</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-categories</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- </widget>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment14</name>
- <cxx_use_heap>True</cxx_use_heap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xscale>1</xscale>
- <yscale>0</yscale>
- <child>
- <left_attach>3</left_attach>
- <right_attach>4</right_attach>
- <top_attach>12</top_attach>
- <bottom_attach>13</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-contacts</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- </widget>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment16</name>
- <cxx_use_heap>True</cxx_use_heap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xscale>1</xscale>
- <yscale>0</yscale>
- <child>
- <left_attach>5</left_attach>
- <right_attach>7</right_attach>
- <top_attach>12</top_attach>
- <bottom_attach>13</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>button-categories</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <label>Ca_tegories...</label>
- </widget>
- </widget>
-
- <widget>
- <class>GtkEventBox</class>
- <name>eventbox7</name>
- <cxx_use_heap>True</cxx_use_heap>
- <child>
- <left_attach>1</left_attach>
- <right_attach>3</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label-jobtitle</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>_Job title:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>entry-jobtitle</focus_target>
- </widget>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>custom1</name>
- <cxx_use_heap>True</cxx_use_heap>
- <creation_function>e_create_image_widget</creation_function>
- <string1>malehead.png</string1>
- <string2></string2>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Thu, 18 May 2000 12:19:47 GMT</last_modification_time>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>4</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>custom2</name>
- <cxx_use_heap>True</cxx_use_heap>
- <creation_function>e_create_image_widget</creation_function>
- <string1>cellphone.png</string1>
- <string2></string2>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Thu, 18 May 2000 12:20:02 GMT</last_modification_time>
- <child>
- <left_attach>4</left_attach>
- <right_attach>5</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>4</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>custom3</name>
- <cxx_use_heap>True</cxx_use_heap>
- <creation_function>e_create_image_widget</creation_function>
- <string1>envelope.png</string1>
- <string2></string2>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Thu, 18 May 2000 12:19:51 GMT</last_modification_time>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>5</top_attach>
- <bottom_attach>7</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>custom4</name>
- <cxx_use_heap>True</cxx_use_heap>
- <creation_function>e_create_image_widget</creation_function>
- <string1>house.png</string1>
- <string2></string2>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Thu, 18 May 2000 12:20:06 GMT</last_modification_time>
- <child>
- <left_attach>4</left_attach>
- <right_attach>5</right_attach>
- <top_attach>5</top_attach>
- <bottom_attach>10</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>custom5</name>
- <cxx_use_heap>True</cxx_use_heap>
- <creation_function>e_create_image_widget</creation_function>
- <string1>evolution-contacts-plain.png</string1>
- <string2></string2>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Thu, 18 May 2000 12:19:59 GMT</last_modification_time>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>12</top_attach>
- <bottom_attach>14</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>custom6</name>
- <cxx_use_heap>True</cxx_use_heap>
- <creation_function>e_create_image_widget</creation_function>
- <string1>briefcase.png</string1>
- <string2></string2>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Thu, 18 May 2000 12:20:09 GMT</last_modification_time>
- <child>
- <left_attach>4</left_attach>
- <right_attach>5</right_attach>
- <top_attach>12</top_attach>
- <bottom_attach>14</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>custom10</name>
- <cxx_use_heap>True</cxx_use_heap>
- <creation_function>e_create_image_widget</creation_function>
- <string1>globe.png</string1>
- <string2></string2>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Thu, 18 May 2000 12:19:56 GMT</last_modification_time>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>8</top_attach>
- <bottom_attach>10</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label-company</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>_Company:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>entry-company</focus_target>
- <child>
- <left_attach>1</left_attach>
- <right_attach>3</right_attach>
- <top_attach>2</top_attach>
- <bottom_attach>3</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button-fulladdr</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <label>_Address...</label>
- <child>
- <left_attach>5</left_attach>
- <right_attach>7</right_attach>
- <top_attach>6</top_attach>
- <bottom_attach>7</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label15</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>General</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
-
- <widget>
- <class>GtkTable</class>
- <name>table-contact-editor-details</name>
- <border_width>7</border_width>
- <cxx_use_heap>True</cxx_use_heap>
- <rows>9</rows>
- <columns>6</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>4</row_spacing>
- <column_spacing>4</column_spacing>
-
- <widget>
- <class>GtkLabel</class>
- <name>label-department</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>_Department:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>entry-department</focus_target>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label-office</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>_Office:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>entry-office</focus_target>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label-profession</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>_Profession:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>entry-profession</focus_target>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>2</top_attach>
- <bottom_attach>3</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label-nickname</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>_Nickname:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>entry-nickname</focus_target>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>4</top_attach>
- <bottom_attach>5</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label-spouse</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>_Spouse:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>entry-spouse</focus_target>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>5</top_attach>
- <bottom_attach>6</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label-birthday</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>_Birthday:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>3</left_attach>
- <right_attach>4</right_attach>
- <top_attach>4</top_attach>
- <bottom_attach>5</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label-assistant</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>_Assistant's name:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>entry-assistant</focus_target>
- <child>
- <left_attach>3</left_attach>
- <right_attach>4</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label-manager</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>_Manager's Name:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>entry-manager</focus_target>
- <child>
- <left_attach>3</left_attach>
- <right_attach>4</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label-anniversary</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>Anni_versary:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>3</left_attach>
- <right_attach>4</right_attach>
- <top_attach>5</top_attach>
- <bottom_attach>6</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-spouse</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>2</left_attach>
- <right_attach>3</right_attach>
- <top_attach>5</top_attach>
- <bottom_attach>6</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-department</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>2</left_attach>
- <right_attach>3</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-office</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>2</left_attach>
- <right_attach>3</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-profession</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>2</left_attach>
- <right_attach>3</right_attach>
- <top_attach>2</top_attach>
- <bottom_attach>3</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-nickname</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>2</left_attach>
- <right_attach>3</right_attach>
- <top_attach>4</top_attach>
- <bottom_attach>5</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GnomeDateEdit</class>
- <name>dateedit-anniversary</name>
- <cxx_use_heap>True</cxx_use_heap>
- <show_time>False</show_time>
- <use_24_format>False</use_24_format>
- <week_start_monday>False</week_start_monday>
- <lower_hour>7</lower_hour>
- <upper_hour>19</upper_hour>
- <child>
- <left_attach>4</left_attach>
- <right_attach>6</right_attach>
- <top_attach>5</top_attach>
- <bottom_attach>6</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GnomeDateEdit</class>
- <name>dateedit-birthday</name>
- <cxx_use_heap>True</cxx_use_heap>
- <show_time>False</show_time>
- <use_24_format>False</use_24_format>
- <week_start_monday>False</week_start_monday>
- <lower_hour>7</lower_hour>
- <upper_hour>19</upper_hour>
- <child>
- <left_attach>4</left_attach>
- <right_attach>6</right_attach>
- <top_attach>4</top_attach>
- <bottom_attach>5</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-assistant</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>4</left_attach>
- <right_attach>6</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-manager</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>4</left_attach>
- <right_attach>6</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkHSeparator</class>
- <name>hseparator7</name>
- <cxx_use_heap>True</cxx_use_heap>
- <child>
- <left_attach>0</left_attach>
- <right_attach>6</right_attach>
- <top_attach>3</top_attach>
- <bottom_attach>4</bottom_attach>
- <xpad>0</xpad>
- <ypad>2</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label-comments</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>No_tes:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>7</top_attach>
- <bottom_attach>8</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkHSeparator</class>
- <name>hseparator8</name>
- <cxx_use_heap>True</cxx_use_heap>
- <child>
- <left_attach>0</left_attach>
- <right_attach>6</right_attach>
- <top_attach>6</top_attach>
- <bottom_attach>7</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>custom7</name>
- <cxx_use_heap>True</cxx_use_heap>
- <creation_function>e_create_image_widget</creation_function>
- <string1>briefcase.png</string1>
- <string2></string2>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Thu, 18 May 2000 12:20:13 GMT</last_modification_time>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>custom8</name>
- <cxx_use_heap>True</cxx_use_heap>
- <creation_function>e_create_image_widget</creation_function>
- <string1>malehead.png</string1>
- <string2></string2>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Thu, 18 May 2000 12:20:16 GMT</last_modification_time>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>4</top_attach>
- <bottom_attach>6</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkScrolledWindow</class>
- <name>scrolledwindow2</name>
- <cxx_use_heap>True</cxx_use_heap>
- <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
- <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
- <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
- <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
- <child>
- <left_attach>1</left_attach>
- <right_attach>6</right_attach>
- <top_attach>8</top_attach>
- <bottom_attach>9</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>True</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkText</class>
- <name>text-comments</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text></text>
- </widget>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>custom9</name>
- <cxx_use_heap>True</cxx_use_heap>
- <creation_function>e_create_image_widget</creation_function>
- <string1>globe.png</string1>
- <string2></string2>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Thu, 18 May 2000 12:20:19 GMT</last_modification_time>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>7</top_attach>
- <bottom_attach>9</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label16</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>Details</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GnomeAppBar</class>
- <child_name>GnomeApp:appbar</child_name>
- <name>appbar1</name>
- <cxx_use_heap>True</cxx_use_heap>
- <has_progress>True</has_progress>
- <has_status>True</has_status>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
-</widget>
-
-</GTK-Interface>
diff --git a/addressbook/gui/contact-editor/e-contact-editor-address.c b/addressbook/gui/contact-editor/e-contact-editor-address.c
deleted file mode 100644
index 777a3cb617..0000000000
--- a/addressbook/gui/contact-editor/e-contact-editor-address.c
+++ /dev/null
@@ -1,243 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-contact-editor-address.c
- * Copyright (C) 2000 Helix Code, Inc.
- * Author: Chris Lahey <clahey@helixcode.com>
- *
- * 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 <libgnomeui/gnome-stock.h>
-#include <gal/widgets/e-unicode.h>
-#include <e-contact-editor-address.h>
-
-static void e_contact_editor_address_init (EContactEditorAddress *card);
-static void e_contact_editor_address_class_init (EContactEditorAddressClass *klass);
-static void e_contact_editor_address_set_arg (GtkObject *o, GtkArg *arg, guint arg_id);
-static void e_contact_editor_address_get_arg (GtkObject *object, GtkArg *arg, guint arg_id);
-static void e_contact_editor_address_destroy (GtkObject *object);
-
-static void fill_in_info(EContactEditorAddress *editor);
-static void extract_info(EContactEditorAddress *editor);
-
-static GnomeDialogClass *parent_class = NULL;
-
-/* The arguments we take */
-enum {
- ARG_0,
- ARG_ADDRESS,
- ARG_IS_READ_ONLY
-};
-
-GtkType
-e_contact_editor_address_get_type (void)
-{
- static GtkType contact_editor_address_type = 0;
-
- if (!contact_editor_address_type)
- {
- static const GtkTypeInfo contact_editor_address_info =
- {
- "EContactEditorAddress",
- sizeof (EContactEditorAddress),
- sizeof (EContactEditorAddressClass),
- (GtkClassInitFunc) e_contact_editor_address_class_init,
- (GtkObjectInitFunc) e_contact_editor_address_init,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
- };
-
- contact_editor_address_type = gtk_type_unique (gnome_dialog_get_type (), &contact_editor_address_info);
- }
-
- return contact_editor_address_type;
-}
-
-static void
-e_contact_editor_address_class_init (EContactEditorAddressClass *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 ("EContactEditorAddress::address", GTK_TYPE_POINTER,
- GTK_ARG_READWRITE, ARG_ADDRESS);
- gtk_object_add_arg_type ("EContactEditorAddress::is_read_only", GTK_TYPE_BOOL,
- GTK_ARG_READWRITE, ARG_IS_READ_ONLY);
-
- object_class->set_arg = e_contact_editor_address_set_arg;
- object_class->get_arg = e_contact_editor_address_get_arg;
- object_class->destroy = e_contact_editor_address_destroy;
-}
-
-static void
-e_contact_editor_address_init (EContactEditorAddress *e_contact_editor_address)
-{
- GladeXML *gui;
- GtkWidget *widget;
-
- gnome_dialog_append_button ( GNOME_DIALOG(e_contact_editor_address),
- GNOME_STOCK_BUTTON_OK);
-
- gnome_dialog_append_button ( GNOME_DIALOG(e_contact_editor_address),
- GNOME_STOCK_BUTTON_CANCEL);
-
- gtk_window_set_policy(GTK_WINDOW(e_contact_editor_address), FALSE, TRUE, FALSE);
-
- e_contact_editor_address->address = NULL;
-
- gui = glade_xml_new (EVOLUTION_GLADEDIR "/fulladdr.glade", NULL);
- e_contact_editor_address->gui = gui;
-
- widget = glade_xml_get_widget(gui, "table-checkaddress");
- gtk_widget_ref(widget);
- gtk_container_remove(GTK_CONTAINER(widget->parent), widget);
- gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (e_contact_editor_address)->vbox), widget, TRUE, TRUE, 0);
- gtk_widget_unref(widget);
-}
-
-void
-e_contact_editor_address_destroy (GtkObject *object)
-{
- EContactEditorAddress *e_contact_editor_address = E_CONTACT_EDITOR_ADDRESS(object);
-
- if (e_contact_editor_address->gui)
- gtk_object_unref(GTK_OBJECT(e_contact_editor_address->gui));
- e_card_delivery_address_free(e_contact_editor_address->address);
-}
-
-GtkWidget*
-e_contact_editor_address_new (const ECardDeliveryAddress *address)
-{
- GtkWidget *widget = GTK_WIDGET (gtk_type_new (e_contact_editor_address_get_type ()));
- gtk_object_set (GTK_OBJECT(widget),
- "address", address,
- NULL);
- return widget;
-}
-
-static void
-e_contact_editor_address_set_arg (GtkObject *o, GtkArg *arg, guint arg_id)
-{
- EContactEditorAddress *e_contact_editor_address;
-
- e_contact_editor_address = E_CONTACT_EDITOR_ADDRESS (o);
-
- switch (arg_id){
- case ARG_ADDRESS:
- if (e_contact_editor_address->address)
- e_card_delivery_address_free(e_contact_editor_address->address);
- e_contact_editor_address->address = e_card_delivery_address_copy(GTK_VALUE_POINTER (*arg));
- fill_in_info(e_contact_editor_address);
- break;
- case ARG_IS_READ_ONLY: {
- int i;
- char *entry_names[] = {
- "entry-street",
- "entry-city",
- "entry-ext",
- "entry-po",
- "entry-region",
- "combo-country",
- "entry-code",
- NULL
- };
- e_contact_editor_address->is_read_only = GTK_VALUE_BOOL (*arg) ? TRUE : FALSE;
- for (i = 0; entry_names[i] != NULL; i ++) {
- gtk_widget_set_sensitive (glade_xml_get_widget(e_contact_editor_address->gui, entry_names[i]), !e_contact_editor_address->is_read_only);
- }
- break;
- }
- }
-}
-
-static void
-e_contact_editor_address_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
-{
- EContactEditorAddress *e_contact_editor_address;
-
- e_contact_editor_address = E_CONTACT_EDITOR_ADDRESS (object);
-
- switch (arg_id) {
- case ARG_ADDRESS:
- extract_info(e_contact_editor_address);
- GTK_VALUE_POINTER (*arg) = e_card_delivery_address_copy(e_contact_editor_address->address);
- break;
- case ARG_IS_READ_ONLY:
- GTK_VALUE_BOOL (*arg) = e_contact_editor_address->is_read_only ? TRUE : FALSE;
- break;
- default:
- arg->type = GTK_TYPE_INVALID;
- break;
- }
-}
-
-static void
-fill_in_field(EContactEditorAddress *editor, char *field, char *string)
-{
- GtkEditable *editable = GTK_EDITABLE(glade_xml_get_widget(editor->gui, field));
- if (editable) {
- e_utf8_gtk_editable_set_text(editable, string);
- }
-}
-
-static void
-fill_in_info(EContactEditorAddress *editor)
-{
- ECardDeliveryAddress *address = editor->address;
- if (address) {
- fill_in_field(editor, "entry-street" , address->street );
- fill_in_field(editor, "entry-po" , address->po );
- fill_in_field(editor, "entry-ext" , address->ext );
- fill_in_field(editor, "entry-city" , address->city );
- fill_in_field(editor, "entry-region" , address->region );
- fill_in_field(editor, "entry-code" , address->code );
- fill_in_field(editor, "entry-country", address->country);
- }
-}
-
-static char *
-extract_field(EContactEditorAddress *editor, char *field)
-{
- GtkEditable *editable = GTK_EDITABLE(glade_xml_get_widget(editor->gui, field));
- if (editable)
- return e_utf8_gtk_editable_get_text(editable);
- else
- return NULL;
-}
-
-static void
-extract_info(EContactEditorAddress *editor)
-{
- ECardDeliveryAddress *address = editor->address;
- if (!address) {
- address = e_card_delivery_address_new();
- editor->address = address;
- }
- address->street = extract_field(editor, "entry-street" );
- address->po = extract_field(editor, "entry-po" );
- address->ext = extract_field(editor, "entry-ext" );
- address->city = extract_field(editor, "entry-city" );
- address->region = extract_field(editor, "entry-region" );
- address->code = extract_field(editor, "entry-code" );
- address->country = extract_field(editor, "entry-country");
-}
diff --git a/addressbook/gui/contact-editor/e-contact-editor-address.h b/addressbook/gui/contact-editor/e-contact-editor-address.h
deleted file mode 100644
index 48d88aab85..0000000000
--- a/addressbook/gui/contact-editor/e-contact-editor-address.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* e-contact-editor-address.h
- * Copyright (C) 2000 Helix Code, Inc.
- * Author: Chris Lahey <clahey@helixcode.com>
- *
- * 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_ADDRESS_H__
-#define __E_CONTACT_EDITOR_ADDRESS_H__
-
-#include <libgnomeui/gnome-dialog.h>
-#include <glade/glade.h>
-#include <ebook/e-card.h>
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-/* EContactEditorAddress - 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_ADDRESS_TYPE (e_contact_editor_address_get_type ())
-#define E_CONTACT_EDITOR_ADDRESS(obj) (GTK_CHECK_CAST ((obj), E_CONTACT_EDITOR_ADDRESS_TYPE, EContactEditorAddress))
-#define E_CONTACT_EDITOR_ADDRESS_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_CONTACT_EDITOR_ADDRESS_TYPE, EContactEditorAddressClass))
-#define E_IS_CONTACT_EDITOR_ADDRESS(obj) (GTK_CHECK_TYPE ((obj), E_CONTACT_EDITOR_ADDRESS_TYPE))
-#define E_IS_CONTACT_EDITOR_ADDRESS_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_CONTACT_EDITOR_ADDRESS_TYPE))
-
-
-typedef struct _EContactEditorAddress EContactEditorAddress;
-typedef struct _EContactEditorAddressClass EContactEditorAddressClass;
-
-struct _EContactEditorAddress
-{
- GnomeDialog parent;
-
- /* item specific fields */
- ECardDeliveryAddress *address;
-
- guint is_read_only : 1;
-
- GladeXML *gui;
-};
-
-struct _EContactEditorAddressClass
-{
- GnomeDialogClass parent_class;
-};
-
-
-GtkWidget *e_contact_editor_address_new(const ECardDeliveryAddress *name);
-GtkType e_contact_editor_address_get_type (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-#endif /* __E_CONTACT_EDITOR_ADDRESS_H__ */
diff --git a/addressbook/gui/contact-editor/e-contact-editor-confirm-delete.glade b/addressbook/gui/contact-editor/e-contact-editor-confirm-delete.glade
deleted file mode 100644
index b91a040d46..0000000000
--- a/addressbook/gui/contact-editor/e-contact-editor-confirm-delete.glade
+++ /dev/null
@@ -1,83 +0,0 @@
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <name>e-contact-editor-confirm-delete</name>
- <program_name>e-contact-editor-confirm-delete</program_name>
- <directory></directory>
- <source_directory>src</source_directory>
- <pixmaps_directory>pixmaps</pixmaps_directory>
- <language>C</language>
- <gnome_support>True</gnome_support>
- <gettext_support>True</gettext_support>
- <use_widget_names>True</use_widget_names>
- <output_main_file>False</output_main_file>
- <output_support_files>False</output_support_files>
- <output_build_files>False</output_build_files>
- <gnome_help_support>True</gnome_help_support>
-</project>
-
-<widget>
- <class>GnomeMessageBox</class>
- <name>confirm-dialog</name>
- <message_box_type>GNOME_MESSAGE_BOX_QUESTION</message_box_type>
- <message>Are you sure you want
-to delete this contact?</message>
- <title>Delete Contact?</title>
- <position>GTK_WIN_POS_NONE</position>
- <modal>False</modal>
- <allow_shrink>False</allow_shrink>
- <allow_grow>False</allow_grow>
- <auto_shrink>False</auto_shrink>
- <auto_close>True</auto_close>
- <hide_on_close>False</hide_on_close>
-
- <widget>
- <class>GtkVBox</class>
- <child_name>GnomeDialog:vbox</child_name>
- <name>dialog-vbox1</name>
- <homogeneous>False</homogeneous>
- <spacing>8</spacing>
- <child>
- <padding>4</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkHButtonBox</class>
- <child_name>GnomeDialog:action_area</child_name>
- <name>dialog-action_area1</name>
- <layout_style>GTK_BUTTONBOX_END</layout_style>
- <spacing>8</spacing>
- <child_min_width>85</child_min_width>
- <child_min_height>27</child_min_height>
- <child_ipad_x>7</child_ipad_x>
- <child_ipad_y>0</child_ipad_y>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- <pack>GTK_PACK_END</pack>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>button1</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button2</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
- </widget>
- </widget>
- </widget>
-</widget>
-
-</GTK-Interface>
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 69477d3325..0000000000
--- a/addressbook/gui/contact-editor/e-contact-editor-fullname.c
+++ /dev/null
@@ -1,243 +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 <clahey@helixcode.com>
- *
- * 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 <libgnomeui/gnome-stock.h>
-#include <gal/widgets/e-unicode.h>
-#include "e-contact-editor-fullname.h"
-
-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,
- ARG_IS_READ_ONLY
-};
-
-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);
-
- gtk_object_add_arg_type ("EContactEditorFullname::is_read_only", GTK_TYPE_BOOL,
- GTK_ARG_READWRITE, ARG_IS_READ_ONLY);
-
- 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 (const 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;
- case ARG_IS_READ_ONLY: {
- int i;
- char *entry_names[] = {
- "combo-title",
- "combo-suffix",
- "entry-first",
- "entry-middle",
- "entry-last",
- NULL
- };
- e_contact_editor_fullname->is_read_only = GTK_VALUE_BOOL (*arg) ? TRUE : FALSE;
- for (i = 0; entry_names[i] != NULL; i ++) {
- gtk_widget_set_sensitive (glade_xml_get_widget(e_contact_editor_fullname->gui,
- entry_names[i]),
- !e_contact_editor_fullname->is_read_only);
- }
- 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;
- case ARG_IS_READ_ONLY:
- GTK_VALUE_BOOL (*arg) = e_contact_editor_fullname->is_read_only ? TRUE : FALSE;
- 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)
- e_utf8_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 e_utf8_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();
- editor->name = name;
- }
-
- 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 70bb793d0a..0000000000
--- a/addressbook/gui/contact-editor/e-contact-editor-fullname.h
+++ /dev/null
@@ -1,78 +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 <clahey@helixcode.com>
- *
- * 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 <libgnomeui/gnome-dialog.h>
-#include <glade/glade.h>
-#include <ebook/e-card.h>
-
-#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;
-
- /* Whether the dialog will accept modifications */
- guint is_read_only : 1;
-};
-
-struct _EContactEditorFullnameClass
-{
- GnomeDialogClass parent_class;
-};
-
-
-GtkWidget *e_contact_editor_fullname_new(const 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.c b/addressbook/gui/contact-editor/e-contact-editor.c
deleted file mode 100644
index 8c9b7519a3..0000000000
--- a/addressbook/gui/contact-editor/e-contact-editor.c
+++ /dev/null
@@ -1,2125 +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 <clahey@helixcode.com>
- *
- * 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 <time.h>
-#include <gtk/gtkcheckbutton.h>
-#include <gtk/gtkcheckmenuitem.h>
-#include <gtk/gtkcombo.h>
-#include <gtk/gtktext.h>
-#include <libgnomeui/gnome-popup-menu.h>
-#include <libgnomeui/gnome-dateedit.h>
-#include <libgnome/gnome-i18n.h>
-
-#include <bonobo/bonobo-ui-container.h>
-#include <bonobo/bonobo-ui-util.h>
-#include <gdk-pixbuf/gdk-pixbuf.h>
-#include <gdk-pixbuf/gnome-canvas-pixbuf.h>
-#include <gal/widgets/e-categories.h>
-#include <gal/widgets/e-gui-utils.h>
-#include <gal/widgets/e-unicode.h>
-
-#include "addressbook/printing/e-contact-print.h"
-#include "addressbook/printing/e-contact-print-envelope.h"
-#include "e-util/e-gui-utils.h"
-
-#include "e-contact-editor.h"
-#include "e-contact-editor-address.h"
-#include "e-contact-editor-fullname.h"
-#include "e-contact-save-as.h"
-
-/* Signal IDs */
-enum {
- ADD_CARD,
- COMMIT_CARD,
- DELETE_CARD,
- EDITOR_CLOSED,
- LAST_SIGNAL
-};
-
-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 enable_writable_fields(EContactEditor *editor);
-static void set_read_only(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 GtkObjectClass *parent_class = NULL;
-
-static guint contact_editor_signals[LAST_SIGNAL];
-
-/* The arguments we take */
-enum {
- ARG_0,
- ARG_CARD,
- ARG_IS_NEW_CARD,
- ARG_IS_READ_ONLY,
- ARG_WRITABLE_FIELDS
-};
-
-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_TYPE_OBJECT, &contact_editor_info);
- }
-
- return contact_editor_type;
-}
-
-static void
-e_contact_editor_class_init (EContactEditorClass *klass)
-{
- GtkObjectClass *object_class;
-
- object_class = (GtkObjectClass*) klass;
-
- parent_class = gtk_type_class (GTK_TYPE_OBJECT);
-
- gtk_object_add_arg_type ("EContactEditor::card", GTK_TYPE_OBJECT,
- GTK_ARG_READWRITE, ARG_CARD);
- gtk_object_add_arg_type ("EContactEditor::is_new_card", GTK_TYPE_BOOL,
- GTK_ARG_READWRITE, ARG_IS_NEW_CARD);
- gtk_object_add_arg_type ("EContactEditor::writable_fields", GTK_TYPE_POINTER,
- GTK_ARG_READWRITE, ARG_WRITABLE_FIELDS);
- gtk_object_add_arg_type ("EContactEditor::is_read_only", GTK_TYPE_BOOL,
- GTK_ARG_READWRITE, ARG_IS_READ_ONLY);
-
- contact_editor_signals[ADD_CARD] =
- gtk_signal_new ("add_card",
- GTK_RUN_FIRST,
- object_class->type,
- GTK_SIGNAL_OFFSET (EContactEditorClass, add_card),
- gtk_marshal_NONE__OBJECT,
- GTK_TYPE_NONE, 1,
- GTK_TYPE_OBJECT);
-
- contact_editor_signals[COMMIT_CARD] =
- gtk_signal_new ("commit_card",
- GTK_RUN_FIRST,
- object_class->type,
- GTK_SIGNAL_OFFSET (EContactEditorClass, commit_card),
- gtk_marshal_NONE__OBJECT,
- GTK_TYPE_NONE, 1,
- GTK_TYPE_OBJECT);
-
- contact_editor_signals[DELETE_CARD] =
- gtk_signal_new ("delete_card",
- GTK_RUN_FIRST,
- object_class->type,
- GTK_SIGNAL_OFFSET (EContactEditorClass, delete_card),
- gtk_marshal_NONE__OBJECT,
- GTK_TYPE_NONE, 1,
- GTK_TYPE_OBJECT);
-
- contact_editor_signals[EDITOR_CLOSED] =
- gtk_signal_new ("editor_closed",
- GTK_RUN_FIRST,
- object_class->type,
- GTK_SIGNAL_OFFSET (EContactEditorClass, editor_closed),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
-
- gtk_object_class_add_signals (object_class, contact_editor_signals, LAST_SIGNAL);
-
- 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", EVOLUTIONDIR, 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
-wants_html_changed (GtkWidget *widget, EContactEditor *editor)
-{
- gboolean wants_html;
- gtk_object_get(GTK_OBJECT(widget),
- "active", &wants_html,
- NULL);
- gtk_object_set(GTK_OBJECT(editor->card),
- "wants_html", wants_html,
- NULL);
-}
-
-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 = e_utf8_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);
-#if 0
- phone->number = NULL;
-#endif
- 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 = e_utf8_gtk_entry_get_text(entry);
-
- e_card_simple_set_email(editor->simple, editor->email_choice, string);
-
- g_free (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 = e_utf8_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 && ((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) {
- 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) {
- 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) {
- 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;
- char *trystring;
- ECardName *name = editor->name;
- int i;
- int style;
-
- if (!(file_as && GTK_IS_ENTRY(file_as)))
- return -1;
-
- filestring = e_utf8_gtk_entry_get_text(file_as);
-
- style = -1;
- for (i = 0; i < 5; i++) {
- trystring = name_to_style(name, editor->company, i);
- if (!strcmp(trystring, filestring)) {
- g_free(trystring);
- g_free(filestring);
- return i;
- }
- g_free(trystring);
- }
- g_free (filestring);
- 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 (!(file_as && GTK_IS_ENTRY(file_as)))
- return;
-
- if (style == -1) {
- string = e_utf8_gtk_entry_get_text(file_as);
- strings = g_list_append(strings, string);
- }
-
- widget = glade_xml_get_widget(editor->gui, "combo-file-as");
-
- for (i = 0; i < 5; i++) {
- if (style_makes_sense(editor->name, editor->company, i)) {
- char *u;
- u = name_to_style(editor->name, editor->company, i);
- string = e_utf8_to_gtk_string (widget, u);
- g_free (u);
- if (string) strings = g_list_append(strings, string);
- }
- }
-
- 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);
- e_utf8_gtk_entry_set_text(file_as, string);
- g_free(string);
- }
-}
-
-static void
-name_entry_changed (GtkWidget *widget, EContactEditor *editor)
-{
- int style = 0;
- char *string;
-
- style = file_as_get_style(editor);
-
- e_card_name_free(editor->name);
-
- string = e_utf8_gtk_entry_get_text (GTK_ENTRY(widget));
- editor->name = e_card_name_from_string(string);
- g_free (string);
-
- file_as_set_style(editor, style);
-}
-
-static void
-company_entry_changed (GtkWidget *widget, EContactEditor *editor)
-{
- int style = 0;
-
- style = file_as_get_style(editor);
-
- g_free(editor->company);
-
- editor->company = e_utf8_gtk_entry_get_text(GTK_ENTRY(widget));
-
- 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_object_set (GTK_OBJECT (dialog),
- "is_read_only", editor->is_read_only,
- NULL);
- gtk_widget_show(GTK_WIDGET(dialog));
- result = gnome_dialog_run (dialog);
-
- if (result == 0) {
- ECardName *name;
- GtkWidget *fname_widget;
- int style = 0;
-
- gtk_object_get(GTK_OBJECT(dialog),
- "name", &name,
- NULL);
-
- style = file_as_get_style(editor);
-
- 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);
- e_utf8_gtk_entry_set_text(GTK_ENTRY(fname_widget), full_name);
- g_free(full_name);
- }
-
- e_card_name_free(editor->name);
- editor->name = e_card_name_copy(name);
-
- file_as_set_style(editor, style);
- }
- gtk_object_unref(GTK_OBJECT(dialog));
-}
-
-static void
-full_addr_clicked(GtkWidget *button, EContactEditor *editor)
-{
- GnomeDialog *dialog;
- int result;
- const ECardDeliveryAddress *address;
-
- address = e_card_simple_get_delivery_address(editor->simple, editor->address_choice);
-
- dialog = GNOME_DIALOG(e_contact_editor_address_new(address));
- gtk_object_set (GTK_OBJECT (dialog),
- "is_read_only", editor->is_read_only,
- NULL);
- gtk_widget_show(GTK_WIDGET(dialog));
-
- result = gnome_dialog_run (dialog);
- if (result == 0) {
- ECardDeliveryAddress *new_address;
- GtkWidget *address_widget;
-
- gtk_object_get(GTK_OBJECT(dialog),
- "address", &new_address,
- NULL);
-
- address_widget = glade_xml_get_widget(editor->gui, "text-address");
- if (address_widget && GTK_IS_EDITABLE(address_widget)) {
- char *string = e_card_delivery_address_to_string(new_address);
- e_utf8_gtk_editable_set_text(GTK_EDITABLE(address_widget), string);
- g_free(string);
- } else {
- ECardAddrLabel *address = e_card_delivery_address_to_label(new_address);
- e_card_simple_set_address(editor->simple, editor->address_choice, address);
- e_card_address_label_free(address);
- }
-
- e_card_simple_set_delivery_address(editor->simple, editor->address_choice, new_address);
-
- e_card_delivery_address_free(new_address);
- }
- 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 = e_utf8_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_categories_new(categories));
- gtk_object_set(GTK_OBJECT(dialog),
- "header", _("This contact belongs to these categories:"),
- NULL);
- gtk_widget_show(GTK_WIDGET(dialog));
- result = gnome_dialog_run (dialog);
- g_free (categories);
- if (result == 0) {
- gtk_object_get(GTK_OBJECT(dialog),
- "categories", &categories,
- NULL);
- if (entry && GTK_IS_ENTRY(entry))
- e_utf8_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 0
- if (!entry)
- g_free(categories);
-#endif
-}
-
-/* Emits the signal to request saving a card */
-static void
-save_card (EContactEditor *ce)
-{
- extract_info (ce);
- e_card_simple_sync_card (ce->simple);
-
- if (ce->is_new_card)
- gtk_signal_emit (GTK_OBJECT (ce), contact_editor_signals[ADD_CARD],
- ce->card);
- else
- gtk_signal_emit (GTK_OBJECT (ce), contact_editor_signals[COMMIT_CARD],
- ce->card);
-
- /* FIXME: should we set the ce->is_new_card here or have the client code
- * set the "is_new_card" argument on the contact editor object?
- */
-
- ce->is_new_card = FALSE;
-}
-
-/* Closes the dialog box and emits the appropriate signals */
-static void
-close_dialog (EContactEditor *ce)
-{
- g_assert (ce->app != NULL);
-
- gtk_widget_destroy (ce->app);
- ce->app = NULL;
-
- gtk_signal_emit (GTK_OBJECT (ce), contact_editor_signals[EDITOR_CLOSED]);
-}
-
-/* Menu callbacks */
-
-/* File/Save callback */
-static void
-file_save_cb (GtkWidget *widget, gpointer data)
-{
- EContactEditor *ce;
-
- ce = E_CONTACT_EDITOR (data);
- save_card (ce);
-}
-
-/* File/Close callback */
-static void
-file_close_cb (GtkWidget *widget, gpointer data)
-{
- EContactEditor *ce;
-
- ce = E_CONTACT_EDITOR (data);
- close_dialog (ce);
-}
-
-static void
-file_save_as_cb (GtkWidget *widget, gpointer data)
-{
- EContactEditor *ce;
- ECard *card;
-
- ce = E_CONTACT_EDITOR (data);
-
- extract_info (ce);
- e_card_simple_sync_card (ce->simple);
-
- card = ce->card;
- e_contact_save_as("Save as VCard", card);
-}
-
-static void
-file_send_as_cb (GtkWidget *widget, gpointer data)
-{
- EContactEditor *ce;
- ECard *card;
-
- ce = E_CONTACT_EDITOR (data);
-
- extract_info (ce);
- e_card_simple_sync_card (ce->simple);
-
- card = ce->card;
- e_card_send(card, E_CARD_DISPOSITION_AS_ATTACHMENT);
-}
-
-static void
-file_send_to_cb (GtkWidget *widget, gpointer data)
-{
- EContactEditor *ce;
- ECard *card;
-
- ce = E_CONTACT_EDITOR (data);
-
- extract_info (ce);
- e_card_simple_sync_card (ce->simple);
-
- card = ce->card;
- e_card_send(card, E_CARD_DISPOSITION_AS_TO);
-}
-
-gboolean
-e_contact_editor_confirm_delete(GtkWindow *parent)
-{
- GnomeDialog *dialog;
- GladeXML *gui;
- int result;
-
- gui = glade_xml_new (EVOLUTION_GLADEDIR "/e-contact-editor-confirm-delete.glade", NULL);
-
- dialog = GNOME_DIALOG(glade_xml_get_widget(gui, "confirm-dialog"));
-
- gnome_dialog_set_parent(dialog, parent);
-
- result = gnome_dialog_run_and_close(dialog);
-
- gtk_object_unref(GTK_OBJECT(gui));
-
- return !result;
-}
-
-static void
-delete_cb (GtkWidget *widget, gpointer data)
-{
- EContactEditor *ce = E_CONTACT_EDITOR (data);
- ECard *card = ce->card;
- ECardSimple *simple = ce->simple;
-
- gtk_object_ref(GTK_OBJECT(card));
- gtk_object_ref(GTK_OBJECT(simple));
-
- if (e_contact_editor_confirm_delete(GTK_WINDOW(ce->app))) {
-
- extract_info (ce);
- e_card_simple_sync_card (simple);
-
- if (!ce->is_new_card)
- gtk_signal_emit (GTK_OBJECT (ce), contact_editor_signals[DELETE_CARD],
- card);
-
- file_close_cb(widget, data);
- }
-
- gtk_object_unref(GTK_OBJECT(card));
- gtk_object_unref(GTK_OBJECT(simple));
-}
-
-/* Emits the signal to request printing a card */
-static void
-print_cb (BonoboUIComponent *uih, void *data, const char *path)
-{
- EContactEditor *ce;
-
- ce = E_CONTACT_EDITOR (data);
-
- extract_info (ce);
- e_card_simple_sync_card (ce->simple);
-
- gtk_widget_show(e_contact_print_card_dialog_new(ce->card));
-}
-
-/* Emits the signal to request printing a card */
-static void
-print_envelope_cb (BonoboUIComponent *uih, void *data, const char *path)
-{
- EContactEditor *ce;
-
- ce = E_CONTACT_EDITOR (data);
-
- extract_info (ce);
- e_card_simple_sync_card (ce->simple);
-
- gtk_widget_show(e_contact_print_envelope_dialog_new(ce->card));
-}
-
-/* Toolbar/Save and Close callback */
-static void
-tb_save_and_close_cb (BonoboUIComponent *uih, void *data, const char *path)
-{
- EContactEditor *ce;
-
- ce = E_CONTACT_EDITOR (data);
- save_card (ce);
- close_dialog (ce);
-}
-
-static
-BonoboUIVerb verbs [] = {
- BONOBO_UI_UNSAFE_VERB ("ContactEditorSave", file_save_cb),
- BONOBO_UI_UNSAFE_VERB ("ContactEditorSaveAs", file_save_as_cb),
- BONOBO_UI_UNSAFE_VERB ("ContactEditorSaveClose", tb_save_and_close_cb),
- BONOBO_UI_UNSAFE_VERB ("ContactEditorSendAs", file_send_as_cb),
- BONOBO_UI_UNSAFE_VERB ("ContactEditorSendTo", file_send_to_cb),
- BONOBO_UI_UNSAFE_VERB ("ContactEditorDelete", delete_cb),
- BONOBO_UI_UNSAFE_VERB ("ContactEditorPrint", print_cb),
- BONOBO_UI_UNSAFE_VERB ("ContactEditorPrintEnvelope", print_envelope_cb),
- /* BONOBO_UI_UNSAFE_VERB ("ContactEditorPageSetup", file_page_setup_menu), */
- BONOBO_UI_UNSAFE_VERB ("ContactEditorClose", file_close_cb),
-
- BONOBO_UI_VERB_END
-};
-
-static void
-create_ui (EContactEditor *ce)
-{
- bonobo_ui_component_add_verb_list_with_data (
- ce->uic, verbs, ce);
-
- bonobo_ui_util_set_ui (ce->uic, EVOLUTION_DATADIR,
- "evolution-contact-editor.xml",
- "evolution-contact-editor");
-}
-
-/* Callback used when the dialog box is destroyed */
-static gint
-app_delete_event_cb (GtkWidget *widget, GdkEvent *event, gpointer data)
-{
- EContactEditor *ce;
-
- ce = E_CONTACT_EDITOR (data);
-
- close_dialog (ce);
- return TRUE;
-}
-
-static GList *
-add_to_tab_order(GList *list, GladeXML *gui, char *name)
-{
- GtkWidget *widget = glade_xml_get_widget(gui, name);
- return g_list_prepend(list, widget);
-}
-
-static void
-setup_tab_order(GladeXML *gui)
-{
- GtkWidget *container;
- GList *list = NULL;
-
- container = glade_xml_get_widget(gui, "table-contact-editor-general");
-
- if (container) {
- list = add_to_tab_order(list, gui, "entry-fullname");
- list = add_to_tab_order(list, gui, "entry-jobtitle");
- list = add_to_tab_order(list, gui, "entry-company");
- list = add_to_tab_order(list, gui, "combo-file-as");
- list = add_to_tab_order(list, gui, "entry-phone1");
- list = add_to_tab_order(list, gui, "entry-phone2");
- list = add_to_tab_order(list, gui, "entry-phone3");
- list = add_to_tab_order(list, gui, "entry-phone4");
- list = g_list_reverse(list);
- e_container_change_tab_order(GTK_CONTAINER(container), list);
- g_list_free(list);
-
- list = NULL;
- list = add_to_tab_order(list, gui, "entry-email1");
- list = add_to_tab_order(list, gui, "entry-web");
- list = add_to_tab_order(list, gui, "text-address");
- list = add_to_tab_order(list, gui, "alignment-contacts");
- list = g_list_reverse(list);
- e_container_change_tab_order(GTK_CONTAINER(container), list);
- g_list_free(list);
- }
-}
-
-static void
-e_contact_editor_init (EContactEditor *e_contact_editor)
-{
- GladeXML *gui;
- GtkWidget *widget;
- GtkWidget *bonobo_win;
- GtkWidget *wants_html;
- BonoboUIContainer *container;
-
- 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 = e_card_name_new();
- 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;
-
- setup_tab_order(gui);
-
- e_contact_editor->app = glade_xml_get_widget (gui, "contact editor");
-
- e_container_foreach_leaf (GTK_CONTAINER (e_contact_editor->app),
- (GtkCallback) add_field_callback,
- e_contact_editor);
-
- _replace_buttons(e_contact_editor);
- set_entry_changed_signals(e_contact_editor);
-
- wants_html = glade_xml_get_widget(e_contact_editor->gui, "checkbutton-htmlmail");
- if (wants_html && GTK_IS_TOGGLE_BUTTON(wants_html))
- gtk_signal_connect(GTK_OBJECT(wants_html), "toggled",
- wants_html_changed, 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-fulladdr");
- if (widget && GTK_IS_BUTTON(widget))
- gtk_signal_connect(GTK_OBJECT(widget), "clicked",
- full_addr_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);
-
-
- /* Construct the app */
- bonobo_win = bonobo_window_new ("contact-editor-dialog", "Contact Editor");
-
- /* FIXME: The sucking bit */
- {
- GtkWidget *contents;
-
- contents = gnome_dock_get_client_area (
- GNOME_DOCK (GNOME_APP (e_contact_editor->app)->dock));
- if (!contents) {
- g_message ("contact_editor_construct(): Could not get contents");
- return;
- }
- gtk_widget_ref (contents);
- gtk_container_remove (GTK_CONTAINER (contents->parent), contents);
- bonobo_window_set_contents (BONOBO_WINDOW (bonobo_win), contents);
- gtk_widget_destroy (e_contact_editor->app);
- e_contact_editor->app = bonobo_win;
- }
-
- /* Build the menu and toolbar */
-
- container = bonobo_ui_container_new ();
- bonobo_ui_container_set_win (container, BONOBO_WINDOW (e_contact_editor->app));
-
- e_contact_editor->uic = bonobo_ui_component_new_default ();
- if (!e_contact_editor->uic) {
- g_message ("e_contact_editor_init(): eeeeek, could not create the UI handler!");
- return;
- }
- bonobo_ui_component_set_container (e_contact_editor->uic,
- bonobo_object_corba_objref (
- BONOBO_OBJECT (container)));
-
- create_ui (e_contact_editor);
-
- /* Connect to the deletion of the dialog */
-
- gtk_signal_connect (GTK_OBJECT (e_contact_editor->app), "delete_event",
- GTK_SIGNAL_FUNC (app_delete_event_cb), e_contact_editor);
-}
-
-void
-e_contact_editor_destroy (GtkObject *object) {
- EContactEditor *e_contact_editor = E_CONTACT_EDITOR(object);
-
- if (e_contact_editor->writable_fields) {
- gtk_object_unref(GTK_OBJECT(e_contact_editor->writable_fields));
- }
- 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));
-
- if (e_contact_editor->name)
- e_card_name_free(e_contact_editor->name);
-
- g_free (e_contact_editor->company);
-
- gtk_object_unref(GTK_OBJECT(e_contact_editor->gui));
-}
-
-EContactEditor *
-e_contact_editor_new (ECard *card,
- gboolean is_new_card,
- EList *fields,
- gboolean is_read_only)
-{
- EContactEditor *ce;
-
- ce = E_CONTACT_EDITOR (gtk_type_new (E_CONTACT_EDITOR_TYPE));
-
- gtk_object_set (GTK_OBJECT (ce),
- "card", card,
- "is_new_card", is_new_card,
- "writable_fields", fields,
- "is_read_only", is_read_only,
- NULL);
-
- gtk_widget_show (ce->app);
- return ce;
-}
-
-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;
-
- case ARG_IS_NEW_CARD:
- editor->is_new_card = GTK_VALUE_BOOL (*arg) ? TRUE : FALSE;
- break;
-
- case ARG_IS_READ_ONLY: {
- gboolean new_value = GTK_VALUE_BOOL (*arg) ? TRUE : FALSE;
- gboolean changed = (editor->is_read_only != new_value);
-
- editor->is_read_only = new_value;
-
- if (changed)
- set_read_only (editor);
- break;
- }
- case ARG_WRITABLE_FIELDS:
- if (editor->writable_fields)
- gtk_object_unref(GTK_OBJECT(editor->writable_fields));
- editor->writable_fields = GTK_VALUE_POINTER (*arg);
- if (editor->writable_fields)
- gtk_object_ref (GTK_OBJECT (editor->writable_fields));
- else
- editor->writable_fields = e_list_new(NULL, NULL, NULL);
- enable_writable_fields (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;
-
- case ARG_IS_NEW_CARD:
- GTK_VALUE_BOOL (*arg) = e_contact_editor->is_new_card ? TRUE : FALSE;
- break;
-
- case ARG_IS_READ_ONLY:
- GTK_VALUE_BOOL (*arg) = e_contact_editor->is_read_only ? TRUE : FALSE;
- break;
-
- case ARG_WRITABLE_FIELDS:
- if (e_contact_editor->writable_fields)
- GTK_VALUE_POINTER (*arg) = e_list_duplicate (e_contact_editor->writable_fields);
- else
- GTK_VALUE_POINTER (*arg) = NULL;
- 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 *label_widget = glade_xml_get_widget(editor->gui, label);
- if (label_widget && GTK_IS_LABEL(label_widget)) {
- gtk_object_set(GTK_OBJECT(label_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;
-}
-
-static void
-e_contact_editor_build_phone_ui (EContactEditor *editor)
-{
- int i;
-
- 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);
- }
-}
-
-static void
-e_contact_editor_build_email_ui (EContactEditor *editor)
-{
- int i;
-
- 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);
- }
-}
-
-static void
-e_contact_editor_build_address_ui (EContactEditor *editor)
-{
- int i;
-
- 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);
- }
-}
-#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, e_utf8_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);
-
- e_contact_editor_build_phone_ui (editor);
-
- 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);
- gtk_widget_set_sensitive (glade_xml_get_widget (editor->gui, label), TRUE);
- gtk_widget_set_sensitive (glade_xml_get_widget (editor->gui, entry), !editor->is_read_only);
- }
-
- g_free(label);
- g_free(entry);
-}
-
-static void
-_email_arrow_pressed (GtkWidget *widget, GdkEventButton *button, EContactEditor *editor)
-{
- int i;
- int result;
-
- e_contact_editor_build_email_ui (editor);
-
- 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);
-
- /* make sure the buttons/entry is/are sensitive */
- gtk_widget_set_sensitive (glade_xml_get_widget (editor->gui, "label-email1"), TRUE);
- gtk_widget_set_sensitive (glade_xml_get_widget (editor->gui, "entry-email1"), !editor->is_read_only);
- gtk_widget_set_sensitive (glade_xml_get_widget (editor->gui, "checkbutton-htmlmail"), !editor->is_read_only);
- }
-}
-
-static void
-_address_arrow_pressed (GtkWidget *widget, GdkEventButton *button, EContactEditor *editor)
-{
- int i;
- int result;
-
- e_contact_editor_build_address_ui (editor);
-
- 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);
-
- /* make sure the buttons/entry is/are sensitive */
- gtk_widget_set_sensitive (glade_xml_get_widget (editor->gui, "label-address"), TRUE);
- gtk_widget_set_sensitive (glade_xml_get_widget (editor->gui, "button-fulladdr"), !editor->is_read_only);
- gtk_widget_set_sensitive (glade_xml_get_widget (editor->gui, "text-address"), !editor->is_read_only);
- }
-}
-
-static void
-set_field(GtkEntry *entry, const char *string)
-{
- char *oldstring = e_utf8_gtk_entry_get_text(entry);
- if (!string)
- string = "";
- if (strcmp(string, oldstring))
- e_utf8_gtk_entry_set_text(entry, string);
- g_free (oldstring);
-}
-
-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) {
- gchar *u = e_utf8_to_gtk_string ((GtkWidget *) editable, address->data);
- gtk_editable_insert_text(editable, u, strlen(u), &position);
- g_free (u);
- }
-
- 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) {
- gchar *u = e_utf8_to_gtk_string ((GtkWidget *) editable, value);
- gtk_editable_insert_text(editable, u, strlen(u), &position);
- g_free (u);
- }
- }
-}
-
-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) {
- gchar *u = e_utf8_to_gtk_string ((GtkWidget *) editable, arbitrary->value);
- gtk_editable_insert_text(editable, u, strlen(u), &position);
- g_free (u);
- }
- }
-}
-
-static void
-disable_widget_foreach (char *key, GtkWidget *widget, gpointer closure)
-{
- gtk_widget_set_sensitive (widget, FALSE);
-}
-
-static struct {
- char *widget_name;
- ECardSimpleField field_id;
- gboolean desensitize_for_read_only;
-} widget_field_mappings[] = {
- { "entry-web", E_CARD_SIMPLE_FIELD_URL, TRUE },
- { "accellabel-web", E_CARD_SIMPLE_FIELD_URL },
-
- { "entry-jobtitle", E_CARD_SIMPLE_FIELD_TITLE, TRUE },
- { "label-jobtitle", E_CARD_SIMPLE_FIELD_TITLE },
-
- { "entry-company", E_CARD_SIMPLE_FIELD_ORG, TRUE },
- { "label-company", E_CARD_SIMPLE_FIELD_ORG },
-
- { "combo-file-as", E_CARD_SIMPLE_FIELD_FILE_AS, TRUE },
- { "entry-file-as", E_CARD_SIMPLE_FIELD_FILE_AS, TRUE },
- { "accellabel-fileas", E_CARD_SIMPLE_FIELD_FILE_AS },
-
- { "label-department", E_CARD_SIMPLE_FIELD_ORG_UNIT },
- { "entry-department", E_CARD_SIMPLE_FIELD_ORG_UNIT, TRUE },
-
- { "label-office", E_CARD_SIMPLE_FIELD_OFFICE },
- { "entry-office", E_CARD_SIMPLE_FIELD_OFFICE, TRUE },
-
- { "label-profession", E_CARD_SIMPLE_FIELD_ROLE },
- { "entry-profession", E_CARD_SIMPLE_FIELD_ROLE, TRUE },
-
- { "label-manager", E_CARD_SIMPLE_FIELD_MANAGER },
- { "entry-manager", E_CARD_SIMPLE_FIELD_MANAGER, TRUE },
-
- { "label-assistant", E_CARD_SIMPLE_FIELD_ASSISTANT },
- { "entry-assistant", E_CARD_SIMPLE_FIELD_ASSISTANT, TRUE },
-
- { "label-nickname", E_CARD_SIMPLE_FIELD_NICKNAME },
- { "entry-nickname", E_CARD_SIMPLE_FIELD_NICKNAME, TRUE },
-
- { "label-spouse", E_CARD_SIMPLE_FIELD_SPOUSE },
- { "entry-spouse", E_CARD_SIMPLE_FIELD_SPOUSE, TRUE },
-
- { "label-birthday", E_CARD_SIMPLE_FIELD_BIRTH_DATE },
- { "dateedit-birthday", E_CARD_SIMPLE_FIELD_BIRTH_DATE, TRUE },
-
- { "label-anniversary", E_CARD_SIMPLE_FIELD_ANNIVERSARY },
- { "dateedit-anniversary", E_CARD_SIMPLE_FIELD_ANNIVERSARY, TRUE },
-
- { "label-comments", E_CARD_SIMPLE_FIELD_NOTE },
- { "text-comments", E_CARD_SIMPLE_FIELD_NOTE, TRUE },
-
- { "button-fullname", E_CARD_SIMPLE_FIELD_FULL_NAME },
- { "entry-fullname", E_CARD_SIMPLE_FIELD_FULL_NAME, TRUE },
-
- { "button-categories", E_CARD_SIMPLE_FIELD_CATEGORIES, TRUE },
- { "entry-categories", E_CARD_SIMPLE_FIELD_CATEGORIES, TRUE }
-};
-static int num_widget_field_mappings = sizeof(widget_field_mappings) / sizeof (widget_field_mappings[0]);
-
-static void
-enable_writable_fields(EContactEditor *editor)
-{
- EList *fields = editor->writable_fields;
- EIterator *iter;
- GHashTable *dropdown_hash, *supported_hash;
- int i;
- ECardSimple *card;
- char *widget_name;
-
- if (!fields)
- return;
-
- card = e_card_simple_new (e_card_new (""));
-
- dropdown_hash = g_hash_table_new (g_str_hash, g_str_equal);
- supported_hash = g_hash_table_new (g_str_hash, g_str_equal);
-
- /* build our hashtable of the drop down menu items */
- e_contact_editor_build_phone_ui (editor);
- for (i = 0; i < E_CARD_SIMPLE_PHONE_ID_LAST; i ++)
- g_hash_table_insert (dropdown_hash,
- (char*)e_card_simple_get_ecard_field(card, e_card_simple_map_phone_to_field (i)),
- editor->phone_info[i].widget);
- e_contact_editor_build_email_ui (editor);
- for (i = 0; i < E_CARD_SIMPLE_EMAIL_ID_LAST; i ++)
- g_hash_table_insert (dropdown_hash,
- (char*)e_card_simple_get_ecard_field(card, e_card_simple_map_email_to_field (i)),
- editor->email_info[i].widget);
- e_contact_editor_build_address_ui (editor);
- for (i = 0; i < E_CARD_SIMPLE_ADDRESS_ID_LAST; i ++)
- g_hash_table_insert (dropdown_hash,
- (char*)e_card_simple_get_ecard_field(card, e_card_simple_map_address_to_field (i)),
- editor->address_info[i].widget);
-
- /* then disable them all */
- g_hash_table_foreach (dropdown_hash, (GHFunc)disable_widget_foreach, NULL);
-
- /* disable the label widgets for the dropdowns (4 phone, 1
- email and the toggle button, and 1 address and one for
- the full adress button */
- for (i = 0; i < 4; i ++) {
- widget_name = g_strdup_printf ("label-phone%d", i+1);
- gtk_widget_set_sensitive (glade_xml_get_widget (editor->gui, widget_name), FALSE);
- g_free (widget_name);
- widget_name = g_strdup_printf ("entry-phone%d", i+1);
- gtk_widget_set_sensitive (glade_xml_get_widget (editor->gui, widget_name), FALSE);
- g_free (widget_name);
- }
- gtk_widget_set_sensitive (glade_xml_get_widget (editor->gui, "label-email1"), FALSE);
- gtk_widget_set_sensitive (glade_xml_get_widget (editor->gui, "entry-email1"), FALSE);
- gtk_widget_set_sensitive (glade_xml_get_widget (editor->gui, "checkbutton-htmlmail"), FALSE);
- gtk_widget_set_sensitive (glade_xml_get_widget (editor->gui, "label-address"), FALSE);
- gtk_widget_set_sensitive (glade_xml_get_widget (editor->gui, "button-fulladdr"), FALSE);
- gtk_widget_set_sensitive (glade_xml_get_widget (editor->gui, "text-address"), FALSE);
-
- /* enable widgets that map directly from a field to a widget (the drop down items) */
- iter = e_list_get_iterator (fields);
- for (; e_iterator_is_valid (iter); e_iterator_next (iter)) {
- char *field = (char*)e_iterator_get (iter);
- GtkWidget *widget = g_hash_table_lookup (dropdown_hash, field);
-
- if (widget) {
- gtk_widget_set_sensitive (widget, TRUE);
- }
- else {
- /* if it's not a field that's handled by the
- dropdown items, add it to the has to be
- used in the second step */
- g_hash_table_insert (supported_hash, field, field);
- }
-
- /* ugh - this is needed to make sure we don't have a
- disabled label next to a drop down when the item in
- the menu (the one reflected in the label) is
- enabled. */
- if (!strcmp (field, e_card_simple_get_ecard_field (card, e_card_simple_map_email_to_field(editor->email_choice)))) {
- gtk_widget_set_sensitive (glade_xml_get_widget (editor->gui, "label-email1"), TRUE);
- gtk_widget_set_sensitive (glade_xml_get_widget (editor->gui, "entry-email1"), !editor->is_read_only);
- gtk_widget_set_sensitive (glade_xml_get_widget (editor->gui, "checkbutton-htmlmail"), TRUE);
- }
- else if (!strcmp (field, e_card_simple_get_ecard_field (card, e_card_simple_map_address_to_field(editor->address_choice)))) {
- gtk_widget_set_sensitive (glade_xml_get_widget (editor->gui, "label-address"), TRUE);
- gtk_widget_set_sensitive (glade_xml_get_widget (editor->gui, "button-fulladdr"), !editor->is_read_only);
- gtk_widget_set_sensitive (glade_xml_get_widget (editor->gui, "text-address"), !editor->is_read_only);
- }
- else for (i = 0; i < 4; i ++) {
- if (!strcmp (field, e_card_simple_get_ecard_field (card, e_card_simple_map_phone_to_field(editor->phone_choice[i])))) {
- widget_name = g_strdup_printf ("label-phone%d", i+1);
- gtk_widget_set_sensitive (glade_xml_get_widget (editor->gui, widget_name), TRUE);
- g_free (widget_name);
- widget_name = g_strdup_printf ("entry-phone%d", i+1);
- gtk_widget_set_sensitive (glade_xml_get_widget (editor->gui, widget_name), !editor->is_read_only);
- g_free (widget_name);
- }
- }
- }
-
- /* handle the label next to the dropdown widgets */
-
- for (i = 0; i < num_widget_field_mappings; i ++) {
- gboolean enabled = g_hash_table_lookup (supported_hash,
- e_card_simple_get_ecard_field (card,
- widget_field_mappings[i].field_id)) != NULL;
- gtk_widget_set_sensitive (glade_xml_get_widget(editor->gui,
- widget_field_mappings[i].widget_name), enabled);
- }
-
- g_hash_table_destroy (dropdown_hash);
- g_hash_table_destroy (supported_hash);
-}
-
-static void
-set_read_only (EContactEditor *editor)
-{
- int i;
- char *label, *entry;
- /* set the sensitivity of all the non-dropdown entry/texts/dateedits */
- for (i = 0; i < num_widget_field_mappings; i ++) {
- if (widget_field_mappings[i].desensitize_for_read_only)
- gtk_widget_set_sensitive (glade_xml_get_widget(editor->gui,
- widget_field_mappings[i].widget_name), !editor->is_read_only);
- }
-
- /* handle the phone dropdown entries */
- for (i = 0; i < 4; i ++) {
- label = g_strdup_printf ("label-phone%d", i+1);
- entry = g_strdup_printf ("entry-phone%d", i+1);
-
- if (GTK_WIDGET_IS_SENSITIVE (glade_xml_get_widget (editor->gui, label)))
- gtk_widget_set_sensitive (glade_xml_get_widget(editor->gui,
- entry), !editor->is_read_only);
-
- g_free (label);
- g_free (entry);
- }
-
- /* handle the email dropdown entry */
- label = "label-email1";
- entry = "entry-email1";
- if (GTK_WIDGET_IS_SENSITIVE (glade_xml_get_widget (editor->gui, label))) {
- gtk_widget_set_sensitive (glade_xml_get_widget(editor->gui,
- entry), !editor->is_read_only);
- gtk_widget_set_sensitive (glade_xml_get_widget(editor->gui,
- "checkbutton-htmlmail"), !editor->is_read_only);
- }
-
- /* handle the address dropdown entry */
- label = "label-address";
- entry = "text-address";
- if (GTK_WIDGET_IS_SENSITIVE (glade_xml_get_widget (editor->gui, label)))
- gtk_widget_set_sensitive (glade_xml_get_widget(editor->gui,
- entry), !editor->is_read_only);
-}
-
-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;
- gboolean wants_html, wants_html_set;
-
- gtk_object_get(GTK_OBJECT(card),
- "file_as", &file_as,
- "name", &name,
- "anniversary", &anniversary,
- "birth_date", &bday,
- "wants_html_set",&wants_html_set,
- "wants_html", &wants_html,
- 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);
- }
-
- if (wants_html_set) {
- GtkWidget *widget = glade_xml_get_widget(editor->gui, "checkbutton-htmlmail");
- if (widget && GTK_IS_CHECK_BUTTON(widget)) {
- gtk_object_set(GTK_OBJECT(widget),
- "active", wants_html,
- NULL);
- }
- }
-
- /* 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 = e_utf8_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);
-
- if (string) 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 = e_utf8_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);
- if (string) 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 = e_utf8_gtk_editable_get_chars(editable, 0, -1);
-
- if (string && *string)
- gtk_object_set(GTK_OBJECT(card),
- "file_as", string,
- NULL);
-
- if (string) 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);
- }
- }
-}
-
-/**
- * e_contact_editor_raise:
- * @config: The %EContactEditor object.
- *
- * Raises the dialog associated with this %EContactEditor object.
- */
-void
-e_contact_editor_raise (EContactEditor *editor)
-{
- gdk_window_raise (GTK_WIDGET (editor->app)->window);
-}
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 bc54dd02b0..0000000000
--- a/addressbook/gui/contact-editor/e-contact-editor.h
+++ /dev/null
@@ -1,124 +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 <clahey@helixcode.com>
- *
- * 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 <libgnomeui/gnome-app.h>
-#include <libgnomeui/gnome-app-helper.h>
-#include <bonobo/bonobo-ui-component.h>
-#include <glade/glade.h>
-
-#include "addressbook/backend/ebook/e-card.h"
-#include "addressbook/backend/ebook/e-card-simple.h"
-
-#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
-{
- GtkObject object;
-
- /* item specific fields */
- ECard *card;
- ECardSimple *simple;
-
- /* UI handler */
- BonoboUIComponent *uic;
-
- GladeXML *gui;
- GtkWidget *app;
- 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;
-
- /* Whether we are editing a new card or an existing one */
- guint is_new_card : 1;
-
- /* Whether the contact editor will accept modifications */
- guint is_read_only : 1;
-
- EList *writable_fields;
-};
-
-struct _EContactEditorClass
-{
- GtkObjectClass parent_class;
-
- /* Notification signals */
-
- void (* add_card) (EContactEditor *ce, ECard *card);
- void (* commit_card) (EContactEditor *ce, ECard *card);
- void (* delete_card) (EContactEditor *ce, ECard *card);
- void (* editor_closed) (EContactEditor *ce);
-};
-
-EContactEditor *e_contact_editor_new (ECard *card,
- gboolean is_new_card,
- EList *writable_fields,
- gboolean is_read_only);
-GtkType e_contact_editor_get_type (void);
-void e_contact_editor_raise (EContactEditor *editor);
-
-
-gboolean e_contact_editor_confirm_delete (GtkWindow *parent);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-#endif /* __E_CONTACT_EDITOR_H__ */
diff --git a/addressbook/gui/contact-editor/e-contact-quick-add.c b/addressbook/gui/contact-editor/e-contact-quick-add.c
deleted file mode 100644
index 0ab39701d3..0000000000
--- a/addressbook/gui/contact-editor/e-contact-quick-add.c
+++ /dev/null
@@ -1,393 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * e-contact-quick-add.c
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Developed by Jon Trowbridge <trow@ximian.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 <ctype.h>
-#include <glib.h>
-#include <gtk/gtkentry.h>
-#include <gtk/gtklabel.h>
-#include <gtk/gtktable.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-app.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-stock.h>
-#include <addressbook/backend/ebook/e-book.h>
-#include <addressbook/backend/ebook/e-book-util.h>
-#include <addressbook/backend/ebook/e-card.h>
-#include "e-contact-editor.h"
-#include "e-contact-quick-add.h"
-
-static void
-e_card_quick_set_name (ECard *card, const gchar *str)
-{
- ECardSimple *simple;
-
- g_return_if_fail (card && E_IS_CARD (card));
-
- if (str == NULL)
- return;
-
- simple = e_card_simple_new (card);
- e_card_simple_set (simple, E_CARD_SIMPLE_FIELD_FULL_NAME, str);
- e_card_simple_sync_card (simple);
- gtk_object_unref (GTK_OBJECT (simple));
-}
-
-static void
-e_card_quick_set_email (ECard *card, const gchar *str)
-{
- ECardSimple *simple;
-
- g_return_if_fail (card && E_IS_CARD (card));
-
- if (str == NULL)
- return;
-
- simple = e_card_simple_new (card);
- e_card_simple_set (simple, E_CARD_SIMPLE_FIELD_EMAIL, str);
- e_card_simple_sync_card (simple);
- gtk_object_unref (GTK_OBJECT (simple));
-}
-
-
-static void
-book_ready_cb (EBook *book, EBookStatus status, gpointer user_data)
-{
- ECard *card = E_CARD (user_data);
-
- EContactQuickAddCallback cb = gtk_object_get_data (GTK_OBJECT (card), "e-contact-quick-add-cb");
- gpointer cb_user_data = gtk_object_get_data (GTK_OBJECT (card), "e-contact-quick-add-user-data");
-
- if (status == E_BOOK_STATUS_SUCCESS) {
- e_book_add_card (book, card, NULL, NULL);
- if (cb)
- cb (card, cb_user_data);
- } else {
- /* Something went wrong... */
- if (cb)
- cb (NULL, cb_user_data);
-
- gtk_object_unref (GTK_OBJECT (book));
- }
-}
-
-static void
-add_card (ECard *card)
-{
- EBook *book = e_book_new ();
- e_book_load_local_address_book (book, book_ready_cb, card);
-}
-
-/*
- * Raise a contact editor with all fields editable, and hook up all signals accordingly.
- */
-
-static void
-add_card_cb (EContactEditor *ce, ECard *card, gpointer user_data)
-{
- add_card (card);
-}
-
-static void
-editor_closed_cb (GtkWidget *w, gpointer user_data)
-{
- /* w is the contact editor, user_data is an ECard. */
- if (user_data)
- gtk_object_unref (user_data);
- gtk_object_unref (GTK_OBJECT (w));
-}
-
-static void
-ce_book_found_fields (EBook *book, EBookStatus status, EList *fields, gpointer user_data)
-{
- ECard *card = E_CARD (user_data);
- EContactEditor *contact_editor;
-
- if (status != E_BOOK_STATUS_SUCCESS) {
- g_warning ("Couldn't find supported fields for local address book.");
- return;
- }
-
- contact_editor = e_contact_editor_new (card, TRUE, fields, FALSE /* XXX */);
-
- gtk_signal_connect (GTK_OBJECT (contact_editor),
- "add_card",
- GTK_SIGNAL_FUNC (add_card_cb),
- NULL);
- gtk_signal_connect (GTK_OBJECT (contact_editor),
- "editor_closed",
- GTK_SIGNAL_FUNC (editor_closed_cb),
- user_data);
-
- e_contact_editor_raise (contact_editor);
-}
-
-static void
-ce_book_ready (EBook *book, EBookStatus status, gpointer user_data)
-{
- if (status != E_BOOK_STATUS_SUCCESS) {
- g_warning ("Couldn't open local address book.");
- return;
- }
-
- e_book_get_supported_fields (book, ce_book_found_fields, user_data);
-}
-
-static void
-edit_card (ECard *card)
-{
- e_book_load_local_address_book (e_book_new (), ce_book_ready, card);
-}
-
-static void
-clicked_cb (GtkWidget *w, gint button, gpointer user_data)
-{
- ECard *card = E_CARD (user_data);
-
- /* Get data out of entries. */
- if (button == 0 || button == 1) {
- gpointer name_entry;
- gpointer email_entry;
- gchar *name = NULL;
- gchar *email = NULL;
-
- name_entry = gtk_object_get_data (GTK_OBJECT (card), "e-contact-quick-add-name-entry");
- email_entry = gtk_object_get_data (GTK_OBJECT (card), "e-contact-quick-add-email-entry");
-
- if (name_entry)
- name = gtk_editable_get_chars (GTK_EDITABLE (name_entry), 0, -1);
- if (email_entry)
- email = gtk_editable_get_chars (GTK_EDITABLE (email_entry), 0, -1);
-
- e_card_quick_set_name (card, name);
- e_card_quick_set_email (card, email);
-
- g_free (name);
- g_free (email);
- }
-
- gtk_widget_destroy (w);
-
- if (button == 0) { /* OK */
-
- add_card (card);
-
- } else if (button == 1) {
-
- /* EDIT FULL */
- edit_card (card);
-
- } else {
- /* CANCEL */
- gtk_object_unref (user_data);
- }
-
-}
-
-static GtkWidget *
-build_quick_add_dialog (ECard *new_card, EContactQuickAddCallback cb, gpointer user_data)
-{
- GtkWidget *dialog;
- GtkTable *table;
- GtkWidget *name_entry;
- GtkWidget *email_entry;
- const gint xpad=1, ypad=1;
-
- g_return_val_if_fail (new_card && E_IS_CARD (new_card), NULL);
-
- dialog = gnome_dialog_new (_("Contact Quick-Add"),
- GNOME_STOCK_BUTTON_OK,
- _("Edit Full"),
- GNOME_STOCK_BUTTON_CANCEL,
- NULL);
-
- gtk_signal_connect (GTK_OBJECT (dialog),
- "clicked",
- clicked_cb,
- new_card);
-
- name_entry = gtk_entry_new ();
-
- if (new_card->name) {
- gchar *str = e_card_name_to_string (new_card->name);
- gtk_entry_set_text (GTK_ENTRY (name_entry), str);
- g_free (str);
- }
-
-
- email_entry = gtk_entry_new ();
-
- if (new_card->email && e_list_length (new_card->email)) {
- EIterator *iterator = e_list_get_iterator (new_card->email);
- if (iterator) {
- e_iterator_reset (iterator);
- if (e_iterator_is_valid (iterator)) {
- const gchar *str = e_iterator_get (iterator);
- gtk_entry_set_text (GTK_ENTRY (email_entry), str);
- }
- }
- }
-
- gtk_object_set_data (GTK_OBJECT (new_card), "e-contact-quick-add-name-entry", name_entry);
- gtk_object_set_data (GTK_OBJECT (new_card), "e-contact-quick-add-email-entry", email_entry);
-
-
- table = GTK_TABLE (gtk_table_new (2, 2, FALSE));
-
- gtk_table_attach (table, gtk_label_new (_("Full Name")),
- 0, 1, 0, 1,
- 0, 0, xpad, ypad);
- gtk_table_attach (table, name_entry,
- 1, 2, 0, 1,
- GTK_EXPAND | GTK_FILL, GTK_EXPAND, xpad, ypad);
- gtk_table_attach (table, gtk_label_new (_("E-mail")),
- 0, 1, 1, 2,
- 0, 0, xpad, ypad);
- gtk_table_attach (table, email_entry,
- 1, 2, 1, 2,
- GTK_EXPAND | GTK_FILL, GTK_EXPAND, xpad, ypad);
-
- gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox),
- GTK_WIDGET (table),
- TRUE, TRUE, 0);
- gtk_widget_show_all (GTK_WIDGET (table));
-
-
- return dialog;
-}
-
-void
-e_contact_quick_add (const gchar *name, const gchar *email,
- EContactQuickAddCallback cb, gpointer user_data)
-{
- ECard *new_card;
- GtkWidget *dialog;
-
- /* We need to have *something* to work with. */
- if (name == NULL && email == NULL) {
- if (cb)
- cb (NULL, user_data);
- return;
- }
-
- new_card = e_card_new ("");
- if (cb)
- gtk_object_set_data (GTK_OBJECT (new_card), "e-contact-quick-add-cb", cb);
- if (user_data)
- gtk_object_set_data (GTK_OBJECT (new_card), "e-contact-quick-add-user-data", user_data);
-
-
- e_card_quick_set_name (new_card, name);
- e_card_quick_set_email (new_card, email);
-
- dialog = build_quick_add_dialog (new_card, cb, user_data);
-
- gtk_widget_show_all (dialog);
-}
-
-void
-e_contact_quick_add_free_form (const gchar *text, EContactQuickAddCallback cb, gpointer user_data)
-{
- gchar *name=NULL, *email=NULL;
- const gchar *last_at, *s;
- gboolean in_quote;
-
- if (text == NULL) {
- e_contact_quick_add (NULL, NULL, cb, user_data);
- return;
- }
-
- /* Look for things that look like e-mail addresses embedded in text */
- in_quote = FALSE;
- last_at = NULL;
- for (s = text; *s; ++s) {
- if (*s == '@' && !in_quote)
- last_at = s;
- else if (*s == '"')
- in_quote = !in_quote;
- }
-
-
- if (last_at == NULL) {
- /* No at sign, so we treat it all as the name */
- name = g_strdup (text);
- } else {
- gboolean bad_char = FALSE;
-
- /* walk backwards to whitespace or a < or a quote... */
- while (last_at >= text && !bad_char
- && !(isspace ((gint) *last_at) || *last_at == '<' || *last_at == '"')) {
- /* Check for some stuff that can't appear in a legal e-mail address. */
- if (*last_at == '['
- || *last_at == ']'
- || *last_at == '('
- || *last_at == ')')
- bad_char = TRUE;
- --last_at;
- }
- if (last_at < text)
- last_at = text;
-
- /* ...and then split the text there */
- if (!bad_char) {
- if (text < last_at)
- name = g_strndup (text, last_at-text);
- email = g_strdup (last_at);
- }
- }
-
- /* If all else has failed, make it the name. */
- if (name == NULL && email == NULL)
- name = g_strdup (text);
-
-
- /* Clean up name */
- if (name && *name)
- g_strstrip (name);
-
- /* Clean up email, remove bracketing <>s */
- if (email && *email) {
- gboolean changed = FALSE;
- g_strstrip (email);
- if (*email == '<') {
- *email = ' ';
- changed = TRUE;
- }
- if (email[strlen (email)-1] == '>') {
- email[strlen (email)-1] = ' ';
- changed = TRUE;
- }
- if (changed)
- g_strstrip (email);
- }
-
-
- e_contact_quick_add (name, email, cb, user_data);
- g_free (name);
- g_free (email);
-}
diff --git a/addressbook/gui/contact-editor/e-contact-quick-add.h b/addressbook/gui/contact-editor/e-contact-quick-add.h
deleted file mode 100644
index 81e3fdaab5..0000000000
--- a/addressbook/gui/contact-editor/e-contact-quick-add.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * e-contact-quick-add.h
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Developed by Jon Trowbridge <trow@ximian.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 __E_CONTACT_QUICK_ADD_H__
-#define __E_CONTACT_QUICK_ADD_H__
-
-#include <addressbook/backend/ebook/e-card.h>
-
-typedef void (*EContactQuickAddCallback) (ECard *new_card, gpointer user_data);
-
-void e_contact_quick_add (const gchar *name, const gchar *email,
- EContactQuickAddCallback cb, gpointer user_data);
-
-void e_contact_quick_add_free_form (const gchar *text, EContactQuickAddCallback cb, gpointer user_data);
-
-#endif /* __E_CONTACT_QUICK_ADD_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 5381fb8b2d..0000000000
--- a/addressbook/gui/contact-editor/e-contact-save-as.c
+++ /dev/null
@@ -1,80 +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 <clahey@helixcode.com>
- *
- * 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 <unistd.h>
-#include <fcntl.h>
-#include <gtk/gtkfilesel.h>
-#include <gtk/gtksignal.h>
-#include <gal/util/e-util.h>
-#include "e-contact-save-as.h"
-
-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 d304d4d558..0000000000
--- a/addressbook/gui/contact-editor/e-contact-save-as.h
+++ /dev/null
@@ -1,41 +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 <clahey@helixcode.com>
- *
- * 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 <glade/glade.h>
-#include "addressbook/backend/ebook/e-card.h"
-#include "addressbook/backend/ebook/e-card-simple.h"
-
-#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/fulladdr.glade b/addressbook/gui/contact-editor/fulladdr.glade
deleted file mode 100644
index 46d1a180b6..0000000000
--- a/addressbook/gui/contact-editor/fulladdr.glade
+++ /dev/null
@@ -1,475 +0,0 @@
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <name>fulladdr</name>
- <program_name>fulladdr</program_name>
- <directory></directory>
- <source_directory>src</source_directory>
- <pixmaps_directory>pixmaps</pixmaps_directory>
- <language>C</language>
- <gnome_support>True</gnome_support>
- <gettext_support>True</gettext_support>
- <use_widget_names>True</use_widget_names>
- <output_main_file>False</output_main_file>
- <output_support_files>False</output_support_files>
- <output_build_files>False</output_build_files>
-</project>
-
-<widget>
- <class>GnomeDialog</class>
- <name>dialog-checkaddress</name>
- <visible>False</visible>
- <title>Check Address</title>
- <type>GTK_WINDOW_TOPLEVEL</type>
- <position>GTK_WIN_POS_NONE</position>
- <modal>True</modal>
- <allow_shrink>False</allow_shrink>
- <allow_grow>True</allow_grow>
- <auto_shrink>False</auto_shrink>
- <auto_close>False</auto_close>
- <hide_on_close>False</hide_on_close>
-
- <widget>
- <class>GtkVBox</class>
- <child_name>GnomeDialog:vbox</child_name>
- <name>vbox-container</name>
- <homogeneous>False</homogeneous>
- <spacing>8</spacing>
- <child>
- <padding>4</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkHButtonBox</class>
- <child_name>GnomeDialog:action_area</child_name>
- <name>hbuttonbox1</name>
- <layout_style>GTK_BUTTONBOX_END</layout_style>
- <spacing>8</spacing>
- <child_min_width>85</child_min_width>
- <child_min_height>27</child_min_height>
- <child_ipad_x>7</child_ipad_x>
- <child_ipad_y>0</child_ipad_y>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- <pack>GTK_PACK_END</pack>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>button1</name>
- <can_default>True</can_default>
- <has_default>True</has_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button2</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
- </widget>
- </widget>
-
- <widget>
- <class>GtkTable</class>
- <name>table-checkaddress</name>
- <border_width>8</border_width>
- <rows>4</rows>
- <columns>4</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>6</row_spacing>
- <column_spacing>6</column_spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label2</name>
- <label>_Address:</label>
- <justify>GTK_JUSTIFY_LEFT</justify>
- <wrap>False</wrap>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>entry-street</focus_target>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label4</name>
- <label>_City:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>entry-city</focus_target>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>2</top_attach>
- <bottom_attach>3</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-city</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>2</top_attach>
- <bottom_attach>3</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-ext</name>
- <width>100</width>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label8</name>
- <label>_PO Box:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>entry-po</focus_target>
- <child>
- <left_attach>2</left_attach>
- <right_attach>3</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label3</name>
- <label>Address _2:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>entry-ext</focus_target>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-po</name>
- <width>100</width>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>3</left_attach>
- <right_attach>4</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-street</name>
- <can_focus>True</can_focus>
- <has_focus>True</has_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>1</left_attach>
- <right_attach>4</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label5</name>
- <label>_State/Province:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>entry-region</focus_target>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>3</top_attach>
- <bottom_attach>4</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-region</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>3</top_attach>
- <bottom_attach>4</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkCombo</class>
- <name>combo-country</name>
- <width>100</width>
- <value_in_list>False</value_in_list>
- <ok_if_empty>True</ok_if_empty>
- <case_sensitive>False</case_sensitive>
- <use_arrows>True</use_arrows>
- <use_arrows_always>False</use_arrows_always>
- <items>USA
-Canada
-Finland
-</items>
- <child>
- <left_attach>3</left_attach>
- <right_attach>4</right_attach>
- <top_attach>3</top_attach>
- <bottom_attach>4</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkEntry</class>
- <child_name>GtkCombo:entry</child_name>
- <name>entry-country</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- </widget>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-code</name>
- <width>100</width>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>3</left_attach>
- <right_attach>4</right_attach>
- <top_attach>2</top_attach>
- <bottom_attach>3</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label6</name>
- <label>_ZIP Code:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>entry-code</focus_target>
- <child>
- <left_attach>2</left_attach>
- <right_attach>3</right_attach>
- <top_attach>2</top_attach>
- <bottom_attach>3</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label7</name>
- <label>Countr_y:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>entry-country</focus_target>
- <child>
- <left_attach>2</left_attach>
- <right_attach>3</right_attach>
- <top_attach>3</top_attach>
- <bottom_attach>4</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
- </widget>
- </widget>
-</widget>
-
-</GTK-Interface>
diff --git a/addressbook/gui/contact-editor/fullname.glade b/addressbook/gui/contact-editor/fullname.glade
deleted file mode 100644
index 17be70647c..0000000000
--- a/addressbook/gui/contact-editor/fullname.glade
+++ /dev/null
@@ -1,389 +0,0 @@
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <name>fullname</name>
- <program_name>fullname</program_name>
- <directory></directory>
- <source_directory>src</source_directory>
- <pixmaps_directory>pixmaps</pixmaps_directory>
- <language>C</language>
- <gnome_support>True</gnome_support>
- <gettext_support>True</gettext_support>
- <use_widget_names>True</use_widget_names>
- <output_main_file>False</output_main_file>
- <output_support_files>False</output_support_files>
- <output_build_files>False</output_build_files>
-</project>
-
-<widget>
- <class>GnomeDialog</class>
- <name>dialog-checkfullname</name>
- <visible>False</visible>
- <title>Check Full Name</title>
- <type>GTK_WINDOW_TOPLEVEL</type>
- <position>GTK_WIN_POS_NONE</position>
- <modal>True</modal>
- <allow_shrink>True</allow_shrink>
- <allow_grow>True</allow_grow>
- <auto_shrink>False</auto_shrink>
- <auto_close>False</auto_close>
- <hide_on_close>False</hide_on_close>
-
- <widget>
- <class>GtkVBox</class>
- <child_name>GnomeDialog:vbox</child_name>
- <name>vbox-container</name>
- <homogeneous>False</homogeneous>
- <spacing>8</spacing>
- <child>
- <padding>4</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkHButtonBox</class>
- <child_name>GnomeDialog:action_area</child_name>
- <name>hbuttonbox1</name>
- <layout_style>GTK_BUTTONBOX_END</layout_style>
- <spacing>8</spacing>
- <child_min_width>85</child_min_width>
- <child_min_height>27</child_min_height>
- <child_ipad_x>7</child_ipad_x>
- <child_ipad_y>0</child_ipad_y>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- <pack>GTK_PACK_END</pack>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>button1</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button2</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
- </widget>
- </widget>
-
- <widget>
- <class>GtkTable</class>
- <name>table-checkfullname</name>
- <border_width>8</border_width>
- <rows>5</rows>
- <columns>3</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>6</row_spacing>
- <column_spacing>21</column_spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkCombo</class>
- <name>combo-title</name>
- <value_in_list>False</value_in_list>
- <ok_if_empty>True</ok_if_empty>
- <case_sensitive>False</case_sensitive>
- <use_arrows>True</use_arrows>
- <use_arrows_always>False</use_arrows_always>
- <items>
-Mr.
-Mrs.
-Ms.
-Miss
-Dr.
-</items>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
-
- <widget>
- <class>GtkEntry</class>
- <child_name>GtkCombo:entry</child_name>
- <name>entry-title</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- </widget>
- </widget>
-
- <widget>
- <class>GtkCombo</class>
- <name>combo-suffix</name>
- <value_in_list>False</value_in_list>
- <ok_if_empty>True</ok_if_empty>
- <case_sensitive>False</case_sensitive>
- <use_arrows>True</use_arrows>
- <use_arrows_always>False</use_arrows_always>
- <items>
-Sr.
-Jr.
-I
-II
-III
-Esq.
-</items>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>4</top_attach>
- <bottom_attach>5</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
-
- <widget>
- <class>GtkEntry</class>
- <child_name>GtkCombo:entry</child_name>
- <name>entry-suffix</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- </widget>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-first</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>1</left_attach>
- <right_attach>3</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-middle</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>1</left_attach>
- <right_attach>3</right_attach>
- <top_attach>2</top_attach>
- <bottom_attach>3</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry-last</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>1</left_attach>
- <right_attach>3</right_attach>
- <top_attach>3</top_attach>
- <bottom_attach>4</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label2</name>
- <label>_First:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>entry-first</focus_target>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label1</name>
- <label>_Title:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>entry-title</focus_target>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label3</name>
- <label>_Middle:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>entry-middle</focus_target>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>2</top_attach>
- <bottom_attach>3</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label5</name>
- <label>_Last:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>entry-last</focus_target>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>3</top_attach>
- <bottom_attach>4</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label4</name>
- <label>_Suffix:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <focus_target>entry-suffix</focus_target>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>4</top_attach>
- <bottom_attach>5</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
- </widget>
- </widget>
-</widget>
-
-</GTK-Interface>
diff --git a/addressbook/gui/contact-editor/test-editor.c b/addressbook/gui/contact-editor/test-editor.c
deleted file mode 100644
index 22c871c693..0000000000
--- a/addressbook/gui/contact-editor/test-editor.c
+++ /dev/null
@@ -1,145 +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 <clahey@helixcode.com>
- *
- * 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 <stdlib.h>
-#include <gtk/gtkmain.h>
-#include <libgnomeui/gnome-app.h>
-#include <libgnomeui/gnome-init.h>
-#include <glade/glade.h>
-#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);
-}
-
-/* Callback used when a contact editor is closed */
-static void
-editor_closed_cb (EContactEditor *ce, gpointer data)
-{
- static int count = 2;
-
- count--;
- gtk_object_unref (GTK_OBJECT (ce));
-
- if (count == 0)
- exit (0);
-}
-
-#if 0
-static void about_callback( GtkWidget *widget, gpointer data )
-{
-
- const gchar *authors[] =
- {
- "Christopher James Lahey <clahey@umich.edu>",
- 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;
- EContactEditor *ce;
-
- /* bindtextdomain (PACKAGE, GNOMELOCALEDIR);
- textdomain (PACKAGE);*/
-
- gnome_init( "Contact Editor Test", VERSION, argc, argv);
-
- glade_gnome_init ();
-
- cardstr = NULL;
- if (argc == 2)
- cardstr = read_file (argv [1]);
-
- if (cardstr == NULL)
- cardstr = TEST_VCARD;
-
- ce = e_contact_editor_new (e_card_new (cardstr), TRUE, NULL, FALSE);
- gtk_signal_connect (GTK_OBJECT (ce), "editor_closed",
- GTK_SIGNAL_FUNC (editor_closed_cb), NULL);
-
- ce = e_contact_editor_new (e_card_new (cardstr), TRUE, NULL, FALSE);
- gtk_signal_connect (GTK_OBJECT (ce), "editor_closed",
- GTK_SIGNAL_FUNC (editor_closed_cb), NULL);
-
- gtk_main();
-
- /* Not reached. */
- return 0;
-}
diff --git a/addressbook/gui/search/.cvsignore b/addressbook/gui/search/.cvsignore
deleted file mode 100644
index d6c55c7345..0000000000
--- a/addressbook/gui/search/.cvsignore
+++ /dev/null
@@ -1,7 +0,0 @@
-.deps
-.libs
-.pure
-Makefile
-Makefile.in
-*.lo
-*.la
diff --git a/addressbook/gui/search/Makefile.am b/addressbook/gui/search/Makefile.am
deleted file mode 100644
index d932aaac77..0000000000
--- a/addressbook/gui/search/Makefile.am
+++ /dev/null
@@ -1,23 +0,0 @@
-ruledir = $(datadir)/evolution
-rule_DATA = addresstypes.xml
-
-EXTRA_DIST = addresstypes.xml
-
-INCLUDES = \
- -DG_LOG_DOMAIN=\"e-addressbook-search\" \
- -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 \
- -I$(top_srcdir)/widgets/misc \
- -DSEARCH_RULE_DIR=\"$(ruledir)\" \
- $(BONOBO_GNOME_CFLAGS) \
- $(EXTRA_GNOME_CFLAGS)
-
-noinst_LIBRARIES = \
- libeaddressbooksearch.a
-
-libeaddressbooksearch_a_SOURCES = \
- e-addressbook-search-dialog.c \
- e-addressbook-search-dialog.h
diff --git a/addressbook/gui/search/addresstypes.xml b/addressbook/gui/search/addresstypes.xml
deleted file mode 100644
index bf64e841b0..0000000000
--- a/addressbook/gui/search/addresstypes.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0"?>
-<filterdescription>
-<partset>
- <part name="name">
- <title>Name</title>
- <input type="optionlist" name="name-type">
- <option value="contains">
- <title>contains</title>
- <code>(contains "full_name" ${name})</code>
- </option>
- <option value="not contains">
- <title>does not contain</title>
- <code>(not (contains "full_name" ${name}))</code>
- </option>
- <option value="is">
- <title>is</title>
- <code>(is "full_name" ${name})))</code>
- </option>
- <option value="is not">
- <title>is not</title>
- <code>(not (is "full_name" ${name}))</code>
- </option>
- <option value="begin">
- <title>begins with</title>
- <code>(beginswith "full_name" ${name})</code>
- </option>
- <option value="end">
- <title>ends in</title>
- <code>(endswith "full_name" ${name})</code>
- </option>
- </input>
- <input type="string" name="name"/>
- </part>
- <part name="email">
- <title>Email</title>
- <input type="optionlist" name="email-type">
- <option value="contains">
- <title>contains</title>
- <code>(contains "email" ${email})</code>
- </option>
- <option value="not contains">
- <title>does not contain</title>
- <code>(not (contains "email" ${email}))</code>
- </option>
- <option value="is">
- <title>is</title>
- <code>(is "email" ${email})</code>
- </option>
- <option value="is not">
- <title>is not</title>
- <code>(not (is "email" ${email}))</code>
- </option>
- </input>
- <input type="address" name="email"/>
- </part>
- <part name="sexp">
- <title>Expression</title>
- <input type="code" name="code"/>
- </part>
-</partset>
-</filterdescription>
diff --git a/addressbook/gui/search/e-addressbook-search-dialog.c b/addressbook/gui/search/e-addressbook-search-dialog.c
deleted file mode 100644
index 0e760e7b47..0000000000
--- a/addressbook/gui/search/e-addressbook-search-dialog.c
+++ /dev/null
@@ -1,235 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-addressbook-search-dialog.c
- * Copyright (C) 2000 Helix Code, Inc.
- * Author: Chris Lahey <clahey@helixcode.com>
- *
- * 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 <gtk/gtkbox.h>
-#include <gtk/gtkentry.h>
-#include <gtk/gtksignal.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-stock.h>
-#include <gal/widgets/e-canvas.h>
-#include <gal/widgets/e-scroll-frame.h>
-
-#include "e-addressbook-search-dialog.h"
-#include "addressbook/gui/widgets/e-minicard-view-widget.h"
-
-
-static void e_addressbook_search_dialog_init (EAddressbookSearchDialog *widget);
-static void e_addressbook_search_dialog_class_init (EAddressbookSearchDialogClass *klass);
-static void e_addressbook_search_dialog_set_arg (GtkObject *o, GtkArg *arg, guint arg_id);
-static void e_addressbook_search_dialog_get_arg (GtkObject *object, GtkArg *arg, guint arg_id);
-static void e_addressbook_search_dialog_destroy (GtkObject *object);
-
-static ECanvasClass *parent_class = NULL;
-
-#define PARENT_TYPE (gnome_dialog_get_type())
-
-/* The arguments we take */
-enum {
- ARG_0,
- ARG_BOOK,
-};
-
-GtkType
-e_addressbook_search_dialog_get_type (void)
-{
- static GtkType type = 0;
-
- if (!type)
- {
- static const GtkTypeInfo info =
- {
- "EAddressbookSearchDialog",
- sizeof (EAddressbookSearchDialog),
- sizeof (EAddressbookSearchDialogClass),
- (GtkClassInitFunc) e_addressbook_search_dialog_class_init,
- (GtkObjectInitFunc) e_addressbook_search_dialog_init,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
- };
-
- type = gtk_type_unique (PARENT_TYPE, &info);
- }
-
- return type;
-}
-
-static void
-e_addressbook_search_dialog_class_init (EAddressbookSearchDialogClass *klass)
-{
- GtkObjectClass *object_class;
-
- object_class = (GtkObjectClass*) klass;
-
- parent_class = gtk_type_class (PARENT_TYPE);
-
- gtk_object_add_arg_type ("EAddressbookSearchDialog::book", GTK_TYPE_OBJECT,
- GTK_ARG_READWRITE, ARG_BOOK);
-
- object_class->set_arg = e_addressbook_search_dialog_set_arg;
- object_class->get_arg = e_addressbook_search_dialog_get_arg;
- object_class->destroy = e_addressbook_search_dialog_destroy;
-}
-
-static GtkWidget *
-get_widget (EAddressbookSearchDialog *view)
-{
- FilterPart *part;
-
- view->context = rule_context_new();
- /* FIXME: hide this in a class */
- rule_context_add_part_set(view->context, "partset", filter_part_get_type(),
- rule_context_add_part, rule_context_next_part);
- rule_context_load(view->context, SEARCH_RULE_DIR "/addresstypes.xml", "");
- view->rule = filter_rule_new();
- part = rule_context_next_part(view->context, NULL);
- if (part == NULL) {
- g_warning("Problem loading search for addressbook no parts to load");
- return gtk_entry_new();
- } else {
- filter_rule_add_part(view->rule, filter_part_clone(part));
- return filter_rule_get_widget(view->rule, view->context);
- }
-}
-
-static char *
-get_query (EAddressbookSearchDialog *view)
-{
- GString *out = g_string_new("");
- char *ret;
-
- filter_rule_build_code(view->rule, out);
- ret = out->str;
- printf("Searching using %s\n", ret);
- g_string_free(out, FALSE);
- return ret;
-}
-
-static void
-button_press (GtkWidget *widget, int button, EAddressbookSearchDialog *dialog)
-{
- char *query;
-
- if (button == 0) {
- query = get_query(dialog);
- gtk_object_set(GTK_OBJECT(dialog->view),
- "query", query,
- NULL);
- g_free(query);
- }
- else
- gnome_dialog_close(GNOME_DIALOG (dialog));
-}
-
-static void
-e_addressbook_search_dialog_init (EAddressbookSearchDialog *view)
-{
- GnomeDialog *dialog = GNOME_DIALOG (view);
-
- gtk_window_set_policy(GTK_WINDOW(view), FALSE, TRUE, FALSE);
-
- view->search = get_widget(view);
- gtk_box_pack_start(GTK_BOX(dialog->vbox), view->search, FALSE, FALSE, 0);
- gtk_widget_show(view->search);
-
- gnome_dialog_append_buttons(dialog,
- _("Search"),
- GNOME_STOCK_BUTTON_CLOSE, NULL);
-
- gnome_dialog_set_default(dialog, 0);
-
- gtk_signal_connect(GTK_OBJECT(dialog), "clicked",
- GTK_SIGNAL_FUNC(button_press), view);
-
- view->view = e_minicard_view_widget_new();
- gtk_widget_show(view->view);
-
- view->scrolled_window = e_scroll_frame_new(NULL, NULL);
- e_scroll_frame_set_policy(E_SCROLL_FRAME(view->scrolled_window),
- GTK_POLICY_AUTOMATIC, GTK_POLICY_NEVER);
- gtk_container_add(GTK_CONTAINER(view->scrolled_window), view->view);
-
- gtk_widget_show(view->scrolled_window);
-
- gtk_box_pack_start(GTK_BOX(dialog->vbox), view->scrolled_window, TRUE, TRUE, 0);
-}
-
-GtkWidget *
-e_addressbook_search_dialog_new (EBook *book)
-{
- EAddressbookSearchDialog *view = gtk_type_new (e_addressbook_search_dialog_get_type ());
- gtk_object_set(GTK_OBJECT(view->view),
- "book", book,
- NULL);
- return GTK_WIDGET(view);
-}
-
-static void
-e_addressbook_search_dialog_set_arg (GtkObject *o, GtkArg *arg, guint arg_id)
-{
- EAddressbookSearchDialog *emvw;
-
- emvw = E_ADDRESSBOOK_SEARCH_DIALOG (o);
-
- switch (arg_id){
- case ARG_BOOK:
- gtk_object_set(GTK_OBJECT(emvw->view),
- "book", GTK_VALUE_OBJECT (*arg),
- NULL);
- break;
- }
-}
-
-static void
-e_addressbook_search_dialog_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
-{
- EAddressbookSearchDialog *emvw;
-
- emvw = E_ADDRESSBOOK_SEARCH_DIALOG (object);
-
- switch (arg_id) {
- case ARG_BOOK:
- gtk_object_get(GTK_OBJECT(emvw->view),
- "book", &(GTK_VALUE_OBJECT (*arg)),
- NULL);
- break;
- default:
- arg->type = GTK_TYPE_INVALID;
- break;
- }
-}
-
-static void
-e_addressbook_search_dialog_destroy (GtkObject *object)
-{
- EAddressbookSearchDialog *view;
-
- view = E_ADDRESSBOOK_SEARCH_DIALOG (object);
-
- gtk_object_unref((GtkObject *)view->context);
- gtk_object_unref((GtkObject *)view->rule);
-
- GTK_OBJECT_CLASS(parent_class)->destroy (object);
-}
diff --git a/addressbook/gui/search/e-addressbook-search-dialog.h b/addressbook/gui/search/e-addressbook-search-dialog.h
deleted file mode 100644
index 8fcd23492d..0000000000
--- a/addressbook/gui/search/e-addressbook-search-dialog.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* e-minicard-view-widget.h
- * Copyright (C) 2000 Helix Code, Inc.
- * Author: Chris Lahey <clahey@helixcode.com>
- *
- * 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_ADDRESSBOOK_SEARCH_DIALOG_H__
-#define __E_ADDRESSBOOK_SEARCH_DIALOG_H__
-
-#include <ebook/e-book.h>
-
-#include "filter/rule-context.h"
-#include "filter/filter-rule.h"
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <libgnomeui/gnome-dialog.h>
-
-#define E_ADDRESSBOOK_SEARCH_DIALOG_TYPE (e_addressbook_search_dialog_get_type ())
-#define E_ADDRESSBOOK_SEARCH_DIALOG(obj) (GTK_CHECK_CAST ((obj), E_ADDRESSBOOK_SEARCH_DIALOG_TYPE, EAddressbookSearchDialog))
-#define E_ADDRESSBOOK_SEARCH_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_ADDRESSBOOK_SEARCH_DIALOG_TYPE, EAddressbookSearchDialogClass))
-#define E_IS_ADDRESSBOOK_SEARCH_DIALOG(obj) (GTK_CHECK_TYPE ((obj), E_ADDRESSBOOK_SEARCH_DIALOG_TYPE))
-#define E_IS_ADDRESSBOOK_SEARCH_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_ADDRESSBOOK_SEARCH_DIALOG_TYPE))
-
-
-typedef struct _EAddressbookSearchDialog EAddressbookSearchDialog;
-typedef struct _EAddressbookSearchDialogClass EAddressbookSearchDialogClass;
-
-struct _EAddressbookSearchDialog
-{
- GnomeDialog parent;
-
- GtkWidget *search;
- GtkWidget *view;
-
- RuleContext *context;
- FilterRule *rule;
- GtkWidget *scrolled_window;
-};
-
-struct _EAddressbookSearchDialogClass
-{
- GnomeDialogClass parent_class;
-};
-
-GtkType e_addressbook_search_dialog_get_type (void);
-
-GtkWidget *e_addressbook_search_dialog_new (EBook *book);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __E_ADDRESSBOOK_SEARCH_DIALOG_H__ */
diff --git a/addressbook/gui/widgets/.cvsignore b/addressbook/gui/widgets/.cvsignore
deleted file mode 100644
index 472fd2593f..0000000000
--- a/addressbook/gui/widgets/.cvsignore
+++ /dev/null
@@ -1,12 +0,0 @@
-.deps
-.libs
-.pure
-Makefile
-Makefile.in
-*.lo
-*.la
-minicard-label-test
-minicard-test
-minicard-view-test
-minicard-widget-test
-reflow-test
diff --git a/addressbook/gui/widgets/Makefile.am b/addressbook/gui/widgets/Makefile.am
deleted file mode 100644
index 5fe7d9ea7c..0000000000
--- a/addressbook/gui/widgets/Makefile.am
+++ /dev/null
@@ -1,128 +0,0 @@
-INCLUDES = \
- -DG_LOG_DOMAIN=\"e-minicard\" \
- -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \
- -DEVOLUTION_DATADIR=\""$(datadir)"\" \
- -I$(top_srcdir) \
- -I$(top_srcdir)/addressbook/backend/ebook \
- -I$(top_srcdir)/addressbook/contact-editor \
- -I$(top_srcdir)/widgets/e-text \
- -I$(top_srcdir)/widgets/e-table \
- -I$(top_srcdir)/widgets/e-reflow \
- -I$(top_srcdir)/widgets/e-table \
- -I$(top_srcdir)/widgets/misc \
- $(BONOBO_GNOME_CFLAGS) \
- $(EXTRA_GNOME_CFLAGS)
-
-noinst_LIBRARIES = \
- libeminicard.a
-
-libeminicard_a_SOURCES = \
- e-addressbook-model.c \
- e-addressbook-model.h \
- e-addressbook-view.c \
- e-addressbook-view.h \
- e-minicard-control.c \
- e-minicard-control.h \
- e-minicard-label.c \
- e-minicard-label.h \
- e-minicard-view-widget.c \
- e-minicard-view-widget.h \
- e-minicard-view.c \
- e-minicard-view.h \
- e-minicard-widget.c \
- e-minicard-widget.h \
- e-minicard.c \
- e-minicard.h \
- gal-view-factory-minicard.c \
- gal-view-factory-minicard.h \
- gal-view-minicard.c \
- gal-view-minicard.h
-
-noinst_PROGRAMS = \
- minicard-widget-test \
- minicard-label-test \
- minicard-test \
- reflow-test
-# minicard-view-test
-
-minicard_label_test_SOURCES = \
- test-minicard-label.c
-
-minicard_label_test_LDADD = \
- libeminicard.a \
- $(EXTRA_GNOME_LIBS) \
- $(BONOBO_GNOME_LIBS) \
- $(top_builddir)/e-util/libeutil.la
-
-minicard_test_SOURCES = \
- test-minicard.c
-
-minicard_test_LDADD = \
- libeminicard.a \
- $(top_builddir)/addressbook/backend/ebook/libebook.la \
- $(top_builddir)/e-util/libeutil.la \
- $(top_builddir)/libversit/libversit.la \
- $(top_builddir)/e-util/ename/libename.la \
- $(top_builddir)/addressbook/contact-editor/libecontacteditor.a \
- $(top_builddir)/addressbook/printing/libecontactprint.a \
- $(top_builddir)/widgets/misc/libemiscwidgets.a \
- $(top_builddir)/e-util/libeutil.la \
- $(EXTRA_GNOME_LIBS) \
- $(BONOBO_GNOME_LIBS) \
- $(GNOME_PRINT_LIBS)
-
-reflow_test_SOURCES = \
- test-reflow.c
-
-reflow_test_LDADD = \
- libeminicard.a \
- $(top_builddir)/addressbook/backend/ebook/libebook.la \
- $(top_builddir)/e-util/libeutil.la \
- $(top_builddir)/libversit/libversit.la \
- $(top_builddir)/e-util/ename/libename.la \
- $(top_builddir)/addressbook/contact-editor/libecontacteditor.a \
- $(top_builddir)/addressbook/printing/libecontactprint.a \
- $(top_builddir)/widgets/misc/libemiscwidgets.a \
- $(top_builddir)/e-util/libeutil.la \
- $(EXTRA_GNOME_LIBS) \
- $(BONOBO_GNOME_LIBS) \
- $(GNOME_PRINT_LIBS)
-
-#minicard_view_test_SOURCES = \
-# test-minicard-view.c
-
-#minicard_view_test_LDADD = \
-# $(EXTRA_GNOME_LIBS) \
-# $(BONOBO_GNOME_LIBS) \
-# libeminicard.a \
-# $(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)/addressbook/printing/libecontactprint.a \
-# $(top_builddir)/widgets/misc/libemiscwidgets.a \
-# $(top_builddir)/e-util/libeutil.la
-
-minicard_widget_test_SOURCES = \
- e-minicard-widget-test.c
-
-minicard_widget_test_LDADD = \
- libeminicard.a \
- $(top_builddir)/addressbook/backend/ebook/libebook.la \
- $(top_builddir)/e-util/libeutil.la \
- $(top_builddir)/libversit/libversit.la \
- $(top_builddir)/e-util/ename/libename.la \
- $(top_builddir)/addressbook/contact-editor/libecontacteditor.a \
- $(top_builddir)/addressbook/printing/libecontactprint.a \
- $(top_builddir)/widgets/misc/libemiscwidgets.a \
- $(top_builddir)/e-util/libeutil.la \
- $(EXTRA_GNOME_LIBS) \
- $(BONOBO_GNOME_LIBS) \
- $(GNOME_PRINT_LIBS)
-
-gladedir = $(datadir)/evolution/glade
-glade_DATA = alphabet.glade
-
-EXTRA_DIST = \
- $(glade_DATA)
diff --git a/addressbook/gui/widgets/alphabet.glade b/addressbook/gui/widgets/alphabet.glade
deleted file mode 100644
index dc6ee33966..0000000000
--- a/addressbook/gui/widgets/alphabet.glade
+++ /dev/null
@@ -1,355 +0,0 @@
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <name>alphabet</name>
- <program_name>alphabet</program_name>
- <directory></directory>
- <source_directory>src</source_directory>
- <pixmaps_directory>pixmaps</pixmaps_directory>
- <language>C</language>
- <gnome_support>True</gnome_support>
- <gettext_support>True</gettext_support>
- <use_widget_names>True</use_widget_names>
- <output_main_file>False</output_main_file>
- <output_support_files>False</output_support_files>
- <output_build_files>False</output_build_files>
- <gnome_help_support>True</gnome_help_support>
-</project>
-
-<widget>
- <class>GtkWindow</class>
- <name>window2</name>
- <visible>False</visible>
- <title>window2</title>
- <type>GTK_WINDOW_TOPLEVEL</type>
- <position>GTK_WIN_POS_NONE</position>
- <modal>False</modal>
- <allow_shrink>False</allow_shrink>
- <allow_grow>True</allow_grow>
- <auto_shrink>False</auto_shrink>
-
- <widget>
- <class>GtkScrolledWindow</class>
- <name>scrolledwindow-top</name>
- <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
- <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
- <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
- <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-
- <widget>
- <class>GtkViewport</class>
- <name>viewport1</name>
- <border_width>4</border_width>
- <shadow_type>GTK_SHADOW_NONE</shadow_type>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox2</name>
- <width>27</width>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
-
- <widget>
- <class>GtkButton</class>
- <name>button-1</name>
- <label>123</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button-a</name>
- <label>a</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button-b</name>
- <label>b</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button-c</name>
- <label>c</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button-d</name>
- <label>d</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button-e</name>
- <label>e</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button-f</name>
- <label>f</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button-g</name>
- <label>g</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button-h</name>
- <label>h</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button-i</name>
- <label>i</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button-j</name>
- <label>j</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button-k</name>
- <label>k</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button-l</name>
- <label>l</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button-m</name>
- <label>m</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button-n</name>
- <label>n</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button-o</name>
- <label>o</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button-p</name>
- <label>p</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button-q</name>
- <label>q</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button-r</name>
- <label>r</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button-s</name>
- <label>s</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button-t</name>
- <label>t</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button-u</name>
- <label>u</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button-v</name>
- <label>v</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button-w</name>
- <can_focus>True</can_focus>
- <label>w</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button-x</name>
- <label>x</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button-y</name>
- <label>y</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button-z</name>
- <label>z</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
- </widget>
- </widget>
-</widget>
-
-</GTK-Interface>
diff --git a/addressbook/gui/widgets/e-addressbook-model.c b/addressbook/gui/widgets/e-addressbook-model.c
deleted file mode 100644
index c20161259f..0000000000
--- a/addressbook/gui/widgets/e-addressbook-model.c
+++ /dev/null
@@ -1,482 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- *
- * Author:
- * Christopher James Lahey <clahey@helixcode.com>
- *
- * (C) 1999 Helix Code, Inc.
- */
-
-#include <config.h>
-#include "e-addressbook-model.h"
-#include <gnome-xml/tree.h>
-#include <gnome-xml/parser.h>
-#include <gnome-xml/xmlmemory.h>
-#include <gnome.h>
-
-#define PARENT_TYPE e_table_model_get_type()
-ETableModelClass *parent_class;
-
-/*
- * 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,
- ARG_EDITABLE,
-};
-
-enum {
- STATUS_MESSAGE,
- LAST_SIGNAL
-};
-
-#define COLS (E_CARD_SIMPLE_FIELD_LAST)
-
-static guint e_addressbook_model_signals [LAST_SIGNAL] = {0, };
-
-static void
-remove_book_view(EAddressbookModel *model)
-{
- 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 && model->status_message_id)
- gtk_signal_disconnect(GTK_OBJECT (model->book_view),
- model->status_message_id);
-
- model->create_card_id = 0;
- model->remove_card_id = 0;
- model->modify_card_id = 0;
- model->status_message_id = 0;
-
- if (model->book_view)
- gtk_object_unref(GTK_OBJECT(model->book_view));
-
- model->book_view = NULL;
-}
-
-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);
-
- remove_book_view(model);
-
- if (model->book)
- gtk_object_unref(GTK_OBJECT(model->book));
-
- 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 COLS;
-}
-
-/* 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 >= COLS || row >= addressbook->data_count )
- return NULL;
-
- value = e_card_simple_get_const(addressbook->data[row],
- col);
- 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 (addressbook->editable) {
- if ( col >= COLS|| row >= addressbook->data_count )
- return;
- e_card_simple_set(addressbook->data[row],
- col,
- val);
- gtk_object_get(GTK_OBJECT(addressbook->data[row]),
- "card", &card,
- NULL);
- e_book_commit_card(addressbook->book, card, NULL, NULL);
-
- 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 E_ADDRESSBOOK_MODEL(etc)->editable && col < E_CARD_SIMPLE_FIELD_LAST_SIMPLE_STRING;
-}
-
-static void
-addressbook_append_row (ETableModel *etm, ETableModel *source, gint row)
-{
- ECard *card;
- ECardSimple *simple;
- EAddressbookModel *addressbook = E_ADDRESSBOOK_MODEL(etm);
- int col;
-
- card = e_card_new("");
- simple = e_card_simple_new(card);
-
- for (col = 0; col < E_CARD_SIMPLE_FIELD_LAST_SIMPLE_STRING; col++) {
- const void *val = e_table_model_value_at(source, col, row);
- e_card_simple_set(simple,
- col,
- val);
- }
- e_card_simple_sync_card(simple);
- e_book_add_card(addressbook->book, card, NULL, NULL);
- gtk_object_unref(GTK_OBJECT(simple));
- gtk_object_unref(GTK_OBJECT(card));
-}
-
-/* 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);
-}
-
-static char *
-addressbook_value_to_string (ETableModel *etc, int col, const void *value)
-{
- return g_strdup(value);
-}
-
-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 *));
- e_table_model_pre_change(E_TABLE_MODEL(model));
- for ( ; cards; cards = cards->next) {
- 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;
- e_table_model_pre_change(E_TABLE_MODEL(model));
- 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
-status_message (EBookView *book_view,
- char* status,
- EAddressbookModel *model)
-{
- gtk_signal_emit (GTK_OBJECT (model),
- e_addressbook_model_signals [STATUS_MESSAGE],
- status);
-}
-
-static void
-e_addressbook_model_class_init (GtkObjectClass *object_class)
-{
- ETableModelClass *model_class = (ETableModelClass *) object_class;
-
- parent_class = gtk_type_class (PARENT_TYPE);
-
- object_class->destroy = addressbook_destroy;
- object_class->set_arg = e_addressbook_model_set_arg;
- object_class->get_arg = e_addressbook_model_get_arg;
-
- 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);
- gtk_object_add_arg_type ("EAddressbookModel::editable", GTK_TYPE_BOOL,
- GTK_ARG_READWRITE, ARG_EDITABLE);
-
- e_addressbook_model_signals [STATUS_MESSAGE] =
- gtk_signal_new ("status_message",
- GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (EAddressbookModelClass, status_message),
- gtk_marshal_NONE__POINTER,
- GTK_TYPE_NONE, 1, GTK_TYPE_POINTER);
-
- gtk_object_class_add_signals (object_class, e_addressbook_model_signals, LAST_SIGNAL);
-
- 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->append_row = addressbook_append_row;
- 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->value_to_string = addressbook_value_to_string;
-}
-
-static void
-e_addressbook_model_init (GtkObject *object)
-{
- EAddressbookModel *model = E_ADDRESSBOOK_MODEL(object);
- model->book = NULL;
- model->query = g_strdup("(contains \"x-evolution-any-field\" \"\")");
- 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->status_message_id = 0;
- model->data = NULL;
- model->data_count = 0;
- model->editable = FALSE;
- model->first_get_view = TRUE;
-}
-
-static void
-book_view_loaded (EBook *book, EBookStatus status, EBookView *book_view, gpointer closure)
-{
- EAddressbookModel *model = closure;
- int i;
- remove_book_view(model);
- 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);
- model->status_message_id = gtk_signal_connect(GTK_OBJECT(model->book_view),
- "status_message",
- GTK_SIGNAL_FUNC(status_message),
- model);
-
- for ( i = 0; i < model->data_count; i++ ) {
- gtk_object_unref(GTK_OBJECT(model->data[i]));
- }
-
- e_table_model_pre_change(E_TABLE_MODEL(model));
- 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) {
- if (model->first_get_view) {
- char *capabilities;
- capabilities = e_book_get_static_capabilities (model->book);
- if (capabilities && strstr (capabilities, "local")) {
- e_book_get_book_view (model->book, model->query, book_view_loaded, model);
- }
- model->first_get_view = FALSE;
- }
- else
- 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;
- case ARG_EDITABLE:
- model->editable = GTK_VALUE_BOOL (*arg);
- 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;
- case ARG_EDITABLE:
- GTK_VALUE_BOOL (*arg) = e_addressbook_model->editable;
- 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);
-}
-
-void e_addressbook_model_stop (EAddressbookModel *model)
-{
- remove_book_view(model);
-}
diff --git a/addressbook/gui/widgets/e-addressbook-model.h b/addressbook/gui/widgets/e-addressbook-model.h
deleted file mode 100644
index 79a606b314..0000000000
--- a/addressbook/gui/widgets/e-addressbook-model.h
+++ /dev/null
@@ -1,64 +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 <gal/e-table/e-table-model.h>
-#include "addressbook/backend/ebook/e-book.h"
-#include "addressbook/backend/ebook/e-book-view.h"
-#include "addressbook/backend/ebook/e-card-simple.h"
-
-#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 _EAddressbookModel EAddressbookModel;
-typedef struct _EAddressbookModelClass EAddressbookModelClass;
-
-struct _EAddressbookModel {
- 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, status_message_id;
-
- guint editable : 1;
- guint first_get_view : 1;
-};
-
-
-struct _EAddressbookModelClass {
- ETableModelClass parent_class;
-
- /*
- * Signals
- */
- void (*status_message) (EAddressbookModel *model, const gchar *message);
-};
-
-
-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);
-void e_addressbook_model_stop (EAddressbookModel *model);
-
-#endif /* _E_ADDRESSBOOK_MODEL_H_ */
diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c
deleted file mode 100644
index 5a340bc0a6..0000000000
--- a/addressbook/gui/widgets/e-addressbook-view.c
+++ /dev/null
@@ -1,1019 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-table-field-chooser.c
- * Copyright (C) 2000 Helix Code, Inc.
- * Author: Chris Lahey <clahey@helixcode.com>
- *
- * 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 <libgnome/gnome-paper.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnome/gnome-util.h>
-#include <gal/e-table/e-table-scrolled.h>
-#include <gal/e-table/e-table-model.h>
-#include <gal/widgets/e-scroll-frame.h>
-#include <gal/widgets/e-popup-menu.h>
-#include <gal/menus/gal-view-factory-etable.h>
-#include <gal/menus/gal-view-etable.h>
-
-#include <libgnomeprint/gnome-print.h>
-#include <libgnomeprint/gnome-print-dialog.h>
-#include <libgnomeprint/gnome-print-master.h>
-#include <libgnomeprint/gnome-print-master-preview.h>
-
-#include "widgets/menus/gal-view-menus.h"
-
-#include "addressbook/printing/e-contact-print.h"
-#include "addressbook/printing/e-contact-print-envelope.h"
-
-#include "gal-view-factory-minicard.h"
-#include "gal-view-minicard.h"
-
-#include "e-addressbook-view.h"
-#include "e-addressbook-model.h"
-#include "e-minicard-view-widget.h"
-#include "e-contact-save-as.h"
-
-#include "e-contact-editor.h"
-
-static void e_addressbook_view_init (EAddressbookView *card);
-static void e_addressbook_view_class_init (EAddressbookViewClass *klass);
-static void e_addressbook_view_set_arg (GtkObject *o, GtkArg *arg, guint arg_id);
-static void e_addressbook_view_get_arg (GtkObject *object, GtkArg *arg, guint arg_id);
-static void e_addressbook_view_destroy (GtkObject *object);
-static void change_view_type (EAddressbookView *view, EAddressbookViewType view_type);
-
-static GtkTableClass *parent_class = NULL;
-
-/* The arguments we take */
-enum {
- ARG_0,
- ARG_BOOK,
- ARG_QUERY,
- ARG_TYPE,
-};
-
-enum {
- STATUS_MESSAGE,
- LAST_SIGNAL
-};
-
-enum DndTargetType {
- DND_TARGET_TYPE_VCARD,
-};
-#define VCARD_TYPE "text/x-vcard"
-static GtkTargetEntry drag_types[] = {
- { VCARD_TYPE, 0, DND_TARGET_TYPE_VCARD },
-};
-static const int num_drag_types = sizeof (drag_types) / sizeof (drag_types[0]);
-
-static guint e_addressbook_view_signals [LAST_SIGNAL] = {0, };
-
-GtkType
-e_addressbook_view_get_type (void)
-{
- static GtkType type = 0;
-
- if (!type) {
- static const GtkTypeInfo info =
- {
- "EAddressbookView",
- sizeof (EAddressbookView),
- sizeof (EAddressbookViewClass),
- (GtkClassInitFunc) e_addressbook_view_class_init,
- (GtkObjectInitFunc) e_addressbook_view_init,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
- };
-
- type = gtk_type_unique (gtk_table_get_type (), &info);
- }
-
- return type;
-}
-
-static void
-e_addressbook_view_class_init (EAddressbookViewClass *klass)
-{
- GtkObjectClass *object_class;
-
- object_class = GTK_OBJECT_CLASS(klass);
-
- parent_class = gtk_type_class (gtk_table_get_type ());
-
- object_class->set_arg = e_addressbook_view_set_arg;
- object_class->get_arg = e_addressbook_view_get_arg;
- object_class->destroy = e_addressbook_view_destroy;
-
- gtk_object_add_arg_type ("EAddressbookView::book", GTK_TYPE_OBJECT,
- GTK_ARG_READWRITE, ARG_BOOK);
- gtk_object_add_arg_type ("EAddressbookView::query", GTK_TYPE_STRING,
- GTK_ARG_READWRITE, ARG_QUERY);
- gtk_object_add_arg_type ("EAddressbookView::type", GTK_TYPE_ENUM,
- GTK_ARG_READWRITE, ARG_TYPE);
-
- e_addressbook_view_signals [STATUS_MESSAGE] =
- gtk_signal_new ("status_message",
- GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (EAddressbookViewClass, status_message),
- gtk_marshal_NONE__POINTER,
- GTK_TYPE_NONE, 1, GTK_TYPE_POINTER);
-
- gtk_object_class_add_signals (object_class, e_addressbook_view_signals, LAST_SIGNAL);
-}
-
-static void
-e_addressbook_view_init (EAddressbookView *eav)
-{
- eav->view_type = E_ADDRESSBOOK_VIEW_NONE;
-
- eav->editable = FALSE;
- eav->book = NULL;
- eav->query = g_strdup("(contains \"x-evolution-any-field\" \"\")");
-
- eav->object = NULL;
- eav->widget = NULL;
-}
-
-static void
-e_addressbook_view_destroy (GtkObject *object)
-{
- EAddressbookView *eav = E_ADDRESSBOOK_VIEW(object);
-
- if (eav->book)
- gtk_object_unref(GTK_OBJECT(eav->book));
- g_free(eav->query);
-
- if (GTK_OBJECT_CLASS(parent_class)->destroy)
- GTK_OBJECT_CLASS(parent_class)->destroy(object);
-}
-
-GtkWidget*
-e_addressbook_view_new (void)
-{
- GtkWidget *widget = GTK_WIDGET (gtk_type_new (e_addressbook_view_get_type ()));
- return widget;
-}
-
-static void
-book_writable_cb (EBook *book, gboolean writable, EAddressbookView *eav)
-{
- eav->editable = writable;
- if (eav->object)
- gtk_object_set (GTK_OBJECT (eav->object),
- "editable", eav->editable,
- NULL);
-}
-
-static void
-e_addressbook_view_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
-{
- EAddressbookView *eav = E_ADDRESSBOOK_VIEW(object);
-
- switch (arg_id){
- case ARG_BOOK:
- if (eav->book) {
- gtk_object_unref(GTK_OBJECT(eav->book));
- }
- if (GTK_VALUE_OBJECT(*arg)) {
- eav->book = E_BOOK(GTK_VALUE_OBJECT(*arg));
- gtk_object_ref(GTK_OBJECT(eav->book));
- gtk_signal_connect (GTK_OBJECT (eav->book),
- "writable_status",
- book_writable_cb, eav);
- }
- else
- eav->book = NULL;
- if (eav->object)
- gtk_object_set(GTK_OBJECT(eav->object),
- "book", eav->book,
- "editable", eav->editable,
- NULL);
-
- break;
- case ARG_QUERY:
- g_free(eav->query);
- eav->query = g_strdup(GTK_VALUE_STRING(*arg));
- if (!eav->query)
- eav->query = g_strdup("(contains \"x-evolution-any-field\" \"\")");
- if (eav->object)
- gtk_object_set(GTK_OBJECT(eav->object),
- "query", eav->query,
- NULL);
- break;
- case ARG_TYPE:
- change_view_type(eav, GTK_VALUE_ENUM(*arg));
- break;
- default:
- break;
- }
-}
-
-static void
-e_addressbook_view_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
-{
- EAddressbookView *eav = E_ADDRESSBOOK_VIEW(object);
-
- switch (arg_id) {
- case ARG_BOOK:
- if (eav->book)
- GTK_VALUE_OBJECT (*arg) = GTK_OBJECT(eav->book);
- else
- GTK_VALUE_OBJECT (*arg) = NULL;
- break;
- case ARG_QUERY:
- GTK_VALUE_STRING (*arg) = eav->query;
- break;
- case ARG_TYPE:
- GTK_VALUE_ENUM (*arg) = eav->view_type;
- break;
- default:
- arg->type = GTK_TYPE_INVALID;
- break;
- }
-}
-
-
-
-typedef struct {
- EAddressbookView *view;
- char letter;
-} LetterClosure;
-
-static void
-jump_to_letter(GtkWidget *button, LetterClosure *closure)
-{
- if (closure->view->widget && E_IS_MINICARD_VIEW_WIDGET(closure->view->widget))
- e_minicard_view_widget_jump_to_letter(E_MINICARD_VIEW_WIDGET(closure->view->widget), closure->letter);
-}
-
-static void
-free_closure(GtkWidget *button, LetterClosure *closure)
-{
- g_free(closure);
-}
-
-static void
-connect_button (EAddressbookView *view, GladeXML *gui, char letter)
-{
- char *name;
- GtkWidget *button;
- LetterClosure *closure;
- name = g_strdup_printf("button-%c", letter);
- button = glade_xml_get_widget(gui, name);
- g_free(name);
- if (!button)
- return;
- closure = g_new(LetterClosure, 1);
- closure->view = view;
- closure->letter = letter;
- gtk_signal_connect(GTK_OBJECT(button), "clicked",
- GTK_SIGNAL_FUNC(jump_to_letter), closure);
- gtk_signal_connect(GTK_OBJECT(button), "destroy",
- GTK_SIGNAL_FUNC(free_closure), closure);
-}
-
-static GtkWidget *
-create_alphabet (EAddressbookView *view)
-{
- GtkWidget *widget;
- char letter;
- GladeXML *gui = glade_xml_new (EVOLUTION_GLADEDIR "/alphabet.glade", NULL);
-
- widget = glade_xml_get_widget(gui, "scrolledwindow-top");
- if (!widget) {
- return NULL;
- }
-
- connect_button(view, gui, '1');
- for (letter = 'a'; letter <= 'z'; letter ++) {
- connect_button(view, gui, letter);
- }
-
- gtk_object_unref(GTK_OBJECT(gui));
- return widget;
-}
-
-static void
-create_minicard_view (EAddressbookView *view)
-{
- GtkWidget *scrollframe;
- GtkWidget *alphabet;
- GtkWidget *minicard_view;
- GtkWidget *minicard_hbox;
-
- gtk_widget_push_visual (gdk_rgb_get_visual ());
- gtk_widget_push_colormap (gdk_rgb_get_cmap ());
-
- minicard_hbox = gtk_hbox_new(FALSE, 0);
-
- minicard_view = e_minicard_view_widget_new();
-
- view->object = GTK_OBJECT(minicard_view);
- view->widget = minicard_hbox;
-
- scrollframe = e_scroll_frame_new (NULL, NULL);
- e_scroll_frame_set_policy (E_SCROLL_FRAME (scrollframe),
- GTK_POLICY_AUTOMATIC,
- GTK_POLICY_AUTOMATIC);
-
- gtk_container_add (GTK_CONTAINER (scrollframe), minicard_view);
-
-
- gtk_box_pack_start(GTK_BOX(minicard_hbox), scrollframe, TRUE, TRUE, 0);
-
- alphabet = create_alphabet(view);
- if (alphabet) {
- gtk_object_ref(GTK_OBJECT(alphabet));
- gtk_widget_unparent(alphabet);
- gtk_box_pack_start(GTK_BOX(minicard_hbox), alphabet, FALSE, FALSE, 0);
- gtk_object_unref(GTK_OBJECT(alphabet));
- }
-
- gtk_table_attach(GTK_TABLE(view), minicard_hbox,
- 0, 1,
- 0, 1,
- GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND,
- 0, 0);
-
- gtk_widget_show_all( GTK_WIDGET(minicard_hbox) );
-
- gtk_widget_pop_visual ();
- gtk_widget_pop_colormap ();
-}
-
-
-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__);
-}
-
-/* Callback for the add_card signal from the contact editor */
-static void
-add_card_cb (EContactEditor *ce, ECard *card, gpointer data)
-{
- EBook *book;
-
- book = E_BOOK (data);
- e_book_add_card (book, card, card_added_cb, NULL);
-}
-
-/* Callback for the commit_card signal from the contact editor */
-static void
-commit_card_cb (EContactEditor *ce, ECard *card, gpointer data)
-{
- EBook *book;
-
- book = E_BOOK (data);
- e_book_commit_card (book, card, card_modified_cb, NULL);
-}
-
-/* Callback for the delete_card signal from the contact editor */
-static void
-delete_card_cb (EContactEditor *ce, ECard *card, gpointer data)
-{
- EBook *book;
-
- book = E_BOOK (data);
- e_book_remove_card (book, card, card_modified_cb, NULL);
-}
-
-/* Callback used when the contact editor is closed */
-static void
-editor_closed_cb (EContactEditor *ce, gpointer data)
-{
- gtk_object_unref (GTK_OBJECT (ce));
-}
-
-typedef struct {
- EAddressbookView *view;
- ECard *card;
-} CardAndView;
-
-static void
-supported_fields_cb (EBook *book, EBookStatus status, EList *fields, CardAndView *card_and_view)
-{
- EContactEditor *ce;
-
- ce = e_contact_editor_new (card_and_view->card, FALSE, fields, !card_and_view->view->editable);
-
- gtk_signal_connect (GTK_OBJECT (ce), "add_card",
- GTK_SIGNAL_FUNC (add_card_cb), book);
- gtk_signal_connect (GTK_OBJECT (ce), "commit_card",
- GTK_SIGNAL_FUNC (commit_card_cb), book);
- gtk_signal_connect (GTK_OBJECT (ce), "delete_card",
- GTK_SIGNAL_FUNC (delete_card_cb), book);
- gtk_signal_connect (GTK_OBJECT (ce), "editor_closed",
- GTK_SIGNAL_FUNC (editor_closed_cb), NULL);
-
- gtk_object_unref(GTK_OBJECT(card_and_view->card));
-
- g_free (card_and_view);
-}
-
-static void
-table_double_click(ETableScrolled *table, gint row, gint col, GdkEvent *event, EAddressbookView *view)
-{
- if (E_IS_ADDRESSBOOK_MODEL(view->object)) {
- EAddressbookModel *model = E_ADDRESSBOOK_MODEL(view->object);
- ECard *card = e_addressbook_model_get_card(model, row);
- EBook *book;
- CardAndView *card_and_view;
-
- gtk_object_get(GTK_OBJECT(model),
- "book", &book,
- NULL);
-
- g_assert (E_IS_BOOK (book));
-
- card_and_view = g_new (CardAndView, 1);
- card_and_view->card = card;
- card_and_view->view = view;
- e_book_get_supported_fields (book, (EBookFieldsCallback)supported_fields_cb, card_and_view);
- }
-}
-
-typedef struct {
- EBook *book;
- ECard *card;
- EAddressbookView *view;
- GtkWidget *widget;
- gpointer closure;
-} CardAndBook;
-
-static void
-card_and_book_free (CardAndBook *card_and_book)
-{
- gtk_object_unref(GTK_OBJECT(card_and_book->card));
- gtk_object_unref(GTK_OBJECT(card_and_book->book));
- gtk_object_unref(GTK_OBJECT(card_and_book->view));
-}
-
-static void
-get_card_list_1(gint model_row,
- gpointer closure)
-{
- CardAndBook *card_and_book;
- GList **list;
- EAddressbookView *view;
- ECard *card;
-
- card_and_book = closure;
- list = card_and_book->closure;
- view = card_and_book->view;
-
- card = e_addressbook_model_get_card(E_ADDRESSBOOK_MODEL(view->object), model_row);
- *list = g_list_prepend(*list, card);
-}
-
-static GList *
-get_card_list (CardAndBook *card_and_book)
-{
- GList *list = NULL;
- ETable *table;
-
- table = E_TABLE(card_and_book->widget);
- card_and_book->closure = &list;
- e_table_selected_row_foreach(table,
- get_card_list_1,
- card_and_book);
- return list;
-}
-
-static void
-save_as (GtkWidget *widget, CardAndBook *card_and_book)
-{
- e_contact_save_as(_("Save as VCard"), card_and_book->card);
- card_and_book_free(card_and_book);
-}
-
-static void
-send_as (GtkWidget *widget, CardAndBook *card_and_book)
-{
- e_card_send(card_and_book->card, E_CARD_DISPOSITION_AS_ATTACHMENT);
- card_and_book_free(card_and_book);
-}
-
-static void
-send_to (GtkWidget *widget, CardAndBook *card_and_book)
-
-{
- e_card_send(card_and_book->card, E_CARD_DISPOSITION_AS_TO);
- card_and_book_free(card_and_book);
-}
-
-static void
-print (GtkWidget *widget, CardAndBook *card_and_book)
-{
- gtk_widget_show(e_contact_print_card_dialog_new(card_and_book->card));
- card_and_book_free(card_and_book);
-}
-
-static void
-print_envelope (GtkWidget *widget, CardAndBook *card_and_book)
-{
- gtk_widget_show(e_contact_print_envelope_dialog_new(card_and_book->card));
- card_and_book_free(card_and_book);
-}
-
-static void
-delete (GtkWidget *widget, CardAndBook *card_and_book)
-{
- if (e_contact_editor_confirm_delete(GTK_WINDOW(gtk_widget_get_toplevel(card_and_book->widget)))) {
- GList *list = get_card_list(card_and_book);
- GList *iterator;
- for (iterator = list; iterator; iterator = iterator->next) {
- ECard *card = iterator->data;
- /* Add the card in the contact editor to our ebook */
- e_book_remove_card (card_and_book->book,
- card,
- NULL,
- NULL);
- }
- e_free_object_list(list);
- }
- card_and_book_free(card_and_book);
-}
-
-static gint
-table_right_click(ETableScrolled *table, gint row, gint col, GdkEvent *event, EAddressbookView *view)
-{
- if (E_IS_ADDRESSBOOK_MODEL(view->object)) {
- EAddressbookModel *model = E_ADDRESSBOOK_MODEL(view->object);
- CardAndBook *card_and_book;
-
- EPopupMenu menu[] = {
- {N_("Save as VCard"), NULL, GTK_SIGNAL_FUNC(save_as), NULL, 0},
- {N_("Send contact to other"), NULL, GTK_SIGNAL_FUNC(send_as), NULL, 0},
- {N_("Send message to contact"), NULL, GTK_SIGNAL_FUNC(send_to), NULL, 0},
- {N_("Print"), NULL, GTK_SIGNAL_FUNC(print), NULL, 0},
- {N_("Print Envelope"), NULL, GTK_SIGNAL_FUNC(print_envelope), NULL, 0},
- {N_("Delete"), NULL, GTK_SIGNAL_FUNC(delete), NULL, 0},
- {NULL, NULL, NULL, NULL, 0}
- };
-
- card_and_book = g_new(CardAndBook, 1);
- card_and_book->card = e_addressbook_model_get_card(model, row);
- card_and_book->widget = GTK_WIDGET(table);
- card_and_book->view = view;
- gtk_object_get(GTK_OBJECT(model),
- "book", &(card_and_book->book),
- NULL);
-
- gtk_object_ref(GTK_OBJECT(card_and_book->book));
- gtk_object_ref(GTK_OBJECT(card_and_book->view));
-
- e_popup_menu_run (menu, event, 0, 0, card_and_book);
- return TRUE;
- } else
- return FALSE;
-}
-
-static void
-table_drag_data_get (ETable *table,
- int row,
- int col,
- GdkDragContext *context,
- GtkSelectionData *selection_data,
- guint info,
- guint time,
- gpointer user_data)
-{
- EAddressbookView *view = user_data;
-
- printf ("table_drag_data_get (row %d, col %d)\n", row, col);
-
- if (!E_IS_ADDRESSBOOK_MODEL(view->object))
- return;
-
- switch (info) {
- case DND_TARGET_TYPE_VCARD: {
- char *value;
-
- value = e_card_simple_get_vcard(E_ADDRESSBOOK_MODEL(view->object)->data[row]);
-
- gtk_selection_data_set (selection_data,
- selection_data->target,
- 8,
- value, strlen (value));
- break;
- }
- }
-}
-
-static void
-status_message (GtkObject *object, const gchar *status, EAddressbookView *eav)
-{
- gtk_signal_emit (GTK_OBJECT (eav),
- e_addressbook_view_signals [STATUS_MESSAGE],
- status);
-}
-
-#ifdef JUST_FOR_TRANSLATORS
-static char *list [] = {
- N_("* Click here to add a contact *"),
- N_("File As"),
- N_("Full Name"),
- N_("Email"),
- N_("Primary Phone"),
- N_("Assistant Phone"),
- N_("Business Phone"),
- N_("Callback Phone"),
- N_("Company Phone"),
- N_("Home Phone"),
- N_("Organization"),
- N_("Business Address"),
- N_("Home Address"),
- N_("Mobile Phone"),
- N_("Car Phone"),
- N_("Business Fax"),
- N_("Home Fax"),
- N_("Business Phone 2"),
- N_("Home Phone 2"),
- N_("ISDN"),
- N_("Other Phone"),
- N_("Other Fax"),
- N_("Pager"),
- N_("Radio"),
- N_("Telex"),
- N_("TTY"),
- N_("Other Address"),
- N_("Email 2"),
- N_("Email 3"),
- N_("Web Site"),
- N_("Department"),
- N_("Office"),
- N_("Title"),
- N_("Profession"),
- N_("Manager"),
- N_("Assistant"),
- N_("Nickname"),
- N_("Spouse"),
- N_("Note"),
- N_("Free-busy URL"),
-};
-#endif
-
-#define SPEC "<?xml version=\"1.0\"?> \
-<ETableSpecification click-to-add=\"true\" draw-grid=\"true\" _click-to-add-message=\"* Click here to add a contact *\"> \
- <ETableColumn model_col= \"0\" _title=\"File As\" expansion=\"1.0\" minimum_width=\"20\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col= \"1\" _title=\"Full Name\" expansion=\"1.0\" minimum_width=\"20\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col= \"3\" _title=\"Email\" expansion=\"1.0\" minimum_width=\"20\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col= \"4\" _title=\"Primary Phone\" expansion=\"1.0\" minimum_width=\"20\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col= \"5\" _title=\"Assistant Phone\" expansion=\"1.0\" minimum_width=\"20\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col= \"6\" _title=\"Business Phone\" expansion=\"1.0\" minimum_width=\"20\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col= \"7\" _title=\"Callback Phone\" expansion=\"1.0\" minimum_width=\"20\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col= \"8\" _title=\"Company Phone\" expansion=\"1.0\" minimum_width=\"20\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col= \"9\" _title=\"Home Phone\" expansion=\"1.0\" minimum_width=\"20\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"10\" _title=\"Organization\" expansion=\"1.0\" minimum_width=\"20\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"11\" _title=\"Business Address\" expansion=\"1.0\" minimum_width=\"20\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"12\" _title=\"Home Address\" expansion=\"1.0\" minimum_width=\"20\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"13\" _title=\"Mobile Phone\" expansion=\"1.0\" minimum_width=\"20\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"14\" _title=\"Car Phone\" expansion=\"1.0\" minimum_width=\"20\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"15\" _title=\"Business Fax\" expansion=\"1.0\" minimum_width=\"20\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"16\" _title=\"Home Fax\" expansion=\"1.0\" minimum_width=\"20\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"17\" _title=\"Business Phone 2\" expansion=\"1.0\" minimum_width=\"20\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"18\" _title=\"Home Phone 2\" expansion=\"1.0\" minimum_width=\"20\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"19\" _title=\"ISDN\" expansion=\"1.0\" minimum_width=\"20\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"20\" _title=\"Other Phone\" expansion=\"1.0\" minimum_width=\"20\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"21\" _title=\"Other Fax\" expansion=\"1.0\" minimum_width=\"20\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"22\" _title=\"Pager\" expansion=\"1.0\" minimum_width=\"20\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"23\" _title=\"Radio\" expansion=\"1.0\" minimum_width=\"20\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"24\" _title=\"Telex\" expansion=\"1.0\" minimum_width=\"20\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"25\" _title=\"TTY\" expansion=\"1.0\" minimum_width=\"20\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"26\" _title=\"Other Address\" expansion=\"1.0\" minimum_width=\"20\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"27\" _title=\"Email 2\" expansion=\"1.0\" minimum_width=\"20\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"28\" _title=\"Email 3\" expansion=\"1.0\" minimum_width=\"20\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"29\" _title=\"Web Site\" expansion=\"1.0\" minimum_width=\"20\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"30\" _title=\"Department\" expansion=\"1.0\" minimum_width=\"20\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"31\" _title=\"Office\" expansion=\"1.0\" minimum_width=\"20\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"32\" _title=\"Title\" expansion=\"1.0\" minimum_width=\"20\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"33\" _title=\"Profession\" expansion=\"1.0\" minimum_width=\"20\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"34\" _title=\"Manager\" expansion=\"1.0\" minimum_width=\"20\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"35\" _title=\"Assistant\" expansion=\"1.0\" minimum_width=\"20\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"36\" _title=\"Nickname\" expansion=\"1.0\" minimum_width=\"20\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"37\" _title=\"Spouse\" expansion=\"1.0\" minimum_width=\"20\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"38\" _title=\"Note\" expansion=\"1.0\" minimum_width=\"20\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"39\" _title=\"Free-busy URL\" expansion=\"1.0\" minimum_width=\"20\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableState> \
- <column source=\"0\"/> \
- <column source=\"1\"/> \
- <column source=\"5\"/> \
- <column source=\"3\"/> \
- <column source=\"4\"/> \
- <grouping> \
- <leaf column=\"0\" ascending=\"true\"/> \
- </grouping> \
- </ETableState> \
-</ETableSpecification>"
-
-static void
-create_table_view (EAddressbookView *view)
-{
- ETableModel *model;
- ECardSimple *simple;
- GtkWidget *table;
-
- simple = e_card_simple_new(NULL);
-
- model = e_addressbook_model_new();
-
- /* 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. */
- table = e_table_scrolled_new (model, NULL, SPEC, NULL);
-
- view->object = GTK_OBJECT(model);
- view->widget = table;
-
- gtk_signal_connect(GTK_OBJECT(e_table_scrolled_get_table(E_TABLE_SCROLLED(table))), "double_click",
- GTK_SIGNAL_FUNC(table_double_click), view);
- gtk_signal_connect(GTK_OBJECT(e_table_scrolled_get_table(E_TABLE_SCROLLED(table))), "right_click",
- GTK_SIGNAL_FUNC(table_right_click), view);
-
- /* drag & drop signals */
- e_table_drag_source_set (E_TABLE(E_TABLE_SCROLLED(table)->table), GDK_BUTTON1_MASK,
- drag_types, num_drag_types, GDK_ACTION_MOVE);
-
- gtk_signal_connect (GTK_OBJECT (E_TABLE_SCROLLED(table)->table),
- "table_drag_data_get",
- GTK_SIGNAL_FUNC (table_drag_data_get),
- view);
-
- gtk_table_attach(GTK_TABLE(view), table,
- 0, 1,
- 0, 1,
- GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND,
- 0, 0);
-
- gtk_widget_show( GTK_WIDGET(table) );
-
- gtk_object_unref(GTK_OBJECT(simple));
-}
-
-
-static void
-change_view_type (EAddressbookView *view, EAddressbookViewType view_type)
-{
- if (view_type == view->view_type)
- return;
-
- if (view->widget) {
- gtk_widget_destroy (view->widget);
- view->widget = NULL;
- }
- view->object = NULL;
-
- switch (view_type) {
- case E_ADDRESSBOOK_VIEW_MINICARD:
- create_minicard_view (view);
- break;
- case E_ADDRESSBOOK_VIEW_TABLE:
- create_table_view (view);
- break;
- default:
- g_warning ("view_type must be either TABLE or MINICARD\n");
- return;
- }
-
- view->view_type = view_type;
-
- gtk_signal_connect (view->object,
- "status_message",
- GTK_SIGNAL_FUNC (status_message),
- view);
-
- gtk_object_set(view->object,
- "query", view->query,
- "book", view->book,
- "editable", view->editable,
- NULL);
-}
-
-static void
-e_contact_print_destroy(GnomeDialog *dialog, gpointer data)
-{
- ETableScrolled *table = gtk_object_get_data(GTK_OBJECT(dialog), "table");
- EPrintable *printable = gtk_object_get_data(GTK_OBJECT(dialog), "printable");
- gtk_object_unref(GTK_OBJECT(printable));
- gtk_object_unref(GTK_OBJECT(table));
-}
-
-static void
-e_contact_print_button(GnomeDialog *dialog, gint button, gpointer data)
-{
- GnomePrintMaster *master;
- GnomePrintContext *pc;
- EPrintable *printable = gtk_object_get_data(GTK_OBJECT(dialog), "printable");
- GtkWidget *preview;
- 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_printable_reset(printable);
- while (e_printable_data_left(printable)) {
- if (gnome_print_gsave(pc) == -1)
- /* FIXME */;
- if (gnome_print_translate(pc, 72, 72) == -1)
- /* FIXME */;
- e_printable_print_page(printable,
- pc,
- 6.5 * 72,
- 5 * 72,
- TRUE);
- if (gnome_print_grestore(pc) == -1)
- /* FIXME */;
- if (gnome_print_showpage(pc) == -1)
- /* FIXME */;
- }
- gnome_print_master_close(master);
- gnome_print_master_print(master);
- gtk_object_unref(GTK_OBJECT(master));
- 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_printable_reset(printable);
- while (e_printable_data_left(printable)) {
- if (gnome_print_gsave(pc) == -1)
- /* FIXME */;
- if (gnome_print_translate(pc, 72, 72) == -1)
- /* FIXME */;
- e_printable_print_page(printable,
- pc,
- 6.5 * 72,
- 9 * 72,
- TRUE);
- if (gnome_print_grestore(pc) == -1)
- /* FIXME */;
- if (gnome_print_showpage(pc) == -1)
- /* FIXME */;
- }
- gnome_print_master_close(master);
- preview = GTK_WIDGET(gnome_print_master_preview_new(master, "Print Preview"));
- gtk_widget_show_all(preview);
- gtk_object_unref(GTK_OBJECT(master));
- break;
- case GNOME_PRINT_CANCEL:
- gnome_dialog_close(dialog);
- break;
- }
-}
-
-static void
-display_view(GalViewCollection *collection,
- GalView *view,
- gpointer data)
-{
- EAddressbookView *address_view = data;
- if (GAL_IS_VIEW_ETABLE(view)) {
- change_view_type (address_view, E_ADDRESSBOOK_VIEW_TABLE);
- e_table_set_state_object(e_table_scrolled_get_table(E_TABLE_SCROLLED(address_view->widget)), GAL_VIEW_ETABLE(view)->state);
- } else if (GAL_IS_VIEW_MINICARD(view)) {
- change_view_type (address_view, E_ADDRESSBOOK_VIEW_MINICARD);
- }
-}
-
-void
-e_addressbook_view_setup_menus (EAddressbookView *view,
- BonoboUIComponent *uic)
-{
- GalViewCollection *collection;
- GalViewMenus *views;
- GalViewFactory *factory;
- ETableSpecification *spec;
- char *galview;
-
- collection = gal_view_collection_new();
-
- galview = gnome_util_prepend_user_home("/evolution/views/addressbook/");
- gal_view_collection_set_storage_directories(collection,
- EVOLUTION_DATADIR "/evolution/views/addressbook/",
- galview);
- g_free(galview);
-
- spec = e_table_specification_new();
- e_table_specification_load_from_string(spec, SPEC);
-
- factory = gal_view_factory_etable_new(spec);
- gal_view_collection_add_factory(collection, factory);
- gtk_object_sink(GTK_OBJECT(factory));
-
- factory = gal_view_factory_minicard_new();
- gal_view_collection_add_factory(collection, factory);
- gtk_object_sink(GTK_OBJECT(factory));
-
- gal_view_collection_load(collection);
-
- views = gal_view_menus_new(collection);
- gal_view_menus_apply(views, uic, NULL); /* This function probably needs to sink the views object. */
- gtk_signal_connect(GTK_OBJECT(collection), "display_view",
- display_view, view);
- /* gtk_object_sink(GTK_OBJECT(views)); */
-
- gtk_object_sink(GTK_OBJECT(collection));
-}
-
-void
-e_addressbook_view_print(EAddressbookView *view)
-{
- if (view->view_type == E_ADDRESSBOOK_VIEW_MINICARD) {
- char *query;
- EBook *book;
- GtkWidget *print;
-
- gtk_object_get (view->object,
- "query", &query,
- "book", &book,
- NULL);
- print = e_contact_print_dialog_new(book, query);
- g_free(query);
- gtk_widget_show_all(print);
- } else if (view->view_type == E_ADDRESSBOOK_VIEW_TABLE) {
- GtkWidget *dialog;
- EPrintable *printable;
- ETable *etable;
-
- 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_get(GTK_OBJECT(view->widget), "table", &etable, NULL);
- printable = e_table_get_printable(etable);
-
- gtk_object_ref(GTK_OBJECT(view->widget));
-
- gtk_object_set_data(GTK_OBJECT(dialog), "table", view->widget);
- gtk_object_set_data(GTK_OBJECT(dialog), "printable", printable);
-
- gtk_signal_connect(GTK_OBJECT(dialog),
- "clicked", GTK_SIGNAL_FUNC(e_contact_print_button), NULL);
- gtk_signal_connect(GTK_OBJECT(dialog),
- "destroy", GTK_SIGNAL_FUNC(e_contact_print_destroy), NULL);
- gtk_widget_show(dialog);
- }
-}
-
-static void
-card_deleted_cb (EBook* book, EBookStatus status, gpointer user_data)
-{
- g_print ("%s: %s(): a card was deleted\n", __FILE__, __FUNCTION__);
-}
-
-void
-e_addressbook_view_delete_selection(EAddressbookView *view)
-{
- if (view->view_type == E_ADDRESSBOOK_VIEW_MINICARD)
- e_minicard_view_widget_remove_selection (E_MINICARD_VIEW_WIDGET(view->object), card_deleted_cb, NULL);
-}
-
-void
-e_addressbook_view_show_all(EAddressbookView *view)
-{
- gtk_object_set(GTK_OBJECT(view),
- "query", NULL,
- NULL);
-}
-
-void
-e_addressbook_view_stop(EAddressbookView *view)
-{
- switch(view->view_type) {
- case E_ADDRESSBOOK_VIEW_MINICARD:
- e_minicard_view_widget_stop(E_MINICARD_VIEW_WIDGET (view->object));
- break;
- case E_ADDRESSBOOK_VIEW_TABLE:
- e_addressbook_model_stop(E_ADDRESSBOOK_MODEL (view->object));
- break;
- case E_ADDRESSBOOK_VIEW_NONE:
- break;
- }
-}
diff --git a/addressbook/gui/widgets/e-addressbook-view.h b/addressbook/gui/widgets/e-addressbook-view.h
deleted file mode 100644
index 0c282c013a..0000000000
--- a/addressbook/gui/widgets/e-addressbook-view.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* e-addressbook-view.h
- * Copyright (C) 2000 Helix Code, Inc.
- * Author: Chris Lahey <clahey@helixcode.com>
- *
- * 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_ADDRESSBOOK_VIEW_H__
-#define __E_ADDRESSBOOK_VIEW_H__
-
-#include <gtk/gtktable.h>
-#include <bonobo/bonobo-ui-component.h>
-#include "addressbook/backend/ebook/e-book.h"
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-/* EAddressbookView - A card displaying information about a contact.
- *
- * The following arguments are available:
- *
- * name type read/write description
- * --------------------------------------------------------------------------------
- */
-
-#define E_ADDRESSBOOK_VIEW_TYPE (e_addressbook_view_get_type ())
-#define E_ADDRESSBOOK_VIEW(obj) (GTK_CHECK_CAST ((obj), E_ADDRESSBOOK_VIEW_TYPE, EAddressbookView))
-#define E_ADDRESSBOOK_VIEW_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_ADDRESSBOOK_VIEW_TYPE, EAddressbookViewClass))
-#define E_IS_ADDRESSBOOK_VIEW(obj) (GTK_CHECK_TYPE ((obj), E_ADDRESSBOOK_VIEW_TYPE))
-#define E_IS_ADDRESSBOOK_VIEW_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_ADDRESSBOOK_VIEW_TYPE))
-
-typedef enum {
- E_ADDRESSBOOK_VIEW_NONE, /* initialized to this */
- E_ADDRESSBOOK_VIEW_TABLE,
- E_ADDRESSBOOK_VIEW_MINICARD
-} EAddressbookViewType;
-
-
-typedef struct _EAddressbookView EAddressbookView;
-typedef struct _EAddressbookViewClass EAddressbookViewClass;
-
-struct _EAddressbookView
-{
- GtkTable parent;
-
- /* item specific fields */
- EAddressbookViewType view_type;
-
- EBook *book;
- char *query;
- guint editable : 1;
-
- GtkObject *object;
- GtkWidget *widget;
-
- GtkWidget *vbox;
-};
-
-struct _EAddressbookViewClass
-{
- GtkTableClass parent_class;
-
- /*
- * Signals
- */
- void (*status_message) (EAddressbookView *view, const gchar *message);
-};
-
-GtkWidget *e_addressbook_view_new (void);
-GtkType e_addressbook_view_get_type (void);
-
-void e_addressbook_view_setup_menus (EAddressbookView *view,
- BonoboUIComponent *uic);
-
-void e_addressbook_view_print (EAddressbookView *view);
-void e_addressbook_view_delete_selection (EAddressbookView *view);
-void e_addressbook_view_show_all (EAddressbookView *view);
-void e_addressbook_view_stop (EAddressbookView *view);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-#endif /* __E_ADDRESSBOOK_VIEW_H__ */
diff --git a/addressbook/gui/widgets/e-minicard-control.c b/addressbook/gui/widgets/e-minicard-control.c
deleted file mode 100644
index ab1356d1d5..0000000000
--- a/addressbook/gui/widgets/e-minicard-control.c
+++ /dev/null
@@ -1,335 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-minicard-control.c
- *
- * Authors:
- * Chris Lahey <clahey@helixcode.com>
- *
- * Copyright 1999, 2000, Helix Code, Inc.
- */
-
-#include <config.h>
-
-#include <bonobo/bonobo-generic-factory.h>
-#include <bonobo/bonobo-persist.h>
-#include <bonobo/bonobo-persist-stream.h>
-#include <bonobo/bonobo-stream-client.h>
-#include <addressbook/backend/ebook/e-book.h>
-#include <addressbook/backend/ebook/e-card.h>
-
-#include "e-minicard-control.h"
-#include "e-minicard-widget.h"
-
-#if 0
-enum {
- PROP_RUNNING
-} MyArgs;
-
-#define RUNNING_KEY "Clock::Running"
-
-static void
-get_prop (BonoboPropertyBag *bag,
- BonoboArg *arg,
- guint arg_id,
- CORBA_Environment *ev,
- gpointer user_data)
-{
- GtkObject *clock = user_data;
-
- switch (arg_id) {
-
- case PROP_RUNNING:
- {
- gboolean b = GPOINTER_TO_UINT (gtk_object_get_data (clock, RUNNING_KEY));
- BONOBO_ARG_SET_BOOLEAN (arg, b);
- break;
- }
-
- default:
- g_warning ("Unhandled arg %d", arg_id);
- break;
- }
-}
-
-static void
-set_prop (BonoboPropertyBag *bag,
- const BonoboArg *arg,
- guint arg_id,
- CORBA_Environment *ev,
- gpointer user_data)
-{
- GtkClock *clock = user_data;
-
- switch (arg_id) {
-
- case PROP_RUNNING:
- {
- guint i;
-
- i = BONOBO_ARG_GET_BOOLEAN (arg);
-
- if (i)
- gtk_clock_start (clock);
- else
- gtk_clock_stop (clock);
-
- gtk_object_set_data (GTK_OBJECT (clock), RUNNING_KEY,
- GUINT_TO_POINTER (i));
- break;
- }
-
- default:
- g_warning ("Unhandled arg %d", arg_id);
- break;
- }
-}
-#endif
-
-/*
- * Bonobo::PersistStream
- *
- * These two functions implement the Bonobo::PersistStream load and
- * save methods which allow data to be loaded into and out of the
- * BonoboObject.
- */
-static char *
-stream_read (Bonobo_Stream stream)
-{
- Bonobo_Stream_iobuf *buffer;
- CORBA_Environment ev;
- char *data = NULL;
- gint length = 0;
-
- CORBA_exception_init (&ev);
- do {
-#define READ_CHUNK_SIZE 65536
- Bonobo_Stream_read (stream, READ_CHUNK_SIZE,
- &buffer, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- CORBA_exception_free (&ev);
- return NULL;
- }
-
- if (buffer->_length <= 0)
- break;
-
- data = g_realloc (data, length + buffer->_length + 1);
-
- memcpy (data + length, buffer->_buffer, buffer->_length);
-
- length += buffer->_length;
-
- CORBA_free (buffer);
- } while (1);
-
- CORBA_free (buffer);
- CORBA_exception_free (&ev);
-
- if (data)
- data[length] = '\0';
- else
- data = g_strdup("");
-
- return data;
-} /* stream_read */
-
-/*
- * This function implements the Bonobo::PersistStream:load method.
- */
-static void
-pstream_load (BonoboPersistStream *ps, const Bonobo_Stream stream,
- Bonobo_Persist_ContentType type, void *data,
- CORBA_Environment *ev)
-{
- ECard *card;
- char *vcard;
- GtkWidget *minicard = data;
-
- if (type && g_strcasecmp (type, "text/vCard") != 0 &&
- g_strcasecmp (type, "text/x-vCard") != 0) {
- CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
- ex_Bonobo_Persist_WrongDataType, NULL);
- return;
- }
-
- if ((vcard = stream_read (stream)) == NULL) {
- CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
- ex_Bonobo_Persist_FileNotFound, NULL);
- return;
- }
-
- card = e_card_new(vcard);
- g_free(vcard);
- gtk_object_set(GTK_OBJECT(minicard),
- "card", card,
- NULL);
- gtk_object_unref(GTK_OBJECT(card));
-} /* pstream_load */
-
-/*
- * This function implements the Bonobo::PersistStream:save method.
- */
-static void
-pstream_save (BonoboPersistStream *ps, const Bonobo_Stream stream,
- Bonobo_Persist_ContentType type, void *data,
- CORBA_Environment *ev)
-{
- char *vcard;
- ECard *card;
- EMinicardWidget *minicard = data;
- int length;
-
- if (type && g_strcasecmp (type, "text/vCard") != 0 &&
- g_strcasecmp (type, "text/x-vCard") != 0) {
- CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
- ex_Bonobo_Persist_WrongDataType, NULL);
- return;
- }
-
- gtk_object_get (GTK_OBJECT (minicard),
- "card", &card,
- NULL);
- vcard = e_card_get_vcard(card);
- length = strlen (vcard);
- bonobo_stream_client_write (stream, vcard, length, ev);
- g_free (vcard);
-} /* pstream_save */
-
-static CORBA_long
-pstream_get_max_size (BonoboPersistStream *ps, void *data,
- CORBA_Environment *ev)
-{
- GtkWidget *minicard = data;
- ECard *card;
- char *vcard;
- gint length;
-
- gtk_object_get (GTK_OBJECT (minicard),
- "card", &card, NULL);
- vcard = e_card_get_vcard(card);
- length = strlen (vcard);
- g_free (vcard);
-
- return length;
-}
-
-static Bonobo_Persist_ContentTypeList *
-pstream_get_content_types (BonoboPersistStream *ps, void *closure,
- CORBA_Environment *ev)
-{
- return bonobo_persist_generate_content_types (2, "text/vCard", "text/x-vCard");
-}
-
-static void
-book_open_cb (EBook *book, EBookStatus status, gpointer closure)
-{
- ECard *card = closure;
- e_book_add_card(book, card, NULL, NULL);
- gtk_object_unref(GTK_OBJECT(card));
-}
-
-static void
-save_in_addressbook(GtkWidget *button, EMinicardWidget *minicard)
-{
- EBook *book;
- gchar *path, *uri;
- ECard *card;
-
- book = e_book_new ();
-
- if (!book) {
- printf ("%s: %s(): Couldn't create EBook, bailing.\n",
- __FILE__,
- __FUNCTION__);
- return;
- }
-
-
- path = g_concat_dir_and_file (g_get_home_dir (),
- "evolution/local/Contacts/addressbook.db");
- uri = g_strdup_printf ("file://%s", path);
- g_free (path);
-
- gtk_object_get(GTK_OBJECT(minicard),
- "card", &card,
- NULL);
- gtk_object_ref(GTK_OBJECT(card));
-
- if (! e_book_load_uri (book, uri, book_open_cb, card)) {
- printf ("error calling load_uri!\n");
- }
- g_free(uri);
-}
-
-static BonoboObject *
-e_minicard_control_factory (BonoboGenericFactory *Factory, void *closure)
-{
-#if 0
- BonoboPropertyBag *pb;
-#endif
- BonoboControl *control;
- BonoboPersistStream *stream;
- GtkWidget *minicard;
- GtkWidget *button;
- GtkWidget *vbox;
-
- /* Create the control. */
-
- minicard = e_minicard_widget_new ();
- gtk_widget_show (minicard);
-
- button = gtk_button_new_with_label(_("Save in addressbook"));
- gtk_signal_connect(GTK_OBJECT(button), "clicked",
- GTK_SIGNAL_FUNC(save_in_addressbook), minicard);
- gtk_widget_show (button);
-
- vbox = gtk_vbox_new(FALSE, 0);
- gtk_box_pack_start(GTK_BOX(vbox), minicard, TRUE, TRUE, 0);
- gtk_box_pack_start(GTK_BOX(vbox), button, FALSE, FALSE, 0);
- gtk_widget_show (vbox);
-
- control = bonobo_control_new (vbox);
-
- stream = bonobo_persist_stream_new (pstream_load, pstream_save,
- pstream_get_max_size,
- pstream_get_content_types,
- minicard);
-
-#if 0
- /* Create the properties. */
- pb = bonobo_property_bag_new (get_prop, set_prop, clock);
- bonobo_control_set_properties (control, pb);
-
- bonobo_property_bag_add (pb, "running", PROP_RUNNING,
- BONOBO_ARG_BOOLEAN, NULL,
- "Whether or not the clock is running", 0);
-#endif
-
- if (stream == NULL) {
- bonobo_object_unref (BONOBO_OBJECT (control));
- return NULL;
- }
-
- bonobo_object_add_interface (BONOBO_OBJECT (control),
- BONOBO_OBJECT (stream));
-
- return BONOBO_OBJECT (control);
-}
-
-void
-e_minicard_control_factory_init (void)
-{
- static BonoboGenericFactory *factory = NULL;
-
- if (factory != NULL)
- return;
-
- factory =
- bonobo_generic_factory_new (
- "OAFIID:GNOME_Evolution_Addressbook_MiniCard_ControlFactory",
- e_minicard_control_factory, NULL);
-
- if (factory == NULL)
- g_error ("I could not register a EMinicard control factory.");
-}
diff --git a/addressbook/gui/widgets/e-minicard-control.h b/addressbook/gui/widgets/e-minicard-control.h
deleted file mode 100644
index 4a0da88435..0000000000
--- a/addressbook/gui/widgets/e-minicard-control.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef __E_MINICARD_CONTROL_H__
-#define __E_MINICARD_CONTROL_H__
-
-#include <bonobo/bonobo-control.h>
-
-void e_minicard_control_factory_init (void);
-
-#endif /* __E_MINICARD_CONTROL_H__ */
diff --git a/addressbook/gui/widgets/e-minicard-label.c b/addressbook/gui/widgets/e-minicard-label.c
deleted file mode 100644
index 2b177db149..0000000000
--- a/addressbook/gui/widgets/e-minicard-label.c
+++ /dev/null
@@ -1,457 +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 <clahey@helixcode.com>
- *
- * 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 <gtk/gtksignal.h>
-#include <libgnomeui/gnome-canvas-rect-ellipse.h>
-#include <gal/util/e-util.h>
-#include <gal/e-text/e-text.h>
-#include <gal/widgets/e-canvas.h>
-#include <gal/widgets/e-canvas-utils.h>
-#include "e-minicard-label.h"
-
-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,
- ARG_MAX_FIELD_NAME_WIDTH,
- ARG_EDITABLE
-};
-
-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);
- gtk_object_add_arg_type ("EMinicardLabel::max_field_name_length", GTK_TYPE_DOUBLE,
- GTK_ARG_READWRITE, ARG_MAX_FIELD_NAME_WIDTH);
- gtk_object_add_arg_type ("EMinicardLabel::editable", GTK_TYPE_BOOL,
- GTK_ARG_READWRITE, ARG_EDITABLE);
-
- 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;
-
- minicard_label->max_field_name_length = -1;
-
- 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, FALSE);
- 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;
- case ARG_MAX_FIELD_NAME_WIDTH:
- e_minicard_label->max_field_name_length = GTK_VALUE_DOUBLE (*arg);
- break;
- case ARG_EDITABLE:
- e_minicard_label->editable = GTK_VALUE_BOOL (*arg);
- gtk_object_set (GTK_OBJECT (e_minicard_label->field), "editable", e_minicard_label->editable, 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;
- case ARG_MAX_FIELD_NAME_WIDTH:
- GTK_VALUE_DOUBLE (*arg) = e_minicard_label->max_field_name_length;
- break;
- case ARG_EDITABLE:
- GTK_VALUE_BOOL (*arg) = e_minicard_label->editable;
- 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;
- GdkFont *font;
-
- font = ((GtkWidget *) item->canvas)->style->font;
-
- 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",
- "draw_background", FALSE,
- 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", e_minicard_label->editable,
- "draw_background", FALSE,
- 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)
-{
- double left_width;
- if (e_minicard_label->max_field_name_length != -1 && ((e_minicard_label->width / 2) - 4 > e_minicard_label->max_field_name_length))
- left_width = e_minicard_label->max_field_name_length;
- else
- left_width = e_minicard_label->width / 2 - 4;
-
- gnome_canvas_item_set( e_minicard_label->fieldname,
- "clip_width", (double) ( left_width ),
- NULL );
- gnome_canvas_item_set( e_minicard_label->field,
- "clip_width", (double) ( e_minicard_label->width - 8 - left_width ),
- 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;
- gdouble left_width;
-
- 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 );
-
- if (e_minicard_label->max_field_name_length != -1 && ((e_minicard_label->width / 2) - 4 > e_minicard_label->max_field_name_length))
- left_width = e_minicard_label->max_field_name_length;
- else
- left_width = e_minicard_label->width / 2 - 4;
-
- e_canvas_item_move_absolute(e_minicard_label->field, left_width + 6, 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 c4d7be3ec2..0000000000
--- a/addressbook/gui/widgets/e-minicard-label.h
+++ /dev/null
@@ -1,85 +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 <clahey@helixcode.com>
- *
- * 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 <glib.h>
-#include <libgnomeui/gnome-canvas.h>
-
-#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;
- double max_field_name_length;
- guint editable : 1;
- 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-widget.c b/addressbook/gui/widgets/e-minicard-view-widget.c
deleted file mode 100644
index 5a4e3d2d06..0000000000
--- a/addressbook/gui/widgets/e-minicard-view-widget.c
+++ /dev/null
@@ -1,329 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-minicard-view-widget.c
- * Copyright (C) 2000 Helix Code, Inc.
- * Author: Chris Lahey <clahey@helixcode.com>
- *
- * 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 <gtk/gtksignal.h>
-#include <libgnomeui/gnome-canvas-rect-ellipse.h>
-#include <gal/widgets/e-canvas.h>
-
-#include "e-minicard-view-widget.h"
-
-static void e_minicard_view_widget_init (EMinicardViewWidget *widget);
-static void e_minicard_view_widget_class_init (EMinicardViewWidgetClass *klass);
-static void e_minicard_view_widget_set_arg (GtkObject *o, GtkArg *arg, guint arg_id);
-static void e_minicard_view_widget_get_arg (GtkObject *object, GtkArg *arg, guint arg_id);
-static void e_minicard_view_widget_destroy (GtkObject *object);
-static void e_minicard_view_widget_reflow (ECanvas *canvas);
-static void e_minicard_view_widget_size_allocate (GtkWidget *widget, GtkAllocation *allocation);
-static void e_minicard_view_widget_realize (GtkWidget *widget);
-
-static ECanvasClass *parent_class = NULL;
-
-/* The arguments we take */
-enum {
- ARG_0,
- ARG_BOOK,
- ARG_QUERY,
- ARG_EDITABLE
-};
-
-enum {
- STATUS_MESSAGE,
- LAST_SIGNAL
-};
-
-static guint e_minicard_view_widget_signals [LAST_SIGNAL] = {0, };
-
-
-GtkType
-e_minicard_view_widget_get_type (void)
-{
- static GtkType type = 0;
-
- if (!type)
- {
- static const GtkTypeInfo info =
- {
- "EMinicardViewWidget",
- sizeof (EMinicardViewWidget),
- sizeof (EMinicardViewWidgetClass),
- (GtkClassInitFunc) e_minicard_view_widget_class_init,
- (GtkObjectInitFunc) e_minicard_view_widget_init,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
- };
-
- type = gtk_type_unique (e_canvas_get_type (), &info);
- }
-
- return type;
-}
-
-static void
-e_minicard_view_widget_class_init (EMinicardViewWidgetClass *klass)
-{
- GtkObjectClass *object_class;
- GtkWidgetClass *widget_class;
- ECanvasClass *canvas_class;
-
- object_class = (GtkObjectClass*) klass;
- widget_class = GTK_WIDGET_CLASS (klass);
- canvas_class = E_CANVAS_CLASS (klass);
-
- parent_class = gtk_type_class (e_canvas_get_type ());
-
- gtk_object_add_arg_type ("EMinicardViewWidget::book", GTK_TYPE_OBJECT,
- GTK_ARG_READWRITE, ARG_BOOK);
- gtk_object_add_arg_type ("EMinicardViewWidget::query", GTK_TYPE_STRING,
- GTK_ARG_READWRITE, ARG_QUERY);
- gtk_object_add_arg_type ("EMinicardViewWidget::editable", GTK_TYPE_BOOL,
- GTK_ARG_READWRITE, ARG_EDITABLE);
-
- e_minicard_view_widget_signals [STATUS_MESSAGE] =
- gtk_signal_new ("status_message",
- GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (EMinicardViewWidgetClass, status_message),
- gtk_marshal_NONE__POINTER,
- GTK_TYPE_NONE, 1, GTK_TYPE_POINTER);
-
- gtk_object_class_add_signals (object_class, e_minicard_view_widget_signals, LAST_SIGNAL);
-
- object_class->set_arg = e_minicard_view_widget_set_arg;
- object_class->get_arg = e_minicard_view_widget_get_arg;
- object_class->destroy = e_minicard_view_widget_destroy;
-
- widget_class->realize = e_minicard_view_widget_realize;
- widget_class->size_allocate = e_minicard_view_widget_size_allocate;
-
- canvas_class->reflow = e_minicard_view_widget_reflow;
-}
-
-static void
-e_minicard_view_widget_init (EMinicardViewWidget *view)
-{
- view->emv = NULL;
- view->rect = NULL;
-
- view->book = NULL;
- view->query = NULL;
- view->editable = FALSE;
-}
-
-GtkWidget *
-e_minicard_view_widget_new (void)
-{
- return GTK_WIDGET (gtk_type_new (e_minicard_view_widget_get_type ()));
-}
-
-static void
-e_minicard_view_widget_set_arg (GtkObject *o, GtkArg *arg, guint arg_id)
-{
- EMinicardViewWidget *emvw;
-
- emvw = E_MINICARD_VIEW_WIDGET (o);
-
- switch (arg_id){
- case ARG_BOOK:
- if (emvw->book)
- gtk_object_unref(GTK_OBJECT(emvw->book));
- if (GTK_VALUE_OBJECT (*arg)) {
- emvw->book = E_BOOK(GTK_VALUE_OBJECT (*arg));
- if (emvw->book)
- gtk_object_ref(GTK_OBJECT(emvw->book));
- } else
- emvw->book = NULL;
- if (emvw->emv)
- gtk_object_set(GTK_OBJECT(emvw->emv),
- "book", emvw->book,
- NULL);
- break;
- case ARG_QUERY:
- emvw->query = g_strdup(GTK_VALUE_STRING (*arg));
- if (emvw->emv)
- gtk_object_set(GTK_OBJECT(emvw->emv),
- "query", emvw->query,
- NULL);
- break;
- case ARG_EDITABLE:
- emvw->editable = GTK_VALUE_BOOL(*arg);
- if (emvw->emv)
- gtk_object_set (GTK_OBJECT(emvw->emv),
- "editable", emvw->editable,
- NULL);
- break;
- }
-}
-
-static void
-e_minicard_view_widget_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
-{
- EMinicardViewWidget *emvw;
-
- emvw = E_MINICARD_VIEW_WIDGET (object);
-
- switch (arg_id) {
- case ARG_BOOK:
- GTK_VALUE_OBJECT (*arg) = GTK_OBJECT(emvw->book);
- break;
- case ARG_QUERY:
- GTK_VALUE_STRING (*arg) = g_strdup(emvw->query);
- break;
- case ARG_EDITABLE:
- GTK_VALUE_BOOL (*arg) = emvw->editable;
- break;
- default:
- arg->type = GTK_TYPE_INVALID;
- break;
- }
-}
-
-static void
-e_minicard_view_widget_destroy (GtkObject *object)
-{
- EMinicardViewWidget *view = E_MINICARD_VIEW_WIDGET(object);
-
- if (view->book)
- gtk_object_unref(GTK_OBJECT(view->book));
- g_free(view->query);
-
- GTK_OBJECT_CLASS(parent_class)->destroy (object);
-}
-
-static void
-status_message (EMinicardView *mini_view,
- char* status,
- EMinicardViewWidget *view)
-{
- gtk_signal_emit (GTK_OBJECT (view),
- e_minicard_view_widget_signals [STATUS_MESSAGE],
- status);
-}
-
-static void
-e_minicard_view_widget_realize (GtkWidget *widget)
-{
- EMinicardViewWidget *view = E_MINICARD_VIEW_WIDGET(widget);
-
- view->rect = gnome_canvas_item_new(
- gnome_canvas_root( GNOME_CANVAS(view) ),
- gnome_canvas_rect_get_type(),
- "x1", (double) 0,
- "y1", (double) 0,
- "x2", (double) 100,
- "y2", (double) 100,
- "fill_color", "white",
- NULL );
-
- view->emv = gnome_canvas_item_new(
- gnome_canvas_root( GNOME_CANVAS(view) ),
- e_minicard_view_get_type(),
- "height", (double) 100,
- "minimum_width", (double) 100,
- NULL );
-
- gtk_signal_connect(GTK_OBJECT(view->emv),
- "status_message",
- GTK_SIGNAL_FUNC(status_message),
- view);
-
- gtk_object_set(GTK_OBJECT(view->emv),
- "book", view->book,
- "query", view->query,
- "editable", view->editable,
- NULL);
-
- if (GTK_WIDGET_CLASS(parent_class)->realize)
- GTK_WIDGET_CLASS(parent_class)->realize (widget);
-}
-
-static void
-e_minicard_view_widget_size_allocate(GtkWidget *widget, GtkAllocation *allocation)
-{
- if (GTK_WIDGET_CLASS(parent_class)->size_allocate)
- GTK_WIDGET_CLASS(parent_class)->size_allocate (widget, allocation);
-
- if (GTK_WIDGET_REALIZED(widget)) {
- double width;
- EMinicardViewWidget *view = E_MINICARD_VIEW_WIDGET(widget);
-
- gnome_canvas_item_set( view->emv,
- "height", (double) allocation->height,
- NULL );
- gnome_canvas_item_set( view->emv,
- "minimum_width", (double) allocation->width,
- NULL );
- gtk_object_get(GTK_OBJECT(view->emv),
- "width", &width,
- NULL);
- width = MAX(width, allocation->width);
- gnome_canvas_set_scroll_region (GNOME_CANVAS (view), 0, 0, width - 1, allocation->height - 1);
- gnome_canvas_item_set( view->rect,
- "x2", (double) width,
- "y2", (double) allocation->height,
- NULL );
- }
-}
-
-static void
-e_minicard_view_widget_reflow(ECanvas *canvas)
-{
- double width;
- EMinicardViewWidget *view = E_MINICARD_VIEW_WIDGET(canvas);
-
- if (E_CANVAS_CLASS(parent_class)->reflow)
- E_CANVAS_CLASS(parent_class)->reflow (canvas);
-
- gtk_object_get(GTK_OBJECT(view->emv),
- "width", &width,
- NULL);
- width = MAX(width, GTK_WIDGET(canvas)->allocation.width);
- gnome_canvas_set_scroll_region(GNOME_CANVAS(canvas), 0, 0, width - 1, GTK_WIDGET(canvas)->allocation.height - 1);
- gnome_canvas_item_set( view->rect,
- "x2", (double) width,
- "y2", (double) GTK_WIDGET(canvas)->allocation.height,
- NULL );
-}
-
-void
-e_minicard_view_widget_remove_selection(EMinicardViewWidget *view,
- EBookCallback cb,
- gpointer closure)
-{
- if (view->emv)
- e_minicard_view_remove_selection(E_MINICARD_VIEW(view->emv), cb, closure);
-}
-
-void e_minicard_view_widget_jump_to_letter (EMinicardViewWidget *view,
- char letter)
-{
- if (view->emv)
- e_minicard_view_jump_to_letter(E_MINICARD_VIEW(view->emv), letter);
-}
-
-void
-e_minicard_view_widget_stop(EMinicardViewWidget *view)
-{
- e_minicard_view_stop(E_MINICARD_VIEW(view->emv));
-}
diff --git a/addressbook/gui/widgets/e-minicard-view-widget.h b/addressbook/gui/widgets/e-minicard-view-widget.h
deleted file mode 100644
index e22d651826..0000000000
--- a/addressbook/gui/widgets/e-minicard-view-widget.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* e-minicard-view-widget.h
- * Copyright (C) 2000 Helix Code, Inc.
- * Author: Chris Lahey <clahey@helixcode.com>
- *
- * 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_WIDGET_H__
-#define __E_MINICARD_VIEW_WIDGET_H__
-
-#include <gal/widgets/e-canvas.h>
-#include "addressbook/backend/ebook/e-book.h"
-#include "e-minicard-view.h"
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#define E_MINICARD_VIEW_WIDGET_TYPE (e_minicard_view_widget_get_type ())
-#define E_MINICARD_VIEW_WIDGET(obj) (GTK_CHECK_CAST ((obj), E_MINICARD_VIEW_WIDGET_TYPE, EMinicardViewWidget))
-#define E_MINICARD_VIEW_WIDGET_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_MINICARD_VIEW_WIDGET_TYPE, EMinicardViewWidgetClass))
-#define E_IS_MINICARD_VIEW_WIDGET(obj) (GTK_CHECK_TYPE ((obj), E_MINICARD_VIEW_WIDGET_TYPE))
-#define E_IS_MINICARD_VIEW_WIDGET_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_MINICARD_VIEW_WIDGET_TYPE))
-
-
-typedef struct _EMinicardViewWidget EMinicardViewWidget;
-typedef struct _EMinicardViewWidgetClass EMinicardViewWidgetClass;
-
-struct _EMinicardViewWidget
-{
- ECanvas parent;
-
- GnomeCanvasItem *rect;
- GnomeCanvasItem *emv;
-
- EBook *book;
- char *query;
- guint editable : 1;
-};
-
-struct _EMinicardViewWidgetClass
-{
- ECanvasClass parent_class;
-
- /*
- * Signals
- */
- void (*status_message) (EMinicardView *mini_view, const gchar *message);
-};
-
-GtkType e_minicard_view_widget_get_type (void);
-void e_minicard_view_widget_remove_selection (EMinicardViewWidget *view,
- EBookCallback cb,
- gpointer closure);
-void e_minicard_view_widget_jump_to_letter (EMinicardViewWidget *view,
- char letter);
-void e_minicard_view_widget_stop (EMinicardViewWidget *view);
-
-GtkWidget *e_minicard_view_widget_new (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __E_MINICARD_VIEW_WIDGET_H__ */
diff --git a/addressbook/gui/widgets/e-minicard-view.c b/addressbook/gui/widgets/e-minicard-view.c
deleted file mode 100644
index 972bbd1c9c..0000000000
--- a/addressbook/gui/widgets/e-minicard-view.c
+++ /dev/null
@@ -1,663 +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 <clahey@helixcode.com>
- *
- * 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 <gtk/gtkselection.h>
-#include <gtk/gtkdnd.h>
-#include <gal/widgets/e-canvas.h>
-#include <gal/widgets/e-unicode.h>
-#include <libgnome/gnome-i18n.h>
-
-#include "e-minicard-view.h"
-#include "e-minicard.h"
-#include "e-contact-editor.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 gboolean e_minicard_view_event (GnomeCanvasItem *item, GdkEvent *event);
-static void canvas_destroy (GtkObject *object, EMinicardView *view);
-static void disconnect_signals (EMinicardView *view);
-static void e_minicard_view_update_selection (EMinicardView *view);
-static void e_minicard_view_drag_data_get(GtkWidget *widget,
- GdkDragContext *context,
- GtkSelectionData *selection_data,
- guint info,
- guint time,
- EMinicardView *view);
-
-static EReflowSortedClass *parent_class = NULL;
-
-/* The arguments we take */
-enum {
- ARG_0,
- ARG_BOOK,
- ARG_QUERY,
- ARG_EDITABLE
-};
-
-enum {
- STATUS_MESSAGE,
- LAST_SIGNAL
-};
-
-enum DndTargetType {
- DND_TARGET_TYPE_VCARD,
-};
-#define VCARD_TYPE "text/x-vcard"
-static GtkTargetEntry drag_types[] = {
- { VCARD_TYPE, 0, DND_TARGET_TYPE_VCARD }
-};
-static gint num_drag_types = sizeof(drag_types) / sizeof(drag_types[0]);
-
-static guint e_minicard_view_signals [LAST_SIGNAL] = {0, };
-
-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);
- gtk_object_add_arg_type ("EMinicardView::editable", GTK_TYPE_BOOL,
- GTK_ARG_READWRITE, ARG_EDITABLE);
-
- e_minicard_view_signals [STATUS_MESSAGE] =
- gtk_signal_new ("status_message",
- GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (EMinicardViewClass, status_message),
- gtk_marshal_NONE__POINTER,
- GTK_TYPE_NONE, 1, GTK_TYPE_POINTER);
-
- gtk_object_class_add_signals (object_class, e_minicard_view_signals, LAST_SIGNAL);
-
- 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;
-
- item_class->event = e_minicard_view_event;
-
- /* GnomeCanvasItem method overrides */
-}
-
-static void
-selection_changed (ESelectionModel *selection, EMinicardView *view)
-{
- e_minicard_view_update_selection (view);
-}
-
-static void
-e_minicard_view_init (EMinicardView *view)
-{
- char *empty_message;
- view->book = NULL;
- view->query = g_strdup("(contains \"x-evolution-any-field\" \"\")");
- view->editable = FALSE;
- 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->status_message_id = 0;
- view->canvas_destroy_id = 0;
- view->first_get_view = TRUE;
-
- view->selection = e_selection_model_simple_new();
-
- gtk_signal_connect(GTK_OBJECT(view->selection), "selection_changed",
- GTK_SIGNAL_FUNC(selection_changed), view);
-
- empty_message = e_utf8_from_locale_string(_("\n\nThere are no items to show in this view\n\n"
- "Double-click here to create a new Contact."));
- gtk_object_set (GTK_OBJECT(view),
- "empty_message",
- empty_message,
- NULL);
- g_free (empty_message);
-
- E_REFLOW_SORTED(view)->compare_func = (GCompareFunc) e_minicard_compare;
- E_REFLOW_SORTED(view)->string_func = (EReflowStringFunc) e_minicard_get_card_id;
-}
-
-static void
-e_minicard_view_drag_data_get(GtkWidget *widget,
- GdkDragContext *context,
- GtkSelectionData *selection_data,
- guint info,
- guint time,
- EMinicardView *view)
-{
- printf ("e_minicard_view_drag_data_get (e_minicard = %p)\n", view->drag_card);
-
- if (!E_IS_MINICARD_VIEW(view))
- return;
-
- switch (info) {
- case DND_TARGET_TYPE_VCARD: {
- char *value;
-
- value = e_card_simple_get_vcard(view->drag_card->simple);
-
- gtk_selection_data_set (selection_data,
- selection_data->target,
- 8,
- value, strlen (value));
- break;
- }
- }
-}
-
-static int
-e_minicard_view_drag_begin (EMinicard *card, GdkEvent *event, EMinicardView *view)
-{
- GdkDragContext *context;
- GtkTargetList *target_list;
- GdkDragAction actions = GDK_ACTION_MOVE;
-
- view->drag_card = card;
-
- target_list = gtk_target_list_new (drag_types, num_drag_types);
-
- context = gtk_drag_begin (GTK_WIDGET (GNOME_CANVAS_ITEM (view)->canvas),
- target_list, actions, 1/*XXX*/, event);
-
- gtk_drag_set_icon_default (context);
-
- return TRUE;
-}
-
-static gint
-card_selected (EMinicard *card, GdkEvent *event, EMinicardView *view)
-{
- int i = 0;
- GList *item;
- for (item = E_REFLOW(view)->items; item->data != card; item = item->next, i++)
- /* Empty for loop */;
- switch(event->type) {
- case GDK_BUTTON_PRESS:
- e_selection_model_do_something(E_SELECTION_MODEL(view->selection), i, 0, event->button.state);
- return TRUE;
- break;
- default:
- e_selection_model_do_something(E_SELECTION_MODEL(view->selection), i, 0, 0);
- return FALSE;
- break;
- }
-}
-
-static void
-create_card(EBookView *book_view, const GList *cards, EMinicardView *view)
-{
- for (; cards; cards = g_list_next(cards)) {
- int position;
- GnomeCanvasItem *item = gnome_canvas_item_new(GNOME_CANVAS_GROUP(view),
- e_minicard_get_type(),
- "card", cards->data,
- "editable", view->editable,
- NULL);
- gtk_signal_connect(GTK_OBJECT(item), "selected",
- GTK_SIGNAL_FUNC(card_selected), view);
-
- gtk_signal_connect(GTK_OBJECT(item), "drag_begin",
- GTK_SIGNAL_FUNC(e_minicard_view_drag_begin), view);
-
- e_reflow_add_item(E_REFLOW(view), item, &position);
-
- e_selection_model_simple_insert_rows(view->selection, position, 1);
- }
-}
-
-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, NULL);
- if (item && !GTK_OBJECT_DESTROYED(item)) {
- int old_pos;
- int new_pos;
-
- gnome_canvas_item_set(item,
- "card", card,
- NULL);
-
- e_reflow_sorted_reorder_item(E_REFLOW_SORTED(view), id, &old_pos, &new_pos);
-
- e_selection_model_simple_move_row(view->selection, old_pos, new_pos);
- }
- }
-}
-
-static void
-status_message (EBookView *book_view,
- char* status,
- EMinicardView *view)
-{
- gtk_signal_emit (GTK_OBJECT (view),
- e_minicard_view_signals [STATUS_MESSAGE],
- status);
-}
-
-static void
-remove_card(EBookView *book_view, const char *id, EMinicardView *view)
-{
- int position;
- e_reflow_sorted_remove_item(E_REFLOW_SORTED(view), id, &position);
- e_selection_model_simple_delete_rows(view->selection, position, 1);
-}
-
-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);
-
- if (!view->canvas_drag_data_get_id)
- view->canvas_drag_data_get_id =
- gtk_signal_connect (GTK_OBJECT (GNOME_CANVAS_ITEM (view)->canvas),
- "drag_data_get",
- GTK_SIGNAL_FUNC (e_minicard_view_drag_data_get),
- 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);
- view->status_message_id =
- gtk_signal_connect(GTK_OBJECT(view->book_view),
- "status_message",
- GTK_SIGNAL_FUNC(status_message),
- 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) {
- if (view->first_get_view) {
- char *capabilities;
- capabilities = e_book_get_static_capabilities(view->book);
- if (strstr(capabilities, "local")) {
- e_book_get_book_view(view->book, view->query, book_view_loaded, view);
- }
- view->first_get_view = FALSE;
- }
- else
- 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));
- if (GTK_VALUE_OBJECT (*arg)) {
- view->book = E_BOOK(GTK_VALUE_OBJECT (*arg));
- gtk_object_ref(GTK_OBJECT(view->book));
- if (view->get_view_idle == 0)
- view->get_view_idle = g_idle_add((GSourceFunc)get_view, view);
- }
- else
- view->book = NULL;
- 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;
- case ARG_EDITABLE: {
- GList *l;
- view->editable = GTK_VALUE_BOOL (*arg);
- /* bit of a hack */
- for (l = E_REFLOW (view)->items; l; l = g_list_next(l)) {
- gtk_object_set (GTK_OBJECT (l->data),
- "editable", view->editable,
- NULL);
- }
- 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;
- case ARG_EDITABLE:
- GTK_VALUE_BOOL (*arg) = e_minicard_view->editable;
- 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
-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_changed_cb (EBook* book, EBookStatus status, gpointer user_data)
-{
- g_print ("%s: %s(): a card was changed with status %d\n", __FILE__, __FUNCTION__, status);
-}
-
-/* Callback for the add_card signal from the contact editor */
-static void
-add_card_cb (EContactEditor *ce, ECard *card, gpointer data)
-{
- EBook *book;
-
- book = E_BOOK (data);
- e_book_add_card (book, card, card_added_cb, NULL);
-}
-
-/* Callback for the commit_card signal from the contact editor */
-static void
-commit_card_cb (EContactEditor *ce, ECard *card, gpointer data)
-{
- EBook *book;
-
- book = E_BOOK (data);
- e_book_commit_card (book, card, card_changed_cb, NULL);
-}
-
-/* Callback used when the contact editor is closed */
-static void
-editor_closed_cb (EContactEditor *ce, gpointer data)
-{
- gtk_object_unref (GTK_OBJECT (ce));
-}
-
-static void
-supported_fields_cb (EBook *book, EBookStatus status, EList *fields, EMinicardView *view)
-{
- ECard *card;
- EContactEditor *ce;
-
- card = e_card_new("");
-
- ce = e_contact_editor_new (card, TRUE, fields, !view->editable);
-
- gtk_signal_connect (GTK_OBJECT (ce), "add_card",
- GTK_SIGNAL_FUNC (add_card_cb), book);
- gtk_signal_connect (GTK_OBJECT (ce), "commit_card",
- GTK_SIGNAL_FUNC (commit_card_cb), book);
- gtk_signal_connect (GTK_OBJECT (ce), "editor_closed",
- GTK_SIGNAL_FUNC (editor_closed_cb), NULL);
-
- gtk_object_sink(GTK_OBJECT(card));
-}
-
-static gboolean
-e_minicard_view_event (GnomeCanvasItem *item, GdkEvent *event)
-{
- EMinicardView *view;
-
- view = E_MINICARD_VIEW (item);
-
- switch( event->type ) {
- case GDK_2BUTTON_PRESS:
- if (((GdkEventButton *)event)->button == 1)
- {
- EBook *book;
-
- gtk_object_get(GTK_OBJECT(view), "book", &book, NULL);
-
- g_assert (E_IS_BOOK (book));
-
- e_book_get_supported_fields (book,
- (EBookFieldsCallback)supported_fields_cb,
- view);
- }
- return TRUE;
- default:
- if (GNOME_CANVAS_ITEM_CLASS(parent_class)->event)
- return GNOME_CANVAS_ITEM_CLASS(parent_class)->event(item, event);
- else
- return FALSE;
- break;
- }
-}
-
-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);
- if (view->book_view && view->status_message_id)
- gtk_signal_disconnect(GTK_OBJECT (view->book_view),
- view->status_message_id);
-
- view->create_card_id = 0;
- view->remove_card_id = 0;
- view->modify_card_id = 0;
- view->status_message_id = 0;
-}
-
-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;
- }
- }
- }
-}
-
-static int
-compare_to_letter(EMinicard *card, char *letter)
-{
- g_return_val_if_fail(card != NULL, 0);
- g_return_val_if_fail(E_IS_MINICARD(card), 0);
-
- if (*letter == '1')
- return 1;
-
- if (card->card) {
- char *file_as;
- gtk_object_get(GTK_OBJECT(card->card),
- "file_as", &file_as,
- NULL);
- if (file_as)
- return strncasecmp(file_as, letter, 1);
- else
- return 0;
- } else {
- return 0;
- }
-}
-
-void
-e_minicard_view_jump_to_letter (EMinicardView *view,
- char letter)
-{
- e_reflow_sorted_jump(E_REFLOW_SORTED(view),
- (GCompareFunc) compare_to_letter,
- &letter);
-}
-
-void
-e_minicard_view_stop (EMinicardView *view)
-{
- disconnect_signals(view);
- if (view->book_view)
- gtk_object_unref(GTK_OBJECT(view->book_view));
- view->book_view = NULL;
-}
-
-static void
-e_minicard_view_update_selection (EMinicardView *view)
-{
- int i;
- GList *item;
-
- for (i = 0, item = E_REFLOW(view)->items; item; item = item->next, i++) {
- if (E_IS_MINICARD(item->data))
- gtk_object_set(GTK_OBJECT(item->data),
- "selected", e_selection_model_is_row_selected(E_SELECTION_MODEL(view->selection), i),
- NULL);
- }
-}
diff --git a/addressbook/gui/widgets/e-minicard-view.h b/addressbook/gui/widgets/e-minicard-view.h
deleted file mode 100644
index 50a2fa00a7..0000000000
--- a/addressbook/gui/widgets/e-minicard-view.h
+++ /dev/null
@@ -1,110 +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 <clahey@helixcode.com>
- *
- * 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 "e-minicard.h"
-#include <gal/widgets/e-reflow-sorted.h>
-#include <gal/widgets/e-selection-model-simple.h>
-#include "addressbook/backend/ebook/e-book.h"
-
-#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;
- guint editable : 1;
- EBookView *book_view;
-
- ESelectionModelSimple *selection;
-
- EMinicard *drag_card;
-
- int get_view_idle;
-
- int canvas_destroy_id;
- int canvas_drag_data_get_id;
-
- int create_card_id, remove_card_id, modify_card_id, status_message_id;
-
- guint first_get_view : 1;
-};
-
-struct _EMinicardViewClass
-{
- EReflowSortedClass parent_class;
-
- /*
- * Signals
- */
- void (*status_message) (EMinicardView *mini_view, const gchar *message);
-};
-
-GtkType e_minicard_view_get_type (void);
-void e_minicard_view_remove_selection (EMinicardView *view,
- EBookCallback cb,
- gpointer closure);
-void e_minicard_view_jump_to_letter (EMinicardView *view,
- char letter);
-void e_minicard_view_stop (EMinicardView *view);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-#endif /* __E_MINICARD_VIEW_H__ */
diff --git a/addressbook/gui/widgets/e-minicard-widget-test.c b/addressbook/gui/widgets/e-minicard-widget-test.c
deleted file mode 100644
index 1de94e99d9..0000000000
--- a/addressbook/gui/widgets/e-minicard-widget-test.c
+++ /dev/null
@@ -1,114 +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 <clahey@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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT 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.
-" \
-"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
-" \
-"
-"
-
-#include "config.h"
-#include <gtk/gtkmain.h>
-#include <libgnomeui/gnome-app.h>
-#include <libgnomeui/gnome-init.h>
-#include "e-minicard-widget.h"
-
-/* This is a horrible thing to do, but it is just a test. */
-
-static void destroy_callback(GtkWidget *app, gpointer data)
-{
- exit(0);
-}
-
-#if 0
-static void about_callback( GtkWidget *widget, gpointer data )
-{
-
- const gchar *authors[] =
- {
- "Christopher James Lahey <clahey@umich.edu>",
- NULL
- };
-
- GtkWidget *about =
- gnome_about_new ( _( "Minicard Widget Test" ), VERSION,
- _( "Copyright (C) 2000, Helix Code, Inc." ),
- authors,
- _( "This should test the minicard widget" ),
- NULL);
- gtk_widget_show (about);
-}
-#endif
-
-int main( int argc, char *argv[] )
-{
- GtkWidget *app;
- GtkWidget *minicard;
- ECard *card;
-
- /* bindtextdomain (PACKAGE, GNOMELOCALEDIR);
- textdomain (PACKAGE);*/
-
- gnome_init( "Minicard Widget Test", VERSION, argc, argv);
- app = gnome_app_new("Minicard Widget Test", NULL);
-
- minicard = e_minicard_widget_new();
- card = e_card_new(TEST_VCARD);
- gtk_object_set(GTK_OBJECT(minicard),
- "card", card,
- NULL);
-
- gnome_app_set_contents( GNOME_APP( app ), minicard );
-
- /* 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/widgets/e-minicard-widget.c b/addressbook/gui/widgets/e-minicard-widget.c
deleted file mode 100644
index 494db81905..0000000000
--- a/addressbook/gui/widgets/e-minicard-widget.c
+++ /dev/null
@@ -1,250 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-table-field-chooser.c
- * Copyright (C) 2000 Helix Code, Inc.
- * Author: Chris Lahey <clahey@helixcode.com>
- *
- * 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 <libgnomeui/gnome-canvas-rect-ellipse.h>
-#include "e-minicard-widget.h"
-#include "e-minicard.h"
-
-static void e_minicard_widget_init (EMinicardWidget *card);
-static void e_minicard_widget_class_init (EMinicardWidgetClass *klass);
-static void e_minicard_widget_set_arg (GtkObject *o, GtkArg *arg, guint arg_id);
-static void e_minicard_widget_get_arg (GtkObject *object, GtkArg *arg, guint arg_id);
-static void e_minicard_widget_destroy (GtkObject *object);
-static void e_minicard_widget_size_request (GtkWidget *widget, GtkRequisition *requisition);
-static void e_minicard_widget_size_allocate (GtkWidget *widget, GtkAllocation *allocation);
-static void e_minicard_widget_reflow (ECanvas *canvas);
-
-static ECanvasClass *parent_class = NULL;
-
-/* The arguments we take */
-enum {
- ARG_0,
- ARG_CARD,
-};
-
-GtkType
-e_minicard_widget_get_type (void)
-{
- static GtkType type = 0;
-
- if (!type)
- {
- static const GtkTypeInfo info =
- {
- "EMinicardWidget",
- sizeof (EMinicardWidget),
- sizeof (EMinicardWidgetClass),
- (GtkClassInitFunc) e_minicard_widget_class_init,
- (GtkObjectInitFunc) e_minicard_widget_init,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
- };
-
- type = gtk_type_unique (e_canvas_get_type (), &info);
- }
-
- return type;
-}
-
-static void
-e_minicard_widget_class_init (EMinicardWidgetClass *klass)
-{
- GtkObjectClass *object_class;
- GtkWidgetClass *widget_class;
- ECanvasClass *ecanvas_class;
-
- object_class = GTK_OBJECT_CLASS(klass);
- widget_class = GTK_WIDGET_CLASS(klass);
- ecanvas_class = E_CANVAS_CLASS(klass);
-
- parent_class = gtk_type_class (e_canvas_get_type ());
-
- object_class->set_arg = e_minicard_widget_set_arg;
- object_class->get_arg = e_minicard_widget_get_arg;
- object_class->destroy = e_minicard_widget_destroy;
-
- widget_class->size_request = e_minicard_widget_size_request;
- widget_class->size_allocate = e_minicard_widget_size_allocate;
-
- ecanvas_class->reflow = e_minicard_widget_reflow;
-
- gtk_object_add_arg_type ("EMinicardWidget::card", GTK_TYPE_OBJECT,
- GTK_ARG_READWRITE, ARG_CARD);
-}
-
-static void
-e_minicard_widget_size_request(GtkWidget *widget, GtkRequisition *requisition)
-{
- double height;
- EMinicardWidget *emw = E_MINICARD_WIDGET(widget);
- gtk_object_get(GTK_OBJECT(emw->item),
- "height", &height,
- NULL);
- if (height <= 0)
- height = 1;
- widget->requisition.height = height;
- widget->requisition.width = 200;
- requisition->height = height;
- requisition->width = 200;
-}
-
-static void
-e_minicard_widget_size_allocate(GtkWidget *widget, GtkAllocation *allocation)
-{
- double height;
- EMinicardWidget *emw = E_MINICARD_WIDGET(widget);
- gnome_canvas_item_set( emw->item,
- "width", (double) allocation->width,
- NULL );
- gtk_object_get(GTK_OBJECT(emw->item),
- "height", &height,
- NULL);
- height = MAX(height, allocation->height);
- gnome_canvas_set_scroll_region(GNOME_CANVAS( emw ), 0, 0, allocation->width - 1, height - 1);
- gnome_canvas_item_set( emw->rect,
- "x2", (double) allocation->width,
- "y2", (double) height,
- NULL );
- if (GTK_WIDGET_CLASS(parent_class)->size_allocate)
- GTK_WIDGET_CLASS(parent_class)->size_allocate(widget, allocation);
-}
-
-static void e_minicard_widget_reflow(ECanvas *canvas)
-{
- double height;
- EMinicardWidget *emw = E_MINICARD_WIDGET(canvas);
- gtk_object_get(GTK_OBJECT(emw->item),
- "height", &height,
- NULL);
-
- height = MAX(height, GTK_WIDGET(emw)->allocation.height);
-
- gnome_canvas_set_scroll_region (GNOME_CANVAS(emw), 0, 0, GTK_WIDGET(emw)->allocation.width - 1, height - 1);
- gnome_canvas_item_set( emw->rect,
- "x2", (double) GTK_WIDGET(emw)->allocation.width,
- "y2", (double) height,
- NULL );
-
- gtk_widget_queue_resize(GTK_WIDGET(canvas));
-}
-
-static void
-e_minicard_widget_init (EMinicardWidget *emw)
-{
- emw->rect = gnome_canvas_item_new(gnome_canvas_root(GNOME_CANVAS(emw)),
- gnome_canvas_rect_get_type(),
- "x1", (double) 0,
- "y1", (double) 0,
- "x2", (double) 100,
- "y2", (double) 100,
- "fill_color", "white",
- NULL );
-
- emw->item = gnome_canvas_item_new(gnome_canvas_root(GNOME_CANVAS(emw)),
- e_minicard_get_type(),
- "width", (double) 100,
- NULL );
-
- gnome_canvas_set_scroll_region ( GNOME_CANVAS( emw ),
- 0, 0,
- 100, 100 );
-
- emw->card = NULL;
-}
-
-static void
-e_minicard_widget_destroy (GtkObject *object)
-{
- EMinicardWidget *emw = E_MINICARD_WIDGET(object);
-
- if (emw->card)
- gtk_object_unref(GTK_OBJECT(emw->card));
-
- if (GTK_OBJECT_CLASS(parent_class)->destroy)
- GTK_OBJECT_CLASS(parent_class)->destroy(object);
-}
-
-GtkWidget*
-e_minicard_widget_new (void)
-{
- GtkWidget *widget = GTK_WIDGET (gtk_type_new (e_minicard_widget_get_type ()));
- return widget;
-}
-
-static void
-e_minicard_widget_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
-{
- EMinicardWidget *emw = E_MINICARD_WIDGET(object);
- gpointer ptr;
-
- switch (arg_id){
- case ARG_CARD:
- ptr = GTK_VALUE_POINTER (*arg);
- e_minicard_widget_set_card (emw, ptr ? E_CARD (ptr) : NULL);
- break;
- default:
- break;
- }
-}
-
-static void
-e_minicard_widget_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
-{
- EMinicardWidget *emw = E_MINICARD_WIDGET(object);
-
- switch (arg_id) {
- case ARG_CARD:
- if (emw->card)
- GTK_VALUE_OBJECT (*arg) = GTK_OBJECT(emw->card);
- else
- GTK_VALUE_OBJECT (*arg) = NULL;
- break;
- default:
- arg->type = GTK_TYPE_INVALID;
- break;
- }
-}
-
-void
-e_minicard_widget_set_card (EMinicardWidget *emw, ECard *card)
-{
- g_return_if_fail (emw && E_IS_MINICARD_WIDGET (emw));
- g_return_if_fail (card == NULL || E_IS_CARD (card));
-
- if (card != emw->card) {
-
- if (emw->card)
- gtk_object_unref (GTK_OBJECT (emw->card));
-
- emw->card = card;
-
- if (emw->card)
- gtk_object_ref (GTK_OBJECT (emw->card));
-
- if (emw->item)
- gtk_object_set (GTK_OBJECT (emw->item),
- "card", emw->card,
- NULL);
- }
-}
diff --git a/addressbook/gui/widgets/e-minicard-widget.h b/addressbook/gui/widgets/e-minicard-widget.h
deleted file mode 100644
index 950afba7d8..0000000000
--- a/addressbook/gui/widgets/e-minicard-widget.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* e-minicard-widget.h
- * Copyright (C) 2000 Helix Code, Inc.
- * Author: Chris Lahey <clahey@helixcode.com>
- *
- * 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_WIDGET_H__
-#define __E_MINICARD_WIDGET_H__
-
-#include <gal/widgets/e-canvas.h>
-#include "addressbook/backend/ebook/e-card.h"
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-/* EMinicardWidget - A card displaying information about a contact.
- *
- * The following arguments are available:
- *
- * name type read/write description
- * --------------------------------------------------------------------------------
- */
-
-#define E_MINICARD_WIDGET_TYPE (e_minicard_widget_get_type ())
-#define E_MINICARD_WIDGET(obj) (GTK_CHECK_CAST ((obj), E_MINICARD_WIDGET_TYPE, EMinicardWidget))
-#define E_MINICARD_WIDGET_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_MINICARD_WIDGET_TYPE, EMinicardWidgetClass))
-#define E_IS_MINICARD_WIDGET(obj) (GTK_CHECK_TYPE ((obj), E_MINICARD_WIDGET_TYPE))
-#define E_IS_MINICARD_WIDGET_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_MINICARD_WIDGET_TYPE))
-
-
-typedef struct _EMinicardWidget EMinicardWidget;
-typedef struct _EMinicardWidgetClass EMinicardWidgetClass;
-
-struct _EMinicardWidget
-{
- ECanvas parent;
-
- /* item specific fields */
- GnomeCanvasItem *item;
-
- GnomeCanvasItem *rect;
- ECard *card;
-};
-
-struct _EMinicardWidgetClass
-{
- ECanvasClass parent_class;
-};
-
-
-GtkWidget *e_minicard_widget_new(void);
-GtkType e_minicard_widget_get_type (void);
-
-void e_minicard_widget_set_card (EMinicardWidget *, ECard *);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-#endif /* __E_MINICARD_WIDGET_H__ */
diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c
deleted file mode 100644
index b5c11bd27f..0000000000
--- a/addressbook/gui/widgets/e-minicard.c
+++ /dev/null
@@ -1,1034 +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 <clahey@helixcode.com>
- *
- * 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 <glib.h>
-#include <gtk/gtkdnd.h>
-#include <gdk/gdkkeysyms.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-canvas-rect-ellipse.h>
-#include <gal/e-text/e-text.h>
-#include <gal/util/e-util.h>
-#include <gal/widgets/e-canvas-utils.h>
-#include <gal/widgets/e-canvas.h>
-#include <gal/widgets/e-popup-menu.h>
-#include "addressbook/backend/ebook/e-book.h"
-#include "addressbook/printing/e-contact-print.h"
-#include "addressbook/printing/e-contact-print-envelope.h"
-#include "e-minicard.h"
-#include "e-minicard-label.h"
-#include "e-minicard-view.h"
-#include "e-contact-editor.h"
-#include "e-contact-save-as.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 void e_minicard_finalize (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 gint e_minicard_drag_begin (EMinicard *minicard, GdkEvent *event);
-
-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_SELECTED,
- ARG_EDITABLE,
- ARG_CARD
-};
-
-enum {
- SELECTED,
- DRAG_BEGIN,
- LAST_SIGNAL
-};
-
-static guint e_minicard_signals [LAST_SIGNAL] = {0, };
-
-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::selected", GTK_TYPE_BOOL,
- GTK_ARG_READWRITE, ARG_SELECTED);
- gtk_object_add_arg_type ("EMinicard::editable", GTK_TYPE_BOOL,
- GTK_ARG_READWRITE, ARG_EDITABLE);
- gtk_object_add_arg_type ("EMinicard::card", GTK_TYPE_OBJECT,
- GTK_ARG_READWRITE, ARG_CARD);
-
- e_minicard_signals [SELECTED] =
- gtk_signal_new ("selected",
- GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (EMinicardClass, selected),
- gtk_marshal_INT__POINTER,
- GTK_TYPE_INT, 1, GTK_TYPE_POINTER);
-
- e_minicard_signals [DRAG_BEGIN] =
- gtk_signal_new ("drag_begin",
- GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (EMinicardClass, drag_begin),
- gtk_marshal_INT__POINTER,
- GTK_TYPE_INT, 1, GTK_TYPE_POINTER);
-
- gtk_object_class_add_signals (object_class, e_minicard_signals, LAST_SIGNAL);
-
- object_class->set_arg = e_minicard_set_arg;
- object_class->get_arg = e_minicard_get_arg;
- object_class->destroy = e_minicard_destroy;
- object_class->finalize = e_minicard_finalize;
-
- /* GnomeCanvasItem method overrides */
- item_class->realize = e_minicard_realize;
- item_class->unrealize = e_minicard_unrealize;
- item_class->event = e_minicard_event;
-
- klass->selected = NULL;
-}
-
-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->selected = FALSE;
- minicard->editable = FALSE;
-
- minicard->card = NULL;
- minicard->simple = e_card_simple_new(NULL);
-
- minicard->editor = NULL;
-
- minicard->changed = FALSE;
-
- e_canvas_item_set_reflow_callback(GNOME_CANVAS_ITEM(minicard), e_minicard_reflow);
-}
-
-static void
-set_selected (EMinicard *minicard, gboolean selected)
-{
- GtkWidget *canvas = GTK_WIDGET(GNOME_CANVAS_ITEM(minicard)->canvas);
- if (selected) {
- gnome_canvas_item_set (minicard->rect,
- "outline_color_gdk", &canvas->style->bg[GTK_STATE_NORMAL],
- NULL);
- gnome_canvas_item_set (minicard->header_rect,
- "fill_color_gdk", &canvas->style->bg[GTK_STATE_SELECTED],
- NULL);
- gnome_canvas_item_set (minicard->header_text,
- "fill_color_gdk", &canvas->style->text[GTK_STATE_SELECTED],
- NULL);
- } else {
- gnome_canvas_item_set (minicard->rect,
- "outline_color", NULL,
- NULL);
- gnome_canvas_item_set (minicard->header_rect,
- "fill_color_gdk", &canvas->style->bg[GTK_STATE_NORMAL],
- NULL);
- gnome_canvas_item_set (minicard->header_text,
- "fill_color_gdk", &canvas->style->fg[GTK_STATE_NORMAL],
- NULL);
- }
- minicard->selected = selected;
-}
-
-
-static void
-e_minicard_set_arg (GtkObject *o, GtkArg *arg, guint arg_id)
-{
- GnomeCanvasItem *item;
- EMinicard *e_minicard;
- GList *l;
-
- 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, FALSE);
- break;
- case ARG_SELECTED:
- if (e_minicard->selected != GTK_VALUE_BOOL(*arg))
- set_selected (e_minicard, GTK_VALUE_BOOL(*arg));
- break;
- case ARG_EDITABLE:
- e_minicard->editable = GTK_VALUE_BOOL(*arg);
- for (l = e_minicard->fields; l; l = l->next)
- gtk_object_set (GTK_OBJECT (E_MINICARD_FIELD (l->data)->label),
- "editable", e_minicard->editable,
- NULL);
- 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);
- e_minicard->changed = FALSE;
- 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_SELECTED:
- GTK_VALUE_BOOL (*arg) = e_minicard->selected;
- break;
- case ARG_EDITABLE:
- GTK_VALUE_BOOL (*arg) = e_minicard->editable;
- 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 (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-
-
-static void
-e_minicard_finalize (GtkObject *object)
-{
- EMinicard *e_minicard;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (E_IS_MINICARD (object));
-
- e_minicard = E_MINICARD (object);
-
- 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)->finalize)
- (* GTK_OBJECT_CLASS (parent_class)->finalize) (object);
-}
-
-static void
-e_minicard_realize (GnomeCanvasItem *item)
-{
- EMinicard *e_minicard;
- GnomeCanvasGroup *group;
- GtkWidget *canvas;
-
- e_minicard = E_MINICARD (item);
- group = GNOME_CANVAS_GROUP( item );
- canvas = GTK_WIDGET (GNOME_CANVAS_ITEM (item)->canvas);
-
- 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_gdk", &canvas->style->bg[GTK_STATE_NORMAL],
- 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,
-#if 0
- "font", "fixed-bold-10",
-#endif
- "fill_color_gdk", &canvas->style->fg[GTK_STATE_NORMAL],
- "text", "",
- "draw_background", FALSE,
- 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_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_changed_cb (EBook* book, EBookStatus status, gpointer user_data)
-{
- g_print ("%s: %s(): a card was changed with status %d\n", __FILE__, __FUNCTION__, status);
-}
-
-typedef struct {
- EMinicard *minicard;
- GnomeCanvasItem *parent;
- GtkWidget *canvas;
-} MinicardAndParent;
-
-static void
-e_minicard_and_parent_free (MinicardAndParent *mnp)
-{
- gtk_object_unref(GTK_OBJECT(mnp->minicard));
- gtk_object_unref(GTK_OBJECT(mnp->parent));
- gtk_object_unref(GTK_OBJECT(mnp->canvas));
- g_free(mnp);
-}
-
-static void
-save_as (GtkWidget *widget, MinicardAndParent *mnp)
-{
- EMinicard *minicard = mnp->minicard;
- if (!GTK_OBJECT_DESTROYED(minicard)) {
- e_card_simple_sync_card(minicard->simple);
- e_contact_save_as(_("Save as VCard"), minicard->card);
- }
- e_minicard_and_parent_free (mnp);
-}
-
-static void
-send_as (GtkWidget *widget, MinicardAndParent *mnp)
-{
- EMinicard *minicard = mnp->minicard;
- if (!GTK_OBJECT_DESTROYED(minicard)) {
- e_card_simple_sync_card(minicard->simple);
- e_card_send(minicard->card, E_CARD_DISPOSITION_AS_ATTACHMENT);
- }
- e_minicard_and_parent_free (mnp);
-}
-
-static void
-send_to (GtkWidget *widget, MinicardAndParent *mnp)
-{
- EMinicard *minicard = mnp->minicard;
- if (!GTK_OBJECT_DESTROYED(minicard)) {
- e_card_simple_sync_card(minicard->simple);
- e_card_send(minicard->card, E_CARD_DISPOSITION_AS_TO);
- }
- e_minicard_and_parent_free (mnp);
-}
-
-static void
-delete (GtkWidget *widget, MinicardAndParent *mnp)
-{
- EMinicard *minicard = mnp->minicard;
-
- if (!GTK_OBJECT_DESTROYED(minicard)) {
- EBook *book;
- ECard *card = minicard->card;
- ECardSimple *simple = minicard->simple;
-
- gtk_object_get(GTK_OBJECT(mnp->parent),
- "book", &book,
- NULL);
-
- gtk_object_ref(GTK_OBJECT(card));
- gtk_object_ref(GTK_OBJECT(simple));
-
- if (e_contact_editor_confirm_delete(GTK_WINDOW(gtk_widget_get_toplevel(mnp->canvas)))) {
- e_card_simple_sync_card(simple);
-
-
- /* Add the card in the contact editor to our ebook */
- e_book_remove_card (book,
- card,
- card_changed_cb,
- NULL);
- }
-
- gtk_object_unref(GTK_OBJECT(card));
- gtk_object_unref(GTK_OBJECT(simple));
- }
-
- e_minicard_and_parent_free (mnp);
-}
-
-static void
-print (GtkWidget *widget, MinicardAndParent *mnp)
-{
- EMinicard *minicard = mnp->minicard;
-
- if (!GTK_OBJECT_DESTROYED(minicard)) {
- e_card_simple_sync_card(minicard->simple);
- gtk_widget_show(e_contact_print_card_dialog_new(minicard->card));
- }
- e_minicard_and_parent_free (mnp);
-}
-
-static void
-print_envelope (GtkWidget *widget, MinicardAndParent *mnp)
-{
- EMinicard *minicard = mnp->minicard;
-
- if (!GTK_OBJECT_DESTROYED(minicard)) {
- e_card_simple_sync_card(minicard->simple);
- gtk_widget_show(e_contact_print_envelope_dialog_new(minicard->card));
- }
- e_minicard_and_parent_free (mnp);
-}
-
-/* Callback for the add_card signal from the contact editor */
-static void
-add_card_cb (EContactEditor *ce, ECard *card, gpointer data)
-{
- EBook *book;
-
- book = E_BOOK (data);
- e_book_add_card (book, card, card_added_cb, NULL);
-}
-
-/* Callback for the commit_card signal from the contact editor */
-static void
-commit_card_cb (EContactEditor *ce, ECard *card, gpointer data)
-{
- EBook *book;
-
- book = E_BOOK (data);
- e_book_commit_card (book, card, card_changed_cb, NULL);
-}
-
-/* Callback for the commit_card signal from the contact editor */
-static void
-delete_card_cb (EContactEditor *ce, ECard *card, gpointer data)
-{
- EBook *book;
-
- book = E_BOOK (data);
- e_book_remove_card (book, card, card_changed_cb, NULL);
-}
-
-/* Callback used when the contact editor is closed */
-static void
-editor_closed_cb (EContactEditor *ce, gpointer data)
-{
- EMinicard *minicard = data;
- gtk_object_unref (GTK_OBJECT (ce));
- minicard->editor = NULL;
-}
-
-static void
-supported_fields_cb (EBook *book, EBookStatus status, EList *fields, EMinicard *e_minicard)
-{
- e_minicard->editor = e_contact_editor_new (e_minicard->card, FALSE, fields, !e_minicard->editable);
-
- if (book != NULL) {
- gtk_signal_connect (GTK_OBJECT (e_minicard->editor), "add_card",
- GTK_SIGNAL_FUNC (add_card_cb), book);
- gtk_signal_connect (GTK_OBJECT (e_minicard->editor), "commit_card",
- GTK_SIGNAL_FUNC (commit_card_cb), book);
- gtk_signal_connect (GTK_OBJECT (e_minicard->editor), "delete_card",
- GTK_SIGNAL_FUNC (delete_card_cb), book);
- }
-
- gtk_signal_connect (GTK_OBJECT (e_minicard->editor), "editor_closed",
- GTK_SIGNAL_FUNC (editor_closed_cb), e_minicard);
-}
-
-static gboolean
-e_minicard_event (GnomeCanvasItem *item, GdkEvent *event)
-{
- EMinicard *e_minicard;
- GtkWidget *canvas;
-
- e_minicard = E_MINICARD (item);
- canvas = GTK_WIDGET (GNOME_CANVAS_ITEM (item)->canvas);
-
- switch( event->type ) {
- case GDK_FOCUS_CHANGE:
- {
- GdkEventFocus *focus_event = (GdkEventFocus *) event;
- if (focus_event->in) {
- if (!e_minicard->selected) {
- e_minicard_selected(e_minicard, event);
- }
- } else {
- EBook *book = NULL;
-
- if (e_minicard->changed) {
-
- e_card_simple_sync_card(e_minicard->simple);
-
- if (E_IS_MINICARD_VIEW(GNOME_CANVAS_ITEM(e_minicard)->parent)) {
-
- gtk_object_get(GTK_OBJECT(GNOME_CANVAS_ITEM(e_minicard)->parent),
- "book", &book,
- NULL);
-
- }
-
- if (book) {
-
- /* Add the card in the contact editor to our ebook */
- e_book_commit_card (book,
- e_minicard->card,
- card_changed_cb,
- NULL);
- } else {
- remodel(e_minicard);
- e_canvas_item_request_reflow(GNOME_CANVAS_ITEM(e_minicard));
- }
- e_minicard->changed = FALSE;
- }
- e_minicard->has_focus = FALSE;
- }
- }
- break;
- case GDK_BUTTON_PRESS:
- if (event->button.button == 1) {
- int ret_val = e_minicard_selected(e_minicard, event);
- e_canvas_item_grab_focus(item, TRUE);
- e_minicard->button_x = event->button.x;
- e_minicard->button_y = event->button.y;
- e_minicard->drag_button_down = TRUE;
- return ret_val;
- } else if (event->button.button == 3) {
- MinicardAndParent *mnp = g_new(MinicardAndParent, 1);
- EPopupMenu menu[] = { {N_("Save as VCard"), NULL, GTK_SIGNAL_FUNC(save_as), NULL, 0},
- {N_("Send contact to other"), NULL, GTK_SIGNAL_FUNC(send_as), NULL, 0},
- {N_("Send message to contact"), NULL, GTK_SIGNAL_FUNC(send_to), NULL, 0},
- {N_("Print"), NULL, GTK_SIGNAL_FUNC(print), NULL, 0},
- {N_("Print Envelope"), NULL, GTK_SIGNAL_FUNC(print_envelope), NULL, 0},
- {N_("Delete"), NULL, GTK_SIGNAL_FUNC(delete), NULL, 1},
- {NULL, NULL, NULL, 0}};
- mnp->minicard = e_minicard;
- mnp->parent = item->parent;
- mnp->canvas = GTK_WIDGET(item->canvas);
- gtk_object_ref(GTK_OBJECT(mnp->minicard));
- gtk_object_ref(GTK_OBJECT(mnp->parent));
- gtk_object_ref(GTK_OBJECT(mnp->canvas));
- e_popup_menu_run (menu, event, 0, E_IS_MINICARD_VIEW(mnp->parent) ? 0 : 1, mnp);
- }
- break;
- case GDK_BUTTON_RELEASE:
- e_minicard->drag_button_down = FALSE;
- break;
- case GDK_MOTION_NOTIFY:
- /* shamelessly ripped from e-table.c, complete with
- broken stuck-grab behavior */
- if (e_minicard->drag_button_down && event->motion.state & GDK_BUTTON1_MASK) {
- if (MAX (abs (e_minicard->button_x - event->motion.x),
- abs (e_minicard->button_y - event->motion.y)) > 3) {
- gint ret_val = e_minicard_drag_begin(e_minicard, event);
-
- printf ("signalled drag begin\n");
-
- e_minicard->drag_button_down = FALSE;
-
- return ret_val;
- }
- }
- break;
- case GDK_2BUTTON_PRESS:
- if (event->button.button == 1 && E_IS_MINICARD_VIEW(item->parent)) {
- if (e_minicard->editor) {
- e_contact_editor_raise(e_minicard->editor);
- } else {
- EBook *book = NULL;
- if (E_IS_MINICARD_VIEW(item->parent)) {
- gtk_object_get(GTK_OBJECT(item->parent),
- "book", &book,
- NULL);
- }
-
- if (book != NULL) {
- e_book_get_supported_fields (book,
- (EBookFieldsCallback)supported_fields_cb,
- e_minicard);
- }
- }
- return TRUE;
- }
- 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 )
-{
- GList *list;
-
- if (e_minicard->header_text) {
- 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);
- e_minicard->changed = TRUE;
-}
-
-static void
-add_field (EMinicard *e_minicard, ECardSimpleField field, gdouble left_width)
-{
- 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,
- "max_field_name_length", left_width,
- "editable", e_minicard->editable,
- 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 gdouble
-get_left_width(EMinicard *e_minicard)
-{
- gchar *name;
- ECardSimpleField field;
- gdouble width = -1;
- GdkFont *font;
-
- font = ((GtkWidget *) ((GnomeCanvasItem *) e_minicard)->canvas)->style->font;
-
- for(field = E_CARD_SIMPLE_FIELD_FULL_NAME; field != E_CARD_SIMPLE_FIELD_LAST; field++) {
- gdouble this_width;
- name = g_strdup_printf("%s:", e_card_simple_get_name(e_minicard->simple, field));
- this_width = gdk_text_width(font, name, strlen(name));
- if (width < this_width)
- width = this_width;
- g_free(name);
- }
- return width;
-}
-
-static void
-remodel( EMinicard *e_minicard )
-{
- int count = 0;
- if ( !(GTK_OBJECT_FLAGS( e_minicard ) & GNOME_CANVAS_ITEM_REALIZED) )
- return;
- if (e_minicard->simple) {
- ECardSimpleField field;
- GList *list;
- char *file_as;
- gdouble left_width = -1;
-
- 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 - 2 && 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;
- if (left_width == -1) {
- left_width = get_left_width(e_minicard);
- }
-
- string = e_card_simple_get(e_minicard->simple, field);
- if (string && *string) {
- add_field(e_minicard, field, left_width);
- 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 strcasecmp(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;
- }
-}
-
-int
-e_minicard_selected (EMinicard *minicard, GdkEvent *event)
-{
- gint ret_val = 0;
- gtk_signal_emit(GTK_OBJECT(minicard),
- e_minicard_signals[SELECTED],
- event, &ret_val);
- return ret_val;
-}
-
-static gint
-e_minicard_drag_begin (EMinicard *minicard, GdkEvent *event)
-{
- gint ret_val = 0;
- gtk_signal_emit (GTK_OBJECT(minicard),
- e_minicard_signals[DRAG_BEGIN],
- event, &ret_val);
- return ret_val;
-}
diff --git a/addressbook/gui/widgets/e-minicard.h b/addressbook/gui/widgets/e-minicard.h
deleted file mode 100644
index 3480d9d071..0000000000
--- a/addressbook/gui/widgets/e-minicard.h
+++ /dev/null
@@ -1,115 +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 <clahey@helixcode.com>
- *
- * 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 <libgnomeui/gnome-canvas.h>
-#include "addressbook/contact-editor/e-contact-editor.h"
-#include "addressbook/backend/ebook/e-card.h"
-#include "addressbook/backend/ebook/e-card-simple.h"
-
-#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;
-
- EContactEditor *editor;
-
- GList *fields; /* Of type EMinicardField */
- guint needs_remodeling : 1;
-
- guint changed : 1;
-
- guint selected : 1;
-
- guint has_focus : 1;
-
- guint editable : 1;
-
- guint drag_button_down : 1;
-
- gint button_x;
- gint button_y;
-
- double width;
- double height;
-};
-
-struct _EMinicardClass
-{
- GnomeCanvasGroupClass parent_class;
-
- gint (* selected) (EMinicard *minicard, GdkEvent *event);
- gint (* drag_begin) (EMinicard *minicard, GdkEvent *event);
-};
-
-
-GtkType e_minicard_get_type (void);
-char *e_minicard_get_card_id (EMinicard *minicard);
-int e_minicard_compare (EMinicard *minicard1, EMinicard *minicard2);
-
-int e_minicard_selected (EMinicard *minicard, GdkEvent *event);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-#endif /* __E_MINICARD_H__ */
diff --git a/addressbook/gui/widgets/gal-view-factory-minicard.c b/addressbook/gui/widgets/gal-view-factory-minicard.c
deleted file mode 100644
index 10e13d9bdf..0000000000
--- a/addressbook/gui/widgets/gal-view-factory-minicard.c
+++ /dev/null
@@ -1,120 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * gal-view-factory-minicard.c: A View Factory
- *
- * Authors:
- * Chris Lahey <clahey@ximian.com>
- *
- * (C) 2000, 2001 Ximian, Inc.
- */
-#include <config.h>
-#include <glib.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include "gal-view-factory-minicard.h"
-#include "gal-view-minicard.h"
-
-#define GVFE_CLASS(e) ((GalViewFactoryMinicardClass *)((GtkObject *)e)->klass)
-
-#define PARENT_TYPE gal_view_factory_get_type ()
-
-static GalViewFactoryClass *gal_view_factory_minicard_parent_class;
-
-static const char *
-gal_view_factory_minicard_get_title (GalViewFactory *factory)
-{
- return _("Card View");
-}
-
-static GalView *
-gal_view_factory_minicard_new_view (GalViewFactory *factory,
- const char *name)
-{
- return gal_view_minicard_new(name);
-}
-
-static const char *
-gal_view_factory_minicard_get_type_code (GalViewFactory *factory)
-{
- return "minicard";
-}
-
-static void
-gal_view_factory_minicard_destroy (GtkObject *object)
-{
-#if 0
- GalViewFactoryMinicard *factory = GAL_VIEW_FACTORY_MINICARD(object);
-#endif
-}
-
-static void
-gal_view_factory_minicard_class_init (GtkObjectClass *object_class)
-{
- GalViewFactoryClass *view_factory_class = GAL_VIEW_FACTORY_CLASS(object_class);
- gal_view_factory_minicard_parent_class = gtk_type_class (PARENT_TYPE);
-
- view_factory_class->get_title = gal_view_factory_minicard_get_title;
- view_factory_class->new_view = gal_view_factory_minicard_new_view;
- view_factory_class->get_type_code = gal_view_factory_minicard_get_type_code;
-
- object_class->destroy = gal_view_factory_minicard_destroy;
-}
-
-static void
-gal_view_factory_minicard_init (GalViewFactoryMinicard *factory)
-{
-}
-
-/**
- * gal_view_minicard_new
- *
- * A new GalViewFactory for creating Minicard views. Create one of
- * these and pass it to GalViewCollection for use.
- *
- * Returns: The new GalViewFactoryMinicard.
- */
-GalViewFactory *
-gal_view_factory_minicard_new (void)
-{
- return gal_view_factory_minicard_construct (gtk_type_new (gal_view_factory_minicard_get_type ()));
-}
-
-/**
- * gal_view_minicard_construct
- * @factory: The factory to construct
- *
- * constructs the GalViewFactoryMinicard. To be used by subclasses and
- * language bindings.
- *
- * Returns: The GalViewFactoryMinicard.
- */
-GalViewFactory *
-gal_view_factory_minicard_construct (GalViewFactoryMinicard *factory)
-{
- return GAL_VIEW_FACTORY(factory);
-}
-
-GtkType
-gal_view_factory_minicard_get_type (void)
-{
- static guint type = 0;
-
- if (!type)
- {
- GtkTypeInfo info =
- {
- "GalViewFactoryMinicard",
- sizeof (GalViewFactoryMinicard),
- sizeof (GalViewFactoryMinicardClass),
- (GtkClassInitFunc) gal_view_factory_minicard_class_init,
- (GtkObjectInitFunc) gal_view_factory_minicard_init,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
- };
-
- type = gtk_type_unique (PARENT_TYPE, &info);
- }
-
- return type;
-}
diff --git a/addressbook/gui/widgets/gal-view-factory-minicard.h b/addressbook/gui/widgets/gal-view-factory-minicard.h
deleted file mode 100644
index 3816fdba46..0000000000
--- a/addressbook/gui/widgets/gal-view-factory-minicard.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * gal-view-factory-minicard.c: A View Factory
- *
- * Authors:
- * Chris Lahey <clahey@ximian.com>
- *
- * (C) 2000, 2001 Ximian, Inc.
- */
-#ifndef _GAL_VIEW_FACTORY_MINICARD_H_
-#define _GAL_VIEW_FACTORY_MINICARD_H_
-
-#include <gtk/gtkobject.h>
-#include <gal/menus/gal-view-factory.h>
-
-#define GAL_VIEW_FACTORY_MINICARD_TYPE (gal_view_factory_minicard_get_type ())
-#define GAL_VIEW_FACTORY_MINICARD(o) (GTK_CHECK_CAST ((o), GAL_VIEW_FACTORY_MINICARD_TYPE, GalViewFactoryMinicard))
-#define GAL_VIEW_FACTORY_MINICARD_CLASS(k) (GTK_CHECK_CLASS_CAST((k), GAL_VIEW_FACTORY_MINICARD_TYPE, GalViewFactoryMinicardClass))
-#define GAL_IS_VIEW_FACTORY_MINICARD(o) (GTK_CHECK_TYPE ((o), GAL_VIEW_FACTORY_MINICARD_TYPE))
-#define GAL_IS_VIEW_FACTORY_MINICARD_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), GAL_VIEW_FACTORY_MINICARD_TYPE))
-
-typedef struct {
- GalViewFactory base;
-} GalViewFactoryMinicard;
-
-typedef struct {
- GalViewFactoryClass parent_class;
-} GalViewFactoryMinicardClass;
-
-/* Standard functions */
-GtkType gal_view_factory_minicard_get_type (void);
-GalViewFactory *gal_view_factory_minicard_new (void);
-GalViewFactory *gal_view_factory_minicard_construct (GalViewFactoryMinicard *factory);
-
-#endif /* _GAL_VIEW_FACTORY_MINICARD_H_ */
diff --git a/addressbook/gui/widgets/gal-view-minicard.c b/addressbook/gui/widgets/gal-view-minicard.c
deleted file mode 100644
index 4cfa71f470..0000000000
--- a/addressbook/gui/widgets/gal-view-minicard.c
+++ /dev/null
@@ -1,154 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * gal-view-minicard.c: An Minicard View
- *
- * Authors:
- * Chris Lahey <clahey@ximian.com>
- *
- * (C) 2000, 2001 Ximian, Inc.
- */
-#include <config.h>
-#include "gal-view-minicard.h"
-
-#define PARENT_TYPE gal_view_get_type ()
-
-static GalViewClass *gal_view_minicard_parent_class;
-
-static void
-gal_view_minicard_edit (GalView *view)
-{
- /* GalViewMinicard *minicard_view = GAL_VIEW_MINICARD(view); */
-}
-
-static void
-gal_view_minicard_load (GalView *view,
- const char *filename)
-{
-}
-
-static void
-gal_view_minicard_save (GalView *view,
- const char *filename)
-{
-}
-
-static const char *
-gal_view_minicard_get_title (GalView *view)
-{
- return GAL_VIEW_MINICARD(view)->title;
-}
-
-static void
-gal_view_minicard_set_title (GalView *view,
- const char *title)
-{
- g_free(GAL_VIEW_MINICARD(view)->title);
- GAL_VIEW_MINICARD(view)->title = g_strdup(title);
-}
-
-static const char *
-gal_view_minicard_get_type_code (GalView *view)
-{
- return "minicard";
-}
-
-static GalView *
-gal_view_minicard_clone (GalView *view)
-{
- GalViewMinicard *gve, *new;
-
- gve = GAL_VIEW_MINICARD(view);
-
- new = gtk_type_new (gal_view_minicard_get_type ());
- new->title = g_strdup (gve->title);
-
- return GAL_VIEW(new);
-}
-
-static void
-gal_view_minicard_destroy (GtkObject *object)
-{
- GalViewMinicard *view = GAL_VIEW_MINICARD(object);
- g_free(view->title);
-}
-
-static void
-gal_view_minicard_class_init (GtkObjectClass *object_class)
-{
- GalViewClass *gal_view_class = GAL_VIEW_CLASS(object_class);
- gal_view_minicard_parent_class = gtk_type_class (PARENT_TYPE);
-
- gal_view_class->edit = gal_view_minicard_edit ;
- gal_view_class->load = gal_view_minicard_load ;
- gal_view_class->save = gal_view_minicard_save ;
- gal_view_class->get_title = gal_view_minicard_get_title ;
- gal_view_class->set_title = gal_view_minicard_set_title ;
- gal_view_class->get_type_code = gal_view_minicard_get_type_code;
- gal_view_class->clone = gal_view_minicard_clone ;
-
- object_class->destroy = gal_view_minicard_destroy ;
-}
-
-static void
-gal_view_minicard_init (GalViewMinicard *gve)
-{
- gve->title = NULL;
-}
-
-/**
- * gal_view_minicard_new
- * @title: The name of the new view.
- *
- * Returns a new GalViewMinicard. This is primarily for use by
- * GalViewFactoryMinicard.
- *
- * Returns: The new GalViewMinicard.
- */
-GalView *
-gal_view_minicard_new (const gchar *title)
-{
- return gal_view_minicard_construct (gtk_type_new (gal_view_minicard_get_type ()), title);
-}
-
-/**
- * gal_view_minicard_construct
- * @view: The view to construct.
- * @title: The name of the new view.
- *
- * constructs the GalViewMinicard. To be used by subclasses and
- * language bindings.
- *
- * Returns: The GalViewMinicard.
- */
-GalView *
-gal_view_minicard_construct (GalViewMinicard *view,
- const gchar *title)
-{
- view->title = g_strdup(title);
- return GAL_VIEW(view);
-}
-
-GtkType
-gal_view_minicard_get_type (void)
-{
- static guint type = 0;
-
- if (!type)
- {
- GtkTypeInfo info =
- {
- "GalViewMinicard",
- sizeof (GalViewMinicard),
- sizeof (GalViewMinicardClass),
- (GtkClassInitFunc) gal_view_minicard_class_init,
- (GtkObjectInitFunc) gal_view_minicard_init,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
- };
-
- type = gtk_type_unique (PARENT_TYPE, &info);
- }
-
- return type;
-}
diff --git a/addressbook/gui/widgets/gal-view-minicard.h b/addressbook/gui/widgets/gal-view-minicard.h
deleted file mode 100644
index fef98141f3..0000000000
--- a/addressbook/gui/widgets/gal-view-minicard.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * gal-view-minicard.h: An Minicard View
- *
- * Authors:
- * Chris Lahey <clahey@ximian.com>
- *
- * (C) 2000, 2001 Ximian, Inc.
- */
-#ifndef _GAL_VIEW_MINICARD_H_
-#define _GAL_VIEW_MINICARD_H_
-
-#include <gtk/gtkobject.h>
-#include <gal/menus/gal-view.h>
-
-#define GAL_VIEW_MINICARD_TYPE (gal_view_minicard_get_type ())
-#define GAL_VIEW_MINICARD(o) (GTK_CHECK_CAST ((o), GAL_VIEW_MINICARD_TYPE, GalViewMinicard))
-#define GAL_VIEW_MINICARD_CLASS(k) (GTK_CHECK_CLASS_CAST((k), GAL_VIEW_MINICARD_TYPE, GalViewMinicardClass))
-#define GAL_IS_VIEW_MINICARD(o) (GTK_CHECK_TYPE ((o), GAL_VIEW_MINICARD_TYPE))
-#define GAL_IS_VIEW_MINICARD_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), GAL_VIEW_MINICARD_TYPE))
-
-typedef struct {
- GalView base;
-
- char *title;
-} GalViewMinicard;
-
-typedef struct {
- GalViewClass parent_class;
-} GalViewMinicardClass;
-
-/* Standard functions */
-GtkType gal_view_minicard_get_type (void);
-GalView *gal_view_minicard_new (const gchar *title);
-GalView *gal_view_minicard_construct (GalViewMinicard *view,
- const gchar *title);
-
-#endif /* _GAL_VIEW_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 7627e84a34..0000000000
--- a/addressbook/gui/widgets/test-minicard-label.c
+++ /dev/null
@@ -1,129 +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 <clahey@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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT 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 <gtk/gtkmain.h>
-#include <libgnomeui/gnome-app.h>
-#include <libgnomeui/gnome-canvas-rect-ellipse.h>
-#include <libgnomeui/gnome-init.h>
-#include <gal/widgets/e-canvas.h>
-#include "e-minicard-label.h"
-
-/* 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 <clahey@umich.edu>",
- 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,
- "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 54cedd1a58..0000000000
--- a/addressbook/gui/widgets/test-minicard-view.c
+++ /dev/null
@@ -1,204 +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 <clahey@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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT 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 <libgnorba/gnorba.h>
-#include <e-util/e-canvas.h>
-#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 <clahey@umich.edu>",
- 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 b368ba1b87..0000000000
--- a/addressbook/gui/widgets/test-minicard.c
+++ /dev/null
@@ -1,119 +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 <clahey@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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT 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 <gtk/gtkmain.h>
-#include <libgnomeui/gnome-app.h>
-#include <libgnomeui/gnome-init.h>
-#include <libgnomeui/gnome-canvas-rect-ellipse.h>
-
-#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 <clahey@umich.edu>",
- 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(),
- "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 2c31adb69b..0000000000
--- a/addressbook/gui/widgets/test-reflow.c
+++ /dev/null
@@ -1,198 +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 <clahey@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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT 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 <gtk/gtkmain.h>
-#include <gtk/gtkvbox.h>
-#include <libgnomeui/gnome-canvas-rect-ellipse.h>
-#include <libgnomeui/gnome-init.h>
-#include <gal/widgets/e-canvas.h>
-#include <gal/widgets/e-reflow.h>
-#include <gal/widgets/e-scroll-frame.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 - 1, allocation->height - 1);
- 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 - 1, last_alloc.height - 1);
- 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 <clahey@umich.edu>",
- 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 *scrollframe;
- 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(),
- "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, NULL);
- }
- gnome_canvas_set_scroll_region ( GNOME_CANVAS( canvas ),
- 0, 0,
- 100, 100 );
-
- scrollframe = e_scroll_frame_new (gtk_layout_get_hadjustment(GTK_LAYOUT(canvas)),
- gtk_layout_get_vadjustment(GTK_LAYOUT(canvas)));
- e_scroll_frame_set_policy (E_SCROLL_FRAME (scrollframe),
- GTK_POLICY_AUTOMATIC,
- GTK_POLICY_NEVER);
-
- gtk_container_add (GTK_CONTAINER (scrollframe), canvas);
-
- gnome_app_set_contents( GNOME_APP( app ), scrollframe );
-
- /* 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 fc3b174d98..0000000000
--- a/addressbook/printing/Makefile.am
+++ /dev/null
@@ -1,69 +0,0 @@
-ecpsdir = $(datadir)/evolution/ecps
-
-ecps_DATA = \
- smallbook.ecps \
- medbook.ecps \
- phonelist.ecps
-
-gladedir = $(datadir)/evolution/glade
-
-glade_DATA = \
- e-contact-print.glade
-
-INCLUDES = \
- $(GNOME_INCLUDEDIR) \
- -DG_LOG_DOMAIN=\"addressbook-printing\" \
- -I$(top_srcdir)/addressbook \
- -I$(top_srcdir) \
- -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \
- -DEVOLUTION_ECPSDIR=\""$(ecpsdir)"\" \
- -DDATADIR=\""$(datadir)"\" \
- $(GNOME_PRINT_CFLAGS) \
- $(BONOBO_GNOME_CFLAGS) \
- $(EXTRA_GNOME_CFLAGS)
-
-noinst_LIBRARIES = \
- libecontactprint.a
-
-libecontactprint_a_SOURCES = \
- e-contact-print-envelope.c \
- e-contact-print-envelope.h \
- e-contact-print-style-editor.c \
- e-contact-print-style-editor.h \
- e-contact-print-types.h \
- e-contact-print.c \
- e-contact-print.h
-
-noinst_PROGRAMS = \
- contact-print-test \
- contact-print-style-editor-test
-
-contact_print_test_SOURCES = \
- test-print.c
-
-contact_print_test_LDADD = \
- $(top_builddir)/addressbook/backend/ebook/libebook.la \
- $(top_builddir)/e-util/libeutil.la \
- $(top_builddir)/libversit/libversit.la \
- $(top_builddir)/e-util/ename/libename.la \
- libecontactprint.a \
- $(EXTRA_GNOME_LIBS) \
- $(BONOBO_GNOME_LIBS) \
- $(GNOME_PRINT_LIBS)
-
-contact_print_style_editor_test_SOURCES = \
- test-contact-print-style-editor.c
-
-contact_print_style_editor_test_LDADD = \
- $(top_builddir)/addressbook/backend/ebook/libebook.la \
- $(top_builddir)/e-util/libeutil.la \
- $(top_builddir)/libversit/libversit.la \
- $(top_builddir)/e-util/ename/libename.la \
- libecontactprint.a \
- $(EXTRA_GNOME_LIBS) \
- $(BONOBO_GNOME_LIBS) \
- $(GNOME_PRINT_LIBS)
-
-EXTRA_DIST = \
- $(glade_DATA) \
- $(ecps_DATA)
diff --git a/addressbook/printing/e-contact-print-envelope.c b/addressbook/printing/e-contact-print-envelope.c
deleted file mode 100644
index 43d40b81cb..0000000000
--- a/addressbook/printing/e-contact-print-envelope.c
+++ /dev/null
@@ -1,221 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-contact-print-envelope.c
- * Copyright (C) 2000 Helix Code, Inc.
- * Author: Chris Lahey <clahey@helixcode.com>
- *
- * 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 <time.h>
-#include <libgnome/gnome-paper.h>
-#include <libgnomeprint/gnome-print.h>
-#include <libgnomeprint/gnome-print-dialog.h>
-#include <libgnomeprint/gnome-print-master.h>
-#include <libgnomeprint/gnome-print-master-preview.h>
-#include "addressbook/backend/ebook/e-card.h"
-#include "addressbook/backend/ebook/e-card-simple.h"
-#include "addressbook/printing/e-contact-print-envelope.h"
-
-#define ENVELOPE_HEIGHT (72.0 * 4.0)
-#define ENVELOPE_WIDTH (72.0 * 9.5)
-
-typedef struct {
- int start;
- int length;
-} EcpeLine;
-
-static void
-startset(void *pointer, EcpeLine **iterator)
-{
- (*iterator)--;
- (*iterator)->start = GPOINTER_TO_INT(pointer);
-}
-
-static void
-lengthset(void *pointer, EcpeLine **iterator)
-{
- (*iterator)--;
- (*iterator)->length = GPOINTER_TO_INT(pointer);
-}
-
-static EcpeLine *
-ecpe_break(char *address)
-{
- int i;
- int length = 0;
- int laststart = 0;
- GList *startlist = NULL;
- GList *lengthlist = NULL;
- EcpeLine *ret_val;
- EcpeLine *iterator;
-
- for (i = 0; address[i]; i++) {
- if (address[i] == '\n') {
- startlist = g_list_prepend (startlist, GINT_TO_POINTER(laststart));
- lengthlist = g_list_prepend (lengthlist, GINT_TO_POINTER(i - laststart));
- length ++;
- laststart = i + 1;
- }
- }
- startlist = g_list_prepend (startlist, GINT_TO_POINTER(laststart));
- lengthlist = g_list_prepend (lengthlist, GINT_TO_POINTER(i - laststart));
- length ++;
-
- ret_val = g_new(EcpeLine, length + 1);
-
- iterator = ret_val + length;
- g_list_foreach(startlist, (GFunc) startset, &iterator);
- g_list_free(startlist);
-
- iterator = ret_val + length;
- g_list_foreach(lengthlist, (GFunc) lengthset, &iterator);
- g_list_free(lengthlist);
-
- ret_val[length].start = -1;
- ret_val[length].length = -1;
-
- return ret_val;
-}
-
-static void
-ecpe_linelist_dimensions(GnomeFont *font, char *address, EcpeLine *linelist, double *widthp, double *heightp)
-{
- double width = 0;
- int i;
- if (widthp) {
- for (i = 0; linelist[i].length != -1; i++) {
- width = MAX(width, gnome_font_get_width_string_n (font, address + linelist[i].start, linelist[i].length));
- }
- *widthp = width;
- } else {
- for (i = 0; linelist[i].length != -1; i++)
- /* Intentionally empty */;
- }
- if (heightp) {
- *heightp = gnome_font_get_size(font) * i;
- }
-}
-
-static void
-ecpe_linelist_print(GnomePrintContext *pc, GnomeFont *font, char *address, EcpeLine *linelist, double x, double y)
-{
- int i;
- gnome_print_setfont(pc, font);
- for (i = 0; linelist[i].length != -1; i++) {
- gnome_print_moveto(pc, x, y + gnome_font_get_ascender(font));
- gnome_print_show_sized (pc, address + linelist[i].start, linelist[i].length);
- y -= gnome_font_get_size(font);
- }
-}
-
-static gint
-e_contact_print_envelope_close(GnomeDialog *dialog, gpointer data)
-{
- return FALSE;
-}
-
-static void
-ecpe_print(GnomePrintContext *pc, ECard *ecard, gboolean as_return)
-{
- ECardSimple *card = e_card_simple_new(ecard);
- char *address;
- EcpeLine *linelist;
- double x;
- double y;
- GnomeFont *font;
-
-
- gnome_print_rotate(pc, 90);
- gnome_print_translate(pc, 72.0 * 11.0 - ENVELOPE_WIDTH, -72.0 * 8.5 + (72.0 * 8.5 - ENVELOPE_HEIGHT) / 2);
-
- address = e_card_simple_get(card, E_CARD_SIMPLE_FIELD_ADDRESS_BUSINESS);
- linelist = ecpe_break(address);
- if (as_return)
- font = gnome_font_new("Helvetica", 9);
- else
- font = gnome_font_new("Helvetica", 12);
- ecpe_linelist_dimensions(font, address, linelist, NULL, &y);
- if (as_return) {
- x = 36;
- y = ENVELOPE_HEIGHT - 36;
- } else {
- x = ENVELOPE_WIDTH / 2;
- y = (ENVELOPE_HEIGHT - y) / 2;
- }
- ecpe_linelist_print(pc, font, address, linelist, x, y);
- gtk_object_unref(GTK_OBJECT(font));
- g_free(linelist);
-
- g_free(address);
-
- gnome_print_showpage(pc);
- gnome_print_context_close(pc);
-
- gtk_object_unref(GTK_OBJECT(card));
-}
-
-static void
-e_contact_print_envelope_button(GnomeDialog *dialog, gint button, gpointer data)
-{
- GnomePrintMaster *master;
- GnomePrintContext *pc;
- ECard *card = NULL;
- GtkWidget *preview;
-
- card = gtk_object_get_data(GTK_OBJECT(dialog), "card");
-
- switch( button ) {
- case GNOME_PRINT_PRINT:
- master = gnome_print_master_new_from_dialog( GNOME_PRINT_DIALOG(dialog) );
- pc = gnome_print_master_get_context( master );
-
- ecpe_print(pc, card, FALSE);
-
- gnome_print_master_print(master);
- 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 );
-
- ecpe_print(pc, card, FALSE);
-
- preview = GTK_WIDGET(gnome_print_master_preview_new(master, "Print Preview"));
- gtk_widget_show_all(preview);
- break;
- case GNOME_PRINT_CANCEL:
- gtk_object_unref(GTK_OBJECT(card));
- gnome_dialog_close(dialog);
- break;
- }
-}
-
-GtkWidget *
-e_contact_print_envelope_dialog_new(ECard *card)
-{
- GtkWidget *dialog;
-
- dialog = gnome_print_dialog_new("Print envelope", GNOME_PRINT_DIALOG_COPIES);
-
- card = e_card_duplicate(card);
- gtk_object_set_data(GTK_OBJECT(dialog), "card", card);
- gtk_signal_connect(GTK_OBJECT(dialog),
- "clicked", GTK_SIGNAL_FUNC(e_contact_print_envelope_button), NULL);
- gtk_signal_connect(GTK_OBJECT(dialog),
- "close", GTK_SIGNAL_FUNC(e_contact_print_envelope_close), NULL);
- return dialog;
-}
diff --git a/addressbook/printing/e-contact-print-envelope.h b/addressbook/printing/e-contact-print-envelope.h
deleted file mode 100644
index f3f3219af1..0000000000
--- a/addressbook/printing/e-contact-print-envelope.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-contact-print-envelope.h
- * Copyright (C) 2000 Helix Code, Inc.
- * Author: Chris Lahey <clahey@helixcode.com>
- *
- * 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_ENVELOPE_H
-#define E_CONTACT_PRINT_ENVELOPE_H
-
-#include <addressbook/backend/ebook/e-card.h>
-#include "e-contact-print-types.h"
-
-GtkWidget *e_contact_print_envelope_dialog_new(ECard *card);
-
-#endif /* E_CONTACT_PRINT_ENVELOPE_H */
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 3188458925..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 <clahey@helixcode.com>
- *
- * 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-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 d9211c2c51..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 <clahey@helixcode.com>
- *
- * 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 <gtk/gtkvbox.h>
-#include <glade/glade.h>
-
-#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 e778c58220..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 <clahey@helixcode.com>
- *
- * 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 <glib.h>
-#include <libgnomeprint/gnome-font.h>
-
-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 180f2625c3..0000000000
--- a/addressbook/printing/e-contact-print.c
+++ /dev/null
@@ -1,1119 +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 <clahey@helixcode.com>
- *
- * 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 <ctype.h>
-#include <sys/types.h>
-#include <stdlib.h>
-#include <glib.h>
-#include <gnome-xml/tree.h>
-#include <gnome-xml/parser.h>
-#include <gnome-xml/xmlmemory.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-util.h>
-#include <libgnome/gnome-paper.h>
-#include <libgnomeprint/gnome-print.h>
-#include <libgnomeprint/gnome-print-dialog.h>
-#include <libgnomeprint/gnome-print-master.h>
-#include <libgnomeprint/gnome-print-master-preview.h>
-#include <libgnomeprint/gnome-print-multipage.h>
-#include <gal/widgets/e-unicode.h>
-#include <addressbook/backend/ebook/e-book.h>
-#include <addressbook/backend/ebook/e-card.h>
-#include <addressbook/backend/ebook/e-card-simple.h>
-#include "e-contact-print.h"
-
-#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;
-
- gboolean uses_book;
- int type;
- EBook *book;
- gchar *query;
-
- GList *cards;
-};
-
-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 * gnome_font_get_size (font);
- 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 - 1) * .2 * gnome_font_get_size (font);
-}
-
-#if 0
-static void
-e_contact_output_and_advance(EContactPrintContext *ctxt, GnomeFont *font, double x, double width, gchar *text)
-{
- ctxt->y -= .1 * gnome_font_get_size (font);
- 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 * gnome_font_get_size (font);
-}
-#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)
-{
- unsigned 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") + gnome_font_get_size (ctxt->style->body_font) / 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 += gnome_font_get_size (ctxt->style->headings_font) * .2;
-
- height += gnome_font_get_size (ctxt->style->headings_font) * .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 += gnome_font_get_size (ctxt->style->headings_font) * .2;
-
- height += gnome_font_get_size (ctxt->style->headings_font) * .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 * gnome_font_get_size (ctxt->style->body_font);
- }
- g_free(string);
- }
- height += gnome_font_get_size (ctxt->style->headings_font) * .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 -= gnome_font_get_size (ctxt->style->headings_font) * .2;
-
- ctxt->y -= gnome_font_get_size (ctxt->style->headings_font) * .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 + gnome_font_get_size (ctxt->style->headings_font) * .3, ctxt->x + column_width, ctxt->y - e_contact_text_height(ctxt->pc, ctxt->style->headings_font, column_width - 4, file_as) - gnome_font_get_size (ctxt->style->headings_font) * .3, .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 -= gnome_font_get_size (ctxt->style->headings_font) * .2;
-
- ctxt->y -= gnome_font_get_size (ctxt->style->headings_font) * .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 * gnome_font_get_size (ctxt->style->body_font);
- }
- g_free(string);
- }
-
- ctxt->y -= gnome_font_get_size (ctxt->style->headings_font) * .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
-complete_sequence(EBookView *book_view, EContactPrintContext *ctxt)
-{
- GList *cards = ctxt->cards;
-
- 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;
-
- for(; cards; cards = cards->next) {
- ECard *card = cards->data;
- ECardSimple *simple = e_card_simple_new(card);
- guchar *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);
- if (book_view)
- 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));
- if (ctxt->book)
- gtk_object_unref(GTK_OBJECT(ctxt->book));
- g_free(ctxt->query);
- g_list_foreach(ctxt->cards, (GFunc) gtk_object_unref, NULL);
- g_list_free(ctxt->cards);
- 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 int
-card_compare (ECard *card1, ECard *card2) {
- if (card1 && card2) {
- char *file_as1, *file_as2;
- gtk_object_get(GTK_OBJECT(card1),
- "file_as", &file_as1,
- NULL);
- gtk_object_get(GTK_OBJECT(card2),
- "file_as", &file_as2,
- NULL);
- if (file_as1 && file_as2)
- return strcasecmp(file_as1, file_as2);
- if (file_as1)
- return -1;
- if (file_as2)
- return 1;
- return strcmp(e_card_get_id(card1), e_card_get_id(card2));
- } else {
- return 0;
- }
-}
-
-static void
-create_card(EBookView *book_view, const GList *cards, EContactPrintContext *ctxt)
-{
- for(; cards; cards = cards->next) {
- ECard *card = cards->data;
- gtk_object_ref(GTK_OBJECT(card));
- ctxt->cards = g_list_insert_sorted(ctxt->cards, card, (GCompareFunc) card_compare);
- }
-}
-
-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);
-
- gtk_signal_connect(GTK_OBJECT(book_view),
- "sequence_complete",
- GTK_SIGNAL_FUNC(complete_sequence),
- ctxt);
-}
-
-static void
-e_contact_do_print_cards (EBook *book, char *query, EContactPrintContext *ctxt)
-{
- 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 += gnome_font_get_size (ctxt->style->headings_font) * .2;
-
- height += gnome_font_get_size (ctxt->style->headings_font) * .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 * gnome_font_get_size (ctxt->style->body_font);
- }
- }
- g_free(string);
- }
- height += gnome_font_get_size (ctxt->style->headings_font) * .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 -= gnome_font_get_size (ctxt->style->headings_font) * .2;
-
- ctxt->y -= gnome_font_get_size (ctxt->style->headings_font) * .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 * gnome_font_get_size (ctxt->style->body_font);
- 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 * gnome_font_get_size (ctxt->style->body_font);
- }
- }
- ctxt->y -= gnome_font_get_size (ctxt->style->headings_font) * .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++) {
- guchar *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((unsigned char) *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, "medbook.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;
- gboolean uses_book = (gint) gtk_object_get_data(GTK_OBJECT(dialog), "uses_book");
- EBook *book = NULL;
- char *query = NULL;
- ECard *card = NULL;
- gdouble font_size;
- if (uses_book) {
- book = gtk_object_get_data(GTK_OBJECT(dialog), "book");
- query = gtk_object_get_data(GTK_OBJECT(dialog), "query");
- } else {
- card = gtk_object_get_data(GTK_OBJECT(dialog), "card");
- }
- 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), gnome_font_get_size (ctxt->style->headings_font) * 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;
- if (uses_book) {
- ctxt->cards = NULL;
- e_contact_do_print(book, ctxt->query, ctxt);
- } else {
- ctxt->cards = g_list_append(NULL, card);
- complete_sequence(NULL, 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), gnome_font_get_size (ctxt->style->headings_font) * 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 = g_strdup(query);
- if (uses_book) {
- ctxt->cards = NULL;
- gtk_object_ref(GTK_OBJECT(book));
- e_contact_do_print(book, ctxt->query, ctxt);
- } else {
- ctxt->cards = g_list_append(NULL, card);
- gtk_object_ref(GTK_OBJECT(card));
- complete_sequence(NULL, ctxt);
- }
- break;
- case GNOME_PRINT_CANCEL:
- if (uses_book)
- gtk_object_unref(GTK_OBJECT(book));
- else
- gtk_object_unref(GTK_OBJECT(card));
- 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), "uses_book", (void *) 1);
- 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;
-}
-
-GtkWidget *
-e_contact_print_card_dialog_new(ECard *card)
-{
- GtkWidget *dialog;
-
- dialog = gnome_print_dialog_new("Print card", GNOME_PRINT_DIALOG_COPIES);
-
- card = e_card_duplicate(card);
- gtk_object_set_data(GTK_OBJECT(dialog), "card", card);
- gtk_object_set_data(GTK_OBJECT(dialog), "uses_book", (void *) 0);
- 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 ff7aa91377..0000000000
--- a/addressbook/printing/e-contact-print.glade
+++ /dev/null
@@ -1,2007 +0,0 @@
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <name>Printing</name>
- <program_name>printing</program_name>
- <directory></directory>
- <source_directory></source_directory>
- <pixmaps_directory>pixmaps</pixmaps_directory>
- <language>C</language>
- <gnome_support>False</gnome_support>
- <gettext_support>False</gettext_support>
- <use_widget_names>False</use_widget_names>
- <output_main_file>False</output_main_file>
- <output_support_files>False</output_support_files>
- <output_build_files>False</output_build_files>
- <backup_source_files>True</backup_source_files>
- <main_source_file>interface.c</main_source_file>
- <main_header_file>interface.h</main_header_file>
- <handler_source_file>callbacks.c</handler_source_file>
- <handler_header_file>callbacks.h</handler_header_file>
- <support_source_file>support.c</support_source_file>
- <support_header_file>support.h</support_header_file>
-</project>
-
-<widget>
- <class>GnomeDialog</class>
- <name>print-edit-style</name>
- <visible>False</visible>
- <title>Page Setup:</title>
- <type>GTK_WINDOW_TOPLEVEL</type>
- <position>GTK_WIN_POS_NONE</position>
- <modal>False</modal>
- <allow_shrink>False</allow_shrink>
- <allow_grow>False</allow_grow>
- <auto_shrink>False</auto_shrink>
- <auto_close>False</auto_close>
- <hide_on_close>False</hide_on_close>
-
- <widget>
- <class>GtkVBox</class>
- <child_name>GnomeDialog:vbox</child_name>
- <name>dialog-vbox1</name>
- <homogeneous>False</homogeneous>
- <spacing>8</spacing>
- <child>
- <padding>4</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox-contact-print-style-editor</name>
- <homogeneous>False</homogeneous>
- <spacing>5</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox2</name>
- <border_width>5</border_width>
- <homogeneous>False</homogeneous>
- <spacing>16</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label8</name>
- <label>Style name:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>label-style-name</name>
- <can_focus>True</can_focus>
- <editable>False</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkNotebook</class>
- <name>notebook1</name>
- <can_focus>True</can_focus>
- <show_tabs>True</show_tabs>
- <show_border>True</show_border>
- <tab_pos>GTK_POS_TOP</tab_pos>
- <scrollable>False</scrollable>
- <tab_hborder>2</tab_hborder>
- <tab_vborder>2</tab_vborder>
- <popup_enable>False</popup_enable>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox2</name>
- <border_width>5</border_width>
- <homogeneous>False</homogeneous>
- <spacing>5</spacing>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment1</name>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xscale>0</xscale>
- <yscale>0</yscale>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame5</name>
- <label>Preview:</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-
- <widget>
- <class>Placeholder</class>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox1</name>
- <homogeneous>True</homogeneous>
- <spacing>7</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame6</name>
- <label>Options</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment4</name>
- <xalign>0</xalign>
- <yalign>0</yalign>
- <xscale>0</xscale>
- <yscale>0</yscale>
-
- <widget>
- <class>GtkTable</class>
- <name>table1</name>
- <border_width>8</border_width>
- <rows>6</rows>
- <columns>5</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>0</row_spacing>
- <column_spacing>0</column_spacing>
-
- <widget>
- <class>GtkLabel</class>
- <name>label5</name>
- <label>Include:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>4</top_attach>
- <bottom_attach>5</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label4</name>
- <label>Sections:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment2</name>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xscale>0</xscale>
- <yscale>0</yscale>
- <child>
- <left_attach>1</left_attach>
- <right_attach>5</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkRadioButton</class>
- <name>radiobutton1</name>
- <can_focus>True</can_focus>
- <label>Immediately follow each other</label>
- <active>True</active>
- <draw_indicator>True</draw_indicator>
- </widget>
- </widget>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>checkbutton1</name>
- <can_focus>True</can_focus>
- <label>Letter tabs on side</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <left_attach>1</left_attach>
- <right_attach>5</right_attach>
- <top_attach>4</top_attach>
- <bottom_attach>5</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>checkbutton2</name>
- <can_focus>True</can_focus>
- <label>Headings for each letter</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <left_attach>1</left_attach>
- <right_attach>5</right_attach>
- <top_attach>5</top_attach>
- <bottom_attach>6</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment3</name>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xscale>0</xscale>
- <yscale>0</yscale>
- <child>
- <left_attach>1</left_attach>
- <right_attach>5</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkRadioButton</class>
- <name>radiobutton2</name>
- <can_focus>True</can_focus>
- <label>Start on a new page</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label6</name>
- <label>Number of columns:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>3</right_attach>
- <top_attach>2</top_attach>
- <bottom_attach>3</bottom_attach>
- <xpad>0</xpad>
- <ypad>2</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label7</name>
- <label>Blank forms at end:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>3</right_attach>
- <top_attach>3</top_attach>
- <bottom_attach>4</bottom_attach>
- <xpad>0</xpad>
- <ypad>2</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment6</name>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xscale>0</xscale>
- <yscale>0</yscale>
- <child>
- <left_attach>3</left_attach>
- <right_attach>4</right_attach>
- <top_attach>3</top_attach>
- <bottom_attach>4</bottom_attach>
- <xpad>0</xpad>
- <ypad>2</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkSpinButton</class>
- <name>spinbutton2</name>
- <can_focus>True</can_focus>
- <climb_rate>1</climb_rate>
- <digits>0</digits>
- <numeric>False</numeric>
- <update_policy>GTK_UPDATE_ALWAYS</update_policy>
- <snap>False</snap>
- <wrap>False</wrap>
- <value>2</value>
- <lower>0</lower>
- <upper>100</upper>
- <step>1</step>
- <page>10</page>
- <page_size>10</page_size>
- </widget>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment5</name>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xscale>0</xscale>
- <yscale>0</yscale>
- <child>
- <left_attach>3</left_attach>
- <right_attach>4</right_attach>
- <top_attach>2</top_attach>
- <bottom_attach>3</bottom_attach>
- <xpad>0</xpad>
- <ypad>2</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkSpinButton</class>
- <name>spinbutton1</name>
- <width>45</width>
- <can_focus>True</can_focus>
- <climb_rate>1</climb_rate>
- <digits>0</digits>
- <numeric>False</numeric>
- <update_policy>GTK_UPDATE_ALWAYS</update_policy>
- <snap>False</snap>
- <wrap>False</wrap>
- <value>1</value>
- <lower>0</lower>
- <upper>100</upper>
- <step>1</step>
- <page>10</page>
- <page_size>10</page_size>
- </widget>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox3</name>
- <homogeneous>False</homogeneous>
- <spacing>8</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame7</name>
- <label>Fonts</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkTable</class>
- <name>table2</name>
- <border_width>8</border_width>
- <rows>2</rows>
- <columns>2</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>13</row_spacing>
- <column_spacing>8</column_spacing>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment7</name>
- <xalign>0.5</xalign>
- <yalign>1</yalign>
- <xscale>1</xscale>
- <yscale>0</yscale>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>button6</name>
- <can_focus>True</can_focus>
- <label>Font...</label>
- </widget>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment8</name>
- <xalign>0.5</xalign>
- <yalign>1</yalign>
- <xscale>1</xscale>
- <yscale>0</yscale>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>button5</name>
- <width>90</width>
- <can_focus>True</can_focus>
- <label>Font...</label>
- </widget>
- </widget>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox4</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label10</name>
- <label>Headings</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry3</name>
- <width>100</width>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text>10 pt. Tahoma</text>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox5</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label9</name>
- <label>Body</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry2</name>
- <width>100</width>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text>8 pt. Tahoma</text>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame8</name>
- <label>Shading</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>checkbutton3</name>
- <can_focus>True</can_focus>
- <label>Print using gray shading</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- </widget>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label1</name>
- <label>Format</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox3</name>
- <homogeneous>True</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox6</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame9</name>
- <label>Paper</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox16</name>
- <border_width>10</border_width>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox17</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label21</name>
- <label>Type:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkScrolledWindow</class>
- <name>scrolledwindow1</name>
- <hscrollbar_policy>GTK_POLICY_ALWAYS</hscrollbar_policy>
- <vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
- <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
- <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkCList</class>
- <name>clist1</name>
- <can_focus>True</can_focus>
- <columns>1</columns>
- <column_widths>80</column_widths>
- <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
- <show_titles>False</show_titles>
- <shadow_type>GTK_SHADOW_IN</shadow_type>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>CList:title</child_name>
- <name>label26</name>
- <label>label26</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox18</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label24</name>
- <label>Dimensions:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox5</name>
- <homogeneous>True</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label27</name>
- <label>Width:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry9</name>
- <width>1</width>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label28</name>
- <label>Height:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry10</name>
- <width>1</width>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox19</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label25</name>
- <label>Paper source:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkCombo</class>
- <name>combo1</name>
- <value_in_list>False</value_in_list>
- <ok_if_empty>True</ok_if_empty>
- <case_sensitive>False</case_sensitive>
- <use_arrows>True</use_arrows>
- <use_arrows_always>False</use_arrows_always>
- <items></items>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkEntry</class>
- <child_name>GtkCombo:entry</child_name>
- <name>combo-entry1</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- </widget>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame10</name>
- <label>Margins</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkTable</class>
- <name>table4</name>
- <border_width>15</border_width>
- <rows>2</rows>
- <columns>4</columns>
- <homogeneous>True</homogeneous>
- <row_spacing>6</row_spacing>
- <column_spacing>9</column_spacing>
-
- <widget>
- <class>GtkLabel</class>
- <name>label29</name>
- <label>Top:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>True</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label30</name>
- <label>Bottom:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>True</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label31</name>
- <label>Left:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>2</left_attach>
- <right_attach>3</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>True</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry11</name>
- <width>1</width>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry12</name>
- <width>1</width>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>3</left_attach>
- <right_attach>4</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry13</name>
- <width>1</width>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>3</left_attach>
- <right_attach>4</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry14</name>
- <width>1</width>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label32</name>
- <label>Right:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>2</left_attach>
- <right_attach>3</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>True</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox7</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame11</name>
- <label>Page</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox8</name>
- <border_width>10</border_width>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox20</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label33</name>
- <label>Size:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkScrolledWindow</class>
- <name>scrolledwindow2</name>
- <hscrollbar_policy>GTK_POLICY_ALWAYS</hscrollbar_policy>
- <vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
- <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
- <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkCList</class>
- <name>clist2</name>
- <can_focus>True</can_focus>
- <columns>1</columns>
- <column_widths>80</column_widths>
- <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
- <show_titles>False</show_titles>
- <shadow_type>GTK_SHADOW_IN</shadow_type>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>CList:title</child_name>
- <name>label35</name>
- <label>label26</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox21</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label34</name>
- <label>Dimensions:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox6</name>
- <homogeneous>True</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label36</name>
- <label>Width:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry15</name>
- <width>1</width>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label37</name>
- <label>Height:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry16</name>
- <width>1</width>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame12</name>
- <label>Orientation</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox4</name>
- <homogeneous>False</homogeneous>
- <spacing>10</spacing>
-
- <widget>
- <class>Placeholder</class>
- </widget>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox9</name>
- <homogeneous>False</homogeneous>
- <spacing>5</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment9</name>
- <xalign>0</xalign>
- <yalign>1</yalign>
- <xscale>0</xscale>
- <yscale>0</yscale>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkRadioButton</class>
- <name>radiobutton3</name>
- <can_focus>True</can_focus>
- <label>Portrait</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- </widget>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment10</name>
- <xalign>0</xalign>
- <yalign>0</yalign>
- <xscale>0</xscale>
- <yscale>0</yscale>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkRadioButton</class>
- <name>radiobutton4</name>
- <can_focus>True</can_focus>
- <label>Landscape</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- </widget>
- </widget>
- </widget>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label2</name>
- <label>Paper</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox10</name>
- <border_width>8</border_width>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkTable</class>
- <name>table5</name>
- <rows>4</rows>
- <columns>3</columns>
- <homogeneous>True</homogeneous>
- <row_spacing>4</row_spacing>
- <column_spacing>4</column_spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment15</name>
- <xalign>0</xalign>
- <yalign>1</yalign>
- <xscale>0</xscale>
- <yscale>0</yscale>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>2</top_attach>
- <bottom_attach>3</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>button11</name>
- <can_focus>True</can_focus>
- <label>Font...</label>
- </widget>
- </widget>
-
- <widget>
- <class>GtkText</class>
- <name>text10</name>
- <height>50</height>
- <can_focus>True</can_focus>
- <editable>False</editable>
- <text></text>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>True</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkText</class>
- <name>text11</name>
- <height>50</height>
- <can_focus>True</can_focus>
- <editable>False</editable>
- <text></text>
- <child>
- <left_attach>2</left_attach>
- <right_attach>3</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkText</class>
- <name>text12</name>
- <height>50</height>
- <can_focus>True</can_focus>
- <editable>False</editable>
- <text></text>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkText</class>
- <name>text13</name>
- <height>50</height>
- <can_focus>True</can_focus>
- <editable>False</editable>
- <text></text>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>3</top_attach>
- <bottom_attach>4</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>True</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkText</class>
- <name>text14</name>
- <height>5</height>
- <can_focus>True</can_focus>
- <editable>False</editable>
- <text></text>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>3</top_attach>
- <bottom_attach>4</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkText</class>
- <name>text15</name>
- <height>50</height>
- <can_focus>True</can_focus>
- <editable>False</editable>
- <text></text>
- <child>
- <left_attach>2</left_attach>
- <right_attach>3</right_attach>
- <top_attach>3</top_attach>
- <bottom_attach>4</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment16</name>
- <xalign>0.5</xalign>
- <yalign>1</yalign>
- <xscale>1</xscale>
- <yscale>0</yscale>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox14</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkLabel</class>
- <name>label14</name>
- <label>Header</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry7</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment17</name>
- <xalign>0.5</xalign>
- <yalign>1</yalign>
- <xscale>1</xscale>
- <yscale>0</yscale>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>2</top_attach>
- <bottom_attach>3</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox15</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkLabel</class>
- <name>label15</name>
- <label>Footer:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>entry8</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment14</name>
- <xalign>0</xalign>
- <yalign>1</yalign>
- <xscale>0</xscale>
- <yscale>0</yscale>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>button10</name>
- <can_focus>True</can_focus>
- <label>Font...</label>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox7</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkToolbar</class>
- <name>toolbar1</name>
- <orientation>GTK_ORIENTATION_HORIZONTAL</orientation>
- <type>GTK_TOOLBAR_ICONS</type>
- <space_size>5</space_size>
- <space_style>GTK_TOOLBAR_SPACE_EMPTY</space_style>
- <relief>GTK_RELIEF_NORMAL</relief>
- <tooltips>True</tooltips>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>Placeholder</class>
- </widget>
-
- <widget>
- <class>Placeholder</class>
- </widget>
-
- <widget>
- <class>Placeholder</class>
- </widget>
-
- <widget>
- <class>Placeholder</class>
- </widget>
-
- <widget>
- <class>Placeholder</class>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>checkbutton4</name>
- <can_focus>True</can_focus>
- <label>Reverse on even pages</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label3</name>
- <label>Header/Footer</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHButtonBox</class>
- <child_name>GnomeDialog:action_area</child_name>
- <name>dialog-action_area1</name>
- <layout_style>GTK_BUTTONBOX_END</layout_style>
- <spacing>8</spacing>
- <child_min_width>85</child_min_width>
- <child_min_height>27</child_min_height>
- <child_ipad_x>7</child_ipad_x>
- <child_ipad_y>0</child_ipad_y>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- <pack>GTK_PACK_END</pack>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>button1</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button2</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_APPLY</stock_button>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button3</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
- </widget>
- </widget>
- </widget>
-</widget>
-
-</GTK-Interface>
diff --git a/addressbook/printing/e-contact-print.h b/addressbook/printing/e-contact-print.h
deleted file mode 100644
index bc4c312bb0..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 <clahey@helixcode.com>
- *
- * 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 <addressbook/backend/ebook/e-book.h>
-#include "e-contact-print-types.h"
-
-GtkWidget *e_contact_print_dialog_new(EBook *book, char *query);
-GtkWidget *e_contact_print_card_dialog_new(ECard *card);
-
-#endif /* E_CONTACT_PRINT_H */
diff --git a/addressbook/printing/medbook.ecps b/addressbook/printing/medbook.ecps
deleted file mode 100644
index 72cca146dd..0000000000
--- a/addressbook/printing/medbook.ecps
+++ /dev/null
@@ -1,30 +0,0 @@
-<style>
-<title/>
-<type>cards</type>
-<sections_start_new_page>FALSE</sections_start_new_page>
-<num_columns>2</num_columns>
-<blank_forms>2</blank_forms>
-<letter_tabs>TRUE</letter_tabs>
-<letter_headings>TRUE</letter_headings>
-<headings_font>Helvetica-Bold 12</headings_font>
-<body_font>Helvetica 8</body_font>
-<print_using_grey>TRUE</print_using_grey>
-<paper_width>8.5</paper_width>
-<paper_height>11</paper_height>
-<top_margin>0.5</top_margin>
-<left_margin>0.5</left_margin>
-<bottom_margin>0.5</bottom_margin>
-<right_margin>0.5</right_margin>
-<page_width>8.5</page_width>
-<page_height>11</page_height>
-<orientation>portrait</orientation>
-<header_font>Helvetica 8</header_font>
-<left_header/>
-<center_header/>
-<right_header/>
-<footer_font>Helvetica 8</footer_font>
-<left_footer/>
-<center_footer>[Page #]</center_footer>
-<right_footer/>
-<reverse_on_even_pages>FALSE</reverse_on_even_pages>
-</style>
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 @@
-<style>
-<title/>
-<type>phone_list</type>
-<sections_start_new_page>FALSE</sections_start_new_page>
-<num_columns>2</num_columns>
-<letter_tabs>FALSE</letter_tabs>
-<letter_headings>TRUE</letter_headings>
-<headings_font>Helvetica-Bold 10</headings_font>
-<body_font>Helvetica 8</body_font>
-<print_using_grey>TRUE</print_using_grey>
-<paper_width>8.5</paper_width>
-<paper_height>11</paper_height>
-<top_margin>0.5</top_margin>
-<left_margin>0.5</left_margin>
-<bottom_margin>0.5</bottom_margin>
-<right_margin>0.5</right_margin>
-<page_width>8.5</page_width>
-<page_height>11</page_height>
-<orientation>portrait</orientation>
-<header_font>Helvetica 8</header_font>
-<left_header/>
-<center_header/>
-<right_header/>
-<footer_font>Helvetica 8</footer_font>
-<left_footer>[User Name]</left_footer>
-<center_footer>[Page #]</center_footer>
-<right_footer>[Date Printed]</right_footer>
-<reverse_on_even_pages>FALSE</reverse_on_even_pages>
-</style>
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 @@
-<style>
-<title/>
-<type>cards</type>
-<sections_start_new_page>FALSE</sections_start_new_page>
-<num_columns>1</num_columns>
-<blank_forms>2</blank_forms>
-<letter_tabs>TRUE</letter_tabs>
-<letter_headings>TRUE</letter_headings>
-<headings_font>Helvetica-Bold 8</headings_font>
-<body_font>Helvetica 6</body_font>
-<print_using_grey>TRUE</print_using_grey>
-<paper_width>8.5</paper_width>
-<paper_height>11</paper_height>
-<top_margin>0.5</top_margin>
-<left_margin>0.5</left_margin>
-<bottom_margin>0.5</bottom_margin>
-<right_margin>0.5</right_margin>
-<page_width>2.75</page_width>
-<page_height>4.25</page_height>
-<orientation>portrait</orientation>
-<header_font>Helvetica 6</header_font>
-<left_header/>
-<center_header/>
-<right_header/>
-<footer_font>Helvetica 6</footer_font>
-<left_footer/>
-<center_footer>[Page #]</center_footer>
-<right_footer/>
-<reverse_on_even_pages>FALSE</reverse_on_even_pages>
-</style>
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 3f40ca751d..0000000000
--- a/addressbook/printing/test-contact-print-style-editor.c
+++ /dev/null
@@ -1,90 +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 <clahey@helixcode.com>
- *
- * 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 <stdlib.h>
-#include <gtk/gtkmain.h>
-#include <libgnomeui/gnome-app.h>
-#include <libgnomeui/gnome-init.h>
-#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 <clahey@umich.edu>",
- 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 4c6ab595c9..0000000000
--- a/addressbook/printing/test-print.c
+++ /dev/null
@@ -1,87 +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 <clahey@helixcode.com>
- *
- * 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 <stdlib.h>
-#include <gtk/gtkmain.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnomeui/gnome-app.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-init.h>
-#include <glade/glade.h>
-#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 <clahey@umich.edu>",
- 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 fac9c3f1d5..0000000000
--- a/art/Makefile.am
+++ /dev/null
@@ -1,130 +0,0 @@
-imagesdir = $(datadir)/images/evolution
-images_DATA = \
- configure_16_addressbook.xpm \
- configure_16_calendar.xpm \
- configure_16_folder.xpm \
- configure_16_mail.xpm \
- copy_16_message.xpm \
- edit.xpm \
- encrypt.xpm \
- folder.xpm \
- forward.xpm \
- import.png \
- import.xpm \
- move_message.xpm \
- print.xpm \
- print-preview.xpm \
- reply.xpm \
- reply_to_all.xpm \
- save.xpm \
- all_contacts.xpm \
- find_contact.xpm \
- briefcase.png \
- butterfly.png \
- cellphone.png \
- delete_message.xpm \
- envelope.png \
- evolution-calendar-mini.png \
- evolution-calendar.png \
- evolution-contacts-mini.png \
- evolution-contacts-plain.png \
- evolution-contacts.png \
- evolution-inbox-mini.png \
- evolution-inbox.png \
- evolution-notes-mini.png \
- evolution-notes.png \
- evolution-tasks-mini.png \
- evolution-tasks.png \
- evolution-today-mini.png \
- evolution-today.png \
- evolution-trash-mini.png \
- evolution-trash.png \
- executive-summary-bg.png \
- executive-summary-curve.png \
- globe.png \
- hide_deleted_messages.xpm \
- hide_read_messages.xpm \
- hide_selected_messages.xpm \
- house.png \
- malehead.png \
- new_appointment.xpm \
- new_contact.xpm \
- new-message.xpm \
- send-receive.xpm \
- service-close.png \
- service-configure.png \
- service-down.png \
- service-down-disabled.png \
- service-left.png \
- service-left-disabled.png \
- service-right.png \
- service-right-disabled.png \
- service-up.png \
- service-up-disabled.png \
- show_all_messages.xpm \
- splash.png \
- undelete_message.xpm \
- work_offline.xpm
-
-buttonsdir = $(datadir)/images/evolution/buttons
-buttons_DATA = \
- add-service.png \
- compose-message.png \
- copy-message.png \
- dayview.xpm \
- fetch-mail.png \
- forward.png \
- monthview.xpm \
- move-message.png \
- new_appointment.png \
- reply.png \
- reply-to-all.png \
- send-24-receive.png \
- weekview.xpm \
- workweekview.xpm \
- yearview.xpm
-
-conduitsdir = $(datadir)/images/evolution/conduits
-conduits_DATA = \
- evo-16-address-conduit.png \
- evo-16-todo-conduit.png \
- evo-16-calendar-conduit.png \
- evo-48-calendar-conduit.png \
- evo-48-address-conduit.png \
- evo-48-todo-conduit.png
-
-appicondir = $(datadir)/pixmaps
-appicon_DATA = evolution.png
-
-EXTRA_DIST = \
- attachment.xpm \
- bell.xpm \
- check-filled.xpm \
- empty.xpm \
- jump.xpm \
- mail-new.xpm \
- mail-read.xpm \
- mail-replied.xpm \
- mark.xpm \
- meeting.xpm \
- priority-high.xpm \
- priority-low.xpm \
- recur.xpm \
- score-higher.xpm \
- score-highest.xpm \
- score-high.xpm \
- score-lower.xpm \
- score-lowest.xpm \
- score-low.xpm \
- score-normal.xpm \
- task-assigned-to.xpm \
- task-assigned.xpm \
- task-recurring.xpm \
- task.xpm \
- tree-expanded.xpm \
- tree-unexpanded.xpm \
- $(images_DATA) \
- $(buttons_DATA) \
- $(conduits_DATA) \
- $(appicon_DATA)
-
diff --git a/art/add-attachment.png b/art/add-attachment.png
deleted file mode 100644
index 024b203fe0..0000000000
--- a/art/add-attachment.png
+++ /dev/null
Binary files differ
diff --git a/art/add-service.png b/art/add-service.png
deleted file mode 100644
index 62ddebe678..0000000000
--- a/art/add-service.png
+++ /dev/null
Binary files differ
diff --git a/art/all_contacts.xpm b/art/all_contacts.xpm
deleted file mode 100644
index 1f2e90123d..0000000000
--- a/art/all_contacts.xpm
+++ /dev/null
@@ -1,136 +0,0 @@
-/* XPM */
-static char * 24_all_contacts_xpm[] = {
-"24 24 109 2",
-" c None",
-". c #000000",
-"+ c #E2E2E2",
-"@ c #FFFFFF",
-"# c #7C7C7C",
-"$ c #99A097",
-"% c #4D4D4D",
-"& c #535250",
-"* c #A6A6A6",
-"= c #798874",
-"- c #444F42",
-"; c #5B6158",
-"> c #909090",
-", c #6B6B6B",
-"' c #B5BCB3",
-") c #596555",
-"! c #869880",
-"~ c #DDDDDD",
-"{ c #C5C5C5",
-"] c #6E6E6E",
-"^ c #DCE1DA",
-"/ c #495246",
-"( c #575757",
-"_ c #929292",
-": c #CDCDCD",
-"< c #F8F8F9",
-"[ c #ABABAB",
-"} c #656565",
-"| c #BDBDBD",
-"1 c #9C9FA2",
-"2 c #1E1E1F",
-"3 c #BEBEBE",
-"4 c #F8F8F8",
-"5 c #C9B49B",
-"6 c #8E7151",
-"7 c #876E51",
-"8 c #BAB1A5",
-"9 c #C4CCD4",
-"0 c #5F6D7C",
-"a c #4B5E6D",
-"b c #34383A",
-"c c #F3F3F3",
-"d c #A88D6E",
-"e c #DFD0BF",
-"f c #5E432B",
-"g c #7E6C5B",
-"h c #9EA8B3",
-"i c #C0C8CF",
-"j c #9EA2A7",
-"k c #6E6F6E",
-"l c #80766E",
-"m c #665B52",
-"n c #969696",
-"o c #C3C3C3",
-"p c #EEDFCC",
-"q c #F4EEE6",
-"r c #765E45",
-"s c #F9F9FA",
-"t c #C9CFD6",
-"u c #A3AEBA",
-"v c #E9EEF2",
-"w c #91B7BA",
-"x c #625547",
-"y c #625347",
-"z c #D0CCC9",
-"A c #CFCFCF",
-"B c #FAFAFA",
-"C c #7590AE",
-"D c #C1665A",
-"E c #445B71",
-"F c #FDFCFC",
-"G c #EEF0F1",
-"H c #DCD8D5",
-"I c #BCB2A7",
-"J c #776E67",
-"K c #877D75",
-"L c #C8C8C8",
-"M c #4B6983",
-"N c #9DB8D2",
-"O c #486481",
-"P c #314E6C",
-"Q c #667A8D",
-"R c #FDFDFD",
-"S c #736A63",
-"T c #756C65",
-"U c #D6D3D1",
-"V c #BABABA",
-"W c #5F7C96",
-"X c #5D7A95",
-"Y c #4D6B87",
-"Z c #3B556D",
-"` c #344A60",
-" . c #999999",
-".. c #7F7F7F",
-"+. c #F6F6F6",
-"@. c #5D5D5D",
-"#. c #787878",
-"$. c #9B9B9B",
-"%. c #C7C7C7",
-"&. c #A3A3A3",
-"*. c #EAE8E3",
-"=. c #E0DDD6",
-"-. c #918E85",
-";. c #D5D5D5",
-">. c #B5B5B5",
-",. c #E1E1E1",
-"'. c #989898",
-"). c #C1C1C1",
-"!. c #DADADA",
-" . . . . ",
-" . . + @ . . . . ",
-" . . + @ # . + @ @ + . . ",
-" . . + @ $ % & . @ @ * @ @ + . . ",
-" . + @ @ = - ; . + @ @ > , @ @ @ + . . ",
-" . + @ @ ' ) ! . @ @ ~ # @ { ] @ @ @ + . ",
-" . @ @ ^ / . + @ @ > @ @ ] @ @ ( @ + . ",
-" . + @ @ ^ . @ @ ~ , @ _ ] @ * : @ . ",
-" . . . . . . . . + < @ [ ~ @ # @ @ } @ + . ",
-" . | @ @ @ @ @ @ . @ 1 2 @ @ * 3 @ > @ @ . ",
-" . @ 4 5 6 7 8 . + 9 0 a b @ @ @ > ~ @ + . . ",
-" . @ c d e f g . @ h i j k l m @ n o @ . @ + . ",
-" . @ c p q r . + s t u v w x y z @ @ A . + + . ",
-" . @ B C D E . + @ F G H I J K @ > @ . L @ . ",
-" . @ M N O P Q . . + R @ S T U V @ + . @ + . ",
-" . @ W X Y Z ` @ .. . + @ @ @ ..+.. @ @ . ",
-" . @ @ @ @ @ @ @ @ @ @ . . + @ @ + . @ + . ",
-" . @ @ @.@ @.@ #.@ $.@ %.@ . . . . @ @ . ",
-" . &.*.*.*.*.*.*.*.*.*.*.*.=.-.. ;.@ A . ",
-" . . . . . . . . . . . . . . >.,.@ . ",
-" . . '.V V V V ).!.@ L . ",
-" . . + @ @ @ @ @ . ",
-" . . + @ @ L . ",
-" . . . . "};
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/bell.xpm b/art/bell.xpm
deleted file mode 100644
index b1ab537a17..0000000000
--- a/art/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/art/briefcase.png b/art/briefcase.png
deleted file mode 100644
index 424ad09632..0000000000
--- a/art/briefcase.png
+++ /dev/null
Binary files differ
diff --git a/art/butterfly.png b/art/butterfly.png
deleted file mode 100644
index 00089774e0..0000000000
--- a/art/butterfly.png
+++ /dev/null
Binary files differ
diff --git a/art/cellphone.png b/art/cellphone.png
deleted file mode 100644
index c8d70ae663..0000000000
--- a/art/cellphone.png
+++ /dev/null
Binary files differ
diff --git a/art/check-filled.xpm b/art/check-filled.xpm
deleted file mode 100644
index c0468fc25b..0000000000
--- a/art/check-filled.xpm
+++ /dev/null
@@ -1,21 +0,0 @@
-/* XPM */
-static const char * check_filled_xpm[] = {
-"16 16 2 1",
-" c None",
-". c #000000",
-" ",
-" ",
-" ............ ",
-" . . ",
-" . . . ",
-" . .. . ",
-" . ... . ",
-" . . ... . ",
-" . .. ... . ",
-" . ..... . ",
-" . ... . ",
-" . . . ",
-" . . ",
-" ............ ",
-" ",
-" "};
diff --git a/art/compose-message.png b/art/compose-message.png
deleted file mode 100644
index 2b0b97c791..0000000000
--- a/art/compose-message.png
+++ /dev/null
Binary files differ
diff --git a/art/configure_16_addressbook.xpm b/art/configure_16_addressbook.xpm
deleted file mode 100644
index 4e037fe7b5..0000000000
--- a/art/configure_16_addressbook.xpm
+++ /dev/null
@@ -1,77 +0,0 @@
-/* XPM */
-static char * 16_configure_addressbook_xpm[] = {
-"16 16 58 1",
-" c None",
-". c #000000",
-"+ c #FFFFFF",
-"@ c #EFEFEF",
-"# c #C3C3C3",
-"$ c #EAEAEA",
-"% c #BDBDBD",
-"& c #CFCFCF",
-"* c #898989",
-"= c #A8A8A8",
-"- c #A3A3A3",
-"; c #F8F8F8",
-"> c #C9B49B",
-", c #8E7151",
-"' c #876E51",
-") c #BAB1A5",
-"! c #9D9D9D",
-"~ c #EAE8E3",
-"{ c #F3F3F3",
-"] c #A88D6E",
-"^ c #DFD0BF",
-"/ c #5E432B",
-"( c #7E6C5B",
-"_ c #A6A6A6",
-": c #EEEEEE",
-"< c #EEDFCC",
-"[ c #F4EEE6",
-"} c #765E45",
-"| c #736251",
-"1 c #C1C1C1",
-"2 c #B4B4B4",
-"3 c #FAFAFA",
-"4 c #7590AE",
-"5 c #C1665A",
-"6 c #445B71",
-"7 c #AEADAB",
-"8 c #E8E8E8",
-"9 c #4B6983",
-"0 c #9DB8D2",
-"a c #486481",
-"b c #314E6C",
-"c c #BDBCB8",
-"d c #5F7C96",
-"e c #5D7A95",
-"f c #4D6B87",
-"g c #3B556D",
-"h c #999794",
-"i c #ADABA8",
-"j c #5D5D5D",
-"k c #9B9B9B",
-"l c #DEDEDE",
-"m c #C3C0BA",
-"n c #DAD8D3",
-"o c #B1AFAB",
-"p c #CBC9C5",
-"q c #A5A3A0",
-"r c #96948F",
-"s c #918E85",
-" .. .. ",
-" .+. .@. ",
-" .+....@. ",
-" .+@@@@#. ",
-" .......$@@#... ",
-".%+++++&.+#.*=-.",
-".+;>,')+.+@.!&~.",
-".+{]^/(+.+#._:~.",
-".+{<[}|1.+@.2&~.",
-".+34567.8@##.2~.",
-".+90ab.&@@@@#.c.",
-".+defg.+....@.h.",
-".+++++.+.!2.@.i.",
-".++j+j+..kl..!m.",
-".-~~~~~noc~pqrs.",
-" .............. "};
diff --git a/art/configure_16_calendar.xpm b/art/configure_16_calendar.xpm
deleted file mode 100644
index 3dd7392a1d..0000000000
--- a/art/configure_16_calendar.xpm
+++ /dev/null
@@ -1,76 +0,0 @@
-/* XPM */
-static char * configure_16_calendar_xpm[] = {
-"16 16 57 1",
-" c None",
-". c #000000",
-"+ c #FFFFFF",
-"@ c #EFEFEF",
-"# c #A8A8A8",
-"$ c #C3C3C3",
-"% c #D4D4D4",
-"& c #939393",
-"* c #F5F5F5",
-"= c #EAEAEA",
-"- c #E05232",
-"; c #DF4623",
-"> c #E78B76",
-", c #868686",
-"' c #4A4A4A",
-") c #DF502F",
-"! c #E87F68",
-"~ c #FDF6F4",
-"{ c #A7A7A7",
-"] c #747474",
-"^ c #CFCFCF",
-"/ c #DF4B29",
-"( c #F1B2A3",
-"_ c #E05231",
-": c #F3BFB4",
-"< c #EEEEEE",
-"[ c #FAE8E4",
-"} c #F9DDD6",
-"| c #E87B62",
-"1 c #8D8D8D",
-"2 c #7B7B7B",
-"3 c #9C9C9C",
-"4 c #989898",
-"5 c #707070",
-"6 c #E2E2E2",
-"7 c #E8E8E8",
-"8 c #B4B4B4",
-"9 c #E1E1E1",
-"0 c #B0B0B0",
-"a c #DEDEDE",
-"b c #E0E0E0",
-"c c #F4F4F4",
-"d c #9D9D9D",
-"e c #979797",
-"f c #BDBDBD",
-"g c #A0A0A0",
-"h c #C1C1C1",
-"i c #DADADA",
-"j c #D9D9D9",
-"k c #CECECE",
-"l c #7C7C7C",
-"m c #EDEDED",
-"n c #9F9F9F",
-"o c #ECECEC",
-"p c #E6E6E6",
-"q c #E7E7E7",
-"r c #808080",
-" .. .. ",
-".+....@........ ",
-".+....@.++++++#.",
-".+@@@@$.++++%&*.",
-" .=@@$.++-+;>,*.",
-" .+$.'#++)!~{*.",
-" .+@.]^+/(_:+*.",
-" .+$.#<+[+}|+<.",
-" .+@.12$3$4$56.",
-" .7@$$.8++++++9.",
-".^@@@@$.^+++0ab.",
-".+....@.{+++c#b.",
-".+.de.@.f+++ghi.",
-" ..jk..da+++++b.",
-" .lm^#n<op96qr.",
-" ............ "};
diff --git a/art/configure_16_folder.xpm b/art/configure_16_folder.xpm
deleted file mode 100644
index 4d016ca91a..0000000000
--- a/art/configure_16_folder.xpm
+++ /dev/null
@@ -1,85 +0,0 @@
-/* XPM */
-static char * 16_configure_folder_xpm[] = {
-"16 16 66 1",
-" c None",
-". c #000000",
-"+ c #FFFFFF",
-"@ c #EFEFEF",
-"# c #C3C3C3",
-"$ c #E4E5DF",
-"% c #D5D6CB",
-"& c #D6D7CA",
-"* c #F5F6F0",
-"= c #ADB198",
-"- c #C2C6A9",
-"; c #C0C3A7",
-"> c #B4B89D",
-", c #EAECDB",
-"' c #F6F6F4",
-") c #EAECDA",
-"! c #AAAB9E",
-"~ c #E5E8D4",
-"{ c #E4E7D2",
-"] c #C7C9B6",
-"^ c #F7F7F7",
-"/ c #DADEBF",
-"( c #DADEBE",
-"_ c #D8DCBC",
-": c #D6DBB9",
-"< c #797D66",
-"[ c #CDD2AD",
-"} c #CBD1AA",
-"| c #95997C",
-"1 c #F3F3EA",
-"2 c #70745E",
-"3 c #A3A889",
-"4 c #F3F4EA",
-"5 c #D5D9B7",
-"6 c #7F8369",
-"7 c #ABB08E",
-"8 c #929778",
-"9 c #F1F3E9",
-"0 c #D3D7B4",
-"a c #7C7F65",
-"b c #8F9474",
-"c c #F0F1E7",
-"d c #D1D6B2",
-"e c #CFD4AF",
-"f c #7A7D61",
-"g c #8D9270",
-"h c #EFF1E5",
-"i c #86896D",
-"j c #909273",
-"k c #707459",
-"l c #EBECDE",
-"m c #CACFA8",
-"n c #C8CDA5",
-"o c #B8BD97",
-"p c #848769",
-"q c #BFC598",
-"r c #60634C",
-"s c #989E79",
-"t c #C9CCB9",
-"u c #919576",
-"v c #848869",
-"w c #686B52",
-"x c #838768",
-"y c #595C46",
-"z c #797D60",
-"A c #666951",
-" .. .. ",
-" .+. .@. ",
-" .+....@. ",
-" ...+@@@@#. ",
-" .$%&.+@@#. ",
-" .*=-;>.+#..... ",
-" .,',,).+@.!~{].",
-" .^/(_:.+#.<[}|.",
-" .1/(_:.+@.23}|.",
-" .4_:5.+@##.678.",
-" .950.+@@@@#.ab.",
-" .cde.+....@.fg.",
-" .h[}.+.ij.@.kg.",
-" .lmno..pq..rsg.",
-" .t8ubvwwgxyzgA.",
-" ............. "};
diff --git a/art/configure_16_mail.xpm b/art/configure_16_mail.xpm
deleted file mode 100644
index b6416735ef..0000000000
--- a/art/configure_16_mail.xpm
+++ /dev/null
@@ -1,61 +0,0 @@
-/* XPM */
-static char * 16_configure_mail_xpm[] = {
-"16 16 42 1",
-" c None",
-". c #000000",
-"+ c #FFFFFF",
-"@ c #EFEFEF",
-"# c #C3C3C3",
-"$ c #010101",
-"% c #2F2F2F",
-"& c #A7A4A0",
-"* c #FCFCFC",
-"= c #F5F5F5",
-"- c #5D5B57",
-"; c #EBEBEB",
-"> c #1B1B1B",
-", c #FBFBF8",
-"' c #716E6B",
-") c #ECECEC",
-"! c #BEBEBE",
-"~ c #EDEDED",
-"{ c #DFDFDF",
-"] c #FBFAF7",
-"^ c #A5A29D",
-"/ c #E9E9E8",
-"( c #797873",
-"_ c #8E8C8A",
-": c #C6C3BD",
-"< c #C9C5C0",
-"[ c #7D7A77",
-"} c #F7F5F1",
-"| c #FAF9F6",
-"1 c #F8F6F2",
-"2 c #DAD8D6",
-"3 c #656360",
-"4 c #E2DFD8",
-"5 c #090808",
-"6 c #D7D4CE",
-"7 c #D8D5CF",
-"8 c #D6D3CD",
-"9 c #D9D6D0",
-"0 c #D3D1CD",
-"a c #BEBCB6",
-"b c #E0DCD5",
-"c c #222221",
-" .. .. ",
-" .+. .@.",
-" .+....@.",
-" .+@@@@#.",
-" .+@@#. ",
-" .+#. ",
-" $%$$$$$$.+@. ",
-" $&******=.+#. ",
-" $+-+++++;>+@. ",
-" $+,'+++).!@##. ",
-" $+,,'+~.{@@@@#.",
-" $+,]^'/.+....@.",
-" $+](,,_.+.:<.@.",
-" $+[,}|12..34.. ",
-" $56777890abc$ ",
-" $$$$$$$$$$$ "};
diff --git a/art/copy-message.png b/art/copy-message.png
deleted file mode 100644
index 907ec1a85d..0000000000
--- a/art/copy-message.png
+++ /dev/null
Binary files differ
diff --git a/art/copy_16_message.xpm b/art/copy_16_message.xpm
deleted file mode 100644
index a4f56cfd6e..0000000000
--- a/art/copy_16_message.xpm
+++ /dev/null
@@ -1,58 +0,0 @@
-/* XPM */
-static char * 16_copy_message_xpm[] = {
-"16 16 39 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 #F6F4F1",
-") c #81807C",
-"! c #E5E3DE",
-"~ c #F7F6F4",
-"{ c #B0ADA7",
-"] c #83817E",
-"^ c #E1DFDA",
-"/ c #928F8B",
-"( c #FBFBFA",
-"_ c #F7F5F2",
-": c #F5F3F0",
-"< c #B5B2AC",
-"[ c #A09C97",
-"} c #F0EFEB",
-"| c #E4E2DD",
-"1 c #AEABA6",
-"2 c #92908B",
-"3 c #E8E6E1",
-"4 c #F7F6F2",
-"5 c #F5F4F0",
-"6 c #6B6A68",
-"7 c #E2DFD9",
-"8 c #E2E0DB",
-"9 c #E3E1DC",
-"0 c #E6E4DF",
-" ",
-" .+......... ",
-".@#########$. ",
-".#%&*#*=*-;>. ",
-".#*,=*=*')'!. ",
-".#**.+......... ",
-".#*.@#########$.",
-".#~.#%&*#*=*-;>.",
-".#{.#*,=*=*')'!.",
-".]^.#**/(*_)*:!.",
-" ...#*~<)#)[-}|.",
-" .#~1**)__23|.",
-" .#{*:45_:>63.",
-" .]^777^8890$.",
-" ........... ",
-" "};
diff --git a/art/dayview.xpm b/art/dayview.xpm
deleted file mode 100644
index dbabb24c5c..0000000000
--- a/art/dayview.xpm
+++ /dev/null
@@ -1,34 +0,0 @@
-/* XPM */
-static char * dayview_xpm[] = {
-"24 24 7 1",
-" c None",
-". c #000000",
-"+ c #D8D8D4",
-"@ c #919191",
-"# c #666666",
-"$ c #FFFFFF",
-"% c #F2F1ED",
-"....................... ",
-".++++++++++++++++++++@. ",
-".+@@@@@@@@@@@@@@@@@@@#. ",
-".+@@@@@@@@@@@@@@@@@@@#. ",
-".+@@@@@@@@@@@@@@@@@@@#. ",
-".@####################. ",
-".$++@%%%%%%%%%%%%%%%%@. ",
-".$++@%%%%%%%%%%%%%%%%@. ",
-".$++@%%%%%%%%%%%%%%%%@. ",
-".@@@@@@@@@@@@@@@@@@@@#. ",
-".$++@%%%%%%%%%%%%%%%%@. ",
-".$++@%%%%%%%%%%%%%%%%@. ",
-".$++@%%%%%%%%%%%%%%%%@. ",
-".@@@@@@@@@@@@@@@@@@@@#. ",
-".$++@%%%%%%%%%%%%%%%%@. ",
-".$++@%%%%%%%%%%%%%%%%@. ",
-".$++@%%%%%%%%%%%%%%%%@. ",
-".@@@@@@@@@@@@@@@@@@@@#. ",
-".$++@%%%%%%%%%%%%%%%%@. ",
-".$++@%%%%%%%%%%%%%%%%@. ",
-".$++@%%%%%%%%%%%%%%%%@. ",
-".+@@#@@@@@@@@@@@@@@@@#. ",
-"....................... ",
-" "};
diff --git a/art/delete_message.xpm b/art/delete_message.xpm
deleted file mode 100644
index 8df5b6faed..0000000000
--- a/art/delete_message.xpm
+++ /dev/null
@@ -1,79 +0,0 @@
-/* XPM */
-static char * delete_message_xpm[] = {
-"16 16 60 1",
-" c None",
-". c #000000",
-"+ c #252525",
-"@ c #A8BA9E",
-"# c #B4C1AB",
-"$ c #909F86",
-"% c #484E43",
-"& c #A0AD94",
-"* c #9EAB91",
-"= c #94A08D",
-"- c #BFCCB7",
-"; c #A7B69B",
-"> c #BEC9B5",
-", c #353931",
-"' c #242622",
-") c #9BAA8F",
-"! c #9AA78E",
-"~ c #7C8672",
-"{ c #7C9674",
-"] c #B0C0AB",
-"^ c #CED6C8",
-"/ c #DAE1D6",
-"( c #98A58C",
-"_ c #5B6B57",
-": c #637354",
-"< c #748C6B",
-"[ c #94AA8D",
-"} c #8FA58A",
-"| c #6F8668",
-"1 c #667961",
-"2 c #5D6E58",
-"3 c #4D5A4B",
-"4 c #485245",
-"5 c #738B6E",
-"6 c #687B63",
-"7 c #576452",
-"8 c #495345",
-"9 c #4F5B4B",
-"0 c #3F453D",
-"a c #586953",
-"b c #C3CEBF",
-"c c #556550",
-"d c #879B83",
-"e c #424D40",
-"f c #84967F",
-"g c #414A3D",
-"h c #84957F",
-"i c #84957E",
-"j c #809A78",
-"k c #AEBDA9",
-"l c #879B81",
-"m c #83957E",
-"n c #4A5846",
-"o c #677A61",
-"p c #7D9775",
-"q c #7A9472",
-"r c #728A6B",
-"s c #5E7058",
-"t c #6D8267",
-"u c #697D64",
-" ",
-" ",
-" ...... ",
-" +.@#$%&*.. ",
-" .=-;>,'*)!~. ",
-" .{]^/*)!({_. ",
-" .:<[}{|1234. ",
-" .+567890+. ",
-" .a++++++6. ",
-" .abcdefg6. ",
-" .abcdehg6. ",
-" .abcdeig6. ",
-" .jkclemno. ",
-" .pqrstu. ",
-" ...... ",
-" "};
diff --git a/art/edit.xpm b/art/edit.xpm
deleted file mode 100644
index 28b8f090c4..0000000000
--- a/art/edit.xpm
+++ /dev/null
@@ -1,84 +0,0 @@
-/* XPM */
-static char * 16_edit_xpm[] = {
-"16 16 65 1",
-" c None",
-". c #000000",
-"+ c #FDFDFD",
-"@ c #E2E2E2",
-"# c #BAA88F",
-"$ c #836B4E",
-"% c #FEFEFE",
-"& c #FCFCFC",
-"* c #FBFBFB",
-"= c #E5E5E5",
-"- c #C5A985",
-"; c #DC9E55",
-"> c #9E6233",
-", c #FFFFFF",
-"' c #F2F2F2",
-") c #D9D9D9",
-"! c #E4E4E4",
-"~ c #C3A783",
-"{ c #DD9D53",
-"] c #A76631",
-"^ c #EEEEEE",
-"/ c #D4D4D4",
-"( c #FAFAFA",
-"_ c #7B7B7B",
-": c #C5AA88",
-"< c #A86631",
-"[ c #DCDCDC",
-"} c #F0F0F0",
-"| c #5E5E5E",
-"1 c #C3A47A",
-"2 c #DD9D52",
-"3 c #A66430",
-"4 c #D5D5D5",
-"5 c #6A6A6A",
-"6 c #C2A174",
-"7 c #DC9B4E",
-"8 c #A96630",
-"9 c #6E6E6E",
-"0 c #D8D8D8",
-"a c #D6D6D6",
-"b c #9F9F9F",
-"c c #BEA686",
-"d c #DD9D51",
-"e c #AA682F",
-"f c #F5F5F5",
-"g c #DDDDDD",
-"h c #F9F9F9",
-"i c #7A7A7A",
-"j c #BCAC9B",
-"k c #A86E3F",
-"l c #797979",
-"m c #F4F4F4",
-"n c #F3F3F3",
-"o c #DFDFDF",
-"p c #7C7C7C",
-"q c #4F4F4F",
-"r c #6C6C6C",
-"s c #EAEAEA",
-"t c #F8F8F8",
-"u c #F6F6F6",
-"v c #F7F7F7",
-"w c #EBEBEB",
-"x c #ECECEC",
-"y c #E0E0E0",
-"z c #E8E8E8",
-" .. .. ",
-" ..+@. .#$.",
-" ..%+&*=..-;>.",
-" ..,%+')*!.~{]. ",
-".,%%^/)*(_:{<. ",
-".%%)[**}|123. ",
-" .+'*}456789. ",
-" .&*0abcde.fg. ",
-" .((hijklfmno. ",
-" .(hpq.rfmnsg. ",
-" .tilufm^oo. ",
-" .vuufwoo.. ",
-" .uxyo.. ",
-" .zg.. ",
-" .. ",
-" "};
diff --git a/art/empty.xpm b/art/empty.xpm
deleted file mode 100644
index aca06618b1..0000000000
--- a/art/empty.xpm
+++ /dev/null
@@ -1,21 +0,0 @@
-/* XPM */
-static char * empty_xpm[] = {
-"16 16 2 1",
-" c None",
-". c #FFFFFF",
-" ",
-" ",
-" ",
-" ",
-" ",
-" ",
-" ",
-" ",
-" ",
-" ",
-" ",
-" ",
-" ",
-" ",
-" ",
-" "};
diff --git a/art/encrypt.xpm b/art/encrypt.xpm
deleted file mode 100644
index 636345ad9d..0000000000
--- a/art/encrypt.xpm
+++ /dev/null
@@ -1,80 +0,0 @@
-/* XPM */
-static char * 16_encrypt_xpm[] = {
-"16 16 61 1",
-" c None",
-". c #000000",
-"+ c #FDFDFD",
-"@ c #808080",
-"# c #FEFEFE",
-"$ c #8F8F8F",
-"% c #313131",
-"& c #CDB86D",
-"* c #EED680",
-"= c #FFFFFF",
-"- c #F2F2F2",
-"; c #343434",
-"> c #EEEEEE",
-", c #D4D4D4",
-"' c #D9D9D9",
-") c #3D3D3D",
-"! c #8D8D8D",
-"~ c #DCDCDC",
-"{ c #FBFBFB",
-"] c #B2B2B2",
-"^ c #3A3A3A",
-"/ c #A9A9A9",
-"( c #F0F0F0",
-"_ c #444444",
-": c #E4E9F1",
-"< c #B3C5D7",
-"[ c #AABDCE",
-"} c #A2B4C5",
-"| c #99ABBD",
-"1 c #8FA3B4",
-"2 c #3C5469",
-"3 c #FCFCFC",
-"4 c #D8D8D8",
-"5 c #D6D6D6",
-"6 c #6A6A6A",
-"7 c #BDCEE0",
-"8 c #8FAAC4",
-"9 c #819DB7",
-"0 c #7490AA",
-"a c #66839D",
-"b c #587690",
-"c c #314456",
-"d c #FAFAFA",
-"e c #F9F9F9",
-"f c #676767",
-"g c #DFDFDF",
-"h c #5F5F5F",
-"i c #F8F8F8",
-"j c #F7F7F7",
-"k c #696969",
-"l c #92A1B0",
-"m c #5E7081",
-"n c #556879",
-"o c #4C5F70",
-"p c #435668",
-"q c #394E5F",
-"r c #23313E",
-"s c #F6F6F6",
-"t c #7E7E7E",
-"u c #E8E8E8",
-"v c #DDDDDD",
-" ",
-" .. ",
-" ..+@... ",
-" ..#+$%&*&. ",
-" ..=#+-;&@. &. ",
-" .=##>,')*!. *. ",
-" .##'~{]^&!/.&..",
-" .+-{(_:<[}|12.",
-" .3{4567890abc.",
-" .ddef7890abc.",
-" .degh7890abc.",
-" .ijklmnopqr.",
-" .jsghkkt....",
-" .sssg.. ",
-" .uv.. ",
-" .. "};
diff --git a/art/envelope.png b/art/envelope.png
deleted file mode 100644
index 3e801181aa..0000000000
--- a/art/envelope.png
+++ /dev/null
Binary files differ
diff --git a/art/evo-16-address-conduit.png b/art/evo-16-address-conduit.png
deleted file mode 100644
index 18a2e5809e..0000000000
--- a/art/evo-16-address-conduit.png
+++ /dev/null
Binary files differ
diff --git a/art/evo-16-calendar-conduit.png b/art/evo-16-calendar-conduit.png
deleted file mode 100644
index dd8e8ab85e..0000000000
--- a/art/evo-16-calendar-conduit.png
+++ /dev/null
Binary files differ
diff --git a/art/evo-16-todo-conduit.png b/art/evo-16-todo-conduit.png
deleted file mode 100644
index d36d2c61fd..0000000000
--- a/art/evo-16-todo-conduit.png
+++ /dev/null
Binary files differ
diff --git a/art/evo-48-address-conduit.png b/art/evo-48-address-conduit.png
deleted file mode 100644
index 342a061088..0000000000
--- a/art/evo-48-address-conduit.png
+++ /dev/null
Binary files differ
diff --git a/art/evo-48-calendar-conduit.png b/art/evo-48-calendar-conduit.png
deleted file mode 100644
index bb0a49791e..0000000000
--- a/art/evo-48-calendar-conduit.png
+++ /dev/null
Binary files differ
diff --git a/art/evo-48-todo-conduit.png b/art/evo-48-todo-conduit.png
deleted file mode 100644
index dd4899e984..0000000000
--- a/art/evo-48-todo-conduit.png
+++ /dev/null
Binary files differ
diff --git a/art/evolution-calendar-mini.png b/art/evolution-calendar-mini.png
deleted file mode 100644
index 84c12aeabb..0000000000
--- a/art/evolution-calendar-mini.png
+++ /dev/null
Binary files differ
diff --git a/art/evolution-calendar.png b/art/evolution-calendar.png
deleted file mode 100644
index 1da3d4a727..0000000000
--- a/art/evolution-calendar.png
+++ /dev/null
Binary files differ
diff --git a/art/evolution-contacts-mini.png b/art/evolution-contacts-mini.png
deleted file mode 100644
index 5ddb92c1ce..0000000000
--- a/art/evolution-contacts-mini.png
+++ /dev/null
Binary files differ
diff --git a/art/evolution-contacts-plain.png b/art/evolution-contacts-plain.png
deleted file mode 100644
index 542a81a508..0000000000
--- a/art/evolution-contacts-plain.png
+++ /dev/null
Binary files differ
diff --git a/art/evolution-contacts.png b/art/evolution-contacts.png
deleted file mode 100644
index 42083ce300..0000000000
--- a/art/evolution-contacts.png
+++ /dev/null
Binary files differ
diff --git a/art/evolution-inbox-mini.png b/art/evolution-inbox-mini.png
deleted file mode 100644
index dbc20fcef1..0000000000
--- a/art/evolution-inbox-mini.png
+++ /dev/null
Binary files differ
diff --git a/art/evolution-inbox.png b/art/evolution-inbox.png
deleted file mode 100644
index 178cb7f860..0000000000
--- a/art/evolution-inbox.png
+++ /dev/null
Binary files differ
diff --git a/art/evolution-notes-mini.png b/art/evolution-notes-mini.png
deleted file mode 100644
index f5b5d776d0..0000000000
--- a/art/evolution-notes-mini.png
+++ /dev/null
Binary files differ
diff --git a/art/evolution-notes.png b/art/evolution-notes.png
deleted file mode 100644
index f82006b894..0000000000
--- a/art/evolution-notes.png
+++ /dev/null
Binary files differ
diff --git a/art/evolution-tasks-mini.png b/art/evolution-tasks-mini.png
deleted file mode 100644
index d23b5a0be7..0000000000
--- a/art/evolution-tasks-mini.png
+++ /dev/null
Binary files differ
diff --git a/art/evolution-tasks.png b/art/evolution-tasks.png
deleted file mode 100644
index b29a890c74..0000000000
--- a/art/evolution-tasks.png
+++ /dev/null
Binary files differ
diff --git a/art/evolution-today-mini.png b/art/evolution-today-mini.png
deleted file mode 100644
index 5736b9c8bb..0000000000
--- a/art/evolution-today-mini.png
+++ /dev/null
Binary files differ
diff --git a/art/evolution-today.png b/art/evolution-today.png
deleted file mode 100644
index 36839f4069..0000000000
--- a/art/evolution-today.png
+++ /dev/null
Binary files differ
diff --git a/art/evolution-trash-mini.png b/art/evolution-trash-mini.png
deleted file mode 100644
index a3260d718e..0000000000
--- a/art/evolution-trash-mini.png
+++ /dev/null
Binary files differ
diff --git a/art/evolution-trash.png b/art/evolution-trash.png
deleted file mode 100644
index c2ac8da173..0000000000
--- a/art/evolution-trash.png
+++ /dev/null
Binary files differ
diff --git a/art/evolution.png b/art/evolution.png
deleted file mode 100644
index 3b0f90b292..0000000000
--- a/art/evolution.png
+++ /dev/null
Binary files differ
diff --git a/art/executive-summary-bg.png b/art/executive-summary-bg.png
deleted file mode 100644
index fdcde6613d..0000000000
--- a/art/executive-summary-bg.png
+++ /dev/null
Binary files differ
diff --git a/art/executive-summary-curve.png b/art/executive-summary-curve.png
deleted file mode 100644
index 3ba42dd02b..0000000000
--- a/art/executive-summary-curve.png
+++ /dev/null
Binary files differ
diff --git a/art/fetch-mail.png b/art/fetch-mail.png
deleted file mode 100644
index 30cda0564d..0000000000
--- a/art/fetch-mail.png
+++ /dev/null
Binary files differ
diff --git a/art/filters.xpm b/art/filters.xpm
deleted file mode 100644
index f4a015e85c..0000000000
--- a/art/filters.xpm
+++ /dev/null
@@ -1,71 +0,0 @@
-/* XPM */
-static char * filters_xpm[] = {
-"16 16 52 1",
-" c None",
-". c #000000",
-"+ c #D1BB70",
-"@ c #DEC777",
-"# c #EBD37E",
-"$ c #D7C173",
-"% c #E2CB79",
-"& c #EAD27D",
-"* c #DFC877",
-"= c #DBC575",
-"- c #E3CC7A",
-"; c #E9D17D",
-"> c #E0CA78",
-", c #CEB96E",
-"' c #D4BF72",
-") c #C4B169",
-"! c #ECD47E",
-"~ c #D6C173",
-"{ c #C7B36B",
-"] c #E1CB79",
-"^ c #E5CE7B",
-"/ c #E4CD7A",
-"( c #C4B069",
-"_ c #EDD57F",
-": c #BDAA65",
-"< c #E9E9E9",
-"[ c #F8F8F8",
-"} c #FEFEFE",
-"| c #CAB66C",
-"1 c #B6A361",
-"2 c #E2B3A7",
-"3 c #EEBEB3",
-"4 c #FFFFFF",
-"5 c #FDFDFD",
-"6 c #F6F6F6",
-"7 c #E2C9C2",
-"8 c #F3F3F3",
-"9 c #F3C3B8",
-"0 c #F1C1B6",
-"a c #F5F5F5",
-"b c #BCA965",
-"c c #E5E5E5",
-"d c #F1F1F1",
-"e c #F2CDC5",
-"f c #F4F4F4",
-"g c #EBEBEB",
-"h c #DDDDDD",
-"i c #FBFBFB",
-"j c #EDEDED",
-"k c #E2E2E2",
-"l c #EFEFEF",
-"m c #E6E6E6",
-" ",
-" ",
-" ... ",
-" .+@#. ",
-" .$%#&*.",
-" .=-&;>,.",
-" .=-&&%').",
-" .@-&!-~{. ",
-" .]^#!/'(. ",
-" .%^#_%+:. ",
-" .<[}_-|1. ",
-" .23456,1. ",
-" .7890a<b. ",
-" cd5efgh. ",
-" i8jk. ",
-" lm. "};
diff --git a/art/find_contact.xpm b/art/find_contact.xpm
deleted file mode 100644
index 37d957b13b..0000000000
--- a/art/find_contact.xpm
+++ /dev/null
@@ -1,127 +0,0 @@
-/* XPM */
-static char * 24_find_contact_xpm[] = {
-"24 24 100 2",
-" c None",
-". c #000000",
-"+ c #BDBDBD",
-"@ c #FFFFFF",
-"# c #A3A3A3",
-"$ c #F8F8F8",
-"% c #C9B49B",
-"& c #8E7151",
-"* c #876E51",
-"= c #BAB1A5",
-"- c #FDFDFD",
-"; c #FBFBFB",
-"> c #EAE8E3",
-", c #F3F3F3",
-"' c #A88D6E",
-") c #DFD0BF",
-"! c #5E432B",
-"~ c #7E6C5B",
-"{ c #313131",
-"] c #575757",
-"^ c #FCFCFC",
-"/ c #555555",
-"( c #EEDFCC",
-"_ c #F4EEE6",
-": c #765E45",
-"< c #736251",
-"[ c #FAFAFA",
-"} c #7590AE",
-"| c #C1665A",
-"1 c #445B71",
-"2 c #D7D6D3",
-"3 c #ADADAD",
-"4 c #9B9B9B",
-"5 c #4B6983",
-"6 c #9DB8D2",
-"7 c #486481",
-"8 c #314E6C",
-"9 c #667A8D",
-"0 c #E0E0E0",
-"a c #BCBCBC",
-"b c #C5C5C5",
-"c c #5F7C96",
-"d c #5D7A95",
-"e c #4D6B87",
-"f c #3B556D",
-"g c #344A60",
-"h c #47473F",
-"i c #0A0A09",
-"j c #4B4B43",
-"k c #999999",
-"l c #34342E",
-"m c #9D9D8D",
-"n c #CFCFB9",
-"o c #C4C4AF",
-"p c #8D8D7F",
-"q c #353530",
-"r c #A2A2A2",
-"s c #D2D2D2",
-"t c #5D5D5D",
-"u c #46463F",
-"v c #9C9C8C",
-"w c #E2E2D0",
-"x c #EDEDE7",
-"y c #C0C0AC",
-"z c #B2B29F",
-"A c #828274",
-"B c #4C4C44",
-"C c #B9B9B9",
-"D c #D1CFC8",
-"E c #090908",
-"F c #D5D5BF",
-"G c #FBFBFA",
-"H c #C3C3AE",
-"I c #B5B5A2",
-"J c #A6A695",
-"K c #959586",
-"L c #080807",
-"M c #72706D",
-"N c #918E85",
-"O c #090909",
-"P c #CACAB5",
-"Q c #DDDDD0",
-"R c #B7B7A4",
-"S c #AAAA98",
-"T c #9B9B8B",
-"U c #8C8C7D",
-"V c #474740",
-"W c #929283",
-"X c #BABAA7",
-"Y c #ADAD9B",
-"Z c #9F9F8E",
-"` c #909081",
-" . c #727266",
-".. c #4C4C45",
-"+. c #34342F",
-"@. c #878779",
-"#. c #A0A090",
-"$. c #737367",
-"%. c #010101",
-"&. c #414141",
-" ",
-" ",
-" ",
-" . . . . . . . . . . . . . . ",
-" . + @ @ @ @ @ @ @ @ @ @ @ @ # . ",
-" . @ $ % & * = @ - @ ; @ @ @ > . ",
-" . @ , ' ) ! ~ @ { ] ^ / - @ > . ",
-" . @ , ( _ : < @ @ @ @ @ @ @ > . ",
-" . @ [ } | 1 2 @ 3 @ 4 3 @ @ > . ",
-" . @ 5 6 7 8 9 0 3 a b 0 @ @ > . ",
-" . @ c d e f g h i i j k b @ > . ",
-" . @ @ @ @ @ l m n o p q r s > . ",
-" . @ @ t @ u v w x y z A B C D . ",
-" . # > > > E F G H I J K L M N . ",
-" . . . . O P Q R S T U i . . ",
-" V W X Y Z ` ... ",
-" +.@.#.W $.%.%. ",
-" j i i &. %.%. ",
-" %.%.%. ",
-" %.%.%. ",
-" %.%.%. ",
-" %.%. ",
-" ",
-" "};
diff --git a/art/folder.xpm b/art/folder.xpm
deleted file mode 100644
index 4ef29bcad7..0000000000
--- a/art/folder.xpm
+++ /dev/null
@@ -1,73 +0,0 @@
-/* XPM */
-static char * folder_xpm[] = {
-"16 16 54 1",
-" c None",
-". c #000000",
-"+ c #E4E5DF",
-"@ c #D5D6CB",
-"# c #D6D7CA",
-"$ c #A3A39D",
-"% c #F5F6F0",
-"& c #ADB198",
-"* c #C2C6A9",
-"= c #C0C3A7",
-"- c #B4B89D",
-"; c #6D705F",
-"> c #EAECDB",
-", c #F6F6F4",
-"' c #EAECDA",
-") c #E8EAD8",
-"! c #E9EBDB",
-"~ c #E7E9D6",
-"{ c #E6E8D5",
-"] c #E5E8D4",
-"^ c #E4E7D2",
-"/ c #C7C9B6",
-"( c #F7F7F7",
-"_ c #DADEBF",
-": c #DADEBE",
-"< c #D8DCBC",
-"[ c #D6DBB9",
-"} c #D5D9B7",
-"| c #D3D7B4",
-"1 c #D1D6B2",
-"2 c #CFD4AF",
-"3 c #CDD2AD",
-"4 c #CBD1AA",
-"5 c #95997C",
-"6 c #F3F3EA",
-"7 c #F3F4EA",
-"8 c #CACFA8",
-"9 c #C8CDA5",
-"0 c #929778",
-"a c #F1F3E9",
-"b c #C6CCA3",
-"c c #C4CAA0",
-"d c #8F9474",
-"e c #F0F1E7",
-"f c #C2C89D",
-"g c #C1C79B",
-"h c #8D9270",
-"i c #EFF1E5",
-"j c #BFC598",
-"k c #EBECDE",
-"l c #C9CCB9",
-"m c #919576",
-"n c #8F9372",
-"o c #666951",
-" ",
-" ",
-" .... ",
-" .+@#$. ",
-" .%&*=-;....... ",
-" .>,>>')!~~{]^/.",
-" .(_:<[}|112345.",
-" .6_:<[}|112345.",
-" .7<[}|12334890.",
-" .a}|1234889bcd.",
-" .e123489bbcfgh.",
-" .i3489bcffgjjh.",
-" .k89bcfgjjjjjh.",
-" .l0mdnhhhhhhho.",
-" ............. ",
-" "};
diff --git a/art/forget_passwords.xpm b/art/forget_passwords.xpm
deleted file mode 100644
index a121300716..0000000000
--- a/art/forget_passwords.xpm
+++ /dev/null
@@ -1,125 +0,0 @@
-/* XPM */
-static char * forget_passwords_xpm[] = {
-"16 16 106 2",
-" c None",
-". c #010101",
-"+ c #C0B09D",
-"@ c #FEC6BC",
-"# c #FFCDB4",
-"$ c #C2A887",
-"% c #DCB9A8",
-"& c #AF843A",
-"* c #755C5C",
-"= c #655E37",
-"- c #DBBCAE",
-"; c #FFC4B8",
-"> c #FFCDBC",
-", c #DDBCA3",
-"' c #DBBEB5",
-") c #B9933A",
-"! c #D3AF84",
-"~ c #BE933A",
-"{ c #CDA86F",
-"] c #A3753F",
-"^ c #554F2E",
-"/ c #FFC5A3",
-"( c #FFFFE3",
-"_ c #D4B584",
-": c #DCBEB5",
-"< c #CDAE95",
-"[ c #E6BAA8",
-"} c #BDA897",
-"| c #CCA871",
-"1 c #B9841D",
-"2 c #CCAF95",
-"3 c #A8753F",
-"4 c #C4B29C",
-"5 c #E3B89E",
-"6 c #E6BEA8",
-"7 c #C89E58",
-"8 c #DCB5A0",
-"9 c #B5841D",
-"0 c #E6B593",
-"a c #BA9E58",
-"b c #B4841D",
-"c c #C79E58",
-"d c #3B250B",
-"e c #FFE5BE",
-"f c #F2C7B2",
-"g c #F3BE9E",
-"h c #C7B5A9",
-"i c #F3C8B9",
-"j c #C29E58",
-"k c #E6C2AE",
-"l c #BBAAB1",
-"m c #C7A887",
-"n c #BE9E58",
-"o c #6D572C",
-"p c #CDB6AC",
-"q c #E6BE9E",
-"r c #C7AE95",
-"s c #E6C3B5",
-"t c #DCB593",
-"u c #B9A073",
-"v c #CAA49D",
-"w c #AE841D",
-"x c #A6781B",
-"y c #BA8E51",
-"z c #B1813F",
-"A c #C6A871",
-"B c #DCBEAF",
-"C c #E6BEB5",
-"D c #D4B0AE",
-"E c #BDA058",
-"F c #AC761B",
-"G c #A77D3F",
-"H c #A06422",
-"I c #B59358",
-"J c #BDA187",
-"K c #D3B5A0",
-"L c #BD933A",
-"M c #B09960",
-"N c #BD9D60",
-"O c #AC8131",
-"P c #935511",
-"Q c #753F20",
-"R c #753D1D",
-"S c #D4AE84",
-"T c #B09264",
-"U c #BDA475",
-"V c #B48431",
-"W c #B08431",
-"X c #A86813",
-"Y c #975C16",
-"Z c #A06413",
-"` c #5C3D1D",
-" . c #A46A36",
-".. c #903801",
-"+. c #953D1D",
-"@. c #751801",
-"#. c #681601",
-"$. c #844116",
-"%. c #1D0101",
-"&. c #A0581D",
-"*. c #933A01",
-"=. c #A67531",
-"-. c #87581D",
-";. c #A86F1D",
-">. c #A1713A",
-",. c #B09358",
-" ",
-" . . . . . . ",
-" . . + @ # $ % & * . ",
-" = - ; > , ' ) ! ~ { ] . ",
-" ^ / ( _ : < [ } | 1 2 ) 3 . ",
-". 4 5 6 7 : 8 9 0 a 2 b c ~ d ",
-". e f g h i j k l m $ < n 1 o . ",
-". p q r s t b u v 2 c w c x y . ",
-" . z A B 1 ) C D $ E j F G H . ",
-" . I ~ J K L M 2 ~ N O P Q . ",
-" . . R S T U V W X Y Z . ",
-" ` ...+.@.#.$.. ",
-" . %.&.*.=. ",
-" . -.;.>. ",
-" . ` ,.. ",
-" . . . "};
diff --git a/art/forward.png b/art/forward.png
deleted file mode 100644
index 45ac85807b..0000000000
--- a/art/forward.png
+++ /dev/null
Binary files differ
diff --git a/art/forward.xpm b/art/forward.xpm
deleted file mode 100644
index 7d2d1457df..0000000000
--- a/art/forward.xpm
+++ /dev/null
@@ -1,51 +0,0 @@
-/* XPM */
-static char * 16_forward_xpm[] = {
-"16 16 32 1",
-" c None",
-". c #010101",
-"+ c #2F2F2F",
-"@ c #A7A4A0",
-"# c #FCFCFC",
-"$ c #64625F",
-"% c #FFFFFF",
-"& c #5D5B57",
-"* c #868580",
-"= c #E5E2DB",
-"- c #FBFBF8",
-"; c #716E6B",
-"> c #62605C",
-", c #F8F7F2",
-"' c #DDDAD4",
-") c #000000",
-"! c #FBFAF7",
-"~ c #A5A29D",
-"{ c #797873",
-"] c #BBC2CC",
-"^ c #576E87",
-"/ c #EFEFEF",
-"( c #CCCCCC",
-"_ c #7D7A77",
-": c #F7F5F1",
-"< c #FAF9F6",
-"[ c #314E6C",
-"} c #090808",
-"| c #D7D4CE",
-"1 c #D8D5CF",
-"2 c #181818",
-"3 c #090909",
-" ",
-" ",
-" ",
-" .+......... ",
-" .@#########$. ",
-" .%&%%%%%%%*=. ",
-" .%-;%%%%%>,'. ",
-" .%--;%)))))))))",
-" .%-!~;)%%%%%%%)",
-" .%!{--)%]^///()",
-" .%_-:<)%^[[/[()",
-" .}|111)%/[[[[()",
-" .....)%//[[[()",
-" )%/[[[[()",
-" )%((((((2",
-" ))3))))))"};
diff --git a/art/globe.png b/art/globe.png
deleted file mode 100644
index 84bebd7e9a..0000000000
--- a/art/globe.png
+++ /dev/null
Binary files differ
diff --git a/art/hide_deleted_messages.xpm b/art/hide_deleted_messages.xpm
deleted file mode 100644
index 189d8d350e..0000000000
--- a/art/hide_deleted_messages.xpm
+++ /dev/null
@@ -1,39 +0,0 @@
-/* XPM */
-static char * hide_deleted_messages_xpm[] = {
-"16 16 20 1",
-" c None",
-". c #828282",
-"+ c #A0A0A0",
-"@ c #AAAAAA",
-"# c #898989",
-"$ c #9A9A9A",
-"% c #8F8F8F",
-"& c #A9A9A9",
-"* c #A5A5A5",
-"= c #959595",
-"- c #A8A8A8",
-"; c #AEAEAE",
-"> c #B1B1B1",
-", c #B3B3B3",
-"' c #9B9B9B",
-") c #DF421E",
-"! c #000000",
-"~ c #B7B7B7",
-"{ c #ADADAD",
-"] c #AFAFAF",
-" ",
-" ",
-" ",
-" .. .+.@#$.. ",
-" .. ..%&$*=$ ",
-" .. .@.-;$#> ",
-" ",
-" .%.; .%, '. ) ",
-"!!!!!!!!!!!!! ))",
-" .~$. ... .. ) ",
-" ",
-" .+ .+.'% .+ ",
-" .{ .#%.] '& ",
-" .' .$;.% .. ",
-" ",
-" "};
diff --git a/art/hide_read_messages.xpm b/art/hide_read_messages.xpm
deleted file mode 100644
index 8df1313651..0000000000
--- a/art/hide_read_messages.xpm
+++ /dev/null
@@ -1,23 +0,0 @@
-/* XPM */
-static char * hide_read_messages_xpm[] = {
-"16 16 4 1",
-" c None",
-". c #000000",
-"+ c #DF421E",
-"@ c #828282",
-" ",
-" ",
-" ",
-" .. ....... ",
-" + ",
-" @ @@@ @@ @ ++",
-" + ",
-" ... .. ... ",
-" ",
-" ... . .... ",
-" + ",
-" @@ @@@ @@@ ++",
-" + ",
-" . ... .... ",
-" ",
-" "};
diff --git a/art/hide_selected_messages.xpm b/art/hide_selected_messages.xpm
deleted file mode 100644
index cb1989b84c..0000000000
--- a/art/hide_selected_messages.xpm
+++ /dev/null
@@ -1,33 +0,0 @@
-/* XPM */
-static char * hide_selected_messages_xpm[] = {
-"16 16 14 1",
-" c None",
-". c #4B6983",
-"+ c #DF421E",
-"@ c #FFFFFF",
-"# c #798FA2",
-"$ c #BEC8D0",
-"% c #F1F3F5",
-"& c #CDD5DC",
-"* c #A9B6C2",
-"= c #000000",
-"- c #647E94",
-"; c #A2B1BE",
-"> c #E4E8EC",
-", c #D8DEE4",
-" ",
-" ",
-" ",
-" ............ + ",
-" .@#$%%#@&*%. ++",
-" ............ + ",
-" ",
-" === == === ",
-" ",
-" === = ==== ",
-" ",
-" ............ + ",
-" .@%-@&@;>,%. ++",
-" ............ + ",
-" ",
-" "};
diff --git a/art/house.png b/art/house.png
deleted file mode 100644
index df43ec6181..0000000000
--- a/art/house.png
+++ /dev/null
Binary files differ
diff --git a/art/import.png b/art/import.png
deleted file mode 100644
index 151b60a270..0000000000
--- a/art/import.png
+++ /dev/null
Binary files differ
diff --git a/art/import.xpm b/art/import.xpm
deleted file mode 100644
index a996072772..0000000000
--- a/art/import.xpm
+++ /dev/null
@@ -1,59 +0,0 @@
-/* XPM */
-static char * 16_import_xpm[] = {
-"16 16 40 1",
-" c None",
-". c #000000",
-"+ c #A50B05",
-"@ c #A1A1A1",
-"# c #FFFFFF",
-"$ c #A7A7A7",
-"% c #980000",
-"& c #DBDBDB",
-"* c #9B9B9B",
-"= c #9C9C9C",
-"- c #E4E4E4",
-"; c #9F0502",
-"> c #A90F07",
-", c #D23618",
-"' c #AEAEAE",
-") c #A3A3A3",
-"! c #D83C1B",
-"~ c #E46243",
-"{ c #E87E64",
-"] c #2C2C2C",
-"^ c #9E8754",
-"/ c #6B5B39",
-"( c #826E46",
-"_ c #9E8655",
-": c #BFA367",
-"< c #DCCBA3",
-"[ c #99804F",
-"} c #D8C7A2",
-"| c #F0DBAC",
-"1 c #E4D3AF",
-"2 c #76520D",
-"3 c #865F10",
-"4 c #E1BB65",
-"5 c #D1940C",
-"6 c #906612",
-"7 c #7D5C14",
-"8 c #CF920B",
-"9 c #714F0C",
-"0 c #E2BE6C",
-"a c #7B560E",
-"....... + ",
-".@###$. %+ ",
-".&*#=-.%;>,, ",
-".'-$-). ++ ! ",
-"....... + ~ ",
-" { ",
-" ",
-" ......]. ",
-" .^/(_:<[. ",
-" .}||||123. ",
-" .45555567. ",
-" .45555567. ",
-" .45555567. ",
-" .45585569. ",
-" .055555a. ",
-" ........ "};
diff --git a/art/jump.xpm b/art/jump.xpm
deleted file mode 100644
index d974142d9a..0000000000
--- a/art/jump.xpm
+++ /dev/null
@@ -1,14 +0,0 @@
-/* XPM */
-static char * jump_xpm[] = {
-"16 8 3 1",
-" c None",
-". c #000000",
-"+ c #FFFF00",
-"................",
-".++++++++++++++.",
-".++++++++++++++.",
-".++..++..++..++.",
-".++..++..++..++.",
-".++++++++++++++.",
-".++++++++++++++.",
-"................"};
diff --git a/art/mail-new.xpm b/art/mail-new.xpm
deleted file mode 100644
index 767ec6366f..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 b4e3160ab4..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 06f4a7420a..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
--- a/art/malehead.png
+++ /dev/null
Binary files 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/marlboro_filters.xpm b/art/marlboro_filters.xpm
deleted file mode 100644
index 1af8d2d8a3..0000000000
--- a/art/marlboro_filters.xpm
+++ /dev/null
@@ -1,45 +0,0 @@
-/* XPM */
-static char * marlboro_filters_xpm[] = {
-"16 16 26 1",
-" c None",
-". c #000000",
-"+ c #7E7E7E",
-"@ c #B9B9B9",
-"# c #CACACA",
-"$ c #DF421E",
-"% c #A0A0A0",
-"& c #C8C8C8",
-"* c #E2E2E2",
-"= c #F2B8AB",
-"- c #8B2912",
-"; c #6F6F6F",
-"> c #C9C9C9",
-", c #FFFFFF",
-"' c #9E9E9E",
-") c #FDE6A1",
-"! c #999999",
-"~ c #B03417",
-"{ c #EDD57F",
-"] c #CBB76C",
-"^ c #C5B268",
-"/ c #FBE9E5",
-"( c #D09486",
-"_ c #B1B1B1",
-": c #8A8A8A",
-"< c #CF9F94",
-" ........... ",
-" .+@#######$.",
-" .++%&*****=$-",
-" .;+>,,,,,,$$.",
-" ............ ",
-" .')+)+)+)+. ",
-" .!)+)+)+)+~. ",
-" .${]{]{]$~~. ",
-" .${^{]{]$~~. ",
-" .$$$$$$$$~~. ",
-" .$$$/$$$$~~. ",
-" .$$/,/$$$~~. ",
-" .$/&,,/$$~(. ",
-" ./&_&:&/$<+. ",
-" .,*****,,+. ",
-" .......... "};
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/meeting_widget.png b/art/meeting_widget.png
deleted file mode 100644
index b1979a6e5c..0000000000
--- a/art/meeting_widget.png
+++ /dev/null
Binary files differ
diff --git a/art/monthview.xpm b/art/monthview.xpm
deleted file mode 100644
index 21c76151d5..0000000000
--- a/art/monthview.xpm
+++ /dev/null
@@ -1,34 +0,0 @@
-/* XPM */
-static char * monthview_xpm[] = {
-"24 24 7 1",
-" c None",
-". c #000000",
-"+ c #FFFFFF",
-"@ c #666666",
-"# c #919191",
-"$ c #F2F1ED",
-"% c #D8D8D4",
-"....................... ",
-".+++++++++++++++++++++. ",
-".+@@@@@@@@@@@@@@@@@@@#. ",
-".+@@@@@@@@@@@@@@@@@@@#. ",
-".+$$$#$$$#$$$#$$$#$$$#. ",
-".+$$$#$$$#$$$#$$$#$$$#. ",
-".+$$$#$$$#$$$#$$$#$$$#. ",
-".+####################. ",
-".+$$$#$$$#$$$#$$$#$$$#. ",
-".+$$$#$$$#$$$#$$$#$$$#. ",
-".+$$$#$$$#$$$#$$$#$$$#. ",
-".+$$$#$$$#$$$#$$$#$$$#. ",
-".+####################. ",
-".+$$$#$$$#$$$#$$$#$$$#. ",
-".+$$$#$$$#$$$#$$$#$$$#. ",
-".+$$$#$$$#$$$#$$$#$$$#. ",
-".+$$$#$$$#$$$#$$$#$$$#. ",
-".+####################. ",
-".+$$$#$$$#$$$#$$$#$$$#. ",
-".+$$$#$$$#$$$#$$$#$$$#. ",
-".+$$$#$$$#$$$#$$$#$$$#. ",
-".%###################@. ",
-"....................... ",
-" "};
diff --git a/art/move-message.png b/art/move-message.png
deleted file mode 100644
index 143cea1a93..0000000000
--- a/art/move-message.png
+++ /dev/null
Binary files differ
diff --git a/art/move_message.xpm b/art/move_message.xpm
deleted file mode 100644
index 846febbe49..0000000000
--- a/art/move_message.xpm
+++ /dev/null
@@ -1,59 +0,0 @@
-/* XPM */
-static char * 16_move_message_xpm[] = {
-"16 16 40 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 #F6F4F1",
-") c #81807C",
-"! c #E5E3DE",
-"~ c #000000",
-"{ c #928F8B",
-"] c #FBFBFA",
-"^ c #F7F5F2",
-"/ c #F5F3F0",
-"( c #F7F6F4",
-"_ c #B5B2AC",
-": c #A09C97",
-"< c #F0EFEB",
-"[ c #E4E2DD",
-"} c #AEABA6",
-"| c #92908B",
-"1 c #E8E6E1",
-"2 c #B0ADA7",
-"3 c #F7F6F2",
-"4 c #F5F4F0",
-"5 c #6B6A68",
-"6 c #83817E",
-"7 c #E1DFDA",
-"8 c #E2DFD9",
-"9 c #E2E0DB",
-"0 c #E3E1DC",
-"a c #E6E4DF",
-" ",
-" . . . . . . ",
-". . ",
-" ",
-". . ",
-" .+......... ",
-". .@#########$.",
-" .#%&*#*=*-;>.",
-". .#*,=*=*')'!.",
-" ~ .#**{]*^)*/!.",
-" .#*(_)#):-<[.",
-" .#(}**)^^|1[.",
-" .#2*/34^/>51.",
-" .678887990a$.",
-" ........... ",
-" "};
diff --git a/art/new-message.xpm b/art/new-message.xpm
deleted file mode 100644
index add4263a4d..0000000000
--- a/art/new-message.xpm
+++ /dev/null
@@ -1,38 +0,0 @@
-/* XPM */
-static char * new_message_xpm[] = {
-"16 16 19 1",
-" c None",
-". c #000000",
-"+ c #FDFDFD",
-"@ c #E2E2E2",
-"# c #FEFEFE",
-"$ c #FCFCFC",
-"% c #FBFBFB",
-"& c #FFFFFF",
-"* c #E4E4E4",
-"= c #E0E0E0",
-"- c #FAFAFA",
-"; c #F9F9F9",
-"> c #F8F8F8",
-", c #F7F7F7",
-"' c #F5F5F5",
-") c #F4F4F4",
-"! c #DFDFDF",
-"~ c #E8E8E8",
-"{ c #DDDDDD",
-" ",
-" .. ",
-" ..+@. ",
-" ..#+$%. ",
-" ..&####%*. ",
-" .&####==-;. ",
-" .###==###>*. ",
-" .+####==,'. ",
-" .$%#==###'*. ",
-" .--###=='). ",
-" .-;#==####*. ",
-" .>######!!. ",
-" .,####!!.. ",
-" .##=!.. ",
-" .~{.. ",
-" .. "};
diff --git a/art/new_appointment.png b/art/new_appointment.png
deleted file mode 100644
index 25d646a2ab..0000000000
--- a/art/new_appointment.png
+++ /dev/null
Binary files differ
diff --git a/art/new_appointment.xpm b/art/new_appointment.xpm
deleted file mode 100644
index 1ea92007bc..0000000000
--- a/art/new_appointment.xpm
+++ /dev/null
@@ -1,123 +0,0 @@
-/* XPM */
-static char * new_appointment_xpm[] = {
-"16 16 104 2",
-" c None",
-". c #000000",
-"+ c #615F59",
-"@ c #DEDAC1",
-"# c #76705A",
-"$ c #5E574A",
-"% c #595244",
-"& c #575143",
-"* c #5E594B",
-"= c #D1D0CF",
-"- c #4B4126",
-"; c #F6F2D6",
-"> c #F2E363",
-", c #746B4F",
-"' c #787266",
-") c #888379",
-"! c #FCF9DA",
-"~ c #D4BA38",
-"{ c #F7EE93",
-"] c #F9EF76",
-"^ c #FAF2A2",
-"/ c #FBF5B2",
-"( c #FAF293",
-"_ c #E8D247",
-": c #C4BA88",
-"< c #F1E259",
-"[ c #DEC956",
-"} c #E2D181",
-"| c #E2D283",
-"1 c #DACA74",
-"2 c #E0D07F",
-"3 c #E1D288",
-"4 c #F4F1DD",
-"5 c #F9F2BA",
-"6 c #917421",
-"7 c #F7EE9C",
-"8 c #DEC952",
-"9 c #F5F1E0",
-"0 c #FCFCFC",
-"a c #727270",
-"b c #FAFAF9",
-"c c #F9F9F8",
-"d c #FCFCF9",
-"e c #CEB538",
-"f c #FAF4AC",
-"g c #E0CF70",
-"h c #262626",
-"i c #FCFBF9",
-"j c #E5D048",
-"k c #FBF5B6",
-"l c #DFCE70",
-"m c #F7F6F6",
-"n c #FBFBFB",
-"o c #262625",
-"p c #F1EFEE",
-"q c #EDDB4F",
-"r c #FBF5B8",
-"s c #DFCE6F",
-"t c #FBFAFA",
-"u c #FBFBFA",
-"v c #5F5F5E",
-"w c #CBCBC9",
-"x c #F6F5F4",
-"y c #FBF5B3",
-"z c #DECD6F",
-"A c #FAF9F9",
-"B c #615F5E",
-"C c #D0CFCB",
-"D c #FBFBF9",
-"E c #E8D44B",
-"F c #F7EFA4",
-"G c #DDC851",
-"H c #F0EBD6",
-"I c #F8F8F6",
-"J c #ECEBE9",
-"K c #FCFBF7",
-"L c #D7BF3C",
-"M c #C4BA8C",
-"N c #F2E35A",
-"O c #F3ECC0",
-"P c #FCFCFB",
-"Q c #FCFCFA",
-"R c #F9F4BD",
-"S c #8E7021",
-"T c #F7F1B9",
-"U c #F4E559",
-"V c #EFDD51",
-"W c #F0DF57",
-"X c #F8EE81",
-"Y c #E3CB43",
-"Z c #F6F2D7",
-"` c #E4CE43",
-" . c #5E4B1E",
-".. c #51431D",
-"+. c #68572D",
-"@. c #F8F2C3",
-"#. c #D1B635",
-"$. c #3B2D0C",
-"%. c #907427",
-"&. c #59513C",
-"*. c #454134",
-"=. c #514B3B",
-"-. c #9D8C4E",
-";. c #31270C",
-" . . . . . . . . . ",
-" . + @ # $ % & * = - . ",
-" . ; > , ' ' ' ) ! ~ . ",
-" . { ] ^ / / / / ( _ . ",
-" . : < [ } | 1 2 3 4 5 6 . ",
-" . 7 8 9 0 0 a b c b d e . ",
-" . f g 0 0 0 h b c b i j . . ",
-" . k l m b n o b b p i q q . ",
-" . r s t t u v w x x i q q . ",
-" . y z A b A b B C x D E . . ",
-" . F G H I b J b b c K L . ",
-" . M N O n P c n n Q R S . ",
-" . T U V V V V W X Y . ",
-" . Z ` .......+.@.#.. ",
-" . $.%.&.*.*.*.=.-.;.. ",
-" . . . . . . . . . "};
diff --git a/art/new_contact.xpm b/art/new_contact.xpm
deleted file mode 100644
index 08742387dd..0000000000
--- a/art/new_contact.xpm
+++ /dev/null
@@ -1,137 +0,0 @@
-/* XPM */
-static char * 24_new_contact_xpm[] = {
-"24 24 110 2",
-" c None",
-". c #000000",
-"+ c #030303",
-"@ c #0F0F0F",
-"# c #1B1B1B",
-"$ c #272727",
-"% c #333333",
-"& c #404040",
-"* c #4C4C4C",
-"= c #585858",
-"- c #646464",
-"; c #707070",
-"> c #7C7C7C",
-", c #888888",
-"' c #949494",
-") c #BDBDBD",
-"! c #FFFFFF",
-"~ c #DBDBDB",
-"{ c #A9A9A9",
-"] c #F8F8F8",
-"^ c #CFBDA7",
-"/ c #A18A6F",
-"( c #A18E77",
-"_ c #CCC6BD",
-": c #FDFDFD",
-"< c #FCFCFC",
-"[ c #F7F6F5",
-"} c #B1B1B1",
-"| c #050505",
-"1 c #F4F4F4",
-"2 c #B59F85",
-"3 c #E5D9CC",
-"4 c #877261",
-"5 c #A4988C",
-"6 c #828282",
-"7 c #A1A1A1",
-"8 c #FEFEFE",
-"9 c #F8F7F6",
-"0 c #BABABA",
-"a c #0E0E0E",
-"b c #F1E5D6",
-"c c #F6F2EC",
-"d c #9D8C7A",
-"e c #A2968B",
-"f c #F8F8F6",
-"g c #C2C2C2",
-"h c #161616",
-"i c #FAFAFA",
-"j c #94A9C0",
-"k c #D29087",
-"l c #808F9E",
-"m c #E5E5E3",
-"n c #D3D3D3",
-"o c #DEDEDE",
-"p c #CBCBCB",
-"q c #1F1F1F",
-"r c #71899D",
-"s c #B6CADD",
-"t c #8094A8",
-"u c #7A8DA0",
-"v c #A3AFBB",
-"w c #EED886",
-"x c #D4D4D4",
-"y c #879CB0",
-"z c #8DA1B4",
-"A c #8A9EB0",
-"B c #8797A6",
-"C c #8D99A5",
-"D c #CFCFCF",
-"E c #D5D5D5",
-"F c #EEDC96",
-"G c #ECECEC",
-"H c #F2E2A6",
-"I c #DCDCDC",
-"J c #EFDA8D",
-"K c #303030",
-"L c #F9F1D5",
-"M c #E5E5E5",
-"N c #393939",
-"O c #989898",
-"P c #A7A7A7",
-"Q c #F0F0F0",
-"R c #F8F1D4",
-"S c #EEEEEE",
-"T c #414141",
-"U c #BEBEBE",
-"V c #F1F0EC",
-"W c #F2F1EE",
-"X c #F3F2EF",
-"Y c #F4F3F0",
-"Z c #F5F4F2",
-"` c #F6F5F3",
-" . c #F7F6F4",
-".. c #F9F8F7",
-"+. c #FAF9F8",
-"@. c #FBFAFA",
-"#. c #565656",
-"$. c #626262",
-"%. c #6E6E6E",
-"&. c #7A7A7A",
-"*. c #868686",
-"=. c #929292",
-"-. c #9E9E9E",
-";. c #AAAAAA",
-">. c #EED98A",
-",. c #F5E8B9",
-"'. c #EED682",
-"). c #F0DC94",
-"!. c #EFDB90",
-"~. c #F0DE99",
-" ",
-" ",
-" ",
-" ",
-" . + @ # $ % & * = - ; > , ' ",
-" . ) ! ! ! ! ! ! ! ! ! ! ! ! ~ { ",
-" . ! ] ^ / ( _ ! : ! < ! ! ! [ } ",
-" | ! 1 2 3 4 5 ! 6 7 : } 8 ! 9 0 ",
-" a ! 1 b c d e ! ! ! ! ! ! ! f g ",
-" h ! i j k l m ! n ! n o ! ! ! p ",
-" q ! r s t u v ! ! ! ! ! ! ! w x ",
-" $ ! y z A B C ! D E F G ! ! H I J ",
-" K ! ! ! ! ! ! ! ! ! ! ! ! ! L M ",
-" N ! ! O ! P ! g ! ~ ! Q R ! ! S L ",
-" T U V W X Y Z ` .9 ..+.@.! ! ! ",
-" #.$.%.&.*.=.-.;.>.,.L ! ! ! ! ! L H '.",
-" ! ! ! ",
-" L ! L ",
-" L ",
-" ). ,. !. ",
-" ~. ",
-" ",
-" ",
-" "};
diff --git a/art/pin.png b/art/pin.png
deleted file mode 100644
index fff34d7d96..0000000000
--- a/art/pin.png
+++ /dev/null
Binary files differ
diff --git a/art/print-preview.xpm b/art/print-preview.xpm
deleted file mode 100644
index b48f2a6c6c..0000000000
--- a/art/print-preview.xpm
+++ /dev/null
@@ -1,95 +0,0 @@
-/* XPM */
-static char * print_preview_xpm[] = {
-"16 16 76 1",
-" c None",
-". c #000000",
-"+ c #9D9D8D",
-"@ c #CFCFB9",
-"# c #C4C4AF",
-"$ c #8D8D7F",
-"% c #353530",
-"& c #828282",
-"* c #B5B5B5",
-"= c #9C9C8C",
-"- c #E2E2D0",
-"; c #EDEDE7",
-"> c #C0C0AC",
-", c #B2B29F",
-"' c #828274",
-") c #4C4C44",
-"! c #C9C9C9",
-"~ c #D9D9D9",
-"{ c #E4E4E4",
-"] c #090908",
-"^ c #D5D5BF",
-"/ c #FBFBFA",
-"( c #C3C3AE",
-"_ c #B5B5A2",
-": c #A6A695",
-"< c #959586",
-"[ c #080807",
-"} c #ECECEC",
-"| c #FEFEFE",
-"1 c #F1F1F1",
-"2 c #E5E5E5",
-"3 c #D7D7D7",
-"4 c #090909",
-"5 c #CACAB5",
-"6 c #DDDDD0",
-"7 c #B7B7A4",
-"8 c #AAAA98",
-"9 c #9B9B8B",
-"0 c #8C8C7D",
-"a c #0A0A09",
-"b c #FFFFFF",
-"c c #E3E3E3",
-"d c #929283",
-"e c #BABAA7",
-"f c #ADAD9B",
-"g c #9F9F8E",
-"h c #909081",
-"i c #727266",
-"j c #4C4C45",
-"k c #FCFCFC",
-"l c #EBEBEB",
-"m c #34342F",
-"n c #878779",
-"o c #A0A090",
-"p c #737367",
-"q c #010101",
-"r c #717171",
-"s c #DADADA",
-"t c #E8E8E8",
-"u c #F0F0F0",
-"v c #D1D1D1",
-"w c #4B4B43",
-"x c #414141",
-"y c #DCDCDC",
-"z c #CACACA",
-"A c #8A8A8A",
-"B c #C0C0C0",
-"C c #E36548",
-"D c #DBDBDB",
-"E c #5B5B5B",
-"F c #B3B3B3",
-"G c #EED684",
-"H c #EED683",
-"I c #707070",
-"J c #A4A4A4",
-"K c #585858",
-" .... . ",
-" .+@#$%&*.. ",
-" .=-;>,')!~{.. ",
-" ]^/(_:<[}|123..",
-" 4567890abbbb1c.",
-" .defghijkbbbl. ",
-"..mnodpqrstub. ",
-".vvwaax.qqy.zy..",
-".vvvucyyqqqyAAA.",
-".vBbCuuDyqqqAAE.",
-".vvFbGHAvAqqqIE.",
-"..vvBJAAvAEqqAE.",
-" ..vvvvvAEAEA..",
-" ..vvvAKA.. ",
-" ..vA.. ",
-" .. "};
diff --git a/art/print.xpm b/art/print.xpm
deleted file mode 100644
index 2ca7aa1e8f..0000000000
--- a/art/print.xpm
+++ /dev/null
@@ -1,54 +0,0 @@
-/* XPM */
-static char * 16_print_xpm[] = {
-"16 16 35 1",
-" c None",
-". c #000000",
-"+ c #DCDCDC",
-"@ c #F8F8F8",
-"# c #F1F1F1",
-"$ c #E8E8E8",
-"% c #E4E4E4",
-"& c #FFFFFF",
-"* c #E5E5E5",
-"= c #D7D7D7",
-"- c #D2D2D2",
-"; c #E3E3E3",
-"> c #979797",
-", c #F2F2F2",
-"' c #FCFCFC",
-") c #EBEBEB",
-"! c #939393",
-"~ c #B8B8B8",
-"{ c #DADADA",
-"] c #F0F0F0",
-"^ c #D1D1D1",
-"/ c #A7A7A7",
-"( c #CACACA",
-"_ c #B9B9B9",
-": c #8A8A8A",
-"< c #C0C0C0",
-"[ c #E36548",
-"} c #DBDBDB",
-"| c #5B5B5B",
-"1 c #B3B3B3",
-"2 c #EED684",
-"3 c #EED683",
-"4 c #707070",
-"5 c #A4A4A4",
-"6 c #585858",
-" . ",
-" .+.. ",
-" .@#$%.. ",
-" .&&&&#*=.. ",
-" .-@&&&&&#;. ",
-" ..+>*,'&&&). ",
-"..++..!~{$]&.. ",
-".^^+++..!/.(++..",
-".^^^];++._^+:::.",
-".^<&[]]}++::::|.",
-".^^1&23:^:::|4|.",
-"..^^<5::^:|4|:|.",
-" ..^^^^^:|:|:..",
-" ..^^^:6:.. ",
-" ..^:.. ",
-" .. "};
diff --git a/art/priority-high.xpm b/art/priority-high.xpm
deleted file mode 100644
index 884c8b8236..0000000000
--- a/art/priority-high.xpm
+++ /dev/null
@@ -1,22 +0,0 @@
-/* XPM */
-static char * priority_high_xpm[] = {
-"16 16 3 1",
-" c None",
-". c #FFFFFF",
-"X c #A7453E",
-" ",
-" ",
-" . ",
-" .X. ",
-" .XXX. ",
-" .XXX. ",
-" .XXX. ",
-" .XX. ",
-" .XX. ",
-" .X. ",
-" .. ",
-" .XX. ",
-" .XX. ",
-" .. ",
-" ",
-" "};
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/art/recur.xpm b/art/recur.xpm
deleted file mode 100644
index bb34fa4568..0000000000
--- a/art/recur.xpm
+++ /dev/null
@@ -1,21 +0,0 @@
-/* XPM */
-static char * recur_xpm[] = {
-"16 16 2 1",
-" c None",
-". c #333366",
-" ",
-" ",
-" .. ..... ",
-" ... .... ",
-" .. .... ",
-" .. ..... ",
-" .. . .. ",
-" .. .. ",
-" .. . .. ",
-" ..... .. ",
-" .... .. ",
-" .... ... ",
-" ..... .. ",
-" ",
-" ",
-" "};
diff --git a/art/reply-to-all.png b/art/reply-to-all.png
deleted file mode 100644
index 6f42de1de0..0000000000
--- a/art/reply-to-all.png
+++ /dev/null
Binary files differ
diff --git a/art/reply.png b/art/reply.png
deleted file mode 100644
index cc8be8511f..0000000000
--- a/art/reply.png
+++ /dev/null
Binary files differ
diff --git a/art/reply.xpm b/art/reply.xpm
deleted file mode 100644
index 059d3ebc12..0000000000
--- a/art/reply.xpm
+++ /dev/null
@@ -1,46 +0,0 @@
-/* XPM */
-static char * 16_reply_xpm[] = {
-"16 16 27 1",
-" c None",
-". c #010101",
-"+ c #2F2F2F",
-"@ c #A7A4A0",
-"# c #FCFCFC",
-"$ c #64625F",
-"% c #FFFFFF",
-"& c #5D5B57",
-"* c #868580",
-"= c #E5E2DB",
-"- c #FBFBF8",
-"; c #716E6B",
-"> c #000000",
-", c #FBFAF7",
-"' c #A5A29D",
-") c #990000",
-"! c #EFEFEF",
-"~ c #CCCCCC",
-"{ c #797873",
-"] c #7D7A77",
-"^ c #F7F5F1",
-"/ c #090808",
-"( c #D7D4CE",
-"_ c #D8D5CF",
-": c #7F0000",
-"< c #181818",
-"[ c #090909",
-" ",
-" ",
-" ",
-" .+......... ",
-" .@#########$. ",
-" .%&%%%%%%%*=. ",
-" .%-;%>>>>>>>>> ",
-" .%--;>%%%%%%%> ",
-" .%-,'>%))))!~> ",
-" .%,{->%)))!!~> ",
-" .%]-^>%))))!~> ",
-" ./(__>%)!)):~> ",
-" ....>%!!!::~> ",
-" >%~~~~~~< ",
-" >>[>>>>>> ",
-" "};
diff --git a/art/reply_to_all.xpm b/art/reply_to_all.xpm
deleted file mode 100644
index 0c0a00e020..0000000000
--- a/art/reply_to_all.xpm
+++ /dev/null
@@ -1,52 +0,0 @@
-/* XPM */
-static char * 16_reply_to_all_xpm[] = {
-"16 16 33 1",
-" c None",
-". c #010101",
-"+ c #2F2F2F",
-"@ c #A7A4A0",
-"# c #FCFCFC",
-"$ c #64625F",
-"% c #FFFFFF",
-"& c #5D5B57",
-"* c #868580",
-"= c #E5E2DB",
-"- c #FBFBF8",
-"; c #716E6B",
-"> c #62605C",
-", c #F8F7F2",
-"' c #DDDAD4",
-") c #F7F5F1",
-"! c #FBFAF7",
-"~ c #A5A29D",
-"{ c #000000",
-"] c #797873",
-"^ c #7D7A77",
-"/ c #FAF9F6",
-"( c #F8F6F2",
-"_ c #990000",
-": c #EFEFEF",
-"< c #CCCCCC",
-"[ c #090808",
-"} c #D7D4CE",
-"| c #D8D5CF",
-"1 c #D6D3CD",
-"2 c #7F0000",
-"3 c #181818",
-"4 c #090909",
-" ",
-" ",
-" .+......... ",
-".@#########$. ",
-".%&%%%%%%%*=.. ",
-".%-;%%%%%>,'.$. ",
-".%--;%%%;-)'.=. ",
-".%-!~;-{{{{{{{{{",
-".%!]--;{%%%%%%%{",
-".%^-)/({%____:<{",
-".[}|||1{%___::<{",
-" ......{%____:<{",
-" .[}||{%_:__2<{",
-" ....{%:::22<{",
-" {%<<<<<<3",
-" {{4{{{{{{"};
diff --git a/art/save.xpm b/art/save.xpm
deleted file mode 100644
index 7b1812943e..0000000000
--- a/art/save.xpm
+++ /dev/null
@@ -1,45 +0,0 @@
-/* XPM */
-static char * 16_save_xpm[] = {
-"16 16 26 1",
-" c None",
-". c #000000",
-"+ c #B8CADB",
-"@ c #C5D4E3",
-"# c #687B8D",
-"$ c #D8D8D8",
-"% c #CFDBE6",
-"& c #9DB8D2",
-"* c #728699",
-"= c #BCCEDF",
-"- c #FFFFFF",
-"; c #D2DEEA",
-"> c #C0D1E2",
-", c #CFDBE7",
-"' c #798EA3",
-") c #D0DDE9",
-"! c #B7CBDE",
-"~ c #B6CADD",
-"{ c #B7CADD",
-"] c #BACCDF",
-"^ c #9FB9D3",
-"/ c #7E94A9",
-"( c #A4BDD5",
-"_ c #BABABA",
-": c #556474",
-"< c #2A303A",
-" ",
-" ",
-" ............ ",
-" .+@#$$$$$$%&*. ",
-" .=&#------;&*. ",
-" .>&#$$$$$$,&*. ",
-" .>&'------)&*. ",
-" .>&&!~~{{]^&*. ",
-" .>&&&&&&&&&&*. ",
-" .>&&//////&&*. ",
-" .>(/$$_$-$/&*. ",
-" .>&/$_$-/$/&*. ",
-" .>&/$_-$/$/&*. ",
-" .=&/_$-$$$/**. ",
-" .:........<. ",
-" "};
diff --git a/art/score-high.xpm b/art/score-high.xpm
deleted file mode 100644
index bb7bd47562..0000000000
--- a/art/score-high.xpm
+++ /dev/null
@@ -1,26 +0,0 @@
-/* XPM */
-static char * score_high_xpm[] = {
-"16 16 7 1",
-" c None",
-". c #BCBCBC",
-"+ c #00FF00",
-"@ c #000000",
-"# c #17D1EA",
-"$ c #FFFFFF",
-"% c #EF9815",
-" ",
-" .+ ",
-" @@@ .++ ",
-" @#@#@ .++ ",
-" @$%$@ .++ ",
-" @$$$@ . + ",
-" @@$@@ . ",
-" @@$$$@@ . ",
-" @@$$$$$@@@@ ",
-" @@$$$$$@@ . ",
-" @@$$$$$@ . ",
-" @@$$$$$@ . ",
-" @$$$$$@ . ",
-" %%$%% . ",
-" %% %% . ",
-" "};
diff --git a/art/score-higher.xpm b/art/score-higher.xpm
deleted file mode 100644
index 696e74bed5..0000000000
--- a/art/score-higher.xpm
+++ /dev/null
@@ -1,26 +0,0 @@
-/* XPM */
-static char * score_higher_xpm[] = {
-"16 16 7 1",
-" c None",
-". c #BCBCBC",
-"+ c #00FF00",
-"@ c #000000",
-"# c #17D1EA",
-"$ c #FFFFFF",
-"% c #EF9815",
-" ",
-" .++ ",
-" @@@ .++++",
-" @#@#@ .++++",
-" @$%$@ .++++",
-" @$$$@ . ++",
-" @@$@@ . ",
-" @@$$$@@ . ",
-" @@$$$$$@@@@ ",
-" @@$$$$$@@ . ",
-" @@$$$$$@ . ",
-" @@$$$$$@ . ",
-" @$$$$$@ . ",
-" %%$%% . ",
-" %% %% . ",
-" "};
diff --git a/art/score-highest.xpm b/art/score-highest.xpm
deleted file mode 100644
index d8dab65079..0000000000
--- a/art/score-highest.xpm
+++ /dev/null
@@ -1,26 +0,0 @@
-/* XPM */
-static char * score_highest_xpm[] = {
-"16 16 7 1",
-" c None",
-". c #BCBCBC",
-"+ c #00FF00",
-"@ c #000000",
-"# c #17D1EA",
-"$ c #FFFFFF",
-"% c #EF9815",
-" ",
-" .++++",
-" @@@ .++++",
-" @#@#@ .++++",
-" @$%$@ .++++",
-" @$$$@ . ",
-" @@$@@ . ",
-" @@$$$@@ . ",
-" @@$$$$$@@@@ ",
-" @@$$$$$@@ . ",
-" @@$$$$$@ . ",
-" @@$$$$$@ . ",
-" @$$$$$@ . ",
-" %%$%% . ",
-" %% %% . ",
-" "};
diff --git a/art/score-low.xpm b/art/score-low.xpm
deleted file mode 100644
index e071741adc..0000000000
--- a/art/score-low.xpm
+++ /dev/null
@@ -1,26 +0,0 @@
-/* XPM */
-static char * score_low_xpm[] = {
-"16 16 7 1",
-" c None",
-". c #BCBCBC",
-"+ c #FF0000",
-"@ c #000000",
-"# c #17D1EA",
-"$ c #FFFFFF",
-"% c #EF9815",
-" ",
-" .+ ",
-" @@@ .++ ",
-" @#@#@ .++ ",
-" @$%$@ .++ ",
-" @$$$@ . + ",
-" @@$@@ . ",
-" @@$$$@@ . ",
-" @@$$$$$@@@@ ",
-" @@$$$$$@@ . ",
-" @@$$$$$@ . ",
-" @@$$$$$@ . ",
-" @$$$$$@ . ",
-" %%$%% . ",
-" %% %% . ",
-" "};
diff --git a/art/score-lower.xpm b/art/score-lower.xpm
deleted file mode 100644
index 74da90d670..0000000000
--- a/art/score-lower.xpm
+++ /dev/null
@@ -1,26 +0,0 @@
-/* XPM */
-static char * score_lower_xpm[] = {
-"16 16 7 1",
-" c None",
-". c #BCBCBC",
-"+ c #FF0000",
-"@ c #000000",
-"# c #17D1EA",
-"$ c #FFFFFF",
-"% c #EF9815",
-" ",
-" .++ ",
-" @@@ .++++",
-" @#@#@ .++++",
-" @$%$@ .++++",
-" @$$$@ . ++",
-" @@$@@ . ",
-" @@$$$@@ . ",
-" @@$$$$$@@@@ ",
-" @@$$$$$@@ . ",
-" @@$$$$$@ . ",
-" @@$$$$$@ . ",
-" @$$$$$@ . ",
-" %%$%% . ",
-" %% %% . ",
-" "};
diff --git a/art/score-lowest.xpm b/art/score-lowest.xpm
deleted file mode 100644
index 9beee1849f..0000000000
--- a/art/score-lowest.xpm
+++ /dev/null
@@ -1,26 +0,0 @@
-/* XPM */
-static char * score_lowest_xpm[] = {
-"16 16 7 1",
-" c None",
-". c #BCBCBC",
-"+ c #FF0000",
-"@ c #000000",
-"# c #17D1EA",
-"$ c #FFFFFF",
-"% c #EF9815",
-" ",
-" .++++",
-" @@@ .++++",
-" @#@#@ .++++",
-" @$%$@ .++++",
-" @$$$@ . ",
-" @@$@@ . ",
-" @@$$$@@ . ",
-" @@$$$$$@@@@ ",
-" @@$$$$$@@ . ",
-" @@$$$$$@ . ",
-" @@$$$$$@ . ",
-" @$$$$$@ . ",
-" %%$%% . ",
-" %% %% . ",
-" "};
diff --git a/art/score-normal.xpm b/art/score-normal.xpm
deleted file mode 100644
index 82b618cb8d..0000000000
--- a/art/score-normal.xpm
+++ /dev/null
@@ -1,24 +0,0 @@
-/* XPM */
-static char * score_normal_xpm[] = {
-"16 16 5 1",
-" c None",
-". c #000000",
-"+ c #17D1EA",
-"@ c #FFFFFF",
-"# c #EF9815",
-" ",
-" ",
-" ... ",
-" .+.+. ",
-" .@#@. ",
-" .@@@. ",
-" ..@.. ",
-" ..@@@.. ",
-" ..@@@@@.. ",
-" ..@@@@@.. ",
-" ..@@@@@.. ",
-" ..@@@@@.. ",
-" .@@@@@. ",
-" ##@## ",
-" ## ## ",
-" "};
diff --git a/art/send-24-receive.png b/art/send-24-receive.png
deleted file mode 100644
index 1ecef23a96..0000000000
--- a/art/send-24-receive.png
+++ /dev/null
Binary files differ
diff --git a/art/send-48-receive.png b/art/send-48-receive.png
deleted file mode 100644
index 53f8b15d9a..0000000000
--- a/art/send-48-receive.png
+++ /dev/null
Binary files differ
diff --git a/art/send-receive.xpm b/art/send-receive.xpm
deleted file mode 100644
index 59d9bfb5d5..0000000000
--- a/art/send-receive.xpm
+++ /dev/null
@@ -1,43 +0,0 @@
-/* XPM */
-static char * 16_send_receive_xpm[] = {
-"16 16 24 1",
-" c None",
-". c #000000",
-"+ c #EEC7C1",
-"@ c #8B625D",
-"# c #F2D1CB",
-"$ c #CE3216",
-"% c #D25B46",
-"& c #CF8173",
-"* c #F4D8D3",
-"= c #B72C13",
-"- c #D29C94",
-"; c #C99A93",
-"> c #95220D",
-", c #7F8488",
-"' c #C5CED6",
-") c #CDD5DC",
-"! c #BAC6CF",
-"~ c #506D89",
-"{ c #9EADBB",
-"] c #95A6B7",
-"^ c #4F575E",
-"/ c #3A4148",
-"( c #42484E",
-"_ c #3F3F3F",
-" ",
-" ",
-" ",
-" .. ",
-" .+@.. ",
-" .#$%&. ",
-".*$$$=. ",
-" .-$==. .. ",
-" .;>.. ..,'. ",
-" .. .)!~{. ",
-" .]~~~^.",
-" .]~~/. ",
-" ...(. ",
-" ._ ",
-" ",
-" "};
diff --git a/art/send.png b/art/send.png
deleted file mode 100644
index fb95df6016..0000000000
--- a/art/send.png
+++ /dev/null
Binary files differ
diff --git a/art/service-close.png b/art/service-close.png
deleted file mode 100644
index d8e7cea744..0000000000
--- a/art/service-close.png
+++ /dev/null
Binary files differ
diff --git a/art/service-configure.png b/art/service-configure.png
deleted file mode 100644
index 8c56dc4c7a..0000000000
--- a/art/service-configure.png
+++ /dev/null
Binary files differ
diff --git a/art/service-down-disabled.png b/art/service-down-disabled.png
deleted file mode 100644
index f6742ff105..0000000000
--- a/art/service-down-disabled.png
+++ /dev/null
Binary files differ
diff --git a/art/service-down.png b/art/service-down.png
deleted file mode 100644
index 49f532f527..0000000000
--- a/art/service-down.png
+++ /dev/null
Binary files differ
diff --git a/art/service-left-disabled.png b/art/service-left-disabled.png
deleted file mode 100644
index fc4256346b..0000000000
--- a/art/service-left-disabled.png
+++ /dev/null
Binary files differ
diff --git a/art/service-left.png b/art/service-left.png
deleted file mode 100644
index 38fe293e39..0000000000
--- a/art/service-left.png
+++ /dev/null
Binary files differ
diff --git a/art/service-right-disabled.png b/art/service-right-disabled.png
deleted file mode 100644
index 848c2a499c..0000000000
--- a/art/service-right-disabled.png
+++ /dev/null
Binary files differ
diff --git a/art/service-right.png b/art/service-right.png
deleted file mode 100644
index 7fdabac13d..0000000000
--- a/art/service-right.png
+++ /dev/null
Binary files differ
diff --git a/art/service-up-disabled.png b/art/service-up-disabled.png
deleted file mode 100644
index 6258caa5d9..0000000000
--- a/art/service-up-disabled.png
+++ /dev/null
Binary files differ
diff --git a/art/service-up.png b/art/service-up.png
deleted file mode 100644
index a24b336c6d..0000000000
--- a/art/service-up.png
+++ /dev/null
Binary files differ
diff --git a/art/show_all_messages.xpm b/art/show_all_messages.xpm
deleted file mode 100644
index f38a42aebf..0000000000
--- a/art/show_all_messages.xpm
+++ /dev/null
@@ -1,27 +0,0 @@
-/* XPM */
-static char * show_all_messages_xpm[] = {
-"16 16 8 1",
-" c None",
-". c #000000",
-"+ c #9DB8D2",
-"@ c #FFFFFF",
-"# c #89A1B9",
-"$ c #859DB4",
-"% c #CACACA",
-"& c #8199AF",
-" ",
-" ",
-" ",
-" ",
-" . . ",
-" . . . .",
-" . . .",
-" ........... ",
-" .+@+. .+@+. ",
-" .#+$. .%+&. ",
-" ... ... ",
-" ",
-" ",
-" ",
-" ",
-" "};
diff --git a/art/splash.png b/art/splash.png
deleted file mode 100644
index c1836906b8..0000000000
--- a/art/splash.png
+++ /dev/null
Binary files differ
diff --git a/art/task-assigned-to.xpm b/art/task-assigned-to.xpm
deleted file mode 100644
index d60eeafa2d..0000000000
--- a/art/task-assigned-to.xpm
+++ /dev/null
@@ -1,30 +0,0 @@
-/* XPM */
-static char * task_assigned_to_xpm[] = {
-"16 16 11 1",
-" c None",
-". c #000000",
-"+ c #FFFFFF",
-"@ c #F3F3F3",
-"# c #CCCCCC",
-"$ c #B2B2B2",
-"% c #ECECEC",
-"& c #ABCCAB",
-"* c #768E76",
-"= c #5E705E",
-"- c #EEEEEE",
-" . . . . . ",
-" ........... ",
-" .+.+.+.+.+.@. ",
-" .+.#.#.#.#.$. ",
-" .+%%%%%%%%%$. ",
-" .+#######..$. ",
-" .+%%%%%%%.&.. ",
-" .+##......&&. ",
-" .+%%.&&&&&&&&. ",
-" .+##.&*&*&*&*&.",
-" .+%%.========. ",
-" .+##......==. ",
-" .+%%%%%%%.=.. ",
-" .-$$$$$$$..$. ",
-" ........... ",
-" "};
diff --git a/art/task-assigned.xpm b/art/task-assigned.xpm
deleted file mode 100644
index 9b245c0c49..0000000000
--- a/art/task-assigned.xpm
+++ /dev/null
@@ -1,30 +0,0 @@
-/* XPM */
-static char * task_assigned_xpm[] = {
-"16 16 11 1",
-" c None",
-". c #000000",
-"+ c #FFFFFF",
-"@ c #F3F3F3",
-"# c #CCCCCC",
-"$ c #B2B2B2",
-"% c #ECECEC",
-"& c #FFCC66",
-"* c #CC9933",
-"= c #996600",
-"- c #EEEEEE",
-" . . . . . ",
-" ........... ",
-" .+.+.+.+.+.@. ",
-" .+.#.#.#.#.$. ",
-" .+%%%%%%%%%$. ",
-" .+##..#####$. ",
-" .+%%.&.%%%%$. ",
-"......&&.###$. ",
-".&&&&&&&&.%%$. ",
-".&*&*&*&*&.#$. ",
-".========.%%$. ",
-"......==.###$. ",
-" .+%%.=.%%%%$. ",
-" .-$$..$$$$$$. ",
-" ........... ",
-" "};
diff --git a/art/task-recurring.xpm b/art/task-recurring.xpm
deleted file mode 100644
index 634cd87a84..0000000000
--- a/art/task-recurring.xpm
+++ /dev/null
@@ -1,59 +0,0 @@
-/* XPM */
-static char * task_recurring_xpm[] = {
-"16 16 40 1",
-" c None",
-". c #000000",
-"+ c #FFFFFF",
-"@ c #F3F3F3",
-"# c #CCCCCC",
-"$ c #B2B2B2",
-"% c #ECECEC",
-"& c #BFBFC3",
-"* c #A2A2B0",
-"= c #454572",
-"- c #9898A9",
-"; c #85859C",
-"> c #333366",
-", c #4F4F79",
-"' c #B3B3C3",
-") c #A3A3B7",
-"! c #9696AD",
-"~ c #464672",
-"{ c #7F7F99",
-"] c #C9C9CA",
-"^ c #3D3D6D",
-"/ c #3B3B6B",
-"( c #A4A4B8",
-"_ c #B5B5C4",
-": c #D1D1D8",
-"< c #9191A4",
-"[ c #B5B5BD",
-"} c #9F9FAE",
-"| c #4A4A76",
-"1 c #40406F",
-"2 c #E9E9E9",
-"3 c #8F8FA9",
-"4 c #9D9DAC",
-"5 c #9090A4",
-"6 c #55557F",
-"7 c #ADADBE",
-"8 c #484875",
-"9 c #B9B9C7",
-"0 c #DCDCE0",
-"a c #EEEEEE",
-" . . . . . ",
-" ........... ",
-" .+.+.+.+.+.@. ",
-" .+.#.#.#.#.$. ",
-" .+%%%%%%%%%$. ",
-" .+&*=-#;>>,$. ",
-" .+'>)%%!>>'$. ",
-" .+~{]##;^/~$. ",
-" .+>(%%%_:(>$. ",
-" .+><[}###<>$. ",
-" .+|^1!%%23|$. ",
-" .+4>>;##5>4$. ",
-" .+6>>!%7890$. ",
-" .a$$$$$$$$$$. ",
-" ........... ",
-" "};
diff --git a/art/task.xpm b/art/task.xpm
deleted file mode 100644
index 4a53c3e9ab..0000000000
--- a/art/task.xpm
+++ /dev/null
@@ -1,27 +0,0 @@
-/* XPM */
-static char * task_xpm[] = {
-"16 16 8 1",
-" c None",
-". c #000000",
-"+ c #FFFFFF",
-"@ c #F3F3F3",
-"# c #CCCCCC",
-"$ c #B2B2B2",
-"% c #ECECEC",
-"& c #EEEEEE",
-" . . . . . ",
-" ........... ",
-" .+.+.+.+.+.@. ",
-" .+.#.#.#.#.$. ",
-" .+%%%%%%%%%$. ",
-" .+#########$. ",
-" .+%%%%%%%%%$. ",
-" .+#########$. ",
-" .+%%%%%%%%%$. ",
-" .+#########$. ",
-" .+%%%%%%%%%$. ",
-" .+#########$. ",
-" .+%%%%%%%%%$. ",
-" .&$$$$$$$$$$. ",
-" ........... ",
-" "};
diff --git a/art/tree-expanded.xpm b/art/tree-expanded.xpm
deleted file mode 100644
index fc748953eb..0000000000
--- a/art/tree-expanded.xpm
+++ /dev/null
@@ -1,22 +0,0 @@
-/* XPM */
-static char * tree_expanded_xpm[] = {
-"16 16 3 1",
-" c None",
-". c #000000",
-"+ c #FFFFFF",
-" ",
-" ",
-" ",
-" ",
-" ......... ",
-" .+++++++. ",
-" .+++++++. ",
-" .+++++++. ",
-" .+.....+. ",
-" .+++++++. ",
-" .+++++++. ",
-" .+++++++. ",
-" ......... ",
-" ",
-" ",
-" "};
diff --git a/art/tree-unexpanded.xpm b/art/tree-unexpanded.xpm
deleted file mode 100644
index 0dfb12a0a5..0000000000
--- a/art/tree-unexpanded.xpm
+++ /dev/null
@@ -1,22 +0,0 @@
-/* XPM */
-static char * tree_unexpanded_xpm[] = {
-"16 16 3 1",
-" c None",
-". c #000000",
-"+ c #FFFFFF",
-" ",
-" ",
-" ",
-" ",
-" ......... ",
-" .+++++++. ",
-" .+++.+++. ",
-" .+++.+++. ",
-" .+.....+. ",
-" .+++.+++. ",
-" .+++.+++. ",
-" .+++++++. ",
-" ......... ",
-" ",
-" ",
-" "};
diff --git a/art/undelete_message.xpm b/art/undelete_message.xpm
deleted file mode 100644
index e5698be5af..0000000000
--- a/art/undelete_message.xpm
+++ /dev/null
@@ -1,77 +0,0 @@
-/* XPM */
-static char * undelete_message_xpm[] = {
-"16 16 58 1",
-" c None",
-". c #314E6C",
-"+ c #9DB8D2",
-"@ c #4B6983",
-"# c #000000",
-"$ c #586A52",
-"% c #64795D",
-"& c #6E8567",
-"* c #A4B29F",
-"= c #ABB5A8",
-"- c #96A790",
-"; c #3B4039",
-"> c #C2C9BF",
-", c #6C8265",
-"' c #6D8466",
-") c #799271",
-"! c #FFFFFF",
-"~ c #C0CBBC",
-"{ c #A3B19C",
-"] c #83957D",
-"^ c #E7E9E5",
-"/ c #BFCABE",
-"( c #718869",
-"_ c #9DAB99",
-": c #333C30",
-"< c #626A5F",
-"[ c #959B90",
-"} c #D5D6D5",
-"| c #C7CBC5",
-"1 c #B4BCB3",
-"2 c #7A8676",
-"3 c #758271",
-"4 c #455241",
-"5 c #3A4436",
-"6 c #879B81",
-"7 c #9FA89C",
-"8 c #556550",
-"9 c #879B83",
-"0 c #424D40",
-"a c #84967F",
-"b c #414A3D",
-"c c #465443",
-"d c #B0BAAD",
-"e c #84957F",
-"f c #687B63",
-"g c #5A6257",
-"h c #C3CEBF",
-"i c #84957E",
-"j c #AEBDA9",
-"k c #83957E",
-"l c #4A5846",
-"m c #465341",
-"n c #7A9472",
-"o c #728A6B",
-"p c #5E7058",
-"q c #6D8267",
-"r c #4D5C49",
-"s c #7B8678",
-" . ",
-" +@. ",
-" +@@@. ",
-" ",
-" ###### ",
-" #$%&*=-# ",
-" ;>,')!~{]# ",
-" ;^/(!!!_:# ",
-" <[}|12345# ",
-" <67890abc# ",
-" <6d890ebf# ",
-" g6h890ibf# ",
-" <6j860klm# ",
-" <jnopqr# ",
-" s##### ",
-" "};
diff --git a/art/weekview.xpm b/art/weekview.xpm
deleted file mode 100644
index 869b9e722a..0000000000
--- a/art/weekview.xpm
+++ /dev/null
@@ -1,34 +0,0 @@
-/* XPM */
-static char * weekview_xpm[] = {
-"24 24 7 1",
-" c None",
-". c #000000",
-"+ c #FFFFFF",
-"@ c #D8D8D4",
-"# c #F2F1ED",
-"$ c #919191",
-"% c #666666",
-"....................... ",
-".++++++++++@++++++++++. ",
-".+#..$.$###$#..$.$###$. ",
-".+#########$#########$. ",
-".+#########$#########$. ",
-".+#########$#########$. ",
-".+#########$#########$. ",
-".+$$$$$$$$$$$$$$$$$$$$. ",
-".+#..$.$###$#..$.$###$. ",
-".+#########$#########$. ",
-".+#########$#########$. ",
-".+#########$#########$. ",
-".+#########$#########$. ",
-".+$$$$$$$$$$$$$$$$$$$$. ",
-".+#..$.$###$#..$.$###$. ",
-".+#########$#########$. ",
-".+#########$#########$. ",
-".+#########$$$$$$$$$$$. ",
-".+#########$#..$.$###$. ",
-".+#########$#########$. ",
-".+#########$#########$. ",
-".@$$$$$$$$$%$$$$$$$$$%. ",
-"....................... ",
-" "};
diff --git a/art/work_offline.xpm b/art/work_offline.xpm
deleted file mode 100644
index b4c2cdc17f..0000000000
--- a/art/work_offline.xpm
+++ /dev/null
@@ -1,33 +0,0 @@
-/* XPM */
-static char * 16_work_offline_xpm[] = {
-"16 16 14 1",
-" c None",
-". c #424242",
-"+ c #212121",
-"@ c #737373",
-"# c #EFEFEF",
-"$ c #DEDEDE",
-"% c #CECECE",
-"& c #101010",
-"* c #8C8C8C",
-"= c #636363",
-"- c #ADADAD",
-"; c #9C9C9C",
-"> c #000000",
-", c #BDBDBD",
-" ",
-" ",
-" ",
-" .+++..@ ",
-" . ###$$%& ",
-" @#*=*-*=*%@ ",
-" .#;> %->;%+ ",
-" .$-> %->,%+ ",
-" .$;$#,;$ %+ ",
-" .$$ %+% #%& ",
-" @%-$@>@%-%. ",
-" .,;;;;-,. ",
-" @++++&. ",
-" ",
-" ",
-" "};
diff --git a/art/workweekview.xpm b/art/workweekview.xpm
deleted file mode 100644
index 35cceedbdc..0000000000
--- a/art/workweekview.xpm
+++ /dev/null
@@ -1,34 +0,0 @@
-/* XPM */
-static char * workweekview_xpm[] = {
-"24 24 7 1",
-" c None",
-". c #000000",
-"+ c #FFFFFF",
-"@ c #D8D8D4",
-"# c #B5B4AF",
-"$ c #666666",
-"% c #F2F1ED",
-"....................... ",
-".++++@+++@+++@+++@++++. ",
-".+###$###$###$###$###$. ",
-".+###$###$###$###$###$. ",
-".@$$$$$$$$$$$$$$$$$$$$. ",
-".++++#+++#+++#+++#+++#. ",
-".+%%%#%%%#%%%#%%%#%%%#. ",
-".+%%%#%%%#%%%#%%%#%%%#. ",
-".+%%%#%%%#%%%#%%%#%%%#. ",
-".+%%%#%%%#%%%#%%%#%%%#. ",
-".+%%%#%%%#%%%#%%%#%%%#. ",
-".+%%%#%%%#%%%#%%%#%%%#. ",
-".+%%%#%%%#%%%#%%%#%%%#. ",
-".+%%%#%%%#%%%#%%%#%%%#. ",
-".+%%%#%%%#%%%#%%%#%%%#. ",
-".+%%%#%%%#%%%#%%%#%%%#. ",
-".+%%%#%%%#%%%#%%%#%%%#. ",
-".+%%%#%%%#%%%#%%%#%%%#. ",
-".+%%%#%%%#%%%#%%%#%%%#. ",
-".+%%%#%%%#%%%#%%%#%%%#. ",
-".+%%%#%%%#%%%#%%%#%%%#. ",
-".@###$###$###$###$####. ",
-"....................... ",
-" "};
diff --git a/art/yearview.xpm b/art/yearview.xpm
deleted file mode 100644
index 0d4fa4135b..0000000000
--- a/art/yearview.xpm
+++ /dev/null
@@ -1,44 +0,0 @@
-/* XPM */
-static char * yearview_xpm[] = {
-"24 24 17 1",
-" c None",
-". c #000000",
-"+ c #FFFFFF",
-"@ c #F2F1ED",
-"# c #AAA9A6",
-"$ c #D7D6D2",
-"% c #92918E",
-"& c #B7B6B3",
-"* c #CBCAC6",
-"= c #919191",
-"- c #888785",
-"; c #B6B6B2",
-"> c #888884",
-", c #C1C1BD",
-"' c #A7A6A3",
-") c #D8D8D4",
-"! c #666666",
-"....................... ",
-".+++++++++++++++++++++. ",
-".+@@@@@@@#$%&*@@@@@@@=. ",
-".+@@@@@@@-;>,'@@@@@@@=. ",
-".+====================. ",
-".+@@@@@@@@@@@@@@@@@@@=. ",
-".+===@===@===@===@====. ",
-".+)=)@)=)@)=)@)=)@)=)=. ",
-".+=)=@=)=@=)=@=)=@=)==. ",
-".+@@@@@@@@@@@@@@@@@@@=. ",
-".+===@===@===@===@====. ",
-".+)=)@)=)@)=)@)=)@)=)=. ",
-".+=)=@=)=@=)=@=)=@=)==. ",
-".+@@@@@@@@@@@@@@@@@@@=. ",
-".+===@===@===@===@====. ",
-".+)=)@)=)@)=)@)=)@)=)=. ",
-".+=)=@=)=@=)=@=)=@=)==. ",
-".+@@@@@@@@@@@@@@@@@@@=. ",
-".+===@===@===@===@====. ",
-".+)=)@)=)@)=)@)=)@)=)=. ",
-".+=)=@=)=@=)=@=)=@=)==. ",
-".)===================!. ",
-"....................... ",
-" "};
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 b7f7dea650..0000000000
--- a/calendar/.cvsignore
+++ /dev/null
@@ -1,6 +0,0 @@
-Makefile.in
-Makefile
-.deps
-_libs
-.libs
-*.lo
diff --git a/calendar/AUTHORS b/calendar/AUTHORS
deleted file mode 100644
index 0049fa248e..0000000000
--- a/calendar/AUTHORS
+++ /dev/null
@@ -1,5 +0,0 @@
-Miguel de Icaza <miguel@kernel.org>
-Federico Mena <federico@helixcode.com>
-Arturo Esponosa <arturo@nuclecu.unam.mx>
-Russell Steinthal <rms39@columbia.edu>
-Rodrigo Moya <rodrigo@ximian.com>
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
deleted file mode 100644
index ef4cc6c29a..0000000000
--- a/calendar/ChangeLog
+++ /dev/null
@@ -1,9959 +0,0 @@
-2001-04-15 Federico Mena Quintero <federico@ximian.com>
-
- * gui/gnome-cal.c (setup_widgets): Create the ESearchBar thingy.
- (search_bar_query_changed_cb): Build the different queries based
- on the type and string.
-
- * pcs/query.c (backend_obj_updated_cb): Ref the query while we are
- notifying the listener so that it will not disappear from under us.
- (backend_obj_removed_cb): Likewise.
- (process_component_cb): Likewise.
- (func_contains): New function to match text fields.
- (matches_comment): New function to match comment lists.
- (matches_description): New function to match description lists.
- (matches_summary): New function to match summaries.
- (matches_any): New function to match any text field.
- (func_has_categories): New function to match categories.
-
-2001-04-14 Federico Mena Quintero <federico@ximian.com>
-
- * gui/alarm-notify/notify-main.c (main): Initialize the trigger
- and queue systems.
-
-2001-04-13 Dan Winship <danw@ximian.com>
-
- * cal-util/timeutil.c (time_from_isodate): Fix the syntactic bogon
- here, and attempt to fix the logical bogon too. (tm_gmtoff and
- timezone have opposite signs... I'm assuming Federico tested the
- Linux case, so I'm flipping the sign of the BSD case. But maybe he
- didn't and it's supposed to be the other way...)
-
-2001-04-12 Federico Mena Quintero <federico@ximian.com>
-
- * gui/e-day-view.c (update_query): New function to restart a query
- for the day view.
- (query_obj_updated_cb): Renamed from obj_updated_cb(); updated for
- queries instead of calendar clients.
- (query_obj_removed_cb): Likewise.
- (cal_opened_cb): Just update_query() instead of queueing reloading
- all the events.
- (e_day_view_set_cal_client): Likewise.
- (e_day_view_set_query): Likewise.
- (e_day_view_set_selected_time_range): Likewise.
- (e_day_view_set_days_shown): Likewise.
- (e_day_view_recalc_work_week): Likewise.
- (e_day_view_queue_reload_events): Removed function now that events
- are updated entirely by the query.
- (e_day_view_reload_events_idle_cb): Likewise.
- (e_day_view_reload_events): Likewise.
- (e_day_view_init): Use a pretty arrow instead of GDK_TOP_LEFT_ARROW.
-
- * gui/e-week-view.c: Analogous changes to the ones in e-day-view.c.
- (e_week_view_init): Use a pretty arrow instead of GDK_TOP_LEFT_ARROW.
-
- * cal-util/timeutil.c (isodate_from_time_t): Return a g_strdup()ed
- version of the string instead of a pointer to a static buffer.
- (time_from_isodate): Resurrected function. Polished up to our
- current standards of paranoia.
-
- * pcs/query.c (func_time_now): New function (time-now).
- (func_make_time): New function (make-time ISODATE).
- (func_time_add_day): New function (time-add-day TIME N).
- (func_time_day_begin): New function (time-day-begin TIME).
- (func_time_day_end): New function (time-day-end TIME).
- (func_occur_in_time_range): Use time_t values instead of ints.
- (match_component): Free the stringized component. Free the ESexp
- result value.
-
- * gui/e-day-view.h: Removed a couple of unused prototypes.
-
- * pcs/query.c (query_destroy): Oops, disconnect from the backend.
-
- * pcs/cal.c (Cal_get_query): Duplicate the query reference before
- we return it.
-
- * gui/calendar-commands.c (pixmaps): Fixed paths to image files.
-
-2001-04-11 JP Rosevear <jpr@ximian.com>
-
- * pcs/cal-backend-file.c (cal_backend_file_compute_changes):
- prepend to both changes and change_ids when different and mark as
- modified, not added
-
-2001-04-11 Christopher James Lahey <clahey@ximian.com>
-
- * gui/calendar-model.c (calendar_model_append_row): Fix this to
- just send the data to the wombat instead of inserting it
- ourselves.
-
-2001-04-11 Gediminas Paulauskas <menesis@delfi.lt>
-
- Display fixes, thanks to Kjartan for finding these.
-
- * gui/event-editor.c: use simple (not e_utf8_) gtk_clist_append for
- strings which are never in utf-8.
- * dialogs/delete-comp.c (delete_component_dialog): convert only
- summary from utf-8 to gtk charset. Translated values are in correct
- craset already.
-
-2001-04-04 Kjartan Maraas <kmaraas@gnome.org>
-
- * gui/calendar-commands.c: Fix headers.
- * gui/calendar-config.c: Same here.
- * gui/calendar-model.c: Same here.
- * gui/e-day-view-time-item.c: Same here.
- * gui/e-day-view-top-item.c: Same here.
- * gui/e-day-view.c: Same here.
- * gui/e-meeting-edit.c: Same here.
- * gui/e-week-view-main-item.c: Same here.
- * gui/e-week-view.c: Same here.
- * gui/event-editor.c: Same here.
- * gui/gnome-cal.c: Same here.
- * gui/goto.c: Same here.
- * gui/main.c: Same her.
- * gui/print.c: Same here.
-
-2001-04-02 Federico Mena Quintero <federico@ximian.com>
-
- * gui/e-tasks.c (e_tasks_setup_menus): Plug leak.
-
- * gui/event-editor.c (obj_updated_cb): Do nothing for now until we
- think of something sensible to do.
- (obj_removed_cb): Likewise.
-
- * gui/dialogs/task-editor.c (obj_updated_cb): Likewise.
- (obj_removed_cb): Likewise.
-
- * gui/event-editor.c (dialog_to_comp_object): Plug leak.
-
-2001-04-01 Federico Mena Quintero <federico@ximian.com>
-
- Client-side glue for the live query engine.
-
- * cal-client/query-listener.[ch]: New files with the
- implementation fo the QueryListener interface.
-
- * cal-client/cal-query.[ch]: New files with the client-side
- convenience object for live queries.
-
- * cal-client/cal-listener.h (CalListenerClass): Removed unused
- slots for signal handlers.
-
- * cal-client/Makefile.am (libcal_clientinclude_HEADERS): Now we
- install the evolution-calendar.h header. This sucks a bit.
-
-2001-04-01 Gediminas Paulauskas <menesis@delfi.lt>
-
- * gui/calendar-commands.c: use new pixmap cache. Added some menu icons
- and changed filenames of renamed icons.
- * gui/tasks-control.c: added icons for new task and print in menu.
-
-2001-03-29 Federico Mena Quintero <federico@ximian.com>
-
- Engine for live queries to calendars. A query object watches a
- CalBackend in the PCS and is otherwise completely separate from
- it; backends need to do nothing to support live queries. Right
- now we have the following functions:
-
- (get-vtype)
-
- Returns a string indicating the type of component
- (VEVENT, VTODO, VJOURNAL, VFREEBUSY, VTIMEZONE,
- UNKNOWN).
-
- (occur-in-time-range? START END)
-
- START - int, time_t start of the time range
- END - int, time_t end of the time range
-
- Returns a boolean indicating whether the component
- has any occurrences in the specified time range.
-
- * idl/evolution-calendar.idl (Cal::getQuery): New method that
- initiates a live query.
- (Query): New interface for a handle to a live query.
- (QueryListener): New interface for a listener to changes in a live
- query.
-
- * pcs/query.[ch]: New files with the live query engine.
-
- * pcs/cal-backend.h (CalBackendClass): Added notification signals
- so that the query system can catch them.
- (CalBackendClass): New virtual method ::get_load_state().
-
- * pcs/cal-backend.c (cal_backend_opened):
- (cal_backend_obj_updated):
- (cal_backend_obj_updated): New functions to emit the notification
- signals; to be used only by backend implementations.
- (cal_backend_get_load_state): New function.
-
- * pcs/cal-backend-file.c (notify_update): Call
- cal_backend_obj_updated().
- (notify_remove): Call call_backend_obj_removed().
- (open_cal): Free the icalcomp if it is not of the correct type.
- (cal_backend_file_get_load_state): Implemented new method.
-
- * pcs/cal-backend-db.c (cal_backend_db_update_object): Call
- cal_backend_obj_updated().
- (cal_backend_db_remove_object): Call cal_backend_obj_removed().
- (cal_backend_db_get_load_state): Implemented new method.
-
- * pcs/cal.c (Cal_get_query): Implementation of the ::getQuery()
- method.
-
-2001-03-27 Anna Marie Dirks <anna@ximian.com>
-
- * gui/e-itip-control.c: fixed button placement to comply
- with gnome standards.
-
-2001-03-27 Anna Marie Dirks <anna@ximian.com>
-
- * gui/e-itip-control.glade: fixed spacing and label alignment to
- comply with gnome standards. Also removed shadows from extraneous
- scrolled windows to avoid bevelitous. There are many more changes
- that need to happen to this viewer, but they all require a hacker
- to do some c-coding, so I will avoid committing them until after the
- .10 release.
-
-2001-03-26 Kjartan Maraas <kmaraas@gnome.org>
-
- * cal-client/client-test.c: Replace includes of <gnome.h>, <bonobo.h>
- and <gtk/gtk.h> with the needed headers to speed up compile.
- * cal-util/test-recur.c: Same here for <gtk/gtk.h>
- * gui/calendar-commands.c: Replace <bonobo.h> and remove
- <libgnorba/gnorba.h>
- * gui/calendar-summary.c: Replace <gnome.h> and <bonobo.h>
- * gui/calendar-summary.h: Added <bonobo/bonobo-generic-factory.h>
- * gui/component-factory.c: Remove <bonobo.h>
- * gui/control-factory.c: Replace <bonobo.h>
- * gui/e-calendar-table.c: Remove <gnome.h>
- * gui/e-itip-control.c: Replace <gnome.h> and <bonobo.h>
- * gui/e-meeting-edit.c: Replace <bonobo.h>
- * gui/e-tasks.c: Replace <gnome.h>
- * gui/e-tasks.h: Replace <bonobo.h>
- * gui/gnome-cal.h: Remove <bonobo.h>
- * gui/main.c: Replace <bonobo.h> and <glade/glade.h>
- * gui/tasks-control-factory.c: Replace <bonobo.h>
- * gui/tasks-control.c: Replace <gnome.h> and <bonobo.h>
- * gui/weekday-picker.c: Add <string.h> and <libgnome/gnome-defs.h>
- * gui/alarm-notify/client-main.c: Remove <gnome.h> and <bonobo.h>
- * gui/alarm-notify/notify-main.c: Replace <gnome.h> and <bonobo.h>
- * gui/dialogs/alarm-notify-dialog.c: Replace <gnome.h>
- * pcs/cal-backend.c: Replace <gtk/gtk.h>
-
-2001-03-25 Federico Mena Quintero <federico@ximian.com>
-
- * gui/e-calendar-table.c (e_calendar_table_init): The
- model_rows_{inserted,deleted} signals changed names; deal with it.
- (e_calendar_table_on_rows_inserted): Updated for new ETable API.
- (e_calendar_table_on_rows_deleted): Likewise.
-
- * gui/gnome-cal.h (GnomeCalendarOpenMode): Removed unused enum.
-
- * gui/gnome-cal.c (gnome_calendar_open): Constify.
-
- * gui/calendar-commands.c (calendar_set_uri): Removed function,
- since it was just calling gnome_calendar_open().
-
- * gui/control-factory.c (set_prop): Replace usage of
- calendar_set_uri() with gnome_calendar_open().
- (load_calendar): Likewise.
- (calendar_persist_init): Made static.
-
- * gui/e-tasks.c: #include "calendar-config.h"
- (e_tasks_update_all_config_settings): We are configuring a table,
- not a calendar! Use the appropriate function.
-
-2001-03-17 Miguel de Icaza <miguel@ximian.com>
-
- * gui/e-day-view.c (e_day_view_on_new_event,
- e_day_view_on_new_appointment): Simplifed this function to use the
- shared code.
-
- * gui/e-week-view.c (e_week_view_on_new_event,
- e_week_view_on_new_appointment): ditto.
-
- * gui/gnome-cal.c (gnome_calendar_new_appointment_for): New
- function used to launch editor components with a time range. A
- bunch of functions use this code now instead of duplicating code
- all over the place
-
- * gui/e-week-view.c (e_week_view_new_event): Moved functionality
- here from e_day_view_on_new_appointment. Allows setting for "full
- day" event.
- (e_week_view_on_new_full_day): New function for making a full day
- event.
- (e_week_view_on_goto_date): Go To support.
- (e_week_view_on_goto_today): Goto today support.
-
- * gui/e-day-view.c (e_day_view_new_event): Moved functionality
- here from e_day_view_on_new_appointment. Allows setting for "full
- day" event.
- (e_day_view_on_new_full_day): New function for making a full day
- event.
- (e_day_view_on_goto_date): Go To support.
- (e_day_view_on_goto_today): Goto today support.
-
- * main_items: Add New All Day Event; Go to Today; Go to Date.
-
-2001-03-07 Miguel de Icaza <miguel@ximian.com>
-
- * gui/control-factory.c (calendar_persist_init): New function:
- inits the BonoboPersistFile server.
-
- * gui/GNOME_Evolution_Calendar.oaf.in: Added BonoboPropertyBag to
- the list of supported interfaces that were supported but not
- reported. Add the new PersistFile.
-
- Add text/calendar mime type attribute.
-
-2001-03-15 Dan Winship <danw@ximian.com>
-
- * gui/e-week-view.c (e_week_view_start_editing_event):
- * gui/e-day-view.c (e_day_view_start_editing_event): Update
- arguments to e_canvas_item_grab_focus.
-
-2001-03-15 Gediminas Paulauskas <menesis@delfi.lt>
-
- * gui/*.xpm: moved to ../art.
- * gui/Makefile.am: removed *.xpm and oaf_DATA from EXTRA_DIST.
- * gui/e-calendar-table.c, gui/e-day-view.c, gui/e-week-view.c:
- #include "art/*.xpm".
-
-2001-03-09 JP Rosevear <jpr@ximian.com>
-
- * conduits/todo/Makefile.am: PISOCK_INCLUDEDIR has become
- PISOCK_CFLAGS in gnome-pilot.m4 and remove capplet foo
-
- * conduits/calendar/Makefile.am: ditto
-
-2001-03-08 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component-factory.c (factory_fn): Specify a NULL
- `EvolutionShellComponentGetDndSelectionFn'.
-
-2001-02-27 Miguel de Icaza <miguel@ximian.com>
-
- * gui/e-day-view.c (e_day_view_on_event_right_click): Reorganize
- the menus to have entries always in a consistent fashion, as
- reported to the genepool mailing list.
- (e_day_view_on_event_right_click): Added a FIXME comment to the
- FIXME comment without a FIXME.
-
- Now we use e_popup_menu. This allows us to hide/show items on
- demand, and to sensitize/de-sensitize items depending on their
- state.
-
- This will also let us add icon support (when we get nice icons for
- this)
-
- * gui/e-week-view.c (e_week_view_show_popup_menu): Ditto.
-
- The files popup-menu.c and popup-menu.h can now be removed.
-
-2001-03-05 Damon Chaplin <damon@ximian.com>
-
- * gui/e-tasks.c: keep list of all Tasks folders so we can update the
- preference settings when necessary.
-
- * gui/gnome-cal.c: configure the TaskPad according to the settings.
-
- * gui/e-calendar-table.c: use ECellCombo and ECellDateEdit for fields,
- so the tasks folders is almost usable now.
-
- * gui/calendar-model.c: added support for the Status property.
-
- * gui/calendar-config.[hc]: added convenience functions to setup
- ECalendarTable and ECellDateEdit objects.
-
- * gui/calendar-commands.c: connected to "destroy" signal of calendars
- so we can remove them from all_calendars list.
-
- * gui/dialogs/cal-prefs-dialog.c (cal_prefs_dialog_update_config):
- call e_tasks_update_all_config_settings() to update all the settings
- in the Tasks folders as well.
-
- * cal-util/cal-component.h: added CAL_COMPONENT_FIELD_STATUS.
-
- * cal-util/cal-component.c (cal_component_get_transparency): fixed
- calls to strcasecmp so they check for '== 0'.
-
- Applied patch from Miguel...
-
-2001-02-27 Miguel de Icaza <miguel@ximian.com>
-
- * gui/e-day-view.c (e_day_view_on_event_right_click): Reorganize
- the menus to have entries always in a consistent fashion, as
- reported to the genepool mailing list.
- (e_day_view_on_event_right_click): Added a FIXME comment to the
- FIXME comment without a FIXME.
-
- Now we use e_popup_menu. This allows us to hide/show items on
- demand, and to sensitize/de-sensitize items depending on their
- state.
-
- This will also let us add icon support (when we get nice icons for
- this)
-
- * gui/e-week-view.c (e_week_view_show_popup_menu): Ditto.
-
- The files popup-menu.c and popup-menu.h can now be removed.
-
-2001-03-02 JP Rosevear <jpr@ximian.com>
-
- * conduits/todo/e-todo.conduit.in: update for new pilot foo
-
- * conduits/calendar/e-calendar.conduit.in: ditto
-
- * conduits/todo/Makefile.am: update sed script
-
- * conduits/calendar/Makefile.am: ditto
-
-2001-02-28 Federico Mena Quintero <federico@ximian.com>
-
- * gui/event-editor.c (recurrence_exception_select_row_cb): New
- function to set the EDateEdit's value when a row is selected in
- the exception date list. Fixes bug #1638.
- (append_exception): Set the value as well. Block/unblock signals
- from the clist as appropriate. Gotta love non-model/view widgets.
- (recurrence_exception_delete_cb): Be more paranoid about the
- contents of the list row's data.
- (recur_to_comp_object): Likewise.
- (fill_exception_widgets): Select the first row after we are done
- appending the exception dates.
-
-2001-02-26 Federico Mena Quintero <federico@ximian.com>
-
- * gui/alarm-notify/Makefile.am (libalarm_a_SOURCES): Create a
- little stand-alone library for the low-level alarm trigger
- mechanism. This is so that the GUI parts of the calendar can use
- it in addition to the alarm daemon.
-
- * gui/main.c: #include "alarm-notify/alarm.h".
-
- * gui/calendar-summary.c: Likewise.
- (alarm_fn): Do not remove the previous alarm; it is removed
- automatically when it is triggered.
-
- * gui/Makefile.am (evolution_calendar_SOURCES): Removed alarm.[ch]
- from the sources.
-
- * gui/alarm.[ch]: Removed obsolete files.
-
-2001-02-23 Federico Mena Quintero <federico@ximian.com>
-
- * gui/alarm-notify/alarm-notify.c (AlarmNotify_addCalendar):
- Switched to using our own refcounted structure for loaded clients.
- (AlarmNotify_removeCalendar): Ditto. Also, do the full
- destruction of the client.
- (alarm_notify_destroy): Destroy each element in the hash table.
-
- * cal-client/cal-client.c (cal_client_construct): Test for
- exceptions from OAF when activating the Wombat calendar factory.
-
- * gui/alarm-notify/GNOME_Evolution_Calendar_AlarmNotify.oaf.in:
- New .oaf.in file.
-
- * gui/alarm-notify/Makefile.am (oaf_in_files): Updated.
-
- * gui/GNOME_Evolution_Calendar.oaf.in: Put all the servers here
- instead of in a million files.
-
- * gui/GNOME_Evolution_Calendar_Control.oaf.in: Removed file.
-
- * gui/GNOME_Evolution_Calendar_gnomecal.oaf.in: Removed *REALLY*
- obsolete file.
-
- * gui/Makefile.am (oaf_in_files): Updated.
-
-2001-02-23 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/cal-backend-db.c (add_history): fixed generation of history records
-
-2001-02-16 Federico Mena Quintero <federico@ximian.com>
-
- * pcs/cal-factory.c (CalFactoryPrivate): Added a `registered'
- field.
- (cal_factory_oaf_register): New function; now the factory performs
- its own registration with OAF.
- (cal_factory_destroy): Unregister from OAF if appropriate.
-
-2001-02-19 JP Rosevear <jpr@ximian.com>
-
- * conduits/todo/Makefile.am: Remove PISOCK_LIBDIR
-
- * conduits/calendar/Makefile.am: ditto
-
-2001-02-16 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/calbackend-db.c (cal_backend_db_destroy): close DB environment.
- Some compilation warnings removed
-
-2001-02-13 Christopher James Lahey <clahey@ximian.com>
-
- * gui/Makefile.am (evolution_calendar_LDADD): Added libmenus.la.
-
- * gui/e-calendar-table.c, gui/e-calendar-table.h
- (e_calendar_table_get_spec): Added this function.
-
- * gui/e-tasks.c, gui/e-tasks.h (e_tasks_setup_menus): Added this
- function.
-
- * gui/tasks-control.c (tasks_control_activate): Call
- e_tasks_setup_menus.
-
-2001-02-13 JP Rosevear <jpr@ximian.com>
-
- * gui/e-tasks.c (e_tasks_new_task): call task_editor_focus
-
-2001-02-13 JP Rosevear <jpr@ximian.com>
-
- * gui/calendar-commands.c (update_pixmaps): Set toolbar new
- appointment icon
- (set_pixmap): load files rather than create from xpm file
-
- * gui/*view.xpm: move to the art directory
-
-2001-02-13 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/cal-backend-db.c (cal_backend_db_get_alarms_for_object):
- implemented
-
-2001-02-13 JP Rosevear <jpr@ximian.com>
-
- * gui/calendar-commands.c (update_pixmaps): Set toolbar new command
-
- * gui/e-calendar-table.c: Add titles to pixbuf column for grouping
-
- * gui/calendar-model.c (calendar_model_class_init): override value
- to string virtual method
- (calendar_model_value_to_string): implement value to string for
- etable (necessary for group by)
-
-2001-02-12 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/cal-backend-file.c:
- cal_backend_db_update_object(): manage both updates and additions/add notification
- cal_backend_db_get_object(): don't use DB cursors
- cal_backend_db_get_type_by_uid(): don't use DB cursors
- cal_backend_db_remove_object(): don't use DB cursors/add notification
- cal_backend_db_get_alarms_in_range(): implemented
-
-2001-02-12 Kjartan Maraas <kmaraas@gnome.org>
-
- * gui/Makefile.am: Hook up the xml-i18n-tools + .oaf.in stuff.
- * gui/GNOME_Evolution_Calendar*.oaf.in: Marked strings for translation.
-
-2001-02-11 Rodrigo Moya <rodrigo@ximian.com>
-
- * pcs/cal-backend-db.c: added DB3 transactions support
- * pcs/cal-backend-db.[ch]: added the new DB3-based backend. This is just
- the beginning, there are some missing things still.
-
-2001-02-11 Gediminas Paulauskas <menesis@delfi.lt>
-
- Really use xml-i18n-tools.
-
- * conduits/calendar/e-calendar-conduit-control-applet.desktop,
- conduits/todo/e-todo-conduit-control-applet.desktop: removed.
-
- * conduits/calendar/e-calendar-conduit-control-applet.desktop.in,
- conduits/todo/e-todo-conduit-control-applet.desktop.in: added empty.
-
- * conduits/calendar/Makefile.am, conduits/todo/Makefile.am:
- reflect above changes, merge translations.
-
- * gui/*.glade.h, gui/dialogs/*.glade.h: removed, xml-i18n-extract
- takes care of strings itself.
-
- * gui/*.glade, gui/dialogs/*.glade: do not output_translatable_strings
-
- * gui/Makefile.am, gui/dialogs/Makefile.am: do not include removed
- files in EXTRA_DIST.
-
-2001-02-08 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/task-editor-dialog.glade: Oops, remove old widget
-
-2001-02-08 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/task-editor.c (fill_widgets): fill in new
- classification stuff properly
- (get_widgets): load new class. widgets
- (init_widgets): if the class. widgets change, mark the dialog
- dirty
- (dialog_to_comp_object): set the comp class. from the new widgets
-
- * gui/dialogs/task-editor-dialog.glade: Make more consistent,
- fixing bugs 1247 and 1249
-
- * gui/dialogs/task-editor.c (fill_widgets):
-
- * gui/event-editor-dialog.glade: Gui tidying
-
- * gui/event-editor.c: Remove old alarm cruft
-
- * cal-util/cal-component.c (cal_component_set_url): Don't try and
- write an empty string as a property
-
-
-2001-02-08 JP Rosevear <jpr@ximian.com>
-
- * pcs/cal-backend-file.c: Move the get_change code here
-
- * pcs/cal-backend.c: Remove get_changes related stuff and
- implement by calling the virtual method instead
-
- * pcs/cal-backend.h: New virtual method.
-
- * pcs/cal-backend-file.c (compute_alarm_range): Use
- icaldurationtype_as_int (replace _as_timet)
- (add_alarm_occurrences_cb): ditto
-
-2001-02-08 JP Rosevear <jpr@ximian.com>
-
- * pcs/cal-backend-file.c (compute_alarm_range): Use
- icaldurationtype_as_int (replace _as_timet)
- (add_alarm_occurrences_cb): ditto
-
- * gui/e-week-view.c (e_week_view_on_schedule_meet): new routine to
- throw up the meeting schedule dialog
- (e_week_view_show_popup_menu): add schedule meeting to the
- contextual menu where appropriate
-
-2001-02-08 JP Rosevear <jpr@ximian.com>
-
- * gui/event-editor.c: Remove assorted menu/bonobo stuff
-
- * gui/dialogs/task-editor.c: Remove assorted menu/bonobo stuff
- (task_editor_construct): no longer suck out the glade contents
- into a bonobo win, listen for apply and close signals
- (tedit_apply_event_cb): listen for apply signal and save object
- (tedit_close_event_cb): listen for close signal and prompt to save
- if need be
- (task_editor_focus): new function to bring the dialog to the front
-
- * gui/dialogs/task-editor.h: new prototype
-
- * gui/e-meeting-edit.c (schedule_button_clicked_cb): no need to
- update widgets in the event editor since the event editor won't be
- open
- (e_meeting_editor_new): don't need the event editor reference any
- more
-
- * gui/e-meeting-edit.h: Change prototype
-
- * gui/e-day-view.c (e_day_view_on_event_right_click): Make
- schedule meeting a new contextual menu item
- (e_day_view_on_schedule_meet): new routine to schedule a meeting
- from the contextual menu
-
- * gui/e-calendar-table.c (e_calendar_table_open_task): Call
- task_editor_focus
-
- * gui/event-editor-dialog.glade: Update to be a property box
-
- * gui/dialogs/task-editor-dialog.glade: Update to be a property
- box
-
-2001-02-07 Iain Holmes <iain@ximian.com>
-
- * gui/calendar-summary.c (create_summary_view): Add a setter to the
- property bag.
- (set_property): The setter.
- (generate_html_summary): Sort the UIDs accodring to time.
-
-2001-02-06 JP Rosevear <jpr@ximian.com>
-
- * gui/event-editor.c (fill_reminder_widgets): Match new
- append_alarm signature
- (reminder_to_comp_object): only add alarms tagged as new, no
- longer delete all alarms first
- (append_reminder): the row data is now of type ReminderData,
- rename from append_alarm
- (reminder_add_cb): math new append_alarm signature
- (reminder_delete_cb): if the alarm existed before the dialog was
- loaded, delete it immediately from the cal component
-
-2001-02-06 JP Rosevear <jpr@ximian.com>
-
- * gui/event-editor-dialog.glade: Gui tweaks for bugs 1248 and 1246
-
- * gui/dialogs/task-editor-dialog.glade: ditto
-
-2001-02-07 JP Rosevear <jpr@ximian.com>
-
- * gui/event-editor-dialog.glade: Fix spacing
-
-2001-02-06 JP Rosevear <jpr@ximian.com>
-
- * gui/event-editor-dialog.glade: Gui tweaks for bugs 1248 and 1246
-
- * gui/dialogs/task-editor-dialog.glade: ditto
-
-2001-02-06 JP Rosevear <jpr@ximian.com>
-
- * gui/e-week-view.c (e_week_view_show_popup_menu): Make the menus more
- consistent
-
- * gui/e-day-view.c (e_day_view_on_event_right_click): ditto
-
- * gui/e-calendar-table.c: ditto
-
-2001-02-06 JP Rosevear <jpr@ximian.com>
-
- * cal-util/cal-component.c (cal_component_set_categories): If the
- categories string is empty, remove the property
- (get_period_list): Fixes from clahey to handle the new rdate
- format in libical
- (set_period_list): ditto
-
-2001-02-05 JP Rosevear <jpr@ximian.com>
-
- * cal-util/cal-component.c (cal_component_alarm_set_trigger): Set
- the time and duration values in the trigger to null by default
- (cal_component_free_alarm_uids): properly free the list of alarm
- uids
-
-2001-02-05 JP Rosevear <jpr@ximian.com>
-
- * gui/event-editor.c (get_widgets): get the new reminder widgets
- (sync_entries): different callback data
- (summary_changed_cb): take different data and handle various cases
- (init_widgets): connect signals for the new widgets
- (get_alarm_duration_string): give a text string of the alarm
- duration
- (get_alarm_string): give a string representing the alarm
- (fill_widgets): make sure we don't loop infinitely and remove old
- alarm cruft
- (reminder_to_comp_object): dump alarm info in the gui into the cal
- component
- (append_alarm): add alarm to the clist
- (reminder_add_cb): create new alarm
- (reminder_delete_cb): remove the alarm from the list
-
- * gui/event-editor-dialog.glade: Update gui
-
- * gui/e-calendar-table.c: include gnome.h for all the menu stuff
-
- * gui/calendar-summary.c: for internationalization
-
- * gui/tasks-control.c: include gnome.h
-
- * gui/e-tasks.c: ditto
-
- * gui/e-itip-control.c: ditto
-
- * cal-util/cal-recur.c (cal_recur_set_rule_end_date): Update for
- libical changes
-
-2001-02-05 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/calendar-model.c: Fixed up these #includes.
-
-2001-02-03 Federico Mena Quintero <federico@ximian.com>
-
- * gui/dialogs/save-comp.c (save_component_dialog):
- gnome_dialog_grab_focus() on the Yes button. Fixes bug #1242.
-
-2001-01-30 Kjartan Maraas <kmaraas@gnome.org>
-
- * gui/e-calendar-table.c: Mark a string for translation.
- * gui/e-itip-control.c: Mark a bunch of strings for translation.
-
-2001-01-30 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/print.c: #include <sys/time.h>.
-
-2001-01-29 Federico Mena Quintero <federico@ximian.com>
-
- * gui/calendar-config.c: <gnome.h> trimming to reduce compilation
- time.
- * gui/calendar-summary.c: Likewise.
- * gui/e-calendar-table.c: Likewise.
- * gui/e-day-view-time-item.c: Likewise.
- * gui/e-day-view.c: Likewise.
- * gui/e-itip-control.c: Likewise.
- * gui/e-meeting-edit.c: Likewise.
- * gui/e-meeting-edit.h: Likewise.
- * gui/e-tasks.c: Likewise.
- * gui/e-week-view.c: Likewise.
- * gui/event-editor.c: Likewise.
- * gui/gnome-cal.c: Likewise.
- * gui/goto.c: Likewise.
- * gui/itip-utils.h: Likewise.
- * gui/main.c: Likewise.
- * gui/popup-menu.c: Likewise.
- * gui/print.c: Likewise.
- * gui/tasks-control-factory.c: Likewise.
- * gui/tasks-control.c: Likewise.
- * gui/tasks-migrate.c: Likewise.
-
-2001-01-25 Federico Mena Quintero <federico@ximian.com>
-
- * cal-util/timeutil.c: <gnome.h> trimming to reduce compilation time.
- * gui/dialogs/task-editor.c: Ditto.
- * gui/dialogs/cal-prefs-dialog.c: Ditto.
- * gui/dialogs/save-comp.c: Ditto.
- * gui/dialogs/delete-comp.c: Ditto.
- * gui/calendar-commands.c: Ditto.
- * gui/calendar-model.c: Ditto.
-
-2001-01-26 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/e-itip-control.c (itip_control_destroy_cb): Don't attempt to
- call `icalcomponent_remove_component()' on a NULL component or a
- NULL subcomponent.
-
-2001-01-25 Damon Chaplin <damon@ximian.com>
-
- * gui/tag-calendar.c: don't tag the calendar if no dates are shown.
- (e_calendar_item_get_date_range() now returns FALSE in this case.)
-
-2001-01-23 Damon Chaplin <damon@helixcode.com>
-
- * gui/calendar-model.c (ensure_task_complete): make sure the status
- is set to "Completed". Fixes bug #1253.
-
- * gui/e-tasks.c (e_tasks_open): load the ETable state after opening
- the tasks folder, since it relies on the folder uri, which isn't set
- now until you open the folder.
-
- * gui/calendar-model.c (obj_updated_cb): add the categories from the
- updated object to our tree, and emit the "categories-changed" signal
- if they have changed. Fixes bug #1255.
-
- * gui/e-tasks.c: removed debug messages.
-
-2001-01-23 JP Rosevear <jpr@ximian.com>
-
- * libical import cleanup
-
-2001-01-23 JP Rosevear <jpr@ximian.com>
-
- * conduits/todo/todo-conduit.c (local_record_from_comp): properly ref
- the cal component when we use it, prevents double free
-
- * conduits/calendar/calendar-conduit.c (local_record_from_comp): ditto
-
-2001-01-22 JP Rosevear <jpr@ximian.com>
-
- * gui/dialogs/Makefile.am: compile new stuff
-
- * gui/dialogs/task-editor.c (prompt_to_save_changes): use new
- standard dialog
-
- * gui/event-editor.c (prompt_to_save_changes): ditto
-
- * gui/dialogs/save-comp.h: new header
-
- * gui/dialogs/save-comp.c (save_component_dialog): shows the save
- dialog
-
-2001-01-22 JP Rosevear <jpr@ximian.com>
-
- * conduits/todo/todo-conduit.c (for_each_modified): remove duplicate
- message
-
- * conduits/calendar/Makefile.am: Remove vfs lib dependency
-
- * conduits/todo/Makefile.am: ditto
-
- * conduits/calendar/calendar-conduit.c: Remove alarm foo for now
- (for_each_modified): remove duplicate message
-
-2001-01-21 JP Rosevear <jpr@ximian.com>
-
- * conduits/calendar/calendar-conduit.c (delete_record): Remove
- deleted records from the pilot map so we don't have dupes in the future
-
- * conduits/todo/todo-conduit.c (delete_record): ditto
-
-2001-01-21 Federico Mena Quintero <federico@ximian.com>
-
- * gui/dialogs/task-editor.c (file_delete_cb): Fix bug #1250; now
- we present a confirmation dialog before deleting the component.
-
-2001-01-20 Federico Mena Quintero <federico@ximian.com>
-
- * gui/event-editor-dialog.glade: Fix bug #1243. Turn on the Y
- expand/fill options for the date widgets in the General page.
- This makes them be vertically aligned with the "All day event"
- toggle so that they will get the focus in the proper order; the
- toggle would get the focus before them because it was a pixel or
- two above them.
-
-2001-01-19 Federico Mena Quintero <federico@ximian.com>
-
- * gui/weekday-picker.c (weekday_picker_init): Unset the
- GTK_CAN_FOCUS flag on the weekday picker. This will do until it
- supports being used with the keyboard.
-
-2001-01-19 JP Rosevear <jpr@ximian.com>
-
- * cal-util/cal-component.c (cal_component_alarm_new): create a new
- cal component alarm
- (cal_component_add_alarm): add alarm to the cal component
- (cal_component_remove_alarm): remove alarm from the cal component
- (remove_alarm): remove alarm from hash
-
- * cal-util/cal-component.h: new protos
-
- * conduits/calendar/calendar-conduit.c (comp_from_remote_record):
- add alarm information, still needs to be hacked to replace an already
- existing alarm. questions abound about the heuristic for doing this.
-
-2001-01-17 JP Rosevear <jpr@ximian.com>
-
- * gui/event-editor.c (dialog_to_comp_object): Properly set categories
- to NULL if there are none
-
-2001-01-18 Federico Mena Quintero <federico@ximian.com>
-
- * gui/tasks-migrate.[ch]: New files with a simple sequence to
- migrate the task components from the old calendar folder into the
- new tasks folder.
-
- * gui/component-factory.c (owner_set_cb): Call tasks_migrate()
- once evolution_dir is set. It sucks to have to do this here.
-
- * cal-client/cal-client.c (cal_client_get_uids): In the inline
- docs, indicate how to free the return value.
- (cal_opened_cb): Ahem, moved assertion to the right place. Also,
- ref() and unref() around our own signal emission because we are
- not inside a signal handler, rather a simple callback from the
- listener object; we want to have a chance to clean up even if the
- client is unrefed during the emission.
-
- * gui/Makefile.am (evolution_calendar_SOURCES): Added
- tasks-migrate.[ch] to the list of sources.
-
-2001-01-17 Federico Mena Quintero <federico@ximian.com>
-
- * gui/event-editor.c (init_widgets): Use
- e_calendar_item_set_max_days_sel() instead of setting GTK+ object
- arguments.
-
- * gui/e-day-view.c (e_day_view_set_cal_client): Oops, we had a
- reversed test for the client being loaded.
-
- * gui/tag-calendar.c (tag_calendar_by_client): Fixed similarly
- reversed test.
-
-2001-01-17 Damon Chaplin <damon@helixcode.com>
-
- * gui/e-week-view*.c
- * gui/e-day-view*.c: don't use the theme colors at all within
- the graphical parts of the widgets, since they may clash with
- our colors. May make them configurable in future so people can tweak
- them to go with their theme. At least the calendars are usable in any
- theme now, even though the colors may not go well with the theme.
- Also set the font of all the EText items in style_set.
-
- * gui/e-week-view-event-item.c (e_week_view_event_item_draw): don't
- draw the icons if we are editing the event.
-
- * gui/e-day-view.c:
- * gui/e-week-view.c: reinstated the optimizations so we don't do a
- complete relayout if the event's dates haven't been changed.
- (Though we still do a re-layout when recurring events change, since
- comparing all the RDATES/RRULES/EXDATES/EXRULES is too much hassle.)
- A side-effect of this change is that the EWeekView won't crash so
- often - only recurring events will be a problem.
-
- * cal-util/cal-component.[hc]: added function to check if the start
- and end dates of a component match. Used for optimizing the updating
- of the EDayView & EWeekView.
-
-2001-01-17 JP Rosevear <jpr@ximian.com>
-
- * conduits/calendar/calendar-conduit.c (start_calendar_server): Check
- for open error and handled
-
- * conduits/todo/todo-conduit.c (start_calendar_server): ditto
-
-2001-01-17 JP Rosevear <jpr@ximian.com>
-
- * conduits/calendar/calendar-conduit.c (start_calendar_server): Check
- for open error and handled
-
- * pcs/cal-backend.c (cal_backend_compute_changes): Fix transposition
- of sync db location
-
-2001-01-17 Federico Mena Quintero <federico@ximian.com>
-
- * */*: Ximianified email addresses and copyrights.
-
- * idl/evolution-calendar.idl (CalFactory::open): Renamed from
- ::load(), and added an only_if_exists argument.
- (CalFactory::create): Removed method.
- (Listener::OpenStatus): Removed the IN_USE error and replaced it
- with a NOT_FOUND one; renamed the enum from LoadStatus.
- (Listener::notifyCalOpened): Renamed from notifyCalLoaded().
-
- * pcs/cal-backend.h (CalBackend): Removed the uri field.
- (CalBackendOpenStatus): Renamed from CalBackendLoadStatus and
- added a NOT_FOUND value.
- (CalBackendClass::open): Put in a slot for the open method.
-
- * pcs/cal-backend.c (cal_backend_create): Removed function.
-
- * pcs/cal-backend-file.c (cal_backend_file_open): Return the
- appropriate value when only_if_exists is TRUE.
- (create_cal): We are Ximian now, so set the PRODID property to
- the appropriate foo.
-
- * pcs/cal-factory.c (CalFactory_open): implemented, replacing
- CalFactory_load() and CalFactory_create().
- (CalFactory_open): Moved the queue_load_create_job() stuff to
- here, since we now only need to contemplate the open case instead
- of load/create ones.
- (open_backend): Do everything here; replaces load_backend() and
- create_backend().
-
- * cal-client/cal-listener.h (CalListenerClass::cal_opened):
- Renamed from cal_loaded.
- (CalListenerClass): Replaced the silly signals, which are
- gratuitous abstraction, by a set of function pointers in the
- instance structure.
-
- * cal-client/cal-listener.c (cal_listener_get_calendar): Removed
- unused function.
- (cal_listener_construct): Added the listener notification functions.
- (cal_listener_new): Ditto.
- (Listener_notifyCalOpened): Renamed to our new naming convention
- for servant implementations.
- (Listener_notifyObjUpdated): Ditto.
- (Listener_notifyObjRemoved): Ditto.
-
- * cal-client/cal-client.h (CalClientOpenStatus): Renamed from
- CalClientLoadStatus.
- (CalClientClass::cal_opened): Renamed from ::cal_loaded().
- (CalClientLoadState): New enum; basically make LoadState public so
- that users of this code do not have to maintain their own states.
-
- * cal-client/cal-client.c (cal_client_create_calendar): Removed
- function.
- (cal_client_open_calendar): Moved the functionality over from
- load_or_create(); now we do everything here.
- (*): Use the CalClientLoadState enum values instead of the old
- LoadState values.
- (cal_client_get_load_state): Renamed from cal_client_is_loaded(),
- and return the appropriate value.
- (CalClientPrivate): Added an uri field.
- (cal_client_init): Initialize priv->uri.
- (cal_client_destroy): Free the priv->uri.
- (cal_opened_cb): Maintain the priv->uri.
- (cal_client_open_calendar): Fill in the priv->uri.
- (cal_client_get_uri): New function.
-
- * gui/calendar-model.c (calendar_model_set_new_comp_vtype): New
- function to configure the type of calendar components to create
- when doing click-to-add. This makes the model usable for
- something other than task lists.
- (calendar_model_get_new_comp_vtype): New function.
-
- * gui/e-calendar-table.c (e_calendar_table_get_model): New function.
- (e_calendar_table_destroy): Unref the subset_model.
-
- * gui/gnome-cal.h (GnomeCalendarOpenMode): Removed enum.
-
- * gui/gnome-cal.c (LoadState): Removed enum; we now use the
- CalClientLoadState from the client objects.
- (GnomeCalendarPrivate): Removed the loading_uri and
- task_pad_loading_uri fields as well as the load_state and
- task_pad_load_state fields, as we can now query them directly from
- the CalClient.
- (open_error): Renamed from load_error().
- (create_error): Removed function.
- (gnome_calendar_open): Do not take in the mode parameter.
- (cal_opened_cb): Get rid of our beautifully-crafted state machine
- and replace it with simple code; all the loading smarts are in the
- Wombat now.
- (setup_widgets): Set the new component vtype of the table model to
- CAL_COMPONENT_TODO.
-
- * gui/Makefile.am (evolution_calendar_SOURCES): Removed
- gnome-month-item.[ch] from the list of sources.
-
- * gui/calendar-summary.c (CalSummary): Removed unused cal_loaded
- field.
- (create_summary_view): Do not check if the file exists; this is
- the job of the Wombat.
- (generate_html_summary): Fixed prototype.
- (alarm_fn): Fixed prototype.
- (property_dialog): Fixed prototype. Wonder if/how this ever
- worked.
- (create_summary_view): Cast the component and view as
- appropriate. Removed unused html variable.
-
- [Iain dude, are you compiling with -Wall?]
-
- * gui/e-itip-control.c (cal_opened_cb): Sigh, this function
- signature was *very* wrong. It was using CalClientGetStatus
- instead of CalClientOpenStatus.
-
- * gui/e-tasks.h (ETasksOpenMode): Removed enum.
-
- * gui/e-tasks.c (setup_widgets): Set the new component vtype of
- the table model to CAL_COMPONENT_TODO.
- (LoadState): Removed the state machine foo.
- (e_tasks_open): Removed the mode parameter.
- (initial_load): Removed function.
- (create_error): Removed function.
- (ETasksPrivate): Removed folder_uri field.
- (cal_opened_cb): Remove the state machine.
-
- * gui/component-factory.c: #include "tasks-control.h"
-
- * conduits/calendar/calendar-conduit.h (ECalConduitContext):
- Removed calendar_load_tried field.
-
- * conduits/calendar/calendar-conduit.c (start_calendar_server_cb):
- Sigh, fixed function prototype.
-
- * conduits/todo/todo-conduit.h (EToDoConduitContext): Removed
- calendar_load_tried field.
-
- * conduits/todo/todo-conduit.c (start_calendar_server_cb): Fixed
- function prototype.
-
-2001-01-16 JP Rosevear <jpr@ximian.com>
-
- * conduits/todo/todo-conduit.c (print_local): fix debug output
- (print_remote): ditto
-
-2001-01-15 JP Rosevear <jpr@ximian.com>
-
- * pcs/cal-backend.c (cal_backend_compute_changes): accomadate tasks
- in their new dir
-
- * conduits/todo/todo-conduit.c (start_calendar_server): ditto
-
-2001-01-15 JP Rosevear <jpr@ximian.com>
-
- * conduits/todo/todo-conduit.c (print_local): prevent segfaults and
- buffer overflows.
- (print_remote): ditto
-
- * conduits/calendar/calendar-conduit.c: as above
-
-2001-01-14 Damon Chaplin <damon@helixcode.com>
-
- * gui/e-calendar-table.c (E_CALENDAR_TABLE_SPEC): changed the expansion
- values so that small text fields are 1.0, all the date fields and the
- URL field are 2.0, and the Summary is 3.0. Hopefully the user will
- resize the fields as desired, but at least this is a better start.
-
-2001-01-14 JP Rosevear <jpr@ximian.com>
-
- * conduits/calendar/Makefile.am: pass -module and -avoid-version to
- conduit linker
-
- * conduits/todo/Makefile.am: ditto
-
-2001-01-14 Damon Chaplin <damon@helixcode.com>
-
- * gui/dialogs/task-editor.[hc]: moved #include
- <cal-client/cal-client.h> to the .h file.
-
- * gui/e-tasks.c: load & save the Tasks folders' ETable layout.
- Added an option menu to filter tasks by category.
-
- * gui/gnome-cal.c: use the "Tasks" folder for the TaskPad.
- (We may make the actual tasks folder shown a per-calendar option.)
-
- * gui/tasks-control.c (tasks_control_new_task_cmd): added support for
- the New Task icon on the toolbar.
-
- * gui/e-calendar-table.[hc]: we now use an ETableSubsetVariable model
- to filter the tasks by a category. And tidied up a little.
-
- * gui/calendar-model.[hc]: added way to get all the categories used by
- the tasks, so we can show an option menu of them. Also a signal which
- is emitted when they are changed.
- Also allows a default category to be set, which is used to initialize
- the 'click-to-add' row.
- Also made sure the initialize_value()/get_value() functions don't
- return NULL since that can cause a SEGV.
-
- * gui/e-week-view.c:
- * gui/e-day-view.c: set the "fill_color_rgba" arg of the EText items
- to black since it doesn't seem to set up a default color properly.
- Hopefully this fixes the bug on Solaris where the items appear with
- strange colors.
-
- * gui/widget-util.c (date_edit_new): use the calendar_config function
- to set most of the options. It wasn't setting the 12/24 hour option
- before.
-
- * gui/dialogs/task-editor-dialog.glade: added "Undefined" priority.
-
-2001-01-12 Ettore Perazzoli <ettore@helixcode.com>
-
- * gui/component-factory.c (factory_fn): Pass NULL as the
- @copy_folder_fn arg to `evolution_shell_component_new()'.
-
-2001-01-12 Miguel de Icaza <miguel@ximian.com>
-
- * gui/e-calendar-table.c: Add translation strings.
-
-2001-01-08 Iain Holmes <iain@helixcode.com>
-
- * gui/calendar-summary.c (create_summary_view): Add a PropertyControl
- interface to set whether or not to show tasks and appointments. Add
- a PersistStream to remember this.
-
-2001-01-09 Dave Camp <dave@helixcode.com>
-
- * gui/Makefile.am: Replaced e-meet-dialog.glade.h with
- e-meeting-dialog.glade in glade_messages.
-
- * gui/e-meeting-dialog.glade: Enabled the translatable string option.
-
- * gui/e-itip-control.glade: Likewise.
-
-2001-01-09 Federico Mena Quintero <federico@helixcode.com>
-
- * idl/evolution-calendar.idl (AlarmNotify): New interface for the
- alarm notification system.
-
- * gui/alarm-notify: New directory for the alarm notification
- daemon and its auxiliary stuff.
-
- * gui/alarm-notify/alarm.[ch]: Moved over from gui/alarm.[ch].
-
- * gui/alarm-notify/alarm-queue.[ch]: Moved over from
- gui/alarm-notify.[ch]. Renamed functions from alarm_notify_*() to
- alarm_queue_*().
-
- * gui/alarm-notify/alarm-notify.[ch]: Implementation of the
- GNOME::Evolution::Calendar::AlarmNotify interface.
-
- * gui/Makefile.am (evolution_calendar_LDADD): Removed the
- LINK_FLAGS variable and reordered the libraries to remove some
- duplicated ones.
- (SUBDIRS): Added the alarm-notify directory.
-
-2001-01-08 Iain Holmes <iain@helixcode.com>
-
- * gui/calendar-summary.c (generate_html_summary): Get the tasks
- correctly.
- (generate_html_summary): Mark the tasks as completed if so.
-
-2001-01-08 Damon Chaplin <damon@helixcode.com>
-
- * gui/Makefile.am: added new source files for the Tasks folders.
-
- * gui/e-tasks.[hc]: new widget to encapsulate the Tasks view.
-
- * gui/tasks-control.[hc]: new files to implement the Tasks control.
-
- * gui/tasks-control-factory.[hc]: new files to implement the factory
- for the Tasks controls. (I think the way I've split the code up is a
- lot cleaner than the GnomeCal implementation - the factory file just
- contains the factory functions and the control file contains all the
- control functions. Maybe we should make GnomeCal like this.)
-
- * gui/main.c: initialize the Tasks control factory.
-
- * gui/component-factory.c: added support for the Tasks control.
- Also added a "create_folder" function so we can now create new Tasks
- and Calendar folders within Evolution.
- I'm not a Bonobo expert so someone might want to check these over.
-
- * gui/calendar-config.[hc]: added convenience functions to configure
- the common settings of ECalendar and EDateEdit widgets.
-
- * gui/dialogs/task-editor.c (task_editor_create_date_edit):
- * gui/gnome-cal.c (gnome_calendar_update_config_settings):
- * gui/event-editor.c: used function to configure the ECalendars
- and EDateEdits.
-
- * gui/e-day-view-top-item.c (e_day_view_top_item_draw_long_event):
- fixed minor bug in format strings.
-
-2001-01-06 Iain Holmes <iain@helixcode.com>
-
- * gui/calendar-summary.c (generate_html_summary): Neaten the HTML,
- and fix the time printing stuff. Add stuff the get Tasks.
- (alarm_fn): Set up an alarm for midnight everynight and regenerate
- the HTML for the new day.
-
-2001-01-05 JP Rosevear <jpr@helixcode.com>
-
- * gui/event-editor.c (get_widgets): get categories button
- (init_widgets): listen for button click
- (fill_widgets): fill in the categories area
- (dialog_to_comp_object): set the cal component categories
- (categories_clicked): throw up the categories dialog and update
- when ok is clicked
-
- * gui/event-editor-dialog.glade: Add categories and contacts buttons
- and fields
-
- * gui/dialogs/task-editor-dialog.glade: Rename button
-
-2001-01-05 JP Rosevear <jpr@helixcode.com>
-
- * gui/dialogs/task-editor.c (get_widgets): get categories button
- (init_widgets): listen for button click
- (fill_widgets): fill in the categories area
- (dialog_to_comp_object): set the cal component categories
- (categories_clicked): throw up the categories dialog and update
- when ok is clicked
-
- * gui/dialogs/task-editor-dialog.glade: Tweak to name the categories
- button and make it active
-
- * gui/calendar-model.c (get_categories): We can get the string list of
- categories directly now
-
- * cal-util/cal-component.c (cal_component_get_categories): new function
- to get the categories list as a string
- (cal_component_set_categories): same but for setting
- (free_icalcomponent): init the categories var
- (scan_categories): kill
- (scan_property): assign the prop to the categories var
- (cal_component_get_categories_list): deal with renaming var to categories
- (cal_component_set_categories_list): fix brokeness
-
-2001-01-03 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/calendar-commands.c (new_calendar): Handle the case where
- the calendar view cannot be created; present a warning dialog box.
- (new_calendar): Do not show the widget here, since we already show
- it in control-factory.c.
-
- * gui/control-factory.c (control_factory_new_control): Handle the
- case where the calendar view cannot be created.
-
- * gui/component-factory.c (create_view): Ditto.
-
- * gui/calendar-summary.h: Added prototype for
- calendar_summary_factory_init().
-
-2001-01-02 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/alarm-notify.c (add_component_alarms): If the component has
- no alarms, do not try to queue them.
- (remove_client_alarms): New function to remove all the queued
- alarms for a calendar client.
- (alarm_notify_remove_client): Remove the client's alarms.
-
-2001-01-02 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/dialogs/delete-comp.c (delete_component_dialog): Do not
- compose strings so that they can be localized correctly. Also,
- convert from UTF8 into the font's encoding. Fixes bug #1030.
-
- * gui/e-calendar-table.c (delete_component): Pass the widget
- argument to delete_component_dialog().
-
- * gui/e-day-view.c (e_day_view_on_delete_appointment): Likewise.
-
- * gui/e-week-view.c (e_week_view_on_delete_appointment): Likewise.
-
- * gui/event-editor.c (file_delete_cb): Likewise.
-
- * gui/calendar-commands.c: Use BONOBO_UI_VERB() instead of
- BONOBO_UI_UNSAFE_VERB(). Guess what, all of our handler
- signatures were wrong.
-
- * gui/event-editor.c: Likewise.
-
- * gui/dialogs/task-editor.c: Likewise.
-
- * gui/goto-dialog.glade: Added some spacing between the month/year
- widgets and the calendar widget.
-
-2001-01-01 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/gnome-cal.c (gnome_calendar_destroy): Unconditionally remove
- the client from the alarm notification system.
- Removed all the obsolete alarm code.
-
- * gui/event-editor.c: Removed some crufty externs left over from
- Gnomecal.
-
- * gui/calendar-commands.c: #include "goto.h"
- Removed crufty variables left over from Gnomecal.
- (new_calendar): Do not take a full_name parameter.
- (init_username): Removed function.
- (init_calendar): Wheeeeeeee! Removed crufty function.
- (quit_cmd): Removed function.
-
- * gui/print.c (WEEK_STARTS_ON_MONDAY): Made it unconditionally
- FALSE because we do not use the configuration setting anyways.
- Sigh, all the printing code needs to be revamped.
-
-2000-12-26 Iain Holmes <iain@helixcode.com>
-
- * gui/calendar-summary.c (create_summary_view): Create a shared
- BonoboEventSource object.
-
-2000-12-25 Miguel de Icaza <miguel@helixcode.com>
-
- * gui/e-day-view.c (e_day_view_init): Set draw background to FALSE.
- (e_day_view_reshape_long_event): ditto.
- (e_day_view_reshape_day_event): ditto.
-
-2000-12-22 JP Rosevear <jpr@helixcode.com>
-
- * gui/dialogs/delete-comp.c (delete_component_dialog): Clean up
- translatable strings for translators, fixes bug 993
-
-2000-12-22 JP Rosevear <jpr@helixcode.com>
-
- * gui/goto.c (create_ecal): Make sure the current month is shown
- when the dialog pops up.
-
- * gui/goto-dialog.glade: Remove flicker
-
-2000-12-22 JP Rosevear <jpr@helixcode.com>
-
- * pcs/cal-backend-file.c (cal_backend_file_get_alarms_for_object):
- account for the case where there are no alarms, fixes crash
-
-2000-12-22 JP Rosevear <jpr@helixcode.com>
-
- * gui/goto.c (ecal_date_range_changed): New function to keep the
- ecal marked properly
- (create_ecal): move more creation code here, update marks
- (goto_dialog_init_widgets): listen for date_range_changed signal
- in the ecal
-
- * gui/calendar-commands.c (init_calendar): Remove ancient gnomecal
- cruft
-
- * gui/mark.[hc], gui/prop.c: Remove ancient gnomecal code that is
- no longer needed, last bit of bug 904
-
-2000-12-22 JP Rosevear <jpr@helixcode.com>
-
- * gui/goto-dialog.glade.h: translations
-
- * gui/goto-dialog.glade: new glade file for goto dialog
-
- * gui/gnome-cal.c (setup_widgets): Set date navigator attributes
-
- * gui/calendar-commands.h: remove prototype
-
- * gui/goto.h: Add prototype
-
- * gui/Makefile.am: Add glade file stuff
-
- * gui/gnome-cal.c (setup_widgets): Use accessors to configure the
- calendar item properly
-
-2000-12-21 Federico Mena Quintero <federico@helixcode.com>
-
- Alarm trigger queueing for the GUI part.
-
- * gui/alarm-notify.[ch]: New files with the high-level alarm
- notification system; mostly moved over from gnome-cal.c. The
- low-level timer stuff is still in alarm.[ch].
-
- * gui/alarm-notify.c (alarm_notify_init): New function to
- initialize the alarm notification system.
- (alarm_notify_done): New function to shut down the alarm
- notification system.
- (alarm_notify_add_client): New function to start monitoring a
- calendar client for alarm notification.
- (alarm_notify_remove_client): New function to stop monitoring a
- client.
-
- * gui/alarm.h (AlarmDestroyNotify): Also pass in the alarm ID so
- the callback may know which ID is being destroyed.
-
- * gui/alarm.c (clear_itimer): New function.
- (pop_alarm): Use clear_itimer().
- (alarm_done): New function to shut down the timer system.
- (alarm_add): Add some preconditions. Do not call the destroy
- notification function if we could not create the alarm.
- (alarm_ready): Pass the alarm ID to the destroy notify function.
- (alarm_remove): Likewise. Also, add some preconditions.
-
- * gui/gnome-cal.c: Removed the alarm notification functions from
- here since they are now in alarm-notify.c.
- (gnome_calendar_construct): Register the client with
- alarm_notify_add_client().
- (gnome_calendar_destroy): Use alarm_notify_remove_client() to
- unregister the client.
- (obj_updated_cb): Do not do any alarm-related stuff.
- (obj_removed_cb): Likewise.
-
- * gui/main.c (main): Shut down the alarm timer system.
- (main): Initialize and shut down the alarm notification system.
-
- * gui/Makefile.am (evolution_calendar_SOURCES): Added
- alarm-notify.[ch] to the list of sources.
-
- * gui/calendar-model.c (calendar_model_set_cal_client): Only
- connect to the "cal_loaded" signal if the client is not already
- loaded.
-
- * gui/e-day-view.c (e_day_view_set_cal_client): Likewise.
-
- * gui/e-week-view.c (e_week_view_set_cal_client): Likewise.
-
- * gui/e-itip-control.c (update_calendar): Connect to "cal_loaded"
- before issuing the load request.
-
-2000-12-21 Iain Holmes <iain@helixcode.com>
-
- * gui/calendar-summary.c: Updated for new executive summary.
-
- * gui/component-factory.c: Reenabled the summary.
-
- * gui/GNOME_Evolution_Calendar.oafinfo: Added the summary.
-
-2000-12-20 JP Rosevear <jpr@helixcode.com>
-
- * conduits/todo/todo-conduit.h: Fix erroneous documentation
-
- * conduits/todo/todo-conduit.c (comp_from_remote_record): if
- !is_empty_time rather than is_empty_time
- (e_todo_context_new): Return a pointer rather than fill in
- a parameter
- (e_todo_context_foreach_change): Free just the key
- (e_todo_context_destroy): Plug this enormous leakage. I had assumed
- i had done this earlier, which isn't too bright when anything beyond
- 2 minutes ago is fuzzy.
- (comp_from_remote_record): Kill warnings
- (post_sync): Destroy the map later
- (conduit_get_gpilot_conduit): Fix e_todo_context_new params
-
- * conduits/calendar/calendar-conduit.[hc]: Similar to above
-
-2000-12-19 JP Rosevear <jpr@helixcode.com>
-
- * conduits/calendar/calendar-conduit.c: Remove pointless comment
-
- * conduits/todo/todo-conduit.c (is_empty_time): add utility function
- (comp_from_remote_record): use it
-
-2000-12-19 JP Rosevear <jpr@helixcode.com>
-
- * conduits/calendar/calendar-conduit.c (local_record_from_comp):
- Convert cal component strings to pilot character set
- (comp_from_remote_record): vice versa
-
- * conduits/todo/todo-conduit.c: Same as above
-
-2000-12-19 Federico Mena Quintero <federico@helixcode.com>
-
- * pcs/cal-backend-file.c (compute_alarm_range): Fix confusion in
- the way the range is expanded.
-
- * cal-util/cal-component.c (cal_component_alarms_free): Doh,
- alarms->alarms is a list, not a generic pointer. Free it properly.
- (cal_component_free_pilot_id): Removed unused function.
- (cal_component_free_pilot_status): Likewise.
-
- * gui/main.c (init_bonobo): Use VERSION instead of a hardcoded
- string. Pass argc by value, not by reference. Test the return
- value of gnome_init_with_popt_table().
-
- * cal-client/cal-client.c (cal_client_free_alarms): Oops, missed
- implementing this function.
-
- * cal-util/timeutil.c (print_time_t): Better printing format.
- (isodiff_to_secs): Removed unused function.
- (isodiff_from_secs): Removed unused function.
- (time_day_end): Removed crufty part.
- (time_day_begin): Removed crufty part.
- (time_day_hour): Removed unused function.
- (format_simple_hour): Removed unused function.
- (get_time_t_hour): Removed unused function.
- (time_from_start_duration): Removed unused function.
-
- * cal-util/timeutil.h (parse_date): Removed unimplemented, unused
- function prototype.
-
-2000-12-19 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/gnome-cal.c: Removed prototype for setup_alarm to fix a
- warning.
-
-2000-12-18 Federico Mena Quintero <federico@helixcode.com>
-
- Alarm instance generation support for the Wombat.
-
- * idl/evolution-calendar.idl (Cal::CalAlarmInstance): Changed to
- have an alarm UID, the trigger time, and the actual occurrence
- time.
- (Cal::CalComponentAlarms): New structure to hold a pair of a
- component and its alarms that trigger in a particular range of
- time.
- (Cal::getAlarmsInRange): Changed to return a CalComponentAlarmsSeq.
-
- * cal-util/cal-component.h (CalAlarmInstance): New C-side
- structure to match the one on the IDL.
- (CalComponentAlarms): Ditto.
- (CalAlarmAction): Renamed from CalComponentAlarmAction.
- (CalAlarmTriggerType): Renamed from CalComponentAlarmTriggerType.
- Encoded the START and END parameters for the RELATED parameter in
- this enum, too. Added a NONE value for invalid or missing trigger
- specifications.
- (CalComponentAlarmTriggerRelated): Removed.
- (CalAlarmTrigger): Renamed from CalComponentAlarmTrigger. Renamed
- the duration/time fields to rel_duration/abs_time, respectively.
-
- * cal-util/cal-component.c (cal_component_alarm_get_trigger):
- Changed to use the new trigger structure.
- (cal_component_alarm_set_trigger): Likewise.
- (cal_component_alarm_free_trigger): Removed function.
- (cal_component_has_alarms): Count the elements in the
- alarm_uid_hash instead of trying to fetch the first alarm subcomponent.
- (cal_component_alarms_free): New function to free a
- CalComponentAlarms structure.
- (CalComponentAlarmPrivate): Added an uid property pointer.
- (scan_alarm_property): Scan for the our extension UID property.
- (cal_component_alarm_get_uid): New function.
-
- * pcs/cal-backend.h (CalBackendClass): Changed the signatures of
- the ::get_alarms_in_range() and ::get_alarms_for_object() methods.
-
- * pcs/cal-backend.c (cal_backend_get_alarms_in_range): Changed
- signature; use the new method.
- (cal_backend_get_alarms_for_object): Likewise.
-
- * pcs/cal-backend-file.c (compute_alarm_range): New spiffy
- function to compute a range of time for alarm occurrences.
- (add_alarm_occurrences_cb): New function to add alarms for a
- particular occurrence of the component.
- (generate_absolute_triggers): New function to add the absolute
- alarm triggers.
- (generate_alarms_for_comp): New function to generate all the alarm
- instances for a component.
- (cal_backend_file_get_alarms_in_range): Implemented.
-
- * pcs/cal.c (Cal_get_alarms_in_range): Use the new CalBackend API.
- (Cal_get_alarms_for_object): Likewise.
- (build_alarm_instance_seq): Removed old function.
-
- * cal-util/cal-util.c (cal_alarm_instance_list_free): Removed
- function.
-
- * cal-client/cal-client.c (build_component_alarms_list): New
- function to demarshal the component alarms sequence.
- (build_alarm_instance_list): New function to demarshal the alarm
- instances sequence.
- (cal_client_get_alarms_in_range): Updated for the new API.
- (cal_client_get_alarms_for_object): Updated for the new API.
-
- * gui/gnome-cal.c: Temporary #ifdef-ing out of alarm-related stuff
- to make it build.
-
-2000-12-15 Federico Mena Quintero <federico@helixcode.com>
-
- * cal-util/timeutil.[ch] (time_from_isodate): Removed unused
- function, a relic from Gnomecal.
-
-2000-12-15 Dan Winship <danw@helixcode.com>
-
- * cal-util/timeutil.c (time_from_isodate): Fix the sign in the
- HAVE_TM_GMTOFF case
-
-2000-12-15 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/Makefile.am (evolution_calendar_SOURCES): Removed getdate.y.
- We no longer use it; it is a relic from Gnomecal.
-
- * gui/getdate.y: Removed file.
-
-2000-12-14 Federico Mena Quintero <federico@helixcode.com>
-
- Fixes bug #955.
-
- * gui/weekday-picker.c (WeekdayPickerPrivate): Added a field for
- the week_start_day, to be used in the same way as
- calendar-config.h defines it. Removed the week_starts_on_monday
- flag.
- (day_event_cb): Use the week_start_day.
- (colorize_items): Likewise.
- (configure_items): Likewise.
- (weekday_picker_set_week_start_day): New function.
- (weekday_picker_get_week_start_day): New function.
- (weekday_picker_set_week_starts_on_monday): Removed function.
- (weekday_picker_get_week_starts_on_monday): Removed function.
-
- * gui/widget-util.[ch]: New files with utilities for creating or
- configuring widgets.
-
- * gui/widget-util.c (date_edit_new): New function to create an
- EDateEdit configured with the calendar's preferences; moved over
- from event-editor.c.
-
- * gui/event-editor.c (make_recur_weekly_special): Use
- weekday_picker_set_week_start_day() and the corresponding function
- from calendar-config.h.
- (init_widgets): Likewise.
- (make_date_edit_with_time): Removed function.
- (make_recur_ending_until_special): Use date_edit_new().
- (make_date_edit): Likewise.
-
- * gui/dialogs/task-editor.c (task_editor_create_date_edit): Likewise.
-
- * gui/event-editor-dialog.glade: Removed references to
- make_date_edit_with_time(); replace them with make_date_edit().
-
- * gui/Makefile.am (evolution_calendar_SOURCES): Added
- widget-util.[ch] to the list of sources.
-
-2000-12-14 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/e-calendar-table.c (E_CALENDAR_TABLE_SPEC): Reset the widths
- of the columns with pixbufs to the actual pixbufs' sizes; now
- ETable properly computes its column widths so we do not need to
- add extra padding here.
-
-2000-12-14 Dan Winship <danw@helixcode.com>
-
- * gui/calendar-model.c (_XOPEN_SOURCE): #define this to 500, not
- nothing. Also, move this bit after the other #includes to
- prevent potential messiness.
-
-2000-12-13 Federico Mena Quintero <federico@helixcode.com>
-
- * cal-util/cal-component.c (ensure_mandatory_properties): Even
- though icaltime_from_timet() now properly ignores the is_utc
- argument since time_t values *are* in UTC by definition, we were
- passing FALSE for that argument's value in a bunch of places. So
- although it is ignored, changed them to TRUE for consistency.
- Hopefully newer versions of libical will remove that argument
- entirely since it does not make sense to speak of non-absolute
- time_t values.
-
- * cal-util/cal-recur.c (cal_recur_set_rule_end_date): Likewise.
-
- * conduits/calendar/calendar-conduit.c (comp_from_remote_record): Likewise.
-
- * conduits/todo/todo-conduit.c (comp_from_remote_record): Likewise.
-
- * gui/dialogs/task-editor.c (dialog_to_comp_object): Likewise.
-
- * gui/e-day-view.c (e_day_view_on_new_appointment): Likewise.
- (e_day_view_on_delete_occurrence): Likewise.
- (e_day_view_on_unrecur_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_top_canvas_drag_data_received): Likewise.
- (e_day_view_on_main_canvas_drag_data_received): Likewise.
-
- * gui/e-week-view.c (e_week_view_key_press): Likewise.
- (e_week_view_on_new_appointment): Likewise.
- (e_week_view_on_delete_occurrence): Likewise.
- (e_week_view_on_unrecur_appointment): Likewise.
-
- * gui/event-editor.c (simple_recur_to_comp_object): Likewise.
- (recur_to_comp_object): Likewise.
- (dialog_to_comp_object): Likewise.
-
- * gui/gnome-cal.c (gnome_calendar_new_appointment): Likewise.
-
-2000-12-13 Christopher James Lahey <clahey@helixcode.com>
-
- * cal-util/cal-recur.c: #if 0ed cal_obj_date_only_compare_func.
- (cal_object_get_rdate_end): Changed this function to get rid of a
- possible uninitialized error on the rdate function.
-
- * gui/calendar-model.c: Fixed some warnings involving the #define
- _XOPEN_SOURCE lines here.
-
- * gui/component-factory.c: #ifdef WANT_THE_EXECUTIVE_SUMMARYed out
- the summary_factory object since it's unused if
- WANT_THE_EXCUTIVE_SUMMARY is not defined.
-
- * gui/e-day-view.c: #if 0ed out e_day_view_remove_event_cb.
- (obj_updated_cb): #ifndef NO_WARNINGSed out a #warning.
-
- * gui/e-week-view-event-item.c (e_week_view_event_item_draw): Made
- it so that
-
- * gui/e-week-view.c (obj_updated_cb): #ifndef NO_WARNINGSed out a
- #warning.
-
-2000-12-13 JP Rosevear <jpr@helixcode.com>
-
- * conduits/todo/Makefile.am: Revert federico's change for now
- because of libtool limitations with ldadding shared libtool
- libs
-
- * conduits/calendar/Makefile.am: ditto
-
-2000-12-12 JP Rosevear <jpr@helixcode.com>
-
- * gui/dialogs/task-editor.c (task_editor_set_todo_object): Use
- set_title_from_comp
- (save_todo_object): ditto
- (set_title_from_comp): Make sure the title is encoded properly (as in
- event-editor)
-
-2000-12-12 Federico Mena Quintero <federico@helixcode.com>
-
- * cal-util/cal-component.c (get_text_list): Constify for new
- libical API.
- (set_text_list): Likewise.
-
- * cal-util/cal-recur.c (cal_recur_get_rule_end_date): Likewise.
- (cal_recur_set_rule_end_date): Likewise.
-
- * gui/e-itip-control.c (find_attendee): Likewise.
- (pstream_load): Likewise.
-
- * gui/gnome-cal.c (released_event_object_cb): Removed unused function.
-
- * gui/dialogs/task-editor.c (status_string_map): Removed unused
- variable.
-
-2000-12-11 Federico Mena Quintero <federico@helixcode.com>
-
- * cal-util/Makefile.am (test_recur_LDADD): Link to the libical
- shared library.
-
- * cal-client/Makefile.am (client_test_LDADD): Likewise.
-
- * conduits/calendar/Makefile.am (libecalendar_conduit_la_LIBADD):
- Likewise.
-
- * gui/Makefile.am (LINK_FLAGS): Likewise.
-
-2000-12-11 Federico Mena Quintero <federico@helixcode.com>
-
- This is to make things work with libical 0.21helix1 and later.
- Warnings remain because at last libical was constified; will take
- care of those tomorrow.
-
- * cal-util/timeutil.h: #include <ical.h> instead of <icaltypes.h>
-
- * gui/e-itip-control.c: Likewise.
-
- * gui/e-meeting-edit.c: Likewise.
-
- * gui/itip-utils.h: Likewise.
-
- * cal-util/cal-component.c (alarm_uid_from_prop): constify.
- (cal_component_get_status): Updated for new libical API.
- (cal_component_set_status): Likewise.
-
- * gui/calendar-model.c (ensure_task_complete): Removed unused
- status code.
- (ensure_task_not_complete): Update for new status API.
-
- * gui/dialogs/task-editor.c (status_string_to_value): Removed
- function.
- (status_value_to_string): Removed function.
- (status_string_map): Removed variable.
- (fill_widgets): Update for new status API.
- (dialog_to_comp_object): Likewise.
-
-2000-12-11 Damon Chaplin <damon@helixcode.com>
-
- * cal-util/cal-recur.c (generate_instances_for_chunk): updated the
- tests on the start & end time just before calling the callback. It
- was skipping occurrences that started before the required interval's
- start time, which was wrong. We want all occurrences that intersect
- the interval.
- (cal_obj_time_weekday): removed the CalRecurrence* argument, since it
- isn't needed.
-
-2000-12-11 Damon Chaplin <damon@helixcode.com>
-
- * gui/event-editor.c: added changed flags and added calls to a new
- function event_editor_set_changed() to set & reset this flag.
- Added prompt_to_save_changed() which is called when the user
- selects File/Close or the window's close button.
- Fixed the 'All day event' toggle button.
- Made the 'Alarm' page sensitive as appropriate when filling widgets.
- (Though note that the alarm widgets are not being set yet.)
-
- * gui/dialogs/task-editor.c: added changed flag as above.
-
- * gui/event-editor-dialog.glade: used good names for all the
- classification radio buttons so we can access them in the code.
-
- * gui/event-editor.c (init_widgets): use the "show week numbers" config
- option in the recurrence preview calendar.
-
- * gui/e-day-view.c (e_day_view_update_event_label): use 9:00 instead
- of 09:00 in the main view, as we do everywhere else now. It means the
- times won't line up, but they are easier to read which I think is
- better.
- Added support for Page Up/Down, though I think it should move the
- selection rather than just scroll the canvas.
-
- * cal-util/cal-recur.c (generate_instances_for_chunk): removed the
- end parameter since we should be using the chunk end time now.
- Added single_rule parameter for when we are generating the
- occurrences of a single RRULE, in which case the event's start date is
- not included in the occurrences output (unless it results from the
- RRULE expansion). Both of these fix problems when using COUNT.
-
- * gui/gnome-cal.c (gnome_calendar_on_date_navigator_selection_changed):
- fixed bug when checking if the new start day starts on the week start
- day. If you select a complete week it should now show the Week view.
-
-2000-12-08 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/event-editor.c (dialog_to_comp_object): Free the strings we
- get from the editables.
-
- * gui/dialogs/task-editor.c (dialog_to_comp_object): Likewise.
- This sucks; this code should be shared between the two dialogs.
-
-2000-12-08 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/event-editor.c (fill_widgets): Free the dates we get from
- the component.
-
-2000-12-08 JP Rosevear <jpr@helixcode.com>
-
- * gui/e-calendar-table.c (e_calendar_table_init): Attach signal
- handlers to the e_scrolled_table's etable rather than to the
- e_scrolled_table directly
- (e_calendar_table_on_double_click): This signal provides more
- params now
-
-2000-12-07 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/e-calendar-table.c: Got rid of code referencing the
- ETableScrolled proxy functions.
-
-2000-12-07 JP Rosevear <jpr@helixcode.com>
-
- * conduits/calendar/calendar-conduit.c (post_sync): Ugly hack for syncing
- until pcs can be altered (longer term)
-
- * conduits/todo/todo-conduit.c (post_sync): ditto
-
-2000-12-07 Chris Toshok <toshok@helixcode.com>
-
- * cal-client/Makefile.am (client_test_LDADD): add
- EXTRA_GNOME_LIBS.
-
-2000-12-07 JP Rosevear <jpr@helixcode.com>
-
- * pcs/cal-backend.c (cal_backend_compute_changes_foreach_key): Create
- an empty cal component if the object has been deleted.
-
- * idl/evolution-calendar.idl: Bit shift the change type constants
- properly
-
-2000-12-07 Federico Mena Quintero <federico@helixcode.com>
-
- * cal-client/cal-client.c (cal_client_generate_instances): Unref
- the component from the objects list; it got referenced as many
- times as appropriate for the instances list.
-
-2000-12-06 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/event-editor.c (file_delete_cb): Confirm before deleting the
- event.
-
-2000-12-06 JP Rosevear <jpr@helixcode.com>
-
- * gui/e-week-view.c (e_week_view_init): unref the pixbuf when
- finished with it
-
-2000-12-06 Federico Mena Quintero <federico@helixcode.com>
-
- Fixes bug #920.
-
- * gui/e-calendar-table.c (delete_component): New function.
- (e_calendar_table_on_delete_task): Use delete_component().
- (e_calendar_table_on_key_press): Likewise. Also, mark the event
- as handled.
-
- * gui/calendar-model.c (calendar_model_get_component): Renamed
- function from calendar_model_get_cal_object().
- (calendar_model_delete_task): Removed function.
-
- * gui/dialogs/delete-comp.[ch]: New files with the dialog for
- deleting a calendar component.
-
- * gui/e-day-view.c (e_day_view_on_delete_appointment): Confirm
- before actually deleting the appointment.
-
- * gui/e-week-view.c (e_week_view_on_delete_appointment): Likewise.
-
- * gui/dialogs/Makefile.am (libcal_dialogs_a_SOURCES): Added
- delete-comp.[ch] to the list of sources.
-
- * cal-util/cal-component.c (cal_component_destroy): Free the alarm
- UID hash.
-
-2000-12-06 JP Rosevear <jpr@helixcode.com>
-
- * pcs/cal.c (build_change_seq): kill
- (Cal_get_changes): return the corba sequence directly
-
- * pcs/cal-backend.h: update prototype
-
- * pcs/cal-backend.c (cal_backend_compute_changes_foreach_key): Build
- the corba struct rather than the old calobjchange thing
- (cal_backend_compute_changes): ditto. build and return the actual
- corba sequence rather than the list of calobjchanges
- (cal_backend_get_changes): return the corba sequence
-
- * cal-util/cal-util.h: Remove CalObjChange cruft
-
- * cal-util/cal-util.c (cal_obj_change_list_free): Kill
-
-2000-12-06 JP Rosevear <jpr@helixcode.com>
-
- * cal-util/cal-util.c:
-
- * conduits/calendar/calendar-conduit.c (map_name): Update so as not to conflict
- with calendar
- (next_changed_item): update to use CalClientChange instead of CalObjChange
- (compute_status): ditto
- (pre_sync): ditto
- (for_each_modified): since we now have the cal component we can call
- local_record_from_comp directly
-
- * conduits/todo/todo-conduit.c: same as above
-
- * pcs/cal-backend.c: Remove much logging cruft
- (cal_backend_compute_changes): Calculate the changes based on the
- hashed database
- (cal_backend_get_changes): call cal_backend_compute_changes
- (cal_backend_compute_changes_foreach_key): hash callback for
- calculating deletions
-
- * pcs/cal-backend.h: update protype, remove logging cruft from
- object
-
- * pcs/cal.c (build_change_seq): dup the calobj rather than the uid
- now
- (Cal_get_changes): rename from Cal_get_changed_uids
- (cal_get_epv): reflect name change in epv
-
- * cal-util/cal-util.c (cal_obj_change_list_free): update assertion
-
- * cal-util/cal-util.h: CalObjChange now returns the entire ical
- component, update the change types. This should all go away shortly
-
- * idl/evolution-calendar.idl: getChangedUIds -> getChanges.
- CalObjChange now contains the calobj rather than the uid, update
- the change types
-
- * cal-client/cal-client.c (cal_client_get_changes): rename from
- cal_client_get_changed_uids to make idl and addressbook
-
- * cal-client/cal-client.h: Update prototype
-
- * cal-client/cal-client.c (build_change_list): Build a list of
- CalClientChange instead of CalObjChange
-
- * cal-client/cal-client-types.c (cal_client_change_list_free): Free
- a glist of CalClientChanges
-
- * cal-client/cal-client-types.h: New file. Declarations for
- CalClientChange.
-
- * cal-client/Makefile.am: Build new files
-
-2000-12-06 JP Rosevear <jpr@helixcode.com>
-
- * conduits/todo/Makefile.am: Fix my build stupidty READ THE MACRO
-
- * conduits/calendar/Makefile.am: ditto
-
-2000-12-04 JP Rosevear <jpr@helixcode.com>
-
- * gui/e-day-view-time-item.c (e_day_view_time_item_get_column_width):
- Initialize max_large_digit_width to 0 to prevent crazy sizing issues.
-
-2000-12-04 Dan Winship <danw@helixcode.com>
-
- * gui/e-itip-control.c: Remove mysterious #include inserted by
- mmeeks to break the build.
-
-2000-12-01 Federico Mena Quintero <federico@helixcode.com>
-
- Fixes bug #918.
-
- * gui/weekday-picker.c (WeekdayPickerPrivate): Added a field for a
- set of blocked days.
- (weekday_picker_set_blocked_days): New function to configure a set
- of days that cannot be modified by the user.
- (weekday_picker_get_blocked_days): Query function for the above.
- (day_event_cb): Block the appropriate days from being modified.
-
- * gui/event-editor.c (get_start_weekday_mask): New function to
- compute a day mask for the start day of a calendar component.
- (set_recur_special_defaults): New function to set sane defaults
- for the recurrence special widgets.
- (fill_recurrence_widgets): Use set_recur_special_defaults().
- (make_recur_weekly_special): Block the appropriate days.
-
-2000-12-01 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/control-factory.c (set_prop): Removed debugging message.
- (control_factory_init): Ditto.
-
- * gui/calendar-commands.c (calendar_set_uri): Ditto.
-
- * gui/main.c (main): Ditto.
-
- * gui/event-editor.c (set_title_from_comp): New function to
- generate a title and convert it from UTF8 before setting it on the
- window.
- (save_event_object): Uset set_title_from_comp().
- (event_editor_set_event_object): Likewise.
-
-2000-11-30 JP Rosevear <jpr@helixcode.com>
-
- * conduits/todo/todo-conduit.c: Debug message cleanups
- (comp_from_remote_record): Properly set the ical description field
-
- * conduits/calendar/calendar-conduit.c (is_empty_time): New utility
- functions that look for all 0's in a struct tm
- (comp_from_remote_record): use above
- (local_record_from_comp): Correctly set the repeatForever value so
- that we repeat forever instead of a really long time
- (comp_from_remote_record): Only set the cal component recurrence
- until field when repeatForever is 0
-
-2000-11-30 Jesse Pavel <jpavel@helixcode.com>
-
- * gui/e-itip-control.c: fixed a bug that caused the calendar to
- segfault when the iTip control was destroyed.
-
-2000-11-30 JP Rosevear <jpr@helixcode.com>
-
- * conduits/calendar/calendar-conduit.c (local_record_from_comp): Empty
- by_day entries are no longer indicated by ICAL_RECURRENCE_ARRAY_MAX not
- SHRT_MAX. Calculate weekly and monthly by date recurrences properly
- (get_pilot_day): Convert ical day to corresponding integer for pilot day
-
-2000-11-30 JP Rosevear <jpr@helixcode.com>
-
- * conduits/calendar/calendar-conduit.c: Debug message cleanups
- (get_ical_day): Fix off-by-one error which affected weekly occurences.
- (comp_from_remote_record): Monthly by day and by date were reversed
- (nth_weekday): function taken from event-editor.c that encodes BYDAY
- values - this needs to be in libical really.
- (comp_from_remote_record): Don't set the description if the pilot note
- is null. Rejig so that we don't have to free objects.
-
-2000-11-28 Federico Mena Quintero <federico@helixcode.com>
-
- Upgrade of the alarm framework. We now access alarms by a unique
- identifier. This UID is added as an extension property to alarm
- subcomponents when their parent components are scanned by
- CalComponent.
-
- * cal-util/cal-component.c (CalComponentPrivate): Added a hash
- table of alarm UIDs -> alarm properties.
- (cal_component_init): Initialize priv->alarm_uid_hash.
- (free_icalcomponent): Free the elements in the
- priv->alarm_uid_hash.
- (scan_alarm): New function to add scan an alarm subcomponent and
- ensure that it has an alarm UID extension property so that we can
- add it to our mapping table.
- (cal_component_get_first_alarm): Removed function.
- (cal_component_get_next_alarm): Removed function.
- (cal_component_get_alarm_uids): New function.
- (cal_component_get_alarm): New function.
-
-2000-11-28 JP Rosevear <jpr@helixcode.com>
-
- * conduits/todo/todo-conduit.c (local_record_to_pilot_record): Return
- a struct rather than a pointer to a struct
- (compare): local_record_to_pilot_record now returns a struct
- (prepare): ditto
- (free_prepare): remove as per gnome-pilot changes
- (conduit_get_gpilot_conduit): don't listen for free_prepare signal
-
- * conduits/calendar/calendar-conduit.c: Same as above
-
-2000-11-28 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/e-calendar-table.c (E_CALENDAR_TABLE_SPEC): Reformatted the
- table spec to make it easier to read.
-
- * gui/tag-calendar.c: Oops, Damon wrote this, not me. Fixed the
- Authors line.
-
-2000-11-28 Damon Chaplin <damon@helixcode.com>
-
- * gui/e-day-view*.[hc]:
- * gui/e-week-view*.[hc]: finished 12-hour support and tried to tidy
- up & comment the drawing code in places. Also fixed a couple of bugs I
- spotted. All the options on the 'Calendar' page should now work.
-
-2000-11-28 Jesse Pavel <jpavel@helixcode.com>
-
- * gui/e-meeting-edit.c: removed some debugging code that I had,
- which might have caused problems.
-
-2000-11-27 Jesse Pavel <jpavel@helixcode.com>
-
- * gui/calendar-model.c: added a preliminary change to have
- Assigned To-Do items have a corresponding icon.
-
-2000-11-27 JP Rosevear <jpr@helixcode.com>
-
- * conduits/todo/todo-conduit.c (free_prepare): Ditto
-
- * conduits/calendar/calendar-conduit.c (free_prepare): Adjust
- free_prepare to the correct signal parameters. Don't actually
- do anything - there is a semantic discrepancy that needs to be
- resolved.
-
-2000-11-26 Damon Chaplin <damon@helixcode.com>
-
- * gui/e-day-view.c (e_day_view_set_days_shown): == instead of =.
-
-2000-11-26 Damon Chaplin <damon@helixcode.com>
-
- * gui/gnome-cal.c: added more support for config settings.
-
- * gui/e-week-view.[hc]:
- * gui/e-day-view.[hc]: added support for setting - show event end
- times, week start day and 12-hour format (unfinished).
-
- * gui/e-day-view-time-item.c: started 12-hour support.
-
- * gui/tag-calendar.c (prepare_tag): use end_day + 1 since we want to
- include the last day.
-
- * gui/event-editor.c (set_all_day): minor change when turning all_day
- off - set the event end to one hour after the event start if it is on
- or before the start time. Also added more comments to make it a bit
- clearer.
-
- * cal-util/cal-recur.c (cal_obj_time_add_days): use a gint for day
- rather than a guint since we now support -ve days.
- Also fixed bug with weekly recurrences.
-
- * gui/dialogs/task-editor.c (task_editor_create_date_edit): use
- config settings.
-
- * gui/dialogs/cal-prefs-dialog.c (cal_prefs_dialog_update_config):
- updated EDateEdit calls.
-
-2000-11-24 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/e-calendar-table.c (e_calendar_table_init): Unref the ETable
- extras.
-
-2000-11-24 Federico Mena Quintero <federico@helixcode.com>
-
- * cal-util/cal-component.c (free_icalcomponent): DOH, fixed
- reversed test for the presence of the icalcomp's parent. This was
- causing memory leaks in the Wombat and elsewhere.
-
- * pcs/cal-backend.c (cal_backend_set_node_timet): Plug leak.
-
-2000-11-24 Federico Mena Quintero <federico@helixcode.com>
-
- * pcs/cal-backend-file.c (scan_vcalendar): Use the new libical
- external iterators (icalcomponent_begin_component() and friends);
- the internal iterators are deprecated.
-
- * cal-util/test-recur.c (generate_occurrences): Likewise.
-
- * gui/e-itip-control.c (pstream_load): Likewise.
-
- * gui/e-meeting-edit.c (e_meeting_edit): Likewise.
-
- * pcs/cal-backend.c (cal_backend_log_entry): Plug leak.
- (cal_backend_log_sync): Free the entry->uid.
-
- * util/icalendar-save.[ch]:
- * util/icalendar-test.c:
- * util/icalendar.[ch]: Removed obsolete files.
-
-2000-11-21 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/task.xpm: Remove the check because it makes it look like the
- task is already completed. This fixes bug #819.
-
- * gui/task-recurring.xpm: Make it use a prettier overlaid icon.
-
- * gui/task-*.xpm: Made the things look like little spiral-bound
- notebooks.
-
- * gui/e-calendar-table.c (E_CALENDAR_TABLE_SPEC): Make the default
- column order be icon/completed/summary. You may need to erase
- your ~/evolution/config/TaskPad for this to appear.
-
-2000-11-21 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/calendar-model.c (calendar_model_is_cell_editable): The icon
- column is not editable!
-
- * gui/calendar-commands.c (todo_properties_changed): Removed.
- (time_format_changed): Removed.
- (colors_changed): Removed.
-
- * gui/calendar-commands.h:
- * gui/prop.c (prop_apply):
- * gui/calendar-commands.c (init_calendar): Removed the old to-do
- list crap.
-
- * gui/gncal-todo.[ch]: Removed obsolete files.
-
- * gui/Makefile.am (evolution_calendar_SOURCES): Removed gncal-todo.[ch].
-
- * gui/gnome-cal.c (gnome_calendar_todo_properties_changed): Removed.
- (gnome_calendar_time_format_changed): Removed.
- (gnome_calendar_colors_changed): Removed.
-
-2000-11-21 Jesse Pavel <jpavel@helixcode.com>
-
- * gui/e-itip-control.c: fixed the stupid Bonobo widget size
- allocation bug that had been vexing me.
-
- * gui/e-itip-control.glade: I removed some hacks that were
- necessary for said size bug.
-
-2000-11-16 Jesse Pavel <jpavel@helixcode.com>
-
- * gui/e-itip-control.c, gui/e-meeting-edit.c: added cancellation
- code to our program; people can cancel meetings, which is the best
- thing to do for most meetings.
-
-2000-11-13 Jesse Pavel <jpavel@helixcode.com>
-
- * gui/e-itip-control.c: made the REPLY code actually work.
-
-2000-11-13 Jesse Pavel <jpavel@helixcode.com>
-
- * gui/itip-utils.[ch]: I created this file to store some commonly used enumeration to
- string mappings and functions.
-
- * gui/Makefile.am: this was changed to reflect the addition of the above file.
-
- * gui/e-itip-control.c: added code to take action on a REPLY message.
-
- * gui/e-meeting-edit.c: bug fixes.
-
-2000-11-12 Federico Mena Quintero <federico@helixcode.com>
-
- OK, bugzilla bug #829 is fixed and that does not redeem me from
- extreme procrastination. Wheeeeeeeeeeeeeeee!
-
- * gui/event-editor-dialog.c: Changed the "Rule view" label to
- "Preview"
-
-2000-11-12 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/event-editor.c (make_recur_ending_count_special): Misspelled
- "occurrences".
- (fill_recurrence_widgets): Sensitize the "Custom recurrence" radio
- button as appropriate.
- (sensitize_recur_widgets): Resurrected the recurrence custom
- warning label.
- (get_widgets): Load the recurrence custom warning bin.
-
- * gui/event-editor-dialog.glade: Add an empty alignment for the
- recurrence custom warning label.
-
-2000-11-12 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/event-editor.c (recur_preview_date_range_changed_cb): New
- function; re-tag the calendar when its date range changes.
- (init_widgets): Connect to "date_range_changed" on the recurrence
- preview calendar.
- (make_recur_weekly_special): Connect to "changed" on the weekday
- picker.
- (recur_weekday_picker_changed_cb): New function; re-tag the calendar.
- (month_day_menu_selection_done_cb): Re-tag the calendar.
- (recur_month_index_value_changed_cb): Likewise.
- (recur_ending_until_changed_cb): Likewise.
- (recur_ending_count_value_changed_cb): Likewise.
- (make_recur_monthly_special): Connect to "value_changed" on the
- adjustment of the month index.
- (make_recur_ending_until_special): Connect to "changed" on the
- ending-until date picker.
- (make_recur_ending_count_special): Connect to "value_changed" on
- the ending-count adjustment.
- (init_widgets): Set to zero the maximum number of selectable days
- in the recurrence preview calendar. Set the week_start_day from
- the calendar's configuration.
-
-2000-11-12 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/event-editor.c (clear_widgets): Block the signals as appropriate.
- (fill_ending_date): Ditto.
- (fill_recurrence_widgets): Ditto.
- (recurrence_type_toggled_cb): Only sensitize the widgets and
- preview the recurrence if the toggle button is active.
-
-2000-11-12 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/event-editor.c (recur_to_comp_object): Clear the rdate and
- exrule lists from the component if we are setting a simple
- recurrence.
- (recur_to_comp_object): Set the exdate list here instead of in
- dialog_to_comp_object().
- (preview_recur): New function to tag the recurrence preview
- calendar based on the information from the dialog box.
- (fill_exception_widgets): Fill the exception widgets here; moved
- over from fill_widgets().
- (fill_recurrence_widgets): Call preview_recur(). Also, call
- fill_exception_widgets() first of all.
- (recurrence_type_toggled_cb): Call preview_recur().
- (recur_interval_selection_done_cb): Likewise.
- (recur_ending_selection_done_cb): Likewise.
- (recurrence_exception_add_cb): Likewise.
- (recurrence_exception_modify_cb): Likewise.
- (recurrence_exception_delete_cb): Likewise.
- (date_changed_cb): Likewise.
- (recur_interval_value_changed_cb): Likewise, new function.
-
- * gui/tag-calendar.[ch]: New files with utilities for tagging
- calendars. mark.[ch] should go away some day.
-
- * gui/tag-calendar.c (tag_calendar): Moved over from
- gnome_calendar_tag_calendar(). Take in a CalClient instead of a
- GnomeCalendar. Added API docs.
- (tag_calendar_by_comp): New function to tag a calendar based on a
- single calendar component instead of a whole client.
-
- * gui/gnome-cal.c (initial_load): Use tag_calendar_by_client().
- (obj_updated_cb): Likewise.
- (obj_removed_cb): Likewise.
- (gnome_calendar_on_date_navigator_date_range_changed): Likewise.
- (editor_closed_cb): Free the closure.
- (destroy_editor_cb): Renamed from free_uid(). Do not free the
- UID; just unref the event editor. Our destroy handler to it will
- free things properly. This will also cause the corresponding
- calendar client to be unrefed.
- (editor_closed_cb): Use a flag on the GnomeCalendar to decide
- whether to remove the editor from the hash table. This is sort of
- icky.
-
- * gui/calendar-model.c (obj_updated_cb): If the object is new, we
- have to use e_table_model_row_inserted(), not row_changed().
- Thanks to JP Rosevear for reporting this.
-
- * gui/Makefile.am (evolution_calendar_SOURCES): Added
- tag-calendar.[ch] to the list of sources.
-
-2000-11-11 Matt Bissiri <bissiri@eecs.umich.edu>
-
- * gui/evolution-calendar.oafinfo:
- Update the remaining "IDL:Evolution*" to "IDL:GNOME/Evolution*"
- to sync up with yesterday's IDL re-scoping.
-
-2000-11-10 Michael Meeks <michael@helixcode.com>
-
- * gui/Makefile.am ($(IDL_GENERATED)): sort include order.
-
- * pcs/Makefile.am (idl_flags): ditto.
-
-2000-11-10 JP Rosevear <jpr@helixcode.com>
-
- * conduits/calendar/calendar-conduit.c (for_each_modified): Inc the
- iterator before finding the next changed item.
-
- * conduits/todo/todo-conduit.c (for_each_modified): ditto
-
-2000-11-09 Jesse Pavel <jpavel@helixcode.com>
-
- * gui/e-itip-control.c: I wrote the code so that recipients of meeting requests
- can reply appropriately.
-
-2000-11-09 Jesse Pavel <jpavel@helixcode.com>
-
- * gui/e-meeting-edit.c: fixed a bug that would make the calendar segfault
- if the meeting editor were called up twice without first saving the
- component.
-
-2000-11-08 Jesse Pavel <jpavel@helixcode.com>
-
- * gui/e-itip-control.c, gui/e-itip-control.glade: updated the GUI
- to allow the user to add PUBLISHed events to his calendar, and created
- unworking buttons for meeting requests.
-
-2000-11-08 Federico Mena Quintero <federico@helixcode.com>
-
- These changes fix bugzilla bugs #874 and #875.
-
- * cal-util/cal-component.c (cal_component_get_exdate_list): Return
- a list of CalComponentDateTime instead of simple struct
- icaltimetype objects. Exception date properties *can* contain a
- timezone parameter, so we need to include those if they are
- present.
- (cal_component_set_exdate_list): On the input, handle a list of
- CalComponentDateTime structures. On the internals, handle a list
- of struct datetime instead of plain properties.
- (cal_component_free_exdate_list): Handle a list of
- CalComponentDateTime structures.
- (scan_exdate): Create a list of struct datetime structures.
- (free_icalcomponent): Free the exdate_list properly.
-
- * cal-util/cal-recur.c (generate_instances_for_chunk): Use the
- proper types for exception dates.
-
- * gui/comp-util.h:
- * gui/comp-util.c: New files with utilities for manipulating
- calendar component objects.
- (cal_comp_util_add_exdate): New function.
-
- * gui/Makefile.am (evolution_calendar_SOURCES): Added
- comp-util.[ch] to the list of sources.
-
- * gui/e-day-view.c (add_exdate): New convenience function to add
- an exception date to a calendar component.
- (e_day_view_on_unrecur_appointment): Use cal_comp_util_add_exdate().
- (e_day_view_on_delete_occurrence): Likewise.
-
- * gui/e-week-view.c (e_week_view_on_delete_occurrence): Likewise.
- (e_week_view_on_unrecur_appointment): Likewise.
-
- * gui/event-editor.c (nth_weekday): Be paranoid about valid
- position values.
- (fill_widgets): Use the proper types for exdates.
- (dialog_to_comp_object): Likewise.
-
-2000-11-08 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/event-editor.c (adjust_day_index_spin): Adjust the valid
- range of the month index spin button depending on the selection of
- the day/weekday menu.
-
-2000-11-07 Jesse Pavel <jpavel@helixcode.com>
-
- * gui/e-itip-control.c, gui/e-itip-control.glade: changed the GUI,
- and added some extra feedback for the user.
-
-2000-11-07 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/weekday-picker.h (WeekdayPickerClass): Added a "changed"
- signal to notify of changes to the set of selected days.
-
- * gui/weekday-picker.c (weekday_picker_class_init): Create the
- "changed" signal.
- (weekday_picker_set_days): Emit the "changed" signal.
-
-2000-11-06 Jesse Pavel <jpavel@helixcode.com>
-
- * gui/e-itip-control.c, gui/e-itip-control.glade: changed to GUI to
- accomodate dynamically generated buttons, which will be tailored to
- the type of iTip message that is incoming.
-
- * gui/e-meeting-dialog.glade gui/e-meeting-edit.c: added a new button
- to publish events, in addition to requesting meetings.
-
-2000-11-05 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/event-editor-dialog.glade: Removed the old recurrence page.
- Wheeeeeeeeee!
-
- * gui/event-editor.c (make_recurrence_special): Clear the monthly
- widgets.
- (make_recur_monthly_special): Create the monthly widgets.
- (clear_widgets): Clear the monthly values.
- (simple_recur_to_comp_object): Fill in the monthly values.
- (fill_recurrence_widgets): Fill in the monthly and yearly source
- values.
- (dialog_to_comp_object): Take in a CalComponent instead of using
- the event editor's directly.
- (recur_to_comp_object): Likewise.
- (simple_recur_to_comp_object): Likewise.
- (EventEditorPrivate): Removed the widgets from the old recurrence
- page.
- (get_widgets): Likewise.
- (clear_widgets): Likewise.
- (dialog_to_comp_object): If the description or summary are empty,
- just clear the description list or summary property, respectively,
- instead of saving empty ones.
- (simple_recur_to_comp_object): Set the week_start field.
-
- * gui/main.c: Fix includes, and add calendar-config.h.
-
- * gui/Makefile.am (evolution_calendar_SOURCES): The glade messages
- file should not be in SOURCES.
-
-2000-11-05 Christopher James Lahey <clahey@helixcode.com>
-
- * doc/.cvsignore, doc/C/.cvsignore: Removed unnecessary .cvsignore
- files.
-
-2000-11-03 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/event-editor.c (check_all_day): Block signals from the
- toggle button.
- (date_changed_cb): Merged check_dates() and check_times() into
- this function; provide better behavior as well.
- (check_dates): Removed function.
- (check_times): Removed function.
- (init_widgets): Connect to the "changed" signal on the start_time
- and end_time widgets.
- (check_all_day): Use a better test.
-
- * gui/Makefile.am: Clean the idl-generated sources properly.
- * cal-client/Makefile.am: Likewise.
-
-2000-11-03 Jesse Pavel <jpavel@helixcode.com>
-
- * gui/e-itip-control.c: added some checks for the type of an
- incoming iCal component before passing it off to the CalComponent
- routines.
-
-2000-11-02 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/dialogs/task-editor.c (init_widgets): The date editor's
- signal is now "changed".
- (completed_changed): Renamed callback to reflect the name of the
- signal.
-
-2000-11-01 Gediminas Paulauskas <menesis@delfi.lt>
-
- * gui/main.c: (main): added call to bindtextdomain and textdomain, so
- all calendar gui shows up localized.
-
-2000-10-31 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/event-editor.c (count_by_xxx): Hmmm. SHRT_MAX changed to
- ICAL_RECURRENCE_ARRAY_MAX in libical. Deal with it.
- (fill_recurrence_widgets): Likewise.
- (simple_recur_to_comp_object): Fixed incorrect assertion. The
- weekday picker is not the immediate child of the recurrence
- special container.
- (fill_recurrence_widgets): Call make_recurrence_special() after
- setting the recurrence period type.
- (fill_ending_date): Call make_recurrence_ending_special(). This
- would be so much nicer if GTK+ were model/view all over.
-
-2000-10-31 JP Rosevear <jpr@helixcode.com>
-
- * conduits/todo/todo-conduit.h: Remove add/del/mod hashes and
- add changed_hash.
-
- * conduits/calendar/calendar-conduit.h: ditto
-
- * conduits/todo/todo-conduit.c (next_changed_item): Utility function
- to get the next "really" changed item (changed status can be cleared now)
- (compute_status): Compute status based on changed_hash
- (pre_sync): Fill changed_hash and counts adds/mods/dels
- (set_status_cleared): New callback handler - avoid double syncing
- (for_each_modified): Use next_changed_item to iterate
- (add_archive_record): kill
- (delete_archive_record): kill
- (archive_record): New callback handler - mark/unmark archive status
- (conduit_get_gpilot_conduit): Adjust signal connects
-
- * conduits/calendar/calendar-conduit.c: ditto
-
-2000-10-30 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/event-editor.c (sensitize_recur_widgets): New function. We
- split it from the radio callback so that we can call it explicitly
- from fill_recurrence_widgets().
- (fill_recurrence_widgets): Call sensitize_recur_widgets() as
- appropriate.
-
-2000-10-30 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/calendar-commands.c (new_calendar): Removed the geometry and
- hidden arguments. This code is ancient.
- (all_calendars): Made static. This sucks; configuration should be
- notification-based instead of "let's iterate through all open
- calendars".
- (active_calendars): Removed. Functions can check the length of
- the all_calendars list if they are interested.
-
- * gui/event-editor.c (sync_entries): Do not take in an extra data
- pointer.
- (summary_changed_cb): Use a single call back to sync both entries.
- (sync_date_edits): New function to sync two EDateEdit widgets.
- (init_widgets): Connect the general and recurrence starting date
- widgets.
-
-2000-10-27 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/event-editor.c (sync_entries): New function.
- (general_summary_changed_cb): Sync the general summary to the
- recurrence summary widget.
- (recurrence_summary_changed_cb): Vice-versa.
- (init_widgets): Hook to the summaries.
-
- * event-editor-dialog.glade: Do not expand/fill the start and end
- date so that the "all day event" button is not pushed all the way
- to the right.
- Decrease the spacing between the recurrence sentence widgets.
- Remove a spurious empty label that was lurking around the
- recurrence widgets.
- Make the alarm widgets expand the right way.
- Delete old recurrence widgets.
-
-2000-10-27 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/event-editor.c (init_widgets): Connect to the recurrence
- ending menu.
- (recur_ending_selection_done_cb): Implemented.
- (make_recurrence_ending_special): Implemented.
- (make_recur_ending_until_special): Implemented.
- (fill_ending_date): Implemented.
- (make_recur_ending_count_special): Implemented.
- (simple_recur_to_comp_object): Fill in the ending date.
- (clear_widgets): Clear the recurrence ending widgets.
-
- * gui/event-editor-dialog.glade: Moved the recurrence type radio
- buttons to a single hbox to save space.
- Fixed the lower value of the recurrence interval spin button.
- Removed the stale widgets from the recurrence ending date part.
-
-2000-10-27 Jesse Pavel <jpavel@helixcode.com>
-
- * gui/e-meeting-edit.c: fixed problems in which I allocated CORBA
- strings of 0 length, but then didn't NULL terminate them.
-
-2000-10-27 <jpr@helixcode.com>
-
- * conduits/calendar/calendar-conduit.c (check_for_slow_setting):
- Check boundary case of fast sync
-
- * conduits/todo/todo-conduit.c (check_for_slow_setting): ditto
-
-2000-10-27 <jpr@helixcode.com>
-
- * conduits/calendar/calendar-conduit.c (add_archive_record): Remove
- invalid test.
- (local_record_from_comp): If the event is all day, mark it as timeless
- (comp_from_remote_record): Timeless events take up all day
-
- * conduits/todo/todo-conduit.c (add_archive_record): ditto
-
-2000-10-27 JP Rosevear <jpr@helixcode.com>
-
- * conduits/todo/todo-conduit.c (add_archive_record): Take proper
- number of parameters
-
- * conduits/calendar/calendar-conduit.c (add_archive_record): ditto
-
-2000-10-26 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/event-editor.c (EventEditorPrivate): Integrate Anna's new
- recurrence page. Replace the old widget pointers with the new
- ones. Modified the relevant functions accordingly and added
- plenty of new ones.
- (event_editor_get_cal_client): New function.
- (fill_recurrence_widgets): This is *THE* tricky function for you.
- It has to discriminate whether we get a recurrence we support for
- editing or not. And this is not trivial. Sigh.
- (event_editor_update_widgets): Added preconditions and API docs.
-
- * event-editor-dialog.glade: Fixed all the spacings/
- paddings/packing options so that the widgets will look right if
- the dialog box is resized. Also fixes some misaligned widgets.
-
- * cal-util/cal-component.c (cal_component_set_rdate_list): Removed
- incorrect assertion.
-
-2000-10-26 Michael Meeks <michael@helixcode.com>
-
- * pcs/cal-factory.c (str_tolower): unsigned chars to isalpha
-
- * cal-util/calobj.c (weekdaylist, weekdaynum): ditto.
-
-2000-10-25 Jesse Pavel <jpavel@helixcode.com>
-
- * gui/e-meeting-edit.c: brushed up some code to deal with
- the organizer entry, and solidified the CORBA memory-freeing
- issues.
-
-2000-10-25 Jesse Pavel <jpavel@helixcode.com>
-
- * removed the Evolution-Composer generated files, due
- to a tip on how we do things.
-
-2000-10-25 Jesse Pavel <jpavel@helixcode.com>
-
- * gui/e-meeting-edit.c: I fixed a bunch of memory-deallocation
- bugs, and finished the initial integration with the mailer.
-
- * gui/Makefile.am: made the build us the Evolution-Composer.idl
- from the composer directory.
-
-2000-10-25 Jesse Pavel <jpavel@helixcode.com>
-
- * gui/Evolution-Composer.idl: added this from the composer IDL sources
-
- * gui/Makefile.am: changed to reflect the above IDL and the associated
- orbit-idl generated files.
-
- * gui/Evolution-Composer.h,
- gui/Evolution-Composer-common.c,
- gui/Evolution-Composer-stubs.c,
- gui/Evolution-Composer-skels.c:
- the generated files, as per the above description.
-
- * gui/e-meeting-edit.c: more work towards mailer integration.
-
-2000-10-24 Jesse Pavel <jpavel@helixcode.com>
-
- * gui/e-meeting-edit.c: I've added code to interact with the mailer's
- CORBA interfaces, though it's not yet working.
-
-2000-10-23 JP Rosevear <jpr@helixcode.com>
-
- * conduits/todo/todo-conduit.c (local_record_from_comp): Use
- new e-pilot-map lookup function
- (match): ditto
-
- * conduits/calendar/calendar-conduit.c (local_record_from_comp): Use
- new e-pilot-map lookup function
- (match): ditto
-
-2000-10-23 Dan Winship <danw@helixcode.com>
-
- * pcs/Makefile.am (INCLUDES):
- * gui/dialogs/Makefile.am (INCLUDES):
- * gui/Makefile.am (INCLUDES):
- * cal-util/Makefile.am (INCLUDES):
- * cal-client/Makefile.am (INCLUDES): Update GNOMELOCALEDIR.
-
-2000-10-23 JP Rosevear <jpr@helixcode.com>
-
- * conduits/todo/todo-conduit.h: Use new libeconduit calls and
- abstraction
-
- * conduits/calendar/calendar-conduit.c: ditto
-
- * conduits/calendar/calendar-conduit.h: ditto
-
- * conduits/todo/todo-conduit.c: ditto
-
- * conduits/calendar/Makefile.am: Add libeconduit-static.la
-
- * conduits/calendar/calendar-conduit.c (post_sync): Use e_pilot_map_write
- (pre_sync): Use e_pilot_map_read
-
-2000-10-23 JP Rosevear <jpr@helixcode.com>
-
- * conduits/todo/Makefile.am: Add libeconduit-static.la
-
- * conduits/todo/todo-conduit.c (post_sync): Use e_pilot_map_write
- (pre_sync): Use e_pilot_map_read
-
-2000-10-21 Damon Chaplin <damon@helixcode.com>
-
- * gui/dialogs/cal-prefs-dialog.c
- (cal_prefs_dialog_use_24_hour_toggled): removed debug message.
-
- * gui/e-calendar-table.c (e_calendar_table_save_state): new function
- to save the state of the table to a given file.
-
- * gui/e-calendar-table.h (struct _ECalendarTable): added etable field
- so we can access it to save the state.
-
- * gui/gnome-cal.c (gnome_calendar_destroy): call
- e_calendar_table_save_state() to save the state of the TaskPad.
- (setup_widgets): load the state of the TaskPad.
-
- * gui/calendar-config.c: added support for the default view.
-
- * gui/gnome-cal.c (gnome_calendar_construct):
- (gnome_calendar_set_view_internal): use/set the default view setting.
-
-2000-10-20 Jesse Pavel <jpavel@helixcode.com>
-
- * gui/e-meeting-editor.c: added more (working) integration with the
- meeting schedular.
-
-2000-10-20 Jesse Pavel <jpavel@helixcode.com>
-
- * cal-utils/cal-component.c: in set_datetime(), I put an #if 0'd portion
- of the code back into operation, because the icalproperty_remove_parameter()
- function is now implemented.
-
- * gui/e-meeting-editor.c: added more (unworking) integration with the
- meeting schedular.
-
-2000-10-20 JP Rosevear <jpr@helixcode.com>
-
- * pcs/cal-backend.c (cal_backend_destroy): New destroy
- handler to properly stop the timer, sync the log and unref
- the URI.
- (cal_backend_last_client_gone): Just emit the signal,
- clean up work is done in cal_backend_destroy now.
-
- * pcs/cal-backend-file.c (cal_backend_file_load): Unref the
- uri we are replacing NOT the new uri.
-
-2000-10-20 JP Rosevear <jpr@helixcode.com>
-
- * conduits/todo/Makefile.am: Fix build
-
- * conduits/calendar/Makefile.am: Fix build
-
-2000-10-20 JP Rosevear <jpr@helixcode.com>
-
- * conduits/calendar/calendar-conduit.c (delete_archive_record):
- Don't throw an error
-
- * conduits/todo/todo-conduit.c (delete_archive_record): ditto
-
-2000-10-20 JP Rosevear <jpr@helixcode.com>
-
- * conduits/todo/todo-conduit-control-applet.c: Add defines
-
- * conduits/todo/todo-conduit-config.h: put #ifdefs around functions
- can't make this a public interface in the usual way as then the
- symbols would be exported
-
- * conduits/todo/todo-conduit.c: Kill warnings. clahey will be
- happy! Add some defines to include only the necessary config functions.
- (conduit_get_gpilot_conduit): Hook up archive signals
-
- * conduits/calendar/calendar-conduit.c: Same as above
-
- * conduits/calendar/calendar-conduit-control-applet.c: ditto
-
- * conduits/calendar/calendar-conduit-config.h: ditto
-
-2000-10-20 Michael Meeks <michael@helixcode.com>
-
- * gui/calendar-commands.h: s/BonoboUIHandler/BonoboUIComponent/
-
- * gui/calendar-commands.c (properties_cmd): ditto.
-
-2000-10-20 Damon Chaplin <damon@helixcode.com>
-
- * gui/calendar-model.c (calendar_model_value_at): use
- cal_component_has_alarms().
-
-2000-10-20 Damon Chaplin <damon@helixcode.com>
-
- * gui/e-calendar-table.c (E_CALENDAR_TABLE_SPEC): added
- _click-to-add-message, though I'm not sure if i18n will work.
-
- * cal-util/cal-recur.c (cal_obj_time_add_hours):
- (cal_obj_time_add_minutes):
- (cal_obj_time_add_seconds): updated to handle -ve args.
-
- * cal-util/timeutil.c (time_add_day): set tm_isdst to -1 before calling
- mktime().
-
- * cal-util/cal-recur.c (generate_instances_for_chunk): don't call the
- callback if the event ends exactly on the interval start time.
-
- * gui/e-week-view.c (e_week_view_reshape_event_span):
- * gui/e-week-view-event-item.c (e_week_view_event_item_draw_icons):
- * gui/e-day-view-top-item.c (e_day_view_top_item_draw_long_event):
- * gui/e-day-view-main-item.c (e_day_view_main_item_draw_day_event):
- * gui/e-day-view.c (e_day_view_reshape_long_event):
- (e_day_view_reshape_day_event): use cal_component_has_alarms().
-
- * cal-util/cal-component.[hc]: added cal_component_has_alarms().
-
-2000-10-16 Damon Chaplin <damon@helixcode.com>
-
- * gui/calendar-config.c (config_read): set default MonthVPanePosition
- to 1 rather than 0, so if you move the hpane you'll see the date
- navigator.
-
-2000-10-19 Jesse Pavel <jpavel@helixcode.com>
-
- * gui/event-editor.[ch]: added a public function which causes the
- event editor to reload its widgets to the associated CalComponent.
-
- * gui/e-meeting-edit.c: added rudimentary support for the phat
- e-meeting-time-selector widget, though it has no effect on the
- component yet.
-
- * gui/Makefile.am: the meeting editor depends on the meeting widget
- library, now.
-
- * gui/e-itip-control.glade: I added another toolbar button that summons
- from the hoary deep the meeting time widget.
-
-2000-10-19 Ettore Perazzoli <ettore@helixcode.com>
-
- * gui/Makefile.am: Add `event-editor-dialog.glade.h'.
- (EXTRA_DIST): Add `$(glade_messages)'.
-
-2000-10-19 Michael Meeks <michael@helixcode.com>
-
- * gui/calendar-commands.c (tb_print_cb): remove; redundant.
-
- * gui/event-editor.c (create_menu, create_toolbar): kill.
- (event_editor_destroy): upd.
- (event_editor_construct): update to new UI handler, cast
- priv->general_summary to a widget not an object.
-
-2000-10-18 Michael Meeks <michael@helixcode.com>
-
- * gui/dialogs/task-editor.c (create_menu, create_toolbar): die.
- (debug_xml_cb): add debugging hook.
-
- * gui/dialogs/Makefile.am: add EVOLUTION_DATADIR
-
- * gui/dialogs/task-editor.c (task_editor_construct): upd for new UI.
-
-2000-10-17 JP Rosevear <jpr@helixcode.com>
-
- * conduits/todo/todo-conduit-control-applet.c: Add defines
-
- * conduits/todo/todo-conduit-config.h: put #ifdefs around functions
- can't make this a public interface in the usual way as then the
- symbols would be exported
-
- * conduits/todo/todo-conduit.c: Kill warnings. clahey will be
- happy! Add some defines to include only the necessary config functions.
- (conduit_get_gpilot_conduit): Hook up archive signals
-
- * conduits/calendar/calendar-conduit.c: Same as above
-
- * conduits/calendar/calendar-conduit-control-applet.c: ditto
-
- * conduits/calendar/calendar-conduit-config.h: ditto
-
-2000-10-16 Jesse Pavel <jpavel@helixcode.com>
-
- * gui/e-itip-control.c: You can now add incoming iTip
- messages to your calendar store.
-
- * gui/e-itip-control.glade: added a progress bar dialog
- in case the calendar loading takes a long time.
-
-2000-10-16 JP Rosevear <jpr@helixcode.com>
-
- * cal-client/cal-client.h: Remove pilot cruft. All pilot stuff
- is in the conduits now and uses the logging facility.
-
- * pcs/cal-backend-file.c: ditto
-
- * pcs/cal-backend.h: ditto
-
- * pcs/cal-backend.c: ditto
-
- * pcs/cal.c: ditto
-
- * pcs/cal.h: ditto
-
- * idl/evolution-calendar.idl: ditto
-
- * cal-util/cal-component.h: ditto
-
- * cal-util/cal-component.c: ditto
-
- * cal-client/cal-client.c: ditto
-
- * conduits/calendar/calendar-conduit.c (local_record_from_comp):
- Take a stab at storing recurrence stuff on the pilot properly
-
- * pcs/cal-backend.c (cal_backend_update_object): Don't log the
- event until after the update in case its a new item
-
-2000-10-16 Tuomas Kuosmanen <tigert@helixcode.com>
-
- * gui/dayview.xpm, gui/workweekview.xpm, gui/weekview.xpm
- gui/monthview.xpm gui/yearview.xpm: Updated icons, let me know
- if you like these or not, I might work on these some more but
- I wanted to put these versions up anyway to get feedback..
-
-2000-10-15 Dan Winship <danw@helixcode.com>
-
- * gui/Makefile.am: Remove CPPFLAGS def since the -D there was
- already in INCLUDES
-
-2000-10-14 Ettore Perazzoli <ettore@helixcode.com>
-
- * gui/evolution-calendar.oafinfo: Added an
- "evolution:shell-component-icon" attribute.
-
-2000-10-12 Jesse Pavel <jpavel@helixcode.com>
-
- * gui/e-itip-control.{c,glade}: Made the control much more
- relavent to the function at hand.
-
-2000-10-12 Damon Chaplin <damon@helixcode.com>
-
- * gui/e-calendar-table.c (E_CALENDAR_TABLE_SPEC): set the 2 icon
- columns to a min width of 18 and resizable to FALSE.
-
-2000-10-12 Damon Chaplin <damon@helixcode.com>
-
- * gui/calendar-commands.c (calendar_control_activate):
- (update_pixmaps):
- (set_pixmap): set the pixmaps of the toolbar buttons for the views,
- and removed a lot of old unused stuff. We'll use plain buttons for
- the view buttons for now, until Bonobo toolbars support radio buttons.
-
- * gui/gnome-cal.c (gnome_calendar_dayjump): check day_button is not
- NULL before using it.
- (gnome_calendar_update_view_buttons): check button is not NULL.
-
-2000-10-11 Damon Chaplin <damon@helixcode.com>
-
- * gui/e-day-view-time-item.c (e_day_view_time_item_draw): got 12/24
- hour format the wrong way round.
-
-2000-10-12 JP Rosevear <jpr@helixcode.com>
-
- * conduits/calendar/calendar-conduit.c (comp_from_remote_record):
- Store recurrence stuff on the desktop properly
- (get_ical_day): Utility function
-
-2000-10-12 Iain Holmes <iain@helixcode.com>
-
- * gui/component-factory.c: Disable the executive summary.
-
-2000-10-11 JP Rosevear <jpr@helixcode.com>
-
- * pcs/cal-backend.c (cal_backend_log_entry): Take CalObjType
- as a param because its impossible to determine after a delete.
- (cal_backend_remove_object): Calculate CalObjType and pass
- it to cal_backend_log_entry
- (cal_backend_update_object): ditto
-
- * conduits/todo/todo-conduit.c (local_record_from_comp): Kill
- unused variables.
- (add_archive_record): Don't kill the sync if this happens
- (update_record): Kill old function
- (replace_record): New function to handle replace_record signal
- (conduit_get_gpilot_conduit): Listen for replace record signal
- (add_record): Always add a new record, never replace
- (replace_record): Always replace an existing record
-
- * conduits/calendar/calendar-conduit.c: Same as above
-
-2000-10-10 Jesse Pavel <jpavel@helixcode.com>
-
- * gui/e-itip-control.c: set a default size for the control.
-
-2000-10-10 Jesse Pavel <jpavel@helixcode.com>
-
- * gui/evolution-calendar.oafinfo: Added information about the
- text/calendar MIME type, so that the evolution-calendar is called
- to deal with iMIP attachments.
-
- * gui/e-itip-control.[ch]: These files implement a Bonobo
- control that will eventually deal with iMIP/iTIP messages from
- the mailer. Right now, it's not working.
-
- * gui/e-itip-control.glade: The Glade GUI for the above-mentioned
- control.
-
- * gui/Makefile.am: added references to the files I created.
-
- * gui/main.c: called the initialization function of the Bonobo
- control factory.
-
-2000-10-11 Tuomas Kuosmanen <tigert@helixcode.com>
-
- * gui/task-assigned-to.xpm gui/task-assigned.xpm
- gui/recur.xpm gui/task-recurring.xpm gui/task.xpm:
- New versions of the icons for the tasklist/pad.
-
-2000-10-11 Damon Chaplin <damon@helixcode.com>
-
- * gui/component-factory.c (owner_unset_cb): don't free evolution_dir
- as we need it to save the config settings.
-
-2000-10-11 Damon Chaplin <damon@helixcode.com>
-
- * gui/main.c (main): call calendar_config_write_on_exit() to write
- out some special config settings (as the mail component does).
-
- * gui/calendar-commands.c (properties_cmd): changed to use the new
- preferences dialog.
- (update_all_config_settings): new function to iterate over all the
- calendars and update the config settings.
-
- * gui/dialogs/cal-prefs-dialog.glade: preferences dialog.
-
- * gui/dialogs/cal-prefs-dialog.[hc]: new files for the preferences
- dialog.
-
- * gui/calendar-config.[hc]: new files to handle loading/saving config
- settings.
-
- * cal-util/cal-recur.c: fixed bug in YEARLY when no filters were set,
- plus minor changes.
-
- * cal-util/test-recur.c: updated.
-
- * gui/e-day-view-time-item.c:
- * gui/popup-menu.c: update to #include <gal/widgets/e-gui-utils.h>
-
- * gui/component-factory.c (owner_set_cb): called calendar_config_init.
- (owner_set_cb):
- (owner_unset_cb): updated the prototypes.
-
- * gui/main.c (main): added call to calendar_config_write_on_exit().
-
- * gui/component-factory.h:
- * gui/component-factory.c (owner_set_cb): added global evolution_dir
- just like the mail component, so we know we to store config stuff.
-
-2000-10-11 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/e-calendar-table.c: Fixed the column elements here.
-
-2000-10-11 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/e-calendar-table.c: Updated to use the new ETable
- specification stuff.
-
-2000-10-11 JP Rosevear <jpr@helixcode.com>
-
- * conduits/todo/todo-conduit.c (map_sax_start_element): The
- element is "pilot_id" not "pilotid". Update both maps
- (compute_pid): Utility function to set a local records pid
- (local_record_from_comp): Compute the pid and status here,
- no longer use the old cal_component pilot interfaces
- (free_match): Its a *local not a **local
-
- * conduits/calendar/calendar-conduit.c: same as above
-
- * conduits/todo/todo-conduit.h: Have both a uid and pid map
-
- * conduits/todo/calendar-conduit.h: same as above
-
-2000-10-09 JP Rosevear <jpr@helixcode.com>
-
- * conduits/*: Adjust to using gnome-pilot-sync-abs conduit which
- is based on the latest pilot link changes.
-
-2000-10-09 Iain Holmes <iain@helixcode.com>
-
- * Makefile.am: Added the executive-summary library and cflags
-
- * gui/evolution-calendar.oafinfo: Added oaf servers for the
- executive summary and executive summary factory.
-
- * gui/calendar-summary.[ch]: New files to create the summary.
-
- * gui/component-factory.c (summary_fn): Create the executive
- summary component.
- (component_factory_init): Start the summary factory as well.
-
-2000-10-06 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/weekday-picker.[ch]: New widget to pick weekdays.
-
-2000-10-05 Michael Meeks <michael@helixcode.com>
-
- * gui/calendar-commands.c: upd.
- (calendar_control_activate): upd.
- (calendar_control_deactivate): upd.
-
-2000-10-05 Damon Chaplin <damon@helixcode.com>
-
- * gui/e-day-view.c:
- * gui/e-week-view.c: when the user types in a new event, don't create
- it until the user hits Return or switches focus. Removed the
- editing_new_event flags.
-
- * cal-util/test-recur.c: rewritten to work on ics files. Now I can
- start testing the recurrence code.
-
- * cal-util/cal-recur.c: a few fixes.
-
- * gui/e-day-view.c (e_day_view_check_if_new_event_fits): fixed to
- return TRUE for long events, not FALSE.
-
-2000-10-04 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/print.c (print_todo_details): As a temporary solution to the
- to-do printing, just print the summaries. We'll use the ETable
- printing stuff later.
-
- * gui/print.c (print_day_summary_cb): Use g_list_append() correctly.
- (print_todo_details_cb): Likewise.
- (print_day_summary): Initialize psi.events. This code was
- obviously never tested.
- (print_todo_details): Likewise.
- (print_day_details): Initialize pdi.slots.
-
- * gui/print.c (range_selector_new): Fix strftime() %a versus %b
- confusion. Fixes bugzilla #644.
- (range_selector_new): Fix the whole localization mess by making
- better use of strftime(). Now we generate whole date strings at a
- time and compose them later. Fixes bugzilla #643.
-
-2000-10-02 Jesse Pavel <jpavel@helixcode.com>
-
- * gui/e-meeting-edit.c: added support for the ROLE and RSVP parameters
- in both the GUI and underlying iCal.
-
-2000-09-29 Jesse Pavel <jpavel@helixcode.com>
-
- * gui/e-meeting-edit.c: added support for organizers in the meeting
- scheduler.
-
-2000-09-29 Jesse Pavel <jpavel@helixcode.com>
-
- * gui/e-meeting-edit.c: added code that makes changes to the underlying
- iCAL structure of an event, when the user changes meeting information.
-
- * gui/e-meeting-dialog.glade: this is the Glade UI for the meeting dialog
- and accoutrements.
-
-2000-09-29 Damon Chaplin <damon@helixcode.com>
-
- * cal-util/cal-recur.c: updated to support RDATE end times or
- durations. Note that if you have two RDATEs with the same start times,
- but with different end dates/durations set, the results are
- unpredictable. So the event editor dialog should check for this.
-
- * gui/e-week-view-main-item.c (e_week_view_main_item_draw_day):
- make strftime() strings translatable, and changed the formats a bit.
-
- * NOTE: someone needs to check print.c to make sure strftime strings
- are OK for i18n.
-
- * gui/e-day-view.h: Changed EDayViewDateFormat enum. We now try to
- include the weekday if possible. Also changed EDayView struct so we
- store the month & weekdays with the longest names rather than the
- actual widths. This helps i18n.
-
- * gui/e-day-view.c (e_day_view_recalc_cell_sizes): used _() for
- strftime strings, tried to see if weekday fits, and rearranged a
- bit to make i18n easier.
-
- * gui/e-day-view-top-item.c (e_day_view_top_item_draw): used _() for
- strftime strings, and updated to use new formats.
-
- * gui/calendar-model.c: added use_24_hour_format boolean to
- CalendarModelPrivate so we can display dates in 12-hour format if
- requested. This meant adding a CalendarModel argument to a few
- functions. Also added get/set functions to set use_24_hour_format.
- I suppose ideally we should have an ECellDate renderer and this option
- should go there.
-
-2000-09-27 Jesse Pavel <jpavel@helixcode.com>
-
- * gui/event-editor.c: changed a menu entry so that it will invoke
- my meeting editor.
-
- * gui/e-meeting-edit.[ch]: added these files to provide preliminary
- support for iTIP meeting scheduling. Currently, only the GUI works;
- there is not yet any backend support.
-
- * gui/Makefile.am: added entries for e-meeting-edit.[ch]
-
-2000-09-24 Damon Chaplin <damon@helixcode.com>
-
- * gui/dialogs/task-editor-dialog.glade: set the height of the scrolled
- window for the description field, since the default window height
- doesn't seem to be working.
-
- * cal-util/cal-component.h: added functions to get the actual
- icalproperty lists for RRULE and EXRULE properties.
-
- * cal-util/cal-recur.[hc]: added support for COUNT, though I need to
- test it a bit. Also fixed the call to generate_instances_for_year() so
- it uses the chunk dates.
-
-2000-09-20 Damon Chaplin <damon@helixcode.com>
-
- * gui/event-editor.c: got rid of 1 '_' in '__Formatting'.
-
-2000-09-22 Michael Meeks <michael@helixcode.com>
-
- * gui/calendar-commands.c (calendar_control_activate): upd.
-
-2000-09-21 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/calendar-commands.c (verbs): Removed the "about calendar"
- command, since we don't want to have both "About Evolution" and
- "About Calendar".
-
-2000-09-21 Michael Meeks <michael@helixcode.com>
-
- * gui/calendar-commands.c (calendar_control_activate): _UIHandler
- update.
-
-2000-09-20 JP Rosevear <jpr@helixcode.com>
-
- * conduits/todo/todo-conduit.c (pre_sync): Don't fail if there
- is no map file.
-
-2000-09-20 JP Rosevear <jpr@helixcode.com>
-
- * conduits/todo/todo-conduit.h: Add since field to context
-
- * conduits/todo/todo-conduit.c (map_set_node_timet): New utility
- function
- (map_sax_start_element): Look for the map timestamp as well
- (map_write): Write the map timestamp
- (pre_sync): Use the map time stamp when looking for changed entries
-
- * pcs/cal-backend.c (cal_backend_log_sax_start_element): Make sure
- we are in a valid timestamp
-
-2000-09-20 JP Rosevear <jpr@helixcode.com>
-
- * pcs/cal-backend.c (cal_backend_log_name): Make the log file
- name relevant to the actual calendar file, rather than just the
- directory.
-
-2000-09-20 JP Rosevear <jpr@helixcode.com>
-
- * pcs/cal-backend.c (cal_backend_get_log_entries): Oops
-
-2000-09-20 JP Rosevear <jpr@helixcode.com>
-
- * pcs/cal-backend.c (cal_backend_get_log_entries): Use a local
- sax handler.
-
- * conduits/todo/todo-conduit.c (pre_sync): Use xmlSAXParseFile
- (map_sax_parse): Delete
-
-2000-09-20 JP Rosevear <jpr@helixcode.com>
-
- * pcs/cal-backend.c (cal_backend_log_sax_start_element): Properly
- assign the CalObjChange type.
- (cal_backend_log_sax_parse): Delete
- (cal_backend_get_log_entries): Use xmlSAXUserParseFile
-
-2000-09-19 JP Rosevear <jpr@helixcode.com>
-
- * pcs/cal-backend.c (cal_backend_set_uri): New utility function
- (cal_backend_load): use above
- (cal_backend_create): use above
- (cal_backend_log_name): Take a uri instead of a backend param
-
- * pcs/cal-backend-file.c: Get rid of useless hash functions
- (cal_backend_file_load): Check to make sure path exists and is
- local
- (cal_backend_file_load): Unref the current uri if there is one
- (cal_backend_file_create): ditto
-
- * pcs/cal-backend.c (cal_backend_last_client_gone): Sync before
- shooting ourselves in the foot
-
- * pcs/cal-backend-file.c (save): Fully implement backing up the
- calendar before writing out the new entry.
-
-2000-09-19 JP Rosevear <jpr@helixcode.com>
-
- * conduits/todo/todo-conduit.c (check_for_slow_setting): Add some
- other cases where a slow sync is in order
- (pre_sync): Pre load the uids, the map and the add/mod/del lists
- (match_record): Use the map hash to match records
- (iterate): Iterate using the pre-loaded uid list
- (iterate_specific): Iterate using the add/mod/del lists
- (purge): Delete all entries in the del list
- (set_status): Set status by adding to an appropriate list
- (set_pilot_id): Set pilot_id by updating map hash
-
- * conduits/todo/todo-conduit.h: Add lists for added, modified and
- deleted objects
-
- * conduits/todo/todo-conduit.c (map_name): Get the pilot_id->uid map
- file name
- (map_sax_start_element): SAX handler to extract a pilot_id->uid
- mapping
- (map_sax_parse): Parse the given file and build a pilot_id->uid hash
- (map_write_foreach): Write out individual mapping elements
- (map_write): Write out the pilot_id->uid mapping
- (start_calendar_server_cb): Rename from gnome_calendar_load_cb
-
- * conduits/todo/todo-conduit-config.h: Rename pilotID to pilot_id
-
- * conduits/todo/e-todo.conduit.in: A little renaming
-
- * conduits/todo/Makefile.am: Fix build slightly
-
- * pcs/cal.c (build_change_seq): Build a corba sequence out of a list
- of CalObjChanges
- (Cal_get_objects_in_range): Implement new corba function
-
- * pcs/cal-backend.c (cal_backend_init): Intiliaze to NULL
- (cal_backend_load): Track the uri so we can write the log file
- to the same place
- (cal_backend_log_name): Figure out the log filename/path based on
- the calendar uri
- (cal_backend_set_node_timet): Set an xml node property value from
- a time_t
- (cal_backend_log_entry): Adds a log entry to list waiting to be written
- out
- (cal_backend_log_sync): Syncs the log entries to disk
- (cal_backend_log_sax_start_element): SAX callback for reading in
- log entries
- (cal_backend_log_sax_end_element): ditto
- (cal_backend_log_sax_parse): Main SAX parser call to parse the log
- file looking for particular log entries and creating a CalObjChange
- hash with the last change for each object
- (cal_backend_get_log_entries): Returns a hash of objects of a given
- type changed since the given time
- (cal_backend_update_object): Add appropriate log entries
- (cal_backend_remove_object): ditto
- (cal_backend_get_changed_uids): Implement new idl interface call
- (cal_backend_foreach_changed): Convert CalObjChange hash into a list
-
- * pcs/cal-backend-imc.[hc]: Remove crufty files
-
- * pcs/cal-backend-file.c (cal_backend_file_get_type_by_uid): New
- function that returns the CalObjType for a uid.
-
- * cal-client/cal-client.h: Update prototypes.
-
- * cal-client/cal-client.c (build_change_list): Build a list
- of CalObjChange items from a corba sequence.
- (cal_client_get_changed_uids): New accessor method for the
- similarly named addition to the idl file.
-
- * cal-util/cal-util.h: Update prototypes and add CalObjChangeType
- enum.
-
- * cal-util/cal-util.c (cal_obj_change_list_free): New utility
- method to free a list of CalObjChange objects.
-
- * idl/evolution-calendar.idl: Add get_changed_uids method
- and associated types.
-
-2000-09-18 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/Makefile.am: Added $(EXTRA_GNOME_CFLAGS) and
- $(EXTRA_GNOME_LIBS). Removed unneeded libraries.
-
- * gui/calendar-model.h, gui/e-calendar-table.c, gui/e-day-view.c,
- gui/e-week-view-event-item.c, gui/e-week-view.c,
- gui/event-editor.c, gui/gncal-todo.c, gui/gnome-cal.c, gui/main.c,
- gui/print.c, gui/dialogs/task-editor.c: Fixed the #include lines
- to deal properly with gal.
-
- * gui/check-filled.xpm: New file since we can't include it from
- e-table anymore.
-
-2000-09-16 Michael Meeks <michael@helixcode.com>
-
- * gui/Makefile.am (INCLUDES): add datadir
-
- * gui/calendar-commands.c (calendar_control_activate): use it.
-
-2000-09-14 JP Rosevear <jpr@helixcode.com>
-
- * conduits/todo/.cvsignore: Shush
-
-2000-09-14 JP Rosevear <jpr@helixcode.com>
-
- * Add headers with GPL notice and credit copyright to those appropriate
-
- * conduits/todo/todo-conduit-control-applet.c (doHelp): Update name,
- authors, copyright for about dialog.
- (activate_sync_type): Tidy
-
- * conduits/todo/Makefile.am: Rename binaries and libs to e-todo*
- to avoid conflicts.
-
- * conduits/todo/e-todo.conduit.in: Reflect binary/lib name changes
-
- * conduits/todo/e-todo-conduit-control-applet.desktop: ditto
-
- * conduits/todo/todo.conduit.in: Removed
-
- * conduits/todo/todo-conduit-control-applet.desktop: Removed
-
- * conduits/todo/todo-conduit-config.h (todoconduit_load_configuration):
- The config file will now be called e-todo-conduit
- (todoconduit_save_configuration): ditto
-
- * conduits/todo/todo-conduit.c: Some renaming to keep consistent.
- (pre_sync): Remove commented out function that does not exist.
-
- * conduits/todo/todo-conduit-control-applet.c: ditto
-
- * conduits/todo/todo-conduit-config.h: ditto
-
- * conduits/todo/todo-conduit.h: ditto
-
-
-2000-09-07 Michael Meeks <michael@helixcode.com>
-
- * gui/calendar-commands.c: Re-write most UI handler code.
-
-2000-09-13 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/calendar-model.c (obj_updated_cb): Removed an unused
- variable.
-
- * gui/calendar-model.c (obj_updated_cb): See if the new object
- matches the type of objects we were told to deal with.
- (load_objects): Likewise.
-
-2000-09-13 JP Rosevear <jpr@helixcode.com>
-
- * pcs/cal-backend-file.c (remove_component): Only remove the pilot
- item from the hash if it exists in the first place.
-
-2000-09-12 JP Rosevear <jpr@helixcode.com>
-
- * pcs/cal-backend-file.c (add_component): plug leakage
-
-2000-09-12 JP Rosevear <jpr@helixcode.com>
-
- * conduits/calendar/calendar-conduit.c: Hack to compile for distcheck.
-
- * conduits/calendar/calendar-conduit.h: Remove calobj.h dependency
-
-2000-09-12 JP Rosevear <jpr@helixcode.com>
-
- * pcs/cal-backend-file.c (cal_backend_file_load): Use g_int_*
- for now
- (cal_backend_file_create): ditto
-
- * conduits/todo/todo-conduit.c (local_record_from_compobject): Make
- this actually fill in the todo record.
- (find_record_in_repository): Add debug stuff
- (iterate_specific): Use the already exisiting utility function
-
- * pcs/cal-backend-file.c (cal_backend_file_update_pilot_id): correct
- the status and id types. g_strdup the uid since this is not a
- constified return
- (cal_backend_file_get_uid_by_pilot_id): correct the id type
-
-2000-09-12 Ettore Perazzoli <ettore@helixcode.com>
-
- * gui/Makefile.am: Remove `ui.xml' stuff.
-
- * pcs/cal-backend.c: Dont' #include calobj.h anymore as it's gone.
-
-2000-09-12 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/gnome-cal.c (gnome_calendar_construct): Connect to the
- "cal_loaded" signal of the client here.
- (connect_load): Removed function.
- (disconnect_load): Removed function.
- (cal_loaded_cb): Store the URI we are loading in the GnomeCal
- structure instead of in a weird closure. This gets rid of the
- connect/disconnect mess as well.
- (gnome_calendar_open): Store the URI in the GnomeCal.
-
-2000-09-11 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/e-day-view.c: Fixed a warning (removed unused variable
- gfloat width from e_day_view_get_event_position.)
-
-2000-09-11 JP Rosevear <jpr@helixcode.com>
-
- * conduits/todo/todo-conduit.c: Handle renaming, header cleanup
-
- * conduits/todo/todo-conduit.h: Rename GCalLocalRecord to
- EToDoLocalRecord, header cleanup
-
-2000-09-11 JP Rosevear <jpr@helixcode.com>
-
- * conduits/todo/todo-conduit.c (comp_from_remote_record): Use
- description list instead of comment list for pilot todo note
- (transmit): Check for null cal component properties, set priority
- correctly, use description list instead of comment list. Make
- pilot record private when appropriate.
-
-2000-09-10 JP Rosevear <jpr@helixcode.com>
-
- * conduits/todo/todo-conduit.c (comp_from_remote_record): Only
- set the due date only if it exists
-
-2000-09-10 JP Rosevear <jpr@helixcode.com>
-
- * gui/calendar-model.c (get_is_complete): Relying on the status
- field is somewhat faulty since it is related to group scheduling
-
-2000-09-10 JP Rosevear <jpr@helixcode.com>
-
- * conduits/todo/todo-conduit.c (update_calendar_entry_in_repository):
- Make log output a little more sensible
- (comp_from_remote_record): Minor correction when making a CalComponent
- from scratch.
- (update_record): Use comp_from_remote_record for new items, rather
- than repeating the code here.
-
-2000-09-10 JP Rosevear <jpr@helixcode.com>
-
- * conduits/todo/todo-conduit.c: Remove catch_ret_val function
- since its no longer useful. Fix naming of various fields from
- the header changes. Use GnomePilotRecord* stuff instead of
- ICAL_PILOT_SYNC_*
- (e_todo_context_new): Rename from gcalconduit_new_context. Now takes
- a pilot id and loads the configuration here
- (e_todo_context_destroy): Rename from gcalconduit_destroy_context.
- Unref the client and destroy the configuration if they exist here
- (start_calendar_server): Change the default calendar name
- (local_record_from_comp_uid): Rename from local_record_from_ical_uid
- (local_record_from_compobject): Rename from
- local_record_from_icalobject. Properly do the pilot id and status.
- (comp_from_remote_record): Rename from ical_from_remote_record.
- Handle due, complete, classification and pilot stuff properly
- (pre_sync): Remove some old stuff. We need to figure out how to
- set some of the field values.
- (set_status): Reflect pilot status changes from above
- (conduit_destroy_gpilot_conduit): Remove cleanup stuff that is
- now done by e_todo_context_destroy
- (conduit_get_gpilot_conduit): Only set the context as object
- data of the conduit.
-
- * conduits/todo/todo-conduit.h: Rename GCalConduitContext to
- EToDoConduitContext. Remove some unused struct fields.
- For GCalLocalRecord, rename ical to comp.
-
-2000-09-11 Damon Chaplin <damon@helixcode.com>
-
- * gui/dialogs/task-editor.c: changed to use EDateEdit.
-
- * gui/dialogs/task-editor-dialog.glade: added "None" option to
- Classification option menu, and used custom widgets for the date
- entries so we can use EDateEdit widgets.
-
- * gui/event-editor.c: changed to use EDateEdit. Note that this needs
- to be fixed at some point to handle invalid dates, i.e. when
- e_date_edit_get_time returns -1.
-
- * gui/calendar-model.c (ensure_task_complete):
- (ensure_task_not_complete): new functions to set the related properties
- to make sure a task is marked as complete on not, i.e. "Date Completed"
- "Status" and "Percent" properties.
-
-2000-09-08 Damon Chaplin <damon@helixcode.com>
-
- * gui/calendar-model.c (get_is_complete): use the status field rather
- than the completed date, as it is more reliable.
- (get_is_overdue): use get_is_complete().
- (calendar_model_mark_task_complete): check if it is already complete,
- and if so don't update it.
-
- * cal-util/cal-component.c (cal_component_get_status):
- (cal_component_set_status): added functions to support the STATUS
- property. Also added the property to CalComponentPrivate and set it
- to NULL in free_icalcomponent(). Someone should check my code as I've
- mainly done a Cut & Paste job.
-
-2000-09-10 JP Rosevear <jpr@helixcode.com>
- * conduits/todo/todo-conduit.c: Convert "//" style comments
- (local_record_from_ical_uid): Remove iCalObject cruft
- (ical_from_remote_record): ditto
- (free_match): Properly unref the CalComponent
-
-2000-09-10 JP Rosevear <jpr@helixcode.com>
-
- * conduits/todo/todo-conduit.c (local_record_from_icalobject): Use
- cal component pilot stuff properly
- (find_record_in_repository): Remove cruft
- (ical_from_remote_record): Remove cruft
- (update_record): Set the vtype immediately after creation. Remove cruft
-
- * conduits/todo/todo-conduit.h: Remove iCalObject stuff
-
- * conduits/todo/todo-conduit-config.h: Move all the config stuff
- here, I need to kill the warnings at some point
-
- * conduits/todo/todo-conduit-control-applet.c (doRevertSettings):
- Set all the state variables correctly on a revert
- (doSaveSettings): Update original state
- (doHelp): Rename from about_cb
- (main): Destroy configurations when done
-
- * conduits/todo/Makefile.am: Tidy
-
- * pcs/cal-backend-file.c (cbf_pilot_hash): Function for hashing
- pilot ids
- (cbf_pilot_equal): For hash table of pilot ids
- (cal_backend_file_destroy): Destroy pilot id hash
- (add_component): Insert the uid into the pilot hash
- (remove_component): Remove the uid from the pilot hash
- (cal_backend_file_load): Create the pilot hash
- (cal_backend_file_create): ditto
- (cal_backend_file_get_uid_by_pilot_id): Implement using the pilot hash
- (cal_backend_file_update_pilot_id): ditto
-
- * cal-util/cal-component.h: Update prototypes
-
- * cal-util/cal-component.c (cal_component_get_pilot_id): Implement
- using ical X properties
- (cal_component_set_pilot_id): ditto
- (cal_component_get_pilot_status): ditto
- (cal_component_set_pilot_status): ditto
- (cal_component_free_pilot_id): Free a pilot id
- (cal_component_free_pilot_status): Free a pilot status
-
-2000-09-09 Ettore Perazzoli <ettore@helixcode.com>
-
- * gui/dialogs/Makefile.am (INCLUDES): Add
- `-I$(top_builddir)/libical/src/libical' so that we get
- `icalversion.h' from the build directory instead of taking it from
- the installation directory, which is of course Wrong (tm).
- * gui/Makefile.am (INCLUDES): Likewise.
-
-2000-09-08 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/gnome-cal.c (cal_loaded_cb): New function with the
- loading/creation state machine. It is carefully modelled after
- the state machine that started the Universe, so bow before it.
- (gnome_calendar_construct): Do not connect to cal_loaded here.
- (connect_load): The closure for the cal_loaded callback is a bit
- tricky, so provide a function to create it and connect to the
- signal.
- (disconnect_load): Disconnect from the signal and free the
- closure.
- (gnome_calendar_load_cb): Removed obsolete buggy function.
- (gnome_calendar_open): Use the new mechanism.
-
- * gui/control-factory.c (set_prop): The default filename is now
- calendar.ics.
-
-2000-09-08 JP Rosevear <jpr@helixcode.com>
-
- * conduits/calendar/calendar-conduit.c (transmit): Use
- icaltime_as_timet
-
-2000-09-08 Christopher James Lahey <clahey@helixcode.com>
-
- * cal-util/cal-recur.c, gui/e-day-view.c, gui/e-week-view.c,
- gui/event-editor.c, gui/getdate.y, gui/gncal-todo.c,
- gui/gnome-cal.c, gui/dialogs/task-editor.c: Fixed some warnings.
-
-2000-09-08 JP Rosevear <jpr@helixcode.com>
-
- * conduits/calendar/Makefile.am: Tidy
-
- * conduits/todo/Makefile.am: Tidy
-
-2000-09-08 Federico Mena Quintero <federico@helixcode.com>
-
- Fall equinox cleanup!
-
- OK, I know the equinox is not here yet, but weather has changed
- enough to warrant it.
-
- Sigh. This place is definitely not the tropics.
-
- * gui/gnome-cal.c (obj_updated_cb): Renamed from
- gnome_calendar_object_updated_cb(); fixed prototype.
- (obj_removed_cb): Renamed from gnome_calendar_object_removed_cb();
- fixed prototype.
- (GnomeCalendarPrivate): Moved all the GnomeCalendar fields to a
- private structure so I don't have to rebuild the whole calendar
- GUI directory every time something changes in the object.
- (GnomeCalendarPrivate): Removed the property bag and the control
- fields; they are local to the control-factory now.
- (gnome_calendar_update_view_buttons): Remove the
- ignore_view_button_clicks mess and just block the signal.
- (gnome_calendar_set_view): Added a "focus" argument to indicate
- whether we want the main widget in the specified view to grab the
- focus.
- (gnome_calendar_set_view_internal): Handle the focus argument here.
- (gnome_calendar_set_view_buttons): Temporary hack to notify the
- calendar about its buttons.
- (gnome_calendar_get_selected_time_range): New function.
- (gnome_calendar_get_cal_client): New function.
-
- * gui/control-factory.c (calendar_properties_init): Keep the
- property bag local to here; it does not need to be in the calendar
- object yet.
- (control_factory_fn): Renamed from control_factory(). Just use
- control_factory_new_control().
- (control_factory_new_control): Moved the stuff over from
- create_control(), and keep the control local to here. Check the
- return value of bonobo_control_new().
-
- * gui/calendar-commands.c (show_day_view_clicked): Remove the
- ignore_view_button_clicks mess.
- (new_calendar): Removed the useless "page" argument.
- (calendar_control_activate): Use gnome_calendar_set_view_buttons()
- for now.
-
-2000-09-07 Lauris Kaplinski <lauris@helixcode.com>
-
- * cal-client/Makefile.am: Added -lunicode
-
- * gui/dialogs/task-editor.c: More UTF-8 wrappers
- (priority_index_to_value): Kill warning, add assertion
-
-2000-09-06 JP Rosevear <jpr@helixcode.com>
-
- * gui/e-day-view-main-item.c (e_day_view_main_item_draw_day_event):
- Use new cal_component_has_recurrences convenience function
-
- * gui/e-week-view.c (e_week_view_show_popup_menu): ditto
-
- * gui/e-week-view-event-item.c (e_week_view_event_item_draw_icons):
- ditto
-
- * gui/calendar-model.c (calendar_model_value_at): ditto
- (calendar_model_value_at): ditto
-
- * gui/e-day-view.c (e_day_view_on_event_click): ditto
- (e_day_view_on_event_right_click): ditto
- (e_day_view_on_top_canvas_motion): ditto
- (e_day_view_on_top_canvas_motion): ditto
- (e_day_view_on_main_canvas_motion): ditto
- (e_day_view_on_main_canvas_motion): ditto
- (e_day_view_reshape_day_event): ditto
-
- * gui/e-day-view-top-item.c (e_day_view_top_item_draw_long_event):
- ditto
-
- * gui/e-day-view.c (e_day_view_on_long_event_click): ditto
-
-2000-09-06 JP Rosevear <jpr@helixcode.com>
-
- * cal-util/cal-recur.c (cal_recur_generate_instances): Use
- new convenience functions and only get the recurrence
- stuff if needed. Free the recurrence stuff if used.
-
-2000-09-05 JP Rosevear <jpr@helixcode.com>
-
- * cal-util/cal-component.h: Add new prototypes
-
- * cal-util/cal-component.c (cal_component_has_exrules): Utility
- function to determine whether a cal component has any exrules
- (cal_component_has_exdates): Ditto for exdates
- (cal_component_has_exceptions): Utility function to determine
- whether a cal component has any exception rules
- (cal_component_has_recurrences):Utility function to determine
- whether a cal component has any recurrence rules
-
-2000-09-05 JP Rosevear <jpr@helixcode.com>
-
- * gui/event-editor.c (dialog_to_comp_object): Kill all exdates if
- there are no dates in the box
-
- * cal-util/cal-recur.c (generate_instances_for_year): Add a special
- case for when there are exceptions but no rrules or rdates.
- (cal_obj_remove_exceptions): Use date only compare func
- (cal_obj_date_only_compare_func): New compare function that
- compares the date only, not the time.
-
- * gui/event-editor.c (dialog_to_comp_object): Need a break for the
- yearly recurrence type
- (dialog_to_comp_object): We need to allocate icaltimetypes for the
- exdate list
- (fill_widgets): Handle a weekly recurrence with no particular day set
- (dialog_to_comp_object): Kill all rrules if "None" is selected as
- the recurrence type by the user
-
-2000-09-06 Damon Chaplin <damon@helixcode.com>
-
- * gui/e-calendar-table.c (e_calendar_table_open_task): uses the new
- TaskEditor dialog.
-
- * gui/dialogs/task-editor.[hc]:
- * gui/dialogs/task-editor-dialog.glade: updated. Still need to fix the
- 'Status' property (CalComponent doesn't support it yet), and use a
- replacement for GnomeDateEdit, since we need to support setting 'None'
- as the date.
-
-2000-09-04 Damon Chaplin <damon@helixcode.com>
-
- * gui/event-editor.c (obj_updated_cb):
- (obj_removed_cb): compare the updated object's uid with the one we
- are editing, and just return if it doesn't match.
-
-2000-09-01 Damon Chaplin <damon@helixcode.com>
-
- * gui/gnome-cal.c (gnome_calendar_tag_calendar): added check to see
- if the client has loaded successfully. Gets rid of a few warnings.
-
-2000-09-05 JP Rosevear <jpr@helixcode.com>
-
- * cal-util/cal-recur.c (generate_instances_for_year): The exdate
- and rdate lists are a list of icaltimetypes, not CalComponentPeriods
-
- * gui/e-day-view.c (e_day_view_on_delete_occurrence): The exdate list
- is a list of icaltimetypes, not CalComponentDateTimes
-
-2000-09-05 JP Rosevear <jpr@helixcode.com>
-
- * gui/e-day-view.c (e_day_view_on_delete_occurrence): Append
- the exdate to the list AFTER we create the date value.
-
-2000-09-05 JP Rosevear <jpr@helixcode.com>
-
- * cal-util/cal-component.c (cal_component_free_recur_list): Free
- the data, not the list element.
-
-2000-09-05 JP Rosevear <jpr@helixcode.com>
-
- * cal-util/cal-recur.c (cal_recur_generate_instances): Compute
- the event duration using the event start/end times, not the
- interval times.
-
-2000-09-05 JP Rosevear <jpr@helixcode.com>
-
- * cal-util/cal-recur.c (cal_recur_from_icalrecurrencetype): Check
- to see if r->enddate is (time_t)-1 and set to 0 if so
-
-2000-09-02 Ettore Perazzoli <ettore@helixcode.com>
-
- * conduits/calendar/Makefile.am (INCLUDES): Add libical include
- directories and `$(BONOBO_GNOME_CFLAGS)'.
- * conduits/todo/Makefile.am (INCLUDES): Likewise.
-
-2000-09-02 Lauris Kaplinski <lauris@helixcode.com>
-
- * gui/event-editor.c: e_utf8 wrappers
-
- * gui/gncal-todo.c: e_utf8_wrappers
-
-2000-09-02 Christopher James Lahey <clahey@helixcode.com>
-
- * conduits/calendar/calendar-conduit.c,
- conduits/todo/todo-conduit.c, gui/e-week-view.c, gui/gnome-cal.c:
- Fixed some warnings.
-
-2000-09-01 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/gnome-cal.c (gnome_calendar_new): Use
- gnome_calendar_construct() so that we can check for proper
- creation of the client.
- (gnome_calendar_destroy): Check that the client exists before we
- unref it.
- (gnome_calendar_construct): Do the CalClient creation here. Bind
- the views to it here as well instead of in setup_widgets().
- (gnome_calendar_init): Call setup_widgets() here.
-
- * gui/e-calendar-table.c (e_calendar_table_destroy): Unref the
- model.
-
-2000-09-01 JP Rosevear <jpr@helixcode.com>
-
- * conduits/todo/todo-conduit.c: Update for new libical.
- Conduits should atleast compile now.
-
- * conduits/calendar/calendar-conduit.c: ditto
-
- * Makefile.am: Build the conduits only when they've been
- enabled.
-
-2000-09-01 JP Rosevear <jpr@helixcode.com>
-
- * gui/event-editor.c: Make toolbar save and close button.
- We should put a similar menu option in sometime.
-
-2000-08-31 JP Rosevear <jpr@helixcode.com>
-
- * cal-util/cal-recur.c (array_to_list): Use
- ICAL_RECURRENCE_ARRAY_MAX instead of MAX_SHORT
-
-2000-08-31 JP Rosevear <jpr@helixcode.com>
-
- * gui/event-editor.c (file_delete_cb): Implement delete option
- (dialog_to_comp_object): Set the weekday start value and use
- local not UTC time
-
-2000-08-31 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/event-editor.c (file_delete_cb): No need to spit a warning
- if removal fails.
- (event_editor_destroy): Free the exception clist data. Unref the
- calendar client here.
- (close_dialog): Just call gtk_object_destroy() on the event
- editor; the destroy handler will free everything else.
-
- * cal-client/cal-client.c (cal_client_object_exists): Removed
- function; this is not useful because we operate asynchronously.
-
- * gui/e-day-view.c (e_day_view_on_delete_appointment): No need to
- spit a warning if removal fails.
-
- * gui/e-week-view.c (e_week_view_on_delete_appointment): Likewise.
-
- * gui/calendar-model.c (calendar_model_delete_task): Likewise.
-
-2000-08-31 JP Rosevear <jpr@helixcode.com>
-
- * gui/event-editor.c (file_delete_cb): Implement delete option
- (recurrence_toggled): Make an ugly hack to get the recurrence
- pages showing properly since we don't yet implement all of the
- recurrence rule stuff.
-
- * cal-client/cal-client.c (cal_client_object_exists): New function
- to see if an object exists and is obtainable from the backend
-
- * cal-client/cal-client.h: Add prototype
-
-2000-08-31 JP Rosevear <jpr@helixcode.com>
-
- * gui/gnome-cal.c (editor_closed_cb): Event editor destroyed
- callback to do hash cleanup
- (gnome_calendar_edit_object): Set event editor calendar client.
-
- * gui/event-editor.h: Add new prototype
-
- * gui/event-editor.c: Trash signal stuff. We will manipulate
- the client directly. Make the toolbar save and menu save items
- work identically. Add icons to the toolbar.
- (save_event_object): Call cal_client_update_object
- (close_dialog): Unref the client and disconnect signals
- Actually destroy the event editor object.
- (obj_updated_cb): New function. Doesn't really do anything
- yet but it will inform the user the event has changed elsewhere
- in the future.
- (obj_removed_cb): ditto
- (event_editor_set_cal_client): New function to set the calendar
- client
-
- * gui/gnome-cal.c (gnome_calendar_new_appointment): Commit
- the sequence to the cal component and use non UTC times.
-
-2000-08-30 Lauris Kaplinski <lauris@helixcode.com>
-
- * gui/print.c: Countless small changes for gnome-print 0.21+
-
-2000-08-30 Damon Chaplin <damon@helixcode.com>
-
- * gui/e-day-view.[hc]:
- * gui/e-day-view-main-item.c:
- * gui/e-week-view.[hc]:
- * gui/e-week-view-main-item.c:
- * gui/calendar-commands.c:
- * gui/gnome-cal.[hc]: switched to using new ECalendar widget,
- and a few other fixes.
-
-2000-08-30 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/gnome-cal.h (GnomeCal): Removed unused field event_editor.
-
- * gui/e-day-view.c (e_day_view_key_press): Oops, set the
- dtstart/dtend on the component before adding it.
- (e_day_view_on_editing_stopped): No need to check for an UID.
- Update the summary properly.
-
-2000-08-30 JP Rosevear <jpr@helixcode.com>
-
- * gui/e-week-view.c: Make sure the is_utc flag is always
- FALSE for icaltime_from_timet
- (e_week_view_on_unrecur_appointment): Use icaltimetype struct
- from the stack and make sure tzid is always NULL
- (e_week_view_key_press): ditto
-
-2000-08-30 JP Rosevear <jpr@helixcode.com>
-
- * gui/e-day-view.c: Make sure the is_utc flag is always
- FALSE for icaltime_from_timet
- (e_day_view_on_unrecur_appointment): Use icaltimetype struct
- from the stack and make sure tzid is always NULL
- (e_day_view_finish_long_event_resize): ditto
- (e_day_view_finish_resize): ditto
- (e_day_view_on_top_canvas_drag_data_received): ditto
- (e_day_view_on_main_canvas_drag_data_received): ditto
-
-2000-08-30 JP Rosevear <jpr@helixcode.com>
-
- * cal-client/cal-client.c (add_instance): Actually add the
- comp_instance struct to the instances list. We now appear
- to able to keep events and todos between sessions. Yay!
-
-2000-08-29 Federico Mena Quintero <federico@helixcode.com>
-
- Now the views monitor the client by themselves; it does not make
- sense to proxy all notifications through the GnomeCal. The
- GnomeCal should just be a meta-widget that holds all the views.
-
- At some later point we'll want to decouple the views from the
- GnomeCal so that they can be embedded anywhere; they should emit
- signals to request appropriate actions from the toplevel GUI
- instead of calling the GnomeCal directly.
-
- * gui/e-day-view.c (e_day_view_set_cal_client): New function; now
- the day view monitors the client by itself.
- (cal_loaded_cb): New callback; moved over from
- e_day_view_update_all_events().
- (obj_updated_cb): New callback; moved over from
- e_day_view_update_event().
- (obj_removed_cb): New callback; moved over from
- e_day_view_remove_event().
- (e_day_view_update_all_events): Removed function.
- (e_day_view_update_event): Removed function.
- (e_day_view_remove_event): Removed function.
- (*): Use the day_view->client directly instead of fetching it from
- the GnomeCal.
- (e_day_view_destroy): Unref the client.
- (e_day_view_reload_events): Check if the client is loaded.
- (e_day_view_key_press): Set the vtype of the new component.
-
- * gui/e-week-view.c (e_week_view_set_cal_client): New function.
- (cal_loaded_cb): New callback.
- (obj_updated_cb): New callback.
- (obj_removed_cb): New callback.
- (e_week_view_update_all_events): Removed function.
- (e_week_view_update_event): Removed function.
- (e_week_view_remove_event): Removed function.
- (*): Use the week_view->client directly.
- (e_week_view_destroy): Unref the client.
- (e_week_view_reload_events): Check if the client is loaded.
-
- * gui/gnome-cal.c (setup_widgets): Set the cal_client on all the
- views.
- (gnome_calendar_update_all): Do not update the views, since now
- they do it themselves.
- (gnome_calendar_object_updated_cb): Likewise.
- (gnome_calendar_object_removed_cb): Likewise.
- (setup_widgets): Remove all to-do list cruft.
- (gnome_calendar_colors_changed): Likewise.
- (gnome_calendar_todo_properties_changed): Likewise.
-
- * gui/calendar-commands.h (todo_style_changed): Removed variable.
-
- * gui/gncal-todo.c: Removed old clist cruft; just left in the
- temporary dialog box for now.
-
-2000-08-29 Dan Winship <danw@helixcode.com>
-
- * cal-client/client-test.c:
- * cal-client/cal-client.c:
- * conduits/todo/todo-conduit.h:
- * conduits/calendar/calendar-conduit.h: remove USING_OAF checks.
-
-2000-08-29 JP Rosevear <jpr@helixcode.com>
-
- * gui/gnome-cal.c (gnome_calendar_edit_object): Use
- event_editor_set_event_object
-
- * gui/event-editor.c (event_editor_set_event_object): Rename
- from event_editor_set_ical_object
-
- * gui/event-editor.h: Update prototype
-
- * gui/e-week-view.c (e_week_view_on_new_appointment):
- Call cal_component_commit_sequence after event changes. Default
- to these being all day events.
-
-2000-08-29 JP Rosevear <jpr@helixcode.com>
-
- * gui/event-editor.c (dialog_to_comp_object): These are not UTC
- times
-
-2000-08-28 Federico Mena Quintero <federico@helixcode.com>
-
- * cal-client/cal-client.c (cal_client_is_loaded): New function.
- We need this from code that dynamically updates from a client and
- could not have connected to the "cal_loaded" signal right after
- the client was created.
-
- * gui/calendar-model.c (load_objects): Do not try to load the
- objects if the client has not been loaded yet.
- (cal_loaded_cb): Check the status value.
-
- * gui/calendar-model.h (CalendarModel): Declare the private
- structure here so that gdb will give me love.
-
- * pcs/cal-factory.h (CalFactory): Likewise.
-
- * pcs/cal.h (Cal): Likewise.
-
- * cal-client/cal-listener.h (CalListener): Likewise.
-
- * cal-client/cal-client.h (CalClient): Likewise.
-
- * pcs/cal-backend.h (CalBackend): This no longer has a private
- structure, so remove it.
-
- * cal-util/Makefile.am (libcal_util_la_SOURCES): Removed the
- vCalendar and old iCalendar cruft.
- (libcal_utilinclude_HEADERS): Likewise.
- Removed the obsolete iCalendar test program.
-
-2000-08-28 JP Rosevear <jpr@helixcode.com>
-
- * cal-util/timeutil.h: We no longer need time_from_icaltimetype
- as libical has the API for this
-
- * cal-util/timeutil.c: ditto
-
- * cal-util/cal-recur.c: Replace time_from_icaltimetype with
- icaltime_as_timet
-
- * gui/calendar-model.c: ditto
-
- * gui/event-editor.c: ditto
-
- * gui/gnome-cal.c: ditto
-
-2000-08-28 Federico Mena Quintero <federico@helixcode.com>
-
- * pcs/cal-backend-file.c (remove_component): Remove the
- icalcomponent from the toplevel calendar here.
- (cal_backend_file_update_object): Do not remove it here.
- (cal_backend_file_remove_object): Do not remove it here.
- (add_component): Add the icalcomponent to the toplevel calendar if
- asked to.
- (cal_backend_file_update_object): Do not add it here.
-
-2000-08-28 JP Rosevear <jpr@helixcode.com>
-
- * gui/event-editor.c (dialog_to_comp_object): Initiliaze tzid to
- null, only set recurrence rules and exception dates if there
- are any
-
-2000-08-27 JP Rosevear <jpr@helixcode.com>
-
- * pcs/cal-backend-file.c (save): Write out the calendar object
- (cal_backend_file_update_object): Remove/add the icalcomponent
- from our master icalcomponent (the calendar)
- (cal_backend_file_remove_object): Remove the icalcomponent
- from our master icalcomponent
-
-2000-08-26 JP Rosevear <jpr@helixcode.com>
-
- * gui/Makefile.am: Remove gnorba stuff
-
- * gui/main.c: ditto
-
- * gui/component-factory.c: ditto
-
- * gui/control-factory.c: ditto
-
- * gui/*.gnorba: ditto
-
-2000-08-25 JP Rosevear <jpr@helixcode.com>
-
- * gui/e-calendar-table.c (e_calendar_table_init): Uncomment
- debug code.
-
- * gui/calendar-model.c (set_complete): Set the completed
- date to the current date
- (calendar_model_set_value_at): Handle complete field
-
-2000-08-25 JP Rosevear <jpr@helixcode.com>
-
- * gui/calendar-model.c (get_is_complete): Don't attempt to
- free this if its null
- (calendar_model_duplicate_value): Implement for summary field
- value
- (calendar_model_initialize_value): Remove debug code
-
- * gui/e-calendar-table.c: Correct etable init xml
- (create_column): Pass the id to e_table_header_add_column
- rather than a hard coded one
- (e_calendar_table_init): Make sure summary column isn't
- added twice. Add an alarms column, else etable won't
- work with columns who have an ID higher than that
-
-2000-08-24 JP Rosevear <jpr@helixcode.com>
-
- * gui/gncal-todo.c (ok_button): Properly append to list
-
- * gui/event-editor.c (dialog_to_comp_object): ditto
-
- * gui/e-day-view.c (e_day_view_on_new_appointment): The base
- times are not UTC
-
- * gui/e-week-view.c (e_week_view_on_new_appointment): ditto
-
-2000-08-24 JP Rosevear <jpr@helixcode.com>
-
- * Update for libical 0.19
-
-2000-08-24 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/calendar-commands.c, gui/e-day-view.c, gui/e-week-view.c,
- gui/event-editor.c, gui/gncal-todo.c, gui/gnome-cal.c, gui/prop.c:
- Fixed some warnings.
-
-2000-08-24 JP Rosevear <jpr@helixcode.com>
-
- * gui/e-week-view.c (e_week_view_on_new_appointment): Do not alloc
- the struct icaltimetype but point to one on the stack. More
- importantly, set the date.tzid to NULL.
-
-2000-08-24 JP Rosevear <jpr@helixcode.com>
-
- * gui/gnome-cal.c (save_event_object_cb): Make signal
- names saner
- (released_event_object_cb): ditto
- (gnome_calendar_edit_object): ditto
-
- * gui/event-editor.h: Make signal names saner
-
- * gui/event-editor.c (event_editor_class_init): Make signal
- names saner now that we don't use ical object
- (save_event_object): ditto with callback names
- (file_save_cb): ditto
- (tb_save_and_close_cb): ditto
- (event_editor_set_ical_object): ditto
-
- * gui/e-day-view.c (e_day_view_update_event): Umm,
- != CAL_COMPONENT_EVENT (I hope that wasn't me!)
-
-2000-08-24 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/e-day-view.c (e_day_view_on_new_appointment): Do not alloc
- the struct icaltimetype but point to one on the stack. More
- importantly, set the date.tzid to NULL.
-
-2000-08-24 JP Rosevear <jpr@helixcode.com>
-
- * gui/event-editor-dialog.glade: Remove owner field
-
- * gui/event-editor.c (clear_widgets): Forget about owner field
- (get_widgets): ditto
- (fill_widgets): ditto
-
-2000-08-24 JP Rosevear <jpr@helixcode.com>
-
- * gui/calendar-model.c (calendar_model_initialize_value): Handle
- summary field
- (calendar_model_value_is_empty): ditto
- (calendar_model_free_value): ditto
-
-2000-08-23 JP Rosevear <jpr@helixcode.com>
-
- * gui/event-editor-dialog.glade: Remove status bar
-
- * cal-util/cal-component.c (cal_component_set_rrule_list): Allow
- a null list
- (cal_component_set_rdate_list): Allow a null list
-
- * gui/e-day-view.c (e_day_view_on_new_appointment): Commit
- the CalComponent sequence
-
-2000-08-23 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/main.c: #include <e-util/e-cursors.h>
-
- * gui/e-day-view-time-item.c (e_day_view_time_item_draw):
- Initialize time_min_x1 and hour_r to keep gcc happy.
-
- * gui/e-day-view.c (e_day_view_update_event_label): Warning fix.
- (e_day_view_update_main_canvas_drag): Initialize start_row.
-
- * gui/e-week-view-event-item.c (e_week_view_event_item_draw):
- Initialize time_y_small_min, icon_x.
-
- * Makefile.am (SUBDIRS): Re-enable the gui directory.
-
- * gui/prop.c (prop_store_alarm_default_values): Temporarily #if 0
- out.
-
-2000-08-23 JP Rosevear <jpr@helixcode.com>
-
- * gui/e-week-view.c (e_week_view_key_press): Set vtype of new
- CalComponent
- (e_week_view_on_new_appointment): ditto
-
- * gui/e-day-view.c (e_day_view_on_new_appointment): ditto
-
-2000-08-23 JP Rosevear <jpr@helixcode.com>
-
- * gui/e-day-view-time-item.c: Include gnome.h for gettext purposes
-
- * gui/gnome-cal.c: ditto
-
- * gui/prop.c: #if out some alarm stuff
-
-2000-08-23 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/e-calendar-table.c (e_calendar_table_init): Updated
- function.
- (e_calendar_table_open_task): Updated function.
-
-2000-08-21 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/calendar-model.c (calendar_model_duplicate_value): Updated
- function.
- (calendar_model_free_value): Updated function.
- (calendar_model_initialize_value): Updated function.
- (calendar_model_value_is_empty): Updated function.
- (remove_object): Updated function.
- (obj_updated_cb): Updated function.
- (calendar_model_get_cal_client): Added inline docs.
- (calendar_model_delete_task): Updated.
- (calendar_model_mark_task_complete): Updated.
- (calendar_model_get_cal_object): Updated.
-
-2000-08-21 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/calendar-model.c (set_categories): New function.
- (parse_time): Moved over from the old set_time_t(). This just
- parses the time and leaves the warning dialog for the caller.
- (set_datetime): New function.
- (set_geo): Updated old function.
- (set_percent): Updated old function.
- (set_priority): Updated old function.
- (set_summary): New function.
- (set_url): New function.
- (calendar_model_set_value_at): Updated function.
- (calendar_model_is_cell_editable): Updated function.
- (calendar_model_append_row): Updated. Added an ugly hack to
- accomodate ETable's lack of a real API for adding new items.
- Also, don't try to set columns that are not editable.
-
-2000-08-21 JP Rosevear <jpr@helixcode.com>
-
- * gui/e-week-view.c (e_week_view_reload_events):
- Use CalObjType
-
- * gui/e-day-view.c (e_day_view_reload_events): ditto
-
-2000-08-21 JP Rosevear <jpr@helixcode.com>
-
- * gui/e-day-view-main-item.c (e_day_view_main_item_draw_day_event):
- Use CalComponent instead of iCalObject. #if some alarm stuff
-
-2000-08-21 JP Rosevear <jpr@helixcode.com>
-
- * gui/e-day-view-top-item.c (e_day_view_top_draw_long_event):
- Use CalComponent instead of iCalObject. #if some alarm stuff
-
-2000-08-21 JP Rosevear <jpr@helixcode.com>
-
- * gui/e-day-view.h: Update prototypes
-
- * gui/e-day-view.c (e_day_view_on_unrecur_appointment):
- Remove commented out portions.
-
- * gui/e-week-view.c (e_week_view_on_unrecur_appointment):
- Tidy.
-
-2000-08-21 JP Rosevear <jpr@helixcode.com>
-
- * gui/e-day-view.c
- (e_day_view_update_event): Use CalComponent
- instead of iCalObject. Work around not having a compare
- dates routine for two CalComponents.
- (e_day_view_reshape_long_event): Use CalComponent instead
- of iCalObject, #if some alarm stuff
- (e_day_view_reshape_day_event): ditto
- (e_day_view_reload_events): Use revamped CalClient
- (e_day_view_update_event_cb): Use CalComponent
- instead of iCalObject
- (e_day_view_foreach_event_with_uid): ditto
- (e_day_view_remove_event_cb): ditto
- (e_day_view_update_event_label): ditto
- (e_day_view_find_event_from_uid): ditto
- (e_day_view_on_event_click): ditto
- (e_day_view_on_event_right_click): ditto
- (e_day_view_on_new_appointment): ditto
- (e_day_view_on_edit_appointment): ditto
- (e_day_view_on_delete_occurrence): ditto
- (e_day_view_on_delete_appointment): ditto
- (e_day_view_on_unrecur_appointment): ditto
- (e_day_view_on_top_canvas_motion): ditto
- (e_day_view_on_main_canvas_motion): ditto
- (e_day_view_finish_long_event_resize): ditto
- (e_day_view_finish_resize): ditto
- (e_day_view_free_event_array): ditto
- (e_day_view_add_event): ditto
- (e_day_view_key_press): ditto
- (e_day_view_on_editing_stopped): ditto
- (e_day_view_update_top_canvas_drag): ditto
- (e_day_view_update_main_canvas_drag): ditto
- (e_day_view_on_drag_data_get): ditto
- (e_day_view_on_top_canvas_drag_data_received): ditto
- (e_day_view_on_main_canvas_drag_data_received): ditto
-
-2000-08-20 JP Rosevear <jpr@helixcode.com>
-
- * gui/e-week-view-event-item.c (e_week_view_event_item_draw_icons):
- Use CalComponent instead of iCalObject. #if some alarm stuff
-
-2000-08-20 JP Rosevear <jpr@helixcode.com>
-
- * gui/e-week-view.c (e_week_view_update_event): Use CalComponent
- instead of iCalObject. Work around not having a compare
- dates routine for two CalComponents.
- (e_week_view_reload_events): Use revamped CalClient
- (e_week_view_reshape_event_span): Use CalComponent instead
- of iCalObject, #if some alarm stuff
- (e_week_view_update_event_cb): Use CalComponent instead of
- iCalObject
- (e_week_view_foreach_event_with_uid): ditto
- (e_week_view_remove_event_cb): ditto
- (e_week_view_free_events): ditto
- (e_week_view_add_event): ditto
- (e_week_view_on_editing_stopped): ditto
- (e_week_view_find_event_from_uid): ditto
- (e_week_view_key_press): ditto
- (e_week_view_show_popup_menu): ditto
- (e_week_view_on_new_appointment): ditto
- (e_week_view_on_edit_appointment): ditto
- (e_week_view_on_delete_occurrence): ditto
- (e_week_view_on_delete_appointment): ditto
- (e_week_view_on_unrecur_appointment): ditto
-
- * gui/e-week-view.h: Update prototypes.
-
-2000-08-18 JP Rosevear <jpr@helixcode.com>
-
- * gui/event-editor.h: Update prototypes.
-
- * gui/event-editor.c: Need to come back here later to fix the
- alarm stuff. The gui also needs to be completely redone to
- support the fancier CalComponent settings (exrules, rdates, etc)
- There are some warnings that I put in to mark some of these
- spots
- (event_editor_destroy): Use Calcomponent instead
- of iCalObject
- (make_title_from_comp): ditto
- (clear_widgets): ditto
- (fill_widgets): ditto
- (classification_get): ditto
- (dialog_to_comp_object): ditto
- (save_ical_object): ditto
- (close_dialog): ditto
- (event_editor_set_ical_object): ditto
-
-2000-08-17 JP Rosevear <jpr@helixcode.com>
-
- * gui/gncal-todo.c (ok_button): Use CalComponent instead of
- iCalObject
- (cancel_button): ditto
- (gncal_todo_edit): ditto
- (add_todo): ditto
- (edit_todo): ditto
- (delete_todo): ditto
- (insert_in_clist): ditto
- (gncal_todo_update): ditto
-
- * gui/gncal-todo.h: Update prototypes
-
-2000-08-16 JP Rosevear <jpr@helixcode.com>
-
- Rework gnome-cal.c - alarms are a tad broken ATM so this
- will need more cleaning later.
-
- * gui/gnome-cal.c (snooze): Use CalComponent instead of
- iCalObject
- (edit): ditto
- (audio_notification): ditto
- (display_notification_cb): Use CalComponent member of
- alarm_notify_closure rather than iCalObject
- (display_notification): ditto
- (trigger_alarm_cb): ditto. Use CalComponent alarm types
- (gnome_calendar_tag_calendar_cb): New
- cal_client_generate_instances callback to
- mark_gtk_calendar_day's
- (gnome_calendar_tag_calendar): Use above callback
- (save_ical_object_cb): Use CalComponent instead of
- iCalObject
- (gnome_calendar_edit_object): ditto
- (gnome_calendar_new_appointment): ditto
-
-2000-08-15 JP Rosevear <jpr@helixcode.com>
-
- * gui/mark.c (mark_month_item_cb): Callback used to mark every
- event in a month.
- (mark_month_item): Use cal_client_generate_instances with
- above callback
-
-2000-08-15 JP Rosevear <jpr@helixcode.com>
-
- * gui/print.c (print_month_small): Use
- cal_client_get_objects_in_range
- (print_day_details_cb): Callback used to create columns and fill
- events into a day view. Code should be shared with e-day-view
- in reality. Maybe need to go back to layout.[hc] a bit later
- (print_day_details): Use cal_client_generate_instances with
- above callback. Iterate over results to expand events to fit.
- (print_day_summary_cb): Callback to build list of event info
- for a day
- (print_day_summary): Use cal_client_generate_instances with
- above callback to generate the required event info for printing
- (print_todo_details_cb): Callback used create list of todo info
- (print_todo_details): Use cal_client_generate_instances with
- above callback to generate required todo info for printing.
-
- * gui/layout.[hc]: No longer used.
-
-2000-08-12 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/calendar-model.c (get_is_overdue): Finished implementing.
- (calendar_model_value_at): Handle the color field.
-
-2000-08-11 Seth Alves <alves@hungry.com>
-
- * cal-util/cal-component.c (cal_component_get_pilot_id):
- (cal_component_set_pilot_id): stubs for pilot id accessors
- (cal_component_get_pilot_status):
- (cal_component_set_pilot_status): stubs for pilot status accessors
-
- * conduits/calendar/calendar-conduit.c (transmit): start to
- convert to cal-component interface
-
- * conduits/todo/todo-conduit.c (transmit): same
-
-2000-08-11 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/calendar-model.c (get_geo): Generate a prettier string for
- the geographical position.
- (get_classification): New function.
- (get_categories): New function.
- (get_completed): New function.
- (get_dtend): New function.
- (get_dtstart): New function.
- (get_due): New function.
- (get_percent): New function.
- (get_priority): New function.
- (get_summary): New function.
- (get_transparency): New function.
- (get_url): New function.
- (get_has_alarms): New function.
- (get_has_recurrences): New function.
- (get_is_complete): New function.
- (get_is_overdue): New function.
-
- * cal-util/cal-component.c (scan_property): Handle the GEO
- property.
- (free_icalcomponent): Likewise.
- (cal_component_get_geo): Likewise.
- (cal_component_set_geo): Likewise.
- (cal_component_free_geo): Likewise.
- (cal_component_set_exdate_list): Removed incorrect assertion.
- (cal_component_set_exrule_list): Removed incorrect assertion.
- (cal_component_get_next_alarm): Oops, this had not been
- implemented at all.
- (cal_component_has_rdates): New function.
- (cal_component_has_rrules): New function.
-
- * cal-util/cal-component.h (CalComponentField): Added the GEO
- property.
-
-2000-08-11 Federico Mena Quintero <federico@helixcode.com>
-
- * cal-util/cal-component.c (scan_property): Handle the
- PERCENT-COMPLETE property.
- (free_icalcomponent): Likewise.
- (cal_component_get_percent): Likewise.
- (cal_component_set_percent): Likewise.
- (cal_component_free_percent): Likewise.
- (scan_property): Handle the PRIORITY property.
- (free_icalcomponent): Likewise.
- (cal_component_get_priority): Likewise.
- (cal_component_set_priority): Likewise.
- (cal_component_free_priority): Likewise.
-
- * cal-util/cal-component.h (CalComponentField): New enumeration
- with the list of fields we support for ETable.
-
-2000-08-10 Dan Winship <danw@helixcode.com>
-
- * gui/component-factory.c (owner_set_cb): Update prototype.
-
-2000-08-10 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/gnome-cal.c (gnome_calendar_new_appointment): New function.
- Mostly moved over from calendar-commands.c:display_objedit().
-
- * gui/calendar-commands.c (calendar_iterate): Removed. Wheee!
- (display_objedit): Removed.
- (new_appointment_cb): New function. Just call
- gnome_calendar_new_appointment().
- (display_objedit_today): Removed.
- (calendar_control_activate): Removed the "New appointment for
- today" option, since it is pretty useless.
-
-2000-08-10 Federico Mena Quintero <federico@helixcode.com>
-
- * cal-client/cal-client.c (cal_client_generate_instances): There.
- A pretty function to generate recurrence instances atomically so
- that clients don't have to jump through hoops. Now we can get rid
- of the ugly calendar_iterate() function.
-
-2000-08-09 Cody Russell <bratsche@gnome.org>
-
- * gui/calendar-commands.c: Make the toolbar honor the user's
- gnomecc settings for detachable toolbars.
-
-2000-08-09 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/alarm.c (pop_alarm): Oops, subtract the new alarm's trigger
- time from the current time.
-
-2000-08-09 Christopher James Lahey <clahey@helixcode.com>
-
- * cal-client/cal-client.c: Fixed a warning.
-
-2000-08-09 Christopher James Lahey <clahey@helixcode.com>
-
- * cal-client/cal-client.c, gui/e-calendar-table.c, pcs/cal.c:
- Fixed some warnings.
-
-2000-08-08 Federico Mena Quintero <federico@helixcode.com>
-
- * idl/evolution-calendar.idl (Cal): Added a get_objects_in_range()
- method. Takes in a time range and the type of component we are
- interested in; returns a list of UIDs. The idea is that
- ocurrences get computed in the client; we can have multiple
- recurrences in iCalendar and we cannot identify them trivially
- across the wire.
- (Cal): Removed the get_events_in_range() method.
-
- * pcs/cal-backend.c (cal_backend_free_uid_list): New function.
- (cal_backend_get_objects_in_range): New function.
- (cal_backend_get_events_in_range): Removed.
-
- * pcs/cal-backend-file.c (cal_backend_file_get_objects_in_range):
- Implemented new method.
- (cal_backend_file_get_events_in_range): Removed.
-
- * pcs/cal.c (Cal_get_events_in_range): Removed.
- (uncorba_obj_type): New function.
- (Cal_get_uids): Use uncorba_obj_type().
- (Cal_get_n_objects): Likewise.
- (Cal_get_objects_in_range): Implemented new method.
-
- * cal-client/cal-client.c (cal_client_get_events_in_range): Removed.
- (cal_client_get_objects_in_range): Implemented.
- (corba_obj_type): New function.
- (cal_client_get_n_objects): Use corba_obj_type().
- (cal_client_get_uids): Likewise.
-
-2000-08-07 Federico Mena Quintero <federico@helixcode.com>
-
- * cal-util/cal-component.c (cal_component_clone): New function.
- (cal_component_get_icalcomponent): Ensure that the SEQUENCE
- property does not need incrementing.
-
- * gui/dialogs/alarm-notify-dialog.c (alarm_notify_dialog): Use
- CalComponent. Deal with an empty summary property.
-
-2000-08-07 Federico Mena Quintero <federico@helixcode.com>
-
- * cal-util/cal-component.c (cal_component_get_as_string): Doh,
- libical owns the string's memory, so do not free it.
-
- * cal-client/client-test.c (create_client): Connect to the destroy
- signal of the client here.
-
- * cal-client/test.ics: New test file, modified from Eric Busboom's
- test file from RFC 2445.
-
-2000-08-05 Federico Mena Quintero <federico@helixcode.com>
-
- * cal-client/client-test.c (dump_component): This was gone for
- some reason.
- (main): Load a new test file.
-
-2000-08-04 Federico Mena Quintero <federico@helixcode.com>
-
- * cal-util/cal-component.c (cal_component_commit_sequence): New
- function to commit changes to the SEQUENCE property.
- (cal_component_get_as_string): Ensure that the sequence has been
- committed.
-
- * cal-client/cal-client.c (cal_client_get_object): Use
- CalComponent instead of the old iCalObject.
- (cal_client_update_object): Use iCalObject. Commit the SEQUENCE
- property before stringifying the object and piping it over to the
- Wombat.
-
-2000-08-04 Seth Alves <alves@hungry.com>
-
- * conduits/todo/todo-conduit.c (conduit_get_gpilot_conduit): if
- oaf isn't initialized by the time the conduit starts, start it
- up. we do this because we need to start wombat with oaf, and
- gpilotd doesn't currently start oaf.
-
-2000-08-04 Michael Meeks <michael@helixcode.com>
-
- * gui/calendar-commands.c (calendar_control_activate): unref.
-
-2000-08-02 Federico Mena Quintero <federico@helixcode.com>
-
- * pcs/cal-backend-file.c (cal_backend_file_get_uid_by_pilot_id):
- Added stub for now.
- (cal_backend_file_update_pilot_id): Likewise.
-
- * pcs/Makefile.am (libpcs_a_SOURCES): Removed cal-backend-imc.[ch]
- from the list of sources. The idea is to move vCalendar importing
- to the GUI as a convenience function.
-
-2000-08-02 Seth Alves <alves@hungry.com>
-
- * pcs/cal-backend-imc.c (cal_backend_imc_update_pilot_id): call
- save (cbimc) after setting the pilot id and status.
-
-2000-08-02 Joe Shaw <joe@helixcode.com>
-
- * pcs/cal-backend-file.c (cal_backend_file_update_pilot_id):
- Fixed a g_return_if_fail that had two parameters and thus
- wouldn't build.
-
-2000-08-03 Damon Chaplin <damon@helixcode.com>
-
- * gui/calendar-model.c (calendar_model_append_row): updated to match
- the new ETableModel append_row. This meant we could also get rid of
- the row_being_added and idle_id hack.
-
-2000-08-02 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/calendar-model.c: Emit "model_pre_change" signals as
- appropriate.
-
-2000-08-02 Federico Mena Quintero <federico@helixcode.com>
-
- * pcs/cal-backend-file.[ch]: New files for the iCalendar file
- backend.
-
- * pcs/Makefile.am (libpcs_a_SOURCES): Added cal-backend-file.[ch].
-
- * cal-util/cal-component.c (cal_component_set_icalcomponent):
- Return an operation success code for if we are passed a component
- of a type we don't support.
-
-2000-07-31 Federico Mena Quintero <federico@helixcode.com>
-
- * cal-util/cal-recur.c (*): Use CalComponent and the new property
- types instead of the old iCalObject stuff.
- (cal_recur_generate_instances): Renamed from
- cal_object_generate_events(). Ensure that the component has the
- DTSTART property.
- (generate_instances_for_year): Renamed from
- cal_object_generate_events_for_year().
- (cal_obj_expand_recurrence): Made static.
- (cal_recur_from_icalrecurrencetype): New function. We should
- really convert this whole file to use struct icalrecurrencetype
- instead.
- (cal_recur_free): New function.
-
- * cal-util/cal-recur.h (CalRecurType): Renamed from CalObjRecurType.
- (CalRecurrence): Renamed from CalObjRecurrence.
-
- * cal-util/timeutil.c (time_from_icaltimetype): New function.
-
- * cal-util/Makefile.am: Commented out the test-recur program.
-
-2000-08-01 Damon Chaplin <damon@helixcode.com>
-
- * Removed doc directory, since it is the old gnome-pim docs which
- aren't used any more.
-
- * Makefile.am (SUBDIRS): removed doc.
-
-2000-07-26 Peter Williams <peterw@helixcode.com>
-
- * gui/calendar-model.c: compile fix for Solaris
- (works under Linux, too; don't know about others)
-
- * this is a test of whether CVS merge does what I
- think it will do.
-
-2000-07-26 Federico Mena Quintero <federico@helixcode.com>
-
- OK, it seems that we have all the interesting properties for
- single-user calendars now. RFC 2445 can bite me.
-
- * cal-util/cal-component.c (scan_property): Handle the RRULE
- property. Yay!.
- (scan_recur): Likewise, yow!
- (get_recur_list): Likewise, yeehaw!
- (get_recur_list): Likewise, honk honk!
- (set_recur_list): Likewise, booooga booooga!
- (cal_component_get_rrule_list): Likewise, squeek squeek!
- (cal_component_set_rrule_list): That's it, I ran out of sounds.
- (cal_component_free_recur_list): Likewise.
- (scan_property): Handle the EXRULE property.
- (free_icalcomponent): Likewise.
- (cal_component_get_exrule_list): Likewise.
- (cal_component_set_exrule_list): Likewise.
- (set_period_list): Oops, free the old properties as well as
- removing them.
- (set_text_list): Ditto.
- (cal_component_set_exdate_list): Ditto.
-
- * cal-util/cal-component.c: Put all the functions used to free
- returned values all together.
- (cal_component_set_rdate_list): Oops, mark SEQUENCE property to be
- incremented since the RFC requires it.
- (scan_property): Handle the EXDATE property.
- (scan_exdate): Likewise.
- (free_icalcomponent): Likewise.
- (cal_component_get_exdate_list): Likewise.
- (cal_component_set_exdate_list): Likewise.
- (cal_component_free_exdate_list): Likewise.
-
-2000-07-26 Jeffrey Stedfast <fejj@helixcode.com>
-
- * gui/Makefile.am: Fixed a typo
-
-2000-07-26 Jeffrey Stedfast <fejj@helixcode.com>
-
- * gui/Makefile.am: Added a few xpm files to the EXTRA DIST section
-
-2000-07-25 Federico Mena Quintero <federico@helixcode.com>
-
- * cal-util/cal-component.c (cal_component_free_period_list): New function.
- (scan_property): Handle the RDATE property.
- (scan_period): Likewise.
- (free_icalcomponent): Likewise.
- (get_period_list): Likewise.
- (set_period_list): Likewise.
- (cal_component_get_rdate_list): Likewise.
- (cal_component_set_rdate_list): Likewise.
- (scan_text): Simplify a bit since we only handle the ALTREP
- parameter; there is no need to iterate over all parameters.
- (scan_datetime): Simplify; just handle the TZID parameter.
- (scan_summary): Simplify; just handle the ALTREP parameter.
- (cal_component_get_as_string): New function.
-
- * idl/evolution-calendar.idl (CalObjType): Removed the TYPE_OTHER;
- now we only expose the types of objects we know about.
-
- * cal-util/cal-util.h (CalObjType): Likewise.
-
- * cal-client/cal-client.c (cal_client_get_n_objects): Likewise.
- (cal_client_get_uids): Likewise.
-
- * conduits/calendar/calendar-conduit.c (get_calendar_objects): Likewise.
- (check_for_slow_setting): Likewise.
-
- * pcs/cal-backend-imc.c (count_objects): Likewise.
- (build_uids_list): Likewise.
-
- * pcs/cal.c (Cal_get_uids): Likewise.
- (Cal_get_n_objects): Likewise.
-
-2000-07-25 Damon Chaplin <damon@helixcode.com>
-
- * gui/e-calendar-table.[hc]: new ECalendarTable to show an ETable view
- for Todo/Event items.
-
- * gui/task-assigned-to.xpm:
- * gui/task-recurring.xpm:
- * gui/task-assigned.xpm:
- * gui/task.xpm: new pixmaps (all the same at present) to go in the
- icon column of the ETable.
-
- * gui/event-editor.c: hid the silly 'Calendar' labels on the
- GnomeDateEdits and hid the times when you select 'All day event'.
- Also adjusted the time_t's so that when an all day event finishes on
- say midnight 13th May, we show 12th May in the dialog, since it
- implicitly includes all of that day up to midnight.
-
- * gui/dialogs/task-editor-dialog.glade:
- * gui/dialogs/task-editor.[hc]: unfinished dialog to edit tasks.
-
- * gui/gncal-todo.c: temporary hack so that we can use the simple dialog
- with our new ETable.
-
-2000-07-23 Damon Chaplin <damon@helixcode.com>
-
- * cal-util/calobj.h: added a few more fields.
-
- * cal-util/calobj.c (ical_object_create_from_vobject): check for a
- NULL return from vObjectUStringZValue for URL property to avoid SEGV.
- For some reason an empty 'URL:' property appears and causes trouble.
-
-2000-07-20 Ettore Perazzoli <ettore@helixcode.com>
-
- * gui/component-factory.c (factory_fn): Update for the new
- `evolution_shell_component_new()' arg.
-
-2000-07-19 Federico Mena Quintero <federico@helixcode.com>
-
- * cal-util/cal-component.c (cal_component_alarm_set_trigger):
- Finish filling the trigger. What a pain, again.
- (cal_component_alarm_free_trigger): Implemented.
-
-2000-07-19 Fatih Demir <kabalak@gmx.net>
-
- * conduits/calendar/calendar-conduit-control-applet.desktop:
-
- * conduits/todo/todo-conduit-control-applet.desktop:
- Added the Turkish desktop entries.
-
-2000-07-18 Federico Mena Quintero <federico@helixcode.com>
-
- * cal-util/cal-component.c (cal_component_alarm_free): Free the
- icalcomponent if this is an unattached alarm.
- (scan_alarm_property): Handle the TRIGGER property.
- (cal_component_alarm_get_trigger): Ditto. Royal pain.
- (cal_component_alarm_set_trigger): Ditto. Less pain.
-
-2000-07-17 Federico Mena Quintero <federico@helixcode.com>
-
- * cal-client/cal-client.c (cal_client_get_object): Fixed inline
- docs.
- (cal_client_new): Ditto.
- (cal_client_get_n_objects): Added inline docs.
-
-2000-07-14 Federico Mena Quintero <federico@helixcode.com>
-
- * cal-util/cal-component.c (CalComponentAlarm): New internal
- represntation for alarm components. We really don't map them to a
- CalComponent because it is more convenient to handle them as
- "child" structures.
- (make_alarm): New function to create a CalComponentAlarm from an
- icalcomponent representing a VALARM.
- (scan_alarm_property): New function to scan a property from an
- alarm component. We support ACTION.
- (cal_component_get_first_alarm): New function to start an iterator
- over the alarms in a calendar component.
- (cal_component_alarm_get_action): New function.
- (cal_component_alarm_set_action): New function.
-
-2000-07-13 Seth Alves <alves@hungry.com>
-
- * conduits/todo/todo-conduit.c: conduit based on the calendar conduit.
- this conduit syncs a pilot's ToDoDB database to wombat's list of "todo"
- events.
-
- * gui/gncal-todo.c (simple_todo_editor): set todo's priority control
- based on value from ical object during edit.
-
-2000-07-12 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/print.c: Revert Michael's GnomeFont patch until the
- gnome-print API stabilizes.
-
-2000-07-12 Michael Meeks <michael@helixcode.com>
-
- * gui/print.c (titled_box, print_text, print_month_small),
- (bound_text): GnomeFont update.
-
-2000-07-12 Seth Alves <alves@hungry.com>
-
- * conduits/calendar/calendar-conduit.c: fixed various problems
-
- * cal-client/Makefile.am: build a static version of the library
- to link with the conduits
-
- * cal-util/Makefile.am: same
-
-2000-07-11 Federico Mena Quintero <federico@helixcode.com>
-
- * cal-util/cal-component.c (scan_property): Handle the COMPLETED
- property.
- (free_icalcomponent): Ditto.
- (cal_component_get_completed): Ditto.
- (cal_component_set_completed): Ditto.
- (scan_property): Handle the TRANSPARENCY property.
- (free_icalcomponent): Ditto.
- (cal_component_get_transparency): Ditto.
- (cal_component_set_transparency): Ditto.
- (scan_property): Handle the URL property.
- (free_icalcomponent): Ditto.
- (cal_component_get_url): Ditto.
- (cal_component_set_url): Ditto.
-
- * pcs/cal-factory.c (queue_load_create_job): Removed unneeded
- check for the URI.
- (load_fn): Be more paranoid about the URI and notify the listener
- if we got passed a bad URI. Simplify the termination code a bit.
- (create_fn): Likewise.
- (queue_load_create_job): Be more paranoid about the URI.
-
-2000-07-10 Ettore Perazzoli <ettore@helixcode.com>
-
- * gui/Makefile.am: Remove pilot stuff for now.
-
- * Makefile.am (SUBDIRS): Remove `conduits'.
-
-2000-07-10 Dan Winship <danw@helixcode.com>
-
- * gui/Makefile.am (EXTRA_DIST): remove gnomecal.conduit
-
- * conduits/calendar/Makefile.am (EXTRA_DIST): We want
- calendar.conduit.in, not calendar.conduit.
-
-2000-07-10 Seth Alves <alves@hungry.com>
-
- * gui/Makefile.am (SUBDIRS):
- * conduits/calendar/Makefile.am: moved calendar-conduit stuff from
- the gui directory to here.
-
- * Makefile.am (SUBDIRS): added conduits to SIBDIRS
-
-2000-07-08 Ettore Perazzoli <ettore@helixcode.com>
-
- * gui/calendar-commands.c (calendar_control_activate): Remove
- "close calendar" command.
-
-2000-07-08 Anders Carlsson <andersca@gnu.org>
-
- * gui/e-week-view.c (e_week_view_on_button_press): Handle mouse wheel scrolling.
-
- * gui/e-day-view.c (e_day_view_on_time_canvas_button_press): New function to handle
- mouse wheel scrolling.
- (e_day_view_on_main_canvas_button_press): Handle mouse wheel scrolling.
-
-2000-07-07 Federico Mena Quintero <federico@helixcode.com>
-
- * cal-util/cal-component.c (scan_property): Handle the SEQUENCE
- property.
- (free_icalcomponent): Ditto.
- (cal_component_get_sequence): Ditto.
- (cal_component_set_sequence): Ditto.
- (cal_component_free_sequence): Ditto.
- (cal_component_set_last_modified): Removed incorrect assertion.
- (CalComponentPrivate): New need_sequence_inc flag. The sequence
- number must be incremented when certain properties change, so we
- store a flag that says if we need to bump it when piping the
- object over the wire.
- (free_icalcomponent): Reset need_sequence_inc.
- (cal_component_set_dtstart): Set need_sequence_inc.
- (cal_component_set_dtend): Ditto.
- (cal_component_set_due): Ditto.
-
-2000-07-06 Federico Mena Quintero <federico@helixcode.com>
-
- * cal-util/cal-component.c (scan_property): Handle the
- LAST-MODIFIED property.
- (free_icalcomponent): Ditto.
- (cal_component_get_last_modified): Ditto.
- (cal_component_set_last_modified): Ditto.
- (get_icaltimetype): New function to get struct icaltimetype
- values.
- (cal_component_get_created): Use get_icaltimetype().
- (set_icaltimetype): New function to set struct icaltimetype
- values.
- (cal_component_set_created): Use set_icaltimetype().
-
- * cal-util/cal-component.c (scan_property): Handle the CREATED
- property.
- (free_icalcomponent): Ditto.
- (cal_component_free_icaltimetype): Ditto.
- (cal_component_get_created): Ditto.
- (cal_component_set_created): Ditto.
- (cal_component_init): Do not create an UID here.
- (ensure_mandatory_properties): New function to ensure that the
- mandatory RFC properties are indeed in the component. If they are
- not, we create them on the fly.
- (cal_component_set_new_vtype): Use ensure_mandatory_properties().
- (cal_component_set_icalcomponent): Ditto.
- (cal_component_get_uid): Return the UID in a parameter, not as a
- function return value, for consistency's sake.
- (scan_property): Handle the DTSTAMP property.
- (free_icalcomponent): Ditto.
- (cal_component_get_dtstamp): Ditto.
- (cal_component_set_dtstamp): Ditto.
-
-2000-07-04 Damon Chaplin <damon@helixcode.com>
-
- * gui/gncal-todo.c (gncal_todo_update): Use &obj instead of &ico in
- the call to cal_client_get_object(). The ToDo list should work now.
-
- * gui/event-editor-dialog.glade: set the toplevel GnomeApp to invisible
- so it doesn't appear and then resize.
-
-2000-07-03 Federico Mena Quintero <federico@helixcode.com>
-
- * cal-util/cal-component.c (cal_component_get_summary): Use
- CalComponentText instead of CalComponentPropSummary. Removed the
- latter typedef.
- (cal_component_set_summary): Likewise.
- (scan_property): Handle the CLASSIFICATION property.
- (cal_component_get_classification): Ditto.
- (cal_component_set_classification): Ditto.
-
- * cal-util/cal-component.c (cal_component_free_text_list): Renamed
- from cal_component_free_description_list(). We can share this
- function since both comments and descriptions have the same form.
- (scan_text): Ditto.
- (get_text_list): New function.
- (set_text_list): New function.
- (cal_component_get_description_list): Use get_text_list().
- (cal_component_set_description_list): Use set_text_list().
- (cal_component_set_uid): Add sanity check.
- (cal_component_get_summary): Ditto.
- (cal_component_get_description_list): Ditto.
- (cal_component_get_dtstart): Ditto.
- (cal_component_get_dtend): Ditto.
- (cal_component_get_due): Ditto.
- (scan_property): Handle the COMMENT property.
- (cal_component_get_comment_list): Ditto.
- (cal_component_set_comment_list): Ditto.
-
-2000-07-02 Federico Mena Quintero <federico@helixcode.com>
-
- * cal-util/cal-component.c (scan_categories): Handle CATEGORIES.
- This can appear multiple times, so we maintain a list. We
- compress them later to a single property with multiple values.
- (cal_component_get_categories_list): Ditto.
- (cal_component_set_categories_list): Ditto.
- (cal_component_free_categories_list): Ditto.
- (free_icalcomponent): Properly free the mappings.
-
-2000-07-02 Federico Mena Quintero <federico@helixcode.com>
-
- * cal-util/cal-component.c (scan_datetime): Handle date/time and
- timezone pairs.
- (scan_property): Handle DTSTART and DTEND.
- (cal_component_free_datetime): Ditto.
- (get_datetime): Ditto.
- (cal_component_get_dtstart): Ditto.
- (set_datetime): Ditto.
- (cal_component_set_dtstart): Ditto.
- (cal_component_get_dtend): Ditto.
- (cal_component_set_dtend): Ditto.
- (scan_property): Handle DUE date.
- (cal_component_get_due): Ditto.
- (cal_component_set_due): Ditto.
-
-2000-07-01 Federico Mena Quintero <federico@helixcode.com>
-
- * cal-util/cal-component.c (cal_component_get_description_list):
- Handle the DESCRIPTION property. There can be multiple
- descriptions with parameters each, so we deal with a list instead
- of a single structure.
- (cal_component_set_description_list): Ditto.
- (cal_component_free_description_list): Ditto.
- (scan_property): Ditto.
- (scan_description): Ditto.
-
-2000-06-30 Federico Mena Quintero <federico@helixcode.com>
-
- * cal-util/cal-component.c (cal_component_get_summary): To avoid
- passing a million parameters to setters/getters for properties
- that support parameters, we now pass client-side structures
- instead. Here we use CalComponentPropSummary.
- (cal_component_set_summary): Ditto.
-
-2000-06-29 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/component-factory.c: Make calendar die when evolution quits.
-
-2000-06-30 Federico Mena Quintero <federico@helixcode.com>
-
- * cal-util/cal-component.c: Change of plans. We use an
- icalcomponent from libical as our core representation so that we
- can preserve extension fields and fields that we don't (yet)
- support. CalComponent is just a wrapper with a nice API that
- provides non-iterative, random access to the ical's fields.
- (cal_component_destroy): Free the thing correctly.
- (cal_component_get_vtype): Re-implement in terms of icalcomponent.
- (cal_component_set_icalcomponent): New function to set the
- CalComponent's data from an existing icalcomponent.
- (cal_component_get_icalcomponent): New function.
- (cal_component_set_new_vtype): New convenience function to create
- an empty component.
- (scan_icalcomponent): Core scanning function.
- (scan_property): Another core scanning function.
- (cal_component_get_uid): Use the property directly.
- (cal_component_get_summary): Ditto. Handle the altrep parameter
- as well.
- (cal_component_set_summary): Ditto. Feel the pain, motherfucker.
- It is ridiculous how much code this involves.
- (scan_summary): Ditto.
-
-2000-06-29 Ettore Perazzoli <ettore@helixcode.com>
-
- * gui/component-factory.c (owner_set_cb): Get an
- EvolutionShellClient instead of an Evolution_Shell to match the
- changes in libeshell.
-
-2000-06-29 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/Makefile.am: Do not link and include the pilot stuff for the
- calendar component, just for the Pilot conduit. Commented out the
- Pilot part so that Evolution can build. Sigh, we'll have to
- modify gnome-pilot to use OAF.
-
-2000-06-29 Peter Williams <peterw@helixcode.com>
-
- * gui/Makefile.am (LINK_FLAGS): Make the calendar-pilot-sync
- program conditional on HAVE_GNOME_PILOT, and add
- GNOME_PILOT_CFLAGS, GNOME_PILOT_LIBS, and PISOCK_LIBS in the
- appropriate places.
-
-2000-06-29 Seth Alves <alves@hungry.com>
-
- * pcs/cal.c (Cal_get_uid_by_pilot_id):
- (Cal_update_pilot_id):
- * pcs/cal-backend-imc.c (cal_backend_imc_update_pilot_id):
- (cal_backend_imc_get_uid_by_pilot_id):
- * pcs/cal-backend.c (cal_backend_get_uid_by_pilot_id):
- (cal_backend_update_pilot_id): server code to service these:
-
- * gui/calendar-pilot-sync.c: updated to make use of cal-client.
- also uses dirty bits on both sides to aid in syncing.
-
- * cal-client/cal-client.c (cal_client_get_uid_by_pilot_id): new
- function -- ask the cal server to return uid given an object's
- pilot id.
- (cal_client_update_pilot_id): new function -- inform the
- cal server of an objects pilot id and pilot dirty-flag.
-
-2000-06-28 Federico Mena Quintero <federico@helixcode.com>
-
- * cal-util/cal-component.[ch]: New files for the new iCalendar
- component object. Today's properties: basic component type, UID,
- SUMMARY.
-
- * cal-util/Makefile.am: Added cal-component.[ch] to the list of
- sources.
-
-2000-06-27 Michael Meeks <michael@helixcode.com>
-
- * pcs/Makefile.am (INCLUDES): use BONOBO_VFS_GNOME_CFLAGS.
-
-2000-06-26 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/calendar-model.c: Added an #ifdefed value_to_string handler
- assignment.
-
-2000-06-26 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/calendar-model.c (calendar_model_duplicate_value):
- Implement.
- (calendar_model_initialize_value): Implement.
- (calendar_model_value_is_empty): Implement.
-
-2000-06-21 Damon Chaplin <damon@helixcode.com>
-
- * gui/e-day-view.c (e_day_view_reshape_long_event): set event before
- using it!
- (e_day_view_init): used new colors from tigert.
-
-2000-06-21 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/e-day-view.c, gui/e-week-view.c: Remove the usage of the "x"
- and "y" arguments.
-
-2000-06-21 Damon Chaplin <damon@helixcode.com>
-
- * gui/gnome-cal.c (gnome_calendar_direction): changed so it keeps the
- selection range. It just moves it on one day/week etc. This makes
- it very handy for the keyboard shortcut code.
-
- * gui/calendar-commands.c (calendar_control_activate): fixed bug
- setting the radio button active.
-
- * gui/e-day-view.[hc]: added support for keyboard navigation and
- selection of the time range.
-
-2000-06-20 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/calendar-model.c (calendar_model_set_value_at): Implemented.
- (calendar_model_is_cell_editable): Implemented.
-
- * cal-client/cal-client.c (cal_client_update_object): Take in an
- iCalObject instead of a stringified version.
-
- * gui/gnome-cal.c (gnome_calendar_update_object): Removed.
- (gnome_calendar_remove_object): Removed.
- (save_ical_object_cb): Use the CalClient function.
-
- * gui/e-day-view.c (e_day_view_on_delete_occurrence): 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.
- (e_day_view_on_delete_appointment): Likewise.
-
- * gui/e-week-view.c (e_week_view_on_editing_stopped): Likewise.
- (e_week_view_key_press): Likewise.
- (e_week_view_on_delete_occurrence): Likewise.
- (e_week_view_on_unrecur_appointment): Likewise.
- (e_week_view_on_delete_appointment): Likewise.
-
- * gui/gncal-todo.c (ok_button): Likewise.
- (delete_todo): Likewise.
-
-2000-06-19 Damon Chaplin <damon@helixcode.com>
-
- * gui/event-editor-dialog.glade: tidied up dialog a bit, adding
- space etc.
-
- * gui/e-week-view.c (e_week_view_reshape_events): removed debug msg.
-
-2000-06-18 Ettore Perazzoli <ettore@helixcode.com>
-
- * cal-util/Makefile.am (INCLUDES): Include from
- `$(top_builddir)/libical/src/libical' too. [For the generated
- libical `icalversion.h' header.]
- * cal-client/Makefile.am (INCLUDES): Likewise.
-
-2000-06-18 Damon Chaplin <damon@helixcode.com>
-
- * gui/e-day-view.c (e_day_view_on_top_canvas_drag_data_received):
- fixed a DnD bug.
-
-2000-06-17 Dan Winship <danw@helixcode.com>
-
- * cal-client/Makefile.am (INCLUDES): Fix to not depend on
- installed ical.h
-
-2000-06-17 Damon Chaplin <damon@helixcode.com>
-
- * gui/e-week-view.c: added little buttons which are shown when there
- are more events than will fit in a day. Clicking on the button takes
- the user to the 1-Day view and shows the full day.
-
- * gui/e-day-view.c:
- * gui/e-week-view.c: set the "use_ellipsis" arg to TRUE for the EText
- items so we get tooltips automatically. Though we may want to use our
- own code to show tooltips so we can show the tips when the mouse is
- around the edges of the event box, and we may want to show the start
- and end times of the event in full.
-
- * gui/calendar-commands.c (calendar_control_activate):
- * gui/gnome-cal.h: added view_toolbar_buttons[] so we can access the
- radio buttons in the code easily. We need this if we want to jump to
- another view programmatically.
-
-2000-06-16 Damon Chaplin <damon@helixcode.com>
-
- * gui/jump.xpm: new icon for the EWeekView to jump to the day.
-
- * gui/Makefile.am (EXTRA_DIST): added jump.xpm
-
-2000-06-16 Damon Chaplin <damon@helixcode.com>
-
- * gui/calendar-model.c (calendar_model_class_init): #ifdef'ed out
- references to functions which don't exist yet, so evolution still
- compiles.
-
-2000-06-16 Damon Chaplin <damon@helixcode.com>
-
- * cal-util/test-recur.c: updated.
-
- * cal-util/cal-recur.[hc]: mostly finished, though it depends on the
- iCalObject struct being updated to support more of iCalendar.
-
-2000-06-16 Damon Chaplin <damon@helixcode.com>
-
- * pcs/.cvsignore: added icalendar-test.
-
-2000-06-15 Damon Chaplin <damon@helixcode.com>
-
- * cal-util/Makefile.am (test_recur_LDADD): use libical.a
-
-2000-06-15 Dan Winship <danw@helixcode.com>
-
- * cal-util/Makefile.am (noinst_PROGRAMS): merge the two separate
- noinst_PROGRAMS declarations into one so automake accepts it.
- (INCLUDES): include libical src dir so we don't depend on having
- ical.h already installed
-
-2000-06-14 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/calendar-model.c: GPtrArray cannot insert stuff in the
- middle of the array (!), so use plain GArray everywhere. Sigh.
-
-2000-06-13 Federico Mena Quintero <federico@helixcode.com>
-
- * cal-client/cal-client.c (cal_client_get_object): Use vCalendar
- again.
-
- * cal-util/calobj.c (ical_object_find_in_string): From Seth, make
- it use vCalendar again.
-
-2000-06-13 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/calendar-model.c (obj_updated_cb): Juggle some eggs in
- asynchronous fashion. Finished implementing.
- (obj_removed_cb): Implemented. This one needs no juggling.
- (calendar_model_set_cal_client): Only load the objects if we have
- a client.
- (calendar_model_destroy): Disconnect from the client's signals.
-
- * gui/Makefile.am (evolution_calendar_SOURCES): Added
- calendar-model.[ch] to the list of sources.
-
- * pcs/cal-backend-imc.c (cal_backend_imc_get_n_objects): Doh,
- return the computed value.
-
-2000-06-13 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/calendar-model.c (CalendarModelPrivate): Added the array of
- objects and the hash table of UID->array index.
- (calendar_model_row_count): Return the length directly from the
- array instead of asking the Wombat.
- (calendar_model_value_at): Implemented.
- (calendar_model_new): Create an empty model. We provide a new
- setter function now.
- (calendar_model_construct): Removed function.
- (calendar_model_set_cal_client): New function to set the calendar
- client and object type at any time. This lets us reuse a calendar
- model object.
-
- * cal-util/calobj.h (iCalObjectField): Just report whether the
- object has alarms; not every single alarm.
-
-2000-06-13 Ettore Perazzoli <ettore@helixcode.com>
-
- * gui/Makefile.am (SHELL_OBJS): Removed.
- (evolution_calendar_LDADD): Link with
- `$(top_builddir)/shell/libeshell.a'.
-
-2000-06-09 Ettore Perazzoli <ettore@helixcode.com>
-
- * gui/component-factory.c (factory_fn): Pass NULL for the new args
- @create_folder_fn and @remove_folder_fn.
- (create_view): Updated to match the new
- `EvolutionShellComponentCreateViewFn'. Return
- `EVOLUTION_SHELL_COMPONENT_UNSUPPORTEDTYPE' if type is not
- "calendar".
-
-2000-06-09 Federico Mena Quintero <federico@helixcode.com>
-
- * idl/evolution-calendar.idl (Cal): Added a get_n_objects()
- method.
-
- * pcs/cal-backend.c (cal_backend_get_n_objects): New function.
-
- * pcs/cal-backend-imc.c (cal_backend_imc_get_n_objects):
- Implemented.
-
- * pcs/cal.c (Cal_get_n_objects): Implemented.
-
- * cal-client/cal-client.c (cal_client_get_uids): Free the ev.
- (cal_client_get_n_objects): Implemented.
-
- * cal-util/calobj.h (iCalObjectField): New enumeration to identify
- the fields in an iCalObject.
-
-2000-06-08 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/event-editor.c (event_editor_destroy): Free the private
- structure.
-
-2000-06-08 Federico Mena Quintero <federico@helixcode.com>
-
- * cal-util/calobj.c (ical_object_to_vobject): Allow for NULL
- summaries.
-
-2000-06-07 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/event-editor.c (toolbar): Added missing tooltips. We still
- need icons, though.
-
-2000-06-07 Seth Alves <alves@hungry.com>
-
- * cal-util/calobj.c (ical_object_find_in_string): put this back in,
- it's still used in cal-backend-imc.c:cal_backend_imc_update_object
-
- * cal-client/cal-client.c (cal_client_get_object): instead of
- returning a text representation, decode the text and return an
- iCalObject. Also added CalClientGetStatus which indicates
- success or type of failure.
-
- * cal-util/calobj.c (ical_object_find_in_string): #ifed out
- ical_object_find_in_string since it is unused now.
-
- * cal-client/client-test.c (list_uids): track get_object change
- * gui/calendar-commands.c (calendar_iterate): same
- * gui/e-day-view.c (e_day_view_update_event): same
- * gui/e-week-view.c (e_week_view_update_event): same
- * gui/print.c (print_day_details): same
- (print_day_summary): same
- (print_todo_details): same
- * gui/gnome-cal.c (trigger_alarm_cb): same
- * gui/gncal-todo.c (gncal_todo_update): same
-
-2000-06-06 Seth Alves <alves@hungry.com>
-
- * cal-util/icalendar.c, icalendar-save.c: fixed a bunch of problems
- * cal-util/calobj.c (ical_object_find_in_string): use libical
- instead of libversit
- (ical_object_to_string): same
- (dump_icalobject): prints the contents of an icalobject for debugging
-
- * gui/Makefile.am (LINK_FLAGS): link libical.a instead of libical.la
- so we don't have to modify the build system of the released libical
- * cal-client/Makefile.am (client_test_LDADD): same
- * cal-util/Makefile.am (icalendar_test_LDADD): same
-
-2000-06-06 Federico Mena Quintero <federico@helixcode.com>
-
- * cal-util/calobj.c (ical_object_destroy): Removed from the public
- header; made static. Now everyone should use refcounting.
-
- * pcs/cal-backend-imc.c (free_ical_object): Use
- ical_object_unref().
- (remove_object): Likewise.
-
-2000-06-02 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/calendar-commands.c (print): New function to call the print
- engine.
- (calendar_toolbar): Added the Print button.
- (calendar_control_activate): Added the File/Print item.
-
- * gui/e-day-view.c (e_day_view_get_selected_time_range): Allow
- start_time and end_time to be NULL.
-
- * gui/e-week-view.c (e_week_view_get_selected_time_range):
- Likewise.
-
- * gui/print.c (range_selector_new): Show the range selector
- widgets. Use the correct radio group for all of them!
- (print_calendar): Do the dialog box here. We may want to split
- this function later into smaller chunks.
-
-2000-06-05 Damon Chaplin <damon@helixcode.com>
-
- * gui/e-week-view-event-item.c (e_week_view_event_item_button_press):
- allow the right button to popup the menu, even when the event is
- being edited.
-
- * gui/e-week-view.c:
- * gui/e-day-view.c: Set the keyboard focus to the EDayView/EWeekView
- when the right button is clicked, so that any event being edited is
- saved before any action (e.g. opening the Event Editor dialog) is
- started. Note that this won't work if we switch to asynchronous
- notification.
-
-2000-06-02 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/event-editor.c (tb_save_and_close_cb): Implemented.
- (toolbar): Added an icon for the Save and Close command.
- (save_ical_object): Recompute the title of the window here. Maybe
- it would be better to do it when we actually get the
- "object_changed" signal from the CalClient.
- (file_close_cb): Implemented.
-
-2000-06-02 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/gnome-cal.c (save_ical_object_cb): Implemented.
- (gnome_calendar_add_object): Removed function, since it was
- identical to gnome_calendar_update_object(). Modified the rest
- of the code to use only the latter.
- (gnome_calendar_remove_object): Be more paranoid about the UID.
- (gnome_calendar_update_object): Ditto. Also, renamed this
- function from gnome_calendar_object_changed(), for consistency
- with the lower-level CalClient interface.
-
- * gui/event-editor.c (event_editor_class_init): New
- "save_ical_object" signal to ask that our parent store the
- calendar object to the backend.
- (save_ical_object): New function to save the calendar object,
- actually if just emits the signal.
- (file_save_cb): Implemented.
- (dialog_to_ical_object): We want priv->
- alarm_program_run_program_entry (i.e. the entry inside the
- GnomeFileEntry), not the file entry itself.
- (dialog_to_ical_object): Only insert the recurrence ending date if
- the event is recurrent!
-
-2000-06-02 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/Makefile.am: Fixed EXTRA_DIST.
-
-2000-06-01 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/gnome-cal.c (editor_closed_cb): Handler for the
- "editor_closed" signal of the event editor; we just destroy it
- then.
-
- * gui/event-editor.c (app_delete_event_cb): Callback used when the
- dialog is closed. Release the iCalObject here instead of the
- event editor's destroy handler, and emit the new "editor_closed"
- signal.
-
-2000-06-01 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/event-editor-dialog.glade: Change of plans. The toplevel
- GnomeApp is now generated with Glade instead of being created in
- the program code. Otherwise we can't migrate the accelerators to
- the new toplevel and they won't work.
-
- * gui/event-editor.[ch]: EventEditor now derives from GtkObject.
- This lets us use the GnomeApp created by libglade and still have
- signals and stuff.
-
- * gui/event-editor.c (create_menu): Tell the UI handler that the
- menubar is the GnomeApp's existing one, not to create a new one.
- (create_toolbar): Tell the UI handler to use the GnomeApp's
- existing toolbar.
- (event_editor_focus): New function to raise/focus an event editor.
-
- * gui/gnome-cal.c (gnome_calendar_edit_object): Use
- event_editor_focus().
-
-2000-06-01 Ettore Perazzoli <ettore@helixcode.com>
-
- * gui/calendar-commands.c (calendar_control_activate): Put the
- toolbar into a frame to make it look like standard GNOME toolbars.
- Also, set `GNOME_DOCK_ITEM_BEH_NEVER_VERTICAL' so that it does not
- do evil things when its moved to the left or the right of the
- window.
-
-2000-05-31 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/gnome-cal.h (GnomeCalendar): Added a hash table to map
- calendar objects to their respective event editors.
-
- * gui/gnome-cal.c (gnome_calendar_init): Create the
- object_editor_hash.
- (gnome_calendar_destroy): Free the object_editor_hash.
- (gnome_calendar_edit_object): New function to centralize the
- launching of event editors; if one already exists for a particular
- calendar object, we just raise its window.
- (edit): Use gnome_calendar_edit_object().
-
- * gui/calendar-commands.c (display_objedit): Use
- gnome_calendar_edit_object().
- (display_objedit_today): Likewise.
-
- * gui/e-day-view.c (e_day_view_on_new_appointment): Likewise.
- (e_day_view_on_edit_appointment): Likewise.
-
- * gui/e-week-view.c (e_week_view_on_new_appointment): Likewise.
- (e_week_view_on_edit_appointment): Likewise.
-
- * gui/event-editor.c (event_editor_new): Do not take in an
- iCalObject; rather provide an event_editor_set_ical_object()
- function. We need this because a single editor may be switched
- between different calendar objects. Also, do not show the event
- editor; leave it up to the client code.
- (event_editor_construct): Likewise.
- (clear_widgets): New function to clear the widgets to default
- values.
- (fill_widgets): New function to fill in the widgets from the
- iCalObject. We don't do this in init_widgets() anymore.
- (free_exception_clist_data): New function to free the exceptions
- clist data. We were leaking the row data.
- (init_widgets): Hook to the destroy signal of the exceptions
- clist.
- (event_editor_set_ical_object): New function. Now it also makes a
- copy of the calendar object for the event editor; clients do not
- need to copy it anymore.
- (event_editor_destroy): Unref the UI handler as well.
- (event_editor_class_init): New "ical_object_released" signal to
- notify the parent that we are no longer editing the calendar
- object.
- (make_title_from_ico): Handle NULL objects.
-
- * gui/event-editor.h (EventEditor): Removed fields that are no
- longer used.
-
-2000-05-31 Damon Chaplin <damon@helixcode.com>
-
- * cal-util/Makefile.am: added test-recur test program.
-
- * cal-util/test-recur.c: new file to test the recurrence code.
-
- * cal-util/.cvsignore: added test-recur.
-
- * cal-util/cal-recur.c: updated.
-
-2000-05-30 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/event-editor.c (event_editor_construct): Create the UI
- handler after we have constructed the parent GnomeApp.
- (main_menu): Menu template is now in place.
- (toolbar): Tollbar template is now in place.
- (create_toolbar): Turn off labels in the toolbar since it sucks;
- it should support non-homogeneous buttons with horizontal icons
- and text.
-
-2000-05-29 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/gnome-cal.c (gnome_calendar_object_changed): Removed the
- flags argument, since now we just proxy the calendar object to the
- calendar client.
-
- * gui/event-editor.c (alarm_unit_get): Moved over from
- event-editor-utils.c.
-
- * gui/event-editor-utils.[ch]: Removed files, since the two
- functions that were left there (i.e. the ones not present in
- e-dialog-widgets) can simply be moved to event-editor.c.
-
- * gui/Makefile.am (evolution_calendar_SOURCES): Removed
- event-editor-utils.[ch] from the list of sources.
-
-2000-05-27 Federico Mena Quintero <federico@helixcode.com>
-
- * gui/event-editor-utils.c: Moved many functions to
- e-util/e-dialog-widgets.c.
-
-2000-05-25 Federico Mena Quintero <federico@helixcode.com>
-
- * 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 <federico@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * gui/main.c: Make it so that warnings don't crash calendar.
-
-2000-05-25 Ettore Perazzoli <ettore@helixcode.com>
-
- * 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 <federico@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * gui/Makefile.am: Added libepaned.a.
-
- * gui/gnome-cal.c: Switched from GtkPaned to EPaned.
-
-2000-05-22 Federico Mena Quintero <federico@helixcode.com>
-
- * 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 <damon@helixcode.com>
-
- * 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 <damon@helixcode.com>
-
- * 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 <federico@helixcode.com>
-
- * 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 <alves@hungry.com>
-
- * 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 <alves@hungry.com>
-
- * 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 <alves@hungry.com>
-
- * 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 <federico@helixcode.com>
-
- * 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 <federico@helixcode.com>
-
- * 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 <ettore@helixcode.com>
-
- * pcs/Makefile.am (INCLUDES): Add
- `-I$(top_builddir)/libical/src/libical'.
-
-2000-05-12 Federico Mena Quintero <federico@helixcode.com>
-
- * 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 <federico@helixcode.com>
-
- * 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 <danw@helixcode.com>
-
- * 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 <federico@helixcode.com>
-
- * 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 <cal-util/calobj.h>. #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 <matt@helixcode.com>
-
- * gui/calendar-commands.c (calendar_control_activate): Move
- "about" menuitem to the help menu.
-
-2000-05-10 Christopher James Lahey <clahey@helixcode.com>
-
- * gui/Makefile.am: Added main.h. Combined the two EXTRA_DIST
- sections.
-
-2000-05-09 Christopher James Lahey <clahey@helixcode.com>
-
- * pcs/cal-backend-imc.c: Set the format when creating a new
- calendar.
-
-2000-05-09 Christopher James Lahey <clahey@helixcode.com>
-
- * pcs/cal-factory.c: Removed double free of method_string in
- uri->method_string.
-
-2000-05-08 Ettore Perazzoli <ettore@helixcode.com>
-
- * 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 <alves@hungry.com>
-
- * 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 <federico@helixcode.com>
-
- * 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 <damon@helixcode.com>
-
- * 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 <damon@helixcode.com>
-
- * 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 <matt@helixcode.com>
-
- * 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 <damon@helixcode.com>
-
- * 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 <toshok@helixcode.com>
- * gui/.cvsignore: ignore evolution-calendar.pure
-
- * gui/Makefile.am: add support for building evolution-calendar.pure
-
-2000-05-06 Damon Chaplin <damon@helixcode.com>
-
- * 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 <damon@helixcode.com>
-
- * gui/week-view.[hc]: removed.
-
-2000-05-06 Damon Chaplin <damon@helixcode.com>
-
- * 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 <damon@helixcode.com>
-
- * 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 <damon@helixcode.com>
-
- * 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 <damon@helixcode.com>
-
- * 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 <damon@helixcode.com>
-
- * 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 <damon@helixcode.com>
-
- * 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 <alves@hungry.com>
-
- * 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 <damon@helixcode.com>
-
- * 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 <ettore@helixcode.com>
-
- * 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 <alves@hungry.com>
-
- * 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 <clahey@helixcode.com>
-
- * cal-util/.cvsignore: Replaced libcal-util.la with *.la
-
- * pcs/.cvsignore: Added *.la and *.lo.
-
-2000-04-25 Federico Mena Quintero <federico@helixcode.com>
-
- * 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 <alves@hungry.com>
-
- * 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 <ettore@helixcode.com>
-
- * 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 <alves@hungry.com>
-
- * 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 <federico@helixcode.com>
-
- * 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 <alves@hungry.com>
-
- * 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 <damon@helixcode.com>
-
- * 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 <gtk/gtkwindow.h>' 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 <alves@hungry.com>
-
- * 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 <alves@hungry.com>
-
- * 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 <alves@hungry.com>
-
- * 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 <federico@helixcode.com>
-
- * cal-util/Makefile.am (INCLUDES): Fix include path.
-
-2000-04-16 Federico Mena Quintero <federico@helixcode.com>
-
- * 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 <alves@hungry.com>
-
- * 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 <federico@helixcode.com>
-
- * 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 <toshok@helixcode.com>
-
- * 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 <alves@hungry.com>
-
- * 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 <damon@helixcode.com>
-
- * 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 <alves@hungry.com>
-
- * 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 <clahey@helixcode.com>
-
- * gui/Makefile.am: Removed linking with libetable and libeminicard
- since they weren't being used.
-
-2000-04-08 Seth Alves <alves@hungry.com>
-
- * 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 <alves@hungry.com>
-
- * 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 <alves@hungry.com>
-
- * 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 <matt@helixcode.com>
-
- * pcs/.cvsignore: Added *.lo.
-
-2000-03-30 Seth Alves <alves@hungry.com>
-
- * 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 <matt@helixcode.com>
-
- * Makefile.am: remove the gui directory, which doesn't compile.
-
-2000-03-28 Matt Loper <matt@helixcode.com>
-
- * pcs/Makefile.am: create a libpcs.la library, for use in the
- wombat.
-
-2000-03-28 Seth Alves <alves@hungry.com>
-
- * 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 <federico@helixcode.com>
-
- * 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 <federico@helixcode.com>
-
- * 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 <damon@helixcode.com>
-
- * gui/e-day-view*.[hc]: new files for the Day/Work-Week views.
-
-2000-03-12 Federico Mena Quintero <federico@helixcode.com>
-
- * 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 <federico@helixcode.com>
-
- * 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 <federico@helixcode.com>
-
- * 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 <alves@hungry.com>
-
- * 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 <federico@helixcode.com>
-
- * 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 <alves@hungry.com>
-
- * 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 <alves@hungry.com>
-
- * 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 <federico@helixcode.com>
-
- 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 <config.h>. 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 <federico@helixcode.com>
-
- * 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 <federico@helixcode.com>
-
- * Makefile.am: Removed stale rule for the conduit.
-
-2000-02-21 Matt Loper <matt@helixcode.com>
-
- * .cvsignore: Added *.lo.
-
-2000-02-19 Matt Loper <matt@helixcode.com>
-
- * .cvsignore: Added tlacuache and tl-test.
-
-2000-02-18 Miguel de Icaza <miguel@nuclecu.unam.mx>
-
- * Makefile.am (INCLUDES): Use BONOBO_VFS_GNOME_CFLAGS instead of
- GNOMEUI_INCLUDES, as we use Bonobo and VFS.
-
-2000-02-17 Seth Alves <alves@hungry.com>
-
- * 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 <federico@helixcode.com>
-
- * 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 <rms39@columbia.edu>
-
- * 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 <federico@helixcode.com>
-
- * 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 <federico@helixcode.com>
-
- * 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 <federico@helixcode.com>
-
- * 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 <federico@helixcode.com>
-
- * 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 <federico@helixcode.com>
-
- * 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 <federico@helixcode.com>
-
- * 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 <federico@helixcode.com>
-
- * 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 <federico@helixcode.com>
-
- * 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 <federico@helixcode.com>
-
- * Makefile.am (gnomecal_SOURCES): Added the CORBA generated
- sources.
-
-2000-02-01 Federico Mena Quintero <federico@helixcode.com>
-
- * 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 <federico@helixcode.com>
-
- * Makefile.am (gnomecal_SOURCES): Added cal-client.[ch] and
- cal-listener.[ch].
-
-2000-01-30 Federico Mena Quintero <federico@helixcode.com>
-
- * 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 <federico@helixcode.com>
-
- * cal-client.c cal-client.h: New files with the calendar client
- object.
-
-2000-01-25 Federico Mena Quintero <federico@helixcode.com>
-
- * 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 <federico@helixcode.com>
-
- * 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 <federico@helixcode.com>
-
- * 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 <federico@helixcode.com>
-
- * 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 <federico@helixcode.com>
-
- * 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 <federico@helixcode.com>
-
- * 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 <federico@helixcode.com>
-
- 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 <federico@helixcode.com>
-
- * 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 <deity@eskil.dk>
-
- * Makefile.am: Changes to remove todo capplet stuff from distro.
-
-2000-01-08 Vadim Strizhevsky <vadim@optonline.net>
-
- * calendar-conduit-control-applet.c: Added pilotID argument to
- gpilotd_conduit_mgmt_new.
-
-
-2000-01-05 Eskil Heyn Olsen <deity@eskil.dk>
-
- * 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 <deity@eskil.dk>
-
- * 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 <deity@eskil.dk>
-
- * 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 <rms39@columbia.edu>
-
- * 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 <deity@eskil.dk>
-
- * 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 <deity@eskil.dk>
-
- * 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 <deity@eskil.dk>
-
- * Makefile.am (Conduits_second_DATA): Also install .desktop files
- for conduit capplets in the gnome/apps menu dir.
-
-1999-12-04 Eskil Heyn Olsen <deity@eskil.dk>
-
- * Makefile.am (EXTRA_DIST): Added .desktop files to EXTRA_DIST.
-
-1999-10-12 Clifford R. Conover <rusty@zootweb.com>
-
- * 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 <deity@eskil.dk>
-
- * calendar-conduit.c: undef DEBUG_CALCONDUT, suppresses debug output.
-
-1999-12-02 Russell Steinthal <rms39@columbia.edu>
-
- * 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 <deity@eskil.dk>
-
- * calendar-conduit.c (compare): Fixed compare bug. Also neated up
- some of the if's in set_status.
-
-1999-11-22 Russell Steinthal <rms39@columbia.edu>
-
- * Merged todo list coloring patch from stable
- * Added myself to AUTHORS, about box (per Miguel)
-
-1999-11-22 Eskil Heyn Olsen <deity@eskil.dk>
-
- * calendar-conduit.c (pre_sync): Writes some warning
- messages when pre_sync fails.
-
-1999-11-14 Eskil Heyn Olsen <deity@eskil.dk>
-
- * Makefile.am: Stupid misplaced endif cause gncal to depend on an
- install gnome-pilot... fixed... sorry.
-
-1999-11-12 Eskil Heyn Olsen <deity@eskil.dk>
-
- * 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 <rms39@columbia.edu>
-
- * 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 <rms39@columbia.edu>
-
- * calendar.c (calendar_day_change): Add call to
- calendar_init_alarms() to schedule another day change alarm.
-
-1999-11-09 Eskil Heyn Olsen <deity@eskil.dk>
-
- * 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 <deity@eskil.dk>
-
- * calendar-conduit-control-applet.c (readStateCfg): Commented the
- code out, thus the capplet works again.
-
-1999-11-04 Eskil Olsen <deity@eskil.dk>
-
- * 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 <rms39@columbia.edu>
-
- * 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 <rms39@columbia.edu>
-
- * calendar.c (calendar_new): Correctly initialize calendar_day_end
- and calendar_day_begin *before* installing day-change alarm.
-
-1999-10-21 Russell Steinthal <rms39@columbia.edu>
-
- * 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 <rms39@columbia.edu>
-
- * gnome-cal.c (calendar_notify): Fix typos which were causing
- invalid times in audio notification dialogs; fixes Bug #2561
-
-1999-10-18 Russell Steinthal <rms39@columbia.edu>
-
- * 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 <norpan@bigfoot.com>
-
- * gncal.desktop: Added swedish translation
-
-1999-10-13 Eskil Olsen <deity@eskil.dk>
-
- * Makefile.am: Hopefully the fixes the much-hated
- gnome-pilot dependency.
-
-1999-10-07 Eskil Olsen <deity@eskil.dk>
-
- * 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 <deity@eskil.dk>
-
- * *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 <mc@bat.ru>
-
- * 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 <matt@abacusnet.net>
-
-1999-09-27 Miguel de Icaza <miguel@nuclecu.unam.mx>
-
- * 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 <deity@eskil.dk>
-
- * 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 <deity@eskil.dk>
-
- * 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 <deity@eskil.dk>
-
- * 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 <lauris@ariman.ee>
-
- * gncal.desktop: Added Estonian translations.
-
-1999-09-14 Federico Mena Quintero <federico@redhat.com>
-
- * gncal-full-day.c (child_popup_menu): Set the data pointers for
- all the items.
-
-1999-09-14 Kjartan Maraas <kmaraas@online.no>
-
- * doc/C/gnomecal.sgml: Merge from gnome-pim-1-0. Synced with newest
- user-guide.
-
-1999-09-01 Miguel de Icaza <miguel@gnu.org>
-
- * eventedit.c (ee_create_buttons): Make the OK button the default
- button per Russell's suggestion.
-
-1999-08-30 Miguel de Icaza <miguel@nuclecu.unam.mx>
-
- * 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 <stric@ing.umu.se>
-
- * gnomecal.gnorba: "GenericFactoy" is wrong...
-
-1999-08-15 Miguel de Icaza <miguel@gnu.org>
-
- * calobj.c (ical_gen_uid): Fix the hostname part.
-
-1999-08-07 Peter Teichman <pat4@acpub.duke.edu>
-
- * 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 <miguel@gnu.org>
-
- * month-view.c (month_view_init): Release points here.
-
-1999-08-02 Peter Teichman <pat4@acpub.duke.edu>
-
- * 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 <pat4@acpub.duke.edu>
-
- * calendar-pilot-sync.c (sync_object_to_pilot): The multi-day
- appointment corruption bug is dead. Whoo!
-
-1999-07-31 Peter Teichman <pat4@acpub.duke.edu>
-
- * Makefile.am: fixed this up slightly with respect to pilot conduits
-
-1999-07-30 Jonathan Blandford <jrb@redhat.com>
-
- * Makefile.am (libcalendar_conduit_la_LIBADD): More autoconf-stuff
-
-1999-07-29 Jonathan Blandford <jrb@redhat.com>
-
- * gnome-cal.c (setup_widgets): Add scrolling to the yearview.
-
-1999-07-28 Miguel de Icaza <miguel@gnu.org>
-
- * 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 <miguel@gnu.org>
-
- * 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 <miguel@gnu.org>
-
- * 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 <miguel@gnu.org>
-
- * 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 <matt@abacusnet.net>
-
- * timeutil.c (time_from_isodate): Handle the 'Z' parameter to the
- ISO date format to convert from GMT time.
-
-1999-07-17 Nat Friedman <nat@gnome-support.com>
-
- * calendar.c (calendar_add_object): Copy the new UID into the
- iCalObject structure.
-
-1999-07-16 Miguel de Icaza <miguel@gnu.org>
-
- * 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 <miguel@gnu.org>
-
- * 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 <nick@poetic.com>
-
- * 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 <jean-noel.guiheneuf@wanadoo.fr>
-
- * 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 <mike@lotusland.demon.co.uk>
-
- * 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 <anders.carlsson@tordata.se>
-
- * main.c (new_calendar): Realize the toplevel widget when
- --hidden is passed to gnomecal. This fixes a segfault.
-
-1999-06-04 Robert Brady <rwb197@ecs.soton.ac.uk>
-
- * gnome-cal.h, gnome-cal.c: Fix abort() problem with the year view.
- (Bug #1367). Thanks to Owen Cliffe <oc197@ecs.soton.ac.uk> for
- helping track it down.
-
-1999-06-03 Miguel de Icaza <miguel@nuclecu.unam.mx>
-
- * calobj.c (daynumberlist): One line bug fix from Sergey I Panov.
-
-1999-06-02 Miguel de Icaza <miguel@nuclecu.unam.mx>
-
- * 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 <miguel@nuclecu.unam.mx>
-
- * 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 <miguel@nuclecu.unam.mx>
-
- * Makefile.am (install-data-local): help files be gone. They are
- now installed from the Docbook stuff.
-
-1999-05-26 Russell Steinthal <steintr@condor.penguinpowered.com>
-
- * 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 <miguel@nuclecu.unam.mx>
-
- * 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 <federico@nuclecu.unam.mx>
-
- * year-view.c: Removed unused macro CALENDAR_HEIGHT.
-
-1999-05-25 Federico Mena Quintero <federico@nuclecu.unam.mx>
-
- * 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 <nat@nat.org>
-
- * 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 <miguel@nuclecu.unam.mx>
-
- * main.c (dump_todo): Add --todo flag to dump the todo contents.
-
-1999-04-19 Miguel de Icaza <miguel@nuclecu.unam.mx>
-
- * gncal-todo.c (add_activated): Use same hack used in edit_activated
-
-1999-04-16 Miguel de Icaza <miguel@nuclecu.unam.mx>
-
- * 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 <miguel@nuclecu.unam.mx>
-
- * 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 <murf@e-tools.com>
-
- * 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 <federico@nuclecu.unam.mx>
-
- * gncal-todo.c (convert_time_t_to_char): Made static. Make it use
- the full year format for strftime().
-
-1999-03-27 Nuno Ferreira <nmrf@rnl.ist.utl.pt>
-
- * calobj.c: Include <config.h> So that strings get translated.
-
-1999-03-26 Tomas Ogren <stric@ing.umu.se>
-
- * 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 <stric@ing.umu.se>
-
- * 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 <stric@ing.umu.se>
-
- * 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 <stric@ing.umu.se>
-
- * 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 <nat@nat.org>
-
- * 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 <rconover@montana.edu>
-
- * 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 <martin@home-of-linux.org>
-
- * 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 <cwryu@adam.kaist.ac.kr>
-
- * quick-view.c (QUICK_VIEW_FONTSET): Added Korean font to the
- fontset string.
- * mark.h (*_FONTSET): Likewise.
-
-1999-02-23 Miguel de Icaza <miguel@nuclecu.unam.mx>
-
- * 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 <mc@bat.ru>
-
- * 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 <stric@ing.umu.se>
-
- * main.c (init_username): Made use of g_get_{user,real}_name() instead
- of our own home-brew...
-
-1999-02-17 Sergey Panov <sipan@mit.edu>
-
- * 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 <sipan@mit.edu>
-
- * main.c: Use N_() macro for color settings labels in
- color_props structure.
-
-1999-02-15 Federico Mena Quintero <federico@nuclecu.unam.mx>
-
- * goto.c (goto_dialog): Indentation fixes.
-
-1999-02-15 Tomas Ogren <stric@ing.umu.se>
-
- * 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 <miguel@nuclecu.unam.mx>
-
- * 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 <stric@ing.umu.se>
-
- * main.c: Removed the gtk_widget_realize call.
-
-1999-02-06 Changwoo Ryu <cwryu@adam.kaist.ac.kr>
-
- * gncal.desktop: Added Korean translations.
-
-1999-02-04 Federico Mena Quintero <federico@nuclecu.unam.mx>
-
- * eventedit.c (date_edit_new): New convenience function to create
- a properly-configured date editor widget.
-
-1999-02-03 Federico Mena Quintero <federico@nuclecu.unam.mx>
-
- * 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 <federico@nuclecu.unam.mx>
-
- * eventedit.c (event_editor_init): Set the title of the event
- editor window.
-
-1999-01-31 Federico Mena Quintero <federico@nuclecu.unam.mx>
-
- * 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 <miguel@nuclecu.unam.mx>
-
- * 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 <tack@dok.org>
-
- * 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 <miguel@nuclecu.unam.mx>
-
- * 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 <federico@nuclecu.unam.mx>
-
- * 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 <miguel@nuclecu.unam.mx>
-
- * 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 <nat@nat.org>
-
- * 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 <federico@nuclecu.unam.mx>
-
- * 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 <stric@ing.umu.se>
-
- * main.c: do gtk_widget_realize on the toplevel window..
-
-1999-01-13 Federico Mena Quintero <federico@nuclecu.unam.mx>
-
- * 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 <nat@nat.org>
-
- * main.c: Converted some more stuff to use the standards.
-
-1999-01-08 Nat Friedman <nat@nat.org>
-
- * 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 <jgarzik@pobox.com>
-
- * 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 <miguel@nuclecu.unam.mx>
-
- 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 <federico@nuclecu.unam.mx>
-
- * 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 <miguel@nuclecu.unam.mx>
-
- * 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 <miguel@nuclecu.unam.mx>
-
- * eventedit.c (ee_rp_init_exceptions): Update GtkClist usage.
-
-1998-11-23 Andrew T. Veliath <andrewtv@usa.net>
-
- * 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 <hvr@hvrlab.ml.org>
-
- * eventedit.c: use GPOINTER_TO_INT
-
- * gncal-todo.c: same.
-
-1998-11-22 Matthew Wilson <msw@redhat.com>
-
- * 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 <federico@nuclecu.unam.mx>
-
- * 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 <miguel@nuclecu.unam.mx>
-
- * calendar.c (calendar_save): Backup the old file before saving
- the caledar.
-
-1998-11-06 Miguel de Icaza <miguel@nuclecu.unam.mx>
-
- * calobj.c: Add ctype.h
-
-1998-10-31 Federico Mena Quintero <federico@nuclecu.unam.mx>
-
- * 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 <federico@nuclecu.unam.mx>
-
- * 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 <g@ucsd.edu>
-
- * eventedit.c (ee_store_recur_rule_to_ical): The interval was
- never being loaded from the spin button.
-
-1998-10-09 Federico Mena Quintero <federico@nuclecu.unam.mx>
-
- * 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 <federico@nuclecu.unam.mx>
-
- * 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 <federico@nuclecu.unam.mx>
-
- * 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 <nhadcasc@fs-maphy.uni-hannover.de>
-
- * main.c (main): Replaced the 'gnome_client_new_default' call with
- 'gnome_master_client'.
-
-1998-10-02 Federico Mena Quintero <federico@nuclecu.unam.mx>
-
- * 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 <federico@nuclecu.unam.mx>
-
- * 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 <federico@nuclecu.unam.mx>
-
- * 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 <federico@nuclecu.unam.mx>
-
- * 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 <federico@nuclecu.unam.mx>
-
- * 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 <federico@nuclecu.unam.mx>
-
- * main.c: Hotkey for File/Exit should be C-q, not C-x.
-
-1998-09-24 Federico Mena Quintero <federico@nuclecu.unam.mx>
-
- * 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 <federico@nuclecu.unam.mx>
-
- * main.c: Added underlined shortcuts and accelerators to the main menu.
-
-1998-09-16 Raja R Harinath <harinath@cs.umn.edu>
-
- * gncal-week-view.c (<gtk/gtklabel.h>): Include.
- * gncal-week-view.h (<gtk/gtkvbox.h>): Include.
-
-1998-09-06 Miguel de Icaza <miguel@nuclecu.unam.mx>
-
- * 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 <federico@nuclecu.unam.mx>
-
- * 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 <federico@nuclecu.unam.mx>
-
- * 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 <federico@nuclecu.unam.mx>
-
- * 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 <federico@nuclecu.unam.mx>
-
- * 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 <federico@nuclecu.unam.mx>
-
- * 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 <federico@nuclecu.unam.mx>
-
- * 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 <federico@nuclecu.unam.mx>
-
- * 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 <miguel@nuclecu.unam.mx>
-
- * 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 <federico@nuclecu.unam.mx>
-
- * 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 <federico@nuclecu.unam.mx>
-
- * 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 <federico@nuclecu.unam.mx>
-
- * 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 <nmrf@rnl.ist.utl.pt>
-
- * 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 <federico@nuclecu.unam.mx>
-
- * 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 <federico@nuclecu.unam.mx>
-
- * 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 <miguel@nuclecu.unam.mx>
-
- * 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 <nmrf@rnl.ist.utl.pt>
-
- * gncal.desktop: Added Portuguese translation.
-
-Mon Jun 22 13:01:16 1998 Havoc Pennington <hp@pobox.com>
-
- * main.c (session_save_state): Use gnome_geometry_string to get
- the geometry string.
-
-1998-06-04 Federico Mena Quintero <federico@nuclecu.unam.mx>
-
- * 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 <nmrf@rnl.ist.utl.pt>
-
- * 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 <federico@nuclecu.unam.mx>
-
- * 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 <miguel@nuclecu.unam.mx>
-
- * 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 <miguel@nuclecu.unam.mx>
-
- * 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 <federico@nuclecu.unam.mx>
-
- * gncal-full-day.c (paint_back): Eliminated unnecessary border repainting.
-
-Sun May 17 17:55:03 1998 Havoc Pennington <hp@pobox.com>
-
- * gncal-todo.c (simple_todo_editor): Close dialog when return is pressed.
-
-1998-05-15 Miguel de Icaza <miguel@nuclecu.unam.mx>
-
- * 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 <miguel@nuclecu.unam.mx>
-
- * 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 <miguel@nuclecu.unam.mx>
-
- * 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 <miguel@nuclecu.unam.mx>
-
- * 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 <miguel@nuclecu.unam.mx>
-
- * prop.c (prop_apply): Only run the apply code once.
-
-1998-05-03 Miguel de Icaza <miguel@nuclecu.unam.mx>
-
- * 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 <miguel@nuclecu.unam.mx>
-
- * prop.c (prop_apply): Do not call prop_cancel, ths is now using
- GnomePropertyDialog.
-
-1998-04-29 Miguel de Icaza <miguel@nuclecu.unam.mx>
-
- * 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 <miguel@nuclecu.unam.mx>
-
- * 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 <hp@pobox.com>
-
- * 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 <libgnomeui/gnome-dialog.h>.
-
-1998-04-24 Miguel de Icaza <miguel@nuclecu.unam.mx>
-
- * calobj.c (ical_object_create_from_vobject): Fixed alarm loading;
- Load snooze time and snooze count
-
-1998-04-23 Federico Mena Quintero <federico@nuclecu.unam.mx>
-
- * 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 <federico@nuclecu.unam.mx>
-
- * 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 <miguel@nuclecu.unam.mx>
-
- * 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 <federico@nuclecu.unam.mx>
-
- * 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 <miguel@nuclecu.unam.mx>
-
- * 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 <federico@nuclecu.unam.mx>
-
- * 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 <miguel@nuclecu.unam.mx>
-
- * eventedit.c (ee_ok): Mark the event as non-new after accepting changes.
-
-1998-04-20 Federico Mena Quintero <federico@nuclecu.unam.mx>
-
- * 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 <miguel@nuclecu.unam.mx>
-
- * 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 <miguel@nuclecu.unam.mx>
-
- * 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 <miguel@nuclecu.unam.mx>
-
- * alarm.c (alarm_kill, alarm_init, alarm_add): Implement the alarm
- management framework.
-
-1998-04-17 Federico Mena Quintero <federico@nuclecu.unam.mx>
-
- * 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 <miguel@nuclecu.unam.mx>
-
- * gnome-cal.c (gnome_calendar_remove_object): Add support for
- removing objects.
-
-1998-04-17 Federico Mena Quintero <federico@nuclecu.unam.mx>
-
- * 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 <miguel@nuclecu.unam.mx>
-
- * 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 <federico@nuclecu.unam.mx>
-
- * 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 <federico@nuclecu.unam.mx>
-
- * 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 <miguel@nuclecu.unam.mx>
-
- * calobj.c (ical_foreach): Define iterator routine.
-
-1998-04-15 Arturo Espinosa Aldama <arturo@nuclecu.unam.mx>
-
- * gncal-year-view.[hc]: Now using time_t for new and set.
- Random fixes, as well.
-
-1998-04-15 Federico Mena Quintero <federico@nuclecu.unam.mx>
-
- * 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 <miguel@nuclecu.unam.mx>
-
- * 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 <arturo@nuclecu.unam.mx>
-
- * 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 <federico@nuclecu.unam.mx>
-
- * 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 <federico@nuclecu.unam.mx>
-
- * 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 <federico@nuclecu.unam.mx>
-
- * 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 <federico@nuclecu.unam.mx>
-
- * 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 <miguel@nuclecu.unam.mx>
-
- * 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 <federico@nuclecu.unam.mx>
-
- * 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 <federico@nuclecu.unam.mx>
-
- * gncal-full-day.c: #include <string.h>
-
- * 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 <harinath@cs.umn.edu>
-
- * gncal.c (update_calendar): Say `#if 0', not `#ifdef 0'.
-
-1998-04-07 Federico Mena Quintero <federico@nuclecu.unam.mx>
-
- * 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 <federico@nuclecu.unam.mx>
-
- * 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 <federico@nuclecu.unam.mx>
-
- * eventedit.c (ee_create_ae): Make it return void.
- (ee_alarm_widgets): Remove some unused variables.
- (ee_store_alarm): Make it return void.
- #include <string.h>
-
- * 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 <nhadcasc@fs-maphy.uni-hannover.de>
-
- * versit/.cvsignore: New file.
-
-Fri Apr 3 22:31:54 1998 Tom Tromey <tromey@cygnus.com>
-
- * calendar.c: Include <config.h>.
-
-1998-04-03 Miguel de Icaza <miguel@nuclecu.unam.mx>
-
- * 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 <federico@nuclecu.unam.mx>
-
- * view-utils.c (view_utils_draw_events): The "better" format
- string for strftime() wasn't better, after all :-(
-
-1998-04-02 Federico Mena Quintero <federico@nuclecu.unam.mx>
-
- * 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 <miguel@nuclecu.unam.mx>
-
- * 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 <federico@nuclecu.unam.mx>
-
- * 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 <miguel@nuclecu.unam.mx>
-
- * 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 <federico@nuclecu.unam.mx>
-
- * 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 <miguel@nuclecu.unam.mx>
-
- * 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 <federico@nuclecu.unam.mx>
-
- * 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 <federico@nuclecu.unam.mx>
-
- * 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 <miguel@kernel.org>
-
- * Start from scratch
-
-Tue Mar 31 23:46:50 1998 Tom Tromey <tromey@cygnus.com>
-
- * timeutil.c (format_simple_hour): `buf' now static.
-
-1998-03-31 Federico Mena Quintero <federico@nuclecu.unam.mx>
-
- * 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 <csmall@small.dropbear.id.au>
-
- * Now has (non working) session maangement
- * Uses a clist for the dailylist like gtt
-
-Sat Mar 21 15:43:20 1998 Tom Tromey <tromey@cygnus.com>
-
- * gncal.c: Use gnome_message_box_*, not gnome_messagebox_*.
-
-1998-03-12 Craig Small <csmall@small.dropbear.id.au>
-
- * Now linked (in some horrible way) to the gtkcalendar widget.
-
-Sun Mar 8 16:38:10 1998 Tom Tromey <tromey@cygnus.com>
-
- * 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 <federico@nuclecu.unam.mx>
-
- * gncal.c (main): Added app_id "gncal".
-
-1998-02-19 Carsten Schaar <nhadcasc@fs-maphy.uni-hannover.de>
-
- * Makefile.am (gncal_LDADD): Added '$(INTLLIBS)'
-
-1998-02-18 Raja R Harinath <harinath@cs.umn.edu>
-
- * 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 <miguel@nuclecu.unam.mx>
-
- * menus.c: Replace "Quit" with "Exit".
diff --git a/calendar/Makefile.am b/calendar/Makefile.am
deleted file mode 100644
index e17d581184..0000000000
--- a/calendar/Makefile.am
+++ /dev/null
@@ -1,7 +0,0 @@
-if ENABLE_PILOT_CONDUITS
-CONDUIT_DIR = conduits
-else
-CONDUIT_DIR =
-endif
-
-SUBDIRS = idl cal-util pcs cal-client gui $(CONDUIT_DIR)
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 1537e6e01d..0000000000
--- a/calendar/cal-client/.cvsignore
+++ /dev/null
@@ -1,15 +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
-*.lo
-*.la
-client-test
diff --git a/calendar/cal-client/Makefile.am b/calendar/cal-client/Makefile.am
deleted file mode 100644
index 1e2438df46..0000000000
--- a/calendar/cal-client/Makefile.am
+++ /dev/null
@@ -1,87 +0,0 @@
-#
-# libcal-client
-#
-
-CORBA_GENERATED = \
- evolution-calendar-common.c \
- evolution-calendar-skels.c \
- evolution-calendar-stubs.c
-
-CORBA_HEADERS_GENERATED = \
- evolution-calendar.h
-
-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=\""$(localedir)"\" \
- -DG_LOG_DOMAIN=\"cal-client\" \
- -I$(top_srcdir)/calendar \
- -I$(srcdir) -I$(top_srcdir) \
- -I. \
- -I.. \
- -I$(top_builddir) \
- -I$(top_builddir)/libical/src/libical \
- -I$(top_srcdir)/libical/src/libical \
- $(BONOBO_GNOME_CFLAGS)
-
-lib_LTLIBRARIES = libcal-client.la
-
-libcal_clientincludedir = $(includedir)/evolution/cal-client
-
-libcal_client_la_SOURCES = \
- $(CORBA_GENERATED) \
- cal-client-types.c \
- cal-client.c \
- cal-listener.c \
- cal-listener.h \
- cal-query.c \
- query-listener.c \
- query-listener.h
-
-libcal_clientinclude_HEADERS = \
- $(CORBA_HEADERS_GENERATED) \
- cal-client-types.h \
- cal-client.h \
- cal-query.h
-
-#
-# make a static library for use by calendar conduit's shared library
-#
-noinst_LTLIBRARIES = libcal-client-static.la
-libcal_client_static_la_SOURCES = $(libcal_client_la_SOURCES)
-libcal_client_static_la_LDFLAGS = --all-static
-
-
-#
-# 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) \
- $(EXTRA_GNOME_LIBS) \
- -lunicode \
- $(top_builddir)/calendar/cal-util/libcal-util.la \
- $(top_builddir)/libversit/libversit.la \
- $(top_builddir)/libical/src/libical/libical.la \
- libcal-client.la
-
-BUILT_SOURCES = $(CORBA_GENERATED)
-CLEANFILES += $(BUILT_SOURCES)
-
-dist-hook:
- cd $(distdir); rm -f $(BUILT_SOURCES)
diff --git a/calendar/cal-client/cal-client-types.c b/calendar/cal-client/cal-client-types.c
deleted file mode 100644
index 23aa14475f..0000000000
--- a/calendar/cal-client/cal-client-types.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/* Evolution calendar utilities and types
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Authors: Federico Mena-Quintero <federico@ximian.com>
- * JP Rosevear <jpr@ximian.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 <stdlib.h>
-#include "cal-client-types.h"
-
-
-
-/**
- * cal_client_change_list_free:
- * @list: List of #CalClientChange structures.
- *
- * Frees a list of #CalClientChange structures.
- **/
-void
-cal_client_change_list_free (GList *list)
-{
- CalClientChange *c;
- GList *l;
-
- for (l = list; l; l = l->next) {
- c = l->data;
-
- g_assert (c != NULL);
- g_assert (c->comp != NULL);
-
- gtk_object_unref (GTK_OBJECT (c->comp));
- g_free (c);
- }
-
- g_list_free (list);
-}
diff --git a/calendar/cal-client/cal-client-types.h b/calendar/cal-client/cal-client-types.h
deleted file mode 100644
index c356f2378e..0000000000
--- a/calendar/cal-client/cal-client-types.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* Evolution calendar utilities and types
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Authors: Federico Mena-Quintero <federico@ximian.com>
- * JP Rosevear <jpr@ximian.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 CAL_CLIENT_TYPES_H
-#define CAL_CLIENT_TYPES_H
-
-#include <libgnome/gnome-defs.h>
-#include <cal-util/cal-component.h>
-
-BEGIN_GNOME_DECLS
-
-
-
-typedef enum {
- CAL_CLIENT_CHANGE_ADDED = 1 << 0,
- CAL_CLIENT_CHANGE_MODIFIED = 1 << 1,
- CAL_CLIENT_CHANGE_DELETED = 1 << 2
-} CalClientChangeType;
-
-typedef struct
-{
- CalComponent *comp;
- CalClientChangeType type;
-} CalClientChange;
-
-void cal_client_change_list_free (GList *list);
-
-END_GNOME_DECLS
-
-#endif
-
diff --git a/calendar/cal-client/cal-client.c b/calendar/cal-client/cal-client.c
deleted file mode 100644
index cd8c8713d6..0000000000
--- a/calendar/cal-client/cal-client.c
+++ /dev/null
@@ -1,1533 +0,0 @@
-/* Evolution calendar client
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Author: Federico Mena-Quintero <federico@ximian.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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <gtk/gtksignal.h>
-#include <liboaf/liboaf.h>
-
-#include "cal-client-types.h"
-#include "cal-client.h"
-#include "cal-listener.h"
-
-
-
-/* Private part of the CalClient structure */
-struct _CalClientPrivate {
- /* Load state to avoid multiple loads */
- CalClientLoadState load_state;
-
- /* URI of the calendar that is being loaded or is already loaded, or
- * NULL if we are not loaded.
- */
- char *uri;
-
- /* The calendar factory we are contacting */
- GNOME_Evolution_Calendar_CalFactory factory;
-
- /* Our calendar listener implementation */
- CalListener *listener;
-
- /* The calendar client interface object we are contacting */
- GNOME_Evolution_Calendar_Cal cal;
-};
-
-
-
-/* Signal IDs */
-enum {
- CAL_OPENED,
- 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:
- *
- * 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_OPENED] =
- gtk_signal_new ("cal_opened",
- GTK_RUN_FIRST,
- object_class->type,
- GTK_SIGNAL_OFFSET (CalClientClass, cal_opened),
- 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->load_state = CAL_CLIENT_LOAD_NOT_LOADED;
- priv->uri = NULL;
- priv->factory = CORBA_OBJECT_NIL;
-}
-
-/* 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);
- GNOME_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 = CAL_CLIENT_LOAD_NOT_LOADED;
-
- if (priv->uri) {
- g_free (priv->uri);
- priv->uri = NULL;
- }
-
- g_free (priv);
- client->priv = NULL;
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-
-
-/* Signal handlers for the listener's signals */
-
-/* Handle the cal_opened notification from the listener */
-static void
-cal_opened_cb (CalListener *listener,
- GNOME_Evolution_Calendar_Listener_OpenStatus status,
- GNOME_Evolution_Calendar_Cal cal,
- gpointer data)
-{
- CalClient *client;
- CalClientPrivate *priv;
- CORBA_Environment ev;
- GNOME_Evolution_Calendar_Cal cal_copy;
- CalClientOpenStatus client_status;
-
- client = CAL_CLIENT (data);
- priv = client->priv;
-
- g_assert (priv->load_state == CAL_CLIENT_LOAD_LOADING);
- g_assert (priv->uri != NULL);
-
- client_status = CAL_CLIENT_OPEN_ERROR;
-
- switch (status) {
- case GNOME_Evolution_Calendar_Listener_SUCCESS:
- CORBA_exception_init (&ev);
- cal_copy = CORBA_Object_duplicate (cal, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_message ("cal_opened_cb(): could not duplicate the "
- "calendar client interface");
- CORBA_exception_free (&ev);
- goto error;
- }
- CORBA_exception_free (&ev);
-
- priv->cal = cal_copy;
- priv->load_state = CAL_CLIENT_LOAD_LOADED;
-
- client_status = CAL_CLIENT_OPEN_SUCCESS;
- goto out;
-
- case GNOME_Evolution_Calendar_Listener_ERROR:
- client_status = CAL_CLIENT_OPEN_ERROR;
- goto error;
-
- case GNOME_Evolution_Calendar_Listener_NOT_FOUND:
- client_status = CAL_CLIENT_OPEN_NOT_FOUND;
- goto error;
-
- case GNOME_Evolution_Calendar_Listener_METHOD_NOT_SUPPORTED:
- client_status = CAL_CLIENT_OPEN_METHOD_NOT_SUPPORTED;
- goto error;
-
- default:
- g_assert_not_reached ();
- }
-
- error:
-
- bonobo_object_unref (BONOBO_OBJECT (priv->listener));
- priv->listener = NULL;
-
- /* We free the priv->uri and set the priv->load_state until after the
- * "cal_opened" signal has been emitted so that handlers will be able to
- * access this information.
- */
-
- out:
-
- /* We are *not* inside a signal handler (this is just a simple callback
- * called from the listener), so there is not a temporary reference to
- * the client object. We ref() so that we can safely emit our own
- * signal and clean up.
- */
-
- gtk_object_ref (GTK_OBJECT (client));
-
- gtk_signal_emit (GTK_OBJECT (client), cal_client_signals[CAL_OPENED],
- client_status);
-
- if (client_status != CAL_CLIENT_OPEN_SUCCESS) {
- priv->load_state = CAL_CLIENT_LOAD_NOT_LOADED;
- g_free (priv->uri);
- priv->uri = NULL;
- }
-
- g_assert (priv->load_state != CAL_CLIENT_LOAD_LOADING);
-
- gtk_object_unref (GTK_OBJECT (client));
-}
-
-/* Handle the obj_updated signal from the listener */
-static void
-obj_updated_cb (CalListener *listener, const GNOME_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 GNOME_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;
- GNOME_Evolution_Calendar_CalFactory factory, factory_copy;
- CORBA_Environment ev;
-
- 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;
-
- CORBA_exception_init (&ev);
- factory = (GNOME_Evolution_Calendar_CalFactory) oaf_activate_from_id (
- "OAFIID:GNOME_Evolution_Wombat_CalendarFactory",
- 0, NULL, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_message ("cal_client_construct(): Could not activate the calendar factory");
- CORBA_exception_free (&ev);
- 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:
- *
- * Creates a new calendar client. It should be initialized by calling
- * cal_client_open_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;
-}
-
-/**
- * cal_client_open_calendar:
- * @client: A calendar client.
- * @str_uri: URI of calendar to open.
- * @only_if_exists: FALSE if the calendar should be opened even if there
- * was no storage for it, i.e. to create a new calendar or load an existing
- * one if it already exists. TRUE if it should only try to load calendars
- * that already exist.
- *
- * Makes a calendar client initiate a request to open a calendar. The calendar
- * client will emit the "cal_opened" signal when the response from the server is
- * received.
- *
- * Return value: TRUE on success, FALSE on failure to issue the open request.
- **/
-gboolean
-cal_client_open_calendar (CalClient *client, const char *str_uri, gboolean only_if_exists)
-{
- CalClientPrivate *priv;
- GNOME_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 == CAL_CLIENT_LOAD_NOT_LOADED, FALSE);
- g_assert (priv->uri == NULL);
-
- g_return_val_if_fail (str_uri != NULL, FALSE);
-
- priv->listener = cal_listener_new (cal_opened_cb,
- obj_updated_cb,
- obj_removed_cb,
- client);
- if (!priv->listener) {
- g_message ("cal_client_open_calendar(): could not create the listener");
- return FALSE;
- }
-
- corba_listener = (GNOME_Evolution_Calendar_Listener) bonobo_object_corba_objref (
- BONOBO_OBJECT (priv->listener));
-
- CORBA_exception_init (&ev);
-
- priv->load_state = CAL_CLIENT_LOAD_LOADING;
- priv->uri = g_strdup (str_uri);
-
- GNOME_Evolution_Calendar_CalFactory_open (priv->factory, str_uri, only_if_exists,
- corba_listener, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- CORBA_exception_free (&ev);
-
- g_message ("cal_client_open_calendar(): open request failed");
- bonobo_object_unref (BONOBO_OBJECT (priv->listener));
- priv->listener = NULL;
- priv->load_state = CAL_CLIENT_LOAD_NOT_LOADED;
- g_free (priv->uri);
- priv->uri = NULL;
-
- return FALSE;
- }
- CORBA_exception_free (&ev);
-
- return TRUE;
-}
-
-/**
- * cal_client_get_load_state:
- * @client: A calendar client.
- *
- * Queries the state of loading of a calendar client.
- *
- * Return value: A #CalClientLoadState value indicating whether the client has
- * not been loaded with cal_client_open_calendar() yet, whether it is being
- * loaded, or whether it is already loaded.
- **/
-CalClientLoadState
-cal_client_get_load_state (CalClient *client)
-{
- CalClientPrivate *priv;
-
- g_return_val_if_fail (client != NULL, FALSE);
- g_return_val_if_fail (IS_CAL_CLIENT (client), FALSE);
-
- priv = client->priv;
- return priv->load_state;
-}
-
-/**
- * cal_client_get_uri:
- * @client: A calendar client.
- *
- * Queries the URI that is open in a calendar client.
- *
- * Return value: The URI of the calendar that is already loaded or is being
- * loaded, or NULL if the client has not started a load request yet.
- **/
-const char *
-cal_client_get_uri (CalClient *client)
-{
- CalClientPrivate *priv;
-
- g_return_val_if_fail (client != NULL, NULL);
- g_return_val_if_fail (IS_CAL_CLIENT (client), NULL);
-
- priv = client->priv;
- return priv->uri;
-}
-
-/* Converts our representation of a calendar component type into its CORBA representation */
-static GNOME_Evolution_Calendar_CalObjType
-corba_obj_type (CalObjType type)
-{
- return (((type & CALOBJ_TYPE_EVENT) ? GNOME_Evolution_Calendar_TYPE_EVENT : 0)
- | ((type & CALOBJ_TYPE_TODO) ? GNOME_Evolution_Calendar_TYPE_TODO : 0)
- | ((type & CALOBJ_TYPE_JOURNAL) ? GNOME_Evolution_Calendar_TYPE_JOURNAL : 0));
-}
-
-/**
- * cal_client_get_n_objects:
- * @client: A calendar client.
- * @type: Type of objects that will be counted.
- *
- * Counts the number of calendar components of the specified @type. This can be
- * used to count how many events, to-dos, or journals there are, for example.
- *
- * Return value: Number of components.
- **/
-int
-cal_client_get_n_objects (CalClient *client, CalObjType type)
-{
- CalClientPrivate *priv;
- CORBA_Environment ev;
- int n;
- int t;
-
- g_return_val_if_fail (client != NULL, -1);
- g_return_val_if_fail (IS_CAL_CLIENT (client), -1);
-
- priv = client->priv;
- g_return_val_if_fail (priv->load_state == CAL_CLIENT_LOAD_LOADED, -1);
-
- t = corba_obj_type (type);
-
- CORBA_exception_init (&ev);
- n = GNOME_Evolution_Calendar_Cal_countObjects (priv->cal, t, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_message ("cal_client_get_n_objects(): could not get the number of objects");
- CORBA_exception_free (&ev);
- return -1;
- }
-
- CORBA_exception_free (&ev);
- return n;
-}
-
-/**
- * cal_client_get_object:
- * @client: A calendar client.
- * @uid: Unique identifier for a calendar component.
- * @comp: Return value for the calendar component object.
- *
- * Queries a calendar for a calendar component object based on its unique
- * identifier.
- *
- * Return value: Result code based on the status of the operation.
- **/
-CalClientGetStatus
-cal_client_get_object (CalClient *client, const char *uid, CalComponent **comp)
-{
- CalClientPrivate *priv;
- CORBA_Environment ev;
- GNOME_Evolution_Calendar_CalObj comp_str;
- CalClientGetStatus retval;
- icalcomponent *icalcomp;
-
- g_return_val_if_fail (client != NULL, CAL_CLIENT_GET_NOT_FOUND);
- g_return_val_if_fail (IS_CAL_CLIENT (client), CAL_CLIENT_GET_NOT_FOUND);
-
- priv = client->priv;
- g_return_val_if_fail (priv->load_state == CAL_CLIENT_LOAD_LOADED, CAL_CLIENT_GET_NOT_FOUND);
-
- g_return_val_if_fail (uid != NULL, CAL_CLIENT_GET_NOT_FOUND);
- g_return_val_if_fail (comp != NULL, CAL_CLIENT_GET_NOT_FOUND);
-
- retval = CAL_CLIENT_GET_NOT_FOUND;
- *comp = NULL;
-
- CORBA_exception_init (&ev);
- comp_str = GNOME_Evolution_Calendar_Cal_getObject (priv->cal, (char *) uid, &ev);
-
- if (ev._major == CORBA_USER_EXCEPTION
- && strcmp (CORBA_exception_id (&ev), ex_GNOME_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;
- }
-
- icalcomp = icalparser_parse_string (comp_str);
- CORBA_free (comp_str);
-
- if (!icalcomp) {
- retval = CAL_CLIENT_GET_SYNTAX_ERROR;
- goto out;
- }
-
- *comp = cal_component_new ();
- if (!cal_component_set_icalcomponent (*comp, icalcomp)) {
- icalcomponent_free (icalcomp);
- gtk_object_unref (GTK_OBJECT (*comp));
- *comp = NULL;
-
- retval = CAL_CLIENT_GET_SYNTAX_ERROR;
- goto out;
- }
-
- retval = CAL_CLIENT_GET_SUCCESS;
-
- out:
-
- CORBA_exception_free (&ev);
- return retval;
-}
-
-/* Builds an UID list out of a CORBA UID sequence */
-static GList *
-build_uid_list (GNOME_Evolution_Calendar_CalObjUIDSeq *seq)
-{
- GList *uids;
- int i;
-
- uids = NULL;
-
- for (i = 0; i < seq->_length; i++)
- uids = g_list_prepend (uids, g_strdup (seq->_buffer[i]));
-
- return uids;
-}
-
-/**
- * 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. This should be
- * freed using the cal_obj_uid_list_free() function.
- **/
-GList *
-cal_client_get_uids (CalClient *client, CalObjType type)
-{
- CalClientPrivate *priv;
- CORBA_Environment ev;
- GNOME_Evolution_Calendar_CalObjUIDSeq *seq;
- int t;
- GList *uids;
-
- 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 == CAL_CLIENT_LOAD_LOADED, NULL);
-
- t = corba_obj_type (type);
-
- CORBA_exception_init (&ev);
-
- seq = GNOME_Evolution_Calendar_Cal_getUIDs (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;
- }
-
- CORBA_exception_free (&ev);
-
- uids = build_uid_list (seq);
- CORBA_free (seq);
-
- return uids;
-}
-
-/* Builds a GList of CalClientChange structures from the CORBA sequence */
-static GList *
-build_change_list (GNOME_Evolution_Calendar_CalObjChangeSeq *seq)
-{
- GList *list = NULL;
- icalcomponent *icalcomp;
- int i;
-
- /* Create the list in reverse order */
- for (i = 0; i < seq->_length; i++) {
- GNOME_Evolution_Calendar_CalObjChange *corba_coc;
- CalClientChange *ccc;
-
- corba_coc = &seq->_buffer[i];
- ccc = g_new (CalClientChange, 1);
-
- icalcomp = icalparser_parse_string (corba_coc->calobj);
- if (!icalcomp)
- continue;
-
- ccc->comp = cal_component_new ();
- if (!cal_component_set_icalcomponent (ccc->comp, icalcomp)) {
- icalcomponent_free (icalcomp);
- gtk_object_unref (GTK_OBJECT (ccc->comp));
- continue;
- }
- ccc->type = corba_coc->type;
-
- list = g_list_prepend (list, ccc);
- }
-
- list = g_list_reverse (list);
-
- return list;
-}
-
-GList *
-cal_client_get_changes (CalClient *client, CalObjType type, const char *change_id)
-{
- CalClientPrivate *priv;
- CORBA_Environment ev;
- GNOME_Evolution_Calendar_CalObjChangeSeq *seq;
- int t;
- GList *changes;
-
- 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 == CAL_CLIENT_LOAD_LOADED, NULL);
-
- t = corba_obj_type (type);
- CORBA_exception_init (&ev);
-
- seq = GNOME_Evolution_Calendar_Cal_getChanges (priv->cal, t, change_id, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_message ("cal_client_get_changes(): could not get the list of changes");
- CORBA_exception_free (&ev);
- return NULL;
- }
-
- CORBA_exception_free (&ev);
-
- changes = build_change_list (seq);
- CORBA_free (seq);
-
- return changes;
-}
-
-/* FIXME: Not used? */
-#if 0
-/* Builds a GList of CalObjInstance structures from the CORBA sequence */
-static GList *
-build_object_instance_list (GNOME_Evolution_Calendar_CalObjInstanceSeq *seq)
-{
- GList *list;
- int i;
-
- /* Create the list in reverse order */
-
- list = NULL;
- for (i = 0; i < seq->_length; i++) {
- GNOME_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;
-}
-#endif
-
-/**
- * cal_client_get_objects_in_range:
- * @client: A calendar client.
- * @type: Bitmask with types of objects to return.
- * @start: Start time for query.
- * @end: End time for query.
- *
- * Queries a calendar for the objects that occur or recur in the specified range
- * of time.
- *
- * Return value: A list of UID strings. This should be freed using the
- * cal_obj_uid_list_free() function.
- **/
-GList *
-cal_client_get_objects_in_range (CalClient *client, CalObjType type, time_t start, time_t end)
-{
- CalClientPrivate *priv;
- CORBA_Environment ev;
- GNOME_Evolution_Calendar_CalObjUIDSeq *seq;
- GList *uids;
- int t;
-
- 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 == CAL_CLIENT_LOAD_LOADED, NULL);
-
- g_return_val_if_fail (start != -1 && end != -1, NULL);
- g_return_val_if_fail (start <= end, NULL);
-
- CORBA_exception_init (&ev);
-
- t = corba_obj_type (type);
-
- seq = GNOME_Evolution_Calendar_Cal_getObjectsInRange (priv->cal, t, start, end, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_message ("cal_client_get_objects_in_range(): could not get the objects");
- CORBA_exception_free (&ev);
- return NULL;
- }
- CORBA_exception_free (&ev);
-
- uids = build_uid_list (seq);
- CORBA_free (seq);
-
- return uids;
-}
-
-/* Callback used when an object is updated and we must update the copy we have */
-static void
-generate_instances_obj_updated_cb (CalClient *client, const char *uid, gpointer data)
-{
- GHashTable *uid_comp_hash;
- CalComponent *comp;
- CalClientGetStatus status;
- const char *comp_uid;
-
- uid_comp_hash = data;
-
- comp = g_hash_table_lookup (uid_comp_hash, uid);
- if (!comp)
- /* OK, so we don't care about new objects that may indeed be in
- * the requested time range. We only care about the ones that
- * were returned by the first query to
- * cal_client_get_objects_in_range().
- */
- return;
-
- g_hash_table_remove (uid_comp_hash, uid);
- gtk_object_unref (GTK_OBJECT (comp));
-
- status = cal_client_get_object (client, uid, &comp);
-
- switch (status) {
- case CAL_CLIENT_GET_SUCCESS:
- /* The hash key comes from the component's internal data */
- cal_component_get_uid (comp, &comp_uid);
- g_hash_table_insert (uid_comp_hash, (char *) comp_uid, comp);
- break;
-
- case CAL_CLIENT_GET_NOT_FOUND:
- /* No longer in the server, too bad */
- break;
-
- case CAL_CLIENT_GET_SYNTAX_ERROR:
- g_message ("obj_updated_cb(): Syntax error when getting "
- "object `%s'; ignoring...", uid);
- break;
-
- }
-}
-
-/* Callback used when an object is removed and we must delete the copy we have */
-static void
-generate_instances_obj_removed_cb (CalClient *client, const char *uid, gpointer data)
-{
- GHashTable *uid_comp_hash;
- CalComponent *comp;
-
- uid_comp_hash = data;
-
- comp = g_hash_table_lookup (uid_comp_hash, uid);
- if (!comp)
- return;
-
- g_hash_table_remove (uid_comp_hash, uid);
- gtk_object_unref (GTK_OBJECT (comp));
-}
-
-/* Adds a component to the list; called from g_hash_table_foreach() */
-static void
-add_component (gpointer key, gpointer value, gpointer data)
-{
- CalComponent *comp;
- GList **list;
-
- comp = CAL_COMPONENT (value);
- list = data;
-
- *list = g_list_prepend (*list, comp);
-}
-
-/* Gets a list of components that recur within the specified range of time. It
- * ensures that the resulting list of CalComponent objects contains only objects
- * that are actually in the server at the time the initial
- * cal_client_get_objects_in_range() query ends.
- */
-static GList *
-get_objects_atomically (CalClient *client, CalObjType type, time_t start, time_t end)
-{
- GList *uids;
- GHashTable *uid_comp_hash;
- GList *objects;
- guint obj_updated_id;
- guint obj_removed_id;
- GList *l;
-
- uids = cal_client_get_objects_in_range (client, type, start, end);
-
- uid_comp_hash = g_hash_table_new (g_str_hash, g_str_equal);
-
- /* While we are getting the actual object data, keep track of changes */
-
- obj_updated_id = gtk_signal_connect (GTK_OBJECT (client), "obj_updated",
- GTK_SIGNAL_FUNC (generate_instances_obj_updated_cb),
- uid_comp_hash);
-
- obj_removed_id = gtk_signal_connect (GTK_OBJECT (client), "obj_removed",
- GTK_SIGNAL_FUNC (generate_instances_obj_removed_cb),
- uid_comp_hash);
-
- /* Get the objects */
-
- for (l = uids; l; l = l->next) {
- CalComponent *comp;
- CalClientGetStatus status;
- char *uid;
- const char *comp_uid;
-
- uid = l->data;
-
- status = cal_client_get_object (client, uid, &comp);
-
- switch (status) {
- case CAL_CLIENT_GET_SUCCESS:
- /* The hash key comes from the component's internal data
- * instead of the duped UID from the list of UIDS.
- */
- cal_component_get_uid (comp, &comp_uid);
- g_hash_table_insert (uid_comp_hash, (char *) comp_uid, comp);
- break;
-
- case CAL_CLIENT_GET_NOT_FOUND:
- /* Object disappeared from the server, so don't log it */
- break;
-
- case CAL_CLIENT_GET_SYNTAX_ERROR:
- g_message ("get_objects_atomically(): Syntax error when getting "
- "object `%s'; ignoring...", uid);
- break;
-
- default:
- g_assert_not_reached ();
- }
- }
-
- cal_obj_uid_list_free (uids);
-
- /* Now our state is consistent with the server, so disconnect from the
- * notification signals and generate the final list of components.
- */
-
- gtk_signal_disconnect (GTK_OBJECT (client), obj_updated_id);
- gtk_signal_disconnect (GTK_OBJECT (client), obj_removed_id);
-
- objects = NULL;
- g_hash_table_foreach (uid_comp_hash, add_component, &objects);
- g_hash_table_destroy (uid_comp_hash);
-
- return objects;
-}
-
-struct comp_instance {
- CalComponent *comp;
- time_t start;
- time_t end;
-};
-
-/* Called from cal_recur_generate_instances(); adds an instance to the list */
-static gboolean
-add_instance (CalComponent *comp, time_t start, time_t end, gpointer data)
-{
- GList **list;
- struct comp_instance *ci;
-
- list = data;
-
- ci = g_new (struct comp_instance, 1);
-
- ci->comp = comp;
- gtk_object_ref (GTK_OBJECT (ci->comp));
-
- ci->start = start;
- ci->end = end;
-
- *list = g_list_prepend (*list, ci);
-
- return TRUE;
-}
-
-/* Used from g_list_sort(); compares two struct comp_instance structures */
-static gint
-compare_comp_instance (gconstpointer a, gconstpointer b)
-{
- const struct comp_instance *cia, *cib;
- time_t diff;
-
- cia = a;
- cib = b;
-
- diff = cia->start - cib->start;
- return (diff < 0) ? -1 : (diff > 0) ? 1 : 0;
-}
-
-/**
- * cal_client_generate_instances:
- * @client: A calendar client.
- * @type: Bitmask with types of objects to return.
- * @start: Start time for query.
- * @end: End time for query.
- * @cb: Callback for each generated instance.
- * @cb_data: Closure data for the callback.
- *
- * Does a combination of cal_client_get_objects_in_range() and
- * cal_recur_generate_instances(). It fetches the list of objects in an atomic
- * way so that the generated instances are actually in the server at the time
- * the initial cal_client_get_objects_in_range() query ends.
- *
- * The callback function should do a gtk_object_ref() of the calendar component
- * it gets passed if it intends to keep it around.
- **/
-void
-cal_client_generate_instances (CalClient *client, CalObjType type,
- time_t start, time_t end,
- CalRecurInstanceFn cb, gpointer cb_data)
-{
- CalClientPrivate *priv;
- GList *objects;
- GList *instances;
- GList *l;
-
- g_return_if_fail (client != NULL);
- g_return_if_fail (IS_CAL_CLIENT (client));
-
- priv = client->priv;
- g_return_if_fail (priv->load_state == CAL_CLIENT_LOAD_LOADED);
-
- g_return_if_fail (start != -1 && end != -1);
- g_return_if_fail (start <= end);
- g_return_if_fail (cb != NULL);
-
- /* Generate objects */
-
- objects = get_objects_atomically (client, type, start, end);
- instances = NULL;
-
- for (l = objects; l; l = l->next) {
- CalComponent *comp;
-
- comp = l->data;
- cal_recur_generate_instances (comp, start, end, add_instance, &instances);
- gtk_object_unref (GTK_OBJECT (comp));
- }
-
- g_list_free (objects);
-
- /* Generate instances and spew them out */
-
- instances = g_list_sort (instances, compare_comp_instance);
-
- for (l = instances; l; l = l->next) {
- struct comp_instance *ci;
- gboolean result;
-
- ci = l->data;
-
- result = (* cb) (ci->comp, ci->start, ci->end, cb_data);
-
- if (!result)
- break;
- }
-
- /* Clean up */
-
- for (l = instances; l; l = l->next) {
- struct comp_instance *ci;
-
- ci = l->data;
- gtk_object_unref (GTK_OBJECT (ci->comp));
- g_free (ci);
- }
-
- g_list_free (instances);
-}
-
-/* Builds a list of CalAlarmInstance structures */
-static GSList *
-build_alarm_instance_list (CalComponent *comp, GNOME_Evolution_Calendar_CalAlarmInstanceSeq *seq)
-{
- GSList *alarms;
- int i;
-
- alarms = NULL;
-
- for (i = 0; i < seq->_length; i++) {
- GNOME_Evolution_Calendar_CalAlarmInstance *corba_instance;
- CalComponentAlarm *alarm;
- const char *auid;
- CalAlarmInstance *instance;
-
- corba_instance = seq->_buffer + i;
-
- /* Since we want the in-commponent auid, we look for the alarm
- * in the component and fetch its "real" auid.
- */
-
- alarm = cal_component_get_alarm (comp, corba_instance->auid);
- if (!alarm)
- continue;
-
- auid = cal_component_alarm_get_uid (alarm);
- cal_component_alarm_free (alarm);
-
- instance = g_new (CalAlarmInstance, 1);
- instance->auid = auid;
- instance->trigger = corba_instance->trigger;
- instance->occur = corba_instance->occur;
-
- alarms = g_slist_prepend (alarms, instance);
- }
-
- return g_slist_reverse (alarms);
-}
-
-/* Builds a list of CalComponentAlarms structures */
-static GSList *
-build_component_alarms_list (GNOME_Evolution_Calendar_CalComponentAlarmsSeq *seq)
-{
- GSList *comp_alarms;
- int i;
-
- comp_alarms = NULL;
-
- for (i = 0; i < seq->_length; i++) {
- GNOME_Evolution_Calendar_CalComponentAlarms *corba_alarms;
- CalComponent *comp;
- CalComponentAlarms *alarms;
- icalcomponent *icalcomp;
-
- corba_alarms = seq->_buffer + i;
-
- icalcomp = icalparser_parse_string (corba_alarms->calobj);
- if (!icalcomp)
- continue;
-
- comp = cal_component_new ();
- if (!cal_component_set_icalcomponent (comp, icalcomp)) {
- icalcomponent_free (icalcomp);
- gtk_object_unref (GTK_OBJECT (comp));
- continue;
- }
-
- alarms = g_new (CalComponentAlarms, 1);
- alarms->comp = comp;
- alarms->alarms = build_alarm_instance_list (comp, &corba_alarms->alarms);
-
- comp_alarms = g_slist_prepend (comp_alarms, alarms);
- }
-
- return comp_alarms;
-}
-
-/**
- * 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 #CalComponentAlarms structures. This should be freed
- * using the cal_client_free_alarms() function, or by freeing each element
- * separately with cal_component_alarms_free() and then freeing the list with
- * g_slist_free().
- **/
-GSList *
-cal_client_get_alarms_in_range (CalClient *client, time_t start, time_t end)
-{
- CalClientPrivate *priv;
- CORBA_Environment ev;
- GNOME_Evolution_Calendar_CalComponentAlarmsSeq *seq;
- GSList *alarms;
-
- 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 == CAL_CLIENT_LOAD_LOADED, NULL);
-
- g_return_val_if_fail (start != -1 && end != -1, NULL);
- g_return_val_if_fail (start <= end, NULL);
-
- CORBA_exception_init (&ev);
-
- seq = GNOME_Evolution_Calendar_Cal_getAlarmsInRange (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_component_alarms_list (seq);
- CORBA_free (seq);
-
- return alarms;
-}
-
-/**
- * cal_client_free_alarms:
- * @comp_alarms: A list of #CalComponentAlarms structures.
- *
- * Frees a list of #CalComponentAlarms structures as returned by
- * cal_client_get_alarms_in_range().
- **/
-void
-cal_client_free_alarms (GSList *comp_alarms)
-{
- GSList *l;
-
- for (l = comp_alarms; l; l = l->next) {
- CalComponentAlarms *alarms;
-
- alarms = l->data;
- g_assert (alarms != NULL);
-
- cal_component_alarms_free (alarms);
- }
-
- g_slist_free (comp_alarms);
-}
-
-/**
- * cal_client_get_alarms_for_object:
- * @client: A calendar client.
- * @uid: Unique identifier for a calendar component.
- * @start: Start time for query.
- * @end: End time for query.
- * @alarms: Return value for the component's alarm instances. Will return NULL
- * if no instances occur within the specified time range. This should be freed
- * using the cal_component_alarms_free() function.
- *
- * 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,
- CalComponentAlarms **alarms)
-{
- CalClientPrivate *priv;
- CORBA_Environment ev;
- GNOME_Evolution_Calendar_CalComponentAlarms *corba_alarms;
- gboolean retval;
- icalcomponent *icalcomp;
- CalComponent *comp;
-
- 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 == CAL_CLIENT_LOAD_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;
- retval = FALSE;
-
- CORBA_exception_init (&ev);
-
- corba_alarms = GNOME_Evolution_Calendar_Cal_getAlarmsForObject (priv->cal, (char *) uid,
- start, end, &ev);
- if (ev._major == CORBA_USER_EXCEPTION
- && strcmp (CORBA_exception_id (&ev), ex_GNOME_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;
- }
-
- icalcomp = icalparser_parse_string (corba_alarms->calobj);
- if (!icalcomp)
- goto out;
-
- comp = cal_component_new ();
- if (!cal_component_set_icalcomponent (comp, icalcomp)) {
- icalcomponent_free (icalcomp);
- gtk_object_unref (GTK_OBJECT (comp));
- goto out;
- }
-
- retval = TRUE;
-
- *alarms = g_new (CalComponentAlarms, 1);
- (*alarms)->comp = comp;
- (*alarms)->alarms = build_alarm_instance_list (comp, &corba_alarms->alarms);
- CORBA_free (corba_alarms);
-
- out:
- CORBA_exception_free (&ev);
- return retval;
-}
-
-/**
- * cal_client_update_object:
- * @client: A calendar client.
- * @comp: A calendar component object.
- *
- * Asks a calendar to update a component. Any existing component with the
- * specified component's 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 component.
- **/
-gboolean
-cal_client_update_object (CalClient *client, CalComponent *comp)
-{
- CalClientPrivate *priv;
- CORBA_Environment ev;
- gboolean retval;
- char *obj_string;
- const char *uid;
-
- 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 == CAL_CLIENT_LOAD_LOADED, FALSE);
-
- g_return_val_if_fail (comp != NULL, FALSE);
-
- retval = FALSE;
-
- cal_component_commit_sequence (comp);
- obj_string = cal_component_get_as_string (comp);
-
- cal_component_get_uid (comp, &uid);
-
- CORBA_exception_init (&ev);
- GNOME_Evolution_Calendar_Cal_updateObject (priv->cal, (char *) uid, obj_string, &ev);
- g_free (obj_string);
-
- if (ev._major == CORBA_USER_EXCEPTION &&
- strcmp (CORBA_exception_id (&ev), ex_GNOME_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;
-}
-
-/**
- * cal_client_remove_object:
- * @client: A calendar client.
- * @uid: Unique identifier of the calendar component to remove.
- *
- * Asks a calendar to remove a component. If the server is able to remove the
- * component, all clients will be notified and they will emit the "obj_removed"
- * signal.
- *
- * Return value: TRUE on success, FALSE on specifying a UID for a component that
- * is not in the server. Returning FALSE is normal; the object may have
- * disappeared from the server before the client has had a chance to receive the
- * corresponding notification.
- **/
-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 == CAL_CLIENT_LOAD_LOADED, FALSE);
-
- g_return_val_if_fail (uid != NULL, FALSE);
-
- retval = FALSE;
-
- CORBA_exception_init (&ev);
- GNOME_Evolution_Calendar_Cal_removeObject (priv->cal, (char *) uid, &ev);
-
- if (ev._major == CORBA_USER_EXCEPTION &&
- strcmp (CORBA_exception_id (&ev), ex_GNOME_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;
-}
-
-/**
- * cal_client_get_query:
- * @client: A calendar client.
- * @sexp: S-expression representing the query.
- *
- * Creates a live query object from a loaded calendar.
- *
- * Return value: A query object that will emit notification signals as calendar
- * components are added and removed from the query in the server.
- **/
-CalQuery *
-cal_client_get_query (CalClient *client, const char *sexp)
-{
- CalClientPrivate *priv;
-
- 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 == CAL_CLIENT_LOAD_LOADED, FALSE);
-
- g_return_val_if_fail (sexp != NULL, NULL);
-
- return cal_query_new (priv->cal, sexp);
-}
diff --git a/calendar/cal-client/cal-client.h b/calendar/cal-client/cal-client.h
deleted file mode 100644
index 1f0211ef32..0000000000
--- a/calendar/cal-client/cal-client.h
+++ /dev/null
@@ -1,133 +0,0 @@
-/* Evolution calendar client
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Author: Federico Mena-Quintero <federico@ximian.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 CAL_CLIENT_H
-#define CAL_CLIENT_H
-
-#include <libgnome/gnome-defs.h>
-#include <gtk/gtkobject.h>
-#include <cal-util/cal-recur.h>
-#include <cal-util/cal-util.h>
-#include <cal-client/cal-query.h>
-
-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;
-
-typedef struct _CalClientPrivate CalClientPrivate;
-
-/* Open status for the cal_opened signal */
-typedef enum {
- CAL_CLIENT_OPEN_SUCCESS,
- CAL_CLIENT_OPEN_ERROR,
- CAL_CLIENT_OPEN_NOT_FOUND,
- CAL_CLIENT_OPEN_METHOD_NOT_SUPPORTED
-} CalClientOpenStatus;
-
-/* Get status for the cal_client_get_object() function */
-typedef enum {
- CAL_CLIENT_GET_SUCCESS,
- CAL_CLIENT_GET_NOT_FOUND,
- CAL_CLIENT_GET_SYNTAX_ERROR
-} CalClientGetStatus;
-
-/* Whether the client is not loaded, is being loaded, or is already loaded */
-typedef enum {
- CAL_CLIENT_LOAD_NOT_LOADED,
- CAL_CLIENT_LOAD_LOADING,
- CAL_CLIENT_LOAD_LOADED
-} CalClientLoadState;
-
-
-struct _CalClient {
- GtkObject object;
-
- /* Private data */
- CalClientPrivate *priv;
-};
-
-struct _CalClientClass {
- GtkObjectClass parent_class;
-
- /* Notification signals */
-
- void (* cal_opened) (CalClient *client, CalClientOpenStatus 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_open_calendar (CalClient *client, const char *str_uri, gboolean only_if_exists);
-
-CalClientLoadState cal_client_get_load_state (CalClient *client);
-
-const char *cal_client_get_uri (CalClient *client);
-
-int cal_client_get_n_objects (CalClient *client, CalObjType type);
-
-CalClientGetStatus cal_client_get_object (CalClient *client,
- const char *uid,
- CalComponent **comp);
-
-GList *cal_client_get_uids (CalClient *client, CalObjType type);
-GList *cal_client_get_changes (CalClient *client, CalObjType type, const char *change_id);
-
-GList *cal_client_get_objects_in_range (CalClient *client, CalObjType type,
- time_t start, time_t end);
-
-void cal_client_generate_instances (CalClient *client, CalObjType type,
- time_t start, time_t end,
- CalRecurInstanceFn cb, gpointer cb_data);
-
-GSList *cal_client_get_alarms_in_range (CalClient *client, time_t start, time_t end);
-
-void cal_client_free_alarms (GSList *comp_alarms);
-
-gboolean cal_client_get_alarms_for_object (CalClient *client, const char *uid,
- time_t start, time_t end,
- CalComponentAlarms **alarms);
-
-gboolean cal_client_update_object (CalClient *client, CalComponent *comp);
-
-gboolean cal_client_remove_object (CalClient *client, const char *uid);
-
-CalQuery *cal_client_get_query (CalClient *client, const char *sexp);
-
-
-
-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 32da6136f7..0000000000
--- a/calendar/cal-client/cal-listener.c
+++ /dev/null
@@ -1,387 +0,0 @@
-/* Evolution calendar listener
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Author: Federico Mena-Quintero <federico@ximian.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 "cal-listener.h"
-
-
-
-/* Private part of the CalListener structure */
-struct _CalListenerPrivate {
- /* The calendar this listener refers to */
- GNOME_Evolution_Calendar_Cal cal;
-
- /* Notification functions and their closure data */
- CalListenerCalOpenedFn cal_opened_fn;
- CalListenerObjUpdatedFn obj_updated_fn;
- CalListenerObjRemovedFn obj_removed_fn;
- gpointer fn_data;
-};
-
-
-
-static void cal_listener_class_init (CalListenerClass *class);
-static void cal_listener_init (CalListener *listener);
-static void cal_listener_destroy (GtkObject *object);
-
-static POA_GNOME_Evolution_Calendar_Listener__vepv cal_listener_vepv;
-
-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.GNOME_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 ());
-
- 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;
- priv->cal_opened_fn = NULL;
- priv->obj_updated_fn = NULL;
- priv->obj_removed_fn = NULL;
-}
-
-/* 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);
- listener->priv = NULL;
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-
-
-/* CORBA servant implementation */
-
-/* Listener::notifyCalOpened method */
-static void
-Listener_notifyCalOpened (PortableServer_Servant servant,
- GNOME_Evolution_Calendar_Listener_OpenStatus status,
- GNOME_Evolution_Calendar_Cal cal,
- CORBA_Environment *ev)
-{
- CalListener *listener;
- CalListenerPrivate *priv;
- CORBA_Environment aev;
- GNOME_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_notifyCalOpened(): calendar was already open!");
- return;
- }
-
- CORBA_exception_init (&aev);
- cal_copy = CORBA_Object_duplicate (cal, &aev);
-
- if (aev._major != CORBA_NO_EXCEPTION) {
- g_message ("Listener_notifyCalOpened(): could not duplicate the calendar");
- CORBA_exception_free (&aev);
- return;
- }
- CORBA_exception_free (&aev);
-
- priv->cal = cal_copy;
-
- g_assert (priv->cal_opened_fn != NULL);
- (* priv->cal_opened_fn) (listener, status, cal, priv->fn_data);
-}
-
-/* Listener::notifyObjUpdated method */
-static void
-Listener_notifyObjUpdated (PortableServer_Servant servant,
- GNOME_Evolution_Calendar_CalObjUID uid,
- CORBA_Environment *ev)
-{
- CalListener *listener;
- CalListenerPrivate *priv;
-
- listener = CAL_LISTENER (bonobo_object_from_servant (servant));
- priv = listener->priv;
-
- g_assert (priv->obj_updated_fn != NULL);
- (* priv->obj_updated_fn) (listener, uid, priv->fn_data);
-}
-
-/* Listener::notifyObjRemoved method */
-static void
-Listener_notifyObjRemoved (PortableServer_Servant servant,
- GNOME_Evolution_Calendar_CalObjUID uid,
- CORBA_Environment *ev)
-{
- CalListener *listener;
- CalListenerPrivate *priv;
-
- listener = CAL_LISTENER (bonobo_object_from_servant (servant));
- priv = listener->priv;
-
- g_assert (priv->obj_removed_fn != NULL);
- (* priv->obj_removed_fn) (listener, uid, priv->fn_data);
-}
-
-/**
- * cal_listener_get_epv:
- * @void:
- *
- * Creates an EPV for the Listener CORBA class.
- *
- * Return value: A newly-allocated EPV.
- **/
-POA_GNOME_Evolution_Calendar_Listener__epv *
-cal_listener_get_epv (void)
-{
- POA_GNOME_Evolution_Calendar_Listener__epv *epv;
-
- epv = g_new0 (POA_GNOME_Evolution_Calendar_Listener__epv, 1);
- epv->notifyCalOpened = Listener_notifyCalOpened;
- epv->notifyObjUpdated = Listener_notifyObjUpdated;
- epv->notifyObjRemoved = Listener_notifyObjRemoved;
- return epv;
-}
-
-
-
-/**
- * cal_listener_construct:
- * @listener: A calendar listener.
- * @corba_listener: CORBA object for the calendar listener.
- * @cal_opened_fn: Function that will be called to notify that a calendar was
- * opened.
- * @obj_updated_fn: Function that will be called to notify that an object in the
- * calendar was updated.
- * @obj_removed_fn: Function that will be called to notify that an object in the
- * calendar was removed.
- * @fn_data: Closure data pointer that will be passed to the notification
- * functions.
- *
- * 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,
- GNOME_Evolution_Calendar_Listener corba_listener,
- CalListenerCalOpenedFn cal_opened_fn,
- CalListenerObjUpdatedFn obj_updated_fn,
- CalListenerObjRemovedFn obj_removed_fn,
- gpointer fn_data)
-{
- CalListenerPrivate *priv;
-
- g_return_val_if_fail (listener != NULL, NULL);
- g_return_val_if_fail (IS_CAL_LISTENER (listener), NULL);
- g_return_val_if_fail (cal_opened_fn != NULL, NULL);
- g_return_val_if_fail (obj_updated_fn != NULL, NULL);
- g_return_val_if_fail (obj_removed_fn != NULL, NULL);
-
- priv = listener->priv;
-
- priv->cal_opened_fn = cal_opened_fn;
- priv->obj_updated_fn = obj_updated_fn;
- priv->obj_removed_fn = obj_removed_fn;
- priv->fn_data = fn_data;
-
- 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.
- **/
-GNOME_Evolution_Calendar_Listener
-cal_listener_corba_object_create (BonoboObject *object)
-{
- POA_GNOME_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_GNOME_Evolution_Calendar_Listener *) g_new0 (BonoboObjectServant, 1);
- servant->vepv = &cal_listener_vepv;
-
- CORBA_exception_init (&ev);
- POA_GNOME_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 (GNOME_Evolution_Calendar_Listener) bonobo_object_activate_servant (object, servant);
-}
-
-/**
- * cal_listener_new:
- * @cal_opened_fn: Function that will be called to notify that a calendar was
- * opened.
- * @obj_updated_fn: Function that will be called to notify that an object in the
- * calendar was updated.
- * @obj_removed_fn: Function that will be called to notify that an object in the
- * calendar was removed.
- * @fn_data: Closure data pointer that will be passed to the notification
- * functions.
- *
- * 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 (CalListenerCalOpenedFn cal_opened_fn,
- CalListenerObjUpdatedFn obj_updated_fn,
- CalListenerObjRemovedFn obj_removed_fn,
- gpointer fn_data)
-{
- CalListener *listener;
- CORBA_Environment ev;
- GNOME_Evolution_Calendar_Listener corba_listener;
- gboolean result;
-
- g_return_val_if_fail (cal_opened_fn != NULL, NULL);
- g_return_val_if_fail (obj_updated_fn != NULL, NULL);
- g_return_val_if_fail (obj_removed_fn != NULL, NULL);
-
- 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_opened_fn,
- obj_updated_fn,
- obj_removed_fn,
- fn_data);
-}
diff --git a/calendar/cal-client/cal-listener.h b/calendar/cal-client/cal-listener.h
deleted file mode 100644
index 7997cbb69c..0000000000
--- a/calendar/cal-client/cal-listener.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/* Evolution calendar listener
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Author: Federico Mena-Quintero <federico@ximian.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 CAL_LISTENER_H
-#define CAL_LISTENER_H
-
-#include <libgnome/gnome-defs.h>
-#include <bonobo/bonobo-object.h>
-#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;
-
-typedef struct _CalListenerPrivate CalListenerPrivate;
-
-struct _CalListener {
- BonoboObject object;
-
- /* Private data */
- CalListenerPrivate *priv;
-};
-
-struct _CalListenerClass {
- BonoboObjectClass parent_class;
-};
-
-/* Notification functions */
-typedef void (* CalListenerCalOpenedFn) (CalListener *listener,
- GNOME_Evolution_Calendar_Listener_OpenStatus status,
- GNOME_Evolution_Calendar_Cal cal,
- gpointer data);
-
-typedef void (* CalListenerObjUpdatedFn) (CalListener *listener,
- const GNOME_Evolution_Calendar_CalObjUID uid,
- gpointer data);
-typedef void (* CalListenerObjRemovedFn) (CalListener *listener,
- const GNOME_Evolution_Calendar_CalObjUID uid,
- gpointer data);
-
-
-GtkType cal_listener_get_type (void);
-
-CalListener *cal_listener_construct (CalListener *listener,
- GNOME_Evolution_Calendar_Listener corba_listener,
- CalListenerCalOpenedFn cal_opened_fn,
- CalListenerObjUpdatedFn obj_updated_fn,
- CalListenerObjRemovedFn obj_removed_fn,
- gpointer fn_data);
-
-GNOME_Evolution_Calendar_Listener cal_listener_corba_object_create (BonoboObject *object);
-
-CalListener *cal_listener_new (CalListenerCalOpenedFn cal_opened_fn,
- CalListenerObjUpdatedFn obj_updated_fn,
- CalListenerObjRemovedFn obj_removed_fn,
- gpointer fn_data);
-
-POA_GNOME_Evolution_Calendar_Listener__epv *cal_listener_get_epv (void);
-
-
-
-END_GNOME_DECLS
-
-#endif
diff --git a/calendar/cal-client/cal-query.c b/calendar/cal-client/cal-query.c
deleted file mode 100644
index 727a2dcb3b..0000000000
--- a/calendar/cal-client/cal-query.c
+++ /dev/null
@@ -1,406 +0,0 @@
-/* Evolution calendar - Live query client object
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Author: Federico Mena-Quintero <federico@ximian.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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <gtk/gtksignal.h>
-#include "cal-query.h"
-#include "query-listener.h"
-
-
-
-/* Private part of the CalQuery structure */
-struct _CalQueryPrivate {
- /* Our query listener implementation */
- QueryListener *ql;
-
- /* Handle to the query in the server */
- GNOME_Evolution_Calendar_Query corba_query;
-};
-
-
-
-static void cal_query_class_init (CalQueryClass *class);
-static void cal_query_init (CalQuery *query);
-static void cal_query_destroy (GtkObject *object);
-
-/* Signal IDs */
-enum {
- OBJ_UPDATED,
- OBJ_REMOVED,
- QUERY_DONE,
- EVAL_ERROR,
- LAST_SIGNAL
-};
-
-static void marshal_obj_updated (GtkObject *object,
- GtkSignalFunc func, gpointer func_data,
- GtkArg *args);
-static void marshal_query_done (GtkObject *object,
- GtkSignalFunc func, gpointer func_data,
- GtkArg *args);
-
-static guint query_signals[LAST_SIGNAL];
-
-static GtkObjectClass *parent_class;
-
-
-
-/**
- * cal_query_get_type:
- *
- * Registers the #CalQuery class if necessary, and returns the type ID assigned
- * to it.
- *
- * Return value: The type ID of the #CalQuery class.
- **/
-GtkType
-cal_query_get_type (void)
-{
- static GtkType cal_query_type = 0;
-
- if (!cal_query_type) {
- static const GtkTypeInfo cal_query_info = {
- "CalQuery",
- sizeof (CalQuery),
- sizeof (CalQueryClass),
- (GtkClassInitFunc) cal_query_class_init,
- (GtkObjectInitFunc) cal_query_init,
- NULL, /* reserved_1 */
- NULL, /* reserved_2 */
- (GtkClassInitFunc) NULL
- };
-
- cal_query_type = gtk_type_unique (GTK_TYPE_OBJECT, &cal_query_info);
- }
-
- return cal_query_type;
-}
-
-/* Class initialization function for the calendar query */
-static void
-cal_query_class_init (CalQueryClass *class)
-{
- GtkObjectClass *object_class;
-
- object_class = (GtkObjectClass *) class;
-
- parent_class = gtk_type_class (GTK_TYPE_OBJECT);
-
- query_signals[OBJ_UPDATED] =
- gtk_signal_new ("obj_updated",
- GTK_RUN_FIRST,
- object_class->type,
- GTK_SIGNAL_OFFSET (CalQueryClass, obj_updated),
- marshal_obj_updated,
- GTK_TYPE_NONE, 4,
- GTK_TYPE_STRING,
- GTK_TYPE_BOOL,
- GTK_TYPE_INT,
- GTK_TYPE_INT);
- query_signals[OBJ_REMOVED] =
- gtk_signal_new ("obj_removed",
- GTK_RUN_FIRST,
- object_class->type,
- GTK_SIGNAL_OFFSET (CalQueryClass, obj_removed),
- gtk_marshal_NONE__STRING,
- GTK_TYPE_NONE, 1,
- GTK_TYPE_STRING);
- query_signals[QUERY_DONE] =
- gtk_signal_new ("query_done",
- GTK_RUN_FIRST,
- object_class->type,
- GTK_SIGNAL_OFFSET (CalQueryClass, query_done),
- marshal_query_done,
- GTK_TYPE_NONE, 2,
- GTK_TYPE_ENUM,
- GTK_TYPE_STRING);
- query_signals[EVAL_ERROR] =
- gtk_signal_new ("eval_error",
- GTK_RUN_FIRST,
- object_class->type,
- GTK_SIGNAL_OFFSET (CalQueryClass, eval_error),
- gtk_marshal_NONE__STRING,
- GTK_TYPE_NONE, 1,
- GTK_TYPE_STRING);
-
- gtk_object_class_add_signals (object_class, query_signals, LAST_SIGNAL);
-
- class->obj_updated = NULL;
- class->obj_removed = NULL;
- class->query_done = NULL;
- class->eval_error = NULL;
-
- object_class->destroy = cal_query_destroy;
-}
-
-/* Object initialization function for the calendar query */
-static void
-cal_query_init (CalQuery *query)
-{
- CalQueryPrivate *priv;
-
- priv = g_new0 (CalQueryPrivate, 1);
- query->priv = priv;
-
- priv->ql = NULL;
- priv->corba_query = CORBA_OBJECT_NIL;
-}
-
-/* Destroy handler for the calendar query */
-static void
-cal_query_destroy (GtkObject *object)
-{
- CalQuery *query;
- CalQueryPrivate *priv;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_CAL_QUERY (object));
-
- query = CAL_QUERY (object);
- priv = query->priv;
-
- /* The server unrefs the query listener, so we just NULL it out here */
- priv->ql = NULL;
-
- if (priv->corba_query != CORBA_OBJECT_NIL) {
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
- bonobo_object_release_unref (priv->corba_query, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION)
- g_message ("cal_query_destroy(): Could not release/unref the query");
-
- CORBA_exception_free (&ev);
- priv->corba_query = CORBA_OBJECT_NIL;
- }
-
- g_free (priv);
- query->priv = NULL;
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-
-
-/* Marshalers */
-
-typedef void (* ObjUpdatedFunc) (CalQuery *query, const char *uid,
- gboolean query_in_progress, int n_scanned, int total,
- gpointer data);
-
-static void
-marshal_obj_updated (GtkObject *object, GtkSignalFunc func, gpointer func_data, GtkArg *args)
-{
- ObjUpdatedFunc f;
-
- f = (ObjUpdatedFunc) func;
-
- (* f) (CAL_QUERY (object), GTK_VALUE_STRING (args[0]),
- GTK_VALUE_BOOL (args[1]), GTK_VALUE_INT (args[2]), GTK_VALUE_INT (args[3]),
- func_data);
-}
-
-typedef void (* QueryDoneFunc) (CalQuery *query, CalQueryDoneStatus status, const char *error_str,
- gpointer data);
-
-static void
-marshal_query_done (GtkObject *object, GtkSignalFunc func, gpointer func_data, GtkArg *args)
-{
- QueryDoneFunc f;
-
- f = (QueryDoneFunc) func;
-
- (* f) (CAL_QUERY (object), GTK_VALUE_ENUM (args[0]), GTK_VALUE_STRING (args[1]),
- func_data);
-}
-
-
-
-/* Callback used when an object is updated in the query */
-static void
-obj_updated_cb (QueryListener *ql,
- const GNOME_Evolution_Calendar_CalObjUID uid,
- CORBA_boolean query_in_progress,
- CORBA_long n_scanned,
- CORBA_long total,
- gpointer data)
-{
- CalQuery *query;
-
- query = CAL_QUERY (data);
-
- gtk_signal_emit (GTK_OBJECT (query), query_signals[OBJ_UPDATED],
- uid, query_in_progress, (int) n_scanned, (int) total);
-}
-
-/* Callback used when an object is removed from the query */
-static void
-obj_removed_cb (QueryListener *ql,
- const GNOME_Evolution_Calendar_CalObjUID uid,
- gpointer data)
-{
- CalQuery *query;
-
- query = CAL_QUERY (data);
-
- gtk_signal_emit (GTK_OBJECT (query), query_signals[OBJ_REMOVED],
- uid);
-}
-
-/* Callback used when the query terminates */
-static void
-query_done_cb (QueryListener *ql,
- GNOME_Evolution_Calendar_QueryListener_QueryDoneStatus corba_status,
- const CORBA_char *error_str,
- gpointer data)
-{
- CalQuery *query;
- CalQueryDoneStatus status;
-
- query = CAL_QUERY (data);
-
- switch (corba_status) {
- case GNOME_Evolution_Calendar_QueryListener_SUCCESS:
- status = CAL_QUERY_DONE_SUCCESS;
- break;
-
- case GNOME_Evolution_Calendar_QueryListener_PARSE_ERROR:
- status = CAL_QUERY_DONE_PARSE_ERROR;
- break;
-
- default:
- g_assert_not_reached ();
- return;
- }
-
- gtk_signal_emit (GTK_OBJECT (query), query_signals[QUERY_DONE],
- status, error_str);
-}
-
-/* Callback used when an error occurs when evaluating the query */
-static void
-eval_error_cb (QueryListener *ql,
- const CORBA_char *error_str,
- gpointer data)
-{
- CalQuery *query;
-
- query = CAL_QUERY (data);
-
- gtk_signal_emit (GTK_OBJECT (query), query_signals[EVAL_ERROR],
- error_str);
-}
-
-/**
- * cal_query_construct:
- * @query: A calendar query.
- * @cal: Handle to an open calendar.
- * @sexp: S-expression that defines the query.
- *
- * Constructs a query object by issuing the query creation request to the
- * calendar server.
- *
- * Return value: The same value as @query on success, or NULL if the request
- * failed.
- **/
-CalQuery *
-cal_query_construct (CalQuery *query,
- GNOME_Evolution_Calendar_Cal cal,
- const char *sexp)
-{
- CalQueryPrivate *priv;
- GNOME_Evolution_Calendar_QueryListener corba_ql;
- CORBA_Environment ev;
-
- g_return_val_if_fail (query != NULL, NULL);
- g_return_val_if_fail (IS_CAL_QUERY (query), NULL);
- g_return_val_if_fail (sexp != NULL, NULL);
-
- priv = query->priv;
-
- priv->ql = query_listener_new (obj_updated_cb,
- obj_removed_cb,
- query_done_cb,
- eval_error_cb,
- query);
- if (!priv->ql) {
- g_message ("cal_query_construct(): Could not create the query listener");
- return NULL;
- }
-
- corba_ql = BONOBO_OBJREF (priv->ql);
-
- CORBA_exception_init (&ev);
- priv->corba_query = GNOME_Evolution_Calendar_Cal_getQuery (cal, sexp, corba_ql, &ev);
-
- if (ev._major == CORBA_USER_EXCEPTION
- && strcmp (CORBA_exception_id (&ev),
- ex_GNOME_Evolution_Calendar_Cal_CouldNotCreate) == 0) {
- g_message ("cal_query_construct(): The server could not create the query");
- goto error;
- } else if (ev._major != CORBA_NO_EXCEPTION) {
- g_message ("cal_query_construct(): Could not issue the getQuery() request");
- goto error;
- }
-
- CORBA_exception_free (&ev);
-
- return query;
-
- error:
-
- CORBA_exception_free (&ev);
-
- bonobo_object_unref (BONOBO_OBJECT (priv->ql));
- priv->ql = NULL;
- return NULL;
-}
-
-/**
- * cal_query_new:
- * @cal: Handle to an open calendar.
- * @sexp: S-expression that defines the query.
- *
- * Creates a new query object by issuing the query creation request to the
- * calendar server.
- *
- * Return value: A newly-created query object, or NULL if the request failed.
- **/
-CalQuery *
-cal_query_new (GNOME_Evolution_Calendar_Cal cal,
- const char *sexp)
-{
- CalQuery *query;
-
- query = gtk_type_new (CAL_QUERY_TYPE);
-
- if (!cal_query_construct (query, cal, sexp)) {
- gtk_object_unref (GTK_OBJECT (query));
- return NULL;
- }
-
- return query;
-}
diff --git a/calendar/cal-client/cal-query.h b/calendar/cal-client/cal-query.h
deleted file mode 100644
index 8db6f29f7a..0000000000
--- a/calendar/cal-client/cal-query.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/* Evolution calendar - Live query client object
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Author: Federico Mena-Quintero <federico@ximian.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 CAL_QUERY_H
-#define CAL_QUERY_H
-
-#include <libgnome/gnome-defs.h>
-#include <gtk/gtkobject.h>
-#include <cal-client/evolution-calendar.h>
-
-BEGIN_GNOME_DECLS
-
-
-
-#define CAL_QUERY_TYPE (cal_query_get_type ())
-#define CAL_QUERY(obj) (GTK_CHECK_CAST ((obj), CAL_QUERY_TYPE, CalQuery))
-#define CAL_QUERY_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), CAL_QUERY_TYPE, CalQueryClass))
-#define IS_CAL_QUERY(obj) (GTK_CHECK_TYPE ((obj), CAL_QUERY_TYPE))
-#define IS_CAL_QUERY_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), CAL_QUERY_TYPE))
-
-/* Status values when a query terminates */
-typedef enum {
- CAL_QUERY_DONE_SUCCESS,
- CAL_QUERY_DONE_PARSE_ERROR
-} CalQueryDoneStatus;
-
-typedef struct _CalQueryPrivate CalQueryPrivate;
-
-typedef struct {
- GtkObject object;
-
- /* Private data */
- CalQueryPrivate *priv;
-} CalQuery;
-
-typedef struct {
- GtkObjectClass parent_class;
-
- /* Notification signals */
-
- void (* obj_updated) (CalQuery *query, const char *uid,
- gboolean query_in_progress, int n_scanned, int total);
- void (* obj_removed) (CalQuery *query, const char *uid);
-
- void (* query_done) (CalQuery *query, CalQueryDoneStatus status, const char *error_str);
-
- void (* eval_error) (CalQuery *query, const char *error_str);
-} CalQueryClass;
-
-GtkType cal_query_get_type (void);
-
-CalQuery *cal_query_construct (CalQuery *query,
- GNOME_Evolution_Calendar_Cal cal,
- const char *sexp);
-
-CalQuery *cal_query_new (GNOME_Evolution_Calendar_Cal cal,
- const char *sexp);
-
-
-
-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 d6a57cbffd..0000000000
--- a/calendar/cal-client/client-test.c
+++ /dev/null
@@ -1,216 +0,0 @@
-/* Evolution calendar client - test program
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Author: Federico Mena-Quintero <federico@ximian.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 <stdlib.h>
-#include <gtk/gtkmain.h>
-#include <gtk/gtksignal.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-init.h>
-#include <liboaf/liboaf.h>
-#include <bonobo/bonobo-main.h>
-#include "cal-client.h"
-
-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);
-}
-
-/* Dumps some interesting data from a component */
-static void
-dump_component (CalComponent *comp)
-{
- const char *uid;
- CalComponentText summary;
-
- cal_component_get_uid (comp, &uid);
-
- printf ("UID %s\n", uid);
-
- cal_component_get_summary (comp, &summary);
- if (summary.value)
- printf ("\tSummary: `%s', altrep `%s'\n",
- summary.value,
- summary.altrep ? summary.altrep : "NONE");
- else
- printf ("\tNo summary\n");
-}
-
-/* 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;
- CalComponent *comp;
- CalClientGetStatus status;
-
- uid = l->data;
- status = cal_client_get_object (client, uid, &comp);
-
- if (status == CAL_CLIENT_GET_SUCCESS) {
- printf ("------------------------------\n");
- dump_component (comp);
- printf ("------------------------------\n");
- gtk_object_unref (GTK_OBJECT (comp));
- } else {
- printf ("FAILED: %d\n", status);
- }
- }
- }
-
- cal_obj_uid_list_free (uids);
-
- gtk_object_unref (GTK_OBJECT (client));
-
- return FALSE;
-}
-
-/* Callback used when a calendar is opened */
-static void
-cal_opened_cb (CalClient *client, CalClientOpenStatus status, gpointer data)
-{
- cl_printf (client, "Load/create %s\n",
- ((status == CAL_CLIENT_OPEN_SUCCESS) ? "success" :
- (status == CAL_CLIENT_OPEN_ERROR) ? "error" :
- (status == CAL_CLIENT_OPEN_NOT_FOUND) ? "not found" :
- (status == CAL_CLIENT_OPEN_METHOD_NOT_SUPPORTED) ? "method not supported" :
- "unknown status value"));
-
- if (status == CAL_CLIENT_OPEN_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_cb (CalClient *client, const char *uid, gpointer data)
-{
- cl_printf (client, "Object updated: %s\n", uid);
-}
-
-/* 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 ();
-}
-
-/* Creates a calendar client and tries to load the specified URI into it */
-static void
-create_client (CalClient **client, const char *uri, gboolean only_if_exists)
-{
- 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), "destroy",
- client_destroy_cb,
- NULL);
-
- gtk_signal_connect (GTK_OBJECT (*client), "cal_opened",
- GTK_SIGNAL_FUNC (cal_opened_cb),
- NULL);
- gtk_signal_connect (GTK_OBJECT (*client), "obj_updated",
- GTK_SIGNAL_FUNC (obj_updated_cb),
- NULL);
-
- printf ("Calendar loading `%s'...\n", uri);
-
- result = cal_client_open_calendar (*client, uri, only_if_exists);
-
- if (!result) {
- g_message ("create_client(): failure when issuing calendar open request `%s'",
- uri);
- exit (1);
- }
-}
-
-int
-main (int argc, char **argv)
-{
- bindtextdomain (PACKAGE, GNOMELOCALEDIR);
- textdomain (PACKAGE);
-
- gnome_init ("tl-test", VERSION, argc, argv);
- oaf_init (argc, argv);
-
- if (!bonobo_init (CORBA_OBJECT_NIL, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL)) {
- g_message ("main(): could not initialize Bonobo");
- exit (1);
- }
-
- create_client (&client1, "/cvs/evolution/calendar/cal-client/test.ics", FALSE);
- create_client (&client2, "/cvs/evolution/calendar/cal-client/test.ics", TRUE);
-
- bonobo_main ();
- return 0;
-}
diff --git a/calendar/cal-client/query-listener.c b/calendar/cal-client/query-listener.c
deleted file mode 100644
index 980b0a1ece..0000000000
--- a/calendar/cal-client/query-listener.c
+++ /dev/null
@@ -1,281 +0,0 @@
-/* Evolution calendar - Live search query listener convenience object
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Author: Federico Mena-Quintero <federico@ximian.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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "query-listener.h"
-
-
-
-/* Private part of the QueryListener structure */
-
-struct _QueryListenerPrivate {
- /* Callbacks for notification and their closure data */
- QueryListenerObjUpdatedFn obj_updated_fn;
- QueryListenerObjRemovedFn obj_removed_fn;
- QueryListenerQueryDoneFn query_done_fn;
- QueryListenerEvalErrorFn eval_error_fn;
- gpointer fn_data;
-};
-
-
-
-static void query_listener_class_init (QueryListenerClass *class);
-static void query_listener_init (QueryListener *ql);
-static void query_listener_destroy (GtkObject *object);
-
-static void impl_notifyObjUpdated (PortableServer_Servant servant,
- GNOME_Evolution_Calendar_CalObjUID uid,
- CORBA_boolean query_in_progress,
- CORBA_long n_scanned,
- CORBA_long total,
- CORBA_Environment *ev);
-
-static void impl_notifyObjRemoved (PortableServer_Servant servant,
- GNOME_Evolution_Calendar_CalObjUID uid,
- CORBA_Environment *ev);
-
-static void impl_notifyQueryDone (PortableServer_Servant servant,
- GNOME_Evolution_Calendar_QueryListener_QueryDoneStatus corba_status,
- const CORBA_char *error_str,
- CORBA_Environment *ev);
-
-static void impl_notifyEvalError (PortableServer_Servant servant,
- const CORBA_char *error_str,
- CORBA_Environment *ev);
-
-static BonoboXObjectClass *parent_class;
-
-
-
-BONOBO_X_TYPE_FUNC_FULL (QueryListener,
- GNOME_Evolution_Calendar_QueryListener,
- BONOBO_X_OBJECT_TYPE,
- query_listener);
-
-/* Class initialization function for the live search query listener */
-static void
-query_listener_class_init (QueryListenerClass *class)
-{
- GtkObjectClass *object_class;
-
- object_class = (GtkObjectClass *) class;
-
- parent_class = gtk_type_class (BONOBO_X_OBJECT_TYPE);
-
- object_class->destroy = query_listener_destroy;
-
- class->epv.notifyObjUpdated = impl_notifyObjUpdated;
- class->epv.notifyObjRemoved = impl_notifyObjRemoved;
- class->epv.notifyQueryDone = impl_notifyQueryDone;
- class->epv.notifyEvalError = impl_notifyEvalError;
-}
-
-/* Object initialization function for the live search query listener */
-static void
-query_listener_init (QueryListener *ql)
-{
- QueryListenerPrivate *priv;
-
- priv = g_new0 (QueryListenerPrivate, 1);
- ql->priv = priv;
-
- priv->obj_updated_fn = NULL;
- priv->obj_removed_fn = NULL;
- priv->query_done_fn = NULL;
- priv->eval_error_fn = NULL;
- priv->fn_data = NULL;
-}
-
-/* Destroy handler for the live search query listener */
-static void
-query_listener_destroy (GtkObject *object)
-{
- QueryListener *ql;
- QueryListenerPrivate *priv;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_QUERY_LISTENER (object));
-
- ql = QUERY_LISTENER (object);
- priv = ql->priv;
-
- priv->obj_updated_fn = NULL;
- priv->obj_removed_fn = NULL;
- priv->query_done_fn = NULL;
- priv->eval_error_fn = NULL;
- priv->fn_data = NULL;
-
- g_free (priv);
- ql->priv = NULL;
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-
-
-/* CORBA method implementations */
-
-/* ::notifyObjUpdated() method */
-static void
-impl_notifyObjUpdated (PortableServer_Servant servant,
- GNOME_Evolution_Calendar_CalObjUID uid,
- CORBA_boolean query_in_progress,
- CORBA_long n_scanned,
- CORBA_long total,
- CORBA_Environment *ev)
-{
- QueryListener *ql;
- QueryListenerPrivate *priv;
-
- ql = QUERY_LISTENER (bonobo_object_from_servant (servant));
- priv = ql->priv;
-
- g_assert (priv->obj_updated_fn != NULL);
- (* priv->obj_updated_fn) (ql, uid, query_in_progress, n_scanned, total, priv->fn_data);
-}
-
-/* ::notifyObjRemoved() method */
-static void
-impl_notifyObjRemoved (PortableServer_Servant servant,
- GNOME_Evolution_Calendar_CalObjUID uid,
- CORBA_Environment *ev)
-{
- QueryListener *ql;
- QueryListenerPrivate *priv;
-
- ql = QUERY_LISTENER (bonobo_object_from_servant (servant));
- priv = ql->priv;
-
- g_assert (priv->obj_removed_fn != NULL);
- (* priv->obj_removed_fn) (ql, uid, priv->fn_data);
-}
-
-/* ::notifyQueryDone() method */
-static void
-impl_notifyQueryDone (PortableServer_Servant servant,
- GNOME_Evolution_Calendar_QueryListener_QueryDoneStatus corba_status,
- const CORBA_char *error_str,
- CORBA_Environment *ev)
-{
- QueryListener *ql;
- QueryListenerPrivate *priv;
-
- ql = QUERY_LISTENER (bonobo_object_from_servant (servant));
- priv = ql->priv;
-
- g_assert (priv->query_done_fn != NULL);
- (* priv->query_done_fn) (ql, corba_status, error_str, priv->fn_data);
-}
-
-/* ::notifyEvalError() method */
-static void
-impl_notifyEvalError (PortableServer_Servant servant,
- const CORBA_char *error_str,
- CORBA_Environment *ev)
-{
- QueryListener *ql;
- QueryListenerPrivate *priv;
-
- ql = QUERY_LISTENER (bonobo_object_from_servant (servant));
- priv = ql->priv;
-
- g_assert (priv->eval_error_fn != NULL);
- (* priv->eval_error_fn) (ql, error_str, priv->fn_data);
-}
-
-
-
-/**
- * query_listener_construct:
- * @ql: A query listener.
- * @obj_updated_fn: Callback to use when a component is updated in the query.
- * @obj_removed_fn: Callback to use when a component is removed from the query.
- * @query_done_fn: Callback to use when a query is done.
- * @eval_error_fn: Callback to use when an evaluation error happens during a query.
- * @fn_data: Closure data to pass to the callbacks.
- *
- * Constructs a query listener by setting the callbacks it will use for
- * notification from the calendar server.
- *
- * Return value: The same value as @ql.
- **/
-QueryListener *
-query_listener_construct (QueryListener *ql,
- QueryListenerObjUpdatedFn obj_updated_fn,
- QueryListenerObjRemovedFn obj_removed_fn,
- QueryListenerQueryDoneFn query_done_fn,
- QueryListenerEvalErrorFn eval_error_fn,
- gpointer fn_data)
-{
- QueryListenerPrivate *priv;
-
- g_return_val_if_fail (ql != NULL, NULL);
- g_return_val_if_fail (IS_QUERY_LISTENER (ql), NULL);
- g_return_val_if_fail (obj_updated_fn != NULL, NULL);
- g_return_val_if_fail (obj_removed_fn != NULL, NULL);
- g_return_val_if_fail (query_done_fn != NULL, NULL);
- g_return_val_if_fail (eval_error_fn != NULL, NULL);
-
- priv = ql->priv;
-
- priv->obj_updated_fn = obj_updated_fn;
- priv->obj_removed_fn = obj_removed_fn;
- priv->query_done_fn = query_done_fn;
- priv->eval_error_fn = eval_error_fn;
- priv->fn_data = fn_data;
-
- return ql;
-}
-
-/**
- * query_listener_new:
- * @obj_updated_fn: Callback to use when a component is updated in the query.
- * @obj_removed_fn: Callback to use when a component is removed from the query.
- * @query_done_fn: Callback to use when a query is done.
- * @eval_error_fn: Callback to use when an evaluation error happens during a query.
- * @fn_data: Closure data to pass to the callbacks.
- *
- * Creates a new query listener object.
- *
- * Return value: A newly-created query listener object.
- **/
-QueryListener *
-query_listener_new (QueryListenerObjUpdatedFn obj_updated_fn,
- QueryListenerObjRemovedFn obj_removed_fn,
- QueryListenerQueryDoneFn query_done_fn,
- QueryListenerEvalErrorFn eval_error_fn,
- gpointer fn_data)
-{
- QueryListener *ql;
-
- ql = gtk_type_new (QUERY_LISTENER_TYPE);
-
- return query_listener_construct (ql,
- obj_updated_fn,
- obj_removed_fn,
- query_done_fn,
- eval_error_fn,
- fn_data);
-}
diff --git a/calendar/cal-client/query-listener.h b/calendar/cal-client/query-listener.h
deleted file mode 100644
index 53be9f3229..0000000000
--- a/calendar/cal-client/query-listener.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/* Evolution calendar - Live search query listener implementation
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Author: Federico Mena-Quintero <federico@ximian.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 QUERY_LISTENER_H
-#define QUERY_LISTENER_H
-
-#include <bonobo/bonobo-xobject.h>
-#include "evolution-calendar.h"
-
-BEGIN_GNOME_DECLS
-
-
-
-#define QUERY_LISTENER_TYPE (query_listener_get_type ())
-#define QUERY_LISTENER(obj) (GTK_CHECK_CAST ((obj), QUERY_LISTENER_TYPE, QueryListener))
-#define QUERY_LISTENER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), QUERY_LISTENER_TYPE, \
- QueryListenerClass))
-#define IS_QUERY_LISTENER(obj) (GTK_CHECK_TYPE ((obj), QUERY_LISTENER_TYPE))
-#define IS_QUERY_LISTENER_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), QUERY_LISTENER_TYPE))
-
-typedef struct _QueryListenerPrivate QueryListenerPrivate;
-
-typedef struct {
- BonoboXObject xobject;
-
- /* Private data */
- QueryListenerPrivate *priv;
-} QueryListener;
-
-typedef struct {
- BonoboXObjectClass parent_class;
-
- POA_GNOME_Evolution_Calendar_QueryListener__epv epv;
-} QueryListenerClass;
-
-/* Notification functions */
-
-typedef void (* QueryListenerObjUpdatedFn) (QueryListener *ql,
- const GNOME_Evolution_Calendar_CalObjUID uid,
- CORBA_boolean query_in_progress,
- CORBA_long n_scanned,
- CORBA_long total,
- gpointer data);
-
-typedef void (* QueryListenerObjRemovedFn) (QueryListener *ql,
- const GNOME_Evolution_Calendar_CalObjUID uid,
- gpointer data);
-
-typedef void (* QueryListenerQueryDoneFn) (
- QueryListener *ql,
- GNOME_Evolution_Calendar_QueryListener_QueryDoneStatus status,
- const CORBA_char *error_str,
- gpointer data);
-
-typedef void (* QueryListenerEvalErrorFn) (QueryListener *ql,
- const CORBA_char *error_str,
- gpointer data);
-
-GtkType query_listener_get_type (void);
-
-QueryListener *query_listener_construct (QueryListener *ql,
- QueryListenerObjUpdatedFn obj_updated_fn,
- QueryListenerObjRemovedFn obj_removed_fn,
- QueryListenerQueryDoneFn query_done_fn,
- QueryListenerEvalErrorFn eval_error_fn,
- gpointer fn_data);
-
-QueryListener *query_listener_new (QueryListenerObjUpdatedFn obj_updated_fn,
- QueryListenerObjRemovedFn obj_removed_fn,
- QueryListenerQueryDoneFn query_done_fn,
- QueryListenerEvalErrorFn eval_error_fn,
- gpointer fn_data);
-
-
-
-END_GNOME_DECLS
-
-#endif
diff --git a/calendar/cal-client/test.ics b/calendar/cal-client/test.ics
deleted file mode 100644
index 128251ee11..0000000000
--- a/calendar/cal-client/test.ics
+++ /dev/null
@@ -1,318 +0,0 @@
-BEGIN:VCALENDAR
-VERSION:2.0
-PRODID:-//hacksw/handcal//NONSGML v1.0//EN
-
-BEGIN:VEVENT
-DTSTART:19970714T170000Z
-DTEND:19970715T035959Z
-SUMMARY:Bastille Day Party
-END:VEVENT
-
-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: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:VEVENT
-DTSTAMP:19970324T1200Z
-SEQUENCE:0
-UID:uid3@host1.com
-ORGANIZER:MAILTO:jdoe@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
-
-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:19980403T120000
-ATTACH;FMTTYPE=audio/basic:http://host.com/pub/audio-
- files/ssbanner.aud
-REPEAT:4
-DURATION:PT1H
-END:VALARM
-END:VTODO
-
-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
-
-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
diff --git a/calendar/cal-util/.cvsignore b/calendar/cal-util/.cvsignore
deleted file mode 100644
index 9f93120f8a..0000000000
--- a/calendar/cal-util/.cvsignore
+++ /dev/null
@@ -1,7 +0,0 @@
-.libs
-Makefile.in
-Makefile
-.deps
-*.lo
-*.la
-test-recur
diff --git a/calendar/cal-util/Makefile.am b/calendar/cal-util/Makefile.am
deleted file mode 100644
index 80c8da2662..0000000000
--- a/calendar/cal-util/Makefile.am
+++ /dev/null
@@ -1,49 +0,0 @@
-noinst_PROGRAMS = test-recur
-
-INCLUDES = \
- -DGNOMELOCALEDIR=\""$(localedir)"\" \
- -DG_LOG_DOMAIN=\"cal-util\" \
- -I$(top_srcdir) \
- -I$(top_srcdir)/calendar \
- -I. \
- -I.. \
- -I$(top_builddir) \
- -I$(top_srcdir)/libical/src/libical \
- -I$(top_builddir)/libical/src/libical \
- $(GNOME_INCLUDEDIR)
-
-#
-# cal util library
-#
-
-lib_LTLIBRARIES = libcal-util.la
-
-libcal_util_la_SOURCES = \
- cal-component.c \
- cal-recur.c \
- cal-util.c \
- timeutil.c
-
-libcal_utilincludedir = $(includedir)/evolution/cal-util
-
-libcal_utilinclude_HEADERS = \
- cal-component.h \
- cal-recur.h \
- cal-util.h \
- timeutil.h
-
-#
-# static library for use in conduits' shared libraries
-#
-noinst_LTLIBRARIES = libcal-util-static.la
-libcal_util_static_la_SOURCES = $(libcal_util_la_SOURCES)
-libcal_util_static_la_LDFLAGS = --all-static
-
-test_recur_SOURCES = \
- test-recur.c
-
-test_recur_LDADD = \
- libcal-util.la \
- $(top_builddir)/libversit/libversit.la \
- $(top_builddir)/libical/src/libical/libical.la \
- $(EXTRA_GNOME_LIBS)
diff --git a/calendar/cal-util/cal-component.c b/calendar/cal-util/cal-component.c
deleted file mode 100644
index 43c6841b2c..0000000000
--- a/calendar/cal-util/cal-component.c
+++ /dev/null
@@ -1,4071 +0,0 @@
-/* Evolution calendar - iCalendar component object
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Author: Federico Mena-Quintero <federico@ximian.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 <string.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include "cal-component.h"
-#include "timeutil.h"
-
-
-
-/* Extension property for alarm components so that we can reference them by UID */
-#define EVOLUTION_ALARM_UID_PROPERTY "X-EVOLUTION-ALARM-UID"
-
-/* Private part of the CalComponent structure */
-struct _CalComponentPrivate {
- /* The icalcomponent we wrap */
- icalcomponent *icalcomp;
-
- /* Properties */
-
- icalproperty *uid;
-
- icalproperty *status;
-
- icalproperty *categories;
-
- icalproperty *classification;
-
- struct text {
- icalproperty *prop;
- icalparameter *altrep_param;
- };
-
- GSList *comment_list; /* list of struct text */
-
- icalproperty *completed;
- icalproperty *created;
-
- GSList *description_list; /* list of struct text */
-
- struct datetime {
- icalproperty *prop;
- icalparameter *tzid_param;
- };
-
- struct datetime dtstart;
- struct datetime dtend;
-
- icalproperty *dtstamp;
-
- struct datetime due;
-
- GSList *exdate_list; /* list of struct datetime */
- GSList *exrule_list; /* list of icalproperty objects */
-
- icalproperty *geo;
- icalproperty *last_modified;
- icalproperty *percent;
- icalproperty *priority;
-
- struct period {
- icalproperty *prop;
- icalparameter *value_param;
- };
-
- GSList *rdate_list; /* list of struct period */
-
- GSList *rrule_list; /* list of icalproperty objects */
-
- icalproperty *sequence;
-
- struct {
- icalproperty *prop;
- icalparameter *altrep_param;
- } summary;
-
- icalproperty *transparency;
- icalproperty *url;
-
- /* Subcomponents */
-
- GHashTable *alarm_uid_hash;
-
- /* Whether we should increment the sequence number when piping the
- * object over the wire.
- */
- guint need_sequence_inc : 1;
-};
-
-/* Private structure for alarms */
-struct _CalComponentAlarm {
- /* Our parent component */
- CalComponent *parent;
-
- /* Alarm icalcomponent we wrap */
- icalcomponent *icalcomp;
-
- /* Our extension UID property */
- icalproperty *uid;
-
- /* Properties */
-
- icalproperty *action;
- icalproperty *trigger;
-};
-
-
-
-static void cal_component_class_init (CalComponentClass *class);
-static void cal_component_init (CalComponent *comp);
-static void cal_component_destroy (GtkObject *object);
-
-static GtkObjectClass *parent_class;
-
-
-
-/**
- * cal_component_get_type:
- *
- * Registers the #CalComponent class if necessary, and returns the type ID
- * associated to it.
- *
- * Return value: The type ID of the #CalComponent class.
- **/
-GtkType
-cal_component_get_type (void)
-{
- static GtkType cal_component_type = 0;
-
- if (!cal_component_type) {
- static const GtkTypeInfo cal_component_info = {
- "CalComponent",
- sizeof (CalComponent),
- sizeof (CalComponentClass),
- (GtkClassInitFunc) cal_component_class_init,
- (GtkObjectInitFunc) cal_component_init,
- NULL, /* reserved_1 */
- NULL, /* reserved_2 */
- (GtkClassInitFunc) NULL
- };
-
- cal_component_type = gtk_type_unique (GTK_TYPE_OBJECT, &cal_component_info);
- }
-
- return cal_component_type;
-}
-
-/* Class initialization function for the calendar component object */
-static void
-cal_component_class_init (CalComponentClass *class)
-{
- GtkObjectClass *object_class;
-
- object_class = (GtkObjectClass *) class;
-
- parent_class = gtk_type_class (GTK_TYPE_OBJECT);
-
- object_class->destroy = cal_component_destroy;
-}
-
-/* Object initialization function for the calendar component object */
-static void
-cal_component_init (CalComponent *comp)
-{
- CalComponentPrivate *priv;
-
- priv = g_new0 (CalComponentPrivate, 1);
- comp->priv = priv;
-
- priv->alarm_uid_hash = g_hash_table_new (g_str_hash, g_str_equal);
-}
-
-/* Does a simple g_free() of the elements of a GSList and then frees the list
- * itself. Returns NULL.
- */
-static GSList *
-free_slist (GSList *slist)
-{
- GSList *l;
-
- for (l = slist; l; l = l->next)
- g_free (l->data);
-
- g_slist_free (slist);
- return NULL;
-}
-
-/* Used from g_hash_table_foreach_remove() to free the alarm UIDs hash table.
- * We do not need to do anything to individual elements since we were storing
- * the UID pointers inside the icalproperties themselves.
- */
-static gboolean
-free_alarm_cb (gpointer key, gpointer value, gpointer data)
-{
- return TRUE;
-}
-
-/* Frees the internal icalcomponent only if it does not have a parent. If it
- * does, it means we don't own it and we shouldn't free it.
- */
-static void
-free_icalcomponent (CalComponent *comp)
-{
- CalComponentPrivate *priv;
-
- priv = comp->priv;
-
- if (!priv->icalcomp)
- return;
-
- /* Free the icalcomponent */
-
- if (icalcomponent_get_parent (priv->icalcomp) == NULL)
- icalcomponent_free (priv->icalcomp);
-
- priv->icalcomp = NULL;
-
- /* Free the mappings */
-
- priv->uid = NULL;
-
- priv->status = NULL;
-
- priv->categories = NULL;
-
- priv->classification = NULL;
- priv->comment_list = NULL;
- priv->completed = NULL;
- priv->created = NULL;
-
- priv->description_list = free_slist (priv->description_list);
-
- priv->dtend.prop = NULL;
- priv->dtend.tzid_param = NULL;
-
- priv->dtstamp = NULL;
-
- priv->dtstart.prop = NULL;
- priv->dtstart.tzid_param = NULL;
-
- priv->due.prop = NULL;
- priv->due.tzid_param = NULL;
-
- priv->exdate_list = free_slist (priv->exdate_list);
-
- g_slist_free (priv->exrule_list);
- priv->exrule_list = NULL;
-
- priv->geo = NULL;
- priv->last_modified = NULL;
- priv->percent = NULL;
- priv->priority = NULL;
-
- priv->rdate_list = free_slist (priv->rdate_list);
-
- g_slist_free (priv->rrule_list);
- priv->rrule_list = NULL;
-
- priv->sequence = NULL;
-
- priv->summary.prop = NULL;
- priv->summary.altrep_param = NULL;
-
- priv->transparency = NULL;
- priv->url = NULL;
-
- /* Free the subcomponents */
-
- g_hash_table_foreach_remove (priv->alarm_uid_hash, free_alarm_cb, NULL);
-
- /* Clean up */
-
- priv->need_sequence_inc = FALSE;
-}
-
-/* Destroy handler for the calendar component object */
-static void
-cal_component_destroy (GtkObject *object)
-{
- CalComponent *comp;
- CalComponentPrivate *priv;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (object));
-
- comp = CAL_COMPONENT (object);
- priv = comp->priv;
-
- free_icalcomponent (comp);
- g_hash_table_destroy (priv->alarm_uid_hash);
- priv->alarm_uid_hash = NULL;
-
- g_free (priv);
- comp->priv = NULL;
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-
-
-/**
- * cal_component_gen_uid:
- *
- * Generates a unique identifier suitable for calendar components.
- *
- * Return value: A unique identifier string. Every time this function is called
- * a different string is returned.
- **/
-char *
-cal_component_gen_uid (void)
-{
- static char *hostname;
- time_t t = time (NULL);
- static int serial;
-
- if (!hostname) {
- static char buffer [512];
-
- if ((gethostname (buffer, sizeof (buffer) - 1) == 0) &&
- (buffer [0] != 0))
- hostname = buffer;
- else
- hostname = "localhost";
- }
-
- return g_strdup_printf (
- "%s-%d-%d-%d-%d@%s",
- isodate_from_time_t (t),
- getpid (),
- getgid (),
- getppid (),
- serial++,
- hostname);
-}
-
-/**
- * cal_component_new:
- *
- * Creates a new empty calendar component object. You should set it from an
- * #icalcomponent structure by using cal_component_set_icalcomponent() or with a
- * new empty component type by using cal_component_set_new_vtype().
- *
- * Return value: A newly-created calendar component object.
- **/
-CalComponent *
-cal_component_new (void)
-{
- return CAL_COMPONENT (gtk_type_new (CAL_COMPONENT_TYPE));
-}
-
-/**
- * cal_component_clone:
- * @comp: A calendar component object.
- *
- * Creates a new calendar component object by copying the information from
- * another one.
- *
- * Return value: A newly-created calendar component with the same values as the
- * original one.
- **/
-CalComponent *
-cal_component_clone (CalComponent *comp)
-{
- CalComponentPrivate *priv;
- CalComponent *new_comp;
- icalcomponent *new_icalcomp;
-
- g_return_val_if_fail (comp != NULL, NULL);
- g_return_val_if_fail (IS_CAL_COMPONENT (comp), NULL);
-
- priv = comp->priv;
- g_return_val_if_fail (priv->need_sequence_inc == FALSE, NULL);
-
- new_comp = cal_component_new ();
-
- if (priv->icalcomp) {
- new_icalcomp = icalcomponent_new_clone (priv->icalcomp);
- cal_component_set_icalcomponent (new_comp, new_icalcomp);
- }
-
- return new_comp;
-}
-
-/* Scans a date/time and timezone pair property */
-static void
-scan_datetime (CalComponent *comp, struct datetime *datetime, icalproperty *prop)
-{
- CalComponentPrivate *priv;
-
- priv = comp->priv;
-
- datetime->prop = prop;
- datetime->tzid_param = icalproperty_get_first_parameter (prop, ICAL_TZID_PARAMETER);
-}
-
-/* Scans an exception date property */
-static void
-scan_exdate (CalComponent *comp, icalproperty *prop)
-{
- CalComponentPrivate *priv;
- struct datetime *dt;
-
- priv = comp->priv;
-
- dt = g_new (struct datetime, 1);
- dt->prop = prop;
- dt->tzid_param = icalproperty_get_first_parameter (prop, ICAL_TZID_PARAMETER);
-
- priv->exdate_list = g_slist_append (priv->exdate_list, dt);
-}
-
-/* Scans an icalperiodtype property */
-static void
-scan_period (CalComponent *comp, GSList **list, icalproperty *prop)
-{
- struct period *period;
-
- period = g_new (struct period, 1);
- period->prop = prop;
- period->value_param = icalproperty_get_first_parameter (prop, ICAL_VALUE_PARAMETER);
-
- *list = g_slist_append (*list, period);
-}
-
-/* Scans an icalrecurtype property */
-static void
-scan_recur (CalComponent *comp, GSList **list, icalproperty *prop)
-{
- *list = g_slist_append (*list, prop);
-}
-
-/* Scans the summary property */
-static void
-scan_summary (CalComponent *comp, icalproperty *prop)
-{
- CalComponentPrivate *priv;
-
- priv = comp->priv;
-
- priv->summary.prop = prop;
- priv->summary.altrep_param = icalproperty_get_first_parameter (prop, ICAL_ALTREP_PARAMETER);
-}
-
-/* Scans a text (i.e. text + altrep) property */
-static void
-scan_text (CalComponent *comp, GSList **text_list, icalproperty *prop)
-{
- struct text *text;
-
- text = g_new (struct text, 1);
- text->prop = prop;
- text->altrep_param = icalproperty_get_first_parameter (prop, ICAL_ALTREP_PARAMETER);
-
- *text_list = g_slist_append (*text_list, text);
-}
-
-/* Scans an icalproperty and adds its mapping to the component */
-static void
-scan_property (CalComponent *comp, icalproperty *prop)
-{
- CalComponentPrivate *priv;
- icalproperty_kind kind;
-
- priv = comp->priv;
-
- kind = icalproperty_isa (prop);
-
- switch (kind) {
- case ICAL_STATUS_PROPERTY:
- priv->status = prop;
- break;
-
- case ICAL_CATEGORIES_PROPERTY:
- priv->categories = prop;
- break;
-
- case ICAL_CLASS_PROPERTY:
- priv->classification = prop;
- break;
-
- case ICAL_COMMENT_PROPERTY:
- scan_text (comp, &priv->comment_list, prop);
- break;
-
- case ICAL_COMPLETED_PROPERTY:
- priv->completed = prop;
- break;
-
- case ICAL_CREATED_PROPERTY:
- priv->created = prop;
- break;
-
- case ICAL_DESCRIPTION_PROPERTY:
- scan_text (comp, &priv->description_list, prop);
- break;
-
- case ICAL_DTEND_PROPERTY:
- scan_datetime (comp, &priv->dtend, prop);
- break;
-
- case ICAL_DTSTAMP_PROPERTY:
- priv->dtstamp = prop;
- break;
-
- case ICAL_DTSTART_PROPERTY:
- scan_datetime (comp, &priv->dtstart, prop);
- break;
-
- case ICAL_DUE_PROPERTY:
- scan_datetime (comp, &priv->due, prop);
- break;
-
- case ICAL_EXDATE_PROPERTY:
- scan_exdate (comp, prop);
- break;
-
- case ICAL_EXRULE_PROPERTY:
- scan_recur (comp, &priv->exrule_list, prop);
- break;
-
- case ICAL_GEO_PROPERTY:
- priv->geo = prop;
- break;
-
- case ICAL_LASTMODIFIED_PROPERTY:
- priv->last_modified = prop;
- break;
-
- case ICAL_PERCENTCOMPLETE_PROPERTY:
- priv->percent = prop;
- break;
-
- case ICAL_PRIORITY_PROPERTY:
- priv->priority = prop;
- break;
-
- case ICAL_RDATE_PROPERTY:
- scan_period (comp, &priv->rdate_list, prop);
- break;
-
- case ICAL_RRULE_PROPERTY:
- scan_recur (comp, &priv->rrule_list, prop);
- break;
-
- case ICAL_SEQUENCE_PROPERTY:
- priv->sequence = prop;
- break;
-
- case ICAL_SUMMARY_PROPERTY:
- scan_summary (comp, prop);
- break;
-
- case ICAL_TRANSP_PROPERTY:
- priv->transparency = prop;
- break;
-
- case ICAL_UID_PROPERTY:
- priv->uid = prop;
- break;
-
- case ICAL_URL_PROPERTY:
- priv->url = prop;
- break;
-
- default:
- break;
- }
-}
-
-/* Gets our alarm UID string from a property that is known to contain it */
-static const char *
-alarm_uid_from_prop (icalproperty *prop)
-{
- const char *xstr;
-
- g_assert (icalproperty_isa (prop) == ICAL_X_PROPERTY);
-
- xstr = icalproperty_get_x (prop);
- g_assert (xstr != NULL);
-
- return xstr;
-}
-
-/* Sets our alarm UID extension property on an alarm component. Returns a
- * pointer to the UID string inside the property itself.
- */
-static const char *
-set_alarm_uid (icalcomponent *alarm, const char *auid)
-{
- icalproperty *prop;
- const char *inprop_auid;
-
- /* Create the new property */
-
- prop = icalproperty_new_x ((char *) auid);
- icalproperty_set_x_name (prop, EVOLUTION_ALARM_UID_PROPERTY);
-
- icalcomponent_add_property (alarm, prop);
-
- inprop_auid = alarm_uid_from_prop (prop);
- return inprop_auid;
-}
-
-/* Removes any alarm UID extension properties from an alarm subcomponent */
-static void
-remove_alarm_uid (icalcomponent *alarm)
-{
- icalproperty *prop;
- GSList *list, *l;
-
- list = NULL;
-
- for (prop = icalcomponent_get_first_property (alarm, ICAL_X_PROPERTY);
- prop;
- prop = icalcomponent_get_next_property (alarm, ICAL_X_PROPERTY)) {
- const char *xname;
-
- xname = icalproperty_get_x_name (prop);
- g_assert (xname != NULL);
-
- if (strcmp (xname, EVOLUTION_ALARM_UID_PROPERTY) == 0)
- list = g_slist_prepend (list, prop);
- }
-
- for (l = list; l; l = l->next) {
- prop = l->data;
- icalcomponent_remove_property (alarm, prop);
- icalproperty_free (prop);
- }
-
- g_slist_free (list);
-}
-
-/* Adds an alarm subcomponent to the calendar component's mapping table. The
- * actual UID with which it gets added may not be the same as the specified one;
- * this function will change it if the table already had an alarm subcomponent
- * with the specified UID. Returns the actual UID used.
- */
-static const char *
-add_alarm (CalComponent *comp, icalcomponent *alarm, const char *auid)
-{
- CalComponentPrivate *priv;
- icalcomponent *old_alarm;
-
- priv = comp->priv;
-
- /* First we see if we already have an alarm with the requested UID. In
- * that case, we need to change the new UID to something else. This
- * should never happen, but who knows.
- */
-
- old_alarm = g_hash_table_lookup (priv->alarm_uid_hash, auid);
- if (old_alarm != NULL) {
- char *new_auid;
-
- g_message ("add_alarm(): Got alarm with duplicated UID `%s', changing it...", auid);
-
- remove_alarm_uid (alarm);
-
- new_auid = cal_component_gen_uid ();
- auid = set_alarm_uid (alarm, new_auid);
- g_free (new_auid);
- }
-
- g_hash_table_insert (priv->alarm_uid_hash, (char *) auid, alarm);
- return auid;
-}
-
-static void
-remove_alarm (CalComponent *comp, const char *auid)
-{
- CalComponentPrivate *priv;
-
- priv = comp->priv;
-
- g_hash_table_remove (priv->alarm_uid_hash, auid);
-}
-
-
-/* Scans an alarm subcomponent, adds an UID extension property to it (so that we
- * can reference alarms by unique IDs), and adds its mapping to the component. */
-static void
-scan_alarm (CalComponent *comp, icalcomponent *alarm)
-{
- CalComponentPrivate *priv;
- icalproperty *prop;
- const char *auid;
- char *new_auid;
-
- priv = comp->priv;
-
- for (prop = icalcomponent_get_first_property (alarm, ICAL_X_PROPERTY);
- prop;
- prop = icalcomponent_get_next_property (alarm, ICAL_X_PROPERTY)) {
- const char *xname;
-
- xname = icalproperty_get_x_name (prop);
- g_assert (xname != NULL);
-
- if (strcmp (xname, EVOLUTION_ALARM_UID_PROPERTY) == 0) {
- auid = alarm_uid_from_prop (prop);
- add_alarm (comp, alarm, auid);
- return;
- }
- }
-
- /* The component has no alarm UID property, so we create one. */
-
- new_auid = cal_component_gen_uid ();
- auid = set_alarm_uid (alarm, new_auid);
- g_free (new_auid);
-
- add_alarm (comp, alarm, auid);
-}
-
-/* Scans an icalcomponent for its properties so that we can provide
- * random-access to them. It also builds a hash table of the component's alarm
- * subcomponents.
- */
-static void
-scan_icalcomponent (CalComponent *comp)
-{
- CalComponentPrivate *priv;
- icalproperty *prop;
- icalcompiter iter;
-
- priv = comp->priv;
-
- g_assert (priv->icalcomp != NULL);
-
- /* Scan properties */
-
- for (prop = icalcomponent_get_first_property (priv->icalcomp, ICAL_ANY_PROPERTY);
- prop;
- prop = icalcomponent_get_next_property (priv->icalcomp, ICAL_ANY_PROPERTY))
- scan_property (comp, prop);
-
- /* Scan subcomponents */
-
- for (iter = icalcomponent_begin_component (priv->icalcomp, ICAL_VALARM_COMPONENT);
- icalcompiter_deref (&iter) != NULL;
- icalcompiter_next (&iter)) {
- icalcomponent *subcomp;
-
- subcomp = icalcompiter_deref (&iter);
- scan_alarm (comp, subcomp);
- }
-}
-
-/* Ensures that the mandatory calendar component properties (uid, dtstamp) do
- * exist. If they don't exist, it creates them automatically.
- */
-static void
-ensure_mandatory_properties (CalComponent *comp)
-{
- CalComponentPrivate *priv;
-
- priv = comp->priv;
- g_assert (priv->icalcomp != NULL);
-
- if (!priv->uid) {
- char *uid;
-
- uid = cal_component_gen_uid ();
- priv->uid = icalproperty_new_uid (uid);
- g_free (uid);
-
- icalcomponent_add_property (priv->icalcomp, priv->uid);
- }
-
- if (!priv->dtstamp) {
- time_t tim;
- struct icaltimetype t;
-
- tim = time (NULL);
- t = icaltime_from_timet (tim, FALSE);
-
- priv->dtstamp = icalproperty_new_dtstamp (t);
- icalcomponent_add_property (priv->icalcomp, priv->dtstamp);
- }
-}
-
-/**
- * cal_component_set_new_vtype:
- * @comp: A calendar component object.
- * @type: Type of calendar component to create.
- *
- * Clears any existing component data from a calendar component object and
- * creates a new #icalcomponent of the specified type for it. The only property
- * that will be set in the new component will be its unique identifier.
- **/
-void
-cal_component_set_new_vtype (CalComponent *comp, CalComponentVType type)
-{
- CalComponentPrivate *priv;
- icalcomponent *icalcomp;
- icalcomponent_kind kind;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
-
- priv = comp->priv;
-
- free_icalcomponent (comp);
-
- if (type == CAL_COMPONENT_NO_TYPE)
- return;
-
- /* Figure out the kind and create the icalcomponent */
-
- switch (type) {
- case CAL_COMPONENT_EVENT:
- kind = ICAL_VEVENT_COMPONENT;
- break;
-
- case CAL_COMPONENT_TODO:
- kind = ICAL_VTODO_COMPONENT;
- break;
-
- case CAL_COMPONENT_JOURNAL:
- kind = ICAL_VJOURNAL_COMPONENT;
- break;
-
- case CAL_COMPONENT_FREEBUSY:
- kind = ICAL_VFREEBUSY_COMPONENT;
- break;
-
- case CAL_COMPONENT_TIMEZONE:
- kind = ICAL_VTIMEZONE_COMPONENT;
- break;
-
- default:
- g_assert_not_reached ();
- kind = ICAL_NO_COMPONENT;
- }
-
- icalcomp = icalcomponent_new (kind);
- if (!icalcomp) {
- g_message ("cal_component_set_new_vtype(): Could not create the icalcomponent!");
- return;
- }
-
- /* Scan the component to build our mapping table */
-
- priv->icalcomp = icalcomp;
- scan_icalcomponent (comp);
-
- /* Add missing stuff */
-
- ensure_mandatory_properties (comp);
-}
-
-/**
- * cal_component_set_icalcomponent:
- * @comp: A calendar component object.
- * @icalcomp: An #icalcomponent.
- *
- * Sets the contents of a calendar component object from an #icalcomponent
- * structure. If the @comp already had an #icalcomponent set into it, it will
- * will be freed automatically if the #icalcomponent does not have a parent
- * component itself.
- *
- * Supported component types are VEVENT, VTODO, VJOURNAL, VFREEBUSY, and VTIMEZONE.
- *
- * Return value: TRUE on success, FALSE if @icalcomp is an unsupported component
- * type.
- **/
-gboolean
-cal_component_set_icalcomponent (CalComponent *comp, icalcomponent *icalcomp)
-{
- CalComponentPrivate *priv;
- icalcomponent_kind kind;
-
- g_return_val_if_fail (comp != NULL, FALSE);
- g_return_val_if_fail (IS_CAL_COMPONENT (comp), FALSE);
-
- priv = comp->priv;
-
- if (priv->icalcomp == icalcomp)
- return TRUE;
-
- free_icalcomponent (comp);
-
- if (!icalcomp) {
- priv->icalcomp = NULL;
- return TRUE;
- }
-
- kind = icalcomponent_isa (icalcomp);
-
- if (!(kind == ICAL_VEVENT_COMPONENT
- || kind == ICAL_VTODO_COMPONENT
- || kind == ICAL_VJOURNAL_COMPONENT
- || kind == ICAL_VFREEBUSY_COMPONENT
- || kind == ICAL_VTIMEZONE_COMPONENT))
- return FALSE;
-
- priv->icalcomp = icalcomp;
-
- scan_icalcomponent (comp);
- ensure_mandatory_properties (comp);
-
- return TRUE;
-}
-
-/**
- * cal_component_get_icalcomponent:
- * @comp: A calendar component object.
- *
- * Queries the #icalcomponent structure that a calendar component object is
- * wrapping.
- *
- * Return value: An #icalcomponent structure, or NULL if the @comp has no
- * #icalcomponent set to it.
- **/
-icalcomponent *
-cal_component_get_icalcomponent (CalComponent *comp)
-{
- CalComponentPrivate *priv;
-
- g_return_val_if_fail (comp != NULL, NULL);
- g_return_val_if_fail (IS_CAL_COMPONENT (comp), NULL);
-
- priv = comp->priv;
- g_return_val_if_fail (priv->need_sequence_inc == FALSE, NULL);
-
- return priv->icalcomp;
-}
-
-/**
- * cal_component_get_vtype:
- * @comp: A calendar component object.
- *
- * Queries the type of a calendar component object.
- *
- * Return value: The type of the component, as defined by RFC 2445.
- **/
-CalComponentVType
-cal_component_get_vtype (CalComponent *comp)
-{
- CalComponentPrivate *priv;
- icalcomponent_kind kind;
-
- g_return_val_if_fail (comp != NULL, CAL_COMPONENT_NO_TYPE);
- g_return_val_if_fail (IS_CAL_COMPONENT (comp), CAL_COMPONENT_NO_TYPE);
-
- priv = comp->priv;
- g_return_val_if_fail (priv->icalcomp != NULL, CAL_COMPONENT_NO_TYPE);
-
- kind = icalcomponent_isa (priv->icalcomp);
- switch (kind) {
- case ICAL_VEVENT_COMPONENT:
- return CAL_COMPONENT_EVENT;
-
- case ICAL_VTODO_COMPONENT:
- return CAL_COMPONENT_TODO;
-
- case ICAL_VJOURNAL_COMPONENT:
- return CAL_COMPONENT_JOURNAL;
-
- case ICAL_VFREEBUSY_COMPONENT:
- return CAL_COMPONENT_FREEBUSY;
-
- case ICAL_VTIMEZONE_COMPONENT:
- return CAL_COMPONENT_TIMEZONE;
-
- default:
- /* We should have been loaded with a supported type! */
- g_assert_not_reached ();
- return CAL_COMPONENT_NO_TYPE;
- }
-}
-
-/**
- * cal_component_get_as_string:
- * @comp: A calendar component.
- *
- * Gets the iCalendar string representation of a calendar component. You should
- * call cal_component_commit_sequence() before this function to ensure that the
- * component's sequence number is consistent with the state of the object.
- *
- * Return value: String representation of the calendar component according to
- * RFC 2445.
- **/
-char *
-cal_component_get_as_string (CalComponent *comp)
-{
- CalComponentPrivate *priv;
- char *str, *buf;
-
- g_return_val_if_fail (comp != NULL, NULL);
- g_return_val_if_fail (IS_CAL_COMPONENT (comp), NULL);
-
- priv = comp->priv;
- g_return_val_if_fail (priv->icalcomp != NULL, NULL);
-
- /* Ensure that the user has committed the new SEQUENCE */
- g_return_val_if_fail (priv->need_sequence_inc == FALSE, NULL);
-
- /* We dup the string; libical owns that memory */
-
- str = icalcomponent_as_ical_string (priv->icalcomp);
-
- if (str)
- buf = g_strdup (str);
- else
- buf = NULL;
-
- return buf;
-}
-
-/**
- * cal_component_commit_sequence:
- * @comp:
- *
- * Increments the sequence number property in a calendar component object if it
- * needs it. This needs to be done when any of a number of properties listed in
- * RFC 2445 change values, such as the start and end dates of a component.
- *
- * This function must be called before calling cal_component_get_as_string() to
- * ensure that the component is fully consistent.
- **/
-void
-cal_component_commit_sequence (CalComponent *comp)
-{
- CalComponentPrivate *priv;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- if (!priv->need_sequence_inc)
- return;
-
- if (priv->sequence) {
- int seq;
-
- seq = icalproperty_get_sequence (priv->sequence);
- icalproperty_set_sequence (priv->sequence, seq + 1);
- } else {
- /* The component had no SEQUENCE property, so assume that the
- * default would have been zero. Since it needed incrementing
- * anyways, we use a value of 1 here.
- */
- priv->sequence = icalproperty_new_sequence (1);
- icalcomponent_add_property (priv->icalcomp, priv->sequence);
- }
-
- priv->need_sequence_inc = FALSE;
-}
-
-/**
- * cal_component_get_uid:
- * @comp: A calendar component object.
- * @uid: Return value for the UID string.
- *
- * Queries the unique identifier of a calendar component object.
- **/
-void
-cal_component_get_uid (CalComponent *comp, const char **uid)
-{
- CalComponentPrivate *priv;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
- g_return_if_fail (uid != NULL);
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- /* This MUST exist, since we ensured that it did */
- g_assert (priv->uid != NULL);
-
- *uid = icalproperty_get_uid (priv->uid);
-}
-
-/**
- * cal_component_set_uid:
- * @comp: A calendar component object.
- * @uid: Unique identifier.
- *
- * Sets the unique identifier string of a calendar component object.
- **/
-void
-cal_component_set_uid (CalComponent *comp, const char *uid)
-{
- CalComponentPrivate *priv;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
- g_return_if_fail (uid != NULL);
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- /* This MUST exist, since we ensured that it did */
- g_assert (priv->uid != NULL);
-
- icalproperty_set_uid (priv->uid, (char *) uid);
-}
-
-/**
- * cal_component_get_categories:
- * @comp: A calendar component object.
- * @categories:
- *
- *
- **/
-void
-cal_component_get_categories (CalComponent *comp, const char **categories)
-{
- CalComponentPrivate *priv;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
- g_return_if_fail (categories != NULL);
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- if (priv->categories)
- *categories = icalproperty_get_categories (priv->categories);
- else
- *categories = NULL;
-}
-
-/**
- * cal_component_set_categories:
- * @comp: A calendar component object.
- * @categories:
- *
- *
- **/
-void
-cal_component_set_categories (CalComponent *comp, const char *categories)
-{
- CalComponentPrivate *priv;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- if (!categories || !(*categories)) {
- if (priv->categories) {
- icalcomponent_remove_property (priv->icalcomp, priv->categories);
- icalproperty_free (priv->categories);
- priv->url = NULL;
- }
-
- return;
- }
-
- if (priv->categories)
- icalproperty_set_categories (priv->categories, (char *) categories);
- else {
- priv->categories = icalproperty_new_categories ((char *) categories);
- icalcomponent_add_property (priv->icalcomp, priv->categories);
- }
-}
-
-
-/**
- * cal_component_get_categories_list:
- * @comp: A calendar component object.
- * @categ_list: Return value for the list of strings, where each string is a
- * category. This should be freed using cal_component_free_categories_list().
- *
- * Queries the list of categories of a calendar component object. Each element
- * in the returned categ_list is a string with the corresponding category.
- **/
-void
-cal_component_get_categories_list (CalComponent *comp, GSList **categ_list)
-{
- CalComponentPrivate *priv;
- const char *categories;
- const char *p;
- const char *cat_start;
- char *str;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
- g_return_if_fail (categ_list != NULL);
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- if (!priv->categories) {
- *categ_list = NULL;
- return;
- }
-
- categories = icalproperty_get_categories (priv->categories);
- g_assert (categories != NULL);
-
- cat_start = categories;
- *categ_list = NULL;
-
- for (p = categories; *p; p++)
- if (*p == ',') {
- str = g_strndup (cat_start, p - cat_start);
- *categ_list = g_slist_prepend (*categ_list, str);
-
- cat_start = p + 1;
- }
-
- str = g_strndup (cat_start, p - cat_start);
- *categ_list = g_slist_prepend (*categ_list, str);
-
- *categ_list = g_slist_reverse (*categ_list);
-}
-
-/* Creates a comma-delimited string of categories */
-static char *
-stringify_categories (GSList *categ_list)
-{
- GString *s;
- GSList *l;
- char *str;
-
- s = g_string_new (NULL);
-
- for (l = categ_list; l; l = l->next) {
- g_string_append (s, l->data);
-
- if (l->next != NULL)
- g_string_append (s, ",");
- }
-
- str = s->str;
- g_string_free (s, FALSE);
-
- return str;
-}
-
-/**
- * cal_component_set_categories_list:
- * @comp: A calendar component object.
- * @categ_list: List of strings, one for each category.
- *
- * Sets the list of categories of a calendar component object.
- **/
-void
-cal_component_set_categories_list (CalComponent *comp, GSList *categ_list)
-{
- CalComponentPrivate *priv;
- char *categories_str;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- if (!categ_list) {
- if (priv->categories) {
- icalcomponent_remove_property (priv->icalcomp, priv->categories);
- icalproperty_free (priv->categories);
- }
-
- return;
- }
-
- /* Create a single string of categories */
- categories_str = stringify_categories (categ_list);
-
- /* Set the categories */
- priv->categories = icalproperty_new_categories (categories_str);
- g_free (categories_str);
-
- icalcomponent_add_property (priv->icalcomp, priv->categories);
-}
-
-/**
- * cal_component_get_classification:
- * @comp: A calendar component object.
- * @classif: Return value for the classification.
- *
- * Queries the classification of a calendar component object. If the
- * classification property is not set on this component, this function returns
- * #CAL_COMPONENT_CLASS_NONE.
- **/
-void
-cal_component_get_classification (CalComponent *comp, CalComponentClassification *classif)
-{
- CalComponentPrivate *priv;
- const char *class;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
- g_return_if_fail (classif != NULL);
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- if (!priv->classification) {
- *classif = CAL_COMPONENT_CLASS_NONE;
- return;
- }
-
- class = icalproperty_get_class (priv->classification);
-
- if (strcasecmp (class, "PUBLIC") == 0)
- *classif = CAL_COMPONENT_CLASS_PUBLIC;
- else if (strcasecmp (class, "PRIVATE") == 0)
- *classif = CAL_COMPONENT_CLASS_PRIVATE;
- else if (strcasecmp (class, "CONFIDENTIAL") == 0)
- *classif = CAL_COMPONENT_CLASS_CONFIDENTIAL;
- else
- *classif = CAL_COMPONENT_CLASS_UNKNOWN;
-}
-
-/**
- * cal_component_set_classification:
- * @comp: A calendar component object.
- * @classif: Classification to use.
- *
- * Sets the classification property of a calendar component object. To unset
- * the property, specify CAL_COMPONENT_CLASS_NONE for @classif.
- **/
-void
-cal_component_set_classification (CalComponent *comp, CalComponentClassification classif)
-{
- CalComponentPrivate *priv;
- char *str;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
- g_return_if_fail (classif != CAL_COMPONENT_CLASS_UNKNOWN);
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- if (classif == CAL_COMPONENT_CLASS_NONE) {
- if (priv->classification) {
- icalcomponent_remove_property (priv->icalcomp, priv->classification);
- icalproperty_free (priv->classification);
- priv->classification = NULL;
- }
-
- return;
- }
-
- switch (classif) {
- case CAL_COMPONENT_CLASS_PUBLIC:
- str = "PUBLIC";
- break;
-
- case CAL_COMPONENT_CLASS_PRIVATE:
- str = "PRIVATE";
- break;
-
- case CAL_COMPONENT_CLASS_CONFIDENTIAL:
- str = "CONFIDENTIAL";
- break;
-
- default:
- g_assert_not_reached ();
- str = NULL;
- }
-
- if (priv->classification)
- icalproperty_set_class (priv->classification, str);
- else {
- priv->classification = icalproperty_new_class (str);
- icalcomponent_add_property (priv->icalcomp, priv->classification);
- }
-}
-
-/* Gets a text list value */
-static void
-get_text_list (GSList *text_list,
- const char *(* get_prop_func) (icalproperty *prop),
- GSList **tl)
-{
- GSList *l;
-
- *tl = NULL;
-
- if (!text_list)
- return;
-
- for (l = text_list; l; l = l->next) {
- struct text *text;
- CalComponentText *t;
-
- text = l->data;
- g_assert (text->prop != NULL);
-
- t = g_new (CalComponentText, 1);
- t->value = (* get_prop_func) (text->prop);
-
- if (text->altrep_param)
- t->altrep = icalparameter_get_altrep (text->altrep_param);
- else
- t->altrep = NULL;
-
- *tl = g_slist_prepend (*tl, t);
- }
-
- *tl = g_slist_reverse (*tl);
-}
-
-/* Sets a text list value */
-static void
-set_text_list (CalComponent *comp,
- icalproperty *(* new_prop_func) (const char *value),
- GSList **text_list,
- GSList *tl)
-{
- CalComponentPrivate *priv;
- GSList *l;
-
- priv = comp->priv;
-
- /* Remove old texts */
-
- for (l = *text_list; l; l = l->next) {
- struct text *text;
-
- text = l->data;
- g_assert (text->prop != NULL);
-
- icalcomponent_remove_property (priv->icalcomp, text->prop);
- icalproperty_free (text->prop);
- g_free (text);
- }
-
- g_slist_free (*text_list);
- *text_list = NULL;
-
- /* Add in new texts */
-
- for (l = tl; l; l = l->next) {
- CalComponentText *t;
- struct text *text;
-
- t = l->data;
- g_return_if_fail (t->value != NULL);
-
- text = g_new (struct text, 1);
-
- text->prop = (* new_prop_func) ((char *) t->value);
- icalcomponent_add_property (priv->icalcomp, text->prop);
-
- if (t->altrep) {
- text->altrep_param = icalparameter_new_altrep ((char *) t->altrep);
- icalproperty_add_parameter (text->prop, text->altrep_param);
- } else
- text->altrep_param = NULL;
-
- *text_list = g_slist_prepend (*text_list, text);
- }
-
- *text_list = g_slist_reverse (*text_list);
-}
-
-/**
- * cal_component_get_comment_list:
- * @comp: A calendar component object.
- * @text_list: Return value for the comment properties and their parameters, as
- * a list of #CalComponentText structures. This should be freed using the
- * cal_component_free_text_list() function.
- *
- * Queries the comment of a calendar component object. The comment property can
- * appear several times inside a calendar component, and so a list of
- * #CalComponentText is returned.
- **/
-void
-cal_component_get_comment_list (CalComponent *comp, GSList **text_list)
-{
- CalComponentPrivate *priv;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
- g_return_if_fail (text_list != NULL);
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- get_text_list (priv->comment_list, icalproperty_get_comment, text_list);
-}
-
-/**
- * cal_component_set_comment_list:
- * @comp: A calendar component object.
- * @text_list: List of #CalComponentText structures.
- *
- * Sets the comment of a calendar component object. The comment property can
- * appear several times inside a calendar component, and so a list of
- * #CalComponentText structures is used.
- **/
-void
-cal_component_set_comment_list (CalComponent *comp, GSList *text_list)
-{
- CalComponentPrivate *priv;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- set_text_list (comp, icalproperty_new_comment, &priv->comment_list, text_list);
-}
-
-/* Gets a struct icaltimetype value */
-static void
-get_icaltimetype (icalproperty *prop,
- struct icaltimetype (* get_prop_func) (icalproperty *prop),
- struct icaltimetype **t)
-{
- if (!prop) {
- *t = NULL;
- return;
- }
-
- *t = g_new (struct icaltimetype, 1);
- **t = (* get_prop_func) (prop);
-}
-
-/* Sets a struct icaltimetype value */
-static void
-set_icaltimetype (CalComponent *comp, icalproperty **prop,
- icalproperty *(* prop_new_func) (struct icaltimetype v),
- void (* prop_set_func) (icalproperty *prop, struct icaltimetype v),
- struct icaltimetype *t)
-{
- CalComponentPrivate *priv;
-
- priv = comp->priv;
-
- if (!t) {
- if (*prop) {
- icalcomponent_remove_property (priv->icalcomp, *prop);
- icalproperty_free (*prop);
- *prop = NULL;
- }
-
- return;
- }
-
- if (*prop)
- (* prop_set_func) (*prop, *t);
- else {
- *prop = (* prop_new_func) (*t);
- icalcomponent_add_property (priv->icalcomp, *prop);
- }
-}
-
-/**
- * cal_component_get_completed:
- * @comp: A calendar component object.
- * @t: Return value for the completion date. This should be freed using the
- * cal_component_free_icaltimetype() function.
- *
- * Queries the date at which a calendar compoment object was completed.
- **/
-void
-cal_component_get_completed (CalComponent *comp, struct icaltimetype **t)
-{
- CalComponentPrivate *priv;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
- g_return_if_fail (t != NULL);
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- get_icaltimetype (priv->completed, icalproperty_get_completed, t);
-}
-
-/**
- * cal_component_set_completed:
- * @comp: A calendar component object.
- * @t: Value for the completion date.
- *
- * Sets the date at which a calendar component object was completed.
- **/
-void
-cal_component_set_completed (CalComponent *comp, struct icaltimetype *t)
-{
- CalComponentPrivate *priv;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- set_icaltimetype (comp, &priv->completed,
- icalproperty_new_completed,
- icalproperty_set_completed,
- t);
-}
-
-
-/**
- * cal_component_get_created:
- * @comp: A calendar component object.
- * @t: Return value for the creation date. This should be freed using the
- * cal_component_free_icaltimetype() function.
- *
- * Queries the date in which a calendar component object was created in the
- * calendar store.
- **/
-void
-cal_component_get_created (CalComponent *comp, struct icaltimetype **t)
-{
- CalComponentPrivate *priv;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
- g_return_if_fail (t != NULL);
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- get_icaltimetype (priv->created, icalproperty_get_created, t);
-}
-
-/**
- * cal_component_set_created:
- * @comp: A calendar component object.
- * @t: Value for the creation date.
- *
- * Sets the date in which a calendar component object is created in the calendar
- * store. This should only be used inside a calendar store application, i.e.
- * not by calendar user agents.
- **/
-void
-cal_component_set_created (CalComponent *comp, struct icaltimetype *t)
-{
- CalComponentPrivate *priv;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- set_icaltimetype (comp, &priv->created,
- icalproperty_new_created,
- icalproperty_set_created,
- t);
-}
-
-/**
- * cal_component_get_description_list:
- * @comp: A calendar component object.
- * @text_list: Return value for the description properties and their parameters,
- * as a list of #CalComponentText structures. This should be freed using the
- * cal_component_free_text_list() function.
- *
- * Queries the description of a calendar component object. Journal components
- * may have more than one description, and as such this function returns a list
- * of #CalComponentText structures. All other types of components can have at
- * most one description.
- **/
-void
-cal_component_get_description_list (CalComponent *comp, GSList **text_list)
-{
- CalComponentPrivate *priv;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
- g_return_if_fail (text_list != NULL);
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- get_text_list (priv->description_list, icalproperty_get_description, text_list);
-}
-
-/**
- * cal_component_set_description_list:
- * @comp: A calendar component object.
- * @text_list: List of #CalComponentSummary structures.
- *
- * Sets the description of a calendar component object. Journal components may
- * have more than one description, and as such this function takes in a list of
- * #CalComponentDescription structures. All other types of components can have
- * at most one description.
- **/
-void
-cal_component_set_description_list (CalComponent *comp, GSList *text_list)
-{
- CalComponentPrivate *priv;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- set_text_list (comp, icalproperty_new_description, &priv->description_list, text_list);
-}
-
-/* Gets a date/time and timezone pair */
-static void
-get_datetime (struct datetime *datetime,
- struct icaltimetype (* get_prop_func) (icalproperty *prop),
- CalComponentDateTime *dt)
-{
- if (datetime->prop) {
- dt->value = g_new (struct icaltimetype, 1);
- *dt->value = (* get_prop_func) (datetime->prop);
- } else
- dt->value = NULL;
-
- if (datetime->tzid_param)
- dt->tzid = icalparameter_get_tzid (datetime->tzid_param);
- else
- dt->tzid = NULL;
-}
-
-/* Sets a date/time and timezone pair */
-static void
-set_datetime (CalComponent *comp, struct datetime *datetime,
- icalproperty *(* prop_new_func) (struct icaltimetype v),
- void (* prop_set_func) (icalproperty * prop, struct icaltimetype v),
- CalComponentDateTime *dt)
-{
- CalComponentPrivate *priv;
-
- priv = comp->priv;
-
- if (!dt) {
- if (datetime->prop) {
- icalcomponent_remove_property (priv->icalcomp, datetime->prop);
- icalproperty_free (datetime->prop);
-
- datetime->prop = NULL;
- datetime->tzid_param = NULL;
- }
-
- return;
- }
-
- g_return_if_fail (dt->value != NULL);
-
- if (datetime->prop)
- (* prop_set_func) (datetime->prop, *dt->value);
- else {
- datetime->prop = (* prop_new_func) (*dt->value);
- icalcomponent_add_property (priv->icalcomp, datetime->prop);
- }
-
- if (dt->tzid) {
- g_assert (datetime->prop != NULL);
-
- if (datetime->tzid_param)
- icalparameter_set_tzid (datetime->tzid_param, (char *) dt->tzid);
- else {
- datetime->tzid_param = icalparameter_new_tzid ((char *) dt->tzid);
- icalproperty_add_parameter (datetime->prop, datetime->tzid_param);
- }
- } else if (datetime->tzid_param) {
- icalproperty_remove_parameter (datetime->prop, ICAL_TZID_PARAMETER);
- icalparameter_free (datetime->tzid_param);
- datetime->tzid_param = NULL;
- }
-}
-
-/**
- * cal_component_get_dtend:
- * @comp: A calendar component object.
- * @dt: Return value for the date/time end. This should be freed with the
- * cal_component_free_datetime() function.
- *
- * Queries the date/time end of a calendar component object.
- **/
-void
-cal_component_get_dtend (CalComponent *comp, CalComponentDateTime *dt)
-{
- CalComponentPrivate *priv;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
- g_return_if_fail (dt != NULL);
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- get_datetime (&priv->dtend, icalproperty_get_dtend, dt);
-}
-
-/**
- * cal_component_set_dtend:
- * @comp: A calendar component object.
- * @dt: End date/time.
- *
- * Sets the date/time end property of a calendar component object.
- **/
-void
-cal_component_set_dtend (CalComponent *comp, CalComponentDateTime *dt)
-{
- CalComponentPrivate *priv;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- set_datetime (comp, &priv->dtend,
- icalproperty_new_dtend,
- icalproperty_set_dtend,
- dt);
-
- priv->need_sequence_inc = TRUE;
-}
-
-/**
- * cal_component_get_dtstamp:
- * @comp: A calendar component object.
- * @t: Return value for the date/timestamp.
- *
- * Queries the date/timestamp property of a calendar component object, which is
- * the last time at which the object was modified by a calendar user agent.
- **/
-void
-cal_component_get_dtstamp (CalComponent *comp, struct icaltimetype *t)
-{
- CalComponentPrivate *priv;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
- g_return_if_fail (t != NULL);
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- /* This MUST exist, since we ensured that it did */
- g_assert (priv->dtstamp != NULL);
-
- *t = icalproperty_get_dtstamp (priv->dtstamp);
-}
-
-/**
- * cal_component_set_dtstamp:
- * @comp: A calendar component object.
- * @t: Date/timestamp value.
- *
- * Sets the date/timestamp of a calendar component object. This should be
- * called whenever a calendar user agent makes a change to a component's
- * properties.
- **/
-void
-cal_component_set_dtstamp (CalComponent *comp, struct icaltimetype *t)
-{
- CalComponentPrivate *priv;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
- g_return_if_fail (t != NULL);
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- /* This MUST exist, since we ensured that it did */
- g_assert (priv->dtstamp != NULL);
-
- icalproperty_set_dtstamp (priv->dtstamp, *t);
-}
-
-/**
- * cal_component_get_dtstart:
- * @comp: A calendar component object.
- * @dt: Return value for the date/time start. This should be freed with the
- * cal_component_free_datetime() function.
- *
- * Queries the date/time start of a calendar component object.
- **/
-void
-cal_component_get_dtstart (CalComponent *comp, CalComponentDateTime *dt)
-{
- CalComponentPrivate *priv;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
- g_return_if_fail (dt != NULL);
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- get_datetime (&priv->dtstart, icalproperty_get_dtstart, dt);
-}
-
-/**
- * cal_component_set_dtstart:
- * @comp: A calendar component object.
- * @dt: Start date/time.
- *
- * Sets the date/time start property of a calendar component object.
- **/
-void
-cal_component_set_dtstart (CalComponent *comp, CalComponentDateTime *dt)
-{
- CalComponentPrivate *priv;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- set_datetime (comp, &priv->dtstart,
- icalproperty_new_dtstart,
- icalproperty_set_dtstart,
- dt);
-
- priv->need_sequence_inc = TRUE;
-}
-
-/**
- * cal_component_get_due:
- * @comp: A calendar component object.
- * @dt: Return value for the due date/time. This should be freed with the
- * cal_component_free_datetime() function.
- *
- * Queries the due date/time of a calendar component object.
- **/
-void
-cal_component_get_due (CalComponent *comp, CalComponentDateTime *dt)
-{
- CalComponentPrivate *priv;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
- g_return_if_fail (dt != NULL);
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- get_datetime (&priv->due, icalproperty_get_due, dt);
-}
-
-/**
- * cal_component_set_due:
- * @comp: A calendar component object.
- * @dt: End date/time.
- *
- * Sets the due date/time property of a calendar component object.
- **/
-void
-cal_component_set_due (CalComponent *comp, CalComponentDateTime *dt)
-{
- CalComponentPrivate *priv;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- set_datetime (comp, &priv->due,
- icalproperty_new_due,
- icalproperty_set_due,
- dt);
-
- priv->need_sequence_inc = TRUE;
-}
-
-/* Builds a list of CalComponentPeriod structures based on a list of icalproperties */
-static void
-get_period_list (GSList *period_list,
- struct icaldatetimeperiodtype (* get_prop_func) (icalproperty *prop),
- GSList **list)
-{
- GSList *l;
-
- *list = NULL;
-
- if (!period_list)
- return;
-
- for (l = period_list; l; l = l->next) {
- struct period *period;
- CalComponentPeriod *p;
- struct icaldatetimeperiodtype ip;
-
- period = l->data;
- g_assert (period->prop != NULL);
-
- p = g_new (CalComponentPeriod, 1);
-
- /* Get value parameter */
-
- if (period->value_param) {
- icalparameter_value value_type;
-
- value_type = icalparameter_get_value (period->value_param);
-
- if (value_type == ICAL_VALUE_DATE || value_type == ICAL_VALUE_DATETIME)
- p->type = CAL_COMPONENT_PERIOD_DATETIME;
- else if (value_type == ICAL_VALUE_DURATION)
- p->type = CAL_COMPONENT_PERIOD_DURATION;
- else {
- g_message ("get_period_list(): Unknown value for period %d; "
- "using DATETIME", value_type);
- p->type = CAL_COMPONENT_PERIOD_DATETIME;
- }
- } else
- p->type = CAL_COMPONENT_PERIOD_DATETIME;
-
- /* Get start and end/duration */
-
- ip = (* get_prop_func) (period->prop);
-
- p->start = ip.period.start;
-
- if (p->type == CAL_COMPONENT_PERIOD_DATETIME)
- p->u.end = ip.period.end;
- else if (p->type == CAL_COMPONENT_PERIOD_DURATION)
- p->u.duration = ip.period.duration;
- else
- g_assert_not_reached ();
-
- /* Put in list */
-
- *list = g_slist_prepend (*list, p);
- }
-
- *list = g_slist_reverse (*list);
-}
-
-/* Sets a period list value */
-static void
-set_period_list (CalComponent *comp,
- icalproperty *(* new_prop_func) (struct icaldatetimeperiodtype period),
- GSList **period_list,
- GSList *pl)
-{
- CalComponentPrivate *priv;
- GSList *l;
-
- priv = comp->priv;
-
- /* Remove old periods */
-
- for (l = *period_list; l; l = l->next) {
- struct period *period;
-
- period = l->data;
- g_assert (period->prop != NULL);
-
- icalcomponent_remove_property (priv->icalcomp, period->prop);
- icalproperty_free (period->prop);
- g_free (period);
- }
-
- g_slist_free (*period_list);
- *period_list = NULL;
-
- /* Add in new periods */
-
- for (l = pl; l; l = l->next) {
- CalComponentPeriod *p;
- struct period *period;
- struct icaldatetimeperiodtype ip;
- icalparameter_value value_type;
-
- g_assert (l->data != NULL);
- p = l->data;
-
- /* Create libical value */
-
- ip.period.start = p->start;
-
- if (p->type == CAL_COMPONENT_PERIOD_DATETIME) {
- value_type = ICAL_VALUE_DATETIME;
- ip.period.end = p->u.end;
- } else if (p->type == CAL_COMPONENT_PERIOD_DURATION) {
- value_type = ICAL_VALUE_DURATION;
- ip.period.duration = p->u.duration;
- } else {
- g_assert_not_reached ();
- return;
- }
-
- /* Create property */
-
- period = g_new (struct period, 1);
-
- period->prop = (* new_prop_func) (ip);
- period->value_param = icalparameter_new_value (value_type);
- icalproperty_add_parameter (period->prop, period->value_param);
-
- /* Add to list */
-
- *period_list = g_slist_prepend (*period_list, period);
- }
-
- *period_list = g_slist_reverse (*period_list);
-}
-
-/**
- * cal_component_get_exdate_list:
- * @comp: A calendar component object.
- * @exdate_list: Return value for the list of exception dates, as a list of
- * #CalComponentDateTime structures. This should be freed using the
- * cal_component_free_exdate_list() function.
- *
- * Queries the list of exception date properties in a calendar component object.
- **/
-void
-cal_component_get_exdate_list (CalComponent *comp, GSList **exdate_list)
-{
- CalComponentPrivate *priv;
- GSList *l;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
- g_return_if_fail (exdate_list != NULL);
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- *exdate_list = NULL;
-
- for (l = priv->exdate_list; l; l = l->next) {
- struct datetime *dt;
- CalComponentDateTime *cdt;
-
- dt = l->data;
-
- cdt = g_new (CalComponentDateTime, 1);
- cdt->value = g_new (struct icaltimetype, 1);
-
- *cdt->value = icalproperty_get_exdate (dt->prop);
-
- if (dt->tzid_param)
- cdt->tzid = icalparameter_get_tzid (dt->tzid_param);
- else
- cdt->tzid = NULL;
-
- *exdate_list = g_slist_prepend (*exdate_list, cdt);
- }
-
- *exdate_list = g_slist_reverse (*exdate_list);
-}
-
-/**
- * cal_component_set_exdate_list:
- * @comp: A calendar component object.
- * @exdate_list: List of #CalComponentDateTime structures.
- *
- * Sets the list of exception dates in a calendar component object.
- **/
-void
-cal_component_set_exdate_list (CalComponent *comp, GSList *exdate_list)
-{
- CalComponentPrivate *priv;
- GSList *l;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- /* Remove old exception dates */
-
- for (l = priv->exdate_list; l; l = l->next) {
- struct datetime *dt;
-
- dt = l->data;
-
- icalcomponent_remove_property (priv->icalcomp, dt->prop);
- icalproperty_free (dt->prop);
- g_free (dt);
- }
-
- g_slist_free (priv->exdate_list);
- priv->exdate_list = NULL;
-
- /* Add in new exception dates */
-
- for (l = exdate_list; l; l = l->next) {
- CalComponentDateTime *cdt;
- struct datetime *dt;
-
- g_assert (l->data != NULL);
- cdt = l->data;
-
- g_assert (cdt->value != NULL);
-
- dt = g_new (struct datetime, 1);
- dt->prop = icalproperty_new_exdate (*cdt->value);
-
- if (cdt->tzid) {
- dt->tzid_param = icalparameter_new_tzid ((char *) cdt->tzid);
- icalproperty_add_parameter (dt->prop, dt->tzid_param);
- } else
- dt->tzid_param = NULL;
-
- icalcomponent_add_property (priv->icalcomp, dt->prop);
- priv->exdate_list = g_slist_prepend (priv->exdate_list, dt);
- }
-
- priv->exdate_list = g_slist_reverse (priv->exdate_list);
-
- priv->need_sequence_inc = TRUE;
-}
-
-/**
- * cal_component_has_exdates:
- * @comp: A calendar component object.
- *
- * Queries whether a calendar component object has any exception dates defined
- * for it.
- *
- * Return value: TRUE if the component has exception dates, FALSE otherwise.
- **/
-gboolean
-cal_component_has_exdates (CalComponent *comp)
-{
- CalComponentPrivate *priv;
-
- g_return_val_if_fail (comp != NULL, FALSE);
- g_return_val_if_fail (IS_CAL_COMPONENT (comp), FALSE);
-
- priv = comp->priv;
- g_return_val_if_fail (priv->icalcomp != NULL, FALSE);
-
- return (priv->exdate_list != NULL);
-}
-
-/* Gets a list of recurrence rules */
-static void
-get_recur_list (GSList *recur_list,
- struct icalrecurrencetype (* get_prop_func) (icalproperty *prop),
- GSList **list)
-{
- GSList *l;
-
- *list = NULL;
-
- for (l = recur_list; l; l = l->next) {
- icalproperty *prop;
- struct icalrecurrencetype *r;
-
- prop = l->data;
-
- r = g_new (struct icalrecurrencetype, 1);
- *r = (* get_prop_func) (prop);
-
- *list = g_slist_prepend (*list, r);
- }
-
- *list = g_slist_reverse (*list);
-}
-
-/* Sets a list of recurrence rules */
-static void
-set_recur_list (CalComponent *comp,
- icalproperty *(* new_prop_func) (struct icalrecurrencetype recur),
- GSList **recur_list,
- GSList *rl)
-{
- CalComponentPrivate *priv;
- GSList *l;
-
- priv = comp->priv;
-
- /* Remove old recurrences */
-
- for (l = *recur_list; l; l = l->next) {
- icalproperty *prop;
-
- prop = l->data;
- icalcomponent_remove_property (priv->icalcomp, prop);
- icalproperty_free (prop);
- }
-
- g_slist_free (*recur_list);
- *recur_list = NULL;
-
- /* Add in new recurrences */
-
- for (l = rl; l; l = l->next) {
- icalproperty *prop;
- struct icalrecurrencetype *recur;
-
- g_assert (l->data != NULL);
- recur = l->data;
-
- prop = (* new_prop_func) (*recur);
- icalcomponent_add_property (priv->icalcomp, prop);
-
- *recur_list = g_slist_prepend (*recur_list, prop);
- }
-
- *recur_list = g_slist_reverse (*recur_list);
-}
-
-/**
- * cal_component_get_exrule_list:
- * @comp: A calendar component object.
- * @recur_list: List of exception rules as struct #icalrecurrencetype
- * structures. This should be freed using the cal_component_free_recur_list()
- * function.
- *
- * Queries the list of exception rule properties of a calendar component
- * object.
- **/
-void
-cal_component_get_exrule_list (CalComponent *comp, GSList **recur_list)
-{
- CalComponentPrivate *priv;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
- g_return_if_fail (recur_list != NULL);
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- get_recur_list (priv->exrule_list, icalproperty_get_exrule, recur_list);
-}
-
-/**
- * cal_component_get_exrule_property_list:
- * @comp: A calendar component object.
- * @recur_list: Returns a list of exception rule properties.
- *
- * Queries the list of exception rule properties of a calendar component object.
- **/
-void
-cal_component_get_exrule_property_list (CalComponent *comp, GSList **recur_list)
-{
- CalComponentPrivate *priv;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
- g_return_if_fail (recur_list != NULL);
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- *recur_list = priv->exrule_list;
-}
-
-/**
- * cal_component_set_exrule_list:
- * @comp: A calendar component object.
- * @recur_list: List of struct #icalrecurrencetype structures.
- *
- * Sets the list of exception rules in a calendar component object.
- **/
-void
-cal_component_set_exrule_list (CalComponent *comp, GSList *recur_list)
-{
- CalComponentPrivate *priv;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- set_recur_list (comp, icalproperty_new_exrule, &priv->exrule_list, recur_list);
-
- priv->need_sequence_inc = TRUE;
-}
-
-/**
- * cal_component_has_exrules:
- * @comp: A calendar component object.
- *
- * Queries whether a calendar component object has any exception rules defined
- * for it.
- *
- * Return value: TRUE if the component has exception rules, FALSE otherwise.
- **/
-gboolean
-cal_component_has_exrules (CalComponent *comp)
-{
- CalComponentPrivate *priv;
-
- g_return_val_if_fail (comp != NULL, FALSE);
- g_return_val_if_fail (IS_CAL_COMPONENT (comp), FALSE);
-
- priv = comp->priv;
- g_return_val_if_fail (priv->icalcomp != NULL, FALSE);
-
- return (priv->exrule_list != NULL);
-}
-
-/**
- * cal_component_has_exceptions:
- * @comp: A calendar component object
- *
- * Queries whether a calendar component object has any exception dates
- * or exception rules.
- *
- * Return value: TRUE if the component has exceptions, FALSE otherwise.
- **/
-gboolean
-cal_component_has_exceptions (CalComponent *comp)
-{
- return cal_component_has_exdates (comp) || cal_component_has_exrules (comp);
-}
-
-/**
- * cal_component_get_geo:
- * @comp: A calendar component object.
- * @geo: Return value for the geographic position property. This should be
- * freed using the cal_component_free_geo() function.
- *
- * Sets the geographic position property of a calendar component object.
- **/
-void
-cal_component_get_geo (CalComponent *comp, struct icalgeotype **geo)
-{
- CalComponentPrivate *priv;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
- g_return_if_fail (geo != NULL);
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- if (priv->geo) {
- *geo = g_new (struct icalgeotype, 1);
- **geo = icalproperty_get_geo (priv->geo);
- } else
- *geo = NULL;
-}
-
-/**
- * cal_component_set_geo:
- * @comp: A calendar component object.
- * @geo: Value for the geographic position property.
- *
- * Sets the geographic position property on a calendar component object.
- **/
-void
-cal_component_set_geo (CalComponent *comp, struct icalgeotype *geo)
-{
- CalComponentPrivate *priv;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- if (!geo) {
- if (priv->geo) {
- icalcomponent_remove_property (priv->icalcomp, priv->geo);
- icalproperty_free (priv->geo);
- priv->geo = NULL;
- }
-
- return;
- }
-
- if (priv->geo)
- icalproperty_set_geo (priv->geo, *geo);
- else {
- priv->geo = icalproperty_new_geo (*geo);
- icalcomponent_add_property (priv->icalcomp, priv->geo);
- }
-}
-
-/**
- * cal_component_get_last_modified:
- * @comp: A calendar component object.
- * @t: Return value for the last modified time value.
- *
- * Queries the time at which a calendar component object was last modified in
- * the calendar store.
- **/
-void
-cal_component_get_last_modified (CalComponent *comp, struct icaltimetype **t)
-{
- CalComponentPrivate *priv;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
- g_return_if_fail (t != NULL);
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- get_icaltimetype (priv->last_modified, icalproperty_get_lastmodified, t);
-}
-
-/**
- * cal_component_set_last_modified:
- * @comp: A calendar component object.
- * @t: Value for the last time modified.
- *
- * Sets the time at which a calendar component object was last stored in the
- * calendar store. This should not be called by plain calendar user agents.
- **/
-void
-cal_component_set_last_modified (CalComponent *comp, struct icaltimetype *t)
-{
- CalComponentPrivate *priv;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- set_icaltimetype (comp, &priv->last_modified,
- icalproperty_new_lastmodified,
- icalproperty_set_lastmodified,
- t);
-}
-
-/**
- * cal_component_get_percent:
- * @comp: A calendar component object.
- * @percent: Return value for the percent-complete property. This should be
- * freed using the cal_component_free_percent() function.
- *
- * Queries the percent-complete property of a calendar component object.
- **/
-void
-cal_component_get_percent (CalComponent *comp, int **percent)
-{
- CalComponentPrivate *priv;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
- g_return_if_fail (percent != NULL);
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- if (priv->percent) {
- *percent = g_new (int, 1);
- **percent = icalproperty_get_percentcomplete (priv->percent);
- } else
- *percent = NULL;
-}
-
-/**
- * cal_component_set_percent:
- * @comp: A calendar component object.
- * @percent: Value for the percent-complete property.
- *
- * Sets the percent-complete property of a calendar component object.
- **/
-void
-cal_component_set_percent (CalComponent *comp, int *percent)
-{
- CalComponentPrivate *priv;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- if (!percent) {
- if (priv->percent) {
- icalcomponent_remove_property (priv->icalcomp, priv->percent);
- icalproperty_free (priv->percent);
- priv->percent = NULL;
- }
-
- return;
- }
-
- g_return_if_fail (*percent >= 0 && *percent <= 100);
-
- if (priv->percent)
- icalproperty_set_percentcomplete (priv->percent, *percent);
- else {
- priv->percent = icalproperty_new_percentcomplete (*percent);
- icalcomponent_add_property (priv->icalcomp, priv->percent);
- }
-}
-
-/**
- * cal_component_get_priority:
- * @comp: A calendar component object.
- * @priority: Return value for the priority property. This should be freed using
- * the cal_component_free_priority() function.
- *
- * Queries the priority property of a calendar component object.
- **/
-void
-cal_component_get_priority (CalComponent *comp, int **priority)
-{
- CalComponentPrivate *priv;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
- g_return_if_fail (priority != NULL);
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- if (priv->priority) {
- *priority = g_new (int, 1);
- **priority = icalproperty_get_priority (priv->priority);
- } else
- *priority = NULL;
-}
-
-/**
- * cal_component_set_priority:
- * @comp: A calendar component object.
- * @priority: Value for the priority property.
- *
- * Sets the priority property of a calendar component object.
- **/
-void
-cal_component_set_priority (CalComponent *comp, int *priority)
-{
- CalComponentPrivate *priv;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- if (!priority) {
- if (priv->priority) {
- icalcomponent_remove_property (priv->icalcomp, priv->priority);
- icalproperty_free (priv->priority);
- priv->priority = NULL;
- }
-
- return;
- }
-
- g_return_if_fail (*priority >= 0 && *priority <= 9);
-
- if (priv->priority)
- icalproperty_set_priority (priv->priority, *priority);
- else {
- priv->priority = icalproperty_new_priority (*priority);
- icalcomponent_add_property (priv->icalcomp, priv->priority);
- }
-}
-
-/**
- * cal_component_get_rdate_list:
- * @comp: A calendar component object.
- * @period_list: Return value for the list of recurrence dates, as a list of
- * #CalComponentPeriod structures. This should be freed using the
- * cal_component_free_period_list() function.
- *
- * Queries the list of recurrence date properties in a calendar component
- * object.
- **/
-void
-cal_component_get_rdate_list (CalComponent *comp, GSList **period_list)
-{
- CalComponentPrivate *priv;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
- g_return_if_fail (period_list != NULL);
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- get_period_list (priv->rdate_list, icalproperty_get_rdate, period_list);
-}
-
-/**
- * cal_component_set_rdate_list:
- * @comp: A calendar component object.
- * @period_list: List of #CalComponentPeriod structures.
- *
- * Sets the list of recurrence dates in a calendar component object.
- **/
-void
-cal_component_set_rdate_list (CalComponent *comp, GSList *period_list)
-{
- CalComponentPrivate *priv;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- set_period_list (comp, icalproperty_new_rdate, &priv->rdate_list, period_list);
-
- priv->need_sequence_inc = TRUE;
-}
-
-/**
- * cal_component_has_rdates:
- * @comp: A calendar component object.
- *
- * Queries whether a calendar component object has any recurrence dates defined
- * for it.
- *
- * Return value: TRUE if the component has recurrence dates, FALSE otherwise.
- **/
-gboolean
-cal_component_has_rdates (CalComponent *comp)
-{
- CalComponentPrivate *priv;
-
- g_return_val_if_fail (comp != NULL, FALSE);
- g_return_val_if_fail (IS_CAL_COMPONENT (comp), FALSE);
-
- priv = comp->priv;
- g_return_val_if_fail (priv->icalcomp != NULL, FALSE);
-
- return (priv->rdate_list != NULL);
-}
-
-/**
- * cal_component_get_rrule_list:
- * @comp: A calendar component object.
- * @recur_list: List of recurrence rules as struct #icalrecurrencetype
- * structures. This should be freed using the cal_component_free_recur_list()
- * function.
- *
- * Queries the list of recurrence rule properties of a calendar component
- * object.
- **/
-void
-cal_component_get_rrule_list (CalComponent *comp, GSList **recur_list)
-{
- CalComponentPrivate *priv;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
- g_return_if_fail (recur_list != NULL);
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- get_recur_list (priv->rrule_list, icalproperty_get_rrule, recur_list);
-}
-
-/**
- * cal_component_get_rrule_property_list:
- * @comp: A calendar component object.
- * @recur_list: Returns a list of recurrence rule properties.
- *
- * Queries a list of recurrence rule properties of a calendar component object.
- **/
-void
-cal_component_get_rrule_property_list (CalComponent *comp, GSList **recur_list)
-{
- CalComponentPrivate *priv;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
- g_return_if_fail (recur_list != NULL);
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- *recur_list = priv->rrule_list;
-}
-
-/**
- * cal_component_set_rrule_list:
- * @comp: A calendar component object.
- * @recur_list: List of struct #icalrecurrencetype structures.
- *
- * Sets the list of recurrence rules in a calendar component object.
- **/
-void
-cal_component_set_rrule_list (CalComponent *comp, GSList *recur_list)
-{
- CalComponentPrivate *priv;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- set_recur_list (comp, icalproperty_new_rrule, &priv->rrule_list, recur_list);
-
- priv->need_sequence_inc = TRUE;
-}
-
-/**
- * cal_component_has_rrules:
- * @comp: A calendar component object.
- *
- * Queries whether a calendar component object has any recurrence rules defined
- * for it.
- *
- * Return value: TRUE if the component has recurrence rules, FALSE otherwise.
- **/
-gboolean
-cal_component_has_rrules (CalComponent *comp)
-{
- CalComponentPrivate *priv;
-
- g_return_val_if_fail (comp != NULL, FALSE);
- g_return_val_if_fail (IS_CAL_COMPONENT (comp), FALSE);
-
- priv = comp->priv;
- g_return_val_if_fail (priv->icalcomp != NULL, FALSE);
-
- return (priv->rrule_list != NULL);
-}
-
-/**
- * cal_component_has_recurrences:
- * @comp: A calendar component object
- *
- * Queries whether a calendar component object has any recurrence dates or
- * recurrence rules.
- *
- * Return value: TRUE if the component has recurrences, FALSE otherwise.
- **/
-gboolean
-cal_component_has_recurrences (CalComponent *comp)
-{
- return cal_component_has_rdates (comp) || cal_component_has_rrules (comp);
-}
-
-/**
- * cal_component_get_sequence:
- * @comp: A calendar component object.
- * @sequence: Return value for the sequence number. This should be freed using
- * cal_component_free_sequence().
- *
- * Queries the sequence number of a calendar component object.
- **/
-void
-cal_component_get_sequence (CalComponent *comp, int **sequence)
-{
- CalComponentPrivate *priv;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
- g_return_if_fail (sequence != NULL);
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- if (!priv->sequence) {
- *sequence = NULL;
- return;
- }
-
- *sequence = g_new (int, 1);
- **sequence = icalproperty_get_sequence (priv->sequence);
-}
-
-/**
- * cal_component_set_sequence:
- * @comp: A calendar component object.
- * @sequence: Sequence number value.
- *
- * Sets the sequence number of a calendar component object. Normally this
- * function should not be called, since the sequence number is incremented
- * automatically at the proper times.
- **/
-void
-cal_component_set_sequence (CalComponent *comp, int *sequence)
-{
- CalComponentPrivate *priv;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- priv->need_sequence_inc = FALSE;
-
- if (!sequence) {
- if (priv->sequence) {
- icalcomponent_remove_property (priv->icalcomp, priv->sequence);
- icalproperty_free (priv->sequence);
- priv->sequence = NULL;
- }
-
- return;
- }
-
- if (priv->sequence)
- icalproperty_set_sequence (priv->sequence, *sequence);
- else {
- priv->sequence = icalproperty_new_sequence (*sequence);
- icalcomponent_add_property (priv->icalcomp, priv->sequence);
- }
-}
-
-/**
- * cal_component_get_status:
- * @comp: A calendar component object.
- * @status: Return value for the status value. It is set to #ICAL_STATUS_NONE
- * if the component has no status property.
- *
- * Queries the status property of a calendar component object.
- **/
-void
-cal_component_get_status (CalComponent *comp, icalproperty_status *status)
-{
- CalComponentPrivate *priv;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
- g_return_if_fail (status != NULL);
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- if (!priv->status) {
- *status = ICAL_STATUS_NONE;
- return;
- }
-
- *status = icalproperty_get_status (priv->status);
-}
-
-/**
- * cal_component_set_status:
- * @comp: A calendar component object.
- * @status: Status value. You should use #ICAL_STATUS_NONE if you want to unset
- * this property.
- *
- * Sets the status property of a calendar component object.
- **/
-void
-cal_component_set_status (CalComponent *comp, icalproperty_status status)
-{
- CalComponentPrivate *priv;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- priv->need_sequence_inc = TRUE;
-
- if (status == ICAL_STATUS_NONE) {
- if (priv->status) {
- icalcomponent_remove_property (priv->icalcomp, priv->status);
- icalproperty_free (priv->status);
- priv->status = NULL;
- }
-
- return;
- }
-
- if (priv->status) {
- icalproperty_set_status (priv->status, status);
- } else {
- priv->status = icalproperty_new_status (status);
- icalcomponent_add_property (priv->icalcomp, priv->status);
- }
-}
-
-/**
- * cal_component_get_summary:
- * @comp: A calendar component object.
- * @summary: Return value for the summary property and its parameters.
- *
- * Queries the summary of a calendar component object.
- **/
-void
-cal_component_get_summary (CalComponent *comp, CalComponentText *summary)
-{
- CalComponentPrivate *priv;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
- g_return_if_fail (summary != NULL);
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- if (priv->summary.prop)
- summary->value = icalproperty_get_summary (priv->summary.prop);
- else
- summary->value = NULL;
-
- if (priv->summary.altrep_param)
- summary->altrep = icalparameter_get_altrep (priv->summary.altrep_param);
- else
- summary->altrep = NULL;
-}
-
-/**
- * cal_component_set_summary:
- * @comp: A calendar component object.
- * @summary: Summary property and its parameters.
- *
- * Sets the summary of a calendar component object.
- **/
-void
-cal_component_set_summary (CalComponent *comp, CalComponentText *summary)
-{
- CalComponentPrivate *priv;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- if (!summary) {
- if (priv->summary.prop) {
- icalcomponent_remove_property (priv->icalcomp, priv->summary.prop);
- icalproperty_free (priv->summary.prop);
-
- priv->summary.prop = NULL;
- priv->summary.altrep_param = NULL;
- }
-
- return;
- }
-
- g_return_if_fail (summary->value != NULL);
-
- if (priv->summary.prop)
- icalproperty_set_summary (priv->summary.prop, (char *) summary->value);
- else {
- priv->summary.prop = icalproperty_new_summary ((char *) summary->value);
- icalcomponent_add_property (priv->icalcomp, priv->summary.prop);
- }
-
- if (summary->altrep) {
- g_assert (priv->summary.prop != NULL);
-
- if (priv->summary.altrep_param)
- icalparameter_set_altrep (priv->summary.altrep_param,
- (char *) summary->altrep);
- else {
- priv->summary.altrep_param = icalparameter_new_altrep (
- (char *) summary->altrep);
- icalproperty_add_parameter (priv->summary.prop,
- priv->summary.altrep_param);
- }
- } else if (priv->summary.altrep_param) {
- icalproperty_remove_parameter (priv->summary.prop, ICAL_ALTREP_PARAMETER);
- icalparameter_free (priv->summary.altrep_param);
- priv->summary.altrep_param = NULL;
- }
-}
-
-/**
- * cal_component_get_transparency:
- * @comp: A calendar component object.
- * @transp: Return value for the time transparency.
- *
- * Queries the time transparency of a calendar component object.
- **/
-void
-cal_component_get_transparency (CalComponent *comp, CalComponentTransparency *transp)
-{
- CalComponentPrivate *priv;
- const char *val;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
- g_return_if_fail (transp != NULL);
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- if (!priv->transparency) {
- *transp = CAL_COMPONENT_TRANSP_NONE;
- return;
- }
-
- val = icalproperty_get_transp (priv->transparency);
-
- if (strcasecmp (val, "TRANSPARENT") == 0)
- *transp = CAL_COMPONENT_TRANSP_TRANSPARENT;
- else if (strcasecmp (val, "OPAQUE") == 0)
- *transp = CAL_COMPONENT_TRANSP_OPAQUE;
- else
- *transp = CAL_COMPONENT_TRANSP_UNKNOWN;
-}
-
-/**
- * cal_component_set_transparency:
- * @comp: A calendar component object.
- * @transp: Time transparency value.
- *
- * Sets the time transparency of a calendar component object.
- **/
-void
-cal_component_set_transparency (CalComponent *comp, CalComponentTransparency transp)
-{
- CalComponentPrivate *priv;
- char *str;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
- g_return_if_fail (transp != CAL_COMPONENT_TRANSP_UNKNOWN);
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
-
- if (transp == CAL_COMPONENT_TRANSP_NONE) {
- if (priv->transparency) {
- icalcomponent_remove_property (priv->icalcomp, priv->transparency);
- icalproperty_free (priv->transparency);
- priv->transparency = NULL;
- }
-
- return;
- }
-
- switch (transp) {
- case CAL_COMPONENT_TRANSP_TRANSPARENT:
- str = "TRANSPARENT";
- break;
-
- case CAL_COMPONENT_TRANSP_OPAQUE:
- str = "OPAQUE";
- break;
-
- default:
- g_assert_not_reached ();
- str = NULL;
- }
-
- if (priv->transparency)
- icalproperty_set_transp (priv->transparency, str);
- else {
- priv->transparency = icalproperty_new_transp (str);
- icalcomponent_add_property (priv->icalcomp, priv->transparency);
- }
-}
-
-/**
- * cal_component_get_url:
- * @comp: A calendar component object.
- * @url: Return value for the URL.
- *
- * Queries the uniform resource locator property of a calendar component object.
- **/
-void
-cal_component_get_url (CalComponent *comp, const char **url)
-{
- CalComponentPrivate *priv;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
- g_return_if_fail (url != NULL);
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- if (priv->url)
- *url = icalproperty_get_url (priv->url);
- else
- *url = NULL;
-}
-
-/**
- * cal_component_set_url:
- * @comp: A calendar component object.
- * @url: URL value.
- *
- * Sets the uniform resource locator property of a calendar component object.
- **/
-void
-cal_component_set_url (CalComponent *comp, const char *url)
-{
- CalComponentPrivate *priv;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
-
- priv = comp->priv;
- g_return_if_fail (priv->icalcomp != NULL);
-
- if (!url || !(*url)) {
- if (priv->url) {
- icalcomponent_remove_property (priv->icalcomp, priv->url);
- icalproperty_free (priv->url);
- priv->url = NULL;
- }
-
- return;
- }
-
- if (priv->url)
- icalproperty_set_url (priv->url, (char *) url);
- else {
- priv->url = icalproperty_new_url ((char *) url);
- icalcomponent_add_property (priv->icalcomp, priv->url);
- }
-}
-
-
-
-/**
- * cal_component_free_categories_list:
- * @categ_list: List of category strings.
- *
- * Frees a list of category strings.
- **/
-void
-cal_component_free_categories_list (GSList *categ_list)
-{
- GSList *l;
-
- for (l = categ_list; l; l = l->next)
- g_free (l->data);
-
- g_slist_free (categ_list);
-}
-
-/**
- * cal_component_free_datetime:
- * @dt: A date/time structure.
- *
- * Frees a date/time structure.
- **/
-void
-cal_component_free_datetime (CalComponentDateTime *dt)
-{
- g_return_if_fail (dt != NULL);
-
- if (dt->value)
- g_free (dt->value);
-}
-
-/**
- * cal_component_free_exdate_list:
- * @exdate_list: List of #CalComponentDateTime structures.
- *
- * Frees a list of #CalComponentDateTime structures as returned by the
- * cal_component_get_exdate_list() function.
- **/
-void
-cal_component_free_exdate_list (GSList *exdate_list)
-{
- GSList *l;
-
- for (l = exdate_list; l; l = l->next) {
- CalComponentDateTime *cdt;
-
- g_assert (l->data != NULL);
- cdt = l->data;
-
- g_assert (cdt->value != NULL);
- g_free (cdt->value);
-
- g_free (cdt);
- }
-
- g_slist_free (exdate_list);
-}
-
-/**
- * cal_component_free_geo:
- * @geo: An #icalgeotype structure.
- *
- * Frees a struct #icalgeotype structure as returned by the calendar component
- * functions.
- **/
-void
-cal_component_free_geo (struct icalgeotype *geo)
-{
- g_return_if_fail (geo != NULL);
-
- g_free (geo);
-}
-
-/**
- * cal_component_free_icaltimetype:
- * @t: An #icaltimetype structure.
- *
- * Frees a struct #icaltimetype value as returned by the calendar component
- * functions.
- **/
-void
-cal_component_free_icaltimetype (struct icaltimetype *t)
-{
- g_return_if_fail (t != NULL);
-
- g_free (t);
-}
-
-/**
- * cal_component_free_percent:
- * @percent: Percent value.
- *
- * Frees a percent value as returned by the cal_component_get_percent()
- * function.
- **/
-void
-cal_component_free_percent (int *percent)
-{
- g_return_if_fail (percent != NULL);
-
- g_free (percent);
-}
-
-/**
- * cal_component_free_priority:
- * @priority: Priority value.
- *
- * Frees a priority value as returned by the cal_component_get_priority()
- * function.
- **/
-void
-cal_component_free_priority (int *priority)
-{
- g_return_if_fail (priority != NULL);
-
- g_free (priority);
-}
-
-/**
- * cal_component_free_period_list:
- * @period_list: List of #CalComponentPeriod structures.
- *
- * Frees a list of #CalComponentPeriod structures.
- **/
-void
-cal_component_free_period_list (GSList *period_list)
-{
- GSList *l;
-
- for (l = period_list; l; l = l->next) {
- CalComponentPeriod *period;
-
- g_assert (l->data != NULL);
-
- period = l->data;
- g_free (period);
- }
-
- g_slist_free (period_list);
-}
-
-/**
- * cal_component_free_recur_list:
- * @recur_list: List of struct #icalrecurrencetype structures.
- *
- * Frees a list of struct #icalrecurrencetype structures.
- **/
-void
-cal_component_free_recur_list (GSList *recur_list)
-{
- GSList *l;
-
- for (l = recur_list; l; l = l->next) {
- struct icalrecurrencetype *r;
-
- g_assert (l->data != NULL);
- r = l->data;
-
- g_free (r);
- }
-
- g_slist_free (recur_list);
-}
-
-/**
- * cal_component_free_sequence:
- * @sequence: Sequence number value.
- *
- * Frees a sequence number value.
- **/
-void
-cal_component_free_sequence (int *sequence)
-{
- g_return_if_fail (sequence != NULL);
-
- g_free (sequence);
-}
-
-/**
- * cal_component_free_text_list:
- * @text_list: List of #CalComponentText structures.
- *
- * Frees a list of #CalComponentText structures. This function should only be
- * used to free lists of text values as returned by the other getter functions
- * of #CalComponent.
- **/
-void
-cal_component_free_text_list (GSList *text_list)
-{
- GSList *l;
-
- for (l = text_list; l; l = l->next) {
- CalComponentText *text;
-
- g_assert (l->data != NULL);
-
- text = l->data;
- g_return_if_fail (text != NULL);
- g_free (text);
- }
-
- g_slist_free (text_list);
-}
-
-
-
-/**
- * cal_component_has_alarms:
- * @comp: A calendar component object.
- *
- * Checks whether the component has any alarms.
- *
- * Return value: TRUE if the component has any alarms.
- **/
-gboolean
-cal_component_has_alarms (CalComponent *comp)
-{
- CalComponentPrivate *priv;
-
- g_return_val_if_fail (comp != NULL, FALSE);
- g_return_val_if_fail (IS_CAL_COMPONENT (comp), FALSE);
-
- priv = comp->priv;
- g_return_val_if_fail (priv->icalcomp != NULL, FALSE);
-
- return g_hash_table_size (priv->alarm_uid_hash) != 0;
-}
-
-void
-cal_component_add_alarm (CalComponent *comp, CalComponentAlarm *alarm)
-{
- CalComponentPrivate *priv;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
- g_return_if_fail (alarm != NULL);
-
- priv = comp->priv;
-
- alarm->parent = comp;
- add_alarm (comp, alarm->icalcomp, icalproperty_get_x (alarm->uid));
- icalcomponent_add_component (priv->icalcomp, alarm->icalcomp);
-}
-
-void
-cal_component_remove_alarm (CalComponent *comp, const char *auid)
-{
- CalComponentPrivate *priv;
- icalcompiter iter;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
- g_return_if_fail (auid != NULL);
-
- priv = comp->priv;
-
- for (iter = icalcomponent_begin_component (priv->icalcomp, ICAL_VALARM_COMPONENT);
- icalcompiter_deref (&iter) != NULL;
- icalcompiter_next (&iter)) {
- icalproperty *prop;
- icalcomponent *subcomp;
-
- subcomp = icalcompiter_deref (&iter);
- for (prop = icalcomponent_get_first_property (subcomp, ICAL_X_PROPERTY);
- prop;
- prop = icalcomponent_get_next_property (subcomp, ICAL_X_PROPERTY)) {
- const char *xname;
- const char *alarm_uid;
-
- xname = icalproperty_get_x_name (prop);
- g_assert (xname != NULL);
-
- if (strcmp (xname, EVOLUTION_ALARM_UID_PROPERTY) == 0) {
- alarm_uid = alarm_uid_from_prop (prop);
- if (strcmp (alarm_uid, auid) == 0) {
- remove_alarm (comp, auid);
- icalcomponent_remove_component (priv->icalcomp, subcomp);
- icalcomponent_free (subcomp);
- break;
- }
-
- return;
- }
- }
- }
-}
-
-
-/* Scans an icalproperty from a calendar component and adds its mapping to our
- * own alarm structure.
- */
-static void
-scan_alarm_property (CalComponentAlarm *alarm, icalproperty *prop)
-{
- icalproperty_kind kind;
- const char *xname;
-
- kind = icalproperty_isa (prop);
-
- switch (kind) {
- case ICAL_ACTION_PROPERTY:
- alarm->action = prop;
- break;
-
- case ICAL_TRIGGER_PROPERTY:
- alarm->trigger = prop;
- break;
-
- case ICAL_X_PROPERTY:
- xname = icalproperty_get_x_name (prop);
- g_assert (xname != NULL);
-
- if (strcmp (xname, EVOLUTION_ALARM_UID_PROPERTY) == 0)
- alarm->uid = prop;
-
- break;
-
- default:
- break;
- }
-}
-
-/* Creates a CalComponentAlarm from a libical alarm subcomponent */
-static CalComponentAlarm *
-make_alarm (CalComponent *comp, icalcomponent *subcomp)
-{
- CalComponentAlarm *alarm;
- icalproperty *prop;
-
- alarm = g_new (CalComponentAlarm, 1);
-
- alarm->parent = comp;
- alarm->icalcomp = subcomp;
- alarm->uid = NULL;
-
- for (prop = icalcomponent_get_first_property (subcomp, ICAL_ANY_PROPERTY);
- prop;
- prop = icalcomponent_get_next_property (subcomp, ICAL_ANY_PROPERTY))
- scan_alarm_property (alarm, prop);
-
- g_assert (alarm->uid != NULL);
-
- return alarm;
-}
-
-/* Used from g_hash_table_foreach(); adds an alarm UID to a list */
-static void
-add_alarm_uid (gpointer key, gpointer value, gpointer data)
-{
- const char *auid;
- GList **l;
-
- auid = key;
- l = data;
-
- *l = g_list_prepend (*l, g_strdup (auid));
-}
-
-/**
- * cal_component_get_alarm_uids:
- * @comp: A calendar component.
- *
- * Builds a list of the unique identifiers of the alarm subcomponents inside a
- * calendar component.
- *
- * Return value: List of unique identifiers for alarms. This should be freed
- * using cal_obj_uid_list_free().
- **/
-GList *
-cal_component_get_alarm_uids (CalComponent *comp)
-{
- CalComponentPrivate *priv;
- GList *l;
-
- g_return_val_if_fail (comp != NULL, NULL);
- g_return_val_if_fail (IS_CAL_COMPONENT (comp), NULL);
-
- priv = comp->priv;
- g_return_val_if_fail (priv->icalcomp != NULL, NULL);
-
- l = NULL;
- g_hash_table_foreach (priv->alarm_uid_hash, add_alarm_uid, &l);
-
- return l;
-}
-
-/**
- * cal_component_get_alarm:
- * @comp: A calendar component.
- * @auid: Unique identifier for the sought alarm subcomponent.
- *
- * Queries a particular alarm subcomponent of a calendar component.
- *
- * Return value: The alarm subcomponent that corresponds to the specified @auid,
- * or #NULL if no alarm exists with that UID. This should be freed using
- * cal_component_alarm_free().
- **/
-CalComponentAlarm *
-cal_component_get_alarm (CalComponent *comp, const char *auid)
-{
- CalComponentPrivate *priv;
- icalcomponent *alarm;
-
- g_return_val_if_fail (comp != NULL, NULL);
- g_return_val_if_fail (IS_CAL_COMPONENT (comp), NULL);
-
- priv = comp->priv;
- g_return_val_if_fail (priv->icalcomp != NULL, NULL);
-
- g_return_val_if_fail (auid != NULL, NULL);
-
- alarm = g_hash_table_lookup (priv->alarm_uid_hash, auid);
-
- if (alarm)
- return make_alarm (comp, alarm);
- else
- return NULL;
-}
-
-void
-cal_component_free_alarm_uids (GList *alarm_uids)
-{
- g_list_foreach (alarm_uids, (GFunc)g_free, NULL);
-}
-
-/**
- * cal_component_alarms_free:
- * @alarms: Component alarms structure.
- *
- * Frees a #CalComponentAlarms structure.
- **/
-void
-cal_component_alarms_free (CalComponentAlarms *alarms)
-{
- GSList *l;
-
- g_return_if_fail (alarms != NULL);
-
- g_assert (alarms->comp != NULL);
- gtk_object_unref (GTK_OBJECT (alarms->comp));
-
- for (l = alarms->alarms; l; l = l->next) {
- CalAlarmInstance *instance;
-
- instance = l->data;
- g_assert (instance != NULL);
- g_free (instance);
- }
-
- g_slist_free (alarms->alarms);
- g_free (alarms);
-}
-
-/**
- * cal_component_alarm_new:
- *
- *
- *
- * Return value: a new alarm component
- **/
-CalComponentAlarm *
-cal_component_alarm_new (void)
-{
- CalComponentAlarm *alarm = g_new0 (CalComponentAlarm, 1);
- char *new_auid ;
-
- alarm->icalcomp = icalcomponent_new (ICAL_VALARM_COMPONENT);
-
- new_auid = cal_component_gen_uid ();
- alarm->uid = icalproperty_new_x (new_auid);
- icalproperty_set_x_name (alarm->uid, EVOLUTION_ALARM_UID_PROPERTY);
- icalcomponent_add_property (alarm->icalcomp, alarm->uid);
- g_free (new_auid);
-
- return alarm;
-}
-
-/**
- * cal_component_alarm_get_uid:
- * @alarm: An alarm subcomponent.
- *
- * Queries the unique identifier of an alarm subcomponent.
- *
- * Return value: UID of the alarm.
- **/
-const char *
-cal_component_alarm_get_uid (CalComponentAlarm *alarm)
-{
- g_return_val_if_fail (alarm != NULL, NULL);
-
- return alarm_uid_from_prop (alarm->uid);
-}
-
-/**
- * cal_component_alarm_get_action:
- * @alarm: An alarm.
- * @action: Return value for the alarm's action type.
- *
- * Queries the action type of an alarm.
- **/
-void
-cal_component_alarm_get_action (CalComponentAlarm *alarm, CalAlarmAction *action)
-{
- const char *str;
-
- g_return_if_fail (alarm != NULL);
- g_return_if_fail (action != NULL);
-
- g_assert (alarm->icalcomp != NULL);
-
- if (!alarm->action) {
- *action = CAL_ALARM_NONE;
- return;
- }
-
- str = icalproperty_get_action (alarm->action);
-
- if (strcasecmp (str, "AUDIO") == 0)
- *action = CAL_ALARM_AUDIO;
- else if (strcasecmp (str, "DISPLAY") == 0)
- *action = CAL_ALARM_DISPLAY;
- else if (strcasecmp (str, "EMAIL") == 0)
- *action = CAL_ALARM_EMAIL;
- else if (strcasecmp (str, "PROCEDURE") == 0)
- *action = CAL_ALARM_PROCEDURE;
- else
- *action = CAL_ALARM_UNKNOWN;
-}
-
-/**
- * cal_component_alarm_set_action:
- * @alarm: An alarm.
- * @action: Action type.
- *
- * Sets the action type for an alarm.
- **/
-void
-cal_component_alarm_set_action (CalComponentAlarm *alarm, CalAlarmAction action)
-{
- char *str;
-
- g_return_if_fail (alarm != NULL);
- g_return_if_fail (action != CAL_ALARM_NONE);
- g_return_if_fail (action != CAL_ALARM_UNKNOWN);
-
- g_assert (alarm->icalcomp != NULL);
-
- switch (action) {
- case CAL_ALARM_AUDIO:
- str = "AUDIO";
- break;
-
- case CAL_ALARM_DISPLAY:
- str = "DISPLAY";
- break;
-
- case CAL_ALARM_EMAIL:
- str = "EMAIL";
- break;
-
- case CAL_ALARM_PROCEDURE:
- str = "PROCEDURE";
- break;
-
- default:
- g_assert_not_reached ();
- str = NULL;
- }
-
- if (alarm->action)
- icalproperty_set_action (alarm->action, str);
- else {
- alarm->action = icalproperty_new_action (str);
- icalcomponent_add_property (alarm->icalcomp, alarm->action);
- }
-}
-
-/**
- * cal_component_alarm_get_trigger:
- * @alarm: An alarm.
- * @trigger: Return value for the trigger time.
- *
- * Queries the trigger time for an alarm.
- **/
-void
-cal_component_alarm_get_trigger (CalComponentAlarm *alarm, CalAlarmTrigger *trigger)
-{
- icalparameter *param;
- struct icaltriggertype t;
- gboolean relative;
-
- g_return_if_fail (alarm != NULL);
- g_return_if_fail (trigger != NULL);
-
- g_assert (alarm->icalcomp != NULL);
-
- if (!alarm->trigger) {
- trigger->type = CAL_ALARM_TRIGGER_NONE;
- return;
- }
-
- /* Get trigger type */
-
- param = icalproperty_get_first_parameter (alarm->trigger, ICAL_VALUE_PARAMETER);
- if (param) {
- icalparameter_value value;
-
- value = icalparameter_get_value (param);
-
- switch (value) {
- case ICAL_VALUE_DURATION:
- relative = TRUE;
- break;
-
- case ICAL_VALUE_DATETIME:
- relative = FALSE;
- break;
-
- default:
- g_message ("cal_component_alarm_get_trigger(): Unknown value for trigger "
- "value %d; using RELATIVE", value);
-
- relative = TRUE;
- break;
- }
- } else
- relative = TRUE;
-
- /* Get trigger value and the RELATED parameter */
-
- t = icalproperty_get_trigger (alarm->trigger);
-
- if (relative) {
- trigger->u.rel_duration = t.duration;
-
- param = icalproperty_get_first_parameter (alarm->trigger, ICAL_RELATED_PARAMETER);
- if (param) {
- icalparameter_related rel;
-
- rel = icalparameter_get_related (param);
-
- switch (rel) {
- case ICAL_RELATED_START:
- trigger->type = CAL_ALARM_TRIGGER_RELATIVE_START;
- break;
-
- case ICAL_RELATED_END:
- trigger->type = CAL_ALARM_TRIGGER_RELATIVE_END;
- break;
-
- default:
- g_assert_not_reached ();
- }
- } else
- trigger->type = CAL_ALARM_TRIGGER_RELATIVE_START;
- } else {
- trigger->u.abs_time = t.time;
- trigger->type = CAL_ALARM_TRIGGER_ABSOLUTE;
- }
-}
-
-/**
- * cal_component_alarm_set_trigger:
- * @alarm: An alarm.
- * @trigger: Trigger time structure.
- *
- * Sets the trigger time of an alarm.
- **/
-void
-cal_component_alarm_set_trigger (CalComponentAlarm *alarm, CalAlarmTrigger trigger)
-{
- struct icaltriggertype t;
- icalparameter *param;
- icalparameter_value value_type;
- icalparameter_related related;
-
- g_return_if_fail (alarm != NULL);
- g_return_if_fail (trigger.type != CAL_ALARM_TRIGGER_NONE);
-
- g_assert (alarm->icalcomp != NULL);
-
- /* Delete old trigger */
-
- if (alarm->trigger) {
- icalcomponent_remove_property (alarm->icalcomp, alarm->trigger);
- icalproperty_free (alarm->trigger);
- alarm->trigger = NULL;
- }
-
- /* Set the value */
-
- related = ICAL_RELATED_START; /* Keep GCC happy */
-
- t.time = icaltime_null_time ();
- t.duration = icaldurationtype_null_duration ();
- switch (trigger.type) {
- case CAL_ALARM_TRIGGER_RELATIVE_START:
- t.duration = trigger.u.rel_duration;
- t.time.is_date = -1;
- value_type = ICAL_DURATION_VALUE;
- related = ICAL_RELATED_START;
- break;
-
- case CAL_ALARM_TRIGGER_RELATIVE_END:
- t.duration = trigger.u.rel_duration;
- t.time.is_date = -1;
- value_type = ICAL_DURATION_VALUE;
- related = ICAL_RELATED_END;
- break;
-
- case CAL_ALARM_TRIGGER_ABSOLUTE:
- t.time = trigger.u.abs_time;
- value_type = ICAL_DATETIME_VALUE;
- break;
-
- default:
- g_assert_not_reached ();
- return;
- }
-
- alarm->trigger = icalproperty_new_trigger (t);
- icalcomponent_add_property (alarm->icalcomp, alarm->trigger);
-
- /* Value parameters */
-
- param = icalproperty_get_first_parameter (alarm->trigger, ICAL_VALUE_PARAMETER);
- if (param)
- icalparameter_set_value (param, value_type);
- else {
- param = icalparameter_new_value (value_type);
- icalproperty_add_parameter (alarm->trigger, param);
- }
-
- /* Related parameter */
-
- if (trigger.type != CAL_ALARM_TRIGGER_ABSOLUTE) {
- param = icalproperty_get_first_parameter (alarm->trigger, ICAL_RELATED_PARAMETER);
-
- if (param)
- icalparameter_set_related (param, related);
- else {
- param = icalparameter_new_related (related);
- icalproperty_add_parameter (alarm->trigger, param);
- }
- }
-}
-
-/**
- * cal_component_alarm_free:
- * @alarm: A calendar alarm.
- *
- * Frees an alarm structure.
- **/
-void
-cal_component_alarm_free (CalComponentAlarm *alarm)
-{
- g_return_if_fail (alarm != NULL);
-
- g_assert (alarm->icalcomp != NULL);
-
- if (icalcomponent_get_parent (alarm->icalcomp) != NULL)
- icalcomponent_free (alarm->icalcomp);
-
- alarm->icalcomp = NULL;
-
- alarm->parent = NULL;
- alarm->action = NULL;
-
- g_free (alarm);
-}
-
-
-/* Returns TRUE if both strings match, i.e. they are both NULL or the
- strings are equal. */
-static gboolean
-cal_component_strings_match (const gchar *string1,
- const gchar *string2)
-{
- if (string1 == NULL || string2 == NULL)
- return (string1 == string2) ? TRUE : FALSE;
-
- if (!strcmp (string1, string2))
- return TRUE;
-
- return FALSE;
-}
-
-
-/**
- * cal_component_event_dates_match:
- * @comp1: A calendar component object.
- * @comp2: A calendar component object.
- *
- * Checks if the DTSTART and DTEND properties of the 2 components match.
- * Note that the events may have different recurrence properties which are not
- * taken into account here.
- *
- * Returns: TRUE if the DTSTART and DTEND properties of the 2 components match.
- **/
-gboolean
-cal_component_event_dates_match (CalComponent *comp1,
- CalComponent *comp2)
-{
- CalComponentDateTime comp1_dtstart, comp1_dtend;
- CalComponentDateTime comp2_dtstart, comp2_dtend;
-
- cal_component_get_dtstart (comp1, &comp1_dtstart);
- cal_component_get_dtend (comp1, &comp1_dtend);
- cal_component_get_dtstart (comp2, &comp2_dtstart);
- cal_component_get_dtend (comp2, &comp2_dtend);
-
- /* If either value is NULL they must both be NULL to match. */
- if (comp1_dtstart.value == NULL || comp2_dtstart.value == NULL) {
- if (comp1_dtstart.value != comp2_dtstart.value)
- return FALSE;
- } else {
- if (icaltime_compare (*comp1_dtstart.value,
- *comp2_dtstart.value))
- return FALSE;
- }
-
- if (comp1_dtend.value == NULL || comp2_dtend.value == NULL) {
- if (comp1_dtend.value != comp2_dtend.value)
- return FALSE;
- } else {
- if (icaltime_compare (*comp1_dtend.value,
- *comp2_dtend.value))
- return FALSE;
- }
-
- /* Now check the timezones. */
- if (!cal_component_strings_match (comp1_dtstart.tzid,
- comp2_dtstart.tzid))
- return FALSE;
-
- if (!cal_component_strings_match (comp1_dtend.tzid,
- comp2_dtend.tzid))
- return FALSE;
-
- return TRUE;
-}
-
-
-
diff --git a/calendar/cal-util/cal-component.h b/calendar/cal-util/cal-component.h
deleted file mode 100644
index 95d2b1eb0b..0000000000
--- a/calendar/cal-util/cal-component.h
+++ /dev/null
@@ -1,361 +0,0 @@
-/* Evolution calendar - iCalendar component object
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Author: Federico Mena-Quintero <federico@ximian.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 CAL_COMPONENT_H
-#define CAL_COMPONENT_H
-
-#include <libgnome/gnome-defs.h>
-#include <time.h>
-#include <gtk/gtkobject.h>
-#include <ical.h>
-
-BEGIN_GNOME_DECLS
-
-
-
-#define CAL_COMPONENT_TYPE (cal_component_get_type ())
-#define CAL_COMPONENT(obj) (GTK_CHECK_CAST ((obj), CAL_COMPONENT_TYPE, CalComponent))
-#define CAL_COMPONENT_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), CAL_COMPONENT_TYPE, \
- CalComponentClass))
-#define IS_CAL_COMPONENT(obj) (GTK_CHECK_TYPE ((obj), CAL_COMPONENT_TYPE))
-#define IS_CAL_COMPONENT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), CAL_COMPONENT_TYPE))
-
-/* Types of calendar components to be stored by a CalComponent, as per RFC 2445.
- * We don't put the alarm component type here since we store alarms as separate
- * structures inside the other "real" components.
- */
-typedef enum {
- CAL_COMPONENT_NO_TYPE,
- CAL_COMPONENT_EVENT,
- CAL_COMPONENT_TODO,
- CAL_COMPONENT_JOURNAL,
- CAL_COMPONENT_FREEBUSY,
- CAL_COMPONENT_TIMEZONE
-} CalComponentVType;
-
-/* Field identifiers for a calendar component; these are used by the data model
- * for ETable.
- *
- * NOTE: These are also used in the ETable specification, and the column
- * numbers are saved in the user settings file. So don't reorder them!
- */
-typedef enum {
- CAL_COMPONENT_FIELD_CATEGORIES, /* concatenation of the categories list */
- CAL_COMPONENT_FIELD_CLASSIFICATION,
- CAL_COMPONENT_FIELD_COMPLETED,
- CAL_COMPONENT_FIELD_DTEND,
- CAL_COMPONENT_FIELD_DTSTART,
- CAL_COMPONENT_FIELD_DUE,
- CAL_COMPONENT_FIELD_GEO,
- CAL_COMPONENT_FIELD_PERCENT,
- CAL_COMPONENT_FIELD_PRIORITY,
- CAL_COMPONENT_FIELD_SUMMARY,
- CAL_COMPONENT_FIELD_TRANSPARENCY,
- CAL_COMPONENT_FIELD_URL,
- CAL_COMPONENT_FIELD_HAS_ALARMS, /* not a real field */
- CAL_COMPONENT_FIELD_ICON, /* not a real field */
- CAL_COMPONENT_FIELD_COMPLETE, /* not a real field */
- CAL_COMPONENT_FIELD_RECURRING, /* not a real field */
- CAL_COMPONENT_FIELD_OVERDUE, /* not a real field */
- CAL_COMPONENT_FIELD_COLOR, /* not a real field */
- CAL_COMPONENT_FIELD_STATUS,
- CAL_COMPONENT_FIELD_NUM_FIELDS
-} CalComponentField;
-
-/* Structures and enumerations to return properties and their parameters */
-
-/* CLASSIFICATION property */
-typedef enum {
- CAL_COMPONENT_CLASS_NONE,
- CAL_COMPONENT_CLASS_PUBLIC,
- CAL_COMPONENT_CLASS_PRIVATE,
- CAL_COMPONENT_CLASS_CONFIDENTIAL,
- CAL_COMPONENT_CLASS_UNKNOWN
-} CalComponentClassification;
-
-/* Properties that have time and timezone information */
-typedef struct {
- /* Actual date/time value */
- struct icaltimetype *value;
-
- /* Timezone ID */
- const char *tzid;
-} CalComponentDateTime;
-
-/* Way in which a period of time is specified */
-typedef enum {
- CAL_COMPONENT_PERIOD_DATETIME,
- CAL_COMPONENT_PERIOD_DURATION
-} CalComponentPeriodType;
-
-/* Period of time, can have explicit start/end times or start/duration instead */
-typedef struct {
- CalComponentPeriodType type;
-
- struct icaltimetype start;
-
- union {
- struct icaltimetype end;
- struct icaldurationtype duration;
- } u;
-} CalComponentPeriod;
-
-/* Text properties */
-typedef struct {
- /* Description string */
- const char *value;
-
- /* Alternate representation URI */
- const char *altrep;
-} CalComponentText;
-
-/* Time transparency */
-typedef enum {
- CAL_COMPONENT_TRANSP_NONE,
- CAL_COMPONENT_TRANSP_TRANSPARENT,
- CAL_COMPONENT_TRANSP_OPAQUE,
- CAL_COMPONENT_TRANSP_UNKNOWN
-} CalComponentTransparency;
-
-/* Main calendar component object */
-
-typedef struct _CalComponent CalComponent;
-typedef struct _CalComponentClass CalComponentClass;
-
-typedef struct _CalComponentPrivate CalComponentPrivate;
-
-struct _CalComponent {
- GtkObject object;
-
- /* Private data */
- CalComponentPrivate *priv;
-};
-
-struct _CalComponentClass {
- GtkObjectClass parent_class;
-};
-
-/* Calendar component */
-
-GtkType cal_component_get_type (void);
-
-char *cal_component_gen_uid (void);
-
-CalComponent *cal_component_new (void);
-
-CalComponent *cal_component_clone (CalComponent *comp);
-
-void cal_component_set_new_vtype (CalComponent *comp, CalComponentVType type);
-
-gboolean cal_component_set_icalcomponent (CalComponent *comp, icalcomponent *icalcomp);
-icalcomponent *cal_component_get_icalcomponent (CalComponent *comp);
-
-CalComponentVType cal_component_get_vtype (CalComponent *comp);
-
-char *cal_component_get_as_string (CalComponent *comp);
-
-void cal_component_commit_sequence (CalComponent *comp);
-
-void cal_component_get_uid (CalComponent *comp, const char **uid);
-void cal_component_set_uid (CalComponent *comp, const char *uid);
-
-void cal_component_get_categories (CalComponent *comp, const char **categories);
-void cal_component_set_categories (CalComponent *comp, const char *categories);
-void cal_component_get_categories_list (CalComponent *comp, GSList **categ_list);
-void cal_component_set_categories_list (CalComponent *comp, GSList *categ_list);
-
-void cal_component_get_classification (CalComponent *comp, CalComponentClassification *classif);
-void cal_component_set_classification (CalComponent *comp, CalComponentClassification classif);
-
-void cal_component_get_comment_list (CalComponent *comp, GSList **text_list);
-void cal_component_set_comment_list (CalComponent *comp, GSList *text_list);
-
-void cal_component_get_completed (CalComponent *comp, struct icaltimetype **t);
-void cal_component_set_completed (CalComponent *comp, struct icaltimetype *t);
-
-void cal_component_get_created (CalComponent *comp, struct icaltimetype **t);
-void cal_component_set_created (CalComponent *comp, struct icaltimetype *t);
-
-void cal_component_get_description_list (CalComponent *comp, GSList **text_list);
-void cal_component_set_description_list (CalComponent *comp, GSList *text_list);
-
-void cal_component_get_dtend (CalComponent *comp, CalComponentDateTime *dt);
-void cal_component_set_dtend (CalComponent *comp, CalComponentDateTime *dt);
-
-void cal_component_get_dtstamp (CalComponent *comp, struct icaltimetype *t);
-void cal_component_set_dtstamp (CalComponent *comp, struct icaltimetype *t);
-
-void cal_component_get_dtstart (CalComponent *comp, CalComponentDateTime *dt);
-void cal_component_set_dtstart (CalComponent *comp, CalComponentDateTime *dt);
-
-void cal_component_get_due (CalComponent *comp, CalComponentDateTime *dt);
-void cal_component_set_due (CalComponent *comp, CalComponentDateTime *dt);
-
-void cal_component_get_exdate_list (CalComponent *comp, GSList **exdate_list);
-void cal_component_set_exdate_list (CalComponent *comp, GSList *exdate_list);
-gboolean cal_component_has_exdates (CalComponent *comp);
-
-void cal_component_get_exrule_list (CalComponent *comp, GSList **recur_list);
-void cal_component_get_exrule_property_list (CalComponent *comp, GSList **recur_list);
-void cal_component_set_exrule_list (CalComponent *comp, GSList *recur_list);
-gboolean cal_component_has_exrules (CalComponent *comp);
-
-gboolean cal_component_has_exceptions (CalComponent *comp);
-
-void cal_component_get_geo (CalComponent *comp, struct icalgeotype **geo);
-void cal_component_set_geo (CalComponent *comp, struct icalgeotype *geo);
-
-void cal_component_get_last_modified (CalComponent *comp, struct icaltimetype **t);
-void cal_component_set_last_modified (CalComponent *comp, struct icaltimetype *t);
-
-void cal_component_get_percent (CalComponent *comp, int **percent);
-void cal_component_set_percent (CalComponent *comp, int *percent);
-
-void cal_component_get_priority (CalComponent *comp, int **priority);
-void cal_component_set_priority (CalComponent *comp, int *priority);
-
-void cal_component_get_rdate_list (CalComponent *comp, GSList **period_list);
-void cal_component_set_rdate_list (CalComponent *comp, GSList *period_list);
-gboolean cal_component_has_rdates (CalComponent *comp);
-
-void cal_component_get_rrule_list (CalComponent *comp, GSList **recur_list);
-void cal_component_get_rrule_property_list (CalComponent *comp, GSList **recur_list);
-void cal_component_set_rrule_list (CalComponent *comp, GSList *recur_list);
-gboolean cal_component_has_rrules (CalComponent *comp);
-
-gboolean cal_component_has_recurrences (CalComponent *comp);
-
-void cal_component_get_sequence (CalComponent *comp, int **sequence);
-void cal_component_set_sequence (CalComponent *comp, int *sequence);
-
-void cal_component_get_status (CalComponent *comp, icalproperty_status *status);
-void cal_component_set_status (CalComponent *comp, icalproperty_status status);
-
-void cal_component_get_summary (CalComponent *comp, CalComponentText *summary);
-void cal_component_set_summary (CalComponent *comp, CalComponentText *summary);
-
-void cal_component_get_transparency (CalComponent *comp, CalComponentTransparency *transp);
-void cal_component_set_transparency (CalComponent *comp, CalComponentTransparency transp);
-
-void cal_component_get_url (CalComponent *comp, const char **url);
-void cal_component_set_url (CalComponent *comp, const char *url);
-
-gboolean cal_component_event_dates_match (CalComponent *comp1, CalComponent *comp2);
-
-/* Functions to free returned values */
-
-void cal_component_free_categories_list (GSList *categ_list);
-void cal_component_free_datetime (CalComponentDateTime *dt);
-void cal_component_free_exdate_list (GSList *exdate_list);
-void cal_component_free_geo (struct icalgeotype *geo);
-void cal_component_free_icaltimetype (struct icaltimetype *t);
-void cal_component_free_percent (int *percent);
-void cal_component_free_priority (int *priority);
-void cal_component_free_period_list (GSList *period_list);
-void cal_component_free_recur_list (GSList *recur_list);
-void cal_component_free_sequence (int *sequence);
-void cal_component_free_text_list (GSList *text_list);
-
-/* Alarms */
-
-/* Opaque structure used to represent alarm subcomponents */
-typedef struct _CalComponentAlarm CalComponentAlarm;
-
-/* An alarm occurrence, i.e. a trigger instance */
-typedef struct {
- /* UID of the alarm that triggered */
- const char *auid;
-
- /* Trigger time, i.e. "5 minutes before the appointment" */
- time_t trigger;
-
- /* Actual event occurrence to which this trigger corresponds */
- time_t occur;
-} CalAlarmInstance;
-
-/* Alarm trigger instances for a particular component */
-typedef struct {
- /* The actual component */
- CalComponent *comp;
-
- /* List of CalAlarmInstance structures */
- GSList *alarms;
-} CalComponentAlarms;
-
-/* Alarm types */
-typedef enum {
- CAL_ALARM_NONE,
- CAL_ALARM_AUDIO,
- CAL_ALARM_DISPLAY,
- CAL_ALARM_EMAIL,
- CAL_ALARM_PROCEDURE,
- CAL_ALARM_UNKNOWN
-} CalAlarmAction;
-
-/* Whether a trigger is relative to the start or end of an event occurrence, or
- * whether it is specified to occur at an absolute time.
- */
-typedef enum {
- CAL_ALARM_TRIGGER_NONE,
- CAL_ALARM_TRIGGER_RELATIVE_START,
- CAL_ALARM_TRIGGER_RELATIVE_END,
- CAL_ALARM_TRIGGER_ABSOLUTE
-} CalAlarmTriggerType;
-
-typedef struct {
- CalAlarmTriggerType type;
-
- union {
- struct icaldurationtype rel_duration;
- struct icaltimetype abs_time;
- } u;
-} CalAlarmTrigger;
-
-gboolean cal_component_has_alarms (CalComponent *comp);
-void cal_component_add_alarm (CalComponent *comp, CalComponentAlarm *alarm);
-void cal_component_remove_alarm (CalComponent *comp, const char *auid);
-
-GList *cal_component_get_alarm_uids (CalComponent *comp);
-CalComponentAlarm *cal_component_get_alarm (CalComponent *comp, const char *auid);
-void cal_component_free_alarm_uids (GList *alarm_uids);
-
-void cal_component_alarms_free (CalComponentAlarms *alarms);
-
-/* CalComponentAlarms */
-CalComponentAlarm *cal_component_alarm_new (void);
-
-const char *cal_component_alarm_get_uid (CalComponentAlarm *alarm);
-
-void cal_component_alarm_get_action (CalComponentAlarm *alarm, CalAlarmAction *action);
-void cal_component_alarm_set_action (CalComponentAlarm *alarm, CalAlarmAction action);
-
-void cal_component_alarm_get_trigger (CalComponentAlarm *alarm, CalAlarmTrigger *trigger);
-void cal_component_alarm_set_trigger (CalComponentAlarm *alarm, CalAlarmTrigger trigger);
-
-void cal_component_alarm_free (CalComponentAlarm *alarm);
-
-
-
-
-END_GNOME_DECLS
-
-#endif
diff --git a/calendar/cal-util/cal-recur.c b/calendar/cal-util/cal-recur.c
deleted file mode 100644
index 0b4f114484..0000000000
--- a/calendar/cal-util/cal-recur.c
+++ /dev/null
@@ -1,3758 +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 <damon@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 <stdlib.h>
-#include <string.h>
-#include <cal-util/cal-recur.h>
-#include <cal-util/timeutil.h>
-
-
-/*
- * 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 which we step by. We generate a 'set' of
- * occurrences for each period defined by the frequency & interval.
- * 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, BYMINUTE & 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, otherwise 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 the iCalendar spec says that BYWEEKNO can only be used in a YEARLY
- * rule, and some modifiers aren't appropriate for some frequencies - e.g.
- * BYMONTHDAY is not really useful in a WEEKLY frequency, and BYYEARDAY is
- * not useful in a MONTHLY or WEEKLY frequency).
- * The frequency modifiers are applied in the order given above. The first 5
- * modifier rules (BYMONTH, BYWEEKNO, BYYEARDAY, BYMONTHDAY & BYDAY) all
- * produce the days on which the occurrences take place, and so we have to
- * compute some of these in parallel rather than sequentially, or we may end
- * up with too many days.
- *
- * o Note that some expansion functions may produce days which are invalid,
- * e.g. 31st September, 30th Feb. These invalid days are removed before the
- * BYHOUR, BYMINUTE & BYSECOND modifier functions are applied.
- *
- * 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 this for some debugging output. */
-#if 0
-#define CAL_OBJ_DEBUG 1
-#endif
-
-/* We will use icalrecurrencetype instead of this eventually. */
-typedef struct {
- icalrecurrencetype_frequency freq;
-
- int interval;
-
- /* Specifies the end of the recurrence. No occurrences are generated
- after this date. If it is 0, the event recurs forever. */
- time_t enddate;
-
- /* WKST property - the week start day: 0 = Monday to 6 = Sunday. */
- gint week_start_day;
-
-
- /* NOTE: I've used GList's here, but it doesn't matter if we use
- other data structures like arrays. The code should be easy to
- change. So long as it is easy to see if the modifier is set. */
-
- /* For BYMONTH modifier. A list of GINT_TO_POINTERs, 0-11. */
- GList *bymonth;
-
- /* For BYWEEKNO modifier. A list of GINT_TO_POINTERs, [+-]1-53. */
- GList *byweekno;
-
- /* For BYYEARDAY modifier. A list of GINT_TO_POINTERs, [+-]1-366. */
- GList *byyearday;
-
- /* For BYMONTHDAY modifier. A list of GINT_TO_POINTERs, [+-]1-31. */
- GList *bymonthday;
-
- /* For BYDAY modifier. A list of GINT_TO_POINTERs, in pairs.
- The first of each pair is the weekday, 0 = Monday to 6 = Sunday.
- The second of each pair is the week number [+-]0-53. */
- GList *byday;
-
- /* 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;
-
- /* For BYSETPOS modifier. A list of GINT_TO_POINTERs, +ve or -ve. */
- GList *bysetpos;
-} CalRecurrence;
-
-/* This is what we use to pass to all the filter functions. */
-typedef struct _RecurData RecurData;
-struct _RecurData {
- CalRecurrence *recur;
-
- /* This is used for the WEEKLY frequency. It is the offset from the
- week_start_day. */
- gint weekday_offset;
-
- /* This is used for fast lookup in BYMONTH filtering. */
- guint8 months[12];
-
- /* This is used for fast lookup in BYYEARDAY filtering. */
- guint8 yeardays[367], neg_yeardays[367]; /* Days are 1 - 366. */
-
- /* This is used for fast lookup in BYMONTHDAY filtering. */
- guint8 monthdays[32], neg_monthdays[32]; /* Days are 1 to 31. */
-
- /* This is used for fast lookup in BYDAY filtering. */
- guint8 weekdays[7];
-
- /* This is used for fast lookup in BYHOUR filtering. */
- guint8 hours[24];
-
- /* This is used for fast lookup in BYMINUTE filtering. */
- guint8 minutes[60];
-
- /* This is used for fast lookup in BYSECOND filtering. */
- guint8 seconds[62];
-};
-
-/* 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 up to 61 for leap seconds) */
- guint8 is_rdate; /* TRUE if this is an RDATE, which may have an
- end or duration set. */
-};
-
-/* This is what we use to represent specific recurrence dates.
- Note that we assume it starts with a CalObjTime when sorting. */
-typedef struct _CalObjRecurrenceDate CalObjRecurrenceDate;
-struct _CalObjRecurrenceDate {
- CalObjTime start;
- CalComponentPeriod *period;
-};
-
-/* The paramter we use to store the enddate in RRULE and EXRULE properties. */
-#define EVOLUTION_END_DATE_PARAMETER "X-EVOLUTION-ENDDATE"
-
-typedef gboolean (*CalObjFindStartFn) (CalObjTime *event_start,
- CalObjTime *event_end,
- RecurData *recur_data,
- CalObjTime *interval_start,
- CalObjTime *interval_end,
- CalObjTime *cotime);
-typedef gboolean (*CalObjFindNextFn) (CalObjTime *cotime,
- CalObjTime *event_end,
- RecurData *recur_data,
- CalObjTime *interval_end);
-typedef GArray* (*CalObjFilterFn) (RecurData *recur_data,
- GArray *occs);
-
-typedef struct _CalRecurVTable CalRecurVTable;
-struct _CalRecurVTable {
- CalObjFindStartFn find_start_position;
- CalObjFindNextFn find_next_position;
-
- CalObjFilterFn bymonth_filter;
- CalObjFilterFn byweekno_filter;
- CalObjFilterFn byyearday_filter;
- CalObjFilterFn bymonthday_filter;
- CalObjFilterFn byday_filter;
- CalObjFilterFn byhour_filter;
- CalObjFilterFn byminute_filter;
- CalObjFilterFn bysecond_filter;
-};
-
-
-/* This is used to specify which parts of the CalObjTime to compare in
- cal_obj_time_compare(). */
-typedef enum {
- CALOBJ_YEAR,
- CALOBJ_MONTH,
- CALOBJ_DAY,
- CALOBJ_HOUR,
- CALOBJ_MINUTE,
- CALOBJ_SECOND
-} CalObjTimeComparison;
-
-static void cal_recur_generate_instances_of_rule (CalComponent *comp,
- icalproperty *prop,
- time_t start,
- time_t end,
- CalRecurInstanceFn cb,
- gpointer cb_data);
-
-static CalRecurrence * cal_recur_from_icalproperty (icalproperty *prop,
- gboolean exception);
-static gint cal_recur_ical_weekday_to_weekday (enum icalrecurrencetype_weekday day);
-static void cal_recur_free (CalRecurrence *r);
-
-
-static gboolean cal_object_get_rdate_end (CalObjTime *occ,
- GArray *rdate_periods);
-static void cal_object_compute_duration (CalObjTime *start,
- CalObjTime *end,
- gint *days,
- gint *seconds);
-
-static gboolean generate_instances_for_chunk (CalComponent *comp,
- time_t comp_dtstart,
- GSList *rrules,
- GSList *rdates,
- GSList *exrules,
- GSList *exdates,
- gboolean single_rule,
- CalObjTime *event_start,
- time_t interval_start,
- CalObjTime *chunk_start,
- CalObjTime *chunk_end,
- gint duration_days,
- gint duration_seconds,
- CalRecurInstanceFn cb,
- gpointer cb_data);
-
-static GArray* cal_obj_expand_recurrence (CalObjTime *event_start,
- CalRecurrence *recur,
- CalObjTime *interval_start,
- CalObjTime *interval_end,
- gboolean *finished);
-
-static GArray* cal_obj_generate_set_yearly (RecurData *recur_data,
- CalRecurVTable *vtable,
- CalObjTime *occ);
-static GArray* cal_obj_generate_set_monthly (RecurData *recur_data,
- CalRecurVTable *vtable,
- CalObjTime *occ);
-static GArray* cal_obj_generate_set_default (RecurData *recur_data,
- CalRecurVTable *vtable,
- CalObjTime *occ);
-
-
-static CalRecurVTable* cal_obj_get_vtable (icalrecurrencetype_frequency recur_type);
-static void cal_obj_initialize_recur_data (RecurData *recur_data,
- CalRecurrence *recur,
- CalObjTime *event_start);
-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_and_invalid_dates (GArray *occs);
-static void cal_obj_remove_exceptions (GArray *occs,
- GArray *ex_occs);
-static GArray* cal_obj_bysetpos_filter (CalRecurrence *recur,
- GArray *occs);
-
-
-static gboolean cal_obj_yearly_find_start_position (CalObjTime *event_start,
- CalObjTime *event_end,
- RecurData *recur_data,
- CalObjTime *interval_start,
- CalObjTime *interval_end,
- CalObjTime *cotime);
-static gboolean cal_obj_yearly_find_next_position (CalObjTime *cotime,
- CalObjTime *event_end,
- RecurData *recur_data,
- CalObjTime *interval_end);
-
-static gboolean cal_obj_monthly_find_start_position (CalObjTime *event_start,
- CalObjTime *event_end,
- RecurData *recur_data,
- CalObjTime *interval_start,
- CalObjTime *interval_end,
- CalObjTime *cotime);
-static gboolean cal_obj_monthly_find_next_position (CalObjTime *cotime,
- CalObjTime *event_end,
- RecurData *recur_data,
- CalObjTime *interval_end);
-
-static gboolean cal_obj_weekly_find_start_position (CalObjTime *event_start,
- CalObjTime *event_end,
- RecurData *recur_data,
- CalObjTime *interval_start,
- CalObjTime *interval_end,
- CalObjTime *cotime);
-static gboolean cal_obj_weekly_find_next_position (CalObjTime *cotime,
- CalObjTime *event_end,
- RecurData *recur_data,
- CalObjTime *interval_end);
-
-static gboolean cal_obj_daily_find_start_position (CalObjTime *event_start,
- CalObjTime *event_end,
- RecurData *recur_data,
- CalObjTime *interval_start,
- CalObjTime *interval_end,
- CalObjTime *cotime);
-static gboolean cal_obj_daily_find_next_position (CalObjTime *cotime,
- CalObjTime *event_end,
- RecurData *recur_data,
- CalObjTime *interval_end);
-
-static gboolean cal_obj_hourly_find_start_position (CalObjTime *event_start,
- CalObjTime *event_end,
- RecurData *recur_data,
- CalObjTime *interval_start,
- CalObjTime *interval_end,
- CalObjTime *cotime);
-static gboolean cal_obj_hourly_find_next_position (CalObjTime *cotime,
- CalObjTime *event_end,
- RecurData *recur_data,
- CalObjTime *interval_end);
-
-static gboolean cal_obj_minutely_find_start_position (CalObjTime *event_start,
- CalObjTime *event_end,
- RecurData *recur_data,
- CalObjTime *interval_start,
- CalObjTime *interval_end,
- CalObjTime *cotime);
-static gboolean cal_obj_minutely_find_next_position (CalObjTime *cotime,
- CalObjTime *event_end,
- RecurData *recur_data,
- CalObjTime *interval_end);
-
-static gboolean cal_obj_secondly_find_start_position (CalObjTime *event_start,
- CalObjTime *event_end,
- RecurData *recur_data,
- CalObjTime *interval_start,
- CalObjTime *interval_end,
- CalObjTime *cotime);
-static gboolean cal_obj_secondly_find_next_position (CalObjTime *cotime,
- CalObjTime *event_end,
- RecurData *recur_data,
- CalObjTime *interval_end);
-
-static GArray* cal_obj_bymonth_expand (RecurData *recur_data,
- GArray *occs);
-static GArray* cal_obj_bymonth_filter (RecurData *recur_data,
- GArray *occs);
-static GArray* cal_obj_byweekno_expand (RecurData *recur_data,
- GArray *occs);
-#if 0
-/* This isn't used at present. */
-static GArray* cal_obj_byweekno_filter (RecurData *recur_data,
- GArray *occs);
-#endif
-static GArray* cal_obj_byyearday_expand (RecurData *recur_data,
- GArray *occs);
-static GArray* cal_obj_byyearday_filter (RecurData *recur_data,
- GArray *occs);
-static GArray* cal_obj_bymonthday_expand (RecurData *recur_data,
- GArray *occs);
-static GArray* cal_obj_bymonthday_filter (RecurData *recur_data,
- GArray *occs);
-static GArray* cal_obj_byday_expand_yearly (RecurData *recur_data,
- GArray *occs);
-static GArray* cal_obj_byday_expand_monthly (RecurData *recur_data,
- GArray *occs);
-static GArray* cal_obj_byday_expand_weekly (RecurData *recur_data,
- GArray *occs);
-static GArray* cal_obj_byday_filter (RecurData *recur_data,
- GArray *occs);
-static GArray* cal_obj_byhour_expand (RecurData *recur_data,
- GArray *occs);
-static GArray* cal_obj_byhour_filter (RecurData *recur_data,
- GArray *occs);
-static GArray* cal_obj_byminute_expand (RecurData *recur_data,
- GArray *occs);
-static GArray* cal_obj_byminute_filter (RecurData *recur_data,
- GArray *occs);
-static GArray* cal_obj_bysecond_expand (RecurData *recur_data,
- GArray *occs);
-static GArray* cal_obj_bysecond_filter (RecurData *recur_data,
- GArray *occs);
-
-static void cal_obj_time_add_months (CalObjTime *cotime,
- gint months);
-static void cal_obj_time_add_days (CalObjTime *cotime,
- gint days);
-static void cal_obj_time_add_hours (CalObjTime *cotime,
- gint hours);
-static void cal_obj_time_add_minutes (CalObjTime *cotime,
- gint minutes);
-static void cal_obj_time_add_seconds (CalObjTime *cotime,
- gint seconds);
-static gint cal_obj_time_compare (CalObjTime *cotime1,
- CalObjTime *cotime2,
- CalObjTimeComparison type);
-static gint cal_obj_time_weekday (CalObjTime *cotime);
-static gint cal_obj_time_weekday_offset (CalObjTime *cotime,
- CalRecurrence *recur);
-static gint cal_obj_time_day_of_year (CalObjTime *cotime);
-static void cal_obj_time_find_first_week (CalObjTime *cotime,
- RecurData *recur_data);
-static void cal_object_time_from_time (CalObjTime *cotime,
- time_t t);
-#if 0
-static gint cal_obj_date_only_compare_func (const void *arg1,
- const void *arg2);
-#endif
-
-
-
-static gboolean cal_recur_ensure_end_dates (CalComponent *comp,
- gboolean refresh);
-static gboolean cal_recur_ensure_rule_end_date (CalComponent *comp,
- icalproperty *prop,
- gboolean exception,
- gboolean refresh);
-static gboolean cal_recur_ensure_rule_end_date_cb (CalComponent *comp,
- time_t instance_start,
- time_t instance_end,
- gpointer data);
-static time_t cal_recur_get_rule_end_date (icalproperty *prop);
-static void cal_recur_set_rule_end_date (icalproperty *prop,
- time_t end_date);
-
-
-#ifdef CAL_OBJ_DEBUG
-static char* cal_obj_time_to_string (CalObjTime *cotime);
-#endif
-
-
-CalRecurVTable 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_yearly,
- cal_obj_byhour_expand,
- cal_obj_byminute_expand,
- cal_obj_bysecond_expand
-};
-
-CalRecurVTable cal_obj_monthly_vtable = {
- cal_obj_monthly_find_start_position,
- cal_obj_monthly_find_next_position,
-
- cal_obj_bymonth_filter,
- NULL, /* BYWEEKNO is only applicable to YEARLY frequency. */
- NULL, /* BYYEARDAY is not useful in a MONTHLY frequency. */
- cal_obj_bymonthday_expand,
- cal_obj_byday_expand_monthly,
- cal_obj_byhour_expand,
- cal_obj_byminute_expand,
- cal_obj_bysecond_expand
-};
-
-CalRecurVTable cal_obj_weekly_vtable = {
- cal_obj_weekly_find_start_position,
- cal_obj_weekly_find_next_position,
-
- cal_obj_bymonth_filter,
- NULL, /* BYWEEKNO is only applicable to YEARLY frequency. */
- NULL, /* BYYEARDAY is not useful in a WEEKLY frequency. */
- NULL, /* BYMONTHDAY is not useful in a WEEKLY frequency. */
- cal_obj_byday_expand_weekly,
- cal_obj_byhour_expand,
- cal_obj_byminute_expand,
- cal_obj_bysecond_expand
-};
-
-CalRecurVTable cal_obj_daily_vtable = {
- cal_obj_daily_find_start_position,
- cal_obj_daily_find_next_position,
-
- cal_obj_bymonth_filter,
- NULL, /* BYWEEKNO is only applicable to YEARLY frequency. */
- cal_obj_byyearday_filter,
- cal_obj_bymonthday_filter,
- cal_obj_byday_filter,
- cal_obj_byhour_expand,
- cal_obj_byminute_expand,
- cal_obj_bysecond_expand
-};
-
-CalRecurVTable cal_obj_hourly_vtable = {
- cal_obj_hourly_find_start_position,
- cal_obj_hourly_find_next_position,
-
- cal_obj_bymonth_filter,
- NULL, /* BYWEEKNO is only applicable to YEARLY frequency. */
- cal_obj_byyearday_filter,
- cal_obj_bymonthday_filter,
- cal_obj_byday_filter,
- cal_obj_byhour_filter,
- cal_obj_byminute_expand,
- cal_obj_bysecond_expand
-};
-
-CalRecurVTable cal_obj_minutely_vtable = {
- cal_obj_minutely_find_start_position,
- cal_obj_minutely_find_next_position,
-
- cal_obj_bymonth_filter,
- NULL, /* BYWEEKNO is only applicable to YEARLY frequency. */
- cal_obj_byyearday_filter,
- cal_obj_bymonthday_filter,
- cal_obj_byday_filter,
- cal_obj_byhour_filter,
- cal_obj_byminute_filter,
- cal_obj_bysecond_expand
-};
-
-CalRecurVTable cal_obj_secondly_vtable = {
- cal_obj_secondly_find_start_position,
- cal_obj_secondly_find_next_position,
-
- cal_obj_bymonth_filter,
- NULL, /* BYWEEKNO is only applicable to YEARLY frequency. */
- cal_obj_byyearday_filter,
- cal_obj_bymonthday_filter,
- cal_obj_byday_filter,
- cal_obj_byhour_filter,
- cal_obj_byminute_filter,
- cal_obj_bysecond_filter
-};
-
-/*
- * Calls the given callback function for each occurrence of the event that
- * intersects the range between the given start and end times (the end time is
- * not included). Note that the occurrences may start before the given start
- * time.
- *
- * If the callback routine returns FALSE the occurrence generation stops.
- *
- * Both start and end can be -1, in which case we start at the events first
- * instance and continue until it ends, or forever if it has no enddate.
- */
-void
-cal_recur_generate_instances (CalComponent *comp,
- time_t start,
- time_t end,
- CalRecurInstanceFn cb,
- gpointer cb_data)
-{
-#if 0
- g_print ("In cal_recur_generate_instances comp: %p\n", comp);
- g_print (" start: %li - %s", start, ctime (&start));
- g_print (" end : %li - %s", end, ctime (&end));
-#endif
- cal_recur_generate_instances_of_rule (comp, NULL, start, end,
- cb, cb_data);
-}
-
-
-/*
- * Calls the given callback function for each occurrence of the given
- * recurrence rule between the given start and end times. If the rule is NULL
- * it uses all the rules from the component.
- *
- * If the callback routine returns FALSE the occurrence generation stops.
- *
- * The use of the specific rule is for determining the end of a rule when
- * COUNT is set. The callback will count instances and store the enddate
- * when COUNT is reached.
- *
- * Both start and end can be -1, in which case we start at the events first
- * instance and continue until it ends, or forever if it has no enddate.
- */
-static void
-cal_recur_generate_instances_of_rule (CalComponent *comp,
- icalproperty *prop,
- time_t start,
- time_t end,
- CalRecurInstanceFn cb,
- gpointer cb_data)
-{
- CalComponentDateTime dtstart, dtend;
- time_t dtstart_time, dtend_time;
- GSList *rrules = NULL, *rdates = NULL, elem;
- GSList *exrules = NULL, *exdates = NULL;
- CalObjTime interval_start, interval_end, event_start, event_end;
- CalObjTime chunk_start, chunk_end;
- gint days, seconds, year;
- gboolean single_rule;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (cb != NULL);
- g_return_if_fail (start >= -1);
- g_return_if_fail (end >= -1);
-
- /* Get dtstart, dtend, recurrences, and exceptions */
-
- cal_component_get_dtstart (comp, &dtstart);
- cal_component_get_dtend (comp, &dtend);
-
- if (!dtstart.value) {
- g_message ("cal_recur_generate_instances_of_rule(): bogus "
- "component, does not have DTSTART. Skipping...");
- goto out;
- }
-
- dtstart_time = icaltime_as_timet (*dtstart.value);
- if (start == -1)
- start = dtstart_time;
-
- /* FIXME: DURATION could be used instead, couldn't it? - Damon */
- if (dtend.value)
- dtend_time = icaltime_as_timet (*dtend.value);
- else
- dtend_time = time_day_end (dtstart_time);
-
- /* If there is no recurrence, just call the callback if the event
- intersects the given interval. */
- if (!(cal_component_has_recurrences (comp)
- || cal_component_has_exceptions (comp))) {
- if ((end == -1 || dtstart_time < end) && dtend_time > start) {
- (* cb) (comp, dtstart_time, dtend_time, cb_data);
- }
-
- goto out;
- }
-
- /* If a specific recurrence rule is being used, set up a simple list,
- else get the recurrence rules from the component. */
- if (prop) {
- single_rule = TRUE;
-
- elem.data = prop;
- elem.next = NULL;
- rrules = &elem;
- } else {
- single_rule = FALSE;
-
- /* Make sure all the enddates for the rules are set. */
- cal_recur_ensure_end_dates (comp, FALSE);
-
- cal_component_get_rrule_property_list (comp, &rrules);
- cal_component_get_rdate_list (comp, &rdates);
- cal_component_get_exrule_property_list (comp, &exrules);
- cal_component_get_exdate_list (comp, &exdates);
- }
-
- /* Convert the interval start & end to CalObjTime. Note that if end
- is -1 interval_end won't be set, so don't use it!
- Also note that we use end - 1 since we want the interval to be
- inclusive as it makes the code simpler. */
- cal_object_time_from_time (&interval_start, start);
- if (end != -1)
- cal_object_time_from_time (&interval_end, end - 1);
-
- cal_object_time_from_time (&event_start, dtstart_time);
- cal_object_time_from_time (&event_end, dtend_time);
-
- /* Calculate the duration of the event, which we use for all
- occurrences. We can't just subtract start from end since that may
- be affected by daylight-saving time. So we want a value of days
- + seconds. */
- cal_object_compute_duration (&event_start, &event_end,
- &days, &seconds);
-
- /* Take off the duration from interval_start, so we get occurrences
- that start just before the start time but overlap it. But only do
- that if the interval is after the event's start time. */
- if (start > dtstart_time) {
- cal_obj_time_add_days (&interval_start, -days);
- cal_obj_time_add_seconds (&interval_start, -seconds);
- }
-
- /* Expand the recurrence for each year between start & end, or until
- the callback returns 0 if end is 0. We do a year at a time to
- give the callback function a chance to break out of the loop, and
- so we don't get into problems with infinite recurrences. Since we
- have to work on complete sets of occurrences, if there is a yearly
- frequency it wouldn't make sense to break it into smaller chunks,
- since we would then be calculating the same sets several times.
- Though this does mean that we sometimes do a lot more work than
- is necessary, e.g. if COUNT is set to something quite low. */
- for (year = interval_start.year;
- end == -1 || year <= interval_end.year;
- year++) {
- chunk_start = interval_start;
- chunk_start.year = year;
- if (end != -1)
- chunk_end = interval_end;
- chunk_end.year = year;
-
- if (year != interval_start.year) {
- chunk_start.month = 0;
- chunk_start.day = 1;
- chunk_start.hour = 0;
- chunk_start.minute = 0;
- chunk_start.second = 0;
- }
- if (end == -1 || year != interval_end.year) {
- chunk_end.month = 11;
- chunk_end.day = 31;
- chunk_end.hour = 23;
- chunk_end.minute = 59;
- chunk_end.second = 61;
- chunk_end.is_rdate = FALSE;
- }
-
- if (!generate_instances_for_chunk (comp, dtstart_time,
- rrules, rdates,
- exrules, exdates,
- single_rule,
- &event_start,
- start,
- &chunk_start, &chunk_end,
- days, seconds,
- cb, cb_data))
- break;
- }
-
- if (!prop) {
- cal_component_free_period_list (rdates);
- cal_component_free_exdate_list (exdates);
- }
-
- out:
- cal_component_free_datetime (&dtstart);
- cal_component_free_datetime (&dtend);
-}
-
-/* Builds a list of GINT_TO_POINTER() elements out of a short array from a
- * struct icalrecurrencetype.
- */
-static GList *
-array_to_list (short *array, int max_elements)
-{
- GList *l;
- int i;
-
- l = NULL;
-
- for (i = 0; i < max_elements && array[i] != ICAL_RECURRENCE_ARRAY_MAX; i++)
- l = g_list_prepend (l, GINT_TO_POINTER ((int) (array[i])));
- return g_list_reverse (l);
-}
-
-/**
- * cal_recur_from_icalproperty:
- * @ir: An RRULE or EXRULE #icalproperty.
- *
- * Converts an #icalproperty to a #CalRecurrence. This should be
- * freed using the cal_recur_free() function.
- *
- * Return value: #CalRecurrence structure.
- **/
-static CalRecurrence *
-cal_recur_from_icalproperty (icalproperty *prop, gboolean exception)
-{
- struct icalrecurrencetype ir;
- CalRecurrence *r;
- gint max_elements, i;
-
- g_return_val_if_fail (prop != NULL, NULL);
-
- r = g_new (CalRecurrence, 1);
-
- if (exception)
- ir = icalproperty_get_exrule (prop);
- else
- ir = icalproperty_get_rrule (prop);
-
- r->freq = ir.freq;
- r->interval = ir.interval;
-
- if (ir.count != 0) {
- r->enddate = cal_recur_get_rule_end_date (prop);
- } else {
- /* FIXME: icaltime_as_timet() seems to return -1 if UNTIL isn't
- set, but a simpler test would be better. */
- r->enddate = icaltime_as_timet (ir.until);
- if (r->enddate == -1)
- r->enddate = 0;
- else if (ir.until.is_date)
- /* FIXME: Decide what to do here. */
- r->enddate = time_add_day (r->enddate, 1) - 1;
- }
-
- r->week_start_day = cal_recur_ical_weekday_to_weekday (ir.week_start);
-
- r->bymonth = array_to_list (ir.by_month,
- sizeof (ir.by_month) / sizeof (ir.by_month[0]));
-
- r->byweekno = array_to_list (ir.by_week_no,
- sizeof (ir.by_week_no) / sizeof (ir.by_week_no[0]));
-
- r->byyearday = array_to_list (ir.by_year_day,
- sizeof (ir.by_year_day) / sizeof (ir.by_year_day[0]));
-
- r->bymonthday = array_to_list (ir.by_month_day,
- sizeof (ir.by_month_day) / sizeof (ir.by_month_day[0]));
-
- /* FIXME: libical only supports 8 values, out of possible 107 * 7. */
- r->byday = NULL;
- max_elements = sizeof (ir.by_day) / sizeof (ir.by_day[0]);
- for (i = 0; i < max_elements && ir.by_day[i] != ICAL_RECURRENCE_ARRAY_MAX; i++) {
- enum icalrecurrencetype_weekday day;
- gint weeknum, weekday;
-
- day = icalrecurrencetype_day_day_of_week (ir.by_day[i]);
- weeknum = icalrecurrencetype_day_position (ir.by_day[i]);
-
- weekday = cal_recur_ical_weekday_to_weekday (day);
-
- r->byday = g_list_prepend (r->byday,
- GINT_TO_POINTER (weeknum));
- r->byday = g_list_prepend (r->byday,
- GINT_TO_POINTER (weekday));
- }
-
- r->byhour = array_to_list (ir.by_hour,
- sizeof (ir.by_hour) / sizeof (ir.by_hour[0]));
-
- r->byminute = array_to_list (ir.by_minute,
- sizeof (ir.by_minute) / sizeof (ir.by_minute[0]));
-
- r->bysecond = array_to_list (ir.by_second,
- sizeof (ir.by_second) / sizeof (ir.by_second[0]));
-
- r->bysetpos = array_to_list (ir.by_set_pos,
- sizeof (ir.by_set_pos) / sizeof (ir.by_set_pos[0]));
-
- return r;
-}
-
-
-static gint
-cal_recur_ical_weekday_to_weekday (enum icalrecurrencetype_weekday day)
-{
- gint weekday;
-
- switch (day) {
- case ICAL_NO_WEEKDAY: /* Monday is the default in RFC2445. */
- case ICAL_MONDAY_WEEKDAY:
- weekday = 0;
- break;
- case ICAL_TUESDAY_WEEKDAY:
- weekday = 1;
- break;
- case ICAL_WEDNESDAY_WEEKDAY:
- weekday = 2;
- break;
- case ICAL_THURSDAY_WEEKDAY:
- weekday = 3;
- break;
- case ICAL_FRIDAY_WEEKDAY:
- weekday = 4;
- break;
- case ICAL_SATURDAY_WEEKDAY:
- weekday = 5;
- break;
- case ICAL_SUNDAY_WEEKDAY:
- weekday = 6;
- break;
- default:
- g_warning ("cal_recur_ical_weekday_to_weekday(): Unknown week day %d",
- day);
- weekday = 0;
- }
-
- return weekday;
-}
-
-
-/**
- * cal_recur_free:
- * @r: A #CalRecurrence structure.
- *
- * Frees a #CalRecurrence structure.
- **/
-static void
-cal_recur_free (CalRecurrence *r)
-{
- g_return_if_fail (r != NULL);
-
- g_list_free (r->bymonth);
- g_list_free (r->byweekno);
- g_list_free (r->byyearday);
- g_list_free (r->bymonthday);
- g_list_free (r->byday);
- g_list_free (r->byhour);
- g_list_free (r->byminute);
- g_list_free (r->bysecond);
- g_list_free (r->bysetpos);
-
- g_free (r);
-}
-
-/* Generates one year's worth of recurrence instances. Returns TRUE if all the
- * callback invocations returned TRUE, or FALSE when any one of them returns
- * FALSE, i.e. meaning that the instance generation should be stopped.
- *
- * This should only output instances whose start time is between chunk_start
- * and chunk_end (inclusive), or we may generate duplicates when we do the next
- * chunk. (This applies mainly to weekly recurrences, since weeks can span 2
- * years.)
- *
- * It should also only output instances that are on or after the event's
- * DTSTART property and that intersect the required interval, between
- * interval_start and interval_end.
- */
-static gboolean
-generate_instances_for_chunk (CalComponent *comp,
- time_t comp_dtstart,
- GSList *rrules,
- GSList *rdates,
- GSList *exrules,
- GSList *exdates,
- gboolean single_rule,
- CalObjTime *event_start,
- time_t interval_start,
- CalObjTime *chunk_start,
- CalObjTime *chunk_end,
- gint duration_days,
- gint duration_seconds,
- CalRecurInstanceFn cb,
- gpointer cb_data)
-{
- GArray *occs, *ex_occs, *tmp_occs, *rdate_periods;
- CalObjTime cotime, *occ;
- GSList *elem;
- gint i;
- time_t start_time, end_time;
- struct tm start_tm, end_tm;
- gboolean cb_status = TRUE, rule_finished, finished = TRUE;
-
-#if 0
- g_print ("In generate_instances_for_chunk rrules: %p\n"
- " %i/%i/%i %02i:%02i:%02i - %i/%i/%i %02i:%02i:%02i\n",
- rrules,
- chunk_start->day, chunk_start->month + 1,
- chunk_start->year, chunk_start->hour,
- chunk_start->minute, chunk_start->second,
- chunk_end->day, chunk_end->month + 1,
- chunk_end->year, chunk_end->hour,
- chunk_end->minute, chunk_end->second);
-#endif
-
- occs = g_array_new (FALSE, FALSE, sizeof (CalObjTime));
- ex_occs = g_array_new (FALSE, FALSE, sizeof (CalObjTime));
- rdate_periods = g_array_new (FALSE, FALSE,
- sizeof (CalObjRecurrenceDate));
-
- /* The original DTSTART property is included in the occurrence set,
- but not if we are just generating occurrences for a single rule. */
- if (!single_rule) {
- /* We add it if it is in this chunk. If it is after this chunk
- we set finished to FALSE, since we know we aren't finished
- yet. */
- if (cal_obj_time_compare_func (event_start, chunk_end) >= 0)
- finished = FALSE;
- else if (cal_obj_time_compare_func (event_start, chunk_start) >= 0)
- g_array_append_vals (occs, event_start, 1);
- }
-
- /* Expand each of the recurrence rules. */
- for (elem = rrules; elem; elem = elem->next) {
- icalproperty *prop;
- CalRecurrence *r;
-
- prop = elem->data;
- r = cal_recur_from_icalproperty (prop, FALSE);
-
- tmp_occs = cal_obj_expand_recurrence (event_start, r,
- chunk_start,
- chunk_end,
- &rule_finished);
- cal_recur_free (r);
-
- /* If any of the rules return FALSE for finished, we know we
- have to carry on so we set finished to FALSE. */
- if (!rule_finished)
- finished = FALSE;
-
- g_array_append_vals (occs, tmp_occs->data, tmp_occs->len);
- g_array_free (tmp_occs, TRUE);
- }
-
- /* Add on specific occurrence dates, flag them as RDATEs, and store
- a pointer to the period in the rdate_periods array. */
- for (elem = rdates; elem; elem = elem->next) {
- CalComponentPeriod *p;
- CalObjRecurrenceDate rdate;
- time_t t;
-
- p = elem->data;
- t = icaltime_as_timet (p->start);
- cal_object_time_from_time (&cotime, t);
-
- /* If the rdate is after the current chunk we set finished
- to FALSE, and we skip it. */
- if (cal_obj_time_compare_func (&cotime, chunk_end) >= 0) {
- finished = FALSE;
- continue;
- }
-
- /* Check if the end date or duration is set. If it is we need
- to store it so we can get it later. (libical seems to set
- second to -1 to denote an unset time. See icalvalue.c) */
- if (p->type != CAL_COMPONENT_PERIOD_DATETIME
- || p->u.end.second != -1) {
- cotime.is_rdate = TRUE;
-
- rdate.start = cotime;
- rdate.period = p;
- g_array_append_val (rdate_periods, rdate);
- }
-
- g_array_append_val (occs, cotime);
- }
-
- /* Expand each of the exception rules. */
- for (elem = exrules; elem; elem = elem->next) {
- icalproperty *prop;
- CalRecurrence *r;
-
- prop = elem->data;
- r = cal_recur_from_icalproperty (prop, FALSE);
-
- tmp_occs = cal_obj_expand_recurrence (event_start, r,
- chunk_start,
- chunk_end,
- &rule_finished);
- cal_recur_free (r);
-
- g_array_append_vals (ex_occs, tmp_occs->data, tmp_occs->len);
- g_array_free (tmp_occs, TRUE);
- }
-
- /* Add on specific exception dates. */
- for (elem = exdates; elem; elem = elem->next) {
- CalComponentDateTime *cdt;
- time_t t;
-
- /* FIXME we should only be dealing with dates, not times too.
-
- No, I think it is supposed to be dates & times - Damon.
- I'm not sure what the semantics of just a date would be,
- since the event could recur several times each day. */
- cdt = elem->data;
- t = icaltime_as_timet (*cdt->value);
- cal_object_time_from_time (&cotime, t);
-
- g_array_append_val (ex_occs, cotime);
- }
-
-
- /* Sort all the arrays. */
- cal_obj_sort_occurrences (occs);
- cal_obj_sort_occurrences (ex_occs);
-
- qsort (rdate_periods->data, rdate_periods->len,
- sizeof (CalObjRecurrenceDate), cal_obj_time_compare_func);
-
- /* Create the final array, by removing the exceptions from the
- occurrences, and removing any duplicates. */
- cal_obj_remove_exceptions (occs, ex_occs);
-
- /* Call the callback for each occurrence. If it returns 0 we break
- out of the loop. */
- for (i = 0; i < occs->len; i++) {
- /* Convert each CalObjTime into a start & end time_t, and
- check it is within the bounds of the event & interval. */
- occ = &g_array_index (occs, CalObjTime, i);
-#if 0
- g_print ("Checking occurrence: %s\n",
- cal_obj_time_to_string (occ));
-#endif
- start_tm.tm_year = occ->year - 1900;
- start_tm.tm_mon = occ->month;
- start_tm.tm_mday = occ->day;
- start_tm.tm_hour = occ->hour;
- start_tm.tm_min = occ->minute;
- start_tm.tm_sec = occ->second;
- start_tm.tm_isdst = -1;
- start_time = mktime (&start_tm);
-
- if (start_time == -1) {
- g_warning ("mktime failed - time_t out of range?");
- finished = TRUE;
- break;
- }
-
- /* Check to ensure that the start time is at or after the
- event's DTSTART time, and that it is inside the chunk that
- we are currently working on. (Note that the chunk_end time
- is never after the interval end time, so this also tests
- that we don't go past the end of the required interval). */
- if (start_time < comp_dtstart
- || cal_obj_time_compare_func (occ, chunk_start) < 0
- || cal_obj_time_compare_func (occ, chunk_end) > 0) {
-#if 0
- g_print (" start time invalid\n");
-#endif
- continue;
- }
-
- if (occ->is_rdate) {
- if (!cal_object_get_rdate_end (occ, rdate_periods)) {
- cal_obj_time_add_days (occ, duration_days);
- cal_obj_time_add_seconds (occ,
- duration_seconds);
- }
- } else {
- cal_obj_time_add_days (occ, duration_days);
- cal_obj_time_add_seconds (occ, duration_seconds);
- }
-
- end_tm.tm_year = occ->year - 1900;
- end_tm.tm_mon = occ->month;
- end_tm.tm_mday = occ->day;
- end_tm.tm_hour = occ->hour;
- end_tm.tm_min = occ->minute;
- end_tm.tm_sec = occ->second;
- end_tm.tm_isdst = -1;
- end_time = mktime (&end_tm);
-
- if (end_time == -1) {
- g_warning ("mktime failed - time_t out of range?");
- finished = TRUE;
- break;
- }
-
- /* Check that the end time is after the interval start, so we
- know that it intersects the required interval. */
- if (end_time <= interval_start) {
-#if 0
- g_print (" end time invalid\n");
-#endif
- continue;
- }
-
- cb_status = (*cb) (comp, start_time, end_time, cb_data);
- if (!cb_status)
- break;
- }
-
- g_array_free (occs, TRUE);
- g_array_free (ex_occs, TRUE);
- g_array_free (rdate_periods, TRUE);
-
- /* We return TRUE (i.e. carry on) only if the callback has always
- returned TRUE and we know that we have more occurrences to generate
- (i.e. finished is FALSE). */
- return cb_status && !finished;
-}
-
-
-/* This looks up the occurrence time in the sorted rdate_periods array, and
- tries to compute the end time of the occurrence. If no end time or duration
- is set it returns FALSE and the default duration will be used. */
-static gboolean
-cal_object_get_rdate_end (CalObjTime *occ,
- GArray *rdate_periods)
-{
- CalObjRecurrenceDate *rdate = NULL;
- CalComponentPeriod *p;
- gint lower, upper, middle, cmp = 0;
- time_t t;
-
- lower = 0;
- upper = rdate_periods->len;
-
- while (lower < upper) {
- middle = (lower + upper) >> 1;
-
- rdate = &g_array_index (rdate_periods, CalObjRecurrenceDate,
- middle);
-
- cmp = cal_obj_time_compare_func (occ, &rdate->start);
-
- if (cmp == 0)
- break;
- else if (cmp < 0)
- upper = middle;
- else
- lower = middle + 1;
- }
-
- /* This should never happen. */
- if (cmp == 0) {
- g_warning ("Recurrence date not found");
- return FALSE;
- }
-
- p = rdate->period;
- if (p->type == CAL_COMPONENT_PERIOD_DATETIME) {
- t = icaltime_as_timet (p->u.end);
- cal_object_time_from_time (occ, t);
- } else {
- cal_obj_time_add_days (occ, p->u.duration.weeks * 7
- + p->u.duration.days);
- cal_obj_time_add_hours (occ, p->u.duration.hours);
- cal_obj_time_add_minutes (occ, p->u.duration.minutes);
- cal_obj_time_add_seconds (occ, p->u.duration.seconds);
- }
-
- return TRUE;
-}
-
-
-static void
-cal_object_compute_duration (CalObjTime *start,
- CalObjTime *end,
- gint *days,
- gint *seconds)
-{
- GDate start_date, end_date;
- gint start_seconds, end_seconds;
-
- g_date_clear (&start_date, 1);
- g_date_clear (&end_date, 1);
- g_date_set_dmy (&start_date, start->day, start->month + 1,
- start->year);
- g_date_set_dmy (&end_date, end->day, end->month + 1,
- end->year);
-
- *days = g_date_julian (&end_date) - g_date_julian (&start_date);
- start_seconds = start->hour * 3600 + start->minute * 60
- + start->second;
- end_seconds = end->hour * 3600 + end->minute * 60 + end->second;
-
- *seconds = end_seconds - start_seconds;
- if (*seconds < 0) {
- *days = *days - 1;
- *seconds += 24 * 60 * 60;
- }
-}
-
-
-/* Returns an unsorted GArray of CalObjTime's resulting from expanding the
- given recurrence rule within the given interval. Note that it doesn't
- clip the generated occurrences to the interval, i.e. if the interval
- starts part way through the year this function still returns all the
- occurrences for the year. Clipping is done later.
- The finished flag is set to FALSE if there are more occurrences to generate
- after the given interval.*/
-static GArray*
-cal_obj_expand_recurrence (CalObjTime *event_start,
- CalRecurrence *recur,
- CalObjTime *interval_start,
- CalObjTime *interval_end,
- gboolean *finished)
-{
- CalRecurVTable *vtable;
- CalObjTime *event_end = NULL, event_end_cotime;
- RecurData recur_data;
- CalObjTime occ, *cotime;
- GArray *all_occs, *occs;
- gint len;
-
- /* This is the resulting array of CalObjTime elements. */
- all_occs = g_array_new (FALSE, FALSE, sizeof (CalObjTime));
-
- *finished = TRUE;
-
- vtable = cal_obj_get_vtable (recur->freq);
- if (!vtable)
- return all_occs;
-
- /* Calculate some useful data such as some fast lookup tables. */
- cal_obj_initialize_recur_data (&recur_data, recur, event_start);
-
- /* Compute the event_end, if the recur's enddate is set. */
- if (recur->enddate > 0) {
- cal_object_time_from_time (&event_end_cotime,
- recur->enddate);
- event_end = &event_end_cotime;
-
- /* If the enddate is before the requested interval return. */
- if (cal_obj_time_compare_func (event_end, interval_start) < 0)
- return all_occs;
- }
-
- /* Set finished to FALSE if we know there will be more occurrences to
- do after this interval. */
- if (!interval_end || !event_end
- || cal_obj_time_compare_func (event_end, interval_end) > 0)
- *finished = FALSE;
-
- /* 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_data,
- interval_start, interval_end,
- &occ))
- return all_occs;
-
- /* Loop until the event ends or we go past the end of the required
- interval. */
- for (;;) {
- /* Generate the set of occurrences for this period. */
- switch (recur->freq) {
- case ICAL_YEARLY_RECURRENCE:
- occs = cal_obj_generate_set_yearly (&recur_data,
- vtable, &occ);
- break;
- case ICAL_MONTHLY_RECURRENCE:
- occs = cal_obj_generate_set_monthly (&recur_data,
- vtable, &occ);
- break;
- default:
- occs = cal_obj_generate_set_default (&recur_data,
- vtable, &occ);
- break;
- }
-
- /* Sort the occurrences and remove duplicates. */
- cal_obj_sort_occurrences (occs);
- cal_obj_remove_duplicates_and_invalid_dates (occs);
-
- /* Apply the BYSETPOS property. */
- occs = cal_obj_bysetpos_filter (recur, occs);
-
- /* Remove any occs after event_end. */
- len = occs->len - 1;
- if (event_end) {
- while (len >= 0) {
- cotime = &g_array_index (occs, CalObjTime,
- len);
- if (cal_obj_time_compare_func (cotime,
- event_end) <= 0)
- break;
- len--;
- }
- }
-
- /* Add the occurrences onto the main array. */
- if (len >= 0)
- g_array_append_vals (all_occs, occs->data, len + 1);
-
- g_array_free (occs, TRUE);
-
- /* Skip to the next period, or exit the loop if finished. */
- if ((*vtable->find_next_position) (&occ, event_end,
- &recur_data, interval_end))
- break;
- }
-
- return all_occs;
-}
-
-
-static GArray*
-cal_obj_generate_set_yearly (RecurData *recur_data,
- CalRecurVTable *vtable,
- CalObjTime *occ)
-{
- CalRecurrence *recur = recur_data->recur;
- GArray *occs_arrays[4], *occs, *occs2;
- gint num_occs_arrays = 0, i;
-
- /* This is a bit complicated, since the iCalendar spec says that
- several BYxxx modifiers can be used simultaneously. So we have to
- be quite careful when determining the days of the occurrences.
- The BYHOUR, BYMINUTE & BYSECOND modifiers are no problem at all.
-
- The modifiers we have to worry about are: BYMONTH, BYWEEKNO,
- BYYEARDAY, BYMONTHDAY & BYDAY. We can't do these sequentially
- since each filter will mess up the results of the previous one.
- But they aren't all completely independant, e.g. BYMONTHDAY and
- BYDAY are related to BYMONTH, and BYDAY is related to BYWEEKNO.
-
- BYDAY & BYMONTHDAY can also be applied independently, which makes
- it worse. So we assume that if BYMONTH or BYWEEKNO is used, then
- the BYDAY modifier applies to those, else it is applied
- independantly.
-
- We expand the occurrences in parallel into the occs_arrays[] array,
- and then merge them all into one GArray before expanding BYHOUR,
- BYMINUTE & BYSECOND. */
-
- if (recur->bymonth) {
- occs = g_array_new (FALSE, FALSE, sizeof (CalObjTime));
- g_array_append_vals (occs, occ, 1);
-
- occs = (*vtable->bymonth_filter) (recur_data, occs);
-
- /* If BYMONTHDAY & BYDAY are both set we need to expand them
- in parallel and add the results. */
- if (recur->bymonthday && recur->byday) {
- /* Copy the occs array. */
- occs2 = g_array_new (FALSE, FALSE,
- sizeof (CalObjTime));
- g_array_append_vals (occs2, occs->data, occs->len);
-
- occs = (*vtable->bymonthday_filter) (recur_data, occs);
- /* Note that we explicitly call the monthly version
- of the BYDAY expansion filter. */
- occs2 = cal_obj_byday_expand_monthly (recur_data,
- occs2);
-
- /* Add the 2 resulting arrays together. */
- g_array_append_vals (occs, occs2->data, occs2->len);
- g_array_free (occs2, TRUE);
- } else {
- occs = (*vtable->bymonthday_filter) (recur_data, occs);
- /* Note that we explicitly call the monthly version
- of the BYDAY expansion filter. */
- occs = cal_obj_byday_expand_monthly (recur_data, occs);
- }
-
- occs_arrays[num_occs_arrays++] = occs;
- }
-
- if (recur->byweekno) {
- occs = g_array_new (FALSE, FALSE, sizeof (CalObjTime));
- g_array_append_vals (occs, occ, 1);
-
- occs = (*vtable->byweekno_filter) (recur_data, occs);
- /* Note that we explicitly call the weekly version of the
- BYDAY expansion filter. */
- occs = cal_obj_byday_expand_weekly (recur_data, occs);
-
- occs_arrays[num_occs_arrays++] = occs;
- }
-
- if (recur->byyearday) {
- occs = g_array_new (FALSE, FALSE, sizeof (CalObjTime));
- g_array_append_vals (occs, occ, 1);
-
- occs = (*vtable->byyearday_filter) (recur_data, occs);
-
- occs_arrays[num_occs_arrays++] = occs;
- }
-
- /* If BYMONTHDAY is set, and BYMONTH is not set, we need to
- expand BYMONTHDAY independantly. */
- if (recur->bymonthday && !recur->bymonth) {
- occs = g_array_new (FALSE, FALSE, sizeof (CalObjTime));
- g_array_append_vals (occs, occ, 1);
-
- occs = (*vtable->bymonthday_filter) (recur_data, occs);
-
- occs_arrays[num_occs_arrays++] = occs;
- }
-
- /* If BYDAY is set, and BYMONTH and BYWEEKNO are not set, we need to
- expand BYDAY independantly. */
- if (recur->byday && !recur->bymonth && !recur->byweekno) {
- occs = g_array_new (FALSE, FALSE, sizeof (CalObjTime));
- g_array_append_vals (occs, occ, 1);
-
- occs = (*vtable->byday_filter) (recur_data, occs);
-
- occs_arrays[num_occs_arrays++] = occs;
- }
-
- /* Add all the arrays together. If no filters were used we just
- create an array with one element. */
- if (num_occs_arrays > 0) {
- occs = occs_arrays[0];
- for (i = 1; i < num_occs_arrays; i++) {
- occs2 = occs_arrays[i];
- g_array_append_vals (occs, occs2->data, occs2->len);
- g_array_free (occs2, TRUE);
- }
- } else {
- occs = g_array_new (FALSE, FALSE, sizeof (CalObjTime));
- g_array_append_vals (occs, occ, 1);
- }
-
- /* Now expand BYHOUR, BYMINUTE & BYSECOND. */
- occs = (*vtable->byhour_filter) (recur_data, occs);
- occs = (*vtable->byminute_filter) (recur_data, occs);
- occs = (*vtable->bysecond_filter) (recur_data, occs);
-
- return occs;
-}
-
-
-static GArray*
-cal_obj_generate_set_monthly (RecurData *recur_data,
- CalRecurVTable *vtable,
- CalObjTime *occ)
-{
- GArray *occs, *occs2;
-
- /* We start with just the one time in each set. */
- occs = g_array_new (FALSE, FALSE, sizeof (CalObjTime));
- g_array_append_vals (occs, occ, 1);
-
- occs = (*vtable->bymonth_filter) (recur_data, occs);
-
- /* We need to combine the output of BYMONTHDAY & BYDAY, by doing them
- in parallel rather than sequentially. If we did them sequentially
- then we would lose the occurrences generated by BYMONTHDAY, and
- instead have repetitions of the occurrences from BYDAY. */
- if (recur_data->recur->bymonthday && recur_data->recur->byday) {
- occs2 = g_array_new (FALSE, FALSE, sizeof (CalObjTime));
- g_array_append_vals (occs2, occs->data, occs->len);
-
- occs = (*vtable->bymonthday_filter) (recur_data, occs);
- occs2 = (*vtable->byday_filter) (recur_data, occs2);
-
- g_array_append_vals (occs, occs2->data, occs2->len);
- g_array_free (occs2, TRUE);
- } else {
- occs = (*vtable->bymonthday_filter) (recur_data, occs);
- occs = (*vtable->byday_filter) (recur_data, occs);
- }
-
- occs = (*vtable->byhour_filter) (recur_data, occs);
- occs = (*vtable->byminute_filter) (recur_data, occs);
- occs = (*vtable->bysecond_filter) (recur_data, occs);
-
- return occs;
-}
-
-
-static GArray*
-cal_obj_generate_set_default (RecurData *recur_data,
- CalRecurVTable *vtable,
- CalObjTime *occ)
-{
- GArray *occs;
-
-#if 0
- g_print ("Generating set for %i/%i/%i %02i:%02i:%02i\n",
- occ->day, occ->month + 1, occ->year, occ->hour, occ->minute,
- occ->second);
-#endif
-
- /* We start with just the one time in the set. */
- occs = g_array_new (FALSE, FALSE, sizeof (CalObjTime));
- g_array_append_vals (occs, occ, 1);
-
- occs = (*vtable->bymonth_filter) (recur_data, occs);
- if (vtable->byweekno_filter)
- occs = (*vtable->byweekno_filter) (recur_data, occs);
- if (vtable->byyearday_filter)
- occs = (*vtable->byyearday_filter) (recur_data, occs);
- if (vtable->bymonthday_filter)
- occs = (*vtable->bymonthday_filter) (recur_data, occs);
- occs = (*vtable->byday_filter) (recur_data, occs);
-
- occs = (*vtable->byhour_filter) (recur_data, occs);
- occs = (*vtable->byminute_filter) (recur_data, occs);
- occs = (*vtable->bysecond_filter) (recur_data, occs);
-
- return occs;
-}
-
-
-
-/* Returns the function table corresponding to the recurrence frequency. */
-static CalRecurVTable* cal_obj_get_vtable (icalrecurrencetype_frequency recur_type)
-{
- CalRecurVTable* vtable;
-
- switch (recur_type) {
- case ICAL_YEARLY_RECURRENCE:
- vtable = &cal_obj_yearly_vtable;
- break;
- case ICAL_MONTHLY_RECURRENCE:
- vtable = &cal_obj_monthly_vtable;
- break;
- case ICAL_WEEKLY_RECURRENCE:
- vtable = &cal_obj_weekly_vtable;
- break;
- case ICAL_DAILY_RECURRENCE:
- vtable = &cal_obj_daily_vtable;
- break;
- case ICAL_HOURLY_RECURRENCE:
- vtable = &cal_obj_hourly_vtable;
- break;
- case ICAL_MINUTELY_RECURRENCE:
- vtable = &cal_obj_minutely_vtable;
- break;
- case ICAL_SECONDLY_RECURRENCE:
- vtable = &cal_obj_secondly_vtable;
- break;
- default:
- g_warning ("Unknown recurrence frequenct");
- vtable = NULL;
- }
-
- return vtable;
-}
-
-
-/* This creates a number of fast lookup tables used when filtering with the
- modifier properties BYMONTH, BYYEARDAY etc. */
-static void
-cal_obj_initialize_recur_data (RecurData *recur_data,
- CalRecurrence *recur,
- CalObjTime *event_start)
-{
- GList *elem;
- gint month, yearday, monthday, weekday, week_num, hour, minute, second;
-
- /* Clear the entire RecurData. */
- memset (recur_data, 0, sizeof (RecurData));
-
- recur_data->recur = recur;
-
- /* Set the weekday, used for the WEEKLY frequency and the BYWEEKNO
- modifier. */
- recur_data->weekday_offset = cal_obj_time_weekday_offset (event_start,
- recur);
-
- /* Create an array of months from bymonths for fast lookup. */
- elem = recur->bymonth;
- while (elem) {
- month = GPOINTER_TO_INT (elem->data);
- recur_data->months[month] = 1;
- elem = elem->next;
- }
-
- /* Create an array of yeardays from byyearday for fast lookup.
- We create a second array to handle the negative values. The first
- element there corresponds to the last day of the year. */
- elem = recur->byyearday;
- while (elem) {
- yearday = GPOINTER_TO_INT (elem->data);
- if (yearday >= 0)
- recur_data->yeardays[yearday] = 1;
- else
- recur_data->neg_yeardays[-yearday] = 1;
- elem = elem->next;
- }
-
- /* Create an array of monthdays from bymonthday for fast lookup.
- We create a second array to handle the negative values. The first
- element there corresponds to the last day of the month. */
- elem = recur->bymonthday;
- while (elem) {
- monthday = GPOINTER_TO_INT (elem->data);
- if (monthday >= 0)
- recur_data->monthdays[monthday] = 1;
- else
- recur_data->neg_monthdays[-monthday] = 1;
- elem = elem->next;
- }
-
- /* Create an array of weekdays from byday for fast lookup. */
- elem = recur->byday;
- while (elem) {
- weekday = GPOINTER_TO_INT (elem->data);
- elem = elem->next;
- /* The week number is not used when filtering. */
- week_num = GPOINTER_TO_INT (elem->data);
- elem = elem->next;
-
- recur_data->weekdays[weekday] = 1;
- }
-
- /* Create an array of hours from byhour for fast lookup. */
- elem = recur->byhour;
- while (elem) {
- hour = GPOINTER_TO_INT (elem->data);
- recur_data->hours[hour] = 1;
- elem = elem->next;
- }
-
- /* Create an array of minutes from byminutes for fast lookup. */
- elem = recur->byminute;
- while (elem) {
- minute = GPOINTER_TO_INT (elem->data);
- recur_data->minutes[minute] = 1;
- elem = elem->next;
- }
-
- /* Create an array of seconds from byseconds for fast lookup. */
- elem = recur->bysecond;
- while (elem) {
- second = GPOINTER_TO_INT (elem->data);
- recur_data->seconds[second] = 1;
- elem = elem->next;
- }
-}
-
-
-static void
-cal_obj_sort_occurrences (GArray *occs)
-{
- qsort (occs->data, occs->len, sizeof (CalObjTime),
- cal_obj_time_compare_func);
-}
-
-
-static void
-cal_obj_remove_duplicates_and_invalid_dates (GArray *occs)
-{
- static const int days_in_month[12] = {
- 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
- };
-
- CalObjTime *occ, *prev_occ = NULL;
- gint len, i, j = 0, year, month, days;
- gboolean keep_occ;
-
- len = occs->len;
- for (i = 0; i < len; i++) {
- occ = &g_array_index (occs, CalObjTime, i);
- keep_occ = TRUE;
-
- if (prev_occ && cal_obj_time_compare_func (occ,
- prev_occ) == 0)
- keep_occ = FALSE;
-
- year = occ->year;
- month = occ->month;
- days = days_in_month[occ->month];
- /* If it is february and a leap year, add a day. */
- if (month == 1 && (year % 4 == 0
- && (year % 100 != 0
- || year % 400 == 0)))
- days++;
- if (occ->day > days)
- keep_occ = FALSE;
-
- if (keep_occ) {
- 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);
-}
-
-
-/* Removes the exceptions from the ex_occs array from the occurrences in the
- occs array, and removes any duplicates. Both arrays are sorted. */
-static void
-cal_obj_remove_exceptions (GArray *occs,
- GArray *ex_occs)
-{
- CalObjTime *occ, *prev_occ = NULL, *ex_occ = NULL, *last_occ_kept;
- gint i, j = 0, cmp, ex_index, occs_len, ex_occs_len;
- gboolean keep_occ, current_time_is_exception = FALSE;
-
- if (occs->len == 0)
- return;
-
- ex_index = 0;
- occs_len = occs->len;
- ex_occs_len = ex_occs->len;
-
- if (ex_occs_len > 0)
- ex_occ = &g_array_index (ex_occs, CalObjTime, ex_index);
-
- for (i = 0; i < occs_len; i++) {
- occ = &g_array_index (occs, CalObjTime, i);
- keep_occ = TRUE;
-
- /* If the occurrence is a duplicate of the previous one, skip
- it. */
- if (prev_occ
- && cal_obj_time_compare_func (occ, prev_occ) == 0) {
- keep_occ = FALSE;
-
- /* If this occurrence is an RDATE, and the previous
- occurrence in the array was kept, set the RDATE flag
- of the last one, so we still use the end date
- or duration. */
- if (occ->is_rdate && !current_time_is_exception) {
- last_occ_kept = &g_array_index (occs,
- CalObjTime,
- j - 1);
- last_occ_kept->is_rdate = TRUE;
- }
- } else {
- /* We've found a new occurrence time. Reset the flag
- to indicate that it hasn't been found in the
- exceptions array (yet). */
- current_time_is_exception = FALSE;
-
- if (ex_occ) {
- /* Step through the exceptions until we come
- to one that matches or follows this
- occurrence. */
- while (ex_occ) {
- cmp = cal_obj_time_compare_func (ex_occ, occ);
- /* I'm pretty sure this is wrong. */
- /*cmp = cal_obj_date_only_compare_func (ex_occ, occ);*/
- if (cmp > 0)
- break;
-
- /* Move to the next exception, or set
- ex_occ to NULL when we reach the
- end of array. */
- ex_index++;
- if (ex_index < ex_occs_len)
- ex_occ = &g_array_index (ex_occs, CalObjTime, ex_index);
- else
- ex_occ = NULL;
-
- /* If the exception did match this
- occurrence we remove it, and set the
- flag to indicate that the current
- time is an exception. */
- if (cmp == 0) {
- current_time_is_exception = TRUE;
- keep_occ = FALSE;
- break;
- }
- }
- }
- }
-
- if (keep_occ) {
- 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 (CalRecurrence *recur,
- GArray *occs)
-{
- GArray *new_occs;
- CalObjTime *occ;
- GList *elem;
- gint len, pos;
-
- /* If BYSETPOS has not been specified, or the array is empty, just
- return the array. */
- elem = recur->bysetpos;
- if (!elem || occs->len == 0)
- return occs;
-
- new_occs = g_array_new (FALSE, FALSE, sizeof (CalObjTime));
-
- /* Iterate over the indices given in bysetpos, adding the corresponding
- element from occs to new_occs. */
- len = occs->len;
- while (elem) {
- pos = GPOINTER_TO_INT (elem->data);
-
- /* Negative values count back from the end of the array. */
- if (pos < 0)
- pos += len;
-
- if (pos >= 0 && pos < len) {
- occ = &g_array_index (occs, CalObjTime, pos);
- g_array_append_vals (new_occs, occ, 1);
- }
- elem = elem->next;
- }
-
- g_array_free (occs, TRUE);
-
- return new_occs;
-}
-
-
-
-
-/* Finds the first year from the event_start, counting in multiples of the
- recurrence interval, that intersects the given interval. It returns TRUE
- if there is no intersection. */
-static gboolean
-cal_obj_yearly_find_start_position (CalObjTime *event_start,
- CalObjTime *event_end,
- RecurData *recur_data,
- CalObjTime *interval_start,
- CalObjTime *interval_end,
- CalObjTime *cotime)
-{
- *cotime = *event_start;
-
- /* Move on to the next interval, if the event starts before the
- given interval. */
- if (cotime->year < interval_start->year) {
- gint years = interval_start->year - cotime->year
- + recur_data->recur->interval - 1;
- years -= years % recur_data->recur->interval;
- /* NOTE: The day may now be invalid, e.g. 29th Feb. */
- cotime->year += years;
- }
-
- if ((event_end && cotime->year > event_end->year)
- || (interval_end && cotime->year > interval_end->year))
- return TRUE;
-
- return FALSE;
-}
-
-
-static gboolean
-cal_obj_yearly_find_next_position (CalObjTime *cotime,
- CalObjTime *event_end,
- RecurData *recur_data,
- CalObjTime *interval_end)
-{
- /* NOTE: The day may now be invalid, e.g. 29th Feb. */
- cotime->year += recur_data->recur->interval;
-
- if ((event_end && cotime->year > event_end->year)
- || (interval_end && cotime->year > interval_end->year))
- return TRUE;
-
- return FALSE;
-}
-
-
-
-static gboolean
-cal_obj_monthly_find_start_position (CalObjTime *event_start,
- CalObjTime *event_end,
- RecurData *recur_data,
- CalObjTime *interval_start,
- CalObjTime *interval_end,
- CalObjTime *cotime)
-{
- *cotime = *event_start;
-
- /* Move on to the next interval, if the event starts before the
- given interval. */
- if (cal_obj_time_compare (cotime, interval_start, CALOBJ_MONTH) < 0) {
- gint months = (interval_start->year - cotime->year) * 12
- + interval_start->month - cotime->month
- + recur_data->recur->interval - 1;
- months -= months % recur_data->recur->interval;
- /* NOTE: The day may now be invalid, e.g. 31st Sep. */
- cal_obj_time_add_months (cotime, months);
- }
-
- if (event_end && cal_obj_time_compare (cotime, event_end,
- CALOBJ_MONTH) > 0)
- return TRUE;
- if (interval_end && cal_obj_time_compare (cotime, interval_end,
- CALOBJ_MONTH) > 0)
- return TRUE;
-
- return FALSE;
-}
-
-
-static gboolean
-cal_obj_monthly_find_next_position (CalObjTime *cotime,
- CalObjTime *event_end,
- RecurData *recur_data,
- CalObjTime *interval_end)
-{
- /* NOTE: The day may now be invalid, e.g. 31st Sep. */
- cal_obj_time_add_months (cotime, recur_data->recur->interval);
-
- if (event_end && cal_obj_time_compare (cotime, event_end,
- CALOBJ_MONTH) > 0)
- return TRUE;
- if (interval_end && cal_obj_time_compare (cotime, interval_end,
- CALOBJ_MONTH) > 0)
- return TRUE;
-
- return FALSE;
-}
-
-
-
-static gboolean
-cal_obj_weekly_find_start_position (CalObjTime *event_start,
- CalObjTime *event_end,
- RecurData *recur_data,
- CalObjTime *interval_start,
- CalObjTime *interval_end,
- CalObjTime *cotime)
-{
- GDate event_start_date, interval_start_date;
- guint32 event_start_julian, interval_start_julian;
- gint interval_start_weekday_offset;
- CalObjTime week_start;
-
- if (event_end && cal_obj_time_compare (event_end, interval_start,
- CALOBJ_DAY) < 0)
- return TRUE;
- if (interval_end && cal_obj_time_compare (event_start, interval_end,
- CALOBJ_DAY) > 0)
- return TRUE;
-
- *cotime = *event_start;
-
- /* Convert the event start and interval start to GDates, so we can
- easily find the number of days between them. */
- g_date_clear (&event_start_date, 1);
- g_date_set_dmy (&event_start_date, event_start->day,
- event_start->month + 1, event_start->year);
- g_date_clear (&interval_start_date, 1);
- g_date_set_dmy (&interval_start_date, interval_start->day,
- interval_start->month + 1, interval_start->year);
-
- /* Calculate the start of the weeks corresponding to the event start
- and interval start. */
- event_start_julian = g_date_julian (&event_start_date);
- event_start_julian -= recur_data->weekday_offset;
-
- interval_start_julian = g_date_julian (&interval_start_date);
- interval_start_weekday_offset = cal_obj_time_weekday_offset (interval_start, recur_data->recur);
- interval_start_julian -= interval_start_weekday_offset;
-
- /* We want to find the first full week using the recurrence interval
- that intersects the given interval dates. */
- if (event_start_julian < interval_start_julian) {
- gint weeks = (interval_start_julian - event_start_julian) / 7;
- weeks += recur_data->recur->interval - 1;
- weeks -= weeks % recur_data->recur->interval;
- cal_obj_time_add_days (cotime, weeks * 7);
- }
-
- week_start = *cotime;
- cal_obj_time_add_days (&week_start, -recur_data->weekday_offset);
-
- if (event_end && cal_obj_time_compare (&week_start, event_end,
- CALOBJ_DAY) > 0)
- return TRUE;
- if (interval_end && cal_obj_time_compare (&week_start, interval_end,
- CALOBJ_DAY) > 0)
- return TRUE;
-
- return FALSE;
-}
-
-
-static gboolean
-cal_obj_weekly_find_next_position (CalObjTime *cotime,
- CalObjTime *event_end,
- RecurData *recur_data,
- CalObjTime *interval_end)
-{
- CalObjTime week_start;
-
- cal_obj_time_add_days (cotime, recur_data->recur->interval * 7);
-
- /* Return TRUE if the start of this week is after the event finishes
- or is after the end of the required interval. */
- week_start = *cotime;
- cal_obj_time_add_days (&week_start, -recur_data->weekday_offset);
-
-#ifdef CAL_OBJ_DEBUG
- g_print ("Next day: %s\n", cal_obj_time_to_string (cotime));
- g_print ("Week Start: %s\n", cal_obj_time_to_string (&week_start));
-#endif
-
- if (event_end && cal_obj_time_compare (&week_start, event_end,
- CALOBJ_DAY) > 0)
- return TRUE;
- if (interval_end && cal_obj_time_compare (&week_start, interval_end,
- CALOBJ_DAY) > 0) {
-#ifdef CAL_OBJ_DEBUG
- g_print ("Interval end reached: %s\n",
- cal_obj_time_to_string (interval_end));
-#endif
- return TRUE;
- }
-
- return FALSE;
-}
-
-
-static gboolean
-cal_obj_daily_find_start_position (CalObjTime *event_start,
- CalObjTime *event_end,
- RecurData *recur_data,
- CalObjTime *interval_start,
- CalObjTime *interval_end,
- CalObjTime *cotime)
-{
- GDate event_start_date, interval_start_date;
- guint32 event_start_julian, interval_start_julian, days;
-
- if (interval_end && cal_obj_time_compare (event_start, interval_end,
- CALOBJ_DAY) > 0)
- return TRUE;
- if (event_end && cal_obj_time_compare (event_end, interval_start,
- CALOBJ_DAY) < 0)
- return TRUE;
-
- *cotime = *event_start;
-
- /* Convert the event start and interval start to GDates, so we can
- easily find the number of days between them. */
- g_date_clear (&event_start_date, 1);
- g_date_set_dmy (&event_start_date, event_start->day,
- event_start->month + 1, event_start->year);
- g_date_clear (&interval_start_date, 1);
- g_date_set_dmy (&interval_start_date, interval_start->day,
- interval_start->month + 1, interval_start->year);
-
- event_start_julian = g_date_julian (&event_start_date);
- interval_start_julian = g_date_julian (&interval_start_date);
-
- if (event_start_julian < interval_start_julian) {
- days = interval_start_julian - event_start_julian
- + recur_data->recur->interval - 1;
- days -= days % recur_data->recur->interval;
- cal_obj_time_add_days (cotime, days);
- }
-
- if (event_end && cal_obj_time_compare (cotime, event_end,
- CALOBJ_DAY) > 0)
- return TRUE;
- if (interval_end && cal_obj_time_compare (cotime, interval_end,
- CALOBJ_DAY) > 0)
- return TRUE;
-
- return FALSE;
-}
-
-
-static gboolean
-cal_obj_daily_find_next_position (CalObjTime *cotime,
- CalObjTime *event_end,
- RecurData *recur_data,
- CalObjTime *interval_end)
-{
- cal_obj_time_add_days (cotime, recur_data->recur->interval);
-
- if (event_end && cal_obj_time_compare (cotime, event_end,
- CALOBJ_DAY) > 0)
- return TRUE;
- if (interval_end && cal_obj_time_compare (cotime, interval_end,
- CALOBJ_DAY) > 0)
- return TRUE;
-
- return FALSE;
-}
-
-
-static gboolean
-cal_obj_hourly_find_start_position (CalObjTime *event_start,
- CalObjTime *event_end,
- RecurData *recur_data,
- CalObjTime *interval_start,
- CalObjTime *interval_end,
- CalObjTime *cotime)
-{
- GDate event_start_date, interval_start_date;
- guint32 event_start_julian, interval_start_julian, hours;
-
- if (interval_end && cal_obj_time_compare (event_start, interval_end,
- CALOBJ_HOUR) > 0)
- return TRUE;
- if (event_end && cal_obj_time_compare (event_end, interval_start,
- CALOBJ_HOUR) < 0)
- return TRUE;
-
- *cotime = *event_start;
-
- if (cal_obj_time_compare (event_start, interval_start,
- CALOBJ_HOUR) < 0) {
- /* Convert the event start and interval start to GDates, so we
- can easily find the number of days between them. */
- g_date_clear (&event_start_date, 1);
- g_date_set_dmy (&event_start_date, event_start->day,
- event_start->month + 1, event_start->year);
- g_date_clear (&interval_start_date, 1);
- g_date_set_dmy (&interval_start_date, interval_start->day,
- interval_start->month + 1,
- interval_start->year);
-
- event_start_julian = g_date_julian (&event_start_date);
- interval_start_julian = g_date_julian (&interval_start_date);
-
- hours = (interval_start_julian - event_start_julian) * 24;
- hours += interval_start->hour - event_start->hour;
- hours += recur_data->recur->interval - 1;
- hours -= hours % recur_data->recur->interval;
- cal_obj_time_add_hours (cotime, hours);
- }
-
- if (event_end && cal_obj_time_compare (cotime, event_end,
- CALOBJ_HOUR) > 0)
- return TRUE;
- if (interval_end && cal_obj_time_compare (cotime, interval_end,
- CALOBJ_HOUR) > 0)
- return TRUE;
-
- return FALSE;
-}
-
-
-static gboolean
-cal_obj_hourly_find_next_position (CalObjTime *cotime,
- CalObjTime *event_end,
- RecurData *recur_data,
- CalObjTime *interval_end)
-{
- cal_obj_time_add_hours (cotime, recur_data->recur->interval);
-
- if (event_end && cal_obj_time_compare (cotime, event_end,
- CALOBJ_HOUR) > 0)
- return TRUE;
- if (interval_end && cal_obj_time_compare (cotime, interval_end,
- CALOBJ_HOUR) > 0)
- return TRUE;
-
- return FALSE;
-}
-
-
-static gboolean
-cal_obj_minutely_find_start_position (CalObjTime *event_start,
- CalObjTime *event_end,
- RecurData *recur_data,
- CalObjTime *interval_start,
- CalObjTime *interval_end,
- CalObjTime *cotime)
-{
- GDate event_start_date, interval_start_date;
- guint32 event_start_julian, interval_start_julian, minutes;
-
- if (interval_end && cal_obj_time_compare (event_start, interval_end,
- CALOBJ_MINUTE) > 0)
- return TRUE;
- if (event_end && cal_obj_time_compare (event_end, interval_start,
- CALOBJ_MINUTE) < 0)
- return TRUE;
-
- *cotime = *event_start;
-
- if (cal_obj_time_compare (event_start, interval_start,
- CALOBJ_MINUTE) < 0) {
- /* Convert the event start and interval start to GDates, so we
- can easily find the number of days between them. */
- g_date_clear (&event_start_date, 1);
- g_date_set_dmy (&event_start_date, event_start->day,
- event_start->month + 1, event_start->year);
- g_date_clear (&interval_start_date, 1);
- g_date_set_dmy (&interval_start_date, interval_start->day,
- interval_start->month + 1,
- interval_start->year);
-
- event_start_julian = g_date_julian (&event_start_date);
- interval_start_julian = g_date_julian (&interval_start_date);
-
- minutes = (interval_start_julian - event_start_julian)
- * 24 * 60;
- minutes += (interval_start->hour - event_start->hour) * 24;
- minutes += interval_start->minute - event_start->minute;
- minutes += recur_data->recur->interval - 1;
- minutes -= minutes % recur_data->recur->interval;
- cal_obj_time_add_minutes (cotime, minutes);
- }
-
- if (event_end && cal_obj_time_compare (cotime, event_end,
- CALOBJ_MINUTE) > 0)
- return TRUE;
- if (interval_end && cal_obj_time_compare (cotime, interval_end,
- CALOBJ_MINUTE) > 0)
- return TRUE;
-
- return FALSE;
-}
-
-
-static gboolean
-cal_obj_minutely_find_next_position (CalObjTime *cotime,
- CalObjTime *event_end,
- RecurData *recur_data,
- CalObjTime *interval_end)
-{
- cal_obj_time_add_minutes (cotime, recur_data->recur->interval);
-
- if (event_end && cal_obj_time_compare (cotime, event_end,
- CALOBJ_MINUTE) > 0)
- return TRUE;
- if (interval_end && cal_obj_time_compare (cotime, interval_end,
- CALOBJ_MINUTE) > 0)
- return TRUE;
-
- return FALSE;
-}
-
-
-static gboolean
-cal_obj_secondly_find_start_position (CalObjTime *event_start,
- CalObjTime *event_end,
- RecurData *recur_data,
- CalObjTime *interval_start,
- CalObjTime *interval_end,
- CalObjTime *cotime)
-{
- GDate event_start_date, interval_start_date;
- guint32 event_start_julian, interval_start_julian, seconds;
-
- if (interval_end && cal_obj_time_compare (event_start, interval_end,
- CALOBJ_SECOND) > 0)
- return TRUE;
- if (event_end && cal_obj_time_compare (event_end, interval_start,
- CALOBJ_SECOND) < 0)
- return TRUE;
-
- *cotime = *event_start;
-
- if (cal_obj_time_compare (event_start, interval_start,
- CALOBJ_SECOND) < 0) {
- /* Convert the event start and interval start to GDates, so we
- can easily find the number of days between them. */
- g_date_clear (&event_start_date, 1);
- g_date_set_dmy (&event_start_date, event_start->day,
- event_start->month + 1, event_start->year);
- g_date_clear (&interval_start_date, 1);
- g_date_set_dmy (&interval_start_date, interval_start->day,
- interval_start->month + 1,
- interval_start->year);
-
- event_start_julian = g_date_julian (&event_start_date);
- interval_start_julian = g_date_julian (&interval_start_date);
-
- seconds = (interval_start_julian - event_start_julian)
- * 24 * 60 * 60;
- seconds += (interval_start->hour - event_start->hour)
- * 24 * 60;
- seconds += (interval_start->minute - event_start->minute) * 60;
- seconds += interval_start->second - event_start->second;
- seconds += recur_data->recur->interval - 1;
- seconds -= seconds % recur_data->recur->interval;
- cal_obj_time_add_seconds (cotime, seconds);
- }
-
- if (event_end && cal_obj_time_compare (cotime, event_end,
- CALOBJ_SECOND) >= 0)
- return TRUE;
- if (interval_end && cal_obj_time_compare (cotime, interval_end,
- CALOBJ_SECOND) >= 0)
- return TRUE;
-
- return FALSE;
-}
-
-
-static gboolean
-cal_obj_secondly_find_next_position (CalObjTime *cotime,
- CalObjTime *event_end,
- RecurData *recur_data,
- CalObjTime *interval_end)
-{
- cal_obj_time_add_seconds (cotime, recur_data->recur->interval);
-
- if (event_end && cal_obj_time_compare (cotime, event_end,
- CALOBJ_SECOND) >= 0)
- return TRUE;
- if (interval_end && cal_obj_time_compare (cotime, interval_end,
- CALOBJ_SECOND) >= 0)
- return TRUE;
-
- 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 (RecurData *recur_data,
- 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_data->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_data->recur->bymonth;
- while (elem) {
- /* NOTE: The day may now be invalid, e.g. 31st Feb. */
- 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 (RecurData *recur_data,
- GArray *occs)
-{
- GArray *new_occs;
- CalObjTime *occ;
- gint len, i;
-
- /* If BYMONTH has not been specified, or the array is empty, just
- return the array. */
- if (!recur_data->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);
- if (recur_data->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 (RecurData *recur_data,
- GArray *occs)
-{
- GArray *new_occs;
- CalObjTime *occ, year_start_cotime, year_end_cotime, cotime;
- GList *elem;
- gint len, i, weekno;
-
- /* If BYWEEKNO has not been specified, or the array is empty, just
- return the array. */
- if (!recur_data->recur->byweekno || 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);
-
- /* Find the day that would correspond to week 1 (note that
- week 1 is the first week starting from the specified week
- start day that has 4 days in the new year). */
- year_start_cotime = *occ;
- cal_obj_time_find_first_week (&year_start_cotime,
- recur_data);
-
- /* Find the day that would correspond to week 1 of the next
- year, which we use for -ve week numbers. */
- year_end_cotime = *occ;
- year_end_cotime.year++;
- cal_obj_time_find_first_week (&year_end_cotime,
- recur_data);
-
- /* Now iterate over the week numbers in byweekno, generating a
- new occurrence for each one. */
- elem = recur_data->recur->byweekno;
- while (elem) {
- weekno = GPOINTER_TO_INT (elem->data);
- if (weekno > 0) {
- cotime = year_start_cotime;
- cal_obj_time_add_days (&cotime,
- (weekno - 1) * 7);
- } else {
- cotime = year_end_cotime;
- cal_obj_time_add_days (&cotime, weekno * 7);
- }
-
- /* Skip occurrences if they fall outside the year. */
- if (cotime.year == occ->year)
- g_array_append_val (new_occs, cotime);
- elem = elem->next;
- }
- }
-
- g_array_free (occs, TRUE);
-
- return new_occs;
-}
-
-
-#if 0
-/* This isn't used at present. */
-static GArray*
-cal_obj_byweekno_filter (RecurData *recur_data,
- GArray *occs)
-{
-
- return occs;
-}
-#endif
-
-
-static GArray*
-cal_obj_byyearday_expand (RecurData *recur_data,
- GArray *occs)
-{
- GArray *new_occs;
- CalObjTime *occ, year_start_cotime, year_end_cotime, cotime;
- GList *elem;
- gint len, i, dayno;
-
- /* If BYYEARDAY has not been specified, or the array is empty, just
- return the array. */
- if (!recur_data->recur->byyearday || 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);
-
- /* Find the day that would correspond to day 1. */
- year_start_cotime = *occ;
- year_start_cotime.month = 0;
- year_start_cotime.day = 1;
-
- /* Find the day that would correspond to day 1 of the next
- year, which we use for -ve day numbers. */
- year_end_cotime = *occ;
- year_end_cotime.year++;
- year_end_cotime.month = 0;
- year_end_cotime.day = 1;
-
- /* Now iterate over the day numbers in byyearday, generating a
- new occurrence for each one. */
- elem = recur_data->recur->byyearday;
- while (elem) {
- dayno = GPOINTER_TO_INT (elem->data);
- if (dayno > 0) {
- cotime = year_start_cotime;
- cal_obj_time_add_days (&cotime, dayno - 1);
- } else {
- cotime = year_end_cotime;
- cal_obj_time_add_days (&cotime, dayno);
- }
-
- /* Skip occurrences if they fall outside the year. */
- if (cotime.year == occ->year)
- g_array_append_val (new_occs, cotime);
- elem = elem->next;
- }
- }
-
- g_array_free (occs, TRUE);
-
- return new_occs;
-}
-
-
-/* Note: occs must not contain invalid dates, e.g. 31st September. */
-static GArray*
-cal_obj_byyearday_filter (RecurData *recur_data,
- GArray *occs)
-{
- GArray *new_occs;
- CalObjTime *occ;
- gint yearday, len, i, days_in_year;
-
- /* If BYYEARDAY has not been specified, or the array is empty, just
- return the array. */
- if (!recur_data->recur->byyearday || 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);
- yearday = cal_obj_time_day_of_year (occ);
- if (recur_data->yeardays[yearday]) {
- g_array_append_vals (new_occs, occ, 1);
- } else {
- days_in_year = g_date_is_leap_year (occ->year)
- ? 366 : 365;
- if (recur_data->neg_yeardays[days_in_year + 1
- - yearday])
- g_array_append_vals (new_occs, occ, 1);
- }
- }
-
- g_array_free (occs, TRUE);
-
- return new_occs;
-}
-
-
-
-static GArray*
-cal_obj_bymonthday_expand (RecurData *recur_data,
- GArray *occs)
-{
- GArray *new_occs;
- CalObjTime *occ, month_start_cotime, month_end_cotime, cotime;
- GList *elem;
- gint len, i, dayno;
-
- /* If BYMONTHDAY has not been specified, or the array is empty, just
- return the array. */
- if (!recur_data->recur->bymonthday || 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);
-
- /* Find the day that would correspond to day 1. */
- month_start_cotime = *occ;
- month_start_cotime.day = 1;
-
- /* Find the day that would correspond to day 1 of the next
- month, which we use for -ve day numbers. */
- month_end_cotime = *occ;
- month_end_cotime.month++;
- month_end_cotime.day = 1;
-
- /* Now iterate over the day numbers in bymonthday, generating a
- new occurrence for each one. */
- elem = recur_data->recur->bymonthday;
- while (elem) {
- dayno = GPOINTER_TO_INT (elem->data);
- if (dayno > 0) {
- cotime = month_start_cotime;
- cal_obj_time_add_days (&cotime, dayno - 1);
- } else {
- cotime = month_end_cotime;
- cal_obj_time_add_days (&cotime, dayno);
- }
-
- /* Skip occurrences if they fall outside the month. */
- if (cotime.month == occ->month)
- g_array_append_val (new_occs, cotime);
- elem = elem->next;
- }
- }
-
- g_array_free (occs, TRUE);
-
- return new_occs;
-}
-
-
-static GArray*
-cal_obj_bymonthday_filter (RecurData *recur_data,
- GArray *occs)
-{
- GArray *new_occs;
- CalObjTime *occ;
- gint len, i, days_in_month;
-
- /* If BYMONTHDAY has not been specified, or the array is empty, just
- return the array. */
- if (!recur_data->recur->bymonthday || 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);
- if (recur_data->monthdays[occ->day]) {
- g_array_append_vals (new_occs, occ, 1);
- } else {
- days_in_month = time_days_in_month (occ->year,
- occ->month);
- if (recur_data->neg_monthdays[days_in_month + 1
- - occ->day])
- g_array_append_vals (new_occs, occ, 1);
- }
- }
-
- g_array_free (occs, TRUE);
-
- return new_occs;
-}
-
-
-
-static GArray*
-cal_obj_byday_expand_yearly (RecurData *recur_data,
- GArray *occs)
-{
- GArray *new_occs;
- CalObjTime *occ;
- GList *elem;
- gint len, i, weekday, week_num;
- gint first_weekday, last_weekday, offset;
- guint16 year;
-
- /* If BYDAY has not been specified, or the array is empty, just
- return the array. */
- if (!recur_data->recur->byday || 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_data->recur->byday;
- while (elem) {
- weekday = GPOINTER_TO_INT (elem->data);
- elem = elem->next;
- week_num = GPOINTER_TO_INT (elem->data);
- elem = elem->next;
-
- year = occ->year;
- if (week_num == 0) {
- /* Expand to every Mon/Tue/etc. in the year. */
- occ->month = 0;
- occ->day = 1;
- first_weekday = cal_obj_time_weekday (occ);
- offset = (weekday + 7 - first_weekday) % 7;
- cal_obj_time_add_days (occ, offset);
-
- while (occ->year == year) {
- g_array_append_vals (new_occs, occ, 1);
- cal_obj_time_add_days (occ, 7);
- }
-
- } else if (week_num > 0) {
- /* Add the nth Mon/Tue/etc. in the year. */
- occ->month = 0;
- occ->day = 1;
- first_weekday = cal_obj_time_weekday (occ);
- offset = (weekday + 7 - first_weekday) % 7;
- offset += (week_num - 1) * 7;
- cal_obj_time_add_days (occ, offset);
- if (occ->year == year)
- g_array_append_vals (new_occs, occ, 1);
-
- } else {
- /* Add the -nth Mon/Tue/etc. in the year. */
- occ->month = 11;
- occ->day = 31;
- last_weekday = cal_obj_time_weekday (occ);
- offset = (last_weekday + 7 - weekday) % 7;
- offset += (week_num - 1) * 7;
- cal_obj_time_add_days (occ, -offset);
- if (occ->year == year)
- g_array_append_vals (new_occs, occ, 1);
- }
-
- /* Reset the year, as we may have gone past the end. */
- occ->year = year;
- }
- }
-
- g_array_free (occs, TRUE);
-
- return new_occs;
-}
-
-
-static GArray*
-cal_obj_byday_expand_monthly (RecurData *recur_data,
- GArray *occs)
-{
- GArray *new_occs;
- CalObjTime *occ;
- GList *elem;
- gint len, i, weekday, week_num;
- gint first_weekday, last_weekday, offset;
- guint16 year;
- guint8 month;
-
- /* If BYDAY has not been specified, or the array is empty, just
- return the array. */
- if (!recur_data->recur->byday || 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_data->recur->byday;
- while (elem) {
- weekday = GPOINTER_TO_INT (elem->data);
- elem = elem->next;
- week_num = GPOINTER_TO_INT (elem->data);
- elem = elem->next;
-
- year = occ->year;
- month = occ->month;
- if (week_num == 0) {
- /* Expand to every Mon/Tue/etc. in the month.*/
- occ->day = 1;
- first_weekday = cal_obj_time_weekday (occ);
- offset = (weekday + 7 - first_weekday) % 7;
- cal_obj_time_add_days (occ, offset);
-
- while (occ->year == year
- && occ->month == month) {
- g_array_append_vals (new_occs, occ, 1);
- cal_obj_time_add_days (occ, 7);
- }
-
- } else if (week_num > 0) {
- /* Add the nth Mon/Tue/etc. in the month. */
- occ->day = 1;
- first_weekday = cal_obj_time_weekday (occ);
- offset = (weekday + 7 - first_weekday) % 7;
- offset += (week_num - 1) * 7;
- cal_obj_time_add_days (occ, offset);
- if (occ->year == year && occ->month == month)
- g_array_append_vals (new_occs, occ, 1);
-
- } else {
- /* Add the -nth Mon/Tue/etc. in the month. */
- occ->day = time_days_in_month (occ->year,
- occ->month);
- last_weekday = cal_obj_time_weekday (occ);
- offset = (last_weekday + 7 - weekday) % 7;
- offset += (week_num - 1) * 7;
- cal_obj_time_add_days (occ, -offset);
- if (occ->year == year && occ->month == month)
- g_array_append_vals (new_occs, occ, 1);
- }
-
- /* Reset the year & month, as we may have gone past
- the end. */
- occ->year = year;
- occ->month = month;
- }
- }
-
- g_array_free (occs, TRUE);
-
- return new_occs;
-}
-
-
-/* Note: occs must not contain invalid dates, e.g. 31st September. */
-static GArray*
-cal_obj_byday_expand_weekly (RecurData *recur_data,
- GArray *occs)
-{
- GArray *new_occs;
- CalObjTime *occ;
- GList *elem;
- gint len, i, weekday, week_num;
- gint weekday_offset, new_weekday_offset;
-
- /* If BYDAY has not been specified, or the array is empty, just
- return the array. */
- if (!recur_data->recur->byday || 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_data->recur->byday;
- while (elem) {
- weekday = GPOINTER_TO_INT (elem->data);
- elem = elem->next;
-
- /* FIXME: Currently we just ignore this, but maybe we
- should skip all elements where week_num != 0.
- The spec isn't clear about this. */
- week_num = GPOINTER_TO_INT (elem->data);
- elem = elem->next;
-
- weekday_offset = cal_obj_time_weekday_offset (occ, recur_data->recur);
- new_weekday_offset = (weekday + 7 - recur_data->recur->week_start_day) % 7;
- cal_obj_time_add_days (occ, new_weekday_offset - weekday_offset);
- g_array_append_vals (new_occs, occ, 1);
- }
- }
-
- g_array_free (occs, TRUE);
-
- return new_occs;
-}
-
-
-/* Note: occs must not contain invalid dates, e.g. 31st September. */
-static GArray*
-cal_obj_byday_filter (RecurData *recur_data,
- GArray *occs)
-{
- GArray *new_occs;
- CalObjTime *occ;
- gint len, i, weekday;
-
- /* If BYDAY has not been specified, or the array is empty, just
- return the array. */
- if (!recur_data->recur->byday || 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);
- weekday = cal_obj_time_weekday (occ);
-
- /* See if the weekday on its own is set. */
- if (recur_data->weekdays[weekday])
- g_array_append_vals (new_occs, occ, 1);
- }
-
- g_array_free (occs, TRUE);
-
- return new_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 (RecurData *recur_data,
- 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_data->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_data->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 (RecurData *recur_data,
- GArray *occs)
-{
- GArray *new_occs;
- CalObjTime *occ;
- gint len, i;
-
- /* If BYHOUR has not been specified, or the array is empty, just
- return the array. */
- if (!recur_data->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);
- if (recur_data->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 (RecurData *recur_data,
- 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_data->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_data->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 (RecurData *recur_data,
- GArray *occs)
-{
- GArray *new_occs;
- CalObjTime *occ;
- gint len, i;
-
- /* If BYMINUTE has not been specified, or the array is empty, just
- return the array. */
- if (!recur_data->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);
- if (recur_data->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 (RecurData *recur_data,
- 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_data->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_data->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 (RecurData *recur_data,
- GArray *occs)
-{
- GArray *new_occs;
- CalObjTime *occ;
- gint len, i;
-
- /* If BYSECOND has not been specified, or the array is empty, just
- return the array. */
- if (!recur_data->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);
- if (recur_data->seconds[occ->second])
- g_array_append_vals (new_occs, occ, 1);
- }
-
- g_array_free (occs, TRUE);
-
- return new_occs;
-}
-
-
-
-
-
-/* Adds a positive or negative number of months to the given CalObjTime,
- updating the year appropriately so we end up with a valid month.
- Note that the day may be invalid, e.g. 30th Feb. */
-static void
-cal_obj_time_add_months (CalObjTime *cotime,
- gint months)
-{
- guint month, years;
-
- /* We use a guint to avoid overflow on the guint8. */
- month = cotime->month + months;
- cotime->month = month % 12;
- if (month > 0) {
- cotime->year += month / 12;
- } else {
- years = month / 12;
- if (cotime->month != 0) {
- cotime->month += 12;
- years -= 1;
- }
- cotime->year += years;
- }
-}
-
-
-/* Adds a positive or negative number of days to the given CalObjTime,
- updating the month and year appropriately so we end up with a valid day. */
-static void
-cal_obj_time_add_days (CalObjTime *cotime,
- gint days)
-{
- gint day, days_in_month;
-
- /* We use a guint to avoid overflow on the guint8. */
- day = cotime->day;
- day += days;
-
- if (days >= 0) {
- 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;
- } else {
- while (day <= 0) {
- if (cotime->month == 0) {
- cotime->year--;
- cotime->month = 11;
- } else {
- cotime->month--;
- }
-
- days_in_month = time_days_in_month (cotime->year,
- cotime->month);
- day += days_in_month;
- }
-
- cotime->day = (guint8) day;
- }
-}
-
-
-/* Adds a positive or negative number of hours to the given CalObjTime,
- updating the day, month & year appropriately so we end up with a valid
- time. */
-static void
-cal_obj_time_add_hours (CalObjTime *cotime,
- gint hours)
-{
- gint hour, days;
-
- /* We use a gint to avoid overflow on the guint8. */
- hour = cotime->hour + hours;
- cotime->hour = hour % 24;
- if (hour >= 0) {
- if (hour >= 24)
- cal_obj_time_add_days (cotime, hour / 24);
- } else {
- days = hour / 24;
- if (cotime->hour != 0) {
- cotime->hour += 24;
- days -= 1;
- }
- cal_obj_time_add_days (cotime, days);
- }
-}
-
-
-/* Adds a positive or negative number of minutes to the given CalObjTime,
- updating the rest of the CalObjTime appropriately. */
-static void
-cal_obj_time_add_minutes (CalObjTime *cotime,
- gint minutes)
-{
- gint minute, hours;
-
- /* We use a gint to avoid overflow on the guint8. */
- minute = cotime->minute + minutes;
- cotime->minute = minute % 60;
- if (minute >= 0) {
- if (minute >= 60)
- cal_obj_time_add_hours (cotime, minute / 60);
- } else {
- hours = minute / 60;
- if (cotime->minute != 0) {
- cotime->minute += 60;
- hours -= 1;
- }
- cal_obj_time_add_hours (cotime, hours);
- }
-}
-
-
-/* Adds a positive or negative number of seconds to the given CalObjTime,
- updating the rest of the CalObjTime appropriately. */
-static void
-cal_obj_time_add_seconds (CalObjTime *cotime,
- gint seconds)
-{
- gint second, minutes;
-
- /* We use a gint to avoid overflow on the guint8. */
- second = cotime->second + seconds;
- cotime->second = second % 60;
- if (second >= 0) {
- if (second >= 60)
- cal_obj_time_add_minutes (cotime, second / 60);
- } else {
- minutes = second / 60;
- if (cotime->second != 0) {
- cotime->second += 60;
- minutes -= 1;
- }
- cal_obj_time_add_minutes (cotime, minutes);
- }
-}
-
-
-/* Compares 2 CalObjTimes. Returns -1 if the cotime1 is before cotime2, 0 if
- they are the same, or 1 if cotime1 is after cotime2. The comparison type
- specifies which parts of the times we are interested in, e.g. if CALOBJ_DAY
- is used we only want to know if the days are different. */
-static gint
-cal_obj_time_compare (CalObjTime *cotime1,
- CalObjTime *cotime2,
- CalObjTimeComparison type)
-{
- if (cotime1->year < cotime2->year)
- return -1;
- if (cotime1->year > cotime2->year)
- return 1;
-
- if (type == CALOBJ_YEAR)
- return 0;
-
- if (cotime1->month < cotime2->month)
- return -1;
- if (cotime1->month > cotime2->month)
- return 1;
-
- if (type == CALOBJ_MONTH)
- return 0;
-
- if (cotime1->day < cotime2->day)
- return -1;
- if (cotime1->day > cotime2->day)
- return 1;
-
- if (type == CALOBJ_DAY)
- return 0;
-
- if (cotime1->hour < cotime2->hour)
- return -1;
- if (cotime1->hour > cotime2->hour)
- return 1;
-
- if (type == CALOBJ_HOUR)
- return 0;
-
- if (cotime1->minute < cotime2->minute)
- return -1;
- if (cotime1->minute > cotime2->minute)
- return 1;
-
- if (type == CALOBJ_MINUTE)
- return 0;
-
- if (cotime1->second < cotime2->second)
- return -1;
- if (cotime1->second > cotime2->second)
- return 1;
-
- return 0;
-}
-
-
-/* This is the same as the above function, but without the comparison type.
- It is used for qsort(). */
-static gint
-cal_obj_time_compare_func (const void *arg1,
- const void *arg2)
-{
- CalObjTime *cotime1, *cotime2;
- gint retval;
-
- cotime1 = (CalObjTime*) arg1;
- cotime2 = (CalObjTime*) arg2;
-
- if (cotime1->year < cotime2->year)
- retval = -1;
- else if (cotime1->year > cotime2->year)
- retval = 1;
-
- else if (cotime1->month < cotime2->month)
- retval = -1;
- else if (cotime1->month > cotime2->month)
- retval = 1;
-
- else if (cotime1->day < cotime2->day)
- retval = -1;
- else if (cotime1->day > cotime2->day)
- retval = 1;
-
- else if (cotime1->hour < cotime2->hour)
- retval = -1;
- else if (cotime1->hour > cotime2->hour)
- retval = 1;
-
- else if (cotime1->minute < cotime2->minute)
- retval = -1;
- else if (cotime1->minute > cotime2->minute)
- retval = 1;
-
- else if (cotime1->second < cotime2->second)
- retval = -1;
- else if (cotime1->second > cotime2->second)
- retval = 1;
-
- else
- retval = 0;
-
-#if 0
- g_print ("%s - ", cal_obj_time_to_string (cotime1));
- g_print ("%s : %i\n", cal_obj_time_to_string (cotime2), retval);
-#endif
-
- return retval;
-}
-
-#if 0
-static gint
-cal_obj_date_only_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;
-
- return 0;
-}
-#endif
-
-/* Returns the weekday of the given CalObjTime, from 0 (Mon) - 6 (Sun). */
-static gint
-cal_obj_time_weekday (CalObjTime *cotime)
-{
- GDate date;
- gint weekday;
-
- g_date_clear (&date, 1);
- g_date_set_dmy (&date, cotime->day, cotime->month + 1, cotime->year);
-
- /* This results in a value of 0 (Monday) - 6 (Sunday). */
- weekday = g_date_weekday (&date) - 1;
-
- return weekday;
-}
-
-
-/* Returns the weekday of the given CalObjTime, from 0 - 6. The week start
- day is Monday by default, but can be set in the recurrence rule. */
-static gint
-cal_obj_time_weekday_offset (CalObjTime *cotime,
- CalRecurrence *recur)
-{
- GDate date;
- gint weekday, offset;
-
- g_date_clear (&date, 1);
- g_date_set_dmy (&date, cotime->day, cotime->month + 1, cotime->year);
-
- /* This results in a value of 0 (Monday) - 6 (Sunday). */
- weekday = g_date_weekday (&date) - 1;
-
- /* This calculates the offset of our day from the start of the week.
- We just add on a week (to avoid any possible negative values) and
- then subtract the specified week start day, then convert it into a
- value from 0-6. */
- offset = (weekday + 7 - recur->week_start_day) % 7;
-
- return offset;
-}
-
-
-/* Returns the day of the year of the given CalObjTime, from 1 - 366. */
-static gint
-cal_obj_time_day_of_year (CalObjTime *cotime)
-{
- GDate date;
-
- g_date_clear (&date, 1);
- g_date_set_dmy (&date, cotime->day, cotime->month + 1, cotime->year);
-
- return g_date_day_of_year (&date);
-}
-
-
-/* Finds the first week in the given CalObjTime's year, using the same weekday
- as the event start day (i.e. from the RecurData).
- The first week of the year is the first week starting from the specified
- week start day that has 4 days in the new year. It may be in the previous
- year. */
-static void
-cal_obj_time_find_first_week (CalObjTime *cotime,
- RecurData *recur_data)
-{
- GDate date;
- gint weekday, week_start_day, first_full_week_start_offset, offset;
-
- /* Find out the weekday of the 1st of the year, 0 (Mon) - 6 (Sun). */
- g_date_clear (&date, 1);
- g_date_set_dmy (&date, 1, 1, cotime->year);
- weekday = g_date_weekday (&date) - 1;
-
- /* Calculate the first day of the year that starts a new week, i.e. the
- first week_start_day after weekday, using 0 = 1st Jan.
- e.g. if the 1st Jan is a Tuesday (1) and week_start_day is a
- Monday (0), the result will be (0 + 7 - 1) % 7 = 6 (7th Jan). */
- week_start_day = recur_data->recur->week_start_day;
- first_full_week_start_offset = (week_start_day + 7 - weekday) % 7;
-
- /* Now see if we have to move backwards 1 week, i.e. if the week
- starts on or after Jan 5th (since the previous week has 4 days in
- this year and so will be the first week of the year). */
- if (first_full_week_start_offset >= 4)
- first_full_week_start_offset -= 7;
-
- /* Now add the days to get to the event's weekday. */
- offset = first_full_week_start_offset + recur_data->weekday_offset;
-
- /* Now move the cotime to the appropriate day. */
- cotime->month = 0;
- cotime->day = 1;
- cal_obj_time_add_days (cotime, offset);
-}
-
-
-static void
-cal_object_time_from_time (CalObjTime *cotime,
- time_t t)
-{
- struct tm *tmp_tm;
- time_t tmp_time_t;
-
- tmp_time_t = t;
- tmp_tm = localtime (&tmp_time_t);
-
- cotime->year = tmp_tm->tm_year + 1900;
- cotime->month = tmp_tm->tm_mon;
- cotime->day = tmp_tm->tm_mday;
- cotime->hour = tmp_tm->tm_hour;
- cotime->minute = tmp_tm->tm_min;
- cotime->second = tmp_tm->tm_sec;
- cotime->is_rdate = FALSE;
-}
-
-
-/* Debugging function to convert a CalObjTime to a string. It uses a static
- buffer so beware. */
-#ifdef CAL_OBJ_DEBUG
-static char*
-cal_obj_time_to_string (CalObjTime *cotime)
-{
- static char buffer[20];
- char *weekdays[] = { "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun",
- " " };
- gint weekday;
-
- weekday = cal_obj_time_weekday (cotime);
-
- sprintf (buffer, "%s %02i/%02i/%04i %02i:%02i:%02i",
- weekdays[weekday],
- cotime->day, cotime->month + 1, cotime->year,
- cotime->hour, cotime->minute, cotime->second);
- return buffer;
-}
-#endif
-
-
-/* This recalculates the end dates for recurrence & exception rules which use
- the COUNT property. If refresh is TRUE it will recalculate all enddates
- for rules which use COUNT. If refresh is FALSE, it will only calculate
- the enddate if it hasn't already been set. It returns TRUE if the component
- was changed, i.e. if the component should be saved at some point.
- We store the enddate in the "X-EVOLUTION-ENDDATE" parameter of the RRULE
- or EXRULE. */
-static gboolean
-cal_recur_ensure_end_dates (CalComponent *comp,
- gboolean refresh)
-{
- GSList *rrules, *exrules, *elem;
- gboolean changed = FALSE;
-
- /* Do the RRULEs. */
- cal_component_get_rrule_property_list (comp, &rrules);
- for (elem = rrules; elem; elem = elem->next) {
- changed |= cal_recur_ensure_rule_end_date (comp, elem->data,
- FALSE, refresh);
- }
-
- /* Do the EXRULEs. */
- cal_component_get_exrule_property_list (comp, &exrules);
- for (elem = exrules; elem; elem = elem->next) {
- changed |= cal_recur_ensure_rule_end_date (comp, elem->data,
- TRUE, refresh);
- }
-
- return changed;
-}
-
-
-typedef struct _CalRecurEnsureEndDateData CalRecurEnsureEndDateData;
-struct _CalRecurEnsureEndDateData {
- gint count;
- gint instances;
- time_t end_date;
-};
-
-
-static gboolean
-cal_recur_ensure_rule_end_date (CalComponent *comp,
- icalproperty *prop,
- gboolean exception,
- gboolean refresh)
-{
- struct icalrecurrencetype rule;
- CalRecurEnsureEndDateData cb_data;
-
- if (exception)
- rule = icalproperty_get_exrule (prop);
- else
- rule = icalproperty_get_rrule (prop);
-
- /* If the rule doesn't use COUNT just return. */
- if (rule.count == 0)
- return FALSE;
-
- /* If refresh is FALSE, we check if the enddate is already set, and
- if it is we just return. */
- if (!refresh) {
- if (cal_recur_get_rule_end_date (prop) != -1)
- return FALSE;
- }
-
- /* Calculate the end date. */
- cb_data.count = rule.count;
- cb_data.instances = 0;
- cal_recur_generate_instances_of_rule (comp, prop, -1, -1,
- cal_recur_ensure_rule_end_date_cb,
- &cb_data);
-
- /* Store the end date in the "X-EVOLUTION-ENDDATE" parameter of the
- rule. */
- cal_recur_set_rule_end_date (prop, cb_data.end_date);
-
- return TRUE;
-}
-
-
-static gboolean
-cal_recur_ensure_rule_end_date_cb (CalComponent *comp,
- time_t instance_start,
- time_t instance_end,
- gpointer data)
-{
- CalRecurEnsureEndDateData *cb_data;
-
- cb_data = (CalRecurEnsureEndDateData*) data;
-
- cb_data->instances++;
-
- if (cb_data->instances == cb_data->count) {
- cb_data->end_date = instance_start;
- return FALSE;
- }
-
- return TRUE;
-}
-
-
-static time_t
-cal_recur_get_rule_end_date (icalproperty *prop)
-{
- icalparameter *param;
- const char *xname, *xvalue;
- icalvalue *value;
- struct icaltimetype icaltime;
-
- param = icalproperty_get_first_parameter (prop, ICAL_X_PARAMETER);
- while (param) {
- xname = icalparameter_get_xname (param);
- if (xname && !strcmp (xname, EVOLUTION_END_DATE_PARAMETER)) {
- xvalue = icalparameter_get_x (param);
- value = icalvalue_new_from_string (ICAL_DATETIME_VALUE,
- xvalue);
- if (value) {
- icaltime = icalvalue_get_datetime (value);
- icalvalue_free (value);
-
- return icaltime_as_timet (icaltime);
- }
- }
-
- param = icalproperty_get_next_parameter (prop,
- ICAL_X_PARAMETER);
- }
-
- return -1;
-}
-
-
-static void
-cal_recur_set_rule_end_date (icalproperty *prop,
- time_t end_date)
-{
- icalparameter *param;
- icalvalue *value;
- struct icaltimetype icaltime;
- const char *end_date_string, *xname;
-
- icaltime = icaltime_from_timet (end_date, FALSE);
- value = icalvalue_new_datetime (icaltime);
- end_date_string = icalvalue_as_ical_string (value);
- icalvalue_free (value);
-
- /* If we already have an X-EVOLUTION-ENDDATE parameter, set the value
- to the new date-time. */
- param = icalproperty_get_first_parameter (prop, ICAL_X_PARAMETER);
- while (param) {
- xname = icalparameter_get_xname (param);
- if (xname && !strcmp (xname, EVOLUTION_END_DATE_PARAMETER)) {
- icalparameter_set_x (param, end_date_string);
- return;
- }
- param = icalproperty_get_next_parameter (prop, ICAL_X_PARAMETER);
- }
-
- /* Create a new X-EVOLUTION-ENDDATE and add it to the property. */
- param = icalparameter_new_x (end_date_string);
- icalparameter_set_xname (param, EVOLUTION_END_DATE_PARAMETER);
- icalproperty_add_parameter (prop, param);
-}
-
diff --git a/calendar/cal-util/cal-recur.h b/calendar/cal-util/cal-recur.h
deleted file mode 100644
index de5a139f78..0000000000
--- a/calendar/cal-util/cal-recur.h
+++ /dev/null
@@ -1,57 +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 <damon@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 CAL_RECUR_H
-#define CAL_RECUR_H
-
-#include <libgnome/gnome-defs.h>
-#include <glib.h>
-#include <cal-util/cal-component.h>
-
-BEGIN_GNOME_DECLS
-
-typedef gboolean (* CalRecurInstanceFn) (CalComponent *comp,
- time_t instance_start,
- time_t instance_end,
- gpointer data);
-
-/*
- * Calls the given callback function for each occurrence of the event that
- * intersects the range between the given start and end times (the end time is
- * not included). Note that the occurrences may start before the given start
- * time.
- *
- * If the callback routine returns FALSE the occurrence generation stops.
- *
- * Both start and end can be -1, in which case we start at the events first
- * instance and continue until it ends, or forever if it has no enddate.
- */
-void cal_recur_generate_instances (CalComponent *comp,
- time_t start,
- time_t end,
- CalRecurInstanceFn cb,
- gpointer cb_data);
-
-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 67da788b0f..0000000000
--- a/calendar/cal-util/cal-util.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/* Evolution calendar utilities and types
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Author: Federico Mena-Quintero <federico@ximian.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 <stdlib.h>
-#include "cal-util.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_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 a0a111258d..0000000000
--- a/calendar/cal-util/cal-util.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* Evolution calendar utilities and types
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Author: Federico Mena-Quintero <federico@ximian.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 CAL_UTIL_H
-#define CAL_UTIL_H
-
-#include <libgnome/gnome-defs.h>
-#include <time.h>
-#include <glib.h>
-
-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);
-
-/* Used for multiple UID queries */
-typedef enum {
- CALOBJ_TYPE_EVENT = 1 << 0,
- CALOBJ_TYPE_TODO = 1 << 1,
- CALOBJ_TYPE_JOURNAL = 1 << 2,
- CALOBJ_TYPE_ANY = 0x07
-} 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 bcb1b9bb88..0000000000
--- a/calendar/cal-util/calobj.c
+++ /dev/null
@@ -1,2008 +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 <config.h>
-#include <string.h>
-#include <glib.h>
-#include <ctype.h>
-#include <unistd.h>
-#include <time.h>
-#include "calobj.h"
-#include "timeutil.h"
-#include "libversit/vcc.h"
-#include "icalendar-save.h"
-#include "icalendar.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);
-static void list_free (GList *list);
-
-
-
-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++;
-}
-
-
-#define free_if_defined(x) if (x){ g_free (x); x = 0; }
-#define lfree_if_defined(x) if (x){ list_free (x); x = 0; }
-static 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);
-}
-
-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);
-}
-
-/* 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 ((unsigned char) **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 ((unsigned char) **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)){
- /* There seems to be a problem with the URL property. For some
- reason an empty property gets saved, vObjectUStringZValue
- returns NULL and fakeCString crashes. So we check for NULL.
- */
- const wchar_t *zval;
-
- zval = vObjectUStringZValue (o);
- if (zval) {
- the_str = fakeCString (zval);
- ical->url = g_strdup (the_str);
- 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_unref (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 (ical->summary && 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 (&current);
-
- 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 (&current);
- 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 (&current);
-
- 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)
-{
-#if 0
- icalcomponent* comp = NULL;
- icalcomponent *subcomp;
- iCalObject *ical;
-
- g_return_val_if_fail (vcalobj != NULL, CAL_OBJ_FIND_NOT_FOUND);
-
- comp = icalparser_parse_string (vcalobj);
-
- if (!comp) {
- printf ("CAL_OBJ_FIND_SYNTAX_ERROR #1\n");
- return CAL_OBJ_FIND_SYNTAX_ERROR;
- }
-
- subcomp = icalcomponent_get_first_component (comp,
- ICAL_ANY_COMPONENT);
- if (!subcomp) {
- printf ("CAL_OBJ_FIND_SYNTAX_ERROR #2\n");
- return CAL_OBJ_FIND_SYNTAX_ERROR;
- }
-
- 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 {
- if (strcasecmp (ical->uid, uid) == 0) {
- (*ico) = ical;
- (*ico)->ref_count = 1;
- printf ("CAL_OBJ_FIND_SUCCESS\n");
-
- printf ("ical_object_find_in_string:\n");
- printf ("-----------------------------------------------------\n");
- dump_icalobject (*ico);
- printf ("-----------------------------------------------------\n");
-
-
- return CAL_OBJ_FIND_SUCCESS;
- }
- }
- subcomp = icalcomponent_get_next_component (comp,
- ICAL_ANY_COMPONENT);
- }
-
- printf ("CAL_OBJ_FIND_NOT_FOUND\n");
- return CAL_OBJ_FIND_NOT_FOUND;
-
-#else /* 1 */
- 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;
-#endif /* 1 */
-}
-
-
-#if 1
-/* 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;
-}
-#endif /* 0 */
-
-/**
- * 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)
-{
-#if 0
- icalcomponent *top = icalcomponent_new (ICAL_VCALENDAR_COMPONENT);
- char *out_cal_string;
- icalcomponent *comp;
-
- printf ("ical_object_to_string:\n");
- printf ("-----------------------------------------------------\n");
- dump_icalobject (ico);
- printf ("-----------------------------------------------------\n");
-
- comp = icalcomponent_create_from_ical_object (ico);
- icalcomponent_add_component (top, comp);
- out_cal_string = icalcomponent_as_ical_string (top);
- return g_strdup (out_cal_string);
-
-#else /* 1 */
- 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;
-#endif /* 1 */
-}
-
-
-/**
- * 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';
-}
-
-
-void dump_icalobject (iCalObject *ico)
-{
- if (!ico) {
- printf ("<<NULL>>\n");
- return;
- }
-
- printf ("type ");
- switch (ico->type) {
- case ICAL_EVENT: printf ("event"); break;
- case ICAL_TODO: printf ("todo"); break;
- case ICAL_JOURNAL: printf ("journal"); break;
- case ICAL_FBREQUEST: printf ("fbrequest"); break;
- case ICAL_FBREPLY: printf ("fbreply"); break;
- case ICAL_BUSYTIME: printf ("busytime"); break;
- case ICAL_TIMEZONE: printf ("timezone"); break;
- }
- printf ("\n");
-
- printf ("attach-length %d\n", g_list_length (ico->attach));
-
- printf ("attendee-length %d\n", g_list_length (ico->attendee));
-
- printf ("catagories-length %d\n", g_list_length (ico->categories));
-
- printf ("class '%s'\n", ico->class ? ico->class : "NULL");
-
- printf ("comment '%s'\n", ico->comment ? ico->comment : "NULL");
-
- printf ("completed %ld=%s",
- ico->completed, ctime (&ico->completed));
-
- printf ("created %ld=%s", ico->created, ctime (&ico->created));
-
- printf ("contact-length %d\n", g_list_length (ico->contact));
-
- printf ("desc '%s'\n", ico->desc ? ico->desc : "NULL");
-
- printf ("dtstamp %ld=%s", ico->dtstamp, ctime (&ico->dtstamp));
-
- printf ("dtstart %ld=%s", ico->dtstart, ctime (&ico->dtstart));
-
- printf ("dtend %ld=%s", ico->dtend, ctime (&ico->dtend));
-
- printf ("date_only %d\n", ico->date_only);
-
- printf ("exdate-length %d\n", g_list_length (ico->exdate));
-
- printf ("exrule-length %d\n", g_list_length (ico->exrule));
-
- printf ("iCalGeo %d %f %f\n",
- ico->geo.valid, ico->geo.latitude, ico->geo.longitude);
-
- printf ("last_mod %ld=%s", ico->last_mod, ctime (&ico->last_mod));
-
- printf ("location '%s'\n", ico->location ? ico->location : "NULL");
-
- printf ("organizer %p\n", ico->organizer);
-
- printf ("percent %d\n", ico->percent);
-
- printf ("priority %d\n", ico->priority);
-
- printf ("rstatus '%s'\n", ico->rstatus ? ico->rstatus : "NULL");
-
- printf ("related-length %d\n", g_list_length (ico->related));
-
- printf ("resources-length %d\n", g_list_length (ico->resources));
-
- printf ("rdate-length %d\n", g_list_length (ico->rdate));
-
- printf ("rrule-length %d\n", g_list_length (ico->rrule));
-
- printf ("seq %d\n", ico->seq);
-
- printf ("status '%s'\n", ico->status ? ico->status : "NULL");
-
- printf ("summary '%s'\n", ico->summary ? ico->summary : "NULL");
-
- printf ("transp ");
- switch (ico->transp) {
- case ICAL_OPAQUE: printf ("opaque"); break;
- case ICAL_TRANSPARENT: printf ("transparent"); break;
- }
- printf ("\n");
-
- printf ("uid '%s'\n", ico->uid ? ico->uid : "NULL");
-
- printf ("url '%s'\n", ico->url ? ico->url : "NULL");
-
- printf ("recurid %ld=%s", ico->recurid, ctime (&ico->recurid));
-
- printf ("dalarm %d\n", ico->dalarm.enabled);
-
- printf ("aalarm %d\n", ico->aalarm.enabled);
-
- printf ("palarm %d\n", ico->palarm.enabled);
-
- printf ("malarm %d\n", ico->malarm.enabled);
-
- printf ("alarms-length %d\n", g_list_length (ico->alarms));
-
- printf ("recur %p\n", ico->recur);
-
- printf ("new %d\n", ico->new);
-
- printf ("user_data %p\n", ico->user_data);
-
- printf ("ref_count %d\n", ico->ref_count);
-}
diff --git a/calendar/cal-util/calobj.h b/calendar/cal-util/calobj.h
deleted file mode 100644
index 3caef945e2..0000000000
--- a/calendar/cal-util/calobj.h
+++ /dev/null
@@ -1,312 +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 <libgnome/libgnome.h>
-#include "libversit/vcc.h"
-
-BEGIN_GNOME_DECLS
-
-/* Alarm types */
-enum AlarmType {
- ALARM_MAIL,
- ALARM_PROGRAM,
- ALARM_DISPLAY,
- ALARM_AUDIO
-};
-
-/* Whether the alarm should trigger N mins/hours/days before its due time */
-enum AlarmUnit {
- ALARM_MINUTES,
- ALARM_HOURS,
- ALARM_DAYS
-};
-
-/* Field identifiers for the iCalObject structure. These are also used to
- identify columns in ECalendarTable, so be careful when reordering them. */
-typedef enum {
- ICAL_OBJECT_FIELD_COMMENT,
- ICAL_OBJECT_FIELD_COMPLETED,
- ICAL_OBJECT_FIELD_CREATED,
- ICAL_OBJECT_FIELD_DESCRIPTION,
- ICAL_OBJECT_FIELD_DTSTAMP,
- ICAL_OBJECT_FIELD_DTSTART,
- ICAL_OBJECT_FIELD_DTEND,
- ICAL_OBJECT_FIELD_GEO,
- ICAL_OBJECT_FIELD_LAST_MOD,
- ICAL_OBJECT_FIELD_LOCATION,
- ICAL_OBJECT_FIELD_ORGANIZER,
- ICAL_OBJECT_FIELD_PERCENT,
- ICAL_OBJECT_FIELD_PRIORITY,
- ICAL_OBJECT_FIELD_SUMMARY,
- ICAL_OBJECT_FIELD_URL,
- ICAL_OBJECT_FIELD_HAS_ALARMS, /* not a real field */
- ICAL_OBJECT_FIELD_ICON, /* not a real field */
- ICAL_OBJECT_FIELD_COMPLETE, /* not a real field */
- ICAL_OBJECT_FIELD_RECURRING, /* not a real field */
- ICAL_OBJECT_FIELD_OVERDUE, /* not a real field */
- ICAL_OBJECT_FIELD_COLOR, /* not a real field */
- ICAL_OBJECT_FIELD_NUM_FIELDS
-} iCalObjectField;
-
-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);
-
-void ical_object_ref (iCalObject *ico);
-void ical_object_unref (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);
-
-
-void dump_icalobject (iCalObject *ico);
-
-END_GNOME_DECLS
-
-#endif
-
diff --git a/calendar/cal-util/test-recur.c b/calendar/cal-util/test-recur.c
deleted file mode 100644
index e84b0f9201..0000000000
--- a/calendar/cal-util/test-recur.c
+++ /dev/null
@@ -1,196 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <damon@helixcode.com>
- *
- * Copyright 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 tests the recurrence rule expansion functions.
- *
- * NOTE: currently it starts from the event start date and continues
- * until all recurrence rules/dates end or we reach MAX_OCCURRENCES
- * occurrences. So it does not test generating occurrences for a specific
- * interval. A nice addition might be to do this automatically and compare
- * the results from the complete set to ensure they match.
- */
-
-#include <config.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <gtk/gtkmain.h>
-#include <cal-util/cal-recur.h>
-
-
-/* Since events can recur infinitely, we set a limit to the number of
- occurrences we output. */
-#define MAX_OCCURRENCES 1000
-
-static void usage (void);
-static icalcomponent* scan_ics_file (char *filename);
-static char* get_line (char *s,
- size_t size,
- void *data);
-static void generate_occurrences (icalcomponent *comp);
-static gboolean occurrence_cb (CalComponent *comp,
- time_t instance_start,
- time_t instance_end,
- gpointer data);
-
-
-int
-main (int argc,
- char *argv[])
-{
- gchar *filename;
- icalcomponent *icalcomp;
-
- gtk_init (&argc, &argv);
-
- if (argc != 2)
- usage ();
-
- filename = argv[1];
-
- icalcomp = scan_ics_file (filename);
- if (icalcomp)
- generate_occurrences (icalcomp);
-
- return 0;
-}
-
-
-static void
-usage (void)
-{
- g_print ("Usage: test-recur <filename>\n");
- exit (1);
-}
-
-
-static icalcomponent*
-scan_ics_file (char *filename)
-{
- FILE *fp;
- icalcomponent *icalcomp;
- icalparser *parser;
-
- g_print ("Opening file: %s\n", filename);
- fp = fopen (filename, "r");
-
- if (!fp) {
- g_print ("Can't open file: %s\n", filename);
- return NULL;
- }
-
- parser = icalparser_new ();
- icalparser_set_gen_data (parser, fp);
-
- icalcomp = icalparser_parse (parser, get_line);
- icalparser_free (parser);
-
- return icalcomp;
-}
-
-
-/* Callback used from icalparser_parse() */
-static char *
-get_line (char *s,
- size_t size,
- void *data)
-{
- return fgets (s, size, (FILE*) data);
-}
-
-
-static void
-generate_occurrences (icalcomponent *icalcomp)
-{
- icalcompiter iter;
-
- for (iter = icalcomponent_begin_component (icalcomp, ICAL_ANY_COMPONENT);
- icalcompiter_deref (&iter) != NULL;
- icalcompiter_next (&iter)) {
- icalcomponent *tmp_icalcomp;
- CalComponent *comp;
- icalcomponent_kind kind;
- gint occurrences;
-
- tmp_icalcomp = icalcompiter_deref (&iter);
- kind = icalcomponent_isa (tmp_icalcomp);
-
- if (!(kind == ICAL_VEVENT_COMPONENT
- || kind == ICAL_VTODO_COMPONENT
- || kind == ICAL_VJOURNAL_COMPONENT))
- continue;
-
- comp = cal_component_new ();
-
- if (!cal_component_set_icalcomponent (comp, tmp_icalcomp))
- continue;
-
- g_print ("#############################################################################\n");
- g_print ("%s\n\n", icalcomponent_as_ical_string (tmp_icalcomp));
- g_print ("Instances:\n");
-
- occurrences = 0;
- /* I use specific times when I am trying to pin down a bug seen
- in one of the calendar views. */
-#if 0
- cal_recur_generate_instances (comp, 982022400, 982108800,
- occurrence_cb, &occurrences);
-#else
- cal_recur_generate_instances (comp, -1, -1,
- occurrence_cb, &occurrences);
-#endif
-
- /* Print the component again so we can see the
- X-EVOLUTION-ENDDATE parameter (only set if COUNT is used).
- */
- g_print ("#############################################################################\n");
-#if 0
- g_print ("%s\n\n", icalcomponent_as_ical_string (tmp_icalcomp));
-#endif
- }
-}
-
-
-static gboolean
-occurrence_cb (CalComponent *comp,
- time_t instance_start,
- time_t instance_end,
- gpointer data)
-{
- char start[32], finish[32];
- gint *occurrences;
-
- occurrences = (gint*) data;
-
- strcpy (start, ctime (&instance_start));
- start[24] = '\0';
- strcpy (finish, ctime (&instance_end));
- finish[24] = '\0';
-
- g_print ("%s - %s\n", start, finish);
-
- (*occurrences)++;
- return (*occurrences == MAX_OCCURRENCES) ? FALSE : TRUE;
-}
diff --git a/calendar/cal-util/timeutil.c b/calendar/cal-util/timeutil.c
deleted file mode 100644
index 764ec5d078..0000000000
--- a/calendar/cal-util/timeutil.c
+++ /dev/null
@@ -1,385 +0,0 @@
-/* Miscellaneous time-related utilities
- *
- * Copyright (C) 1998 The Free Software Foundation
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Authors: Federico Mena <federico@ximian.com>
- * Miguel de Icaza <miguel@ximian.com>
- */
-
-#include <string.h>
-#include <ctype.h>
-#include <glib.h>
-#include "timeutil.h"
-
-
-
-void
-print_time_t (time_t t)
-{
- struct tm *tm = localtime (&t);
-
- printf ("%d/%02d/%02d %02d:%02d:%02d",
- 1900 + tm->tm_year, tm->tm_mon+1, tm->tm_mday,
- tm->tm_hour, tm->tm_min, tm->tm_sec);
-}
-
-/**
- * isodate_from_time_t:
- * @t: A time value.
- *
- * Creates an ISO 8601 local time representation from a time value.
- *
- * Return value: String with the ISO 8601 representation of the local time.
- **/
-char *
-isodate_from_time_t (time_t t)
-{
- struct tm *tm;
- char isotime[40];
-
- tm = localtime (&t);
- strftime (isotime, sizeof (isotime)-1, "%Y%m%dT%H%M%S", tm);
- return g_strdup (isotime);
-}
-
-/**
- * time_from_isodate:
- * @str: Date/time value in ISO 8601 format.
- *
- * Converts an ISO 8601 time string into a time_t value.
- *
- * Return value: Time_t corresponding to the specified ISO string.
- **/
-time_t
-time_from_isodate (const char *str)
-{
- int len;
- struct tm my_tm;
- time_t t;
- int i;
-
- g_return_val_if_fail (str != NULL, -1);
-
- /* yyyymmdd[Thhmmss[Z]] */
-
- len = strlen (str);
-
- if (!(len == 8 || len == 15 || len == 16))
- return -1;
-
- for (i = 0; i < len; i++)
- if (!((i != 8 && i != 15 && isdigit (str[i]))
- || (i == 8 && str[i] == 'T')
- || (i == 15 && str[i] == 'Z')))
- return -1;
-
- memset (&my_tm, 0, sizeof (my_tm));
-
-#define digit_at(x,y) (x[y] - '0')
-
- 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);
-
- if (len > 8) {
- 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 (len == 16) {
-#if defined(HAVE_TM_GMTOFF)
- t += my_tm.tm_gmtoff;
-#elif defined(HAVE_TIMEZONE)
- t -= timezone;
-#endif
- }
-
- return t;
-}
-
-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);
- printf ("\n");
- 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;
- tm->tm_isdst = -1;
-
- 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);
- printf ("\n");
- 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);
- printf ("\n");
- 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);
- printf ("\n");
- return time;
- }
- return new_time;
-}
-
-/* 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)
-{
- 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);
-}
-
-/* Returns the end of the day, according to the local time. */
-time_t
-time_day_end (time_t t)
-{
- 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);
-}
diff --git a/calendar/cal-util/timeutil.h b/calendar/cal-util/timeutil.h
deleted file mode 100644
index 04f1ca4867..0000000000
--- a/calendar/cal-util/timeutil.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/* Miscellaneous time-related utilities
- *
- * Copyright (C) 1998 The Free Software Foundation
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Authors: Federico Mena <federico@ximian.com>
- * Miguel de Icaza <miguel@ximian.com>
- */
-
-#ifndef TIMEUTIL_H
-#define TIMEUTIL_H
-
-
-#include <time.h>
-#include <ical.h>
-
-
-char *isodate_from_time_t (time_t t);
-time_t time_from_isodate (const char *str);
-
-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 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);
-
-/* 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);
-
-void print_time_t (time_t t);
-
-
-#endif
diff --git a/calendar/conduits/.cvsignore b/calendar/conduits/.cvsignore
deleted file mode 100644
index b840c21800..0000000000
--- a/calendar/conduits/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile.in
-Makefile \ No newline at end of file
diff --git a/calendar/conduits/Makefile.am b/calendar/conduits/Makefile.am
deleted file mode 100644
index 906ea61971..0000000000
--- a/calendar/conduits/Makefile.am
+++ /dev/null
@@ -1 +0,0 @@
-SUBDIRS = calendar todo
diff --git a/calendar/conduits/calendar/.cvsignore b/calendar/conduits/calendar/.cvsignore
deleted file mode 100644
index e8ba6ad844..0000000000
--- a/calendar/conduits/calendar/.cvsignore
+++ /dev/null
@@ -1,9 +0,0 @@
-Makefile.in
-Makefile
-.deps
-e-calendar.conduit
-*.lo
-.libs
-libecalendar_conduit.la
-e-calendar-conduit-control-applet
-e-calendar-conduit-control-applet.desktop
diff --git a/calendar/conduits/calendar/Makefile.am b/calendar/conduits/calendar/Makefile.am
deleted file mode 100644
index 8d8b81a9ee..0000000000
--- a/calendar/conduits/calendar/Makefile.am
+++ /dev/null
@@ -1,45 +0,0 @@
-INCLUDES = \
- -I$(top_srcdir) \
- -I$(top_srcdir)/calendar \
- -I$(top_srcdir)/libical/src/libical \
- -I$(top_builddir)/libical/src/libical \
- -I$(top_builddir)/e-util \
- $(BONOBO_GNOME_CFLAGS) \
- $(PISOCK_CFLAGS) \
- $(GNOME_PILOT_CFLAGS)
-
-# Calendar Conduit
-e_calendar_conduitsdir=$(libdir)/gnome-pilot/conduits
-e_calendar_conduits_LTLIBRARIES = libecalendar_conduit.la
-
-libecalendar_conduit_la_SOURCES = \
- calendar-conduit.c \
- calendar-conduit.h \
- calendar-conduit-config.h
-
-libecalendar_conduit_la_LDFLAGS = -module -avoid-version
-libecalendar_conduit_la_LIBADD = \
- $(top_builddir)/calendar/cal-client/libcal-client-static.la \
- $(top_builddir)/calendar/cal-util/libcal-util-static.la \
- $(top_builddir)/libversit/libversit.la \
- $(top_builddir)/libical/src/libical/libical-static.la \
- $(top_builddir)/e-util/libeconduit-static.la \
- $(BONOBO_GNOME_LIBS) \
- $(PISOCK_LIBS) \
- $(GNOME_LIBDIR) \
- $(GNOME_LIBS)
-
-e-calendar.conduit: e-calendar.conduit.in Makefile
- sed -e 's^\@prefix\@^$(prefix)^g' \
- -e 's^\@datadir\@^$(datadir)^g' \
- < $(srcdir)/e-calendar.conduit.in > e-calendar.conduit.tmp \
- && mv e-calendar.conduit.tmp e-calendar.conduit
-
-Conduitdir = $(datadir)/gnome-pilot/conduits/
-Conduit_DATA = e-calendar.conduit
-
-EXTRA_DIST = \
- e-calendar.conduit.in
-
-install-data-local:
- $(mkinstalldirs) $(Conduitdir)
diff --git a/calendar/conduits/calendar/calendar-conduit-config.h b/calendar/conduits/calendar/calendar-conduit-config.h
deleted file mode 100644
index d0ba28dbb1..0000000000
--- a/calendar/conduits/calendar/calendar-conduit-config.h
+++ /dev/null
@@ -1,120 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* Evolution calendar - Calendar Conduit Configuration
- *
- * Copyright (C) 1998 Free Software Foundation
- * Copyright (C) 2000 Helix Code, Inc.
- *
- * Authors: Eskil Heyn Olsen <deity@eskil.dk>
- * JP Rosevear <jpr@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 __CAL_CONDUIT_CONFIG_H__
-#define __CAL_CONDUIT_CONFIG_H__
-
-#include <gnome.h>
-#include <libgpilotdCM/gnome-pilot-conduit-management.h>
-#include <libgpilotdCM/gnome-pilot-conduit-config.h>
-
-/* Configuration info */
-typedef struct _ECalConduitCfg ECalConduitCfg;
-struct _ECalConduitCfg {
- gboolean open_secret;
- guint32 pilot_id;
- GnomePilotConduitSyncType sync_type; /* only used by capplet */
-};
-
-#ifdef CAL_CONFIG_LOAD
-/* Loads the configuration data */
-static void
-calconduit_load_configuration (ECalConduitCfg **c, guint32 pilot_id)
-{
- gchar prefix[256];
- g_snprintf (prefix, 255, "/gnome-pilot.d/e-todo-conduit/Pilot_%u/",
- pilot_id);
-
- *c = g_new0 (ECalConduitCfg,1);
- g_assert (*c != NULL);
-
- gnome_config_push_prefix (prefix);
- (*c)->open_secret = gnome_config_get_bool ("open_secret=FALSE");
-
- /* set in capplets main */
- (*c)->sync_type = GnomePilotConduitSyncTypeCustom;
- gnome_config_pop_prefix ();
-
- (*c)->pilot_id = pilot_id;
-}
-#endif
-
-#ifdef CAL_CONFIG_SAVE
-/* Saves the configuration data. */
-static void
-calconduit_save_configuration (ECalConduitCfg *c)
-{
- gchar prefix[256];
-
- g_snprintf (prefix, 255, "/gnome-pilot.d/e-todo-conduit/Pilot_%u/",
- c->pilot_id);
-
- 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 ();
-}
-#endif
-
-#ifdef CAL_CONFIG_DUPE
-/* Creates a duplicate of the configuration data */
-static ECalConduitCfg*
-calconduit_dupe_configuration (ECalConduitCfg *c)
-{
- ECalConduitCfg *retval;
-
- g_return_val_if_fail (c != NULL, NULL);
-
- retval = g_new0 (ECalConduitCfg, 1);
- retval->sync_type = c->sync_type;
- retval->open_secret = c->open_secret;
- retval->pilot_id = c->pilot_id;
-
- return retval;
-}
-#endif
-
-#ifdef CAL_CONFIG_DESTROY
-/* Destroy a configuration */
-static void
-calconduit_destroy_configuration (ECalConduitCfg **c)
-{
- g_return_if_fail (c != NULL);
- g_return_if_fail (*c != NULL);
-
- g_free (*c);
- *c = NULL;
-}
-#endif
-
-#endif __CAL_CONDUIT_CONFIG_H__
-
-
-
-
-
-
-
diff --git a/calendar/conduits/calendar/calendar-conduit.c b/calendar/conduits/calendar/calendar-conduit.c
deleted file mode 100644
index 155813d65e..0000000000
--- a/calendar/conduits/calendar/calendar-conduit.c
+++ /dev/null
@@ -1,1198 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* Evolution calendar - Calendar Conduit
- *
- * Copyright (C) 1998 Free Software Foundation
- * Copyright (C) 2000 Helix Code, Inc.
- *
- * Authors: Eskil Heyn Olsen <deity@eskil.dk>
- * JP Rosevear <jpr@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 <liboaf/liboaf.h>
-#include <bonobo.h>
-#include <cal-client/cal-client-types.h>
-#include <cal-client/cal-client.h>
-#include <cal-util/timeutil.h>
-#include <pi-source.h>
-#include <pi-socket.h>
-#include <pi-file.h>
-#include <pi-dlp.h>
-#include <libical/src/libical/icaltypes.h>
-#include <e-pilot-util.h>
-
-#define CAL_CONFIG_LOAD 1
-#define CAL_CONFIG_DESTROY 1
-#include <calendar-conduit-config.h>
-#undef CAL_CONFIG_LOAD
-#undef CAL_CONFIG_DESTROY
-
-#include <calendar-conduit.h>
-
-GnomePilotConduit * conduit_get_gpilot_conduit (guint32);
-void conduit_destroy_gpilot_conduit (GnomePilotConduit*);
-
-#define CONDUIT_VERSION "0.1.5"
-#ifdef G_LOG_DOMAIN
-#undef G_LOG_DOMAIN
-#endif
-#define G_LOG_DOMAIN "ecalconduit"
-
-#define DEBUG_CALCONDUIT 1
-/* #undef DEBUG_CALCONDUIT */
-
-#ifdef DEBUG_CALCONDUIT
-#define LOG(e...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, e)
-#else
-#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)
-
-/* Debug routines */
-static char *
-print_local (ECalLocalRecord *local)
-{
- static char buff[ 4096 ];
-
- if (local == NULL) {
- sprintf (buff, "[NULL]");
- return buff;
- }
-
- if (local->appt && local->appt->description) {
- g_snprintf (buff, 4096, "[%ld %ld '%s' '%s']",
- mktime (&local->appt->begin),
- mktime (&local->appt->end),
- local->appt->description ?
- local->appt->description : "",
- local->appt->note ?
- local->appt->note : "");
- return buff;
- }
-
- return "";
-}
-
-static char *print_remote (GnomePilotRecord *remote)
-{
- static char buff[ 4096 ];
- struct Appointment appt;
-
- if (remote == NULL) {
- sprintf (buff, "[NULL]");
- return buff;
- }
-
- memset (&appt, 0, sizeof (struct Appointment));
- unpack_Appointment (&appt, remote->record, remote->length);
-
- g_snprintf (buff, 4096, "[%ld %ld '%s' '%s']",
- mktime (&appt.begin),
- mktime (&appt.end),
- appt.description ?
- appt.description : "",
- appt.note ?
- appt.note : "");
-
- return buff;
-}
-
-/* Context Routines */
-static ECalConduitContext *
-e_calendar_context_new (guint32 pilot_id)
-{
- ECalConduitContext *ctxt = g_new0 (ECalConduitContext, 1);
-
- calconduit_load_configuration (&ctxt->cfg, pilot_id);
-
- return ctxt;
-}
-
-static void
-e_calendar_context_foreach_change (gpointer key, gpointer value, gpointer data)
-{
- g_free (key);
-}
-
-static void
-e_calendar_context_destroy (ECalConduitContext *ctxt)
-{
- g_return_if_fail (ctxt != NULL);
-
- if (ctxt->cfg != NULL)
- calconduit_destroy_configuration (&ctxt->cfg);
-
- if (ctxt->client != NULL)
- gtk_object_unref (GTK_OBJECT (ctxt->client));
-
- if (ctxt->calendar_file)
- g_free (ctxt->calendar_file);
-
- if (ctxt->uids)
- cal_obj_uid_list_free (ctxt->uids);
-
- if (ctxt->changed_hash)
- g_hash_table_foreach (ctxt->changed_hash, e_calendar_context_foreach_change, NULL);
-
- if (ctxt->changed)
- cal_client_change_list_free (ctxt->changed);
-
- if (ctxt->map)
- e_pilot_map_destroy (ctxt->map);
-
- g_free (ctxt);
-}
-
-/* Calendar Server routines */
-static void
-start_calendar_server_cb (CalClient *cal_client,
- CalClientOpenStatus status,
- gpointer data)
-{
- ECalConduitContext *ctxt;
-
- ctxt = data;
-
- LOG (" entering start_calendar_server_cb\n");
-
- if (status == CAL_CLIENT_OPEN_SUCCESS) {
- ctxt->calendar_open_success = TRUE;
- LOG (" success\n");
- } else
- LOG (" open of calendar failed\n");
-
- gtk_main_quit (); /* end the sub event loop */
-}
-
-static int
-start_calendar_server (ECalConduitContext *ctxt)
-{
-
- g_return_val_if_fail (ctxt != NULL, -2);
-
- ctxt->client = cal_client_new ();
-
- /* FIX ME */
- ctxt->calendar_file = g_concat_dir_and_file (g_get_home_dir (),
- "evolution/local/Calendar/calendar.ics");
-
- gtk_signal_connect (GTK_OBJECT (ctxt->client), "cal_opened",
- start_calendar_server_cb, ctxt);
-
- LOG (" calling cal_client_open_calendar\n");
- if (!cal_client_open_calendar (ctxt->client, ctxt->calendar_file, FALSE))
- return -1;
-
- /* run a sub event loop to turn cal-client's async load
- notification into a synchronous call */
- gtk_main ();
-
- if (ctxt->calendar_open_success)
- return 0;
-
- return -1;
-}
-
-/* Utility routines */
-static char *
-map_name (ECalConduitContext *ctxt)
-{
- char *filename;
-
- filename = g_strdup_printf ("%s/evolution/local/Calendar/pilot-map-calendar-%d.xml", g_get_home_dir (), ctxt->cfg->pilot_id);
-
- return filename;
-}
-
-static icalrecurrencetype_weekday
-get_ical_day (int day)
-{
- switch (day) {
- case 0:
- return ICAL_SUNDAY_WEEKDAY;
- case 1:
- return ICAL_MONDAY_WEEKDAY;
- case 2:
- return ICAL_TUESDAY_WEEKDAY;
- case 3:
- return ICAL_WEDNESDAY_WEEKDAY;
- case 4:
- return ICAL_THURSDAY_WEEKDAY;
- case 5:
- return ICAL_FRIDAY_WEEKDAY;
- case 6:
- return ICAL_SATURDAY_WEEKDAY;
- }
-
- return ICAL_NO_WEEKDAY;
-}
-
-static int
-get_pilot_day (icalrecurrencetype_weekday wd)
-{
- switch (wd) {
- case ICAL_SUNDAY_WEEKDAY:
- return 0;
- case ICAL_MONDAY_WEEKDAY:
- return 1;
- case ICAL_TUESDAY_WEEKDAY:
- return 2;
- case ICAL_WEDNESDAY_WEEKDAY:
- return 3;
- case ICAL_THURSDAY_WEEKDAY:
- return 4;
- case ICAL_FRIDAY_WEEKDAY:
- return 5;
- case ICAL_SATURDAY_WEEKDAY:
- return 6;
- default:
- return -1;
- }
-}
-
-static gboolean
-is_empty_time (struct tm time)
-{
- if (time.tm_sec || time.tm_min || time.tm_hour
- || time.tm_mday || time.tm_mon || time.tm_year)
- return FALSE;
-
- return TRUE;
-}
-
-static short
-nth_weekday (int pos, icalrecurrencetype_weekday weekday)
-{
- g_assert (pos > 0 && pos <= 5);
-
- return (pos << 3) | (int) weekday;
-}
-
-static GList *
-next_changed_item (ECalConduitContext *ctxt, GList *changes)
-{
- CalClientChange *ccc;
- GList *l;
-
- for (l = changes; l != NULL; l = l->next) {
- const char *uid;
-
- ccc = l->data;
-
- cal_component_get_uid (ccc->comp, &uid);
- if (g_hash_table_lookup (ctxt->changed_hash, uid))
- return l;
- }
-
- return NULL;
-}
-
-static void
-compute_status (ECalConduitContext *ctxt, ECalLocalRecord *local, const char *uid)
-{
- CalClientChange *ccc;
-
- local->local.archived = FALSE;
- local->local.secret = FALSE;
-
- ccc = g_hash_table_lookup (ctxt->changed_hash, uid);
-
- if (ccc == NULL) {
- local->local.attr = GnomePilotRecordNothing;
- return;
- }
-
- switch (ccc->type) {
- case CAL_CLIENT_CHANGE_ADDED:
- local->local.attr = GnomePilotRecordNew;
- break;
-
- case CAL_CLIENT_CHANGE_MODIFIED:
- local->local.attr = GnomePilotRecordModified;
- break;
-
- case CAL_CLIENT_CHANGE_DELETED:
- local->local.attr = GnomePilotRecordDeleted;
- break;
- }
-}
-
-static GnomePilotRecord
-local_record_to_pilot_record (ECalLocalRecord *local,
- ECalConduitContext *ctxt)
-{
- GnomePilotRecord p;
-
- g_assert (local->comp != NULL);
- g_assert (local->appt != NULL );
-
- p.ID = local->local.ID;
- p.category = 0;
- p.attr = local->local.attr;
- p.archived = local->local.archived;
- p.secret = local->local.secret;
-
- /* Generate pilot record structure */
- p.record = g_new0 (char, 0xffff);
- p.length = pack_Appointment (local->appt, p.record, 0xffff);
-
- return p;
-}
-
-/*
- * converts a CalComponent object to a ECalLocalRecord
- */
-static void
-local_record_from_comp (ECalLocalRecord *local, CalComponent *comp, ECalConduitContext *ctxt)
-{
- const char *uid;
- CalComponentText summary;
- GSList *d_list = NULL;
- CalComponentText *description;
- CalComponentDateTime dt;
- time_t dt_time;
- CalComponentClassification classif;
- int i;
-
- g_return_if_fail (local != NULL);
- g_return_if_fail (comp != NULL);
-
- local->comp = comp;
- gtk_object_ref (GTK_OBJECT (comp));
-
- cal_component_get_uid (local->comp, &uid);
- local->local.ID = e_pilot_map_lookup_pid (ctxt->map, uid);
- compute_status (ctxt, local, uid);
-
- local->appt = g_new0 (struct Appointment, 1);
-
- /* STOP: don't replace these with g_strdup, since free_Appointment
- uses free to deallocate */
- cal_component_get_summary (comp, &summary);
- if (summary.value)
- local->appt->description = e_pilot_utf8_to_pchar (summary.value);
-
- cal_component_get_description_list (comp, &d_list);
- if (d_list) {
- description = (CalComponentText *) d_list->data;
- if (description && description->value)
- local->appt->note = e_pilot_utf8_to_pchar (description->value);
- else
- local->appt->note = NULL;
- } else {
- local->appt->note = NULL;
- }
-
- cal_component_get_dtstart (comp, &dt);
- if (dt.value) {
- dt_time = icaltime_as_timet (*dt.value);
-
- local->appt->begin = *localtime (&dt_time);
- }
-
- cal_component_get_dtend (comp, &dt);
- if (dt.value && time_add_day (dt_time, 1) != icaltime_as_timet (*dt.value)) {
- dt_time = icaltime_as_timet (*dt.value);
-
- local->appt->end = *localtime (&dt_time);
- local->appt->event = 0;
- } else {
- local->appt->event = 1;
- }
-
- /* Recurrence Rules */
- local->appt->repeatType = repeatNone;
-
- if (cal_component_has_rrules (comp)) {
- GSList *list;
- struct icalrecurrencetype *recur;
-
- cal_component_get_rrule_list (comp, &list);
- recur = list->data;
-
- switch (recur->freq) {
- case ICAL_DAILY_RECURRENCE:
- local->appt->repeatType = repeatDaily;
- break;
- case ICAL_WEEKLY_RECURRENCE:
- local->appt->repeatType = repeatWeekly;
- for (i = 0; i <= 7 && recur->by_day[i] != ICAL_RECURRENCE_ARRAY_MAX; i++) {
- icalrecurrencetype_weekday wd;
-
- wd = icalrecurrencetype_day_day_of_week (recur->by_day[i]);
- local->appt->repeatDays[get_pilot_day (wd)] = 1;
- }
-
- break;
- case ICAL_MONTHLY_RECURRENCE:
- if (recur->by_month_day[0] != ICAL_RECURRENCE_ARRAY_MAX) {
- local->appt->repeatType = repeatMonthlyByDate;
- break;
- }
-
- /* FIX ME Not going to work with -ve by_day */
- local->appt->repeatType = repeatMonthlyByDay;
- switch (icalrecurrencetype_day_position (recur->by_day[0])) {
- case 1:
- local->appt->repeatDay = dom1stSun;
- break;
- case 2:
- local->appt->repeatDay = dom2ndSun;
- break;
- case 3:
- local->appt->repeatDay = dom3rdSun;
- break;
- case 4:
- local->appt->repeatDay = dom4thSun;
- break;
- case 5:
- local->appt->repeatDay = domLastSun;
- break;
- }
- local->appt->repeatDay += get_pilot_day (icalrecurrencetype_day_day_of_week (recur->by_day[0]));
- break;
- case ICAL_YEARLY_RECURRENCE:
- local->appt->repeatType = repeatYearly;
- break;
- default:
- break;
- }
-
- if (local->appt->repeatType != repeatNone) {
- local->appt->repeatFrequency = recur->interval;
- }
-
- if (icaltime_is_null_time (recur->until)) {
- local->appt->repeatForever = 1;
- } else {
- local->appt->repeatForever = 0;
- dt_time = icaltime_as_timet (recur->until);
- local->appt->repeatEnd = *localtime (&dt_time);
- }
-
- cal_component_free_recur_list (list);
- }
-
- cal_component_get_classification (comp, &classif);
-
- if (classif == CAL_COMPONENT_CLASS_PRIVATE)
- local->local.secret = 1;
- else
- local->local.secret = 0;
-
- local->local.archived = 0;
-}
-
-static void
-local_record_from_uid (ECalLocalRecord *local,
- const char *uid,
- ECalConduitContext *ctxt)
-{
- CalComponent *comp;
- CalClientGetStatus status;
-
- g_assert(local!=NULL);
-
- status = cal_client_get_object (ctxt->client, uid, &comp);
-
- if (status == CAL_CLIENT_GET_SUCCESS) {
- local_record_from_comp (local, comp, ctxt);
- } else if (status == CAL_CLIENT_GET_NOT_FOUND) {
- comp = cal_component_new ();
- cal_component_set_new_vtype (comp, CAL_COMPONENT_EVENT);
- cal_component_set_uid (comp, uid);
- local_record_from_comp (local, comp, ctxt);
- } else {
- INFO ("Object did not exist");
- }
-}
-
-static CalComponent *
-comp_from_remote_record (GnomePilotConduitSyncAbs *conduit,
- GnomePilotRecord *remote,
- CalComponent *in_comp)
-{
- CalComponent *comp;
- struct Appointment appt;
- struct icaltimetype now = icaltime_from_timet (time (NULL), FALSE), it;
- struct icalrecurrencetype recur;
- int pos, i;
- CalComponentText summary = {NULL, NULL};
- CalComponentDateTime dt = {NULL, NULL};
- GList *alist, *l;
- char *txt;
-
- g_return_val_if_fail (remote != NULL, NULL);
-
- memset (&appt, 0, sizeof (struct Appointment));
- unpack_Appointment (&appt, remote->record, remote->length);
-
- if (in_comp == NULL) {
- comp = cal_component_new ();
- cal_component_set_new_vtype (comp, CAL_COMPONENT_EVENT);
- cal_component_set_created (comp, &now);
- } else {
- comp = cal_component_clone (in_comp);
- }
-
- cal_component_set_last_modified (comp, &now);
-
- summary.value = txt = e_pilot_utf8_from_pchar (appt.description);
- cal_component_set_summary (comp, &summary);
- free (txt);
-
- /* The iCal description field */
- if (!appt.note) {
- cal_component_set_comment_list (comp, NULL);
- } else {
- GSList l;
- CalComponentText text;
-
- text.value = txt = e_pilot_utf8_from_pchar (appt.note);
- text.altrep = NULL;
- l.data = &text;
- l.next = NULL;
-
- cal_component_set_description_list (comp, &l);
- free (txt);
- }
-
- if (!is_empty_time (appt.begin)) {
- it = icaltime_from_timet (mktime (&appt.begin), FALSE);
- dt.value = &it;
- cal_component_set_dtstart (comp, &dt);
- }
-
- if (appt.event) {
- time_t t = mktime (&appt.begin);
-
- t = time_day_end (t);
- it = icaltime_from_timet (t, FALSE);
- dt.value = &it;
- cal_component_set_dtend (comp, &dt);
- } else if (!is_empty_time (appt.end)) {
- it = icaltime_from_timet (mktime (&appt.end), FALSE);
- dt.value = &it;
- cal_component_set_dtend (comp, &dt);
- }
-
- /* Recurrence information */
- icalrecurrencetype_clear (&recur);
-
- switch (appt.repeatType) {
- case repeatNone:
- recur.freq = ICAL_NO_RECURRENCE;
- break;
-
- case repeatDaily:
- recur.freq = ICAL_DAILY_RECURRENCE;
- recur.interval = appt.repeatFrequency;
- break;
-
- case repeatWeekly:
- recur.freq = ICAL_WEEKLY_RECURRENCE;
- recur.interval = appt.repeatFrequency;
-
- pos = 0;
- for (i = 0; i < 7; i++) {
- if (appt.repeatDays[i])
- recur.by_day[pos++] = get_ical_day (i);
- }
-
- break;
-
- case repeatMonthlyByDay:
- recur.freq = ICAL_MONTHLY_RECURRENCE;
- recur.interval = appt.repeatFrequency;
- recur.by_day[0] = nth_weekday (appt.repeatDay / 5, get_ical_day (appt.repeatDay % 5 - 1));
- break;
-
- case repeatMonthlyByDate:
- recur.freq = ICAL_MONTHLY_RECURRENCE;
- recur.interval = appt.repeatFrequency;
- recur.by_month_day[0] = appt.begin.tm_mday;
- break;
-
- case repeatYearly:
- recur.freq = ICAL_YEARLY_RECURRENCE;
- recur.interval = appt.repeatFrequency;
- break;
-
- default:
- g_assert_not_reached ();
- }
-
- if (recur.freq != ICAL_NO_RECURRENCE) {
- GSList *list = NULL;
-
- /* recurrence start of week */
- recur.week_start = get_ical_day (appt.repeatWeekstart);
-
- if (!appt.repeatForever) {
- time_t t = mktime (&appt.repeatEnd);
- t = time_add_day (t, 1);
- recur.until = icaltime_from_timet (t, FALSE);
- }
-
- list = g_slist_append (list, &recur);
- cal_component_set_rrule_list (comp, list);
- g_slist_free (list);
- } else {
- cal_component_set_rrule_list (comp, NULL);
- }
-
- cal_component_set_transparency (comp, CAL_COMPONENT_TRANSP_NONE);
-
- if (remote->attr & dlpRecAttrSecret)
- cal_component_set_classification (comp, CAL_COMPONENT_CLASS_PRIVATE);
- else
- cal_component_set_classification (comp, CAL_COMPONENT_CLASS_PUBLIC);
-
- cal_component_commit_sequence (comp);
-
- free_Appointment (&appt);
-
- return comp;
-}
-
-static void
-update_comp (GnomePilotConduitSyncAbs *conduit, CalComponent *comp,
- ECalConduitContext *ctxt)
-{
- gboolean success;
-
- g_return_if_fail (conduit != NULL);
- g_return_if_fail (comp != NULL);
-
- success = cal_client_update_object (ctxt->client, comp);
-
- if (!success)
- WARN (_("Error while communicating with calendar server"));
-}
-
-static void
-check_for_slow_setting (GnomePilotConduit *c, ECalConduitContext *ctxt)
-{
- int count, map_count;
-
- count = g_list_length (ctxt->uids);
- map_count = g_hash_table_size (ctxt->map->pid_map);
-
- /* If there are no objects or objects but no log */
- if (map_count == 0) {
- GnomePilotConduitStandard *conduit;
- LOG (" doing slow sync\n");
- conduit = GNOME_PILOT_CONDUIT_STANDARD (c);
- gnome_pilot_conduit_standard_set_slow (conduit);
- } else {
- LOG (" doing fast sync\n");
- }
-}
-
-/* Pilot syncing callbacks */
-static gint
-pre_sync (GnomePilotConduit *conduit,
- GnomePilotDBInfo *dbi,
- ECalConduitContext *ctxt)
-{
- GnomePilotConduitSyncAbs *abs_conduit;
- GList *l;
- int len;
- unsigned char *buf;
- char *filename, *change_id;
- gint num_records, add_records = 0, mod_records = 0, del_records = 0;
-
- abs_conduit = GNOME_PILOT_CONDUIT_SYNC_ABS (conduit);
-
- LOG ("---------------------------------------------------------\n");
- LOG ("pre_sync: Calendar Conduit v.%s", CONDUIT_VERSION);
- g_message ("Calendar Conduit v.%s", CONDUIT_VERSION);
-
- ctxt->client = NULL;
-
- if (start_calendar_server (ctxt) != 0) {
- WARN(_("Could not start wombat server"));
- gnome_pilot_conduit_error (conduit, _("Could not start wombat"));
- return -1;
- }
-
- /* Load the uid <--> pilot id mapping */
- filename = map_name (ctxt);
- e_pilot_map_read (filename, &ctxt->map);
- g_free (filename);
-
- /* Get the local database */
- ctxt->uids = cal_client_get_uids (ctxt->client, CALOBJ_TYPE_EVENT);
-
- /* Find the added, modified and deleted items */
- change_id = g_strdup_printf ("pilot-sync-evolution-calendar-%d", ctxt->cfg->pilot_id);
- ctxt->changed = cal_client_get_changes (ctxt->client, CALOBJ_TYPE_EVENT, change_id);
- ctxt->changed_hash = g_hash_table_new (g_str_hash, g_str_equal);
-
- for (l = ctxt->changed; l != NULL; l = l->next) {
- CalClientChange *ccc = l->data;
- const char *uid;
-
- cal_component_get_uid (ccc->comp, &uid);
- if (!e_pilot_map_uid_is_archived (ctxt->map, uid)) {
-
- g_hash_table_insert (ctxt->changed_hash, g_strdup (uid), ccc);
-
- switch (ccc->type) {
- case CAL_CLIENT_CHANGE_ADDED:
- add_records++;
- break;
- case CAL_CLIENT_CHANGE_MODIFIED:
- mod_records++;
- break;
- case CAL_CLIENT_CHANGE_DELETED:
- del_records++;
- break;
- }
- }
- }
-
- /* Set the count information */
- num_records = cal_client_get_n_objects (ctxt->client, CALOBJ_TYPE_TODO);
- gnome_pilot_conduit_sync_abs_set_num_local_records(abs_conduit, num_records);
- gnome_pilot_conduit_sync_abs_set_num_new_local_records (abs_conduit, add_records);
- gnome_pilot_conduit_sync_abs_set_num_updated_local_records (abs_conduit, mod_records);
- gnome_pilot_conduit_sync_abs_set_num_deleted_local_records(abs_conduit, del_records);
-
- gtk_object_set_data (GTK_OBJECT (conduit), "dbinfo", dbi);
-
- buf = (unsigned char*)g_malloc (0xffff);
- len = dlp_ReadAppBlock (dbi->pilot_socket, dbi->db_handle, 0,
- (unsigned char *)buf, 0xffff);
-
- if (len < 0) {
- WARN (_("Could not read pilot's Calendar application block"));
- WARN ("dlp_ReadAppBlock(...) = %d", len);
- gnome_pilot_conduit_error (conduit,
- _("Could not read pilot's Calendar application block"));
- return -1;
- }
- unpack_AppointmentAppInfo (&(ctxt->ai), buf, len);
- g_free (buf);
-
- check_for_slow_setting (conduit, ctxt);
-
- return 0;
-}
-
-static gint
-post_sync (GnomePilotConduit *conduit,
- GnomePilotDBInfo *dbi,
- ECalConduitContext *ctxt)
-{
- GList *changed;
- gchar *filename, *change_id;
-
- LOG ("post_sync: Calendar Conduit v.%s", CONDUIT_VERSION);
- LOG ("---------------------------------------------------------\n");
-
- filename = map_name (ctxt);
- e_pilot_map_write (filename, ctxt->map);
- g_free (filename);
-
- /* FIX ME ugly hack - our changes musn't count, this does introduce
- * a race condition if anyone changes a record elsewhere during sycnc
- */
- change_id = g_strdup_printf ("pilot-sync-evolution-calendar-%d", ctxt->cfg->pilot_id);
- changed = cal_client_get_changes (ctxt->client, CALOBJ_TYPE_EVENT, change_id);
- cal_client_change_list_free (changed);
-
- return 0;
-}
-
-static gint
-set_pilot_id (GnomePilotConduitSyncAbs *conduit,
- ECalLocalRecord *local,
- guint32 ID,
- ECalConduitContext *ctxt)
-{
- const char *uid;
-
- LOG ("set_pilot_id: setting to %d\n", ID);
-
- cal_component_get_uid (local->comp, &uid);
- e_pilot_map_insert (ctxt->map, ID, uid, FALSE);
-
- return 0;
-}
-
-static gint
-set_status_cleared (GnomePilotConduitSyncAbs *conduit,
- ECalLocalRecord *local,
- ECalConduitContext *ctxt)
-{
- const char *uid;
-
- LOG ("set_status_cleared: clearing status\n");
-
- cal_component_get_uid (local->comp, &uid);
- g_hash_table_remove (ctxt->changed_hash, uid);
-
- return 0;
-}
-
-static gint
-for_each (GnomePilotConduitSyncAbs *conduit,
- ECalLocalRecord **local,
- ECalConduitContext *ctxt)
-{
- static GList *uids, *iterator;
- static int count;
-
- g_return_val_if_fail (local != NULL, -1);
-
- if (*local == NULL) {
- LOG ("beginning for_each");
-
- uids = ctxt->uids;
- count = 0;
-
- if (uids != NULL) {
- LOG ("iterating over %d records", g_list_length (uids));
-
- *local = g_new0 (ECalLocalRecord, 1);
- local_record_from_uid (*local, uids->data, ctxt);
-
- iterator = uids;
- } else {
- LOG ("no events");
- (*local) = NULL;
- return 0;
- }
- } else {
- count++;
- if (g_list_next (iterator)) {
- iterator = g_list_next (iterator);
-
- *local = g_new0 (ECalLocalRecord, 1);
- local_record_from_uid (*local, iterator->data, ctxt);
- } else {
- LOG ("for_each ending");
-
- /* Tell the pilot the iteration is over */
- *local = NULL;
-
- return 0;
- }
- }
-
- return 0;
-}
-
-static gint
-for_each_modified (GnomePilotConduitSyncAbs *conduit,
- ECalLocalRecord **local,
- ECalConduitContext *ctxt)
-{
- static GList *iterator;
- static int count;
-
- g_return_val_if_fail (local != NULL, 0);
-
- if (*local == NULL) {
- LOG ("beginning for_each_modified: beginning\n");
-
- iterator = ctxt->changed;
-
- count = 0;
-
- LOG ("iterating over %d records", g_hash_table_size (ctxt->changed_hash));
-
- iterator = next_changed_item (ctxt, iterator);
- if (iterator != NULL) {
- CalClientChange *ccc = iterator->data;
-
- *local = g_new0 (ECalLocalRecord, 1);
- local_record_from_comp (*local, ccc->comp, ctxt);
- } else {
- LOG ("no events");
-
- *local = NULL;
- }
- } else {
- count++;
- iterator = g_list_next (iterator);
- if (iterator && (iterator = next_changed_item (ctxt, iterator))) {
- CalClientChange *ccc = iterator->data;
-
- *local = g_new0 (ECalLocalRecord, 1);
- local_record_from_comp (*local, ccc->comp, ctxt);
- } else {
- LOG ("for_each_modified ending");
-
- /* Signal the iteration is over */
- *local = NULL;
- }
- }
-
- return 0;
-}
-
-static gint
-compare (GnomePilotConduitSyncAbs *conduit,
- ECalLocalRecord *local,
- GnomePilotRecord *remote,
- ECalConduitContext *ctxt)
-{
- /* used by the quick compare */
- GnomePilotRecord local_pilot;
- int retval = 0;
-
- LOG ("compare: local=%s remote=%s...\n",
- print_local (local), print_remote (remote));
-
- g_return_val_if_fail (local!=NULL,-1);
- g_return_val_if_fail (remote!=NULL,-1);
-
- local_pilot = local_record_to_pilot_record (local, ctxt);
-
- if (remote->length != local_pilot.length
- || memcmp (local_pilot.record, remote->record, remote->length))
- retval = 1;
-
- if (retval == 0)
- LOG (" equal");
- else
- LOG (" not equal");
-
- return retval;
-}
-
-static gint
-add_record (GnomePilotConduitSyncAbs *conduit,
- GnomePilotRecord *remote,
- ECalConduitContext *ctxt)
-{
- CalComponent *comp;
- const char *uid;
- int retval = 0;
-
- g_return_val_if_fail (remote != NULL, -1);
-
- LOG ("add_record: adding %s to desktop\n", print_remote (remote));
-
- comp = comp_from_remote_record (conduit, remote, NULL);
- update_comp (conduit, comp, ctxt);
-
- cal_component_get_uid (comp, &uid);
-
- e_pilot_map_insert (ctxt->map, remote->ID, uid, FALSE);
-
- return retval;
-}
-
-static gint
-replace_record (GnomePilotConduitSyncAbs *conduit,
- ECalLocalRecord *local,
- GnomePilotRecord *remote,
- ECalConduitContext *ctxt)
-{
- CalComponent *new_comp;
- int retval = 0;
-
- g_return_val_if_fail (remote != NULL, -1);
-
- LOG ("replace_record: replace %s with %s\n",
- print_local (local), print_remote (remote));
-
- new_comp = comp_from_remote_record (conduit, remote, local->comp);
- gtk_object_unref (GTK_OBJECT (local->comp));
- local->comp = new_comp;
- update_comp (conduit, local->comp, ctxt);
-
- return retval;
-}
-
-static gint
-delete_record (GnomePilotConduitSyncAbs *conduit,
- ECalLocalRecord *local,
- ECalConduitContext *ctxt)
-{
- const char *uid;
-
- g_return_val_if_fail (local != NULL, -1);
- g_assert (local->comp != NULL);
-
- cal_component_get_uid (local->comp, &uid);
-
- LOG ("delete_record: deleting %s\n", uid);
-
- e_pilot_map_remove_by_uid (ctxt->map, uid);
- cal_client_remove_object (ctxt->client, uid);
-
- return 0;
-}
-
-static gint
-archive_record (GnomePilotConduitSyncAbs *conduit,
- ECalLocalRecord *local,
- gboolean archive,
- ECalConduitContext *ctxt)
-{
- const char *uid;
- int retval = 0;
-
- g_return_val_if_fail (local != NULL, -1);
-
- LOG ("archive_record: %s\n", archive ? "yes" : "no");
-
- cal_component_get_uid (local->comp, &uid);
- e_pilot_map_insert (ctxt->map, local->local.ID, uid, archive);
-
- return retval;
-}
-
-static gint
-match (GnomePilotConduitSyncAbs *conduit,
- GnomePilotRecord *remote,
- ECalLocalRecord **local,
- ECalConduitContext *ctxt)
-{
- const char *uid;
-
- LOG ("match: looking for local copy of %s\n",
- print_remote (remote));
-
- g_return_val_if_fail (local != NULL, -1);
- g_return_val_if_fail (remote != NULL, -1);
-
- *local = NULL;
- uid = e_pilot_map_lookup_uid (ctxt->map, remote->ID);
-
- if (!uid)
- return 0;
-
- LOG (" matched\n");
-
- *local = g_new0 (ECalLocalRecord, 1);
- local_record_from_uid (*local, uid, ctxt);
-
- return 0;
-}
-
-static gint
-free_match (GnomePilotConduitSyncAbs *conduit,
- ECalLocalRecord *local,
- ECalConduitContext *ctxt)
-{
- LOG ("free_match: freeing\n");
-
- g_return_val_if_fail (local != NULL, -1);
-
- gtk_object_unref (GTK_OBJECT (local->comp));
- g_free (local);
-
- return 0;
-}
-
-static gint
-prepare (GnomePilotConduitSyncAbs *conduit,
- ECalLocalRecord *local,
- GnomePilotRecord *remote,
- ECalConduitContext *ctxt)
-{
- LOG ("prepare: encoding local %s\n", print_local (local));
-
- *remote = local_record_to_pilot_record (local, ctxt);
-
- return 0;
-}
-
-static ORBit_MessageValidationResult
-accept_all_cookies (CORBA_unsigned_long request_id,
- CORBA_Principal *principal,
- CORBA_char *operation)
-{
- /* allow ALL cookies */
- return ORBIT_MESSAGE_ALLOW_ALL;
-}
-
-
-GnomePilotConduit *
-conduit_get_gpilot_conduit (guint32 pilot_id)
-{
- GtkObject *retval;
- ECalConduitContext *ctxt;
-
- LOG ("in calendar's conduit_get_gpilot_conduit\n");
-
- /* we need to find wombat with oaf, so make sure oaf
- is initialized here. once the desktop is converted
- to oaf and gpilotd is built with oaf, this can go away */
- if (!oaf_is_initialized ()) {
- char *argv[ 1 ] = {"hi"};
- oaf_init (1, argv);
-
- if (bonobo_init (CORBA_OBJECT_NIL,
- CORBA_OBJECT_NIL,
- CORBA_OBJECT_NIL) == FALSE)
- g_error (_("Could not initialize Bonobo"));
-
- ORBit_set_request_validation_handler (accept_all_cookies);
- }
-
- retval = gnome_pilot_conduit_sync_abs_new ("DatebookDB", 0x64617465);
- g_assert (retval != NULL);
-
- gnome_pilot_conduit_construct (GNOME_PILOT_CONDUIT (retval),
- "e_calendar_conduit");
-
- ctxt = e_calendar_context_new (pilot_id);
- gtk_object_set_data (GTK_OBJECT (retval), "calconduit_context", ctxt);
-
- gtk_signal_connect (retval, "pre_sync", (GtkSignalFunc) pre_sync, ctxt);
- gtk_signal_connect (retval, "post_sync", (GtkSignalFunc) post_sync, ctxt);
-
- gtk_signal_connect (retval, "set_pilot_id", (GtkSignalFunc) set_pilot_id, ctxt);
- gtk_signal_connect (retval, "set_status_cleared", (GtkSignalFunc) set_status_cleared, ctxt);
-
- gtk_signal_connect (retval, "for_each", (GtkSignalFunc) for_each, ctxt);
- gtk_signal_connect (retval, "for_each_modified", (GtkSignalFunc) for_each_modified, ctxt);
- gtk_signal_connect (retval, "compare", (GtkSignalFunc) compare, ctxt);
-
- gtk_signal_connect (retval, "add_record", (GtkSignalFunc) add_record, ctxt);
- gtk_signal_connect (retval, "replace_record", (GtkSignalFunc) replace_record, ctxt);
- gtk_signal_connect (retval, "delete_record", (GtkSignalFunc) delete_record, ctxt);
- gtk_signal_connect (retval, "archive_record", (GtkSignalFunc) archive_record, ctxt);
-
- gtk_signal_connect (retval, "match", (GtkSignalFunc) match, ctxt);
- gtk_signal_connect (retval, "free_match", (GtkSignalFunc) free_match, ctxt);
-
- gtk_signal_connect (retval, "prepare", (GtkSignalFunc) prepare, ctxt);
-
- return GNOME_PILOT_CONDUIT (retval);
-}
-
-void
-conduit_destroy_gpilot_conduit (GnomePilotConduit *conduit)
-{
- GtkObject *obj = GTK_OBJECT (conduit);
- ECalConduitContext *ctxt;
-
- ctxt = gtk_object_get_data (obj, "calconduit_context");
- e_calendar_context_destroy (ctxt);
-
- gtk_object_destroy (obj);
-}
diff --git a/calendar/conduits/calendar/calendar-conduit.h b/calendar/conduits/calendar/calendar-conduit.h
deleted file mode 100644
index 03308e77d9..0000000000
--- a/calendar/conduits/calendar/calendar-conduit.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* Evolution calendar - Calendar Conduit
- *
- * Copyright (C) 1998 Free Software Foundation
- * Copyright (C) 2000 Helix Code, Inc.
- *
- * Authors: Eskil Heyn Olsen <deity@eskil.dk>
- * JP Rosevear <jpr@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 __CALENDAR_CONDUIT_H__
-#define __CALENDAR_CONDUIT_H__
-
-#include <sys/types.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <gnome.h>
-#include <pi-datebook.h>
-#include <gpilotd/gnome-pilot-conduit.h>
-#include <gpilotd/gnome-pilot-conduit-sync-abs.h>
-#include <cal-client/cal-client.h>
-#include <e-pilot-map.h>
-
-/* This is the local record structure for the Evolution Calendar conduit. */
-typedef struct _ECalLocalRecord ECalLocalRecord;
-struct _ECalLocalRecord {
- /* 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.
- */
- GnomePilotDesktopRecord local;
-
- /* The corresponding Comp object */
- CalComponent *comp;
-
- /* pilot-link todo structure */
- struct Appointment *appt;
-};
-
-/* This is the context for all the Evolution Calendar conduit methods. */
-typedef struct _ECalConduitContext ECalConduitContext;
-struct _ECalConduitContext {
- ECalConduitCfg *cfg;
-
- struct AppointmentAppInfo ai;
-
- CalClient *client;
- char *calendar_file;
- gboolean calendar_open_success;
-
- time_t since;
- GList *uids;
- GList *changed;
- GHashTable *changed_hash;
-
- EPilotMap *map;
-};
-
-#endif __CALENDAR_CONDUIT_H__
-
-
-
-
-
-
diff --git a/calendar/conduits/calendar/e-calendar-conduit-control-applet.desktop.in b/calendar/conduits/calendar/e-calendar-conduit-control-applet.desktop.in
deleted file mode 100644
index 5988e6cb08..0000000000
--- a/calendar/conduits/calendar/e-calendar-conduit-control-applet.desktop.in
+++ /dev/null
@@ -1,8 +0,0 @@
-[Desktop Entry]
-_Name=Evolution Calendar Conduit
-_Comment=Configure the Evolution Calendar conduit
-Exec=e-calendar-conduit-control-applet --cap-id=1
-TryExec=e-calendar-conduit-control-applet
-Terminal=0
-Type=Application
-Icon=gnome-calendar-conduit.png
diff --git a/calendar/conduits/calendar/e-calendar.conduit.in b/calendar/conduits/calendar/e-calendar.conduit.in
deleted file mode 100644
index 336901f581..0000000000
--- a/calendar/conduits/calendar/e-calendar.conduit.in
+++ /dev/null
@@ -1,9 +0,0 @@
-<gnome-pilot-conduit version="1.0">
- <conduit id="e_calendar_conduit" type="shlib" location="@prefix@/lib/gnome-pilot/conduits/libecalendar_conduit.so"/>
- <name value="ECalendar"/>
- <conduit-attribute name="description" _value="Synchronizes Calendar with Evolution"/>
- <conduit-attribute name="default-synctype" value="synchronize"/>
- <conduit-attribute name="valid-synctypes" value="synchronize copy_from_pilot copy_to_pilot merge_from_pilot merge_to_pilot"/>
- <conduit-attribute name="settings" value="FALSE"/>
- <conduit-attribute name="icon" value="@datadir@/images/evolution/conduits/48_evo-calendar-conduit.png"/>
-</gnome-pilot-conduit>
diff --git a/calendar/conduits/todo/.cvsignore b/calendar/conduits/todo/.cvsignore
deleted file mode 100644
index 3ee063c770..0000000000
--- a/calendar/conduits/todo/.cvsignore
+++ /dev/null
@@ -1,9 +0,0 @@
-Makefile.in
-Makefile
-.deps
-.libs
-*.lo
-*.la
-e-todo-conduit-control-applet
-e-todo-conduit-control-applet.desktop
-e-todo.conduit
diff --git a/calendar/conduits/todo/Makefile.am b/calendar/conduits/todo/Makefile.am
deleted file mode 100644
index df97d306a4..0000000000
--- a/calendar/conduits/todo/Makefile.am
+++ /dev/null
@@ -1,46 +0,0 @@
-INCLUDES = \
- -I$(top_srcdir) \
- -I$(top_srcdir)/calendar \
- -I$(top_srcdir)/libical/src/libical \
- -I$(top_builddir)/libical/src/libical \
- -I$(top_builddir)/e-util \
- $(BONOBO_GNOME_CFLAGS) \
- $(PISOCK_CFLAGS) \
- $(GNOME_PILOT_CFLAGS)
-
-# ToDo Conduit
-e_todo_conduitsdir=$(libdir)/gnome-pilot/conduits
-e_todo_conduits_LTLIBRARIES = libetodo_conduit.la
-
-libetodo_conduit_la_SOURCES = \
- todo-conduit.c \
- todo-conduit.h \
- todo-conduit-config.h
-
-libetodo_conduit_la_LDFLAGS = -module -avoid-version
-libetodo_conduit_la_LIBADD = \
- $(top_builddir)/calendar/cal-client/libcal-client-static.la \
- $(top_builddir)/calendar/cal-util/libcal-util-static.la \
- $(top_builddir)/libversit/libversit.la \
- $(top_builddir)/libical/src/libical/libical-static.la \
- $(top_builddir)/e-util/libeconduit-static.la \
- $(BONOBO_GNOME_LIBS) \
- $(PISOCK_LIBS) \
- $(UNICODE_LIBS) \
- $(GNOME_LIBDIR) \
- $(GNOME_LIBS)
-
-e-todo.conduit: e-todo.conduit.in Makefile
- sed -e 's^\@prefix\@^$(prefix)^g' \
- -e 's^\@datadir\@^$(datadir)^g' \
- < $(srcdir)/e-todo.conduit.in > e-todo.conduit.tmp \
- && mv e-todo.conduit.tmp e-todo.conduit
-
-Conduitdir = $(datadir)/gnome-pilot/conduits/
-Conduit_DATA = e-todo.conduit
-
-EXTRA_DIST = \
- e-todo.conduit.in
-
-install-data-local:
- $(mkinstalldirs) $(Conduitdir)
diff --git a/calendar/conduits/todo/e-todo-conduit-control-applet.desktop.in b/calendar/conduits/todo/e-todo-conduit-control-applet.desktop.in
deleted file mode 100644
index ec5856fcad..0000000000
--- a/calendar/conduits/todo/e-todo-conduit-control-applet.desktop.in
+++ /dev/null
@@ -1,7 +0,0 @@
-[Desktop Entry]
-_Name=Evolution ToDo Conduit
-_Comment=Configure the Evolution ToDo conduit
-Exec=e-todo-conduit-control-applet --cap-id=1
-TryExec=e-todo-conduit-control-applet
-Terminal=0
-Type=Application
diff --git a/calendar/conduits/todo/e-todo.conduit.in b/calendar/conduits/todo/e-todo.conduit.in
deleted file mode 100644
index 733c2105db..0000000000
--- a/calendar/conduits/todo/e-todo.conduit.in
+++ /dev/null
@@ -1,9 +0,0 @@
-<gnome-pilot-conduit version="1.0">
- <conduit id="e_todo_conduit" type="shlib" location="@prefix@/lib/gnome-pilot/conduits/libetodo_conduit.so"/>
- <name value="EToDo"/>
- <conduit-attribute name="description" value="Synchronizes ToDo List with Evolution"/>
- <conduit-attribute name="default-synctype" value="synchronize"/>
- <conduit-attribute name="valid-synctypes" value="synchronize copy_from_pilot copy_to_pilot merge_from_pilot merge_to_pilot"/>
- <conduit-attribute name="settings" value="FALSE"/>
- <conduit-attribute name="icon" value="@datadir@/images/evolution/conduits/48_evo-todo-conduit.png"/>
-</gnome-pilot-conduit>
diff --git a/calendar/conduits/todo/todo-conduit-config.h b/calendar/conduits/todo/todo-conduit-config.h
deleted file mode 100644
index fe7b1dbafa..0000000000
--- a/calendar/conduits/todo/todo-conduit-config.h
+++ /dev/null
@@ -1,120 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* Evolution calendar - ToDo Conduit Configuration
- *
- * Copyright (C) 1998 Free Software Foundation
- * Copyright (C) 2000 Helix Code, Inc.
- *
- * Authors: Eskil Heyn Olsen <deity@eskil.dk>
- * JP Rosevear <jpr@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 __TODO_CONDUIT_CONFIG_H__
-#define __TODO_CONDUIT_CONFIG_H__
-
-#include <gnome.h>
-#include <libgpilotdCM/gnome-pilot-conduit-management.h>
-#include <libgpilotdCM/gnome-pilot-conduit-config.h>
-
-/* Configuration info */
-typedef struct _EToDoConduitCfg EToDoConduitCfg;
-struct _EToDoConduitCfg {
- gboolean open_secret;
- guint32 pilot_id;
- GnomePilotConduitSyncType sync_type; /* only used by capplet */
-};
-
-#ifdef TODO_CONFIG_LOAD
-/* Load the configuration data */
-static void
-todoconduit_load_configuration (EToDoConduitCfg **c, guint32 pilot_id)
-{
- gchar prefix[256];
- g_snprintf (prefix, 255, "/gnome-pilot.d/e-todo-conduit/Pilot_%u/",
- pilot_id);
-
- *c = g_new0 (EToDoConduitCfg,1);
- g_assert (*c != NULL);
-
- gnome_config_push_prefix (prefix);
- (*c)->open_secret = gnome_config_get_bool ("open_secret=FALSE");
-
- /* set in capplets main */
- (*c)->sync_type = GnomePilotConduitSyncTypeCustom;
- gnome_config_pop_prefix ();
-
- (*c)->pilot_id = pilot_id;
-}
-#endif
-
-#ifdef TODO_CONFIG_SAVE
-/* Saves the configuration data. */
-static void
-todoconduit_save_configuration (EToDoConduitCfg *c)
-{
- gchar prefix[256];
-
- g_snprintf (prefix, 255, "/gnome-pilot.d/e-todo-conduit/Pilot_%u/",
- c->pilot_id);
-
- 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 ();
-}
-#endif
-
-#ifdef TODO_CONFIG_DUPE
-/* Creates a duplicate of the configuration data */
-static EToDoConduitCfg*
-todoconduit_dupe_configuration (EToDoConduitCfg *c)
-{
- EToDoConduitCfg *retval;
-
- g_return_val_if_fail (c != NULL, NULL);
-
- retval = g_new0 (EToDoConduitCfg, 1);
- retval->sync_type = c->sync_type;
- retval->open_secret = c->open_secret;
- retval->pilot_id = c->pilot_id;
-
- return retval;
-}
-#endif
-
-#ifdef TODO_CONFIG_DESTROY
-/* Destroy a configuration */
-static void
-todoconduit_destroy_configuration (EToDoConduitCfg **c)
-{
- g_return_if_fail (c != NULL);
- g_return_if_fail (*c != NULL);
-
- g_free (*c);
- *c = NULL;
-}
-#endif
-
-#endif __TODO_CONDUIT_CONFIG_H__
-
-
-
-
-
-
-
diff --git a/calendar/conduits/todo/todo-conduit.c b/calendar/conduits/todo/todo-conduit.c
deleted file mode 100644
index f812532616..0000000000
--- a/calendar/conduits/todo/todo-conduit.c
+++ /dev/null
@@ -1,1012 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* Evolution calendar - ToDo Conduit
- *
- * Copyright (C) 1998 Free Software Foundation
- * Copyright (C) 2000 Helix Code, Inc.
- *
- * Authors: Eskil Heyn Olsen <deity@eskil.dk>
- * JP Rosevear <jpr@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 <liboaf/liboaf.h>
-#include <bonobo.h>
-#include <cal-client/cal-client-types.h>
-#include <cal-client/cal-client.h>
-#include <cal-util/timeutil.h>
-#include <pi-source.h>
-#include <pi-socket.h>
-#include <pi-file.h>
-#include <pi-dlp.h>
-#include <libical/src/libical/icaltypes.h>
-#include <e-pilot-util.h>
-
-#define TODO_CONFIG_LOAD 1
-#define TODO_CONFIG_DESTROY 1
-#include <todo-conduit-config.h>
-#undef TODO_CONFIG_LOAD
-#undef TODO_CONFIG_DESTROY
-
-#include <todo-conduit.h>
-
-GnomePilotConduit * conduit_get_gpilot_conduit (guint32);
-void conduit_destroy_gpilot_conduit (GnomePilotConduit*);
-
-#define CONDUIT_VERSION "0.1.4"
-#ifdef G_LOG_DOMAIN
-#undef G_LOG_DOMAIN
-#endif
-#define G_LOG_DOMAIN "etodoconduit"
-
-#define DEBUG_CALCONDUIT 1
-/* #undef DEBUG_CALCONDUIT */
-
-#ifdef DEBUG_CALCONDUIT
-#define LOG(e...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, e)
-#else
-#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)
-
-/* Debug routines */
-static char *
-print_local (EToDoLocalRecord *local)
-{
- static char buff[ 4096 ];
-
- if (local == NULL) {
- sprintf (buff, "[NULL]");
- return buff;
- }
-
- if (local->todo && local->todo->description) {
- g_snprintf (buff, 4096, "[%d %ld %d %d '%s' '%s']",
- local->todo->indefinite,
- mktime (& local->todo->due),
- local->todo->priority,
- local->todo->complete,
- local->todo->description ?
- local->todo->description : "",
- local->todo->note ?
- local->todo->note : "");
- return buff;
- }
-
- return "";
-}
-
-static char *print_remote (GnomePilotRecord *remote)
-{
- static char buff[ 4096 ];
- struct ToDo todo;
-
- if (remote == NULL) {
- sprintf (buff, "[NULL]");
- return buff;
- }
-
- memset (&todo, 0, sizeof (struct ToDo));
- unpack_ToDo (&todo, remote->record, remote->length);
-
- g_snprintf (buff, 4096, "[%d %ld %d %d '%s' '%s']",
- todo.indefinite,
- mktime (&todo.due),
- todo.priority,
- todo.complete,
- todo.description ?
- todo.description : "",
- todo.note ?
- todo.note : "");
-
- return buff;
-}
-
-/* Context Routines */
-static EToDoConduitContext *
-e_todo_context_new (guint32 pilot_id)
-{
- EToDoConduitContext *ctxt = g_new0 (EToDoConduitContext, 1);
-
- todoconduit_load_configuration (&ctxt->cfg, pilot_id);
-
- return ctxt;
-}
-
-static void
-e_todo_context_foreach_change (gpointer key, gpointer value, gpointer data)
-{
- g_free (key);
-}
-
-static void
-e_todo_context_destroy (EToDoConduitContext *ctxt)
-{
- g_return_if_fail (ctxt != NULL);
-
- if (ctxt->cfg != NULL)
- todoconduit_destroy_configuration (&ctxt->cfg);
-
- if (ctxt->client != NULL)
- gtk_object_unref (GTK_OBJECT (ctxt->client));
-
- if (ctxt->calendar_file)
- g_free (ctxt->calendar_file);
-
- if (ctxt->uids)
- cal_obj_uid_list_free (ctxt->uids);
-
- if (ctxt->changed_hash)
- g_hash_table_foreach (ctxt->changed_hash, e_todo_context_foreach_change, NULL);
-
- if (ctxt->changed)
- cal_client_change_list_free (ctxt->changed);
-
- if (ctxt->map)
- e_pilot_map_destroy (ctxt->map);
-
- g_free (ctxt);
-}
-
-/* Calendar Server routines */
-static void
-start_calendar_server_cb (CalClient *cal_client,
- CalClientOpenStatus status,
- gpointer data)
-{
- EToDoConduitContext *ctxt;
-
- ctxt = data;
-
- LOG (" entering start_calendar_server_cb\n");
-
- if (status == CAL_CLIENT_OPEN_SUCCESS) {
- ctxt->calendar_open_success = TRUE;
- LOG (" success\n");
- } else
- LOG (" open of calendar failed\n");
-
- gtk_main_quit (); /* end the sub event loop */
-}
-
-static int
-start_calendar_server (EToDoConduitContext *ctxt)
-{
-
- g_return_val_if_fail (ctxt != NULL, -2);
-
- ctxt->client = cal_client_new ();
-
- /* FIX ME */
- ctxt->calendar_file = g_concat_dir_and_file (g_get_home_dir (),
- "evolution/local/Tasks/tasks.ics");
-
- gtk_signal_connect (GTK_OBJECT (ctxt->client), "cal_opened",
- start_calendar_server_cb, ctxt);
-
- LOG (" calling cal_client_open_calendar\n");
- if (!cal_client_open_calendar (ctxt->client, ctxt->calendar_file, FALSE))
- return -1;
-
- /* run a sub event loop to turn cal-client's async load
- notification into a synchronous call */
- gtk_main ();
-
- if (ctxt->calendar_open_success)
- return 0;
-
- return -1;
-}
-
-/* Utility routines */
-static char *
-map_name (EToDoConduitContext *ctxt)
-{
- char *filename;
-
- filename = g_strdup_printf ("%s/evolution/local/Tasks/pilot-map-todo-%d.xml", g_get_home_dir (), ctxt->cfg->pilot_id);
-
- return filename;
-}
-
-static gboolean
-is_empty_time (struct tm time)
-{
- if (time.tm_sec || time.tm_min || time.tm_hour
- || time.tm_mday || time.tm_mon || time.tm_year)
- return FALSE;
-
- return TRUE;
-}
-
-static GList *
-next_changed_item (EToDoConduitContext *ctxt, GList *changes)
-{
- CalClientChange *ccc;
- GList *l;
-
- for (l = changes; l != NULL; l = l->next) {
- const char *uid;
-
- ccc = l->data;
-
- cal_component_get_uid (ccc->comp, &uid);
- if (g_hash_table_lookup (ctxt->changed_hash, uid))
- return l;
- }
-
- return NULL;
-}
-
-static void
-compute_status (EToDoConduitContext *ctxt, EToDoLocalRecord *local, const char *uid)
-{
- CalClientChange *ccc;
-
- local->local.archived = FALSE;
- local->local.secret = FALSE;
-
- ccc = g_hash_table_lookup (ctxt->changed_hash, uid);
-
- if (ccc == NULL) {
- local->local.attr = GnomePilotRecordNothing;
- return;
- }
-
- switch (ccc->type) {
- case CAL_CLIENT_CHANGE_ADDED:
- local->local.attr = GnomePilotRecordNew;
- break;
- case CAL_CLIENT_CHANGE_MODIFIED:
- local->local.attr = GnomePilotRecordModified;
- break;
- case CAL_CLIENT_CHANGE_DELETED:
- local->local.attr = GnomePilotRecordDeleted;
- break;
- }
-}
-
-static GnomePilotRecord
-local_record_to_pilot_record (EToDoLocalRecord *local,
- EToDoConduitContext *ctxt)
-{
- GnomePilotRecord p;
-
- g_assert (local->comp != NULL);
- g_assert (local->todo != NULL );
-
- LOG ("local_record_to_pilot_record\n");
-
- p.ID = local->local.ID;
- p.category = 0;
- p.attr = local->local.attr;
- p.archived = local->local.archived;
- p.secret = local->local.secret;
-
- /* Generate pilot record structure */
- p.record = g_new0 (char, 0xffff);
- p.length = pack_ToDo (local->todo, p.record, 0xffff);
-
- return p;
-}
-
-/*
- * converts a CalComponent object to a EToDoLocalRecord
- */
-static void
-local_record_from_comp (EToDoLocalRecord *local, CalComponent *comp, EToDoConduitContext *ctxt)
-{
- const char *uid;
- int *priority;
- struct icaltimetype *completed;
- CalComponentText summary;
- GSList *d_list = NULL;
- CalComponentText *description;
- CalComponentDateTime due;
- time_t due_time;
- CalComponentClassification classif;
-
- LOG ("local_record_from_comp\n");
-
- g_return_if_fail (local != NULL);
- g_return_if_fail (comp != NULL);
-
- local->comp = comp;
- gtk_object_ref (GTK_OBJECT (comp));
-
- cal_component_get_uid (local->comp, &uid);
- local->local.ID = e_pilot_map_lookup_pid (ctxt->map, uid);
-
- compute_status (ctxt, local, uid);
-
- local->todo = g_new0 (struct ToDo,1);
-
- /* STOP: don't replace these with g_strdup, since free_ToDo
- uses free to deallocate */
- cal_component_get_summary (comp, &summary);
- if (summary.value)
- local->todo->description = e_pilot_utf8_to_pchar (summary.value);
-
- cal_component_get_description_list (comp, &d_list);
- if (d_list) {
- description = (CalComponentText *) d_list->data;
- if (description && description->value)
- local->todo->note = e_pilot_utf8_to_pchar (description->value);
- else
- local->todo->note = NULL;
- } else {
- local->todo->note = NULL;
- }
-
- cal_component_get_due (comp, &due);
- if (due.value) {
- due_time = icaltime_as_timet (*due.value);
-
- local->todo->due = *localtime (&due_time);
- local->todo->indefinite = 0;
- } else {
- local->todo->indefinite = 1;
- }
-
- cal_component_get_completed (comp, &completed);
- if (completed) {
- local->todo->complete = 1;
- cal_component_free_icaltimetype (completed);
- }
-
- cal_component_get_priority (comp, &priority);
- if (priority) {
- local->todo->priority = *priority;
- cal_component_free_priority (priority);
- }
-
- cal_component_get_classification (comp, &classif);
-
- if (classif == CAL_COMPONENT_CLASS_PRIVATE)
- local->local.secret = 1;
- else
- local->local.secret = 0;
-
- local->local.archived = 0;
-}
-
-static void
-local_record_from_uid (EToDoLocalRecord *local,
- const char *uid,
- EToDoConduitContext *ctxt)
-{
- CalComponent *comp;
- CalClientGetStatus status;
-
- g_assert(local!=NULL);
-
- status = cal_client_get_object (ctxt->client, uid, &comp);
-
- if (status == CAL_CLIENT_GET_SUCCESS) {
- local_record_from_comp (local, comp, ctxt);
- } else if (status == CAL_CLIENT_GET_NOT_FOUND) {
- comp = cal_component_new ();
- cal_component_set_new_vtype (comp, CAL_COMPONENT_TODO);
- cal_component_set_uid (comp, uid);
- local_record_from_comp (local, comp, ctxt);
- } else {
- INFO ("Object did not exist");
- }
-}
-
-
-static CalComponent *
-comp_from_remote_record (GnomePilotConduitSyncAbs *conduit,
- GnomePilotRecord *remote,
- CalComponent *in_comp)
-{
- CalComponent *comp;
- struct ToDo todo;
- struct icaltimetype now = icaltime_from_timet (time (NULL), FALSE);
- CalComponentText summary = {NULL, NULL};
- CalComponentDateTime dt = {NULL, NULL};
- struct icaltimetype due;
- char *txt;
-
- g_return_val_if_fail (remote != NULL, NULL);
-
- memset (&todo, 0, sizeof (struct ToDo));
- unpack_ToDo (&todo, remote->record, remote->length);
-
- if (in_comp == NULL) {
- comp = cal_component_new ();
- cal_component_set_new_vtype (comp, CAL_COMPONENT_TODO);
- cal_component_set_created (comp, &now);
- } else {
- comp = cal_component_clone (in_comp);
- }
-
- cal_component_set_last_modified (comp, &now);
-
- summary.value = txt = e_pilot_utf8_from_pchar (todo.description);
- cal_component_set_summary (comp, &summary);
- free (txt);
-
- /* The iCal description field */
- if (!todo.note) {
- cal_component_set_comment_list (comp, NULL);
- } else {
- GSList l;
- CalComponentText text;
-
- text.value = txt = e_pilot_utf8_from_pchar (todo.note);
- text.altrep = NULL;
- l.data = &text;
- l.next = NULL;
-
- cal_component_set_description_list (comp, &l);
- free (txt);
- }
-
- if (todo.complete) {
- int percent = 100;
- cal_component_set_completed (comp, &now);
- cal_component_set_percent (comp, &percent);
- }
-
- if (!is_empty_time (todo.due)) {
- due = icaltime_from_timet (mktime (&todo.due), FALSE);
- dt.value = &due;
- cal_component_set_due (comp, &dt);
- }
-
- cal_component_set_priority (comp, &todo.priority);
- cal_component_set_transparency (comp, CAL_COMPONENT_TRANSP_NONE);
-
- if (remote->attr & dlpRecAttrSecret)
- cal_component_set_classification (comp, CAL_COMPONENT_CLASS_PRIVATE);
- else
- cal_component_set_classification (comp, CAL_COMPONENT_CLASS_PUBLIC);
-
- cal_component_commit_sequence (comp);
-
- free_ToDo(&todo);
-
- return comp;
-}
-
-static void
-update_comp (GnomePilotConduitSyncAbs *conduit, CalComponent *comp,
- EToDoConduitContext *ctxt)
-{
- gboolean success;
-
- g_return_if_fail (conduit != NULL);
- g_return_if_fail (comp != NULL);
-
- success = cal_client_update_object (ctxt->client, comp);
-
- if (!success)
- WARN (_("Error while communicating with calendar server"));
-}
-
-static void
-check_for_slow_setting (GnomePilotConduit *c, EToDoConduitContext *ctxt)
-{
- int count, map_count;
-
- count = g_list_length (ctxt->uids);
- map_count = g_hash_table_size (ctxt->map->pid_map);
-
- /* If there are no objects or objects but no log */
- if (map_count == 0) {
- GnomePilotConduitStandard *conduit;
- LOG (" doing slow sync\n");
- conduit = GNOME_PILOT_CONDUIT_STANDARD (c);
- gnome_pilot_conduit_standard_set_slow (conduit);
- } else {
- LOG (" doing fast sync\n");
- }
-}
-
-/* Pilot syncing callbacks */
-static gint
-pre_sync (GnomePilotConduit *conduit,
- GnomePilotDBInfo *dbi,
- EToDoConduitContext *ctxt)
-{
- GnomePilotConduitSyncAbs *abs_conduit;
- GList *l;
- int len;
- unsigned char *buf;
- char *filename, *change_id;
- gint num_records, add_records = 0, mod_records = 0, del_records = 0;
-
- abs_conduit = GNOME_PILOT_CONDUIT_SYNC_ABS (conduit);
-
- LOG ("---------------------------------------------------------\n");
- LOG ("pre_sync: ToDo Conduit v.%s", CONDUIT_VERSION);
- g_message ("ToDo Conduit v.%s", CONDUIT_VERSION);
-
- ctxt->client = NULL;
-
- if (start_calendar_server (ctxt) != 0) {
- WARN(_("Could not start wombat server"));
- gnome_pilot_conduit_error (conduit, _("Could not start wombat"));
- return -1;
- }
-
- /* Load the uid <--> pilot id map */
- filename = map_name (ctxt);
- e_pilot_map_read (filename, &ctxt->map);
- g_free (filename);
-
- /* Get the local database */
- ctxt->uids = cal_client_get_uids (ctxt->client, CALOBJ_TYPE_TODO);
-
- /* Count and hash the changes */
- change_id = g_strdup_printf ("pilot-sync-evolution-todo-%d", ctxt->cfg->pilot_id);
- ctxt->changed = cal_client_get_changes (ctxt->client, CALOBJ_TYPE_TODO, change_id);
- ctxt->changed_hash = g_hash_table_new (g_str_hash, g_str_equal);
-
- for (l = ctxt->changed; l != NULL; l = l->next) {
- CalClientChange *ccc = l->data;
- const char *uid;
-
- cal_component_get_uid (ccc->comp, &uid);
- if (!e_pilot_map_uid_is_archived (ctxt->map, uid)) {
-
- g_hash_table_insert (ctxt->changed_hash, g_strdup (uid), ccc);
-
- switch (ccc->type) {
- case CAL_CLIENT_CHANGE_ADDED:
- add_records++;
- break;
- case CAL_CLIENT_CHANGE_MODIFIED:
- mod_records++;
- break;
- case CAL_CLIENT_CHANGE_DELETED:
- del_records++;
- break;
- }
- }
- }
-
- /* Set the count information */
- num_records = cal_client_get_n_objects (ctxt->client, CALOBJ_TYPE_TODO);
- gnome_pilot_conduit_sync_abs_set_num_local_records(abs_conduit, num_records);
- gnome_pilot_conduit_sync_abs_set_num_new_local_records (abs_conduit, add_records);
- gnome_pilot_conduit_sync_abs_set_num_updated_local_records (abs_conduit, mod_records);
- gnome_pilot_conduit_sync_abs_set_num_deleted_local_records(abs_conduit, del_records);
-
- gtk_object_set_data (GTK_OBJECT (conduit), "dbinfo", dbi);
-
- buf = (unsigned char*)g_malloc (0xffff);
- len = dlp_ReadAppBlock (dbi->pilot_socket, dbi->db_handle, 0,
- (unsigned char *)buf, 0xffff);
-
- if (len < 0) {
- WARN (_("Could not read pilot's ToDo application block"));
- WARN ("dlp_ReadAppBlock(...) = %d", len);
- gnome_pilot_conduit_error (conduit,
- _("Could not read pilot's ToDo application block"));
- return -1;
- }
- unpack_ToDoAppInfo (&(ctxt->ai), buf, len);
- g_free (buf);
-
- check_for_slow_setting (conduit, ctxt);
-
- return 0;
-}
-
-static gint
-post_sync (GnomePilotConduit *conduit,
- GnomePilotDBInfo *dbi,
- EToDoConduitContext *ctxt)
-{
- GList *changed;
- gchar *filename, *change_id;
-
- LOG ("post_sync: ToDo Conduit v.%s", CONDUIT_VERSION);
- LOG ("---------------------------------------------------------\n");
-
- filename = map_name (ctxt);
- e_pilot_map_write (filename, ctxt->map);
- g_free (filename);
-
- /* FIX ME ugly hack - our changes musn't count, this does introduce
- * a race condition if anyone changes a record elsewhere during sycnc
- */
- change_id = g_strdup_printf ("pilot-sync-evolution-todo-%d", ctxt->cfg->pilot_id);
- changed = cal_client_get_changes (ctxt->client, CALOBJ_TYPE_TODO, change_id);
- cal_client_change_list_free (changed);
-
- return 0;
-}
-
-static gint
-set_pilot_id (GnomePilotConduitSyncAbs *conduit,
- EToDoLocalRecord *local,
- guint32 ID,
- EToDoConduitContext *ctxt)
-{
- const char *uid;
-
- LOG ("set_pilot_id: setting to %d\n", ID);
-
- cal_component_get_uid (local->comp, &uid);
- e_pilot_map_insert (ctxt->map, ID, uid, FALSE);
-
- return 0;
-}
-
-static gint
-set_status_cleared (GnomePilotConduitSyncAbs *conduit,
- EToDoLocalRecord *local,
- EToDoConduitContext *ctxt)
-{
- const char *uid;
-
- LOG ("set_status_cleared: clearing status\n");
-
- cal_component_get_uid (local->comp, &uid);
- g_hash_table_remove (ctxt->changed_hash, uid);
-
- return 0;
-}
-
-static gint
-for_each (GnomePilotConduitSyncAbs *conduit,
- EToDoLocalRecord **local,
- EToDoConduitContext *ctxt)
-{
- static GList *uids, *iterator;
- static int count;
-
- g_return_val_if_fail (local != NULL, -1);
-
- if (*local == NULL) {
- LOG ("beginning for_each");
-
- uids = ctxt->uids;
- count = 0;
-
- if (uids != NULL) {
- LOG ("iterating over %d records", g_list_length (uids));
-
- *local = g_new0 (EToDoLocalRecord, 1);
- local_record_from_uid (*local, uids->data, ctxt);
-
- iterator = uids;
- } else {
- LOG ("no events");
- (*local) = NULL;
- return 0;
- }
- } else {
- count++;
- if (g_list_next (iterator)) {
- iterator = g_list_next (iterator);
-
- *local = g_new0 (EToDoLocalRecord, 1);
- local_record_from_uid (*local, iterator->data, ctxt);
- } else {
- LOG ("for_each ending");
-
- /* Tell the pilot the iteration is over */
- *local = NULL;
-
- return 0;
- }
- }
-
- return 0;
-}
-
-static gint
-for_each_modified (GnomePilotConduitSyncAbs *conduit,
- EToDoLocalRecord **local,
- EToDoConduitContext *ctxt)
-{
- static GList *iterator;
- static int count;
-
- g_return_val_if_fail (local != NULL, 0);
-
- if (*local == NULL) {
- LOG ("beginning for_each_modified: beginning\n");
-
- iterator = ctxt->changed;
-
- count = 0;
-
- LOG ("iterating over %d records", g_hash_table_size (ctxt->changed_hash));
-
- iterator = next_changed_item (ctxt, iterator);
- if (iterator != NULL) {
- CalClientChange *ccc = iterator->data;
-
- *local = g_new0 (EToDoLocalRecord, 1);
- local_record_from_comp (*local, ccc->comp, ctxt);
- } else {
- LOG ("no events");
-
- *local = NULL;
- }
- } else {
- count++;
- iterator = g_list_next (iterator);
- if (iterator && (iterator = next_changed_item (ctxt, iterator))) {
- CalClientChange *ccc = iterator->data;
-
- *local = g_new0 (EToDoLocalRecord, 1);
- local_record_from_comp (*local, ccc->comp, ctxt);
- } else {
- LOG ("for_each_modified ending");
-
- /* Signal the iteration is over */
- *local = NULL;
- }
- }
-
- return 0;
-}
-
-static gint
-compare (GnomePilotConduitSyncAbs *conduit,
- EToDoLocalRecord *local,
- GnomePilotRecord *remote,
- EToDoConduitContext *ctxt)
-{
- /* used by the quick compare */
- GnomePilotRecord local_pilot;
- int retval = 0;
-
- LOG ("compare: local=%s remote=%s...\n",
- print_local (local), print_remote (remote));
-
- g_return_val_if_fail (local!=NULL,-1);
- g_return_val_if_fail (remote!=NULL,-1);
-
- local_pilot = local_record_to_pilot_record (local, ctxt);
-
- if (remote->length != local_pilot.length
- || memcmp (local_pilot.record, remote->record, remote->length))
- retval = 1;
-
- if (retval == 0)
- LOG (" equal");
- else
- LOG (" not equal");
-
- return retval;
-}
-
-static gint
-add_record (GnomePilotConduitSyncAbs *conduit,
- GnomePilotRecord *remote,
- EToDoConduitContext *ctxt)
-{
- CalComponent *comp;
- const char *uid;
- int retval = 0;
-
- g_return_val_if_fail (remote != NULL, -1);
-
- LOG ("add_record: adding %s to desktop\n", print_remote (remote));
-
- comp = comp_from_remote_record (conduit, remote, NULL);
- update_comp (conduit, comp, ctxt);
-
- cal_component_get_uid (comp, &uid);
-
- e_pilot_map_insert (ctxt->map, remote->ID, uid, FALSE);
-
- return retval;
-}
-
-static gint
-replace_record (GnomePilotConduitSyncAbs *conduit,
- EToDoLocalRecord *local,
- GnomePilotRecord *remote,
- EToDoConduitContext *ctxt)
-{
- CalComponent *new_comp;
- int retval = 0;
-
- g_return_val_if_fail (remote != NULL, -1);
-
- LOG ("replace_record: replace %s with %s\n",
- print_local (local), print_remote (remote));
-
- new_comp = comp_from_remote_record (conduit, remote, local->comp);
- gtk_object_unref (GTK_OBJECT (local->comp));
- local->comp = new_comp;
- update_comp (conduit, local->comp, ctxt);
-
- return retval;
-}
-
-static gint
-delete_record (GnomePilotConduitSyncAbs *conduit,
- EToDoLocalRecord *local,
- EToDoConduitContext *ctxt)
-{
- const char *uid;
-
- g_return_val_if_fail (local != NULL, -1);
- g_return_val_if_fail (local->comp != NULL, -1);
-
- cal_component_get_uid (local->comp, &uid);
-
- LOG ("delete_record: deleting %s\n", uid);
-
- e_pilot_map_remove_by_uid (ctxt->map, uid);
- cal_client_remove_object (ctxt->client, uid);
-
- return 0;
-}
-
-static gint
-archive_record (GnomePilotConduitSyncAbs *conduit,
- EToDoLocalRecord *local,
- gboolean archive,
- EToDoConduitContext *ctxt)
-{
- const char *uid;
- int retval = 0;
-
- g_return_val_if_fail (local != NULL, -1);
-
- LOG ("archive_record: %s\n", archive ? "yes" : "no");
-
- cal_component_get_uid (local->comp, &uid);
- e_pilot_map_insert (ctxt->map, local->local.ID, uid, archive);
-
- return retval;
-}
-
-static gint
-match (GnomePilotConduitSyncAbs *conduit,
- GnomePilotRecord *remote,
- EToDoLocalRecord **local,
- EToDoConduitContext *ctxt)
-{
- const char *uid;
-
- LOG ("match: looking for local copy of %s\n",
- print_remote (remote));
-
- g_return_val_if_fail (local != NULL, -1);
- g_return_val_if_fail (remote != NULL, -1);
-
- *local = NULL;
- uid = e_pilot_map_lookup_uid (ctxt->map, remote->ID);
-
- if (!uid)
- return 0;
-
- LOG (" matched\n");
-
- *local = g_new0 (EToDoLocalRecord, 1);
- local_record_from_uid (*local, uid, ctxt);
-
- return 0;
-}
-
-static gint
-free_match (GnomePilotConduitSyncAbs *conduit,
- EToDoLocalRecord *local,
- EToDoConduitContext *ctxt)
-{
- LOG ("free_match: freeing\n");
-
- g_return_val_if_fail (local != NULL, -1);
-
- gtk_object_unref (GTK_OBJECT (local->comp));
- g_free (local);
-
- return 0;
-}
-
-static gint
-prepare (GnomePilotConduitSyncAbs *conduit,
- EToDoLocalRecord *local,
- GnomePilotRecord *remote,
- EToDoConduitContext *ctxt)
-{
- LOG ("prepare: encoding local %s\n", print_local (local));
-
- *remote = local_record_to_pilot_record (local, ctxt);
-
- return 0;
-}
-
-static ORBit_MessageValidationResult
-accept_all_cookies (CORBA_unsigned_long request_id,
- CORBA_Principal *principal,
- CORBA_char *operation)
-{
- /* allow ALL cookies */
- return ORBIT_MESSAGE_ALLOW_ALL;
-}
-
-
-GnomePilotConduit *
-conduit_get_gpilot_conduit (guint32 pilot_id)
-{
- GtkObject *retval;
- EToDoConduitContext *ctxt;
-
- LOG ("in todo's conduit_get_gpilot_conduit\n");
-
- /* we need to find wombat with oaf, so make sure oaf
- is initialized here. once the desktop is converted
- to oaf and gpilotd is built with oaf, this can go away */
- if (!oaf_is_initialized ()) {
- char *argv[ 1 ] = {"hi"};
- oaf_init (1, argv);
-
- if (bonobo_init (CORBA_OBJECT_NIL,
- CORBA_OBJECT_NIL,
- CORBA_OBJECT_NIL) == FALSE)
- g_error (_("Could not initialize Bonobo"));
-
- ORBit_set_request_validation_handler (accept_all_cookies);
- }
-
- retval = gnome_pilot_conduit_sync_abs_new ("ToDoDB", 0x746F646F);
- g_assert (retval != NULL);
-
- gnome_pilot_conduit_construct (GNOME_PILOT_CONDUIT (retval),
- "e_todo_conduit");
-
- ctxt = e_todo_context_new (pilot_id);
- gtk_object_set_data (GTK_OBJECT (retval), "todoconduit_context", ctxt);
-
- gtk_signal_connect (retval, "pre_sync", (GtkSignalFunc) pre_sync, ctxt);
- gtk_signal_connect (retval, "post_sync", (GtkSignalFunc) post_sync, ctxt);
-
- gtk_signal_connect (retval, "set_pilot_id", (GtkSignalFunc) set_pilot_id, ctxt);
- gtk_signal_connect (retval, "set_status_cleared", (GtkSignalFunc) set_status_cleared, ctxt);
-
- gtk_signal_connect (retval, "for_each", (GtkSignalFunc) for_each, ctxt);
- gtk_signal_connect (retval, "for_each_modified", (GtkSignalFunc) for_each_modified, ctxt);
- gtk_signal_connect (retval, "compare", (GtkSignalFunc) compare, ctxt);
-
- gtk_signal_connect (retval, "add_record", (GtkSignalFunc) add_record, ctxt);
- gtk_signal_connect (retval, "replace_record", (GtkSignalFunc) replace_record, ctxt);
- gtk_signal_connect (retval, "delete_record", (GtkSignalFunc) delete_record, ctxt);
- gtk_signal_connect (retval, "archive_record", (GtkSignalFunc) archive_record, ctxt);
-
- gtk_signal_connect (retval, "match", (GtkSignalFunc) match, ctxt);
- gtk_signal_connect (retval, "free_match", (GtkSignalFunc) free_match, ctxt);
-
- gtk_signal_connect (retval, "prepare", (GtkSignalFunc) prepare, ctxt);
-
- return GNOME_PILOT_CONDUIT (retval);
-}
-
-void
-conduit_destroy_gpilot_conduit (GnomePilotConduit *conduit)
-{
- GtkObject *obj = GTK_OBJECT (conduit);
- EToDoConduitContext *ctxt;
-
- ctxt = gtk_object_get_data (obj, "todoconduit_context");
- e_todo_context_destroy (ctxt);
-
- gtk_object_destroy (obj);
-}
diff --git a/calendar/conduits/todo/todo-conduit.h b/calendar/conduits/todo/todo-conduit.h
deleted file mode 100644
index 46f89fc1a0..0000000000
--- a/calendar/conduits/todo/todo-conduit.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* Evolution calendar - ToDo Conduit Capplet
- *
- * Copyright (C) 1998 Free Software Foundation
- * Copyright (C) 2000 Helix Code, Inc.
- *
- * Authors: Eskil Heyn Olsen <deity@eskil.dk>
- * JP Rosevear <jpr@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 __TODO_CONDUIT_H__
-#define __TODO_CONDUIT_H__
-
-#include <sys/types.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <gnome.h>
-#include <pi-todo.h>
-#include <gpilotd/gnome-pilot-conduit.h>
-#include <gpilotd/gnome-pilot-conduit-sync-abs.h>
-#include <cal-client/cal-client.h>
-#include <e-pilot-map.h>
-
-/* This is the local record structure for the Evolution ToDo conduit. */
-typedef struct _EToDoLocalRecord EToDoLocalRecord;
-struct _EToDoLocalRecord {
- /* 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.
- */
- GnomePilotDesktopRecord local;
-
- /* The corresponding Comp object */
- CalComponent *comp;
-
- /* pilot-link todo structure */
- struct ToDo *todo;
-};
-
-/* This is the context for all the Evolution ToDo conduit methods. */
-typedef struct _EToDoConduitContext EToDoConduitContext;
-struct _EToDoConduitContext {
- EToDoConduitCfg *cfg;
-
- struct ToDoAppInfo ai;
-
- CalClient *client;
- char *calendar_file;
- gboolean calendar_open_success;
-
- GList *uids;
- GList *changed;
- GHashTable *changed_hash;
-
- EPilotMap *map;
-};
-
-#endif __TODO_CONDUIT_H__
-
-
-
-
-
-
diff --git a/calendar/gui/.cvsignore b/calendar/gui/.cvsignore
deleted file mode 100644
index f7f6b10b34..0000000000
--- a/calendar/gui/.cvsignore
+++ /dev/null
@@ -1,17 +0,0 @@
-Makefile.in
-Makefile
-.deps
-_libs
-.libs
-.pure
-evolution-calendar
-evolution-calendar.pure
-getdate.c
-*.lo
-Evolution-Composer-common.c
-Evolution-Composer-skels.c
-Evolution-Composer-stubs.c
-Evolution-Composer.h
-GNOME_Evolution_Calendar_Control.oaf
-GNOME_Evolution_Calendar.oaf
-GNOME_Evolution_Calendar_gnomecal.oaf
diff --git a/calendar/gui/Evolution-Composer.h b/calendar/gui/Evolution-Composer.h
deleted file mode 100644
index 557a8dcdd4..0000000000
--- a/calendar/gui/Evolution-Composer.h
+++ /dev/null
@@ -1,353 +0,0 @@
-/*
- * This file was generated by orbit-idl - DO NOT EDIT!
- */
-
-#include <glib.h>
-#define ORBIT_IDL_SERIAL 9
-#include <orb/orbit.h>
-
-#ifndef Evolution_Composer_H
-#define Evolution_Composer_H 1
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-/** typedefs **/
-#include <bonobo/Bonobo.h>
-# 13 "/usr/share/idl/Bonobo.idl"
-#if !defined(ORBIT_DECL_GNOME_Evolution_Composer) && !defined(_GNOME_Evolution_Composer_defined)
-#define ORBIT_DECL_GNOME_Evolution_Composer 1
-#define _GNOME_Evolution_Composer_defined 1
-#define GNOME_Evolution_Composer__free CORBA_Object__free
- typedef CORBA_Object GNOME_Evolution_Composer;
- extern CORBA_unsigned_long GNOME_Evolution_Composer__classid;
-#if !defined(TC_IMPL_TC_GNOME_Evolution_Composer_0)
-#define TC_IMPL_TC_GNOME_Evolution_Composer_0 'E'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_1 'v'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_2 'o'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_3 'l'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_4 'u'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_5 't'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_6 'i'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_7 'o'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_8 'n'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_9 '_'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_10 'C'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_11 'o'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_12 'm'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_13 'p'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_14 'o'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_15 's'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_16 'e'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_17 'r'
- extern const struct CORBA_TypeCode_struct
- TC_GNOME_Evolution_Composer_struct;
-#define TC_GNOME_Evolution_Composer ((CORBA_TypeCode)&TC_GNOME_Evolution_Composer_struct)
-#endif
-#endif
-#if !defined(_GNOME_Evolution_Composer_Recipient_defined)
-#define _GNOME_Evolution_Composer_Recipient_defined 1
- typedef struct
- {
- CORBA_char *name;
- CORBA_char *address;
- }
- GNOME_Evolution_Composer_Recipient;
-
-#if !defined(TC_IMPL_TC_GNOME_Evolution_Composer_Recipient_0)
-#define TC_IMPL_TC_GNOME_Evolution_Composer_Recipient_0 'E'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_Recipient_1 'v'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_Recipient_2 'o'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_Recipient_3 'l'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_Recipient_4 'u'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_Recipient_5 't'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_Recipient_6 'i'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_Recipient_7 'o'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_Recipient_8 'n'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_Recipient_9 '_'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_Recipient_10 'C'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_Recipient_11 'o'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_Recipient_12 'm'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_Recipient_13 'p'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_Recipient_14 'o'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_Recipient_15 's'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_Recipient_16 'e'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_Recipient_17 'r'
- extern const struct CORBA_TypeCode_struct
- TC_GNOME_Evolution_Composer_Recipient_struct;
-#define TC_GNOME_Evolution_Composer_Recipient ((CORBA_TypeCode)&TC_GNOME_Evolution_Composer_Recipient_struct)
-#endif
- extern GNOME_Evolution_Composer_Recipient
- *GNOME_Evolution_Composer_Recipient__alloc(void);
- extern gpointer GNOME_Evolution_Composer_Recipient__free(gpointer mem,
- gpointer dat,
- CORBA_boolean free_strings); /* ORBit internal use */
-#endif
-#if !defined(ORBIT_DECL_CORBA_sequence_GNOME_Evolution_Composer_Recipient) && !defined(_CORBA_sequence_GNOME_Evolution_Composer_Recipient_defined)
-#define ORBIT_DECL_CORBA_sequence_GNOME_Evolution_Composer_Recipient 1
-#define _CORBA_sequence_GNOME_Evolution_Composer_Recipient_defined 1
-#define ORBIT_IMPL_CORBA_sequence_GNOME_Evolution_Composer_Recipient_0 'E'
-#define ORBIT_IMPL_CORBA_sequence_GNOME_Evolution_Composer_Recipient_1 'v'
-#define ORBIT_IMPL_CORBA_sequence_GNOME_Evolution_Composer_Recipient_2 'o'
-#define ORBIT_IMPL_CORBA_sequence_GNOME_Evolution_Composer_Recipient_3 'l'
-#define ORBIT_IMPL_CORBA_sequence_GNOME_Evolution_Composer_Recipient_4 'u'
-#define ORBIT_IMPL_CORBA_sequence_GNOME_Evolution_Composer_Recipient_5 't'
-#define ORBIT_IMPL_CORBA_sequence_GNOME_Evolution_Composer_Recipient_6 'i'
-#define ORBIT_IMPL_CORBA_sequence_GNOME_Evolution_Composer_Recipient_7 'o'
-#define ORBIT_IMPL_CORBA_sequence_GNOME_Evolution_Composer_Recipient_8 'n'
-#define ORBIT_IMPL_CORBA_sequence_GNOME_Evolution_Composer_Recipient_9 '_'
-#define ORBIT_IMPL_CORBA_sequence_GNOME_Evolution_Composer_Recipient_10 'C'
-#define ORBIT_IMPL_CORBA_sequence_GNOME_Evolution_Composer_Recipient_11 'o'
-#define ORBIT_IMPL_CORBA_sequence_GNOME_Evolution_Composer_Recipient_12 'm'
-#define ORBIT_IMPL_CORBA_sequence_GNOME_Evolution_Composer_Recipient_13 'p'
-#define ORBIT_IMPL_CORBA_sequence_GNOME_Evolution_Composer_Recipient_14 'o'
-#define ORBIT_IMPL_CORBA_sequence_GNOME_Evolution_Composer_Recipient_15 's'
-#define ORBIT_IMPL_CORBA_sequence_GNOME_Evolution_Composer_Recipient_16 'e'
-#define ORBIT_IMPL_CORBA_sequence_GNOME_Evolution_Composer_Recipient_17 'r'
- typedef struct
- {
- CORBA_unsigned_long _maximum,
- _length;
- GNOME_Evolution_Composer_Recipient *_buffer;
- CORBA_boolean _release;
- }
- CORBA_sequence_GNOME_Evolution_Composer_Recipient;
-#if !defined(TC_IMPL_TC_CORBA_sequence_GNOME_Evolution_Composer_Recipient_0)
-#define TC_IMPL_TC_CORBA_sequence_GNOME_Evolution_Composer_Recipient_0 'E'
-#define TC_IMPL_TC_CORBA_sequence_GNOME_Evolution_Composer_Recipient_1 'v'
-#define TC_IMPL_TC_CORBA_sequence_GNOME_Evolution_Composer_Recipient_2 'o'
-#define TC_IMPL_TC_CORBA_sequence_GNOME_Evolution_Composer_Recipient_3 'l'
-#define TC_IMPL_TC_CORBA_sequence_GNOME_Evolution_Composer_Recipient_4 'u'
-#define TC_IMPL_TC_CORBA_sequence_GNOME_Evolution_Composer_Recipient_5 't'
-#define TC_IMPL_TC_CORBA_sequence_GNOME_Evolution_Composer_Recipient_6 'i'
-#define TC_IMPL_TC_CORBA_sequence_GNOME_Evolution_Composer_Recipient_7 'o'
-#define TC_IMPL_TC_CORBA_sequence_GNOME_Evolution_Composer_Recipient_8 'n'
-#define TC_IMPL_TC_CORBA_sequence_GNOME_Evolution_Composer_Recipient_9 '_'
-#define TC_IMPL_TC_CORBA_sequence_GNOME_Evolution_Composer_Recipient_10 'C'
-#define TC_IMPL_TC_CORBA_sequence_GNOME_Evolution_Composer_Recipient_11 'o'
-#define TC_IMPL_TC_CORBA_sequence_GNOME_Evolution_Composer_Recipient_12 'm'
-#define TC_IMPL_TC_CORBA_sequence_GNOME_Evolution_Composer_Recipient_13 'p'
-#define TC_IMPL_TC_CORBA_sequence_GNOME_Evolution_Composer_Recipient_14 'o'
-#define TC_IMPL_TC_CORBA_sequence_GNOME_Evolution_Composer_Recipient_15 's'
-#define TC_IMPL_TC_CORBA_sequence_GNOME_Evolution_Composer_Recipient_16 'e'
-#define TC_IMPL_TC_CORBA_sequence_GNOME_Evolution_Composer_Recipient_17 'r'
- extern const struct CORBA_TypeCode_struct
- TC_CORBA_sequence_GNOME_Evolution_Composer_Recipient_struct;
-#define TC_CORBA_sequence_GNOME_Evolution_Composer_Recipient ((CORBA_TypeCode)&TC_CORBA_sequence_GNOME_Evolution_Composer_Recipient_struct)
-#endif
- extern CORBA_sequence_GNOME_Evolution_Composer_Recipient
- *CORBA_sequence_GNOME_Evolution_Composer_Recipient__alloc(void);
- extern gpointer
- CORBA_sequence_GNOME_Evolution_Composer_Recipient__free(gpointer mem,
- gpointer dat,
- CORBA_boolean free_strings); /* ORBit internal use */
- GNOME_Evolution_Composer_Recipient
- *CORBA_sequence_GNOME_Evolution_Composer_Recipient_allocbuf
- (CORBA_unsigned_long len);
-#endif
-#if !defined(_GNOME_Evolution_Composer_RecipientList_defined)
-#define _GNOME_Evolution_Composer_RecipientList_defined 1
- typedef CORBA_sequence_GNOME_Evolution_Composer_Recipient
- GNOME_Evolution_Composer_RecipientList;
-#if !defined(TC_IMPL_TC_GNOME_Evolution_Composer_RecipientList_0)
-#define TC_IMPL_TC_GNOME_Evolution_Composer_RecipientList_0 'E'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_RecipientList_1 'v'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_RecipientList_2 'o'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_RecipientList_3 'l'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_RecipientList_4 'u'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_RecipientList_5 't'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_RecipientList_6 'i'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_RecipientList_7 'o'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_RecipientList_8 'n'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_RecipientList_9 '_'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_RecipientList_10 'C'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_RecipientList_11 'o'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_RecipientList_12 'm'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_RecipientList_13 'p'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_RecipientList_14 'o'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_RecipientList_15 's'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_RecipientList_16 'e'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_RecipientList_17 'r'
- extern const struct CORBA_TypeCode_struct
- TC_GNOME_Evolution_Composer_RecipientList_struct;
-#define TC_GNOME_Evolution_Composer_RecipientList ((CORBA_TypeCode)&TC_GNOME_Evolution_Composer_RecipientList_struct)
-#endif
- extern GNOME_Evolution_Composer_RecipientList
- *GNOME_Evolution_Composer_RecipientList__alloc(void);
- extern gpointer GNOME_Evolution_Composer_RecipientList__free(gpointer mem,
- gpointer dat,
- CORBA_boolean free_strings); /* ORBit internal use */
-#endif
-#define ex_GNOME_Evolution_Composer_CouldNotParse "IDL:GNOME/Evolution/Composer/CouldNotParse:1.0"
- void _ORBIT_GNOME_Evolution_Composer_CouldNotParse_demarshal(GIOPRecvBuffer
- *
- _ORBIT_recv_buffer,
- CORBA_Environment
- * ev);
- void _ORBIT_GNOME_Evolution_Composer_CouldNotParse_marshal(GIOPSendBuffer *
- _ORBIT_send_buffer,
- CORBA_Environment
- * ev);
-#if !defined(_GNOME_Evolution_Composer_CouldNotParse_defined)
-#define _GNOME_Evolution_Composer_CouldNotParse_defined 1
- typedef struct
- {
- int dummy;
- }
- GNOME_Evolution_Composer_CouldNotParse;
-
-#if !defined(TC_IMPL_TC_GNOME_Evolution_Composer_CouldNotParse_0)
-#define TC_IMPL_TC_GNOME_Evolution_Composer_CouldNotParse_0 'E'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_CouldNotParse_1 'v'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_CouldNotParse_2 'o'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_CouldNotParse_3 'l'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_CouldNotParse_4 'u'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_CouldNotParse_5 't'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_CouldNotParse_6 'i'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_CouldNotParse_7 'o'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_CouldNotParse_8 'n'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_CouldNotParse_9 '_'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_CouldNotParse_10 'C'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_CouldNotParse_11 'o'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_CouldNotParse_12 'm'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_CouldNotParse_13 'p'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_CouldNotParse_14 'o'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_CouldNotParse_15 's'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_CouldNotParse_16 'e'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_CouldNotParse_17 'r'
- extern const struct CORBA_TypeCode_struct
- TC_GNOME_Evolution_Composer_CouldNotParse_struct;
-#define TC_GNOME_Evolution_Composer_CouldNotParse ((CORBA_TypeCode)&TC_GNOME_Evolution_Composer_CouldNotParse_struct)
-#endif
-#define GNOME_Evolution_Composer_CouldNotParse__alloc() NULL
- extern gpointer GNOME_Evolution_Composer_CouldNotParse__free(gpointer mem,
- gpointer dat,
- CORBA_boolean free_strings); /* ORBit internal use */
-#endif
-
-/** POA structures **/
- typedef struct
- {
- void *_private;
- void (*setHeaders) (PortableServer_Servant _servant,
- const GNOME_Evolution_Composer_RecipientList * to,
- const GNOME_Evolution_Composer_RecipientList * cc,
- const GNOME_Evolution_Composer_RecipientList * bcc,
- const CORBA_char * subject, CORBA_Environment * ev);
- void (*setBodyText) (PortableServer_Servant _servant,
- const CORBA_char * body, CORBA_Environment * ev);
- void (*attachMIME) (PortableServer_Servant _servant,
- const CORBA_char * data, CORBA_Environment * ev);
- void (*attachData) (PortableServer_Servant _servant,
- const CORBA_char * content_type,
- const CORBA_char * filename,
- const CORBA_char * description,
- const CORBA_boolean show_inline,
- const CORBA_char * data, CORBA_Environment * ev);
- void (*show) (PortableServer_Servant _servant, CORBA_Environment * ev);
- }
- POA_GNOME_Evolution_Composer__epv;
- typedef struct
- {
- PortableServer_ServantBase__epv *_base_epv;
- POA_Bonobo_Unknown__epv *Bonobo_Unknown_epv;
- POA_GNOME_Evolution_Composer__epv *GNOME_Evolution_Composer_epv;
- }
- POA_GNOME_Evolution_Composer__vepv;
- typedef struct
- {
- void *_private;
- POA_GNOME_Evolution_Composer__vepv *vepv;
- }
- POA_GNOME_Evolution_Composer;
- extern void POA_GNOME_Evolution_Composer__init(PortableServer_Servant
- servant,
- CORBA_Environment * ev);
- extern void POA_GNOME_Evolution_Composer__fini(PortableServer_Servant
- servant,
- CORBA_Environment * ev);
-
-/** prototypes **/
-#define GNOME_Evolution_Composer_ref Bonobo_Unknown_ref
-#define GNOME_Evolution_Composer_unref Bonobo_Unknown_unref
-#define GNOME_Evolution_Composer_queryInterface Bonobo_Unknown_queryInterface
- void GNOME_Evolution_Composer_setHeaders(GNOME_Evolution_Composer _obj,
- const
- GNOME_Evolution_Composer_RecipientList
- * to,
- const
- GNOME_Evolution_Composer_RecipientList
- * cc,
- const
- GNOME_Evolution_Composer_RecipientList
- * bcc, const CORBA_char * subject,
- CORBA_Environment * ev);
- void GNOME_Evolution_Composer_setBodyText(GNOME_Evolution_Composer _obj,
- const CORBA_char * body,
- CORBA_Environment * ev);
- void GNOME_Evolution_Composer_attachMIME(GNOME_Evolution_Composer _obj,
- const CORBA_char * data,
- CORBA_Environment * ev);
- void GNOME_Evolution_Composer_attachData(GNOME_Evolution_Composer _obj,
- const CORBA_char * content_type,
- const CORBA_char * filename,
- const CORBA_char * description,
- const CORBA_boolean show_inline,
- const CORBA_char * data,
- CORBA_Environment * ev);
- void GNOME_Evolution_Composer_show(GNOME_Evolution_Composer _obj,
- CORBA_Environment * ev);
-
- void
- _ORBIT_skel_GNOME_Evolution_Composer_setHeaders
- (POA_GNOME_Evolution_Composer * _ORBIT_servant,
- GIOPRecvBuffer * _ORBIT_recv_buffer, CORBA_Environment * ev,
- void (*_impl_setHeaders) (PortableServer_Servant _servant,
- const GNOME_Evolution_Composer_RecipientList
- * to,
- const GNOME_Evolution_Composer_RecipientList
- * cc,
- const GNOME_Evolution_Composer_RecipientList
- * bcc, const CORBA_char * subject,
- CORBA_Environment * ev));
- void
- _ORBIT_skel_GNOME_Evolution_Composer_setBodyText
- (POA_GNOME_Evolution_Composer * _ORBIT_servant,
- GIOPRecvBuffer * _ORBIT_recv_buffer, CORBA_Environment * ev,
- void (*_impl_setBodyText) (PortableServer_Servant _servant,
- const CORBA_char * body,
- CORBA_Environment * ev));
- void
- _ORBIT_skel_GNOME_Evolution_Composer_attachMIME
- (POA_GNOME_Evolution_Composer * _ORBIT_servant,
- GIOPRecvBuffer * _ORBIT_recv_buffer, CORBA_Environment * ev,
- void (*_impl_attachMIME) (PortableServer_Servant _servant,
- const CORBA_char * data,
- CORBA_Environment * ev));
- void
- _ORBIT_skel_GNOME_Evolution_Composer_attachData
- (POA_GNOME_Evolution_Composer * _ORBIT_servant,
- GIOPRecvBuffer * _ORBIT_recv_buffer, CORBA_Environment * ev,
- void (*_impl_attachData) (PortableServer_Servant _servant,
- const CORBA_char * content_type,
- const CORBA_char * filename,
- const CORBA_char * description,
- const CORBA_boolean show_inline,
- const CORBA_char * data,
- CORBA_Environment * ev));
- void _ORBIT_skel_GNOME_Evolution_Composer_show(POA_GNOME_Evolution_Composer
- * _ORBIT_servant,
- GIOPRecvBuffer *
- _ORBIT_recv_buffer,
- CORBA_Environment * ev,
- void (*_impl_show)
- (PortableServer_Servant
- _servant,
- CORBA_Environment * ev));
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
-#undef ORBIT_IDL_SERIAL
diff --git a/calendar/gui/GNOME_Evolution_Calendar.oaf.in b/calendar/gui/GNOME_Evolution_Calendar.oaf.in
deleted file mode 100644
index 70924677f7..0000000000
--- a/calendar/gui/GNOME_Evolution_Calendar.oaf.in
+++ /dev/null
@@ -1,120 +0,0 @@
-<oaf_info>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Calendar_iTip_ControlFactory"
- type="exe"
- location="evolution-calendar">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/ObjectFactory:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="description" type="string"
- _value="Factory for the calendar iTip view control"/>
-
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Calendar_iTip_Control"
- type="factory"
- location="OAFIID:GNOME_Evolution_Calendar_iTip_ControlFactory">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:Bonobo/Control:1.0"/>
- <item value="IDL:Bonobo/PersistStream:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="bonobo:supported_mime_types" type="stringv">
- <item value="text/calendar"/>
- <item value="text/x-calendar"/>
- </oaf_attribute>
-
- <oaf_attribute name="name" type="string"
- _value="Evolution calendar iTip/iMip viewer"/>
- <oaf_attribute name="description" type="string"
- _value="Factory for the calendar iTip view control"/>
-
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Calendar_ShellComponentFactory"
- type="exe"
- location="evolution-calendar">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/ObjectFactory:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="description" type="string"
- _value="Factory for the Evolution calendar component."/>
-
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Calendar_ShellComponent"
- type="factory"
- location="OAFIID:GNOME_Evolution_Calendar_ShellComponentFactory">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/Evolution/ShellComponent:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="description" type="string"
- _value="Evolution component for handling the calendar."/>
-
- <oaf_attribute name="evolution:shell-component-icon" type="string"
- value="evolution-calendar.png"/>
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Calendar_Summary_ComponentFactory"
- type="exe"
- location="evolution-calendar">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME:GenericFactory:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="description" type="string"
- _value="Factory for the Calendar Summary component."/>
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Calendar_Summary_Component"
- type="factory"
- location="OAFIID:GNOME_Evolution_Calendar_Summary_ComponentFactory">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/Evolution:Summary:ComponentFactory:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="description" type="string"
- _value="Evolution calendar executive summary component."/>
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Calendar_ControlFactory"
- type="exe"
- location="evolution-calendar">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/ObjectFactory:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="description" type="string"
- _value="Factory for the sample Calendar control"/>
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Calendar_Control"
- type="factory"
- location="OAFIID:GNOME_Evolution_Calendar_ControlFactory">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:BonoboControl/calendar-control:1.0"/>
- <item value="IDL:Bonobo/Control:1.0"/>
- <item value="IDL:Bonobo/PersistFile:1.0"/>
- <item value="IDL:Bonobo/PropertyBag:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="bonobo:supported_mime_types" type="stringv">
- <item value="text/calendar"/>
- </oaf_attribute>
-
- <oaf_attribute name="description" type="string"
- _value="A sample Bonobo control which displays an calendar."/>
-</oaf_server>
-
-</oaf_info>
diff --git a/calendar/gui/Makefile.am b/calendar/gui/Makefile.am
deleted file mode 100644
index 8e30ee2c23..0000000000
--- a/calendar/gui/Makefile.am
+++ /dev/null
@@ -1,162 +0,0 @@
-## CORBA stuff
-
-IDLS = \
- $(srcdir)/../../composer/Evolution-Composer.idl
-
-IDL_GENERATED = \
- Evolution-Composer.h \
- Evolution-Composer-common.c \
- Evolution-Composer-skels.c \
- Evolution-Composer-stubs.c
-
-$(IDL_GENERATED): $(IDLS)
- $(ORBIT_IDL) -I $(srcdir) -I $(datadir)/idl `$(GNOME_CONFIG) --cflags idl` \
- $(srcdir)/../../composer/Evolution-Composer.idl
-
-SUBDIRS = alarm-notify dialogs
-
-help_base = $(datadir)/gnome/help/cal
-
-bin_PROGRAMS = evolution-calendar
-
-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$(top_builddir)/libical/src/libical \
- -I$(top_srcdir)/widgets \
- -I$(top_srcdir)/executive-summary \
- -I$(includedir) \
- $(BONOBO_VFS_GNOME_CFLAGS) \
- $(EXTRA_GNOME_CFLAGS) \
- -DEVOLUTION_DATADIR=\""$(datadir)"\" \
- -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \
- -DEVOLUTION_LOCALEDIR=\""$(localedir)"\"
-
-gladedir = $(datadir)/evolution/glade
-
-glade_DATA = \
- event-editor-dialog.glade \
- e-meeting-dialog.glade \
- e-itip-control.glade \
- goto-dialog.glade
-
-evolution_calendar_SOURCES = \
- $(IDL_GENERATED) \
- calendar-config.c \
- calendar-config.h \
- calendar-commands.c \
- calendar-commands.h \
- calendar-model.c \
- calendar-model.h \
- calendar-summary.c \
- calendar-summary.h \
- comp-util.c \
- comp-util.h \
- control-factory.c \
- control-factory.h \
- component-factory.c \
- component-factory.h \
- e-calendar-table.h \
- e-calendar-table.c \
- 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-itip-control.h \
- e-itip-control.c \
- e-meeting-edit.h \
- e-meeting-edit.c \
- 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 \
- e-tasks.c \
- e-tasks.h \
- event-editor.c \
- event-editor.h \
- gnome-cal.c \
- gnome-cal.h \
- goto.c \
- goto.h \
- itip-utils.c \
- itip-utils.h \
- main.c \
- print.c \
- print.h \
- tag-calendar.c \
- tag-calendar.h \
- tasks-control-factory.c \
- tasks-control-factory.h \
- tasks-control.c \
- tasks-control.h \
- tasks-migrate.c \
- tasks-migrate.h \
- weekday-picker.c \
- weekday-picker.h \
- widget-util.c \
- widget-util.h
-
-evolution_calendar_LDADD = \
- alarm-notify/libalarm.a \
- $(top_builddir)/shell/libeshell.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)/executive-summary/evolution-services/libevolution-services.la \
- $(top_builddir)/libversit/libversit.la \
- $(top_builddir)/libical/src/libical/libical.la \
- $(top_builddir)/widgets/meeting-time-sel/libevolutionmtsel.a \
- $(top_builddir)/widgets/misc/libemiscwidgets.a \
- $(top_builddir)/widgets/menus/libmenus.la \
- dialogs/libcal-dialogs.a \
- $(BONOBO_HTML_GNOME_LIBS) \
- $(BONOBO_VFS_GNOME_LIBS) \
- $(EXTRA_GNOME_LIBS) \
- $(INTLLIBS)
-
-#evolution_calendar_LDFLAGS = `gnome-config --libs gdk_pixbuf`
-
-oafdir = $(datadir)/oaf
-oaf_in_files = \
- GNOME_Evolution_Calendar.oaf.in
-
-oaf_DATA = $(oaf_in_files:.oaf.in=.oaf)
-
-@XML_I18N_MERGE_OAF_RULE@
-
-EXTRA_DIST = \
- $(glade_DATA) \
- $(oaf_in_files)
-
-install-data-local:
- $(mkinstalldirs) $(DESTDIR)$(help_base)/C
- $(mkinstalldirs) $(Conduitsdir)
-
-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
-
-BUILT_SOURCES = $(IDL_GENERATED)
-CLEANFILES += $(BUILT_SOURCES)
-
-dist-hook:
- cd $(distdir); rm -f $(BUILT_SOURCES)
diff --git a/calendar/gui/alarm-notify.c b/calendar/gui/alarm-notify.c
deleted file mode 100644
index d824b2a189..0000000000
--- a/calendar/gui/alarm-notify.c
+++ /dev/null
@@ -1,963 +0,0 @@
-/* Evolution calendar - Alarm notification engine
- *
- * Copyright (C) 2000 Helix Code, Inc.
- *
- * Authors: Federico Mena-Quintero <federico@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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <gtk/gtksignal.h>
-#include <cal-util/timeutil.h>
-#include "alarm.h"
-#include "alarm-notify.h"
-
-
-
-/* Whether the notification system has been initialized */
-static gboolean alarm_notify_inited;
-
-/* Clients we are monitoring for alarms */
-static GHashTable *client_alarms_hash = NULL;
-
-/* Structure that stores a client we are monitoring */
-typedef struct {
- /* Monitored client */
- CalClient *client;
-
- /* Number of times this client has been registered */
- int refcount;
-
- /* Hash table of component UID -> CompQueuedAlarms. If an element is
- * present here, then it means its cqa->queued_alarms contains at least
- * one queued alarm. When all the alarms for a component have been
- * dequeued, the CompQueuedAlarms structure is removed from the hash
- * table. Thus a CQA exists <=> it has queued alarms.
- */
- GHashTable *uid_alarms_hash;
-} ClientAlarms;
-
-/* Pair of a CalComponentAlarms and the mapping from queued alarm IDs to the
- * actual alarm instance structures.
- */
-typedef struct {
- /* The parent client alarms structure */
- ClientAlarms *parent_client;
-
- /* The actual component and its alarm instances */
- CalComponentAlarms *alarms;
-
- /* List of QueuedAlarm structures */
- GSList *queued_alarms;
-} CompQueuedAlarms;
-
-/* Pair of a queued alarm ID and the alarm trigger instance it refers to */
-typedef struct {
- /* Alarm ID from alarm.h */
- gpointer alarm_id;
-
- /* Instance from our parent CompAlarms->alarms list */
- CalAlarmInstance *instance;
-} QueuedAlarm;
-
-/* Alarm ID for the midnight refresh function */
-static gpointer midnight_refresh_id = NULL;
-
-
-
-static void load_alarms (ClientAlarms *ca);
-static void midnight_refresh_cb (gpointer alarm_id, time_t trigger, gpointer data);
-
-/* Queues an alarm trigger for midnight so that we can load the next day's worth
- * of alarms.
- */
-static void
-queue_midnight_refresh (void)
-{
- time_t midnight;
-
- g_assert (midnight_refresh_id == NULL);
-
- midnight = time_day_end (time (NULL));
-
- midnight_refresh_id = alarm_add (midnight, midnight_refresh_cb, NULL, NULL);
- if (!midnight_refresh_id) {
- g_message ("alarm_notify_init(): Could not set up the midnight refresh alarm!");
- /* FIXME: what to do? */
- }
-}
-
-/* Loads a client's alarms; called from g_hash_table_foreach() */
-static void
-add_client_alarms_cb (gpointer key, gpointer value, gpointer data)
-{
- ClientAlarms *ca;
-
- ca = value;
- load_alarms (ca);
-}
-
-/* Loads the alarms for the new day every midnight */
-static void
-midnight_refresh_cb (gpointer alarm_id, time_t trigger, gpointer data)
-{
- /* Re-load the alarms for all clients */
-
- g_hash_table_foreach (client_alarms_hash, add_client_alarms_cb, NULL);
-
- /* Re-schedule the midnight update */
-
- midnight_refresh_id = NULL;
- queue_midnight_refresh ();
-}
-
-/* Looks up a client in the client alarms hash table */
-static ClientAlarms *
-lookup_client (CalClient *client)
-{
- return g_hash_table_lookup (client_alarms_hash, client);
-}
-
-/* Callback used when an alarm triggers */
-static void
-alarm_trigger_cb (gpointer alarm_id, time_t trigger, gpointer data)
-{
- CompQueuedAlarms *cqa;
-
- cqa = data;
-
- /* FIXME */
-
- g_message ("alarm_trigger_cb(): Triggered!");
-}
-
-/* Callback used when an alarm must be destroyed */
-static void
-alarm_destroy_cb (gpointer alarm_id, gpointer data)
-{
- CompQueuedAlarms *cqa;
- GSList *l;
- QueuedAlarm *qa;
- const char *uid;
-
- cqa = data;
-
- qa = NULL; /* Keep GCC happy */
-
- /* Find the alarm in the queued alarms */
-
- for (l = cqa->queued_alarms; l; l = l->next) {
- qa = l->data;
- if (qa->alarm_id == alarm_id)
- break;
- }
-
- g_assert (l != NULL);
-
- /* Remove it and free it */
-
- cqa->queued_alarms = g_slist_remove_link (cqa->queued_alarms, l);
- g_slist_free_1 (l);
-
- g_free (qa);
-
- /* If this was the last queued alarm for this component, remove the
- * component itself.
- */
-
- if (cqa->queued_alarms != NULL)
- return;
-
- cal_component_get_uid (cqa->alarms->comp, &uid);
- g_hash_table_remove (cqa->parent_client->uid_alarms_hash, uid);
- cqa->parent_client = NULL;
-
- cal_component_alarms_free (cqa->alarms);
- cqa->alarms = NULL;
-
- g_free (cqa);
-}
-
-/* Adds the alarms in a CalComponentAlarms structure to the alarms queued for a
- * particular client. Also puts the triggers in the alarm timer queue.
- */
-static void
-add_component_alarms (ClientAlarms *ca, CalComponentAlarms *alarms)
-{
- const char *uid;
- CompQueuedAlarms *cqa;
- GSList *l;
-
- /* No alarms? */
- if (alarms->alarms == NULL) {
- cal_component_alarms_free (alarms);
- return;
- }
-
- cqa = g_new (CompQueuedAlarms, 1);
- cqa->parent_client = ca;
- cqa->alarms = alarms;
-
- cqa->queued_alarms = NULL;
-
- for (l = alarms->alarms; l; l = l->next) {
- CalAlarmInstance *instance;
- gpointer alarm_id;
- QueuedAlarm *qa;
-
- instance = l->data;
-
- alarm_id = alarm_add (instance->trigger, alarm_trigger_cb, cqa, alarm_destroy_cb);
- if (!alarm_id) {
- g_message ("add_component_alarms(): Could not schedule a trigger for "
- "%ld, discarding...", (long) instance->trigger);
- continue;
- }
-
- qa = g_new (QueuedAlarm, 1);
- qa->alarm_id = alarm_id;
- qa->instance = instance;
-
- cqa->queued_alarms = g_slist_prepend (cqa->queued_alarms, qa);
- }
-
- cal_component_get_uid (alarms->comp, &uid);
-
- /* If we failed to add all the alarms, then we should get rid of the cqa */
- if (cqa->queued_alarms == NULL) {
- g_message ("add_component_alarms(): Could not add any of the alarms "
- "for the component `%s'; discarding it...", uid);
-
- cal_component_alarms_free (cqa->alarms);
- cqa->alarms = NULL;
-
- g_free (cqa);
- return;
- }
-
- cqa->queued_alarms = g_slist_reverse (cqa->queued_alarms);
- g_hash_table_insert (ca->uid_alarms_hash, (char *) uid, cqa);
-}
-
-/* Loads today's remaining alarms for a client */
-static void
-load_alarms (ClientAlarms *ca)
-{
- time_t now, day_end;
- GSList *comp_alarms;
- GSList *l;
-
- now = time (NULL);
- day_end = time_day_end (now);
-
- comp_alarms = cal_client_get_alarms_in_range (ca->client, now, day_end);
-
- /* All of the last day's alarms should have already triggered and should
- * have been removed, so we should have no pending components.
- */
- g_assert (g_hash_table_size (ca->uid_alarms_hash) == 0);
-
- for (l = comp_alarms; l; l = l->next) {
- CalComponentAlarms *alarms;
-
- alarms = l->data;
- add_component_alarms (ca, alarms);
- }
-
- g_slist_free (comp_alarms);
-}
-
-/* Called when a calendar client finished loading; we load its alarms */
-static void
-cal_loaded_cb (CalClient *client, CalClientLoadStatus status, gpointer data)
-{
- ClientAlarms *ca;
-
- ca = data;
-
- if (status != CAL_CLIENT_LOAD_SUCCESS)
- return;
-
- load_alarms (ca);
-}
-
-/* Looks up a component's queued alarm structure in a client alarms structure */
-static CompQueuedAlarms *
-lookup_comp_queued_alarms (ClientAlarms *ca, const char *uid)
-{
- return g_hash_table_lookup (ca->uid_alarms_hash, uid);
-}
-
-/* Removes a component an its alarms */
-static void
-remove_comp (ClientAlarms *ca, const char *uid)
-{
- CompQueuedAlarms *cqa;
- GSList *l;
-
- cqa = lookup_comp_queued_alarms (ca, uid);
- if (!cqa)
- return;
-
- /* If a component is present, then it means we must have alarms queued
- * for it.
- */
- g_assert (cqa->queued_alarms != NULL);
-
- for (l = cqa->queued_alarms; l;) {
- QueuedAlarm *qa;
-
- qa = l->data;
-
- /* Get the next element here because the list element will go
- * away. Also, we do not free the qa here because it will be
- * freed by the destroy notification function.
- */
- l = l->next;
-
- alarm_remove (qa->alarm_id);
- }
-
- /* The list should be empty now, and thus the queued component alarms
- * structure should have been freed and removed from the hash table.
- */
- g_assert (lookup_comp_queued_alarms (ca, uid) == NULL);
-}
-
-/* Called when a calendar component changes; we must reload its corresponding
- * alarms.
- */
-static void
-obj_updated_cb (CalClient *client, const char *uid, gpointer data)
-{
- ClientAlarms *ca;
- time_t now, day_end;
- CalComponentAlarms *alarms;
- gboolean found;
-
- ca = data;
-
- remove_comp (ca, uid);
-
- now = time (NULL);
- day_end = time_day_end (now);
-
- found = cal_client_get_alarms_for_object (ca->client, uid, now, day_end, &alarms);
-
- if (!found)
- return;
-
- add_component_alarms (ca, alarms);
-}
-
-/* Called when a calendar component is removed; we must delete its corresponding
- * alarms.
- */
-static void
-obj_removed_cb (CalClient *client, const char *uid, gpointer data)
-{
- ClientAlarms *ca;
-
- ca = data;
-
- remove_comp (ca, uid);
-}
-
-
-
-/**
- * alarm_notify_init:
- *
- * Initializes the alarm notification system. This should be called near the
- * beginning of the program, after calling alarm_init().
- **/
-void
-alarm_notify_init (void)
-{
- g_return_if_fail (alarm_notify_inited == FALSE);
-
- client_alarms_hash = g_hash_table_new (g_direct_hash, g_direct_equal);
- queue_midnight_refresh ();
-
- alarm_notify_inited = TRUE;
-}
-
-/**
- * alarm_notify_done:
- *
- * Shuts down the alarm notification system. This should be called near the end
- * of the program. All the monitored calendar clients should already have been
- * unregistered with alarm_notify_remove_client().
- **/
-void
-alarm_notify_done (void)
-{
- g_return_if_fail (alarm_notify_inited);
-
- /* All clients must be unregistered by now */
- g_return_if_fail (g_hash_table_size (client_alarms_hash) == 0);
-
- g_hash_table_destroy (client_alarms_hash);
- client_alarms_hash = NULL;
-
- g_assert (midnight_refresh_id != NULL);
- alarm_remove (midnight_refresh_id);
- midnight_refresh_id = NULL;
-
- alarm_notify_inited = FALSE;
-}
-
-/**
- * alarm_notify_add_client:
- * @client: A calendar client.
- *
- * Adds a calendar client to the alarm notification system. Alarm trigger
- * notifications will be presented at the appropriate times. The client should
- * be removed with alarm_notify_remove_client() when receiving notifications
- * from it is no longer desired.
- *
- * A client can be added any number of times to the alarm notification system,
- * but any single alarm trigger will only be presented once for a particular
- * client. The client must still be removed the same number of times from the
- * notification system when it is no longer wanted.
- **/
-void
-alarm_notify_add_client (CalClient *client)
-{
- ClientAlarms *ca;
-
- g_return_if_fail (alarm_notify_inited);
- g_return_if_fail (client != NULL);
- g_return_if_fail (IS_CAL_CLIENT (client));
-
- ca = lookup_client (client);
- if (ca) {
- ca->refcount++;
- return;
- }
-
- ca = g_new (ClientAlarms, 1);
-
- ca->client = client;
- gtk_object_ref (GTK_OBJECT (ca->client));
-
- ca->refcount = 1;
- g_hash_table_insert (client_alarms_hash, client, ca);
-
- ca->uid_alarms_hash = g_hash_table_new (g_str_hash, g_str_equal);
-
- if (!cal_client_is_loaded (client))
- gtk_signal_connect (GTK_OBJECT (client), "cal_loaded",
- GTK_SIGNAL_FUNC (cal_loaded_cb), ca);
-
- gtk_signal_connect (GTK_OBJECT (client), "obj_updated",
- GTK_SIGNAL_FUNC (obj_updated_cb), ca);
- gtk_signal_connect (GTK_OBJECT (client), "obj_removed",
- GTK_SIGNAL_FUNC (obj_removed_cb), ca);
-
- if (cal_client_is_loaded (client))
- load_alarms (ca);
-}
-
-/* Called from g_hash_table_foreach(); adds a component UID to a list */
-static void
-add_uid_cb (gpointer key, gpointer value, gpointer data)
-{
- GSList **uids;
- const char *uid;
-
- uids = data;
- uid = key;
-
- *uids = g_slist_prepend (*uids, (char *) uid);
-}
-
-/* Removes all the alarms queued for a particular calendar client */
-static void
-remove_client_alarms (ClientAlarms *ca)
-{
- GSList *uids;
- GSList *l;
-
- /* First we build a list of UIDs so that we can remove them one by one */
-
- uids = NULL;
- g_hash_table_foreach (ca->uid_alarms_hash, add_uid_cb, &uids);
-
- for (l = uids; l; l = l->next) {
- const char *uid;
-
- uid = l->data;
-
- remove_comp (ca, uid);
- }
-
- g_slist_free (uids);
-
- /* The hash table should be empty now */
-
- g_assert (g_hash_table_size (ca->uid_alarms_hash) == 0);
-}
-
-/**
- * alarm_notify_remove_client:
- * @client: A calendar client.
- *
- * Removes a calendar client from the alarm notification system.
- **/
-void
-alarm_notify_remove_client (CalClient *client)
-{
- ClientAlarms *ca;
-
- g_return_if_fail (alarm_notify_inited);
- g_return_if_fail (client != NULL);
- g_return_if_fail (IS_CAL_CLIENT (client));
-
- ca = lookup_client (client);
- g_return_if_fail (ca != NULL);
-
- g_assert (ca->refcount > 0);
- ca->refcount--;
-
- if (ca->refcount > 0)
- return;
-
- remove_client_alarms (ca);
-
- /* Clean up */
-
- gtk_signal_disconnect_by_data (GTK_OBJECT (ca->client), ca);
-
- gtk_object_unref (GTK_OBJECT (ca->client));
- ca->client = NULL;
-
- g_hash_table_destroy (ca->uid_alarms_hash);
- ca->uid_alarms_hash = NULL;
-
- g_free (ca);
-
- g_hash_table_remove (client_alarms_hash, client);
-}
-
-
-
-#if 0
-
-/* 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, CalComponent *comp, 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;
- }
-
-#if 0
- cal_component_get_uid (comp, &ai.uid);
- ai.type = audio ? ALARM_AUDIO : ALARM_DISPLAY;
-#endif
- ai.trigger = trigger;
- ai.occur = occur;
-
- setup_alarm (gcal, &ai);
-}
-
-struct alarm_notify_closure {
- GnomeCalendar *gcal;
- CalComponent *comp;
- 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->comp, c->occur, snooze_mins, FALSE);
- break;
-
- case ALARM_NOTIFY_EDIT:
- gnome_calendar_edit_object (c->gcal, c->comp);
- break;
-
- default:
- g_assert_not_reached ();
- }
-
- gtk_object_unref (GTK_OBJECT (c->comp));
- g_free (c);
-}
-
-/* Present a display notification of an alarm trigger */
-static void
-display_notification (time_t trigger, time_t occur, CalComponent *comp, GnomeCalendar *gcal)
-{
- gboolean result;
- struct alarm_notify_closure *c;
-
- gtk_object_ref (GTK_OBJECT (comp));
-
- c = g_new (struct alarm_notify_closure, 1);
- c->gcal = gcal;
- c->comp = comp;
- c->occur = occur;
-
- result = alarm_notify_dialog (trigger, occur, comp, display_notification_cb, c);
- if (!result) {
- g_message ("display_notification(): could not display the alarm notification dialog");
- g_free (c);
- gtk_object_unref (GTK_OBJECT (comp));
- }
-}
-
-/* Present an audible notification of an alarm trigger */
-static void
-audio_notification (time_t trigger, time_t occur, CalComponent *comp, GnomeCalendar *gcal)
-{
- g_message ("AUDIO NOTIFICATION!");
- /* FIXME */
-}
-
-/* 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;
- GnomeCalendarPrivate *priv;
- CalComponent *comp;
- CalClientGetStatus status;
- const char *uid;
- ObjectAlarms *oa;
- GList *l;
-
- c = data;
- priv = c->gcal->priv;
-
- /* Fetch the object */
-
- status = cal_client_get_object (priv->client, c->uid, &comp);
-
- switch (status) {
- case CAL_CLIENT_GET_SUCCESS:
- /* Go on */
- break;
- case CAL_CLIENT_GET_SYNTAX_ERROR:
- case CAL_CLIENT_GET_NOT_FOUND:
- g_message ("trigger_alarm_cb(): syntax error in fetched object");
- return;
- }
-
- g_assert (comp != NULL);
-
- /* Present notification */
-
- switch (c->type) {
- case CAL_COMPONENT_ALARM_EMAIL:
-#if 0
- g_assert (ico->malarm.enabled);
- mail_notification (ico->malarm.data, ico->summary, c->occur);
-#endif
- break;
-
- case CAL_COMPONENT_ALARM_PROCEDURE:
-#if 0
- g_assert (ico->palarm.enabled);
- program_notification (ico->palarm.data, FALSE);
-#endif
- break;
-
- case CAL_COMPONENT_ALARM_DISPLAY:
-#if 0
- g_assert (ico->dalarm.enabled);
-#endif
- display_notification (trigger, c->occur, comp, c->gcal);
- break;
-
- case CAL_COMPONENT_ALARM_AUDIO:
-#if 0
- g_assert (ico->aalarm.enabled);
-#endif
- audio_notification (trigger, c->occur, comp, c->gcal);
- break;
-
- default:
- break;
- }
-
- /* Remove the alarm from the hash table */
- cal_component_get_uid (comp, &uid);
- oa = g_hash_table_lookup (priv->alarms, 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 (priv->alarms, uid);
- g_free (oa->uid);
- g_free (oa);
- }
-
- gtk_object_unref (GTK_OBJECT (comp));
-}
-
-#endif
-
-#if 0
-
-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;
-}
-
-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
diff --git a/calendar/gui/alarm-notify.h b/calendar/gui/alarm-notify.h
deleted file mode 100644
index f386a56ae4..0000000000
--- a/calendar/gui/alarm-notify.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Evolution calendar - Alarm notification engine
- *
- * Copyright (C) 2000 Helix Code, Inc.
- *
- * Authors: Federico Mena-Quintero <federico@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 ALARM_NOTIFY_H
-#define ALARM_NOTIFY_H
-
-#include <cal-client/cal-client.h>
-
-
-void alarm_notify_init (void);
-void alarm_notify_done (void);
-
-void alarm_notify_add_client (CalClient *client);
-void alarm_notify_remove_client (CalClient *client);
-
-
-#endif
diff --git a/calendar/gui/alarm-notify/.cvsignore b/calendar/gui/alarm-notify/.cvsignore
deleted file mode 100644
index 1f2b546c7c..0000000000
--- a/calendar/gui/alarm-notify/.cvsignore
+++ /dev/null
@@ -1,10 +0,0 @@
-.deps
-.libs
-Makefile
-Makefile.in
-evolution-calendar-stubs.c
-evolution-calendar-skels.c
-evolution-calendar-common.c
-evolution-calendar.h
-evolution-alarm-notify
-GNOME_Evolution_Calendar_AlarmNotify.oaf
diff --git a/calendar/gui/alarm-notify/GNOME_Evolution_Calendar_AlarmNotify.oaf.in b/calendar/gui/alarm-notify/GNOME_Evolution_Calendar_AlarmNotify.oaf.in
deleted file mode 100644
index 86f5c71493..0000000000
--- a/calendar/gui/alarm-notify/GNOME_Evolution_Calendar_AlarmNotify.oaf.in
+++ /dev/null
@@ -1,24 +0,0 @@
-<oaf_info>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Calendar_AlarmNotify_Factory"
- type="exe"
- location="evolution-alarm-notify">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/ObjectFactory:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="description" type="string"
- _value="Factory for the alarm notification service"/>
-
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Calendar_AlarmNotify"
- type="factory"
- location="OAFIID:GNOME_Evolution_Calendar_AlarmNotify_Factory">
-
- <oaf_attribute name="description" type="string"
- _value="Alarm notification service"/>
-</oaf_server>
-
-</oaf_info>
diff --git a/calendar/gui/alarm-notify/Makefile.am b/calendar/gui/alarm-notify/Makefile.am
deleted file mode 100644
index f62cb3c365..0000000000
--- a/calendar/gui/alarm-notify/Makefile.am
+++ /dev/null
@@ -1,76 +0,0 @@
-CORBA_GENERATED = \
- evolution-calendar.h \
- evolution-calendar-common.c \
- evolution-calendar-skels.c \
- evolution-calendar-stubs.c
-
-idls = $(top_srcdir)/calendar/idl/evolution-calendar.idl
-
-idl_flags = `$(GNOME_CONFIG) --cflags idl` -I $(datadir)/idl
-
-$(CORBA_GENERATED): $(idls)
- $(ORBIT_IDL) $(idl_flags) $(top_srcdir)/calendar/idl/evolution-calendar.idl
-
-bin_PROGRAMS = evolution-alarm-notify # evolution-alarm-client
-
-noinst_LIBRARIES = libalarm.a
-
-libalarm_a_SOURCES = \
- alarm.c \
- alarm.h
-
-INCLUDES = \
- -DG_LOG_DOMAIN=\"evolution-alarm-notify\" \
- -I$(top_srcdir) \
- -I$(top_srcdir)/calendar \
- -I$(top_srcdir)/libical/src/libical \
- -I$(top_builddir)/libical/src/libical \
- -I$(top_srcdir)/widgets \
- -I$(includedir) \
- $(BONOBO_VFS_GNOME_CFLAGS) \
- $(EXTRA_GNOME_CFLAGS) \
- -DEVOLUTION_DATADIR=\""$(datadir)"\" \
- -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \
- -DEVOLUTION_LOCALEDIR=\""$(localedir)"\"
-
-gladedir = $(datadir)/evolution/glade
-
-evolution_alarm_notify_SOURCES = \
- alarm-notify.c \
- alarm-notify.h \
- alarm-queue.c \
- alarm-queue.h \
- notify-main.c
-
-evolution_alarm_notify_LDADD = \
- libalarm.a \
- $(top_builddir)/calendar/cal-client/libcal-client.la \
- $(top_builddir)/calendar/cal-util/libcal-util.la \
- $(top_builddir)/libical/src/libical/libical.la \
- $(BONOBO_VFS_GNOME_LIBS) \
- $(EXTRA_GNOME_LIBS) \
- $(INTLLIBS)
-
-# evolution_alarm_client_SOURCES = \
-# client-main.c \
-# $(CORBA_GENERATED)
-#
-# evolution_alarm_client_LDADD = \
-# $(BONOBO_VFS_GNOME_LIBS) \
-# $(EXTRA_GNOME_LIBS) \
-# $(INTLLIBS)
-
-oafdir = $(datadir)/oaf
-oaf_in_files = \
- GNOME_Evolution_Calendar_AlarmNotify.oaf.in
-
-oaf_DATA = $(oaf_in_files:.oaf.in=.oaf)
-
-@XML_I18N_MERGE_OAF_RULE@
-
-EXTRA_DIST = \
- $(oaf_DATA) \
- $(oaf_in_files)
-
-BUILT_SOURCES = $(CORBA_GENERATED)
-CLEANFILES += $(BUILT_SOURCES)
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 164d043e13..0000000000
--- a/calendar/gui/alarm-notify/alarm-notify-dialog.c
+++ /dev/null
@@ -1,231 +0,0 @@
-/* Evolution calendar - alarm notification dialog
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Author: Federico Mena-Quintero <federico@ximian.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 <gtk/gtklabel.h>
-#include <gtk/gtkspinbutton.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtkwindow.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <glade/glade.h>
-#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:
- * @trigger: Trigger time for the alarm.
- * @occur: Occurrence time for the event.
- * @comp: Calendar component object which corresponds to the alarm.
- * @func: Function to be called when a dialog action is invoked.
- * @func_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, CalComponent *comp,
- AlarmNotifyFunc func, gpointer func_data)
-{
- AlarmNotify *an;
- char buf[256];
- struct tm tm_trigger;
- struct tm tm_occur;
- CalComponentText summary;
-
- g_return_val_if_fail (trigger != -1, FALSE);
- g_return_val_if_fail (occur != -1, FALSE);
- g_return_val_if_fail (comp != NULL, FALSE);
- g_return_val_if_fail (IS_CAL_COMPONENT (comp), 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 */
-
- cal_component_get_summary (comp, &summary);
-
- if (summary.value)
- gtk_label_set_text (GTK_LABEL (an->summary), summary.value);
- else
- gtk_label_set_text (GTK_LABEL (an->summary), _("No summary available."));
-
- /* 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 f2c938c495..0000000000
--- a/calendar/gui/alarm-notify/alarm-notify-dialog.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Evolution calendar - alarm notification dialog
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Author: Federico Mena-Quintero <federico@ximian.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 ALARM_NOTIFY_DIALOG_H
-#define ALARM_NOTIFY_DIALOG_H
-
-#include <time.h>
-#include <glib.h>
-#include <cal-util/cal-component.h>
-
-
-
-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, CalComponent *comp,
- AlarmNotifyFunc func, gpointer func_data);
-
-
-
-#endif
diff --git a/calendar/gui/alarm-notify/alarm-notify.c b/calendar/gui/alarm-notify/alarm-notify.c
deleted file mode 100644
index fa70a1d236..0000000000
--- a/calendar/gui/alarm-notify/alarm-notify.c
+++ /dev/null
@@ -1,404 +0,0 @@
-/* Evolution calendar - Alarm notification service object
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Author: Federico Mena-Quintero <federico@ximian.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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <libgnomevfs/gnome-vfs.h>
-#include <cal-client/cal-client.h>
-#include "alarm-notify.h"
-#include "alarm-queue.h"
-
-
-
-/* A loaded client */
-typedef struct {
- /* The actual client */
- CalClient *client;
-
- /* The URI of the client in gnome-vfs's format. This *is* the key that
- * is stored in the uri_client_hash hash table below.
- */
- GnomeVFSURI *uri;
-
- /* Number of times clients have requested this URI to be added to the
- * alarm notification system.
- */
- int refcount;
-} LoadedClient;
-
-/* Private part of the AlarmNotify structure */
-struct _AlarmNotifyPrivate {
- /* Mapping from GnomeVFSURIs to LoadedClient structures */
- GHashTable *uri_client_hash;
-};
-
-
-
-static void alarm_notify_class_init (AlarmNotifyClass *class);
-static void alarm_notify_init (AlarmNotify *an);
-static void alarm_notify_destroy (GtkObject *object);
-
-static POA_GNOME_Evolution_Calendar_AlarmNotify__vepv alarm_notify_vepv;
-
-static BonoboObjectClass *parent_class;
-
-
-
-/**
- * alarm_notify_get_type:
- *
- * Registers the #AlarmNotify class if necessary, and returns the type ID
- * associated to it.
- *
- * Return value: The type ID of the #AlarmNotify class.
- **/
-GtkType
-alarm_notify_get_type (void)
-{
- static GtkType alarm_notify_type = 0;
-
- if (!alarm_notify_type) {
- static const GtkTypeInfo alarm_notify_info = {
- "AlarmNotify",
- sizeof (AlarmNotify),
- sizeof (AlarmNotifyClass),
- (GtkClassInitFunc) alarm_notify_class_init,
- (GtkObjectInitFunc) alarm_notify_init,
- NULL, /* reserved_1 */
- NULL, /* reserved_2 */
- (GtkClassInitFunc) NULL
- };
-
- alarm_notify_type = gtk_type_unique (BONOBO_OBJECT_TYPE, &alarm_notify_info);
- }
-
- return alarm_notify_type;
-}
-
-/* CORBA class initialization function for the alarm notify service */
-static void
-init_alarm_notify_corba_class (void)
-{
- alarm_notify_vepv.Bonobo_Unknown_epv = bonobo_object_get_epv ();
- alarm_notify_vepv.GNOME_Evolution_Calendar_AlarmNotify_epv = alarm_notify_get_epv ();
-}
-
-/* Class initialization function for the alarm notify service */
-static void
-alarm_notify_class_init (AlarmNotifyClass *class)
-{
- GtkObjectClass *object_class;
-
- object_class = (GtkObjectClass *) class;
-
- parent_class = gtk_type_class (BONOBO_OBJECT_TYPE);
-
- object_class->destroy = alarm_notify_destroy;
-
- init_alarm_notify_corba_class ();
-}
-
-/* Object initialization function for the alarm notify system */
-static void
-alarm_notify_init (AlarmNotify *an)
-{
- AlarmNotifyPrivate *priv;
-
- priv = g_new0 (AlarmNotifyPrivate, 1);
- an->priv = priv;
-
- priv->uri_client_hash = g_hash_table_new (gnome_vfs_uri_hash, gnome_vfs_uri_hequal);
-}
-
-/* Callback used from g_hash-table_forach(), used to destroy a loade client */
-static void
-destroy_loaded_client_cb (gpointer key, gpointer value, gpointer data)
-{
- LoadedClient *lc;
-
- lc = value;
-
- gtk_object_unref (GTK_OBJECT (lc->client));
- gnome_vfs_uri_unref (lc->uri);
- g_free (lc);
-}
-
-/* Destroy handler for the alarm notify system */
-static void
-alarm_notify_destroy (GtkObject *object)
-{
- AlarmNotify *an;
- AlarmNotifyPrivate *priv;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_ALARM_NOTIFY (object));
-
- an = ALARM_NOTIFY (object);
- priv = an->priv;
-
- g_hash_table_foreach (priv->uri_client_hash, destroy_loaded_client_cb, NULL);
-
- g_hash_table_destroy (priv->uri_client_hash);
- priv->uri_client_hash = NULL;
-
- g_free (priv);
- an->priv = NULL;
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-
-
-/* CORBA servant implementation */
-
-/* AlarmNotify::addCalendar method */
-static void
-AlarmNotify_addCalendar (PortableServer_Servant servant,
- const CORBA_char *str_uri,
- CORBA_Environment *ev)
-{
- AlarmNotify *an;
- AlarmNotifyPrivate *priv;
- GnomeVFSURI *uri;
- CalClient *client;
- LoadedClient *lc;
-
- an = ALARM_NOTIFY (bonobo_object_from_servant (servant));
- priv = an->priv;
-
- uri = gnome_vfs_uri_new (str_uri);
- if (!uri) {
- CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
- ex_GNOME_Evolution_Calendar_AlarmNotify_InvalidURI,
- NULL);
- return;
- }
-
- lc = g_hash_table_lookup (priv->uri_client_hash, uri);
-
- if (lc) {
- gnome_vfs_uri_unref (uri);
- g_assert (lc->refcount > 0);
- lc->refcount++;
- return;
- }
-
- client = cal_client_new ();
-
- if (client) {
- if (cal_client_open_calendar (client, str_uri, FALSE)) {
- lc = g_new (LoadedClient, 1);
- lc->client = client;
- lc->uri = uri;
- lc->refcount = 1;
- g_hash_table_insert (priv->uri_client_hash, uri, lc);
-
- alarm_queue_add_client (client);
- } else {
- gtk_object_unref (GTK_OBJECT (client));
- client = NULL;
- }
- }
-
- if (!client) {
- gnome_vfs_uri_unref (uri);
-
- CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
- ex_GNOME_Evolution_Calendar_AlarmNotify_BackendContactError,
- NULL);
- return;
- }
-}
-
-/* AlarmNotify::removeCalendar method */
-static void
-AlarmNotify_removeCalendar (PortableServer_Servant servant,
- const CORBA_char *str_uri,
- CORBA_Environment *ev)
-{
- AlarmNotify *an;
- AlarmNotifyPrivate *priv;
- LoadedClient *lc;
- GnomeVFSURI *uri;
-
- an = ALARM_NOTIFY (bonobo_object_from_servant (servant));
- priv = an->priv;
-
- uri = gnome_vfs_uri_new (str_uri);
- if (!uri) {
- CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
- ex_GNOME_Evolution_Calendar_AlarmNotify_InvalidURI,
- NULL);
- return;
- }
-
- lc = g_hash_table_lookup (priv->uri_client_hash, uri);
- gnome_vfs_uri_unref (uri);
-
- if (!lc) {
- CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
- ex_GNOME_Evolution_Calendar_AlarmNotify_NotFound,
- NULL);
- return;
- }
-
- g_assert (lc->refcount > 0);
-
- lc->refcount--;
- if (lc->refcount > 0)
- return;
-
- g_hash_table_remove (priv->uri_client_hash, lc->uri);
-
- gtk_object_unref (GTK_OBJECT (lc->client));
- gnome_vfs_uri_unref (lc->uri);
- g_free (lc);
-}
-
-static void
-AlarmNotify_die (PortableServer_Servant servant,
- CORBA_Environment *ev)
-{
- AlarmNotify *an;
- AlarmNotifyPrivate *priv;
-
- an = ALARM_NOTIFY (bonobo_object_from_servant (servant));
- priv = an->priv;
-
- /* FIXME */
-}
-
-/**
- * alarm_notify_get_epv:
- *
- * Creates an EPV for the AlarmNotify CORBA class.
- *
- * Return value: A newly-allocated EPV.
- **/
-POA_GNOME_Evolution_Calendar_AlarmNotify__epv *
-alarm_notify_get_epv (void)
-{
- POA_GNOME_Evolution_Calendar_AlarmNotify__epv *epv;
-
- epv = g_new0 (POA_GNOME_Evolution_Calendar_AlarmNotify__epv, 1);
- epv->addCalendar = AlarmNotify_addCalendar;
- epv->removeCalendar = AlarmNotify_removeCalendar;
- epv->die = AlarmNotify_die;
- return epv;
-}
-
-
-
-/**
- * alarm_notify_construct:
- * @an: An alarm notification service object.
- * @corba_an: CORBA object for the alarm notification service.
- *
- * Constructs an alarm notification service object by binding the corresponding
- * CORBA object to it.
- *
- * Return value: the same object as the @an argument.
- **/
-AlarmNotify *
-alarm_notify_construct (AlarmNotify *an,
- GNOME_Evolution_Calendar_AlarmNotify corba_an)
-{
- g_return_val_if_fail (an != NULL, NULL);
- g_return_val_if_fail (IS_ALARM_NOTIFY (an), NULL);
-
- /* FIXME: add_interface the property bag here */
-
- bonobo_object_construct (BONOBO_OBJECT (an), corba_an);
- return an;
-}
-
-/**
- * alarm_notify_corba_object_create:
- * @object: #BonoboObject that will wrap the CORBA object.
- *
- * Creates and activates the CORBA object that is wrapped by the specified alarm
- * notification service @object.
- *
- * Return value: An activated object reference or #CORBA_OBJECT_NIL in case of
- * failure.
- **/
-GNOME_Evolution_Calendar_AlarmNotify
-alarm_notify_corba_object_create (BonoboObject *object)
-{
- POA_GNOME_Evolution_Calendar_AlarmNotify *servant;
- CORBA_Environment ev;
-
- g_return_val_if_fail (object != NULL, CORBA_OBJECT_NIL);
- g_return_val_if_fail (IS_ALARM_NOTIFY (object), CORBA_OBJECT_NIL);
-
- servant = (POA_GNOME_Evolution_Calendar_AlarmNotify *) g_new (BonoboObjectServant, 1);
- servant->vepv = &alarm_notify_vepv;
-
- CORBA_exception_init (&ev);
- POA_GNOME_Evolution_Calendar_AlarmNotify__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 (GNOME_Evolution_Calendar_AlarmNotify) bonobo_object_activate_servant (
- object, servant);
-}
-
-/**
- * alarm_notify_new:
- *
- * Creates a new #AlarmNotify object.
- *
- * Return value: A newly-created #AlarmNotify, or NULL if its corresponding
- * CORBA object could not be created.
- **/
-AlarmNotify *
-alarm_notify_new (void)
-{
- AlarmNotify *an;
- GNOME_Evolution_Calendar_AlarmNotify corba_an;
- CORBA_Environment ev;
- gboolean result;
-
- an = gtk_type_new (TYPE_ALARM_NOTIFY);
-
- corba_an = alarm_notify_corba_object_create (BONOBO_OBJECT (an));
-
- CORBA_exception_init (&ev);
- result = CORBA_Object_is_nil (corba_an, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION || result) {
- g_message ("alarm_notify_new(): could not create the CORBA alarm notify service");
- bonobo_object_unref (BONOBO_OBJECT (an));
- CORBA_exception_free (&ev);
- return NULL;
- }
- CORBA_exception_free (&ev);
-
- return alarm_notify_construct (an, corba_an);
-}
diff --git a/calendar/gui/alarm-notify/alarm-notify.glade b/calendar/gui/alarm-notify/alarm-notify.glade
deleted file mode 100644
index 41718d0572..0000000000
--- a/calendar/gui/alarm-notify/alarm-notify.glade
+++ /dev/null
@@ -1,228 +0,0 @@
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <name>Evolution Calendar</name>
- <program_name>evolution-calendar</program_name>
- <directory></directory>
- <source_directory>src</source_directory>
- <pixmaps_directory>pixmaps</pixmaps_directory>
- <language>C</language>
- <gnome_support>True</gnome_support>
- <gettext_support>True</gettext_support>
- <use_widget_names>False</use_widget_names>
- <output_main_file>True</output_main_file>
- <output_support_files>True</output_support_files>
- <output_build_files>True</output_build_files>
- <backup_source_files>True</backup_source_files>
- <main_source_file>interface.c</main_source_file>
- <main_header_file>interface.h</main_header_file>
- <handler_source_file>callbacks.c</handler_source_file>
- <handler_header_file>callbacks.h</handler_header_file>
- <support_source_file>support.c</support_source_file>
- <support_header_file>support.h</support_header_file>
-</project>
-
-<widget>
- <class>GtkWindow</class>
- <name>alarm-notify</name>
- <cxx_use_heap>True</cxx_use_heap>
- <title></title>
- <type>GTK_WINDOW_DIALOG</type>
- <position>GTK_WIN_POS_CENTER</position>
- <modal>False</modal>
- <allow_shrink>False</allow_shrink>
- <allow_grow>False</allow_grow>
- <auto_shrink>False</auto_shrink>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox2</name>
- <border_width>4</border_width>
- <cxx_use_heap>True</cxx_use_heap>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox3</name>
- <cxx_use_heap>True</cxx_use_heap>
- <homogeneous>False</homogeneous>
- <spacing>8</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox5</name>
- <cxx_use_heap>True</cxx_use_heap>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>heading</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label></label>
- <justify>GTK_JUSTIFY_LEFT</justify>
- <wrap>True</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>summary</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label></label>
- <justify>GTK_JUSTIFY_LEFT</justify>
- <wrap>True</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox4</name>
- <cxx_use_heap>True</cxx_use_heap>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>close</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <label>Close</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>snooze</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <label>Snooze</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>edit</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <label>Edit appointment</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHSeparator</class>
- <name>hseparator1</name>
- <cxx_use_heap>True</cxx_use_heap>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox4</name>
- <cxx_use_heap>True</cxx_use_heap>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label4</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>Snooze time (minutes)</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkSpinButton</class>
- <name>snooze-time</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <climb_rate>1</climb_rate>
- <digits>0</digits>
- <numeric>False</numeric>
- <update_policy>GTK_UPDATE_ALWAYS</update_policy>
- <snap>False</snap>
- <wrap>False</wrap>
- <value>5</value>
- <lower>1</lower>
- <upper>1440</upper>
- <step>1</step>
- <page>5</page>
- <page_size>5</page_size>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
- </widget>
-</widget>
-
-</GTK-Interface>
diff --git a/calendar/gui/alarm-notify/alarm-notify.h b/calendar/gui/alarm-notify/alarm-notify.h
deleted file mode 100644
index e7a907485d..0000000000
--- a/calendar/gui/alarm-notify/alarm-notify.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/* Evolution calendar - Alarm notification service object
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Author: Federico Mena-Quintero <federico@ximian.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 ALARM_NOTIFY_H
-#define ALARM_NOTIFY_H
-
-#include <bonobo/bonobo-object.h>
-#include "evolution-calendar.h"
-
-
-
-#define TYPE_ALARM_NOTIFY (alarm_notify_get_type ())
-#define ALARM_NOTIFY(obj) (GTK_CHECK_CAST ((obj), TYPE_ALARM_NOTIFY, AlarmNotify))
-#define ALARM_NOTIFY_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), TYPE_ALARM_NOTIFY, \
- AlarmNotifyClass))
-#define IS_ALARM_NOTIFY(obj) (GTK_CHECK_TYPE ((obj), TYPE_ALARM_NOTIFY))
-#define IS_ALARM_NOTIFY_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), TYPE_ALARM_NOTIFY))
-
-typedef struct _AlarmNotify AlarmNotify;
-typedef struct _AlarmNotifyClass AlarmNotifyClass;
-
-typedef struct _AlarmNotifyPrivate AlarmNotifyPrivate;
-
-struct _AlarmNotify {
- BonoboObject object;
-
- /* Private data */
- AlarmNotifyPrivate *priv;
-};
-
-struct _AlarmNotifyClass {
- BonoboObjectClass parent_class;
-};
-
-GtkType alarm_notify_get_type (void);
-
-AlarmNotify *alarm_notify_construct (AlarmNotify *an,
- GNOME_Evolution_Calendar_AlarmNotify corba_an);
-
-GNOME_Evolution_Calendar_AlarmNotify alarm_notify_corba_object_create (BonoboObject *object);
-POA_GNOME_Evolution_Calendar_AlarmNotify__epv *alarm_notify_get_epv (void);
-
-AlarmNotify *alarm_notify_new (void);
-
-
-
-
-#endif
diff --git a/calendar/gui/alarm-notify/alarm-queue.c b/calendar/gui/alarm-notify/alarm-queue.c
deleted file mode 100644
index 1e235c116d..0000000000
--- a/calendar/gui/alarm-notify/alarm-queue.c
+++ /dev/null
@@ -1,964 +0,0 @@
-/* Evolution calendar - Alarm queueing engine
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Authors: Federico Mena-Quintero <federico@ximian.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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <gtk/gtksignal.h>
-#include <cal-util/timeutil.h>
-#include "alarm.h"
-#include "alarm-queue.h"
-
-
-
-/* Whether the queueing system has been initialized */
-static gboolean alarm_queue_inited;
-
-/* Clients we are monitoring for alarms */
-static GHashTable *client_alarms_hash = NULL;
-
-/* Structure that stores a client we are monitoring */
-typedef struct {
- /* Monitored client */
- CalClient *client;
-
- /* Number of times this client has been registered */
- int refcount;
-
- /* Hash table of component UID -> CompQueuedAlarms. If an element is
- * present here, then it means its cqa->queued_alarms contains at least
- * one queued alarm. When all the alarms for a component have been
- * dequeued, the CompQueuedAlarms structure is removed from the hash
- * table. Thus a CQA exists <=> it has queued alarms.
- */
- GHashTable *uid_alarms_hash;
-} ClientAlarms;
-
-/* Pair of a CalComponentAlarms and the mapping from queued alarm IDs to the
- * actual alarm instance structures.
- */
-typedef struct {
- /* The parent client alarms structure */
- ClientAlarms *parent_client;
-
- /* The actual component and its alarm instances */
- CalComponentAlarms *alarms;
-
- /* List of QueuedAlarm structures */
- GSList *queued_alarms;
-} CompQueuedAlarms;
-
-/* Pair of a queued alarm ID and the alarm trigger instance it refers to */
-typedef struct {
- /* Alarm ID from alarm.h */
- gpointer alarm_id;
-
- /* Instance from our parent CompAlarms->alarms list */
- CalAlarmInstance *instance;
-} QueuedAlarm;
-
-/* Alarm ID for the midnight refresh function */
-static gpointer midnight_refresh_id = NULL;
-
-
-
-static void load_alarms (ClientAlarms *ca);
-static void midnight_refresh_cb (gpointer alarm_id, time_t trigger, gpointer data);
-
-/* Queues an alarm trigger for midnight so that we can load the next day's worth
- * of alarms.
- */
-static void
-queue_midnight_refresh (void)
-{
- time_t midnight;
-
- g_assert (midnight_refresh_id == NULL);
-
- midnight = time_day_end (time (NULL));
-
- midnight_refresh_id = alarm_add (midnight, midnight_refresh_cb, NULL, NULL);
- if (!midnight_refresh_id) {
- g_message ("queue_midnight_refresh(): Could not set up the midnight refresh alarm!");
- /* FIXME: what to do? */
- }
-}
-
-/* Loads a client's alarms; called from g_hash_table_foreach() */
-static void
-add_client_alarms_cb (gpointer key, gpointer value, gpointer data)
-{
- ClientAlarms *ca;
-
- ca = value;
- load_alarms (ca);
-}
-
-/* Loads the alarms for the new day every midnight */
-static void
-midnight_refresh_cb (gpointer alarm_id, time_t trigger, gpointer data)
-{
- /* Re-load the alarms for all clients */
-
- g_hash_table_foreach (client_alarms_hash, add_client_alarms_cb, NULL);
-
- /* Re-schedule the midnight update */
-
- midnight_refresh_id = NULL;
- queue_midnight_refresh ();
-}
-
-/* Looks up a client in the client alarms hash table */
-static ClientAlarms *
-lookup_client (CalClient *client)
-{
- return g_hash_table_lookup (client_alarms_hash, client);
-}
-
-/* Callback used when an alarm triggers */
-static void
-alarm_trigger_cb (gpointer alarm_id, time_t trigger, gpointer data)
-{
- CompQueuedAlarms *cqa;
-
- cqa = data;
-
- /* FIXME */
-
- g_message ("alarm_trigger_cb(): Triggered!");
-}
-
-/* Callback used when an alarm must be destroyed */
-static void
-alarm_destroy_cb (gpointer alarm_id, gpointer data)
-{
- CompQueuedAlarms *cqa;
- GSList *l;
- QueuedAlarm *qa;
- const char *uid;
-
- cqa = data;
-
- qa = NULL; /* Keep GCC happy */
-
- /* Find the alarm in the queued alarms */
-
- for (l = cqa->queued_alarms; l; l = l->next) {
- qa = l->data;
- if (qa->alarm_id == alarm_id)
- break;
- }
-
- g_assert (l != NULL);
-
- /* Remove it and free it */
-
- cqa->queued_alarms = g_slist_remove_link (cqa->queued_alarms, l);
- g_slist_free_1 (l);
-
- g_free (qa);
-
- /* If this was the last queued alarm for this component, remove the
- * component itself.
- */
-
- if (cqa->queued_alarms != NULL)
- return;
-
- cal_component_get_uid (cqa->alarms->comp, &uid);
- g_hash_table_remove (cqa->parent_client->uid_alarms_hash, uid);
- cqa->parent_client = NULL;
-
- cal_component_alarms_free (cqa->alarms);
- cqa->alarms = NULL;
-
- g_free (cqa);
-}
-
-/* Adds the alarms in a CalComponentAlarms structure to the alarms queued for a
- * particular client. Also puts the triggers in the alarm timer queue.
- */
-static void
-add_component_alarms (ClientAlarms *ca, CalComponentAlarms *alarms)
-{
- const char *uid;
- CompQueuedAlarms *cqa;
- GSList *l;
-
- /* No alarms? */
- if (alarms->alarms == NULL) {
- cal_component_alarms_free (alarms);
- return;
- }
-
- cqa = g_new (CompQueuedAlarms, 1);
- cqa->parent_client = ca;
- cqa->alarms = alarms;
-
- cqa->queued_alarms = NULL;
-
- for (l = alarms->alarms; l; l = l->next) {
- CalAlarmInstance *instance;
- gpointer alarm_id;
- QueuedAlarm *qa;
-
- instance = l->data;
-
- alarm_id = alarm_add (instance->trigger, alarm_trigger_cb, cqa, alarm_destroy_cb);
- if (!alarm_id) {
- g_message ("add_component_alarms(): Could not schedule a trigger for "
- "%ld, discarding...", (long) instance->trigger);
- continue;
- }
-
- qa = g_new (QueuedAlarm, 1);
- qa->alarm_id = alarm_id;
- qa->instance = instance;
-
- cqa->queued_alarms = g_slist_prepend (cqa->queued_alarms, qa);
- }
-
- cal_component_get_uid (alarms->comp, &uid);
-
- /* If we failed to add all the alarms, then we should get rid of the cqa */
- if (cqa->queued_alarms == NULL) {
- g_message ("add_component_alarms(): Could not add any of the alarms "
- "for the component `%s'; discarding it...", uid);
-
- cal_component_alarms_free (cqa->alarms);
- cqa->alarms = NULL;
-
- g_free (cqa);
- return;
- }
-
- cqa->queued_alarms = g_slist_reverse (cqa->queued_alarms);
- g_hash_table_insert (ca->uid_alarms_hash, (char *) uid, cqa);
-}
-
-/* Loads today's remaining alarms for a client */
-static void
-load_alarms (ClientAlarms *ca)
-{
- time_t now, day_end;
- GSList *comp_alarms;
- GSList *l;
-
- now = time (NULL);
- day_end = time_day_end (now);
-
- comp_alarms = cal_client_get_alarms_in_range (ca->client, now, day_end);
-
- /* All of the last day's alarms should have already triggered and should
- * have been removed, so we should have no pending components.
- */
- g_assert (g_hash_table_size (ca->uid_alarms_hash) == 0);
-
- for (l = comp_alarms; l; l = l->next) {
- CalComponentAlarms *alarms;
-
- alarms = l->data;
- add_component_alarms (ca, alarms);
- }
-
- g_slist_free (comp_alarms);
-}
-
-/* Called when a calendar client finished loading; we load its alarms */
-static void
-cal_opened_cb (CalClient *client, CalClientOpenStatus status, gpointer data)
-{
- ClientAlarms *ca;
-
- ca = data;
-
- if (status != CAL_CLIENT_OPEN_SUCCESS)
- return;
-
- load_alarms (ca);
-}
-
-/* Looks up a component's queued alarm structure in a client alarms structure */
-static CompQueuedAlarms *
-lookup_comp_queued_alarms (ClientAlarms *ca, const char *uid)
-{
- return g_hash_table_lookup (ca->uid_alarms_hash, uid);
-}
-
-/* Removes a component an its alarms */
-static void
-remove_comp (ClientAlarms *ca, const char *uid)
-{
- CompQueuedAlarms *cqa;
- GSList *l;
-
- cqa = lookup_comp_queued_alarms (ca, uid);
- if (!cqa)
- return;
-
- /* If a component is present, then it means we must have alarms queued
- * for it.
- */
- g_assert (cqa->queued_alarms != NULL);
-
- for (l = cqa->queued_alarms; l;) {
- QueuedAlarm *qa;
-
- qa = l->data;
-
- /* Get the next element here because the list element will go
- * away. Also, we do not free the qa here because it will be
- * freed by the destroy notification function.
- */
- l = l->next;
-
- alarm_remove (qa->alarm_id);
- }
-
- /* The list should be empty now, and thus the queued component alarms
- * structure should have been freed and removed from the hash table.
- */
- g_assert (lookup_comp_queued_alarms (ca, uid) == NULL);
-}
-
-/* Called when a calendar component changes; we must reload its corresponding
- * alarms.
- */
-static void
-obj_updated_cb (CalClient *client, const char *uid, gpointer data)
-{
- ClientAlarms *ca;
- time_t now, day_end;
- CalComponentAlarms *alarms;
- gboolean found;
-
- ca = data;
-
- remove_comp (ca, uid);
-
- now = time (NULL);
- day_end = time_day_end (now);
-
- found = cal_client_get_alarms_for_object (ca->client, uid, now, day_end, &alarms);
-
- if (!found)
- return;
-
- add_component_alarms (ca, alarms);
-}
-
-/* Called when a calendar component is removed; we must delete its corresponding
- * alarms.
- */
-static void
-obj_removed_cb (CalClient *client, const char *uid, gpointer data)
-{
- ClientAlarms *ca;
-
- ca = data;
-
- remove_comp (ca, uid);
-}
-
-
-
-/**
- * alarm_queue_init:
- *
- * Initializes the alarm queueing system. This should be called near the
- * beginning of the program, after calling alarm_init().
- **/
-void
-alarm_queue_init (void)
-{
- g_return_if_fail (alarm_queue_inited == FALSE);
-
- client_alarms_hash = g_hash_table_new (g_direct_hash, g_direct_equal);
- queue_midnight_refresh ();
-
- alarm_queue_inited = TRUE;
-}
-
-/**
- * alarm_queue_done:
- *
- * Shuts down the alarm queueing system. This should be called near the end
- * of the program. All the monitored calendar clients should already have been
- * unregistered with alarm_queue_remove_client().
- **/
-void
-alarm_queue_done (void)
-{
- g_return_if_fail (alarm_queue_inited);
-
- /* All clients must be unregistered by now */
- g_return_if_fail (g_hash_table_size (client_alarms_hash) == 0);
-
- g_hash_table_destroy (client_alarms_hash);
- client_alarms_hash = NULL;
-
- g_assert (midnight_refresh_id != NULL);
- alarm_remove (midnight_refresh_id);
- midnight_refresh_id = NULL;
-
- alarm_queue_inited = FALSE;
-}
-
-/**
- * alarm_queue_add_client:
- * @client: A calendar client.
- *
- * Adds a calendar client to the alarm queueing system. Alarm trigger
- * notifications will be presented at the appropriate times. The client should
- * be removed with alarm_queue_remove_client() when receiving notifications
- * from it is no longer desired.
- *
- * A client can be added any number of times to the alarm queueing system,
- * but any single alarm trigger will only be presented once for a particular
- * client. The client must still be removed the same number of times from the
- * queueing system when it is no longer wanted.
- **/
-void
-alarm_queue_add_client (CalClient *client)
-{
- ClientAlarms *ca;
-
- g_return_if_fail (alarm_queue_inited);
- g_return_if_fail (client != NULL);
- g_return_if_fail (IS_CAL_CLIENT (client));
-
- ca = lookup_client (client);
- if (ca) {
- ca->refcount++;
- return;
- }
-
- ca = g_new (ClientAlarms, 1);
-
- ca->client = client;
- gtk_object_ref (GTK_OBJECT (ca->client));
-
- ca->refcount = 1;
- g_hash_table_insert (client_alarms_hash, client, ca);
-
- ca->uid_alarms_hash = g_hash_table_new (g_str_hash, g_str_equal);
-
- if (cal_client_get_load_state (client) != CAL_CLIENT_LOAD_LOADED)
- gtk_signal_connect (GTK_OBJECT (client), "cal_opened",
- GTK_SIGNAL_FUNC (cal_opened_cb), ca);
-
- gtk_signal_connect (GTK_OBJECT (client), "obj_updated",
- GTK_SIGNAL_FUNC (obj_updated_cb), ca);
- gtk_signal_connect (GTK_OBJECT (client), "obj_removed",
- GTK_SIGNAL_FUNC (obj_removed_cb), ca);
-
- if (cal_client_get_load_state (client) == CAL_CLIENT_LOAD_LOADED)
- load_alarms (ca);
-}
-
-/* Called from g_hash_table_foreach(); adds a component UID to a list */
-static void
-add_uid_cb (gpointer key, gpointer value, gpointer data)
-{
- GSList **uids;
- const char *uid;
-
- uids = data;
- uid = key;
-
- *uids = g_slist_prepend (*uids, (char *) uid);
-}
-
-/* Removes all the alarms queued for a particular calendar client */
-static void
-remove_client_alarms (ClientAlarms *ca)
-{
- GSList *uids;
- GSList *l;
-
- /* First we build a list of UIDs so that we can remove them one by one */
-
- uids = NULL;
- g_hash_table_foreach (ca->uid_alarms_hash, add_uid_cb, &uids);
-
- for (l = uids; l; l = l->next) {
- const char *uid;
-
- uid = l->data;
-
- remove_comp (ca, uid);
- }
-
- g_slist_free (uids);
-
- /* The hash table should be empty now */
-
- g_assert (g_hash_table_size (ca->uid_alarms_hash) == 0);
-}
-
-/**
- * alarm_queue_remove_client:
- * @client: A calendar client.
- *
- * Removes a calendar client from the alarm queueing system.
- **/
-void
-alarm_queue_remove_client (CalClient *client)
-{
- ClientAlarms *ca;
-
- g_return_if_fail (alarm_queue_inited);
- g_return_if_fail (client != NULL);
- g_return_if_fail (IS_CAL_CLIENT (client));
-
- ca = lookup_client (client);
- g_return_if_fail (ca != NULL);
-
- g_assert (ca->refcount > 0);
- ca->refcount--;
-
- if (ca->refcount > 0)
- return;
-
- remove_client_alarms (ca);
-
- /* Clean up */
-
- gtk_signal_disconnect_by_data (GTK_OBJECT (ca->client), ca);
-
- gtk_object_unref (GTK_OBJECT (ca->client));
- ca->client = NULL;
-
- g_hash_table_destroy (ca->uid_alarms_hash);
- ca->uid_alarms_hash = NULL;
-
- g_free (ca);
-
- g_hash_table_remove (client_alarms_hash, client);
-}
-
-
-
-#if 0
-
-/* 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, CalComponent *comp, 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;
- }
-
-#if 0
- cal_component_get_uid (comp, &ai.uid);
- ai.type = audio ? ALARM_AUDIO : ALARM_DISPLAY;
-#endif
- ai.trigger = trigger;
- ai.occur = occur;
-
- setup_alarm (gcal, &ai);
-}
-
-struct alarm_notify_closure {
- GnomeCalendar *gcal;
- CalComponent *comp;
- 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->comp, c->occur, snooze_mins, FALSE);
- break;
-
- case ALARM_NOTIFY_EDIT:
- gnome_calendar_edit_object (c->gcal, c->comp);
- break;
-
- default:
- g_assert_not_reached ();
- }
-
- gtk_object_unref (GTK_OBJECT (c->comp));
- g_free (c);
-}
-
-/* Present a display notification of an alarm trigger */
-static void
-display_notification (time_t trigger, time_t occur, CalComponent *comp, GnomeCalendar *gcal)
-{
- gboolean result;
- struct alarm_notify_closure *c;
-
- gtk_object_ref (GTK_OBJECT (comp));
-
- c = g_new (struct alarm_notify_closure, 1);
- c->gcal = gcal;
- c->comp = comp;
- c->occur = occur;
-
- result = alarm_notify_dialog (trigger, occur, comp, display_notification_cb, c);
- if (!result) {
- g_message ("display_notification(): could not display the alarm notification dialog");
- g_free (c);
- gtk_object_unref (GTK_OBJECT (comp));
- }
-}
-
-/* Present an audible notification of an alarm trigger */
-static void
-audio_notification (time_t trigger, time_t occur, CalComponent *comp, GnomeCalendar *gcal)
-{
- g_message ("AUDIO NOTIFICATION!");
- /* FIXME */
-}
-
-/* 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;
- GnomeCalendarPrivate *priv;
- CalComponent *comp;
- CalClientGetStatus status;
- const char *uid;
- ObjectAlarms *oa;
- GList *l;
-
- c = data;
- priv = c->gcal->priv;
-
- /* Fetch the object */
-
- status = cal_client_get_object (priv->client, c->uid, &comp);
-
- switch (status) {
- case CAL_CLIENT_GET_SUCCESS:
- /* Go on */
- break;
- case CAL_CLIENT_GET_SYNTAX_ERROR:
- case CAL_CLIENT_GET_NOT_FOUND:
- g_message ("trigger_alarm_cb(): syntax error in fetched object");
- return;
- }
-
- g_assert (comp != NULL);
-
- /* Present notification */
-
- switch (c->type) {
- case CAL_COMPONENT_ALARM_EMAIL:
-#if 0
- g_assert (ico->malarm.enabled);
- mail_notification (ico->malarm.data, ico->summary, c->occur);
-#endif
- break;
-
- case CAL_COMPONENT_ALARM_PROCEDURE:
-#if 0
- g_assert (ico->palarm.enabled);
- program_notification (ico->palarm.data, FALSE);
-#endif
- break;
-
- case CAL_COMPONENT_ALARM_DISPLAY:
-#if 0
- g_assert (ico->dalarm.enabled);
-#endif
- display_notification (trigger, c->occur, comp, c->gcal);
- break;
-
- case CAL_COMPONENT_ALARM_AUDIO:
-#if 0
- g_assert (ico->aalarm.enabled);
-#endif
- audio_notification (trigger, c->occur, comp, c->gcal);
- break;
-
- default:
- break;
- }
-
- /* Remove the alarm from the hash table */
- cal_component_get_uid (comp, &uid);
- oa = g_hash_table_lookup (priv->alarms, 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 (priv->alarms, uid);
- g_free (oa->uid);
- g_free (oa);
- }
-
- gtk_object_unref (GTK_OBJECT (comp));
-}
-
-#endif
-
-#if 0
-
-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;
-}
-
-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
diff --git a/calendar/gui/alarm-notify/alarm-queue.h b/calendar/gui/alarm-notify/alarm-queue.h
deleted file mode 100644
index 1f8871fb96..0000000000
--- a/calendar/gui/alarm-notify/alarm-queue.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* Evolution calendar - Alarm queueing engine
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Authors: Federico Mena-Quintero <federico@ximian.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 ALARM_QUEUE_H
-#define ALARM_QUEUE_H
-
-#include <cal-client/cal-client.h>
-
-
-void alarm_queue_init (void);
-void alarm_queue_done (void);
-
-void alarm_queue_add_client (CalClient *client);
-void alarm_queue_remove_client (CalClient *client);
-
-
-#endif
diff --git a/calendar/gui/alarm-notify/alarm.c b/calendar/gui/alarm-notify/alarm.c
deleted file mode 100644
index d32d8f1af9..0000000000
--- a/calendar/gui/alarm-notify/alarm.c
+++ /dev/null
@@ -1,357 +0,0 @@
-/* Evolution calendar - Low-level alarm timer mechanism
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Authors: Miguel de Icaza <miguel@ximian.com>
- * Federico Mena-Quintero <federico@ximian.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 <unistd.h>
-#include <time.h>
-#include <fcntl.h>
-#include <signal.h>
-#include <sys/time.h>
-#include <gdk/gdk.h>
-#include "alarm.h"
-
-
-
-/* Whether the timer system has been initialized */
-static gboolean alarm_inited;
-
-/* 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;
-}
-
-/* Clears the itimer we have pending */
-static gboolean
-clear_itimer (void)
-{
- return setup_itimer (0);
-}
-
-/* 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 - now)) {
- 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
- if (!clear_itimer ())
- 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_print ("alarm_ready(): Notifying about alarm on %s\n", ctime (&ar->trigger));
-
- (* ar->alarm_fn) (ar, ar->trigger, ar->data);
-
- if (ar->destroy_notify_fn)
- (* ar->destroy_notify_fn) (ar, 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;
-
- g_return_val_if_fail (alarm_inited, NULL);
- g_return_val_if_fail (trigger != -1, NULL);
- g_return_val_if_fail (alarm_fn != NULL, NULL);
-
- 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_print ("alarm_add(): Adding alarm for %s\n", ctime (&trigger));
-
- if (!queue_alarm (now, ar)) {
- 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;
-
- g_return_if_fail (alarm_inited);
- g_return_if_fail (alarm != NULL);
-
- 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, ar->data);
-
- g_free (ar);
-}
-
-/**
- * alarm_init:
- *
- * Initializes the alarm timer mechanism. This must be called near the
- * beginning of the program.
- **/
-void
-alarm_init (void)
-{
- struct sigaction sa;
- int flags;
-
- g_return_if_fail (alarm_inited == FALSE);
-
- 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);
-
- alarm_inited = TRUE;
-}
-
-/**
- * alarm_done:
- *
- * Terminates the alarm timer mechanism. This should be called at the end of
- * the program.
- **/
-void
-alarm_done (void)
-{
- GList *l;
-
- g_return_if_fail (alarm_inited);
-
- if (!clear_itimer ())
- g_message ("alarm_done(): Could not clear the timer! "
- "Weird things may happen.");
-
- for (l = alarms; l; l = l->next) {
- AlarmRecord *ar;
-
- ar = l->data;
-
- if (ar->destroy_notify_fn)
- (* ar->destroy_notify_fn) (ar, ar->data);
-
- g_free (ar);
- }
-
- g_list_free (alarms);
- alarms = NULL;
-
- if (close (alarm_pipes[0]) != 0)
- g_message ("alarm_done(): Could not close the input pipe for notification");
-
- alarm_pipes[0] = -1;
-
- if (close (alarm_pipes[1]) != 0)
- g_message ("alarm_done(): Could not close the output pipe for notification");
-
- alarm_pipes[1] = -1;
-
- alarm_inited = FALSE;
-}
diff --git a/calendar/gui/alarm-notify/alarm.h b/calendar/gui/alarm-notify/alarm.h
deleted file mode 100644
index fc81908ef2..0000000000
--- a/calendar/gui/alarm-notify/alarm.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* Evolution calendar - Low-level alarm timer mechanism
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Authors: Miguel de Icaza <miguel@ximian.com>
- * Federico Mena-Quintero <federico@ximian.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 ALARM_H
-#define ALARM_H
-
-#include <time.h>
-#include <glib.h>
-
-
-
-typedef void (* AlarmFunction) (gpointer alarm_id, time_t trigger, gpointer data);
-typedef void (* AlarmDestroyNotify) (gpointer alarm_id, gpointer data);
-
-void alarm_init (void);
-void alarm_done (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-notify/client-main.c b/calendar/gui/alarm-notify/client-main.c
deleted file mode 100644
index 5b0fb669d2..0000000000
--- a/calendar/gui/alarm-notify/client-main.c
+++ /dev/null
@@ -1,178 +0,0 @@
-/* Evolution calendar - Command-line client for the alarm notification service
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Authors: Federico Mena-Quintero <federico@ximian.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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <liboaf/liboaf.h>
-#include "evolution-calendar.h"
-
-
-
-/* Requests that a calendar be added to the alarm notification service */
-static void
-add_calendar (GNOME_Evolution_Calendar_AlarmNotify an, const char *uri)
-{
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
- GNOME_Evolution_Calendar_AlarmNotify_addCalendar (an, uri, &ev);
-
- if (ev._major == CORBA_USER_EXCEPTION) {
- char *ex_id;
-
- ex_id = CORBA_exception_id (&ev);
- if (strcmp (ex_id, ex_GNOME_Evolution_Calendar_AlarmNotify_InvalidURI) == 0) {
- g_message ("add_calendar(): Invalid URI reported from the "
- "alarm notification service");
- goto out;
- } else if (strcmp (ex_id,
- ex_GNOME_Evolution_Calendar_AlarmNotify_BackendContactError)
- == 0) {
- g_message ("add_calendar(): The alarm notification service could "
- "not contact the backend");
- goto out;
- }
- }
-
- if (ev._major != CORBA_NO_EXCEPTION)
- g_message ("add_calendar(): Could not issue the addCalendar request");
-
- out:
- CORBA_exception_free (&ev);
-}
-
-/* Loads the calendars that the user has configured to be loaded */
-static void
-load_calendars (void)
-{
- CORBA_Environment ev;
- GNOME_Evolution_Calendar_AlarmNotify an;
- char *base_uri;
- char *uri;
-
- CORBA_exception_init (&ev);
- an = oaf_activate_from_id ("OAFID:GNOME_Evolution_Calendar_AlarmNotify", 0, NULL, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_message ("load_calendars(): Could not activate the alarm notification service");
- CORBA_exception_free (&ev);
- exit (EXIT_FAILURE);
- }
- CORBA_exception_free (&ev);
-
- /* FIXME: this should be obtained from the configuration in the Wombat */
-
- base_uri = g_concat_dir_and_file (g_get_home_dir (), "evolution");
-
- uri = g_concat_dir_and_file (base_uri, "local/Calendar/calendar.ics");
- add_calendar (an, uri);
- g_free (uri);
-
- uri = g_concat_dir_and_file (base_uri, "local/Tasks/tasks.ics");
- add_calendar (an, uri);
- g_free (uri);
-
- g_free (base_uri);
-
- CORBA_exception_init (&ev);
- Bonobo_Unknown_unref (an, &ev);
- if (ev._major != CORBA_NO_EXCEPTION)
- g_message ("load_calendars(): Could not unref the alarm notification service");
-
- CORBA_exception_free (&ev);
-
- CORBA_exception_init (&ev);
- CORBA_Object_release (an, &ev);
- if (ev._major != CORBA_NO_EXCEPTION)
- g_message ("load_calendars(): Could not release the alarm notification service");
-
- CORBA_exception_free (&ev);
-}
-
-/* FIXME: handle the --die option */
-
-int
-main (int argc, char **argv)
-{
- GnomeClient *client;
- int flags;
- gboolean launch_service;
-
- bindtextdomain (PACKAGE, EVOLUTION_LOCALEDIR);
- textdomain (PACKAGE);
-
- if (gnome_init_with_popt_table ("evolution-alarm-client", VERSION,
- argc, argv, oaf_popt_options, 0, NULL) != 0) {
- g_message ("main(): Could not initialize GNOME");
- exit (EXIT_FAILURE);
- }
-
- oaf_init (argc, argv);
-
- if (!bonobo_init (CORBA_OBJECT_NIL, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL)) {
- g_message ("main(): Could not initialize Bonobo");
- exit (EXIT_FAILURE);
- }
-
- /* Ask the session manager to restart us */
-
- client = gnome_master_client ();
- flags = gnome_client_get_flags (client);
-
- if (flags & GNOME_CLIENT_IS_CONNECTED) {
- char *client_id;
-
- client_id = gnome_client_get_id (client);
- g_assert (client_id != NULL);
-
- launch_service = gnome_startup_acquire_token ("EVOLUTION_ALARM_NOTIFY",
- client_id);
-
- if (launch_service) {
- char *args[3];
-
- args[0] = argv[0];
- args[2] = NULL;
-
- gnome_client_set_restart_style (client, GNOME_RESTART_ANYWAY);
- gnome_client_set_restart_command (client, 2, args);
-
- args[0] = argv[0];
- args[1] = "--die";
- args[2] = NULL;
-
- gnome_client_set_shutdown_command (client, 2, args);
- } else
- gnome_client_set_restart_style (client, GNOME_RESTART_NEVER);
-
- gnome_client_flush (client);
- } else
- launch_service = TRUE;
-
- if (!launch_service)
- return EXIT_SUCCESS;
-
- load_calendars ();
-
- return EXIT_SUCCESS;
-}
diff --git a/calendar/gui/alarm-notify/notify-main.c b/calendar/gui/alarm-notify/notify-main.c
deleted file mode 100644
index 9c1d04b739..0000000000
--- a/calendar/gui/alarm-notify/notify-main.c
+++ /dev/null
@@ -1,120 +0,0 @@
-/* Evolution calendar - Alarm notification service main file
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Author: Federico Mena-Quintero <federico@ximian.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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <glib.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-init.h>
-#include <bonobo/bonobo-main.h>
-#include <bonobo/bonobo-generic-factory.h>
-#include <liboaf/liboaf.h>
-#include "alarm.h"
-#include "alarm-queue.h"
-#include "alarm-notify.h"
-
-
-
-static BonoboGenericFactory *factory;
-
-static AlarmNotify *alarm_notify_service;
-
-
-/* La de da */
-static void
-funny_trigger_cb (gpointer alarm_id, time_t trigger, gpointer data)
-{
- char *msg;
- char str[256];
- struct tm *tm;
-
- tm = localtime (&trigger);
- strftime (str, sizeof (str), "%Y/%m/%d %H:%M:%S", tm);
-
- msg = g_strdup_printf (_("It is %s. The Unix time is %ld right now. We just thought "
- "you may like to know."), str, (long) trigger);
- gnome_ok_dialog (msg);
- g_free (msg);
-}
-
-/* Dum de dum */
-static void
-funny_times_init (void)
-{
- alarm_add ((time_t) 987654321L, funny_trigger_cb, NULL, NULL); /* Apr 19 04:25:21 2001 UTC */
- alarm_add ((time_t) 999999999L, funny_trigger_cb, NULL, NULL); /* Sep 9 01:46:39 2001 UTC */
-}
-
-/* Factory function for the alarm notify service; just creates and references a
- * singleton service object.
- */
-static BonoboObject *
-alarm_notify_factory_fn (BonoboGenericFactory *factory, void *data)
-{
- if (!alarm_notify_service) {
- alarm_notify_service = alarm_notify_new ();
- if (!alarm_notify_service)
- return NULL;
- }
-
- bonobo_object_ref (BONOBO_OBJECT (alarm_notify_service));
- return BONOBO_OBJECT (alarm_notify_service);
-}
-
-int
-main (int argc, char **argv)
-{
- bindtextdomain (PACKAGE, EVOLUTION_LOCALEDIR);
- textdomain (PACKAGE);
-
- if (gnome_init_with_popt_table ("evolution-alarm-notify", VERSION, argc, argv,
- oaf_popt_options, 0, NULL) != 0)
- g_error (_("Could not initialize GNOME"));
-
- oaf_init (argc, argv);
-
- if (bonobo_init (CORBA_OBJECT_NIL, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL) == FALSE)
- g_error (_("Could not initialize Bonobo"));
-
- alarm_init ();
- alarm_queue_init ();
-
- funny_times_init ();
-
- factory = bonobo_generic_factory_new ("OAFID:GNOME_Evolution_Calendar_AlarmNotify_Factory",
- alarm_notify_factory_fn, NULL);
- if (!factory)
- g_error (_("Could not create the alarm notify service factory"));
-
- bonobo_main ();
-
- bonobo_object_unref (BONOBO_OBJECT (factory));
- factory = NULL;
-
- alarm_queue_done ();
- alarm_done ();
-
- return 0;
-}
diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c
deleted file mode 100644
index 3556554d82..0000000000
--- a/calendar/gui/calendar-commands.c
+++ /dev/null
@@ -1,479 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* Evolution calendar - Commands for the calendar GUI control
- *
- * Copyright (C) 1998 The Free Software Foundation
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Authors: Miguel de Icaza <miguel@ximian.com>
- * Federico Mena-Quintero <federico@ximian.com>
- * Seth Alves <alves@hungry.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 <pwd.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <string.h>
-#include <ctype.h>
-#include <errno.h>
-
-#include <gdk-pixbuf/gdk-pixbuf.h>
-#include <gtk/gtkfilesel.h>
-#include <gtk/gtkmain.h>
-#include <gtk/gtksignal.h>
-
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-util.h>
-#include <libgnomeui/gnome-dialog-util.h>
-#include <libgnomeui/gnome-messagebox.h>
-#include <libgnomeui/gnome-stock.h>
-#include <libgnome/gnome-util.h>
-#include <libgnome/gnome-i18n.h>
-#include <bonobo/bonobo-ui-util.h>
-#include <cal-util/timeutil.h>
-#include "calendar-commands.h"
-#include "gnome-cal.h"
-#include "goto.h"
-#include "print.h"
-#include "dialogs/cal-prefs-dialog.h"
-#include "e-util/e-gui-utils.h"
-
-/* A list of all of the calendars started */
-static GList *all_calendars = NULL;
-
-/* We have one global preferences dialog. */
-static CalPrefsDialog *preferences_dialog = NULL;
-
-/* Callback for the new appointment command */
-static void
-new_appointment_cb (BonoboUIComponent *uic, gpointer data, const char *path)
-{
- GnomeCalendar *gcal;
-
- gcal = GNOME_CALENDAR (data);
- gnome_calendar_new_appointment (gcal);
-}
-
-static void
-new_event_cb (BonoboUIComponent *uic, gpointer data, const char *path)
-{
- GnomeCalendar *gcal;
- time_t dtstart, dtend;
-
- gcal = GNOME_CALENDAR (data);
- gnome_calendar_get_current_time_range (gcal, &dtstart, &dtend);
- gnome_calendar_new_appointment_for (gcal, dtstart, dtend, TRUE);
-}
-
-/* Prints the calendar at its current view and time range */
-static void
-print (GnomeCalendar *gcal, gboolean preview)
-{
- time_t start;
- const char *view;
- PrintView print_view;
-
- gnome_calendar_get_current_time_range (gcal, &start, NULL);
- view = gnome_calendar_get_current_view_name (gcal);
-
- if (strcmp (view, "dayview") == 0)
- print_view = PRINT_VIEW_DAY;
- else if (strcmp (view, "workweekview") == 0 || strcmp (view, "weekview") == 0)
- print_view = PRINT_VIEW_WEEK;
- else if (strcmp (view, "monthview") == 0)
- print_view = PRINT_VIEW_MONTH;
- else {
- g_assert_not_reached ();
- print_view = PRINT_VIEW_DAY;
- }
-
- print_calendar (gcal, preview, start, print_view);
-}
-
-/* File/Print callback */
-static void
-file_print_cb (BonoboUIComponent *uic, gpointer data, const char *path)
-{
- GnomeCalendar *gcal;
-
- gcal = GNOME_CALENDAR (data);
- print (gcal, FALSE);
-}
-
-static void
-file_print_preview_cb (BonoboUIComponent *uic, gpointer data, const char *path)
-{
- GnomeCalendar *gcal;
-
- gcal = GNOME_CALENDAR (data);
- print (gcal, TRUE);
-}
-
-/* This iterates over each calendar telling them to update their config
- settings. */
-void
-update_all_config_settings (void)
-{
- GList *l;
-
- for (l = all_calendars; l; l = l->next)
- gnome_calendar_update_config_settings (GNOME_CALENDAR (l->data), FALSE);
-}
-
-
-/* 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 (BonoboUIComponent *uic, gpointer data, const char *path)
-{
- GnomeCalendar *gcal;
-
- gcal = GNOME_CALENDAR (data);
-
- set_clock_cursor (gcal);
- gnome_calendar_previous (gcal);
- set_normal_cursor (gcal);
-}
-
-static void
-next_clicked (BonoboUIComponent *uic, gpointer data, const char *path)
-{
- GnomeCalendar *gcal;
-
- gcal = GNOME_CALENDAR (data);
-
- set_clock_cursor (gcal);
- gnome_calendar_next (gcal);
- set_normal_cursor (gcal);
-}
-
-void
-calendar_goto_today (GnomeCalendar *gcal)
-{
- set_clock_cursor (gcal);
- gnome_calendar_goto_today (gcal);
- set_normal_cursor (gcal);
-}
-
-static void
-today_clicked (BonoboUIComponent *uic, gpointer data, const char *path)
-{
- GnomeCalendar *gcal;
-
- gcal = GNOME_CALENDAR (data);
-
- calendar_goto_today (gcal);
-}
-
-static void
-goto_clicked (BonoboUIComponent *uic, gpointer data, const char *path)
-{
- GnomeCalendar *gcal;
-
- gcal = GNOME_CALENDAR (data);
-
- goto_dialog (gcal);
-}
-
-static void
-show_day_view_clicked (BonoboUIComponent *uic, gpointer data, const char *path)
-{
- GnomeCalendar *gcal;
-
- gcal = GNOME_CALENDAR (data);
-
- gnome_calendar_set_view (gcal, "dayview", FALSE, TRUE);
-}
-
-static void
-show_work_week_view_clicked (BonoboUIComponent *uic, gpointer data, const char *path)
-{
- GnomeCalendar *gcal;
-
- gcal = GNOME_CALENDAR (data);
-
- gnome_calendar_set_view (gcal, "workweekview", FALSE, TRUE);
-}
-
-static void
-show_week_view_clicked (BonoboUIComponent *uic, gpointer data, const char *path)
-{
- GnomeCalendar *gcal;
-
- gcal = GNOME_CALENDAR (data);
-
- gnome_calendar_set_view (gcal, "weekview", FALSE, TRUE);
-}
-
-static void
-show_month_view_clicked (BonoboUIComponent *uic, gpointer data, const char *path)
-{
- GnomeCalendar *gcal;
-
- gcal = GNOME_CALENDAR (data);
-
- gnome_calendar_set_view (gcal, "monthview", FALSE, TRUE);
-}
-
-
-static void
-new_calendar_cmd (BonoboUIComponent *uic, gpointer data, const char *path)
-{
- new_calendar ();
-}
-
-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 */
-#ifndef NO_WARNINGS
-#warning "FIXME: find out who owns this calendar and use that name"
-#endif
- /*
- new_calendar ("Somebody", gtk_file_selection_get_filename (fs));
- */
- gtk_widget_destroy (GTK_WIDGET (fs));
- }
-}
-
-static void
-open_calendar_cmd (BonoboUIComponent *uic, gpointer 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 (BonoboUIComponent *uic, gpointer data, const char *path)
-{
- GnomeCalendar *gcal;
- GtkFileSelection *fs;
-
- gcal = GNOME_CALENDAR (data);
-
- fs = GTK_FILE_SELECTION (gtk_file_selection_new (_("Save calendar")));
- gtk_object_set_user_data (GTK_OBJECT (fs), gcal);
-
- 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 (BonoboUIComponent *uic, gpointer data, const char *path)
-{
- if (!preferences_dialog)
- preferences_dialog = cal_prefs_dialog_new ();
- else
- cal_prefs_dialog_show (preferences_dialog);
-}
-
-
-static BonoboUIVerb verbs [] = {
- BONOBO_UI_VERB ("CalendarNew", new_calendar_cmd),
- BONOBO_UI_VERB ("CalendarOpen", open_calendar_cmd),
- BONOBO_UI_VERB ("CalendarSaveAs", save_as_calendar_cmd),
- BONOBO_UI_VERB ("CalendarPrint", file_print_cb),
- BONOBO_UI_VERB ("CalendarPrintPreview", file_print_preview_cb),
- BONOBO_UI_VERB ("EditNewAppointment", new_appointment_cb),
- BONOBO_UI_VERB ("EditNewEvent", new_event_cb),
- BONOBO_UI_VERB ("CalendarPreferences", properties_cmd),
-
- BONOBO_UI_VERB ("CalendarPrev", previous_clicked),
- BONOBO_UI_VERB ("CalendarToday", today_clicked),
- BONOBO_UI_VERB ("CalendarNext", next_clicked),
- BONOBO_UI_VERB ("CalendarGoto", goto_clicked),
-
- BONOBO_UI_VERB ("ShowDayView", show_day_view_clicked),
- BONOBO_UI_VERB ("ShowWorkWeekView", show_work_week_view_clicked),
- BONOBO_UI_VERB ("ShowWeekView", show_week_view_clicked),
- BONOBO_UI_VERB ("ShowMonthView", show_month_view_clicked),
-
- BONOBO_UI_VERB_END
-};
-
-static EPixmap pixmaps [] =
-{
- E_PIXMAP ("/menu/File/New/NewFirstItem/CalendarNew", "new_appointment.xpm"),
- E_PIXMAP ("/menu/File/Print/Print", "print.xpm"),
- E_PIXMAP ("/menu/File/Print/Print Preview", "print-preview.xpm"),
- E_PIXMAP ("/menu/Actions/Component/CalendarNew", "new_appointment.xpm"),
- E_PIXMAP ("/menu/Tools/Component/CalendarPreferences", "configure_16_calendar.xpm"),
-
- E_PIXMAP ("/Toolbar/New", "buttons/new_appointment.png"),
- E_PIXMAP ("/Toolbar/DayView", "buttons/dayview.xpm"),
- E_PIXMAP ("/Toolbar/WorkWeekView", "buttons/workweekview.xpm"),
- E_PIXMAP ("/Toolbar/WeekView", "buttons/weekview.xpm"),
- E_PIXMAP ("/Toolbar/MonthView", "buttons/monthview.xpm"),
-
- E_PIXMAP_END
-};
-
-void
-calendar_control_activate (BonoboControl *control,
- GnomeCalendar *cal)
-{
- Bonobo_UIContainer remote_uih;
- BonoboUIComponent *uic;
-
- uic = bonobo_control_get_ui_component (control);
- g_assert (uic != NULL);
-
- remote_uih = bonobo_control_get_remote_ui_container (control);
- bonobo_ui_component_set_container (uic, remote_uih);
- bonobo_object_release_unref (remote_uih, NULL);
-
-#if 0
- /* FIXME: Need to update this to use new Bonobo ui stuff somehow.
- Also need radio buttons really. */
-
- /* Note that these indices should correspond with the button indices
- in the gnome_toolbar_view_buttons UIINFO struct. */
- gnome_calendar_set_view_buttons (cal,
- gnome_toolbar_view_buttons[0].widget,
- gnome_toolbar_view_buttons[1].widget,
- gnome_toolbar_view_buttons[2].widget,
- gnome_toolbar_view_buttons[3].widget);
-
- /* This makes the appropriate radio button in the toolbar active. */
- gnome_calendar_update_view_buttons (cal);
-#endif
-
- bonobo_ui_component_add_verb_list_with_data (
- uic, verbs, cal);
-
- bonobo_ui_component_freeze (uic, NULL);
-
- bonobo_ui_util_set_ui (uic, EVOLUTION_DATADIR,
- "evolution-calendar.xml",
- "evolution-calendar");
-
- e_pixmaps_update (uic, pixmaps);
-
- bonobo_ui_component_thaw (uic, NULL);
-}
-
-void
-calendar_control_deactivate (BonoboControl *control)
-{
- BonoboUIComponent *uic = bonobo_control_get_ui_component (control);
- g_assert (uic != NULL);
-
- bonobo_ui_component_rm (uic, "/", NULL);
- bonobo_ui_component_unset_container (uic);
-}
-
-/* Removes a calendar from our list of all calendars when it is destroyed. */
-static void
-on_calendar_destroyed (GnomeCalendar *gcal)
-{
- all_calendars = g_list_remove (all_calendars, gcal);
-}
-
-GnomeCalendar *
-new_calendar (void)
-{
- GtkWidget *gcal;
-
- gcal = gnome_calendar_new ();
- if (!gcal) {
- gnome_warning_dialog (_("Could not create the calendar view. Please check your "
- "ORBit and OAF setup."));
- return NULL;
- }
-
- gtk_signal_connect (GTK_OBJECT (gcal), "destroy",
- GTK_SIGNAL_FUNC (on_calendar_destroyed), NULL);
-
- all_calendars = g_list_prepend (all_calendars, gcal);
-
- return GNOME_CALENDAR (gcal);
-}
diff --git a/calendar/gui/calendar-commands.h b/calendar/gui/calendar-commands.h
deleted file mode 100644
index 3dfad41dab..0000000000
--- a/calendar/gui/calendar-commands.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* Evolution calendar - Commands for the calendar GUI control
- *
- * Copyright (C) 1998 The Free Software Foundation
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Authors: Miguel de Icaza <miguel@ximian.com>
- * Federico Mena-Quintero <federico@ximian.com>
- * Seth Alves <alves@hungry.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 CALENDAR_COMMANDS_H
-#define CALENDAR_COMMANDS_H
-
-#include <bonobo/bonobo-control.h>
-#include "gnome-cal.h"
-
-/* This tells all the calendars to reload the config settings. */
-void update_all_config_settings (void);
-
-GnomeCalendar *new_calendar (void);
-
-void calendar_control_activate (BonoboControl *control,
- GnomeCalendar *cal);
-void calendar_control_deactivate (BonoboControl *control);
-
-void calendar_goto_today (GnomeCalendar *gcal);
-
-#endif /* CALENDAR_COMMANDS_H */
diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c
deleted file mode 100644
index 5135eb26b8..0000000000
--- a/calendar/gui/calendar-component.c
+++ /dev/null
@@ -1,175 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* component-factory.c
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, 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 <ettore@ximian.com>
- */
-
-#include <config.h>
-#include "evolution-shell-component.h"
-#include <executive-summary/evolution-services/executive-summary-component.h>
-#include "component-factory.h"
-#include "tasks-control-factory.h"
-#include "control-factory.h"
-#include "calendar-config.h"
-#include "calendar-summary.h"
-#include "tasks-control.h"
-#include "tasks-migrate.h"
-
-
-
-#define COMPONENT_FACTORY_ID "OAFIID:GNOME_Evolution_Calendar_ShellComponentFactory"
-
-static BonoboGenericFactory *factory = NULL;
-static BonoboGenericFactory *summary_factory = NULL;
-char *evolution_dir;
-
-static const EvolutionShellComponentFolderType folder_types[] = {
- { "calendar", "evolution-calendar.png" },
- { "tasks", "evolution-tasks.png" },
- { NULL, NULL }
-};
-
-
-/* EvolutionShellComponent methods and signals. */
-
-static EvolutionShellComponentResult
-create_view (EvolutionShellComponent *shell_component,
- const char *physical_uri,
- const char *type,
- BonoboControl **control_return,
- void *closure)
-{
- BonoboControl *control;
-
- if (!g_strcasecmp (type, "calendar")) {
- control = control_factory_new_control ();
- if (!control)
- return EVOLUTION_SHELL_COMPONENT_CORBAERROR;
- } else if (!g_strcasecmp (type, "tasks")) {
- control = tasks_control_new ();
- if (!control)
- return EVOLUTION_SHELL_COMPONENT_CORBAERROR;
- } else {
- return EVOLUTION_SHELL_COMPONENT_UNSUPPORTEDTYPE;
- }
-
- bonobo_control_set_property (control, "folder_uri", physical_uri, NULL);
-
- *control_return = control;
-
- return EVOLUTION_SHELL_COMPONENT_OK;
-}
-
-static void
-create_folder (EvolutionShellComponent *shell_component,
- const char *physical_uri,
- const char *type,
- const GNOME_Evolution_ShellComponentListener listener,
- void *closure)
-{
- CORBA_Environment ev;
-
- CORBA_exception_init(&ev);
- /* FIXME: I don't think we have to do anything to create a calendar
- or tasks folder - the '.ics' files are created automatically when
- needed. But I'm not sure - Damon. */
- if (!strcmp(type, "calendar") || !strcmp(type, "tasks")) {
- GNOME_Evolution_ShellComponentListener_notifyResult(listener, GNOME_Evolution_ShellComponentListener_OK, &ev);
- } else {
- GNOME_Evolution_ShellComponentListener_notifyResult(listener, GNOME_Evolution_ShellComponentListener_UNSUPPORTED_TYPE, &ev);
- }
- CORBA_exception_free(&ev);
-}
-
-static gint owner_count = 0;
-
-static void
-owner_set_cb (EvolutionShellComponent *shell_component,
- EvolutionShellClient *shell_client,
- const char *evolution_homedir,
- gpointer user_data)
-{
- static gboolean migrated = FALSE;
-
- owner_count ++;
- evolution_dir = g_strdup (evolution_homedir);
-
- calendar_config_init ();
-
- if (!migrated) {
- tasks_migrate ();
- migrated = TRUE;
- }
-}
-
-static void
-owner_unset_cb (EvolutionShellComponent *shell_component,
- gpointer user_data)
-{
- owner_count --;
- if (owner_count <= 0)
- gtk_main_quit();
-}
-
-
-/* The factory function. */
-
-static BonoboObject *
-factory_fn (BonoboGenericFactory *factory,
- void *closure)
-{
- EvolutionShellComponent *shell_component;
-
- shell_component = evolution_shell_component_new (folder_types,
- create_view,
- create_folder,
- NULL, /* remove_folder_fn */
- NULL, /* copy_folder_fn */
- NULL, /* populate_folder_context_menu_fn */
- NULL, /* get_dnd_selection_fn */
- NULL /* closure */);
-
- gtk_signal_connect (GTK_OBJECT (shell_component), "owner_set",
- GTK_SIGNAL_FUNC (owner_set_cb), NULL);
- gtk_signal_connect (GTK_OBJECT (shell_component), "owner_unset",
- GTK_SIGNAL_FUNC (owner_unset_cb), NULL);
-
- return BONOBO_OBJECT (shell_component);
-}
-
-
-
-void
-component_factory_init (void)
-{
- if (factory != NULL && factory != NULL)
- return;
-
- factory = bonobo_generic_factory_new (COMPONENT_FACTORY_ID, factory_fn, NULL);
-
- summary_factory = calendar_summary_factory_init ();
-
- if (factory == NULL)
- g_error ("Cannot initialize Evolution's calendar component.");
-
- if (summary_factory == NULL)
- g_error ("Cannot initialize Evolution's calendar summary component.");
-}
diff --git a/calendar/gui/calendar-component.h b/calendar/gui/calendar-component.h
deleted file mode 100644
index d2d570e340..0000000000
--- a/calendar/gui/calendar-component.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* component-factory.h
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, 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 <ettore@ximian.com>
- */
-
-#ifndef _COMPONENT_FACTORY_H_
-#define _COMPONENT_FACTORY_H_
-
-extern char *evolution_dir;
-
-void component_factory_init (void);
-
-#endif /* _COMPONENT_FACTORY_H_ */
diff --git a/calendar/gui/calendar-config.c b/calendar/gui/calendar-config.c
deleted file mode 100644
index 1446783c3c..0000000000
--- a/calendar/gui/calendar-config.c
+++ /dev/null
@@ -1,535 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <damon@ximian.com>
- *
- * Copyright 2000, Helix Code, Inc.
- * Copyright 2000, Ximian, 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
- */
-
-/*
- * calendar-config.c - functions to load/save/get/set user settings.
- */
-
-#include <config.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-config.h>
-#include "component-factory.h"
-#include "calendar-config.h"
-
-
-typedef struct
-{
- CalWeekdays working_days;
- gboolean use_24_hour_format;
- gint week_start_day;
- gint day_start_hour;
- gint day_start_minute;
- gint day_end_hour;
- gint day_end_minute;
- gint time_divisions;
- gboolean dnav_show_week_no;
- gint view;
- gfloat hpane_pos;
- gfloat vpane_pos;
- gfloat month_hpane_pos;
- gfloat month_vpane_pos;
- gboolean compress_weekend;
- gboolean show_event_end;
-} CalendarConfig;
-
-
-static CalendarConfig *config = NULL;
-
-static void config_read (void);
-
-
-void
-calendar_config_init (void)
-{
- if (config)
- return;
-
- config = g_new0 (CalendarConfig, 1);
-
- config_read ();
-}
-
-
-static void
-config_read (void)
-{
- gchar *prefix;
- gboolean is_default;
-
- /* 'Display' settings. */
- prefix = g_strdup_printf ("=%s/config/Calendar=/Display/",
- evolution_dir);
- gnome_config_push_prefix (prefix);
- g_free (prefix);
-
- config->working_days = gnome_config_get_int_with_default ("WorkingDays", &is_default);
- if (is_default) {
- config->working_days = CAL_MONDAY | CAL_TUESDAY
- | CAL_WEDNESDAY | CAL_THURSDAY | CAL_FRIDAY;
- }
- config->use_24_hour_format = gnome_config_get_bool ("Use24HourFormat=0");
- config->week_start_day = gnome_config_get_int ("WeekStartDay=1");
- config->day_start_hour = gnome_config_get_int ("DayStartHour=9");
- config->day_start_minute = gnome_config_get_int ("DayStartMinute=0");
- config->day_end_hour = gnome_config_get_int ("DayEndHour=17");
- config->day_end_minute = gnome_config_get_int ("DayEndMinute=0");
- config->time_divisions = gnome_config_get_int ("TimeDivisions=30");
- config->view = gnome_config_get_int ("View=0");
- config->hpane_pos = gnome_config_get_float ("HPanePosition=1");
- config->vpane_pos = gnome_config_get_float ("VPanePosition=1");
- config->month_hpane_pos = gnome_config_get_float ("MonthHPanePosition=0");
- config->month_vpane_pos = gnome_config_get_float ("MonthVPanePosition=1");
- config->compress_weekend = gnome_config_get_bool ("CompressWeekend=1");
- config->show_event_end = gnome_config_get_bool ("ShowEventEndTime=1");
-
- gnome_config_pop_prefix ();
-
-
- /* 'DateNavigator' settings. */
- prefix = g_strdup_printf ("=%s/config/Calendar=/DateNavigator/",
- evolution_dir);
- gnome_config_push_prefix (prefix);
- g_free (prefix);
-
- config->dnav_show_week_no = gnome_config_get_bool ("ShowWeekNumbers=0");
-
- gnome_config_pop_prefix ();
-
-
- gnome_config_sync ();
-}
-
-
-void
-calendar_config_write (void)
-{
- gchar *prefix;
-
- /* 'Display' settings. */
- prefix = g_strdup_printf ("=%s/config/Calendar=/Display/",
- evolution_dir);
- gnome_config_push_prefix (prefix);
- g_free (prefix);
-
- gnome_config_set_int ("WorkingDays", config->working_days);
- gnome_config_set_bool ("Use24HourFormat", config->use_24_hour_format);
- gnome_config_set_int ("WeekStartDay", config->week_start_day);
- gnome_config_set_int ("DayStartHour", config->day_start_hour);
- gnome_config_set_int ("DayStartMinute", config->day_start_minute);
- gnome_config_set_int ("DayEndHour", config->day_end_hour);
- gnome_config_set_int ("DayEndMinute", config->day_end_minute);
- gnome_config_set_bool ("CompressWeekend", config->compress_weekend);
- gnome_config_set_bool ("ShowEventEndTime", config->show_event_end);
-
- gnome_config_pop_prefix ();
-
-
- /* 'DateNavigator' settings. */
- prefix = g_strdup_printf ("=%s/config/Calendar=/DateNavigator/",
- evolution_dir);
- gnome_config_push_prefix (prefix);
- g_free (prefix);
-
- gnome_config_set_bool ("ShowWeekNumbers", config->dnav_show_week_no);
-
- gnome_config_pop_prefix ();
-
-
- gnome_config_sync ();
-}
-
-
-void
-calendar_config_write_on_exit (void)
-{
- gchar *prefix;
-
- /* 'Display' settings. */
- prefix = g_strdup_printf ("=%s/config/Calendar=/Display/",
- evolution_dir);
- gnome_config_push_prefix (prefix);
- g_free (prefix);
-
- gnome_config_set_int ("View", config->view);
- gnome_config_set_int ("TimeDivisions", config->time_divisions);
- gnome_config_set_float ("HPanePosition", config->hpane_pos);
- gnome_config_set_float ("VPanePosition", config->vpane_pos);
- gnome_config_set_float ("MonthHPanePosition", config->month_hpane_pos);
- gnome_config_set_float ("MonthVPanePosition", config->month_vpane_pos);
-
- gnome_config_pop_prefix ();
-
-
- gnome_config_sync ();
-}
-
-
-/*
- * Calendar Settings.
- */
-
-/* Whether we use 24-hour format or 12-hour format (AM/PM). */
-gboolean
-calendar_config_get_24_hour_format (void)
-{
- return config->use_24_hour_format;
-}
-
-
-void
-calendar_config_set_24_hour_format (gboolean use_24_hour)
-{
- config->use_24_hour_format = use_24_hour;
-}
-
-
-/* The start day of the week (0 = Sun to 6 = Mon). */
-gint
-calendar_config_get_week_start_day (void)
-{
- return config->week_start_day;
-}
-
-
-void
-calendar_config_set_week_start_day (gint week_start_day)
-{
- config->week_start_day = week_start_day;
-}
-
-
-/* The start and end times of the work-day. */
-gint
-calendar_config_get_day_start_hour (void)
-{
- return config->day_start_hour;
-}
-
-
-void
-calendar_config_set_day_start_hour (gint day_start_hour)
-{
- config->day_start_hour = day_start_hour;
-}
-
-
-gint
-calendar_config_get_day_start_minute (void)
-{
- return config->day_start_minute;
-}
-
-
-void
-calendar_config_set_day_start_minute (gint day_start_min)
-{
- config->day_start_minute = day_start_min;
-}
-
-
-gint
-calendar_config_get_day_end_hour (void)
-{
- return config->day_end_hour;
-}
-
-
-void
-calendar_config_set_day_end_hour (gint day_end_hour)
-{
- config->day_end_hour = day_end_hour;
-}
-
-
-gint
-calendar_config_get_day_end_minute (void)
-{
- return config->day_end_minute;
-}
-
-
-void
-calendar_config_set_day_end_minute (gint day_end_min)
-{
- config->day_end_minute = day_end_min;
-}
-
-
-/* The time divisions in the Day/Work-Week view in minutes (5/10/15/30/60). */
-gint
-calendar_config_get_time_divisions (void)
-{
- return config->time_divisions;
-}
-
-
-void
-calendar_config_set_time_divisions (gint divisions)
-{
- config->time_divisions = divisions;
-}
-
-
-/* Whether we show week numbers in the Date Navigator. */
-gboolean
-calendar_config_get_dnav_show_week_no (void)
-{
- return config->dnav_show_week_no;
-}
-
-
-void
-calendar_config_set_dnav_show_week_no (gboolean show_week_no)
-{
- config->dnav_show_week_no = show_week_no;
-}
-
-
-/* The view to show on start-up, 0 = Day, 1 = WorkWeek, 2 = Week, 3 = Month. */
-gint
-calendar_config_get_default_view (void)
-{
- return config->view;
-}
-
-
-void
-calendar_config_set_default_view (gint view)
-{
- config->view = view;
-}
-
-
-/* The positions of the panes in the normal and month views. */
-gfloat
-calendar_config_get_hpane_pos (void)
-{
- return config->hpane_pos;
-}
-
-
-void
-calendar_config_set_hpane_pos (gfloat hpane_pos)
-{
- config->hpane_pos = hpane_pos;
-}
-
-
-gfloat
-calendar_config_get_vpane_pos (void)
-{
- return config->vpane_pos;
-}
-
-
-void
-calendar_config_set_vpane_pos (gfloat vpane_pos)
-{
- config->vpane_pos = vpane_pos;
-}
-
-
-gfloat
-calendar_config_get_month_hpane_pos (void)
-{
- return config->month_hpane_pos;
-}
-
-
-void
-calendar_config_set_month_hpane_pos (gfloat hpane_pos)
-{
- config->month_hpane_pos = hpane_pos;
-}
-
-
-gfloat
-calendar_config_get_month_vpane_pos (void)
-{
- return config->month_vpane_pos;
-}
-
-
-void
-calendar_config_set_month_vpane_pos (gfloat vpane_pos)
-{
- config->month_vpane_pos = vpane_pos;
-}
-
-
-/* Whether we compress the weekend in the week/month views. */
-gboolean
-calendar_config_get_compress_weekend (void)
-{
- return config->compress_weekend;
-}
-
-
-void
-calendar_config_set_compress_weekend (gboolean compress)
-{
- config->compress_weekend = compress;
-}
-
-
-/* Whether we show event end times. */
-gboolean
-calendar_config_get_show_event_end (void)
-{
- return config->show_event_end;
-}
-
-
-void
-calendar_config_set_show_event_end (gboolean show_end)
-{
- config->show_event_end = show_end;
-}
-
-
-/* The working days of the week, a bit-wise combination of flags. */
-CalWeekdays
-calendar_config_get_working_days (void)
-{
- return config->working_days;
-}
-
-
-void
-calendar_config_set_working_days (CalWeekdays days)
-{
- config->working_days = days;
-}
-
-
-/* This sets all the common config settings for an ECalendar widget.
- These are the week start day, and whether we show week numbers. */
-void
-calendar_config_configure_e_calendar (ECalendar *cal)
-{
- gboolean dnav_show_week_no;
- gint week_start_day;
-
- g_return_if_fail (E_IS_CALENDAR (cal));
-
- dnav_show_week_no = calendar_config_get_dnav_show_week_no ();
-
- /* Note that this is 0 (Sun) to 6 (Sat). */
- week_start_day = calendar_config_get_week_start_day ();
-
- /* Convert it to 0 (Mon) to 6 (Sun), which is what we use. */
- week_start_day = (week_start_day + 6) % 7;
-
- gnome_canvas_item_set (GNOME_CANVAS_ITEM (cal->calitem),
- "show_week_numbers", dnav_show_week_no,
- "week_start_day", week_start_day,
- NULL);
-}
-
-
-/* This sets all the common config settings for an EDateEdit widget.
- These are the week start day, whether we show week numbers, whether we
- use 24 hour format, and the hours of the working day to use in the time
- popup. */
-void
-calendar_config_configure_e_date_edit (EDateEdit *dedit)
-{
- gboolean dnav_show_week_no, use_24_hour;
- gint week_start_day, start_hour, end_hour;
-
- g_return_if_fail (E_IS_DATE_EDIT (dedit));
-
- dnav_show_week_no = calendar_config_get_dnav_show_week_no ();
-
- /* Note that this is 0 (Sun) to 6 (Sat). */
- week_start_day = calendar_config_get_week_start_day ();
-
- /* Convert it to 0 (Mon) to 6 (Sun), which is what we use. */
- week_start_day = (week_start_day + 6) % 7;
-
- use_24_hour = calendar_config_get_24_hour_format ();
-
- start_hour = calendar_config_get_day_start_hour ();
- end_hour = calendar_config_get_day_end_hour ();
- /* Round up the end hour. */
- if (calendar_config_get_day_end_minute () != 0)
- end_hour = end_hour + 1 % 24;
-
- e_date_edit_set_week_start_day (dedit, week_start_day);
- e_date_edit_set_show_week_numbers (dedit, dnav_show_week_no);
- e_date_edit_set_use_24_hour_format (dedit, use_24_hour);
- e_date_edit_set_time_popup_range (dedit, start_hour, end_hour);
-}
-
-
-/* This sets all the common config settings for an ECellDateEdit ETable item.
- These are the settings for the ECalendar popup and the time list (if we use
- 24 hour format, and the hours of the working day). */
-void
-calendar_config_configure_e_cell_date_edit (ECellDateEdit *ecde)
-{
- gboolean use_24_hour;
- gint start_hour, end_hour;
-
- g_return_if_fail (E_IS_CELL_DATE_EDIT (ecde));
-
- calendar_config_configure_e_calendar (E_CALENDAR (ecde->calendar));
-
- use_24_hour = calendar_config_get_24_hour_format ();
-
- start_hour = calendar_config_get_day_start_hour ();
- end_hour = calendar_config_get_day_end_hour ();
- /* Round up the end hour. */
- if (calendar_config_get_day_end_minute () != 0)
- end_hour = end_hour + 1 % 24;
-
- e_cell_date_edit_freeze (ecde);
- gtk_object_set (GTK_OBJECT (ecde),
- "use_24_hour_format", use_24_hour,
- "lower_hour", start_hour,
- "upper_hour", end_hour,
- NULL);
- e_cell_date_edit_thaw (ecde);
-}
-
-
-/* This sets all the common config settings for an ECalendarTable widget.
- These are the settings for the ECalendar popup and the time list (if we use
- 24 hour format, and the hours of the working day). */
-void
-calendar_config_configure_e_calendar_table (ECalendarTable *cal_table)
-{
- CalendarModel *model;
- gboolean use_24_hour;
-
- g_return_if_fail (E_IS_CALENDAR_TABLE (cal_table));
-
- use_24_hour = calendar_config_get_24_hour_format ();
-
- model = e_calendar_table_get_model (cal_table);
- calendar_model_set_use_24_hour_format (model, use_24_hour);
-
- calendar_config_configure_e_cell_date_edit (cal_table->dates_cell);
-}
diff --git a/calendar/gui/calendar-config.h b/calendar/gui/calendar-config.h
deleted file mode 100644
index fb19ba2cc5..0000000000
--- a/calendar/gui/calendar-config.h
+++ /dev/null
@@ -1,130 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <damon@ximian.com>
- *
- * Copyright 2000, Helix Code, Inc.
- * Copyright 2000, Ximian, 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
- */
-
-/*
- * calendar-config.h - functions to load/save/get/set user settings.
- */
-
-#ifndef _CALENDAR_CONFIG_H_
-#define _CALENDAR_CONFIG_H_
-
-#include <widgets/misc/e-calendar.h>
-#include <widgets/misc/e-dateedit.h>
-#include <widgets/misc/e-cell-date-edit.h>
-#include "e-calendar-table.h"
-
-
-/* These are used to get/set the working days in the week. The bit-flags are
- combined together. The bits must be from 0 (Sun) to 6 (Sat) to match the
- day values used by localtime etc. */
-typedef enum
-{
- CAL_SUNDAY = 1 << 0,
- CAL_MONDAY = 1 << 1,
- CAL_TUESDAY = 1 << 2,
- CAL_WEDNESDAY = 1 << 3,
- CAL_THURSDAY = 1 << 4,
- CAL_FRIDAY = 1 << 5,
- CAL_SATURDAY = 1 << 6
-} CalWeekdays;
-
-
-
-void calendar_config_init (void);
-void calendar_config_write (void);
-void calendar_config_write_on_exit (void);
-
-
-/*
- * Calendar Settings.
- */
-
-/* The working days of the week, a bit-wise combination of flags. */
-CalWeekdays calendar_config_get_working_days (void);
-void calendar_config_set_working_days (CalWeekdays days);
-
-/* The start day of the week (0 = Sun to 6 = Sat). */
-gint calendar_config_get_week_start_day (void);
-void calendar_config_set_week_start_day (gint week_start_day);
-
-/* The start and end times of the work-day. */
-gint calendar_config_get_day_start_hour (void);
-void calendar_config_set_day_start_hour (gint day_start_hour);
-
-gint calendar_config_get_day_start_minute (void);
-void calendar_config_set_day_start_minute (gint day_start_min);
-
-gint calendar_config_get_day_end_hour (void);
-void calendar_config_set_day_end_hour (gint day_end_hour);
-
-gint calendar_config_get_day_end_minute (void);
-void calendar_config_set_day_end_minute (gint day_end_min);
-
-/* Whether we use 24-hour format or 12-hour format (AM/PM). */
-gboolean calendar_config_get_24_hour_format (void);
-void calendar_config_set_24_hour_format (gboolean use_24_hour);
-
-/* The time divisions in the Day/Work-Week view in minutes (5/10/15/30/60). */
-gint calendar_config_get_time_divisions (void);
-void calendar_config_set_time_divisions (gint divisions);
-
-/* Whether we show event end times. */
-gboolean calendar_config_get_show_event_end (void);
-void calendar_config_set_show_event_end (gboolean show_end);
-
-/* Whether we compress the weekend in the week/month views. */
-gboolean calendar_config_get_compress_weekend (void);
-void calendar_config_set_compress_weekend (gboolean compress);
-
-/* Whether we show week numbers in the Date Navigator. */
-gboolean calendar_config_get_dnav_show_week_no (void);
-void calendar_config_set_dnav_show_week_no (gboolean show_week_no);
-
-/* The view to show on start-up, 0 = Day, 1 = WorkWeek, 2 = Week, 3 = Month. */
-gint calendar_config_get_default_view (void);
-void calendar_config_set_default_view (gint view);
-
-/* The positions of the panes in the normal and month views. */
-gfloat calendar_config_get_hpane_pos (void);
-void calendar_config_set_hpane_pos (gfloat hpane_pos);
-
-gfloat calendar_config_get_vpane_pos (void);
-void calendar_config_set_vpane_pos (gfloat vpane_pos);
-
-gfloat calendar_config_get_month_hpane_pos (void);
-void calendar_config_set_month_hpane_pos (gfloat hpane_pos);
-
-gfloat calendar_config_get_month_vpane_pos (void);
-void calendar_config_set_month_vpane_pos (gfloat vpane_pos);
-
-
-/* Convenience functions to configure common properties of ECalendar,
- EDateEdit & ECalendarTable widgets, and the ECellDateEdit ETable cell. */
-void calendar_config_configure_e_calendar (ECalendar *cal);
-void calendar_config_configure_e_date_edit (EDateEdit *dedit);
-void calendar_config_configure_e_calendar_table (ECalendarTable *cal_table);
-void calendar_config_configure_e_cell_date_edit (ECellDateEdit *ecde);
-
-#endif /* _CALENDAR_CONFIG_H_ */
diff --git a/calendar/gui/calendar-model.c b/calendar/gui/calendar-model.c
deleted file mode 100644
index f75499f4da..0000000000
--- a/calendar/gui/calendar-model.c
+++ /dev/null
@@ -1,2229 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/* Evolution calendar - Data model for ETable
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Authors: Federico Mena-Quintero <federico@ximian.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 <math.h>
-#include <sys/types.h>
-
-/* We need this for strptime. */
-#define _XOPEN_SOURCE 500
-#define __USE_XOPEN
-#include <time.h>
-#include <sys/time.h>
-#undef _XOPEN_SOURCE
-#undef __USE_XOPEN
-
-#include <ctype.h>
-
-#include <libgnomeui/gnome-messagebox.h>
-#include <libgnomeui/gnome-stock.h>
-#include <libgnome/gnome-i18n.h>
-#include <gal/widgets/e-unicode.h>
-#include <e-util/e-time-utils.h>
-#include <cal-util/timeutil.h>
-#include "calendar-model.h"
-#include "calendar-commands.h"
-
-
-/* Private part of the ECalendarModel structure */
-struct _CalendarModelPrivate {
- /* Calendar client we are using */
- CalClient *client;
-
- /* Types of objects we are dealing with */
- CalObjType type;
-
- /* Array of pointers to calendar objects */
- GArray *objects;
-
- /* UID -> array index hash */
- GHashTable *uid_index_hash;
-
- /* Type of components to create when using click-to-add in the table */
- CalComponentVType new_comp_vtype;
-
- /* Whether we display dates in 24-hour format. */
- gboolean use_24_hour_format;
-
- /* The default category to use when creating new tasks, e.g. when the
- filter is set to a certain category we use that category when
- creating a new task. */
- gchar *default_category;
-
- /* A balanced tree of the categories used by all the tasks/events. */
- GTree *categories;
-};
-
-enum {
- CATEGORIES_CHANGED,
- LAST_SIGNAL
-};
-
-static gint calendar_model_signals [LAST_SIGNAL] = { 0 };
-
-
-
-static void calendar_model_class_init (CalendarModelClass *class);
-static void calendar_model_init (CalendarModel *model);
-static void calendar_model_destroy (GtkObject *object);
-
-static int calendar_model_column_count (ETableModel *etm);
-static int calendar_model_row_count (ETableModel *etm);
-static void *calendar_model_value_at (ETableModel *etm, int col, int row);
-static void calendar_model_set_value_at (ETableModel *etm, int col, int row, const void *value);
-static gboolean calendar_model_is_cell_editable (ETableModel *etm, int col, int row);
-static void calendar_model_append_row (ETableModel *etm, ETableModel *source, gint row);
-static void *calendar_model_duplicate_value (ETableModel *etm, int col, const void *value);
-static void calendar_model_free_value (ETableModel *etm, int col, void *value);
-static void *calendar_model_initialize_value (ETableModel *etm, int col);
-static gboolean calendar_model_value_is_empty (ETableModel *etm, int col, const void *value);
-static char * calendar_model_value_to_string (ETableModel *etm, int col, const void *value);
-static void load_objects (CalendarModel *model);
-static int remove_object (CalendarModel *model, const char *uid);
-static void ensure_task_complete (CalComponent *comp,
- time_t completed_date);
-static void ensure_task_not_complete (CalComponent *comp);
-static void calendar_model_collect_all_categories (CalendarModel *model);
-static gboolean calendar_model_collect_categories (CalendarModel *model,
- CalComponent *comp);
-
-static ETableModelClass *parent_class;
-
-
-
-/**
- * calendar_model_get_type:
- * @void:
- *
- * Registers the #CalendarModel class if necessary, and returns the type ID
- * associated to it.
- *
- * Return value: The type ID of the #CalendarModel class.
- **/
-GtkType
-calendar_model_get_type (void)
-{
- static GtkType calendar_model_type = 0;
-
- if (!calendar_model_type) {
- static GtkTypeInfo calendar_model_info = {
- "CalendarModel",
- sizeof (CalendarModel),
- sizeof (CalendarModelClass),
- (GtkClassInitFunc) calendar_model_class_init,
- (GtkObjectInitFunc) calendar_model_init,
- NULL, /* reserved_1 */
- NULL, /* reserved_2 */
- (GtkClassInitFunc) NULL
- };
-
- calendar_model_type = gtk_type_unique (E_TABLE_MODEL_TYPE, &calendar_model_info);
- }
-
- return calendar_model_type;
-}
-
-/* Class initialization function for the calendar table model */
-static void
-calendar_model_class_init (CalendarModelClass *class)
-{
- GtkObjectClass *object_class;
- ETableModelClass *etm_class;
-
- object_class = (GtkObjectClass *) class;
- etm_class = (ETableModelClass *) class;
-
- parent_class = gtk_type_class (E_TABLE_MODEL_TYPE);
-
- calendar_model_signals [CATEGORIES_CHANGED] =
- gtk_signal_new ("categories-changed",
- GTK_RUN_LAST, object_class->type,
- GTK_SIGNAL_OFFSET (CalendarModelClass,
- categories_changed),
- gtk_signal_default_marshaller,
- GTK_TYPE_NONE, 0);
-
- gtk_object_class_add_signals (object_class, calendar_model_signals,
- LAST_SIGNAL);
-
- object_class->destroy = calendar_model_destroy;
-
- etm_class->column_count = calendar_model_column_count;
- etm_class->row_count = calendar_model_row_count;
- etm_class->value_at = calendar_model_value_at;
- etm_class->set_value_at = calendar_model_set_value_at;
- etm_class->is_cell_editable = calendar_model_is_cell_editable;
- etm_class->append_row = calendar_model_append_row;
- etm_class->duplicate_value = calendar_model_duplicate_value;
- etm_class->free_value = calendar_model_free_value;
- etm_class->initialize_value = calendar_model_initialize_value;
- etm_class->value_is_empty = calendar_model_value_is_empty;
- etm_class->value_to_string = calendar_model_value_to_string;
-
- class->categories_changed = NULL;
-}
-
-/* Object initialization function for the calendar table model */
-static void
-calendar_model_init (CalendarModel *model)
-{
- CalendarModelPrivate *priv;
-
- priv = g_new0 (CalendarModelPrivate, 1);
- model->priv = priv;
-
- priv->objects = g_array_new (FALSE, TRUE, sizeof (CalComponent *));
- priv->uid_index_hash = g_hash_table_new (g_str_hash, g_str_equal);
- priv->new_comp_vtype = CAL_COMPONENT_EVENT;
- priv->use_24_hour_format = TRUE;
-
- priv->categories = g_tree_new ((GCompareFunc)strcmp);
-}
-
-/* Called from g_hash_table_foreach_remove(), frees a stored UID->index
- * mapping.
- */
-static gboolean
-free_uid_index (gpointer key, gpointer value, gpointer data)
-{
- int *idx;
-
- idx = value;
- g_free (idx);
-
- return TRUE;
-}
-
-/* Frees the objects stored in the calendar model */
-static void
-free_objects (CalendarModel *model)
-{
- CalendarModelPrivate *priv;
- int i;
-
- priv = model->priv;
-
- g_hash_table_foreach_remove (priv->uid_index_hash, free_uid_index, NULL);
-
- for (i = 0; i < priv->objects->len; i++) {
- CalComponent *comp;
-
- comp = g_array_index (priv->objects, CalComponent *, i);
- g_assert (comp != NULL);
- gtk_object_unref (GTK_OBJECT (comp));
- }
-
- g_array_set_size (priv->objects, 0);
-}
-
-/* Destroy handler for the calendar table model */
-static void
-calendar_model_destroy (GtkObject *object)
-{
- CalendarModel *model;
- CalendarModelPrivate *priv;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_CALENDAR_MODEL (object));
-
- model = CALENDAR_MODEL (object);
- priv = model->priv;
-
- /* Free the calendar client interface object */
-
- if (priv->client) {
- gtk_signal_disconnect_by_data (GTK_OBJECT (priv->client), model);
- gtk_object_unref (GTK_OBJECT (priv->client));
- priv->client = NULL;
- }
-
- /* Free the uid->index hash data and the array of UIDs */
-
- free_objects (model);
-
- g_hash_table_destroy (priv->uid_index_hash);
- priv->uid_index_hash = NULL;
-
- g_array_free (priv->objects, TRUE);
- priv->objects = NULL;
-
- g_free (priv->default_category);
-
- /* We only need to free the first argument, the key, so g_free will do.
- */
- g_tree_traverse (priv->categories, (GTraverseFunc) g_free,
- G_PRE_ORDER, NULL);
- g_tree_destroy (priv->categories);
-
- /* Free the private structure */
-
- g_free (priv);
- model->priv = NULL;
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-
-
-/* ETableModel methods */
-
-/* column_count handler for the calendar table model */
-static int
-calendar_model_column_count (ETableModel *etm)
-{
- return CAL_COMPONENT_FIELD_NUM_FIELDS;
-}
-
-/* row_count handler for the calendar table model */
-static int
-calendar_model_row_count (ETableModel *etm)
-{
- CalendarModel *model;
- CalendarModelPrivate *priv;
-
- model = CALENDAR_MODEL (etm);
- priv = model->priv;
-
- return priv->objects->len;
-}
-
-/* Creates a nice string representation of a time value. If show_midnight is
- FALSE, and the time is midnight, then we just show the date. */
-static char*
-get_time_t (CalendarModel *model, time_t *t, gboolean show_midnight)
-{
- static char buffer[64];
- struct tm *tmp_tm;
-
- if (*t <= 0) {
- buffer[0] = '\0';
- } else {
- tmp_tm = localtime (t);
- e_time_format_date_and_time (tmp_tm,
- model->priv->use_24_hour_format,
- show_midnight, FALSE,
- buffer, sizeof (buffer));
- }
-
- return buffer;
-}
-
-/* Builds a string based on the list of CATEGORIES properties of a calendar
- * component.
- */
-static char *
-get_categories (CalComponent *comp)
-{
- const char *categories;
-
- cal_component_get_categories (comp, &categories);
-
- return categories ? (char*) categories : "";
-}
-
-/* Returns a string based on the CLASSIFICATION property of a calendar component */
-static char *
-get_classification (CalComponent *comp)
-{
- CalComponentClassification classif;
-
- cal_component_get_classification (comp, &classif);
-
- switch (classif) {
- case CAL_COMPONENT_CLASS_NONE:
- return "";
-
- case CAL_COMPONENT_CLASS_PUBLIC:
- return _("Public");
-
- case CAL_COMPONENT_CLASS_PRIVATE:
- return _("Private");
-
- case CAL_COMPONENT_CLASS_CONFIDENTIAL:
- return _("Confidential");
-
- case CAL_COMPONENT_CLASS_UNKNOWN:
- return _("Unknown");
-
- default:
- g_assert_not_reached ();
- return "";
- }
-}
-
-/* Builds a string for the COMPLETED property of a calendar component */
-static char *
-get_completed (CalendarModel *model,
- CalComponent *comp)
-{
- struct icaltimetype *completed;
- time_t t;
-
- cal_component_get_completed (comp, &completed);
-
- if (!completed)
- t = 0;
- else {
- t = icaltime_as_timet (*completed);
- cal_component_free_icaltimetype (completed);
- }
-
- return get_time_t (model, &t, TRUE);
-}
-
-/* Builds a string for and frees a date/time value */
-static char *
-get_and_free_datetime (CalendarModel *model, CalComponentDateTime dt)
-{
- time_t t;
-
- if (!dt.value)
- t = 0;
- else
- t = icaltime_as_timet (*dt.value);
-
- cal_component_free_datetime (&dt);
-
- return get_time_t (model, &t, TRUE);
-}
-
-/* Builds a string for the DTEND property of a calendar component */
-static char *
-get_dtend (CalendarModel *model, CalComponent *comp)
-{
- CalComponentDateTime dt;
-
- cal_component_get_dtend (comp, &dt);
- return get_and_free_datetime (model, dt);
-}
-
-/* Builds a string for the DTSTART property of a calendar component */
-static char *
-get_dtstart (CalendarModel *model, CalComponent *comp)
-{
- CalComponentDateTime dt;
-
- cal_component_get_dtstart (comp, &dt);
- return get_and_free_datetime (model, dt);
-}
-
-/* Builds a string for the DUE property of a calendar component */
-static char *
-get_due (CalendarModel *model, CalComponent *comp)
-{
- CalComponentDateTime dt;
-
- cal_component_get_due (comp, &dt);
- return get_and_free_datetime (model, dt);
-}
-
-/* Builds a string for the GEO property of a calendar component */
-static char*
-get_geo (CalComponent *comp)
-{
- struct icalgeotype *geo;
- static gchar buf[32];
-
- cal_component_get_geo (comp, &geo);
-
- if (!geo)
- buf[0] = '\0';
- else {
- g_snprintf (buf, sizeof (buf), "%g %s, %g %s",
- fabs (geo->lat),
- geo->lat >= 0.0 ? _("N") : _("S"),
- fabs (geo->lon),
- geo->lon >= 0.0 ? _("E") : _("W"));
- cal_component_free_geo (geo);
- }
-
- return buf;
-}
-
-/* Builds a string for the PERCENT property of a calendar component */
-static char *
-get_percent (CalComponent *comp)
-{
- int *percent;
- static char buf[32];
-
- cal_component_get_percent (comp, &percent);
-
- if (!percent)
- buf[0] = '\0';
- else {
- g_snprintf (buf, sizeof (buf), "%d%%", *percent);
- cal_component_free_percent (percent);
- }
-
- return buf;
-}
-
-/* Builds a string for the PRIORITY property of a calendar component */
-static char *
-get_priority (CalComponent *comp)
-{
- int *priority;
- char *retval;
-
- cal_component_get_priority (comp, &priority);
-
- if (!priority || *priority == 0)
- retval = "";
- else if (*priority <= 4)
- retval = _("High");
- else if (*priority == 5)
- retval = _("Normal");
- else
- retval = _("Low");
-
- if (priority)
- cal_component_free_priority (priority);
-
- return retval;
-}
-
-/* Builds a string for the SUMMARY property of a calendar component */
-static char *
-get_summary (CalComponent *comp)
-{
- CalComponentText summary;
-
- cal_component_get_summary (comp, &summary);
-
- if (summary.value)
- return (char *) summary.value;
- else
- return "";
-}
-
-/* Builds a string for the TRANSPARENCY property of a calendar component */
-static char *
-get_transparency (CalComponent *comp)
-{
- CalComponentTransparency transp;
-
- cal_component_get_transparency (comp, &transp);
-
- switch (transp) {
- case CAL_COMPONENT_TRANSP_NONE:
- case CAL_COMPONENT_TRANSP_UNKNOWN:
- return "";
-
- case CAL_COMPONENT_TRANSP_TRANSPARENT:
- return _("Transparent");
-
- case CAL_COMPONENT_TRANSP_OPAQUE:
- return _("Opaque");
-
- default:
- g_assert_not_reached ();
- return NULL;
- }
-}
-
-/* Builds a string for the URL property of a calendar component */
-static char *
-get_url (CalComponent *comp)
-{
- const char *url;
-
- cal_component_get_url (comp, &url);
-
- if (url)
- return (char *) url;
- else
- return "";
-}
-
-/* Returns whether the completion date has been set on a component */
-static gboolean
-get_is_complete (CalComponent *comp)
-{
- struct icaltimetype *t;
- gboolean retval;
-
- cal_component_get_completed (comp, &t);
- retval = (t != NULL);
-
- if (retval)
- cal_component_free_icaltimetype (t);
-
- return retval;
-}
-
-/* Returns whether a calendar component is overdue.
- *
- * FIXME: This will only get called when the component is scrolled into the
- * ETable. There should be some sort of dynamic update thingy for if a component
- * becomes overdue while it is being viewed.
- */
-static gboolean
-get_is_overdue (CalComponent *comp)
-{
- CalComponentDateTime dt;
- gboolean retval;
-
- cal_component_get_due (comp, &dt);
-
- /* First, do we have a due date? */
-
- if (!dt.value)
- retval = FALSE;
- else {
- time_t t;
-
- /* Second, is it already completed? */
-
- if (get_is_complete (comp)) {
- retval = FALSE;
- goto out;
- }
-
- /* Third, are we overdue as of right now? */
-
- t = icaltime_as_timet (*dt.value);
-
- if (t < time (NULL))
- retval = TRUE;
- else
- retval = FALSE;
- }
-
- out:
-
- cal_component_free_datetime (&dt);
-
- return retval;
-}
-
-static void *
-get_status (CalComponent *comp)
-{
- icalproperty_status status;
-
- cal_component_get_status (comp, &status);
-
- switch (status) {
- case ICAL_STATUS_NONE:
- return "";
-
- case ICAL_STATUS_NEEDSACTION:
- return _("Not Started");
-
- case ICAL_STATUS_INPROCESS:
- return _("In Progress");
-
- case ICAL_STATUS_COMPLETED:
- return _("Completed");
-
- case ICAL_STATUS_CANCELLED:
- return _("Cancelled");
-
- default:
- g_assert_not_reached ();
- return NULL;
- }
-}
-
-/* value_at handler for the calendar table model */
-static void *
-calendar_model_value_at (ETableModel *etm, int col, int row)
-{
- CalendarModel *model;
- CalendarModelPrivate *priv;
- CalComponent *comp;
-
- model = CALENDAR_MODEL (etm);
- priv = model->priv;
-
- g_return_val_if_fail (col >= 0 && col < CAL_COMPONENT_FIELD_NUM_FIELDS, NULL);
- g_return_val_if_fail (row >= 0 && row < priv->objects->len, NULL);
-
- comp = g_array_index (priv->objects, CalComponent *, row);
- g_assert (comp != NULL);
-
-#if 0
- g_print ("In calendar_model_value_at: %i\n", col);
-#endif
-
- switch (col) {
- case CAL_COMPONENT_FIELD_CATEGORIES:
- return get_categories (comp);
-
- case CAL_COMPONENT_FIELD_CLASSIFICATION:
- return get_classification (comp);
-
- case CAL_COMPONENT_FIELD_COMPLETED:
- return get_completed (model, comp);
-
- case CAL_COMPONENT_FIELD_DTEND:
- return get_dtend (model, comp);
-
- case CAL_COMPONENT_FIELD_DTSTART:
- return get_dtstart (model, comp);
-
- case CAL_COMPONENT_FIELD_DUE:
- return get_due (model, comp);
-
- case CAL_COMPONENT_FIELD_GEO:
- return get_geo (comp);
-
- case CAL_COMPONENT_FIELD_PERCENT:
- return get_percent (comp);
-
- case CAL_COMPONENT_FIELD_PRIORITY:
- return get_priority (comp);
-
- case CAL_COMPONENT_FIELD_SUMMARY:
- return get_summary (comp);
-
- case CAL_COMPONENT_FIELD_TRANSPARENCY:
- return get_transparency (comp);
-
- case CAL_COMPONENT_FIELD_URL:
- return get_url (comp);
-
- case CAL_COMPONENT_FIELD_HAS_ALARMS:
- return GINT_TO_POINTER (cal_component_has_alarms (comp));
-
- case CAL_COMPONENT_FIELD_ICON:
- /* FIXME: Also support 'Assigned to me' & 'Assigned to someone
- else'. */
- if (cal_component_has_recurrences (comp))
- return GINT_TO_POINTER (1);
- else {
- icalcomponent *ical_comp;
-
- ical_comp = cal_component_get_icalcomponent (comp);
- if (icalcomponent_get_first_property (ical_comp,
- ICAL_ATTENDEE_PROPERTY) != NULL)
- {
- return GINT_TO_POINTER (2); /* Task-assigned */
- }
- else {
- return GINT_TO_POINTER (0);
- }
- }
- case CAL_COMPONENT_FIELD_COMPLETE:
- return GINT_TO_POINTER (get_is_complete (comp));
-
- case CAL_COMPONENT_FIELD_RECURRING:
- return GINT_TO_POINTER (cal_component_has_recurrences (comp));
-
- case CAL_COMPONENT_FIELD_OVERDUE:
- return GINT_TO_POINTER (get_is_overdue (comp));
-
- case CAL_COMPONENT_FIELD_COLOR:
- if (get_is_overdue (comp))
- return "red";
- else
- return NULL;
-
- case CAL_COMPONENT_FIELD_STATUS:
- return get_status (comp);
-
- default:
- g_message ("calendar_model_value_at(): Requested invalid column %d", col);
- return NULL;
- }
-}
-
-/* Returns whether a string is NULL, empty, or full of whitespace */
-static gboolean
-string_is_empty (const char *value)
-{
- const char *p;
- gboolean empty = TRUE;
-
- if (value) {
- p = value;
- while (*p) {
- if (!isspace (*p)) {
- empty = FALSE;
- break;
- }
- p++;
- }
- }
- return empty;
-}
-
-
-/* FIXME: We need to set the "transient_for" property for the dialog, but
- the model doesn't know anything about the windows. */
-static void
-show_date_warning (CalendarModel *model)
-{
- GtkWidget *dialog;
- char buffer[64], message[256], *format;
- time_t t;
- struct tm *tmp_tm;
-
- t = time (NULL);
- tmp_tm = localtime (&t);
-
- if (model->priv->use_24_hour_format)
- /* strftime format of a weekday, a date and a time, 24-hour. */
- format = _("%a %m/%d/%Y %H:%M:%S");
- else
- /* strftime format of a weekday, a date and a time, 12-hour. */
- format = _("%a %m/%d/%Y %I:%M:%S %p");
-
- strftime (buffer, sizeof (buffer), format, tmp_tm);
-
- g_snprintf (message, 256,
- _("The date must be entered in the format: \n\n%s"),
- buffer);
-
- dialog = gnome_message_box_new (message,
- GNOME_MESSAGE_BOX_ERROR,
- GNOME_STOCK_BUTTON_OK, NULL);
- gtk_widget_show (dialog);
-}
-
-/* Builds a list of categories from a comma-delimited string */
-static GSList *
-categories_from_string (const char *value)
-{
- GSList *list;
- const char *categ_start;
- const char *categ_end;
- const char *p;
-
- if (!value)
- return NULL;
-
- list = NULL;
-
- categ_start = categ_end = NULL;
-
- for (p = value; *p; p++) {
- if (categ_start) {
- if (*p == ',') {
- char *c;
-
- c = g_strndup (categ_start, categ_end - categ_start + 1);
- list = g_slist_prepend (list, c);
-
- categ_start = categ_end = NULL;
- } else if (!isspace (*p))
- categ_end = p;
- } else if (!isspace (*p) && *p != ',')
- categ_start = categ_end = p;
- }
-
- if (categ_start) {
- char *c;
-
- c = g_strndup (categ_start, categ_end - categ_start + 1);
- list = g_slist_prepend (list, c);
- }
-
- return g_slist_reverse (list);
-}
-
-/* Sets the list of categories from a comma-delimited string */
-static void
-set_categories (CalComponent *comp, const char *value)
-{
- GSList *list;
- GSList *l;
-
- list = categories_from_string (value);
-
- cal_component_set_categories_list (comp, list);
-
- for (l = list; l; l = l->next) {
- char *s;
-
- s = l->data;
- g_free (s);
- }
-
- g_slist_free (list);
-}
-
-
-/* FIXME: We won't need this eventually, since the user won't be allowed to
- * edit the field.
- */
-static void
-show_classification_warning (void)
-{
- GtkWidget *dialog;
-
- dialog = gnome_message_box_new (_("The classification must be 'Public', 'Private', 'Confidential' or 'None'"),
- GNOME_MESSAGE_BOX_ERROR,
- GNOME_STOCK_BUTTON_OK, NULL);
- gtk_widget_show (dialog);
-}
-
-
-static void
-set_classification (CalComponent *comp,
- const char *value)
-{
- CalComponentClassification classif;
-
- /* An empty string is the same as 'None'. */
- if (!value[0] || !g_strcasecmp (value, _("None")))
- classif = CAL_COMPONENT_CLASS_NONE;
- else if (!g_strcasecmp (value, _("Public")))
- classif = CAL_COMPONENT_CLASS_PUBLIC;
- else if (!g_strcasecmp (value, _("Private")))
- classif = CAL_COMPONENT_CLASS_PRIVATE;
- else if (!g_strcasecmp (value, _("Confidential")))
- classif = CAL_COMPONENT_CLASS_CONFIDENTIAL;
- else {
- show_classification_warning ();
- return;
- }
-
- cal_component_set_classification (comp, classif);
-}
-
-
-/* Called to set the "Date Completed" field. We also need to update the
- Status and Percent fields to make sure they match. */
-static void
-set_completed (CalendarModel *model, CalComponent *comp, const char *value)
-{
- ETimeParseStatus status;
- struct tm tmp_tm;
- time_t t;
-
- status = e_time_parse_date_and_time (value, &tmp_tm);
-
- if (status == E_TIME_PARSE_INVALID) {
- show_date_warning (model);
- } else if (status == E_TIME_PARSE_NONE) {
- ensure_task_not_complete (comp);
- } else {
- t = mktime (&tmp_tm);
- ensure_task_complete (comp, t);
- }
-}
-
-/* Sets a CalComponentDateTime value */
-static void
-set_datetime (CalendarModel *model, CalComponent *comp, const char *value,
- void (* set_func) (CalComponent *comp, CalComponentDateTime *dt))
-{
- ETimeParseStatus status;
- struct tm tmp_tm;
- time_t t;
-
- status = e_time_parse_date_and_time (value, &tmp_tm);
-
- if (status == E_TIME_PARSE_INVALID) {
- show_date_warning (model);
- } else if (status == E_TIME_PARSE_NONE) {
- (* set_func) (comp, NULL);
- } else {
- CalComponentDateTime dt;
- struct icaltimetype itt;
-
- t = mktime (&tmp_tm);
- itt = icaltime_from_timet (t, FALSE);
- dt.value = &itt;
- dt.tzid = NULL;
-
- (* set_func) (comp, &dt);
- }
-}
-
-/* FIXME: We need to set the "transient_for" property for the dialog, but the
- * model doesn't know anything about the windows.
- */
-static void
-show_geo_warning (void)
-{
- GtkWidget *dialog;
-
- dialog = gnome_message_box_new (_("The geographical position must be entered "
- "in the format: \n\n45.436845,125.862501"),
- GNOME_MESSAGE_BOX_ERROR,
- GNOME_STOCK_BUTTON_OK, NULL);
- gtk_widget_show (dialog);
-}
-
-/* Sets the geographical position value of a component */
-static void
-set_geo (CalComponent *comp, const char *value)
-{
- double latitude, longitude;
- int matched;
- struct icalgeotype geo;
-
- if (string_is_empty (value)) {
- cal_component_set_geo (comp, NULL);
- return;
- }
-
- matched = sscanf (value, "%lg , %lg", &latitude, &longitude);
-
- if (matched != 2) {
- show_geo_warning ();
- return;
- }
-
- geo.lat = latitude;
- geo.lon = longitude;
- cal_component_set_geo (comp, &geo);
-}
-
-/* FIXME: We need to set the "transient_for" property for the dialog, but the
- * model doesn't know anything about the windows.
- */
-static void
-show_percent_warning (void)
-{
- GtkWidget *dialog;
-
- dialog = gnome_message_box_new (_("The percent value must be between 0 and 100, inclusive"),
- GNOME_MESSAGE_BOX_ERROR,
- GNOME_STOCK_BUTTON_OK, NULL);
- gtk_widget_show (dialog);
-}
-
-/* Sets the percent value of a calendar component */
-static void
-set_percent (CalComponent *comp, const char *value)
-{
- int matched, percent;
-
- if (string_is_empty (value)) {
- cal_component_set_percent (comp, NULL);
- ensure_task_not_complete (comp);
- return;
- }
-
- matched = sscanf (value, "%i", &percent);
-
- if (matched != 1 || percent < 0 || percent > 100) {
- show_percent_warning ();
- return;
- }
-
- cal_component_set_percent (comp, &percent);
-
- if (percent == 100)
- ensure_task_complete (comp, -1);
- else
- ensure_task_not_complete (comp);
-}
-
-/* FIXME: We won't need this eventually, since the user won't be allowed to
- * edit the field.
- */
-static void
-show_priority_warning (void)
-{
- GtkWidget *dialog;
-
- dialog = gnome_message_box_new (_("The priority must be 'High', 'Normal', 'Low' or 'Undefined'."),
- GNOME_MESSAGE_BOX_ERROR,
- GNOME_STOCK_BUTTON_OK, NULL);
- gtk_widget_show (dialog);
-}
-
-/* Sets the priority of a calendar component */
-static void
-set_priority (CalComponent *comp, const char *value)
-{
- int priority;
-
- /* An empty string is the same as 'None'. */
- if (!value[0] || !g_strcasecmp (value, _("Undefined")))
- priority = 0;
- else if (!g_strcasecmp (value, _("High")))
- priority = 3;
- else if (!g_strcasecmp (value, _("Normal")))
- priority = 5;
- else if (!g_strcasecmp (value, _("Low")))
- priority = 7;
- else {
- show_priority_warning ();
- return;
- }
-
- cal_component_set_priority (comp, &priority);
-}
-
-/* Sets the summary of a calendar component */
-static void
-set_summary (CalComponent *comp, const char *value)
-{
- CalComponentText text;
-
- if (string_is_empty (value)) {
- cal_component_set_summary (comp, NULL);
- return;
- }
-
- text.value = value;
- text.altrep = NULL; /* FIXME: should we preserve the old ALTREP? */
-
- cal_component_set_summary (comp, &text);
-}
-
-/* FIXME: We won't need this eventually, since the user won't be allowed to
- * edit the field.
- */
-static void
-show_transparency_warning (void)
-{
- GtkWidget *dialog;
-
- dialog = gnome_message_box_new (_("The transparency must be 'Transparent', 'Opaque', or 'None'."),
- GNOME_MESSAGE_BOX_ERROR,
- GNOME_STOCK_BUTTON_OK, NULL);
- gtk_widget_show (dialog);
-}
-
-/* Sets the URI of a calendar component */
-static void
-set_transparency (CalComponent *comp, const char *value)
-{
- CalComponentTransparency transp;
-
- g_print ("In calendar model set_transparency: %s\n", value);
-
- /* An empty string is the same as 'None'. */
- if (!value[0] || !g_strcasecmp (value, _("None")))
- transp = CAL_COMPONENT_TRANSP_NONE;
- else if (!g_strcasecmp (value, _("Transparent")))
- transp = CAL_COMPONENT_TRANSP_TRANSPARENT;
- else if (!g_strcasecmp (value, _("Opaque"))) {
- transp = CAL_COMPONENT_TRANSP_OPAQUE;
- } else {
- show_transparency_warning ();
- return;
- }
-
- g_print (" transp: %i\n", transp);
-
- cal_component_set_transparency (comp, transp);
-}
-
-/* Sets the URI of a calendar component */
-static void
-set_url (CalComponent *comp, const char *value)
-{
- g_print ("In calendar model set_url\n");
-
- if (string_is_empty (value)) {
- cal_component_set_url (comp, NULL);
- return;
- }
-
- cal_component_set_url (comp, value);
-}
-
-/* Called to set the checkbutton field which indicates whether a task is
- complete. */
-static void
-set_complete (CalComponent *comp, const void *value)
-{
- gint state = GPOINTER_TO_INT (value);
-
- if (state) {
- ensure_task_complete (comp, -1);
- } else {
- ensure_task_not_complete (comp);
- }
-}
-
-/* Sets the status of a calendar component. */
-static void
-set_status (CalComponent *comp, const char *value)
-{
- icalproperty_status status;
- int percent;
-
- g_print ("In calendar model set_status: %s\n", value);
-
- /* An empty string is the same as 'None'. */
- if (!value[0] || !g_strcasecmp (value, _("None")))
- status = ICAL_STATUS_NONE;
- else if (!g_strcasecmp (value, _("Not Started")))
- status = ICAL_STATUS_NEEDSACTION;
- else if (!g_strcasecmp (value, _("In Progress")))
- status = ICAL_STATUS_INPROCESS;
- else if (!g_strcasecmp (value, _("Completed")))
- status = ICAL_STATUS_COMPLETED;
- else if (!g_strcasecmp (value, _("Cancelled")))
- status = ICAL_STATUS_CANCELLED;
- else {
- g_warning ("Invalid status: %s\n", value);
- return;
- }
-
- cal_component_set_status (comp, status);
-
- if (status == ICAL_STATUS_NEEDSACTION) {
- percent = 0;
- cal_component_set_percent (comp, &percent);
- cal_component_set_completed (comp, NULL);
- } else if (status == ICAL_STATUS_COMPLETED) {
- ensure_task_complete (comp, -1);
- }
-}
-
-/* set_value_at handler for the calendar table model */
-static void
-calendar_model_set_value_at (ETableModel *etm, int col, int row, const void *value)
-{
- CalendarModel *model;
- CalendarModelPrivate *priv;
- CalComponent *comp;
-
- model = CALENDAR_MODEL (etm);
- priv = model->priv;
-
- g_return_if_fail (col >= 0 && col < CAL_COMPONENT_FIELD_NUM_FIELDS);
- g_return_if_fail (row >= 0 && row < priv->objects->len);
-
- comp = g_array_index (priv->objects, CalComponent *, row);
- g_assert (comp != NULL);
-
-#if 1
- g_print ("In calendar_model_set_value_at: %i\n", col);
-#endif
-
- switch (col) {
- case CAL_COMPONENT_FIELD_CATEGORIES:
- set_categories (comp, value);
- if (calendar_model_collect_categories (model, comp)) {
- gtk_signal_emit (GTK_OBJECT (model),
- calendar_model_signals [CATEGORIES_CHANGED]);
- }
- break;
-
- case CAL_COMPONENT_FIELD_CLASSIFICATION:
- set_classification (comp, value);
- break;
-
- case CAL_COMPONENT_FIELD_COMPLETED:
- set_completed (model, comp, value);
- break;
-
- case CAL_COMPONENT_FIELD_DTEND:
- /* FIXME: Need to reset dtstart if dtend happens before it */
- set_datetime (model, comp, value, cal_component_set_dtend);
- break;
-
- case CAL_COMPONENT_FIELD_DTSTART:
- /* FIXME: Need to reset dtend if dtstart happens after it */
- set_datetime (model, comp, value, cal_component_set_dtstart);
- break;
-
- case CAL_COMPONENT_FIELD_DUE:
- set_datetime (model, comp, value, cal_component_set_due);
- break;
-
- case CAL_COMPONENT_FIELD_GEO:
- set_geo (comp, value);
- break;
-
- case CAL_COMPONENT_FIELD_PERCENT:
- set_percent (comp, value);
- break;
-
- case CAL_COMPONENT_FIELD_PRIORITY:
- set_priority (comp, value);
- break;
-
- case CAL_COMPONENT_FIELD_SUMMARY:
- set_summary (comp, value);
- break;
-
- case CAL_COMPONENT_FIELD_TRANSPARENCY:
- set_transparency (comp, value);
- break;
-
- case CAL_COMPONENT_FIELD_URL:
- set_url (comp, value);
- break;
-
- case CAL_COMPONENT_FIELD_COMPLETE:
- set_complete (comp, value);
- break;
-
- case CAL_COMPONENT_FIELD_STATUS:
- set_status (comp, value);
- break;
-
- default:
- g_message ("calendar_model_set_value_at(): Requested invalid column %d", col);
- break;
- }
-
- if (!cal_client_update_object (priv->client, comp))
- g_message ("calendar_model_set_value_at(): Could not update the object!");
-}
-
-/* is_cell_editable handler for the calendar table model */
-static gboolean
-calendar_model_is_cell_editable (ETableModel *etm, int col, int row)
-{
- CalendarModel *model;
- CalendarModelPrivate *priv;
-
- model = CALENDAR_MODEL (etm);
- priv = model->priv;
-
- g_return_val_if_fail (col >= 0 && col < CAL_COMPONENT_FIELD_NUM_FIELDS, FALSE);
-
- /* FIXME: We can't check this as 'click-to-add' passes row 0. */
- /*g_return_val_if_fail (row >= 0 && row < priv->objects->len, FALSE);*/
-
- switch (col) {
- case CAL_COMPONENT_FIELD_CATEGORIES:
- case CAL_COMPONENT_FIELD_CLASSIFICATION:
- case CAL_COMPONENT_FIELD_COMPLETED:
- case CAL_COMPONENT_FIELD_DTEND:
- case CAL_COMPONENT_FIELD_DTSTART:
- case CAL_COMPONENT_FIELD_DUE:
- case CAL_COMPONENT_FIELD_GEO:
- case CAL_COMPONENT_FIELD_PERCENT:
- case CAL_COMPONENT_FIELD_PRIORITY:
- case CAL_COMPONENT_FIELD_SUMMARY:
- case CAL_COMPONENT_FIELD_TRANSPARENCY:
- case CAL_COMPONENT_FIELD_URL:
- case CAL_COMPONENT_FIELD_COMPLETE:
- case CAL_COMPONENT_FIELD_STATUS:
- return TRUE;
-
- default:
- return FALSE;
- }
-}
-
-/* append_row handler for the calendar model */
-static void
-calendar_model_append_row (ETableModel *etm, ETableModel *source, gint row)
-{
- CalendarModel *model;
- CalendarModelPrivate *priv;
- CalComponent *comp;
-
- model = CALENDAR_MODEL (etm);
- priv = model->priv;
-
- /* FIXME: This should support other types of components, but for now it
- * is only used for the task list.
- */
- comp = cal_component_new ();
- cal_component_set_new_vtype (comp, priv->new_comp_vtype);
-
- set_categories (comp, e_table_model_value_at(source, CAL_COMPONENT_FIELD_CATEGORIES, row));
- set_classification (comp, e_table_model_value_at(source, CAL_COMPONENT_FIELD_CLASSIFICATION, row));
- set_completed (model, comp, e_table_model_value_at(source, CAL_COMPONENT_FIELD_COMPLETED, row));
- /* FIXME: Need to reset dtstart if dtend happens before it */
- set_datetime (model, comp, e_table_model_value_at(source, CAL_COMPONENT_FIELD_DTEND, row), cal_component_set_dtend);
- /* FIXME: Need to reset dtend if dtstart happens after it */
- set_datetime (model, comp, e_table_model_value_at(source, CAL_COMPONENT_FIELD_DTSTART, row), cal_component_set_dtstart);
- set_datetime (model, comp, e_table_model_value_at(source, CAL_COMPONENT_FIELD_DUE, row), cal_component_set_due);
- set_geo (comp, e_table_model_value_at(source, CAL_COMPONENT_FIELD_GEO, row));
- set_percent (comp, e_table_model_value_at(source, CAL_COMPONENT_FIELD_PERCENT, row));
- set_priority (comp, e_table_model_value_at(source, CAL_COMPONENT_FIELD_PRIORITY, row));
- set_summary (comp, e_table_model_value_at(source, CAL_COMPONENT_FIELD_SUMMARY, row));
- set_transparency (comp, e_table_model_value_at(source, CAL_COMPONENT_FIELD_TRANSPARENCY, row));
- set_url (comp, e_table_model_value_at(source, CAL_COMPONENT_FIELD_URL, row));
- set_complete (comp, e_table_model_value_at(source, CAL_COMPONENT_FIELD_COMPLETE, row));
- set_status (comp, e_table_model_value_at(source, CAL_COMPONENT_FIELD_STATUS, row));
-
- if (!cal_client_update_object (priv->client, comp)) {
- /* FIXME: Show error dialog. */
- g_message ("calendar_model_append_row(): Could not add new object!");
- }
-}
-
-/* Duplicates a string value */
-static char *
-dup_string (const char *value)
-{
- return g_strdup (value);
-}
-
-/* duplicate_value handler for the calendar table model */
-static void *
-calendar_model_duplicate_value (ETableModel *etm, int col, const void *value)
-{
- g_return_val_if_fail (col >= 0 && col < CAL_COMPONENT_FIELD_NUM_FIELDS, NULL);
-
- /* They are almost all dup_string()s for now, but we'll have real fields
- * later.
- */
-
- switch (col) {
- case CAL_COMPONENT_FIELD_CATEGORIES:
- case CAL_COMPONENT_FIELD_CLASSIFICATION:
- case CAL_COMPONENT_FIELD_COMPLETED:
- case CAL_COMPONENT_FIELD_DTEND:
- case CAL_COMPONENT_FIELD_DTSTART:
- case CAL_COMPONENT_FIELD_DUE:
- case CAL_COMPONENT_FIELD_GEO:
- case CAL_COMPONENT_FIELD_PERCENT:
- case CAL_COMPONENT_FIELD_PRIORITY:
- case CAL_COMPONENT_FIELD_SUMMARY:
- case CAL_COMPONENT_FIELD_TRANSPARENCY:
- case CAL_COMPONENT_FIELD_URL:
- case CAL_COMPONENT_FIELD_STATUS:
- return dup_string (value);
-
- case CAL_COMPONENT_FIELD_HAS_ALARMS:
- case CAL_COMPONENT_FIELD_ICON:
- case CAL_COMPONENT_FIELD_COMPLETE:
- case CAL_COMPONENT_FIELD_RECURRING:
- case CAL_COMPONENT_FIELD_OVERDUE:
- case CAL_COMPONENT_FIELD_COLOR:
- return (void *) value;
-
- default:
- g_message ("calendar_model_duplicate_value(): Requested invalid column %d", col);
- return NULL;
- }
-}
-
-/* free_value handler for the calendar table model */
-static void
-calendar_model_free_value (ETableModel *etm, int col, void *value)
-{
- g_return_if_fail (col >= 0 && col < CAL_COMPONENT_FIELD_NUM_FIELDS);
-
- switch (col) {
- case CAL_COMPONENT_FIELD_CATEGORIES:
- g_free (value);
-
- case CAL_COMPONENT_FIELD_CLASSIFICATION:
- return;
-
- case CAL_COMPONENT_FIELD_COMPLETED:
- case CAL_COMPONENT_FIELD_DTEND:
- case CAL_COMPONENT_FIELD_DTSTART:
- case CAL_COMPONENT_FIELD_DUE:
- case CAL_COMPONENT_FIELD_GEO:
- case CAL_COMPONENT_FIELD_PERCENT:
- case CAL_COMPONENT_FIELD_PRIORITY:
- case CAL_COMPONENT_FIELD_SUMMARY:
- case CAL_COMPONENT_FIELD_STATUS:
- g_free (value);
-
- case CAL_COMPONENT_FIELD_TRANSPARENCY:
- return;
-
- case CAL_COMPONENT_FIELD_URL:
- g_free (value);
-
- case CAL_COMPONENT_FIELD_HAS_ALARMS:
- case CAL_COMPONENT_FIELD_ICON:
- case CAL_COMPONENT_FIELD_COMPLETE:
- case CAL_COMPONENT_FIELD_RECURRING:
- case CAL_COMPONENT_FIELD_OVERDUE:
- case CAL_COMPONENT_FIELD_COLOR:
- return;
-
- default:
- g_message ("calendar_model_free_value(): Requested invalid column %d", col);
- return;
- }
-}
-
-/* Initializes a string value */
-static char *
-init_string (void)
-{
- return g_strdup ("");
-}
-
-/* initialize_value handler for the calendar table model */
-static void *
-calendar_model_initialize_value (ETableModel *etm, int col)
-{
- CalendarModel *model;
-
- g_return_val_if_fail (col >= 0 && col < CAL_COMPONENT_FIELD_NUM_FIELDS, NULL);
-
- model = CALENDAR_MODEL (etm);
-
- switch (col) {
- case CAL_COMPONENT_FIELD_CATEGORIES:
- return g_strdup (model->priv->default_category ? model->priv->default_category : "");
-
- case CAL_COMPONENT_FIELD_CLASSIFICATION:
- case CAL_COMPONENT_FIELD_COMPLETED:
- case CAL_COMPONENT_FIELD_DTEND:
- case CAL_COMPONENT_FIELD_DTSTART:
- case CAL_COMPONENT_FIELD_DUE:
- case CAL_COMPONENT_FIELD_GEO:
- case CAL_COMPONENT_FIELD_PERCENT:
- case CAL_COMPONENT_FIELD_PRIORITY:
- case CAL_COMPONENT_FIELD_SUMMARY:
- case CAL_COMPONENT_FIELD_TRANSPARENCY:
- case CAL_COMPONENT_FIELD_URL:
- case CAL_COMPONENT_FIELD_STATUS:
- return init_string ();
-
- case CAL_COMPONENT_FIELD_HAS_ALARMS:
- case CAL_COMPONENT_FIELD_ICON:
- case CAL_COMPONENT_FIELD_COMPLETE:
- case CAL_COMPONENT_FIELD_RECURRING:
- case CAL_COMPONENT_FIELD_OVERDUE:
- case CAL_COMPONENT_FIELD_COLOR:
- return NULL;
-
- default:
- g_message ("calendar_model_initialize_value(): Requested invalid column %d", col);
- return NULL;
- }
-}
-
-/* value_is_empty handler for the calendar model. This should return TRUE
- unless a significant value has been set. The 'click-to-add' feature
- checks all fields to see if any are not empty and if so it adds a new
- row, so we only want to return FALSE if we have a useful object. */
-static gboolean
-calendar_model_value_is_empty (ETableModel *etm, int col, const void *value)
-{
- g_return_val_if_fail (col >= 0 && col < CAL_COMPONENT_FIELD_NUM_FIELDS, TRUE);
-
- switch (col) {
- case CAL_COMPONENT_FIELD_CATEGORIES:
- case CAL_COMPONENT_FIELD_CLASSIFICATION: /* actually goes here, not by itself */
- case CAL_COMPONENT_FIELD_COMPLETED:
- case CAL_COMPONENT_FIELD_DTEND:
- case CAL_COMPONENT_FIELD_DTSTART:
- case CAL_COMPONENT_FIELD_DUE:
- case CAL_COMPONENT_FIELD_GEO:
- case CAL_COMPONENT_FIELD_PERCENT:
- case CAL_COMPONENT_FIELD_PRIORITY:
- case CAL_COMPONENT_FIELD_SUMMARY:
- case CAL_COMPONENT_FIELD_TRANSPARENCY:
- case CAL_COMPONENT_FIELD_URL:
- case CAL_COMPONENT_FIELD_STATUS:
- return string_is_empty (value);
-
- case CAL_COMPONENT_FIELD_HAS_ALARMS:
- case CAL_COMPONENT_FIELD_ICON:
- case CAL_COMPONENT_FIELD_COMPLETE:
- case CAL_COMPONENT_FIELD_RECURRING:
- case CAL_COMPONENT_FIELD_OVERDUE:
- case CAL_COMPONENT_FIELD_COLOR:
- return TRUE;
-
- default:
- g_message ("calendar_model_value_is_empty(): Requested invalid column %d", col);
- return TRUE;
- }
-}
-
-static char *
-calendar_model_value_to_string (ETableModel *etm, int col, const void *value)
-{
- g_return_val_if_fail (col >= 0 && col < CAL_COMPONENT_FIELD_NUM_FIELDS, NULL);
-
- switch (col) {
- case CAL_COMPONENT_FIELD_CATEGORIES:
- case CAL_COMPONENT_FIELD_CLASSIFICATION:
- case CAL_COMPONENT_FIELD_COMPLETED:
- case CAL_COMPONENT_FIELD_DTEND:
- case CAL_COMPONENT_FIELD_DTSTART:
- case CAL_COMPONENT_FIELD_DUE:
- case CAL_COMPONENT_FIELD_GEO:
- case CAL_COMPONENT_FIELD_PERCENT:
- case CAL_COMPONENT_FIELD_PRIORITY:
- case CAL_COMPONENT_FIELD_SUMMARY:
- case CAL_COMPONENT_FIELD_TRANSPARENCY:
- case CAL_COMPONENT_FIELD_URL:
- case CAL_COMPONENT_FIELD_STATUS:
- return e_utf8_from_locale_string (value);
-
- case CAL_COMPONENT_FIELD_ICON:
- if ((int)value == 0)
- return e_utf8_from_locale_string (_("Normal"));
- else if ((int)value == 1)
- return e_utf8_from_locale_string (_("Recurring"));
- else
- return e_utf8_from_locale_string (_("Assigned"));
-
- case CAL_COMPONENT_FIELD_HAS_ALARMS:
- case CAL_COMPONENT_FIELD_COMPLETE:
- case CAL_COMPONENT_FIELD_RECURRING:
- case CAL_COMPONENT_FIELD_OVERDUE:
- return e_utf8_from_locale_string (value ? _("Yes") : _("No"));
-
- case CAL_COMPONENT_FIELD_COLOR:
- return NULL;
-
- default:
- g_message ("calendar_model_value_as_string(): Requested invalid column %d", col);
- return NULL;
- }
-}
-
-
-
-/**
- * calendar_model_new:
- *
- * Creates a new calendar model. It must be told about the calendar client
- * interface object it will monitor with calendar_model_set_cal_client().
- *
- * Return value: A newly-created calendar model.
- **/
-CalendarModel *
-calendar_model_new (void)
-{
- return CALENDAR_MODEL (gtk_type_new (TYPE_CALENDAR_MODEL));
-}
-
-
-/* Callback used when a calendar is opened into the server */
-static void
-cal_opened_cb (CalClient *client, CalClientOpenStatus status, gpointer data)
-{
- CalendarModel *model;
-
- model = CALENDAR_MODEL (data);
-
- e_table_model_pre_change (E_TABLE_MODEL (model));
-
- if (status == CAL_CLIENT_OPEN_SUCCESS) {
- load_objects (model);
- calendar_model_collect_all_categories (model);
- }
-
- e_table_model_changed (E_TABLE_MODEL (model));
-}
-
-
-/* Removes an object from the model and updates all the indices that follow.
- * Returns the index of the object that was removed, or -1 if no object with
- * such UID was found.
- */
-static int
-remove_object (CalendarModel *model, const char *uid)
-{
- CalendarModelPrivate *priv;
- int *idx;
- CalComponent *orig_comp;
- int i;
- int n;
-
- priv = model->priv;
-
- /* Find the index of the object to be removed */
-
- idx = g_hash_table_lookup (priv->uid_index_hash, uid);
- if (!idx)
- return -1;
-
- orig_comp = g_array_index (priv->objects, CalComponent *, *idx);
- g_assert (orig_comp != NULL);
-
- /* Decrease the indices of all the objects that follow in the array */
-
- for (i = *idx + 1; i < priv->objects->len; i++) {
- CalComponent *comp;
- int *comp_idx;
- const char *comp_uid;
-
- comp = g_array_index (priv->objects, CalComponent *, i);
- g_assert (comp != NULL);
-
- cal_component_get_uid (comp, &comp_uid);
-
- comp_idx = g_hash_table_lookup (priv->uid_index_hash, comp_uid);
- g_assert (comp_idx != NULL);
-
- (*comp_idx)--;
- g_assert (*comp_idx >= 0);
- }
-
- /* Remove this object from the array and hash */
-
- g_hash_table_remove (priv->uid_index_hash, uid);
- g_array_remove_index (priv->objects, *idx);
-
- gtk_object_unref (GTK_OBJECT (orig_comp));
-
- n = *idx;
- g_free (idx);
-
- return n;
-}
-
-/* Returns whether a component's type matches the types we support */
-static gboolean
-matches_type (CalObjType type, CalComponentVType vtype)
-{
- return ((vtype == CAL_COMPONENT_EVENT && (type & CALOBJ_TYPE_EVENT))
- || (vtype == CAL_COMPONENT_TODO && (type & CALOBJ_TYPE_TODO))
- || (vtype == CAL_COMPONENT_JOURNAL && (type & CALOBJ_TYPE_JOURNAL)));
-}
-
-/* Callback used when an object is updated in the server */
-static void
-obj_updated_cb (CalClient *client, const char *uid, gpointer data)
-{
- CalendarModel *model;
- CalendarModelPrivate *priv;
- int orig_idx;
- CalComponent *new_comp;
- CalComponentVType new_comp_vtype;
- const char *new_comp_uid;
- int *new_idx;
- CalClientGetStatus status;
-
- g_print ("In calendar model obj_updated_cb\n");
-
- model = CALENDAR_MODEL (data);
- priv = model->priv;
-
- orig_idx = remove_object (model, uid);
-
- status = cal_client_get_object (priv->client, uid, &new_comp);
-
- switch (status) {
- case CAL_CLIENT_GET_SUCCESS:
- /* Check if we are interested in this type of object */
-
- new_comp_vtype = cal_component_get_vtype (new_comp);
- if (!matches_type (priv->type, new_comp_vtype)) {
- gtk_object_unref (GTK_OBJECT (new_comp));
- break;
- }
-
- /* Insert the object into the model */
-
- cal_component_get_uid (new_comp, &new_comp_uid);
-
- if (orig_idx == -1) {
- /* The object not in the model originally, so we just append it */
-
- g_array_append_val (priv->objects, new_comp);
-
- new_idx = g_new (int, 1);
- *new_idx = priv->objects->len - 1;
-
- g_hash_table_insert (priv->uid_index_hash, (char *) new_comp_uid, new_idx);
- e_table_model_row_inserted (E_TABLE_MODEL (model), *new_idx);
- } else {
- int i;
-
- /* Insert the new version of the object in its old position */
-
- g_array_insert_val (priv->objects, orig_idx, new_comp);
-
- new_idx = g_new (int, 1);
- *new_idx = orig_idx;
- g_hash_table_insert (priv->uid_index_hash, (char *) new_comp_uid, new_idx);
-
- /* Increase the indices of all subsequent objects */
-
- for (i = orig_idx + 1; i < priv->objects->len; i++) {
- CalComponent *comp;
- int *comp_idx;
- const char *comp_uid;
-
- comp = g_array_index (priv->objects, CalComponent *, i);
- g_assert (comp != NULL);
-
- cal_component_get_uid (comp, &comp_uid);
-
- comp_idx = g_hash_table_lookup (priv->uid_index_hash, comp_uid);
- g_assert (comp_idx != NULL);
-
- (*comp_idx)++;
- }
-
- e_table_model_row_changed (E_TABLE_MODEL (model), *new_idx);
- }
-
- /* See if we need to add any categories. Note that old
- categories won't be removed, but I don't think that matters
- too much here. */
- if (calendar_model_collect_categories (model, new_comp)) {
- gtk_signal_emit (GTK_OBJECT (model),
- calendar_model_signals [CATEGORIES_CHANGED]);
- }
-
- break;
-
- case CAL_CLIENT_GET_NOT_FOUND:
- /* Nothing; the object may have been removed from the server. We just
- * notify that the old object was deleted.
- */
- if (orig_idx != -1)
- e_table_model_row_deleted (E_TABLE_MODEL (model), orig_idx);
-
- break;
-
- case CAL_CLIENT_GET_SYNTAX_ERROR:
- g_message ("obj_updated_cb(): Syntax error when getting object `%s'", uid);
-
- /* Same notification as above */
- if (orig_idx != -1)
- e_table_model_row_deleted (E_TABLE_MODEL (model), orig_idx);
-
- break;
-
- default:
- g_assert_not_reached ();
- }
-
- g_print ("Out calendar model obj_updated_cb\n");
-}
-
-/* Callback used when an object is removed in the server */
-static void
-obj_removed_cb (CalClient *client, const char *uid, gpointer data)
-{
- CalendarModel *model;
- int idx;
-
- model = CALENDAR_MODEL (data);
-
- idx = remove_object (model, uid);
-
- if (idx != -1)
- e_table_model_row_deleted (E_TABLE_MODEL (model), idx);
-}
-
-/* Loads the required objects from the calendar client */
-static void
-load_objects (CalendarModel *model)
-{
- CalendarModelPrivate *priv;
- GList *uids;
- GList *l;
-
- priv = model->priv;
-
- g_assert (cal_client_get_load_state (priv->client) == CAL_CLIENT_LOAD_LOADED);
-
- uids = cal_client_get_uids (priv->client, priv->type);
-
- for (l = uids; l; l = l->next) {
- char *uid;
- CalComponent *comp;
- const char *comp_uid;
- CalClientGetStatus status;
- CalComponentVType comp_vtype;
- int *idx;
-
- uid = l->data;
- status = cal_client_get_object (priv->client, uid, &comp);
-
- switch (status) {
- case CAL_CLIENT_GET_SUCCESS:
- break;
-
- case CAL_CLIENT_GET_NOT_FOUND:
- /* Nothing; the object may have been removed from the server */
- continue;
-
- case CAL_CLIENT_GET_SYNTAX_ERROR:
- g_message ("load_objects(): Syntax error when getting object `%s'", uid);
- continue;
-
- default:
- g_assert_not_reached ();
- }
-
- /* Check if we are interested in this type of object */
-
- comp_vtype = cal_component_get_vtype (comp);
- if (!matches_type (priv->type, comp_vtype)) {
- gtk_object_unref (GTK_OBJECT (comp));
- continue;
- }
-
- /* Insert the object into the model */
-
- idx = g_new (int, 1);
-
- g_array_append_val (priv->objects, comp);
- *idx = priv->objects->len - 1;
-
- cal_component_get_uid (comp, &comp_uid);
- g_hash_table_insert (priv->uid_index_hash, (char *) comp_uid, idx);
- }
-
- cal_obj_uid_list_free (uids);
-}
-
-/**
- * calendar_model_get_cal_client:
- * @model: A calendar model.
- *
- * Queries the calendar client interface object that a calendar model is using.
- *
- * Return value: A calendar client interface object.
- **/
-CalClient *
-calendar_model_get_cal_client (CalendarModel *model)
-{
- CalendarModelPrivate *priv;
-
- g_return_val_if_fail (model != NULL, NULL);
- g_return_val_if_fail (IS_CALENDAR_MODEL (model), NULL);
-
- priv = model->priv;
-
- return priv->client;
-}
-
-
-/**
- * calendar_model_set_cal_client:
- * @model: A calendar model.
- * @client: A calendar client interface object.
- * @type: Type of objects to present.
- *
- * Sets the calendar client interface object that a calendar model will monitor.
- * It also sets the types of objects this model will present to an #ETable.
- **/
-void
-calendar_model_set_cal_client (CalendarModel *model, CalClient *client, CalObjType type)
-{
- CalendarModelPrivate *priv;
-
- g_return_if_fail (model != NULL);
- g_return_if_fail (IS_CALENDAR_MODEL (model));
-
- if (client)
- g_return_if_fail (IS_CAL_CLIENT (client));
-
- priv = model->priv;
-
- if (priv->client == client && priv->type == type)
- return;
-
- e_table_model_pre_change (E_TABLE_MODEL(model));
-
- if (client)
- gtk_object_ref (GTK_OBJECT (client));
-
- if (priv->client) {
- gtk_signal_disconnect_by_data (GTK_OBJECT (priv->client), model);
- gtk_object_unref (GTK_OBJECT (priv->client));
- }
-
- free_objects (model);
-
- priv->client = client;
- priv->type = type;
-
- if (priv->client) {
- gtk_signal_connect (GTK_OBJECT (priv->client), "obj_updated",
- GTK_SIGNAL_FUNC (obj_updated_cb), model);
- gtk_signal_connect (GTK_OBJECT (priv->client), "obj_removed",
- GTK_SIGNAL_FUNC (obj_removed_cb), model);
-
- if (cal_client_get_load_state (priv->client) != CAL_CLIENT_LOAD_LOADED)
- gtk_signal_connect (GTK_OBJECT (priv->client), "cal_opened",
- GTK_SIGNAL_FUNC (cal_opened_cb), model);
- else
- load_objects (model);
- }
-
- e_table_model_changed (E_TABLE_MODEL (model));
-}
-
-
-/**
- * calendar_model_set_new_comp_vtype:
- * @model: A calendar model.
- * @vtype: Type of calendar components to create.
- *
- * Sets the type of calendar components that will be created by a calendar table
- * model when the click-to-add functionality of the table is used.
- **/
-void
-calendar_model_set_new_comp_vtype (CalendarModel *model, CalComponentVType vtype)
-{
- CalendarModelPrivate *priv;
-
- g_return_if_fail (model != NULL);
- g_return_if_fail (IS_CALENDAR_MODEL (model));
- g_return_if_fail (vtype != CAL_COMPONENT_NO_TYPE);
-
- priv = model->priv;
- priv->new_comp_vtype = vtype;
-}
-
-/**
- * calendar_model_get_new_comp_vtype:
- * @model: A calendar model.
- *
- * Queries the type of calendar components that are created by a calendar table
- * model when using the click-to-add functionality in a table.
- *
- * Return value: Type of components that are created.
- **/
-CalComponentVType
-calendar_model_get_new_comp_vtype (CalendarModel *model)
-{
- CalendarModelPrivate *priv;
-
- g_return_val_if_fail (model != NULL, CAL_COMPONENT_NO_TYPE);
- g_return_val_if_fail (IS_CALENDAR_MODEL (model), CAL_COMPONENT_NO_TYPE);
-
- priv = model->priv;
- return priv->new_comp_vtype;
-}
-
-
-void
-calendar_model_mark_task_complete (CalendarModel *model,
- gint row)
-{
- CalendarModelPrivate *priv;
- CalComponent *comp;
-
- g_return_if_fail (model != NULL);
- g_return_if_fail (IS_CALENDAR_MODEL (model));
-
- priv = model->priv;
-
- g_return_if_fail (row >= 0 && row < priv->objects->len);
-
- comp = g_array_index (priv->objects, CalComponent *, row);
- g_assert (comp != NULL);
-
- ensure_task_complete (comp, -1);
-
- if (!cal_client_update_object (priv->client, comp))
- g_message ("calendar_model_mark_task_complete(): Could not update the object!");
-}
-
-
-/**
- * calendar_model_get_component:
- * @model: A calendar model.
- * @row: Row number of sought calendar component.
- *
- * Queries a calendar component from a calendar model based on its row number.
- *
- * Return value: The sought calendar component.
- **/
-CalComponent *
-calendar_model_get_component (CalendarModel *model,
- gint row)
-{
- CalendarModelPrivate *priv;
-
- g_return_val_if_fail (model != NULL, NULL);
- g_return_val_if_fail (IS_CALENDAR_MODEL (model), NULL);
-
- priv = model->priv;
-
- g_return_val_if_fail (row >= 0 && row < priv->objects->len, NULL);
-
- return g_array_index (priv->objects, CalComponent *, row);
-}
-
-
-/* This makes sure a task is marked as complete.
- It makes sure the "Date Completed" property is set. If the completed_date
- is not -1, then that is used, otherwise if the "Date Completed" property
- is not already set it is set to the current time.
- It makes sure the percent is set to 100, and that the status is "Completed".
- Note that this doesn't update the component on the client. */
-static void
-ensure_task_complete (CalComponent *comp,
- time_t completed_date)
-{
- struct icaltimetype *old_completed = NULL;
- struct icaltimetype new_completed;
- int *old_percent, new_percent;
- icalproperty_status status;
- gboolean set_completed = TRUE;
-
- /* Date Completed. */
- if (completed_date == -1) {
- cal_component_get_completed (comp, &old_completed);
-
- if (old_completed) {
- cal_component_free_icaltimetype (old_completed);
- set_completed = FALSE;
- } else {
- completed_date = time (NULL);
- }
- }
-
- if (set_completed) {
- new_completed = icaltime_from_timet (completed_date, FALSE);
- cal_component_set_completed (comp, &new_completed);
- }
-
- /* Percent. */
- cal_component_get_percent (comp, &old_percent);
- if (!old_percent || *old_percent != 100) {
- new_percent = 100;
- cal_component_set_percent (comp, &new_percent);
- }
- if (old_percent)
- cal_component_free_percent (old_percent);
-
- /* Status. */
- cal_component_get_status (comp, &status);
- if (status != ICAL_STATUS_COMPLETED) {
- cal_component_set_status (comp, ICAL_STATUS_COMPLETED);
- }
-}
-
-
-/* This makes sure a task is marked as incomplete. It clears the
- "Date Completed" property. If the percent is set to 100 it removes it,
- and if the status is "Completed" it sets it to "Needs Action".
- Note that this doesn't update the component on the client. */
-static void
-ensure_task_not_complete (CalComponent *comp)
-{
- icalproperty_status old_status;
- int *old_percent;
-
- /* Date Completed. */
- cal_component_set_completed (comp, NULL);
-
- /* Percent. */
- cal_component_get_percent (comp, &old_percent);
- if (old_percent && *old_percent == 100)
- cal_component_set_percent (comp, NULL);
- if (old_percent)
- cal_component_free_percent (old_percent);
-
- /* Status. */
- cal_component_get_status (comp, &old_status);
- if (old_status == ICAL_STATUS_COMPLETED)
- cal_component_set_status (comp, ICAL_STATUS_NEEDSACTION);
-}
-
-
-/* Whether we use 24 hour format to display the times. */
-gboolean
-calendar_model_get_use_24_hour_format (CalendarModel *model)
-{
- g_return_val_if_fail (IS_CALENDAR_MODEL (model), TRUE);
-
- return model->priv->use_24_hour_format;
-}
-
-
-void
-calendar_model_set_use_24_hour_format (CalendarModel *model,
- gboolean use_24_hour_format)
-{
- g_return_if_fail (IS_CALENDAR_MODEL (model));
-
- if (model->priv->use_24_hour_format != use_24_hour_format) {
- model->priv->use_24_hour_format = use_24_hour_format;
- /* Get the views to redraw themselves. */
- e_table_model_changed (E_TABLE_MODEL (model));
- }
-}
-
-
-void
-calendar_model_set_default_category (CalendarModel *model,
- gchar *default_category)
-{
- g_return_if_fail (IS_CALENDAR_MODEL (model));
-
- g_free (model->priv->default_category);
- model->priv->default_category = g_strdup (default_category);
-}
-
-
-static void
-calendar_model_collect_all_categories (CalendarModel *model)
-{
- CalendarModelPrivate *priv;
- CalComponent *comp;
- int i;
-
- priv = model->priv;
-
- /* Destroy the current tree and start from scratch. */
- g_tree_traverse (priv->categories, (GTraverseFunc) g_free,
- G_PRE_ORDER, NULL);
- g_tree_destroy (priv->categories);
-
- priv->categories = g_tree_new ((GCompareFunc)strcmp);
-
- for (i = 0; i < priv->objects->len; i++) {
- comp = g_array_index (priv->objects, CalComponent *, i);
- calendar_model_collect_categories (model, comp);
- }
-
- gtk_signal_emit (GTK_OBJECT (model),
- calendar_model_signals [CATEGORIES_CHANGED]);
-}
-
-
-static gboolean
-calendar_model_collect_categories (CalendarModel *model,
- CalComponent *comp)
-{
- CalendarModelPrivate *priv;
- GSList *categories_list, *elem;
- gboolean changed = FALSE;
-
- priv = model->priv;
-
- cal_component_get_categories_list (comp, &categories_list);
-
- for (elem = categories_list; elem; elem = elem->next) {
- if (!g_tree_lookup (priv->categories, elem->data)) {
- /* We store a '1' as the data, just so we can use
- g_tree_lookup() on it. Note that we don't free
- the string since it is now part of the tree. */
- g_tree_insert (priv->categories, elem->data,
- GINT_TO_POINTER (1));
- changed = TRUE;
- } else {
- g_free (elem->data);
- }
- }
-
- g_slist_free (categories_list);
-
- return changed;
-}
-
-
-GTree*
-calendar_model_get_categories (CalendarModel *model)
-{
- g_return_val_if_fail (IS_CALENDAR_MODEL (model), NULL);
-
- return model->priv->categories;
-}
diff --git a/calendar/gui/calendar-model.h b/calendar/gui/calendar-model.h
deleted file mode 100644
index 5ff2f41c38..0000000000
--- a/calendar/gui/calendar-model.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/* Evolution calendar - Data model for ETable
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Authors: Federico Mena-Quintero <federico@ximian.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 CALENDAR_MODEL_H
-#define CALENDAR_MODEL_H
-
-#include <libgnome/gnome-defs.h>
-#include <gal/e-table/e-table-model.h>
-#include <cal-client/cal-client.h>
-
-BEGIN_GNOME_DECLS
-
-
-
-#define TYPE_CALENDAR_MODEL (calendar_model_get_type ())
-#define CALENDAR_MODEL(obj) (GTK_CHECK_CAST ((obj), TYPE_CALENDAR_MODEL, CalendarModel))
-#define CALENDAR_MODEL_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), TYPE_CALENDAR_MODEL, \
- CalendarModelClass))
-#define IS_CALENDAR_MODEL(obj) (GTK_CHECK_TYPE ((obj), TYPE_CALENDAR_MODEL))
-#define IS_CALENDAR_MODEL_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), TYPE_CALENDAR_MODEL))
-
-typedef struct _CalendarModel CalendarModel;
-typedef struct _CalendarModelClass CalendarModelClass;
-
-typedef struct _CalendarModelPrivate CalendarModelPrivate;
-
-struct _CalendarModel {
- ETableModel model;
-
- /* Private data */
- CalendarModelPrivate *priv;
-};
-
-struct _CalendarModelClass {
- ETableModelClass parent_class;
-
- void (* categories_changed) (CalendarModel *model);
-};
-
-GtkType calendar_model_get_type (void);
-
-CalendarModel* calendar_model_new (void);
-
-CalClient* calendar_model_get_cal_client (CalendarModel *model);
-void calendar_model_set_cal_client (CalendarModel *model,
- CalClient *client,
- CalObjType type);
-
-void calendar_model_set_new_comp_vtype (CalendarModel *model,
- CalComponentVType vtype);
-CalComponentVType calendar_model_get_new_comp_vtype (CalendarModel *model);
-
-void calendar_model_mark_task_complete (CalendarModel *model,
- gint row);
-
-CalComponent* calendar_model_get_component (CalendarModel *model,
- gint row);
-
-/* Whether we use 24 hour format to display the times. */
-gboolean calendar_model_get_use_24_hour_format (CalendarModel *model);
-void calendar_model_set_use_24_hour_format (CalendarModel *model,
- gboolean use_24_hour_format);
-
-GTree* calendar_model_get_categories (CalendarModel *model);
-
-void calendar_model_set_default_category (CalendarModel *model,
- gchar *default_category);
-
-
-
-
-END_GNOME_DECLS
-
-#endif
diff --git a/calendar/gui/calendar-summary.c b/calendar/gui/calendar-summary.c
deleted file mode 100644
index fd7ff0fbf2..0000000000
--- a/calendar/gui/calendar-summary.c
+++ /dev/null
@@ -1,772 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* calendar-summary.c
- *
- * Authors: Iain Holmes <iain@ximian.com>
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, 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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <time.h>
-
-#include <bonobo/bonobo-persist-stream.h>
-#include <bonobo/bonobo-property-control.h>
-#include <bonobo/bonobo-stream-client.h>
-#include <liboaf/liboaf.h>
-
-#include <evolution-services/executive-summary-component.h>
-#include <evolution-services/executive-summary-html-view.h>
-
-#include <gnome-xml/parser.h>
-#include <gnome-xml/xmlmemory.h>
-
-#include <cal-util/cal-component.h>
-#include <cal-util/timeutil.h>
-#include "alarm-notify/alarm.h"
-#include "calendar-model.h"
-#include "calendar-summary.h"
-
-typedef struct {
- ExecutiveSummaryComponent *component;
- ExecutiveSummaryHtmlView *view;
- BonoboPropertyControl *property_control;
- CalClient *client;
-
- GtkWidget *show_appointments;
- GtkWidget *show_tasks;
-
- gboolean appointments;
- gboolean tasks;
-
- char *title;
- char *icon;
-
- guint32 idle;
-
- gpointer alarm;
-} CalSummary;
-
-enum {
- PROPERTY_TITLE,
- PROPERTY_ICON
-};
-
-extern gchar *evolution_dir;
-
-static int running_views = 0;
-static BonoboGenericFactory *factory;
-#define CALENDAR_SUMMARY_ID "OAFIID:GNOME_Evolution_Calendar_Summary_ComponentFactory"
-
-/* list_sort_merge, and list_sort are copied from GNOME-VFS.
- Author: Sven Oliver <sven.over@ob.kamp.net>
- Modified by Ettore Perazzoli <ettore@comm2000.it> to let the compare
- functions get an additional gpointer parameter.
-
- Included here as using gnome-vfs for 1 20 line function
- seems a bit of overkill.
-*/
-
-typedef gint (* CalSummaryListCompareFunc) (gconstpointer a,
- gconstpointer b,
- gpointer data);
-static GList *
-cal_list_sort_merge (GList *l1,
- GList *l2,
- CalSummaryListCompareFunc compare_func,
- gpointer data)
-{
- GList list, *l, *lprev;
-
- l = &list;
- lprev = NULL;
-
- while (l1 && l2) {
- if (compare_func (l1->data, l2->data, data) < 0) {
- l->next = l1;
- l = l->next;
- l->prev = lprev;
- lprev = l;
- l1 = l1->next;
- } else {
- l->next = l2;
- l = l->next;
- l->prev = lprev;
- lprev = l;
- l2 = l2->next;
- }
- }
-
- l->next = l1 ? l1 : l2;
- l->next->prev = l;
-
- return list.next;
-}
-
-static GList *
-cal_list_sort (GList *list,
- CalSummaryListCompareFunc compare_func,
- gpointer data)
-{
- GList *l1, *l2;
-
- if (!list)
- return NULL;
- if (!list->next)
- return list;
-
- l1 = list;
- l2 = list->next;
-
- while ((l2 = l2->next) != NULL) {
- if ((l2 = l2->next) == NULL)
- break;
- l1 = l1->next;
- }
-
- l2 = l1->next;
- l1->next = NULL;
-
- return cal_list_sort_merge (cal_list_sort (list, compare_func, data),
- cal_list_sort (l2, compare_func, data),
- compare_func, data);
-}
-
-static int
-sort_uids (gconstpointer a,
- gconstpointer b,
- gpointer user_data)
-{
- CalComponent *comp_a, *comp_b;
- CalSummary *summary = user_data;
- CalClientGetStatus status;
- CalComponentDateTime start_a, start_b;
-
- /* a after b then return > 0 */
-
- status = cal_client_get_object (summary->client, a, &comp_a);
- if (status != CAL_CLIENT_GET_SUCCESS)
- return -1;
-
- status = cal_client_get_object (summary->client, b, &comp_b);
- if (status != CAL_CLIENT_GET_SUCCESS)
- return 1;
-
- cal_component_get_dtstart (comp_a, &start_a);
- cal_component_get_dtstart (comp_b, &start_b);
-
- return icaltime_compare (*start_a.value, *start_b.value);
-}
-
-static gboolean
-generate_html_summary (gpointer data)
-{
- CalSummary *summary;
- time_t t, day_begin, day_end;
- struct tm *timeptr;
- GList *uids, *l;
- char *ret_html, *tmp, *datestr;
-
- summary = data;
-
- t = time (NULL);
- day_begin = time_day_begin (t);
- day_end = time_day_end (t);
-
- datestr = g_new (char, 256);
- timeptr = localtime (&t);
- strftime (datestr, 255, _("%A, %e %B %Y"), timeptr);
- ret_html = g_strdup_printf ("<b>%s</b>", datestr);
- g_free (datestr);
-
- if (summary->appointments) {
- tmp = ret_html;
- ret_html = g_strdup_printf ("%s<p align=\"center\">Appointments</p><hr><ul>",
- tmp);
- g_free (tmp);
-
- uids = cal_client_get_objects_in_range (summary->client,
- CALOBJ_TYPE_EVENT, day_begin,
- day_end);
- uids = cal_list_sort (uids, sort_uids, summary);
-
- for (l = uids; l; l = l->next){
- CalComponent *comp;
- CalComponentText text;
- CalClientGetStatus status;
- CalComponentDateTime start, end;
- struct icaltimetype *end_time;
- time_t start_t, end_t;
- struct tm *start_tm, *end_tm;
- char *start_str, *end_str;
- char *uid;
- char *tmp2;
-
- uid = l->data;
- status = cal_client_get_object (summary->client, uid, &comp);
- if (status != CAL_CLIENT_GET_SUCCESS)
- continue;
-
- cal_component_get_summary (comp, &text);
- cal_component_get_dtstart (comp, &start);
- cal_component_get_dtend (comp, &end);
-
- g_print ("text.value: %s\n", text.value);
- end_time = end.value;
-
- start_t = icaltime_as_timet (*start.value);
-
- start_str = g_new (char, 20);
- start_tm = localtime (&start_t);
- strftime (start_str, 19, _("%I:%M%p"), start_tm);
-
- if (end_time) {
- end_str = g_new (char, 20);
- end_t = icaltime_as_timet (*end_time);
- end_tm = localtime (&end_t);
- strftime (end_str, 19, _("%I:%M%p"), end_tm);
- } else {
- end_str = g_strdup ("...");
- }
-
- tmp2 = g_strdup_printf ("<li>%s:%s -> %s</li>", text.value, start_str, end_str);
- g_free (start_str);
- g_free (end_str);
-
- tmp = ret_html;
- ret_html = g_strconcat (ret_html, tmp2, NULL);
- g_free (tmp);
- g_free (tmp2);
- }
-
- cal_obj_uid_list_free (uids);
-
- tmp = ret_html;
- ret_html = g_strconcat (ret_html, "</ul>", NULL);
- g_free (tmp);
- }
-
- if (summary->tasks) {
- tmp = ret_html;
- ret_html = g_strconcat (ret_html,
- "<p align=\"center\">Tasks</p><hr><ul>",
- NULL);
- g_free (tmp);
-
- /* Generate a list of tasks */
- uids = cal_client_get_uids (summary->client, CALOBJ_TYPE_TODO);
- for (l = uids; l; l = l->next){
- CalComponent *comp;
- CalComponentText text;
- CalClientGetStatus status;
- struct icaltimetype *completed;
- char *uid;
- char *tmp2;
-
- uid = l->data;
- status = cal_client_get_object (summary->client, uid, &comp);
- if (status != CAL_CLIENT_GET_SUCCESS)
- continue;
-
- cal_component_get_summary (comp, &text);
- cal_component_get_completed (comp, &completed);
-
- if (completed == NULL) {
- tmp2 = g_strdup_printf ("<li>%s</li>", text.value);
- } else {
- tmp2 = g_strdup_printf ("<li><strike>%s</strike></li>",
- text.value);
- cal_component_free_icaltimetype (completed);
- }
-
- tmp = ret_html;
- ret_html = g_strconcat (ret_html, tmp2, NULL);
- g_free (tmp);
- g_free (tmp2);
- }
-
- cal_obj_uid_list_free (uids);
-
- tmp = ret_html;
- ret_html = g_strconcat (ret_html, "</ul>", NULL);
- g_free (tmp);
- }
-
- executive_summary_html_view_set_html (summary->view, ret_html);
- g_free (ret_html);
-
- summary->idle = 0;
- return FALSE;
-}
-
-static void
-get_property (BonoboPropertyBag *bag,
- BonoboArg *arg,
- guint arg_id,
- CORBA_Environment *ev,
- gpointer data)
-{
- CalSummary *summary = (CalSummary *) data;
-
- switch (arg_id) {
- case PROPERTY_TITLE:
- g_warning ("Get property: %s", summary->title);
- BONOBO_ARG_SET_STRING (arg, summary->title);
- break;
-
- case PROPERTY_ICON:
- BONOBO_ARG_SET_STRING (arg, summary->icon);
- break;
-
- default:
- break;
- }
-}
-
-static void
-set_property (BonoboPropertyBag *bag,
- const BonoboArg *arg,
- guint arg_id,
- CORBA_Environment *ev,
- gpointer user_data)
-{
- CalSummary *summary = (CalSummary *) user_data;
-
- switch (arg_id) {
- case PROPERTY_TITLE:
- if (summary->title)
- g_free (summary->title);
-
- summary->title = g_strdup (BONOBO_ARG_GET_STRING (arg));
- bonobo_property_bag_notify_listeners (bag, "window_title",
- arg, NULL);
- break;
-
- case PROPERTY_ICON:
- if (summary->icon)
- g_free (summary->icon);
-
- summary->icon = g_strdup (BONOBO_ARG_GET_STRING (arg));
- bonobo_property_bag_notify_listeners (bag, "window_icon",
- arg, NULL);
- break;
-
- default:
- break;
- }
-}
-
-static void
-component_destroyed (GtkObject *object,
- gpointer data)
-{
- CalSummary *summary = (CalSummary *) data;
-
- g_free (summary->title);
- g_free (summary->icon);
- gtk_object_destroy (GTK_OBJECT (summary->client));
-
- g_free (summary);
-
- running_views--;
-
- if (running_views <= 0) {
- bonobo_object_unref (BONOBO_OBJECT (factory));
- }
-}
-
-static void
-obj_updated_cb (CalClient *client,
- const char *uid,
- CalSummary *summary)
-{
- /* FIXME: Maybe cache the uid's in the summary and only call this if
- uid is in this cache??? */
-
- if (summary->idle != 0)
- return;
-
- summary->idle = g_idle_add (generate_html_summary, summary);
-}
-
-static void
-obj_removed_cb (CalClient *client,
- const char *uid,
- CalSummary *summary)
-{
- /* See FIXME: above */
- if (summary->idle != 0)
- return;
-
- summary->idle = g_idle_add (generate_html_summary, summary);
-}
-
-static void
-cal_opened_cb (CalClient *client,
- CalClientOpenStatus status,
- CalSummary *summary)
-{
- switch (status) {
- case CAL_CLIENT_OPEN_SUCCESS:
- if (summary->idle != 0)
- return;
-
- summary->idle = g_idle_add (generate_html_summary, summary);
- break;
-
- case CAL_CLIENT_OPEN_ERROR:
- executive_summary_html_view_set_html (summary->view,
- _("<b>Error loading calendar</b>"));
- break;
-
- case CAL_CLIENT_OPEN_NOT_FOUND:
- /* We did not use only_if_exists when opening the calendar, so
- * this should not happen.
- */
- g_assert_not_reached ();
- break;
-
- case CAL_CLIENT_OPEN_METHOD_NOT_SUPPORTED:
- executive_summary_html_view_set_html (summary->view,
- _("<b>Error loading calendar:<br>Method not supported"));
- break;
-
- default:
- break;
- }
-}
-
-static void
-alarm_fn (gpointer alarm_id,
- time_t trigger,
- gpointer data)
-{
- CalSummary *summary;
- time_t t, day_end;
-
- summary = data;
-
- t = time (NULL);
- day_end = time_day_end (t);
- summary->alarm = alarm_add (day_end, alarm_fn, summary, NULL);
-
- /* Now redraw the summary */
- generate_html_summary (summary);
-}
-
-/* PersistStream callbacks */
-static void
-load_from_stream (BonoboPersistStream *ps,
- Bonobo_Stream stream,
- Bonobo_Persist_ContentType type,
- gpointer data,
- CORBA_Environment *ev)
-{
- CalSummary *summary = (CalSummary *) data;
- char *str;
- xmlChar *xml_str;
- xmlDocPtr doc;
- xmlNodePtr root, children;
-
- if (*type && g_strcasecmp (type, "application/x-evolution-calendar-summary") != 0) {
- CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
- ex_Bonobo_Persist_WrongDataType, NULL);
- return;
- }
-
- bonobo_stream_client_read_string (stream, &str, ev);
- if (ev->_major != CORBA_NO_EXCEPTION || str == NULL) {
- CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
- ex_Bonobo_Persist_WrongDataType, NULL);
- return;
- }
-
- doc = xmlParseDoc ((xmlChar *) str);
-
- if (doc == NULL) {
- g_warning ("Bad data: %s!", str);
- CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
- ex_Bonobo_Persist_WrongDataType, NULL);
- g_free (str);
- return;
- }
-
- g_free (str);
- root = doc->root;
- children = root->childs;
- while (children) {
- if (strcasecmp (children->name, "showappointments") == 0) {
- xml_str = xmlNodeListGetString (doc, children->childs, 1);
- if (strcmp (xml_str, "TRUE") == 0)
- summary->appointments = TRUE;
- else
- summary->appointments = FALSE;
- xmlFree (xml_str);
-
- children = children->next;
- continue;
- }
-
- if (strcasecmp (children->name, "showtasks") == 0) {
- xml_str = xmlNodeListGetString (doc, children->childs, 1);
- if (strcmp (xml_str, "TRUE") == 0)
- summary->tasks = TRUE;
- else
- summary->tasks = FALSE;
- xmlFree (xml_str);
-
- children = children->next;
- continue;
- }
-
- g_print ("Unknown name: %s\n", children->name);
- children = children->next;
- }
- xmlFreeDoc (doc);
-
- summary->idle = g_idle_add (generate_html_summary, summary);
-}
-
-static char *
-summary_to_string (CalSummary *summary)
-{
- xmlChar *out_str;
- int out_len = 0;
- xmlDocPtr doc;
- xmlNsPtr ns;
-
- doc = xmlNewDoc ("1.0");
- ns = xmlNewGlobalNs (doc, "http://www.helixcode.com", "calendar-summary");
- doc->root = xmlNewDocNode (doc, ns, "calendar-summary", NULL);
-
- xmlNewChild (doc->root, ns, "showappointments",
- summary->appointments ? "TRUE" : "FALSE");
- xmlNewChild (doc->root, ns, "showtasks", summary->tasks ? "TRUE" : "FALSE");
-
- xmlDocDumpMemory (doc, &out_str, &out_len);
- return out_str;
-}
-
-static void
-save_to_stream (BonoboPersistStream *ps,
- const Bonobo_Stream stream,
- Bonobo_Persist_ContentType type,
- gpointer data,
- CORBA_Environment *ev)
-{
- CalSummary *summary = (CalSummary *) data;
- char *str;
-
- if (*type && g_strcasecmp (type, "application/x-evolution-calendar-summary") != 0) {
- CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
- ex_Bonobo_Persist_WrongDataType, NULL);
- return;
- }
-
- str = summary_to_string (summary);
- if (str)
- bonobo_stream_client_printf (stream, TRUE, ev, str);
- xmlFree (str);
-
- return;
-}
-
-static Bonobo_Persist_ContentTypeList *
-content_types (BonoboPersistStream *ps,
- void *closure,
- CORBA_Environment *ev)
-{
- return bonobo_persist_generate_content_types (1, "application/x-evolution-calendar-summary");
-}
-
-static void
-property_dialog_changed (GtkWidget *widget,
- CalSummary *summary)
-{
- bonobo_property_control_changed (summary->property_control, NULL);
-}
-
-static BonoboControl *
-property_dialog (BonoboPropertyControl *property_control,
- int page_num,
- void *user_data)
-{
- BonoboControl *control;
- CalSummary *summary = (CalSummary *) user_data;
- GtkWidget *container, *vbox;
-
- container = gtk_frame_new (_("Display"));
- gtk_container_set_border_width (GTK_CONTAINER (container), 2);
- vbox = gtk_vbox_new (FALSE, 2);
- gtk_container_add (GTK_CONTAINER (container), vbox);
-
- summary->show_appointments = gtk_check_button_new_with_label (_("Show appointments"));
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (summary->show_appointments),
- summary->appointments);
- gtk_signal_connect (GTK_OBJECT (summary->show_appointments), "toggled",
- GTK_SIGNAL_FUNC (property_dialog_changed), summary);
- gtk_box_pack_start (GTK_BOX (vbox), summary->show_appointments,
- TRUE, TRUE, 0);
-
- summary->show_tasks = gtk_check_button_new_with_label (_("Show tasks"));
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (summary->show_tasks),
- summary->tasks);
- gtk_signal_connect (GTK_OBJECT (summary->show_tasks), "toggled",
- GTK_SIGNAL_FUNC (property_dialog_changed), summary);
- gtk_box_pack_start (GTK_BOX (vbox), summary->show_tasks, TRUE, TRUE, 0);
- gtk_widget_show_all (container);
-
- control = bonobo_control_new (container);
- return control;
-}
-
-static void
-property_action (GtkObject *property_control,
- int page_num,
- Bonobo_PropertyControl_Action action,
- CalSummary *summary)
-{
- switch (action) {
- case Bonobo_PropertyControl_APPLY:
- summary->appointments = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (summary->show_appointments));
- summary->tasks = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (summary->show_tasks));
- summary->idle = g_idle_add (generate_html_summary, summary);
- break;
-
- case Bonobo_PropertyControl_HELP:
- g_print ("HELP\n");
- break;
-
- default:
- break;
- }
-}
-
-BonoboObject *
-create_summary_view (ExecutiveSummaryComponentFactory *_factory,
- void *closure)
-{
- BonoboObject *component, *view;
- BonoboPersistStream *stream;
- BonoboPropertyBag *bag;
- BonoboPropertyControl *property_control;
- BonoboEventSource *event_source;
- CalSummary *summary;
- char *file;
- time_t t, day_end;
-
- file = g_concat_dir_and_file (evolution_dir, "local/Calendar/calendar.ics");
-
- /* Create the component object */
- component = executive_summary_component_new ();
-
- summary = g_new (CalSummary, 1);
- summary->component = EXECUTIVE_SUMMARY_COMPONENT (component);
- summary->icon = g_strdup ("evolution-calendar.png");
- summary->title = g_strdup ("Things to do");
- summary->client = cal_client_new ();
- summary->idle = 0;
- summary->appointments = TRUE;
- summary->tasks = TRUE;
-
- t = time (NULL);
- day_end = time_day_end (t);
- summary->alarm = alarm_add (day_end, alarm_fn, summary, NULL);
-
- /* Load calendar */
- cal_client_open_calendar (summary->client, file, FALSE);
- g_free (file);
-
- gtk_signal_connect (GTK_OBJECT (summary->client), "cal-opened",
- GTK_SIGNAL_FUNC (cal_opened_cb), summary);
- gtk_signal_connect (GTK_OBJECT (summary->client), "obj-updated",
- GTK_SIGNAL_FUNC (obj_updated_cb), summary);
- gtk_signal_connect (GTK_OBJECT (summary->client), "obj-removed",
- GTK_SIGNAL_FUNC (obj_removed_cb), summary);
-
- gtk_signal_connect (GTK_OBJECT (component), "destroy",
- GTK_SIGNAL_FUNC (component_destroyed), summary);
-
- event_source = bonobo_event_source_new ();
-
- /* HTML view */
- view = executive_summary_html_view_new_full (event_source);
- summary->view = EXECUTIVE_SUMMARY_HTML_VIEW (view);
-
- executive_summary_html_view_set_html (EXECUTIVE_SUMMARY_HTML_VIEW (view),
- _("Loading Calendar"));
- bonobo_object_add_interface (component, view);
-
- /* BonoboPropertyBag */
- bag = bonobo_property_bag_new_full (get_property, set_property,
- event_source, summary);
- bonobo_property_bag_add (bag, "window_title", PROPERTY_TITLE,
- BONOBO_ARG_STRING, NULL,
- "The title of this component's window", 0);
- bonobo_property_bag_add (bag, "window_icon", PROPERTY_ICON,
- BONOBO_ARG_STRING, NULL,
- "The icon for this component's window", 0);
- bonobo_object_add_interface (component, BONOBO_OBJECT (bag));
-
- property_control = bonobo_property_control_new_full (property_dialog,
- 1, event_source,
- summary);
- summary->property_control = property_control;
- gtk_signal_connect (GTK_OBJECT (property_control), "action",
- GTK_SIGNAL_FUNC (property_action), summary);
- bonobo_object_add_interface (component, BONOBO_OBJECT (property_control));
-
- stream = bonobo_persist_stream_new (load_from_stream, save_to_stream,
- NULL, content_types, summary);
- bonobo_object_add_interface (component, BONOBO_OBJECT (stream));
-
- running_views++;
-
- return component;
-}
-
-static BonoboObject *
-factory_fn (BonoboGenericFactory *generic_factory,
- void *closure)
-{
- BonoboObject *_factory;
-
- _factory = executive_summary_component_factory_new (create_summary_view,
- NULL);
- return _factory;
-}
-
-BonoboGenericFactory *
-calendar_summary_factory_init (void)
-{
- if (factory != NULL)
- return factory;
-
- factory = bonobo_generic_factory_new (CALENDAR_SUMMARY_ID, factory_fn,
- NULL);
-
- if (factory == NULL) {
- g_warning ("Cannot initialise calendar summary factory");
- return NULL;
- }
-
- return factory;
-}
diff --git a/calendar/gui/calendar-summary.h b/calendar/gui/calendar-summary.h
deleted file mode 100644
index eebed7c5ad..0000000000
--- a/calendar/gui/calendar-summary.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* calendar-summary.c
- *
- * Authors: Iain Holmes <iain@ximian.com>
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, 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 CALENDAR_SUMMARY_H
-#define CALENDAR_SUMMARY_H
-
-#include <bonobo/bonobo-generic-factory.h>
-#include <evolution-services/executive-summary-component.h>
-
-BonoboGenericFactory *calendar_summary_factory_init (void);
-
-BonoboObject *create_summary_view (ExecutiveSummaryComponentFactory *_factory,
- void *closure);
-
-#endif
diff --git a/calendar/gui/comp-util.c b/calendar/gui/comp-util.c
deleted file mode 100644
index f1898e914e..0000000000
--- a/calendar/gui/comp-util.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/* Evolution calendar - Utilities for manipulating CalComponent objects
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Author: Federico Mena-Quintero <federico@ximian.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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "comp-util.h"
-
-
-
-/**
- * cal_comp_util_add_exdate:
- * @comp: A calendar component object.
- * @itt: Time for the exception.
- *
- * Adds an exception date to the current list of EXDATE properties in a calendar
- * component object.
- **/
-void
-cal_comp_util_add_exdate (CalComponent *comp, struct icaltimetype itt)
-{
- GSList *list;
- CalComponentDateTime *cdt;
-
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
-
- cal_component_get_exdate_list (comp, &list);
-
- cdt = g_new (CalComponentDateTime, 1);
- cdt->value = g_new (struct icaltimetype, 1);
- *cdt->value = itt;
- cdt->tzid = NULL;
-
- list = g_slist_append (list, cdt);
- cal_component_set_exdate_list (comp, list);
- cal_component_free_exdate_list (list);
-}
diff --git a/calendar/gui/comp-util.h b/calendar/gui/comp-util.h
deleted file mode 100644
index 9c70172aee..0000000000
--- a/calendar/gui/comp-util.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Evolution calendar - Utilities for manipulating CalComponent objects
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Author: Federico Mena-Quintero <federico@ximian.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 COMP_UTIL_H
-#define COMP_UTIL_H
-
-#include <cal-util/cal-component.h>
-
-void cal_comp_util_add_exdate (CalComponent *comp, struct icaltimetype itt);
-
-#endif
diff --git a/calendar/gui/component-factory.c b/calendar/gui/component-factory.c
deleted file mode 100644
index 5135eb26b8..0000000000
--- a/calendar/gui/component-factory.c
+++ /dev/null
@@ -1,175 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* component-factory.c
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, 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 <ettore@ximian.com>
- */
-
-#include <config.h>
-#include "evolution-shell-component.h"
-#include <executive-summary/evolution-services/executive-summary-component.h>
-#include "component-factory.h"
-#include "tasks-control-factory.h"
-#include "control-factory.h"
-#include "calendar-config.h"
-#include "calendar-summary.h"
-#include "tasks-control.h"
-#include "tasks-migrate.h"
-
-
-
-#define COMPONENT_FACTORY_ID "OAFIID:GNOME_Evolution_Calendar_ShellComponentFactory"
-
-static BonoboGenericFactory *factory = NULL;
-static BonoboGenericFactory *summary_factory = NULL;
-char *evolution_dir;
-
-static const EvolutionShellComponentFolderType folder_types[] = {
- { "calendar", "evolution-calendar.png" },
- { "tasks", "evolution-tasks.png" },
- { NULL, NULL }
-};
-
-
-/* EvolutionShellComponent methods and signals. */
-
-static EvolutionShellComponentResult
-create_view (EvolutionShellComponent *shell_component,
- const char *physical_uri,
- const char *type,
- BonoboControl **control_return,
- void *closure)
-{
- BonoboControl *control;
-
- if (!g_strcasecmp (type, "calendar")) {
- control = control_factory_new_control ();
- if (!control)
- return EVOLUTION_SHELL_COMPONENT_CORBAERROR;
- } else if (!g_strcasecmp (type, "tasks")) {
- control = tasks_control_new ();
- if (!control)
- return EVOLUTION_SHELL_COMPONENT_CORBAERROR;
- } else {
- return EVOLUTION_SHELL_COMPONENT_UNSUPPORTEDTYPE;
- }
-
- bonobo_control_set_property (control, "folder_uri", physical_uri, NULL);
-
- *control_return = control;
-
- return EVOLUTION_SHELL_COMPONENT_OK;
-}
-
-static void
-create_folder (EvolutionShellComponent *shell_component,
- const char *physical_uri,
- const char *type,
- const GNOME_Evolution_ShellComponentListener listener,
- void *closure)
-{
- CORBA_Environment ev;
-
- CORBA_exception_init(&ev);
- /* FIXME: I don't think we have to do anything to create a calendar
- or tasks folder - the '.ics' files are created automatically when
- needed. But I'm not sure - Damon. */
- if (!strcmp(type, "calendar") || !strcmp(type, "tasks")) {
- GNOME_Evolution_ShellComponentListener_notifyResult(listener, GNOME_Evolution_ShellComponentListener_OK, &ev);
- } else {
- GNOME_Evolution_ShellComponentListener_notifyResult(listener, GNOME_Evolution_ShellComponentListener_UNSUPPORTED_TYPE, &ev);
- }
- CORBA_exception_free(&ev);
-}
-
-static gint owner_count = 0;
-
-static void
-owner_set_cb (EvolutionShellComponent *shell_component,
- EvolutionShellClient *shell_client,
- const char *evolution_homedir,
- gpointer user_data)
-{
- static gboolean migrated = FALSE;
-
- owner_count ++;
- evolution_dir = g_strdup (evolution_homedir);
-
- calendar_config_init ();
-
- if (!migrated) {
- tasks_migrate ();
- migrated = TRUE;
- }
-}
-
-static void
-owner_unset_cb (EvolutionShellComponent *shell_component,
- gpointer user_data)
-{
- owner_count --;
- if (owner_count <= 0)
- gtk_main_quit();
-}
-
-
-/* The factory function. */
-
-static BonoboObject *
-factory_fn (BonoboGenericFactory *factory,
- void *closure)
-{
- EvolutionShellComponent *shell_component;
-
- shell_component = evolution_shell_component_new (folder_types,
- create_view,
- create_folder,
- NULL, /* remove_folder_fn */
- NULL, /* copy_folder_fn */
- NULL, /* populate_folder_context_menu_fn */
- NULL, /* get_dnd_selection_fn */
- NULL /* closure */);
-
- gtk_signal_connect (GTK_OBJECT (shell_component), "owner_set",
- GTK_SIGNAL_FUNC (owner_set_cb), NULL);
- gtk_signal_connect (GTK_OBJECT (shell_component), "owner_unset",
- GTK_SIGNAL_FUNC (owner_unset_cb), NULL);
-
- return BONOBO_OBJECT (shell_component);
-}
-
-
-
-void
-component_factory_init (void)
-{
- if (factory != NULL && factory != NULL)
- return;
-
- factory = bonobo_generic_factory_new (COMPONENT_FACTORY_ID, factory_fn, NULL);
-
- summary_factory = calendar_summary_factory_init ();
-
- if (factory == NULL)
- g_error ("Cannot initialize Evolution's calendar component.");
-
- if (summary_factory == NULL)
- g_error ("Cannot initialize Evolution's calendar summary component.");
-}
diff --git a/calendar/gui/component-factory.h b/calendar/gui/component-factory.h
deleted file mode 100644
index d2d570e340..0000000000
--- a/calendar/gui/component-factory.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* component-factory.h
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, 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 <ettore@ximian.com>
- */
-
-#ifndef _COMPONENT_FACTORY_H_
-#define _COMPONENT_FACTORY_H_
-
-extern char *evolution_dir;
-
-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 32b596dde3..0000000000
--- a/calendar/gui/control-factory.c
+++ /dev/null
@@ -1,212 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* control-factory.c
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, 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 <ettore@ximian.com>
- */
-
-#include <config.h>
-#include <glade/glade.h>
-#include <bonobo/bonobo-control.h>
-#include <bonobo/bonobo-generic-factory.h>
-#include <bonobo/bonobo-persist-file.h>
-#include <glade/glade.h>
-
-#include <liboaf/liboaf.h>
-
-#include <cal-util/timeutil.h>
-#include <gui/gnome-cal.h>
-#include <gui/calendar-commands.h>
-
-#include "control-factory.h"
-
-#define PROPERTY_CALENDAR_URI "folder_uri"
-
-#define PROPERTY_CALENDAR_URI_IDX 1
-
-#define CONTROL_FACTORY_ID "OAFIID:GNOME_Evolution_Calendar_ControlFactory"
-
-
-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,
- CORBA_Environment *ev,
- 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,
- CORBA_Environment *ev,
- gpointer user_data)
-{
- GnomeCalendar *gcal = user_data;
- char *filename;
-
- switch (arg_id) {
- case PROPERTY_CALENDAR_URI_IDX:
- filename = g_strdup_printf ("%s/calendar.ics",
- BONOBO_ARG_GET_STRING (arg));
- gnome_calendar_open (gcal, filename); /* FIXME: result value -> exception? */
- g_free (filename);
- break;
-
- default:
- g_warning ("Unhandled arg %d\n", arg_id);
- break;
- }
-}
-
-
-static void
-calendar_properties_init (GnomeCalendar *gcal, BonoboControl *control)
-{
- BonoboPropertyBag *pbag;
-
- pbag = bonobo_property_bag_new (get_prop, set_prop, gcal);
-
- bonobo_property_bag_add (pbag,
- PROPERTY_CALENDAR_URI,
- PROPERTY_CALENDAR_URI_IDX,
- BONOBO_ARG_STRING,
- NULL,
- _("The URI that the calendar will display"),
- 0);
-
- bonobo_control_set_properties (control, pbag);
-}
-
-/* Callback factory function for calendar controls */
-static BonoboObject *
-control_factory_fn (BonoboGenericFactory *Factory, void *data)
-{
- BonoboControl *control;
-
- control = control_factory_new_control ();
-
- if (control)
- return BONOBO_OBJECT (control);
- else
- return NULL;
-}
-
-
-void
-control_factory_init (void)
-{
- static BonoboGenericFactory *factory = NULL;
-
- if (factory != NULL)
- return;
-
- factory = bonobo_generic_factory_new (CONTROL_FACTORY_ID, control_factory_fn, NULL);
-
- if (factory == NULL)
- g_error ("I could not register a Calendar control factory.");
-}
-
-static int
-load_calendar (BonoboPersistFile *pf, const CORBA_char *filename, CORBA_Environment *ev, void *closure)
-{
- GnomeCalendar *gcal = closure;
-
- return gnome_calendar_open (gcal, filename);
-}
-
-static int
-save_calendar (BonoboPersistFile *pf, const CORBA_char *filename,
- CORBA_Environment *ev,
- void *closure)
-{
- /* Do not know how to save stuff yet */
- return -1;
-}
-
-static void
-calendar_persist_init (GnomeCalendar *gcal, BonoboControl *control)
-{
- BonoboPersistFile *f;
-
- f = bonobo_persist_file_new (load_calendar, save_calendar, gcal);
- bonobo_object_add_interface (BONOBO_OBJECT (control), BONOBO_OBJECT (f));
-}
-
-BonoboControl *
-control_factory_new_control (void)
-{
- BonoboControl *control;
- GnomeCalendar *gcal;
-
- gcal = new_calendar ();
- if (!gcal)
- return NULL;
-
- gtk_widget_show (GTK_WIDGET (gcal));
-
- control = bonobo_control_new (GTK_WIDGET (gcal));
- if (!control) {
- g_message ("control_factory_fn(): could not create the control!");
- return NULL;
- }
-
- calendar_properties_init (gcal, control);
- calendar_persist_init (gcal, control);
-
- gtk_signal_connect (GTK_OBJECT (control), "activate",
- GTK_SIGNAL_FUNC (control_activate_cb), gcal);
-
- return control;
-}
diff --git a/calendar/gui/control-factory.h b/calendar/gui/control-factory.h
deleted file mode 100644
index 7170404cda..0000000000
--- a/calendar/gui/control-factory.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* control-factory.c
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, 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 <ettore@ximian.com>
- */
-
-#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/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 dd9a2b2540..0000000000
--- a/calendar/gui/dialogs/Makefile.am
+++ /dev/null
@@ -1,35 +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$(top_builddir)/libical/src/libical \
- -I$(includedir) \
- -DEVOLUTION_DATADIR=\""$(datadir)"\" \
- -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \
- $(BONOBO_VFS_GNOME_CFLAGS) \
- -DGNOMELOCALEDIR=\""$(localedir)"\"
-
-noinst_LIBRARIES = libcal-dialogs.a
-
-libcal_dialogs_a_SOURCES = \
- alarm-notify-dialog.c \
- alarm-notify-dialog.h \
- cal-prefs-dialog.c \
- cal-prefs-dialog.h \
- delete-comp.c \
- delete-comp.h \
- save-comp.c \
- save-comp.h \
- task-editor.c \
- task-editor.h
-
-glade_DATA = \
- alarm-notify.glade \
- cal-prefs-dialog.glade \
- task-editor-dialog.glade
-
-EXTRA_DIST = \
- $(glade_DATA)
diff --git a/calendar/gui/dialogs/alarm-notify-dialog.c b/calendar/gui/dialogs/alarm-notify-dialog.c
deleted file mode 100644
index 164d043e13..0000000000
--- a/calendar/gui/dialogs/alarm-notify-dialog.c
+++ /dev/null
@@ -1,231 +0,0 @@
-/* Evolution calendar - alarm notification dialog
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Author: Federico Mena-Quintero <federico@ximian.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 <gtk/gtklabel.h>
-#include <gtk/gtkspinbutton.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtkwindow.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <glade/glade.h>
-#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:
- * @trigger: Trigger time for the alarm.
- * @occur: Occurrence time for the event.
- * @comp: Calendar component object which corresponds to the alarm.
- * @func: Function to be called when a dialog action is invoked.
- * @func_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, CalComponent *comp,
- AlarmNotifyFunc func, gpointer func_data)
-{
- AlarmNotify *an;
- char buf[256];
- struct tm tm_trigger;
- struct tm tm_occur;
- CalComponentText summary;
-
- g_return_val_if_fail (trigger != -1, FALSE);
- g_return_val_if_fail (occur != -1, FALSE);
- g_return_val_if_fail (comp != NULL, FALSE);
- g_return_val_if_fail (IS_CAL_COMPONENT (comp), 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 */
-
- cal_component_get_summary (comp, &summary);
-
- if (summary.value)
- gtk_label_set_text (GTK_LABEL (an->summary), summary.value);
- else
- gtk_label_set_text (GTK_LABEL (an->summary), _("No summary available."));
-
- /* 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 f2c938c495..0000000000
--- a/calendar/gui/dialogs/alarm-notify-dialog.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Evolution calendar - alarm notification dialog
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Author: Federico Mena-Quintero <federico@ximian.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 ALARM_NOTIFY_DIALOG_H
-#define ALARM_NOTIFY_DIALOG_H
-
-#include <time.h>
-#include <glib.h>
-#include <cal-util/cal-component.h>
-
-
-
-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, CalComponent *comp,
- 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 41718d0572..0000000000
--- a/calendar/gui/dialogs/alarm-notify.glade
+++ /dev/null
@@ -1,228 +0,0 @@
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <name>Evolution Calendar</name>
- <program_name>evolution-calendar</program_name>
- <directory></directory>
- <source_directory>src</source_directory>
- <pixmaps_directory>pixmaps</pixmaps_directory>
- <language>C</language>
- <gnome_support>True</gnome_support>
- <gettext_support>True</gettext_support>
- <use_widget_names>False</use_widget_names>
- <output_main_file>True</output_main_file>
- <output_support_files>True</output_support_files>
- <output_build_files>True</output_build_files>
- <backup_source_files>True</backup_source_files>
- <main_source_file>interface.c</main_source_file>
- <main_header_file>interface.h</main_header_file>
- <handler_source_file>callbacks.c</handler_source_file>
- <handler_header_file>callbacks.h</handler_header_file>
- <support_source_file>support.c</support_source_file>
- <support_header_file>support.h</support_header_file>
-</project>
-
-<widget>
- <class>GtkWindow</class>
- <name>alarm-notify</name>
- <cxx_use_heap>True</cxx_use_heap>
- <title></title>
- <type>GTK_WINDOW_DIALOG</type>
- <position>GTK_WIN_POS_CENTER</position>
- <modal>False</modal>
- <allow_shrink>False</allow_shrink>
- <allow_grow>False</allow_grow>
- <auto_shrink>False</auto_shrink>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox2</name>
- <border_width>4</border_width>
- <cxx_use_heap>True</cxx_use_heap>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox3</name>
- <cxx_use_heap>True</cxx_use_heap>
- <homogeneous>False</homogeneous>
- <spacing>8</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox5</name>
- <cxx_use_heap>True</cxx_use_heap>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>heading</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label></label>
- <justify>GTK_JUSTIFY_LEFT</justify>
- <wrap>True</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>summary</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label></label>
- <justify>GTK_JUSTIFY_LEFT</justify>
- <wrap>True</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox4</name>
- <cxx_use_heap>True</cxx_use_heap>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>close</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <label>Close</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>snooze</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <label>Snooze</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>edit</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <label>Edit appointment</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHSeparator</class>
- <name>hseparator1</name>
- <cxx_use_heap>True</cxx_use_heap>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox4</name>
- <cxx_use_heap>True</cxx_use_heap>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label4</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>Snooze time (minutes)</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkSpinButton</class>
- <name>snooze-time</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <climb_rate>1</climb_rate>
- <digits>0</digits>
- <numeric>False</numeric>
- <update_policy>GTK_UPDATE_ALWAYS</update_policy>
- <snap>False</snap>
- <wrap>False</wrap>
- <value>5</value>
- <lower>1</lower>
- <upper>1440</upper>
- <step>1</step>
- <page>5</page>
- <page_size>5</page_size>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
- </widget>
-</widget>
-
-</GTK-Interface>
diff --git a/calendar/gui/dialogs/cal-prefs-dialog.c b/calendar/gui/dialogs/cal-prefs-dialog.c
deleted file mode 100644
index 9839318e8e..0000000000
--- a/calendar/gui/dialogs/cal-prefs-dialog.c
+++ /dev/null
@@ -1,456 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <damon@ximian.com>
- *
- * Copyright 2000, Helix Code, Inc.
- * Copyright 2000, Ximian, 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
- */
-
-/*
- * CalPrefsDialog - a GtkObject which handles a libglade-loaded dialog
- * to edit the calendar preference settings.
- */
-
-#include <config.h>
-#include <glade/glade.h>
-#include <gal/util/e-util.h>
-#include <e-util/e-dialog-widgets.h>
-#include <widgets/misc/e-dateedit.h>
-#include "cal-prefs-dialog.h"
-#include "../calendar-config.h"
-#include "../calendar-commands.h"
-#include "../e-tasks.h"
-
-
-typedef struct {
- /* Glade XML data */
- GladeXML *xml;
-
- GtkWidget *dialog;
-
- GtkWidget *working_days[7];
- GtkWidget *week_start_day;
- GtkWidget *start_of_day;
- GtkWidget *end_of_day;
- GtkWidget *use_12_hour;
- GtkWidget *use_24_hour;
- GtkWidget *time_divisions;
- GtkWidget *show_end_times;
- GtkWidget *compress_weekend;
- GtkWidget *dnav_show_week_no;
-} CalPrefsDialogPrivate;
-
-static const int week_start_day_map[] = {
- 1, 2, 3, 4, 5, 6, 0, -1
-};
-
-static const int time_division_map[] = {
- 60, 30, 15, 10, 5, -1
-};
-
-static void cal_prefs_dialog_class_init (CalPrefsDialogClass *class);
-static void cal_prefs_dialog_init (CalPrefsDialog *prefs);
-static gboolean get_widgets (CalPrefsDialog *prefs);
-static void cal_prefs_dialog_destroy (GtkObject *object);
-static void cal_prefs_dialog_init_widgets (CalPrefsDialog *prefs);
-static void cal_prefs_dialog_button_clicked (GtkWidget *dialog,
- gint button,
- CalPrefsDialog *prefs);
-static void cal_prefs_dialog_use_24_hour_toggled(GtkWidget *button,
- CalPrefsDialog *prefs);
-static void cal_prefs_dialog_show_config (CalPrefsDialog *prefs);
-static void cal_prefs_dialog_update_config (CalPrefsDialog *prefs);
-
-GtkWidget* cal_prefs_dialog_create_time_edit (void);
-
-static GtkObjectClass *parent_class;
-
-E_MAKE_TYPE (cal_prefs_dialog, "CalPrefsDialog", CalPrefsDialog,
- cal_prefs_dialog_class_init, cal_prefs_dialog_init,
- GTK_TYPE_OBJECT)
-
-
-static void
-cal_prefs_dialog_class_init (CalPrefsDialogClass *class)
-{
- GtkObjectClass *object_class;
-
- object_class = (GtkObjectClass *) class;
-
- parent_class = gtk_type_class (GTK_TYPE_OBJECT);
-
- object_class->destroy = cal_prefs_dialog_destroy;
-}
-
-
-static void
-cal_prefs_dialog_init (CalPrefsDialog *prefs)
-{
- CalPrefsDialogPrivate *priv;
-
- priv = g_new0 (CalPrefsDialogPrivate, 1);
- prefs->priv = priv;
-
-}
-
-
-/**
- * cal_prefs_dialog_new:
- * @Returns: a new #CalPrefsDialog.
- *
- * Creates a new #CalPrefsDialog.
- **/
-CalPrefsDialog *
-cal_prefs_dialog_new (void)
-{
- CalPrefsDialog *prefs;
-
- prefs = CAL_PREFS_DIALOG (gtk_type_new (cal_prefs_dialog_get_type ()));
- return cal_prefs_dialog_construct (prefs);
-}
-
-
-/**
- * cal_prefs_dialog_construct:
- * @prefs: A #CalPrefsDialog.
- *
- * Constructs a task editor by loading its Glade XML file.
- *
- * Return value: The same object as @prefs, or NULL if the widgets could not be
- * created. In the latter case, the task editor will automatically be
- * destroyed.
- **/
-CalPrefsDialog *
-cal_prefs_dialog_construct (CalPrefsDialog *prefs)
-{
- CalPrefsDialogPrivate *priv;
-
- g_return_val_if_fail (IS_CAL_PREFS_DIALOG (prefs), NULL);
-
- priv = prefs->priv;
-
- /* Load the content widgets */
-
- priv->xml = glade_xml_new (EVOLUTION_GLADEDIR "/cal-prefs-dialog.glade", NULL);
- if (!priv->xml) {
- g_message ("cal_prefs_dialog_construct(): Could not load the Glade XML file!");
- goto error;
- }
-
- if (!get_widgets (prefs)) {
- g_message ("cal_prefs_dialog_construct(): Could not find all widgets in the XML file!");
- goto error;
- }
-
- cal_prefs_dialog_init_widgets (prefs);
-
- cal_prefs_dialog_show_config (prefs);
-
- gtk_widget_show (priv->dialog);
-
- return prefs;
-
- error:
-
- gtk_object_unref (GTK_OBJECT (prefs));
- return NULL;
-}
-
-
-/* Gets the widgets from the XML file and returns if they are all available.
- */
-static gboolean
-get_widgets (CalPrefsDialog *prefs)
-{
- CalPrefsDialogPrivate *priv;
-
- priv = prefs->priv;
-
-#define GW(name) glade_xml_get_widget (priv->xml, name)
-
- priv->dialog = GW ("cal-prefs-dialog");
-
- /* The indices must match the mktime() values. */
- priv->working_days[0] = GW ("sun_button");
- priv->working_days[1] = GW ("mon_button");
- priv->working_days[2] = GW ("tue_button");
- priv->working_days[3] = GW ("wed_button");
- priv->working_days[4] = GW ("thu_button");
- priv->working_days[5] = GW ("fri_button");
- priv->working_days[6] = GW ("sat_button");
-
- priv->week_start_day = GW ("first_day_of_week");
- priv->start_of_day = GW ("start_of_day");
- priv->end_of_day = GW ("end_of_day");
- priv->use_12_hour = GW ("use_12_hour");
- priv->use_24_hour = GW ("use_24_hour");
- priv->time_divisions = GW ("time_divisions");
- priv->show_end_times = GW ("show_end_times");
- priv->compress_weekend = GW ("compress_weekend");
- priv->dnav_show_week_no = GW ("dnav_show_week_no");
-
-#undef GW
-
- return (priv->dialog
- && priv->working_days[0]
- && priv->working_days[1]
- && priv->working_days[2]
- && priv->working_days[3]
- && priv->working_days[4]
- && priv->working_days[5]
- && priv->working_days[6]
- && priv->week_start_day
- && priv->start_of_day
- && priv->end_of_day
- && priv->use_12_hour
- && priv->use_24_hour
- && priv->time_divisions
- && priv->show_end_times
- && priv->compress_weekend
- && priv->dnav_show_week_no);
-}
-
-
-static void
-cal_prefs_dialog_destroy (GtkObject *object)
-{
- CalPrefsDialog *prefs;
- CalPrefsDialogPrivate *priv;
-
- g_return_if_fail (IS_CAL_PREFS_DIALOG (object));
-
- prefs = CAL_PREFS_DIALOG (object);
- priv = prefs->priv;
-
-
- g_free (priv);
- prefs->priv = NULL;
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-
-/* Called by libglade to create our custom EDateEdit widgets. */
-GtkWidget *
-cal_prefs_dialog_create_time_edit (void)
-{
- GtkWidget *dedit;
-
- dedit = e_date_edit_new ();
-
- e_date_edit_set_time_popup_range (E_DATE_EDIT (dedit), 0, 24);
- e_date_edit_set_show_date (E_DATE_EDIT (dedit), FALSE);
-
- return dedit;
-}
-
-
-void
-cal_prefs_dialog_show (CalPrefsDialog *prefs)
-{
- CalPrefsDialogPrivate *priv;
-
- g_return_if_fail (IS_CAL_PREFS_DIALOG (prefs));
-
- priv = prefs->priv;
-
- /* If the dialog is already show just raise it, otherwise refresh the
- config settings and show it. */
- if (GTK_WIDGET_MAPPED (priv->dialog)) {
- gdk_window_raise (priv->dialog->window);
- } else {
- cal_prefs_dialog_show_config (prefs);
- gtk_widget_show (priv->dialog);
- }
-}
-
-
-/* Connects any necessary signal handlers. */
-static void
-cal_prefs_dialog_init_widgets (CalPrefsDialog *prefs)
-{
- CalPrefsDialogPrivate *priv;
-
- priv = prefs->priv;
-
- gtk_signal_connect (GTK_OBJECT (priv->dialog), "clicked",
- GTK_SIGNAL_FUNC (cal_prefs_dialog_button_clicked),
- prefs);
-
- gtk_signal_connect (GTK_OBJECT (priv->use_24_hour), "toggled",
- GTK_SIGNAL_FUNC (cal_prefs_dialog_use_24_hour_toggled),
- prefs);
-}
-
-
-static void
-cal_prefs_dialog_button_clicked (GtkWidget *dialog,
- gint button,
- CalPrefsDialog *prefs)
-{
- CalPrefsDialogPrivate *priv;
-
- g_return_if_fail (IS_CAL_PREFS_DIALOG (prefs));
-
- priv = prefs->priv;
-
- /* OK & Apply buttons update the config settings. */
- if (button == 0 || button == 1)
- cal_prefs_dialog_update_config (prefs);
-
- /* OK & Close buttons close the dialog. */
- if (button == 0 || button == 2)
- gtk_widget_hide (priv->dialog);
-}
-
-
-static void
-cal_prefs_dialog_use_24_hour_toggled (GtkWidget *button,
- CalPrefsDialog *prefs)
-{
- CalPrefsDialogPrivate *priv;
- gboolean use_24_hour;
-
- priv = prefs->priv;
-
- use_24_hour = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->use_24_hour));
-
- e_date_edit_set_use_24_hour_format (E_DATE_EDIT (priv->start_of_day),
- use_24_hour);
- e_date_edit_set_use_24_hour_format (E_DATE_EDIT (priv->end_of_day),
- use_24_hour);
-}
-
-
-/* Shows the current config settings in the dialog. */
-static void
-cal_prefs_dialog_show_config (CalPrefsDialog *prefs)
-{
- CalPrefsDialogPrivate *priv;
- CalWeekdays working_days;
- gint mask, day, week_start_day, time_divisions;
-
- priv = prefs->priv;
-
- /* Working Days. */
- working_days = calendar_config_get_working_days ();
- mask = 1 << 0;
- for (day = 0; day < 7; day++) {
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->working_days[day]), (working_days & mask) ? TRUE : FALSE);
- mask <<= 1;
- }
-
- /* Week Start Day. */
- week_start_day = calendar_config_get_week_start_day ();
- e_dialog_option_menu_set (priv->week_start_day, week_start_day,
- week_start_day_map);
-
- /* Start of Day. */
- e_date_edit_set_time_of_day (E_DATE_EDIT (priv->start_of_day),
- calendar_config_get_day_start_hour (),
- calendar_config_get_day_start_minute ());
-
- /* End of Day. */
- e_date_edit_set_time_of_day (E_DATE_EDIT (priv->end_of_day),
- calendar_config_get_day_end_hour (),
- calendar_config_get_day_end_minute ());
-
- /* 12/24 Hour Format. */
- if (calendar_config_get_24_hour_format ())
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->use_24_hour), TRUE);
- else
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->use_12_hour), TRUE);
-
- /* Time Divisions. */
- time_divisions = calendar_config_get_time_divisions ();
- e_dialog_option_menu_set (priv->time_divisions, time_divisions,
- time_division_map);
-
- /* Show Appointment End Times. */
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->show_end_times),
- calendar_config_get_show_event_end ());
-
- /* Compress Weekend. */
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->compress_weekend), calendar_config_get_compress_weekend ());
-
- /* Date Navigator - Show Week Numbers. */
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->dnav_show_week_no), calendar_config_get_dnav_show_week_no ());
-}
-
-
-/* Updates the config values based on the settings in the dialog. */
-static void
-cal_prefs_dialog_update_config (CalPrefsDialog *prefs)
-{
- CalPrefsDialogPrivate *priv;
- CalWeekdays working_days;
- gint mask, day, week_start_day, time_divisions, hour, minute;
-
- priv = prefs->priv;
-
- /* Working Days. */
- working_days = 0;
- mask = 1 << 0;
- for (day = 0; day < 7; day++) {
- if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->working_days[day])))
- working_days |= mask;
- mask <<= 1;
- }
- calendar_config_set_working_days (working_days);
-
- /* Week Start Day. */
- week_start_day = e_dialog_option_menu_get (priv->week_start_day,
- week_start_day_map);
- calendar_config_set_week_start_day (week_start_day);
-
- /* Start of Day. */
- e_date_edit_get_time_of_day (E_DATE_EDIT (priv->start_of_day),
- &hour, &minute);
- calendar_config_set_day_start_hour (hour);
- calendar_config_set_day_start_minute (minute);
-
- /* End of Day. */
- e_date_edit_get_time_of_day (E_DATE_EDIT (priv->end_of_day),
- &hour, &minute);
- calendar_config_set_day_end_hour (hour);
- calendar_config_set_day_end_minute (minute);
-
- /* 12/24 Hour Format. */
- calendar_config_set_24_hour_format (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->use_24_hour)));
-
- /* Time Divisions. */
- time_divisions = e_dialog_option_menu_get (priv->time_divisions,
- time_division_map);
- calendar_config_set_time_divisions (time_divisions);
-
- /* Show Appointment End Times. */
- calendar_config_set_show_event_end (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->show_end_times)));
-
- /* Compress Weekend. */
- calendar_config_set_compress_weekend (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->compress_weekend)));
-
- /* Date Navigator - Show Week Numbers. */
- calendar_config_set_dnav_show_week_no (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->dnav_show_week_no)));
-
- calendar_config_write ();
- update_all_config_settings ();
- e_tasks_update_all_config_settings ();
-}
diff --git a/calendar/gui/dialogs/cal-prefs-dialog.glade b/calendar/gui/dialogs/cal-prefs-dialog.glade
deleted file mode 100644
index f6eccb163d..0000000000
--- a/calendar/gui/dialogs/cal-prefs-dialog.glade
+++ /dev/null
@@ -1,1241 +0,0 @@
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <name>preferences</name>
- <program_name>preferences</program_name>
- <directory></directory>
- <source_directory>src</source_directory>
- <pixmaps_directory>pixmaps</pixmaps_directory>
- <language>C</language>
- <gnome_support>True</gnome_support>
- <gettext_support>True</gettext_support>
-</project>
-
-<widget>
- <class>GnomeDialog</class>
- <name>cal-prefs-dialog</name>
- <title>Calendar Preferences</title>
- <type>GTK_WINDOW_TOPLEVEL</type>
- <position>GTK_WIN_POS_NONE</position>
- <modal>False</modal>
- <allow_shrink>False</allow_shrink>
- <allow_grow>False</allow_grow>
- <auto_shrink>False</auto_shrink>
- <auto_close>False</auto_close>
- <hide_on_close>True</hide_on_close>
-
- <widget>
- <class>GtkVBox</class>
- <child_name>GnomeDialog:vbox</child_name>
- <name>vbox1</name>
- <homogeneous>False</homogeneous>
- <spacing>8</spacing>
- <child>
- <padding>4</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkHButtonBox</class>
- <child_name>GnomeDialog:action_area</child_name>
- <name>hbuttonbox1</name>
- <layout_style>GTK_BUTTONBOX_END</layout_style>
- <spacing>8</spacing>
- <child_min_width>85</child_min_width>
- <child_min_height>27</child_min_height>
- <child_ipad_x>7</child_ipad_x>
- <child_ipad_y>0</child_ipad_y>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- <pack>GTK_PACK_END</pack>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>button1</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button2</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_APPLY</stock_button>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button3</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_CLOSE</stock_button>
- </widget>
- </widget>
-
- <widget>
- <class>GtkNotebook</class>
- <name>notebook1</name>
- <can_focus>True</can_focus>
- <show_tabs>True</show_tabs>
- <show_border>True</show_border>
- <tab_pos>GTK_POS_TOP</tab_pos>
- <scrollable>False</scrollable>
- <tab_hborder>2</tab_hborder>
- <tab_vborder>2</tab_vborder>
- <popup_enable>False</popup_enable>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox8</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>6</spacing>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame9</name>
- <label>Work week</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox9</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>3</spacing>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox8</name>
- <homogeneous>True</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>mon_button</name>
- <can_focus>True</can_focus>
- <label>Mon</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>tue_button</name>
- <can_focus>True</can_focus>
- <label>Tue</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>wed_button</name>
- <can_focus>True</can_focus>
- <label>Wed</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>thu_button</name>
- <can_focus>True</can_focus>
- <label>Thu</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>fri_button</name>
- <can_focus>True</can_focus>
- <label>Fri</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>sat_button</name>
- <can_focus>True</can_focus>
- <label>Sat</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>sun_button</name>
- <can_focus>True</can_focus>
- <label>Sun</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox9</name>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label16</name>
- <label>First day of week:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkOptionMenu</class>
- <name>first_day_of_week</name>
- <can_focus>True</can_focus>
- <items>Monday
-Tuesday
-Wednesday
-Thursday
-Friday
-Saturday
-Sunday
-</items>
- <initial_choice>0</initial_choice>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox11</name>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label17</name>
- <label>Start of day:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>start_of_day</name>
- <creation_function>cal_prefs_dialog_create_time_edit</creation_function>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Tue, 10 Oct 2000 15:12:12 GMT</last_modification_time>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label18</name>
- <label>End of day:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>end_of_day</name>
- <creation_function>cal_prefs_dialog_create_time_edit</creation_function>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Tue, 10 Oct 2000 15:12:21 GMT</last_modification_time>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame10</name>
- <label>Display options</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkTable</class>
- <name>table4</name>
- <border_width>4</border_width>
- <rows>4</rows>
- <columns>3</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>0</row_spacing>
- <column_spacing>4</column_spacing>
-
- <widget>
- <class>GtkLabel</class>
- <name>label19</name>
- <label>Time divisions:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>7.45058e-09</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label20</name>
- <label>Time format:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>show_end_times</name>
- <can_focus>True</can_focus>
- <label>Show appointment end times</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <left_attach>0</left_attach>
- <right_attach>3</right_attach>
- <top_attach>2</top_attach>
- <bottom_attach>3</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>compress_weekend</name>
- <can_focus>True</can_focus>
- <label>Compress weekends</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <left_attach>0</left_attach>
- <right_attach>3</right_attach>
- <top_attach>3</top_attach>
- <bottom_attach>4</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox10</name>
- <homogeneous>True</homogeneous>
- <spacing>4</spacing>
- <child>
- <left_attach>1</left_attach>
- <right_attach>3</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkRadioButton</class>
- <name>use_12_hour</name>
- <can_focus>True</can_focus>
- <label>12 hour (am/pm)</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <group>time_format_group</group>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkRadioButton</class>
- <name>use_24_hour</name>
- <can_focus>True</can_focus>
- <label>24 hour</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <group>time_format_group</group>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment4</name>
- <xalign>7.45058e-09</xalign>
- <yalign>0.5</yalign>
- <xscale>0</xscale>
- <yscale>1</yscale>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
-
- <widget>
- <class>GtkOptionMenu</class>
- <name>time_divisions</name>
- <can_focus>True</can_focus>
- <items>60 minutes
-30 minutes
-15 minutes
-10 minutes
-05 minutes
-</items>
- <initial_choice>0</initial_choice>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame11</name>
- <label>Date navigator options</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>dnav_show_week_no</name>
- <border_width>4</border_width>
- <can_focus>True</can_focus>
- <label>Show week numbers</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label7</name>
- <label>Calendar</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox3</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox4</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame3</name>
- <label>Show</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox4</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>checkbutton1</name>
- <can_focus>True</can_focus>
- <label>Due Date</label>
- <active>True</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>checkbutton2</name>
- <can_focus>True</can_focus>
- <label>Time Until Due</label>
- <active>True</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>checkbutton3</name>
- <can_focus>True</can_focus>
- <label>Priority</label>
- <active>True</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame4</name>
- <label>Highlight</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox5</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>checkbutton4</name>
- <can_focus>True</can_focus>
- <label>Overdue Items</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>checkbutton5</name>
- <can_focus>True</can_focus>
- <label>Items Due Today</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>checkbutton6</name>
- <can_focus>True</can_focus>
- <label>Items Not Yet Due</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame5</name>
- <label>Colors</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkTable</class>
- <name>table3</name>
- <border_width>4</border_width>
- <rows>3</rows>
- <columns>2</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>4</row_spacing>
- <column_spacing>4</column_spacing>
-
- <widget>
- <class>GnomeColorPicker</class>
- <name>colorpicker1</name>
- <can_focus>True</can_focus>
- <dither>True</dither>
- <use_alpha>False</use_alpha>
- <title>Pick a color</title>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>False</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GnomeColorPicker</class>
- <name>colorpicker2</name>
- <can_focus>True</can_focus>
- <dither>True</dither>
- <use_alpha>False</use_alpha>
- <title>Pick a color</title>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>False</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GnomeColorPicker</class>
- <name>colorpicker3</name>
- <can_focus>True</can_focus>
- <dither>True</dither>
- <use_alpha>False</use_alpha>
- <title>Pick a color</title>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>2</top_attach>
- <bottom_attach>3</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>False</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment1</name>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xscale>1</xscale>
- <yscale>1</yscale>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label8</name>
- <label>Items Not Yet Due:</label>
- <justify>GTK_JUSTIFY_RIGHT</justify>
- <wrap>False</wrap>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment2</name>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xscale>1</xscale>
- <yscale>1</yscale>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label9</name>
- <label>Items Due Today:</label>
- <justify>GTK_JUSTIFY_RIGHT</justify>
- <wrap>True</wrap>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment3</name>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xscale>1</xscale>
- <yscale>1</yscale>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>2</top_attach>
- <bottom_attach>3</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label10</name>
- <label>Overdue Items:</label>
- <justify>GTK_JUSTIFY_RIGHT</justify>
- <wrap>False</wrap>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label11</name>
- <label>TaskPad</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox6</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame6</name>
- <border_width>4</border_width>
- <label>Defaults</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>4</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox5</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>checkbutton7</name>
- <border_width>2</border_width>
- <can_focus>True</can_focus>
- <label>Remind me of all appointments</label>
- <active>True</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkSpinButton</class>
- <name>spinbutton1</name>
- <can_focus>True</can_focus>
- <climb_rate>1</climb_rate>
- <digits>0</digits>
- <numeric>False</numeric>
- <update_policy>GTK_UPDATE_ALWAYS</update_policy>
- <snap>False</snap>
- <wrap>False</wrap>
- <value>1</value>
- <lower>0</lower>
- <upper>100</upper>
- <step>1</step>
- <page>10</page>
- <page_size>10</page_size>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label12</name>
- <label>minutes before they occur.</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>3</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame7</name>
- <border_width>4</border_width>
- <label>Visual Alarms</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>4</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>checkbutton8</name>
- <border_width>4</border_width>
- <can_focus>True</can_focus>
- <label>Beep when alarm windows appear.</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- </widget>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame8</name>
- <border_width>4</border_width>
- <label>Audio Alarms</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>4</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox7</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox6</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>checkbutton9</name>
- <can_focus>True</can_focus>
- <label>Alarms timeout after</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkSpinButton</class>
- <name>spinbutton2</name>
- <can_focus>True</can_focus>
- <climb_rate>1</climb_rate>
- <digits>0</digits>
- <numeric>False</numeric>
- <update_policy>GTK_UPDATE_ALWAYS</update_policy>
- <snap>False</snap>
- <wrap>False</wrap>
- <value>5</value>
- <lower>0</lower>
- <upper>100</upper>
- <step>1</step>
- <page>10</page>
- <page_size>10</page_size>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label13</name>
- <label>seconds.</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox7</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>checkbutton10</name>
- <can_focus>True</can_focus>
- <label>Enable snoozing for</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkSpinButton</class>
- <name>spinbutton3</name>
- <can_focus>True</can_focus>
- <climb_rate>1</climb_rate>
- <digits>0</digits>
- <numeric>False</numeric>
- <update_policy>GTK_UPDATE_ALWAYS</update_policy>
- <snap>False</snap>
- <wrap>False</wrap>
- <value>600</value>
- <lower>0</lower>
- <upper>1000</upper>
- <step>1</step>
- <page>10</page>
- <page_size>10</page_size>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label14</name>
- <label>seconds.</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label15</name>
- <label>Reminders</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
- </widget>
-</widget>
-
-</GTK-Interface>
diff --git a/calendar/gui/dialogs/cal-prefs-dialog.h b/calendar/gui/dialogs/cal-prefs-dialog.h
deleted file mode 100644
index 9d744f806d..0000000000
--- a/calendar/gui/dialogs/cal-prefs-dialog.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <damon@ximian.com>
- *
- * Copyright 2000, Helix Code, Inc.
- * Copyright 2000, Ximian, 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
- */
-
-/*
- * CalPrefsDialog - a GtkObject which handles a libglade-loaded dialog
- * to edit the calendar preference settings.
- */
-
-#ifndef _CAL_PREFS_DIALOG_H_
-#define _CAL_PREFS_DIALOG_H_
-
-#include <gtk/gtkobject.h>
-#include <libgnome/gnome-defs.h>
-
-BEGIN_GNOME_DECLS
-
-
-#define CAL_PREFS_DIALOG(obj) GTK_CHECK_CAST (obj, cal_prefs_dialog_get_type (), CalPrefsDialog)
-#define CAL_PREFS_DIALOG_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, cal_prefs_dialog_get_type (), CalPrefsDialogClass)
-#define IS_CAL_PREFS_DIALOG(obj) GTK_CHECK_TYPE (obj, cal_prefs_dialog_get_type ())
-
-
-typedef struct _CalPrefsDialog CalPrefsDialog;
-typedef struct _CalPrefsDialogClass CalPrefsDialogClass;
-
-struct _CalPrefsDialog
-{
- GtkObject object;
-
- /* Private data */
- gpointer priv;
-};
-
-struct _CalPrefsDialogClass
-{
- GtkObjectClass parent_class;
-};
-
-
-GtkType cal_prefs_dialog_get_type (void);
-CalPrefsDialog* cal_prefs_dialog_construct (CalPrefsDialog *prefs);
-CalPrefsDialog* cal_prefs_dialog_new (void);
-
-void cal_prefs_dialog_show (CalPrefsDialog *prefs);
-
-END_GNOME_DECLS
-
-#endif /* _CAL_PREFS_DIALOG_H_ */
diff --git a/calendar/gui/dialogs/delete-comp.c b/calendar/gui/dialogs/delete-comp.c
deleted file mode 100644
index f24c3493fb..0000000000
--- a/calendar/gui/dialogs/delete-comp.c
+++ /dev/null
@@ -1,108 +0,0 @@
-/* Evolution calendar - Delete calendar component dialog
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Author: Federico Mena-Quintero <federico@ximian.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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <glib.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-dialog-util.h>
-#include <libgnomeui/gnome-uidefs.h>
-#include <gal/widgets/e-unicode.h>
-#include "delete-comp.h"
-
-
-
-/**
- * delete_component_dialog:
- * @comp: A calendar component.
- * @widget: A widget to use as a basis for conversion from UTF8 into font
- * encoding.
- *
- * Pops up a dialog box asking the user whether he wants to delete a particular
- * calendar component.
- *
- * Return value: TRUE if the user clicked Yes, FALSE otherwise.
- **/
-gboolean
-delete_component_dialog (CalComponent *comp, GtkWidget *widget)
-{
- CalComponentText summary;
- CalComponentVType vtype;
- char *str, *tmp;
- GtkWidget *dialog;
-
- g_return_val_if_fail (comp != NULL, FALSE);
- g_return_val_if_fail (IS_CAL_COMPONENT (comp), FALSE);
- g_return_val_if_fail (widget != NULL, FALSE);
- g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
-
- vtype = cal_component_get_vtype (comp);
- cal_component_get_summary (comp, &summary);
-
- tmp = e_utf8_to_gtk_string (widget, summary.value);
-
- switch (vtype) {
- case CAL_COMPONENT_EVENT:
- if (tmp)
- str = g_strdup_printf (_("Are you sure you want to delete the appointment "
- "`%s'?"), tmp);
- else
- str = g_strdup (_("Are you sure you want to delete this "
- "untitled appointment?"));
- break;
-
- case CAL_COMPONENT_TODO:
- if (tmp)
- str = g_strdup_printf (_("Are you sure you want to delete the task "
- "`%s'?"), tmp);
- else
- str = g_strdup (_("Are you sure you want to delete this "
- "untitled task?"));
- break;
-
- case CAL_COMPONENT_JOURNAL:
- if (tmp)
- str = g_strdup_printf (_("Are you sure you want to delete the journal entry "
- "`%s'?"), tmp);
- else
- str = g_strdup (_("Are you sure want to delete this "
- "untitled journal entry?"));
- break;
-
- default:
- g_message ("delete_component_dialog(): Cannot handle object of type %d", vtype);
- return FALSE;
- }
-
- dialog = gnome_question_dialog_modal (str, NULL, NULL);
- g_free (tmp);
- g_free (str);
-
- if (gnome_dialog_run (GNOME_DIALOG (dialog)) == GNOME_YES)
- return TRUE;
- else
- return FALSE;
-}
diff --git a/calendar/gui/dialogs/delete-comp.h b/calendar/gui/dialogs/delete-comp.h
deleted file mode 100644
index d7243e75c4..0000000000
--- a/calendar/gui/dialogs/delete-comp.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Evolution calendar - Delete calendar component dialog
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Author: Federico Mena-Quintero <federico@ximian.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 DELETE_COMP_H
-#define DELETE_COMP_H
-
-#include <gtk/gtkwidget.h>
-#include <cal-util/cal-component.h>
-
-gboolean delete_component_dialog (CalComponent *comp, GtkWidget *widget);
-
-#endif
diff --git a/calendar/gui/dialogs/save-comp.c b/calendar/gui/dialogs/save-comp.c
deleted file mode 100644
index c36e98cb5a..0000000000
--- a/calendar/gui/dialogs/save-comp.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/* Evolution calendar - Delete calendar component dialog
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Author: Federico Mena-Quintero <federico@ximian.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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <glib.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-messagebox.h>
-#include <libgnomeui/gnome-stock.h>
-#include <gal/widgets/e-unicode.h>
-#include "save-comp.h"
-
-
-
-/**
- * save_component_dialog:
- * @parent: Window to use as the transient dialog's parent.
- *
- * Pops up a dialog box asking the user whether he wants to save changes for
- * a calendar component.
- *
- * Return value: TRUE if changes shold be saved, FALSE otherwise.
- **/
-gint
-save_component_dialog (GtkWindow *parent)
-{
- GtkWidget *dialog;
-
- dialog = gnome_message_box_new (_("Do you want to save changes?"),
- GNOME_MESSAGE_BOX_QUESTION,
- GNOME_STOCK_BUTTON_YES,
- GNOME_STOCK_BUTTON_NO,
- GNOME_STOCK_BUTTON_CANCEL,
- NULL);
-
- gnome_dialog_set_default (GNOME_DIALOG (dialog), 0);
- gnome_dialog_grab_focus (GNOME_DIALOG (dialog), 0);
- gnome_dialog_set_parent (GNOME_DIALOG (dialog), parent);
-
- return gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
-}
diff --git a/calendar/gui/dialogs/save-comp.h b/calendar/gui/dialogs/save-comp.h
deleted file mode 100644
index 8b1db3c503..0000000000
--- a/calendar/gui/dialogs/save-comp.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Evolution calendar - Delete calendar component dialog
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Author: Federico Mena-Quintero <federico@ximian.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 SAVE_COMP_H
-#define SAVE_COMP_H
-
-#include <gtk/gtkwindow.h>
-
-gint save_component_dialog (GtkWindow *parent);
-
-#endif
diff --git a/calendar/gui/dialogs/task-editor-dialog.glade b/calendar/gui/dialogs/task-editor-dialog.glade
deleted file mode 100644
index ae7ea9681a..0000000000
--- a/calendar/gui/dialogs/task-editor-dialog.glade
+++ /dev/null
@@ -1,695 +0,0 @@
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <name>task-editor-dialog</name>
- <program_name>task-editor-dialog</program_name>
- <directory></directory>
- <source_directory>src</source_directory>
- <pixmaps_directory>pixmaps</pixmaps_directory>
- <language>C</language>
- <gnome_support>True</gnome_support>
- <gettext_support>True</gettext_support>
-</project>
-
-<widget>
- <class>GnomePropertyBox</class>
- <name>task-editor-dialog</name>
- <visible>False</visible>
- <position>GTK_WIN_POS_NONE</position>
- <modal>False</modal>
- <allow_shrink>False</allow_shrink>
- <allow_grow>False</allow_grow>
- <auto_shrink>False</auto_shrink>
-
- <widget>
- <class>GtkNotebook</class>
- <child_name>GnomeDock:contents</child_name>
- <name>notebook1</name>
- <border_width>2</border_width>
- <can_focus>True</can_focus>
- <show_tabs>True</show_tabs>
- <show_border>True</show_border>
- <tab_pos>GTK_POS_TOP</tab_pos>
- <scrollable>False</scrollable>
- <tab_hborder>2</tab_hborder>
- <tab_vborder>2</tab_vborder>
- <popup_enable>False</popup_enable>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox1</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
-
- <widget>
- <class>GtkTable</class>
- <name>table3</name>
- <rows>1</rows>
- <columns>2</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>4</row_spacing>
- <column_spacing>4</column_spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label3</name>
- <label>Su_mmary:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <default_focus_target>summary</default_focus_target>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>False</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>summary</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame2</name>
- <label>Date &amp; Time</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox4</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkTable</class>
- <name>table1</name>
- <rows>2</rows>
- <columns>2</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>2</row_spacing>
- <column_spacing>4</column_spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label6</name>
- <label>Sta_rt Date:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label5</name>
- <label>_Due Date:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>due-date</name>
- <creation_function>task_editor_create_date_edit</creation_function>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Sun, 10 Sep 2000 17:32:18 GMT</last_modification_time>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>start-date</name>
- <creation_function>task_editor_create_date_edit</creation_function>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Sun, 10 Sep 2000 17:33:31 GMT</last_modification_time>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkScrolledWindow</class>
- <name>scrolledwindow1</name>
- <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
- <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
- <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
- <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkText</class>
- <name>description</name>
- <height>80</height>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text></text>
- </widget>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame23</name>
- <label>Progress</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox3</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
-
- <widget>
- <class>GtkLabel</class>
- <name>label7</name>
- <label>_Status:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <default_focus_target>status</default_focus_target>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkOptionMenu</class>
- <name>status</name>
- <can_focus>True</can_focus>
- <items>Not Started
-In Progress
-Completed
-Cancelled
-</items>
- <initial_choice>0</initial_choice>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label8</name>
- <label>_Priority:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <default_focus_target>priority</default_focus_target>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkOptionMenu</class>
- <name>priority</name>
- <can_focus>True</can_focus>
- <items>High
-Normal
-Low
-Undefined
-</items>
- <initial_choice>0</initial_choice>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label9</name>
- <label>% Comp_lete:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <default_focus_target>percent-complete</default_focus_target>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkSpinButton</class>
- <name>percent-complete</name>
- <width>60</width>
- <can_focus>True</can_focus>
- <climb_rate>1</climb_rate>
- <digits>0</digits>
- <numeric>False</numeric>
- <update_policy>GTK_UPDATE_ALWAYS</update_policy>
- <snap>False</snap>
- <wrap>False</wrap>
- <value>0</value>
- <lower>0</lower>
- <upper>100</upper>
- <step>10</step>
- <page>10</page>
- <page_size>10</page_size>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame24</name>
- <label>Classification</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox6</name>
- <border_width>2</border_width>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
-
- <widget>
- <class>GtkRadioButton</class>
- <name>classification-public</name>
- <can_focus>True</can_focus>
- <label>Pu_blic</label>
- <active>True</active>
- <draw_indicator>True</draw_indicator>
- <group>classification_radio_group</group>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkRadioButton</class>
- <name>classification-private</name>
- <can_focus>True</can_focus>
- <label>Pri_vate</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <group>classification_radio_group</group>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkRadioButton</class>
- <name>classification-confidential</name>
- <can_focus>True</can_focus>
- <label>_Confidential</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <group>classification_radio_group</group>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox2</name>
- <homogeneous>False</homogeneous>
- <spacing>2</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>contacts-button</name>
- <can_focus>True</can_focus>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label16</name>
- <label>_Contacts...</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>4</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>contacts</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>categories-button</name>
- <can_focus>True</can_focus>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label17</name>
- <label>Ca_tegories...</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>4</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>categories</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label1</name>
- <label>Task</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
-
- <widget>
- <class>GtkTable</class>
- <name>table4</name>
- <border_width>4</border_width>
- <rows>2</rows>
- <columns>2</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>2</row_spacing>
- <column_spacing>4</column_spacing>
-
- <widget>
- <class>GtkLabel</class>
- <name>label12</name>
- <label>Date Completed:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label14</name>
- <label>URL:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>url</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>completed-date</name>
- <creation_function>task_editor_create_date_edit</creation_function>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Sun, 10 Sep 2000 17:34:07 GMT</last_modification_time>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label2</name>
- <label>Details</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
-</widget>
-
-</GTK-Interface>
diff --git a/calendar/gui/dialogs/task-editor.c b/calendar/gui/dialogs/task-editor.c
deleted file mode 100644
index 30e5987eea..0000000000
--- a/calendar/gui/dialogs/task-editor.c
+++ /dev/null
@@ -1,1288 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <damon@ximian.com>
- *
- * Copyright 2000, Helix Code, Inc.
- * Copyright 2000, Ximian, 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
- */
-
-/*
- * TaskEditor - a GtkObject which handles a libglade-loaded dialog to edit
- * tasks.
- */
-
-#include <config.h>
-#include <glade/glade.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <gal/util/e-util.h>
-#include <gal/widgets/e-unicode.h>
-#include <gal/widgets/e-categories.h>
-#include <e-util/e-dialog-widgets.h>
-#include <widgets/misc/e-dateedit.h>
-#include <cal-util/timeutil.h>
-#include "delete-comp.h"
-#include "save-comp.h"
-#include "task-editor.h"
-#include "../calendar-config.h"
-#include "../widget-util.h"
-
-
-typedef struct {
- /* Glade XML data */
- GladeXML *xml;
-
- /* Client to use */
- CalClient *client;
-
- /* Calendar component we are editing; this is an internal copy and is
- * not one of the read-only objects from the parent calendar.
- */
- CalComponent *comp;
-
-
- /* This is TRUE while we are setting the widget values. We just return
- from any signal handlers. */
- gboolean ignore_callbacks;
-
- /* Widgets from the Glade file */
-
- GtkWidget *app;
-
- GtkWidget *summary;
-
- GtkWidget *due_date;
- GtkWidget *start_date;
-
- GtkWidget *percent_complete;
-
- GtkWidget *status;
- GtkWidget *priority;
-
- GtkWidget *description;
-
- GtkWidget *classification_public;
- GtkWidget *classification_private;
- GtkWidget *classification_confidential;
-
- GtkWidget *contacts;
- GtkWidget *categories_btn;
- GtkWidget *categories;
-
- GtkWidget *completed_date;
- GtkWidget *url;
-
- /* Call task_editor_set_changed() to set this to TRUE when any field
- in the dialog is changed. When the user closes the dialog we will
- prompt to save changes. */
- gboolean changed;
-} TaskEditorPrivate;
-
-
-/* Note that these two arrays must match. */
-static const int status_map[] = {
- ICAL_STATUS_NEEDSACTION,
- ICAL_STATUS_INPROCESS,
- ICAL_STATUS_COMPLETED,
- ICAL_STATUS_CANCELLED,
- -1
-};
-
-typedef enum {
- PRIORITY_HIGH,
- PRIORITY_NORMAL,
- PRIORITY_LOW,
- PRIORITY_UNDEFINED,
-} TaskEditorPriority;
-
-static const int priority_map[] = {
- PRIORITY_HIGH,
- PRIORITY_NORMAL,
- PRIORITY_LOW,
- PRIORITY_UNDEFINED,
- -1
-};
-
-static const int classification_map[] = {
- CAL_COMPONENT_CLASS_PUBLIC,
- CAL_COMPONENT_CLASS_PRIVATE,
- CAL_COMPONENT_CLASS_CONFIDENTIAL,
- -1
-};
-
-static void task_editor_class_init (TaskEditorClass *class);
-static void task_editor_init (TaskEditor *tedit);
-static void tedit_apply_event_cb (GtkWidget *widget, gint page_num, gpointer data);
-static gint tedit_close_event_cb (GtkWidget *widget, gpointer data);
-static gint tedit_delete_event_cb (GtkWidget *widget, GdkEvent *event, gpointer data);
-static void close_dialog (TaskEditor *tedit);
-static gboolean get_widgets (TaskEditor *tedit);
-static void init_widgets (TaskEditor *tedit);
-static void task_editor_destroy (GtkObject *object);
-static char * make_title_from_comp (CalComponent *comp);
-static void set_title_from_comp (TaskEditor *tedit, CalComponent *comp);
-static void clear_widgets (TaskEditor *tedit);
-static void fill_widgets (TaskEditor *tedit);
-
-static void save_todo_object (TaskEditor *tedit);
-static void dialog_to_comp_object (TaskEditor *tedit);
-
-static void obj_updated_cb (CalClient *client, const char *uid, gpointer data);
-static void obj_removed_cb (CalClient *client, const char *uid, gpointer data);
-static void raise_and_focus (GtkWidget *widget);
-
-static TaskEditorPriority priority_value_to_index (int priority_value);
-static int priority_index_to_value (TaskEditorPriority priority);
-
-static void completed_changed (EDateEdit *dedit,
- TaskEditor *tedit);
-static void status_changed (GtkMenu *menu,
- TaskEditor *tedit);
-static void percent_complete_changed (GtkAdjustment *adj,
- TaskEditor *tedit);
-static void field_changed (GtkWidget *widget,
- TaskEditor *tedit);
-static void task_editor_set_changed (TaskEditor *tedit,
- gboolean changed);
-static gboolean prompt_to_save_changes (TaskEditor *tedit);
-static CalComponentClassification classification_get (GtkWidget *widget);
-static void categories_clicked (GtkWidget *button,
- TaskEditor *editor);
-
-/* The function libglade calls to create the EDateEdit widgets in the GUI. */
-GtkWidget * task_editor_create_date_edit (void);
-
-static GtkObjectClass *parent_class;
-
-E_MAKE_TYPE(task_editor, "TaskEditor", TaskEditor,
- task_editor_class_init, task_editor_init, GTK_TYPE_OBJECT)
-
-
-static void
-task_editor_class_init (TaskEditorClass *class)
-{
- GtkObjectClass *object_class;
-
- object_class = (GtkObjectClass *) class;
-
- parent_class = gtk_type_class (GTK_TYPE_OBJECT);
-
- object_class->destroy = task_editor_destroy;
-}
-
-
-static void
-task_editor_init (TaskEditor *tedit)
-{
- TaskEditorPrivate *priv;
-
- priv = g_new0 (TaskEditorPrivate, 1);
- tedit->priv = priv;
-
- priv->ignore_callbacks = FALSE;
-
- task_editor_set_changed (tedit, FALSE);
-}
-
-
-/**
- * task_editor_new:
- * @Returns: a new #TaskEditor.
- *
- * Creates a new #TaskEditor.
- **/
-TaskEditor *
-task_editor_new (void)
-{
- TaskEditor *tedit;
-
- tedit = TASK_EDITOR (gtk_type_new (task_editor_get_type ()));
- return task_editor_construct (tedit);
-}
-
-/**
- * task_editor_construct:
- * @tedit: A #TaskEditor.
- *
- * Constructs a task editor by loading its Glade XML file.
- *
- * Return value: The same object as @tedit, or NULL if the widgets could not be
- * created. In the latter case, the task editor will automatically be
- * destroyed.
- **/
-TaskEditor *
-task_editor_construct (TaskEditor *tedit)
-{
- TaskEditorPrivate *priv;
-
- g_return_val_if_fail (tedit != NULL, NULL);
- g_return_val_if_fail (IS_TASK_EDITOR (tedit), NULL);
-
- priv = tedit->priv;
-
- /* Load the content widgets */
-
- priv->xml = glade_xml_new (EVOLUTION_GLADEDIR "/task-editor-dialog.glade", NULL);
- if (!priv->xml) {
- g_message ("task_editor_construct(): Could not load the Glade XML file!");
- goto error;
- }
-
- if (!get_widgets (tedit)) {
- g_message ("task_editor_construct(): Could not find all widgets in the XML file!");
- goto error;
- }
-
- init_widgets (tedit);
-
- /* Hook to destruction of the dialog */
- gtk_signal_connect (GTK_OBJECT (priv->app), "apply",
- GTK_SIGNAL_FUNC (tedit_apply_event_cb), tedit);
- gtk_signal_connect (GTK_OBJECT (priv->app), "close",
- GTK_SIGNAL_FUNC (tedit_close_event_cb), tedit);
- gtk_signal_connect (GTK_OBJECT (priv->app), "delete_event",
- GTK_SIGNAL_FUNC (tedit_delete_event_cb), tedit);
-
- /* Add focus to the summary entry */
- gtk_widget_grab_focus (GTK_WIDGET (priv->summary));
-
-
- return tedit;
-
- error:
-
- gtk_object_unref (GTK_OBJECT (tedit));
- return NULL;
-}
-
-
-/* Called by libglade to create our custom EDateEdit widgets. */
-GtkWidget *
-task_editor_create_date_edit (void)
-{
- GtkWidget *dedit;
-
- dedit = date_edit_new (TRUE, TRUE);
- e_date_edit_set_allow_no_date_set (E_DATE_EDIT (dedit), TRUE);
-
- return dedit;
-}
-
-/* Callback used when the dialog box is destroyed */
-static void
-tedit_apply_event_cb (GtkWidget *widget, gint page_num, gpointer data)
-{
- TaskEditor *tedit;
-
- g_return_if_fail (IS_TASK_EDITOR (data));
-
- tedit = TASK_EDITOR (data);
-
- if (page_num != -1)
- return;
-
- save_todo_object (tedit);
-}
-
-/* Callback used when the dialog box is destroyed */
-static gint
-tedit_close_event_cb (GtkWidget *widget, gpointer data)
-{
- TaskEditor *tedit;
-
- g_return_val_if_fail (IS_TASK_EDITOR (data), TRUE);
-
- tedit = TASK_EDITOR (data);
-
- if (prompt_to_save_changes (tedit))
- close_dialog (tedit);
-
- return TRUE;
-}
-
-/* Callback used when the dialog box is destroyed */
-static gint
-tedit_delete_event_cb (GtkWidget *widget, GdkEvent *event, gpointer data)
-{
- TaskEditor *tedit;
-
- g_return_val_if_fail (IS_TASK_EDITOR (data), TRUE);
-
- tedit = TASK_EDITOR (data);
-
- if (prompt_to_save_changes (tedit))
- close_dialog (tedit);
-
- return TRUE;
-}
-
-
-/* Closes the dialog box and emits the appropriate signals */
-static void
-close_dialog (TaskEditor *tedit)
-{
- TaskEditorPrivate *priv;
-
- priv = tedit->priv;
-
- g_assert (priv->app != NULL);
-
- gtk_object_destroy (GTK_OBJECT (tedit));
-}
-
-
-/* Gets the widgets from the XML file and returns if they are all available.
- * For the widgets whose values can be simply set with e-dialog-utils, it does
- * that as well.
- */
-static gboolean
-get_widgets (TaskEditor *tedit)
-{
- TaskEditorPrivate *priv;
-
- priv = tedit->priv;
-
-#define GW(name) glade_xml_get_widget (priv->xml, name)
-
- priv->app = GW ("task-editor-dialog");
-
- priv->summary = GW ("summary");
-
- priv->due_date = GW ("due-date");
- priv->start_date = GW ("start-date");
-
- priv->percent_complete = GW ("percent-complete");
-
- priv->status = GW ("status");
- priv->priority = GW ("priority");
-
- priv->description = GW ("description");
-
- priv->classification_public = GW ("classification-public");
- priv->classification_private = GW ("classification-private");
- priv->classification_confidential = GW ("classification-confidential");
-
- priv->contacts = GW ("contacts");
- priv->categories_btn = GW ("categories-button");
- priv->categories = GW ("categories");
-
- priv->completed_date = GW ("completed-date");
- priv->url = GW ("url");
-
-#undef GW
-
- return (priv->app
- && priv->summary
- && priv->due_date
- && priv->start_date
- && priv->percent_complete
- && priv->status
- && priv->priority
- && priv->classification_public
- && priv->classification_private
- && priv->classification_confidential
- && priv->description
- && priv->contacts
- && priv->categories_btn
- && priv->categories
- && priv->completed_date
- && priv->url);
-}
-
-
-/* Hooks the widget signals */
-static void
-init_widgets (TaskEditor *tedit)
-{
- TaskEditorPrivate *priv;
-
- priv = tedit->priv;
-
- /* Connect signals. The Status, Percent Complete & Date Completed
- properties are closely related so whenever one changes we may need
- to update the other 2. */
- gtk_signal_connect (GTK_OBJECT (priv->completed_date), "changed",
- GTK_SIGNAL_FUNC (completed_changed), tedit);
-
- gtk_signal_connect (GTK_OBJECT (GTK_OPTION_MENU (priv->status)->menu),
- "deactivate",
- GTK_SIGNAL_FUNC (status_changed), tedit);
-
- gtk_signal_connect (GTK_OBJECT (GTK_SPIN_BUTTON (priv->percent_complete)->adjustment),
- "value_changed",
- GTK_SIGNAL_FUNC (percent_complete_changed), tedit);
-
- /* Classification */
- gtk_signal_connect (GTK_OBJECT (priv->description), "changed",
- GTK_SIGNAL_FUNC (field_changed), tedit);
- gtk_signal_connect (GTK_OBJECT (priv->classification_public),
- "toggled",
- GTK_SIGNAL_FUNC (field_changed), tedit);
- gtk_signal_connect (GTK_OBJECT (priv->classification_private),
- "toggled",
- GTK_SIGNAL_FUNC (field_changed), tedit);
- gtk_signal_connect (GTK_OBJECT (priv->classification_confidential),
- "toggled",
- GTK_SIGNAL_FUNC (field_changed), tedit);
-
- /* Connect the default signal handler to use to make sure the "changed"
- field gets set whenever a field is changed. */
- gtk_signal_connect (GTK_OBJECT (priv->summary), "changed",
- GTK_SIGNAL_FUNC (field_changed), tedit);
- gtk_signal_connect (GTK_OBJECT (priv->due_date), "changed",
- GTK_SIGNAL_FUNC (field_changed), tedit);
- gtk_signal_connect (GTK_OBJECT (priv->start_date), "changed",
- GTK_SIGNAL_FUNC (field_changed), tedit);
- gtk_signal_connect (GTK_OBJECT (GTK_OPTION_MENU (priv->priority)->menu),
- "deactivate",
- GTK_SIGNAL_FUNC (field_changed), tedit);
- gtk_signal_connect (GTK_OBJECT (priv->description), "changed",
- GTK_SIGNAL_FUNC (field_changed), tedit);
- gtk_signal_connect (GTK_OBJECT (priv->contacts), "changed",
- GTK_SIGNAL_FUNC (field_changed), tedit);
- gtk_signal_connect (GTK_OBJECT (priv->categories), "changed",
- GTK_SIGNAL_FUNC (field_changed), tedit);
- gtk_signal_connect (GTK_OBJECT (priv->url), "changed",
- GTK_SIGNAL_FUNC (field_changed), tedit);
-
- /* Button clicks */
- gtk_signal_connect (GTK_OBJECT (priv->categories_btn), "clicked",
- GTK_SIGNAL_FUNC (categories_clicked), tedit);
-}
-
-static void
-task_editor_destroy (GtkObject *object)
-{
- TaskEditor *tedit;
- TaskEditorPrivate *priv;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_TASK_EDITOR (object));
-
- tedit = TASK_EDITOR (object);
- priv = tedit->priv;
-
- if (priv->app) {
- gtk_widget_destroy (priv->app);
- priv->app = NULL;
- }
-
- if (priv->comp) {
- gtk_object_unref (GTK_OBJECT (priv->comp));
- priv->comp = NULL;
- }
-
- if (priv->client) {
- gtk_signal_disconnect_by_data (GTK_OBJECT (priv->client),
- tedit);
- gtk_object_unref (GTK_OBJECT (priv->client));
- priv->client = NULL;
- }
-
- if (priv->xml) {
- gtk_object_unref (GTK_OBJECT (priv->xml));
- priv->xml = NULL;
- }
-
- g_free (priv);
- tedit->priv = NULL;
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-
-void
-task_editor_set_cal_client (TaskEditor *tedit,
- CalClient *client)
-{
- TaskEditorPrivate *priv;
-
- g_return_if_fail (tedit != NULL);
- g_return_if_fail (IS_TASK_EDITOR (tedit));
-
- priv = tedit->priv;
-
- if (client == priv->client)
- return;
-
- if (client)
- g_return_if_fail (IS_CAL_CLIENT (client));
-
- if (client)
- g_return_if_fail (cal_client_get_load_state (client) == CAL_CLIENT_LOAD_LOADED);
-
- if (client)
- gtk_object_ref (GTK_OBJECT (client));
-
- if (priv->client) {
- gtk_signal_disconnect_by_data (GTK_OBJECT (priv->client),
- tedit);
- gtk_object_unref (GTK_OBJECT (priv->client));
- }
-
- priv->client = client;
-
- if (priv->client) {
- gtk_signal_connect (GTK_OBJECT (priv->client), "obj_updated",
- GTK_SIGNAL_FUNC (obj_updated_cb), tedit);
- gtk_signal_connect (GTK_OBJECT (priv->client), "obj_removed",
- GTK_SIGNAL_FUNC (obj_removed_cb), tedit);
- }
-}
-
-
-/* Callback used when the calendar client tells us that an object changed */
-static void
-obj_updated_cb (CalClient *client, const char *uid, gpointer data)
-{
- /* FIXME: Do something sensible if the component changes under our feet */
-#if 0
- TaskEditor *tedit;
- TaskEditorPrivate *priv;
- CalComponent *comp;
- CalClientGetStatus status;
- const gchar *editing_uid;
-
- tedit = TASK_EDITOR (data);
-
- g_return_if_fail (IS_TASK_EDITOR (tedit));
-
- priv = tedit->priv;
-
- /* If we aren't showing the object which has been updated, return. */
- if (!priv->comp)
- return;
- cal_component_get_uid (priv->comp, &editing_uid);
- if (strcmp (uid, editing_uid))
- return;
-
-
- /* Get the task from the server. */
- status = cal_client_get_object (priv->client, uid, &comp);
-
- switch (status) {
- case CAL_CLIENT_GET_SUCCESS:
- /* Everything is fine */
- break;
-
- case CAL_CLIENT_GET_SYNTAX_ERROR:
- g_message ("obj_updated_cb(): Syntax error when getting object `%s'", uid);
- return;
-
- case CAL_CLIENT_GET_NOT_FOUND:
- /* The object is no longer in the server, so do nothing */
- return;
-
- default:
- g_assert_not_reached ();
- return;
- }
-
- raise_and_focus (priv->app);
-#endif
-}
-
-/* Callback used when the calendar client tells us that an object was removed */
-static void
-obj_removed_cb (CalClient *client, const char *uid, gpointer data)
-{
- /* FIXME: Do something sensible if the component is removed under our
- * feet.
- */
-#if 0
- TaskEditor *tedit;
- TaskEditorPrivate *priv;
- const gchar *editing_uid;
-
- tedit = TASK_EDITOR (data);
-
- g_return_if_fail (tedit != NULL);
- g_return_if_fail (IS_TASK_EDITOR (tedit));
-
- priv = tedit->priv;
-
- /* If we aren't showing the object which has been updated, return. */
- if (!priv->comp)
- return;
- cal_component_get_uid (priv->comp, &editing_uid);
- if (strcmp (uid, editing_uid))
- return;
-
-
- raise_and_focus (priv->app);
-#endif
-}
-
-
-/* Brings attention to a window by raising it and giving it focus */
-static void
-raise_and_focus (GtkWidget *widget)
-{
- g_assert (GTK_WIDGET_REALIZED (widget));
- gdk_window_show (widget->window);
- gtk_widget_grab_focus (widget);
-}
-
-
-/**
- * task_editor_set_todo_object:
- * @tedit: A #TaskEditor.
- * @comp: A todo object.
- *
- * Sets the todo object that a task editor dialog will manipulate.
- **/
-void
-task_editor_set_todo_object (TaskEditor *tedit,
- CalComponent *comp)
-{
- TaskEditorPrivate *priv;
-
- g_return_if_fail (tedit != NULL);
- g_return_if_fail (IS_TASK_EDITOR (tedit));
-
- priv = tedit->priv;
-
- if (priv->comp) {
- gtk_object_unref (GTK_OBJECT (priv->comp));
- priv->comp = NULL;
- }
-
- if (comp)
- priv->comp = cal_component_clone (comp);
-
- set_title_from_comp (tedit, priv->comp);
- fill_widgets (tedit);
-}
-
-void
-task_editor_focus (TaskEditor *tedit)
-{
- TaskEditorPrivate *priv;
-
- g_return_if_fail (tedit != NULL);
- g_return_if_fail (IS_TASK_EDITOR (tedit));
-
- priv = tedit->priv;
- gtk_widget_show_now (priv->app);
- raise_and_focus (priv->app);
-}
-
-/* Creates an appropriate title for the task editor dialog */
-static char *
-make_title_from_comp (CalComponent *comp)
-{
- const char *summary;
- CalComponentVType type;
- CalComponentText text;
-
- if (!comp)
- return g_strdup (_("Edit Task"));
-
- cal_component_get_summary (comp, &text);
- if (text.value)
- summary = text.value;
- else
- summary = _("No summary");
-
-
- type = cal_component_get_vtype (comp);
- switch (type) {
- case CAL_COMPONENT_EVENT:
- return g_strdup_printf (_("Appointment - %s"), summary);
-
- case CAL_COMPONENT_TODO:
- return g_strdup_printf (_("Task - %s"), summary);
-
- case CAL_COMPONENT_JOURNAL:
- return g_strdup_printf (_("Journal entry - %s"), summary);
-
- default:
- g_message ("make_title_from_comp(): Cannot handle object of type %d", type);
- return NULL;
- }
-}
-
-/* Sets the event editor's window title from a calendar component */
-static void
-set_title_from_comp (TaskEditor *tedit, CalComponent *comp)
-{
- TaskEditorPrivate *priv;
- char *title, *tmp;
-
- priv = tedit->priv;
-
- title = make_title_from_comp (comp);
- tmp = e_utf8_to_gtk_string (priv->app, title);
- g_free (title);
-
- if (tmp) {
- gtk_window_set_title (GTK_WINDOW (priv->app), tmp);
- g_free (tmp);
- } else {
- g_message ("set_title_from_comp(): Could not convert the title from UTF8");
- gtk_window_set_title (GTK_WINDOW (priv->app), "");
- }
-}
-
-/* Fills the widgets with default values */
-static void
-clear_widgets (TaskEditor *tedit)
-{
- TaskEditorPrivate *priv;
-
- priv = tedit->priv;
-
-
-}
-
-/* Fills in the widgets with the proper values */
-static void
-fill_widgets (TaskEditor *tedit)
-{
- TaskEditorPrivate *priv;
- CalComponentText text;
- CalComponentDateTime d;
- CalComponentClassification cl;
- struct icaltimetype *completed;
- GSList *l;
- time_t t;
- int *priority_value, *percent;
- icalproperty_status status;
- TaskEditorPriority priority;
- const char *url;
- const char *categories;
-
- priv = tedit->priv;
-
- task_editor_set_changed (tedit, FALSE);
-
- clear_widgets (tedit);
-
- if (!priv->comp)
- return;
-
- /* We want to ignore any signals emitted while changing fields. */
- priv->ignore_callbacks = TRUE;
-
-
- cal_component_get_summary (priv->comp, &text);
- e_dialog_editable_set (priv->summary, text.value);
-
- cal_component_get_description_list (priv->comp, &l);
- if (l) {
- text = *(CalComponentText *)l->data;
- e_dialog_editable_set (priv->description, text.value);
- } else {
- e_dialog_editable_set (priv->description, NULL);
- }
- cal_component_free_text_list (l);
-
- /* Due Date. */
- cal_component_get_due (priv->comp, &d);
- if (d.value) {
- t = icaltime_as_timet (*d.value);
- } else {
- t = -1;
- }
- e_date_edit_set_time (E_DATE_EDIT (priv->due_date), t);
-
- /* Start Date. */
- cal_component_get_dtstart (priv->comp, &d);
- if (d.value) {
- t = icaltime_as_timet (*d.value);
- } else {
- t = -1;
- }
- e_date_edit_set_time (E_DATE_EDIT (priv->start_date), t);
-
- /* Completed Date. */
- cal_component_get_completed (priv->comp, &completed);
- if (completed) {
- t = icaltime_as_timet (*completed);
- cal_component_free_icaltimetype (completed);
- } else {
- t = -1;
- }
- e_date_edit_set_time (E_DATE_EDIT (priv->completed_date), t);
-
- /* Percent Complete. */
- cal_component_get_percent (priv->comp, &percent);
- if (percent) {
- e_dialog_spin_set (priv->percent_complete, *percent);
- cal_component_free_percent (percent);
- } else {
- /* FIXME: Could check if task is completed and set 100%. */
- e_dialog_spin_set (priv->percent_complete, 0);
- }
-
- /* Status. */
- cal_component_get_status (priv->comp, &status);
- if (status == ICAL_STATUS_NONE) {
- /* Try to user the percent value. */
- if (percent) {
- if (*percent == 0)
- status = ICAL_STATUS_NEEDSACTION;
- else if (*percent == 100)
- status = ICAL_STATUS_COMPLETED;
- else
- status = ICAL_STATUS_INPROCESS;
- } else
- status = ICAL_STATUS_NEEDSACTION;
- }
- e_dialog_option_menu_set (priv->status, status, status_map);
-
- /* Priority. */
- cal_component_get_priority (priv->comp, &priority_value);
- if (priority_value) {
- priority = priority_value_to_index (*priority_value);
- cal_component_free_priority (priority_value);
- } else {
- priority = PRIORITY_UNDEFINED;
- }
- e_dialog_option_menu_set (priv->priority, priority, priority_map);
-
-
- /* Classification. */
- cal_component_get_classification (priv->comp, &cl);
-
- switch (cl) {
- case CAL_COMPONENT_CLASS_PUBLIC:
- e_dialog_radio_set (priv->classification_public, CAL_COMPONENT_CLASS_PUBLIC,
- classification_map);
- case CAL_COMPONENT_CLASS_PRIVATE:
- e_dialog_radio_set (priv->classification_public, CAL_COMPONENT_CLASS_PRIVATE,
- classification_map);
- case CAL_COMPONENT_CLASS_CONFIDENTIAL:
- e_dialog_radio_set (priv->classification_public, CAL_COMPONENT_CLASS_CONFIDENTIAL,
- classification_map);
- default:
- /* What do do? We can't g_assert_not_reached() since it is a
- * value from an external file.
- */
- }
-
- /* Categories */
- cal_component_get_categories (priv->comp, &categories);
- e_dialog_editable_set (priv->categories, categories);
-
- /* URL. */
- cal_component_get_url (priv->comp, &url);
- e_dialog_editable_set (priv->url, url);
-
- priv->ignore_callbacks = FALSE;
-}
-
-
-static void
-save_todo_object (TaskEditor *tedit)
-{
- TaskEditorPrivate *priv;
-
- priv = tedit->priv;
-
- g_return_if_fail (priv->client != NULL);
-
- if (!priv->comp)
- return;
-
- dialog_to_comp_object (tedit);
- set_title_from_comp (tedit, priv->comp);
-
- if (!cal_client_update_object (priv->client, priv->comp))
- g_message ("save_todo_object(): Could not update the object!");
- else
- task_editor_set_changed (tedit, FALSE);
-}
-
-
-/* Get the values of the widgets in the event editor and put them in the iCalObject */
-static void
-dialog_to_comp_object (TaskEditor *tedit)
-{
- TaskEditorPrivate *priv;
- CalComponent *comp;
- CalComponentDateTime date;
- time_t t;
- icalproperty_status status;
- TaskEditorPriority priority;
- int priority_value, percent;
- char *url, *cat;
- char *str;
-
- priv = tedit->priv;
- comp = priv->comp;
-
- /* Summary. */
-
- str = e_dialog_editable_get (priv->summary);
- if (!str || strlen (str) == 0)
- cal_component_set_summary (comp, NULL);
- else {
- CalComponentText text;
-
- text.value = str;
- text.altrep = NULL;
-
- cal_component_set_summary (comp, &text);
- }
-
- if (str)
- g_free (str);
-
- /* Description */
-
- str = e_dialog_editable_get (priv->description);
- if (!str || strlen (str) == 0)
- cal_component_set_description_list (comp, NULL);
- else {
- GSList l;
- CalComponentText text;
-
- text.value = str;
- text.altrep = NULL;
- l.data = &text;
- l.next = NULL;
-
- cal_component_set_description_list (comp, &l);
- }
-
- if (!str)
- g_free (str);
-
- /* Dates */
-
- date.value = g_new (struct icaltimetype, 1);
- date.tzid = NULL;
-
- /* Due Date. */
- t = e_date_edit_get_time (E_DATE_EDIT (priv->due_date));
- if (t != -1) {
- *date.value = icaltime_from_timet (t, FALSE);
- cal_component_set_due (comp, &date);
- } else {
- cal_component_set_due (comp, NULL);
- }
-
- /* Start Date. */
- t = e_date_edit_get_time (E_DATE_EDIT (priv->start_date));
- if (t != -1) {
- *date.value = icaltime_from_timet (t, FALSE);
- cal_component_set_dtstart (comp, &date);
- } else {
- cal_component_set_dtstart (comp, NULL);
- }
-
- /* Completed Date. */
- t = e_date_edit_get_time (E_DATE_EDIT (priv->completed_date));
- if (t != -1) {
- *date.value = icaltime_from_timet (t, FALSE);
- cal_component_set_completed (comp, date.value);
- } else {
- cal_component_set_completed (comp, NULL);
- }
-
- g_free (date.value);
-
- /* Percent Complete. */
- percent = e_dialog_spin_get_int (priv->percent_complete);
- cal_component_set_percent (comp, &percent);
-
- /* Status. */
- status = e_dialog_option_menu_get (priv->status, status_map);
- cal_component_set_status (comp, status);
-
- /* Priority. */
- priority = e_dialog_option_menu_get (priv->priority, priority_map);
- priority_value = priority_index_to_value (priority);
- cal_component_set_priority (comp, &priority_value);
-
- /* Classification. */
- cal_component_set_classification (comp, classification_get (priv->classification_public));
-
- /* Categories */
- cat = e_dialog_editable_get (priv->categories);
- cal_component_set_categories (comp, cat);
-
- if (cat)
- g_free (cat);
-
- /* URL. */
- url = e_dialog_editable_get (priv->url);
- cal_component_set_url (comp, url);
-
- if (url)
- g_free (url);
-
- cal_component_commit_sequence (comp);
-}
-
-static TaskEditorPriority
-priority_value_to_index (int priority_value)
-{
- TaskEditorPriority retval;
-
- if (priority_value == 0)
- retval = PRIORITY_UNDEFINED;
- else if (priority_value <= 4)
- retval = PRIORITY_HIGH;
- else if (priority_value == 5)
- retval = PRIORITY_NORMAL;
- else
- retval = PRIORITY_LOW;
-
- return retval;
-}
-
-
-static int
-priority_index_to_value (TaskEditorPriority priority)
-{
- int retval;
-
- switch (priority) {
- case PRIORITY_UNDEFINED:
- retval = 0;
- break;
- case PRIORITY_HIGH:
- retval = 3;
- break;
- case PRIORITY_NORMAL:
- retval = 5;
- break;
- case PRIORITY_LOW:
- retval = 7;
- break;
- default:
- retval = -1;
- g_assert_not_reached ();
- break;
- }
-
- return retval;
-}
-
-
-static void
-completed_changed (EDateEdit *dedit,
- TaskEditor *tedit)
-{
- TaskEditorPrivate *priv;
- time_t t;
-
- g_return_if_fail (IS_TASK_EDITOR (tedit));
-
- priv = tedit->priv;
-
- if (priv->ignore_callbacks)
- return;
-
- task_editor_set_changed (tedit, TRUE);
-
- priv->ignore_callbacks = TRUE;
- t = e_date_edit_get_time (E_DATE_EDIT (priv->completed_date));
- if (t == -1) {
- /* If the 'Completed Date' is set to 'None', we set the
- status to 'Not Started' and the percent-complete to 0.
- The task may actually be partially-complete, but we leave
- it to the user to set those fields. */
- e_dialog_option_menu_set (priv->status, ICAL_STATUS_NEEDSACTION,
- status_map);
- e_dialog_spin_set (priv->percent_complete, 0);
- } else {
- e_dialog_option_menu_set (priv->status, ICAL_STATUS_COMPLETED,
- status_map);
- e_dialog_spin_set (priv->percent_complete, 100);
- }
- priv->ignore_callbacks = FALSE;
-}
-
-
-static void
-status_changed (GtkMenu *menu,
- TaskEditor *tedit)
-{
- TaskEditorPrivate *priv;
- icalproperty_status status;
-
- g_return_if_fail (IS_TASK_EDITOR (tedit));
-
- priv = tedit->priv;
-
- if (priv->ignore_callbacks)
- return;
-
- task_editor_set_changed (tedit, TRUE);
-
- status = e_dialog_option_menu_get (priv->status, status_map);
- priv->ignore_callbacks = TRUE;
- if (status == ICAL_STATUS_NEEDSACTION) {
- e_dialog_spin_set (priv->percent_complete, 0);
- e_date_edit_set_time (E_DATE_EDIT (priv->completed_date), -1);
- } else if (status == ICAL_STATUS_COMPLETED) {
- e_dialog_spin_set (priv->percent_complete, 100);
- e_date_edit_set_time (E_DATE_EDIT (priv->completed_date),
- time (NULL));
- }
- priv->ignore_callbacks = FALSE;
-}
-
-
-static void
-percent_complete_changed (GtkAdjustment *adj,
- TaskEditor *tedit)
-{
- TaskEditorPrivate *priv;
- gint percent;
- icalproperty_status status;
- time_t date_completed;
-
- g_return_if_fail (IS_TASK_EDITOR (tedit));
-
- priv = tedit->priv;
-
- if (priv->ignore_callbacks)
- return;
-
- task_editor_set_changed (tedit, TRUE);
-
- percent = e_dialog_spin_get_int (priv->percent_complete);
- priv->ignore_callbacks = TRUE;
-
- if (percent == 100) {
- date_completed = time (NULL);
- status = ICAL_STATUS_COMPLETED;
- } else {
- /* FIXME: Set to 'None'. */
- date_completed = time (NULL);
-
- if (percent == 0)
- status = ICAL_STATUS_NEEDSACTION;
- else
- status = ICAL_STATUS_INPROCESS;
- }
-
- e_date_edit_set_time (E_DATE_EDIT (priv->completed_date),
- date_completed);
- e_dialog_option_menu_set (priv->status, status, status_map);
-
- priv->ignore_callbacks = FALSE;
-}
-
-/* Decode the radio button group for classifications */
-static CalComponentClassification
-classification_get (GtkWidget *widget)
-{
- return e_dialog_radio_get (widget, classification_map);
-}
-
-
-/* This is called when all fields except those handled above (status, percent
- complete & completed date) are changed. It just sets the "changed" flag. */
-static void
-field_changed (GtkWidget *widget,
- TaskEditor *tedit)
-{
- TaskEditorPrivate *priv;
-
- g_return_if_fail (IS_TASK_EDITOR (tedit));
-
- priv = tedit->priv;
-
- if (priv->ignore_callbacks)
- return;
-
- task_editor_set_changed (tedit, TRUE);
-}
-
-
-static void
-task_editor_set_changed (TaskEditor *tedit,
- gboolean changed)
-{
- TaskEditorPrivate *priv;
-
- priv = tedit->priv;
-
-#if 0
- g_print ("In task_editor_set_changed: %s\n",
- changed ? "TRUE" : "FALSE");
-#endif
-
- priv->changed = changed;
-
- if (priv->app)
- gnome_property_box_set_state (GNOME_PROPERTY_BOX (priv->app), changed);
-}
-
-
-/* This checks if the "changed" field is set, and if so it prompts to save
- the changes using a "Save/Discard/Cancel" modal dialog. It then saves the
- changes if requested. It returns TRUE if the dialog should now be closed. */
-static gboolean
-prompt_to_save_changes (TaskEditor *tedit)
-{
- TaskEditorPrivate *priv;
-
- priv = tedit->priv;
-
- if (!priv->changed)
- return TRUE;
-
- switch (save_component_dialog (GTK_WINDOW (priv->app))) {
- case 0: /* Save */
- /* FIXME: If an error occurs here, we should popup a dialog
- and then return FALSE. */
- save_todo_object (tedit);
- return TRUE;
- case 1: /* Discard */
- return TRUE;
- case 2: /* Cancel */
- default:
- return FALSE;
- break;
- }
-
-}
-
-static void
-categories_clicked(GtkWidget *button, TaskEditor *tedit)
-{
- char *categories;
- GnomeDialog *dialog;
- int result;
- GtkWidget *entry;
-
- entry = ((TaskEditorPrivate *)tedit->priv)->categories;
- categories = e_utf8_gtk_entry_get_text (GTK_ENTRY (entry));
-
- dialog = GNOME_DIALOG (e_categories_new (categories));
- result = gnome_dialog_run (dialog);
- g_free (categories);
-
- if (result == 0) {
- gtk_object_get (GTK_OBJECT (dialog),
- "categories", &categories,
- NULL);
- e_utf8_gtk_entry_set_text (GTK_ENTRY (entry), categories);
- g_free (categories);
- }
- gtk_object_destroy (GTK_OBJECT (dialog));
-}
diff --git a/calendar/gui/dialogs/task-editor.h b/calendar/gui/dialogs/task-editor.h
deleted file mode 100644
index 7327803a72..0000000000
--- a/calendar/gui/dialogs/task-editor.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <damon@ximian.com>
- *
- * Copyright 2000, Helix Code, Inc.
- * Copyright 2000, Ximian, 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 _TASK_EDITOR_H_
-#define _TASK_EDITOR_H_
-
-#include <gtk/gtkobject.h>
-#include <libgnome/gnome-defs.h>
-#include <bonobo.h>
-#include <cal-client/cal-client.h>
-
-BEGIN_GNOME_DECLS
-
-
-#define TASK_EDITOR(obj) GTK_CHECK_CAST (obj, task_editor_get_type (), TaskEditor)
-#define TASK_EDITOR_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, task_editor_get_type (), TaskEditorClass)
-#define IS_TASK_EDITOR(obj) GTK_CHECK_TYPE (obj, task_editor_get_type ())
-
-
-typedef struct _TaskEditor TaskEditor;
-typedef struct _TaskEditorClass TaskEditorClass;
-
-struct _TaskEditor
-{
- GtkObject object;
-
- /* Private data */
- gpointer priv;
-};
-
-struct _TaskEditorClass
-{
- GtkObjectClass parent_class;
-};
-
-GtkType task_editor_get_type (void);
-TaskEditor* task_editor_construct (TaskEditor *tedit);
-TaskEditor* task_editor_new (void);
-void task_editor_set_cal_client (TaskEditor *tedit,
- CalClient *client);
-void task_editor_set_todo_object (TaskEditor *tedit,
- CalComponent *comp);
-void task_editor_focus (TaskEditor *tedit);
-
-
-
-END_GNOME_DECLS
-
-#endif /* _TASK_EDITOR_H_ */
diff --git a/calendar/gui/dialogs/task-page.glade b/calendar/gui/dialogs/task-page.glade
deleted file mode 100644
index ae7ea9681a..0000000000
--- a/calendar/gui/dialogs/task-page.glade
+++ /dev/null
@@ -1,695 +0,0 @@
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <name>task-editor-dialog</name>
- <program_name>task-editor-dialog</program_name>
- <directory></directory>
- <source_directory>src</source_directory>
- <pixmaps_directory>pixmaps</pixmaps_directory>
- <language>C</language>
- <gnome_support>True</gnome_support>
- <gettext_support>True</gettext_support>
-</project>
-
-<widget>
- <class>GnomePropertyBox</class>
- <name>task-editor-dialog</name>
- <visible>False</visible>
- <position>GTK_WIN_POS_NONE</position>
- <modal>False</modal>
- <allow_shrink>False</allow_shrink>
- <allow_grow>False</allow_grow>
- <auto_shrink>False</auto_shrink>
-
- <widget>
- <class>GtkNotebook</class>
- <child_name>GnomeDock:contents</child_name>
- <name>notebook1</name>
- <border_width>2</border_width>
- <can_focus>True</can_focus>
- <show_tabs>True</show_tabs>
- <show_border>True</show_border>
- <tab_pos>GTK_POS_TOP</tab_pos>
- <scrollable>False</scrollable>
- <tab_hborder>2</tab_hborder>
- <tab_vborder>2</tab_vborder>
- <popup_enable>False</popup_enable>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox1</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
-
- <widget>
- <class>GtkTable</class>
- <name>table3</name>
- <rows>1</rows>
- <columns>2</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>4</row_spacing>
- <column_spacing>4</column_spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label3</name>
- <label>Su_mmary:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <default_focus_target>summary</default_focus_target>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>False</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>summary</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame2</name>
- <label>Date &amp; Time</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox4</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkTable</class>
- <name>table1</name>
- <rows>2</rows>
- <columns>2</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>2</row_spacing>
- <column_spacing>4</column_spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label6</name>
- <label>Sta_rt Date:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label5</name>
- <label>_Due Date:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>due-date</name>
- <creation_function>task_editor_create_date_edit</creation_function>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Sun, 10 Sep 2000 17:32:18 GMT</last_modification_time>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>start-date</name>
- <creation_function>task_editor_create_date_edit</creation_function>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Sun, 10 Sep 2000 17:33:31 GMT</last_modification_time>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkScrolledWindow</class>
- <name>scrolledwindow1</name>
- <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
- <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
- <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
- <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkText</class>
- <name>description</name>
- <height>80</height>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text></text>
- </widget>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame23</name>
- <label>Progress</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox3</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
-
- <widget>
- <class>GtkLabel</class>
- <name>label7</name>
- <label>_Status:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <default_focus_target>status</default_focus_target>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkOptionMenu</class>
- <name>status</name>
- <can_focus>True</can_focus>
- <items>Not Started
-In Progress
-Completed
-Cancelled
-</items>
- <initial_choice>0</initial_choice>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label8</name>
- <label>_Priority:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <default_focus_target>priority</default_focus_target>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkOptionMenu</class>
- <name>priority</name>
- <can_focus>True</can_focus>
- <items>High
-Normal
-Low
-Undefined
-</items>
- <initial_choice>0</initial_choice>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label9</name>
- <label>% Comp_lete:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <default_focus_target>percent-complete</default_focus_target>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkSpinButton</class>
- <name>percent-complete</name>
- <width>60</width>
- <can_focus>True</can_focus>
- <climb_rate>1</climb_rate>
- <digits>0</digits>
- <numeric>False</numeric>
- <update_policy>GTK_UPDATE_ALWAYS</update_policy>
- <snap>False</snap>
- <wrap>False</wrap>
- <value>0</value>
- <lower>0</lower>
- <upper>100</upper>
- <step>10</step>
- <page>10</page>
- <page_size>10</page_size>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame24</name>
- <label>Classification</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox6</name>
- <border_width>2</border_width>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
-
- <widget>
- <class>GtkRadioButton</class>
- <name>classification-public</name>
- <can_focus>True</can_focus>
- <label>Pu_blic</label>
- <active>True</active>
- <draw_indicator>True</draw_indicator>
- <group>classification_radio_group</group>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkRadioButton</class>
- <name>classification-private</name>
- <can_focus>True</can_focus>
- <label>Pri_vate</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <group>classification_radio_group</group>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkRadioButton</class>
- <name>classification-confidential</name>
- <can_focus>True</can_focus>
- <label>_Confidential</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <group>classification_radio_group</group>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox2</name>
- <homogeneous>False</homogeneous>
- <spacing>2</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>contacts-button</name>
- <can_focus>True</can_focus>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label16</name>
- <label>_Contacts...</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>4</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>contacts</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>categories-button</name>
- <can_focus>True</can_focus>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label17</name>
- <label>Ca_tegories...</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>4</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>categories</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label1</name>
- <label>Task</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
-
- <widget>
- <class>GtkTable</class>
- <name>table4</name>
- <border_width>4</border_width>
- <rows>2</rows>
- <columns>2</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>2</row_spacing>
- <column_spacing>4</column_spacing>
-
- <widget>
- <class>GtkLabel</class>
- <name>label12</name>
- <label>Date Completed:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label14</name>
- <label>URL:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>url</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>completed-date</name>
- <creation_function>task_editor_create_date_edit</creation_function>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Sun, 10 Sep 2000 17:34:07 GMT</last_modification_time>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label2</name>
- <label>Details</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
-</widget>
-
-</GTK-Interface>
diff --git a/calendar/gui/e-calendar-table.c b/calendar/gui/e-calendar-table.c
deleted file mode 100644
index 83f54160c6..0000000000
--- a/calendar/gui/e-calendar-table.c
+++ /dev/null
@@ -1,852 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <damon@ximian.com>
- *
- * Copyright 2000, Helix Code, Inc.
- * Copyright 2000, Ximian, 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
- */
-
-/*
- * ECalendarTable - displays the CalComponent objects in a table (an ETable).
- * Used for calendar events and tasks.
- */
-
-#include <config.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <gal/e-table/e-table-scrolled.h>
-#include <gal/e-table/e-cell-checkbox.h>
-#include <gal/e-table/e-cell-toggle.h>
-#include <gal/e-table/e-cell-text.h>
-#include <gal/e-table/e-cell-combo.h>
-#include <widgets/misc/e-cell-date-edit.h>
-#include "e-calendar-table.h"
-#include "calendar-model.h"
-#include "dialogs/delete-comp.h"
-#include "dialogs/task-editor.h"
-
-/* Pixmaps. */
-#include "art/task.xpm"
-#include "art/task-recurring.xpm"
-#include "art/task-assigned.xpm"
-#include "art/task-assigned-to.xpm"
-
-#include "art/check-filled.xpm"
-
-
-static void e_calendar_table_class_init (ECalendarTableClass *class);
-static void e_calendar_table_init (ECalendarTable *cal_table);
-static void e_calendar_table_destroy (GtkObject *object);
-
-static void e_calendar_table_on_double_click (ETable *table,
- gint row,
- gint col,
- GdkEvent *event,
- ECalendarTable *cal_table);
-static gint e_calendar_table_on_right_click (ETable *table,
- gint row,
- gint col,
- GdkEventButton *event,
- ECalendarTable *cal_table);
-static void e_calendar_table_on_open_task (GtkWidget *menuitem,
- gpointer data);
-static void e_calendar_table_on_mark_task_complete (GtkWidget *menuitem,
- gpointer data);
-static void e_calendar_table_on_delete_task (GtkWidget *menuitem,
- gpointer data);
-static gint e_calendar_table_on_key_press (ETable *table,
- gint row,
- gint col,
- GdkEventKey *event,
- ECalendarTable *cal_table);
-
-static void e_calendar_table_open_task (ECalendarTable *cal_table,
- gint row);
-
-static void e_calendar_table_apply_filter (ECalendarTable *cal_table);
-static void e_calendar_table_on_model_changed (ETableModel *model,
- ECalendarTable *cal_table);
-static void e_calendar_table_on_rows_inserted (ETableModel *model,
- int row,
- int count,
- ECalendarTable *cal_table);
-static void e_calendar_table_on_rows_deleted (ETableModel *model,
- int row,
- int count,
- ECalendarTable *cal_table);
-
-
-/* The icons to represent the task. */
-#define E_CALENDAR_MODEL_NUM_ICONS 4
-static char** icon_xpm_data[E_CALENDAR_MODEL_NUM_ICONS] = {
- task_xpm, task_recurring_xpm, task_assigned_xpm, task_assigned_to_xpm
-};
-static GdkPixbuf* icon_pixbufs[E_CALENDAR_MODEL_NUM_ICONS] = { 0 };
-
-static GtkTableClass *parent_class;
-
-
-GtkType
-e_calendar_table_get_type (void)
-{
- static GtkType e_calendar_table_type = 0;
-
- if (!e_calendar_table_type){
- GtkTypeInfo e_calendar_table_info = {
- "ECalendarTable",
- sizeof (ECalendarTable),
- sizeof (ECalendarTableClass),
- (GtkClassInitFunc) e_calendar_table_class_init,
- (GtkObjectInitFunc) e_calendar_table_init,
- NULL, /* reserved 1 */
- NULL, /* reserved 2 */
- (GtkClassInitFunc) NULL
- };
-
- parent_class = gtk_type_class (GTK_TYPE_TABLE);
- e_calendar_table_type = gtk_type_unique (GTK_TYPE_TABLE,
- &e_calendar_table_info);
- }
-
- return e_calendar_table_type;
-}
-
-
-static void
-e_calendar_table_class_init (ECalendarTableClass *class)
-{
- GtkObjectClass *object_class;
- GtkWidgetClass *widget_class;
-
- object_class = (GtkObjectClass *) class;
- widget_class = (GtkWidgetClass *) class;
-
- /* Method override */
- object_class->destroy = e_calendar_table_destroy;
-
-#if 0
- widget_class->realize = e_calendar_table_realize;
- widget_class->unrealize = e_calendar_table_unrealize;
- widget_class->style_set = e_calendar_table_style_set;
- widget_class->size_allocate = e_calendar_table_size_allocate;
- widget_class->focus_in_event = e_calendar_table_focus_in;
- widget_class->focus_out_event = e_calendar_table_focus_out;
- widget_class->key_press_event = e_calendar_table_key_press;
-#endif
-}
-
-#ifdef JUST_FOR_TRANSLATORS
-static char *list [] = {
- N_("Categories"),
- N_("Classification"),
- N_("Completion Date"),
- N_("End Date"),
- N_("Start Date"),
- N_("Due Date"),
- N_("Geographical Position"),
- N_("Percent complete"),
- N_("Priority"),
- N_("Summary"),
- N_("Transparency"),
- N_("URL"),
- N_("Alarms"),
- N_("Click here to add a task")
-};
-#endif
-
-#define E_CALENDAR_TABLE_SPEC \
- "<ETableSpecification click-to-add=\"true\" " \
- " _click-to-add-message=\"Click here to add a task\" " \
- " draw-grid=\"true\">" \
- " <ETableColumn model_col= \"0\" _title=\"Categories\" " \
- " expansion=\"1.0\" minimum_width=\"10\" resizable=\"true\" " \
- " cell=\"calstring\" compare=\"string\"/>" \
- " <ETableColumn model_col= \"1\" _title=\"Classification\" " \
- " expansion=\"1.0\" minimum_width=\"10\" resizable=\"true\" " \
- " cell=\"classification\" compare=\"string\"/>" \
- " <ETableColumn model_col= \"2\" _title=\"Completion Date\" " \
- " expansion=\"2.0\" minimum_width=\"10\" resizable=\"true\" " \
- " cell=\"dateedit\" compare=\"string\"/>" \
- " <ETableColumn model_col= \"3\" _title=\"End Date\" " \
- " expansion=\"2.0\" minimum_width=\"10\" resizable=\"true\" " \
- " cell=\"dateedit\" compare=\"string\"/>" \
- " <ETableColumn model_col= \"4\" _title=\"Start Date\" " \
- " expansion=\"2.0\" minimum_width=\"10\" resizable=\"true\" " \
- " cell=\"dateedit\" compare=\"string\"/>" \
- " <ETableColumn model_col= \"5\" _title=\"Due Date\" " \
- " expansion=\"2.0\" minimum_width=\"10\" resizable=\"true\" " \
- " cell=\"dateedit\" compare=\"string\"/>" \
- " <ETableColumn model_col= \"6\" _title=\"Geographical Position\" " \
- " expansion=\"1.0\" minimum_width=\"10\" resizable=\"true\" " \
- " cell=\"calstring\" compare=\"string\"/>" \
- " <ETableColumn model_col= \"7\" _title=\"% Complete\" " \
- " expansion=\"1.0\" minimum_width=\"10\" resizable=\"true\" " \
- " cell=\"percent\" compare=\"string\"/>" \
- " <ETableColumn model_col= \"8\" _title=\"Priority\" " \
- " expansion=\"1.0\" minimum_width=\"10\" resizable=\"true\" " \
- " cell=\"priority\" compare=\"string\"/>" \
- " <ETableColumn model_col= \"9\" _title=\"Summary\" " \
- " expansion=\"3.0\" minimum_width=\"10\" resizable=\"true\" " \
- " cell=\"calstring\" compare=\"string\"/>" \
- " <ETableColumn model_col=\"10\" _title=\"Transparency\" " \
- " expansion=\"1.0\" minimum_width=\"10\" resizable=\"true\" " \
- " cell=\"transparency\" compare=\"string\"/>" \
- " <ETableColumn model_col=\"11\" _title=\"URL\" " \
- " expansion=\"2.0\" minimum_width=\"10\" resizable=\"true\" " \
- " cell=\"calstring\" compare=\"string\"/>" \
- " <ETableColumn model_col=\"12\" _title=\"Alarms\" " \
- " expansion=\"1.0\" minimum_width=\"10\" resizable=\"true\" " \
- " cell=\"calstring\" compare=\"string\"/>" \
- " <ETableColumn model_col=\"13\" pixbuf=\"icon\" _title=\"Type\" "\
- " expansion=\"1.0\" minimum_width=\"16\" resizable=\"false\" "\
- " cell=\"icon\" compare=\"integer\"/>" \
- " <ETableColumn model_col=\"14\" pixbuf=\"complete\" _title=\"Complete\" " \
- " expansion=\"1.0\" minimum_width=\"16\" resizable=\"false\" "\
- " cell=\"checkbox\" compare=\"integer\"/>" \
- " <ETableColumn model_col=\"18\" _title=\"Status\" " \
- " expansion=\"1.0\" minimum_width=\"10\" resizable=\"true\" " \
- " cell=\"calstatus\" compare=\"string\"/>" \
- " <ETableState>" \
- " <column source=\"13\"/>" \
- " <column source=\"14\"/>" \
- " <column source= \"9\"/>" \
- " <grouping></grouping>" \
- " </ETableState>" \
- "</ETableSpecification>"
-
-static void
-e_calendar_table_init (ECalendarTable *cal_table)
-{
- GtkWidget *table;
- ETable *e_table;
- ECell *cell, *popup_cell;
- ETableExtras *extras;
- gint i;
- GdkPixbuf *pixbuf;
- GdkColormap *colormap;
- gboolean success[E_CALENDAR_TABLE_COLOR_LAST];
- gint nfailed;
- GList *strings;
-
- /* Allocate the colors we need. */
-
- colormap = gtk_widget_get_colormap (GTK_WIDGET (cal_table));
-
- cal_table->colors[E_CALENDAR_TABLE_COLOR_OVERDUE].red = 65535;
- cal_table->colors[E_CALENDAR_TABLE_COLOR_OVERDUE].green = 0;
- cal_table->colors[E_CALENDAR_TABLE_COLOR_OVERDUE].blue = 0;
-
- nfailed = gdk_colormap_alloc_colors (colormap, cal_table->colors,
- E_CALENDAR_TABLE_COLOR_LAST,
- FALSE, TRUE, success);
- if (nfailed)
- g_warning ("Failed to allocate all colors");
-
- /* Create the model */
-
- cal_table->model = calendar_model_new ();
- cal_table->subset_model = e_table_subset_variable_new (E_TABLE_MODEL (cal_table->model));
-
- gtk_signal_connect (GTK_OBJECT (cal_table->model), "model_changed",
- GTK_SIGNAL_FUNC (e_calendar_table_on_model_changed),
- cal_table);
- gtk_signal_connect (GTK_OBJECT (cal_table->model), "model_rows_inserted",
- GTK_SIGNAL_FUNC (e_calendar_table_on_rows_inserted),
- cal_table);
- gtk_signal_connect (GTK_OBJECT (cal_table->model), "model_rows_deleted",
- GTK_SIGNAL_FUNC (e_calendar_table_on_rows_deleted),
- cal_table);
-
- /* Create the header columns */
-
- extras = e_table_extras_new();
-
- /*
- * Normal string fields.
- */
- cell = e_cell_text_new (NULL, GTK_JUSTIFY_LEFT);
- gtk_object_set (GTK_OBJECT (cell),
- "strikeout_column", CAL_COMPONENT_FIELD_COMPLETE,
- "bold_column", CAL_COMPONENT_FIELD_OVERDUE,
- "color_column", CAL_COMPONENT_FIELD_COLOR,
- NULL);
-
- e_table_extras_add_cell (extras, "calstring", cell);
-
-
- /*
- * Date fields.
- */
- cell = e_cell_text_new (NULL, GTK_JUSTIFY_LEFT);
- gtk_object_set (GTK_OBJECT (cell),
- "strikeout_column", CAL_COMPONENT_FIELD_COMPLETE,
- "bold_column", CAL_COMPONENT_FIELD_OVERDUE,
- "color_column", CAL_COMPONENT_FIELD_COLOR,
- NULL);
-
- popup_cell = e_cell_date_edit_new ();
- e_cell_popup_set_child (E_CELL_POPUP (popup_cell), cell);
- gtk_object_unref (GTK_OBJECT (cell));
- e_table_extras_add_cell (extras, "dateedit", popup_cell);
- cal_table->dates_cell = E_CELL_DATE_EDIT (popup_cell);
-
-
- /*
- * Combo fields.
- */
-
- /* Classification field. */
- cell = e_cell_text_new (NULL, GTK_JUSTIFY_LEFT);
- gtk_object_set (GTK_OBJECT (cell),
- "strikeout_column", CAL_COMPONENT_FIELD_COMPLETE,
- "bold_column", CAL_COMPONENT_FIELD_OVERDUE,
- "color_column", CAL_COMPONENT_FIELD_COLOR,
- "editable", FALSE,
- NULL);
-
- popup_cell = e_cell_combo_new ();
- e_cell_popup_set_child (E_CELL_POPUP (popup_cell), cell);
- gtk_object_unref (GTK_OBJECT (cell));
-
- strings = NULL;
- strings = g_list_append (strings, _("None"));
- strings = g_list_append (strings, _("Public"));
- strings = g_list_append (strings, _("Private"));
- strings = g_list_append (strings, _("Confidential"));
- e_cell_combo_set_popdown_strings (E_CELL_COMBO (popup_cell),
- strings);
-
- e_table_extras_add_cell (extras, "classification", popup_cell);
-
- /* Priority field. */
- cell = e_cell_text_new (NULL, GTK_JUSTIFY_LEFT);
- gtk_object_set (GTK_OBJECT (cell),
- "strikeout_column", CAL_COMPONENT_FIELD_COMPLETE,
- "bold_column", CAL_COMPONENT_FIELD_OVERDUE,
- "color_column", CAL_COMPONENT_FIELD_COLOR,
- "editable", FALSE,
- NULL);
-
- popup_cell = e_cell_combo_new ();
- e_cell_popup_set_child (E_CELL_POPUP (popup_cell), cell);
- gtk_object_unref (GTK_OBJECT (cell));
-
- strings = NULL;
- strings = g_list_append (strings, _("High"));
- strings = g_list_append (strings, _("Normal"));
- strings = g_list_append (strings, _("Low"));
- strings = g_list_append (strings, _("Undefined"));
- e_cell_combo_set_popdown_strings (E_CELL_COMBO (popup_cell),
- strings);
-
- e_table_extras_add_cell (extras, "priority", popup_cell);
-
- /* Percent field. */
- cell = e_cell_text_new (NULL, GTK_JUSTIFY_LEFT);
- gtk_object_set (GTK_OBJECT (cell),
- "strikeout_column", CAL_COMPONENT_FIELD_COMPLETE,
- "bold_column", CAL_COMPONENT_FIELD_OVERDUE,
- "color_column", CAL_COMPONENT_FIELD_COLOR,
- NULL);
-
- popup_cell = e_cell_combo_new ();
- e_cell_popup_set_child (E_CELL_POPUP (popup_cell), cell);
- gtk_object_unref (GTK_OBJECT (cell));
-
- strings = NULL;
- strings = g_list_append (strings, _("0%"));
- strings = g_list_append (strings, _("10%"));
- strings = g_list_append (strings, _("20%"));
- strings = g_list_append (strings, _("30%"));
- strings = g_list_append (strings, _("40%"));
- strings = g_list_append (strings, _("50%"));
- strings = g_list_append (strings, _("60%"));
- strings = g_list_append (strings, _("70%"));
- strings = g_list_append (strings, _("80%"));
- strings = g_list_append (strings, _("90%"));
- strings = g_list_append (strings, _("100%"));
- e_cell_combo_set_popdown_strings (E_CELL_COMBO (popup_cell),
- strings);
-
- e_table_extras_add_cell (extras, "percent", popup_cell);
-
- /* Transparency field. */
- cell = e_cell_text_new (NULL, GTK_JUSTIFY_LEFT);
- gtk_object_set (GTK_OBJECT (cell),
- "strikeout_column", CAL_COMPONENT_FIELD_COMPLETE,
- "bold_column", CAL_COMPONENT_FIELD_OVERDUE,
- "color_column", CAL_COMPONENT_FIELD_COLOR,
- "editable", FALSE,
- NULL);
-
- popup_cell = e_cell_combo_new ();
- e_cell_popup_set_child (E_CELL_POPUP (popup_cell), cell);
- gtk_object_unref (GTK_OBJECT (cell));
-
- strings = NULL;
- strings = g_list_append (strings, _("None"));
- strings = g_list_append (strings, _("Opaque"));
- strings = g_list_append (strings, _("Transparent"));
- e_cell_combo_set_popdown_strings (E_CELL_COMBO (popup_cell),
- strings);
-
- e_table_extras_add_cell (extras, "transparency", popup_cell);
-
- /* Status field. */
- cell = e_cell_text_new (NULL, GTK_JUSTIFY_LEFT);
- gtk_object_set (GTK_OBJECT (cell),
- "strikeout_column", CAL_COMPONENT_FIELD_COMPLETE,
- "bold_column", CAL_COMPONENT_FIELD_OVERDUE,
- "color_column", CAL_COMPONENT_FIELD_COLOR,
- "editable", FALSE,
- NULL);
-
- popup_cell = e_cell_combo_new ();
- e_cell_popup_set_child (E_CELL_POPUP (popup_cell), cell);
- gtk_object_unref (GTK_OBJECT (cell));
-
- strings = NULL;
- strings = g_list_append (strings, _("Not Started"));
- strings = g_list_append (strings, _("In Progress"));
- strings = g_list_append (strings, _("Completed"));
- strings = g_list_append (strings, _("Cancelled"));
- e_cell_combo_set_popdown_strings (E_CELL_COMBO (popup_cell),
- strings);
-
- e_table_extras_add_cell (extras, "calstatus", popup_cell);
-
- /* Create pixmaps */
-
- if (!icon_pixbufs[0])
- for (i = 0; i < E_CALENDAR_MODEL_NUM_ICONS; i++) {
- icon_pixbufs[i] = gdk_pixbuf_new_from_xpm_data (
- (const char **) icon_xpm_data[i]);
- }
-
- cell = e_cell_toggle_new (0, E_CALENDAR_MODEL_NUM_ICONS, icon_pixbufs);
- e_table_extras_add_cell(extras, "icon", cell);
- e_table_extras_add_pixbuf(extras, "icon", icon_pixbufs[0]);
-
- pixbuf = gdk_pixbuf_new_from_xpm_data ((const char **) check_filled_xpm);
- e_table_extras_add_pixbuf(extras, "complete", pixbuf);
- gdk_pixbuf_unref(pixbuf);
-
- /* Create the table */
-
- table = e_table_scrolled_new (cal_table->subset_model, extras,
- E_CALENDAR_TABLE_SPEC, NULL);
- gtk_object_unref (GTK_OBJECT (extras));
-
- cal_table->etable = table;
- gtk_table_attach (GTK_TABLE (cal_table), table, 0, 1, 0, 1,
- GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
- gtk_widget_show (table);
-
-
- e_table = e_table_scrolled_get_table (E_TABLE_SCROLLED (table));
- gtk_signal_connect (GTK_OBJECT (e_table), "double_click",
- GTK_SIGNAL_FUNC (e_calendar_table_on_double_click),
- cal_table);
- gtk_signal_connect (GTK_OBJECT (e_table), "right_click",
- GTK_SIGNAL_FUNC (e_calendar_table_on_right_click),
- cal_table);
- gtk_signal_connect (GTK_OBJECT (e_table), "key_press",
- GTK_SIGNAL_FUNC (e_calendar_table_on_key_press),
- cal_table);
-}
-
-
-/**
- * e_calendar_table_new:
- * @Returns: a new #ECalendarTable.
- *
- * Creates a new #ECalendarTable.
- **/
-GtkWidget *
-e_calendar_table_new (void)
-{
- GtkWidget *cal_table;
-
- cal_table = GTK_WIDGET (gtk_type_new (e_calendar_table_get_type ()));
-
- return cal_table;
-}
-
-
-/**
- * e_calendar_table_get_model:
- * @cal_table: A calendar table.
- *
- * Queries the calendar data model that a calendar table is using.
- *
- * Return value: A calendar model.
- **/
-CalendarModel *
-e_calendar_table_get_model (ECalendarTable *cal_table)
-{
- g_return_val_if_fail (cal_table != NULL, NULL);
- g_return_val_if_fail (E_IS_CALENDAR_TABLE (cal_table), NULL);
-
- return cal_table->model;
-}
-
-
-static void
-e_calendar_table_destroy (GtkObject *object)
-{
- ECalendarTable *cal_table;
-
- cal_table = E_CALENDAR_TABLE (object);
-
- gtk_object_unref (GTK_OBJECT (cal_table->model));
- cal_table->model = NULL;
-
- gtk_object_unref (GTK_OBJECT (cal_table->subset_model));
- cal_table->subset_model = NULL;
-
- GTK_OBJECT_CLASS (parent_class)->destroy (object);
-}
-
-
-void
-e_calendar_table_set_cal_client (ECalendarTable *cal_table,
- CalClient *client)
-{
- calendar_model_set_cal_client (cal_table->model, client,
- CALOBJ_TYPE_TODO);
-}
-
-
-static void
-e_calendar_table_on_double_click (ETable *table,
- gint row,
- gint col,
- GdkEvent *event,
- ECalendarTable *cal_table)
-{
- g_print ("In e_calendar_table_on_double_click\n");
-
- e_calendar_table_open_task (cal_table, row);
-}
-
-
-static GnomeUIInfo e_calendar_table_popup_uiinfo[] = {
- { GNOME_APP_UI_ITEM, N_("Mark Complete"),
- N_("Mark the task complete"), e_calendar_table_on_mark_task_complete,
- NULL, NULL, 0, 0, 0, 0 },
-
- GNOMEUIINFO_SEPARATOR,
-
- { GNOME_APP_UI_ITEM, N_("Edit this task..."),
- N_("Edit the task"), e_calendar_table_on_open_task,
- NULL, NULL, 0, 0, 0, 0 },
- { GNOME_APP_UI_ITEM, N_("Delete this task"),
- N_("Delete the task"), e_calendar_table_on_delete_task,
- NULL, NULL, 0, 0, 0, 0 },
-
- GNOMEUIINFO_END
-};
-
-
-typedef struct _ECalendarMenuData ECalendarMenuData;
-struct _ECalendarMenuData {
- ECalendarTable *cal_table;
- gint row;
-};
-
-static gint
-e_calendar_table_on_right_click (ETable *table,
- gint row,
- gint col,
- GdkEventButton *event,
- ECalendarTable *cal_table)
-{
- ECalendarMenuData menu_data;
- GtkWidget *popup_menu;
-
- menu_data.cal_table = cal_table;
- menu_data.row = row;
-
- popup_menu = gnome_popup_menu_new (e_calendar_table_popup_uiinfo);
- gnome_popup_menu_do_popup_modal (popup_menu, NULL, NULL, event,
- &menu_data);
-
- gtk_widget_destroy (popup_menu);
-
- return TRUE;
-}
-
-
-static void
-e_calendar_table_on_open_task (GtkWidget *menuitem,
- gpointer data)
-{
- ECalendarMenuData *menu_data = (ECalendarMenuData*) data;
-
- e_calendar_table_open_task (menu_data->cal_table,
- menu_data->row);
-}
-
-
-static void
-e_calendar_table_on_mark_task_complete (GtkWidget *menuitem,
- gpointer data)
-{
- ECalendarMenuData *menu_data = (ECalendarMenuData*) data;
-
- calendar_model_mark_task_complete (menu_data->cal_table->model,
- menu_data->row);
-}
-
-
-/* Deletes a component from the table */
-static void
-delete_component (CalendarModel *model, int row, GtkWidget *widget)
-{
- CalComponent *comp;
-
- comp = calendar_model_get_component (model, row);
-
- if (delete_component_dialog (comp, widget)) {
- CalClient *client;
- const char *uid;
-
- client = calendar_model_get_cal_client (model);
- cal_component_get_uid (comp, &uid);
-
- /* We don't check the return value; FALSE can mean the object
- * was not in the server anyways.
- */
- cal_client_remove_object (client, uid);
- }
-}
-
-static void
-e_calendar_table_on_delete_task (GtkWidget *menuitem,
- gpointer data)
-{
- ECalendarMenuData *menu_data = (ECalendarMenuData*) data;
-
- delete_component (menu_data->cal_table->model, menu_data->row, menuitem);
-}
-
-
-
-static gint
-e_calendar_table_on_key_press (ETable *table,
- gint row,
- gint col,
- GdkEventKey *event,
- ECalendarTable *cal_table)
-{
- if (event->keyval == GDK_Delete) {
- delete_component (cal_table->model, row, GTK_WIDGET (table));
- return TRUE;
- }
-
- return FALSE;
-}
-
-
-static void
-e_calendar_table_open_task (ECalendarTable *cal_table,
- gint row)
-{
- TaskEditor *tedit;
- CalComponent *comp;
-
- tedit = task_editor_new ();
- task_editor_set_cal_client (tedit, calendar_model_get_cal_client (cal_table->model));
-
- comp = calendar_model_get_component (cal_table->model, row);
- task_editor_set_todo_object (tedit, comp);
-
- task_editor_focus (tedit);
-}
-
-
-/* Loads the state of the table (headers shown etc.) from the given file. */
-void
-e_calendar_table_load_state (ECalendarTable *cal_table,
- gchar *filename)
-{
- struct stat st;
-
- g_return_if_fail (E_IS_CALENDAR_TABLE (cal_table));
-
- if (stat (filename, &st) == 0 && st.st_size > 0
- && S_ISREG (st.st_mode)) {
- e_table_load_state (e_table_scrolled_get_table(E_TABLE_SCROLLED (cal_table->etable)), filename);
- }
-}
-
-
-/* Saves the state of the table (headers shown etc.) to the given file. */
-void
-e_calendar_table_save_state (ECalendarTable *cal_table,
- gchar *filename)
-{
- g_return_if_fail (E_IS_CALENDAR_TABLE (cal_table));
-
- e_table_save_state (e_table_scrolled_get_table(E_TABLE_SCROLLED (cal_table->etable)),
- filename);
-}
-
-
-void
-e_calendar_table_set_filter_func (ECalendarTable *cal_table,
- ECalendarTableFilterFunc filter_func,
- gpointer filter_data,
- GDestroyNotify filter_data_destroy)
-{
- g_return_if_fail (E_IS_CALENDAR_TABLE (cal_table));
-
- if (cal_table->filter_func == filter_func
- && cal_table->filter_data == filter_data
- && cal_table->filter_data_destroy == filter_data_destroy)
- return;
-
- if (cal_table->filter_data_destroy)
- (*cal_table->filter_data_destroy) (cal_table->filter_data);
-
- cal_table->filter_func = filter_func;
- cal_table->filter_data = filter_data;
- cal_table->filter_data_destroy = filter_data_destroy;
-
- e_calendar_table_apply_filter (cal_table);
-}
-
-
-static void
-e_calendar_table_apply_filter (ECalendarTable *cal_table)
-{
- ETableSubsetVariable *etssv;
- CalComponent *comp;
- gint rows, row;
-
- etssv = E_TABLE_SUBSET_VARIABLE (cal_table->subset_model);
-
- /* Make sure that any edits get saved first. */
- e_table_model_pre_change (cal_table->subset_model);
-
- /* FIXME: A hack to remove all the existing rows quickly. */
- E_TABLE_SUBSET (cal_table->subset_model)->n_map = 0;
-
- if (cal_table->filter_func == NULL) {
- e_table_subset_variable_add_all (etssv);
- } else {
- rows = e_table_model_row_count (E_TABLE_MODEL (cal_table->model));
- for (row = 0; row < rows; row++) {
- comp = calendar_model_get_component (cal_table->model,
- row);
-
- if ((*cal_table->filter_func) (cal_table, comp,
- cal_table->filter_data))
- e_table_subset_variable_add (etssv, row);
- }
- }
-
- e_table_model_changed (cal_table->subset_model);
-}
-
-
-gboolean
-e_calendar_table_filter_by_category (ECalendarTable *cal_table,
- CalComponent *comp,
- gpointer filter_data)
-{
- GSList *categories_list, *elem;
- gboolean retval = FALSE;
-
- cal_component_get_categories_list (comp, &categories_list);
-
- for (elem = categories_list; elem; elem = elem->next) {
- if (retval == FALSE
- && !strcmp ((char*) elem->data, (char*) filter_data))
- retval = TRUE;
- g_free (elem->data);
- }
-
- g_slist_free (categories_list);
-
- return retval;
-}
-
-
-static void
-e_calendar_table_on_model_changed (ETableModel *model,
- ECalendarTable *cal_table)
-{
- e_calendar_table_apply_filter (cal_table);
-}
-
-
-static void
-e_calendar_table_on_rows_inserted (ETableModel *model,
- int row,
- int count,
- ECalendarTable *cal_table)
-{
- int i;
-
- for (i = 0; i < count; i++) {
- gboolean add_row;
-
- add_row = FALSE;
-
- if (cal_table->filter_func) {
- CalComponent *comp;
-
- comp = calendar_model_get_component (cal_table->model, row + i);
- g_assert (comp != NULL);
-
- add_row = (* cal_table->filter_func) (cal_table, comp,
- cal_table->filter_data);
- } else
- add_row = TRUE;
-
- if (add_row) {
- ETableSubsetVariable *etssv;
-
- etssv = E_TABLE_SUBSET_VARIABLE (cal_table->subset_model);
-
- e_table_subset_variable_increment (etssv, row, 1);
- e_table_subset_variable_add (etssv, row);
- }
- }
-}
-
-
-static void
-e_calendar_table_on_rows_deleted (ETableModel *model,
- int row,
- int count,
- ECalendarTable *cal_table)
-{
- /* We just reapply the filter since we aren't too bothered about
- being efficient. It doesn't happen often. */
- e_calendar_table_apply_filter (cal_table);
-}
-
-const gchar *
-e_calendar_table_get_spec (void)
-{
- return E_CALENDAR_TABLE_SPEC;
-}
diff --git a/calendar/gui/e-calendar-table.h b/calendar/gui/e-calendar-table.h
deleted file mode 100644
index e19ecf82e8..0000000000
--- a/calendar/gui/e-calendar-table.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <damon@ximian.com>
- *
- * Copyright 2000, Helix Code, Inc.
- * Copyright 2000, Ximian, 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_CALENDAR_TABLE_H_
-#define _E_CALENDAR_TABLE_H_
-
-#include <gtk/gtktable.h>
-#include <widgets/misc/e-cell-date-edit.h>
-#include "calendar-model.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-/*
- * ECalendarTable - displays the iCalendar objects in a table (an ETable).
- * Used for calendar events and tasks.
- */
-
-/* These index our colors array. */
-typedef enum
-{
- E_CALENDAR_TABLE_COLOR_OVERDUE,
-
- E_CALENDAR_TABLE_COLOR_LAST
-} ECalendarTableColors;
-
-
-#define E_CALENDAR_TABLE(obj) GTK_CHECK_CAST (obj, e_calendar_table_get_type (), ECalendarTable)
-#define E_CALENDAR_TABLE_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, e_calendar_table_get_type (), ECalendarTableClass)
-#define E_IS_CALENDAR_TABLE(obj) GTK_CHECK_TYPE (obj, e_calendar_table_get_type ())
-
-
-typedef struct _ECalendarTable ECalendarTable;
-typedef struct _ECalendarTableClass ECalendarTableClass;
-
-
-typedef gboolean (*ECalendarTableFilterFunc) (ECalendarTable *cal_table,
- CalComponent *comp,
- gpointer data);
-
-struct _ECalendarTable
-{
- GtkTable table;
-
- /* This is the underlying model which contains all the tasks/events. */
- CalendarModel *model;
-
- /* This is the model that we use when filtering the tasks/events. */
- ETableModel *subset_model;
-
- GtkWidget *etable;
-
- /* Colors for drawing. */
- GdkColor colors[E_CALENDAR_TABLE_COLOR_LAST];
-
- /* Data for filtering the Tasks. */
- ECalendarTableFilterFunc filter_func;
- gpointer filter_data;
- GDestroyNotify filter_data_destroy;
-
- /* The ECell used to view & edit dates. */
- ECellDateEdit *dates_cell;
-};
-
-struct _ECalendarTableClass
-{
- GtkTableClass parent_class;
-};
-
-
-GtkType e_calendar_table_get_type (void);
-GtkWidget* e_calendar_table_new (void);
-
-CalendarModel *e_calendar_table_get_model (ECalendarTable *cal_table);
-
-void e_calendar_table_set_cal_client (ECalendarTable *cal_table,
- CalClient *client);
-
-/* These load and save the state of the table (headers shown etc.) to/from
- the given file. */
-void e_calendar_table_load_state (ECalendarTable *cal_table,
- gchar *filename);
-void e_calendar_table_save_state (ECalendarTable *cal_table,
- gchar *filename);
-
-void e_calendar_table_set_filter_func (ECalendarTable *cal_table,
- ECalendarTableFilterFunc filter_func,
- gpointer filter_data,
- GDestroyNotify filter_data_destroy);
-gboolean e_calendar_table_filter_by_category (ECalendarTable *cal_table,
- CalComponent *comp,
- gpointer filter_data);
-
-const gchar *e_calendar_table_get_spec (void);
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* _E_CALENDAR_TABLE_H_ */
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 3cab1f1a05..0000000000
--- a/calendar/gui/e-day-view-main-item.c
+++ /dev/null
@@ -1,660 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <damon@ximian.com>
- *
- * Copyright 1999, Helix Code, Inc.
- * Copyright 1999, Ximian, 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 <config.h>
-#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 *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 day_x, day_w, work_day;
- gint start_row, end_row, rect_x, rect_y, rect_width, rect_height;
- struct tm *day_start;
-
-#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;
-
- /* 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;
-
- for (day = 0; day < day_view->days_shown; day++) {
- day_start = localtime (&day_view->day_starts[day]);
-
- work_day = day_view->working_days & (1 << day_start->tm_wday);
-
- day_x = day_view->day_offsets[day] - x;
- day_w = day_view->day_widths[day];
-
- if (work_day) {
- gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_BG_NOT_WORKING]);
- gdk_draw_rectangle (drawable, gc, TRUE,
- day_x, 0 - y,
- 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,
- day_x, work_day_start_y,
- 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,
- day_x, work_day_end_y,
- day_w, height - work_day_end_y);
- } else {
- gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_BG_NOT_WORKING]);
- gdk_draw_rectangle (drawable, gc, TRUE,
- day_x, 0,
- day_w, height);
- }
- }
-
- /* 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;
-
- gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_BG_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;
-
- gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_BG_GRID]);
- 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, 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, style->black_gc,
- grid_x1, grid_y1,
- grid_x1, grid_y2);
- gdk_draw_line (drawable, style->black_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;
- CalComponent *comp;
- 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;
- comp = event->comp;
-
- if (cal_component_has_alarms (comp)) {
- draw_reminder_icon = TRUE;
- num_icons++;
- }
-
- if (cal_component_has_recurrences (comp)) {
- 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 cb9e2589d8..0000000000
--- a/calendar/gui/e-day-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 <damon@ximian.com>
- *
- * Copyright 1999, Helix Code, Inc.
- * Copyright 1999, Ximian, 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 4d005f3b49..0000000000
--- a/calendar/gui/e-day-view-time-item.c
+++ /dev/null
@@ -1,660 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <damon@ximian.com>
- *
- * Copyright 1999, Helix Code, Inc.
- * Copyright 1999, Ximian, 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 <config.h>
-#include <glib.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <gal/widgets/e-gui-utils.h>
-#include "e-day-view-time-item.h"
-#include "calendar-config.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).
- LARGE_HOUR_Y_PAD is the offset of the large hour string from the top of the
- row.
- SMALL_FONT_Y_PAD is the offset of the small time/minute string from the top
- of the row. */
-#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
-#define E_DVTMI_LARGE_HOUR_Y_PAD 1
-#define E_DVTMI_SMALL_FONT_Y_PAD 1
-
-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_increment_time (gint *hour,
- gint *minute,
- gint mins_per_row);
-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;
- GtkStyle *style;
- GdkFont *small_font, *large_font;
- gint digit, large_digit_width, max_large_digit_width = 0;
- gint max_suffix_width, max_minute_or_suffix_width;
- gint column_width_default, column_width_60_min_rows;
-
- day_view = dvtmitem->day_view;
- g_return_val_if_fail (day_view != NULL, 0);
-
- style = GTK_WIDGET (day_view)->style;
- g_return_val_if_fail (style != NULL, 0);
- small_font = style->font;
- g_return_val_if_fail (small_font != NULL, 0);
- large_font = day_view->large_font;
- g_return_val_if_fail (large_font != NULL, 0);
-
- for (digit = '0'; digit <= '9'; digit++) {
- large_digit_width = gdk_char_width (large_font, digit);
- max_large_digit_width = MAX (max_large_digit_width,
- large_digit_width);
- }
-
- /* Calculate the width of each time column, using the maximum of the
- default format with large hour numbers, and the 60-min divisions
- format which uses small text. */
- max_suffix_width = MAX (day_view->am_string_width,
- day_view->pm_string_width);
-
- max_minute_or_suffix_width = MAX (max_suffix_width,
- day_view->max_minute_width);
-
- column_width_default = max_large_digit_width * 2
- + max_minute_or_suffix_width
- + E_DVTMI_MIN_X_PAD * 2
- + E_DVTMI_HOUR_L_PAD
- + E_DVTMI_HOUR_R_PAD
- + E_DVTMI_TIME_GRID_X_PAD * 2;
-
- column_width_60_min_rows = day_view->max_small_hour_width
- + day_view->colon_width
- + max_minute_or_suffix_width
- + E_DVTMI_60_MIN_X_PAD * 2
- + E_DVTMI_TIME_GRID_X_PAD * 2;
-
- dvtmitem->column_width = MAX (column_width_default,
- column_width_60_min_rows);
-
- 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;
- GtkStyle *style;
- GdkFont *small_font, *large_font;
- GdkGC *fg_gc, *dark_gc;
- gchar buffer[64], *suffix;
- gint hour, display_hour, minute, row;
- gint row_y, start_y, large_hour_y_offset, small_font_y_offset;
- gint long_line_x1, long_line_x2, short_line_x1;
- gint large_hour_x2, minute_x2;
- gint hour_width, minute_width, suffix_width;
- gint max_suffix_width, max_minute_or_suffix_width;
-
- 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];
-
- /* The start and end of the long horizontal line between hours. */
- long_line_x1 = E_DVTMI_TIME_GRID_X_PAD - x;
- long_line_x2 = dvtmitem->column_width - E_DVTMI_TIME_GRID_X_PAD - x;
-
- if (day_view->mins_per_row == 60) {
- /* The right edge of the complete time string in 60-min
- divisions, e.g. "14:00" or "2 pm". */
- minute_x2 = long_line_x2 - E_DVTMI_60_MIN_X_PAD;
-
- /* These aren't used for 60-minute divisions, but we initialize
- them to keep gcc happy. */
- short_line_x1 = 0;
- large_hour_x2 = 0;
- } else {
- max_suffix_width = MAX (day_view->am_string_width,
- day_view->pm_string_width);
-
- max_minute_or_suffix_width = MAX (max_suffix_width,
- day_view->max_minute_width);
-
- /* The start of the short horizontal line between the periods
- within each hour. */
- short_line_x1 = long_line_x2 - E_DVTMI_MIN_X_PAD * 2
- - max_minute_or_suffix_width;
-
- /* The right edge of the large hour string. */
- large_hour_x2 = short_line_x1 - E_DVTMI_HOUR_R_PAD;
-
- /* The right edge of the minute part of the time. */
- minute_x2 = long_line_x2 - E_DVTMI_MIN_X_PAD;
- }
-
- /* Start with the first hour & minute shown in the EDayView. */
- hour = day_view->first_hour_shown;
- minute = day_view->first_minute_shown;
-
- /* The offset of the large hour string from the top of the row. */
- large_hour_y_offset = large_font->ascent + E_DVTMI_LARGE_HOUR_Y_PAD;
-
- /* The offset of the small time/minute string from top of row. */
- small_font_y_offset = small_font->ascent + E_DVTMI_SMALL_FONT_Y_PAD;
-
- /* Calculate the minimum y position of the first row we need to draw.
- This is normally one row height above the 0 position, but if we
- are using the large font we may have to go back a bit further. */
- start_y = 0 - MAX (day_view->row_height,
- large_hour_y_offset + large_font->descent);
-
- /* Step through each row, drawing the times and the horizontal lines
- between them. */
- for (row = 0, row_y = 0 - y;
- row < day_view->rows && row_y < height;
- row++, row_y += day_view->row_height) {
-
- /* If the row is above the first row we want to draw just
- increment the time and skip to the next row. */
- if (row_y < start_y) {
- e_day_view_time_item_increment_time (&hour, &minute,
- day_view->mins_per_row);
- continue;
- }
-
- /* Calculate the actual hour number to display. For 12-hour
- format we convert 0-23 to 12-11am/12-11pm. */
- e_day_view_convert_time_to_display (day_view, hour,
- &display_hour,
- &suffix, &suffix_width);
-
- if (day_view->mins_per_row == 60) {
- /* 60 minute intervals - draw a long horizontal line
- between hours and display as one long string,
- e.g. "14:00" or "2 pm". */
- gdk_draw_line (drawable, dark_gc,
- long_line_x1, row_y,
- long_line_x2, row_y);
-
- if (day_view->use_24_hour_format) {
- g_snprintf (buffer, sizeof (buffer), "%i:%02i",
- display_hour, minute);
- } else {
- g_snprintf (buffer, sizeof (buffer), "%i %s",
- display_hour, suffix);
- }
- minute_width = gdk_string_width (small_font, buffer);
- gdk_draw_string (drawable, small_font, fg_gc,
- minute_x2 - minute_width,
- row_y + small_font_y_offset,
- buffer);
- } else {
- /* 5/10/15/30 minute intervals. */
-
- if (minute == 0) {
- /* On the hour - draw a long horizontal line
- before the hour and display the hour in the
- large font. */
- gdk_draw_line (drawable, dark_gc,
- long_line_x1, row_y,
- long_line_x2, row_y);
-
- g_snprintf (buffer, sizeof (buffer), "%i",
- display_hour);
- hour_width = gdk_string_width (large_font,
- buffer);
- gdk_draw_string (drawable, large_font, fg_gc,
- large_hour_x2 - hour_width,
- row_y + large_hour_y_offset,
- buffer);
- } else {
- /* Within the hour - draw a short line before
- the time. */
- gdk_draw_line (drawable, dark_gc,
- short_line_x1, row_y,
- long_line_x2, row_y);
- }
-
- /* Normally we display the minute in each
- interval, but when using 30-minute intervals
- we don't display the '30'. */
- if (day_view->mins_per_row != 30 || minute != 30) {
- /* In 12-hour format we display 'am' or 'pm'
- instead of '00'. */
- if (minute == 0
- && !day_view->use_24_hour_format) {
- strcpy (buffer, suffix);
- } else {
- g_snprintf (buffer, sizeof (buffer),
- "%02i", minute);
- }
- minute_width = gdk_string_width (small_font,
- buffer);
- gdk_draw_string (drawable, small_font, fg_gc,
- minute_x2 - minute_width,
- row_y + small_font_y_offset,
- buffer);
- }
- }
-
- e_day_view_time_item_increment_time (&hour, &minute,
- day_view->mins_per_row);
- }
-}
-
-
-/* Increment the time by the 5/10/15/30/60 minute interval.
- Note that mins_per_row is never > 60, so we never have to
- worry about adding more than 60 minutes. */
-static void
-e_day_view_time_item_increment_time (gint *hour,
- gint *minute,
- gint mins_per_row)
-{
- *minute += mins_per_row;
- if (*minute >= 60) {
- *minute -= 60;
- /* Currently we never wrap around to the next day, but
- we may do if we display extra timezones. */
- *hour = (*hour + 1) % 24;
- }
-}
-
-
-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++) {
- g_snprintf (buffer, sizeof (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);
- calendar_config_set_time_divisions (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 972f01e1b5..0000000000
--- a/calendar/gui/e-day-view-time-item.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <damon@ximian.com>
- *
- * Copyright 1999, Helix Code, Inc.
- * Copyright 1999, Ximian, 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 16bb8be02f..0000000000
--- a/calendar/gui/e-day-view-top-item.c
+++ /dev/null
@@ -1,651 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <damon@helixcode.com>
- *
- * 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 <config.h>
-#include <glib.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#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 *gc, *fg_gc, *bg_gc, *light_gc, *dark_gc;
- gchar buffer[128], *format;
- 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;
- gc = day_view->main_gc;
- 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;
-
- /* 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);
- gdk_draw_line (drawable, dark_gc,
- left_edge + 2 - x, item_height - 1 - y,
- canvas_width - 1 - x, item_height - 1 - y);
- gdk_draw_line (drawable, dark_gc,
- canvas_width - 1 - x, 1 - y,
- canvas_width - 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);
-
- /* Clear the main area background. */
- gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_BG_TOP_CANVAS]);
- gdk_draw_rectangle (drawable, gc, TRUE,
- left_edge - x, item_height - y,
- canvas_width - left_edge,
- canvas_height - item_height);
-
- /* 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_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_BG_TOP_CANVAS_SELECTED]);
- gdk_draw_rectangle (drawable, 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 format %A = full weekday name, %d = day of month,
- %B = full month name. Don't use any other specifiers. */
- format = _("%A %d %B");
- else if (day_view->date_format == E_DAY_VIEW_DATE_ABBREVIATED)
- /* strftime format %a = abbreviated weekday name, %d = day of month,
- %b = abbreviated month name. Don't use any other specifiers. */
- format = _("%a %d %b");
- else if (day_view->date_format == E_DAY_VIEW_DATE_NO_WEEKDAY)
- /* strftime format %d = day of month, %b = abbreviated month name.
- Don't use any other specifiers. */
- format = _("%d %b");
- else
- format = "%d";
-
- strftime (buffer, sizeof (buffer), format, 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_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_BG_TOP_CANVAS_GRID]);
- gdk_draw_line (drawable, 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;
- CalComponent *comp;
- gchar buffer[16];
- gint hour, display_hour, minute, offset, time_width, time_x;
- gint min_end_time_x, suffix_width, max_icon_x;
- gchar *suffix;
- 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];
- comp = event->comp;
-
- /* Draw the lines across the top & bottom of the entire event. */
- gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_LONG_EVENT_BORDER]);
- gdk_draw_line (drawable, gc,
- item_x - x, item_y - y,
- item_x + item_w - 1 - x, item_y - y);
- gdk_draw_line (drawable, 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_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_LONG_EVENT_BACKGROUND]);
- gdk_draw_rectangle (drawable, 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_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_LONG_EVENT_BORDER]);
- gdk_draw_line (drawable, 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_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_LONG_EVENT_BORDER]);
- gdk_draw_line (drawable, 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 start & end times, if necessary. */
- min_end_time_x = item_x + E_DAY_VIEW_LONG_EVENT_X_PAD - x;
-
- time_width = e_day_view_get_time_string_width (day_view);
-
- 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;
- /* Calculate the actual hour number to display. For 12-hour
- format we convert 0-23 to 12-11am/12-11pm. */
- e_day_view_convert_time_to_display (day_view, hour,
- &display_hour,
- &suffix, &suffix_width);
- if (day_view->use_24_hour_format) {
- g_snprintf (buffer, sizeof (buffer), "%i:%02i",
- display_hour, minute);
- } else {
- g_snprintf (buffer, sizeof (buffer), "%i:%02i%s",
- display_hour, minute, suffix);
- }
-
- 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);
-
- time_x = item_x + E_DAY_VIEW_LONG_EVENT_X_PAD - x;
- if (display_hour < 10)
- time_x += day_view->digit_width;
-
- gdk_draw_string (drawable, font, fg_gc,
- time_x,
- item_y + E_DAY_VIEW_LONG_EVENT_BORDER_HEIGHT
- + E_DAY_VIEW_LONG_EVENT_Y_PAD
- + font->ascent - y,
- buffer);
-
- gdk_gc_set_clip_rectangle (fg_gc, NULL);
-
- min_end_time_x += time_width
- + E_DAY_VIEW_LONG_EVENT_TIME_X_PAD;
- }
-
- max_icon_x = item_x + item_w - E_DAY_VIEW_LONG_EVENT_X_PAD
- - E_DAY_VIEW_ICON_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_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) {
- /* Calculate the actual hour number to display. */
- e_day_view_convert_time_to_display (day_view, hour,
- &display_hour,
- &suffix,
- &suffix_width);
- if (day_view->use_24_hour_format) {
- g_snprintf (buffer, sizeof (buffer),
- "%i:%02i", display_hour, minute);
- } else {
- g_snprintf (buffer, sizeof (buffer),
- "%i:%02i%s", display_hour, minute,
- suffix);
- }
-
- if (display_hour < 10)
- time_x += day_view->digit_width;
-
- gdk_draw_string (drawable, font, fg_gc,
- time_x,
- item_y + E_DAY_VIEW_LONG_EVENT_Y_PAD
- + font->ascent + 1 - y,
- buffer);
-
- max_icon_x -= time_width + E_DAY_VIEW_LONG_EVENT_TIME_X_PAD;
- }
- }
-
- /* 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 + E_DAY_VIEW_LONG_EVENT_BORDER_HEIGHT
- + E_DAY_VIEW_ICON_Y_PAD - y;
-
- if (icon_x <= max_icon_x && cal_component_has_recurrences (comp)) {
- 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 (icon_x <= max_icon_x && cal_component_has_alarms (comp)) {
- 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);
-}
-
-
-/* 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 *gc;
- GdkPoint points[3];
- gint c1, c2;
-
- day_view = dvtitem->day_view;
-
- style = GTK_WIDGET (day_view)->style;
- gc = day_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;
-
- /* 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_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_LONG_EVENT_BACKGROUND]);
- gdk_draw_polygon (drawable, gc, TRUE, points, 3);
-
- gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_LONG_EVENT_BORDER]);
- 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_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 53db4eda79..0000000000
--- a/calendar/gui/e-day-view-top-item.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <damon@ximian.com>
- *
- * Copyright 1999, Helix Code, Inc.
- * Copyright 1999, Ximian, 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 b10382a3ea..0000000000
--- a/calendar/gui/e-day-view.c
+++ /dev/null
@@ -1,6662 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <damon@helixcode.com>
- *
- * 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 <config.h>
-
-#include "e-day-view.h"
-
-#include <math.h>
-#include <time.h>
-#include <gdk/gdkkeysyms.h>
-#include <gdk/gdkx.h>
-#include <gtk/gtkdnd.h>
-#include <gtk/gtkmain.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtkvscrollbar.h>
-#include <gtk/gtkwindow.h>
-#include <gal/e-text/e-text.h>
-#include <gal/widgets/e-popup-menu.h>
-#include <gal/widgets/e-canvas-utils.h>
-#include <libgnomeui/gnome-canvas-rect-ellipse.h>
-#include <libgnome/gnome-i18n.h>
-
-#include "cal-util/timeutil.h"
-#include "dialogs/delete-comp.h"
-#include "comp-util.h"
-#include "calendar-commands.h"
-#include "goto.h"
-#include "e-meeting-edit.h"
-#include "e-day-view-time-item.h"
-#include "e-day-view-top-item.h"
-#include "e-day-view-main-item.h"
-
-/* Images */
-#include "art/bell.xpm"
-#include "art/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
-
-/* The amount we scroll the main canvas when the Page Up/Down keys are pressed,
- as a fraction of the page size. */
-#define E_DAY_VIEW_PAGE_STEP 0.5
-
-/* The amount we scroll the main canvas when the mouse wheel buttons are
- pressed, as a fraction of the page size. */
-#define E_DAY_VIEW_WHEEL_MOUSE_STEP_SIZE 0.25
-
-
-/* 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 void e_day_view_cursor_key_up_shifted (EDayView *day_view,
- GdkEventKey *event);
-static void e_day_view_cursor_key_down_shifted (EDayView *day_view,
- GdkEventKey *event);
-static void e_day_view_cursor_key_left_shifted (EDayView *day_view,
- GdkEventKey *event);
-static void e_day_view_cursor_key_right_shifted (EDayView *day_view,
- GdkEventKey *event);
-static void e_day_view_cursor_key_up (EDayView *day_view,
- GdkEventKey *event);
-static void e_day_view_cursor_key_down (EDayView *day_view,
- GdkEventKey *event);
-static void e_day_view_cursor_key_left (EDayView *day_view,
- GdkEventKey *event);
-static void e_day_view_cursor_key_right (EDayView *day_view,
- GdkEventKey *event);
-static void e_day_view_ensure_rows_visible (EDayView *day_view,
- gint start_row,
- gint end_row);
-static void e_day_view_scroll (EDayView *day_view,
- gfloat pages_to_scroll);
-
-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 gboolean e_day_view_on_time_canvas_button_press (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 void e_day_view_recalc_cell_sizes (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 (EDayView *day_view,
- EDayViewForeachEventCallback callback,
- 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_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 (CalComponent *comp,
- 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_new_event (GtkWidget *widget,
- gpointer data);
-static void e_day_view_on_goto_today (GtkWidget *widget,
- gpointer data);
-static void e_day_view_on_goto_date (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_schedule_meet (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 void e_day_view_normalize_selection (EDayView *day_view);
-static gboolean e_day_view_set_show_times_cb (EDayView *day_view,
- gint day,
- gint event_num,
- gpointer data);
-static time_t e_day_view_find_work_week_start (EDayView *day_view,
- time_t start_time);
-static void e_day_view_recalc_work_week (EDayView *day_view);
-static void e_day_view_recalc_work_week_days_shown (EDayView *day_view);
-static gboolean e_day_view_set_event_font_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)
-{
- gint day;
- GnomeCanvasGroup *canvas_group;
-
- GTK_WIDGET_SET_FLAGS (day_view, GTK_CAN_FOCUS);
-
- day_view->calendar = NULL;
- day_view->client = NULL;
- day_view->sexp = g_strdup ("#t"); /* match all by default */
- day_view->query = 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;
-
- day_view->work_week_view = FALSE;
- 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->working_days = E_DAY_VIEW_MONDAY | E_DAY_VIEW_TUESDAY
- | E_DAY_VIEW_WEDNESDAY | E_DAY_VIEW_THURSDAY
- | E_DAY_VIEW_FRIDAY;
-
- 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->show_event_end_times = TRUE;
- day_view->week_start_day = 0;
- day_view->scroll_to_work_day = TRUE;
-
- day_view->editing_event_day = -1;
- day_view->editing_event_num = -1;
-
- 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_is_being_dragged = FALSE;
- day_view->selection_drag_pos = E_DAY_VIEW_DRAG_END;
- 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");
-
- /* String to use in 12-hour time format for times in the morning. */
- day_view->am_string = _("am");
-
- /* String to use in 12-hour time format for times in the afternoon. */
- day_view->pm_string = _("pm");
-
-
- /*
- * 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(),
- 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,
- 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,
- "draw_background", FALSE,
- "fill_color_rgba", GNOME_CANVAS_COLOR(0, 0, 0),
- 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(),
- 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(),
- 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,
- 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,
- 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,
- 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,
- 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,
- "draw_background", FALSE,
- "fill_color_rgba", GNOME_CANVAS_COLOR(0, 0, 0),
- 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);
- gtk_signal_connect_after (GTK_OBJECT (day_view->time_canvas),
- "button_press_event",
- GTK_SIGNAL_FUNC (e_day_view_on_time_canvas_button_press),
- day_view);
-
- 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 cursors. */
- day_view->normal_cursor = gdk_cursor_new (GDK_LEFT_PTR);
- 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->client) {
- gtk_signal_disconnect_by_data (GTK_OBJECT (day_view->client), day_view);
- gtk_object_unref (GTK_OBJECT (day_view->client));
- day_view->client = NULL;
- }
-
- if (day_view->sexp) {
- g_free (day_view->sexp);
- day_view->sexp = NULL;
- }
-
- if (day_view->query) {
- gtk_signal_disconnect_by_data (GTK_OBJECT (day_view->query), day_view);
- gtk_object_unref (GTK_OBJECT (day_view->query));
- day_view->query = NULL;
- }
-
- 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;
- GdkColormap *colormap;
- gboolean success[E_DAY_VIEW_COLOR_LAST];
- gint nfailed;
-
- 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);
-
- colormap = gtk_widget_get_colormap (widget);
-
- /* Allocate the colors. */
- day_view->colors[E_DAY_VIEW_COLOR_BG_WORKING].red = 247 * 257;
- day_view->colors[E_DAY_VIEW_COLOR_BG_WORKING].green = 247 * 257;
- day_view->colors[E_DAY_VIEW_COLOR_BG_WORKING].blue = 244 * 257;
-
- day_view->colors[E_DAY_VIEW_COLOR_BG_NOT_WORKING].red = 216 * 257;
- day_view->colors[E_DAY_VIEW_COLOR_BG_NOT_WORKING].green = 216 * 257;
- day_view->colors[E_DAY_VIEW_COLOR_BG_NOT_WORKING].blue = 214 * 257;
-
- day_view->colors[E_DAY_VIEW_COLOR_BG_SELECTED].red = 0 * 257;
- day_view->colors[E_DAY_VIEW_COLOR_BG_SELECTED].green = 0 * 257;
- day_view->colors[E_DAY_VIEW_COLOR_BG_SELECTED].blue = 156 * 257;
-
- day_view->colors[E_DAY_VIEW_COLOR_BG_GRID].red = 148 * 257;
- day_view->colors[E_DAY_VIEW_COLOR_BG_GRID].green = 149 * 257;
- day_view->colors[E_DAY_VIEW_COLOR_BG_GRID].blue = 148 * 257;
-
- day_view->colors[E_DAY_VIEW_COLOR_BG_TOP_CANVAS].red = 148 * 257;
- day_view->colors[E_DAY_VIEW_COLOR_BG_TOP_CANVAS].green = 149 * 257;
- day_view->colors[E_DAY_VIEW_COLOR_BG_TOP_CANVAS].blue = 148 * 257;
-
- day_view->colors[E_DAY_VIEW_COLOR_BG_TOP_CANVAS_SELECTED].red = 65535;
- day_view->colors[E_DAY_VIEW_COLOR_BG_TOP_CANVAS_SELECTED].green = 65535;
- day_view->colors[E_DAY_VIEW_COLOR_BG_TOP_CANVAS_SELECTED].blue = 65535;
-
- day_view->colors[E_DAY_VIEW_COLOR_BG_TOP_CANVAS_GRID].red = 0;
- day_view->colors[E_DAY_VIEW_COLOR_BG_TOP_CANVAS_GRID].green = 0;
- day_view->colors[E_DAY_VIEW_COLOR_BG_TOP_CANVAS_GRID].blue = 0;
-
- 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;
-
- day_view->colors[E_DAY_VIEW_COLOR_LONG_EVENT_BACKGROUND].red = 213 * 257;
- day_view->colors[E_DAY_VIEW_COLOR_LONG_EVENT_BACKGROUND].green = 213 * 257;
- day_view->colors[E_DAY_VIEW_COLOR_LONG_EVENT_BACKGROUND].blue = 213 * 257;
-
- day_view->colors[E_DAY_VIEW_COLOR_LONG_EVENT_BORDER].red = 0;
- day_view->colors[E_DAY_VIEW_COLOR_LONG_EVENT_BORDER].green = 0;
- day_view->colors[E_DAY_VIEW_COLOR_LONG_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");
-
-
- /* 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);
-
-
-
- /* Set the canvas item colors. */
- gnome_canvas_item_set (day_view->resize_long_event_rect_item,
- "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_set (day_view->drag_long_event_rect_item,
- "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_set (day_view->resize_rect_item,
- "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_set (day_view->resize_bar_item,
- "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_set (day_view->main_canvas_top_resize_bar_item,
- "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_set (day_view->main_canvas_bottom_resize_bar_item,
- "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_set (day_view->drag_rect_item,
- "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_set (day_view->drag_bar_item,
- "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);
-}
-
-
-static void
-e_day_view_unrealize (GtkWidget *widget)
-{
- EDayView *day_view;
- GdkColormap *colormap;
- gint i;
-
- day_view = E_DAY_VIEW (widget);
-
- gdk_gc_unref (day_view->main_gc);
- day_view->main_gc = NULL;
-
- colormap = gtk_widget_get_colormap (widget);
- for (i = 0; i < E_DAY_VIEW_COLOR_LAST; i++)
- gdk_colors_free (colormap, &day_view->colors[i].pixel, 1, 0);
-
- gdk_pixmap_unref (day_view->reminder_icon);
- day_view->reminder_icon = NULL;
- gdk_pixmap_unref (day_view->recurrence_icon);
- day_view->recurrence_icon = 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 hour, max_large_hour_width;
- gint minute, max_minute_width, i;
- gint month, day, width;
- gint longest_month_width, longest_abbreviated_month_width;
- gint longest_weekday_width, longest_abbreviated_weekday_width;
- struct tm date_tm;
- 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 + 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 longest full & abbreviated month names. */
- memset (&date_tm, 0, sizeof (date_tm));
- date_tm.tm_year = 100;
- date_tm.tm_mday = 1;
- date_tm.tm_isdst = -1;
-
- longest_month_width = 0;
- longest_abbreviated_month_width = 0;
- for (month = 0; month < 12; month++) {
- date_tm.tm_mon = month;
-
- strftime (buffer, sizeof (buffer), "%B", &date_tm);
- width = gdk_string_width (font, buffer);
- if (width > longest_month_width) {
- longest_month_width = width;
- day_view->longest_month_name = month;
- }
-
- strftime (buffer, sizeof (buffer), "%b", &date_tm);
- width = gdk_string_width (font, buffer);
- if (width > longest_abbreviated_month_width) {
- longest_abbreviated_month_width = width;
- day_view->longest_abbreviated_month_name = month;
- }
- }
-
- /* Find the longest full & abbreviated weekday names. */
- memset (&date_tm, 0, sizeof (date_tm));
- date_tm.tm_year = 100;
- date_tm.tm_mon = 0;
- date_tm.tm_isdst = -1;
-
- longest_weekday_width = 0;
- longest_abbreviated_weekday_width = 0;
- for (day = 0; day < 7; day++) {
- date_tm.tm_mday = 2 + day;
- date_tm.tm_wday = day;
-
- strftime (buffer, sizeof (buffer), "%A", &date_tm);
- width = gdk_string_width (font, buffer);
- if (width > longest_weekday_width) {
- longest_weekday_width = width;
- day_view->longest_weekday_name = day;
- }
-
- strftime (buffer, sizeof (buffer), "%a", &date_tm);
- width = gdk_string_width (font, buffer);
- if (width > longest_abbreviated_weekday_width) {
- longest_abbreviated_weekday_width = width;
- day_view->longest_abbreviated_weekday_name = day;
- }
- }
-
-
- /* 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++) {
- g_snprintf (buffer, sizeof (buffer), "%02i", hour);
- day_view->small_hour_widths[hour] = gdk_string_width (font, buffer);
- day_view->max_small_hour_width = MAX (day_view->max_small_hour_width, day_view->small_hour_widths[hour]);
- }
-
- max_minute_width = 0;
- for (minute = 0, i = 0; minute < 60; minute += 5, i++) {
- gint minute_width;
-
- g_snprintf (buffer, sizeof (buffer), "%02i", minute);
- minute_width = gdk_string_width (font, buffer);
- max_minute_width = MAX (max_minute_width, minute_width);
- }
- day_view->max_minute_width = max_minute_width;
- day_view->colon_width = gdk_string_width (font, ":");
- day_view->digit_width = gdk_string_width (font, "0");
-
- day_view->am_string_width = gdk_string_width (font,
- day_view->am_string);
- day_view->pm_string_width = gdk_string_width (font,
- day_view->pm_string);
-
- /* 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);
-
- /* Set the font of all the EText items. */
- e_day_view_foreach_event (day_view, e_day_view_set_event_font_cb,
- font);
-
- /* Set the fonts for the text items used when dragging. */
- gnome_canvas_item_set (day_view->drag_long_event_item,
- "font_gdk", GTK_WIDGET (day_view)->style->font,
- NULL);
-
- gnome_canvas_item_set (day_view->drag_item,
- "font_gdk", GTK_WIDGET (day_view)->style->font,
- NULL);
-}
-
-
-static gboolean
-e_day_view_set_event_font_cb (EDayView *day_view,
- gint day,
- gint event_num,
- gpointer data)
-{
- EDayViewEvent *event;
- GdkFont *font = data;
-
- 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 (event->canvas_item)
- gnome_canvas_item_set (event->canvas_item,
- "font_gdk", font,
- NULL);
-
- return TRUE;
-}
-
-
-/* This recalculates the sizes of each column. */
-static void
-e_day_view_size_allocate (GtkWidget *widget, GtkAllocation *allocation)
-{
- EDayView *day_view;
- gint 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);
-
- e_day_view_recalc_cell_sizes (day_view);
-
- /* 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 void
-e_day_view_recalc_cell_sizes (EDayView *day_view)
-{
- /* An array of dates, one for each month in the year 2000. They must
- all be Sundays. */
- static const int days[12] = { 23, 20, 19, 23, 21, 18,
- 23, 20, 17, 22, 19, 24 };
- gfloat width, offset;
- gint day, max_width;
- struct tm date_tm;
- GdkFont *font;
- char buffer[128];
-
- g_return_if_fail (((GtkWidget*)day_view)->style != NULL);
- font = GTK_WIDGET (day_view)->style->font;
-
- /* 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 (day = 0; day <= day_view->days_shown; day++) {
- day_view->day_offsets[day] = floor (offset + 0.5);
- offset += width;
- }
-
- /* Calculate the days widths based on the offsets. */
- for (day = 0; day < day_view->days_shown; day++) {
- day_view->day_widths[day] = day_view->day_offsets[day + 1] - day_view->day_offsets[day];
- }
-
- /* Determine which date format to use, based on the column widths.
- We want to check the widths using the longest full or abbreviated
- month name and the longest full or abbreviated weekday name, as
- appropriate. */
- max_width = day_view->day_widths[0];
-
- memset (&date_tm, 0, sizeof (date_tm));
- date_tm.tm_year = 100;
-
- /* Try "Thursday 21 January". */
- date_tm.tm_mon = day_view->longest_month_name;
- date_tm.tm_mday = days[date_tm.tm_mon]
- + day_view->longest_weekday_name;
- date_tm.tm_wday = day_view->longest_weekday_name;
- date_tm.tm_isdst = -1;
- /* strftime format %A = full weekday name, %d = day of month,
- %B = full month name. Don't use any other specifiers. */
- strftime (buffer, sizeof (buffer), _("%A %d %B"), &date_tm);
- if (gdk_string_width (font, buffer) < max_width) {
- day_view->date_format = E_DAY_VIEW_DATE_FULL;
- return;
- }
-
- /* Try "Thu 21 Jan". */
- date_tm.tm_mon = day_view->longest_abbreviated_month_name;
- date_tm.tm_mday = days[date_tm.tm_mon]
- + day_view->longest_abbreviated_weekday_name;
- date_tm.tm_wday = day_view->longest_abbreviated_weekday_name;
- date_tm.tm_isdst = -1;
- /* strftime format %a = abbreviated weekday name, %d = day of month,
- %b = abbreviated month name. Don't use any other specifiers. */
- strftime (buffer, sizeof (buffer), _("%a %d %b"), &date_tm);
- if (gdk_string_width (font, buffer) < max_width) {
- day_view->date_format = E_DAY_VIEW_DATE_ABBREVIATED;
- return;
- }
-
- /* Try "23 Jan". */
- date_tm.tm_mon = day_view->longest_abbreviated_month_name;
- date_tm.tm_mday = 23;
- date_tm.tm_wday = 0;
- date_tm.tm_isdst = -1;
- /* strftime format %d = day of month, %b = abbreviated month name.
- Don't use any other specifiers. */
- strftime (buffer, sizeof (buffer), _("%d %b"), &date_tm);
- if (gdk_string_width (font, buffer) < max_width)
- day_view->date_format = E_DAY_VIEW_DATE_NO_WEEKDAY;
- else
- day_view->date_format = E_DAY_VIEW_DATE_SHORT;
-}
-
-
-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;
-}
-
-
-/* Callback used when a component is updated in the live query */
-static void
-query_obj_updated_cb (CalQuery *query, const char *uid,
- gboolean query_in_progress, int n_scanned, int total,
- gpointer data)
-{
- EDayView *day_view;
- EDayViewEvent *event;
- CalComponent *comp;
- CalClientGetStatus status;
- gint day, event_num;
-
- day_view = E_DAY_VIEW (data);
-
- /* If our time hasn't been set yet, just return. */
- if (day_view->lower == 0 && day_view->upper == 0)
- return;
-
- /* Get the event from the server. */
- status = cal_client_get_object (day_view->client, uid, &comp);
-
- switch (status) {
- case CAL_CLIENT_GET_SUCCESS:
- /* Everything is fine */
- break;
-
- case CAL_CLIENT_GET_SYNTAX_ERROR:
- g_message ("query_obj_updated_cb(): Syntax error when getting object `%s'", uid);
- return;
-
- case CAL_CLIENT_GET_NOT_FOUND:
- /* The object is no longer in the server, so do nothing */
- return;
-
- default:
- g_assert_not_reached ();
- 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 (!cal_component_has_recurrences (comp)
- && !cal_component_has_recurrences (event->comp)
- && cal_component_event_dates_match (comp, event->comp)) {
-#if 0
- g_print ("updated object's dates unchanged\n");
-#endif
- e_day_view_foreach_event_with_uid (day_view, uid, e_day_view_update_event_cb, comp);
- gtk_object_unref (GTK_OBJECT (comp));
- 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. */
-#if 0
- g_print ("dates changed - removing occurrences\n");
-#endif
- e_day_view_foreach_event_with_uid (day_view, uid,
- e_day_view_remove_event_cb,
- NULL);
- }
-
- /* Add the occurrences of the event. */
- cal_recur_generate_instances (comp, day_view->lower,
- day_view->upper,
- e_day_view_add_event,
- day_view);
- gtk_object_unref (GTK_OBJECT (comp));
-
- e_day_view_check_layout (day_view);
-
- gtk_widget_queue_draw (day_view->top_canvas);
- gtk_widget_queue_draw (day_view->main_canvas);
-}
-
-/* Callback used when a component is removed from the live query */
-static void
-query_obj_removed_cb (CalQuery *query, const char *uid, gpointer data)
-{
- EDayView *day_view;
-
- day_view = E_DAY_VIEW (data);
-
- 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);
-}
-
-/* Callback used when a query ends */
-static void
-query_query_done_cb (CalQuery *query, CalQueryDoneStatus status, const char *error_str, gpointer data)
-{
- EDayView *day_view;
-
- day_view = E_DAY_VIEW (data);
-
- /* FIXME */
-
- if (status != CAL_QUERY_DONE_SUCCESS)
- fprintf (stderr, "query done: %s\n", error_str);
-}
-
-/* Callback used when an evaluation error occurs when running a query */
-static void
-query_eval_error_cb (CalQuery *query, const char *error_str, gpointer data)
-{
- EDayView *day_view;
-
- day_view = E_DAY_VIEW (data);
-
- /* FIXME */
-
- fprintf (stderr, "eval error: %s\n", error_str);
-}
-
-
-/* Builds a complete query sexp for the day view by adding the predicates to
- * filter only for VEVENTS that fit in the day view's time range.
- */
-static char *
-adjust_query_sexp (EDayView *day_view, const char *sexp)
-{
- char *start, *end;
- char *new_sexp;
-
- /* If the dates have not been set yet, we just want an empty query. */
- if (day_view->lower == 0 || day_view->upper == 0)
- return g_strdup ("#f");
-
- start = isodate_from_time_t (day_view->lower);
- end = isodate_from_time_t (day_view->upper);
-
- new_sexp = g_strdup_printf ("(and (= (get-vtype) \"VEVENT\")"
- " (occur-in-time-range? (make-time \"%s\")"
- " (make-time \"%s\"))"
- " %s)",
- start, end,
- sexp);
-
- g_free (start);
- g_free (end);
-
- return new_sexp;
-}
-
-
-/* Restarts a query for the day view */
-static void
-update_query (EDayView *day_view)
-{
- char *real_sexp;
-
- e_day_view_free_events (day_view);
- gtk_widget_queue_draw (day_view->top_canvas);
- gtk_widget_queue_draw (day_view->main_canvas);
-
- if (!(day_view->client
- && cal_client_get_load_state (day_view->client) == CAL_CLIENT_LOAD_LOADED))
- return;
-
- if (day_view->query) {
- gtk_signal_disconnect_by_data (GTK_OBJECT (day_view->query), day_view);
- gtk_object_unref (GTK_OBJECT (day_view->query));
- }
-
- g_assert (day_view->sexp != NULL);
- real_sexp = adjust_query_sexp (day_view, day_view->sexp);
-
- day_view->query = cal_client_get_query (day_view->client, real_sexp);
- g_free (real_sexp);
-
- if (!day_view->query) {
- g_message ("update_query(): Could not create the query");
- return;
- }
-
- gtk_signal_connect (GTK_OBJECT (day_view->query), "obj_updated",
- GTK_SIGNAL_FUNC (query_obj_updated_cb), day_view);
- gtk_signal_connect (GTK_OBJECT (day_view->query), "obj_removed",
- GTK_SIGNAL_FUNC (query_obj_removed_cb), day_view);
- gtk_signal_connect (GTK_OBJECT (day_view->query), "query_done",
- GTK_SIGNAL_FUNC (query_query_done_cb), day_view);
- gtk_signal_connect (GTK_OBJECT (day_view->query), "eval_error",
- GTK_SIGNAL_FUNC (query_eval_error_cb), day_view);
-}
-
-/* Callback used when the calendar client finishes opening */
-static void
-cal_opened_cb (CalClient *client, CalClientOpenStatus status, gpointer data)
-{
- EDayView *day_view;
-
- day_view = E_DAY_VIEW (data);
-
- if (status != CAL_CLIENT_OPEN_SUCCESS)
- return;
-
- update_query (day_view);
-}
-
-/**
- * e_day_view_set_cal_client:
- * @day_view: A day view.
- * @client: A calendar client interface object.
- *
- * Sets the calendar client interface object that a day view will monitor.
- **/
-void
-e_day_view_set_cal_client (EDayView *day_view,
- CalClient *client)
-{
- g_return_if_fail (day_view != NULL);
- g_return_if_fail (E_IS_DAY_VIEW (day_view));
-
- if (client == day_view->client)
- return;
-
- if (client)
- g_return_if_fail (IS_CAL_CLIENT (client));
-
- if (client)
- gtk_object_ref (GTK_OBJECT (client));
-
- if (day_view->client) {
- gtk_signal_disconnect_by_data (GTK_OBJECT (day_view->client), day_view);
- gtk_object_unref (GTK_OBJECT (day_view->client));
- }
-
- day_view->client = client;
-
- if (day_view->client) {
- if (cal_client_get_load_state (day_view->client) == CAL_CLIENT_LOAD_LOADED)
- update_query (day_view);
- else
- gtk_signal_connect (GTK_OBJECT (day_view->client), "cal_opened",
- GTK_SIGNAL_FUNC (cal_opened_cb), day_view);
- }
-}
-
-/**
- * e_day_view_set_query:
- * @day_view: A day view.
- * @sexp: S-expression that defines the query.
- *
- * Sets the query sexp that the day view will use for filtering the displayed
- * events.
- **/
-void
-e_day_view_set_query (EDayView *day_view, const char *sexp)
-{
- g_return_if_fail (day_view != NULL);
- g_return_if_fail (E_IS_DAY_VIEW (day_view));
- g_return_if_fail (sexp != NULL);
-
- if (day_view->sexp)
- g_free (day_view->sexp);
-
- day_view->sexp = g_strdup (sexp);
-
- update_query (day_view);
-}
-
-
-static gboolean
-e_day_view_update_event_cb (EDayView *day_view,
- gint day,
- gint event_num,
- gpointer data)
-{
- EDayViewEvent *event;
- CalComponent *comp;
-
- comp = 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);
- }
-
- gtk_object_unref (GTK_OBJECT (event->comp));
- event->comp = comp;
- gtk_object_ref (GTK_OBJECT (comp));
-
- 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 (in both views).
- If the callback returns FALSE the iteration is stopped.
- 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 (EDayView *day_view,
- 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 (!(*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 (!(*callback) (day_view, E_DAY_VIEW_LONG_EVENT, event_num,
- data))
- return;
- }
-}
-
-
-/* This calls a given function for each event instance that matches the given
- uid. If the callback returns FALSE the iteration is stopped.
- 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;
- const char *u;
-
- 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);
-
- cal_component_get_uid (event->comp, &u);
- if (uid && !strcmp (uid, u)) {
- 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);
-
- cal_component_get_uid (event->comp, &u);
- if (u && !strcmp (uid, u)) {
- if (!(*callback) (day_view, E_DAY_VIEW_LONG_EVENT,
- event_num, data))
- return;
- }
- }
-}
-
-
-static gboolean
-e_day_view_remove_event_cb (EDayView *day_view,
- gint day,
- gint event_num,
- gpointer data)
-{
- EDayViewEvent *event;
-
-#if 0
- 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));
- gtk_object_unref (GTK_OBJECT (event->comp));
-
- 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;
- char *text, *start_suffix, *end_suffix;
- gboolean free_text = FALSE, editing_event = FALSE;
- gint offset;
- gint start_hour, start_display_hour, start_minute, start_suffix_width;
- gint end_hour, end_display_hour, end_minute, end_suffix_width;
- CalComponentText summary;
-
- event = &g_array_index (day_view->events[day], EDayViewEvent,
- event_num);
-
- /* If the event isn't visible just return. */
- if (!event->canvas_item)
- return;
-
- cal_component_get_summary (event->comp, &summary);
- text = summary.value ? (char*) summary.value : "";
-
- 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
- || (day_view->show_event_end_times
- && 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;
-
- start_hour = start_minute / 60;
- start_minute = start_minute % 60;
-
- end_hour = end_minute / 60;
- end_minute = end_minute % 60;
-
- e_day_view_convert_time_to_display (day_view, start_hour,
- &start_display_hour,
- &start_suffix,
- &start_suffix_width);
- e_day_view_convert_time_to_display (day_view, end_hour,
- &end_display_hour,
- &end_suffix,
- &end_suffix_width);
-
- if (day_view->use_24_hour_format) {
- if (day_view->show_event_end_times) {
- /* 24 hour format with end time. */
- text = g_strdup_printf
- ("%2i:%02i-%2i:%02i %s",
- start_display_hour, start_minute,
- end_display_hour, end_minute,
- text);
- } else {
- /* 24 hour format without end time. */
- text = g_strdup_printf
- ("%2i:%02i %s",
- start_display_hour, start_minute,
- text);
- }
- } else {
- if (day_view->show_event_end_times) {
- /* 12 hour format with end time. */
- text = g_strdup_printf
- ("%2i:%02i%s-%2i:%02i%s %s",
- start_display_hour, start_minute,
- start_suffix,
- end_display_hour, end_minute,
- end_suffix,
- text);
- } else {
- /* 12 hour format without end time. */
- text = g_strdup_printf
- ("%2i:%02i%s %s",
- start_display_hour, start_minute,
- start_suffix,
- 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;
- CalComponentText summary;
-
- event = &g_array_index (day_view->long_events, EDayViewEvent,
- event_num);
-
- /* If the event isn't visible just return. */
- if (!event->canvas_item)
- return;
-
- cal_component_get_summary (event->comp, &summary);
- gnome_canvas_item_set (event->canvas_item,
- "text", summary.value ? summary.value : "",
- 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;
- const char *u;
-
- 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);
-
- cal_component_get_uid (event->comp, &u);
- if (u && !strcmp (uid, u)) {
- *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);
-
- cal_component_get_uid (event->comp, &u);
- if (u && !strcmp (uid, u)) {
- *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)
-{
- 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
- work-week start day. */
- if (!day_view->work_week_view) {
- lower = time_day_begin (start_time);
- } else {
- lower = e_day_view_find_work_week_start (day_view, start_time);
- }
-
- /* See if we need to change the days shown. */
- if (lower != day_view->lower) {
- e_day_view_recalc_day_starts (day_view, lower);
- update_query (day_view);
- }
-
- /* 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);
- }
-}
-
-
-/* Finds the start of the working week which includes the given time. */
-static time_t
-e_day_view_find_work_week_start (EDayView *day_view,
- time_t start_time)
-{
- GDate date;
- gint weekday, day, i, offset;
-
- g_date_clear (&date, 1);
- g_date_set_time (&date, start_time);
-
- /* The start of the work-week is the first working day after the
- week start day. */
-
- /* Get the weekday corresponding to start_time, 0 (Sun) to 6 (Sat). */
- weekday = g_date_weekday (&date) % 7;
-
- /* Calculate the first working day of the week, 0 (Sun) to 6 (Sat).
- It will automatically default to the week start day if no days
- are set as working days. */
- day = (day_view->week_start_day + 1) % 7;
- for (i = 0; i < 7; i++) {
- if (day_view->working_days & (1 << day))
- break;
- day = (day + 1) % 7;
- }
-
- /* Calculate how many days we need to go back to the first workday. */
- offset = (weekday + 7 - day) % 7;
-
- g_date_subtract_days (&date, offset);
-
- return time_from_day (g_date_year (&date),
- g_date_month (&date) - 1,
- g_date_day (&date));
-}
-
-
-/* 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;
- time_t start, end;
-
- 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 = day_view->day_starts[start_col];
- end = day_view->day_starts[end_col + 1];
- } else {
- /* Convert the start col + row into a time. */
- start = e_day_view_convert_grid_position_to_time (day_view, start_col, start_row);
- end = e_day_view_convert_grid_position_to_time (day_view, end_col, end_row + 1);
- }
-
- if (start_time)
- *start_time = start;
-
- if (end_time)
- *end_time = end;
-}
-
-
-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];
-}
-
-
-/* Whether we are displaying a work-week, in which case the display always
- starts on the first day of the working week. */
-gboolean
-e_day_view_get_work_week_view (EDayView *day_view)
-{
- g_return_val_if_fail (E_IS_DAY_VIEW (day_view), FALSE);
-
- return day_view->work_week_view;
-}
-
-
-void
-e_day_view_set_work_week_view (EDayView *day_view,
- gboolean work_week_view)
-{
- g_return_if_fail (E_IS_DAY_VIEW (day_view));
-
- if (day_view->work_week_view == work_week_view)
- return;
-
- day_view->work_week_view = work_week_view;
-
- if (day_view->work_week_view)
- e_day_view_recalc_work_week (day_view);
-}
-
-
-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)
- return;
-
- day_view->days_shown = days_shown;
-
- /* If the date isn't set, just return. */
- if (day_view->lower == 0 && day_view->upper == 0)
- return;
-
- e_day_view_recalc_day_starts (day_view, day_view->lower);
- e_day_view_recalc_cell_sizes (day_view);
-
- update_query (day_view);
-}
-
-
-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 need to update all the day event labels since the start & end
- times may or may not be on row boundaries any more. */
- e_day_view_foreach_event (day_view,
- e_day_view_set_show_times_cb, NULL);
-
- /* 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);
-}
-
-
-/* This specifies the working days in the week. The value is a bitwise
- combination of day flags. Defaults to Mon-Fri. */
-EDayViewDays
-e_day_view_get_working_days (EDayView *day_view)
-{
- g_return_val_if_fail (E_IS_DAY_VIEW (day_view), 0);
-
- return day_view->working_days;
-}
-
-
-void
-e_day_view_set_working_days (EDayView *day_view,
- EDayViewDays days)
-{
- g_return_if_fail (E_IS_DAY_VIEW (day_view));
-
- if (day_view->working_days == days)
- return;
-
- day_view->working_days = days;
-
- if (day_view->work_week_view)
- e_day_view_recalc_work_week (day_view);
-
- /* We have to do this, as the new working days may have no effect on
- the days shown, but we still want the background color to change. */
- gtk_widget_queue_draw (day_view->main_canvas);
-}
-
-
-static void
-e_day_view_recalc_work_week_days_shown (EDayView *day_view)
-{
- gint first_day, last_day, i, days_shown;
- gboolean has_working_days = FALSE;
-
- /* Find the first working day in the week, 0 (Sun) to 6 (Sat). */
- first_day = (day_view->week_start_day + 1) % 7;
- for (i = 0; i < 7; i++) {
- if (day_view->working_days & (1 << first_day)) {
- has_working_days = TRUE;
- break;
- }
- first_day = (first_day + 1) % 7;
- }
-
- if (has_working_days) {
- /* Now find the last working day of the week, backwards. */
- last_day = day_view->week_start_day % 7;
- for (i = 0; i < 7; i++) {
- if (day_view->working_days & (1 << last_day))
- break;
- last_day = (last_day + 6) % 7;
- }
- /* Now calculate the days we need to show to include all the
- working days in the week. Add 1 to make it inclusive. */
- days_shown = (last_day + 7 - first_day) % 7 + 1;
- } else {
- /* If no working days are set, just use 7. */
- days_shown = 7;
- }
-
- e_day_view_set_days_shown (day_view, days_shown);
-}
-
-
-/* The start and end time of the working day. This only affects the background
- colors. */
-void
-e_day_view_get_working_day (EDayView *day_view,
- gint *start_hour,
- gint *start_minute,
- gint *end_hour,
- gint *end_minute)
-{
- g_return_if_fail (E_IS_DAY_VIEW (day_view));
-
- *start_hour = day_view->work_day_start_hour;
- *start_minute = day_view->work_day_start_minute;
- *end_hour = day_view->work_day_end_hour;
- *end_minute = day_view->work_day_end_minute;
-}
-
-
-void
-e_day_view_set_working_day (EDayView *day_view,
- gint start_hour,
- gint start_minute,
- gint end_hour,
- gint end_minute)
-{
- g_return_if_fail (E_IS_DAY_VIEW (day_view));
-
- day_view->work_day_start_hour = start_hour;
- day_view->work_day_start_minute = start_minute;
- day_view->work_day_end_hour = end_hour;
- day_view->work_day_end_minute = end_minute;
-
- gtk_widget_queue_draw (day_view->main_canvas);
-}
-
-
-/* Whether we use 12-hour of 24-hour format. */
-gboolean
-e_day_view_get_24_hour_format (EDayView *day_view)
-{
- g_return_val_if_fail (E_IS_DAY_VIEW (day_view), FALSE);
-
- return day_view->use_24_hour_format;
-}
-
-
-void
-e_day_view_set_24_hour_format (EDayView *day_view,
- gboolean use_24_hour)
-{
- g_return_if_fail (E_IS_DAY_VIEW (day_view));
-
- if (day_view->use_24_hour_format == use_24_hour)
- return;
-
- day_view->use_24_hour_format = use_24_hour;
-
- /* We need to update all the text in the events since they may contain
- the time in the old format. */
- e_day_view_foreach_event (day_view, e_day_view_set_show_times_cb,
- NULL);
-
- /* FIXME: We need to re-layout the top canvas since the time
- format affects the sizes. */
- gtk_widget_queue_draw (day_view->time_canvas);
- gtk_widget_queue_draw (day_view->top_canvas);
-}
-
-
-/* Whether we display event end times in the main canvas. */
-gboolean
-e_day_view_get_show_event_end_times (EDayView *day_view)
-{
- g_return_val_if_fail (E_IS_DAY_VIEW (day_view), TRUE);
-
- return day_view->show_event_end_times;
-}
-
-
-void
-e_day_view_set_show_event_end_times (EDayView *day_view,
- gboolean show)
-{
- g_return_if_fail (E_IS_DAY_VIEW (day_view));
-
- if (day_view->show_event_end_times != show) {
- day_view->show_event_end_times = show;
- e_day_view_foreach_event (day_view,
- e_day_view_set_show_times_cb, NULL);
- }
-}
-
-
-/* This is a callback used to update all day event labels. */
-static gboolean
-e_day_view_set_show_times_cb (EDayView *day_view,
- gint day,
- gint event_num,
- gpointer data)
-{
- if (day != E_DAY_VIEW_LONG_EVENT) {
- e_day_view_update_event_label (day_view, day, event_num);
- }
-
- return TRUE;
-}
-
-
-/* The first day of the week, 0 (Monday) to 6 (Sunday). */
-gint
-e_day_view_get_week_start_day (EDayView *day_view)
-{
- g_return_val_if_fail (E_IS_DAY_VIEW (day_view), 0);
-
- return day_view->week_start_day;
-}
-
-
-void
-e_day_view_set_week_start_day (EDayView *day_view,
- gint week_start_day)
-{
- g_return_if_fail (E_IS_DAY_VIEW (day_view));
- g_return_if_fail (week_start_day >= 0);
- g_return_if_fail (week_start_day < 7);
-
- if (day_view->week_start_day == week_start_day)
- return;
-
- day_view->week_start_day = week_start_day;
-
- if (day_view->work_week_view)
- e_day_view_recalc_work_week (day_view);
-}
-
-
-static void
-e_day_view_recalc_work_week (EDayView *day_view)
-{
- time_t lower;
-
- /* If we aren't showing the work week, just return. */
- if (!day_view->work_week_view)
- return;
-
- e_day_view_recalc_work_week_days_shown (day_view);
-
- /* If the date isn't set, just return. */
- if (day_view->lower == 0 && day_view->upper == 0)
- return;
-
- lower = e_day_view_find_work_week_start (day_view, day_view->lower);
- if (lower != day_view->lower) {
- /* Reset the selection, as it may disappear. */
- day_view->selection_start_day = -1;
-
- e_day_view_recalc_day_starts (day_view, lower);
- update_query (day_view);
-
- /* This updates the date navigator. */
- e_day_view_update_calendar_selection_time (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) {
- if (!GTK_WIDGET_HAS_FOCUS (day_view))
- gtk_widget_grab_focus (GTK_WIDGET (day_view));
-
- 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;
-
- /* Handle scroll wheel events */
- if (event->button == 4) {
- /* The wheel has been moved up, so scroll the canvas down. */
- e_day_view_scroll (day_view, E_DAY_VIEW_WHEEL_MOUSE_STEP_SIZE);
- return TRUE;
- }
- if (event->button == 5) {
- /* The wheel has been moved down, so scroll the canvas up. */
- e_day_view_scroll (day_view, -E_DAY_VIEW_WHEEL_MOUSE_STEP_SIZE);
- return TRUE;
- }
-
- /* 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) {
- if (!GTK_WIDGET_HAS_FOCUS (day_view))
- gtk_widget_grab_focus (GTK_WIDGET (day_view));
-
- e_day_view_on_event_right_click (day_view, event, -1, -1);
- }
-
- return TRUE;
-}
-
-
-static gboolean
-e_day_view_on_time_canvas_button_press (GtkWidget *widget,
- GdkEventButton *event,
- EDayView *day_view)
-{
- /* Handle scroll wheel events */
- if (event->button == 4 || event->button == 5) {
- GtkAdjustment *adj = GTK_LAYOUT (day_view->main_canvas)->vadjustment;
- gfloat new_value;
-
- new_value = adj->value + ((event->button == 4) ?
- -adj->page_increment / 2:
- adj->page_increment / 2);
- new_value = CLAMP (new_value, adj->lower, adj->upper - adj->page_size);
- gtk_adjustment_set_value (adj, new_value);
-
- return TRUE;
- }
-
- return FALSE;
-}
-
-
-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) {
- if (!GTK_WIDGET_HAS_FOCUS (day_view))
- gtk_widget_grab_focus (GTK_WIDGET (day_view));
-
- 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) {
- if (!GTK_WIDGET_HAS_FOCUS (day_view))
- gtk_widget_grab_focus (GTK_WIDGET (day_view));
-
- 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 (!(cal_component_has_recurrences (event->comp))
- && (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 (!(cal_component_has_recurrences (event->comp))
- && (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)
-{
-}
-
-enum {
- /*
- * This is used to "flag" events that can not be editted
- */
- MASK_EDITABLE = 1,
-
- /*
- * To disable recurring actions to be displayed
- */
- MASK_RECURRING = 2,
-
- /*
- * To disable actions for non-recurring items to be displayed
- */
- MASK_SINGLE = 4,
-
- /*
- * This is used to when an event is currently being edited
- * in another window and we want to disable the event
- * from being edited twice
- */
- MASK_EDITING = 8
-};
-
-static EPopupMenu main_items [] = {
- { N_("New Appointment"), NULL,
- e_day_view_on_new_appointment, NULL, 0 },
- { N_("New All Day Event"), NULL,
- e_day_view_on_new_event, NULL, 0 },
-
- { "", NULL, NULL, NULL, 0 },
-
- { N_("Go to Today"), NULL,
- e_day_view_on_goto_today, NULL, 0 },
- { N_("Go to Date..."), NULL,
- e_day_view_on_goto_date, NULL, 0 },
-
- { NULL, NULL, NULL, NULL, 0 }
-};
-
-static EPopupMenu child_items [] = {
- { N_("Open"), NULL,
- e_day_view_on_edit_appointment, NULL, MASK_EDITABLE | MASK_EDITING },
- { N_("Delete this Appointment"), NULL,
- e_day_view_on_delete_appointment, NULL, MASK_EDITABLE | MASK_SINGLE | MASK_EDITING },
- { N_("Schedule Meeting"), NULL,
- e_day_view_on_schedule_meet, NULL, MASK_EDITING },
-
- { "", NULL, NULL, NULL, MASK_SINGLE},
-
- /*
- * The following are only shown if this is a recurring event
- */
- { "", NULL, NULL, NULL, MASK_SINGLE},
- { N_("Make this Occurrence Movable"), NULL,
- e_day_view_on_unrecur_appointment, NULL, MASK_RECURRING | MASK_EDITING },
- { N_("Delete this Occurrence"), NULL,
- e_day_view_on_delete_occurrence, NULL, MASK_RECURRING | MASK_EDITING },
- { N_("Delete all Occurrences"), NULL,
- e_day_view_on_delete_appointment, NULL, MASK_RECURRING | MASK_EDITING },
-
- { NULL, NULL, NULL, NULL, 0 }
-};
-
-static void
-e_day_view_on_event_right_click (EDayView *day_view,
- GdkEventButton *bevent,
- gint day,
- gint event_num)
-{
- EDayViewEvent *event;
- int have_selection;
- gboolean being_edited;
- EPopupMenu *context_menu;
- int hide_mask = 0;
- int disable_mask = 0;
-
- /*
- * FIXME:
- * 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.
- */
-
- being_edited = FALSE;
-
- have_selection = GTK_WIDGET_HAS_FOCUS (day_view)
- && day_view->selection_start_day != -1;
-
- if (event_num == -1)
- context_menu = main_items;
- else {
- context_menu = child_items;
-
- 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 (cal_component_has_recurrences (event->comp))
- hide_mask |= MASK_SINGLE;
- else
- hide_mask |= MASK_RECURRING;
- }
-
- if (being_edited)
- disable_mask |= MASK_EDITING;
-
- day_view->popup_event_day = day;
- day_view->popup_event_num = event_num;
-
- e_popup_menu_run (context_menu, (GdkEvent *) bevent, disable_mask, hide_mask, day_view);
-}
-
-static void
-e_day_view_on_new_appointment (GtkWidget *widget, gpointer data)
-{
- EDayView *day_view = E_DAY_VIEW (data);
- time_t dtstart, dtend;
-
- e_day_view_get_selected_time_range (day_view, &dtstart, &dtend);
- gnome_calendar_new_appointment_for (
- day_view->calendar, dtstart, dtend, FALSE);
-}
-
-static void
-e_day_view_on_new_event (GtkWidget *widget, gpointer data)
-{
- EDayView *day_view = E_DAY_VIEW (data);
- time_t dtstart, dtend;
-
- e_day_view_get_selected_time_range (day_view, &dtstart, &dtend);
- gnome_calendar_new_appointment_for (
- day_view->calendar, dtstart, dtend, TRUE);
-}
-
-static void
-e_day_view_on_goto_date (GtkWidget *widget, gpointer data)
-{
- EDayView *day_view = E_DAY_VIEW (data);
-
- goto_dialog (day_view->calendar);
-}
-
-static void
-e_day_view_on_goto_today (GtkWidget *widget, gpointer data)
-{
- EDayView *day_view = E_DAY_VIEW (data);
-
- calendar_goto_today (day_view->calendar);
-}
-
-static void
-e_day_view_on_edit_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->calendar)
- gnome_calendar_edit_object (day_view->calendar, event->comp);
- else
- g_warning ("Calendar not set");
-}
-
-
-static void
-e_day_view_on_delete_occurrence (GtkWidget *widget, gpointer data)
-{
- EDayView *day_view;
- EDayViewEvent *event;
- CalComponent *comp;
-
- day_view = E_DAY_VIEW (data);
-
- event = e_day_view_get_popup_menu_event (day_view);
- if (event == NULL)
- return;
-
- /* We must duplicate the CalComponent, or we won't know it has changed
- when we get the "update_event" callback. */
- comp = cal_component_clone (event->comp);
- cal_comp_util_add_exdate (comp, icaltime_from_timet (event->start, FALSE));
-
- if (!cal_client_update_object (day_view->client, comp))
- g_message ("e_day_view_on_delete_occurrence(): Could not update the object!");
-
- gtk_object_unref (GTK_OBJECT (comp));
-}
-
-
-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);
-
- if (delete_component_dialog (event->comp, widget)) {
- const char *uid;
-
- cal_component_get_uid (event->comp, &uid);
-
- /* We don't check the return value; FALSE can mean the object
- * was not in the server anyways.
- */
- cal_client_remove_object (day_view->client, uid);
- }
-}
-
-
-static void
-e_day_view_on_schedule_meet (GtkWidget *widget, gpointer data)
-{
- EDayView *day_view;
- EDayViewEvent *event;
- EMeetingEditor *editor;
-
- day_view = E_DAY_VIEW (data);
-
- event = e_day_view_get_popup_menu_event (day_view);
- if (event == NULL)
- return;
-
- editor = e_meeting_editor_new (event->comp, day_view->client);
-
- e_meeting_edit (editor);
- e_meeting_editor_free (editor);
-}
-
-static void
-e_day_view_on_unrecur_appointment (GtkWidget *widget, gpointer data)
-{
- EDayView *day_view;
- EDayViewEvent *event;
- CalComponent *comp, *new_comp;
- CalComponentDateTime date;
- struct icaltimetype itt;
-
- day_view = E_DAY_VIEW (data);
-
- event = e_day_view_get_popup_menu_event (day_view);
- if (event == NULL)
- return;
-
- date.value = &itt;
- date.tzid = NULL;
-
- /* For the recurring object, we add an exception to get rid of the
- instance. */
-
- comp = cal_component_clone (event->comp);
- cal_comp_util_add_exdate (comp, icaltime_from_timet (event->start, FALSE));
-
- /* 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_comp = cal_component_clone (event->comp);
- cal_component_set_uid (new_comp, cal_component_gen_uid ());
- cal_component_set_rdate_list (new_comp, NULL);
- cal_component_set_rrule_list (new_comp, NULL);
- cal_component_set_exdate_list (new_comp, NULL);
- cal_component_set_exrule_list (new_comp, NULL);
-
- date.value = &itt;
- date.tzid = NULL;
-
- *date.value = icaltime_from_timet (event->start, FALSE);
- cal_component_set_dtstart (new_comp, &date);
- *date.value = icaltime_from_timet (event->end, FALSE);
- cal_component_set_dtend (new_comp, &date);
-
- /* Now update both CalComponents. Note that we do this last since at
- * present the updates happen synchronously so our event may disappear.
- */
- if (!cal_client_update_object (day_view->client, comp))
- g_message ("e_day_view_on_unrecur_appointment(): Could not update the object!");
-
- gtk_object_unref (GTK_OBJECT (comp));
-
- if (!cal_client_update_object (day_view->client, new_comp))
- g_message ("e_day_view_on_unrecur_appointment(): Could not update the object!");
-
- gtk_object_unref (GTK_OBJECT (new_comp));
-}
-
-
-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_is_being_dragged) {
- 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_is_being_dragged) {
- 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);
-
-#if 0
- g_print ("Start: %s", ctime (&start));
- g_print ("End : %s", ctime (&end));
-#endif
-
- if (day_view->calendar)
- 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_is_being_dragged) {
- 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 (!(cal_component_has_recurrences (event->comp))
- && (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 && !cal_component_has_recurrences (event->comp)) {
- 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_is_being_dragged) {
- 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 (!cal_component_has_recurrences (event->comp)
- && (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 && !cal_component_has_recurrences (event->comp)) {
- 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_is_being_dragged = TRUE;
- 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)
-{
- 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;
- }
- }
-
- e_day_view_normalize_selection (day_view);
-
- /* FIXME: Optimise? */
- if (need_redraw) {
- gtk_widget_queue_draw (day_view->top_canvas);
- gtk_widget_queue_draw (day_view->main_canvas);
- }
-}
-
-
-static void
-e_day_view_normalize_selection (EDayView *day_view)
-{
- gint tmp_row, tmp_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;
- }
-}
-
-
-void
-e_day_view_finish_selection (EDayView *day_view)
-{
- day_view->selection_is_being_dragged = FALSE;
- 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;
- CalComponent *comp;
- CalComponentDateTime date;
- struct icaltimetype itt;
- time_t dt;
-
- event_num = day_view->resize_event_num;
- event = &g_array_index (day_view->long_events, EDayViewEvent,
- event_num);
-
- /* We use a temporary copy of the comp since we don't want to
- change the original comp here. Otherwise we would not detect that
- the event's time had changed in the "update_event" callback. */
- comp = cal_component_clone (event->comp);
-
- date.value = &itt;
- date.tzid = NULL;
-
- if (day_view->resize_drag_pos == E_DAY_VIEW_POS_LEFT_EDGE) {
- dt = day_view->day_starts[day_view->resize_start_row];
- *date.value = icaltime_from_timet (dt, FALSE);
- cal_component_set_dtstart (comp, &date);
- } else {
- dt = day_view->day_starts[day_view->resize_end_row + 1];
- *date.value = icaltime_from_timet (dt, FALSE);
- cal_component_set_dtend (comp, &date);
- }
-
- gnome_canvas_item_hide (day_view->resize_long_event_rect_item);
-
- day_view->resize_drag_pos = E_DAY_VIEW_POS_NONE;
-
- if (!cal_client_update_object (day_view->client, comp))
- g_message ("e_day_view_finish_long_event_resize(): Could not update the object!");
-
- gtk_object_unref (GTK_OBJECT (comp));
-}
-
-
-/* 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;
- CalComponent *comp;
- CalComponentDateTime date;
- struct icaltimetype itt;
- time_t dt;
-
- 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. */
- comp = cal_component_clone (event->comp);
-
- date.value = &itt;
- date.tzid = NULL;
-
- if (day_view->resize_drag_pos == E_DAY_VIEW_POS_TOP_EDGE) {
- dt = e_day_view_convert_grid_position_to_time (day_view, day, day_view->resize_start_row);
- *date.value = icaltime_from_timet (dt, FALSE);
- cal_component_set_dtstart (comp, &date);
- } else {
- dt = e_day_view_convert_grid_position_to_time (day_view, day, day_view->resize_end_row + 1);
- *date.value = icaltime_from_timet (dt, FALSE);
- cal_component_set_dtend (comp, &date);
- }
-
- 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;
-
- if (!cal_client_update_object (day_view->client, comp))
- g_message ("e_day_view_finish_resize(): Could not update the object!");
-
- gtk_object_unref (GTK_OBJECT (comp));
-}
-
-
-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_free_events (EDayView *day_view)
-{
- gint day;
-
- /* 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;
-
- 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));
- gtk_object_unref (GTK_OBJECT (event->comp));
- }
-
- g_array_set_size (array, 0);
-}
-
-
-/* This adds one event to the view, adding it to the appropriate array. */
-static gboolean
-e_day_view_add_event (CalComponent *comp,
- 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);
-
-#if 0
- g_print ("Day view lower: %s", ctime (&day_view->lower));
- g_print ("Day view upper: %s", ctime (&day_view->upper));
- g_print ("Event start: %s", ctime (&start));
- g_print ("Event end : %s\n", ctime (&end));
-#endif
-
- /* 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.comp = comp;
- gtk_object_ref (GTK_OBJECT (comp));
- 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;
- CalComponent *comp;
- gint min_text_x, max_text_w, text_width, line_len;
- gchar *text, *end_of_line;
- gboolean show_icons = TRUE, use_max_width = FALSE;
-
- event = &g_array_index (day_view->long_events, EDayViewEvent,
- event_num);
-
- 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;
-
- /* 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;
- comp = event->comp;
- 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 (cal_component_has_alarms (comp))
- num_icons++;
- if (cal_component_has_recurrences (comp))
- 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,
- "use_ellipsis", TRUE,
- "draw_background", FALSE,
- "fill_color_rgba", GNOME_CANVAS_COLOR(0, 0, 0),
- 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 = e_day_view_get_time_string_width (day_view);
-
- 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,
- "clip_width", (gdouble) text_w,
- "clip_height", (gdouble) item_h,
- NULL);
- e_canvas_item_move_absolute(event->canvas_item,
- text_x, item_y);
-}
-
-
-/* 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 so
- that all rows are not connected - each row is the start of a new
- group. */
- 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;
- CalComponent *comp;
-
- event = &g_array_index (day_view->events[day], EDayViewEvent,
- event_num);
- comp = event->comp;
-
- 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 (cal_component_has_alarms (comp))
- num_icons++;
- if (cal_component_has_recurrences (comp))
- 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,
- "use_ellipsis", TRUE,
- "draw_background", FALSE,
- "fill_color_rgba", GNOME_CANVAS_COLOR(0, 0, 0),
- 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,
- "clip_width", (gdouble) item_w,
- "clip_height", (gdouble) item_h,
- NULL);
- e_canvas_item_move_absolute(event->canvas_item,
- item_x, item_y);
- }
-}
-
-
-/* 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;
- CalComponent *comp;
- gint day, event_num;
- gchar *initial_text;
- guint keyval;
- gboolean stop_emission;
- time_t dtstart, dtend;
- CalComponentDateTime dt;
- struct icaltimetype itt;
- const char *uid;
-
- 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);
- keyval = event->keyval;
-
- /* The Escape key aborts a resize operation. */
- if (day_view->resize_drag_pos != E_DAY_VIEW_POS_NONE) {
- if (keyval == GDK_Escape) {
- e_day_view_abort_resize (day_view, event->time);
- }
- return FALSE;
- }
-
- /* Handle the cursor keys for moving & extending the selection. */
- stop_emission = TRUE;
- if (event->state & GDK_SHIFT_MASK) {
- switch (keyval) {
- case GDK_Up:
- e_day_view_cursor_key_up_shifted (day_view, event);
- break;
- case GDK_Down:
- e_day_view_cursor_key_down_shifted (day_view, event);
- break;
- case GDK_Left:
- e_day_view_cursor_key_left_shifted (day_view, event);
- break;
- case GDK_Right:
- e_day_view_cursor_key_right_shifted (day_view, event);
- break;
- default:
- stop_emission = FALSE;
- break;
- }
- } else {
- switch (keyval) {
- case GDK_Up:
- e_day_view_cursor_key_up (day_view, event);
- break;
- case GDK_Down:
- e_day_view_cursor_key_down (day_view, event);
- break;
- case GDK_Left:
- e_day_view_cursor_key_left (day_view, event);
- break;
- case GDK_Right:
- e_day_view_cursor_key_right (day_view, event);
- break;
- case GDK_Page_Up:
- e_day_view_scroll (day_view, E_DAY_VIEW_PAGE_STEP);
- break;
- case GDK_Page_Down:
- e_day_view_scroll (day_view, -E_DAY_VIEW_PAGE_STEP);
- break;
- default:
- stop_emission = FALSE;
- break;
- }
- }
- if (stop_emission)
- return TRUE;
-
- 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)) {
- return FALSE;
- }
-
- /* We only want to start an edit with a return key or a simple
- character. */
- if (keyval == GDK_Return) {
- initial_text = NULL;
- } else if ((keyval < 0x20)
- || (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 */
-
- comp = cal_component_new ();
- cal_component_set_new_vtype (comp, CAL_COMPONENT_EVENT);
-
- e_day_view_get_selected_time_range (day_view, &dtstart, &dtend);
-
- dt.value = &itt;
- dt.tzid = NULL;
-
- *dt.value = icaltime_from_timet (dtstart, FALSE);
- cal_component_set_dtstart (comp, &dt);
-
- *dt.value = icaltime_from_timet (dtend, FALSE);
- cal_component_set_dtend (comp, &dt);
-
- /* 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 (comp, dtstart, 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);
-
- cal_component_get_uid (comp, &uid);
- if (e_day_view_find_event_from_uid (day_view, uid, &day, &event_num)) {
- e_day_view_start_editing_event (day_view, day, event_num,
- initial_text);
- } else {
- g_warning ("Couldn't find event to start editing.\n");
- }
-
- gtk_object_unref (GTK_OBJECT (comp));
-
- return TRUE;
-}
-
-
-static void
-e_day_view_cursor_key_up_shifted (EDayView *day_view, GdkEventKey *event)
-{
- gint *row;
-
- if (day_view->selection_in_top_canvas)
- return;
-
- if (day_view->selection_drag_pos == E_DAY_VIEW_DRAG_START)
- row = &day_view->selection_start_row;
- else
- row = &day_view->selection_end_row;
-
- if (*row == 0)
- return;
-
- *row = *row - 1;
-
- e_day_view_ensure_rows_visible (day_view, *row, *row);
-
- e_day_view_normalize_selection (day_view);
-
- e_day_view_update_calendar_selection_time (day_view);
-
- /* FIXME: Optimise? */
- gtk_widget_queue_draw (day_view->top_canvas);
- gtk_widget_queue_draw (day_view->main_canvas);
-}
-
-
-static void
-e_day_view_cursor_key_down_shifted (EDayView *day_view, GdkEventKey *event)
-{
- gint *row;
-
- if (day_view->selection_in_top_canvas)
- return;
-
- if (day_view->selection_drag_pos == E_DAY_VIEW_DRAG_START)
- row = &day_view->selection_start_row;
- else
- row = &day_view->selection_end_row;
-
- if (*row >= day_view->rows - 1)
- return;
-
- *row = *row + 1;
-
- e_day_view_ensure_rows_visible (day_view, *row, *row);
-
- e_day_view_normalize_selection (day_view);
-
- e_day_view_update_calendar_selection_time (day_view);
-
- /* FIXME: Optimise? */
- gtk_widget_queue_draw (day_view->top_canvas);
- gtk_widget_queue_draw (day_view->main_canvas);
-}
-
-
-static void
-e_day_view_cursor_key_left_shifted (EDayView *day_view, GdkEventKey *event)
-{
- gint *day;
-
- if (day_view->selection_drag_pos == E_DAY_VIEW_DRAG_START)
- day = &day_view->selection_start_day;
- else
- day = &day_view->selection_end_day;
-
- if (*day == 0)
- return;
-
- *day = *day - 1;
-
- e_day_view_normalize_selection (day_view);
-
- e_day_view_update_calendar_selection_time (day_view);
-
- /* FIXME: Optimise? */
- gtk_widget_queue_draw (day_view->top_canvas);
- gtk_widget_queue_draw (day_view->main_canvas);
-}
-
-
-static void
-e_day_view_cursor_key_right_shifted (EDayView *day_view, GdkEventKey *event)
-{
- gint *day;
-
- if (day_view->selection_drag_pos == E_DAY_VIEW_DRAG_START)
- day = &day_view->selection_start_day;
- else
- day = &day_view->selection_end_day;
-
- if (*day >= day_view->days_shown - 1)
- return;
-
- *day = *day + 1;
-
- e_day_view_normalize_selection (day_view);
-
- e_day_view_update_calendar_selection_time (day_view);
-
- /* FIXME: Optimise? */
- gtk_widget_queue_draw (day_view->top_canvas);
- gtk_widget_queue_draw (day_view->main_canvas);
-}
-
-
-static void
-e_day_view_cursor_key_up (EDayView *day_view, GdkEventKey *event)
-{
- if (day_view->selection_start_day == -1) {
- day_view->selection_start_day = 0;
- day_view->selection_start_row = 0;
- }
- day_view->selection_end_day = day_view->selection_start_day;
-
- if (day_view->selection_in_top_canvas) {
- return;
- } else if (day_view->selection_start_row == 0) {
- day_view->selection_in_top_canvas = TRUE;
- day_view->selection_start_row = -1;
- } else {
- day_view->selection_start_row--;
- }
- day_view->selection_end_row = day_view->selection_start_row;
-
- if (!day_view->selection_in_top_canvas)
- e_day_view_ensure_rows_visible (day_view,
- day_view->selection_start_row,
- day_view->selection_end_row);
-
- e_day_view_update_calendar_selection_time (day_view);
-
- /* FIXME: Optimise? */
- gtk_widget_queue_draw (day_view->top_canvas);
- gtk_widget_queue_draw (day_view->main_canvas);
-}
-
-
-static void
-e_day_view_cursor_key_down (EDayView *day_view, GdkEventKey *event)
-{
- if (day_view->selection_start_day == -1) {
- day_view->selection_start_day = 0;
- day_view->selection_start_row = 0;
- }
- day_view->selection_end_day = day_view->selection_start_day;
-
- if (day_view->selection_in_top_canvas) {
- day_view->selection_in_top_canvas = FALSE;
- day_view->selection_start_row = 0;
- } else if (day_view->selection_start_row >= day_view->rows - 1) {
- return;
- } else {
- day_view->selection_start_row++;
- }
- day_view->selection_end_row = day_view->selection_start_row;
-
- if (!day_view->selection_in_top_canvas)
- e_day_view_ensure_rows_visible (day_view,
- day_view->selection_start_row,
- day_view->selection_end_row);
-
- e_day_view_update_calendar_selection_time (day_view);
-
- /* FIXME: Optimise? */
- gtk_widget_queue_draw (day_view->top_canvas);
- gtk_widget_queue_draw (day_view->main_canvas);
-}
-
-
-static void
-e_day_view_cursor_key_left (EDayView *day_view, GdkEventKey *event)
-{
- if (day_view->selection_start_day == 0) {
- if (day_view->calendar)
- gnome_calendar_previous (day_view->calendar);
- } else {
- day_view->selection_start_day--;
- day_view->selection_end_day--;
-
- e_day_view_update_calendar_selection_time (day_view);
-
- /* FIXME: Optimise? */
- gtk_widget_queue_draw (day_view->top_canvas);
- gtk_widget_queue_draw (day_view->main_canvas);
- }
-}
-
-
-static void
-e_day_view_cursor_key_right (EDayView *day_view, GdkEventKey *event)
-{
- if (day_view->selection_end_day == day_view->days_shown - 1) {
- if (day_view->calendar)
- gnome_calendar_next (day_view->calendar);
- } else {
- day_view->selection_start_day++;
- day_view->selection_end_day++;
-
- e_day_view_update_calendar_selection_time (day_view);
-
- /* FIXME: Optimise? */
- gtk_widget_queue_draw (day_view->top_canvas);
- gtk_widget_queue_draw (day_view->main_canvas);
- }
-}
-
-
-/* Scrolls the main canvas up or down. The pages_to_scroll argument
- is multiplied with the adjustment's page size and added to the adjustment's
- value, while ensuring we stay within the bounds. A positive value will
- scroll the canvas down and a negative value will scroll it up. */
-static void
-e_day_view_scroll (EDayView *day_view,
- gfloat pages_to_scroll)
-{
- GtkAdjustment *adj = GTK_LAYOUT (day_view->main_canvas)->vadjustment;
- gfloat new_value;
-
- new_value = adj->value - adj->page_size * pages_to_scroll;
- new_value = CLAMP (new_value, adj->lower, adj->upper - adj->page_size);
- gtk_adjustment_set_value (adj, new_value);
-}
-
-
-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 TRUE;
- if (start_row == 0 && end_row == day_view->rows)
- return TRUE;
-
- /* 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_ensure_rows_visible (EDayView *day_view,
- gint start_row,
- gint end_row)
-{
- GtkAdjustment *adj;
- gfloat value, min_value, max_value;
-
- adj = GTK_LAYOUT (day_view->main_canvas)->vadjustment;
-
- value = adj->value;
-
- min_value = (end_row + 1) * day_view->row_height - adj->page_size;
- if (value < min_value)
- value = min_value;
-
- max_value = start_row * day_view->row_height;
- if (value > max_value)
- value = max_value;
-
- if (value != adj->value) {
- adj->value = value;
- gtk_adjustment_value_changed (adj);
- }
-}
-
-
-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 0
- g_print ("In e_day_view_start_editing_event\n");
-#endif
-
- /* 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, TRUE);
-
- 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;
- CalComponentText summary;
-
- /* 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 0
- g_print ("In e_day_view_on_editing_stopped Day:%i Event:%i\n",
- day, event_num);
-#endif
-
- /* If no item is being edited, just return. */
- if (day == -1)
- return;
-
- 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->resize_bars_event_day = -1;
- day_view->resize_bars_event_num = -1;
-
- gtk_object_get (GTK_OBJECT (event->canvas_item),
- "text", &text,
- NULL);
-
- /* Only update the summary if necessary. */
- cal_component_get_summary (event->comp, &summary);
- if (text && summary.value && !strcmp (text, summary.value)) {
- g_free (text);
-
- if (day == E_DAY_VIEW_LONG_EVENT)
- e_day_view_reshape_long_event (day_view, event_num);
- return;
- }
-
- if (text) {
- summary.value = text;
- summary.altrep = NULL;
- cal_component_set_summary (event->comp, &summary);
-
- g_free (text);
- } else
- cal_component_set_summary (event->comp, NULL);
-
- if (!cal_client_update_object (day_view->client, event->comp))
- g_message ("e_day_view_on_editing_stopped(): Could not update the object!");
-}
-
-
-/* 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_is_being_dragged) {
- 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;
-#if 0
- *item_h = (end_row - start_row + 1) * day_view->row_height;
-#else
- /* This makes the event end on the grid line of the next row,
- which maybe looks nicer if you have 2 events on consecutive rows. */
- *item_h = (end_row - start_row + 1) * day_view->row_height + 1;
-#endif
- 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,
- "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);
- e_canvas_item_move_absolute (day_view->drag_long_event_item,
- item_x + E_DAY_VIEW_LONG_EVENT_BORDER_WIDTH + E_DAY_VIEW_LONG_EVENT_X_PAD,
- item_y + E_DAY_VIEW_LONG_EVENT_BORDER_HEIGHT + E_DAY_VIEW_LONG_EVENT_Y_PAD);
-
- 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)) {
- CalComponentText summary;
-
- cal_component_get_summary (event->comp, &summary);
- if (event) {
- cal_component_get_summary (event->comp, &summary);
- text = g_strdup (summary.value);
- } 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);
-
- g_free (text);
- }
-}
-
-
-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_row = 0;
- 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,
- "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);
- e_canvas_item_move_absolute (day_view->drag_item,
- item_x + E_DAY_VIEW_BAR_WIDTH + E_DAY_VIEW_EVENT_X_PAD,
- item_y + E_DAY_VIEW_EVENT_BORDER_HEIGHT + E_DAY_VIEW_EVENT_Y_PAD);
-
- 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)) {
- CalComponentText summary;
-
- if (event) {
- cal_component_get_summary (event->comp, &summary);
- text = g_strdup (summary.value);
- } 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);
-
- g_free (text);
- }
-}
-
-
-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;
- const char *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);
-
-
- cal_component_get_uid (event->comp, &event_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=NULL;
- EDayViewPosition pos;
- gint day, start_day, end_day, num_days;
- gint start_offset, end_offset;
- gchar *event_uid;
- CalComponent *comp;
- CalComponentDateTime date;
- struct icaltimetype itt;
- time_t dt;
-
- 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) {
- const char *uid;
- num_days = 1;
- start_offset = 0;
- end_offset = -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);
-
- start_offset = event->start_minute;
- end_offset = event->end_minute;
- } 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;
-
- cal_component_get_uid (event->comp, &uid);
-
- if (!event_uid || !uid || strcmp (event_uid, uid))
- g_warning ("Unexpected event UID");
-
- /* We use a temporary shallow of the comp since we
- don't want to change the original comp here.
- Otherwise we would not detect that the event's time
- had changed in the "update_event" callback. */
-
- comp = cal_component_clone (event->comp);
-
- date.value = &itt;
- date.tzid = NULL;
-
- dt = day_view->day_starts[day] + start_offset * 60;
- *date.value = icaltime_from_timet (dt, FALSE);
- cal_component_set_dtstart (comp, &date);
- if (end_offset == -1 || end_offset == 0)
- dt = day_view->day_starts[day + num_days];
- else
- dt = day_view->day_starts[day + num_days - 1] + end_offset * 60;
- *date.value = icaltime_from_timet (dt, FALSE);
- cal_component_set_dtend (comp, &date);
-
- 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);
-
- if (!cal_client_update_object (day_view->client, comp))
- g_message ("e_day_view_on_top_canvas_drag_data_received(): Could "
- "not update the object!");
-
- gtk_object_unref (GTK_OBJECT (comp));
-
- 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 = NULL;
- EDayViewPosition pos;
- gint day, row, start_row, end_row, num_rows, scroll_x, scroll_y;
- gint start_offset, end_offset;
- gchar *event_uid;
- CalComponent *comp;
- CalComponentDateTime date;
- struct icaltimetype itt;
- time_t dt;
-
- 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) {
- const char *uid;
- num_rows = 1;
- start_offset = 0;
- end_offset = 0;
-
- 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;
-
- start_offset = event->start_minute % day_view->mins_per_row;
- end_offset = event->end_minute % day_view->mins_per_row;
- if (end_offset != 0)
- end_offset = day_view->mins_per_row - end_offset;
- }
-
- event_uid = data->data;
-
- cal_component_get_uid (event->comp, &uid);
- if (!event_uid || !uid || strcmp (event_uid, uid))
- g_warning ("Unexpected event UID");
-
- /* We use a temporary shallow copy of comp since we
- don't want to change the original comp here.
- Otherwise we would not detect that the event's time
- had changed in the "update_event" callback. */
- comp = cal_component_clone (event->comp);
-
- date.value = &itt;
- date.tzid = NULL;
-
- dt = e_day_view_convert_grid_position_to_time (day_view, day, row) + start_offset * 60;
- *date.value = icaltime_from_timet (dt, FALSE);
- cal_component_set_dtstart (comp, &date);
- dt = e_day_view_convert_grid_position_to_time (day_view, day, row + num_rows) - end_offset * 60;
- *date.value = icaltime_from_timet (dt, FALSE);
- cal_component_set_dtend (comp, &date);
-
- 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);
-
- if (!cal_client_update_object (day_view->client, comp))
- g_message ("e_day_view_on_main_canvas_drag_data_received(): "
- "Could not update the object!");
-
- gtk_object_unref (GTK_OBJECT (comp));
-
- return;
- }
- }
-
- gtk_drag_finish (context, FALSE, FALSE, time);
-}
-
-
-/* Converts an hour from 0-23 to the preferred time format, and returns the
- suffix to add and the width of it in the normal font. */
-void
-e_day_view_convert_time_to_display (EDayView *day_view,
- gint hour,
- gint *display_hour,
- gchar **suffix,
- gint *suffix_width)
-{
- /* Calculate the actual hour number to display. For 12-hour
- format we convert 0-23 to 12-11am/12-11pm. */
- *display_hour = hour;
- if (day_view->use_24_hour_format) {
- *suffix = "";
- *suffix_width = 0;
- } else {
- if (hour < 12) {
- *suffix = day_view->am_string;
- *suffix_width = day_view->am_string_width;
- } else {
- *display_hour -= 12;
- *suffix = day_view->pm_string;
- *suffix_width = day_view->pm_string_width;
- }
-
- /* 12-hour uses 12:00 rather than 0:00. */
- if (*display_hour == 0)
- *display_hour = 12;
- }
-}
-
-
-gint
-e_day_view_get_time_string_width (EDayView *day_view)
-{
- gint time_width;
-
- time_width = day_view->digit_width * 4 + day_view->colon_width;
-
- if (!day_view->use_24_hour_format)
- time_width += MAX (day_view->am_string_width,
- day_view->pm_string_width);
-
- return time_width;
-}
diff --git a/calendar/gui/e-day-view.h b/calendar/gui/e-day-view.h
deleted file mode 100644
index 18f8187951..0000000000
--- a/calendar/gui/e-day-view.h
+++ /dev/null
@@ -1,615 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <damon@ximian.com>
- *
- * Copyright 1999, Helix Code, Inc.
- * Copyright 1999, Ximian, 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 <time.h>
-#include <gtk/gtktable.h>
-#include <libgnomeui/gnome-canvas.h>
-
-#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 the week view for anything more
- than about 9 days. */
-#define E_DAY_VIEW_MAX_DAYS 10
-
-/* 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 7
-
-/* 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 7
-
-/* 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 get/set the working days in the week. The bit-flags are
- combined together. The bits must be from 0 (Sun) to 6 (Sat) to match the
- day values used by localtime etc. */
-typedef enum
-{
- E_DAY_VIEW_SUNDAY = 1 << 0,
- E_DAY_VIEW_MONDAY = 1 << 1,
- E_DAY_VIEW_TUESDAY = 1 << 2,
- E_DAY_VIEW_WEDNESDAY = 1 << 3,
- E_DAY_VIEW_THURSDAY = 1 << 4,
- E_DAY_VIEW_FRIDAY = 1 << 5,
- E_DAY_VIEW_SATURDAY = 1 << 6
-} EDayViewDays;
-
-
-/* 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 'Thursday 12 September'. The abbreviated format is
- like 'Thu 12 Sep'. The no weekday format is like '12 Sep'. The short format
- is like '12'. The actual format used is determined in
- e_day_view_recalc_cell_sizes(), once we know the font being used. */
-typedef enum
-{
- E_DAY_VIEW_DATE_FULL,
- E_DAY_VIEW_DATE_ABBREVIATED,
- E_DAY_VIEW_DATE_NO_WEEKDAY,
- 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_BG_SELECTED,
- E_DAY_VIEW_COLOR_BG_GRID,
-
- E_DAY_VIEW_COLOR_BG_TOP_CANVAS,
- E_DAY_VIEW_COLOR_BG_TOP_CANVAS_SELECTED,
- E_DAY_VIEW_COLOR_BG_TOP_CANVAS_GRID,
-
- E_DAY_VIEW_COLOR_EVENT_VBAR,
- E_DAY_VIEW_COLOR_EVENT_BACKGROUND,
- E_DAY_VIEW_COLOR_EVENT_BORDER,
-
- E_DAY_VIEW_COLOR_LONG_EVENT_BACKGROUND,
- E_DAY_VIEW_COLOR_LONG_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_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 {
- CalComponent *comp;
-
- /* These are the times of this specific occurrence of the event. */
- time_t start;
- time_t end;
-
- /* For events in the main canvas, this contains the start column.
- For long events in the top canvas, this is its row. */
- guint8 start_row_or_col;
-
- /* For events in the main canvas, this is the number of columns that
- it covers. For long events this is set to 1 if the event is shown.
- For both types of events this is set to 0 if the event is not shown,
- i.e. it couldn't fit into the display. Currently long events are
- always shown as we just increase the height of the top canvas. */
- guint8 num_columns;
-
- /* These are minute offsets from the first time shown in the view.
- They range from 0 to 24 * 60. Currently the main canvas always
- starts at 12am and the code to handle starting at other times
- isn't finished. */
- guint16 start_minute;
- guint16 end_minute;
-
- /* This is the EText item containing the event summary. */
- 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;
-
- /* Calendar client object we are monitoring */
- CalClient *client;
-
- /* S-expression for query and the query object */
- char *sexp;
- CalQuery *query;
-
- /* The start and end of the days shown. */
- time_t lower;
- time_t upper;
-
- /* Whether we are showing the work-week view. */
- gboolean work_week_view;
-
- /* The number of days we are showing. Usually 1 or 5, but can be up
- to E_DAY_VIEW_MAX_DAYS, e.g. when the user selects a range of
- days in the date navigator. */
- 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;
-
- /* Bitwise combination of working days. Defaults to Mon-Fri. */
- EDayViewDays working_days;
-
- /* 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;
-
- /* Whether we use 12-hour of 24-hour format. */
- gboolean use_24_hour_format;
-
- /* Whether we use show event end times in the main canvas. */
- gboolean show_event_end_times;
-
- /* The first day of the week, 0 (Monday) to 6 (Sunday). */
- gint week_start_day;
-
- /* 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.
- Note that there are a maximum of 12 * 24 rows (when a row is 5 mins)
- but we don't always have that many rows. */
- guint8 cols_per_row[E_DAY_VIEW_MAX_DAYS][12 * 24];
-
- /* Sizes of the various time strings. */
- gint small_hour_widths[24];
- gint max_small_hour_width;
- gint max_minute_width;
- gint colon_width;
- gint digit_width; /* Size of '0' character. */
-
- /* This specifies how we are displaying the dates at the top. */
- EDayViewDateFormat date_format;
-
- /* These are the longest month & weekday names in the current font.
- Months are 0 to 11. Weekdays are 0 (Sun) to 6 (Sat). */
- gint longest_month_name;
- gint longest_abbreviated_month_name;
- gint longest_weekday_name;
- gint longest_abbreviated_weekday_name;
-
- /* The large font used 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 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 is TRUE if the selection is currently being dragged using the
- mouse. */
- gboolean selection_is_being_dragged;
-
- /* This specifies which end of the selection is 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;
-
- /* "am" and "pm" in the current locale, and their widths. */
- gchar *am_string;
- gchar *pm_string;
- gint am_string_width;
- gint pm_string_width;
-};
-
-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);
-
-void e_day_view_set_cal_client (EDayView *day_view,
- CalClient *client);
-
-void e_day_view_set_query (EDayView *day_view,
- const char *sexp);
-
-/* 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);
-
-/* Whether we are displaying a work-week, in which case the display always
- starts on the first day of the working week. */
-gboolean e_day_view_get_work_week_view (EDayView *day_view);
-void e_day_view_set_work_week_view (EDayView *day_view,
- gboolean work_week_view);
-
-/* 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);
-
-/* This specifies the working days in the week. The value is a bitwise
- combination of day flags. Defaults to Mon-Fri. */
-EDayViewDays e_day_view_get_working_days (EDayView *day_view);
-void e_day_view_set_working_days (EDayView *day_view,
- EDayViewDays days);
-
-/* The start and end time of the working day. This only affects the background
- colors. */
-void e_day_view_get_working_day (EDayView *day_view,
- gint *start_hour,
- gint *start_minute,
- gint *end_hour,
- gint *end_minute);
-void e_day_view_set_working_day (EDayView *day_view,
- gint start_hour,
- gint start_minute,
- gint end_hour,
- gint end_minute);
-
-/* Whether we use 12-hour or 24-hour format. */
-gboolean e_day_view_get_24_hour_format (EDayView *day_view);
-void e_day_view_set_24_hour_format (EDayView *day_view,
- gboolean use_24_hour);
-
-/* Whether we display event end times in the main canvas. */
-gboolean e_day_view_get_show_event_end_times (EDayView *day_view);
-void e_day_view_set_show_event_end_times (EDayView *day_view,
- gboolean show);
-
-/* The first day of the week, 0 (Monday) to 6 (Sunday). */
-gint e_day_view_get_week_start_day (EDayView *day_view);
-void e_day_view_set_week_start_day (EDayView *day_view,
- gint week_start_day);
-
-/*
- * 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);
-
-void e_day_view_convert_time_to_display (EDayView *day_view,
- gint hour,
- gint *display_hour,
- gchar **suffix,
- gint *suffix_width);
-gint e_day_view_get_time_string_width (EDayView *day_view);
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* _E_DAY_VIEW_H_ */
diff --git a/calendar/gui/e-itip-control.c b/calendar/gui/e-itip-control.c
deleted file mode 100644
index 5e7df6b35c..0000000000
--- a/calendar/gui/e-itip-control.c
+++ /dev/null
@@ -1,1081 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* Evolution calendar - Control for displaying iTIP mail messages
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Author: Jesse Pavel <jpavel@ximian.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 <time.h>
-#include <glib.h>
-#include <gtk/gtkobject.h>
-#include <gtk/gtkwidget.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-dialog-util.h>
-#include <bonobo/bonobo-generic-factory.h>
-#include <bonobo/bonobo-persist-stream.h>
-#include <bonobo/bonobo-stream-client.h>
-#include <glade/glade.h>
-#include <ical.h>
-#include <Evolution-Composer.h>
-
-#include "e-itip-control.h"
-#include <cal-util/cal-component.h>
-#include <cal-client/cal-client.h>
-#include "itip-utils.h"
-
-#define MAIL_COMPOSER_OAF_IID "OAFIID:GNOME_Evolution_Mail_Composer"
-
-#define DEFAULT_WIDTH 400
-#define DEFAULT_HEIGHT 300
-
-extern gchar *evolution_dir;
-
-typedef struct _EItipControlPrivate EItipControlPrivate;
-
-struct _EItipControlPrivate {
- GladeXML *xml, *xml2;
- GtkWidget *main_frame;
- GtkWidget *organizer_entry, *dtstart_label, *dtend_label;
- GtkWidget *summary_entry, *description_box, *message_text;
- GtkWidget *button_box;
- GtkWidget *address_entry;
- GtkWidget *add_button;
- GtkWidget *loading_window;
- GtkWidget *loading_progress;
-
- icalcomponent *main_comp, *comp;
- CalComponent *cal_comp;
- char *vcalendar;
- gchar *from_address, *my_address, *organizer;
- icalparameter_partstat new_partstat;
-};
-
-enum E_ITIP_BONOBO_ARGS {
- FROM_ADDRESS_ARG_ID,
- MY_ADDRESS_ARG_ID
-};
-
-
-/********
- * find_attendee() searches through the attendee properties of `comp'
- * and returns the one the value of which is the same as `address' if such
- * a property exists. Otherwise, it will return NULL.
- ********/
-static icalproperty *
-find_attendee (icalcomponent *comp, char *address)
-{
- icalproperty *prop;
- const char *attendee, *text;
- icalvalue *value;
-
- for (prop = icalcomponent_get_first_property (comp, ICAL_ATTENDEE_PROPERTY);
- prop != NULL;
- prop = icalcomponent_get_next_property (comp, ICAL_ATTENDEE_PROPERTY))
- {
- value = icalproperty_get_value (prop);
- if (!value)
- continue;
-
- attendee = icalvalue_get_string (value);
-
- /* Here I strip off the "MAILTO:" if it is present. */
- text = strchr (attendee, ':');
- if (text != NULL)
- text++;
- else
- text = attendee;
-
- if (strcmp (text, address) == 0) {
- /* We have found the correct property. */
- break;
- }
- }
-
- return prop;
-}
-
-static void
-itip_control_destroy_cb (GtkObject *object,
- gpointer data)
-{
- EItipControlPrivate *priv = data;
-
- gtk_object_unref (GTK_OBJECT (priv->xml));
- gtk_object_unref (GTK_OBJECT (priv->xml2));
-
- if (priv->main_comp != NULL) {
- if (priv->comp != NULL)
- icalcomponent_remove_component (priv->main_comp, priv->comp);
-
- icalcomponent_free (priv->main_comp);
- }
-
-
- if (priv->cal_comp != NULL) {
- gtk_object_unref (GTK_OBJECT (priv->cal_comp));
- }
-
- if (priv->from_address != NULL)
- g_free (priv->from_address);
-
- if (priv->organizer != NULL)
- g_free (priv->organizer);
-
- if (priv->vcalendar != NULL)
- g_free (priv->vcalendar);
-
- g_free (priv);
-}
-
-
-static void
-cal_opened_cb (CalClient *client, CalClientOpenStatus status, gpointer data)
-{
- EItipControlPrivate *priv = data;
-
- gtk_widget_hide (priv->loading_progress);
-
- if (status == CAL_CLIENT_OPEN_SUCCESS) {
- if (cal_client_update_object (client, priv->cal_comp) == FALSE) {
- GtkWidget *dialog;
-
- dialog = gnome_warning_dialog(_("I couldn't update your calendar file!\n"));
- gnome_dialog_run (GNOME_DIALOG(dialog));
- } else {
- /* We have success. */
- GtkWidget *dialog;
-
- dialog = gnome_ok_dialog(_("Component successfully updated."));
- gnome_dialog_run (GNOME_DIALOG(dialog));
- }
- } else {
- GtkWidget *dialog;
-
- dialog = gnome_ok_dialog(_("There was an error loading the calendar file."));
- gnome_dialog_run (GNOME_DIALOG(dialog));
- }
-
- gtk_object_unref (GTK_OBJECT (client));
- return;
-}
-
-static void
-update_calendar (EItipControlPrivate *priv)
-{
- gchar cal_uri[255];
- CalClient *client;
-
- snprintf (cal_uri, 250, "%s/local/Calendar/calendar.ics", evolution_dir);
-
- client = cal_client_new ();
-
- gtk_signal_connect (GTK_OBJECT (client), "cal_opened",
- GTK_SIGNAL_FUNC (cal_opened_cb), priv);
-
- if (cal_client_open_calendar (client, cal_uri, FALSE) == FALSE) {
- GtkWidget *dialog;
-
- dialog = gnome_warning_dialog(_("I couldn't open your calendar file!\n"));
- gnome_dialog_run (GNOME_DIALOG(dialog));
- gtk_object_unref (GTK_OBJECT (client));
-
- return;
- }
-
- gtk_progress_bar_update (GTK_PROGRESS_BAR (priv->loading_progress), 0.5);
- gtk_widget_show (priv->loading_progress);
-
- return;
-}
-
-static void
-add_button_clicked_cb (GtkWidget *widget, gpointer data)
-{
- EItipControlPrivate *priv = data;
-
- update_calendar (priv);
-
- return;
-}
-
-static void
-change_my_status (icalparameter_partstat status, EItipControlPrivate *priv)
-{
- icalproperty *prop;
-
- prop = find_attendee (priv->comp, priv->my_address);
- if (prop) {
- icalparameter *param;
-
- icalproperty_remove_parameter (prop, ICAL_PARTSTAT_PARAMETER);
- param = icalparameter_new_partstat (status);
- icalproperty_add_parameter (prop, param);
- }
-}
-
-static void
-send_itip_reply (EItipControlPrivate *priv)
-{
- BonoboObjectClient *bonobo_server;
- GNOME_Evolution_Composer composer_server;
- CORBA_Environment ev;
- GNOME_Evolution_Composer_RecipientList *to_list, *cc_list, *bcc_list;
- GNOME_Evolution_Composer_Recipient *recipient;
- CORBA_char *subject;
- CalComponentText caltext;
- CORBA_char *content_type, *filename, *description, *attach_data;
- CORBA_boolean show_inline;
- CORBA_char tempstr[200];
-
- CORBA_exception_init (&ev);
-
- /* First, I obtain an object reference that represents the Composer. */
- bonobo_server = bonobo_object_activate (MAIL_COMPOSER_OAF_IID, 0);
-
- g_return_if_fail (bonobo_server != NULL);
-
- composer_server = bonobo_object_corba_objref (BONOBO_OBJECT (bonobo_server));
-
- /* Now I have to make a CORBA sequence that represents a recipient list with
- one item, for the organizer. */
- to_list = GNOME_Evolution_Composer_RecipientList__alloc ();
- to_list->_maximum = 1;
- to_list->_length = 1;
- to_list->_buffer = CORBA_sequence_GNOME_Evolution_Composer_Recipient_allocbuf (1);
-
- recipient = &(to_list->_buffer[0]);
- recipient->name = CORBA_string_alloc (0); /* FIXME: we may want an actual name here. */
- recipient->name[0] = '\0';
- recipient->address = CORBA_string_alloc (strlen (priv->organizer));
- strcpy (recipient->address, priv->organizer);
-
- cc_list = GNOME_Evolution_Composer_RecipientList__alloc ();
- cc_list->_maximum = cc_list->_length = 0;
- bcc_list = GNOME_Evolution_Composer_RecipientList__alloc ();
- bcc_list->_maximum = bcc_list->_length = 0;
-
- cal_component_get_summary (priv->cal_comp, &caltext);
- subject = CORBA_string_alloc (strlen (caltext.value));
- strcpy (subject, caltext.value);
-
- GNOME_Evolution_Composer_setHeaders (composer_server, to_list, cc_list, bcc_list, subject, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_printerr ("gui/e-meeting-edit.c: I couldn't set the composer headers via CORBA! Aagh.\n");
- CORBA_exception_free (&ev);
- return;
- }
-
- sprintf (tempstr, "text/calendar;METHOD=REPLY");
- content_type = CORBA_string_alloc (strlen (tempstr));
- strcpy (content_type, tempstr);
- filename = CORBA_string_alloc (0);
- filename[0] = '\0';
- sprintf (tempstr, "Calendar attachment");
- description = CORBA_string_alloc (strlen (tempstr));
- strcpy (description, tempstr);
- show_inline = FALSE;
-
- /* I need to create an encapsulating iCalendar component, and stuff our reply event
- into it. */
- {
- icalcomponent *comp;
- icalproperty *prop;
- icalvalue *value;
- gchar *ical_string;
-
- comp = icalcomponent_new (ICAL_VCALENDAR_COMPONENT);
-
- prop = icalproperty_new (ICAL_PRODID_PROPERTY);
- value = icalvalue_new_text ("-//HelixCode/Evolution//EN");
- icalproperty_set_value (prop, value);
- icalcomponent_add_property (comp, prop);
-
- prop = icalproperty_new (ICAL_VERSION_PROPERTY);
- value = icalvalue_new_text ("2.0");
- icalproperty_set_value (prop, value);
- icalcomponent_add_property (comp, prop);
-
- prop = icalproperty_new (ICAL_METHOD_PROPERTY);
- value = icalvalue_new_text ("REPLY");
- icalproperty_set_value (prop, value);
- icalcomponent_add_property (comp, prop);
-
- icalcomponent_remove_component (priv->main_comp, priv->comp);
- icalcomponent_add_component (comp, priv->comp);
-
- ical_string = icalcomponent_as_ical_string (comp);
- attach_data = CORBA_string_alloc (strlen (ical_string));
- strcpy (attach_data, ical_string);
-
- icalcomponent_remove_component (comp, priv->comp);
- icalcomponent_add_component (priv->main_comp, priv->comp);
- icalcomponent_free (comp);
-
- }
-
- GNOME_Evolution_Composer_attachData (composer_server,
- content_type, filename, description,
- show_inline, attach_data,
- &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_printerr ("gui/e-meeting-edit.c: I couldn't attach data to the composer via CORBA! Aagh.\n");
- CORBA_exception_free (&ev);
- return;
- }
-
- GNOME_Evolution_Composer_show (composer_server, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_printerr ("gui/e-meeting-edit.c: I couldn't show the composer via CORBA! Aagh.\n");
- CORBA_exception_free (&ev);
- return;
- }
-
- CORBA_exception_free (&ev);
-
- /* Here is where we free our graciously-allocated memory. */
- if (CORBA_sequence_get_release (to_list) != FALSE)
- CORBA_free (to_list->_buffer);
-
- CORBA_free (to_list);
- CORBA_free (cc_list);
- CORBA_free (bcc_list);
-
- CORBA_free (subject);
- CORBA_free (content_type);
- CORBA_free (filename);
- CORBA_free (description);
- CORBA_free (attach_data);
-
-}
-
-static void
-accept_button_clicked_cb (GtkWidget *widget, gpointer data)
-{
- EItipControlPrivate *priv = data;
-
- change_my_status (ICAL_PARTSTAT_ACCEPTED, priv);
- send_itip_reply (priv);
- update_calendar (priv);
-
- return;
-}
-
-static void
-tentative_button_clicked_cb (GtkWidget *widget, gpointer data)
-{
- EItipControlPrivate *priv = data;
-
- change_my_status (ICAL_PARTSTAT_TENTATIVE, priv);
- send_itip_reply (priv);
- update_calendar (priv);
-
- return;
-}
-
-static void
-decline_button_clicked_cb (GtkWidget *widget, gpointer data)
-{
- EItipControlPrivate *priv = data;
-
- change_my_status (ICAL_PARTSTAT_DECLINED, priv);
- send_itip_reply (priv);
-
- return;
-}
-
-
-/********
- * load_calendar_store() opens and loads the calendar referred to by cal_uri
- * and sets cal_client as a client for that store. If cal_uri is NULL,
- * we load the default calendar URI. If all goes well, it returns TRUE;
- * otherwise, it returns FALSE.
- ********/
-static gboolean
-load_calendar_store (char *cal_uri, CalClient **cal_client)
-{
- char uri_buf[255];
- char *uri;
-
- if (cal_uri == NULL) {
- snprintf (uri_buf, 250, "%s/local/Calendar/calendar.ics", evolution_dir);
- uri = uri_buf;
- }
- else {
- uri = cal_uri;
- }
-
- *cal_client = cal_client_new ();
- if (cal_client_open_calendar (*cal_client, uri, FALSE) == FALSE) {
- return FALSE;
- }
-
- /* FIXME!!!!!! This is fucking ugly. */
-
- while (!cal_client_get_load_state (*cal_client) != CAL_CLIENT_LOAD_LOADED) {
- gtk_main_iteration_do (FALSE); /* Do a non-blocking iteration. */
- usleep (200000L); /* Pause for 1/5th of a second before checking again.*/
- }
-
- return TRUE;
-}
-
-
-static void
-update_reply_cb (GtkWidget *widget, gpointer data)
-{
- EItipControlPrivate *priv = data;
- CalClient *cal_client;
- CalComponent *cal_comp;
- icalcomponent *comp;
- icalproperty *prop;
- icalparameter *param;
- const char *uid;
-
- if (load_calendar_store (NULL, &cal_client) == FALSE) {
- GtkWidget *dialog;
-
- dialog = gnome_warning_dialog(_("I couldn't load your calendar file!\n"));
- gnome_dialog_run (GNOME_DIALOG(dialog));
- gtk_object_unref (GTK_OBJECT (cal_client));
-
- return;
- }
-
-
- cal_component_get_uid (priv->cal_comp, &uid);
- if (cal_client_get_object (cal_client, uid, &cal_comp) != CAL_CLIENT_GET_SUCCESS) {
- GtkWidget *dialog;
-
- dialog = gnome_warning_dialog(_("I couldn't read your calendar file!\n"));
- gnome_dialog_run (GNOME_DIALOG(dialog));
- gtk_object_unref (GTK_OBJECT (cal_client));
-
- return;
- }
-
- comp = cal_component_get_icalcomponent (cal_comp);
-
- prop = find_attendee (comp, priv->from_address);
- if (!prop) {
- GtkWidget *dialog;
-
- dialog = gnome_warning_dialog(_("This is a reply from someone who was uninvited!"));
- gnome_dialog_run (GNOME_DIALOG(dialog));
- gtk_object_unref (GTK_OBJECT (cal_client));
- gtk_object_unref (GTK_OBJECT (cal_comp));
-
- return;
- }
-
- icalproperty_remove_parameter (prop, ICAL_PARTSTAT_PARAMETER);
- param = icalparameter_new_partstat (priv->new_partstat);
- icalproperty_add_parameter (prop, param);
-
- /* Now we need to update the object in the calendar store. */
- if (!cal_client_update_object (cal_client, cal_comp)) {
- GtkWidget *dialog;
-
- dialog = gnome_warning_dialog(_("I couldn't update your calendar store."));
- gnome_dialog_run (GNOME_DIALOG(dialog));
- gtk_object_unref (GTK_OBJECT (cal_client));
- gtk_object_unref (GTK_OBJECT (cal_comp));
-
- return;
- }
- else {
- /* We have success. */
- GtkWidget *dialog;
-
- dialog = gnome_ok_dialog(_("Component successfully updated."));
- gnome_dialog_run (GNOME_DIALOG(dialog));
- }
-
-
- gtk_object_unref (GTK_OBJECT (cal_client));
- gtk_object_unref (GTK_OBJECT (cal_comp));
-}
-
-static void
-cancel_meeting_cb (GtkWidget *widget, gpointer data)
-{
- EItipControlPrivate *priv = data;
- CalClient *cal_client;
- const char *uid;
-
- if (load_calendar_store (NULL, &cal_client) == FALSE) {
- GtkWidget *dialog;
-
- dialog = gnome_warning_dialog(_("I couldn't load your calendar file!\n"));
- gnome_dialog_run (GNOME_DIALOG(dialog));
- gtk_object_unref (GTK_OBJECT (cal_client));
-
- return;
- }
-
- cal_component_get_uid (priv->cal_comp, &uid);
- if (cal_client_remove_object (cal_client, uid) == FALSE) {
- GtkWidget *dialog;
-
- dialog = gnome_warning_dialog(_("I couldn't delete the calendar component!\n"));
- gnome_dialog_run (GNOME_DIALOG(dialog));
- gtk_object_unref (GTK_OBJECT (cal_client));
-
- return;
- }
- else {
- /* We have success! */
- GtkWidget *dialog;
-
- dialog = gnome_ok_dialog(_("Component successfully deleted."));
- gnome_dialog_run (GNOME_DIALOG(dialog));
- }
-
-}
-
-
-
-/*
- * Bonobo::PersistStream
- *
- * These two functions implement the Bonobo::PersistStream load and
- * save methods which allow data to be loaded into and out of the
- * BonoboObject.
- */
-
-static char *
-stream_read (Bonobo_Stream stream)
-{
- Bonobo_Stream_iobuf *buffer;
- CORBA_Environment ev;
- gchar *data = NULL;
- gint length = 0;
-
- CORBA_exception_init (&ev);
- do {
-#define READ_CHUNK_SIZE 65536
- Bonobo_Stream_read (stream, READ_CHUNK_SIZE,
- &buffer, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- CORBA_exception_free (&ev);
- return NULL;
- }
-
- if (buffer->_length <= 0)
- break;
-
- data = g_realloc (data,
- length + buffer->_length);
-
- memcpy (data + length,
- buffer->_buffer, buffer->_length);
-
- length += buffer->_length;
-
- CORBA_free (buffer);
- } while (1);
-
- CORBA_free (buffer);
- CORBA_exception_free (&ev);
-
- if (data == NULL)
- data = g_strdup("");
-
- return data;
-} /* stream_read */
-
-/*
- * This function implements the Bonobo::PersistStream:load method.
- */
-static void
-pstream_load (BonoboPersistStream *ps, const Bonobo_Stream stream,
- Bonobo_Persist_ContentType type, void *data,
- CORBA_Environment *ev)
-{
- EItipControlPrivate *priv = data;
- gint pos, length, length2;
- icalcompiter iter;
- icalcomponent_kind comp_kind;
- char message[256];
-
-
- if (type && g_strcasecmp (type, "text/calendar") != 0 &&
- g_strcasecmp (type, "text/x-calendar") != 0) {
- CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
- ex_Bonobo_Persist_WrongDataType, NULL);
- return;
- }
-
- if ((priv->vcalendar = stream_read (stream)) == NULL) {
- CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
- ex_Bonobo_Persist_FileNotFound, NULL);
- return;
- }
-
- /* Do something with the data, here. */
-
- priv->main_comp = icalparser_parse_string (priv->vcalendar);
- if (priv->main_comp == NULL) {
- g_printerr ("e-itip-control.c: the iCalendar data was invalid!\n");
- return;
- }
-
- iter = icalcomponent_begin_component (priv->main_comp, ICAL_ANY_COMPONENT);
- priv->comp = icalcompiter_deref (&iter);
-
-#if 0
- {
- FILE *fp;
-
- fp = fopen ("evo.debug", "w");
-
- fputs ("The raw vCalendar data:\n\n", fp);
- fputs (priv->vcalendar, fp);
-
- fputs ("The main component:\n\n", fp);
- fputs (icalcomponent_as_ical_string (priv->main_comp), fp);
-
- fputs ("The child component:\n\n", fp);
- fputs (icalcomponent_as_ical_string (priv->comp), fp);
-
- fclose (fp);
- }
-#endif
-
- if (priv->comp == NULL) {
- g_printerr ("e-itip-control.c: I could not extract a proper component from\n"
- " the vCalendar data.\n");
- icalcomponent_free (priv->main_comp);
- return;
- }
-
- comp_kind = icalcomponent_isa (priv->comp);
-
- switch (comp_kind) {
- case ICAL_VEVENT_COMPONENT:
- case ICAL_VTODO_COMPONENT:
- case ICAL_VJOURNAL_COMPONENT:
- priv->cal_comp = cal_component_new ();
- if (cal_component_set_icalcomponent (priv->cal_comp, priv->comp) == FALSE) {
- g_printerr ("e-itip-control.c: I couldn't create a CalComponent from the iTip data.\n");
- gtk_object_unref (GTK_OBJECT (priv->cal_comp));
- }
- break;
- case ICAL_VFREEBUSY_COMPONENT:
- /* Take care of busy time information. */
- return;
- break;
- default:
- /* We don't know what this is, so bail. */
- {
- GtkWidget *dialog;
-
- dialog = gnome_warning_dialog(_("I don't recognize this type of calendar component."));
- gnome_dialog_run (GNOME_DIALOG(dialog));
-
- g_free (priv->vcalendar);
- priv->vcalendar = NULL;
-
- return;
- }
- break;
- } /* End switch. */
-
-
- /* Okay, good then; now I will pick apart the component to get
- all the things I'll show in my control. */
- {
- icalproperty *prop;
- const char *description, *summary;
- const char *new_text;
- const char *organizer;
- struct icaltimetype dtstart, dtend;
- time_t tstart, tend;
-
- prop = icalcomponent_get_first_property (priv->comp, ICAL_ORGANIZER_PROPERTY);
- if (prop) {
- organizer = icalproperty_get_organizer (prop);
-
- /* Here I strip off the "MAILTO:" if it is present. */
- new_text = strchr (organizer, ':');
- if (new_text != NULL)
- new_text++;
- else
- new_text = organizer;
-
- priv->organizer = g_strdup (new_text);
- gtk_entry_set_text (GTK_ENTRY (priv->organizer_entry), new_text);
- }
-
- prop = icalcomponent_get_first_property (priv->comp, ICAL_SUMMARY_PROPERTY);
- if (prop) {
- summary = icalproperty_get_summary (prop);
- gtk_entry_set_text (GTK_ENTRY (priv->summary_entry), summary);
- }
-
- prop = icalcomponent_get_first_property (priv->comp, ICAL_DESCRIPTION_PROPERTY);
- if (prop) {
- description = icalproperty_get_summary (prop);
-
- pos = 0;
- length = strlen (description);
- length2 = strlen (gtk_editable_get_chars
- (GTK_EDITABLE (priv->description_box), 0, -1));
-
- if (length2 > 0)
- gtk_editable_delete_text (GTK_EDITABLE (priv->description_box), 0, length2);
-
- gtk_editable_insert_text (GTK_EDITABLE (priv->description_box),
- description,
- length,
- &pos);
- }
-
- prop = icalcomponent_get_first_property (priv->comp, ICAL_DTSTART_PROPERTY);
- dtstart = icalproperty_get_dtstart (prop);
- prop = icalcomponent_get_first_property (priv->comp, ICAL_DTEND_PROPERTY);
- dtend = icalproperty_get_dtend (prop);
-
- tstart = icaltime_as_timet (dtstart);
- tend = icaltime_as_timet (dtend);
-
- gtk_label_set_text (GTK_LABEL (priv->dtstart_label), ctime (&tstart));
- gtk_label_set_text (GTK_LABEL (priv->dtend_label), ctime (&tend));
-
- /* Clear out any old-assed text that's been lying around in my message box. */
- gtk_editable_delete_text (GTK_EDITABLE (priv->message_text), 0, -1);
-
- prop = icalcomponent_get_first_property (priv->main_comp, ICAL_METHOD_PROPERTY);
- switch (icalproperty_get_method (prop)) {
- case ICAL_METHOD_PUBLISH:
- {
- GtkWidget *button;
-
- snprintf (message, 250, "%s has published calendar information, "
- "which you can add to your own calendar. "
- "No reply is necessary.",
- priv->from_address);
-
- button = gtk_button_new_with_label (_("Add to Calendar"));
- gtk_box_pack_start (GTK_BOX (priv->button_box), button, FALSE, FALSE, 3);
- gtk_widget_show (button);
-
- gtk_signal_connect (GTK_OBJECT (button), "clicked",
- GTK_SIGNAL_FUNC (add_button_clicked_cb), priv);
-
- break;
- }
- case ICAL_METHOD_REQUEST:
- {
- /* I'll check if I have to rsvp. */
- icalproperty *prop;
- icalparameter *param;
- int rsvp = FALSE;
-
- prop = find_attendee (priv->comp, priv->my_address);
- if (prop) {
- param = get_icalparam_by_type (prop, ICAL_RSVP_PARAMETER);
-
- if (param) {
- if (icalparameter_get_rsvp (param))
- rsvp = TRUE;
- }
- }
-
- snprintf (message, 250, "This is a meeting organized by %s, "
- "who indicated that you %s RSVP.",
- (priv->organizer ? priv->organizer : "an unknown person"),
- (rsvp ? "should" : "don't have to") );
-
- if (rsvp) {
- GtkWidget *accept_button, *decline_button, *tentative_button;
-
- accept_button = gtk_button_new_with_label (_(" Accept "));
- decline_button = gtk_button_new_with_label (_(" Decline "));
- tentative_button = gtk_button_new_with_label (_(" Tentative "));
-
- gtk_box_pack_start (GTK_BOX (priv->button_box), decline_button, FALSE, FALSE, 3);
- gtk_box_pack_end (GTK_BOX (priv->button_box), accept_button, FALSE, FALSE, 3);
- gtk_box_pack_end (GTK_BOX (priv->button_box), tentative_button, FALSE, FALSE, 3);
-
- gtk_signal_connect (GTK_OBJECT (accept_button), "clicked",
- GTK_SIGNAL_FUNC (accept_button_clicked_cb), priv);
- gtk_signal_connect (GTK_OBJECT (tentative_button), "clicked",
- GTK_SIGNAL_FUNC (tentative_button_clicked_cb), priv);
- gtk_signal_connect (GTK_OBJECT (decline_button), "clicked",
- GTK_SIGNAL_FUNC (decline_button_clicked_cb), priv);
-
- gtk_widget_show (accept_button);
- gtk_widget_show (tentative_button);
- gtk_widget_show (decline_button);
- }
-
- }
- break;
- case ICAL_METHOD_REPLY:
- {
- icalproperty *prop;
- icalparameter *param;
- gboolean success = FALSE;
-
- prop = find_attendee (priv->comp, priv->from_address);
- if (prop) {
- param = get_icalparam_by_type (prop, ICAL_PARTSTAT_PARAMETER);
- if (param) {
- success = TRUE;
-
- priv->new_partstat = icalparameter_get_partstat (param);
- }
- }
-
- if (!success) {
- snprintf (message, 250, "%s sent a reply to a meeting request, but "
- "the reply is not properly formed.",
- priv->from_address);
- }
- else {
- GtkWidget *button;
-
- button = gtk_button_new_with_label (_("Update Calendar"));
- gtk_box_pack_start (GTK_BOX (priv->button_box), button, FALSE, FALSE, 3);
- gtk_widget_show (button);
-
- gtk_signal_connect (GTK_OBJECT (button), "clicked",
- GTK_SIGNAL_FUNC (update_reply_cb), priv);
-
- snprintf (message, 250, "%s responded to your request, replying with: %s",
- priv->from_address, partstat_values[priv->new_partstat]);
- }
-
- }
- break;
- case ICAL_METHOD_CANCEL:
- {
- if (strcmp (priv->organizer, priv->from_address) != 0) {
- snprintf (message, 250, "%s sent a cancellation request, but is not "
- "the organizer of the meeting.",
- priv->from_address);
- }
- else {
- GtkWidget *button;
-
- button = gtk_button_new_with_label (_("Cancel Meeting"));
- gtk_box_pack_start (GTK_BOX (priv->button_box), button, FALSE, FALSE, 3);
- gtk_widget_show (button);
-
- gtk_signal_connect (GTK_OBJECT (button), "clicked",
- GTK_SIGNAL_FUNC (cancel_meeting_cb), priv);
-
- snprintf (message, 250, "%s sent a cancellation request. You can"
- " delete this event from your calendar, if you wish.",
- priv->organizer);
- }
-
- }
- break;
- default:
- snprintf (message, 250, "I haven't the slightest notion what this calendar "
- "object represents. Sorry.");
- }
-
- {
- int pos = 0;
-
- gtk_editable_insert_text (GTK_EDITABLE (priv->message_text), message,
- strlen (message), &pos);
- }
- }
-
-} /* pstream_load */
-
-/*
- * This function implements the Bonobo::PersistStream:save method.
- */
-static void
-pstream_save (BonoboPersistStream *ps, const Bonobo_Stream stream,
- Bonobo_Persist_ContentType type, void *data,
- CORBA_Environment *ev)
-{
- EItipControlPrivate *priv = data;
- int length;
-
- if (type && g_strcasecmp (type, "text/calendar") != 0 &&
- g_strcasecmp (type, "text/x-calendar") != 0) {
- CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
- ex_Bonobo_Persist_WrongDataType, NULL);
- return;
- }
-
- /* Put something into vcalendar here. */
- length = strlen (priv->vcalendar);
-
- bonobo_stream_client_write (stream, priv->vcalendar, length, ev);
-} /* pstream_save */
-
-static CORBA_long
-pstream_get_max_size (BonoboPersistStream *ps, void *data,
- CORBA_Environment *ev)
-{
- EItipControlPrivate *priv = data;
-
- if (priv->vcalendar)
- return strlen (priv->vcalendar);
- else
- return 0L;
-}
-
-static Bonobo_Persist_ContentTypeList *
-pstream_get_content_types (BonoboPersistStream *ps, void *closure,
- CORBA_Environment *ev)
-{
- return bonobo_persist_generate_content_types (2, "text/calendar", "text/x-calendar");
-}
-
-static void
-get_prop ( BonoboPropertyBag *bag,
- BonoboArg *arg,
- guint arg_id,
- CORBA_Environment *ev,
- gpointer user_data)
-{
- EItipControlPrivate *priv = user_data;
-
- if (arg_id == FROM_ADDRESS_ARG_ID) {
- BONOBO_ARG_SET_STRING (arg, priv->from_address);
- }
- else if (arg_id == MY_ADDRESS_ARG_ID) {
- BONOBO_ARG_SET_STRING (arg, priv->my_address);
- }
-}
-
-static void
-set_prop ( BonoboPropertyBag *bag,
- const BonoboArg *arg,
- guint arg_id,
- CORBA_Environment *ev,
- gpointer user_data)
-{
- EItipControlPrivate *priv = user_data;
-
- if (arg_id == FROM_ADDRESS_ARG_ID) {
- if (priv->from_address)
- g_free (priv->from_address);
-
-
- priv->from_address = g_strdup (BONOBO_ARG_GET_STRING (arg));
-
- /* Let's set the widget here, though I'm not sure if
- it will work. */
- gtk_entry_set_text (GTK_ENTRY (priv->address_entry), priv->from_address);
-
- }
- else if (arg_id == MY_ADDRESS_ARG_ID) {
- if (priv->my_address)
- g_free (priv->my_address);
-
- priv->my_address = g_strdup (BONOBO_ARG_GET_STRING (arg));
- }
-}
-
-
-static BonoboObject *
-e_itip_control_factory (BonoboGenericFactory *Factory, void *closure)
-{
- BonoboControl *control;
- BonoboPropertyBag *prop_bag;
- BonoboPersistStream *stream;
- EItipControlPrivate *priv;
-
- priv = g_new0 (EItipControlPrivate, 1);
-
- priv->xml = glade_xml_new (EVOLUTION_GLADEDIR "/" "e-itip-control.glade", "main_frame");
-
- /* Create the control. */
- priv->main_frame = glade_xml_get_widget (priv->xml, "main_frame");
- priv->organizer_entry = glade_xml_get_widget (priv->xml, "organizer_entry");
- priv->dtstart_label = glade_xml_get_widget (priv->xml, "dtstart_label");
- priv->dtend_label = glade_xml_get_widget (priv->xml, "dtend_label");
- priv->summary_entry = glade_xml_get_widget (priv->xml, "summary_entry");
- priv->description_box = glade_xml_get_widget (priv->xml, "description_box");
- /* priv->add_button = glade_xml_get_widget (priv->xml, "add_button"); */
- priv->button_box = glade_xml_get_widget (priv->xml, "button_box");
- priv->address_entry = glade_xml_get_widget (priv->xml, "address_entry");
- priv->message_text = glade_xml_get_widget (priv->xml, "message_text");
-
- gtk_text_set_word_wrap (GTK_TEXT (priv->message_text), TRUE);
-
- priv->xml2 = glade_xml_new (EVOLUTION_GLADEDIR "/" "e-itip-control.glade", "loading_window");
- priv->loading_progress = glade_xml_get_widget (priv->xml2, "loading_progress");
- priv->loading_window = glade_xml_get_widget (priv->xml2, "loading_window");
-
- gtk_signal_connect (GTK_OBJECT (priv->main_frame), "destroy",
- GTK_SIGNAL_FUNC (itip_control_destroy_cb), priv);
-
- gtk_widget_show (priv->main_frame);
-
- control = bonobo_control_new (priv->main_frame);
-
- /* create a property bag */
- prop_bag = bonobo_property_bag_new ( get_prop, set_prop, priv );
- bonobo_control_set_properties (control, prop_bag);
-
- bonobo_property_bag_add (prop_bag, "from_address", FROM_ADDRESS_ARG_ID, BONOBO_ARG_STRING, NULL,
- "from_address", 0 );
- bonobo_property_bag_add (prop_bag, "my_address", MY_ADDRESS_ARG_ID, BONOBO_ARG_STRING, NULL,
- "my_address", 0 );
-
- bonobo_control_set_automerge (control, TRUE);
-
- stream = bonobo_persist_stream_new (pstream_load, pstream_save,
- pstream_get_max_size,
- pstream_get_content_types,
- priv);
-
- if (stream == NULL) {
- bonobo_object_unref (BONOBO_OBJECT (control));
- return NULL;
- }
-
- bonobo_object_add_interface (BONOBO_OBJECT (control),
- BONOBO_OBJECT (stream));
-
- return BONOBO_OBJECT (control);
-}
-
-void
-e_itip_control_factory_init (void)
-{
- static BonoboGenericFactory *factory = NULL;
-
- if (factory != NULL)
- return;
-
- factory = bonobo_generic_factory_new (
- "OAFIID:GNOME_Evolution_Calendar_iTip_ControlFactory",
- e_itip_control_factory, NULL);
-
- if (factory == NULL)
- g_error ("I could not register an iTip control factory.");
-}
-
diff --git a/calendar/gui/e-itip-control.glade b/calendar/gui/e-itip-control.glade
deleted file mode 100644
index 68e15d6989..0000000000
--- a/calendar/gui/e-itip-control.glade
+++ /dev/null
@@ -1,478 +0,0 @@
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <name>e-itip-control</name>
- <program_name>e-itip-control</program_name>
- <directory></directory>
- <source_directory>src</source_directory>
- <pixmaps_directory>pixmaps</pixmaps_directory>
- <language>C</language>
- <gnome_support>True</gnome_support>
- <gettext_support>True</gettext_support>
-</project>
-
-<widget>
- <class>GtkWindow</class>
- <name>window1</name>
- <visible>False</visible>
- <title>window1</title>
- <type>GTK_WINDOW_TOPLEVEL</type>
- <position>GTK_WIN_POS_NONE</position>
- <modal>False</modal>
- <allow_shrink>False</allow_shrink>
- <allow_grow>True</allow_grow>
- <auto_shrink>False</auto_shrink>
-
- <widget>
- <class>GtkFrame</class>
- <name>main_frame</name>
- <border_width>4</border_width>
- <label>Calendar Message</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-
- <widget>
- <class>GtkScrolledWindow</class>
- <name>scrolledwindow1</name>
- <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
- <vscrollbar_policy>GTK_POLICY_NEVER</vscrollbar_policy>
- <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
- <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-
- <widget>
- <class>GtkViewport</class>
- <name>viewport1</name>
- <shadow_type>GTK_SHADOW_NONE</shadow_type>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox1</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkTable</class>
- <name>table1</name>
- <border_width>3</border_width>
- <rows>4</rows>
- <columns>2</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>3</row_spacing>
- <column_spacing>3</column_spacing>
- <child>
- <padding>6</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkEntry</class>
- <name>organizer_entry</name>
- <can_focus>True</can_focus>
- <editable>False</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>summary_entry</name>
- <can_focus>True</can_focus>
- <editable>False</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>2</top_attach>
- <bottom_attach>3</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkScrolledWindow</class>
- <name>scrolledwindow2</name>
- <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
- <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
- <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
- <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>3</top_attach>
- <bottom_attach>4</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkText</class>
- <name>description_box</name>
- <can_focus>True</can_focus>
- <editable>False</editable>
- <text></text>
- </widget>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment1</name>
- <xalign>0</xalign>
- <yalign>0</yalign>
- <xscale>1</xscale>
- <yscale>1</yscale>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox1</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkLabel</class>
- <name>dtstart_label</name>
- <label>date-start</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label3</name>
- <label>--to--</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0</yalign>
- <xpad>19</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>dtend_label</name>
- <label>date-end</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label6</name>
- <label>Organizer:</label>
- <justify>GTK_JUSTIFY_LEFT</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label7</name>
- <label>Date:</label>
- <justify>GTK_JUSTIFY_LEFT</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label8</name>
- <label>Summary:</label>
- <justify>GTK_JUSTIFY_LEFT</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>2</top_attach>
- <bottom_attach>3</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label9</name>
- <label>Description:</label>
- <justify>GTK_JUSTIFY_LEFT</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>3</top_attach>
- <bottom_attach>4</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label12</name>
- <label>Server Message:</label>
- <justify>GTK_JUSTIFY_LEFT</justify>
- <wrap>False</wrap>
- <xalign>7.45058e-09</xalign>
- <yalign>0.5</yalign>
- <xpad>3</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkScrolledWindow</class>
- <name>scrolledwindow3</name>
- <border_width>3</border_width>
- <width>365</width>
- <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
- <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
- <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
- <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkText</class>
- <name>message_text</name>
- <can_focus>True</can_focus>
- <editable>False</editable>
- <text></text>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>button_box</name>
- <border_width>3</border_width>
- <height>30</height>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>Placeholder</class>
- </widget>
- </widget>
- </widget>
- </widget>
- </widget>
- </widget>
-</widget>
-
-<widget>
- <class>GtkWindow</class>
- <name>loading_window</name>
- <visible>False</visible>
- <title>Loading Calendar</title>
- <type>GTK_WINDOW_DIALOG</type>
- <position>GTK_WIN_POS_CENTER</position>
- <modal>False</modal>
- <allow_shrink>False</allow_shrink>
- <allow_grow>True</allow_grow>
- <auto_shrink>False</auto_shrink>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame1</name>
- <border_width>4</border_width>
- <label></label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_OUT</shadow_type>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox2</name>
- <border_width>7</border_width>
- <homogeneous>False</homogeneous>
- <spacing>1</spacing>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox2</name>
- <border_width>6</border_width>
- <homogeneous>False</homogeneous>
- <spacing>9</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label10</name>
- <label>Loading calendar...</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkProgressBar</class>
- <name>loading_progress</name>
- <value>0</value>
- <lower>0</lower>
- <upper>100</upper>
- <bar_style>GTK_PROGRESS_CONTINUOUS</bar_style>
- <orientation>GTK_PROGRESS_LEFT_TO_RIGHT</orientation>
- <activity_mode>False</activity_mode>
- <show_text>False</show_text>
- <format>%P %%</format>
- <text_xalign>0.5</text_xalign>
- <text_yalign>0.5</text_yalign>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
- </widget>
- </widget>
-</widget>
-
-</GTK-Interface>
diff --git a/calendar/gui/e-itip-control.h b/calendar/gui/e-itip-control.h
deleted file mode 100644
index 6c2df626ce..0000000000
--- a/calendar/gui/e-itip-control.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Evolution calendar - Control for displaying iTIP mail messages
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Author: Jesse Pavel <jpavel@ximian.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 __E_ITIP_CONTROL_H__
-#define __E_ITIP_CONTROL_H__
-
-#include <bonobo/bonobo-control.h>
-
-void e_itip_control_factory_init (void);
-
-#endif /* __E_ITIP_CONTROL_H__ */
diff --git a/calendar/gui/e-meeting-dialog.glade b/calendar/gui/e-meeting-dialog.glade
deleted file mode 100644
index 5b9a057f46..0000000000
--- a/calendar/gui/e-meeting-dialog.glade
+++ /dev/null
@@ -1,489 +0,0 @@
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <name>e-meeting-dialog</name>
- <program_name>e-meeting-dialog</program_name>
- <directory></directory>
- <source_directory>src</source_directory>
- <pixmaps_directory>pixmaps</pixmaps_directory>
- <language>C</language>
- <gnome_support>True</gnome_support>
- <gettext_support>True</gettext_support>
-</project>
-
-<widget>
- <class>GtkWindow</class>
- <name>meeting_window</name>
- <width>486</width>
- <height>330</height>
- <visible>False</visible>
- <title>Meeting Invitations</title>
- <type>GTK_WINDOW_DIALOG</type>
- <position>GTK_WIN_POS_NONE</position>
- <modal>True</modal>
- <allow_shrink>False</allow_shrink>
- <allow_grow>True</allow_grow>
- <auto_shrink>False</auto_shrink>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox1</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkToolbar</class>
- <name>toolbar1</name>
- <orientation>GTK_ORIENTATION_HORIZONTAL</orientation>
- <type>GTK_TOOLBAR_BOTH</type>
- <space_size>5</space_size>
- <space_style>GTK_TOOLBAR_SPACE_LINE</space_style>
- <relief>GTK_RELIEF_NORMAL</relief>
- <tooltips>True</tooltips>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <child_name>Toolbar:button</child_name>
- <name>publish_button</name>
- <label>Publish
-Event</label>
- <stock_pixmap>GNOME_STOCK_PIXMAP_MAIL_SND</stock_pixmap>
- </widget>
-
- <widget>
- <class>GtkVSeparator</class>
- <name>vseparator1</name>
- <width>13</width>
- <height>58</height>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <child_name>Toolbar:button</child_name>
- <name>request_button</name>
- <label>Request
-Meeting</label>
- <stock_pixmap>GNOME_STOCK_PIXMAP_REFRESH</stock_pixmap>
- </widget>
-
- <widget>
- <class>GtkVSeparator</class>
- <name>vseparator3</name>
- <width>13</width>
- <height>58</height>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <child_name>Toolbar:button</child_name>
- <name>cancel_button</name>
- <label>Cancel
-Meeting</label>
- <stock_pixmap>GNOME_STOCK_PIXMAP_CLOSE</stock_pixmap>
- </widget>
-
- <widget>
- <class>GtkVSeparator</class>
- <name>vseparator2</name>
- <width>12</width>
- <height>58</height>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <child_name>Toolbar:button</child_name>
- <name>schedule_button</name>
- <label>Schedule
-Time</label>
- <stock_pixmap>GNOME_STOCK_PIXMAP_MULTIPLE</stock_pixmap>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox3</name>
- <border_width>3</border_width>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>4</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label3</name>
- <label>Organizer: </label>
- <justify>GTK_JUSTIFY_RIGHT</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>3</xpad>
- <ypad>0</ypad>
- <child>
- <padding>1</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>organizer_entry</name>
- <width>252</width>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox1</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- <pack>GTK_PACK_END</pack>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label1</name>
- <label>Attendees: </label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>4</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkHButtonBox</class>
- <name>hbuttonbox3</name>
- <layout_style>GTK_BUTTONBOX_START</layout_style>
- <spacing>0</spacing>
- <child_min_width>83</child_min_width>
- <child_min_height>29</child_min_height>
- <child_ipad_x>8</child_ipad_x>
- <child_ipad_y>1</child_ipad_y>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>add_button</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <label>Add</label>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>delete_button</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <label>Delete</label>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>edit_button</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <label>Edit</label>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkScrolledWindow</class>
- <name>scrolledwindow1</name>
- <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
- <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
- <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
- <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkCList</class>
- <name>attendee_list</name>
- <can_focus>True</can_focus>
- <columns>4</columns>
- <column_widths>145,141,60,80</column_widths>
- <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
- <show_titles>True</show_titles>
- <shadow_type>GTK_SHADOW_IN</shadow_type>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>CList:title</child_name>
- <name>label8</name>
- <label>Attendee</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>CList:title</child_name>
- <name>label5</name>
- <label>Role</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>CList:title</child_name>
- <name>label6</name>
- <label>RSVP</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>CList:title</child_name>
- <name>label7</name>
- <label>Status</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
- </widget>
- </widget>
-</widget>
-
-<widget>
- <class>GnomeDialog</class>
- <name>edit_dialog</name>
- <width>344</width>
- <height>152</height>
- <visible>False</visible>
- <title>Attendee</title>
- <type>GTK_WINDOW_DIALOG</type>
- <position>GTK_WIN_POS_MOUSE</position>
- <modal>True</modal>
- <allow_shrink>False</allow_shrink>
- <allow_grow>False</allow_grow>
- <auto_shrink>False</auto_shrink>
- <auto_close>False</auto_close>
- <hide_on_close>False</hide_on_close>
-
- <widget>
- <class>GtkVBox</class>
- <child_name>GnomeDialog:vbox</child_name>
- <name>dialog-vbox1</name>
- <homogeneous>False</homogeneous>
- <spacing>8</spacing>
- <child>
- <padding>4</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkHButtonBox</class>
- <child_name>GnomeDialog:action_area</child_name>
- <name>dialog-action_area1</name>
- <layout_style>GTK_BUTTONBOX_SPREAD</layout_style>
- <spacing>8</spacing>
- <child_min_width>85</child_min_width>
- <child_min_height>27</child_min_height>
- <child_ipad_x>7</child_ipad_x>
- <child_ipad_y>0</child_ipad_y>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- <pack>GTK_PACK_END</pack>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>button1</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button3</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox2</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label2</name>
- <label>Attendee address</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>6</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>address_entry</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox4</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label9</name>
- <label>Role</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>5</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkCombo</class>
- <name>role_combo</name>
- <width>160</width>
- <value_in_list>False</value_in_list>
- <ok_if_empty>True</ok_if_empty>
- <case_sensitive>False</case_sensitive>
- <use_arrows>True</use_arrows>
- <use_arrows_always>False</use_arrows_always>
- <items>Chair
-Required Participant
-Optional Participant
-Non-Participant
-Other
-
-
-</items>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkEntry</class>
- <child_name>GtkCombo:entry</child_name>
- <name>role_entry</name>
- <can_focus>True</can_focus>
- <editable>False</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text>Required Participant</text>
- </widget>
- </widget>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>rsvp_check</name>
- <can_focus>True</can_focus>
- <label>RSVP</label>
- <active>True</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
- </widget>
-</widget>
-
-</GTK-Interface>
diff --git a/calendar/gui/e-meeting-edit.c b/calendar/gui/e-meeting-edit.c
deleted file mode 100644
index 78c67e5d3a..0000000000
--- a/calendar/gui/e-meeting-edit.c
+++ /dev/null
@@ -1,1001 +0,0 @@
-/* Evolution calendar - Meeting editor dialog
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Authors: Jesse Pavel <jpavel@ximian.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 <gtk/gtkclist.h>
-#include <gtk/gtkentry.h>
-#include <gtk/gtkmain.h>
-#include <gtk/gtktogglebutton.h>
-#include <gtk/gtkwindow.h>
-#include <gdk_imlib.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-dialog-util.h>
-#include <bonobo/bonobo-object.h>
-#include <bonobo/bonobo-object-client.h>
-#include <glade/glade.h>
-#include <ical.h>
-#include <widgets/meeting-time-sel/e-meeting-time-sel.h>
-#include <Evolution-Composer.h>
-#include <string.h>
-#include "e-meeting-edit.h"
-#include "itip-utils.h"
-
-#define E_MEETING_GLADE_XML "e-meeting-dialog.glade"
-
-
-typedef struct _EMeetingEditorPrivate EMeetingEditorPrivate;
-
-struct _EMeetingEditorPrivate {
- /* These are the widgets to be used in the GUI. */
- GladeXML *xml;
- GtkWidget *meeting_window;
- GtkWidget *attendee_list;
- GtkWidget *address_entry;
- GtkWidget *edit_dialog;
- GtkWidget *organizer_entry;
- GtkWidget *role_entry;
- GtkWidget *rsvp_check;
- GtkWidget *publish_button, *request_button, *cancel_button,
- *schedule_button;
-
- gint changed_signal_id;
-
- /* Various pieces of information. */
- gint selected_row;
- CalComponent *comp;
- CalClient *client;
- icalcomponent *icalcomp, *vevent;
-
- gint numentries; /* How many attendees are there? */
- gboolean dirty; /* Has anything changed? */
-};
-
-#define NUM_COLUMNS 4 /* The number of columns in our attendee list. */
-
-enum column_names {ADDRESS_COL, ROLE_COL, RSVP_COL, STATUS_COL};
-
-
-static void
-save_organizer (EMeetingEditorPrivate *priv)
-{
- icalproperty *prop;
- icalvalue *value;
- gchar *text;
-
- /* Save the organizer into the iCAL object. */
-
- text = gtk_entry_get_text (GTK_ENTRY (priv->organizer_entry));
- if (strlen (text) > 0) {
- gchar buffer[200];
- g_snprintf (buffer, 190, "MAILTO:%s", text);
-
- prop = icalcomponent_get_first_property (priv->vevent, ICAL_ORGANIZER_PROPERTY);
- if (prop == NULL) {
- /* We need to add an ORGANIZER property. */
- prop = icalproperty_new (ICAL_ORGANIZER_PROPERTY);
- icalcomponent_add_property (priv->vevent, prop);
- }
- value = icalvalue_new_text (buffer);
- icalproperty_set_value (prop, value);
- }
-}
-
-
-
-static gboolean
-window_delete_cb (GtkWidget *widget,
- GdkEvent *event,
- gpointer data)
-{
- EMeetingEditorPrivate *priv;
-
- priv = (EMeetingEditorPrivate *) ((EMeetingEditor *)data)->priv;
-
- save_organizer (priv);
-
- if (priv->dirty == TRUE) {
- /* FIXME: notify the event editor that our data has changed.
- For now, I'll just display a dialog box. */
- {
- if (!cal_client_update_object (priv->client, priv->comp)) {
- GtkWidget *dialog;
-
- dialog = gnome_warning_dialog_parented ("I couldn't automatically save this meeting,\n"
- "so try to save this event manually.",
- GTK_WINDOW (priv->meeting_window));
- gnome_dialog_run (GNOME_DIALOG(dialog));
- }
- }
- }
-
- gtk_entry_set_text (GTK_ENTRY (priv->organizer_entry), "");
-
- return (FALSE);
-}
-
-static void
-window_destroy_cb (GtkWidget *widget,
- gpointer data)
-{
- EMeetingEditorPrivate *priv;
-
- priv = (EMeetingEditorPrivate *) ((EMeetingEditor *)data)->priv;
-
- gtk_main_quit ();
- return;
-}
-
-/* put_property_in_list() synchronizes the display of row `rownum'
- in our attendee list to the values of `prop'. If rownum < 0,
- then put_property_in_list() will append a new row.
- If the property doesn't contain certain parameters that we deem
- necessary, it will add them. */
-static void
-put_property_in_list (icalproperty *prop, gint rownum, gpointer data)
-{
- gchar *row_text[NUM_COLUMNS];
- gchar *text, *new_text;
- icalparameter *param;
- icalvalue *value;
- gint enumval;
- gint cntr;
-
- EMeetingEditorPrivate *priv;
-
- priv = (EMeetingEditorPrivate *) ((EMeetingEditor *)data)->priv;
-
- value = icalproperty_get_value (prop);
-
- if (value != NULL) {
- text = strdup (icalvalue_as_ical_string (value));
-
- /* Here I strip off the "MAILTO:" if it is present. */
- new_text = strchr (text, ':');
- if (new_text != NULL)
- new_text++;
- else
- new_text = text;
-
- row_text[ADDRESS_COL] = g_strdup (new_text);
- g_free (text);
- }
-
- param = get_icalparam_by_type (prop, ICAL_ROLE_PARAMETER);
- if (param == NULL) {
- param = icalparameter_new_role (ICAL_ROLE_REQPARTICIPANT);
- icalproperty_add_parameter (prop, param);
- }
-
- enumval = icalparameter_get_role (param);
- if (enumval < 0 || enumval > 4)
- enumval = 4;
-
- row_text[ROLE_COL] = role_values [enumval];
-
- param = get_icalparam_by_type (prop, ICAL_RSVP_PARAMETER);
- if (param == NULL) {
- param = icalparameter_new_rsvp (TRUE);
- icalproperty_add_parameter (prop, param);
- }
-
- if (icalparameter_get_rsvp (param))
- row_text[RSVP_COL] = "Y";
- else
- row_text[RSVP_COL] = "N";
-
- param = get_icalparam_by_type (prop, ICAL_PARTSTAT_PARAMETER);
- if (param == NULL) {
- param = icalparameter_new_partstat (ICAL_PARTSTAT_NEEDSACTION);
- icalproperty_add_parameter (prop, param);
- }
-
- enumval = icalparameter_get_partstat (param);
- if (enumval < 0 || enumval > 7) {
- enumval = 7;
- }
-
- row_text[STATUS_COL] = partstat_values [enumval];
-
- if (rownum < 0) {
- gtk_clist_append (GTK_CLIST (priv->attendee_list), row_text);
- gtk_clist_set_row_data (GTK_CLIST (priv->attendee_list), priv->numentries, prop);
- priv->numentries++;
- }
- else {
- for (cntr = 0; cntr < NUM_COLUMNS; cntr++) {
- gtk_clist_set_text (GTK_CLIST (priv->attendee_list),
- rownum,
- cntr,
- row_text[cntr]);
- }
- }
-
- g_free (row_text[ADDRESS_COL]);
-}
-
-
-
-/********
- * edit_attendee() performs the GUI manipulation and interaction for
- * editing `prop' and returns TRUE if the user indicated that he wants
- * to save the new property information.
- *
- * Note that it is necessary that the property have parameters of the types
- * RSVP, PARTSTAT, and ROLE already when passed into this function.
- ********/
-static gboolean
-edit_attendee (icalproperty *prop, gpointer data)
-{
- EMeetingEditorPrivate *priv;
- gint button_num;
- gchar *new_text, *text;
- icalparameter *param;
- icalvalue *value;
- gchar buffer[200];
- gint cntr;
- gint enumval;
- gboolean retval;
-
- priv = (EMeetingEditorPrivate *) ((EMeetingEditor *)data)->priv;
-
- g_return_val_if_fail (prop != NULL, FALSE);
-
- if (priv->edit_dialog == NULL || priv->address_entry == NULL) {
- priv->edit_dialog = glade_xml_get_widget (priv->xml, "edit_dialog");
- priv->address_entry = glade_xml_get_widget (priv->xml, "address_entry");
-
- gnome_dialog_set_close (GNOME_DIALOG (priv->edit_dialog), TRUE);
- gnome_dialog_editable_enters (GNOME_DIALOG (priv->edit_dialog),
- GTK_EDITABLE (priv->address_entry));
- gnome_dialog_close_hides (GNOME_DIALOG (priv->edit_dialog), TRUE);
- gnome_dialog_set_default (GNOME_DIALOG (priv->edit_dialog), 0);
- }
-
- g_return_val_if_fail (priv->edit_dialog != NULL, FALSE);
- g_return_val_if_fail (priv->address_entry != NULL, FALSE);
-
- gtk_widget_realize (priv->edit_dialog);
-
- value = icalproperty_get_value (prop);
-
- if (value != NULL) {
- text = strdup (icalvalue_as_ical_string (value));
-
- /* Here I strip off the "MAILTO:" if it is present. */
- new_text = strchr (text, ':');
- if (new_text != NULL)
- new_text++;
- else
- new_text = text;
-
- gtk_entry_set_text (GTK_ENTRY (priv->address_entry), new_text);
- g_free (text);
- }
- else {
- gtk_entry_set_text (GTK_ENTRY (priv->address_entry), "");
- }
-
-
- param = get_icalparam_by_type (prop, ICAL_ROLE_PARAMETER);
- enumval = icalparameter_get_role (param);
- if (enumval < 0 || enumval > 4)
- enumval = 4;
-
- text = role_values [enumval];
- gtk_entry_set_text (GTK_ENTRY (priv->role_entry), text);
-
- param = get_icalparam_by_type (prop, ICAL_RSVP_PARAMETER);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->rsvp_check),
- icalparameter_get_rsvp (param));
-
- gtk_widget_show (priv->edit_dialog);
-
- button_num = gnome_dialog_run (GNOME_DIALOG (priv->edit_dialog));
-
- if (button_num == 0) {
- /* The user pressed the OK button. */
- new_text = gtk_entry_get_text (GTK_ENTRY (priv->address_entry));
-
- g_snprintf (buffer, 190, "MAILTO:%s", new_text);
- value = icalvalue_new_text (buffer);
- icalproperty_set_value (prop, value);
-
- /* Take care of the ROLE. */
- icalproperty_remove_parameter (prop, ICAL_ROLE_PARAMETER);
-
- param = NULL;
- text = gtk_entry_get_text (GTK_ENTRY(priv->role_entry));
-
- for (cntr = 0; cntr < 5; cntr++) {
- if (strncmp (text, role_values[cntr], 3) == 0) {
- param = icalparameter_new_role (cntr);
- break;
- }
- }
-
- if (param == NULL) {
- g_print ("e-meeting-edit.c: edit_attendee() the ROLE param was null.\n");
- /* Use this as a default case, if none of the others match. */
- param = icalparameter_new_role (ICAL_ROLE_REQPARTICIPANT);
- }
-
- icalproperty_add_parameter (prop, param);
-
- /* Now the RSVP. */
- icalproperty_remove_parameter (prop, ICAL_RSVP_PARAMETER);
-
- param = icalparameter_new_rsvp
- (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->rsvp_check)));
- icalproperty_add_parameter (prop, param);
-
- retval = TRUE;
- }
- else /* The user didn't say OK. */
- retval = FALSE;
-
- return retval;
-}
-
-static void
-schedule_button_clicked_cb (GtkWidget *widget, gpointer data)
-{
- EMeetingEditorPrivate *priv;
-
- EMeetingTimeSelector *mts;
- EMeetingTimeSelectorAttendeeType type;
- GtkWidget *dialog;
- gchar *attendee;
- gint cntr, row;
- icalproperty *prop;
- icalparameter *param;
- gint button_num;
-
- priv = (EMeetingEditorPrivate *) ((EMeetingEditor *)data)->priv;
-
-
- gtk_widget_push_visual (gdk_imlib_get_visual ());
- gtk_widget_push_colormap (gdk_imlib_get_colormap ());
-
- dialog = gnome_dialog_new ("Schedule Meeting", "Set Time", "Cancel", NULL);
-
- gtk_window_set_default_size (GTK_WINDOW (dialog), 600, 400);
- gtk_window_set_policy (GTK_WINDOW (dialog), FALSE, TRUE, FALSE);
-
- mts = (EMeetingTimeSelector *)e_meeting_time_selector_new ();
- gtk_container_add (GTK_CONTAINER (GNOME_DIALOG (dialog)->vbox), GTK_WIDGET (mts));
- gtk_window_add_accel_group (GTK_WINDOW (dialog),
- E_MEETING_TIME_SELECTOR (mts)->accel_group);
- gtk_widget_show (GTK_WIDGET (mts));
-
- gtk_widget_pop_visual ();
- gtk_widget_pop_colormap ();
-
-
- /* Let's stick all the attendees that we have in our clist, into the
- meeting time widget. */
- for (cntr = 0; cntr < priv->numentries; cntr++ ) {
- gtk_clist_get_text (GTK_CLIST (priv->attendee_list), cntr,
- ADDRESS_COL, &attendee);
- row = e_meeting_time_selector_attendee_add (mts, attendee, NULL);
-
- prop = (icalproperty *)gtk_clist_get_row_data (GTK_CLIST (priv->attendee_list), cntr);
- param = get_icalparam_by_type (prop, ICAL_ROLE_PARAMETER);
-
- switch (icalparameter_get_role (param)) {
- case ICAL_ROLE_CHAIR:
- case ICAL_ROLE_REQPARTICIPANT:
- type = E_MEETING_TIME_SELECTOR_REQUIRED_PERSON;
- break;
- default:
- type = E_MEETING_TIME_SELECTOR_OPTIONAL_PERSON;
- }
-
- e_meeting_time_selector_attendee_set_type (mts, row, type);
- }
-
- /* I don't want the meeting widget to be destroyed before I can
- extract information from it; so now the dialog window will just
- be hidden when the user clicks a button or closes it. */
- gnome_dialog_close_hides (GNOME_DIALOG (dialog), TRUE);
-
- gnome_dialog_set_close (GNOME_DIALOG (dialog), TRUE);
-
- button_num = gnome_dialog_run (GNOME_DIALOG (dialog));
-
- if (button_num == 0) {
- /* The user clicked "Set Time". */
- gint start_year, start_month, start_day, start_hour, start_minute,
- end_year, end_month, end_day, end_hour, end_minute;
- CalComponentDateTime cal_dtstart, cal_dtend;
-
-
- e_meeting_time_selector_get_meeting_time (mts,
- &start_year,
- &start_month,
- &start_day,
- &start_hour,
- &start_minute,
- &end_year,
- &end_month,
- &end_day,
- &end_hour,
- &end_minute);
-
- cal_component_get_dtstart (priv->comp, &cal_dtstart);
- cal_component_get_dtend (priv->comp, &cal_dtend);
-
- cal_dtstart.value->second = 0;
- cal_dtstart.value->minute = start_minute;
- cal_dtstart.value->hour = start_hour;
- cal_dtstart.value->day = start_day;
- cal_dtstart.value->month = start_month;
- cal_dtstart.value->year = start_year;
-
- cal_dtend.value->second = 0;
- cal_dtend.value->minute = end_minute;
- cal_dtend.value->hour = end_hour;
- cal_dtend.value->day = end_day;
- cal_dtend.value->month = end_month;
- cal_dtend.value->year = end_year;
-
- cal_component_set_dtstart (priv->comp, &cal_dtstart);
- cal_component_set_dtend (priv->comp, &cal_dtend);
-
- cal_component_free_datetime (&cal_dtstart);
- cal_component_free_datetime (&cal_dtend);
-
- priv->dirty = TRUE;
- }
-
- gtk_widget_destroy (GTK_WIDGET (dialog));
-
- return;
-}
-
-#define GNOME_EVOLUTION_COMPOSER_OAFIID "OAFIID:GNOME_Evolution_Mail_Composer"
-
-static gchar *itip_methods[] = {
- "REQUEST",
- "PUBLISH",
- "CANCEL"
-};
-
-enum itip_method_enum {
- METHOD_REQUEST,
- METHOD_PUBLISH,
- METHOD_CANCEL
-};
-
-typedef enum itip_method_enum itip_method_enum;
-
-static void
-send_calendar_info (itip_method_enum method, EMeetingEditorPrivate *priv)
-{
- BonoboObjectClient *bonobo_server;
- GNOME_Evolution_Composer composer_server;
- CORBA_Environment ev;
- GNOME_Evolution_Composer_RecipientList *to_list, *cc_list, *bcc_list;
- GNOME_Evolution_Composer_Recipient *recipient;
- gchar *cell_text;
- CORBA_char *subject;
- gint cntr;
- gint len;
- CalComponentText caltext;
- CORBA_char *content_type, *filename, *description, *attach_data;
- CORBA_boolean show_inline;
- CORBA_char tempstr[200];
-
-
- CORBA_exception_init (&ev);
-
- /* First, I obtain an object reference that represents the Composer. */
- bonobo_server = bonobo_object_activate (GNOME_EVOLUTION_COMPOSER_OAFIID, 0);
-
- g_return_if_fail (bonobo_server != NULL);
-
- composer_server = bonobo_object_corba_objref (BONOBO_OBJECT (bonobo_server));
-
- /* All right, now I have to convert my list of recipients into one of those
- CORBA sequences. */
- to_list = GNOME_Evolution_Composer_RecipientList__alloc ();
- to_list->_maximum = priv->numentries;
- to_list->_length = priv->numentries;
- to_list->_buffer = CORBA_sequence_GNOME_Evolution_Composer_Recipient_allocbuf (priv->numentries);
-
- for (cntr = 0; cntr < priv->numentries; cntr++) {
- gtk_clist_get_text (GTK_CLIST (priv->attendee_list),
- cntr, ADDRESS_COL,
- &cell_text);
- len = strlen (cell_text);
-
- recipient = &(to_list->_buffer[cntr]);
- recipient->name = CORBA_string_alloc (0); /* FIXME: we may want an actual name here. */
- recipient->name[0] = '\0';
- recipient->address = CORBA_string_alloc (len);
- strcpy (recipient->address, cell_text);
- }
-
- cc_list = GNOME_Evolution_Composer_RecipientList__alloc ();
- cc_list->_maximum = cc_list->_length = 0;
- bcc_list = GNOME_Evolution_Composer_RecipientList__alloc ();
- bcc_list->_maximum = bcc_list->_length = 0;
-
- cal_component_get_summary (priv->comp, &caltext);
- subject = CORBA_string_alloc (strlen (caltext.value));
- strcpy (subject, caltext.value);
-
- GNOME_Evolution_Composer_setHeaders (composer_server, to_list, cc_list, bcc_list, subject, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_printerr ("gui/e-meeting-edit.c: I couldn't set the composer headers via CORBA! Aagh.\n");
- CORBA_exception_free (&ev);
- return;
- }
-
- sprintf (tempstr, "text/calendar;METHOD=%s", itip_methods[method]);
- content_type = CORBA_string_alloc (strlen (tempstr));
- strcpy (content_type, tempstr);
- filename = CORBA_string_alloc (0);
- filename[0] = '\0';
- sprintf (tempstr, "Calendar attachment");
- description = CORBA_string_alloc (strlen (tempstr));
- strcpy (description, tempstr);
- show_inline = FALSE;
-
- /* I need to create an encapsulating iCalendar component, and stuff our vEvent
- into it. */
- {
- icalcomponent *comp;
- icalproperty *prop;
- icalvalue *value;
- gchar *ical_string;
-
- save_organizer (priv);
-
- comp = icalcomponent_new (ICAL_VCALENDAR_COMPONENT);
-
- prop = icalproperty_new (ICAL_PRODID_PROPERTY);
- value = icalvalue_new_text ("-//HelixCode/Evolution//EN");
- icalproperty_set_value (prop, value);
- icalcomponent_add_property (comp, prop);
-
- prop = icalproperty_new (ICAL_VERSION_PROPERTY);
- value = icalvalue_new_text ("2.0");
- icalproperty_set_value (prop, value);
- icalcomponent_add_property (comp, prop);
-
- prop = icalproperty_new (ICAL_METHOD_PROPERTY);
- value = icalvalue_new_text (itip_methods[method]);
- icalproperty_set_value (prop, value);
- icalcomponent_add_property (comp, prop);
-
- icalcomponent_add_component (comp, priv->vevent);
-
- ical_string = icalcomponent_as_ical_string (comp);
- attach_data = CORBA_string_alloc (strlen (ical_string));
- strcpy (attach_data, ical_string);
-
- icalcomponent_remove_component (comp, priv->vevent);
- icalcomponent_free (comp);
- }
-
- GNOME_Evolution_Composer_attachData (composer_server,
- content_type, filename, description,
- show_inline, attach_data,
- &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_printerr ("gui/e-meeting-edit.c: I couldn't attach data to the composer via CORBA! Aagh.\n");
- CORBA_exception_free (&ev);
- return;
- }
-
- GNOME_Evolution_Composer_show (composer_server, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_printerr ("gui/e-meeting-edit.c: I couldn't show the composer via CORBA! Aagh.\n");
- CORBA_exception_free (&ev);
- return;
- }
-
- CORBA_exception_free (&ev);
-
- /* Let's free shit up. */
-
- /* Beware--depending on whether CORBA_free is recursive, which I
- think is is, we might have memory leaks, in which case the code
- below is necessary. */
-#if 0
- for (cntr = 0; cntr < priv->numentries; cntr++) {
- recipient = &(to_list->_buffer[cntr]);
- CORBA_free (recipient->name);
- CORBA_free (recipient->address);
- recipient->name = recipient->address = NULL;
- }
-#endif
-
- if (CORBA_sequence_get_release (to_list) != FALSE)
- CORBA_free (to_list->_buffer);
-
- CORBA_free (to_list);
- CORBA_free (cc_list);
- CORBA_free (bcc_list);
-
- CORBA_free (subject);
- CORBA_free (content_type);
- CORBA_free (filename);
- CORBA_free (description);
- CORBA_free (attach_data);
-
- /* bonobo_object_unref (BONOBO_OBJECT (bonobo_server)); */
-}
-
-/********
- * This routine is called when the publish button is clicked. Duh.
- * Actually, I'm just testing my commenting macros.
- ********/
-static void
-publish_button_clicked_cb (GtkWidget *widget, gpointer data)
-{
- EMeetingEditorPrivate *priv;
-
-
- priv = (EMeetingEditorPrivate *) ((EMeetingEditor *)data)->priv;
-
- send_calendar_info (METHOD_PUBLISH, priv);
-
-}
-
-static void
-request_button_clicked_cb (GtkWidget *widget, gpointer data)
-{
- EMeetingEditorPrivate *priv;
-
- priv = (EMeetingEditorPrivate *) ((EMeetingEditor *)data)->priv;
-
- send_calendar_info (METHOD_REQUEST, priv);
-
-}
-
-static void
-cancel_button_clicked_cb (GtkWidget *widget, gpointer data)
-{
- EMeetingEditorPrivate *priv;
-
- priv = (EMeetingEditorPrivate *) ((EMeetingEditor *)data)->priv;
-
- send_calendar_info (METHOD_CANCEL, priv);
-}
-
-
-
-static void
-add_button_clicked_cb (GtkWidget *widget, gpointer data)
-{
- EMeetingEditorPrivate *priv;
- icalproperty *prop;
- icalparameter *param;
-
- priv = (EMeetingEditorPrivate *) ((EMeetingEditor *)data)->priv;
-
- prop = icalproperty_new (ICAL_ATTENDEE_PROPERTY);
- param = icalparameter_new_role (ICAL_ROLE_REQPARTICIPANT);
- icalproperty_add_parameter (prop, param);
- param = icalparameter_new_rsvp (TRUE);
- icalproperty_add_parameter (prop, param);
- param = icalparameter_new_partstat (ICAL_PARTSTAT_NEEDSACTION);
- icalproperty_add_parameter (prop, param);
-
- if (edit_attendee (prop, data) == TRUE) {
- /* Let's add this property to our component and to the CList. */
- icalcomponent_add_property (priv->vevent, prop);
-
- /* The -1 indicates that we should add a new row. */
- put_property_in_list (prop, -1, data);
-
- priv->dirty = TRUE;
- }
- else {
- icalproperty_free (prop);
- }
-}
-
-static void
-delete_button_clicked_cb (GtkWidget *widget, gpointer data)
-{
- EMeetingEditorPrivate *priv;
-
- priv = (EMeetingEditorPrivate *) ((EMeetingEditor *)data)->priv;
-
- if (priv->selected_row < 0) {
- GtkWidget *dialog;
-
- dialog = gnome_warning_dialog_parented ("You must select an entry to delete.",
- GTK_WINDOW (priv->meeting_window));
- gnome_dialog_run (GNOME_DIALOG(dialog));
- }
- else {
- /* Delete the associated property from the iCAL object. */
- icalproperty *prop;
-
- prop = (icalproperty *)gtk_clist_get_row_data (GTK_CLIST (priv->attendee_list),
- priv->selected_row);
- icalcomponent_remove_property (priv->vevent, prop);
- icalproperty_free (prop);
-
- gtk_clist_remove (GTK_CLIST (priv->attendee_list), priv->selected_row);
- priv->selected_row = -1;
- priv->numentries--;
- priv->dirty = TRUE;
- }
-}
-
-static void
-edit_button_clicked_cb (GtkWidget *widget, gpointer data)
-{
- EMeetingEditorPrivate *priv;
-
- priv = (EMeetingEditorPrivate *) ((EMeetingEditor *)data)->priv;
-
-
- if (priv->selected_row < 0) {
- GtkWidget *dialog;
-
- dialog = gnome_warning_dialog_parented ("You must select an entry to edit.",
- GTK_WINDOW (priv->meeting_window));
- gnome_dialog_run (GNOME_DIALOG(dialog));
- return;
- }
- else {
- icalproperty *prop, *new_prop;
- icalparameter *param;
- icalvalue *value;
-
- prop = (icalproperty *)gtk_clist_get_row_data (GTK_CLIST (priv->attendee_list),
- priv->selected_row);
-
- g_assert (prop != NULL);
-
- new_prop = icalproperty_new_clone (prop);
-
- if (edit_attendee (new_prop, data)) {
- /* The user hit Okay. */
- /*We need to synchronize the old property with the newly edited one.*/
- value = icalvalue_new_clone (icalproperty_get_value (new_prop));
- icalproperty_set_value (prop, value);
-
- icalproperty_remove_parameter (prop, ICAL_ROLE_PARAMETER);
- icalproperty_remove_parameter (prop, ICAL_RSVP_PARAMETER);
- icalproperty_remove_parameter (prop, ICAL_PARTSTAT_PARAMETER);
-
- param = icalparameter_new_clone (get_icalparam_by_type (new_prop, ICAL_ROLE_PARAMETER));
- g_assert (param != NULL);
- icalproperty_add_parameter (prop, param);
- param = icalparameter_new_clone (get_icalparam_by_type (new_prop, ICAL_RSVP_PARAMETER));
- g_assert (param != NULL);
- icalproperty_add_parameter (prop, param);
- param = icalparameter_new_clone (get_icalparam_by_type (new_prop, ICAL_PARTSTAT_PARAMETER));
- g_assert (param != NULL);
- icalproperty_add_parameter (prop, param);
-
- put_property_in_list (prop, priv->selected_row, data);
- priv->dirty = TRUE;
-
- }
- icalproperty_free (new_prop);
- }
-}
-
-
-
-static void
-list_row_select_cb (GtkWidget *widget,
- gint row,
- gint column,
- GdkEventButton *event,
- gpointer data)
-{
- EMeetingEditorPrivate *priv;
-
- priv = (EMeetingEditorPrivate *) ((EMeetingEditor *)data)->priv;
-
- priv->selected_row = row;
-}
-
-static void
-organizer_changed_cb (GtkWidget *widget, gpointer data)
-{
- EMeetingEditorPrivate *priv;
-
- priv = (EMeetingEditorPrivate *) ((EMeetingEditor *)data)->priv;
-
- gtk_signal_disconnect (GTK_OBJECT (priv->organizer_entry), priv->changed_signal_id);
-
- priv->dirty = TRUE;
-}
-
-
-/* ------------------------------------------------------------ */
-/* --------------------- Exported Functions ------------------- */
-/* ------------------------------------------------------------ */
-
-EMeetingEditor *
-e_meeting_editor_new (CalComponent *comp, CalClient *client)
-{
- EMeetingEditor *object;
- EMeetingEditorPrivate *priv;
-
- object = (EMeetingEditor *)g_new(EMeetingEditor, 1);
-
- priv = (EMeetingEditorPrivate *) g_new0(EMeetingEditorPrivate, 1);
- priv->selected_row = -1;
- priv->comp = comp;
- priv->client = client;
- priv->icalcomp = cal_component_get_icalcomponent (comp);
-
- object->priv = priv;
-
- return object;
-}
-
-void
-e_meeting_editor_free (EMeetingEditor *editor)
-{
- if (editor == NULL)
- return;
-
- if (editor->priv != NULL)
- g_free (editor->priv);
-
- g_free (editor);
-}
-
-
-
-void
-e_meeting_edit (EMeetingEditor *editor)
-{
- EMeetingEditorPrivate *priv;
- GtkWidget *add_button, *delete_button, *edit_button;
- icalproperty *prop;
- icalvalue *value;
- gchar *text;
-
-
- g_return_if_fail (editor != NULL);
-
- priv = (EMeetingEditorPrivate *)editor->priv;
-
- g_return_if_fail (priv != NULL);
-
-
- priv->xml = glade_xml_new (EVOLUTION_GLADEDIR "/" E_MEETING_GLADE_XML, NULL);
-
- priv->meeting_window = glade_xml_get_widget (priv->xml, "meeting_window");
- priv->attendee_list = glade_xml_get_widget (priv->xml, "attendee_list");
- priv->role_entry = glade_xml_get_widget (priv->xml, "role_entry");
- priv->rsvp_check = glade_xml_get_widget (priv->xml, "rsvp_check");
- priv->schedule_button = glade_xml_get_widget (priv->xml, "schedule_button");
- priv->publish_button = glade_xml_get_widget (priv->xml, "publish_button");
- priv->request_button = glade_xml_get_widget (priv->xml, "request_button");
- priv->cancel_button = glade_xml_get_widget (priv->xml, "cancel_button");
-
- gtk_clist_set_column_justification (GTK_CLIST (priv->attendee_list), ROLE_COL, GTK_JUSTIFY_CENTER);
- gtk_clist_set_column_justification (GTK_CLIST (priv->attendee_list), RSVP_COL, GTK_JUSTIFY_CENTER);
- gtk_clist_set_column_justification (GTK_CLIST (priv->attendee_list), STATUS_COL, GTK_JUSTIFY_CENTER);
-
- gtk_signal_connect (GTK_OBJECT (priv->meeting_window), "delete_event",
- GTK_SIGNAL_FUNC (window_delete_cb), editor);
-
- gtk_signal_connect_after (GTK_OBJECT (priv->meeting_window), "delete_event",
- GTK_SIGNAL_FUNC (window_destroy_cb), editor);
-
- gtk_signal_connect (GTK_OBJECT (priv->meeting_window), "destroy_event",
- GTK_SIGNAL_FUNC (window_destroy_cb), editor);
-
- gtk_signal_connect (GTK_OBJECT (priv->attendee_list), "select_row",
- GTK_SIGNAL_FUNC (list_row_select_cb), editor);
-
- gtk_signal_connect (GTK_OBJECT (priv->schedule_button), "clicked",
- GTK_SIGNAL_FUNC (schedule_button_clicked_cb), editor);
-
- gtk_signal_connect (GTK_OBJECT (priv->publish_button), "clicked",
- GTK_SIGNAL_FUNC (publish_button_clicked_cb), editor);
-
- gtk_signal_connect (GTK_OBJECT (priv->request_button), "clicked",
- GTK_SIGNAL_FUNC (request_button_clicked_cb), editor);
-
- gtk_signal_connect (GTK_OBJECT (priv->cancel_button), "clicked",
- GTK_SIGNAL_FUNC (cancel_button_clicked_cb), editor);
-
- add_button = glade_xml_get_widget (priv->xml, "add_button");
- delete_button = glade_xml_get_widget (priv->xml, "delete_button");
- edit_button = glade_xml_get_widget (priv->xml, "edit_button");
-
- gtk_signal_connect (GTK_OBJECT (add_button), "clicked",
- GTK_SIGNAL_FUNC (add_button_clicked_cb), editor);
-
- gtk_signal_connect (GTK_OBJECT (delete_button), "clicked",
- GTK_SIGNAL_FUNC (delete_button_clicked_cb), editor);
-
- gtk_signal_connect (GTK_OBJECT (edit_button), "clicked",
- GTK_SIGNAL_FUNC (edit_button_clicked_cb), editor);
-
- priv->organizer_entry = glade_xml_get_widget (priv->xml, "organizer_entry");
-
- if (icalcomponent_isa (priv->icalcomp) != ICAL_VEVENT_COMPONENT) {
- icalcompiter iter;
-
- iter = icalcomponent_begin_component (priv->icalcomp, ICAL_VEVENT_COMPONENT);
- priv->vevent = icalcompiter_deref (&iter);
- } else
- priv->vevent = priv->icalcomp;
-
- g_assert (priv->vevent != NULL);
-
- /* Let's extract the organizer, if there is one. */
- prop = icalcomponent_get_first_property (priv->vevent, ICAL_ORGANIZER_PROPERTY);
-
- if (prop != NULL) {
- gchar *buffer;
-
- value = icalproperty_get_value (prop);
- buffer = g_strdup (icalvalue_as_ical_string (value));
- if (buffer != NULL) {
- /* Strip off the MAILTO:, if it is present. */
- text = strchr (buffer, ':');
- if (text == NULL)
- text = buffer;
- else
- text++;
-
- gtk_entry_set_text (GTK_ENTRY (priv->organizer_entry), text);
- g_free (buffer);
- }
-
- }
-
- priv->changed_signal_id = gtk_signal_connect (GTK_OBJECT (priv->organizer_entry), "changed",
- GTK_SIGNAL_FUNC (organizer_changed_cb), editor);
-
-
- /* Let's go through the iCAL object, and create a list entry
- for each ATTENDEE property. */
- for (prop = icalcomponent_get_first_property (priv->vevent, ICAL_ATTENDEE_PROPERTY);
- prop != NULL;
- prop = icalcomponent_get_next_property (priv->vevent, ICAL_ATTENDEE_PROPERTY))
- {
- put_property_in_list (prop, -1, editor);
- }
-
-
- gtk_widget_show (priv->meeting_window);
-
- gtk_main ();
-
- if (priv->meeting_window != NULL)
- gtk_widget_destroy (priv->meeting_window);
-
- if (priv->edit_dialog != NULL)
- gtk_widget_destroy (priv->edit_dialog);
-
- gtk_object_unref (GTK_OBJECT (priv->xml));
-}
diff --git a/calendar/gui/e-meeting-edit.h b/calendar/gui/e-meeting-edit.h
deleted file mode 100644
index e29453ecba..0000000000
--- a/calendar/gui/e-meeting-edit.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Evolution calendar - Meeting editor dialog
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Authors: Jesse Pavel <jpavel@ximian.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 __E_MEETING_EDIT_H__
-#define __E_MEETING_EDIT_H__
-
-#include <config.h>
-#include <glade/glade.h>
-#include <cal-util/cal-component.h>
-#include <cal-client/cal-client.h>
-
-typedef struct _EMeetingEditor EMeetingEditor;
-
-struct _EMeetingEditor {
- gpointer priv;
-};
-
-
-EMeetingEditor * e_meeting_editor_new (CalComponent *comp, CalClient *client);
-
-void e_meeting_edit (EMeetingEditor *editor);
-void e_meeting_editor_free (EMeetingEditor *editor);
-
-
-#endif /* __E_MEETING_EDIT_H__ */
-
diff --git a/calendar/gui/e-tasks.c b/calendar/gui/e-tasks.c
deleted file mode 100644
index e69b2a4037..0000000000
--- a/calendar/gui/e-tasks.c
+++ /dev/null
@@ -1,597 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-tasks.c
- *
- * Copyright (C) 2001 Helix Code, Inc.
- * Copyright (C) 2001 Ximian, 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: Federico Mena Quintero <federico@ximian.com>
- * Damon Chaplin <damon@ximian.com>
- */
-
-#include <config.h>
-#include <gal/util/e-util.h>
-#include <gal/e-table/e-table-scrolled.h>
-#include <gal/menus/gal-view-collection.h>
-#include <gal/menus/gal-view-factory-etable.h>
-#include <gal/menus/gal-view-etable.h>
-#include "widgets/menus/gal-view-menus.h"
-#include "dialogs/task-editor.h"
-#include "calendar-config.h"
-#include "e-calendar-table.h"
-#include "calendar-config.h"
-#include "component-factory.h"
-
-#include "e-tasks.h"
-
-/* A list of all of the ETasks widgets in use. We use this to update the
- user preference settings. This will change when we switch to GConf. */
-static GList *all_tasks = NULL;
-
-
-/* Private part of the GnomeCalendar structure */
-struct _ETasksPrivate {
- /* The calendar client object we monitor */
- CalClient *client;
-
- /* The ECalendarTable showing the tasks. */
- GtkWidget *tasks_view;
-
- /* The option menu showing the categories, and the popup menu. */
- GtkWidget *categories_option_menu;
- GtkWidget *categories_menu;
-};
-
-
-static void e_tasks_class_init (ETasksClass *class);
-static void e_tasks_init (ETasks *tasks);
-static void setup_widgets (ETasks *tasks);
-static void e_tasks_destroy (GtkObject *object);
-
-static void cal_opened_cb (CalClient *client, CalClientOpenStatus status, gpointer data);
-static void obj_updated_cb (CalClient *client, const char *uid, gpointer data);
-static void obj_removed_cb (CalClient *client, const char *uid, gpointer data);
-
-static char* e_tasks_get_config_filename (ETasks *tasks);
-
-static void e_tasks_on_filter_selected (GtkMenuShell *menu_shell,
- ETasks *tasks);
-static void e_tasks_on_categories_changed (CalendarModel *model,
- ETasks *tasks);
-static void e_tasks_rebuild_categories_menu (ETasks *tasks);
-static gint e_tasks_add_menu_item (gpointer key,
- gpointer value,
- gpointer data);
-
-
-static GtkTableClass *parent_class;
-
-
-E_MAKE_TYPE (e_tasks, "ETasks", ETasks,
- e_tasks_class_init, e_tasks_init,
- GTK_TYPE_TABLE)
-
-
-/* Class initialization function for the gnome calendar */
-static void
-e_tasks_class_init (ETasksClass *class)
-{
- GtkObjectClass *object_class;
-
- object_class = (GtkObjectClass *) class;
-
- parent_class = gtk_type_class (GTK_TYPE_TABLE);
-
- object_class->destroy = e_tasks_destroy;
-}
-
-
-/* Object initialization function for the gnome calendar */
-static void
-e_tasks_init (ETasks *tasks)
-{
- ETasksPrivate *priv;
-
- priv = g_new0 (ETasksPrivate, 1);
- tasks->priv = priv;
-
- setup_widgets (tasks);
-}
-
-
-#define E_TASKS_TABLE_DEFAULT_STATE \
- "<?xml version=\"1.0\"?>" \
- "<ETableState>" \
- "<column source=\"13\"/>" \
- "<column source=\"14\"/>" \
- "<column source=\"9\"/>" \
- "<column source=\"5\"/>" \
- "<grouping/>" \
- "</ETableState>"
-
-
-static void
-setup_widgets (ETasks *tasks)
-{
- ETasksPrivate *priv;
- ETable *etable;
- GtkWidget *hbox, *menuitem, *categories_label;
- CalendarModel *model;
-
- priv = tasks->priv;
-
- hbox = gtk_hbox_new (FALSE, 0);
- gtk_widget_show (hbox);
- gtk_table_attach (GTK_TABLE (tasks), hbox, 0, 1, 0, 1,
- GTK_EXPAND | GTK_FILL, 0, 0, 0);
-
- priv->categories_option_menu = gtk_option_menu_new ();
- gtk_widget_show (priv->categories_option_menu);
- gtk_box_pack_end (GTK_BOX (hbox), priv->categories_option_menu,
- FALSE, FALSE, 0);
-
- priv->categories_menu = gtk_menu_new ();
-
- menuitem = gtk_menu_item_new_with_label (_("All"));
- gtk_widget_show (menuitem);
- gtk_menu_append (GTK_MENU (priv->categories_menu), menuitem);
-
- gtk_option_menu_set_menu (GTK_OPTION_MENU (priv->categories_option_menu), priv->categories_menu);
-
- categories_label = gtk_label_new (_("Category:"));
- gtk_widget_show (categories_label);
- gtk_box_pack_end (GTK_BOX (hbox), categories_label, FALSE, FALSE, 4);
-
-
- priv->tasks_view = e_calendar_table_new ();
- model = e_calendar_table_get_model (E_CALENDAR_TABLE (priv->tasks_view));
- calendar_model_set_new_comp_vtype (model, CAL_COMPONENT_TODO);
- etable = e_table_scrolled_get_table (E_TABLE_SCROLLED (E_CALENDAR_TABLE (priv->tasks_view)->etable));
- e_table_set_state (etable, E_TASKS_TABLE_DEFAULT_STATE);
- gtk_table_attach (GTK_TABLE (tasks), priv->tasks_view, 0, 1, 1, 2,
- GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
- gtk_widget_show (priv->tasks_view);
- calendar_config_configure_e_calendar_table (E_CALENDAR_TABLE (priv->tasks_view));
-
- gtk_signal_connect (GTK_OBJECT (E_CALENDAR_TABLE (priv->tasks_view)->model),
- "categories-changed",
- GTK_SIGNAL_FUNC (e_tasks_on_categories_changed), tasks);
-}
-
-
-GtkWidget *
-e_tasks_construct (ETasks *tasks)
-{
- ETasksPrivate *priv;
-
- g_return_val_if_fail (tasks != NULL, NULL);
- g_return_val_if_fail (E_IS_TASKS (tasks), NULL);
-
- priv = tasks->priv;
-
- priv->client = cal_client_new ();
- if (!priv->client)
- return NULL;
-
- gtk_signal_connect (GTK_OBJECT (priv->client), "cal_opened",
- GTK_SIGNAL_FUNC (cal_opened_cb), tasks);
- gtk_signal_connect (GTK_OBJECT (priv->client), "obj_updated",
- GTK_SIGNAL_FUNC (obj_updated_cb), tasks);
- gtk_signal_connect (GTK_OBJECT (priv->client), "obj_removed",
- GTK_SIGNAL_FUNC (obj_removed_cb), tasks);
-
-#if 0
- alarm_notify_add_client (priv->client);
-#endif
-
- e_calendar_table_set_cal_client (E_CALENDAR_TABLE (priv->tasks_view),
- priv->client);
-
- return GTK_WIDGET (tasks);
-}
-
-
-GtkWidget *
-e_tasks_new (void)
-{
- ETasks *tasks;
-
- tasks = gtk_type_new (e_tasks_get_type ());
-
- if (!e_tasks_construct (tasks)) {
- g_message ("e_tasks_new(): Could not construct the tasks GUI");
- gtk_object_unref (GTK_OBJECT (tasks));
- return NULL;
- }
-
- all_tasks = g_list_prepend (all_tasks, tasks);
-
- return GTK_WIDGET (tasks);
-}
-
-
-static void
-e_tasks_destroy (GtkObject *object)
-{
- ETasks *tasks;
- ETasksPrivate *priv;
- char *config_filename;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (E_IS_TASKS (object));
-
- tasks = E_TASKS (object);
- priv = tasks->priv;
-
- /* Save the ETable layout. */
- config_filename = e_tasks_get_config_filename (tasks);
- e_calendar_table_save_state (E_CALENDAR_TABLE (priv->tasks_view),
- config_filename);
- g_free (config_filename);
-
- if (priv->client) {
-#if 0
- alarm_notify_remove_client (priv->client);
-#endif
- gtk_object_unref (GTK_OBJECT (priv->client));
- priv->client = NULL;
- }
-
- g_free (priv);
- tasks->priv = NULL;
-
- all_tasks = g_list_remove (all_tasks, tasks);
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-
-gboolean
-e_tasks_open (ETasks *tasks,
- char *file)
-{
- ETasksPrivate *priv;
- char *config_filename;
-
- g_return_val_if_fail (tasks != NULL, FALSE);
- g_return_val_if_fail (E_IS_TASKS (tasks), FALSE);
- g_return_val_if_fail (file != NULL, FALSE);
-
- priv = tasks->priv;
-
- if (!cal_client_open_calendar (priv->client, file, FALSE)) {
- g_message ("e_tasks_open(): Could not issue the request");
- return FALSE;
- }
-
- config_filename = e_tasks_get_config_filename (tasks);
- e_calendar_table_load_state (E_CALENDAR_TABLE (priv->tasks_view),
- config_filename);
- g_free (config_filename);
-
- return TRUE;
-}
-
-
-/* Displays an error to indicate that loading a calendar failed */
-static void
-load_error (ETasks *tasks,
- const char *uri)
-{
- char *msg;
-
- msg = g_strdup_printf (_("Could not load the tasks in `%s'"), uri);
- gnome_error_dialog_parented (msg, GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (tasks))));
- g_free (msg);
-}
-
-/* Displays an error to indicate that the specified URI method is not supported */
-static void
-method_error (ETasks *tasks,
- const char *uri)
-{
- char *msg;
-
- msg = g_strdup_printf (_("The method required to load `%s' is not supported"), uri);
- gnome_error_dialog_parented (msg, GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (tasks))));
- g_free (msg);
-}
-
-/* Callback from the calendar client when a calendar is opened */
-static void
-cal_opened_cb (CalClient *client,
- CalClientOpenStatus status,
- gpointer data)
-{
- ETasks *tasks;
- ETasksPrivate *priv;
-
- tasks = E_TASKS (data);
- priv = tasks->priv;
-
- switch (status) {
- case CAL_CLIENT_OPEN_SUCCESS:
- /* Everything is OK */
- return;
-
- case CAL_CLIENT_OPEN_ERROR:
- load_error (tasks, cal_client_get_uri (client));
- break;
-
- case CAL_CLIENT_OPEN_NOT_FOUND:
- /* bullshit; we did not specify only_if_exists */
- g_assert_not_reached ();
- return;
-
- case CAL_CLIENT_OPEN_METHOD_NOT_SUPPORTED:
- method_error (tasks, cal_client_get_uri (client));
- break;
-
- default:
- g_assert_not_reached ();
- }
-}
-
-
-/* Callback from the calendar client when an object is updated */
-static void
-obj_updated_cb (CalClient *client,
- const char *uid,
- gpointer data)
-{
- ETasks *tasks;
- ETasksPrivate *priv;
-
- tasks = E_TASKS (data);
- priv = tasks->priv;
-
- /* FIXME: Do we need to do anything? */
-}
-
-
-/* Callback from the calendar client when an object is removed */
-static void
-obj_removed_cb (CalClient *client,
- const char *uid,
- gpointer data)
-{
- ETasks *tasks;
- ETasksPrivate *priv;
-
- tasks = E_TASKS (data);
- priv = tasks->priv;
-
- /* FIXME: Do we need to do anything? */
-}
-
-
-static char*
-e_tasks_get_config_filename (ETasks *tasks)
-{
- ETasksPrivate *priv;
- char *url, *filename;
-
- priv = tasks->priv;
-
- url = g_strdup (cal_client_get_uri (priv->client));
-
- /* This turns all funny characters into '_', in the string itself. */
- e_filename_make_safe (url);
-
- filename = g_strdup_printf ("%s/config/et-header-%s", evolution_dir,
- url);
- g_free (url);
-
- return filename;
-}
-
-
-/**
- * e_tasks_get_cal_client:
- * @tasks: An #ETasks.
- *
- * Queries the calendar client interface object that a tasks view is using.
- *
- * Return value: A calendar client interface object.
- **/
-CalClient *
-e_tasks_get_cal_client (ETasks *tasks)
-{
- ETasksPrivate *priv;
-
- g_return_val_if_fail (E_IS_TASKS (tasks), NULL);
-
- priv = tasks->priv;
-
- return priv->client;
-}
-
-
-void
-e_tasks_new_task (ETasks *tasks)
-{
- ETasksPrivate *priv;
- TaskEditor *tedit;
- CalComponent *comp;
-
- g_return_if_fail (E_IS_TASKS (tasks));
-
- priv = tasks->priv;
-
- tedit = task_editor_new ();
- task_editor_set_cal_client (tedit, priv->client);
-
- comp = cal_component_new ();
- cal_component_set_new_vtype (comp, CAL_COMPONENT_TODO);
-
- task_editor_set_todo_object (tedit, comp);
- gtk_object_unref (GTK_OBJECT (comp));
-
- task_editor_focus (tedit);
-}
-
-
-static void
-e_tasks_on_filter_selected (GtkMenuShell *menu_shell,
- ETasks *tasks)
-{
- ETasksPrivate *priv;
- ECalendarTable *cal_table;
- CalendarModel *model;
- GtkWidget *label;
- char *category;
-
- g_return_if_fail (E_IS_TASKS (tasks));
-
- priv = tasks->priv;
-
- label = GTK_BIN (priv->categories_option_menu)->child;
- gtk_label_get (GTK_LABEL (label), &category);
-
- cal_table = E_CALENDAR_TABLE (priv->tasks_view);
- model = cal_table->model;
-
- if (!strcmp (category, _("All"))) {
- calendar_model_set_default_category (model, NULL);
- e_calendar_table_set_filter_func (cal_table, NULL, NULL,
- NULL);
- } else {
- calendar_model_set_default_category (model, category);
- e_calendar_table_set_filter_func (cal_table,
- e_calendar_table_filter_by_category,
- g_strdup (category), g_free);
- }
-}
-
-
-static void
-e_tasks_on_categories_changed (CalendarModel *model,
- ETasks *tasks)
-{
- e_tasks_rebuild_categories_menu (tasks);
-}
-
-
-static void
-e_tasks_rebuild_categories_menu (ETasks *tasks)
-{
- ETasksPrivate *priv;
- CalendarModel *model;
- GTree *categories;
- GtkWidget *menuitem;
-
- priv = tasks->priv;
-
- priv->categories_menu = gtk_menu_new ();
-
- menuitem = gtk_menu_item_new_with_label (_("All"));
- gtk_widget_show (menuitem);
- gtk_menu_append (GTK_MENU (priv->categories_menu), menuitem);
-
- model = E_CALENDAR_TABLE (priv->tasks_view)->model;
- categories = calendar_model_get_categories (model);
- g_return_if_fail (categories != NULL);
-
- g_tree_traverse (categories, e_tasks_add_menu_item, G_IN_ORDER,
- priv->categories_menu);
-
- gtk_option_menu_set_menu (GTK_OPTION_MENU (priv->categories_option_menu), priv->categories_menu);
-
- gtk_signal_connect (GTK_OBJECT (priv->categories_menu), "deactivate",
- GTK_SIGNAL_FUNC (e_tasks_on_filter_selected),
- tasks);
-}
-
-
-static gint
-e_tasks_add_menu_item (gpointer key,
- gpointer value,
- gpointer data)
-{
- GtkWidget *menuitem;
-
- menuitem = gtk_menu_item_new_with_label ((char*) key);
- gtk_widget_show (menuitem);
- gtk_menu_append (GTK_MENU (data), menuitem);
-
- return FALSE;
-}
-
-static void
-display_view(GalViewCollection *collection,
- GalView *view,
- gpointer data)
-{
- ETasks *tasks = data;
- if (GAL_IS_VIEW_ETABLE(view)) {
- e_table_set_state_object (e_table_scrolled_get_table (E_TABLE_SCROLLED (E_CALENDAR_TABLE (tasks->priv->tasks_view)->etable)), GAL_VIEW_ETABLE (view)->state);
- }
-}
-
-void
-e_tasks_setup_menus (ETasks *tasks,
- BonoboUIComponent *uic)
-{
- GalViewCollection *collection;
- GalViewMenus *views;
- GalViewFactory *factory;
- ETableSpecification *spec;
- char *dir;
-
- collection = gal_view_collection_new();
-
- dir = gnome_util_prepend_user_home ("/evolution/views/tasks/");
- gal_view_collection_set_storage_directories (collection,
- EVOLUTION_DATADIR "/evolution/views/tasks/",
- dir);
- g_free (dir);
-
- spec = e_table_specification_new ();
- e_table_specification_load_from_string (spec, e_calendar_table_get_spec());
-
- factory = gal_view_factory_etable_new (spec);
- gal_view_collection_add_factory (collection, factory);
- gtk_object_sink (GTK_OBJECT (factory));
-
- gal_view_collection_load (collection);
-
- views = gal_view_menus_new (collection);
- gal_view_menus_apply (views, uic, NULL); /* This function probably needs to sink the views object. */
- gtk_signal_connect (GTK_OBJECT (collection), "display_view",
- display_view, tasks);
- /* gtk_object_sink(GTK_OBJECT(views)); */
-
- gtk_object_sink (GTK_OBJECT (collection));
-}
-
-
-/* This updates all the preference settings for all the ETasks widgets in use.
- */
-void
-e_tasks_update_all_config_settings (void)
-{
- ETasks *tasks;
- ETasksPrivate *priv;
- GList *elem;
-
- for (elem = all_tasks; elem; elem = elem->next) {
- tasks = E_TASKS (elem->data);
- priv = tasks->priv;
- calendar_config_configure_e_calendar_table (E_CALENDAR_TABLE (priv->tasks_view));
- }
-}
diff --git a/calendar/gui/e-tasks.h b/calendar/gui/e-tasks.h
deleted file mode 100644
index 21660c8c7e..0000000000
--- a/calendar/gui/e-tasks.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-tasks.h
- *
- * Copyright (C) 2001 Helix Code, Inc.
- * Copyright (C) 2001 Ximian, 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: Federico Mena Quintero <federico@ximian.com>
- * Damon Chaplin <damon@ximian.com>
- */
-
-#ifndef _E_TASKS_H_
-#define _E_TASKS_H_
-
-#include <gtk/gtktable.h>
-#include <cal-client/cal-client.h>
-
-#define E_TYPE_TASKS (e_tasks_get_type ())
-#define E_TASKS(obj) (GTK_CHECK_CAST ((obj), E_TYPE_TASKS, ETasks))
-#define E_TASKS_CLASS(klass) (GTK_CHECK_CAST_CLASS ((klass), E_TYPE_TASKS, \
- ETasksClass))
-#define E_IS_TASKS(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_TASKS))
-#define E_IS_TASKS_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), E_TYPE_TASKS))
-
-typedef struct _ETasks ETasks;
-typedef struct _ETasksClass ETasksClass;
-typedef struct _ETasksPrivate ETasksPrivate;
-
-struct _ETasks {
- GtkTable table;
-
- /* Private data */
- ETasksPrivate *priv;
-};
-
-struct _ETasksClass {
- GtkTableClass parent_class;
-};
-
-
-GtkType e_tasks_get_type (void);
-GtkWidget *e_tasks_construct (ETasks *tasks);
-
-GtkWidget *e_tasks_new (void);
-
-gboolean e_tasks_open (ETasks *tasks,
- char *file);
-
-CalClient *e_tasks_get_cal_client (ETasks *tasks);
-
-void e_tasks_new_task (ETasks *tasks);
-
-void e_tasks_setup_menus (ETasks *tasks,
- BonoboUIComponent *uic);
-
-
-/* This updates all the preference settings for all the ETasks widgets in use.
- */
-void e_tasks_update_all_config_settings (void);
-
-#endif /* _E_TASKS_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 da17673518..0000000000
--- a/calendar/gui/e-week-view-event-item.c
+++ /dev/null
@@ -1,816 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <damon@ximian.com>
- *
- * Copyright 1999, Helix Code, Inc.
- * Copyright 2001, Ximian, 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 <config.h>
-
-#include "e-week-view-event-item.h"
-
-#include <gtk/gtksignal.h>
-#include <gal/e-text/e-text.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_draw_time (EWeekView *week_view,
- GdkDrawable *drawable,
- gint time_x,
- gint time_y,
- gint hour,
- gint minute);
-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;
- gint x1, y1, x2, y2, time_x, time_y;
- gint icon_x, icon_y, time_width, min_end_time_x, max_icon_x;
- gint rect_x, rect_w, rect_x2;
- gboolean one_day_event, editing_span = FALSE;
- gint start_hour, start_minute, end_hour, end_minute;
- gboolean draw_start, draw_end;
- 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;
- 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_x = 0;
- icon_y = y1 + E_WEEK_VIEW_EVENT_BORDER_HEIGHT + E_WEEK_VIEW_ICON_Y_PAD;
-
- /* Get the start & end times in 24-hour format. */
- start_hour = event->start_minute / 60;
- start_minute = event->start_minute % 60;
- end_hour = event->end_minute / 60;
- end_minute = event->end_minute % 60;
-
- time_y = y1 + E_WEEK_VIEW_EVENT_BORDER_HEIGHT
- + E_WEEK_VIEW_EVENT_TEXT_Y_PAD;
-
- time_width = e_week_view_get_time_string_width (week_view);
-
- 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;
-
- /* Draw the start and end times, as required. */
- switch (week_view->time_format) {
- case E_WEEK_VIEW_TIME_BOTH_SMALL_MIN:
- case E_WEEK_VIEW_TIME_BOTH:
- draw_start = TRUE;
- draw_end = TRUE;
- break;
-
- case E_WEEK_VIEW_TIME_START_SMALL_MIN:
- case E_WEEK_VIEW_TIME_START:
- draw_start = TRUE;
- draw_end = FALSE;
- break;
-
- case E_WEEK_VIEW_TIME_NONE:
- draw_start = FALSE;
- draw_end = FALSE;
- break;
- default:
- g_assert_not_reached();
- draw_start = FALSE;
- draw_end = FALSE;
- break;
- }
-
- if (draw_start) {
- e_week_view_draw_time (week_view, drawable,
- time_x, time_y,
- start_hour, start_minute);
- time_x += time_width;
- }
-
- if (draw_end) {
- time_x += E_WEEK_VIEW_EVENT_TIME_SPACING;
- e_week_view_draw_time (week_view, drawable,
- time_x, time_y,
- end_hour, end_minute);
- time_x += time_width;
- }
-
- icon_x = time_x;
- if (draw_start)
- icon_x += E_WEEK_VIEW_EVENT_TIME_X_PAD;
-
- /* 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.
- They also use the first few pixels at the edge of the
- event so we update rect_x & rect_w so we don't draw over
- them. */
- 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 they are not on day
- boundaries. The start time would always be shown if it was
- needed, though it may be clipped as the window shrinks.
- The end time is only displayed if there is enough room.
- We calculate the minimum position for the end time, which
- depends on whether the start time is displayed. If the end
- time doesn't fit, then we don't draw it. */
- min_end_time_x = x1 + E_WEEK_VIEW_EVENT_L_PAD
- + E_WEEK_VIEW_EVENT_BORDER_WIDTH
- + E_WEEK_VIEW_EVENT_EDGE_X_PAD;
- if (!editing_span
- && event->start > week_view->day_starts[span->start_day]) {
- time_x = x1 + E_WEEK_VIEW_EVENT_L_PAD
- + E_WEEK_VIEW_EVENT_BORDER_WIDTH
- + E_WEEK_VIEW_EVENT_EDGE_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 (gc, &clip_rect);
-
- gdk_gc_set_foreground (gc, &week_view->colors[E_WEEK_VIEW_COLOR_EVENT_TEXT]);
-
- e_week_view_draw_time (week_view, drawable,
- time_x, time_y,
- start_hour, start_minute);
-
- gdk_gc_set_clip_rectangle (gc, NULL);
-
- /* We don't want the end time to be drawn over the
- start time, so we increase the minimum position. */
- min_end_time_x += time_width
- + E_WEEK_VIEW_EVENT_TIME_X_PAD;
- }
-
- max_icon_x = x2 + 1 - E_WEEK_VIEW_EVENT_R_PAD
- - E_WEEK_VIEW_EVENT_BORDER_WIDTH
- - E_WEEK_VIEW_EVENT_EDGE_X_PAD;
-
- if (!editing_span
- && event->end < week_view->day_starts[span->start_day
- + span->num_days]) {
- /* Calculate where the end time should be displayed. */
- time_x = x2 + 1 - E_WEEK_VIEW_EVENT_R_PAD
- - E_WEEK_VIEW_EVENT_BORDER_WIDTH
- - E_WEEK_VIEW_EVENT_EDGE_X_PAD
- - time_width;
-
- /* Draw the end time, if the position is greater than
- the minimum calculated above. */
- if (time_x >= min_end_time_x) {
- e_week_view_draw_time (week_view, drawable,
- time_x, time_y,
- end_hour, end_minute);
- max_icon_x -= time_width
- + E_WEEK_VIEW_EVENT_TIME_X_PAD;
- }
- }
-
- /* Draw the icons. */
- if (span->text_item &&
- week_view->editing_event_num != wveitem->event_num
- && week_view->editing_span_num != wveitem->span_num) {
- icon_x = span->text_item->x1 - x;
- e_week_view_event_item_draw_icons (wveitem, drawable,
- icon_x, icon_y,
- max_icon_x, TRUE);
- }
- }
-}
-
-
-static void
-e_week_view_draw_time (EWeekView *week_view,
- GdkDrawable *drawable,
- gint time_x,
- gint time_y,
- gint hour,
- gint minute)
-{
- GtkStyle *style;
- GdkGC *gc;
- GdkFont *font, *small_font;
- gint hour_to_display, suffix_width;
- gint time_y_normal_font, time_y_small_font;
- gchar buffer[128], *suffix;
-
- style = GTK_WIDGET (week_view)->style;
- font = style->font;
- small_font = week_view->small_font;
- gc = week_view->main_gc;
-
-
- time_y_normal_font = time_y_small_font = time_y + font->ascent;
- if (small_font)
- time_y_small_font = time_y + small_font->ascent;
-
- e_week_view_convert_time_to_display (week_view, hour, &hour_to_display,
- &suffix, &suffix_width);
-
- if (week_view->use_small_font && week_view->small_font) {
- g_snprintf (buffer, sizeof (buffer), "%2i:%02i",
- hour_to_display, minute);
-
- /* Draw the hour. */
- if (hour_to_display < 10)
- gdk_draw_text (drawable, font, gc,
- time_x + week_view->digit_width,
- time_y_normal_font, buffer + 1, 1);
- else
- gdk_draw_text (drawable, font, gc,
- time_x, time_y_normal_font, buffer, 2);
-
- time_x += week_view->digit_width * 2;
-
- /* Draw the start minute, in the small font. */
- gdk_draw_text (drawable, week_view->small_font, gc,
- time_x, time_y_small_font, buffer + 3, 2);
-
- time_x += week_view->small_digit_width * 2;
-
- /* Draw the 'am'/'pm' suffix, if 12-hour format. */
- if (!week_view->use_24_hour_format) {
- gdk_draw_string (drawable, font, gc,
- time_x, time_y_normal_font, suffix);
- }
- } else {
- /* Draw the start time in one go. */
- g_snprintf (buffer, sizeof (buffer), "%2i:%02i%s",
- hour_to_display, minute, suffix);
- if (hour_to_display < 10)
- gdk_draw_string (drawable, font, gc,
- time_x + week_view->digit_width,
- time_y_normal_font, buffer + 1);
- else
- gdk_draw_string (drawable, font, gc,
- time_x, time_y_normal_font,
- buffer);
-
- }
-}
-
-
-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;
- CalComponent *comp;
- 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);
- comp = event->comp;
-
- gc = week_view->main_gc;
-
- if (cal_component_has_alarms (comp)) {
- draw_reminder_icon = TRUE;
- num_icons++;
- }
-
- if (cal_component_has_recurrences (comp)) {
- 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;
-
- if (bevent->button.button == 1) {
- /* Ignore clicks on the event while editing. */
- if (E_TEXT (span->text_item)->editing)
- return FALSE;
-
- /* 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) {
- if (!GTK_WIDGET_HAS_FOCUS (week_view))
- gtk_widget_grab_focus (GTK_WIDGET (week_view));
- 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_EDGE_X_PAD)
- return E_WEEK_VIEW_POS_LEFT_EDGE;
-
- if (x >= item->x2 + 1 - E_WEEK_VIEW_EVENT_R_PAD
- - E_WEEK_VIEW_EVENT_BORDER_WIDTH
- - E_WEEK_VIEW_EVENT_EDGE_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 ff2b9b2c9f..0000000000
--- a/calendar/gui/e-week-view-event-item.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <damon@ximian.com>
- *
- * Copyright 1999, Helix Code, Inc.
- * Copyright 2001, Ximian, 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 34508e63a3..0000000000
--- a/calendar/gui/e-week-view-main-item.c
+++ /dev/null
@@ -1,389 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <damon@helixcode.com>
- *
- * 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 <config.h>
-
-#include <glib.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#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->multi_week_view ? week_view->weeks_shown * 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 *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;
- gc = week_view->main_gc;
-
- g_return_if_fail (gc != NULL);
-
- 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->multi_week_view && (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_gc_set_foreground (gc, &week_view->colors[E_WEEK_VIEW_COLOR_GRID]);
- gdk_draw_line (drawable, gc,
- right_edge, y, right_edge, bottom_edge);
- gdk_draw_line (drawable, 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) {
- gdk_gc_set_foreground (gc, &week_view->colors[E_WEEK_VIEW_COLOR_SELECTED]);
- if (week_view->multi_week_view) {
- gdk_draw_rectangle (drawable, gc, TRUE,
- x + 2, y + 1,
- width - 5,
- E_WEEK_VIEW_DATE_T_PAD - 1
- + font->ascent + font->descent);
- } else {
- gdk_draw_rectangle (drawable, 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->multi_week_view) {
- 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_day_width + week_view->digit_width * 2
- + week_view->space_width * 2
- + week_view->month_widths[month - 1] < max_width)
- /* strftime format %A = full weekday name, %d = day of
- month, %B = full month name. You can change the
- order but don't change the specifiers or add
- anything. */
- format_string = _("%A %d %B");
- else if (week_view->max_abbr_day_width
- + week_view->digit_width * 2
- + week_view->space_width * 2
- + week_view->abbr_month_widths[month - 1] < max_width)
- /* strftime format %a = abbreviated weekday name,
- %d = day of month, %b = abbreviated month name.
- You can change the order but don't change the
- specifiers or add anything. */
- 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)
- /* strftime format %d = day of month, %B = full
- month name. You can change the order but don't
- change the specifiers or add anything. */
- format_string = _("%d %B");
- else if (week_view->digit_width * 2 + week_view->space_width
- + week_view->abbr_month_widths[month - 1] < max_width)
- /* strftime format %d = day of month, %b = abbreviated
- month name. You can change the order but don't
- change the specifiers or add anything. */
- format_string = _("%d %b");
- }
-
- g_date_strftime (buffer, sizeof (buffer),
- 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)
- gdk_gc_set_foreground (gc, &week_view->colors[E_WEEK_VIEW_COLOR_DATES_SELECTED]);
- else
- gdk_gc_set_foreground (gc, &week_view->colors[E_WEEK_VIEW_COLOR_DATES]);
- gdk_draw_string (drawable, font, gc,
- date_x, y + E_WEEK_VIEW_DATE_T_PAD + font->ascent,
- buffer);
-
- /* Draw the line under the date. */
- if (!week_view->multi_week_view) {
- gdk_gc_set_foreground (gc, &week_view->colors[E_WEEK_VIEW_COLOR_GRID]);
- gdk_draw_line (drawable, 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 71ebe423dc..0000000000
--- a/calendar/gui/e-week-view-main-item.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <damon@ximian.com>
- *
- * Copyright 1999, Helix Code, Inc.
- * Copyright 2001, Ximian, 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 5a2b9c164a..0000000000
--- a/calendar/gui/e-week-view-titles-item.c
+++ /dev/null
@@ -1,311 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <damon@helixcode.com>
- *
- * 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 <config.h>
-#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;
- gint weekday;
-
-#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);
- /* Note that 20th March 2000 is a Monday. We only care about the
- weekday. */
- weekday = week_view->display_start_day;
- g_date_set_dmy (&date, 20 + weekday, 3, 2000);
- for (col = 0; col < week_view->columns; col++) {
- if (weekday == 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 (weekday == 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[weekday];
- else
- date_width = week_view->abbr_day_widths[weekday];
-
- 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);
- }
-
- if (weekday == 5 && week_view->compress_weekend)
- weekday += 2;
- else
- weekday++;
-
- weekday = weekday % 7;
-
- 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 fc4d45107d..0000000000
--- a/calendar/gui/e-week-view-titles-item.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <damon@ximian.com>
- *
- * Copyright 1999, Helix Code, Inc.
- * Copyright 2001, Ximian, 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 c06b568d9d..0000000000
--- a/calendar/gui/e-week-view.c
+++ /dev/null
@@ -1,3626 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <damon@ximian.com>
- *
- * Copyright 1999, Helix Code, Inc.
- * Copyright 2001, Ximian, 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 <config.h>
-
-#include "e-week-view.h"
-
-#include <math.h>
-#include <gdk/gdkkeysyms.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtkvscrollbar.h>
-#include <gtk/gtkwindow.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <gdk-pixbuf/gdk-pixbuf.h>
-#include <gdk-pixbuf/gnome-canvas-pixbuf.h>
-#include <gal/e-text/e-text.h>
-#include <gal/widgets/e-popup-menu.h>
-#include <gal/widgets/e-canvas-utils.h>
-#include "dialogs/delete-comp.h"
-#include "comp-util.h"
-#include "cal-util/timeutil.h"
-#include "calendar-commands.h"
-#include "goto.h"
-#include "e-meeting-edit.h"
-#include "e-week-view-event-item.h"
-#include "e-week-view-main-item.h"
-#include "e-week-view-titles-item.h"
-
-/* Images */
-#include "art/bell.xpm"
-#include "art/recur.xpm"
-#include "art/jump.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
-
-#define E_WEEK_VIEW_JUMP_BUTTON_WIDTH 16
-#define E_WEEK_VIEW_JUMP_BUTTON_HEIGHT 8
-
-#define E_WEEK_VIEW_JUMP_BUTTON_X_PAD 3
-#define E_WEEK_VIEW_JUMP_BUTTON_Y_PAD 3
-
-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_free_events (EWeekView *week_view);
-static gboolean e_week_view_add_event (CalComponent *comp,
- 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 gboolean e_week_view_on_jump_button_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_new_event (GtkWidget *widget,
- gpointer data);
-static void e_week_view_on_goto_today (GtkWidget *widget,
- gpointer data);
-static void e_week_view_on_goto_date (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_schedule_meet (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 gboolean e_week_view_recalc_display_start_day (EWeekView *week_view);
-
-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)
-{
- GnomeCanvasGroup *canvas_group;
- GtkObject *adjustment;
- GdkPixbuf *pixbuf;
- gint i;
-
- GTK_WIDGET_SET_FLAGS (week_view, GTK_CAN_FOCUS);
-
- week_view->calendar = NULL;
- week_view->client = NULL;
- week_view->sexp = g_strdup ("#t"); /* match all by default */
- week_view->query = 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->multi_week_view = FALSE;
- week_view->weeks_shown = 6;
- week_view->rows = 6;
- week_view->columns = 2;
- week_view->compress_weekend = TRUE;
- week_view->show_event_end_times = TRUE;
- week_view->week_start_day = 0; /* Monday. */
- week_view->display_start_day = 0; /* Monday. */
-
- 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->main_gc = NULL;
-
- /* 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");
-
- /* String to use in 12-hour time format for times in the morning. */
- week_view->am_string = _("am");
-
- /* String to use in 12-hour time format for times in the afternoon. */
- week_view->pm_string = _("pm");
-
-
- /*
- * 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);
-
- /* Create the buttons to jump to each days. */
- pixbuf = gdk_pixbuf_new_from_xpm_data ((const char**) jump_xpm);
-
- for (i = 0; i < E_WEEK_VIEW_MAX_WEEKS * 7; i++) {
- week_view->jump_buttons[i] = gnome_canvas_item_new
- (canvas_group,
- gnome_canvas_pixbuf_get_type (),
- "GnomeCanvasPixbuf::pixbuf", pixbuf,
- NULL);
-
- gtk_signal_connect (GTK_OBJECT (week_view->jump_buttons[i]),
- "event",
- GTK_SIGNAL_FUNC (e_week_view_on_jump_button_event),
- week_view);
- }
- gdk_pixbuf_unref (pixbuf);
-
- /*
- * 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 cursors. */
- week_view->normal_cursor = gdk_cursor_new (GDK_LEFT_PTR);
- 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);
-
- e_week_view_free_events (week_view);
-
- if (week_view->client) {
- gtk_signal_disconnect_by_data (GTK_OBJECT (week_view->client), week_view);
- gtk_object_unref (GTK_OBJECT (week_view->client));
- week_view->client = NULL;
- }
-
- if (week_view->sexp) {
- g_free (week_view->sexp);
- week_view->sexp = NULL;
- }
-
- if (week_view->query) {
- gtk_signal_disconnect_by_data (GTK_OBJECT (week_view->query), week_view);
- gtk_object_unref (GTK_OBJECT (week_view->query));
- week_view->query = NULL;
- }
-
- 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;
- GdkColormap *colormap;
- gboolean success[E_WEEK_VIEW_COLOR_LAST];
- gint nfailed;
-
- 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);
-
- colormap = gtk_widget_get_colormap (widget);
-
- /* 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;
-
- week_view->colors[E_WEEK_VIEW_COLOR_EVENT_TEXT].red = 0;
- week_view->colors[E_WEEK_VIEW_COLOR_EVENT_TEXT].green = 0;
- week_view->colors[E_WEEK_VIEW_COLOR_EVENT_TEXT].blue = 0;
-
- week_view->colors[E_WEEK_VIEW_COLOR_GRID].red = 0 * 257;
- week_view->colors[E_WEEK_VIEW_COLOR_GRID].green = 0 * 257;
- week_view->colors[E_WEEK_VIEW_COLOR_GRID].blue = 0 * 257;
-
- week_view->colors[E_WEEK_VIEW_COLOR_SELECTED].red = 0 * 257;
- week_view->colors[E_WEEK_VIEW_COLOR_SELECTED].green = 0 * 257;
- week_view->colors[E_WEEK_VIEW_COLOR_SELECTED].blue = 156 * 257;
-
- week_view->colors[E_WEEK_VIEW_COLOR_DATES].red = 0 * 257;
- week_view->colors[E_WEEK_VIEW_COLOR_DATES].green = 0 * 257;
- week_view->colors[E_WEEK_VIEW_COLOR_DATES].blue = 0 * 257;
-
- week_view->colors[E_WEEK_VIEW_COLOR_DATES_SELECTED].red = 65535;
- week_view->colors[E_WEEK_VIEW_COLOR_DATES_SELECTED].green = 65535;
- week_view->colors[E_WEEK_VIEW_COLOR_DATES_SELECTED].blue = 65535;
-
- 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");
-
-
- /* 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);
-}
-
-
-static void
-e_week_view_unrealize (GtkWidget *widget)
-{
- EWeekView *week_view;
- GdkColormap *colormap;
- gint i;
-
- week_view = E_WEEK_VIEW (widget);
-
- gdk_gc_unref (week_view->main_gc);
- week_view->main_gc = NULL;
-
- colormap = gtk_widget_get_colormap (widget);
- for (i = 0; i < E_WEEK_VIEW_COLOR_LAST; i++)
- gdk_colors_free (colormap, &week_view->colors[i].pixel, 1, 0);
-
- gdk_pixmap_unref (week_view->reminder_icon);
- week_view->reminder_icon = NULL;
- gdk_pixmap_unref (week_view->recurrence_icon);
- week_view->recurrence_icon = 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;
- EWeekViewEventSpan *span;
- GdkFont *font;
- gint day, day_width, max_day_width, max_abbr_day_width;
- gint month, month_width, max_month_width, max_abbr_month_width;
- gint span_num;
- 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;
-
- week_view->am_string_width = gdk_string_width (font,
- week_view->am_string);
- week_view->pm_string_width = gdk_string_width (font,
- week_view->pm_string);
-
- /* Set the font of all the EText 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->text_item)
- gnome_canvas_item_set (span->text_item,
- "font_gdk", font,
- NULL);
- }
- }
-}
-
-
-/* This recalculates the sizes of each column. */
-static void
-e_week_view_size_allocate (GtkWidget *widget, GtkAllocation *allocation)
-{
- EWeekView *week_view;
- gdouble old_x2, old_y2, new_x2, new_y2;
-
- week_view = E_WEEK_VIEW (widget);
-
- (*GTK_WIDGET_CLASS (parent_class)->size_allocate) (widget, allocation);
-
- e_week_view_recalc_cell_sizes (week_view);
-
- /* 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 canvas_width, canvas_height, offset;
- gint row, col;
- GtkWidget *widget;
- GdkFont *font;
- gint width, height, time_width;
-
- if (week_view->multi_week_view) {
- week_view->rows = week_view->weeks_shown * 2;
- week_view->columns = week_view->compress_weekend ? 6 : 7;
- } 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. */
- canvas_width = week_view->main_canvas->allocation.width + 1;
- canvas_width /= week_view->columns;
- offset = 0;
- for (col = 0; col <= week_view->columns; col++) {
- week_view->col_offsets[col] = floor (offset + 0.5);
- offset += canvas_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. */
- canvas_height = week_view->main_canvas->allocation.height + 1;
- canvas_height /= week_view->rows;
- offset = 0;
- for (row = 0; row <= week_view->rows; row++) {
- week_view->row_offsets[row] = floor (offset + 0.5);
- offset += canvas_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];
- }
-
-
- /* If the font hasn't been set yet just return. */
- widget = GTK_WIDGET (week_view);
- if (!widget->style || ! widget->style->font)
- return;
-
- font = widget->style->font;
-
- /* Calculate the number of rows of events in each cell, for the large
- cells and the compressed weekend cells. */
- if (week_view->multi_week_view) {
- 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];
-
- time_width = e_week_view_get_time_string_width (week_view);
-
- week_view->time_format = E_WEEK_VIEW_TIME_NONE;
- if (week_view->use_small_font && week_view->small_font) {
- if (week_view->show_event_end_times
- && width / 2 > time_width * 2 + E_WEEK_VIEW_EVENT_TIME_SPACING)
- 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 {
- if (week_view->show_event_end_times
- && width / 2 > time_width * 2 + E_WEEK_VIEW_EVENT_TIME_SPACING)
- week_view->time_format = E_WEEK_VIEW_TIME_BOTH;
- else if (width / 2 > time_width)
- week_view->time_format = E_WEEK_VIEW_TIME_START;
- }
-}
-
-
-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;
-}
-
-
-/* Callback used when a component is updated in the live query */
-static void
-query_obj_updated_cb (CalQuery *query, const char *uid,
- gboolean query_in_progress, int n_scanned, int total,
- gpointer data)
-{
- EWeekView *week_view;
- EWeekViewEvent *event;
- gint event_num, num_days;
- CalComponent *comp;
- CalClientGetStatus status;
-
- week_view = E_WEEK_VIEW (data);
-
- /* If we don't have a valid date set yet, just return. */
- if (!g_date_valid (&week_view->first_day_shown))
- return;
-
- /* Get the event from the server. */
- status = cal_client_get_object (week_view->client, uid, &comp);
-
- switch (status) {
- case CAL_CLIENT_GET_SUCCESS:
- /* Everything is fine */
- break;
-
- case CAL_CLIENT_GET_SYNTAX_ERROR:
- g_message ("obj_updated_cb(): Syntax error when getting object `%s'", uid);
- return;
-
- case CAL_CLIENT_GET_NOT_FOUND:
- /* The object is no longer in the server, so do nothing */
- 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 (!cal_component_has_recurrences (comp)
- && !cal_component_has_recurrences (event->comp)
- && cal_component_event_dates_match (comp, event->comp)) {
-#if 0
- g_print ("updated object's dates unchanged\n");
-#endif
- e_week_view_foreach_event_with_uid (week_view, uid, e_week_view_update_event_cb, comp);
- gtk_object_unref (GTK_OBJECT (comp));
- 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. */
-#if 0
- g_print ("dates changed - removing occurrences\n");
-#endif
- 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->multi_week_view ? week_view->weeks_shown * 7 : 7;
-
- cal_recur_generate_instances (comp,
- week_view->day_starts[0],
- week_view->day_starts[num_days],
- e_week_view_add_event,
- week_view);
-
- gtk_object_unref (GTK_OBJECT (comp));
-
- e_week_view_check_layout (week_view);
-
- gtk_widget_queue_draw (week_view->main_canvas);
-}
-
-/* Callback used when a component is removed from the live query */
-static void
-query_obj_removed_cb (CalClient *client, const char *uid, gpointer data)
-{
- EWeekView *week_view;
-
- week_view = E_WEEK_VIEW (data);
-
- 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);
-}
-
-/* Callback used when a query ends */
-static void
-query_query_done_cb (CalQuery *query, CalQueryDoneStatus status, const char *error_str, gpointer data)
-{
- EWeekView *week_view;
-
- week_view = E_WEEK_VIEW (data);
-
- /* FIXME */
-
- if (status != CAL_QUERY_DONE_SUCCESS)
- fprintf (stderr, "query done: %s\n", error_str);
-}
-
-/* Callback used when an evaluation error occurs when running a query */
-static void
-query_eval_error_cb (CalQuery *query, const char *error_str, gpointer data)
-{
- EWeekView *week_view;
-
- week_view = E_WEEK_VIEW (data);
-
- /* FIXME */
-
- fprintf (stderr, "eval error: %s\n", error_str);
-}
-
-/* Builds a complete query sexp for the week view by adding the predicates to
- * filter only for VEVENTS that fit in the week view's time range.
- */
-static char *
-adjust_query_sexp (EWeekView *week_view, const char *sexp)
-{
- int num_days;
- char *start, *end;
- char *new_sexp;
-
- /* If the dates have not been set yet, we just want an empty query. */
- if (!g_date_valid (&week_view->first_day_shown))
- return g_strdup ("#f");
-
- num_days = week_view->multi_week_view ? week_view->weeks_shown * 7 : 7;
-
- start = isodate_from_time_t (week_view->day_starts[0]);
- end = isodate_from_time_t (week_view->day_starts[num_days]);
-
- new_sexp = g_strdup_printf ("(and (= (get-vtype) \"VEVENT\")"
- " (occur-in-time-range? (make-time \"%s\")"
- " (make-time \"%s\"))"
- " %s)",
- start, end,
- sexp);
-
- g_free (start);
- g_free (end);
-
- return new_sexp;
-}
-
-/* Restarts a query for the week view */
-static void
-update_query (EWeekView *week_view)
-{
- char *real_sexp;
-
- e_week_view_free_events (week_view);
- gtk_widget_queue_draw (week_view->main_canvas);
-
- if (!(week_view->client
- && cal_client_get_load_state (week_view->client) == CAL_CLIENT_LOAD_LOADED))
- return;
-
- if (week_view->query) {
- gtk_signal_disconnect_by_data (GTK_OBJECT (week_view->query), week_view);
- gtk_object_unref (GTK_OBJECT (week_view->query));
- }
-
- g_assert (week_view->sexp != NULL);
- real_sexp = adjust_query_sexp (week_view, week_view->sexp);
-
- week_view->query = cal_client_get_query (week_view->client, real_sexp);
- g_free (real_sexp);
-
- if (!week_view->query) {
- g_message ("update_query(): Could not create the query");
- return;
- }
-
- gtk_signal_connect (GTK_OBJECT (week_view->query), "obj_updated",
- GTK_SIGNAL_FUNC (query_obj_updated_cb), week_view);
- gtk_signal_connect (GTK_OBJECT (week_view->query), "obj_removed",
- GTK_SIGNAL_FUNC (query_obj_removed_cb), week_view);
- gtk_signal_connect (GTK_OBJECT (week_view->query), "query_done",
- GTK_SIGNAL_FUNC (query_query_done_cb), week_view);
- gtk_signal_connect (GTK_OBJECT (week_view->query), "eval_error",
- GTK_SIGNAL_FUNC (query_eval_error_cb), week_view);
-}
-
-/* Callback used when the calendar client finishes opening */
-static void
-cal_opened_cb (CalClient *client, CalClientOpenStatus status, gpointer data)
-{
- EWeekView *week_view;
-
- week_view = E_WEEK_VIEW (data);
-
- if (status != CAL_CLIENT_OPEN_SUCCESS)
- return;
-
- update_query (week_view);
-}
-
-/**
- * e_week_view_set_cal_client:
- * @week_view: A week view.
- * @client: A calendar client interface object.
- *
- * Sets the calendar client interface object that a week view will monitor.
- **/
-void
-e_week_view_set_cal_client (EWeekView *week_view,
- CalClient *client)
-{
- g_return_if_fail (week_view != NULL);
- g_return_if_fail (E_IS_WEEK_VIEW (week_view));
-
- if (client == week_view->client)
- return;
-
- if (client)
- g_return_if_fail (IS_CAL_CLIENT (client));
-
- if (client)
- gtk_object_ref (GTK_OBJECT (client));
-
- if (week_view->client) {
- gtk_signal_disconnect_by_data (GTK_OBJECT (week_view->client), week_view);
- gtk_object_unref (GTK_OBJECT (week_view->client));
- }
-
- week_view->client = client;
-
- if (week_view->client) {
- if (cal_client_get_load_state (week_view->client) == CAL_CLIENT_LOAD_LOADED)
- update_query (week_view);
- else
- gtk_signal_connect (GTK_OBJECT (week_view->client), "cal_opened",
- GTK_SIGNAL_FUNC (cal_opened_cb), week_view);
- }
-}
-
-/**
- * e_week_view_set_query:
- * @week_view: A week view.
- * @sexp: S-expression that defines the query.
- *
- * Sets the query sexp that the week view will use for filtering the displayed
- * events.
- **/
-void
-e_week_view_set_query (EWeekView *week_view, const char *sexp)
-{
- g_return_if_fail (week_view != NULL);
- g_return_if_fail (E_IS_WEEK_VIEW (week_view));
- g_return_if_fail (sexp != NULL);
-
- if (week_view->sexp)
- g_free (week_view->sexp);
-
- week_view->sexp = g_strdup (sexp);
-
- update_query (week_view);
-}
-
-
-/* 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, weekday, week_start_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->multi_week_view) {
- /* Find the number of days since the start of the month. */
- day_offset = g_date_day (&date) - 1;
-
- /* Find the 1st week which starts at or before the start of
- the month. */
- base_date = date;
- g_date_set_day (&base_date, 1);
-
- /* Calculate the weekday of the 1st of the month, 0 = Mon. */
- weekday = g_date_weekday (&base_date) - 1;
-
- /* Convert it to an offset from the start of the display. */
- week_start_offset = (weekday + 7 - week_view->display_start_day) % 7;
-
- /* Add it to the day offset so we go back to the 1st week at
- or before the start of the month. */
- day_offset += week_start_offset;
- } else {
- /* Calculate the weekday of the given date, 0 = Mon. */
- weekday = g_date_weekday (&date) - 1;
-
- /* Convert it to an offset from the start of the display. */
- week_start_offset = (weekday + 7 - week_view->display_start_day) % 7;
-
- /* Set the day_offset to the result, so we move back to the
- start of the week. */
- day_offset = week_start_offset;
- }
-
- /* 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);
- update_query (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->multi_week_view ? week_view->weeks_shown * 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;
- }
-
- if (start_time)
- *start_time = week_view->day_starts[start_day];
-
- if (end_time)
- *end_time = week_view->day_starts[end_day + 1];
-}
-
-
-/* Note that the returned date may be invalid if no date has been set yet. */
-void
-e_week_view_get_first_day_shown (EWeekView *week_view,
- GDate *date)
-{
- *date = week_view->first_day_shown;
-}
-
-
-/* This sets the first day shown in the view. It will be rounded down to the
- nearest week. */
-void
-e_week_view_set_first_day_shown (EWeekView *week_view,
- GDate *date)
-{
- GDate base_date;
- gint weekday, day_offset, num_days;
- gboolean update_adjustment_value = FALSE;
- guint32 old_selection_start_julian = 0, old_selection_end_julian = 0;
- struct tm start_tm;
- time_t start_time;
-
- g_return_if_fail (E_IS_WEEK_VIEW (week_view));
-
- /* Calculate the old selection range. */
- if (week_view->selection_start_day != -1) {
- old_selection_start_julian =
- g_date_julian (&week_view->base_date)
- + week_view->selection_start_day;
- old_selection_end_julian =
- g_date_julian (&week_view->base_date)
- + week_view->selection_end_day;
- }
-
- /* Calculate the weekday of the given date, 0 = Mon. */
- weekday = g_date_weekday (date) - 1;
-
- /* Convert it to an offset from the start of the display. */
- day_offset = (weekday + 7 - week_view->display_start_day) % 7;
-
- /* 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;
- g_date_to_struct_tm (&base_date, &start_tm);
- start_time = mktime (&start_tm);
- e_week_view_recalc_day_starts (week_view, start_time);
- update_query (week_view);
- }
-
- /* Try to keep the previous selection, but if it is no longer shown
- just select the first day. */
- if (week_view->selection_start_day != -1) {
- week_view->selection_start_day = old_selection_start_julian
- - g_date_julian (&base_date);
- week_view->selection_end_day = old_selection_end_julian
- - g_date_julian (&base_date);
-
- /* Make sure the selection is valid. */
- num_days = week_view->multi_week_view
- ? week_view->weeks_shown * 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);
-}
-
-
-/* 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->multi_week_view ? week_view->weeks_shown * 7 : 7;
-
- tmp_time = lower;
- week_view->day_starts[0] = tmp_time;
- for (day = 1; day <= num_days; day++) {
- tmp_time = time_add_day (tmp_time, 1);
- week_view->day_starts[day] = tmp_time;
- }
-}
-
-
-gboolean
-e_week_view_get_multi_week_view (EWeekView *week_view)
-{
- g_return_val_if_fail (E_IS_WEEK_VIEW (week_view), FALSE);
-
- return week_view->multi_week_view;
-}
-
-
-void
-e_week_view_set_multi_week_view (EWeekView *week_view,
- gboolean multi_week_view)
-{
- GtkAdjustment *adjustment;
- gint page_increment, page_size;
-
- g_return_if_fail (E_IS_WEEK_VIEW (week_view));
-
- if (week_view->multi_week_view == multi_week_view)
- return;
-
- week_view->multi_week_view = multi_week_view;
-
- if (multi_week_view) {
- 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);
-
- e_week_view_recalc_cell_sizes (week_view);
-
- if (g_date_valid (&week_view->first_day_shown))
- e_week_view_set_first_day_shown (week_view,
- &week_view->first_day_shown);
-}
-
-
-gint
-e_week_view_get_weeks_shown (EWeekView *week_view)
-{
- g_return_val_if_fail (E_IS_WEEK_VIEW (week_view), 1);
-
- return week_view->weeks_shown;
-}
-
-
-void
-e_week_view_set_weeks_shown (EWeekView *week_view,
- gint weeks_shown)
-{
- GtkAdjustment *adjustment;
- gint page_increment, page_size;
-
- g_return_if_fail (E_IS_WEEK_VIEW (week_view));
-
- weeks_shown = MIN (weeks_shown, E_WEEK_VIEW_MAX_WEEKS);
-
- if (week_view->weeks_shown == weeks_shown)
- return;
-
- week_view->weeks_shown = weeks_shown;
-
- if (week_view->multi_week_view) {
- page_increment = 4;
- page_size = 5;
-
- adjustment = GTK_RANGE (week_view->vscrollbar)->adjustment;
- adjustment->page_increment = page_increment;
- adjustment->page_size = page_size;
- gtk_adjustment_changed (adjustment);
-
- e_week_view_recalc_cell_sizes (week_view);
-
- if (g_date_valid (&week_view->first_day_shown))
- e_week_view_set_first_day_shown (week_view, &week_view->first_day_shown);
-
- update_query (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)
-{
- gboolean need_reload = FALSE;
-
- 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->multi_week_view)
- return;
-
- e_week_view_recalc_cell_sizes (week_view);
-
- need_reload = e_week_view_recalc_display_start_day (week_view);
-
- /* If the display_start_day has changed we need to recalculate the
- date range shown and reload all events, otherwise we only need to
- do a reshape. */
- if (need_reload) {
- /* Recalculate the days shown and reload if necessary. */
- if (g_date_valid (&week_view->first_day_shown))
- e_week_view_set_first_day_shown (week_view, &week_view->first_day_shown);
- } else {
- week_view->events_need_reshape = TRUE;
- e_week_view_check_layout (week_view);
- }
-}
-
-
-/* Whether we display event end times. */
-gboolean
-e_week_view_get_show_event_end_times (EWeekView *week_view)
-{
- g_return_val_if_fail (E_IS_WEEK_VIEW (week_view), TRUE);
-
- return week_view->show_event_end_times;
-}
-
-
-void
-e_week_view_set_show_event_end_times (EWeekView *week_view,
- gboolean show)
-{
- g_return_if_fail (E_IS_WEEK_VIEW (week_view));
-
- if (week_view->show_event_end_times != show) {
- week_view->show_event_end_times = show;
- e_week_view_recalc_cell_sizes (week_view);
- week_view->events_need_reshape = TRUE;
- e_week_view_check_layout (week_view);
- }
-}
-
-
-/* The first day of the week, 0 (Monday) to 6 (Sunday). */
-gint
-e_week_view_get_week_start_day (EWeekView *week_view)
-{
- g_return_val_if_fail (E_IS_WEEK_VIEW (week_view), 0);
-
- return week_view->week_start_day;
-}
-
-
-void
-e_week_view_set_week_start_day (EWeekView *week_view,
- gint week_start_day)
-{
- g_return_if_fail (E_IS_WEEK_VIEW (week_view));
- g_return_if_fail (week_start_day >= 0);
- g_return_if_fail (week_start_day < 7);
-
- if (week_view->week_start_day == week_start_day)
- return;
-
- week_view->week_start_day = week_start_day;
-
- e_week_view_recalc_display_start_day (week_view);
-
- /* Recalculate the days shown and reload if necessary. */
- if (g_date_valid (&week_view->first_day_shown))
- e_week_view_set_first_day_shown (week_view,
- &week_view->first_day_shown);
-}
-
-
-/* Whether we use 12-hour or 24-hour format. */
-gboolean
-e_week_view_get_24_hour_format (EWeekView *week_view)
-{
- g_return_val_if_fail (E_IS_WEEK_VIEW (week_view), FALSE);
-
- return week_view->use_24_hour_format;
-}
-
-
-void
-e_week_view_set_24_hour_format (EWeekView *week_view,
- gboolean use_24_hour)
-{
- g_return_if_fail (E_IS_WEEK_VIEW (week_view));
-
- if (week_view->use_24_hour_format == use_24_hour)
- return;
-
- week_view->use_24_hour_format = use_24_hour;
-
- /* We need to re-layout the events since the time format affects the
- sizes. */
- e_week_view_recalc_cell_sizes (week_view);
- week_view->events_need_reshape = TRUE;
- e_week_view_check_layout (week_view);
- gtk_widget_queue_draw (week_view->main_canvas);
-}
-
-
-static gboolean
-e_week_view_recalc_display_start_day (EWeekView *week_view)
-{
- gint display_start_day;
-
- /* The display start day defaults to week_start_day, but we have
- to use Saturday if the weekend is compressed and week_start_day
- is Sunday. */
- display_start_day = week_view->week_start_day;
-
- if (display_start_day == 6
- && (!week_view->multi_week_view || week_view->compress_weekend))
- display_start_day = 5;
-
- if (week_view->display_start_day != display_start_day) {
- week_view->display_start_day = display_start_day;
- return TRUE;
- }
-
- return FALSE;
-}
-
-
-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;
- CalComponent *comp;
-
- comp = data;
-
- event = &g_array_index (week_view->events, EWeekViewEvent, event_num);
-
- gtk_object_unref (GTK_OBJECT (event->comp));
- event->comp = comp;
- gtk_object_ref (GTK_OBJECT (comp));
-
- 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) {
- CalComponentText t;
-
- cal_component_get_summary (event->comp, &t);
- text = (char*) t.value;
- 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--) {
- const char *u;
-
- event = &g_array_index (week_view->events, EWeekViewEvent,
- event_num);
-
- cal_component_get_uid (event->comp, &u);
- if (u && !strcmp (uid, u)) {
- if (!(*callback) (week_view, event_num, data))
- return;
- }
- }
-}
-
-
-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;
- }
- }
-
- gtk_object_unref (GTK_OBJECT (event->comp));
-
- 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, col, weekend_col, box, weekend_box;
-
- *day_x = *day_y = *day_w = *day_h = 0;
- g_return_if_fail (day >= 0);
-
- if (week_view->multi_week_view) {
- g_return_if_fail (day < week_view->weeks_shown * 7);
-
- week = day / 7;
- col = day % 7;
- day_of_week = (week_view->display_start_day + 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];
- col--;
- }
- /* Both Saturday and Sunday are in the same column. */
- *day_x = week_view->col_offsets[col];
- *day_w = week_view->col_widths[col];
- } else {
- /* If the weekend is compressed and the day is after
- the weekend we have to move back a column. */
- if (week_view->compress_weekend) {
- /* Calculate where the weekend column is.
- Note that 5 is Saturday. */
- weekend_col = (5 + 7 - week_view->display_start_day) % 7;
- if (col > weekend_col)
- col--;
- }
-
- *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[col];
- *day_w = week_view->col_widths[col];
- }
- } else {
- g_return_if_fail (day < 7);
-
- /* Calculate which box to place the day in, from 0-5.
- Note that in the week view the weekends are always
- compressed and share a box. */
- box = day;
- day_of_week = (week_view->display_start_day + day) % 7;
- weekend_box = (5 + 7 - week_view->display_start_day) % 7;
- if (box > weekend_box)
- box--;
-
- if (box < 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];
- }
-
- row = (box % 3) * 2;
- if (day_of_week < 5) {
- *day_y = week_view->row_offsets[row];
- *day_h = week_view->row_heights[row]
- + week_view->row_heights[row + 1];
- } else if (day_of_week == 5) {
- /* Saturday. */
- *day_y = week_view->row_offsets[row];
- *day_h = week_view->row_heights[row];
-
- } else {
- /* Sunday. */
- *day_y = week_view->row_offsets[row + 1];
- *day_h = week_view->row_heights[row + 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.
- The bounding box includes the entire width of the days in the view (but
- not the vertical line down the right of the last day), though the displayed
- event doesn't normally extend to the edges of the day.
- It returns FALSE if the span isn't visible. */
-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 = (week_view->display_start_day + 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->multi_week_view) {
- 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 - 1;
- } 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 + end_w - start_x - 1;
- }
-
- 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
-
- /* Handle scroll wheel events */
- if (event->button == 4 || event->button == 5) {
- GtkAdjustment *adj = GTK_RANGE (week_view->vscrollbar)->adjustment;
- gfloat new_value;
-
- new_value = adj->value + ((event->button == 4) ?
- -adj->page_increment:
- adj->page_increment);
- new_value = CLAMP (new_value, adj->lower, adj->upper - adj->page_size);
- gtk_adjustment_set_value (adj, new_value);
-
- return TRUE;
- }
-
- /* 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) {
- if (!GTK_WIDGET_HAS_FOCUS (week_view))
- gtk_widget_grab_focus (GTK_WIDGET (week_view));
- 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];
-
- if (week_view->calendar)
- 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;
- gint weekend_col, box, weekend_box;
-
- /* 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->multi_week_view) {
- week = grid_y / 2;
- day = grid_x;
-
- if (week_view->compress_weekend) {
- weekend_col = (5 + 7 - week_view->display_start_day) % 7;
- if (grid_x > weekend_col
- || (grid_x == weekend_col && grid_y % 2 == 1))
- day++;
- }
- } else {
- week = 0;
-
- box = grid_x * 3 + grid_y / 2;
- weekend_box = (5 + 7 - week_view->display_start_day) % 7;
- day = box;
- if (box > weekend_box
- ||( box == weekend_box && grid_y % 2 == 1))
- day++;
- }
-
- 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_free_events (EWeekView *week_view)
-{
- EWeekViewEvent *event;
- EWeekViewEventSpan *span;
- gint event_num, span_num, num_days, day;
-
- /* Reset all our indices. */
- week_view->pressed_event_num = -1;
- week_view->pressed_span_num = -1;
- week_view->editing_event_num = -1;
- week_view->editing_span_num = -1;
- week_view->popup_event_num = -1;
-
- for (event_num = 0; event_num < week_view->events->len; event_num++) {
- event = &g_array_index (week_view->events, EWeekViewEvent,
- event_num);
- gtk_object_unref (GTK_OBJECT (event->comp));
- }
-
- 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;
- }
-
- /* Clear the number of rows used per day. */
- num_days = week_view->multi_week_view ? week_view->weeks_shown * 7 : 7;
- for (day = 0; day <= num_days; day++) {
- week_view->rows_per_day[day] = 0;
- }
-}
-
-
-/* This adds one event to the view, adding it to the appropriate array. */
-static gboolean
-e_week_view_add_event (CalComponent *comp,
- 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->multi_week_view ? week_view->weeks_shown * 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.comp = comp;
- gtk_object_ref (GTK_OBJECT (event.comp));
- 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 num_days, day, 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));
-
- /* Clear the number of rows used per day. */
- num_days = week_view->multi_week_view ? week_view->weeks_shown * 7 : 7;
- for (day = 0; day <= num_days; day++) {
- week_view->rows_per_day[day] = 0;
- }
-
- /* 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->multi_week_view ? week_view->weeks_shown * 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;
- week_view->rows_per_day[day] = MAX (week_view->rows_per_day[day], 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;
- gint num_days, day, day_x, day_y, day_w, day_h, max_rows;
- gboolean is_weekend;
-
- 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);
- }
- }
-
- /* Reshape the jump buttons and show/hide them as appropriate. */
- num_days = week_view->multi_week_view ? week_view->weeks_shown * 7 : 7;
- for (day = 0; day < num_days; day++) {
-
- is_weekend = ((week_view->display_start_day + day) % 7 >= 5) ? TRUE : FALSE;
- if (!is_weekend || (week_view->multi_week_view
- && !week_view->compress_weekend))
- max_rows = week_view->rows_per_cell;
- else
- max_rows = week_view->rows_per_compressed_cell;
-
- /* Determine whether the jump button should be shown. */
- if (week_view->rows_per_day[day] <= max_rows) {
- gnome_canvas_item_hide (week_view->jump_buttons[day]);
- } else {
- e_week_view_get_day_position (week_view, day,
- &day_x, &day_y,
- &day_w, &day_h);
-
- gnome_canvas_item_set (week_view->jump_buttons[day],
- "GnomeCanvasPixbuf::x", (gdouble) (day_x + day_w - E_WEEK_VIEW_JUMP_BUTTON_X_PAD - E_WEEK_VIEW_JUMP_BUTTON_WIDTH),
- "GnomeCanvasPixbuf::y", (gdouble) (day_y + day_h - E_WEEK_VIEW_JUMP_BUTTON_Y_PAD - E_WEEK_VIEW_JUMP_BUTTON_HEIGHT),
- NULL);
-
- gnome_canvas_item_show (week_view->jump_buttons[day]);
- gnome_canvas_item_raise_to_top (week_view->jump_buttons[day]);
- }
- }
-
- for (day = num_days; day < E_WEEK_VIEW_MAX_WEEKS * 7; day++) {
- gnome_canvas_item_hide (week_view->jump_buttons[day]);
- }
-}
-
-
-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;
- CalComponent *comp;
- 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);
- comp = event->comp;
- 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 we are editing a long event we don't show the icons and the EText
- item uses the maximum width available. */
- 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;
- }
-
- /* Calculate how many icons we need to show. */
- num_icons = 0;
- if (show_icons) {
- if (cal_component_has_alarms (comp))
- num_icons++;
- if (cal_component_has_recurrences (comp))
- 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) {
- CalComponentText text;
-
- cal_component_get_summary (comp, &text);
- 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", text.value ? text.value : "",
- "use_ellipsis", TRUE,
- "fill_color_rgba", GNOME_CANVAS_COLOR(0, 0, 0),
- 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". */
- time_width = e_week_view_get_time_string_width (week_view);
-
- /* Calculate the space needed for the icons. */
- icons_width = (E_WEEK_VIEW_ICON_WIDTH + E_WEEK_VIEW_ICON_X_PAD)
- * num_icons - E_WEEK_VIEW_ICON_X_PAD + E_WEEK_VIEW_ICON_R_PAD;
-
- /* 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) {
- /* Note that 1-day events don't have a border. Although we
- still use the border height to position the events
- vertically so they still line up neatly (see above),
- we don't use the border width or edge padding at all. */
- text_x = span_x + E_WEEK_VIEW_EVENT_L_PAD;
-
- switch (week_view->time_format) {
- case E_WEEK_VIEW_TIME_BOTH_SMALL_MIN:
- case E_WEEK_VIEW_TIME_BOTH:
- /* These have 2 time strings with a small space between
- them and some space before the EText item. */
- text_x += time_width * 2
- + E_WEEK_VIEW_EVENT_TIME_SPACING
- + E_WEEK_VIEW_EVENT_TIME_X_PAD;
- break;
- case E_WEEK_VIEW_TIME_START_SMALL_MIN:
- case E_WEEK_VIEW_TIME_START:
- /* These have just 1 time string with some space
- before the EText item. */
- text_x += time_width + E_WEEK_VIEW_EVENT_TIME_X_PAD;
- break;
- case E_WEEK_VIEW_TIME_NONE:
- break;
- }
-
- /* The icons_width includes space on the right of the icons. */
- text_x += icons_width;
-
- /* The width of the EText item extends right to the edge of the
- event, just inside the border. */
- text_w = span_x + span_w - E_WEEK_VIEW_EVENT_R_PAD - text_x;
-
- } else {
- if (use_max_width) {
- /* When we are editing the event we use all the
- available width. */
- text_x = span_x + E_WEEK_VIEW_EVENT_L_PAD
- + E_WEEK_VIEW_EVENT_BORDER_WIDTH
- + E_WEEK_VIEW_EVENT_EDGE_X_PAD;
- text_w = span_x + span_w - E_WEEK_VIEW_EVENT_R_PAD
- - E_WEEK_VIEW_EVENT_BORDER_WIDTH
- - E_WEEK_VIEW_EVENT_EDGE_X_PAD - text_x;
- } else {
- /* Get the width of the text of the event. This is a
- bit of a hack. It would be better if EText could
- tell us this. */
- gtk_object_get (GTK_OBJECT (span->text_item),
- "text", &text,
- NULL);
- text_width = 0;
- if (text) {
- /* It should only have one line of text in it.
- I'm not sure we need this any more. */
- 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, which centers the icons + text. */
- 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_EDGE_X_PAD;
- /* See if we will want to display the start time, and
- if so take that into account. */
- if (event->start > week_view->day_starts[span->start_day])
- min_text_x += time_width
- + E_WEEK_VIEW_EVENT_TIME_X_PAD;
-
- /* Now make sure we don't go to the left of the minimum
- position. */
- 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_EDGE_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_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;
- }
- }
-
- /* Make sure we don't try to use a negative width. */
- text_w = MAX (text_w, 0);
-
- gnome_canvas_item_set (span->text_item,
- "clip_width", (gdouble) text_w,
- "clip_height", (gdouble) text_h,
- NULL);
- e_canvas_item_move_absolute (span->text_item, text_x, text_y);
-}
-
-
-/* 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->multi_week_view ? week_view->weeks_shown * 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 possible 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 we have to break a span up
- on Saturday, use a separate span for Sunday, and start again on Monday. */
-static gint
-e_week_view_find_span_end (EWeekView *week_view,
- gint day)
-{
- gint week, col, sat_col, end_col;
-
- if (week_view->multi_week_view) {
- week = day / 7;
- col = day % 7;
-
- /* We default to the last column in the row. */
- end_col = 6;
-
- /* If the weekend is compressed we must end any spans on
- Saturday and Sunday. */
- if (week_view->compress_weekend) {
- sat_col = (5 + 7 - week_view->display_start_day) % 7;
- if (col <= sat_col)
- end_col = sat_col;
- else if (col == sat_col + 1)
- end_col = sat_col + 1;
- }
-
- return week * 7 + end_col;
- } 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);
- update_query (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];
- if (week_view->calendar)
- 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);
- }
-
- /* FIXME: This implicitly stops any edit of another item, causing it
- to be sent to the server and resulting in a call to obj_updated_cb()
- which may reload all the events and so our span and text item may
- actually be destroyed. So we often get a SEGV. */
- e_canvas_item_grab_focus (span->text_item, TRUE);
-
- /* 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 any current edit. */
-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) {
- if (!GTK_WIDGET_HAS_FOCUS (week_view))
- gtk_widget_grab_focus (GTK_WIDGET (week_view));
- 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, for DnD. */
-
- 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;
- CalComponentText summary;
- const char *uid;
-
- /* 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;
-
- /* Check that the event is still valid. */
- cal_component_get_uid (event->comp, &uid);
- if (!uid)
- return;
-
- gtk_object_get (GTK_OBJECT (span->text_item),
- "text", &text,
- NULL);
-
- /* Only update the summary if necessary. */
- cal_component_get_summary (event->comp, &summary);
- if (text && summary.value && !strcmp (text, summary.value)) {
- 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;
- }
-
- summary.value = text;
- cal_component_set_summary (event->comp, &summary);
- g_free (text);
-
- if (!cal_client_update_object (week_view->client, event->comp))
- g_message ("e_week_view_on_editing_stopped(): Could not update the object!");
-}
-
-
-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++) {
- const char *u;
-
- event = &g_array_index (week_view->events, EWeekViewEvent,
- event_num);
-
- cal_component_get_uid (event->comp, &u);
- if (u && !strcmp (uid, u)) {
- *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;
- CalComponent *comp;
- gint event_num;
- gchar *initial_text;
- CalComponentDateTime date;
- struct icaltimetype itt;
- time_t dtstart, dtend;
- const char *uid;
-
- 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. */
- comp = cal_component_new ();
- cal_component_set_new_vtype (comp, CAL_COMPONENT_EVENT);
- dtstart = week_view->day_starts[week_view->selection_start_day];
- dtend = week_view->day_starts[week_view->selection_end_day + 1];
-
- date.value = &itt;
- date.tzid = NULL;
-
- *date.value = icaltime_from_timet (dtstart, FALSE);
- cal_component_set_dtstart (comp, &date);
- *date.value = icaltime_from_timet (dtend, FALSE);
- cal_component_set_dtend (comp, &date);
-
- /* We add the event locally and start editing it. We don't send the
- new event to the server until the edit is finished.
- FIXME: If we get an obj-updated or obj-removed signal while editing
- the event, and we have to do a re-layout, we may lose this new
- event. */
- e_week_view_add_event (comp, dtstart, dtend, week_view);
- e_week_view_check_layout (week_view);
- gtk_widget_queue_draw (week_view->main_canvas);
-
- cal_component_get_uid (comp, &uid);
- if (e_week_view_find_event_from_uid (week_view, uid, &event_num)) {
- e_week_view_start_editing_event (week_view, event_num, 0,
- initial_text);
- } else {
- g_warning ("Couldn't find event to start editing.\n");
- }
-
- gtk_object_unref (GTK_OBJECT (comp));
-
- return TRUE;
-}
-
-enum {
- /*
- * This is used to "flag" events that can not be editted
- */
- MASK_EDITABLE = 1,
-
- /*
- * To disable recurring actions to be displayed
- */
- MASK_RECURRING = 2,
-
- /*
- * To disable actions for non-recurring items to be displayed
- */
- MASK_SINGLE = 4,
-
- /*
- * This is used to when an event is currently being edited
- * in another window and we want to disable the event
- * from being edited twice
- */
- MASK_EDITING = 8
-};
-
-static EPopupMenu main_items [] = {
- { N_("New Appointment..."), NULL,
- e_week_view_on_new_appointment, NULL, 0 },
- { N_("New All Day Event"), NULL,
- e_week_view_on_new_event, NULL, 0 },
-
- { "", NULL, NULL, NULL, 0 },
-
- { N_("Go to Today"), NULL,
- e_week_view_on_goto_today, NULL, 0 },
- { N_("Go to Date..."), NULL,
- e_week_view_on_goto_date, NULL, 0 },
- { NULL, NULL, NULL, NULL, 0 }
-};
-
-static EPopupMenu child_items [] = {
- { N_("Open"), NULL,
- e_week_view_on_edit_appointment, NULL, MASK_EDITABLE | MASK_EDITING },
- { N_("Delete this Appointment"), NULL,
- e_week_view_on_delete_appointment, NULL, MASK_EDITABLE | MASK_SINGLE | MASK_EDITING },
- { N_("Schedule Meeting"), NULL,
- e_week_view_on_schedule_meet, NULL, MASK_EDITING },
- { "", NULL, NULL, NULL, 0},
-
- { N_("New Appointment..."), NULL,
- e_week_view_on_new_appointment, NULL, 0 },
-
- { "", NULL, NULL, NULL, MASK_SINGLE },
-
- /*
- * The following are only shown if this is a recurring event
- */
- { "", NULL, NULL, NULL, MASK_SINGLE},
- { N_("Make this Occurrence Movable"), NULL,
- e_week_view_on_unrecur_appointment, NULL, MASK_RECURRING | MASK_EDITING },
- { N_("Delete this Occurrence"), NULL,
- e_week_view_on_delete_occurrence, NULL, MASK_RECURRING | MASK_EDITING },
- { N_("Delete All Occurrences"), NULL,
- e_week_view_on_delete_appointment, NULL, MASK_RECURRING | MASK_EDITING },
-
- { NULL, NULL, NULL, NULL, 0 }
-};
-
-void
-e_week_view_show_popup_menu (EWeekView *week_view,
- GdkEventButton *bevent,
- gint event_num)
-{
- EWeekViewEvent *event;
- int have_selection;
- gboolean being_edited;
- guint32 disable_mask = 0, hide_mask = 0;
- EPopupMenu *context_menu;
-
- have_selection = GTK_WIDGET_HAS_FOCUS (week_view)
- && week_view->selection_start_day != -1;
-
- /*
- * 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.
- */
- being_edited = FALSE;
-
- if (event_num == -1) {
- context_menu = main_items;
- } else {
- context_menu = child_items;
- event = &g_array_index (week_view->events,
- EWeekViewEvent, event_num);
- if (cal_component_has_recurrences (event->comp))
- hide_mask |= MASK_SINGLE;
- else
- hide_mask |= MASK_RECURRING;
- }
-
- if (being_edited)
- disable_mask |= MASK_EDITING;
- week_view->popup_event_num = event_num;
-
- e_popup_menu_run (context_menu, (GdkEvent *) bevent, disable_mask, hide_mask, week_view);
-}
-
-static void
-e_week_view_on_new_appointment (GtkWidget *widget, gpointer data)
-{
- EWeekView *week_view = E_WEEK_VIEW (data);
- time_t dtstart, dtend;
-
- dtstart = week_view->day_starts[week_view->selection_start_day];
- dtend = week_view->day_starts[week_view->selection_end_day + 1];
- gnome_calendar_new_appointment_for (
- week_view->calendar, dtstart, dtend, FALSE);
-}
-
-static void
-e_week_view_on_new_event (GtkWidget *widget, gpointer data)
-{
- EWeekView *week_view = E_WEEK_VIEW (data);
- time_t dtstart, dtend;
-
- dtstart = week_view->day_starts[week_view->selection_start_day];
- dtend = week_view->day_starts[week_view->selection_end_day + 1];
- gnome_calendar_new_appointment_for (
- week_view->calendar, dtstart, dtend, TRUE);
-}
-
-static void
-e_week_view_on_goto_date (GtkWidget *widget, gpointer data)
-{
- EWeekView *week_view = E_WEEK_VIEW (data);
-
- goto_dialog (week_view->calendar);
-}
-
-static void
-e_week_view_on_goto_today (GtkWidget *widget, gpointer data)
-{
- EWeekView *week_view = E_WEEK_VIEW (data);
-
- calendar_goto_today (week_view->calendar);
-}
-
-static void
-e_week_view_on_edit_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);
-
- if (week_view->calendar)
- gnome_calendar_edit_object (week_view->calendar, event->comp);
- else
- g_warning ("Calendar not set");
-}
-
-
-static void
-e_week_view_on_delete_occurrence (GtkWidget *widget, gpointer data)
-{
- EWeekView *week_view;
- EWeekViewEvent *event;
- CalComponent *comp;
-
- 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 CalComponent, or we won't know it has changed
- when we get the "update_event" callback. */
-
- comp = cal_component_clone (event->comp);
- cal_comp_util_add_exdate (comp, icaltime_from_timet (event->start, TRUE));
-
- if (!cal_client_update_object (week_view->client, comp))
- g_message ("e_week_view_on_delete_occurrence(): Could not update the object!");
-
- gtk_object_unref (GTK_OBJECT (comp));
-}
-
-
-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);
-
- if (delete_component_dialog (event->comp, widget)) {
- const char *uid;
-
- cal_component_get_uid (event->comp, &uid);
-
- /* We don't check the return value; FALSE can mean the object
- * was not in the server anyways.
- */
- cal_client_remove_object (week_view->client, uid);
- }
-}
-
-static void
-e_week_view_on_schedule_meet (GtkWidget *widget, gpointer data)
-{
- EWeekView *week_view;
- EWeekViewEvent *event;
- EMeetingEditor *editor;
-
- 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);
-
- editor = e_meeting_editor_new (event->comp, week_view->client);
-
- e_meeting_edit (editor);
- e_meeting_editor_free (editor);
-}
-
-static void
-e_week_view_on_unrecur_appointment (GtkWidget *widget, gpointer data)
-{
- EWeekView *week_view;
- EWeekViewEvent *event;
- CalComponent *comp, *new_comp;
- CalComponentDateTime date;
- struct icaltimetype itt;
-
- 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. */
- comp = cal_component_clone (event->comp);
- cal_comp_util_add_exdate (comp, icaltime_from_timet (event->start, TRUE));
-
- /* 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_comp = cal_component_clone (event->comp);
- cal_component_set_uid (new_comp, cal_component_gen_uid ());
- cal_component_set_rdate_list (new_comp, NULL);
- cal_component_set_rrule_list (new_comp, NULL);
- cal_component_set_exdate_list (new_comp, NULL);
- cal_component_set_exrule_list (new_comp, NULL);
-
- date.value = &itt;
- date.tzid = NULL;
-
- *date.value = icaltime_from_timet (event->start, TRUE);
- cal_component_set_dtstart (new_comp, &date);
- *date.value = icaltime_from_timet (event->end, TRUE);
- cal_component_set_dtend (new_comp, &date);
-
- /* Now update both CalComponents. Note that we do this last since at
- present the updates happen synchronously so our event may disappear.
- */
- if (!cal_client_update_object (week_view->client, comp))
- g_message ("e_week_view_on_unrecur_appointment(): Could not update the object!");
-
- gtk_object_unref (GTK_OBJECT (comp));
-
- if (!cal_client_update_object (week_view->client, new_comp))
- g_message ("e_week_view_on_unrecur_appointment(): Could not update the object!");
-
- gtk_object_unref (GTK_OBJECT (new_comp));
-}
-
-
-static gboolean
-e_week_view_on_jump_button_event (GnomeCanvasItem *item,
- GdkEvent *event,
- EWeekView *week_view)
-{
- gint day;
-
- if (event->type == GDK_BUTTON_PRESS) {
- for (day = 0; day < E_WEEK_VIEW_MAX_WEEKS * 7; day++) {
- if (item == week_view->jump_buttons[day]) {
- if (week_view->calendar)
- gnome_calendar_dayjump
- (week_view->calendar,
- week_view->day_starts[day]);
- else
- g_warning ("Calendar not set");
- return TRUE;
- }
- }
-
- }
-
- return FALSE;
-}
-
-
-/* Converts an hour from 0-23 to the preferred time format, and returns the
- suffix to add and the width of it in the normal font. */
-void
-e_week_view_convert_time_to_display (EWeekView *week_view,
- gint hour,
- gint *display_hour,
- gchar **suffix,
- gint *suffix_width)
-{
- /* Calculate the actual hour number to display. For 12-hour
- format we convert 0-23 to 12-11am/12-11pm. */
- *display_hour = hour;
- if (week_view->use_24_hour_format) {
- *suffix = "";
- *suffix_width = 0;
- } else {
- if (hour < 12) {
- *suffix = week_view->am_string;
- *suffix_width = week_view->am_string_width;
- } else {
- *display_hour -= 12;
- *suffix = week_view->pm_string;
- *suffix_width = week_view->pm_string_width;
- }
-
- /* 12-hour uses 12:00 rather than 0:00. */
- if (*display_hour == 0)
- *display_hour = 12;
- }
-}
-
-
-gint
-e_week_view_get_time_string_width (EWeekView *week_view)
-{
- gint time_width;
-
- 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;
-
- if (!week_view->use_24_hour_format)
- time_width += MAX (week_view->am_string_width,
- week_view->pm_string_width);
-
- return time_width;
-}
diff --git a/calendar/gui/e-week-view.h b/calendar/gui/e-week-view.h
deleted file mode 100644
index 6717da9ea3..0000000000
--- a/calendar/gui/e-week-view.h
+++ /dev/null
@@ -1,452 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <damon@ximian.com>
- *
- * Copyright 1999, Helix Code, Inc.
- * Copyright 2001, Ximian, 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 <gtk/gtktable.h>
-#include <libgnomeui/gnome-canvas.h>
-
-#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,
- but we allow 6 for longer selections. */
-#define E_WEEK_VIEW_MAX_WEEKS 6
-
-/* The size of the reminder & recurrence icons, and padding around them.
- X_PAD is the padding between icons. R_PAD is the padding on the right of
- the last icon, before the event text. */
-#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
-#define E_WEEK_VIEW_ICON_R_PAD 2
-
-/* The space on the left & right outside 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 2
-
-/* The vertical spacing between rows of events. */
-#define E_WEEK_VIEW_EVENT_Y_SPACING 1
-
-/* The size of the border around long events. */
-#define E_WEEK_VIEW_EVENT_BORDER_WIDTH 1
-#define E_WEEK_VIEW_EVENT_BORDER_HEIGHT 1
-
-/* The padding on the top and bottom of the event text. */
-#define E_WEEK_VIEW_EVENT_TEXT_Y_PAD 1
-
-/* The space between the start and end times. */
-#define E_WEEK_VIEW_EVENT_TIME_SPACING 2
-
-/* The space between the time and the event text or icons. */
-#define E_WEEK_VIEW_EVENT_TIME_X_PAD 2
-
-/* The space between the borders of long events and any text of icons. */
-#define E_WEEK_VIEW_EVENT_EDGE_X_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_EVENT_TEXT,
- E_WEEK_VIEW_COLOR_GRID,
- E_WEEK_VIEW_COLOR_SELECTED,
- E_WEEK_VIEW_COLOR_DATES,
- E_WEEK_VIEW_COLOR_DATES_SELECTED,
-
- 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 {
- CalComponent *comp;
- 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;
-
- GnomeCanvasItem *jump_buttons[E_WEEK_VIEW_MAX_WEEKS * 7];
-
- GtkWidget *vscrollbar;
-
- /* The calendar we are associated with. */
- GnomeCalendar *calendar;
-
- /* Calendar client object we are monitoring */
- CalClient *client;
-
- /* S-expression for query and the query object */
- char *sexp;
- CalQuery *query;
-
- /* 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 multiple weeks in rows. If this is FALSE only
- one week is shown, with a different layout. */
- gboolean multi_week_view;
-
- /* How many weeks we are showing. This is only relevant if
- display_month is TRUE. */
- gint weeks_shown;
-
- /* 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;
-
- /* Whether we use show event end times. */
- gboolean show_event_end_times;
-
- /* The first day of the week, 0 (Monday) to 6 (Sunday). */
- gint week_start_day;
-
- /* Whether we use 12-hour of 24-hour format. */
- gboolean use_24_hour_format;
-
- /* The first day of the week we display, 0 (Monday) to 6 (Sunday).
- This will usually be week_start_day, but if the weekend is
- compressed, and week_start_day is Sunday we have to use Saturday. */
- gint display_start_day;
-
- /* 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;
-
- /* The number of rows we have used for each day (i.e. each cell) */
- gint rows_per_day[E_WEEK_VIEW_MAX_WEEKS * 7];
-
- /* 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. A row
- corresponds to a compressed day, so normal days usually take
- up 2 rows. 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[E_WEEK_VIEW_MAX_WEEKS * 2];
- gint row_offsets[E_WEEK_VIEW_MAX_WEEKS * 2 + 1];
-
- /* 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;
-
- /* 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;
-
- /* "am" and "pm" in the current locale, and their widths. */
- gchar *am_string;
- gchar *pm_string;
- gint am_string_width;
- gint pm_string_width;
-};
-
-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);
-
-/* The first day shown. Note that it will be rounded down to the start of a
- week when set. The returned value will be invalid if no date has been set
- yet. */
-void e_week_view_get_first_day_shown (EWeekView *week_view,
- GDate *date);
-void e_week_view_set_first_day_shown (EWeekView *week_view,
- GDate *date);
-
-void e_week_view_set_cal_client (EWeekView *week_view,
- CalClient *client);
-
-void e_week_view_set_query (EWeekView *week_view,
- const char *sexp);
-
-/* 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_get_selected_time_range (EWeekView *week_view,
- time_t *start_time,
- time_t *end_time);
-void e_week_view_set_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_multi_week_view (EWeekView *week_view);
-void e_week_view_set_multi_week_view (EWeekView *week_view,
- gboolean multi_week_view);
-
-/* The number of weeks shown in the multi-week view. */
-gint e_week_view_get_weeks_shown (EWeekView *week_view);
-void e_week_view_set_weeks_shown (EWeekView *week_view,
- gint weeks_shown);
-
-/* 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);
-
-/* Whether we display event end times. */
-gboolean e_week_view_get_show_event_end_times (EWeekView *week_view);
-void e_week_view_set_show_event_end_times (EWeekView *week_view,
- gboolean show);
-
-/* The first day of the week, 0 (Monday) to 6 (Sunday). */
-gint e_week_view_get_week_start_day (EWeekView *week_view);
-void e_week_view_set_week_start_day (EWeekView *week_view,
- gint week_start_day);
-
-/* Whether we use 12-hour or 24-hour format. */
-gboolean e_week_view_get_24_hour_format (EWeekView *week_view);
-void e_week_view_set_24_hour_format (EWeekView *week_view,
- gboolean use_24_hour);
-
-
-
-/*
- * 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);
-
-void e_week_view_convert_time_to_display (EWeekView *week_view,
- gint hour,
- gint *display_hour,
- gchar **suffix,
- gint *suffix_width);
-gint e_week_view_get_time_string_width (EWeekView *week_view);
-
-#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 615bd3eed3..0000000000
--- a/calendar/gui/event-editor-dialog.glade
+++ /dev/null
@@ -1,1408 +0,0 @@
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <name>event-editor-dialog</name>
- <program_name>event-editor-dialog</program_name>
- <directory></directory>
- <source_directory>.</source_directory>
- <pixmaps_directory>pixmaps</pixmaps_directory>
- <language>C</language>
- <gnome_support>True</gnome_support>
- <gettext_support>True</gettext_support>
- <output_main_file>False</output_main_file>
- <output_support_files>False</output_support_files>
- <output_build_files>False</output_build_files>
-</project>
-
-<widget>
- <class>GnomePropertyBox</class>
- <name>event-editor-dialog</name>
- <visible>False</visible>
- <position>GTK_WIN_POS_NONE</position>
- <modal>False</modal>
- <allow_shrink>False</allow_shrink>
- <allow_grow>False</allow_grow>
- <auto_shrink>False</auto_shrink>
-
- <widget>
- <class>GtkNotebook</class>
- <child_name>GnomeDock:contents</child_name>
- <name>notebook1</name>
- <border_width>2</border_width>
- <can_focus>True</can_focus>
- <show_tabs>True</show_tabs>
- <show_border>True</show_border>
- <tab_pos>GTK_POS_TOP</tab_pos>
- <scrollable>False</scrollable>
- <tab_hborder>2</tab_hborder>
- <tab_vborder>2</tab_vborder>
- <popup_enable>False</popup_enable>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox51</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>6</spacing>
-
- <widget>
- <class>GtkTable</class>
- <name>table11</name>
- <rows>1</rows>
- <columns>2</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>4</row_spacing>
- <column_spacing>4</column_spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label56</name>
- <label>Su_mmary:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>7.45058e-09</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <default_focus_target>general-summary</default_focus_target>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>general-summary</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame31</name>
- <label>Date &amp; Time</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkTable</class>
- <name>table12</name>
- <border_width>4</border_width>
- <rows>2</rows>
- <columns>3</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>4</row_spacing>
- <column_spacing>4</column_spacing>
-
- <widget>
- <class>GtkLabel</class>
- <name>label57</name>
- <label>_Start time:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label58</name>
- <label>_End time:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>all-day-event</name>
- <can_focus>True</can_focus>
- <label>A_ll day event</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <left_attach>2</left_attach>
- <right_attach>3</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>start-time</name>
- <creation_function>make_date_edit</creation_function>
- <string1></string1>
- <string2></string2>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Tue, 16 May 2000 19:11:05 GMT</last_modification_time>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>True</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>False</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>end-time</name>
- <creation_function>make_date_edit</creation_function>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Tue, 16 May 2000 19:11:10 GMT</last_modification_time>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>True</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>False</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkScrolledWindow</class>
- <name>scrolledwindow12</name>
- <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
- <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
- <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
- <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkText</class>
- <name>description</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text></text>
- </widget>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame32</name>
- <label>Classification</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox52</name>
- <border_width>2</border_width>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
-
- <widget>
- <class>GtkRadioButton</class>
- <name>classification-public</name>
- <can_focus>True</can_focus>
- <label>Pu_blic</label>
- <active>True</active>
- <draw_indicator>True</draw_indicator>
- <group>classification_radio_group</group>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkRadioButton</class>
- <name>classification-private</name>
- <can_focus>True</can_focus>
- <label>Pri_vate</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <group>classification_radio_group</group>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkRadioButton</class>
- <name>classification-confidential</name>
- <can_focus>True</can_focus>
- <label>_Confidential</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <group>classification_radio_group</group>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox53</name>
- <homogeneous>False</homogeneous>
- <spacing>2</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>contacts-button</name>
- <can_focus>True</can_focus>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label59</name>
- <label>_Contacts...</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>4</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>contacts</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>categories-button</name>
- <can_focus>True</can_focus>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label60</name>
- <label>Ca_tegories...</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>4</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>categories</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label61</name>
- <label>Appointment</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox52</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame33</name>
- <label>Appointment Basics</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkTable</class>
- <name>table13</name>
- <border_width>4</border_width>
- <rows>2</rows>
- <columns>2</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>2</row_spacing>
- <column_spacing>2</column_spacing>
-
- <widget>
- <class>GtkLabel</class>
- <name>label62</name>
- <label>Su_mmary:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <default_focus_target>reminder-summary</default_focus_target>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label63</name>
- <label>_Starting date:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>reminder-summary</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>True</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>reminder-starting-data</name>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xscale>0</xscale>
- <yscale>0</yscale>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>Custom</class>
- <name>reminder-starting-date</name>
- <creation_function>make_date_edit</creation_function>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Fri, 22 Sep 2000 20:51:38 GMT</last_modification_time>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame34</name>
- <label>Reminders</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox53</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox54</name>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkOptionMenu</class>
- <name>reminder-action</name>
- <can_focus>True</can_focus>
- <items>Show a dialog
-Play a sound
-Send an email
-Run a program
-</items>
- <initial_choice>0</initial_choice>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkSpinButton</class>
- <name>reminder-interval-value</name>
- <can_focus>True</can_focus>
- <climb_rate>1</climb_rate>
- <digits>0</digits>
- <numeric>True</numeric>
- <update_policy>GTK_UPDATE_ALWAYS</update_policy>
- <snap>False</snap>
- <wrap>False</wrap>
- <value>1</value>
- <lower>0</lower>
- <upper>100</upper>
- <step>1</step>
- <page>10</page>
- <page_size>10</page_size>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkOptionMenu</class>
- <name>reminder-value-units</name>
- <can_focus>True</can_focus>
- <items>minute(s)
-hour(s)
-day(s)
-</items>
- <initial_choice>0</initial_choice>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkOptionMenu</class>
- <name>reminder-relative</name>
- <can_focus>True</can_focus>
- <items>before
-after
-</items>
- <initial_choice>0</initial_choice>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkOptionMenu</class>
- <name>reminder-time</name>
- <can_focus>True</can_focus>
- <items>start of appointment
-end of appointment
-</items>
- <initial_choice>0</initial_choice>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button9</name>
- <can_focus>True</can_focus>
- <label>Settings...</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox55</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkScrolledWindow</class>
- <name>scrolledwindow13</name>
- <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
- <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
- <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
- <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkCList</class>
- <name>reminder-list</name>
- <can_focus>True</can_focus>
- <columns>1</columns>
- <column_widths>80</column_widths>
- <selection_mode>GTK_SELECTION_BROWSE</selection_mode>
- <show_titles>False</show_titles>
- <shadow_type>GTK_SHADOW_IN</shadow_type>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>CList:title</child_name>
- <name>label64</name>
- <label>label55</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkVButtonBox</class>
- <name>vbuttonbox2</name>
- <layout_style>GTK_BUTTONBOX_START</layout_style>
- <spacing>10</spacing>
- <child_min_width>85</child_min_width>
- <child_min_height>27</child_min_height>
- <child_ipad_x>7</child_ipad_x>
- <child_ipad_y>0</child_ipad_y>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>reminder-add</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <label>Add</label>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>reminder-delete</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <label>Delete</label>
- </widget>
- </widget>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label65</name>
- <label>Reminder</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox54</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame35</name>
- <label>Appointment Basics</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkTable</class>
- <name>table14</name>
- <border_width>4</border_width>
- <rows>2</rows>
- <columns>2</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>2</row_spacing>
- <column_spacing>2</column_spacing>
-
- <widget>
- <class>GtkLabel</class>
- <name>label66</name>
- <label>Su_mmary:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <default_focus_target>recurrence-summary</default_focus_target>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label67</name>
- <label>_Starting date:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>recurrence-summary</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>True</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment40</name>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xscale>0</xscale>
- <yscale>0</yscale>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>Custom</class>
- <name>recurrence-starting-date</name>
- <creation_function>make_date_edit</creation_function>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Fri, 22 Sep 2000 20:51:38 GMT</last_modification_time>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox55</name>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame36</name>
- <label>Recurrence Rule</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox56</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox56</name>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkRadioButton</class>
- <name>recurrence-none</name>
- <can_focus>True</can_focus>
- <label>No recurrence</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <group>recurrence-radio</group>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkRadioButton</class>
- <name>recurrence-simple</name>
- <can_focus>True</can_focus>
- <label>Simple recurrence</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <group>recurrence-radio</group>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkRadioButton</class>
- <name>recurrence-custom</name>
- <can_focus>True</can_focus>
- <label>Custom recurrence</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <group>recurrence-radio</group>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox57</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkHBox</class>
- <name>recurrence-params</name>
- <homogeneous>False</homogeneous>
- <spacing>2</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label68</name>
- <label>Every</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkSpinButton</class>
- <name>recurrence-interval-value</name>
- <can_focus>True</can_focus>
- <climb_rate>1</climb_rate>
- <digits>0</digits>
- <numeric>True</numeric>
- <update_policy>GTK_UPDATE_ALWAYS</update_policy>
- <snap>False</snap>
- <wrap>False</wrap>
- <value>1</value>
- <lower>1</lower>
- <upper>10000</upper>
- <step>1</step>
- <page>10</page>
- <page_size>10</page_size>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkOptionMenu</class>
- <name>recurrence-interval-unit</name>
- <can_focus>True</can_focus>
- <items>day(s)
-week(s)
-month(s)
-year(s)
-</items>
- <initial_choice>0</initial_choice>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>recurrence-special</name>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xscale>0</xscale>
- <yscale>0</yscale>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>Placeholder</class>
- </widget>
- </widget>
-
- <widget>
- <class>GtkOptionMenu</class>
- <name>recurrence-ending-menu</name>
- <can_focus>True</can_focus>
- <items>for
-until
-forever
-</items>
- <initial_choice>0</initial_choice>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>recurrence-ending-special</name>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xscale>0</xscale>
- <yscale>0</yscale>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>Placeholder</class>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>recurrence-custom-warning-bin</name>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xscale>1</xscale>
- <yscale>1</yscale>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>Placeholder</class>
- </widget>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox59</name>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame37</name>
- <label>Exceptions</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox60</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox57</name>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>recurrence-exception-add</name>
- <can_focus>True</can_focus>
- <label>Add</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>recurrence-exception-modify</name>
- <can_focus>True</can_focus>
- <label>Modify</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>recurrence-exception-delete</name>
- <can_focus>True</can_focus>
- <label>Delete</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox58</name>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>Custom</class>
- <name>recurrence-exception-date</name>
- <creation_function>make_date_edit</creation_function>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Tue, 16 May 2000 01:42:29 GMT</last_modification_time>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkScrolledWindow</class>
- <name>scrolledwindow14</name>
- <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
- <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
- <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
- <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkCList</class>
- <name>recurrence-exception-list</name>
- <can_focus>True</can_focus>
- <columns>1</columns>
- <column_widths>80</column_widths>
- <selection_mode>GTK_SELECTION_BROWSE</selection_mode>
- <show_titles>False</show_titles>
- <shadow_type>GTK_SHADOW_IN</shadow_type>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>CList:title</child_name>
- <name>label69</name>
- <label>label21</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox59</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label70</name>
- <label>Preview</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>recurrence-preview-bin</name>
- <xalign>0</xalign>
- <yalign>0</yalign>
- <xscale>1</xscale>
- <yscale>1</yscale>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>Placeholder</class>
- </widget>
- </widget>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label71</name>
- <label>Recurrence</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
-</widget>
-
-</GTK-Interface>
diff --git a/calendar/gui/event-editor.c b/calendar/gui/event-editor.c
deleted file mode 100644
index 352858acb8..0000000000
--- a/calendar/gui/event-editor.c
+++ /dev/null
@@ -1,3368 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/* Evolution calendar - Event editor dialog
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Authors: Miguel de Icaza <miguel@ximian.com>
- * Federico Mena-Quintero <federico@ximian.com>
- * Seth Alves <alves@hungry.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 <string.h>
-#include <glade/glade.h>
-#include <gal/widgets/e-unicode.h>
-#include <gal/widgets/e-categories.h>
-#include <libgnomeui/gnome-propertybox.h>
-#include <libgnome/gnome-i18n.h>
-
-#include "calendar-config.h"
-#include "cal-util/timeutil.h"
-#include "dialogs/delete-comp.h"
-#include "dialogs/save-comp.h"
-#include "e-meeting-edit.h"
-#include "e-util/e-dialog-widgets.h"
-#include "event-editor.h"
-#include "tag-calendar.h"
-#include "weekday-picker.h"
-#include "widgets/misc/e-dateedit.h"
-#include "widget-util.h"
-
-enum {BEFORE, AFTER};
-enum {MINUTES, HOURS, DAYS};
-
-/* Reminder maps */
-static const int reminder_action_map[] = {
- CAL_ALARM_DISPLAY,
- CAL_ALARM_AUDIO,
- CAL_ALARM_EMAIL,
- CAL_ALARM_PROCEDURE,
- -1
-};
-
-static const int reminder_value_map[] = {
- MINUTES,
- HOURS,
- DAYS,
- -1
-};
-
-static const int reminder_relative_map[] = {
- BEFORE,
- AFTER,
- -1
-};
-
-static const int reminder_time_map[] = {
- CAL_ALARM_TRIGGER_RELATIVE_START,
- CAL_ALARM_TRIGGER_RELATIVE_END,
- -1
-};
-
-/* Recurrence maps */
-static const int recur_freq_map[] = {
- ICAL_DAILY_RECURRENCE,
- ICAL_WEEKLY_RECURRENCE,
- ICAL_MONTHLY_RECURRENCE,
- ICAL_YEARLY_RECURRENCE,
- -1
-};
-
-enum month_day_options {
- MONTH_DAY_NTH,
- MONTH_DAY_MON,
- MONTH_DAY_TUE,
- MONTH_DAY_WED,
- MONTH_DAY_THU,
- MONTH_DAY_FRI,
- MONTH_DAY_SAT,
- MONTH_DAY_SUN
-};
-
-static const int month_day_options_map[] = {
- MONTH_DAY_NTH,
- MONTH_DAY_MON,
- MONTH_DAY_TUE,
- MONTH_DAY_WED,
- MONTH_DAY_THU,
- MONTH_DAY_FRI,
- MONTH_DAY_SAT,
- MONTH_DAY_SUN,
- -1
-};
-
-/* Row data for the reminders */
-typedef enum {NEW_ALARM, EXISTING_ALARM} ReminderStatus;
-
-typedef struct {
- ReminderStatus status;
- CalComponentAlarm *alarm;
-} ReminderData;
-
-struct _EventEditorPrivate {
- /* Glade XML data */
- GladeXML *xml;
-
- /* Client to use */
- CalClient *client;
-
- /* Calendar object/uid we are editing; this is an internal copy */
- CalComponent *comp;
-
- /* Widgets from the Glade file */
-
- GtkWidget *app;
-
- GtkWidget *general_summary;
-
- GtkWidget *start_time;
- GtkWidget *end_time;
- GtkWidget *all_day_event;
-
- GtkWidget *description;
-
- GtkWidget *classification_public;
- GtkWidget *classification_private;
- GtkWidget *classification_confidential;
-
- GtkWidget *categories;
- GtkWidget *categories_btn;
-
- GtkWidget *reminder_summary;
- GtkWidget *reminder_starting_date;
-
- GtkWidget *reminder_list;
- GtkWidget *reminder_add;
- GtkWidget *reminder_delete;
-
- GtkWidget *reminder_action;
- GtkWidget *reminder_interval_value;
- GtkWidget *reminder_value_units;
- GtkWidget *reminder_relative;
- GtkWidget *reminder_time;
-
- GtkWidget *recurrence_summary;
- GtkWidget *recurrence_starting_date;
-
- GtkWidget *recurrence_none;
- GtkWidget *recurrence_simple;
- GtkWidget *recurrence_custom;
-
- GtkWidget *recurrence_params;
- GtkWidget *recurrence_interval_value;
- GtkWidget *recurrence_interval_unit;
- GtkWidget *recurrence_special;
- GtkWidget *recurrence_ending_menu;
- GtkWidget *recurrence_ending_special;
- GtkWidget *recurrence_custom_warning_bin;
-
- /* For weekly recurrences, created by hand */
- GtkWidget *recurrence_weekday_picker;
- guint8 recurrence_weekday_day_mask;
- guint8 recurrence_weekday_blocked_day_mask;
-
- /* For monthly recurrences, created by hand */
- GtkWidget *recurrence_month_index_spin;
- int recurrence_month_index;
-
- GtkWidget *recurrence_month_day_menu;
- enum month_day_options recurrence_month_day;
-
- /* For ending date, created by hand */
- GtkWidget *recurrence_ending_date_edit;
- time_t recurrence_ending_date;
-
- /* For ending count of occurrences, created by hand */
- GtkWidget *recurrence_ending_count_spin;
- int recurrence_ending_count;
-
- /* More widgets from the Glade file */
-
- GtkWidget *recurrence_exception_date;
- GtkWidget *recurrence_exception_list;
- GtkWidget *recurrence_exception_add;
- GtkWidget *recurrence_exception_modify;
- GtkWidget *recurrence_exception_delete;
-
- GtkWidget *recurrence_preview_bin;
-
- /* For the recurrence preview, the actual widget */
- GtkWidget *recurrence_preview_calendar;
-
- /* Call event_editor_set_changed() to set this to TRUE when any field
- in the dialog is changed. When the user closes the dialog we will
- prompt to save changes. */
- gboolean changed;
-};
-
-
-
-static void event_editor_class_init (EventEditorClass *class);
-static void event_editor_init (EventEditor *ee);
-static void event_editor_destroy (GtkObject *object);
-
-static GtkObjectClass *parent_class;
-
-
-static void append_reminder (EventEditor *ee, CalComponentAlarm *alarm, ReminderStatus status);
-static void append_exception (EventEditor *ee, time_t t);
-static void check_all_day (EventEditor *ee);
-static void set_all_day (GtkWidget *toggle, EventEditor *ee);
-static void date_changed_cb (EDateEdit *dedit, gpointer data);
-static void preview_recur (EventEditor *ee);
-static void recur_to_comp_object (EventEditor *ee, CalComponent *comp);
-static void reminder_to_comp_object (EventEditor *ee, CalComponent *comp);
-static void reminder_add_cb (GtkWidget *widget, EventEditor *ee);
-static void reminder_delete_cb (GtkWidget *widget, EventEditor *ee);
-static void recurrence_exception_add_cb (GtkWidget *widget, EventEditor *ee);
-static void recurrence_exception_modify_cb (GtkWidget *widget, EventEditor *ee);
-static void recurrence_exception_delete_cb (GtkWidget *widget, EventEditor *ee);
-static void recurrence_exception_select_row_cb (GtkCList *clist, gint row, gint col, GdkEvent *event,
- gpointer data);
-static void field_changed (GtkWidget *widget,
- EventEditor *ee);
-static void event_editor_set_changed (EventEditor *ee,
- gboolean changed);
-static gboolean prompt_to_save_changes (EventEditor *ee);
-static void categories_clicked (GtkWidget *button, EventEditor *ee);
-
-
-
-/**
- * event_editor_get_type:
- *
- * 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 (GTK_TYPE_OBJECT, &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 (GTK_TYPE_OBJECT);
-
- 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;
-
- event_editor_set_changed (ee, FALSE);
-}
-
-/* Frees the rows and the row data in the recurrence exceptions GtkCList */
-static void
-free_exception_clist_data (GtkCList *clist)
-{
- int i;
-
- for (i = 0; i < clist->rows; i++) {
- gpointer data;
-
- data = gtk_clist_get_row_data (clist, i);
- g_free (data);
- gtk_clist_set_row_data (clist, i, NULL);
- }
-
- gtk_clist_clear (clist);
-}
-
-/* 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;
-
- free_exception_clist_data (GTK_CLIST (priv->recurrence_exception_list));
-
- if (priv->app) {
- gtk_signal_disconnect_by_data (GTK_OBJECT (priv->app), ee);
- gtk_widget_destroy (priv->app);
- priv->app = NULL;
- }
-
- if (priv->comp) {
- gtk_object_unref (GTK_OBJECT (priv->comp));
- priv->comp = NULL;
- }
-
- if (priv->client) {
- gtk_signal_disconnect_by_data (GTK_OBJECT (priv->client), ee);
- gtk_object_unref (GTK_OBJECT (priv->client));
- priv->client = NULL;
- }
-
- if (priv->xml) {
- gtk_object_unref (GTK_OBJECT (priv->xml));
- priv->xml = NULL;
- }
-
- g_free (priv);
- ee->priv = 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_comp (CalComponent *comp)
-{
- const char *summary;
- CalComponentVType type;
- CalComponentText text;
-
- if (!comp)
- return g_strdup (_("Edit Appointment"));
-
- cal_component_get_summary (comp, &text);
- if (text.value)
- summary = text.value;
- else
- summary = _("No summary");
-
-
- type = cal_component_get_vtype (comp);
- switch (type) {
- case CAL_COMPONENT_EVENT:
- return g_strdup_printf (_("Appointment - %s"), summary);
-
- case CAL_COMPONENT_TODO:
- return g_strdup_printf (_("Task - %s"), summary);
-
- case CAL_COMPONENT_JOURNAL:
- return g_strdup_printf (_("Journal entry - %s"), summary);
-
- default:
- g_message ("make_title_from_comp(): Cannot handle object of type %d", type);
- return NULL;
- }
-}
-
-/* Sets the event editor's window title from a calendar component */
-static void
-set_title_from_comp (EventEditor *ee, CalComponent *comp)
-{
- EventEditorPrivate *priv;
- char *title, *tmp;
-
- priv = ee->priv;
-
- title = make_title_from_comp (comp);
- tmp = e_utf8_to_gtk_string (priv->app, title);
- g_free (title);
-
- if (tmp) {
- gtk_window_set_title (GTK_WINDOW (priv->app), tmp);
- g_free (tmp);
- } else {
- g_message ("set_title_from_comp(): Could not convert the title from UTF8");
- gtk_window_set_title (GTK_WINDOW (priv->app), "");
- }
-}
-
-/* Callback used when the recurrence weekday picker changes */
-static void
-recur_weekday_picker_changed_cb (WeekdayPicker *wp, gpointer data)
-{
- EventEditor *ee;
-
- ee = EVENT_EDITOR (data);
- event_editor_set_changed (ee, TRUE);
- preview_recur (ee);
-}
-
-/* Creates the special contents for weekly recurrences */
-static void
-make_recur_weekly_special (EventEditor *ee)
-{
- EventEditorPrivate *priv;
- GtkWidget *hbox;
- GtkWidget *label;
- WeekdayPicker *wp;
-
- priv = ee->priv;
-
- g_assert (GTK_BIN (priv->recurrence_special)->child == NULL);
- g_assert (priv->recurrence_weekday_picker == NULL);
-
- /* Create the widgets */
-
- hbox = gtk_hbox_new (FALSE, 2);
- gtk_container_add (GTK_CONTAINER (priv->recurrence_special), hbox);
-
- label = gtk_label_new (_("on"));
- gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
-
- wp = WEEKDAY_PICKER (weekday_picker_new ());
-
- priv->recurrence_weekday_picker = GTK_WIDGET (wp);
- gtk_box_pack_start (GTK_BOX (hbox), GTK_WIDGET (wp), FALSE, FALSE, 0);
-
- gtk_widget_show_all (hbox);
-
- /* Set the weekdays */
-
- weekday_picker_set_week_start_day (wp, calendar_config_get_week_start_day ());
- weekday_picker_set_days (wp, priv->recurrence_weekday_day_mask);
- weekday_picker_set_blocked_days (wp, priv->recurrence_weekday_blocked_day_mask);
-
- gtk_signal_connect (GTK_OBJECT (wp), "changed",
- GTK_SIGNAL_FUNC (recur_weekday_picker_changed_cb), ee);
-}
-
-/* Creates the option menu for the monthly recurrence days */
-static GtkWidget *
-make_recur_month_menu (void)
-{
- static const char *options[] = {
- N_("day"),
- N_("Monday"),
- N_("Tuesday"),
- N_("Wednesday"),
- N_("Thursday"),
- N_("Friday"),
- N_("Saturday"),
- N_("Sunday")
- };
-
- GtkWidget *menu;
- GtkWidget *omenu;
- int i;
-
- menu = gtk_menu_new ();
-
- for (i = 0; i < sizeof (options) / sizeof (options[0]); i++) {
- GtkWidget *item;
-
- item = gtk_menu_item_new_with_label (_(options[i]));
- gtk_menu_append (GTK_MENU (menu), item);
- gtk_widget_show (item);
- }
-
- omenu = gtk_option_menu_new ();
- gtk_option_menu_set_menu (GTK_OPTION_MENU (omenu), menu);
-
- return omenu;
-}
-
-/* For monthly recurrences, changes the valid range of the recurrence day index
- * spin button; e.g. month days are 1-31 while the valid range for a Sunday is
- * the 1st through 5th of the month.
- */
-static void
-adjust_day_index_spin (EventEditor *ee)
-{
- EventEditorPrivate *priv;
- GtkAdjustment *adj;
- enum month_day_options month_day;
-
- priv = ee->priv;
-
- g_assert (priv->recurrence_month_day_menu != NULL);
- g_assert (GTK_IS_OPTION_MENU (priv->recurrence_month_day_menu));
- g_assert (priv->recurrence_month_index_spin != NULL);
- g_assert (GTK_IS_SPIN_BUTTON (priv->recurrence_month_index_spin));
-
- month_day = e_dialog_option_menu_get (priv->recurrence_month_day_menu, month_day_options_map);
-
- adj = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (priv->recurrence_month_index_spin));
-
- switch (month_day) {
- case MONTH_DAY_NTH:
- adj->upper = 31;
- gtk_adjustment_changed (adj);
- break;
-
- case MONTH_DAY_MON:
- case MONTH_DAY_TUE:
- case MONTH_DAY_WED:
- case MONTH_DAY_THU:
- case MONTH_DAY_FRI:
- case MONTH_DAY_SAT:
- case MONTH_DAY_SUN:
- adj->upper = 5;
- gtk_adjustment_changed (adj);
-
- if (adj->value > 5) {
- adj->value = 5;
- gtk_adjustment_value_changed (adj);
- }
-
- break;
-
- default:
- g_assert_not_reached ();
- }
-}
-
-/* Callback used when the monthly day selection menu changes. We need to change
- * the valid range of the day index spin button; e.g. days are 1-31 while a
- * Sunday is the 1st through 5th.
- */
-static void
-month_day_menu_selection_done_cb (GtkMenuShell *menu_shell, gpointer data)
-{
- EventEditor *ee;
-
- ee = EVENT_EDITOR (data);
- adjust_day_index_spin (ee);
- event_editor_set_changed (ee, TRUE);
- preview_recur (ee);
-}
-
-/* Callback used when the month index value changes. */
-static void
-recur_month_index_value_changed_cb (GtkAdjustment *adj, gpointer data)
-{
- EventEditor *ee;
-
- ee = EVENT_EDITOR (data);
- event_editor_set_changed (ee, TRUE);
- preview_recur (ee);
-}
-
-/* Creates the special contents for monthly recurrences */
-static void
-make_recur_monthly_special (EventEditor *ee)
-{
- EventEditorPrivate *priv;
- GtkWidget *hbox;
- GtkWidget *label;
- GtkAdjustment *adj;
- GtkWidget *menu;
-
- priv = ee->priv;
-
- g_assert (GTK_BIN (priv->recurrence_special)->child == NULL);
- g_assert (priv->recurrence_month_index_spin == NULL);
- g_assert (priv->recurrence_month_day_menu == NULL);
-
- /* Create the widgets */
-
- hbox = gtk_hbox_new (FALSE, 2);
- gtk_container_add (GTK_CONTAINER (priv->recurrence_special), hbox);
-
- label = gtk_label_new (_("on the"));
- gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
-
- adj = GTK_ADJUSTMENT (gtk_adjustment_new (1, 1, 31, 1, 10, 10));
- priv->recurrence_month_index_spin = gtk_spin_button_new (adj, 1, 0);
- gtk_box_pack_start (GTK_BOX (hbox), priv->recurrence_month_index_spin, FALSE, FALSE, 0);
-
- label = gtk_label_new (_("th"));
- gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
-
- priv->recurrence_month_day_menu = make_recur_month_menu ();
- gtk_box_pack_start (GTK_BOX (hbox), priv->recurrence_month_day_menu, FALSE, FALSE, 0);
-
- gtk_widget_show_all (hbox);
-
- /* Set the options */
-
- e_dialog_spin_set (priv->recurrence_month_index_spin, priv->recurrence_month_index);
- e_dialog_option_menu_set (priv->recurrence_month_day_menu,
- priv->recurrence_month_day,
- month_day_options_map);
- adjust_day_index_spin (ee);
-
- gtk_signal_connect (GTK_OBJECT (adj), "value_changed",
- GTK_SIGNAL_FUNC (recur_month_index_value_changed_cb), ee);
-
- menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (priv->recurrence_month_day_menu));
- gtk_signal_connect (GTK_OBJECT (menu), "selection_done",
- GTK_SIGNAL_FUNC (month_day_menu_selection_done_cb), ee);
-}
-
-/* Changes the recurrence-special widget to match the interval units.
- *
- * For daily recurrences: nothing.
- * For weekly recurrences: weekday selector.
- * For monthly recurrences: "on the" <nth> [day, Weekday]
- * For yearly recurrences: nothing.
- */
-static void
-make_recurrence_special (EventEditor *ee)
-{
- EventEditorPrivate *priv;
- icalrecurrencetype_frequency frequency;
-
- priv = ee->priv;
-
- if (GTK_BIN (priv->recurrence_special)->child != NULL) {
- gtk_widget_destroy (GTK_BIN (priv->recurrence_special)->child);
-
- priv->recurrence_weekday_picker = NULL;
- priv->recurrence_month_index_spin = NULL;
- priv->recurrence_month_day_menu = NULL;
- }
-
- frequency = e_dialog_option_menu_get (priv->recurrence_interval_unit, recur_freq_map);
-
- switch (frequency) {
- case ICAL_DAILY_RECURRENCE:
- gtk_widget_hide (priv->recurrence_special);
- break;
-
- case ICAL_WEEKLY_RECURRENCE:
- make_recur_weekly_special (ee);
- gtk_widget_show (priv->recurrence_special);
- break;
-
- case ICAL_MONTHLY_RECURRENCE:
- make_recur_monthly_special (ee);
- gtk_widget_show (priv->recurrence_special);
- break;
-
- case ICAL_YEARLY_RECURRENCE:
- gtk_widget_hide (priv->recurrence_special);
- break;
-
- default:
- g_assert_not_reached ();
- }
-}
-
-/* Callback used when the ending-until date editor changes */
-static void
-recur_ending_until_changed_cb (EDateEdit *de, gpointer data)
-{
- EventEditor *ee;
-
- ee = EVENT_EDITOR (data);
- event_editor_set_changed (ee, TRUE);
- preview_recur (ee);
-}
-
-/* Creates the special contents for "ending until" (end date) recurrences */
-static void
-make_recur_ending_until_special (EventEditor *ee)
-{
- EventEditorPrivate *priv;
- EDateEdit *de;
-
- priv = ee->priv;
-
- g_assert (GTK_BIN (priv->recurrence_ending_special)->child == NULL);
- g_assert (priv->recurrence_ending_date_edit == NULL);
-
- /* Create the widget */
-
- priv->recurrence_ending_date_edit = date_edit_new (TRUE, FALSE);
- de = E_DATE_EDIT (priv->recurrence_ending_date_edit);
-
- gtk_container_add (GTK_CONTAINER (priv->recurrence_ending_special), GTK_WIDGET (de));
- gtk_widget_show_all (GTK_WIDGET (de));
-
- /* Set the value */
-
- e_date_edit_set_time (de, priv->recurrence_ending_date);
-
- gtk_signal_connect (GTK_OBJECT (de), "changed",
- GTK_SIGNAL_FUNC (recur_ending_until_changed_cb), ee);
-}
-
-/* Callback used when the ending-count value changes */
-static void
-recur_ending_count_value_changed_cb (GtkAdjustment *adj, gpointer data)
-{
- EventEditor *ee;
-
- ee = EVENT_EDITOR (data);
- event_editor_set_changed (ee, TRUE);
- preview_recur (ee);
-}
-
-/* Creates the special contents for the occurrence count case */
-static void
-make_recur_ending_count_special (EventEditor *ee)
-{
- EventEditorPrivate *priv;
- GtkWidget *hbox;
- GtkWidget *label;
- GtkAdjustment *adj;
-
- priv = ee->priv;
-
- g_assert (GTK_BIN (priv->recurrence_ending_special)->child == NULL);
- g_assert (priv->recurrence_ending_count_spin == NULL);
-
- /* Create the widgets */
-
- hbox = gtk_hbox_new (FALSE, 2);
- gtk_container_add (GTK_CONTAINER (priv->recurrence_ending_special), hbox);
-
- adj = GTK_ADJUSTMENT (gtk_adjustment_new (1, 1, 10000, 1, 10, 10));
- priv->recurrence_ending_count_spin = gtk_spin_button_new (adj, 1, 0);
- gtk_box_pack_start (GTK_BOX (hbox), priv->recurrence_ending_count_spin, FALSE, FALSE, 0);
-
- label = gtk_label_new (_("occurrences"));
- gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
-
- gtk_widget_show_all (hbox);
-
- /* Set the values */
-
- e_dialog_spin_set (priv->recurrence_ending_count_spin,
- priv->recurrence_ending_count);
-
- gtk_signal_connect (GTK_OBJECT (adj), "value_changed",
- GTK_SIGNAL_FUNC (recur_ending_count_value_changed_cb), ee);
-}
-
-enum ending_type {
- ENDING_FOR,
- ENDING_UNTIL,
- ENDING_FOREVER
-};
-
-static const int ending_types_map[] = {
- ENDING_FOR,
- ENDING_UNTIL,
- ENDING_FOREVER,
- -1
-};
-
-/* Changes the recurrence-ending-special widget to match the ending date option.
- *
- * For: <n> [days, weeks, months, years, occurrences]
- * Until: <date selector>
- * Forever: nothing.
- */
-static void
-make_recurrence_ending_special (EventEditor *ee)
-{
- EventEditorPrivate *priv;
- enum ending_type ending_type;
-
- priv = ee->priv;
-
- if (GTK_BIN (priv->recurrence_ending_special)->child != NULL) {
- gtk_widget_destroy (GTK_BIN (priv->recurrence_ending_special)->child);
-
- priv->recurrence_ending_date_edit = NULL;
- priv->recurrence_ending_count_spin = NULL;
- }
-
- ending_type = e_dialog_option_menu_get (priv->recurrence_ending_menu, ending_types_map);
-
- switch (ending_type) {
- case ENDING_FOR:
- make_recur_ending_count_special (ee);
- gtk_widget_show (priv->recurrence_ending_special);
- break;
-
- case ENDING_UNTIL:
- make_recur_ending_until_special (ee);
- gtk_widget_show (priv->recurrence_ending_special);
- break;
-
- case ENDING_FOREVER:
- gtk_widget_hide (priv->recurrence_ending_special);
- break;
-
- default:
- g_assert_not_reached ();
- }
-}
-
-enum recur_type {
- RECUR_NONE,
- RECUR_SIMPLE,
- RECUR_CUSTOM
-};
-
-static const int recur_type_map[] = {
- RECUR_NONE,
- RECUR_SIMPLE,
- RECUR_CUSTOM,
- -1
-};
-
-/* Sensitizes the recurrence widgets based on the state of the recurrence type
- * radio group.
- */
-static void
-sensitize_recur_widgets (EventEditor *ee)
-{
- EventEditorPrivate *priv;
- enum recur_type type;
- GtkWidget *label;
-
- priv = ee->priv;
-
- type = e_dialog_radio_get (priv->recurrence_none, recur_type_map);
-
- if (GTK_BIN (priv->recurrence_custom_warning_bin)->child)
- gtk_widget_destroy (GTK_BIN (priv->recurrence_custom_warning_bin)->child);
-
- switch (type) {
- case RECUR_NONE:
- gtk_widget_set_sensitive (priv->recurrence_params, FALSE);
- gtk_widget_show (priv->recurrence_params);
- gtk_widget_hide (priv->recurrence_custom_warning_bin);
- break;
-
- case RECUR_SIMPLE:
- gtk_widget_set_sensitive (priv->recurrence_params, TRUE);
- gtk_widget_show (priv->recurrence_params);
- gtk_widget_hide (priv->recurrence_custom_warning_bin);
- break;
-
- case RECUR_CUSTOM:
- gtk_widget_set_sensitive (priv->recurrence_params, FALSE);
- gtk_widget_hide (priv->recurrence_params);
-
- label = gtk_label_new (_("This appointment contains recurrences that Evolution "
- "cannot edit."));
- gtk_container_add (GTK_CONTAINER (priv->recurrence_custom_warning_bin), label);
- gtk_widget_show_all (priv->recurrence_custom_warning_bin);
- break;
-
- default:
- g_assert_not_reached ();
- }
-}
-
-/* Callback used when one of the recurrence type radio buttons is toggled. We
- * enable or the recurrence parameters.
- */
-static void
-recurrence_type_toggled_cb (GtkToggleButton *toggle, gpointer data)
-{
- EventEditor *ee;
-
- ee = EVENT_EDITOR (data);
-
- event_editor_set_changed (ee, TRUE);
-
- if (toggle->active) {
- sensitize_recur_widgets (ee);
- preview_recur (ee);
- }
-}
-
-/* Callback used when the recurrence interval value spin button changes. */
-static void
-recur_interval_value_changed_cb (GtkAdjustment *adj, gpointer data)
-{
- EventEditor *ee;
-
- ee = EVENT_EDITOR (data);
- event_editor_set_changed (ee, TRUE);
- preview_recur (ee);
-}
-
-/* Callback used when the recurrence interval option menu changes. We need to
- * change the contents of the recurrence special widget.
- */
-static void
-recur_interval_selection_done_cb (GtkMenuShell *menu_shell, gpointer data)
-{
- EventEditor *ee;
-
- ee = EVENT_EDITOR (data);
- event_editor_set_changed (ee, TRUE);
- make_recurrence_special (ee);
- preview_recur (ee);
-}
-
-/* Callback used when the recurrence ending option menu changes. We need to
- * change the contents of the ending special widget.
- */
-static void
-recur_ending_selection_done_cb (GtkMenuShell *menu_shell, gpointer data)
-{
- EventEditor *ee;
-
- ee = EVENT_EDITOR (data);
- event_editor_set_changed (ee, TRUE);
- make_recurrence_ending_special (ee);
- preview_recur (ee);
-}
-
-/* Gets the widgets from the XML file and returns if they are all available.
- * For the widgets whose values can be simply set with e-dialog-utils, it does
- * that as well.
- */
-static gboolean
-get_widgets (EventEditor *ee)
-{
- EventEditorPrivate *priv;
-
- priv = ee->priv;
-
-#define GW(name) glade_xml_get_widget (priv->xml, name)
-
- priv->app = GW ("event-editor-dialog");
-
- priv->general_summary = GW ("general-summary");
-
- priv->start_time = GW ("start-time");
- priv->end_time = GW ("end-time");
- priv->all_day_event = GW ("all-day-event");
-
- priv->description = GW ("description");
-
- priv->classification_public = GW ("classification-public");
- priv->classification_private = GW ("classification-private");
- priv->classification_confidential = GW ("classification-confidential");
-
- priv->categories = GW ("categories");
- priv->categories_btn = GW ("categories-button");
-
- priv->reminder_summary = GW ("reminder-summary");
- priv->reminder_starting_date = GW ("reminder-starting-date");
-
- priv->reminder_list = GW ("reminder-list");
- priv->reminder_add = GW ("reminder-add");
- priv->reminder_delete = GW ("reminder-delete");
-
- priv->reminder_action = GW ("reminder-action");
- priv->reminder_interval_value = GW ("reminder-interval-value");
- priv->reminder_value_units = GW ("reminder-value-units");
- priv->reminder_relative = GW ("reminder-relative");
- priv->reminder_time = GW ("reminder-time");
-
- priv->recurrence_summary = GW ("recurrence-summary");
- priv->recurrence_starting_date = GW ("recurrence-starting-date");
-
- priv->recurrence_none = GW ("recurrence-none");
- priv->recurrence_simple = GW ("recurrence-simple");
- priv->recurrence_custom = GW ("recurrence-custom");
- priv->recurrence_params = GW ("recurrence-params");
-
- priv->recurrence_interval_value = GW ("recurrence-interval-value");
- priv->recurrence_interval_unit = GW ("recurrence-interval-unit");
- priv->recurrence_special = GW ("recurrence-special");
- priv->recurrence_ending_menu = GW ("recurrence-ending-menu");
- priv->recurrence_ending_special = GW ("recurrence-ending-special");
- priv->recurrence_custom_warning_bin = GW ("recurrence-custom-warning-bin");
-
- priv->recurrence_exception_date = GW ("recurrence-exception-date");
- priv->recurrence_exception_list = GW ("recurrence-exception-list");
- priv->recurrence_exception_add = GW ("recurrence-exception-add");
- priv->recurrence_exception_modify = GW ("recurrence-exception-modify");
- priv->recurrence_exception_delete = GW ("recurrence-exception-delete");
-
- priv->recurrence_preview_bin = GW ("recurrence-preview-bin");
-
-#undef GW
-
- return (priv->app
- && priv->general_summary
- && priv->start_time
- && priv->end_time
- && priv->all_day_event
- && priv->description
- && priv->classification_public
- && priv->classification_private
- && priv->classification_confidential
- && priv->reminder_summary
- && priv->reminder_starting_date
- && priv->reminder_list
- && priv->reminder_add
- && priv->reminder_delete
- && priv->reminder_action
- && priv->reminder_interval_value
- && priv->reminder_value_units
- && priv->reminder_relative
- && priv->reminder_time
- && priv->recurrence_summary
- && priv->recurrence_starting_date
- && priv->recurrence_none
- && priv->recurrence_simple
- && priv->recurrence_custom
- && priv->recurrence_params
- && priv->recurrence_interval_value
- && priv->recurrence_interval_unit
- && priv->recurrence_special
- && priv->recurrence_ending_menu
- && priv->recurrence_ending_special
- && priv->recurrence_custom_warning_bin
- && priv->recurrence_exception_date
- && priv->recurrence_exception_list
- && priv->recurrence_exception_add
- && priv->recurrence_exception_modify
- && priv->recurrence_exception_delete
- && priv->recurrence_preview_bin);
-}
-
-/* Syncs the contents of two entry widgets, while blocking signals from each
- * other.
- */
-static void
-sync_entries (EventEditor *ee, GtkEditable *source, GtkEditable *dest)
-{
- char *str;
-
- gtk_signal_handler_block_by_data (GTK_OBJECT (dest), ee);
-
- str = gtk_editable_get_chars (source, 0, -1);
- gtk_entry_set_text (GTK_ENTRY (dest), str);
- g_free (str);
-
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (dest), ee);
-}
-
-/* Syncs the contents of two date editor widgets, while blocking signals on the
- * specified data.
- */
-static void
-sync_date_edits (EventEditor *ee, EDateEdit *source, EDateEdit *dest)
-{
- time_t t;
-
- gtk_signal_handler_block_by_data (GTK_OBJECT (dest), ee);
-
- t = e_date_edit_get_time (source);
- e_date_edit_set_time (dest, t);
-
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (dest), ee);
-}
-
-/* Callback used when one of the general or recurrence summary entries change;
- * we sync the other entry to it.
- */
-static void
-summary_changed_cb (GtkEditable *editable, gpointer data)
-{
- EventEditor *ee;
- EventEditorPrivate *priv;
-
- ee = EVENT_EDITOR (data);
- priv = ee->priv;
-
- if (editable != GTK_EDITABLE (priv->general_summary))
- sync_entries (ee, editable, GTK_EDITABLE (priv->general_summary));
- if (editable != GTK_EDITABLE (priv->reminder_summary))
- sync_entries (ee, editable, GTK_EDITABLE (priv->reminder_summary));
- if (editable != GTK_EDITABLE (priv->recurrence_summary))
- sync_entries (ee, editable, GTK_EDITABLE (priv->recurrence_summary));
-}
-
-/* Callback used when one of the general or recurrence starting date widgets
- * change; we sync the other date editor to it.
- */
-static void
-start_date_changed_cb (EDateEdit *de, gpointer data)
-{
- EventEditor *ee;
- EventEditorPrivate *priv;
-
- ee = EVENT_EDITOR (data);
- priv = ee->priv;
-
- if (de != E_DATE_EDIT (priv->start_time))
- sync_date_edits (ee,de, E_DATE_EDIT (priv->start_time));
- if (de != E_DATE_EDIT (priv->reminder_starting_date))
- sync_date_edits (ee, de, E_DATE_EDIT (priv->reminder_starting_date));
- if (de != E_DATE_EDIT (priv->recurrence_starting_date))
- sync_date_edits (ee, de, E_DATE_EDIT (priv->recurrence_starting_date));
-}
-
-/* Callback used when the displayed date range in the recurrence preview
- * calendar changes.
- */
-static void
-recur_preview_date_range_changed_cb (ECalendarItem *item, gpointer data)
-{
- EventEditor *ee;
-
- ee = EVENT_EDITOR (data);
- preview_recur (ee);
-}
-
-/* Hooks the widget signals */
-static void
-init_widgets (EventEditor *ee)
-{
- EventEditorPrivate *priv;
- GtkWidget *menu;
- GtkAdjustment *adj;
- ECalendar *ecal;
-
- priv = ee->priv;
-
- /* Summary in the main, reminder and recurrence pages */
- gtk_signal_connect (GTK_OBJECT (priv->general_summary), "changed",
- GTK_SIGNAL_FUNC (summary_changed_cb), ee);
- gtk_signal_connect (GTK_OBJECT (priv->reminder_summary), "changed",
- GTK_SIGNAL_FUNC (summary_changed_cb), ee);
- gtk_signal_connect (GTK_OBJECT (priv->recurrence_summary), "changed",
- GTK_SIGNAL_FUNC (summary_changed_cb), ee);
-
- /* Categories button */
- gtk_signal_connect (GTK_OBJECT (priv->categories_btn), "clicked",
- GTK_SIGNAL_FUNC (categories_clicked), ee);
-
- /* Start dates in the main and recurrence pages */
-
- gtk_signal_connect (GTK_OBJECT (priv->start_time), "changed",
- GTK_SIGNAL_FUNC (start_date_changed_cb), ee);
- gtk_signal_connect (GTK_OBJECT (priv->reminder_starting_date), "changed",
- GTK_SIGNAL_FUNC (start_date_changed_cb), ee);
- gtk_signal_connect (GTK_OBJECT (priv->recurrence_starting_date), "changed",
- GTK_SIGNAL_FUNC (start_date_changed_cb), ee);
-
- /* Start and end times */
-
- gtk_signal_connect (GTK_OBJECT (priv->start_time), "changed",
- GTK_SIGNAL_FUNC (date_changed_cb), ee);
- gtk_signal_connect (GTK_OBJECT (priv->end_time), "changed",
- GTK_SIGNAL_FUNC (date_changed_cb), ee);
-
- gtk_signal_connect (GTK_OBJECT (priv->all_day_event), "toggled",
- GTK_SIGNAL_FUNC (set_all_day), ee);
-
- /* Reminder buttons */
-
- gtk_signal_connect (GTK_OBJECT (priv->reminder_add), "clicked",
- GTK_SIGNAL_FUNC (reminder_add_cb), ee);
- gtk_signal_connect (GTK_OBJECT (priv->reminder_delete), "clicked",
- GTK_SIGNAL_FUNC (reminder_delete_cb), ee);
-
- /* Recurrence preview */
-
- priv->recurrence_preview_calendar = e_calendar_new ();
- ecal = E_CALENDAR (priv->recurrence_preview_calendar);
- gtk_signal_connect (GTK_OBJECT (ecal->calitem), "date_range_changed",
- GTK_SIGNAL_FUNC (recur_preview_date_range_changed_cb), ee);
- calendar_config_configure_e_calendar (ecal);
- e_calendar_item_set_max_days_sel (ecal->calitem, 0);
- gtk_container_add (GTK_CONTAINER (priv->recurrence_preview_bin),
- priv->recurrence_preview_calendar);
- gtk_widget_show (priv->recurrence_preview_calendar);
-
- /* Recurrence types */
-
- gtk_signal_connect (GTK_OBJECT (priv->recurrence_none), "toggled",
- GTK_SIGNAL_FUNC (recurrence_type_toggled_cb), ee);
- gtk_signal_connect (GTK_OBJECT (priv->recurrence_simple), "toggled",
- GTK_SIGNAL_FUNC (recurrence_type_toggled_cb), ee);
- gtk_signal_connect (GTK_OBJECT (priv->recurrence_custom), "toggled",
- GTK_SIGNAL_FUNC (recurrence_type_toggled_cb), ee);
-
- /* Recurrence interval */
-
- adj = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (priv->recurrence_interval_value));
- gtk_signal_connect (GTK_OBJECT (adj), "value_changed",
- GTK_SIGNAL_FUNC (recur_interval_value_changed_cb), ee);
-
- /* Recurrence units */
-
- menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (priv->recurrence_interval_unit));
- gtk_signal_connect (GTK_OBJECT (menu), "selection_done",
- GTK_SIGNAL_FUNC (recur_interval_selection_done_cb), ee);
-
- /* Recurrence ending */
-
- menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (priv->recurrence_ending_menu));
- gtk_signal_connect (GTK_OBJECT (menu), "selection_done",
- GTK_SIGNAL_FUNC (recur_ending_selection_done_cb), ee);
-
- /* Exception buttons */
-
- gtk_signal_connect (GTK_OBJECT (priv->recurrence_exception_add), "clicked",
- GTK_SIGNAL_FUNC (recurrence_exception_add_cb), ee);
- gtk_signal_connect (GTK_OBJECT (priv->recurrence_exception_modify), "clicked",
- GTK_SIGNAL_FUNC (recurrence_exception_modify_cb), ee);
- gtk_signal_connect (GTK_OBJECT (priv->recurrence_exception_delete), "clicked",
- GTK_SIGNAL_FUNC (recurrence_exception_delete_cb), ee);
-
- /* Selections in the exceptions list */
-
- gtk_signal_connect (GTK_OBJECT (priv->recurrence_exception_list), "select_row",
- GTK_SIGNAL_FUNC (recurrence_exception_select_row_cb), ee);
-
- /*
- * Connect the default signal handler to use to make sure the "changed"
- * field gets set whenever a field is changed.
- */
-
- /* Appointment Page */
- gtk_signal_connect (GTK_OBJECT (priv->general_summary), "changed",
- GTK_SIGNAL_FUNC (field_changed), ee);
- gtk_signal_connect (GTK_OBJECT (priv->description), "changed",
- GTK_SIGNAL_FUNC (field_changed), ee);
- gtk_signal_connect (GTK_OBJECT (priv->classification_public),
- "toggled",
- GTK_SIGNAL_FUNC (field_changed), ee);
- gtk_signal_connect (GTK_OBJECT (priv->classification_private),
- "toggled",
- GTK_SIGNAL_FUNC (field_changed), ee);
- gtk_signal_connect (GTK_OBJECT (priv->classification_confidential),
- "toggled",
- GTK_SIGNAL_FUNC (field_changed), ee);
-}
-
-static const int classification_map[] = {
- CAL_COMPONENT_CLASS_PUBLIC,
- CAL_COMPONENT_CLASS_PRIVATE,
- CAL_COMPONENT_CLASS_CONFIDENTIAL,
- -1
-};
-
-static const int month_pos_map[] = { 0, 1, 2, 3, 4, -1 };
-static const int weekday_map[] = { 0, 1, 2, 3, 4, 5, 6, -1 };
-
-/* Fills the widgets with default values */
-static void
-clear_widgets (EventEditor *ee)
-{
- EventEditorPrivate *priv;
- time_t now;
- GtkAdjustment *adj;
- GtkWidget *menu;
-
- priv = ee->priv;
-
- now = time (NULL);
-
- /* Summary, description */
-
- e_dialog_editable_set (priv->general_summary, NULL); /* will also change recur summary */
- e_dialog_editable_set (priv->description, NULL);
-
- /* Start and end times */
-
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->start_time), ee);
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->end_time), ee);
-
- e_date_edit_set_time (E_DATE_EDIT (priv->start_time), now); /* will set recur start too */
- e_date_edit_set_time (E_DATE_EDIT (priv->end_time), now);
-
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->start_time), ee);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->end_time), ee);
-
- check_all_day (ee);
-
- /* Classification */
-
- e_dialog_radio_set (priv->classification_public,
- CAL_COMPONENT_CLASS_PRIVATE, classification_map);
-
- /* Recurrences */
-
- priv->recurrence_weekday_day_mask = 0;
-
- priv->recurrence_month_index = 1;
- priv->recurrence_month_day = MONTH_DAY_NTH;
-
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->recurrence_none), ee);
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->recurrence_simple), ee);
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->recurrence_custom), ee);
- e_dialog_radio_set (priv->recurrence_none, RECUR_NONE, recur_type_map);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->recurrence_none), ee);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->recurrence_simple), ee);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->recurrence_custom), ee);
-
- adj = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (priv->recurrence_interval_value));
- gtk_signal_handler_block_by_data (GTK_OBJECT (adj), ee);
- e_dialog_spin_set (priv->recurrence_interval_value, 1);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (adj), ee);
-
- menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (priv->recurrence_interval_unit));
- gtk_signal_handler_block_by_data (GTK_OBJECT (menu), ee);
- e_dialog_option_menu_set (priv->recurrence_interval_unit, ICAL_DAILY_RECURRENCE,
- recur_freq_map);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (menu), ee);
-
- priv->recurrence_ending_date = time (NULL);
- priv->recurrence_ending_count = 1;
-
- menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (priv->recurrence_ending_menu));
- gtk_signal_handler_block_by_data (GTK_OBJECT (menu), ee);
- e_dialog_option_menu_set (priv->recurrence_ending_menu, ENDING_FOREVER,
- ending_types_map);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (menu), ee);
-
- /* Exceptions list */
-
- free_exception_clist_data (GTK_CLIST (priv->recurrence_exception_list));
-}
-
-/* Fills the recurrence ending date widgets with the values from the calendar
- * component.
- */
-static void
-fill_ending_date (EventEditor *ee, struct icalrecurrencetype *r)
-{
- EventEditorPrivate *priv;
- GtkWidget *menu;
-
- priv = ee->priv;
-
- menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (priv->recurrence_ending_menu));
- gtk_signal_handler_block_by_data (GTK_OBJECT (menu), ee);
-
- if (r->count == 0) {
- if (r->until.year == 0) {
- /* Forever */
-
- e_dialog_option_menu_set (priv->recurrence_ending_menu,
- ENDING_FOREVER,
- ending_types_map);
- } else {
- /* Ending date */
-
- priv->recurrence_ending_date = icaltime_as_timet (r->until);
- e_dialog_option_menu_set (priv->recurrence_ending_menu,
- ENDING_UNTIL,
- ending_types_map);
- }
- } else {
- /* Count of occurrences */
-
- priv->recurrence_ending_count = r->count;
- e_dialog_option_menu_set (priv->recurrence_ending_menu,
- ENDING_FOR,
- ending_types_map);
- }
-
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (menu), ee);
-
- make_recurrence_ending_special (ee);
-}
-
-/* Counts the number of elements in the by_xxx fields of an icalrecurrencetype */
-static int
-count_by_xxx (short *field, int max_elements)
-{
- int i;
-
- for (i = 0; i < max_elements; i++)
- if (field[i] == ICAL_RECURRENCE_ARRAY_MAX)
- break;
-
- return i;
-}
-
-/* Re-tags the recurrence preview calendar based on the current information of
- * the event editor.
- */
-static void
-preview_recur (EventEditor *ee)
-{
- EventEditorPrivate *priv;
- CalComponent *comp;
- CalComponentDateTime cdt;
- GSList *l;
-
- priv = ee->priv;
- g_assert (priv->comp != NULL);
-
- /* Create a scratch component with the start/end and
- * recurrence/excepttion information from the one we are editing.
- */
-
- comp = cal_component_new ();
- cal_component_set_new_vtype (comp, CAL_COMPONENT_EVENT);
-
- cal_component_get_dtstart (priv->comp, &cdt);
- cal_component_set_dtstart (comp, &cdt);
- cal_component_free_datetime (&cdt);
-
- cal_component_get_dtend (priv->comp, &cdt);
- cal_component_set_dtend (comp, &cdt);
- cal_component_free_datetime (&cdt);
-
- cal_component_get_exdate_list (priv->comp, &l);
- cal_component_set_exdate_list (comp, l);
- cal_component_free_exdate_list (l);
-
- cal_component_get_exrule_list (priv->comp, &l);
- cal_component_set_exrule_list (comp, l);
- cal_component_free_recur_list (l);
-
- cal_component_get_rdate_list (priv->comp, &l);
- cal_component_set_rdate_list (comp, l);
- cal_component_free_period_list (l);
-
- cal_component_get_rrule_list (priv->comp, &l);
- cal_component_set_rrule_list (comp, l);
- cal_component_free_recur_list (l);
-
- recur_to_comp_object (ee, comp);
-
- tag_calendar_by_comp (E_CALENDAR (priv->recurrence_preview_calendar), comp);
- gtk_object_unref (GTK_OBJECT (comp));
-}
-
-/* Fills in the exception widgets with the data from the calendar component */
-static void
-fill_exception_widgets (EventEditor *ee)
-{
- EventEditorPrivate *priv;
- GSList *list, *l;
- gboolean added;
-
- priv = ee->priv;
- g_assert (priv->comp != NULL);
-
- /* Exceptions list */
-
- cal_component_get_exdate_list (priv->comp, &list);
-
- added = FALSE;
-
- for (l = list; l; l = l->next) {
- CalComponentDateTime *cdt;
- time_t ext;
-
- added = TRUE;
-
- cdt = l->data;
- ext = icaltime_as_timet (*cdt->value);
- append_exception (ee, ext);
- }
-
- cal_component_free_exdate_list (list);
-
- if (added)
- gtk_clist_select_row (GTK_CLIST (priv->recurrence_exception_list), 0, 0);
-}
-
-/* Computes a weekday mask for the start day of a calendar component, for use in
- * a WeekdayPicker widget.
- */
-static guint8
-get_start_weekday_mask (CalComponent *comp)
-{
- CalComponentDateTime dt;
- guint8 retval;
-
- cal_component_get_dtstart (comp, &dt);
-
- if (dt.value) {
- time_t t;
- struct tm tm;
-
- t = icaltime_as_timet (*dt.value);
- tm = *localtime (&t);
-
- retval = 0x1 << tm.tm_wday;
- } else
- retval = 0;
-
- cal_component_free_datetime (&dt);
-
- return retval;
-}
-
-/* Sets some sane defaults for the data sources for the recurrence special
- * widgets, even if they will not be used immediately.
- */
-static void
-set_recur_special_defaults (EventEditor *ee)
-{
- EventEditorPrivate *priv;
- guint8 mask;
-
- priv = ee->priv;
-
- mask = get_start_weekday_mask (priv->comp);
-
- priv->recurrence_weekday_day_mask = mask;
- priv->recurrence_weekday_blocked_day_mask = mask;
-}
-
-static char *
-get_alarm_duration_string (struct icaldurationtype *duration)
-{
- GString *string = g_string_new (NULL);
- char *ret;
-
- if (duration->days > 1)
- g_string_sprintf (string, _(" %d days"), duration->days);
- else if (duration->days == 1)
- g_string_append (string, _(" 1 day"));
-
- if (duration->weeks > 1)
- g_string_sprintf (string, _(" %d weeks"), duration->weeks);
- else if (duration->weeks == 1)
- g_string_append (string, _(" 1 week"));
-
- if (duration->hours > 1)
- g_string_sprintf (string, _(" %d hours"), duration->hours);
- else if (duration->hours == 1)
- g_string_append (string, _(" 1 hour"));
-
- if (duration->minutes > 1)
- g_string_sprintf (string, _(" %d minutes"), duration->minutes);
- else if (duration->minutes == 1)
- g_string_append (string, _(" 1 minute"));
-
- if (duration->seconds > 1)
- g_string_sprintf (string, _(" %d seconds"), duration->seconds);
- else if (duration->seconds == 1)
- g_string_append (string, _(" 1 second"));
-
- ret = string->str;
- g_string_free (string, FALSE);
-
- return ret;
-}
-
-static char *
-get_alarm_string (CalComponentAlarm *alarm)
-{
- CalAlarmAction action;
- CalAlarmTrigger trigger;
- char string[256];
- char *dur;
-
- string [0] = '\0';
-
- cal_component_alarm_get_action (alarm, &action);
- cal_component_alarm_get_trigger (alarm, &trigger);
-
- switch (action) {
- case CAL_ALARM_AUDIO:
- strcat (string, _("Play a sound"));
- break;
- case CAL_ALARM_DISPLAY:
- strcat (string, _("Show a dialog"));
- break;
- case CAL_ALARM_EMAIL:
- strcat (string, _("Send an email"));
- break;
- case CAL_ALARM_PROCEDURE:
- strcat (string, _("Run a program"));
- break;
- case CAL_ALARM_NONE:
- case CAL_ALARM_UNKNOWN:
- strcat (string, _("Unknown"));
- break;
- }
-
- switch (trigger.type) {
- case CAL_ALARM_TRIGGER_RELATIVE_START:
- dur = get_alarm_duration_string (&trigger.u.rel_duration);
- strcat (string, dur);
- g_free (dur);
-
- if (trigger.u.rel_duration.is_neg)
- strcat (string, _(" before start of appointment"));
- else
- strcat (string, _(" after start of appointment"));
- break;
- case CAL_ALARM_TRIGGER_RELATIVE_END:
- dur = get_alarm_duration_string (&trigger.u.rel_duration);
- strcat (string, dur);
- g_free (dur);
-
- if (trigger.u.rel_duration.is_neg)
- strcat (string, _(" before end of appointment"));
- else
- strcat (string, _(" after end of appointment"));
- break;
- case CAL_ALARM_TRIGGER_NONE:
- case CAL_ALARM_TRIGGER_ABSOLUTE:
- strcat (string, _("Unknown"));
- break;
- }
-
- return g_strdup (string);
-}
-
-static void
-fill_reminder_widgets (EventEditor *ee)
-{
- EventEditorPrivate *priv;
- GList *alarms, *l;
- GtkCList *clist;
-
- int row = 0;
-
- priv = ee->priv;
- g_assert (priv->comp != NULL);
-
- if (!cal_component_has_alarms (priv->comp))
- return;
-
- alarms = cal_component_get_alarm_uids (priv->comp);
-
- clist = GTK_CLIST (priv->reminder_list);
- for (l = alarms; l != NULL; l = l->next, row++) {
- CalComponentAlarm *ca = cal_component_get_alarm (priv->comp, l->data);
-
- /* Add it to the clist */
- append_reminder (ee, ca, EXISTING_ALARM);
- }
- cal_component_free_alarm_uids (alarms);
-}
-
-/* Fills in the recurrence widgets with the values from the calendar component.
- * This function is particularly tricky because it has to discriminate between
- * recurrences we support for editing and the ones we don't. We only support at
- * most one recurrence rule; no rdates or exrules (exdates are handled just fine
- * elsewhere).
- */
-static void
-fill_recurrence_widgets (EventEditor *ee)
-{
- EventEditorPrivate *priv;
- GSList *rrule_list;
- int len;
- struct icalrecurrencetype *r;
- int n_by_second, n_by_minute, n_by_hour;
- int n_by_day, n_by_month_day, n_by_year_day;
- int n_by_week_no, n_by_month, n_by_set_pos;
- GtkWidget *menu;
- GtkAdjustment *adj;
-
- priv = ee->priv;
- g_assert (priv->comp != NULL);
-
- fill_exception_widgets (ee);
-
- /* Set up defaults for the special widgets */
-
- set_recur_special_defaults (ee);
-
- /* No recurrences? */
-
- if (!cal_component_has_rdates (priv->comp)
- && !cal_component_has_rrules (priv->comp)
- && !cal_component_has_exrules (priv->comp)) {
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->recurrence_none), ee);
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->recurrence_simple), ee);
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->recurrence_custom), ee);
- e_dialog_radio_set (priv->recurrence_none, RECUR_NONE, recur_type_map);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->recurrence_none), ee);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->recurrence_simple), ee);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->recurrence_custom), ee);
-
- gtk_widget_set_sensitive (priv->recurrence_custom, FALSE);
-
- sensitize_recur_widgets (ee);
- preview_recur (ee);
- return;
- }
-
- /* See if it is a custom set we don't support */
-
- cal_component_get_rrule_list (priv->comp, &rrule_list);
- len = g_slist_length (rrule_list);
- if (len > 1
- || cal_component_has_rdates (priv->comp)
- || cal_component_has_exrules (priv->comp))
- goto custom;
-
- /* Down to one rule, so test that one */
-
- g_assert (len == 1);
- r = rrule_list->data;
-
- /* Any funky frequency? */
-
- if (r->freq == ICAL_SECONDLY_RECURRENCE
- || r->freq == ICAL_MINUTELY_RECURRENCE
- || r->freq == ICAL_HOURLY_RECURRENCE)
- goto custom;
-
- /* Any funky shit? */
-
-#define N_HAS_BY(field) (count_by_xxx (field, sizeof (field) / sizeof (field[0])))
-
- n_by_second = N_HAS_BY (r->by_second);
- n_by_minute = N_HAS_BY (r->by_minute);
- n_by_hour = N_HAS_BY (r->by_hour);
- n_by_day = N_HAS_BY (r->by_day);
- n_by_month_day = N_HAS_BY (r->by_month_day);
- n_by_year_day = N_HAS_BY (r->by_year_day);
- n_by_week_no = N_HAS_BY (r->by_week_no);
- n_by_month = N_HAS_BY (r->by_month);
- n_by_set_pos = N_HAS_BY (r->by_set_pos);
-
- if (n_by_second != 0
- || n_by_minute != 0
- || n_by_hour != 0)
- goto custom;
-
- /* Filter the funky shit based on the frequency; if there is nothing
- * weird we can actually set the widgets.
- */
-
- switch (r->freq) {
- case ICAL_DAILY_RECURRENCE:
- if (n_by_day != 0
- || n_by_month_day != 0
- || n_by_year_day != 0
- || n_by_week_no != 0
- || n_by_month != 0
- || n_by_set_pos != 0)
- goto custom;
-
- menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (priv->recurrence_interval_unit));
- gtk_signal_handler_block_by_data (GTK_OBJECT (menu), ee);
- e_dialog_option_menu_set (priv->recurrence_interval_unit, ICAL_DAILY_RECURRENCE,
- recur_freq_map);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (menu), ee);
- break;
-
- case ICAL_WEEKLY_RECURRENCE: {
- int i;
- guint8 day_mask;
-
- if (n_by_month_day != 0
- || n_by_year_day != 0
- || n_by_week_no != 0
- || n_by_month != 0
- || n_by_set_pos != 0)
- goto custom;
-
- day_mask = 0;
-
- for (i = 0; i < 8 && r->by_day[i] != ICAL_RECURRENCE_ARRAY_MAX; i++) {
- enum icalrecurrencetype_weekday weekday;
- int pos;
-
- weekday = icalrecurrencetype_day_day_of_week (r->by_day[i]);
- pos = icalrecurrencetype_day_position (r->by_day[i]);
-
- if (pos != 0)
- goto custom;
-
- switch (weekday) {
- case ICAL_SUNDAY_WEEKDAY:
- day_mask |= 1 << 0;
- break;
-
- case ICAL_MONDAY_WEEKDAY:
- day_mask |= 1 << 1;
- break;
-
- case ICAL_TUESDAY_WEEKDAY:
- day_mask |= 1 << 2;
- break;
-
- case ICAL_WEDNESDAY_WEEKDAY:
- day_mask |= 1 << 3;
- break;
-
- case ICAL_THURSDAY_WEEKDAY:
- day_mask |= 1 << 4;
- break;
-
- case ICAL_FRIDAY_WEEKDAY:
- day_mask |= 1 << 5;
- break;
-
- case ICAL_SATURDAY_WEEKDAY:
- day_mask |= 1 << 6;
- break;
-
- default:
- break;
- }
- }
-
- priv->recurrence_weekday_day_mask = day_mask;
-
- menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (priv->recurrence_interval_unit));
- gtk_signal_handler_block_by_data (GTK_OBJECT (menu), ee);
- e_dialog_option_menu_set (priv->recurrence_interval_unit, ICAL_WEEKLY_RECURRENCE,
- recur_freq_map);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (menu), ee);
- break;
- }
-
- case ICAL_MONTHLY_RECURRENCE:
- if (n_by_year_day != 0
- || n_by_week_no != 0
- || n_by_month != 0
- || n_by_set_pos != 0)
- goto custom;
-
- if (n_by_month_day == 1) {
- int nth;
-
- nth = r->by_month_day[0];
- if (nth < 1)
- goto custom;
-
- priv->recurrence_month_index = nth;
- priv->recurrence_month_day = MONTH_DAY_NTH;
- } else if (n_by_day == 1) {
- enum icalrecurrencetype_weekday weekday;
- int pos;
- enum month_day_options month_day;
-
- weekday = icalrecurrencetype_day_day_of_week (r->by_day[0]);
- pos = icalrecurrencetype_day_position (r->by_day[0]);
-
- if (pos < 1)
- goto custom;
-
- switch (weekday) {
- case ICAL_MONDAY_WEEKDAY:
- month_day = MONTH_DAY_MON;
- break;
-
- case ICAL_TUESDAY_WEEKDAY:
- month_day = MONTH_DAY_TUE;
- break;
-
- case ICAL_WEDNESDAY_WEEKDAY:
- month_day = MONTH_DAY_WED;
- break;
-
- case ICAL_THURSDAY_WEEKDAY:
- month_day = MONTH_DAY_THU;
- break;
-
- case ICAL_FRIDAY_WEEKDAY:
- month_day = MONTH_DAY_FRI;
- break;
-
- case ICAL_SATURDAY_WEEKDAY:
- month_day = MONTH_DAY_SAT;
- break;
-
- case ICAL_SUNDAY_WEEKDAY:
- month_day = MONTH_DAY_SUN;
- break;
-
- default:
- goto custom;
- }
-
- priv->recurrence_month_index = pos;
- priv->recurrence_month_day = month_day;
- } else
- goto custom;
-
- menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (priv->recurrence_interval_unit));
- gtk_signal_handler_block_by_data (GTK_OBJECT (menu), ee);
- e_dialog_option_menu_set (priv->recurrence_interval_unit, ICAL_MONTHLY_RECURRENCE,
- recur_freq_map);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (menu), ee);
- break;
-
- case ICAL_YEARLY_RECURRENCE:
- if (n_by_day != 0
- || n_by_month_day != 0
- || n_by_year_day != 0
- || n_by_week_no != 0
- || n_by_month != 0
- || n_by_set_pos != 0)
- goto custom;
-
- menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (priv->recurrence_interval_unit));
- gtk_signal_handler_block_by_data (GTK_OBJECT (menu), ee);
- e_dialog_option_menu_set (priv->recurrence_interval_unit, ICAL_YEARLY_RECURRENCE,
- recur_freq_map);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (menu), ee);
- break;
-
- default:
- goto custom;
- }
-
- /* If we got here it means it is a simple recurrence */
-
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->recurrence_none), ee);
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->recurrence_simple), ee);
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->recurrence_custom), ee);
- e_dialog_radio_set (priv->recurrence_simple, RECUR_SIMPLE, recur_type_map);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->recurrence_none), ee);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->recurrence_simple), ee);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->recurrence_custom), ee);
-
- gtk_widget_set_sensitive (priv->recurrence_custom, FALSE);
-
- sensitize_recur_widgets (ee);
- make_recurrence_special (ee);
-
- adj = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (priv->recurrence_interval_value));
- gtk_signal_handler_block_by_data (GTK_OBJECT (adj), ee);
- e_dialog_spin_set (priv->recurrence_interval_value, r->interval);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (adj), ee);
-
- fill_ending_date (ee, r);
-
- goto out;
-
- custom:
-
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->recurrence_none), ee);
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->recurrence_simple), ee);
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->recurrence_custom), ee);
- e_dialog_radio_set (priv->recurrence_custom, RECUR_CUSTOM, recur_type_map);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->recurrence_none), ee);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->recurrence_simple), ee);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->recurrence_custom), ee);
-
- gtk_widget_set_sensitive (priv->recurrence_custom, TRUE);
- sensitize_recur_widgets (ee);
-
- out:
-
- cal_component_free_recur_list (rrule_list);
- preview_recur (ee);
-}
-
-/* Fills in the widgets with the value from the calendar component */
-static void
-fill_widgets (EventEditor *ee)
-{
- EventEditorPrivate *priv;
- CalComponentText text;
- CalComponentClassification cl;
- CalComponentDateTime d;
- GSList *l;
- time_t dtstart, dtend;
- const char *categories;
-
- priv = ee->priv;
-
- clear_widgets (ee);
-
- if (!priv->comp)
- return;
-
- /* Summary, description(s) */
-
- cal_component_get_summary (priv->comp, &text);
- e_dialog_editable_set (priv->general_summary, text.value); /* will also set recur summary */
-
- cal_component_get_description_list (priv->comp, &l);
- if (l) {
- text = *(CalComponentText *)l->data;
- e_dialog_editable_set (priv->description, text.value);
- }
- cal_component_free_text_list (l);
-
- /* Start and end times */
-
- /* All-day events are inclusive, i.e. if the end date shown is 2nd Feb
- then the event includes all of the 2nd Feb. We would normally show
- 3rd Feb as the end date, since it really ends at midnight on 3rd,
- so we have to subtract a day so we only show the 2nd. */
- cal_component_get_dtstart (priv->comp, &d);
- dtstart = icaltime_as_timet (*d.value);
- cal_component_free_datetime (&d);
-
- cal_component_get_dtend (priv->comp, &d);
- dtend = icaltime_as_timet (*d.value);
- cal_component_free_datetime (&d);
-
- if (time_day_begin (dtstart) == dtstart
- && time_day_begin (dtend) == dtend) {
- dtend = time_add_day (dtend, -1);
- }
-
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->start_time), ee);
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->end_time), ee);
-
- e_date_edit_set_time (E_DATE_EDIT (priv->start_time), dtstart);
- e_date_edit_set_time (E_DATE_EDIT (priv->reminder_starting_date), dtstart);
- e_date_edit_set_time (E_DATE_EDIT (priv->recurrence_starting_date), dtstart);
- e_date_edit_set_time (E_DATE_EDIT (priv->end_time), dtend);
-
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->start_time), ee);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->end_time), ee);
-
- check_all_day (ee);
-
- /* Classification */
-
- cal_component_get_classification (priv->comp, &cl);
-
- switch (cl) {
- case CAL_COMPONENT_CLASS_PUBLIC:
- e_dialog_radio_set (priv->classification_public, CAL_COMPONENT_CLASS_PUBLIC,
- classification_map);
- case CAL_COMPONENT_CLASS_PRIVATE:
- e_dialog_radio_set (priv->classification_public, CAL_COMPONENT_CLASS_PRIVATE,
- classification_map);
- case CAL_COMPONENT_CLASS_CONFIDENTIAL:
- e_dialog_radio_set (priv->classification_public, CAL_COMPONENT_CLASS_CONFIDENTIAL,
- classification_map);
- default:
- /* What do do? We can't g_assert_not_reached() since it is a
- * value from an external file.
- */
- }
-
- /* Categories */
- cal_component_get_categories (priv->comp, &categories);
- e_dialog_editable_set (priv->categories, categories);
-
- /* Reminders */
- fill_reminder_widgets (ee);
-
- /* Recurrences */
- fill_recurrence_widgets (ee);
-
- /* Do this last, since the callbacks will set it to TRUE. */
- event_editor_set_changed (ee, FALSE);
-}
-
-
-/**
- * event_editor_update_widgets:
- * @ee: An event editor.
- *
- * Causes an event editor dialog to re-read the values of its calendar component
- * object. This function should be used if the #CalComponent is changed by
- * external means while it is open in the editor.
- **/
-void
-event_editor_update_widgets (EventEditor *ee)
-{
- g_return_if_fail (ee != NULL);
- g_return_if_fail (IS_EVENT_EDITOR (ee));
-
- fill_widgets (ee);
-}
-
-
-
-/* Decode the radio button group for classifications */
-static CalComponentClassification
-classification_get (GtkWidget *widget)
-{
- return e_dialog_radio_get (widget, classification_map);
-}
-
-/* Encondes a position/weekday pair into the proper format for
- * icalrecurrencetype.by_day.
- */
-static short
-nth_weekday (int pos, icalrecurrencetype_weekday weekday)
-{
- g_assert (pos > 0 && pos <= 5);
-
- return (pos << 3) | (int) weekday;
-}
-
-static void
-reminder_to_comp_object (EventEditor *ee, CalComponent *comp)
-{
- EventEditorPrivate *priv;
- GtkCList *reminder_list;
- ReminderData *rdata;
- int i;
-
- priv = ee->priv;
-
- reminder_list = GTK_CLIST (priv->reminder_list);
- for (i = 0; i < reminder_list->rows; i++) {
- rdata = gtk_clist_get_row_data (reminder_list, i);
- if (rdata->status == NEW_ALARM)
- cal_component_add_alarm (priv->comp, rdata->alarm);
- g_free (rdata);
- }
-}
-
-/* Gets the simple recurrence data from the recurrence widgets and stores it in
- * the calendar component object.
- */
-static void
-simple_recur_to_comp_object (EventEditor *ee, CalComponent *comp)
-{
- EventEditorPrivate *priv;
- struct icalrecurrencetype r;
- GSList l;
- enum ending_type ending_type;
-
- priv = ee->priv;
-
- icalrecurrencetype_clear (&r);
-
- /* Frequency, interval, week start */
-
- r.freq = e_dialog_option_menu_get (priv->recurrence_interval_unit, recur_freq_map);
- r.interval = e_dialog_spin_get_int (priv->recurrence_interval_value);
- r.week_start = ICAL_SUNDAY_WEEKDAY + calendar_config_get_week_start_day ();
-
- /* Frequency-specific data */
-
- switch (r.freq) {
- case ICAL_DAILY_RECURRENCE:
- /* Nothing else is required */
- break;
-
- case ICAL_WEEKLY_RECURRENCE: {
- guint8 day_mask;
- int i;
-
- g_assert (GTK_BIN (priv->recurrence_special)->child != NULL);
- g_assert (priv->recurrence_weekday_picker != NULL);
- g_assert (IS_WEEKDAY_PICKER (priv->recurrence_weekday_picker));
-
- day_mask = weekday_picker_get_days (WEEKDAY_PICKER (priv->recurrence_weekday_picker));
-
- i = 0;
-
- if (day_mask & (1 << 0))
- r.by_day[i++] = ICAL_SUNDAY_WEEKDAY;
-
- if (day_mask & (1 << 1))
- r.by_day[i++] = ICAL_MONDAY_WEEKDAY;
-
- if (day_mask & (1 << 2))
- r.by_day[i++] = ICAL_TUESDAY_WEEKDAY;
-
- if (day_mask & (1 << 3))
- r.by_day[i++] = ICAL_WEDNESDAY_WEEKDAY;
-
- if (day_mask & (1 << 4))
- r.by_day[i++] = ICAL_THURSDAY_WEEKDAY;
-
- if (day_mask & (1 << 5))
- r.by_day[i++] = ICAL_FRIDAY_WEEKDAY;
-
- if (day_mask & (1 << 6))
- r.by_day[i++] = ICAL_SATURDAY_WEEKDAY;
-
- break;
- }
-
- case ICAL_MONTHLY_RECURRENCE: {
- int day_index;
- enum month_day_options month_day;
-
- g_assert (GTK_BIN (priv->recurrence_special)->child != NULL);
- g_assert (priv->recurrence_month_index_spin != NULL);
- g_assert (GTK_IS_SPIN_BUTTON (priv->recurrence_month_index_spin));
- g_assert (priv->recurrence_month_day_menu != NULL);
- g_assert (GTK_IS_OPTION_MENU (priv->recurrence_month_day_menu));
-
- day_index = e_dialog_spin_get_int (priv->recurrence_month_index_spin);
- month_day = e_dialog_option_menu_get (priv->recurrence_month_day_menu,
- month_day_options_map);
-
- switch (month_day) {
- case MONTH_DAY_NTH:
- r.by_month_day[0] = day_index;
- break;
-
- case MONTH_DAY_MON:
- r.by_day[0] = nth_weekday (day_index, ICAL_MONDAY_WEEKDAY);
- break;
-
- case MONTH_DAY_TUE:
- r.by_day[0] = nth_weekday (day_index, ICAL_TUESDAY_WEEKDAY);
- break;
-
- case MONTH_DAY_WED:
- r.by_day[0] = nth_weekday (day_index, ICAL_WEDNESDAY_WEEKDAY);
- break;
-
- case MONTH_DAY_THU:
- r.by_day[0] = nth_weekday (day_index, ICAL_THURSDAY_WEEKDAY);
- break;
-
- case MONTH_DAY_FRI:
- r.by_day[0] = nth_weekday (day_index, ICAL_FRIDAY_WEEKDAY);
- break;
-
- case MONTH_DAY_SAT:
- r.by_day[0] = nth_weekday (day_index, ICAL_SATURDAY_WEEKDAY);
- break;
-
- case MONTH_DAY_SUN:
- r.by_day[0] = nth_weekday (day_index, ICAL_SUNDAY_WEEKDAY);
- break;
-
- default:
- g_assert_not_reached ();
- }
-
- break;
- }
-
- case ICAL_YEARLY_RECURRENCE:
- /* Nothing else is required */
- break;
-
- default:
- g_assert_not_reached ();
- }
-
- /* Ending date */
-
- ending_type = e_dialog_option_menu_get (priv->recurrence_ending_menu, ending_types_map);
-
- switch (ending_type) {
- case ENDING_FOR:
- g_assert (priv->recurrence_ending_count_spin != NULL);
- g_assert (GTK_IS_SPIN_BUTTON (priv->recurrence_ending_count_spin));
-
- r.count = e_dialog_spin_get_int (priv->recurrence_ending_count_spin);
- break;
-
- case ENDING_UNTIL:
- g_assert (priv->recurrence_ending_date_edit != NULL);
- g_assert (E_IS_DATE_EDIT (priv->recurrence_ending_date_edit));
-
- r.until = icaltime_from_timet (
- e_date_edit_get_time (E_DATE_EDIT (priv->recurrence_ending_date_edit)),
- TRUE);
- break;
-
- case ENDING_FOREVER:
- /* Nothing to be done */
- break;
-
- default:
- g_assert_not_reached ();
- }
-
- /* Set the recurrence */
-
- l.data = &r;
- l.next = NULL;
-
- cal_component_set_rrule_list (comp, &l);
-}
-
-/* Gets the data from the recurrence widgets and stores it in the calendar
- * component object.
- */
-static void
-recur_to_comp_object (EventEditor *ee, CalComponent *comp)
-{
- EventEditorPrivate *priv;
- enum recur_type recur_type;
- GtkCList *exception_list;
- GSList *list;
- int i;
-
- priv = ee->priv;
-
- recur_type = e_dialog_radio_get (priv->recurrence_none, recur_type_map);
-
- switch (recur_type) {
- case RECUR_NONE:
- cal_component_set_rdate_list (comp, NULL);
- cal_component_set_rrule_list (comp, NULL);
- cal_component_set_exrule_list (comp, NULL);
- break;
-
- case RECUR_SIMPLE:
- cal_component_set_rdate_list (comp, NULL);
- cal_component_set_exrule_list (comp, NULL);
- simple_recur_to_comp_object (ee, comp);
- break;
-
- case RECUR_CUSTOM:
- /* We just keep whatever the component has currently */
- break;
-
- default:
- g_assert_not_reached ();
- }
-
- /* Set exceptions */
-
- list = NULL;
- exception_list = GTK_CLIST (priv->recurrence_exception_list);
- for (i = 0; i < exception_list->rows; i++) {
- CalComponentDateTime *cdt;
- time_t *tim;
-
- cdt = g_new (CalComponentDateTime, 1);
- cdt->value = g_new (struct icaltimetype, 1);
- cdt->tzid = NULL;
-
- tim = gtk_clist_get_row_data (exception_list, i);
- g_assert (tim != NULL);
- *cdt->value = icaltime_from_timet (*tim, FALSE);
-
- list = g_slist_prepend (list, cdt);
- }
-
- cal_component_set_exdate_list (comp, list);
- cal_component_free_exdate_list (list);
-}
-
-/* Gets the data from the widgets and stores it in the calendar component object */
-static void
-dialog_to_comp_object (EventEditor *ee, CalComponent *comp)
-{
- EventEditorPrivate *priv;
- CalComponentDateTime date;
- time_t t;
- gboolean all_day_event;
- char *cat, *str;
-
- priv = ee->priv;
-
- /* Summary */
-
- str = e_dialog_editable_get (priv->general_summary);
- if (!str || strlen (str) == 0)
- cal_component_set_summary (comp, NULL);
- else {
- CalComponentText text;
-
- text.value = str;
- text.altrep = NULL;
-
- cal_component_set_summary (comp, &text);
- }
-
- if (str)
- g_free (str);
-
- /* Description */
-
- str = e_dialog_editable_get (priv->description);
- if (!str || strlen (str) == 0)
- cal_component_set_description_list (comp, NULL);
- else {
- GSList l;
- CalComponentText text;
-
- text.value = str;
- text.altrep = NULL;
- l.data = &text;
- l.next = NULL;
-
- cal_component_set_description_list (comp, &l);
- }
-
- if (str)
- g_free (str);
-
- /* Dates */
-
- date.value = g_new (struct icaltimetype, 1);
- date.tzid = NULL;
-
- t = e_date_edit_get_time (E_DATE_EDIT (priv->start_time));
- if (t != -1) {
- *date.value = icaltime_from_timet (t, FALSE);
- cal_component_set_dtstart (comp, &date);
- } else {
- /* FIXME: What do we do here? */
- }
-
- /* If the all_day toggle is set, the end date is inclusive of the
- entire day on which it points to. */
- all_day_event = e_dialog_toggle_get (priv->all_day_event);
- t = e_date_edit_get_time (E_DATE_EDIT (priv->end_time));
- if (t != -1) {
- if (all_day_event)
- t = time_day_end (t);
-
- *date.value = icaltime_from_timet (t, FALSE);
- cal_component_set_dtend (comp, &date);
- } else {
- /* FIXME: What do we do here? */
- }
- g_free (date.value);
-
- /* Categories */
- cat = e_dialog_editable_get (priv->categories);
- cal_component_set_categories (comp, cat);
-
- if (cat)
- g_free (cat);
-
- cal_component_set_classification (comp, classification_get (priv->classification_public));
-
- /* Reminder information */
- reminder_to_comp_object (ee, comp);
-
- /* Recurrence information */
- recur_to_comp_object (ee, comp);
-
- cal_component_commit_sequence (comp);
-}
-
-/* Fills the calendar component object from the data in the widgets and commits
- * the component to the storage.
- */
-static void
-save_event_object (EventEditor *ee)
-{
- EventEditorPrivate *priv;
-
- priv = ee->priv;
-
- if (!priv->comp)
- return;
-
- dialog_to_comp_object (ee, priv->comp);
- set_title_from_comp (ee, priv->comp);
-
- if (!cal_client_update_object (priv->client, priv->comp))
- g_message ("save_event_object(): Could not update the object!");
- else
- event_editor_set_changed (ee, FALSE);
-}
-
-/* Closes the dialog box and emits the appropriate signals */
-static void
-close_dialog (EventEditor *ee)
-{
- EventEditorPrivate *priv;
-
- priv = ee->priv;
-
- g_assert (priv->app != NULL);
-
- gtk_object_destroy (GTK_OBJECT (ee));
-}
-
-
-
-/* Callback used when the dialog box is "applied" */
-static void
-ee_apply_event_cb (GtkWidget *widget, gint page_num, gpointer data)
-{
- EventEditor *ee;
-
- g_return_if_fail (IS_EVENT_EDITOR (data));
-
- ee = EVENT_EDITOR (data);
-
- if (page_num != -1)
- return;
-
- save_event_object (ee);
-}
-
-/* Callback used when the dialog box is destroyed */
-static gint
-ee_close_event_cb (GtkWidget *widget, gpointer data)
-{
- EventEditor *ee;
-
- g_return_val_if_fail (IS_EVENT_EDITOR (data), TRUE);
-
- ee = EVENT_EDITOR (data);
-
- if (prompt_to_save_changes (ee))
- close_dialog (ee);
-
- return TRUE;
-}
-
-/* Callback used when the dialog box is destroyed */
-static gint
-ee_delete_event_cb (GtkWidget *widget, GdkEvent *event, gpointer data)
-{
- EventEditor *ee;
-
- g_return_val_if_fail (IS_EVENT_EDITOR (data), TRUE);
-
- ee = EVENT_EDITOR (data);
-
- if (prompt_to_save_changes (ee))
- close_dialog (ee);
-
- return TRUE;
-}
-
-/**
- * event_editor_construct:
- * @ee: An event editor.
- *
- * Constructs an event editor by loading its Glade data.
- *
- * Return value: The same object as @ee, or NULL if the widgets could not be
- * created. In the latter case, the event editor will automatically be
- * destroyed.
- **/
-EventEditor *
-event_editor_construct (EventEditor *ee)
-{
- EventEditorPrivate *priv;
-
- g_return_val_if_fail (ee != NULL, NULL);
- g_return_val_if_fail (IS_EVENT_EDITOR (ee), NULL);
-
- priv = ee->priv;
-
- /* 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;
- }
-
- if (!get_widgets (ee)) {
- g_message ("event_editor_construct(): Could not find all widgets in the XML file!");
- goto error;
- }
-
- init_widgets (ee);
-
- /* Hook to destruction of the dialog */
- gtk_signal_connect (GTK_OBJECT (priv->app), "apply",
- GTK_SIGNAL_FUNC (ee_apply_event_cb), ee);
- gtk_signal_connect (GTK_OBJECT (priv->app), "close",
- GTK_SIGNAL_FUNC (ee_close_event_cb), ee);
- gtk_signal_connect (GTK_OBJECT (priv->app), "delete_event",
- GTK_SIGNAL_FUNC (ee_delete_event_cb), ee);
-
- /* Add focus to the summary entry */
- gtk_widget_grab_focus (GTK_WIDGET (priv->general_summary));
-
- return ee;
-
- error:
-
- gtk_object_unref (GTK_OBJECT (ee));
- return NULL;
-}
-
-/**
- * event_editor_new:
- *
- * Creates a new event editor dialog.
- *
- * Return value: A newly-created event editor dialog, or NULL if the event
- * editor could not be created.
- **/
-EventEditor *
-event_editor_new (void)
-{
- EventEditor *ee;
-
- ee = EVENT_EDITOR (gtk_type_new (TYPE_EVENT_EDITOR));
- return event_editor_construct (EVENT_EDITOR (ee));
-}
-
-/* Brings attention to a window by raising it and giving it focus */
-static void
-raise_and_focus (GtkWidget *widget)
-{
- g_assert (GTK_WIDGET_REALIZED (widget));
- gdk_window_show (widget->window);
- gtk_widget_grab_focus (widget);
-}
-
-/* Callback used when the calendar client tells us that an object changed */
-static void
-obj_updated_cb (CalClient *client, const char *uid, gpointer data)
-{
- /* FIXME: Do something sensible if the component changes under our feet */
-#if 0
- EventEditor *ee;
- EventEditorPrivate *priv;
- CalComponent *comp;
- CalClientGetStatus status;
- const gchar *editing_uid;
-
- ee = EVENT_EDITOR (data);
-
- g_return_if_fail (IS_EVENT_EDITOR (ee));
-
- priv = ee->priv;
-
- /* If we aren't showing the object which has been updated, return. */
- if (!priv->comp)
- return;
- cal_component_get_uid (priv->comp, &editing_uid);
- if (strcmp (uid, editing_uid))
- return;
-
-
- /* Get the event from the server. */
- status = cal_client_get_object (priv->client, uid, &comp);
-
- switch (status) {
- case CAL_CLIENT_GET_SUCCESS:
- /* Everything is fine */
- break;
-
- case CAL_CLIENT_GET_SYNTAX_ERROR:
- g_message ("obj_updated_cb(): Syntax error when getting object `%s'", uid);
- return;
-
- case CAL_CLIENT_GET_NOT_FOUND:
- /* The object is no longer in the server, so do nothing */
- return;
-
- default:
- g_assert_not_reached ();
- return;
- }
-
- raise_and_focus (priv->app);
-#endif
-}
-
-/* Callback used when the calendar client tells us that an object was removed */
-static void
-obj_removed_cb (CalClient *client, const char *uid, gpointer data)
-{
- /* FIXME: Do something sensible if the component is removed under our
- * feet.
- */
-#if 0
- EventEditor *ee;
- EventEditorPrivate *priv;
- const gchar *editing_uid;
-
- ee = EVENT_EDITOR (data);
-
- g_return_if_fail (ee != NULL);
- g_return_if_fail (IS_EVENT_EDITOR (ee));
-
- priv = ee->priv;
-
- /* If we aren't showing the object which has been updated, return. */
- if (!priv->comp)
- return;
- cal_component_get_uid (priv->comp, &editing_uid);
- if (strcmp (uid, editing_uid))
- return;
-
-
- raise_and_focus (priv->app);
-#endif
-}
-
-/**
- * event_editor_set_cal_client:
- * @ee: An event editor.
- * @client: Calendar client.
- *
- * Sets the calendar client than an event editor will use for updating its
- * calendar components.
- **/
-void
-event_editor_set_cal_client (EventEditor *ee, CalClient *client)
-{
- EventEditorPrivate *priv;
-
- g_return_if_fail (ee != NULL);
- g_return_if_fail (IS_EVENT_EDITOR (ee));
-
- priv = ee->priv;
-
- if (client == priv->client)
- return;
-
- if (client)
- g_return_if_fail (IS_CAL_CLIENT (client));
-
- if (client)
- g_return_if_fail (cal_client_get_load_state (client) == CAL_CLIENT_LOAD_LOADED);
-
- if (client)
- gtk_object_ref (GTK_OBJECT (client));
-
- if (priv->client) {
- gtk_signal_disconnect_by_data (GTK_OBJECT (priv->client), ee);
- gtk_object_unref (GTK_OBJECT (priv->client));
- }
-
- priv->client = client;
-
- if (priv->client) {
- gtk_signal_connect (GTK_OBJECT (priv->client), "obj_updated",
- GTK_SIGNAL_FUNC (obj_updated_cb), ee);
- gtk_signal_connect (GTK_OBJECT (priv->client), "obj_removed",
- GTK_SIGNAL_FUNC (obj_removed_cb), ee);
- }
-}
-
-/**
- * event_editor_get_cal_client:
- * @ee: An event editor.
- *
- * Queries the calendar client that an event editor is using to update its
- * calendar components.
- *
- * Return value: A calendar client object.
- **/
-CalClient *
-event_editor_get_cal_client (EventEditor *ee)
-{
- EventEditorPrivate *priv;
-
- g_return_val_if_fail (ee != NULL, NULL);
- g_return_val_if_fail (IS_EVENT_EDITOR (ee), NULL);
-
- priv = ee->priv;
- return priv->client;
-}
-
-/**
- * event_editor_set_event_object:
- * @ee: An event editor.
- * @comp: A calendar object.
- *
- * Sets the calendar object that an event editor dialog will manipulate.
- **/
-void
-event_editor_set_event_object (EventEditor *ee, CalComponent *comp)
-{
- EventEditorPrivate *priv;
-
- g_return_if_fail (ee != NULL);
- g_return_if_fail (IS_EVENT_EDITOR (ee));
-
- priv = ee->priv;
-
- if (priv->comp) {
- gtk_object_unref (GTK_OBJECT (priv->comp));
- priv->comp = NULL;
- }
-
- if (comp) {
- priv->comp = cal_component_clone (comp);
- }
-
- set_title_from_comp (ee, priv->comp);
- fill_widgets (ee);
-}
-
-/**
- * event_editor_focus:
- * @ee: An event editor.
- *
- * Makes sure an event editor is shown, on top of other windows, and focused.
- **/
-void
-event_editor_focus (EventEditor *ee)
-{
- EventEditorPrivate *priv;
-
- g_return_if_fail (ee != NULL);
- g_return_if_fail (IS_EVENT_EDITOR (ee));
-
- priv = ee->priv;
- gtk_widget_show_now (priv->app);
- raise_and_focus (priv->app);
-}
-
-/* Checks if the event's time starts and ends at midnight, and sets the
- * "all day event" box accordingly.
- */
-static void
-check_all_day (EventEditor *ee)
-{
- EventEditorPrivate *priv;
- time_t ev_start, ev_end;
- gboolean all_day = FALSE;
-
- priv = ee->priv;
-
- /* Currently we just return if the date is not set or not valid.
- I'm not entirely sure this is the corrent thing to do. */
- ev_start = e_date_edit_get_time (E_DATE_EDIT (priv->start_time));
- g_return_if_fail (ev_start != -1);
-
- ev_end = e_date_edit_get_time (E_DATE_EDIT (priv->end_time));
- g_return_if_fail (ev_end != -1);
-
- /* all day event checkbox */
- if (time_day_begin (ev_start) == ev_start
- && time_day_begin (ev_end) == ev_end)
- all_day = TRUE;
-
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->all_day_event), ee);
-
- e_dialog_toggle_set (priv->all_day_event, all_day);
-
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->all_day_event), ee);
-
- e_date_edit_set_show_time (E_DATE_EDIT (priv->start_time), !all_day);
- e_date_edit_set_show_time (E_DATE_EDIT (priv->end_time), !all_day);
-}
-
-/*
- * Callback: all day event button toggled.
- * Note that this should only be called when the user explicitly toggles the
- * button. Be sure to block this handler when the toggle button's state is set
- * within the code.
- */
-static void
-set_all_day (GtkWidget *toggle, EventEditor *ee)
-{
- EventEditorPrivate *priv;
- struct tm start_tm, end_tm;
- time_t start_t, end_t;
- gboolean all_day;
-
- priv = ee->priv;
-
- event_editor_set_changed (ee, TRUE);
-
- /* When the all_day toggle is turned on, the start date is rounded down
- to the start of the day, and end date is rounded down to the start
- of the day on which the event ends. The event is then taken to be
- inclusive of the days between the start and end days.
- Note that if the event end is at midnight, we do not round it down
- to the previous day, since if we do that and the user repeatedly
- turns the all_day toggle on and off, the event keeps shrinking.
- (We'd also need to make sure we didn't adjust the time when the
- radio button is initially set.)
-
- When the all_day_toggle is turned off, we set the event start to the
- start of the working day, and if the event end is on or before the
- day of the event start we set it to one hour after the event start.
- */
- all_day = GTK_TOGGLE_BUTTON (toggle)->active;
-
- /*
- * Start time.
- */
- start_t = e_date_edit_get_time (E_DATE_EDIT (priv->start_time));
- g_return_if_fail (start_t != -1);
-
- start_tm = *localtime (&start_t);
-
- if (all_day) {
- /* Round down to the start of the day. */
- start_tm.tm_hour = 0;
- start_tm.tm_min = 0;
- start_tm.tm_sec = 0;
- } else {
- /* Set to the start of the working day. */
- start_tm.tm_hour = calendar_config_get_day_start_hour ();
- start_tm.tm_min = calendar_config_get_day_start_minute ();
- start_tm.tm_sec = 0;
- }
-
- /*
- * End time.
- */
- end_t = e_date_edit_get_time (E_DATE_EDIT (priv->end_time));
- g_return_if_fail (end_t != -1);
-
- end_tm = *localtime (&end_t);
-
- if (all_day) {
- /* Round down to the start of the day. */
- end_tm.tm_hour = 0;
- end_tm.tm_min = 0;
- end_tm.tm_sec = 0;
- } else {
- /* If the event end is now on or before the event start day,
- make it end one hour after the start. mktime() will fix any
- overflows. */
- if (end_tm.tm_year < start_tm.tm_year
- || (end_tm.tm_year == start_tm.tm_year
- && end_tm.tm_mon < start_tm.tm_mon)
- || (end_tm.tm_year == start_tm.tm_year
- && end_tm.tm_mon == start_tm.tm_mon
- && end_tm.tm_mday <= start_tm.tm_mday)) {
- end_tm.tm_year = start_tm.tm_year;
- end_tm.tm_mon = start_tm.tm_mon;
- end_tm.tm_mday = start_tm.tm_mday;
- end_tm.tm_hour = start_tm.tm_hour + 1;
- }
- }
-
- /* Block date_changed_cb, or dates_changed() will be called after the
- start time is set (but before the end time is set) and will call
- check_all_day() and mess us up. */
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->start_time), ee);
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->end_time), ee);
-
- /* will set recur start too */
- e_date_edit_set_time (E_DATE_EDIT (priv->start_time), mktime (&start_tm));
-
- e_date_edit_set_time (E_DATE_EDIT (priv->end_time), mktime (&end_tm));
-
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->start_time), ee);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->end_time), ee);
-
- e_date_edit_set_show_time (E_DATE_EDIT (priv->start_time), !all_day);
- e_date_edit_set_show_time (E_DATE_EDIT (priv->end_time), !all_day);
-
- preview_recur (ee);
-}
-
-/* Callback used when the start or end date widgets change. We check that the
- * start date < end date and we set the "all day event" button as appropriate.
- */
-static void
-date_changed_cb (EDateEdit *dedit, gpointer data)
-{
- EventEditor *ee;
- EventEditorPrivate *priv;
- time_t start, end;
- struct tm tm_start, tm_end;
-
- ee = EVENT_EDITOR (data);
- priv = ee->priv;
-
- event_editor_set_changed (ee, TRUE);
-
- /* Ensure that start < end */
-
- start = e_date_edit_get_time (E_DATE_EDIT (priv->start_time));
- g_return_if_fail (start != -1);
- end = e_date_edit_get_time (E_DATE_EDIT (priv->end_time));
- g_return_if_fail (end != -1);
-
- if (start >= end) {
- tm_start = *localtime (&start);
- tm_end = *localtime (&end);
-
- if (start == end && tm_start.tm_hour == 0
- && tm_start.tm_min == 0 && tm_start.tm_sec == 0) {
- /* If the start and end times are the same, but both
- are on day boundaries, then that is OK since it
- means we have an all-day event lasting 1 day.
- So we do nothing here. */
-
- } else if (GTK_WIDGET (dedit) == priv->start_time) {
- /* Modify the end 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;
- tm_end.tm_hour = tm_start.tm_hour + 1;
- tm_end.tm_min = tm_start.tm_min;
- tm_end.tm_sec = tm_start.tm_sec;
-
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->end_time), ee);
- e_date_edit_set_time (E_DATE_EDIT (priv->end_time), mktime (&tm_end));
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->end_time), ee);
- } else if (GTK_WIDGET (dedit) == priv->end_time) {
- /* Modify the start 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;
- tm_start.tm_hour = tm_end.tm_hour - 1;
- tm_start.tm_min = tm_end.tm_min;
- tm_start.tm_sec = tm_end.tm_sec;
-
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->start_time), ee);
- e_date_edit_set_time (E_DATE_EDIT (priv->start_time), mktime (&tm_start));
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->start_time), ee);
- } else
- g_assert_not_reached ();
- }
-
- /* Set the "all day event" button as appropriate */
-
- check_all_day (ee);
-
- /* Retag the recurrence preview calendar */
-
- preview_recur (ee);
-}
-
-/* Appends an alarm to the list */
-static void
-append_reminder (EventEditor *ee, CalComponentAlarm *alarm, ReminderStatus status)
-{
- EventEditorPrivate *priv;
- GtkCList *clist;
- ReminderData *rdata;
- char *c[1];
- int i;
-
- priv = ee->priv;
-
- clist = GTK_CLIST (priv->reminder_list);
-
- c[0] = get_alarm_string (alarm);
- i = gtk_clist_append (clist, c);
-
- rdata = g_new (ReminderData, 1);
- rdata->status = status;
- rdata->alarm = alarm;
- gtk_clist_set_row_data (clist, i, rdata);
- gtk_clist_select_row (clist, i, 0);
- g_free (c[0]);
-
- gtk_widget_set_sensitive (priv->reminder_delete, TRUE);
-}
-
-/* Callback for the "add reminder" button */
-static void
-reminder_add_cb (GtkWidget *widget, EventEditor *ee)
-{
- EventEditorPrivate *priv;
- CalComponentAlarm *alarm;
- CalAlarmTrigger trigger;
-
- priv = ee->priv;
-
- event_editor_set_changed (ee, TRUE);
-
- alarm = cal_component_alarm_new ();
-
- memset (&trigger, 0, sizeof (CalAlarmTrigger));
- trigger.type = e_dialog_option_menu_get (priv->reminder_time, reminder_time_map);
- if (e_dialog_option_menu_get (priv->reminder_relative, reminder_relative_map) == BEFORE)
- trigger.u.rel_duration.is_neg = 1;
- else
- trigger.u.rel_duration.is_neg = 0;
-
- switch (e_dialog_option_menu_get (priv->reminder_relative, reminder_relative_map)) {
- case MINUTES:
- trigger.u.rel_duration.minutes = e_dialog_spin_get_int (priv->reminder_interval_value);
- break;
- case HOURS:
- trigger.u.rel_duration.hours = e_dialog_spin_get_int (priv->reminder_interval_value);
- break;
- case DAYS:
- trigger.u.rel_duration.days = e_dialog_spin_get_int (priv->reminder_interval_value);
- break;
- }
- cal_component_alarm_set_trigger (alarm, trigger);
-
- cal_component_alarm_set_action (alarm, e_dialog_option_menu_get (priv->reminder_action, reminder_action_map));
-
- append_reminder (ee, alarm, NEW_ALARM);
-}
-
-/* Callback for the "delete reminder" button */
-static void
-reminder_delete_cb (GtkWidget *widget, EventEditor *ee)
-{
- EventEditorPrivate *priv;
- GtkCList *clist;
- ReminderData *rdata;
- int sel;
-
- priv = ee->priv;
-
- clist = GTK_CLIST (priv->reminder_list);
- if (!clist->selection)
- return;
-
- event_editor_set_changed (ee, TRUE);
-
- sel = GPOINTER_TO_INT (clist->selection->data);
-
- rdata = gtk_clist_get_row_data (clist, sel);
-
- if (rdata->status == EXISTING_ALARM) {
- const char *uid;
-
- uid = cal_component_alarm_get_uid (rdata->alarm);
- cal_component_remove_alarm (priv->comp, uid);
- }
- cal_component_alarm_free (rdata->alarm);
- g_free (rdata);
-
- gtk_clist_remove (clist, sel);
- if (sel >= clist->rows)
- sel--;
-
- if (clist->rows > 0)
- gtk_clist_select_row (clist, sel, 0);
- else
- gtk_widget_set_sensitive (priv->reminder_delete, FALSE);
-}
-
-
-/* Builds a static string out of an exception date */
-static char *
-get_exception_string (time_t t)
-{
- static char buf[256];
-
- strftime (buf, sizeof (buf), _("%a %b %d %Y"), localtime (&t));
- return buf;
-}
-
-/* Appends an exception date to the list */
-static void
-append_exception (EventEditor *ee, time_t t)
-{
- EventEditorPrivate *priv;
- time_t *tt;
- char *c[1];
- int i;
- GtkCList *clist;
-
- priv = ee->priv;
-
- tt = g_new (time_t, 1);
- *tt = t;
-
- clist = GTK_CLIST (priv->recurrence_exception_list);
-
- gtk_signal_handler_block_by_data (GTK_OBJECT (clist), ee);
-
- c[0] = get_exception_string (t);
- i = gtk_clist_append (clist, c);
-
- gtk_clist_set_row_data (clist, i, tt);
-
- gtk_clist_select_row (clist, i, 0);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (clist), ee);
-
- e_date_edit_set_time (E_DATE_EDIT (priv->recurrence_exception_date), t);
-
- gtk_widget_set_sensitive (priv->recurrence_exception_modify, TRUE);
- gtk_widget_set_sensitive (priv->recurrence_exception_delete, TRUE);
-}
-
-
-/* Callback for the "add exception" button */
-static void
-recurrence_exception_add_cb (GtkWidget *widget, EventEditor *ee)
-{
- EventEditorPrivate *priv;
- time_t t;
-
- priv = ee->priv;
-
- event_editor_set_changed (ee, TRUE);
- t = e_date_edit_get_time (E_DATE_EDIT (priv->recurrence_exception_date));
- append_exception (ee, t);
- preview_recur (ee);
-}
-
-/* Callback for the "modify exception" button */
-static void
-recurrence_exception_modify_cb (GtkWidget *widget, EventEditor *ee)
-{
- EventEditorPrivate *priv;
- GtkCList *clist;
- time_t *t;
- int sel;
-
- priv = ee->priv;
-
- clist = GTK_CLIST (priv->recurrence_exception_list);
- if (!clist->selection)
- return;
-
- event_editor_set_changed (ee, TRUE);
-
- sel = GPOINTER_TO_INT (clist->selection->data);
-
- t = gtk_clist_get_row_data (clist, sel);
- *t = e_date_edit_get_time (E_DATE_EDIT (priv->recurrence_exception_date));
-
- gtk_clist_set_text (clist, sel, 0, get_exception_string (*t));
-
- preview_recur (ee);
-}
-
-/* Callback for the "delete exception" button */
-static void
-recurrence_exception_delete_cb (GtkWidget *widget, EventEditor *ee)
-{
- EventEditorPrivate *priv;
- GtkCList *clist;
- int sel;
- time_t *t;
-
- priv = ee->priv;
-
- clist = GTK_CLIST (priv->recurrence_exception_list);
- if (!clist->selection)
- return;
-
- event_editor_set_changed (ee, TRUE);
-
- sel = GPOINTER_TO_INT (clist->selection->data);
-
- t = gtk_clist_get_row_data (clist, sel);
- g_assert (t != NULL);
- g_free (t);
-
- gtk_clist_remove (clist, sel);
- if (sel >= clist->rows)
- sel--;
-
- if (clist->rows > 0)
- gtk_clist_select_row (clist, sel, 0);
- else {
- gtk_widget_set_sensitive (priv->recurrence_exception_modify, FALSE);
- gtk_widget_set_sensitive (priv->recurrence_exception_delete, FALSE);
- }
-
- preview_recur (ee);
-}
-
-/* Callback used when a row is selected in the list of exception dates. We must
- * update the date/time widgets to reflect the exception's value.
- */
-static void
-recurrence_exception_select_row_cb (GtkCList *clist, gint row, gint col, GdkEvent *event,
- gpointer data)
-{
- EventEditor *ee;
- EventEditorPrivate *priv;
- time_t *t;
-
- ee = EVENT_EDITOR (data);
- priv = ee->priv;
-
- t = gtk_clist_get_row_data (clist, row);
- g_assert (t != NULL);
-
- e_date_edit_set_time (E_DATE_EDIT (priv->recurrence_exception_date), *t);
-}
-
-GtkWidget *
-make_date_edit (void)
-{
- return date_edit_new (TRUE, TRUE);
-}
-
-
-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;
-}
-
-
-/* This is called when most fields are changed (except those which already
- have signal handlers). It just sets the "changed" flag. */
-static void
-field_changed (GtkWidget *widget,
- EventEditor *ee)
-{
- EventEditorPrivate *priv;
-
- g_return_if_fail (IS_EVENT_EDITOR (ee));
-
- priv = ee->priv;
-
- event_editor_set_changed (ee, TRUE);
-}
-
-
-static void
-event_editor_set_changed (EventEditor *ee,
- gboolean changed)
-{
- EventEditorPrivate *priv;
-
- priv = ee->priv;
-
-#if 0
- g_print ("In event_editor_set_changed: %s\n",
- changed ? "TRUE" : "FALSE");
-#endif
-
- priv->changed = changed;
-
- if (priv->app)
- gnome_property_box_set_state (GNOME_PROPERTY_BOX (priv->app), changed);
-}
-
-
-/* This checks if the "changed" field is set, and if so it prompts to save
- the changes using a "Save/Discard/Cancel" modal dialog. It then saves the
- changes if requested. It returns TRUE if the dialog should now be closed. */
-static gboolean
-prompt_to_save_changes (EventEditor *ee)
-{
- EventEditorPrivate *priv;
-
- priv = ee->priv;
-
- if (!priv->changed)
- return TRUE;
-
- switch (save_component_dialog (GTK_WINDOW (priv->app))) {
- case 0: /* Save */
- /* FIXME: If an error occurs here, we should popup a dialog
- and then return FALSE. */
- save_event_object (ee);
- return TRUE;
- case 1: /* Discard */
- return TRUE;
- case 2: /* Cancel */
- default:
- return FALSE;
- break;
- }
-}
-
-static void
-categories_clicked (GtkWidget *button, EventEditor *ee)
-{
- char *categories;
- GnomeDialog *dialog;
- int result;
- GtkWidget *entry;
-
- entry = ee->priv->categories;
- categories = e_utf8_gtk_entry_get_text (GTK_ENTRY (entry));
-
- dialog = GNOME_DIALOG (e_categories_new (categories));
- result = gnome_dialog_run (dialog);
- g_free (categories);
-
- if (result == 0) {
- gtk_object_get (GTK_OBJECT (dialog),
- "categories", &categories,
- NULL);
- e_utf8_gtk_entry_set_text (GTK_ENTRY (entry), categories);
- g_free (categories);
- }
- gtk_object_destroy (GTK_OBJECT (dialog));
-}
diff --git a/calendar/gui/event-editor.h b/calendar/gui/event-editor.h
deleted file mode 100644
index 60be54c784..0000000000
--- a/calendar/gui/event-editor.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* Evolution calendar - Event editor dialog
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Authors: Miguel de Icaza <miguel@ximian.com>
- * Federico Mena-Quintero <federico@ximian.com>
- * Seth Alves <alves@hungry.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 __EVENT_EDITOR_DIALOG_H__
-#define __EVENT_EDITOR_DIALOG_H__
-
-#include <libgnome/gnome-defs.h>
-#include <gtk/gtkobject.h>
-#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;
-typedef struct _EventEditorPrivate EventEditorPrivate;
-
-struct _EventEditor {
- GtkObject object;
-
- /* Private data */
- EventEditorPrivate *priv;
-};
-
-struct _EventEditorClass {
- GtkObjectClass parent_class;
-};
-
-
-GtkType event_editor_get_type (void);
-EventEditor *event_editor_construct (EventEditor *ee);
-
-EventEditor *event_editor_new (void);
-
-void event_editor_set_cal_client (EventEditor *ee, CalClient *client);
-CalClient *event_editor_get_cal_client (EventEditor *ee);
-
-void event_editor_set_event_object (EventEditor *ee, CalComponent *comp);
-
-void event_editor_focus (EventEditor *ee);
-
-void event_editor_update_widgets (EventEditor *ee);
-
-
-GtkWidget *make_date_edit (void);
-GtkWidget *make_spin_button (int val, int low, int high);
-
-
-
-#endif /* __EVENT_EDITOR_DIALOG_H__ */
diff --git a/calendar/gui/evolution-calendar-control.c b/calendar/gui/evolution-calendar-control.c
deleted file mode 100644
index 7ebe2b5f8e..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 <config.h>
-#include <gnome.h>
-#include <glade/glade.h>
-#include <bonobo.h>
-#include <bonobo/bonobo-control.h>
-#include <glade/glade.h>
-
-#ifdef USING_OAF
-#include <liboaf/liboaf.h>
-#else
-#include <libgnorba/gnorba.h>
-#endif
-
-#include <cal-util/timeutil.h>
-#include <gui/alarm.h>
-#include <gui/gnome-cal.h>
-#include <gui/calendar-commands.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
-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 ();
- e_cursors_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/gnome-cal.c b/calendar/gui/gnome-cal.c
deleted file mode 100644
index 138e5cb280..0000000000
--- a/calendar/gui/gnome-cal.c
+++ /dev/null
@@ -1,1708 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* Evolution calendar - Main calendar view widget
- *
- * Copyright (C) 1998 The Free Software Foundation
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Authors: Miguel de Icaza <miguel@ximian.com>
- * Federico Mena-Quintero <federico@ximian.com>
- * Seth Alves <alves@hungry.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 <unistd.h>
-#include <signal.h>
-#include <sys/wait.h>
-#include <fcntl.h>
-#include <glib.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-dialog-util.h>
-#include <gal/e-paned/e-hpaned.h>
-#include <gal/e-paned/e-vpaned.h>
-#include <cal-util/timeutil.h>
-#include "widgets/misc/e-search-bar.h"
-#include "dialogs/alarm-notify-dialog.h"
-#include "e-calendar-table.h"
-#include "e-day-view.h"
-#include "e-week-view.h"
-#include "event-editor.h"
-#include "gnome-cal.h"
-#include "component-factory.h"
-#include "calendar-commands.h"
-#include "calendar-config.h"
-#include "tag-calendar.h"
-
-
-
-/* These must match the page numbers in the GtkNotebook. */
-typedef enum {
- VIEW_NOT_SET = -1,
- VIEW_DAY = 0,
- VIEW_WORK_WEEK,
- VIEW_WEEK,
- VIEW_MONTH
-} ViewType;
-
-/* Private part of the GnomeCalendar structure */
-struct _GnomeCalendarPrivate {
- /*
- * The Calendar Folder.
- */
-
- /* The calendar client object we monitor */
- CalClient *client;
-
- /*
- * The TaskPad Folder.
- */
-
- /* The calendar client object we monitor */
- CalClient *task_pad_client;
-
- /*
- * Fields for the calendar view
- */
-
- /* Mapping of component UIDs to event editors */
- GHashTable *object_editor_hash;
-
- /* This is the last selection explicitly selected by the user. We try
- to keep it the same when we switch views, but we may have to alter
- it depending on the view (e.g. the week views only select days, so
- any times are lost. */
- time_t selection_start_time;
- time_t selection_end_time;
-
- /* Widgets */
-
- GtkWidget *search_bar;
-
- GtkWidget *hpane;
- GtkWidget *notebook;
- GtkWidget *vpane;
- ECalendar *date_navigator;
- GtkWidget *todo;
-
- GtkWidget *day_view;
- GtkWidget *work_week_view;
- GtkWidget *week_view;
- GtkWidget *month_view;
-
- /* These are the toolbar radio buttons for switching views. */
- GtkWidget *day_button;
- GtkWidget *work_week_button;
- GtkWidget *week_button;
- GtkWidget *month_button;
-
- /* This is the view currently shown. We use it to keep track of the
- positions of the panes. range_selected is TRUE if a range of dates
- was selected in the date navigator to show the view. */
- ViewType current_view_type;
- gboolean range_selected;
-
- /* These are the saved positions of the panes. They are multiples of
- calendar month widths & heights in the date navigator, so that they
- will work OK after theme changes. */
- gfloat hpane_pos;
- gfloat vpane_pos;
- gfloat hpane_pos_month_view;
- gfloat vpane_pos_month_view;
-
- /* The signal handler id for our GtkCalendar "day_selected" handler. */
- guint day_selected_id;
-
- /* Whether we are being destroyed and should not mess with the object
- * editor hash table.
- */
- guint in_destroy : 1;
-};
-
-
-
-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_set_view_internal (GnomeCalendar *gcal,
- char *page_name,
- gboolean range_selected,
- gboolean focus);
-static void gnome_calendar_set_pane_positions (GnomeCalendar *gcal);
-static void gnome_calendar_update_view_times (GnomeCalendar *gcal);
-static void gnome_calendar_update_date_navigator (GnomeCalendar *gcal);
-
-static void gnome_calendar_on_date_navigator_style_set (GtkWidget *widget,
- GtkStyle *previous_style,
- gpointer data);
-static void gnome_calendar_update_paned_quanta (GnomeCalendar *gcal);
-static void gnome_calendar_on_date_navigator_size_allocate (GtkWidget *widget,
- GtkAllocation *allocation,
- gpointer data);
-static void gnome_calendar_on_date_navigator_date_range_changed (ECalendarItem *calitem,
- GnomeCalendar *gcal);
-static void gnome_calendar_on_date_navigator_selection_changed (ECalendarItem *calitem,
- GnomeCalendar *gcal);
-static gboolean gnome_calendar_get_days_shown (GnomeCalendar *gcal,
- GDate *start_date,
- gint *days_shown);
-
-
-static GtkVBoxClass *parent_class;
-
-
-
-
-GtkType
-gnome_calendar_get_type (void)
-{
- static GtkType gnome_calendar_type = 0;
-
- if (!gnome_calendar_type) {
- static const GtkTypeInfo gnome_calendar_info = {
- "GnomeCalendar",
- sizeof (GnomeCalendar),
- sizeof (GnomeCalendarClass),
- (GtkClassInitFunc) gnome_calendar_class_init,
- (GtkObjectInitFunc) gnome_calendar_init,
- NULL, /* reserved_1 */
- NULL, /* reserved_2 */
- (GtkClassInitFunc) NULL
- };
-
- gnome_calendar_type = gtk_type_unique (GTK_TYPE_VBOX, &gnome_calendar_info);
- }
-
- 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;
-
- parent_class = gtk_type_class (GTK_TYPE_VBOX);
-
- object_class->destroy = gnome_calendar_destroy;
-}
-
-static GtkWidget *
-get_current_page (GnomeCalendar *gcal)
-{
- GnomeCalendarPrivate *priv;
-
- priv = gcal->priv;
-
- return GTK_NOTEBOOK (priv->notebook)->cur_page->child;
-}
-
-enum {
- SEARCH_SHOW_ALL
-};
-
-static ESearchBarItem search_menu_items[] = {
- { N_("Show all "), SEARCH_SHOW_ALL },
- { NULL, -1 }
-};
-
-enum {
- SEARCH_ANY_FIELD_CONTAINS,
- SEARCH_SUMMARY_CONTAINS,
- SEARCH_DESCRIPTION_CONTAINS,
- SEARCH_COMMENT_CONTAINS,
- SEARCH_HAS_CATEGORY
-};
-
-static ESearchBarItem search_option_items[] = {
- { N_("Any field contains"), SEARCH_ANY_FIELD_CONTAINS },
- { N_("Summary contains"), SEARCH_SUMMARY_CONTAINS },
- { N_("Description contains"), SEARCH_DESCRIPTION_CONTAINS },
- { N_("Comment contains"), SEARCH_COMMENT_CONTAINS },
- { N_("Has category"), SEARCH_HAS_CATEGORY },
- { NULL, -1 }
-};
-
-/* Sets the query sexp for the current view in the calendar */
-static void
-set_query (GnomeCalendar *gcal, char *sexp)
-{
- GnomeCalendarPrivate *priv;
- GtkWidget *page;
-
- g_assert (sexp != NULL);
-
- priv = gcal->priv;
-
- page = get_current_page (gcal);
-
- if (page == priv->day_view || page == priv->work_week_view)
- e_day_view_set_query (E_DAY_VIEW (page), sexp);
- else if (page == priv->week_view || page == priv->month_view)
- e_week_view_set_query (E_WEEK_VIEW (page), sexp);
- else {
- g_warning ("A penguin bit my hand!");
- g_assert_not_reached ();
- }
-}
-
-/* Sets the query string to be (contains? "field" "text") */
-static void
-set_query_contains (GnomeCalendar *gcal, const char *field, const char *text)
-{
- char *sexp;
-
- sexp = g_strdup_printf ("(contains? \"%s\" \"%s\")", field, text);
- set_query (gcal, sexp);
- g_free (sexp);
-}
-
-/* Callback used when the query string is changed in the search bar */
-static void
-search_bar_query_changed_cb (ESearchBar *search_bar, gpointer data)
-{
- GnomeCalendar *gcal;
- int item;
- char *text;
-
- gcal = GNOME_CALENDAR (data);
-
- item = e_search_bar_get_option_choice (search_bar);
- text = e_search_bar_get_text (search_bar);
-
- if (!text)
- return; /* This is an error in the UTF8 conversion, not an empty string! */
-
- switch (item) {
- case SEARCH_ANY_FIELD_CONTAINS:
- set_query_contains (gcal, "any", text);
- break;
-
- case SEARCH_SUMMARY_CONTAINS:
- set_query_contains (gcal, "summary", text);
- break;
-
- case SEARCH_DESCRIPTION_CONTAINS:
- set_query_contains (gcal, "description", text);
- break;
-
- case SEARCH_COMMENT_CONTAINS:
- set_query_contains (gcal, "comment", text);
- break;
-
- case SEARCH_HAS_CATEGORY: {
- char *sexp;
-
- sexp = g_strdup_printf ("(has-categories? \"%s\")", text);
- set_query (gcal, sexp);
- g_free (sexp);
- break;
- }
-
- default:
- g_assert_not_reached ();
- }
-
- g_free (text);
-}
-
-/* Callback used when a menu item is activated in the search bar */
-static void
-search_bar_menu_activated_cb (ESearchBar *search_bar, int item, gpointer data)
-{
- GnomeCalendar *gcal;
-
- gcal = GNOME_CALENDAR (data);
-
- switch (item) {
- case SEARCH_SHOW_ALL:
- set_query (gcal, "#t"); /* match all */
- /* FIXME: should we change the rest of the search bar so that
- * the user sees that he selected "show all" instead of some
- * type/text search combination?
- */
- break;
-
- default:
- g_assert_not_reached ();
- }
-}
-
-static void
-setup_widgets (GnomeCalendar *gcal)
-{
- GnomeCalendarPrivate *priv;
- GtkWidget *w;
- gchar *filename;
- CalendarModel *model;
-
- priv = gcal->priv;
-
- priv->search_bar = e_search_bar_new (search_menu_items, search_option_items);
- gtk_signal_connect (GTK_OBJECT (priv->search_bar), "query_changed",
- GTK_SIGNAL_FUNC (search_bar_query_changed_cb), gcal);
- gtk_signal_connect (GTK_OBJECT (priv->search_bar), "menu_activated",
- GTK_SIGNAL_FUNC (search_bar_menu_activated_cb), gcal);
-
- gtk_widget_show (priv->search_bar);
- gtk_box_pack_start (GTK_BOX (gcal), priv->search_bar, FALSE, FALSE, 0);
-
- /* The main HPaned, with the notebook of calendar views on the left
- and the ECalendar and ToDo list on the right. */
- priv->hpane = e_hpaned_new ();
- gtk_widget_show (priv->hpane);
- gtk_box_pack_start (GTK_BOX (gcal), priv->hpane, TRUE, TRUE, 0);
-
- /* The Notebook containing the 4 calendar 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);
- gtk_widget_show (priv->notebook);
- e_paned_pack1 (E_PANED (priv->hpane), priv->notebook, TRUE, TRUE);
-
- /* The VPaned widget, to contain the GtkCalendar & ToDo list. */
- priv->vpane = e_vpaned_new ();
- gtk_widget_show (priv->vpane);
- e_paned_pack2 (E_PANED (priv->hpane), priv->vpane, FALSE, TRUE);
-
- /* The ECalendar. */
- w = e_calendar_new ();
- priv->date_navigator = E_CALENDAR (w);
- e_calendar_item_set_days_start_week_sel (priv->date_navigator->calitem, 9);
- e_calendar_item_set_max_days_sel (priv->date_navigator->calitem, 42);
- gtk_widget_show (w);
-
- e_paned_pack1 (E_PANED (priv->vpane), w, FALSE, TRUE);
- gtk_signal_connect (GTK_OBJECT (priv->date_navigator),
- "style_set",
- GTK_SIGNAL_FUNC (gnome_calendar_on_date_navigator_style_set),
- gcal);
- gtk_signal_connect_after (GTK_OBJECT (priv->date_navigator),
- "size_allocate",
- (GtkSignalFunc) gnome_calendar_on_date_navigator_size_allocate,
- gcal);
- gtk_signal_connect (GTK_OBJECT (priv->date_navigator->calitem),
- "selection_changed",
- (GtkSignalFunc) gnome_calendar_on_date_navigator_selection_changed,
- gcal);
- gtk_signal_connect (GTK_OBJECT (priv->date_navigator->calitem),
- "date_range_changed",
- GTK_SIGNAL_FUNC (gnome_calendar_on_date_navigator_date_range_changed),
- gcal);
-
- /* The ToDo list. */
- priv->todo = e_calendar_table_new ();
- calendar_config_configure_e_calendar_table (E_CALENDAR_TABLE (priv->todo));
- model = e_calendar_table_get_model (E_CALENDAR_TABLE (priv->todo));
- calendar_model_set_new_comp_vtype (model, CAL_COMPONENT_TODO);
- e_paned_pack2 (E_PANED (priv->vpane), priv->todo, TRUE, TRUE);
- gtk_widget_show (priv->todo);
-
- filename = g_strdup_printf ("%s/config/TaskPad", evolution_dir);
- e_calendar_table_load_state (E_CALENDAR_TABLE (priv->todo), filename);
- g_free (filename);
-
- /* The Day View. */
- priv->day_view = e_day_view_new ();
- e_day_view_set_calendar (E_DAY_VIEW (priv->day_view), gcal);
- gtk_widget_show (priv->day_view);
- gtk_notebook_append_page (GTK_NOTEBOOK (priv->notebook),
- priv->day_view, gtk_label_new (""));
-
- /* The Work Week View. */
- priv->work_week_view = e_day_view_new ();
- e_day_view_set_work_week_view (E_DAY_VIEW (priv->work_week_view),
- TRUE);
- e_day_view_set_days_shown (E_DAY_VIEW (priv->work_week_view), 5);
- e_day_view_set_calendar (E_DAY_VIEW (priv->work_week_view), gcal);
- gtk_widget_show (priv->work_week_view);
- gtk_notebook_append_page (GTK_NOTEBOOK (priv->notebook),
- priv->work_week_view, gtk_label_new (""));
-
- /* The Week View. */
- priv->week_view = e_week_view_new ();
- e_week_view_set_calendar (E_WEEK_VIEW (priv->week_view), gcal);
- gtk_widget_show (priv->week_view);
- gtk_notebook_append_page (GTK_NOTEBOOK (priv->notebook),
- priv->week_view, gtk_label_new (""));
-
- /* The Month View. */
- priv->month_view = e_week_view_new ();
- e_week_view_set_calendar (E_WEEK_VIEW (priv->month_view), gcal);
- e_week_view_set_multi_week_view (E_WEEK_VIEW (priv->month_view), TRUE);
- gtk_widget_show (priv->month_view);
- gtk_notebook_append_page (GTK_NOTEBOOK (priv->notebook),
- priv->month_view, gtk_label_new (""));
-
- gnome_calendar_update_config_settings (gcal, TRUE);
-}
-
-/* Object initialization function for the gnome calendar */
-static void
-gnome_calendar_init (GnomeCalendar *gcal)
-{
- GnomeCalendarPrivate *priv;
-
- priv = g_new0 (GnomeCalendarPrivate, 1);
- gcal->priv = priv;
-
- priv->object_editor_hash = g_hash_table_new (g_str_hash, g_str_equal);
-
- priv->current_view_type = VIEW_NOT_SET;
- priv->range_selected = FALSE;
-
- setup_widgets (gcal);
-
- priv->selection_start_time = time_day_begin (time (NULL));
- priv->selection_end_time = time_add_day (priv->selection_start_time, 1);
-}
-
-/* Used from g_hash_table_foreach(); frees an UID string */
-static void
-destroy_editor_cb (gpointer key, gpointer value, gpointer data)
-{
- EventEditor *ee;
-
- ee = EVENT_EDITOR (value);
- gtk_object_unref (GTK_OBJECT (ee));
-}
-
-static void
-gnome_calendar_destroy (GtkObject *object)
-{
- GnomeCalendar *gcal;
- GnomeCalendarPrivate *priv;
- gchar *filename;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (GNOME_IS_CALENDAR (object));
-
- gcal = GNOME_CALENDAR (object);
- priv = gcal->priv;
-
- /* Save the TaskPad layout. */
- filename = g_strdup_printf ("%s/config/TaskPad", evolution_dir);
- e_calendar_table_save_state (E_CALENDAR_TABLE (priv->todo), filename);
- g_free (filename);
-
- if (priv->client) {
-#if 0
- alarm_notify_remove_client (priv->client);
-#endif
- gtk_object_unref (GTK_OBJECT (priv->client));
- priv->client = NULL;
- }
-
- if (priv->task_pad_client) {
-#if 0
- alarm_notify_remove_client (priv->task_pad_client);
-#endif
- gtk_object_unref (GTK_OBJECT (priv->task_pad_client));
- priv->task_pad_client = NULL;
- }
-
- priv->in_destroy = TRUE;
- g_hash_table_foreach (priv->object_editor_hash, destroy_editor_cb, NULL);
- g_hash_table_destroy (priv->object_editor_hash);
- priv->object_editor_hash = NULL;
-
- g_free (priv);
- gcal->priv = NULL;
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-char *
-gnome_calendar_get_current_view_name (GnomeCalendar *gcal)
-{
- GnomeCalendarPrivate *priv;
- GtkWidget *page;
-
- g_return_val_if_fail (gcal != NULL, NULL);
- g_return_val_if_fail (GNOME_IS_CALENDAR (gcal), NULL);
-
- priv = gcal->priv;
-
- page = get_current_page (gcal);
-
- if (page == priv->day_view)
- return "dayview";
- else if (page == priv->work_week_view)
- return "workweekview";
- else if (page == priv->week_view)
- return "weekview";
- else if (page == priv->month_view)
- return "monthview";
- else {
- g_assert_not_reached ();
- return NULL;
- }
-}
-
-void
-gnome_calendar_goto (GnomeCalendar *gcal, time_t new_time)
-{
- GnomeCalendarPrivate *priv;
-
- g_return_if_fail (gcal != NULL);
- g_return_if_fail (GNOME_IS_CALENDAR (gcal));
- g_return_if_fail (new_time != -1);
-
- priv = gcal->priv;
-
- priv->selection_start_time = time_day_begin (new_time);
- priv->selection_end_time = time_add_day (priv->selection_start_time, 1);
-
- gnome_calendar_update_view_times (gcal);
- gnome_calendar_update_date_navigator (gcal);
-}
-
-
-static void
-gnome_calendar_update_view_times (GnomeCalendar *gcal)
-{
- GnomeCalendarPrivate *priv;
- GtkWidget *page;
-
- priv = gcal->priv;
-
- page = get_current_page (gcal);
-
- if (page == priv->day_view || page == priv->work_week_view) {
- e_day_view_set_selected_time_range (E_DAY_VIEW (page),
- priv->selection_start_time,
- priv->selection_end_time);
- } else if (page == priv->week_view || page == priv->month_view) {
- e_week_view_set_selected_time_range (E_WEEK_VIEW (page),
- priv->selection_start_time,
- priv->selection_end_time);
- } else {
- g_warning ("My penguin is gone!");
- g_assert_not_reached ();
- }
-}
-
-static void
-gnome_calendar_direction (GnomeCalendar *gcal, int direction)
-{
- GnomeCalendarPrivate *priv;
- GtkWidget *cp;
- time_t start_time, end_time;
-
- priv = gcal->priv;
-
- cp = get_current_page (gcal);
-
- start_time = priv->selection_start_time;
- end_time = priv->selection_end_time;
-
- if (cp == priv->day_view) {
- start_time = time_add_day (start_time, direction);
- end_time = time_add_day (end_time, direction);
- } else if (cp == priv->work_week_view) {
- start_time = time_add_week (start_time, direction);
- end_time = time_add_week (end_time, direction);
- } else if (cp == priv->week_view) {
- start_time = time_add_week (start_time, direction);
- end_time = time_add_week (end_time, direction);
- } else if (cp == priv->month_view) {
- start_time = time_add_month (start_time, direction);
- end_time = time_add_month (end_time, direction);
- } else {
- g_warning ("Weee! Where did the penguin go?");
- g_assert_not_reached ();
- return;
- }
-
- priv->selection_start_time = start_time;
- priv->selection_end_time = end_time;
-
- gnome_calendar_update_view_times (gcal);
- gnome_calendar_update_date_navigator (gcal);
-}
-
-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)
-{
- GnomeCalendarPrivate *priv;
-
- g_return_if_fail (gcal != NULL);
- g_return_if_fail (GNOME_IS_CALENDAR (gcal));
-
- priv = gcal->priv;
-
- priv->selection_start_time = time_day_begin (time);
- priv->selection_end_time = time_add_day (priv->selection_start_time, 1);
- if (priv->day_button)
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->day_button), TRUE);
- else
- gnome_calendar_set_view (gcal, "dayview", FALSE, TRUE);
-}
-
-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));
-
- gtk_widget_grab_focus (get_current_page (gcal));
-}
-
-
-/* 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,
- gboolean range_selected,
- gboolean focus)
-{
- g_return_if_fail (gcal != NULL);
- g_return_if_fail (GNOME_IS_CALENDAR (gcal));
- g_return_if_fail (page_name != NULL);
-
- gnome_calendar_set_view_internal (gcal, page_name, range_selected, focus);
- gnome_calendar_update_view_times (gcal);
- gnome_calendar_update_date_navigator (gcal);
-}
-
-
-/* This sets the view without changing the selection or updating the date
- navigator. If a range of dates isn't selected it will also reset the number
- of days/weeks shown to the default (i.e. 1 day for the day view or 5 weeks
- for the month view). */
-static void
-gnome_calendar_set_view_internal (GnomeCalendar *gcal,
- char *page_name,
- gboolean range_selected,
- gboolean focus)
-{
- GnomeCalendarPrivate *priv;
- int view;
- gboolean round_selection;
- GtkWidget *focus_widget;
-
- priv = gcal->priv;
-
- round_selection = FALSE;
-
- if (!strcmp (page_name, "dayview")) {
- view = VIEW_DAY;
- focus_widget = priv->day_view;
-
- if (!range_selected)
- e_day_view_set_days_shown (E_DAY_VIEW (priv->day_view), 1);
- } else if (!strcmp (page_name, "workweekview")) {
- view = VIEW_WORK_WEEK;
- focus_widget = priv->work_week_view;
- } else if (!strcmp (page_name, "weekview")) {
- view = VIEW_WEEK;
- focus_widget = priv->week_view;
- round_selection = TRUE;
- } else if (!strcmp (page_name, "monthview")) {
- view = VIEW_MONTH;
- focus_widget = priv->month_view;
-
- if (!range_selected)
- e_week_view_set_weeks_shown (E_WEEK_VIEW (priv->month_view), 5);
- round_selection = TRUE;
- } else {
- g_warning ("Unknown calendar view: %s", page_name);
- g_assert_not_reached ();
- return;
- }
-
- priv->current_view_type = view;
- priv->range_selected = range_selected;
-
- calendar_config_set_default_view (view);
-
- gtk_notebook_set_page (GTK_NOTEBOOK (priv->notebook), view);
-
- if (focus)
- gtk_widget_grab_focus (focus_widget);
-
- gnome_calendar_set_pane_positions (gcal);
-
- /* For the week & month views we want the selection in the date
- navigator to be rounded to the nearest week when the arrow buttons
- are pressed to move to the previous/next month. */
- gtk_object_set (GTK_OBJECT (priv->date_navigator->calitem),
- "round_selection_when_moving", round_selection,
- NULL);
-}
-
-
-static void
-gnome_calendar_set_pane_positions (GnomeCalendar *gcal)
-{
- GnomeCalendarPrivate *priv;
- gint top_border, bottom_border, left_border, right_border;
- gint col_width, row_height;
- gfloat right_pane_width, top_pane_height;
-
- priv = gcal->priv;
-
- /* Get the size of the calendar month width & height. */
- e_calendar_get_border_size (priv->date_navigator,
- &top_border, &bottom_border,
- &left_border, &right_border);
- gtk_object_get (GTK_OBJECT (priv->date_navigator->calitem),
- "row_height", &row_height,
- "column_width", &col_width,
- NULL);
-
- if (priv->current_view_type == VIEW_MONTH && !priv->range_selected) {
- right_pane_width = priv->hpane_pos_month_view;
- top_pane_height = priv->vpane_pos_month_view;
- } else {
- right_pane_width = priv->hpane_pos;
- top_pane_height = priv->vpane_pos;
- }
-
- /* We add the borders before multiplying due to the way we are using
- the EPaned quantum feature. */
- if (right_pane_width < 0.001)
- right_pane_width = 0.0;
- else
- right_pane_width = (right_pane_width * (col_width + left_border + right_border)
- + 0.5);
- if (top_pane_height < 0.001)
- top_pane_height = 0.0;
- else
- top_pane_height = (top_pane_height * (row_height + top_border + bottom_border)
- + 0.5);
-
- e_paned_set_position (E_PANED (priv->hpane), -1);
- e_paned_set_position (E_PANED (priv->vpane), -1);
-
- /* We add one to each dimension since we can't use 0. */
-
- gtk_widget_set_usize (priv->vpane, right_pane_width + 1, -2);
- gtk_widget_set_usize (GTK_WIDGET (priv->date_navigator), -2, top_pane_height + 1);
-}
-
-/* Loads the initial data into the calendar; this should be called right after
- * the cal_opened signal from the client is invoked.
- */
-static void
-initial_load (GnomeCalendar *gcal)
-{
- GnomeCalendarPrivate *priv;
-
- priv = gcal->priv;
-
- tag_calendar_by_client (priv->date_navigator, priv->client);
-}
-
-/* Displays an error to indicate that opening a calendar failed */
-static void
-open_error (GnomeCalendar *gcal, const char *uri)
-{
- char *msg;
-
- msg = g_strdup_printf (_("Could not open the folder in `%s'"), uri);
- gnome_error_dialog_parented (msg, GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gcal))));
- g_free (msg);
-}
-
-/* Displays an error to indicate that the specified URI method is not supported */
-static void
-method_error (GnomeCalendar *gcal, const char *uri)
-{
- char *msg;
-
- msg = g_strdup_printf (_("The method required to open `%s' is not supported"), uri);
- gnome_error_dialog_parented (msg, GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gcal))));
- g_free (msg);
-}
-
-/* Callback from the calendar client when a calendar is loaded */
-static void
-cal_opened_cb (CalClient *client, CalClientOpenStatus status, gpointer data)
-{
- GnomeCalendar *gcal;
- GnomeCalendarPrivate *priv;
-
- gcal = GNOME_CALENDAR (data);
- priv = gcal->priv;
-
- switch (status) {
- case CAL_CLIENT_OPEN_SUCCESS:
- if (client == priv->client)
- initial_load (gcal);
-
- break;
-
- case CAL_CLIENT_OPEN_ERROR:
- open_error (gcal, cal_client_get_uri (client));
- break;
-
- case CAL_CLIENT_OPEN_NOT_FOUND:
- /* bullshit; we did not specify only_if_exists */
- g_assert_not_reached ();
- return;
-
- case CAL_CLIENT_OPEN_METHOD_NOT_SUPPORTED:
- method_error (gcal, cal_client_get_uri (client));
- break;
-
- default:
- g_assert_not_reached ();
- return;
- }
-}
-
-/* Callback from the calendar client when an object is updated */
-static void
-obj_updated_cb (CalClient *client, const char *uid, gpointer data)
-{
- GnomeCalendar *gcal;
- GnomeCalendarPrivate *priv;
-
- gcal = GNOME_CALENDAR (data);
- priv = gcal->priv;
-
- tag_calendar_by_client (priv->date_navigator, priv->client);
-}
-
-/* Callback from the calendar client when an object is removed */
-static void
-obj_removed_cb (CalClient *client, const char *uid, gpointer data)
-{
- GnomeCalendar *gcal;
- GnomeCalendarPrivate *priv;
-
- gcal = GNOME_CALENDAR (data);
- priv = gcal->priv;
-
- tag_calendar_by_client (priv->date_navigator, priv->client);
-}
-
-GtkWidget *
-gnome_calendar_construct (GnomeCalendar *gcal)
-{
- GnomeCalendarPrivate *priv;
- gint view;
- gchar *page;
-
- g_return_val_if_fail (gcal != NULL, NULL);
- g_return_val_if_fail (GNOME_IS_CALENDAR (gcal), NULL);
-
- priv = gcal->priv;
-
- /*
- * Calendar Folder Client.
- */
- priv->client = cal_client_new ();
- if (!priv->client)
- return NULL;
-
- gtk_signal_connect (GTK_OBJECT (priv->client), "cal_opened",
- GTK_SIGNAL_FUNC (cal_opened_cb), gcal);
- gtk_signal_connect (GTK_OBJECT (priv->client), "obj_updated",
- GTK_SIGNAL_FUNC (obj_updated_cb), gcal);
- gtk_signal_connect (GTK_OBJECT (priv->client), "obj_removed",
- GTK_SIGNAL_FUNC (obj_removed_cb), gcal);
-
-#if 0
- alarm_notify_add_client (priv->client);
-#endif
-
- e_day_view_set_cal_client (E_DAY_VIEW (priv->day_view),
- priv->client);
- e_day_view_set_cal_client (E_DAY_VIEW (priv->work_week_view),
- priv->client);
- e_week_view_set_cal_client (E_WEEK_VIEW (priv->week_view),
- priv->client);
- e_week_view_set_cal_client (E_WEEK_VIEW (priv->month_view),
- priv->client);
-
- /*
- * TaskPad Folder Client.
- */
- priv->task_pad_client = cal_client_new ();
- if (!priv->task_pad_client)
- return NULL;
-
- gtk_signal_connect (GTK_OBJECT (priv->task_pad_client), "cal_opened",
- GTK_SIGNAL_FUNC (cal_opened_cb), gcal);
-
-#if 0
- alarm_notify_add_client (priv->task_pad_client);
-#endif
-
- e_calendar_table_set_cal_client (E_CALENDAR_TABLE (priv->todo),
- priv->task_pad_client);
-
-
- /* Get the default view to show. */
- view = calendar_config_get_default_view ();
- switch (view) {
- case 1:
- page = "workweekview";
- break;
- case 2:
- page = "weekview";
- break;
- case 3:
- page = "monthview";
- break;
- default:
- page = "dayview";
- break;
- }
-
- gnome_calendar_set_view (gcal, page, FALSE, FALSE);
-
- return GTK_WIDGET (gcal);
-}
-
-GtkWidget *
-gnome_calendar_new (void)
-{
- GnomeCalendar *gcal;
-
- gcal = gtk_type_new (gnome_calendar_get_type ());
-
- if (!gnome_calendar_construct (gcal)) {
- g_message ("gnome_calendar_new(): Could not construct the calendar GUI");
- gtk_object_unref (GTK_OBJECT (gcal));
- return NULL;
- }
-
- return GTK_WIDGET (gcal);
-}
-
-/**
- * gnome_calendar_get_cal_client:
- * @gcal: A calendar view.
- *
- * Queries the calendar client interface object that a calendar view is using.
- *
- * Return value: A calendar client interface object.
- **/
-CalClient *
-gnome_calendar_get_cal_client (GnomeCalendar *gcal)
-{
- GnomeCalendarPrivate *priv;
-
- g_return_val_if_fail (gcal != NULL, NULL);
- g_return_val_if_fail (GNOME_IS_CALENDAR (gcal), NULL);
-
- priv = gcal->priv;
-
- return priv->client;
-}
-
-gboolean
-gnome_calendar_open (GnomeCalendar *gcal, const char *str_uri)
-{
- GnomeCalendarPrivate *priv;
- char *tasks_uri;
- gboolean success;
-
- g_return_val_if_fail (gcal != NULL, FALSE);
- g_return_val_if_fail (GNOME_IS_CALENDAR (gcal), FALSE);
- g_return_val_if_fail (str_uri != NULL, FALSE);
-
- priv = gcal->priv;
-
- g_return_val_if_fail (
- cal_client_get_load_state (priv->client) == CAL_CLIENT_LOAD_NOT_LOADED,
- FALSE);
-
- g_return_val_if_fail (
- cal_client_get_load_state (priv->task_pad_client) == CAL_CLIENT_LOAD_NOT_LOADED,
- FALSE);
-
- if (!cal_client_open_calendar (priv->client, str_uri, FALSE)) {
- g_message ("gnome_calendar_open(): Could not issue the request");
- return FALSE;
- }
-
- /* Open the appropriate Tasks folder to show in the TaskPad.
- Currently we just show the folder named "Tasks", but it will be
- a per-calendar option in future. */
-
- tasks_uri = g_strdup_printf ("%s/local/Tasks/tasks.ics", evolution_dir);
- success = cal_client_open_calendar (priv->task_pad_client, tasks_uri, FALSE);
- g_free (tasks_uri);
-
- if (!success) {
- g_message ("gnome_calendar_open(): Could not issue the request");
- return FALSE;
- }
-
- return TRUE;
-}
-
-/* Tells the calendar to reload all config settings.
- If initializing is TRUE it sets the pane positions as well. (We don't
- want to reset the pane positions after the user clicks 'Apply' in the
- preferences dialog.) */
-void
-gnome_calendar_update_config_settings (GnomeCalendar *gcal,
- gboolean initializing)
-{
- GnomeCalendarPrivate *priv;
- CalWeekdays working_days;
- gint week_start_day, time_divisions;
- gint start_hour, start_minute, end_hour, end_minute;
- gboolean use_24_hour, show_event_end, compress_weekend;
-
- g_return_if_fail (GNOME_IS_CALENDAR (gcal));
-
- priv = gcal->priv;
-
- working_days = calendar_config_get_working_days ();
- /* CalWeekdays and EDayViewDays use the same bit-masks, so we can
- use the same value. */
- e_day_view_set_working_days (E_DAY_VIEW (priv->day_view),
- (EDayViewDays) working_days);
- e_day_view_set_working_days (E_DAY_VIEW (priv->work_week_view),
- (EDayViewDays) working_days);
-
- /* Note that this is 0 (Sun) to 6 (Sat). */
- week_start_day = calendar_config_get_week_start_day ();
-
- /* Convert it to 0 (Mon) to 6 (Sun), which is what we use. */
- week_start_day = (week_start_day + 6) % 7;
-
- e_day_view_set_week_start_day (E_DAY_VIEW (priv->day_view),
- week_start_day);
- e_day_view_set_week_start_day (E_DAY_VIEW (priv->work_week_view),
- week_start_day);
- e_week_view_set_week_start_day (E_WEEK_VIEW (priv->week_view),
- week_start_day);
- e_week_view_set_week_start_day (E_WEEK_VIEW (priv->month_view),
- week_start_day);
-
- start_hour = calendar_config_get_day_start_hour ();
- start_minute = calendar_config_get_day_start_minute ();
- end_hour = calendar_config_get_day_end_hour ();
- end_minute = calendar_config_get_day_end_minute ();
- e_day_view_set_working_day (E_DAY_VIEW (priv->day_view),
- start_hour, start_minute,
- end_hour, end_minute);
- e_day_view_set_working_day (E_DAY_VIEW (priv->work_week_view),
- start_hour, start_minute,
- end_hour, end_minute);
-
- use_24_hour = calendar_config_get_24_hour_format ();
- e_day_view_set_24_hour_format (E_DAY_VIEW (priv->day_view),
- use_24_hour);
- e_day_view_set_24_hour_format (E_DAY_VIEW (priv->work_week_view),
- use_24_hour);
- e_week_view_set_24_hour_format (E_WEEK_VIEW (priv->week_view),
- use_24_hour);
- e_week_view_set_24_hour_format (E_WEEK_VIEW (priv->month_view),
- use_24_hour);
-
- time_divisions = calendar_config_get_time_divisions ();
- e_day_view_set_mins_per_row (E_DAY_VIEW (priv->day_view),
- time_divisions);
- e_day_view_set_mins_per_row (E_DAY_VIEW (priv->work_week_view),
- time_divisions);
-
- show_event_end = calendar_config_get_show_event_end ();
- e_day_view_set_show_event_end_times (E_DAY_VIEW (priv->day_view),
- show_event_end);
- e_day_view_set_show_event_end_times (E_DAY_VIEW (priv->work_week_view),
- show_event_end);
- e_week_view_set_show_event_end_times (E_WEEK_VIEW (priv->week_view),
- show_event_end);
- e_week_view_set_show_event_end_times (E_WEEK_VIEW (priv->month_view),
- show_event_end);
-
- compress_weekend = calendar_config_get_compress_weekend ();
- e_week_view_set_compress_weekend (E_WEEK_VIEW (priv->month_view),
- compress_weekend);
-
- calendar_config_configure_e_calendar (E_CALENDAR (priv->date_navigator));
-
- calendar_config_configure_e_calendar_table (E_CALENDAR_TABLE (priv->todo));
-
- if (initializing) {
- priv->hpane_pos = calendar_config_get_hpane_pos ();
- priv->vpane_pos = calendar_config_get_vpane_pos ();
- priv->hpane_pos_month_view = calendar_config_get_month_hpane_pos ();
- priv->vpane_pos_month_view = calendar_config_get_month_vpane_pos ();
- } else {
- gnome_calendar_update_paned_quanta (gcal);
- }
-
- /* The range of days shown may have changed, so we update the date
- navigator if needed. */
- gnome_calendar_update_date_navigator (gcal);
-}
-
-
-void
-gnome_calendar_set_selected_time_range (GnomeCalendar *gcal,
- time_t start_time,
- time_t end_time)
-{
- GnomeCalendarPrivate *priv;
-
- priv = gcal->priv;
-
- priv->selection_start_time = start_time;
- priv->selection_end_time = end_time;
-
- gnome_calendar_update_date_navigator (gcal);
-}
-
-/**
- * gnome_calendar_get_selected_time_range:
- * @gcal: A calendar view.
- * @start_time: Return value for the start of the time selection.
- * @end_time: Return value for the end of the time selection.
- *
- * Queries the time selection range on the calendar view.
- **/
-void
-gnome_calendar_get_selected_time_range (GnomeCalendar *gcal,
- time_t *start_time,
- time_t *end_time)
-{
- GnomeCalendarPrivate *priv;
-
- g_return_if_fail (gcal != NULL);
- g_return_if_fail (GNOME_IS_CALENDAR (gcal));
-
- priv = gcal->priv;
-
- if (start_time)
- *start_time = priv->selection_start_time;
-
- if (end_time)
- *end_time = priv->selection_end_time;
-}
-
-
-/* Callback used when an event editor dialog is closed */
-struct editor_closure
-{
- GnomeCalendar *gcal;
- char *uid;
-};
-
-static void
-editor_closed_cb (GtkWidget *widget, gpointer data)
-{
- GnomeCalendar *gcal;
- GnomeCalendarPrivate *priv;
- struct editor_closure *ec;
- gboolean result;
- gpointer orig_key;
- char *orig_uid;
-
- ec = (struct editor_closure *) data;
- gcal = ec->gcal;
- priv = gcal->priv;
-
- result = g_hash_table_lookup_extended (priv->object_editor_hash, ec->uid, &orig_key, NULL);
- g_assert (result != FALSE);
-
- orig_uid = orig_key;
-
- if (!priv->in_destroy)
- g_hash_table_remove (priv->object_editor_hash, orig_uid);
-
- g_free (orig_uid);
-
- g_free (ec);
-}
-
-void
-gnome_calendar_edit_object (GnomeCalendar *gcal, CalComponent *comp)
-{
- GnomeCalendarPrivate *priv;
- EventEditor *ee;
- struct editor_closure *ec;
- const char *uid;
-
- g_return_if_fail (gcal != NULL);
- g_return_if_fail (GNOME_IS_CALENDAR (gcal));
- g_return_if_fail (comp != NULL);
-
- priv = gcal->priv;
-
- cal_component_get_uid (comp, &uid);
-
- ee = g_hash_table_lookup (priv->object_editor_hash, uid);
- if (!ee) {
- ec = g_new0 (struct editor_closure, 1);
-
- ee = event_editor_new ();
- if (!ee) {
- g_message ("gnome_calendar_edit_object(): Could not create the event editor");
- return;
- }
-
- ec->gcal = gcal;
- ec->uid = g_strdup (uid);
-
- g_hash_table_insert (priv->object_editor_hash, ec->uid, ee);
-
- gtk_signal_connect (GTK_OBJECT (ee), "destroy",
- GTK_SIGNAL_FUNC (editor_closed_cb),
- ec);
-
- event_editor_set_cal_client (EVENT_EDITOR (ee), priv->client);
- event_editor_set_event_object (EVENT_EDITOR (ee), comp);
- }
-
- event_editor_focus (ee);
-}
-
-/**
- * gnome_calendar_new_appointment:
- * @gcal: An Evolution calendar.
- * @dtstart: a Unix time_t that marks the beginning of the appointment.
- * @dtend: a Unix time_t that marks the end of the appointment.
- * @all_day: if true, the dtstart and dtend are expanded to cover the entire day.
- *
- * Opens an event editor dialog for a new appointment.
- *
- **/
-void
-gnome_calendar_new_appointment_for (GnomeCalendar *cal,
- time_t dtstart, time_t dtend,
- gboolean all_day)
-{
- struct icaltimetype itt;
- CalComponentDateTime dt;
- CalComponent *comp;
-
- g_return_if_fail (cal != NULL);
- g_return_if_fail (GNOME_IS_CALENDAR (cal));
-
- if (all_day){
- dtstart = time_day_begin (dtstart);
- dtend = time_day_end (dtend);
- }
-
- dt.value = &itt;
- dt.tzid = NULL;
-
- comp = cal_component_new ();
- cal_component_set_new_vtype (comp, CAL_COMPONENT_EVENT);
-
- itt = icaltime_from_timet (dtstart, FALSE);
- cal_component_set_dtstart (comp, &dt);
-
- itt = icaltime_from_timet (dtend, FALSE);
- cal_component_set_dtend (comp, &dt);
-
- cal_component_commit_sequence (comp);
-
- gnome_calendar_edit_object (cal, comp);
- gtk_object_unref (GTK_OBJECT (comp));
-}
-
-/**
- * gnome_calendar_new_appointment:
- * @gcal: An Evolution calendar.
- *
- * Opens an event editor dialog for a new appointment. The appointment's start
- * and end times are set to the currently selected time range in the calendar
- * views.
- **/
-void
-gnome_calendar_new_appointment (GnomeCalendar *gcal)
-{
- time_t dtstart, dtend;
-
- g_return_if_fail (gcal != NULL);
- g_return_if_fail (GNOME_IS_CALENDAR (gcal));
-
- gnome_calendar_get_current_time_range (gcal, &dtstart, &dtend);
- gnome_calendar_new_appointment_for (gcal, dtstart, dtend, FALSE);
-}
-
-/* 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)
-{
- GnomeCalendarPrivate *priv;
- GtkWidget *page;
-
- priv = gcal->priv;
-
- page = get_current_page (gcal);
-
- if (page == priv->day_view || page == priv->work_week_view)
- e_day_view_get_selected_time_range (E_DAY_VIEW (page), start_time, end_time);
- else if (page == priv->week_view || page == priv->month_view)
- e_week_view_get_selected_time_range (E_WEEK_VIEW (page), start_time, end_time);
- else {
- g_message ("My penguin is gone!");
- g_assert_not_reached ();
- }
-}
-
-
-
-/* This updates the month shown and the days selected in the calendar, if
- necessary. */
-static void
-gnome_calendar_update_date_navigator (GnomeCalendar *gcal)
-{
- GnomeCalendarPrivate *priv;
- GDate start_date, end_date;
- gint days_shown;
-
- priv = gcal->priv;
-
- /* If the ECalendar isn't visible, we just return. */
- if (!GTK_WIDGET_VISIBLE (priv->date_navigator))
- return;
-
- if (gnome_calendar_get_days_shown (gcal, &start_date, &days_shown)) {
- end_date = start_date;
- g_date_add_days (&end_date, days_shown - 1);
-
- e_calendar_item_set_selection (priv->date_navigator->calitem,
- &start_date, &end_date);
- }
-}
-
-
-static gboolean
-gnome_calendar_get_days_shown (GnomeCalendar *gcal,
- GDate *start_date,
- gint *days_shown)
-{
- GnomeCalendarPrivate *priv;
- GtkWidget *page;
-
- priv = gcal->priv;
-
- page = get_current_page (gcal);
-
- if (page == priv->day_view || page == priv->work_week_view) {
- g_date_clear (start_date, 1);
- g_date_set_time (start_date, E_DAY_VIEW (page)->lower);
- *days_shown = e_day_view_get_days_shown (E_DAY_VIEW (page));
- return TRUE;
- } else if (page == priv->week_view || page == priv->month_view) {
- *start_date = E_WEEK_VIEW (page)->first_day_shown;
- if (e_week_view_get_multi_week_view (E_WEEK_VIEW (page)))
- *days_shown = e_week_view_get_weeks_shown (E_WEEK_VIEW (page)) * 7;
- else
- *days_shown = 7;
-
- return TRUE;
- } else {
- g_assert_not_reached ();
- return FALSE;
- }
-}
-
-
-static void
-gnome_calendar_on_date_navigator_selection_changed (ECalendarItem *calitem,
- GnomeCalendar *gcal)
-{
- GnomeCalendarPrivate *priv;
- GDate start_date, end_date, new_start_date, new_end_date;
- gint days_shown, new_days_shown;
- gint start_year, start_month, start_day;
- gint end_year, end_month, end_day;
- gboolean starts_on_week_start_day;
- struct tm tm;
-
- priv = gcal->priv;
-
- starts_on_week_start_day = FALSE;
-
- if (!gnome_calendar_get_days_shown (gcal, &start_date, &days_shown))
- return;
-
- end_date = start_date;
- g_date_add_days (&end_date, days_shown - 1);
-
- e_calendar_item_get_selection (calitem, &new_start_date, &new_end_date);
-
- /* If the selection hasn't changed just return. */
- if (!g_date_compare (&start_date, &new_start_date)
- && !g_date_compare (&end_date, &new_end_date))
- return;
-
- new_days_shown = g_date_julian (&new_end_date) - g_date_julian (&new_start_date) + 1;
-
- /* If a complete week is selected we show the Week view.
- Note that if weekends are compressed and the week start day is set
- to Sunday we don't actually show complete weeks in the Week view,
- so this may need tweaking. */
- if (g_date_weekday (&new_start_date) % 7 == calendar_config_get_week_start_day ())
- starts_on_week_start_day = TRUE;
-
- /* Switch views as appropriate, and change the number of days or weeks
- shown. */
- if (new_days_shown > 9) {
- e_week_view_set_weeks_shown (E_WEEK_VIEW (priv->month_view),
- (new_days_shown + 6) / 7);
- e_week_view_set_first_day_shown (E_WEEK_VIEW (priv->month_view), &new_start_date);
-
- gnome_calendar_set_view_internal (gcal, "monthview", TRUE, FALSE);
- gnome_calendar_update_date_navigator (gcal);
- } else if (new_days_shown == 7 && starts_on_week_start_day) {
- e_week_view_set_first_day_shown (E_WEEK_VIEW (priv->week_view), &new_start_date);
-
- gnome_calendar_set_view_internal (gcal, "weekview", TRUE, FALSE);
- gnome_calendar_update_date_navigator (gcal);
- } else {
- start_year = g_date_year (&new_start_date);
- start_month = g_date_month (&new_start_date) - 1;
- start_day = g_date_day (&new_start_date);
- end_year = g_date_year (&new_end_date);
- end_month = g_date_month (&new_end_date) - 1;
- end_day = g_date_day (&new_end_date);
-
- tm.tm_year = start_year - 1900;
- tm.tm_mon = start_month;
- tm.tm_mday = start_day;
- tm.tm_hour = 0;
- tm.tm_min = 0;
- tm.tm_sec = 0;
- tm.tm_isdst = -1;
- priv->selection_start_time = mktime (&tm);
-
- tm.tm_year = end_year - 1900;
- tm.tm_mon = end_month;
- tm.tm_mday = end_day + 1; /* mktime() will normalize this. */
- tm.tm_hour = 0;
- tm.tm_min = 0;
- tm.tm_sec = 0;
- tm.tm_isdst = -1;
- priv->selection_end_time = mktime (&tm);
-
- e_day_view_set_days_shown (E_DAY_VIEW (priv->day_view), new_days_shown);
- gnome_calendar_set_view (gcal, "dayview", TRUE, FALSE);
- }
-
- gnome_calendar_update_view_buttons (gcal);
- gtk_widget_grab_focus (get_current_page (gcal));
-}
-
-
-static void
-gnome_calendar_on_date_navigator_date_range_changed (ECalendarItem *calitem,
- GnomeCalendar *gcal)
-{
- GnomeCalendarPrivate *priv;
-
- priv = gcal->priv;
-
- tag_calendar_by_client (priv->date_navigator, priv->client);
-}
-
-
-static void
-gnome_calendar_on_date_navigator_style_set (GtkWidget *widget,
- GtkStyle *previous_style,
- gpointer data)
-{
- gnome_calendar_update_paned_quanta (GNOME_CALENDAR (data));
-}
-
-
-static void
-gnome_calendar_update_paned_quanta (GnomeCalendar *gcal)
-{
- GnomeCalendarPrivate *priv;
- gint row_height, col_width;
- gint top_border, bottom_border, left_border, right_border;
-
- priv = gcal->priv;
-
- e_calendar_get_border_size (priv->date_navigator,
- &top_border, &bottom_border,
- &left_border, &right_border);
- gtk_object_get (GTK_OBJECT (priv->date_navigator->calitem),
- "row_height", &row_height,
- "column_width", &col_width,
- NULL);
-
- /* The EPaned quantum feature works better if we add on the calendar
- borders to the quantum size. Otherwise if you shrink the date
- navigator you get left with the border widths/heights which looks
- bad. EPaned should be more flexible really. */
- col_width += left_border + right_border;
- row_height += top_border + bottom_border;
-
- /* We don't have to use the EPaned quantum feature. We could just let
- the calendar expand to fill the allocated space, showing as many
- months as will fit. But for that to work nicely the EPaned should
- resize the widgets as the bar is dragged. Otherwise the user has
- to mess around to get the number of months that they want. */
-#if 1
- gtk_object_set (GTK_OBJECT (priv->hpane),
- "quantum", (guint) col_width,
- NULL);
- gtk_object_set (GTK_OBJECT (priv->vpane),
- "quantum", (guint) row_height,
- NULL);
-#endif
-
- gnome_calendar_set_pane_positions (gcal);
-}
-
-
-static void
-gnome_calendar_on_date_navigator_size_allocate (GtkWidget *widget,
- GtkAllocation *allocation,
- gpointer data)
-{
- GnomeCalendar *gcal;
- GnomeCalendarPrivate *priv;
- gint width, height, row_height, col_width;
- gint top_border, bottom_border, left_border, right_border;
- gfloat hpane_pos, vpane_pos;
-
- gcal = GNOME_CALENDAR (data);
- priv = gcal->priv;
-
- if (priv->current_view_type != VIEW_NOT_SET) {
- e_calendar_get_border_size (priv->date_navigator,
- &top_border, &bottom_border,
- &left_border, &right_border);
- gtk_object_get (GTK_OBJECT (priv->date_navigator->calitem),
- "row_height", &row_height,
- "column_width", &col_width,
- NULL);
-
- /* We subtract one from each dimension since we added 1 in
- gnome_calendar_set_view_internal(). */
- width = allocation->width - 1;
- height = allocation->height - 1;
-
- /* We add the border sizes to work around the EPaned
- quantized feature. */
- col_width += left_border + right_border;
- row_height += top_border + bottom_border;
-
- hpane_pos = (gfloat) width / col_width;
- vpane_pos = (gfloat) height / row_height;
-
- if (priv->current_view_type == VIEW_MONTH
- && !priv->range_selected) {
- priv->hpane_pos_month_view = hpane_pos;
- priv->vpane_pos_month_view = vpane_pos;
- calendar_config_set_month_hpane_pos (hpane_pos);
- calendar_config_set_month_vpane_pos (vpane_pos);
- } else {
- priv->hpane_pos = hpane_pos;
- priv->vpane_pos = vpane_pos;
- calendar_config_set_hpane_pos (hpane_pos);
- calendar_config_set_vpane_pos (vpane_pos);
- }
- }
-}
-
-void
-gnome_calendar_set_view_buttons (GnomeCalendar *gcal,
- GtkWidget *day_button,
- GtkWidget *work_week_button,
- GtkWidget *week_button,
- GtkWidget *month_button)
-{
- GnomeCalendarPrivate *priv;
-
- g_return_if_fail (gcal != NULL);
- g_return_if_fail (GNOME_IS_CALENDAR (gcal));
- g_return_if_fail (day_button != NULL);
- g_return_if_fail (GTK_IS_TOGGLE_BUTTON (day_button));
- g_return_if_fail (work_week_button != NULL);
- g_return_if_fail (GTK_IS_TOGGLE_BUTTON (work_week_button));
- g_return_if_fail (week_button != NULL);
- g_return_if_fail (GTK_IS_TOGGLE_BUTTON (week_button));
- g_return_if_fail (month_button != NULL);
- g_return_if_fail (GTK_IS_TOGGLE_BUTTON (month_button));
-
- priv = gcal->priv;
-
- priv->day_button = day_button;
- priv->work_week_button = work_week_button;
- priv->week_button = week_button;
- priv->month_button = month_button;
-}
-
-/* This makes the appropriate radio button in the toolbar active. It blocks the
- * signals so that we can do a clean setup without affecting the views.
- */
-void
-gnome_calendar_update_view_buttons (GnomeCalendar *gcal)
-{
- GnomeCalendarPrivate *priv;
- GtkWidget *page, *button;
-
- priv = gcal->priv;
-
- page = get_current_page (gcal);
-
- if (page == priv->day_view)
- button = priv->day_button;
- else if (page == priv->work_week_view)
- button = priv->work_week_button;
- else if (page == priv->week_view)
- button = priv->week_button;
- else if (page == priv->month_view)
- button = priv->month_button;
- else {
- g_assert_not_reached ();
- return;
- }
-
- if (button) {
- gtk_signal_handler_block_by_data (GTK_OBJECT (button), gcal);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (button), gcal);
- }
-}
diff --git a/calendar/gui/gnome-cal.h b/calendar/gui/gnome-cal.h
deleted file mode 100644
index 0192efabe4..0000000000
--- a/calendar/gui/gnome-cal.h
+++ /dev/null
@@ -1,130 +0,0 @@
-/* Evolution calendar - Main calendar view widget
- *
- * Copyright (C) 1998 The Free Software Foundation
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Authors: Miguel de Icaza <miguel@ximian.com>
- * Federico Mena-Quintero <federico@ximian.com>
- * Seth Alves <alves@hungry.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 GNOME_CALENDAR_APP_H
-#define GNOME_CALENDAR_APP_H
-
-#include <time.h>
-#include <libgnome/gnome-defs.h>
-#include <gtk/gtkvbox.h>
-#include <widgets/misc/e-calendar.h>
-#include <cal-client/cal-client.h>
-
-BEGIN_GNOME_DECLS
-
-
-
-#define GNOME_TYPE_CALENDAR (gnome_calendar_get_type ())
-#define GNOME_CALENDAR(obj) (GTK_CHECK_CAST ((obj), GNOME_TYPE_CALENDAR, GnomeCalendar))
-#define GNOME_CALENDAR_CLASS(klass) (GTK_CHECK_CAST_CLASS ((klass), GNOME_TYPE_CALENDAR, \
- GnomeCalendarClass))
-#define GNOME_IS_CALENDAR(obj) (GTK_CHECK_TYPE ((obj), GNOME_TYPE_CALENDAR))
-#define GNOME_IS_CALENDAR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_CALENDAR))
-
-typedef struct _GnomeCalendar GnomeCalendar;
-typedef struct _GnomeCalendarClass GnomeCalendarClass;
-typedef struct _GnomeCalendarPrivate GnomeCalendarPrivate;
-
-struct _GnomeCalendar {
- GtkVBox vbox;
-
- /* Private data */
- GnomeCalendarPrivate *priv;
-};
-
-struct _GnomeCalendarClass {
- GtkVBoxClass parent_class;
-};
-
-
-GtkType gnome_calendar_get_type (void);
-GtkWidget *gnome_calendar_construct (GnomeCalendar *gcal);
-
-GtkWidget *gnome_calendar_new (void);
-
-CalClient *gnome_calendar_get_cal_client (GnomeCalendar *gcal);
-
-gboolean gnome_calendar_open (GnomeCalendar *gcal, const char *str_uri);
-/*
-int gnome_calendar_create (GnomeCalendar *gcal,
- char *file);
-*/
-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);
-char *gnome_calendar_get_current_view_name (GnomeCalendar *gcal);
-void gnome_calendar_set_view (GnomeCalendar *gcal,
- char *page_name,
- gboolean reset_range_shown,
- gboolean focus);
-
-void gnome_calendar_set_selected_time_range (GnomeCalendar *gcal,
- time_t start_time,
- time_t end_time);
-void gnome_calendar_get_selected_time_range (GnomeCalendar *gcal,
- time_t *start_time,
- time_t *end_time);
-
-void gnome_calendar_edit_object (GnomeCalendar *gcal,
- CalComponent *comp);
-
-void gnome_calendar_new_appointment (GnomeCalendar *gcal);
-void gnome_calendar_new_appointment_for (GnomeCalendar *cal,
- time_t dtstart, time_t dtend,
- gboolean all_day);
-
-/* 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);
-
-/* Tells the calendar to reload all config settings. initializing should be
- TRUE when we are setting the config settings for the first time. */
-void gnome_calendar_update_config_settings (GnomeCalendar *gcal,
- gboolean initializing);
-
-void gnome_calendar_set_view_buttons (GnomeCalendar *gcal,
- GtkWidget *day_button,
- GtkWidget *work_week_button,
- GtkWidget *week_button,
- GtkWidget *month_button);
-
-/* This makes the appropriate radio button in the toolbar active.
- It sets the ignore_view_button_clicks flag so the "clicked" signal handlers
- just return without doing anything. */
-void gnome_calendar_update_view_buttons (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 @@
-<!-- Some simple instructions on how to use the help browser -->
-<BODY>
-<!-- <TITLE>GNOME Calendar Documentation</TITLE> -->
-<H2> GNOME Calendar Documentation </H2>
-<p>
-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).
-
-<p>
-
-<a name="cmdline">
-<h2>Command line options</h2>
-
-Several options are available on the command line, they are:
-<ul>
- <li><tt>--events</tt> Displays the events for the date
- specified (or today, if no date is specified).
-
- <li><tt>--from DATE</tt> 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.
-
- <li><tt>--to DATE</tt> 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 <tt>--from</tt> option.
-
- <li><tt>--file FILE</tt> Set the calendar to the FILE
- specified on the command line.
-
- <li><tt>--todo</tt> Dumps the to-do values to standard output.
-</ul>
-
-<p>
-
-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".
-
-</BODY>
-
diff --git a/calendar/gui/gnome-calendar-conduit.png b/calendar/gui/gnome-calendar-conduit.png
deleted file mode 100644
index e867ba90b2..0000000000
--- a/calendar/gui/gnome-calendar-conduit.png
+++ /dev/null
Binary files differ
diff --git a/calendar/gui/goto-dialog.glade b/calendar/gui/goto-dialog.glade
deleted file mode 100644
index 289ad7ab69..0000000000
--- a/calendar/gui/goto-dialog.glade
+++ /dev/null
@@ -1,154 +0,0 @@
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <name>preferences</name>
- <program_name>preferences</program_name>
- <directory></directory>
- <source_directory>src</source_directory>
- <pixmaps_directory>pixmaps</pixmaps_directory>
- <language>C</language>
- <gnome_support>True</gnome_support>
- <gettext_support>True</gettext_support>
-</project>
-
-<widget>
- <class>GnomeDialog</class>
- <name>goto-dialog</name>
- <visible>False</visible>
- <title>Go To Date</title>
- <type>GTK_WINDOW_TOPLEVEL</type>
- <position>GTK_WIN_POS_NONE</position>
- <modal>False</modal>
- <allow_shrink>False</allow_shrink>
- <allow_grow>False</allow_grow>
- <auto_shrink>False</auto_shrink>
- <auto_close>False</auto_close>
- <hide_on_close>False</hide_on_close>
-
- <widget>
- <class>GtkVBox</class>
- <child_name>GnomeDialog:vbox</child_name>
- <name>dialog-vbox1</name>
- <homogeneous>False</homogeneous>
- <spacing>8</spacing>
- <child>
- <padding>4</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkHButtonBox</class>
- <child_name>GnomeDialog:action_area</child_name>
- <name>dialog-action_area1</name>
- <layout_style>GTK_BUTTONBOX_END</layout_style>
- <spacing>8</spacing>
- <child_min_width>85</child_min_width>
- <child_min_height>27</child_min_height>
- <child_ipad_x>7</child_ipad_x>
- <child_ipad_y>0</child_ipad_y>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- <pack>GTK_PACK_END</pack>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>button4</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <label>Go To Today</label>
- <stock_pixmap>GNOME_STOCK_PIXMAP_JUMP_TO</stock_pixmap>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button5</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
- </widget>
- </widget>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox</name>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox12</name>
- <homogeneous>True</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkOptionMenu</class>
- <name>month</name>
- <can_focus>True</can_focus>
- <items>January
-February
-March
-April
-May
-June
-July
-August
-September
-October
-November
-December
-</items>
- <initial_choice>0</initial_choice>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkSpinButton</class>
- <name>year</name>
- <can_focus>True</can_focus>
- <climb_rate>1</climb_rate>
- <digits>0</digits>
- <numeric>True</numeric>
- <update_policy>GTK_UPDATE_IF_VALID</update_policy>
- <snap>False</snap>
- <wrap>False</wrap>
- <value>1969</value>
- <lower>1969</lower>
- <upper>2038</upper>
- <step>1</step>
- <page>5</page>
- <page_size>10</page_size>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>Placeholder</class>
- </widget>
- </widget>
- </widget>
-</widget>
-
-</GTK-Interface>
diff --git a/calendar/gui/goto.c b/calendar/gui/goto.c
deleted file mode 100644
index 448f898638..0000000000
--- a/calendar/gui/goto.c
+++ /dev/null
@@ -1,220 +0,0 @@
-/* Go to date dialog for Evolution
- *
- * Copyright (C) 1998 Red Hat, Inc.
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Authors: Federico Mena <federico@ximian.com>
- * JP Rosevear <jpr@ximian.com>
- */
-
-#include <config.h>
-#include <gtk/gtkmenu.h>
-#include <gtk/gtkoptionmenu.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtkspinbutton.h>
-#include <gtk/gtktogglebutton.h>
-#include <gtk/gtkwindow.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <glade/glade.h>
-#include "calendar-commands.h"
-#include "tag-calendar.h"
-#include "goto.h"
-
-typedef struct
-{
- GladeXML *xml;
- GtkWidget *dialog;
-
- GtkWidget *month;
- GtkWidget *year;
- ECalendar *ecal;
- GtkWidget *vbox;
-
- GnomeCalendar *gcal;
- gint year_val;
- gint month_val;
- gint day_val;
-
-} GoToDialog;
-
-GoToDialog *dlg = NULL;
-
-/* Callback used when the year adjustment is changed */
-static void
-year_changed (GtkAdjustment *adj, gpointer data)
-{
- GoToDialog *dlg = data;
-
- dlg->year_val = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (dlg->year));
- e_calendar_item_set_first_month (dlg->ecal->calitem, dlg->year_val, dlg->month_val);
-}
-
-/* Callback used when a month button is toggled */
-static void
-month_changed (GtkToggleButton *toggle, gpointer data)
-{
- GoToDialog *dlg = data;
- GtkWidget *menu, *active;
-
- menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (dlg->month));
- active = gtk_menu_get_active (GTK_MENU (menu));
- dlg->month_val = g_list_index (GTK_MENU_SHELL (menu)->children, active);
-
- e_calendar_item_set_first_month (dlg->ecal->calitem, dlg->year_val, dlg->month_val);
-}
-
-static void
-ecal_date_range_changed (ECalendarItem *calitem, gpointer user_data)
-{
- GoToDialog *dlg = user_data;
- CalClient *client;
-
- client = gnome_calendar_get_cal_client (dlg->gcal);
- if (client)
- tag_calendar_by_client (dlg->ecal, client);
-}
-
-/* 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 void
-ecal_event (ECalendarItem *calitem, gpointer user_data)
-{
- GoToDialog *dlg = user_data;
- GDate start_date, end_date;
- struct tm tm;
- time_t et;
-
- e_calendar_item_get_selection (calitem, &start_date, &end_date);
- g_date_to_struct_tm (&start_date, &tm);
- et = mktime (&tm);
-
- gnome_calendar_goto (dlg->gcal, et);
-
- gnome_dialog_close (GNOME_DIALOG (dlg->dialog));
-}
-
-/* Creates the ecalendar */
-static void
-create_ecal (GoToDialog *dlg)
-{
- ECalendarItem *calitem;
-
- dlg->ecal = E_CALENDAR (e_calendar_new ());
- calitem = dlg->ecal->calitem;
-
- e_calendar_item_set_display_popup (calitem, FALSE);
- gtk_widget_show (GTK_WIDGET (dlg->ecal));
- gtk_box_pack_start (GTK_BOX (dlg->vbox), GTK_WIDGET (dlg->ecal), TRUE, TRUE, 0);
-
- e_calendar_item_set_first_month (calitem, dlg->year_val, dlg->month_val);
-
- ecal_date_range_changed (calitem, dlg);
-}
-
-static void
-goto_today (GoToDialog *dlg)
-{
- gnome_calendar_goto_today (dlg->gcal);
-}
-
-/* Gets the widgets from the XML file and returns if they are all available. */
-static gboolean
-get_widgets (GoToDialog *dlg)
-{
-#define GW(name) glade_xml_get_widget (dlg->xml, name)
-
- dlg->dialog = GW ("goto-dialog");
-
- dlg->month = GW ("month");
- dlg->year = GW ("year");
- dlg->vbox = GW ("vbox");
-
-#undef GW
-
- return (dlg->dialog
- && dlg->month
- && dlg->year
- && dlg->vbox);
-}
-
-static void
-goto_dialog_init_widgets (GoToDialog *dlg)
-{
- GtkWidget *menu;
- GtkAdjustment *adj;
- GList *l;
-
- menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (dlg->month));
- for (l = GTK_MENU_SHELL (menu)->children; l != NULL; l = l->next)
- gtk_signal_connect (GTK_OBJECT (menu), "selection_done",
- GTK_SIGNAL_FUNC (month_changed), dlg);
-
- adj = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (dlg->year));
- gtk_signal_connect (GTK_OBJECT (adj), "value_changed",
- (GtkSignalFunc) year_changed, dlg);
-
- gtk_signal_connect (GTK_OBJECT (dlg->ecal->calitem),
- "date_range_changed",
- GTK_SIGNAL_FUNC (ecal_date_range_changed),
- dlg);
- gtk_signal_connect (GTK_OBJECT (dlg->ecal->calitem),
- "selection_changed",
- (GtkSignalFunc) ecal_event,
- dlg);
-}
-
-/* Creates a "goto date" dialog and runs it */
-void
-goto_dialog (GnomeCalendar *gcal)
-{
- GtkWidget *menu;
- time_t start_time;
- struct tm tm;
- int b;
-
- if (dlg) {
- return;
- }
-
- dlg = g_new0 (GoToDialog, 1);
-
- /* Load the content widgets */
- dlg->xml = glade_xml_new (EVOLUTION_GLADEDIR "/goto-dialog.glade", NULL);
- if (!dlg->xml) {
- g_message ("goto_dialog(): Could not load the Glade XML file!");
- return;
- }
-
- if (!get_widgets (dlg)) {
- g_message ("goto_dialog(): Could not find all widgets in the XML file!");
- return;
- }
- dlg->gcal = gcal;
-
- gnome_calendar_get_selected_time_range (dlg->gcal, &start_time, NULL);
- tm = *localtime (&start_time);
- dlg->year_val = tm.tm_year + 1900;
- dlg->month_val = tm.tm_mon;
- dlg->day_val = tm.tm_mday;
-
- menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (dlg->month));
- gtk_option_menu_set_history (GTK_OPTION_MENU (dlg->month), dlg->month_val);
- gtk_spin_button_set_value (GTK_SPIN_BUTTON (dlg->year), dlg->year_val);
-
- create_ecal (dlg);
-
- goto_dialog_init_widgets (dlg);
-
- gnome_dialog_set_parent (GNOME_DIALOG (dlg->dialog),
- GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gcal))));
-
- b = gnome_dialog_run_and_close (GNOME_DIALOG (dlg->dialog));
- if (b == 0)
- goto_today (dlg);
-
- gtk_object_unref (GTK_OBJECT (dlg->xml));
- g_free (dlg);
- dlg = NULL;
-}
diff --git a/calendar/gui/goto.h b/calendar/gui/goto.h
deleted file mode 100644
index b40c222fc4..0000000000
--- a/calendar/gui/goto.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Evolution calendar - Go To Date dialog
- *
- * Copyright (C) 1998 Red Hat, Inc.
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Authors: Federico Mena <federico@ximian.com>
- * JP Rosevear <jpr@ximian.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 GOTO_DIALOG_H
-#define GOTO_DIALOG_H
-
-#include "gnome-cal.h"
-
-void goto_dialog (GnomeCalendar *gcal);
-
-#endif
diff --git a/calendar/gui/itip-utils.c b/calendar/gui/itip-utils.c
deleted file mode 100644
index f090f051d6..0000000000
--- a/calendar/gui/itip-utils.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * itip-utils.c
- *
- * Authors:
- * Jesse Pavel <jpavel@helixcode.com>
- *
- * Copyright 2000, Helix Code, Inc.
- */
-
-#include "itip-utils.h"
-
-gchar *partstat_values[] = {
- "Needs action",
- "Accepted",
- "Declined",
- "Tentative",
- "Delegated",
- "Completed",
- "In Progress",
- "Unknown"
-};
-
-gchar *role_values[] = {
- "Chair",
- "Required Participant",
- "Optional Participant",
- "Non-Participant",
- "Other"
-};
-
-
-
-/* Note that I have to iterate and check myself because
- ical_property_get_xxx_parameter doesn't take into account the
- kind of parameter for which you wish to search! */
-icalparameter *
-get_icalparam_by_type (icalproperty *prop, icalparameter_kind kind)
-{
- icalparameter *param;
-
- for (param = icalproperty_get_first_parameter (prop, ICAL_ANY_PARAMETER);
- param != NULL && icalparameter_isa (param) != kind;
- param = icalproperty_get_next_parameter (prop, ICAL_ANY_PARAMETER) );
-
- return param;
-}
-
-
diff --git a/calendar/gui/itip-utils.h b/calendar/gui/itip-utils.h
deleted file mode 100644
index a2f825be8b..0000000000
--- a/calendar/gui/itip-utils.h
+++ /dev/null
@@ -1,15 +0,0 @@
-
-#ifndef ITIP_UTILS_HEADER
-#define ITIP_UTILS_HEADER
-
-#include <config.h>
-#include <ical.h>
-#include <string.h>
-#include <glib.h>
-
-extern gchar *partstat_values[];
-extern gchar *role_values[];
-
-icalparameter * get_icalparam_by_type (icalproperty *prop, icalparameter_kind kind);
-
-#endif
diff --git a/calendar/gui/main.c b/calendar/gui/main.c
deleted file mode 100644
index e75819f0f0..0000000000
--- a/calendar/gui/main.c
+++ /dev/null
@@ -1,89 +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 <config.h>
-#endif
-
-#include <glib.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-init.h>
-#include <glade/glade.h>
-
-#include <liboaf/liboaf.h>
-#include <bonobo/bonobo-main.h>
-
-#include <gal/widgets/e-cursors.h>
-
-#include "alarm-notify/alarm.h"
-#include "calendar-commands.h"
-#include "calendar-config.h"
-#include "component-factory.h"
-#include "control-factory.h"
-#include "e-itip-control.h"
-#include "tasks-control-factory.h"
-
-static void
-init_bonobo (int argc, char **argv)
-{
- if (gnome_init_with_popt_table ("evolution-calendar", VERSION, argc, argv,
- oaf_popt_options, 0, NULL) != 0)
- g_error (_("Could not initialize GNOME"));
-
- oaf_init (argc, argv);
-
- 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)
-{
- bindtextdomain(PACKAGE, EVOLUTION_LOCALEDIR);
- textdomain(PACKAGE);
-
- init_bonobo (argc, argv);
- glade_gnome_init ();
- alarm_init ();
- e_cursors_init ();
-
-#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 ();
- e_itip_control_factory_init ();
- tasks_control_factory_init ();
-
- bonobo_main ();
-
- alarm_done ();
- calendar_config_write_on_exit ();
-
- return 0;
-}
diff --git a/calendar/gui/meeting-mockup.glade b/calendar/gui/meeting-mockup.glade
deleted file mode 100644
index 9cf8103037..0000000000
--- a/calendar/gui/meeting-mockup.glade
+++ /dev/null
@@ -1,488 +0,0 @@
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <name>meeting-mockup</name>
- <program_name>meeting-mockup</program_name>
- <directory></directory>
- <source_directory>.</source_directory>
- <pixmaps_directory>../../art</pixmaps_directory>
- <language>C</language>
- <gnome_support>True</gnome_support>
- <gettext_support>True</gettext_support>
- <output_main_file>False</output_main_file>
- <output_support_files>False</output_support_files>
- <output_build_files>False</output_build_files>
-</project>
-
-<widget>
- <class>GnomePropertyBox</class>
- <name>meeting-dialog</name>
- <visible>False</visible>
- <position>GTK_WIN_POS_NONE</position>
- <modal>False</modal>
- <allow_shrink>False</allow_shrink>
- <allow_grow>False</allow_grow>
- <auto_shrink>False</auto_shrink>
-
- <widget>
- <class>GtkNotebook</class>
- <child_name>GnomeDock:contents</child_name>
- <name>notebook1</name>
- <border_width>2</border_width>
- <can_focus>True</can_focus>
- <show_tabs>True</show_tabs>
- <show_border>True</show_border>
- <tab_pos>GTK_POS_TOP</tab_pos>
- <scrollable>False</scrollable>
- <tab_hborder>2</tab_hborder>
- <tab_vborder>2</tab_vborder>
- <popup_enable>False</popup_enable>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox51</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>6</spacing>
-
- <widget>
- <class>GtkTable</class>
- <name>table11</name>
- <rows>1</rows>
- <columns>2</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>4</row_spacing>
- <column_spacing>4</column_spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label56</name>
- <label>Su_mmary:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>7.45058e-09</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <default_focus_target>general-summary</default_focus_target>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>general-summary</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame31</name>
- <label>Date &amp; Time</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkTable</class>
- <name>table12</name>
- <border_width>4</border_width>
- <rows>2</rows>
- <columns>3</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>4</row_spacing>
- <column_spacing>4</column_spacing>
-
- <widget>
- <class>GtkLabel</class>
- <name>label57</name>
- <label>_Start time:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label58</name>
- <label>_End time:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>all-day-event</name>
- <can_focus>True</can_focus>
- <label>A_ll day event</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <left_attach>2</left_attach>
- <right_attach>3</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>start-time</name>
- <creation_function>make_date_edit</creation_function>
- <string1></string1>
- <string2></string2>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Tue, 16 May 2000 19:11:05 GMT</last_modification_time>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>True</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>False</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>end-time</name>
- <creation_function>make_date_edit</creation_function>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Tue, 16 May 2000 19:11:10 GMT</last_modification_time>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>True</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>False</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkScrolledWindow</class>
- <name>scrolledwindow12</name>
- <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
- <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
- <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
- <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkText</class>
- <name>description</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text></text>
- </widget>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame32</name>
- <label>Classification</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox52</name>
- <border_width>2</border_width>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
-
- <widget>
- <class>GtkRadioButton</class>
- <name>classification-public</name>
- <can_focus>True</can_focus>
- <label>Pu_blic</label>
- <active>True</active>
- <draw_indicator>True</draw_indicator>
- <group>classification_radio_group</group>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkRadioButton</class>
- <name>classification-private</name>
- <can_focus>True</can_focus>
- <label>Pri_vate</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <group>classification_radio_group</group>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkRadioButton</class>
- <name>classification-confidential</name>
- <can_focus>True</can_focus>
- <label>_Confidential</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <group>classification_radio_group</group>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox53</name>
- <homogeneous>False</homogeneous>
- <spacing>2</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>contacts-button</name>
- <can_focus>True</can_focus>
- <relief>GTK_RELIEF_NORMAL</relief>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label59</name>
- <label>_Contacts...</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>4</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>contacts</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>categories-button</name>
- <can_focus>True</can_focus>
- <relief>GTK_RELIEF_NORMAL</relief>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label60</name>
- <label>Ca_tegories...</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>4</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>categories</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label61</name>
- <label>Meeting</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox52</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
-
- <widget>
- <class>GnomePixmap</class>
- <name>pixmap1</name>
- <filename>meeting_widget.png</filename>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label65</name>
- <label>Attendees</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
-</widget>
-
-</GTK-Interface>
diff --git a/calendar/gui/print.c b/calendar/gui/print.c
deleted file mode 100644
index f89b1dae52..0000000000
--- a/calendar/gui/print.c
+++ /dev/null
@@ -1,1327 +0,0 @@
-/* Evolution calendar - Print support
- *
- * Copyright (C) 2000 Helix Code, Inc.
- *
- * Authors: Michael Zucchi <notzed@helixcode.com>
- * Federico Mena-Quintero <federico@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 <sys/stat.h>
-#include <sys/time.h>
-#include <math.h>
-#include <time.h>
-#include <glib.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnome/gnome-paper.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-uidefs.h>
-#include <libgnomeprint/gnome-print.h>
-#include <libgnomeprint/gnome-print-copies.h>
-#include <libgnomeprint/gnome-print-master.h>
-#include <libgnomeprint/gnome-print-master-preview.h>
-#include <libgnomeprint/gnome-print-preview.h>
-#include <libgnomeprint/gnome-printer-dialog.h>
-#include <e-util/e-dialog-widgets.h>
-#include <gal/widgets/e-unicode.h>
-#include <cal-util/timeutil.h>
-#include "calendar-commands.h"
-#include "gnome-cal.h"
-#include "print.h"
-
-
-
-/* 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 */
-
-/* FIXME: This needs to be able to render using all the options from the new
- * calendar configuration stuff.
- */
-#define WEEK_STARTS_ON_MONDAY FALSE
-
-struct pdinfo
-{
- GList *slots;
-};
-
-struct psinfo
-{
- GList *events;
-};
-
-struct ptinfo
-{
- GList *todos;
-};
-
-struct einfo
-{
- char *text;
- time_t start;
- time_t end;
- int count;
-};
-
-
-/* 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 - gnome_font_get_size (font));
- 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-gnome_font_get_size(font)-gnome_font_get_size(font)*0.4, linewidth, 0.9);
- print_border(pc, *l, *r, *t-gnome_font_get_size(font)-gnome_font_get_size(font)*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-=gnome_font_get_size(font)*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)
-{
- CalClient *client;
- 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") };
-
- client = gnome_calendar_get_cal_client (gcal);
-
- 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-gnome_font_get_size(font)*1.3,
- 1.0, 0.9);
- print_text(pc, font, buf, ALIGN_CENTRE,
- left, left+7*xpad, top, top - gnome_font_get_size (font));
- 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-gnome_font_get_size(font_bold));
- }
-
- for (y=0;y<6;y++) {
- for (x=0;x<7;x++) {
- day = days[y*7+x];
- if (day!=0) {
- GList *uids;
-
- sprintf(buf, "%d", day);
-
- /* this is a slow messy way to do this ... but easy ... */
- uids = cal_client_get_objects_in_range (client,
- CALOBJ_TYPE_EVENT,
- now, time_day_end (now));
- font = uids ? font_bold : font_normal;
- cal_obj_uid_list_free (uids);
-
- next = time_add_day(now, 1);
- if ((now>=greystart && now<greyend)
- || (greystart>=now && greystart<next)) {
- print_border(pc,
- left+x*xpad+xpad*0.1,
- left+(x+1)*xpad+xpad*0.1,
- bottom+(5-y)*ypad+gnome_font_get_size(font)-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+gnome_font_get_size(font), 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, const char *text,
- double left, double right, double top, double bottom, double indent)
-{
- double maxwidth = right-left;
- double width;
- const 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 (top<bottom) {
- /* too much to fit in appointment printout */
- return top;
- }
-
- outbufflen = 1024;
- outbuffer = g_malloc(outbufflen);
- outbuffendmarker = outbuffer+outbufflen-2;
-
- top -= gnome_font_get_size (font);
- 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_glyph_width(font, gnome_font_lookup_default (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 -= gnome_font_get_size (font);
- if (top<bottom) {
- /* too much to fit, drop the rest */
- g_free(outbuffer);
- return top;
- }
- if (first) {
- left += indent;
- maxwidth -= indent;
- first=0;
- }
- }
- p++;
- }
- if (dump==0) {
- *o=0;
- gnome_print_moveto(pc, left, top);
- gnome_print_show(pc, outbuffer);
- top -= gnome_font_get_size (font);
- }
- g_free(outbuffer);
- return top;
-}
-
-/*
- * Print Day Details
- */
-static gboolean
-print_day_details_cb (CalComponent *comp, time_t istart, time_t iend, gpointer data)
-{
- CalComponentText text;
- GList *l, *col = NULL;
- struct pdinfo *pdi = (struct pdinfo *)data;
- struct einfo *ei;
-
- ei = g_new (struct einfo, 1);
-
- cal_component_get_summary (comp, &text);
- ei->text = g_strdup (text.value);
-
- ei->start = istart;
- ei->end = iend;
- ei->count = 0;
-
- for (l = pdi->slots; l; l = l->next) {
- struct einfo *testei;
-
- col = (GList *)l->data;
- testei = (struct einfo *)col->data;
-
- if (ei->start >= testei->end) {
- col = g_list_prepend (col, ei);
- l->data = col;
- return TRUE;
- }
-
- testei->count++;
- ei->count++;
- }
-
- col = NULL;
- col = g_list_prepend (col, ei);
- pdi->slots = g_list_append (pdi->slots, col);
-
- return TRUE;
-}
-
-static void
-print_day_details (GnomePrintContext *pc, GnomeCalendar *gcal, time_t whence,
- double left, double right, double top, double bottom)
-{
- CalClient *client;
- struct pdinfo pdi;
- time_t start, end;
- GList *l;
- int num_slots, i;
- GnomeFont *font_hour, *font_minute, *font_summary;
- double yinc, y, yend, x, xend;
- double width=40, slot_width;
- char buf[20];
-
- client = gnome_calendar_get_cal_client (gcal);
-
- 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);
-
- pdi.slots = NULL;
-
- cal_client_generate_instances (client, CALOBJ_TYPE_EVENT, start, end,
- print_day_details_cb, &pdi);
-
- num_slots = g_list_length (pdi.slots);
- slot_width = (right-left-width)/num_slots;
-
- for (i = num_slots, l = pdi.slots; l; i--, l = l->next) {
- GList *e = (GList *)l->data;
-
- for (; e; e = e->next) {
- struct einfo *ei = (struct einfo *)e->data;
-
- y = top - (top - bottom) * (ei->start - start) / (end - start) - 1;
- yend = top - (top - bottom) * (ei->end - start) / (end - start) + 1;
- x = left + width + slot_width * (num_slots - i);
-
- if (num_slots > 0)
- x++;
-
- if (i == 0)
- xend = x + (num_slots - ei->count) * slot_width - 2;
- else
- xend = x + slot_width - 2;
-
- print_border (pc, x, xend, y, yend, 0.0, 0.9);
-
- bound_text (pc, font_summary, ei->text, x, xend, y, yend, 0);
-
- g_free (ei);
- }
- g_list_free (e);
- }
- g_list_free (pdi.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));
-}
-
-/*
- * Print Day Summary
- */
-#if 0
-#define TIME_FMT "%X"
-#else
-#define TIME_FMT "%l:%M%p"
-#endif
-
-static gboolean
-print_day_summary_cb (CalComponent *comp, time_t istart, time_t iend, gpointer data)
-{
- CalComponentText text;
- struct psinfo *psi = (struct psinfo *)data;
- struct einfo *ei;
-
- ei = g_new (struct einfo, 1);
-
- cal_component_get_summary (comp, &text);
- ei->text = g_strdup (text.value);
-
- ei->start = istart;
- ei->end = iend;
- ei->count = 0;
-
- psi->events = g_list_append (psi->events, ei);
-
- return TRUE;
-}
-
-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)
-{
- CalClient *client;
- struct psinfo psi;
- time_t start, end;
- GList *l;
- GnomeFont *font_summary;
- double y, yend, x, xend, inc, incsmall;
- char buf[100];
- double margin;
- struct tm tm;
-
- client = gnome_calendar_get_cal_client (gcal);
-
- /* 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);
-
- psi.events = NULL;
-
- cal_client_generate_instances (client, CALOBJ_TYPE_EVENT, start, end,
- print_day_summary_cb, &psi);
- 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 (l = psi.events; l; l = l->next) {
- struct einfo *ei = (struct einfo *)l->data;
-
- x = left + incsmall;
- xend = right - inc;
-
- if (y - gnome_font_get_size (font_summary) < bottom)
- break;
-
- tm = *localtime (&ei->start);
- strftime (buf, 100, TIME_FMT, &tm);
- gnome_print_moveto (pc, x + (margin
- - gnome_font_get_width_string (font_summary, buf)),
- y - gnome_font_get_size (font_summary));
- gnome_print_show (pc, buf);
-
- if (totime) {
- tm = *localtime (&ei->end);
- strftime (buf, 100, TIME_FMT, &tm);
- gnome_print_moveto (pc,
- (x + margin + inc
- + (margin
- - gnome_font_get_width_string (font_summary, buf))),
- y - gnome_font_get_size (font_summary));
- gnome_print_show (pc, buf);
-
- y = bound_text (pc, font_summary, ei->text,
- 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, ei->text,
- x + margin + inc, xend,
- y, yend, -margin + inc);
- }
-
- y += gnome_font_get_size (font_summary) - inc;
-
- g_free (ei);
- }
- g_list_free (psi.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-gnome_font_get_size(font_days));
- }
- top -= gnome_font_get_size(font_days)*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)
-{
- CalClient *client;
- GList *uids;
- GList *l;
- GnomeFont *font_summary;
- double y, yend, x, xend;
-
- client = gnome_calendar_get_cal_client (gcal);
-
- 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, _("Tasks"), font_summary,
- ALIGN_CENTRE | ALIGN_BORDER, &left, &right, &top, &bottom, 1.0);
-
- y = top - 3;
- yend = bottom - 2;
-
- uids = cal_client_get_uids (client, CALOBJ_TYPE_TODO);
-
- for (l = uids; l; l = l->next) {
- char *uid;
- CalComponent *comp;
- CalClientGetStatus status;
- CalComponentText summary;
-
- uid = l->data;
-
- status = cal_client_get_object (client, uid, &comp);
-
- switch (status) {
- case CAL_CLIENT_GET_SUCCESS:
- break;
-
- case CAL_CLIENT_GET_NOT_FOUND:
- /* Nothing: the object may have been removed from the server */
- continue;
-
- case CAL_CLIENT_GET_SYNTAX_ERROR:
- g_message ("print_todo_details(): Syntax error while getting object `%s'",
- uid);
- continue;
-
- default:
- g_assert_not_reached ();
- }
-
- cal_component_get_summary (comp, &summary);
-
- if (!summary.value)
- continue;
-
- x = left;
- xend = right - 2;
-
- if (y < bottom)
- break;
-
- y = bound_text (pc, font_summary, summary.value, x + 2, xend, y, yend, 0);
- y += gnome_font_get_size (font_summary);
- gnome_print_moveto (pc, x, y - 3);
- gnome_print_lineto (pc, xend, y - 3);
- gnome_print_stroke (pc);
- y -= 3;
- }
-
- cal_obj_uid_list_free (uids);
-
- 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;
- GtkWidget *radio;
- GSList *group;
- char text[1024];
- char str1[512];
- char str2[512];
- 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_week_end (at), -1);
-
- week_begin_tm = *localtime (&week_begin);
- week_end_tm = *localtime (&week_end);
-
- if (week_begin_tm.tm_mon == week_end_tm.tm_mon) {
- strftime (str1, sizeof (str1), _("%a %b %d"), &week_begin_tm);
- strftime (str2, sizeof (str2), _("%a %d %Y"), &week_end_tm);
- } else {
- if (week_begin_tm.tm_year == week_end_tm.tm_year) {
- strftime (str1, sizeof (str1), _("%a %b %d"), &week_begin_tm);
- strftime (str2, sizeof (str2), _("%a %b %d %Y"), &week_end_tm);
- } else {
- strftime (str1, sizeof (str1), _("%a %b %d %Y"), &week_begin_tm);
- strftime (str2, sizeof (str2), _("%a %b %d %Y"), &week_end_tm);
- }
- }
-
- g_snprintf (text, sizeof (text), _("Current week (%s - %s)"), str1, str2);
-
- radio = gtk_radio_button_new_with_label (group, text);
- group = gtk_radio_button_group (GTK_RADIO_BUTTON (radio));
- gtk_box_pack_start (GTK_BOX (box), radio, FALSE, FALSE, 0);
-
- /* Month */
-
- strftime (text, sizeof (text), _("Current month (%b %Y)"), &tm);
- radio = gtk_radio_button_new_with_label (group, text);
- group = gtk_radio_button_group (GTK_RADIO_BUTTON (radio));
- 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);
- group = gtk_radio_button_group (GTK_RADIO_BUTTON (radio));
- gtk_box_pack_start (GTK_BOX (box), radio, FALSE, FALSE, 0);
-
- /* Select default */
-
- e_dialog_widget_hook_value (dialog, radio, view, (gpointer) print_view_map);
-
- gtk_widget_show_all (box);
- return box;
-}
-
-void
-print_calendar (GnomeCalendar *gcal, gboolean preview, time_t at, PrintView default_view)
-{
- GnomePrinter *printer;
- GnomePrintMaster *gpm;
- GnomePrintContext *pc;
- int copies, collate;
- const GnomePaper *paper_info;
- double l, r, t, b, todo, header;
- char buf[100];
- time_t when;
-
- g_return_if_fail (gcal != NULL);
- g_return_if_fail (GNOME_IS_CALENDAR (gcal));
-
- printer = NULL;
- copies = 1;
- collate = FALSE;
-
- if (!preview) {
- GtkWidget *gpd;
- GtkWidget *range;
- int view;
-
- gpd = gnome_print_dialog_new (_("Print Calendar"),
- GNOME_PRINT_DIALOG_RANGE | GNOME_PRINT_DIALOG_COPIES);
-
- view = (int) default_view;
- range = range_selector_new (gpd, at, &view);
- gnome_print_dialog_construct_range_custom (GNOME_PRINT_DIALOG (gpd), range);
-
- gnome_dialog_set_default (GNOME_DIALOG (gpd), GNOME_PRINT_PRINT);
-
- /* Run dialog */
-
- switch (gnome_dialog_run (GNOME_DIALOG (gpd))) {
- case GNOME_PRINT_PRINT:
- break;
-
- case GNOME_PRINT_PREVIEW:
- preview = TRUE;
- break;
-
- case -1:
- return;
-
- default:
- gnome_dialog_close (GNOME_DIALOG (gpd));
- return;
- }
-
- e_dialog_get_values (gpd);
- default_view = (PrintView) view;
-
- gnome_print_dialog_get_copies (GNOME_PRINT_DIALOG (gpd), &copies, &collate);
- printer = gnome_print_dialog_get_printer (GNOME_PRINT_DIALOG (gpd));
-
- gnome_dialog_close (GNOME_DIALOG (gpd));
- }
-
- /* FIXME: allow configuration of paper size */
-
- gpm = gnome_print_master_new ();
-
- paper_info = gnome_paper_with_name (gnome_paper_name_default ());
- gnome_print_master_set_paper (gpm, paper_info);
-
- if (printer)
- gnome_print_master_set_printer (gpm, printer);
-
- gnome_print_master_set_copies (gpm, copies, collate);
-
- pc = gnome_print_master_get_context (gpm);
-
- 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 PRINT_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 PRINT_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 PRINT_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 PRINT_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);
-
- if (preview) {
- GnomePrintMasterPreview *gpmp;
-
- gpmp = gnome_print_master_preview_new (gpm, _("Print Preview"));
- gtk_widget_show (GTK_WIDGET (gpmp));
- } else
- gnome_print_master_print (gpm);
-
- gtk_object_unref (GTK_OBJECT (gpm));
-}
diff --git a/calendar/gui/print.h b/calendar/gui/print.h
deleted file mode 100644
index e88c4a8e01..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 <notzed@helixcode.com>
- * Federico Mena-Quintero <federico@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 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, gboolean preview, time_t at, PrintView default_view);
-
-
-
-#endif
diff --git a/calendar/gui/tag-calendar.c b/calendar/gui/tag-calendar.c
deleted file mode 100644
index 12cc264f1c..0000000000
--- a/calendar/gui/tag-calendar.c
+++ /dev/null
@@ -1,172 +0,0 @@
-/* Evolution calendar - Utilities for tagging ECalendar widgets
- *
- * Copyright (C) 2000 Helix Code, Inc.
- *
- * Authors: Damon Chaplin <damon@helixcode.com>
- * Federico Mena-Quintero <federico@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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <cal-util/timeutil.h>
-#include "tag-calendar.h"
-
-
-
-struct calendar_tag_closure {
- ECalendarItem *calitem;
- time_t start_time;
- time_t end_time;
-};
-
-/* Clears all the tags in a calendar and fills a closure structure with the
- * necessary information for iterating over occurrences.
- * Returns FALSE if the calendar has no dates shown.
- */
-static gboolean
-prepare_tag (ECalendar *ecal, struct calendar_tag_closure *c)
-{
- gint start_year, start_month, start_day;
- gint end_year, end_month, end_day;
- struct tm start_tm = { 0 }, end_tm = { 0 };
-
- e_calendar_item_clear_marks (ecal->calitem);
-
- if (!e_calendar_item_get_date_range (ecal->calitem,
- &start_year, &start_month,
- &start_day,
- &end_year, &end_month, &end_day))
- return FALSE;
-
- start_tm.tm_year = start_year - 1900;
- start_tm.tm_mon = start_month;
- start_tm.tm_mday = start_day;
- start_tm.tm_hour = 0;
- start_tm.tm_min = 0;
- start_tm.tm_sec = 0;
- start_tm.tm_isdst = -1;
-
- end_tm.tm_year = end_year - 1900;
- end_tm.tm_mon = end_month;
- end_tm.tm_mday = end_day + 1;
- end_tm.tm_hour = 0;
- end_tm.tm_min = 0;
- end_tm.tm_sec = 0;
- end_tm.tm_isdst = -1;
-
- c->calitem = ecal->calitem;
- c->start_time = mktime (&start_tm);
- c->end_time = mktime (&end_tm);
-
- return TRUE;
-}
-
-/* Marks the specified range in an ECalendar; called from cal_client_generate_instances() */
-static gboolean
-tag_calendar_cb (CalComponent *comp,
- time_t istart,
- time_t iend,
- gpointer data)
-{
- struct calendar_tag_closure *c = data;
- time_t t;
-
- t = time_day_begin (istart);
-
- do {
- struct tm tm;
-
- tm = *localtime (&t);
-
- e_calendar_item_mark_day (c->calitem, tm.tm_year + 1900,
- tm.tm_mon, tm.tm_mday,
- E_CALENDAR_ITEM_MARK_BOLD);
-
- t = time_day_end (t);
- } while (t < iend);
-
- return TRUE;
-}
-
-/**
- * tag_calendar_by_client:
- * @ecal: Calendar widget to tag.
- * @client: A calendar client object.
- *
- * Tags an #ECalendar widget with the events that occur in its current time
- * range. The occurrences are extracted from the specified calendar @client.
- **/
-void
-tag_calendar_by_client (ECalendar *ecal, CalClient *client)
-{
- struct calendar_tag_closure c;
-
- g_return_if_fail (ecal != NULL);
- g_return_if_fail (E_IS_CALENDAR (ecal));
- g_return_if_fail (client != NULL);
- g_return_if_fail (IS_CAL_CLIENT (client));
-
- /* If the ECalendar isn't visible, we just return. */
- if (!GTK_WIDGET_VISIBLE (ecal))
- return;
-
- if (cal_client_get_load_state (client) != CAL_CLIENT_LOAD_LOADED)
- return;
-
- if (!prepare_tag (ecal, &c))
- return;
-
-#if 0
- g_print ("DateNavigator generating instances\n");
-#endif
- cal_client_generate_instances (client, CALOBJ_TYPE_EVENT,
- c.start_time, c.end_time,
- tag_calendar_cb, &c);
-}
-
-/**
- * tag_calendar_by_comp:
- * @ecal: Calendar widget to tag.
- * @comp: A calendar component object.
- *
- * Tags an #ECalendar widget with any occurrences of a specific calendar
- * component that occur within the calendar's current time range.
- **/
-void
-tag_calendar_by_comp (ECalendar *ecal, CalComponent *comp)
-{
- struct calendar_tag_closure c;
-
- g_return_if_fail (ecal != NULL);
- g_return_if_fail (E_IS_CALENDAR (ecal));
- g_return_if_fail (comp != NULL);
- g_return_if_fail (IS_CAL_COMPONENT (comp));
-
- /* If the ECalendar isn't visible, we just return. */
- if (!GTK_WIDGET_VISIBLE (ecal))
- return;
-
- if (!prepare_tag (ecal, &c))
- return;
-
-#if 0
- g_print ("DateNavigator generating instances\n");
-#endif
- cal_recur_generate_instances (comp, c.start_time, c.end_time, tag_calendar_cb, &c);
-}
diff --git a/calendar/gui/tag-calendar.h b/calendar/gui/tag-calendar.h
deleted file mode 100644
index 970035b03c..0000000000
--- a/calendar/gui/tag-calendar.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Evolution calendar - Utilities for tagging ECalendar widgets
- *
- * Copyright (C) 2000 Helix Code, Inc.
- *
- * Authors: Damon Chaplin <damon@helixcode.com>
- * Federico Mena-Quintero <federico@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 TAG_CALENDAR_H
-#define TAG_CALENDAR_H
-
-#include <widgets/misc/e-calendar.h>
-#include <cal-client/cal-client.h>
-
-void tag_calendar_by_client (ECalendar *ecal, CalClient *client);
-void tag_calendar_by_comp (ECalendar *ecal, CalComponent *comp);
-
-#endif
diff --git a/calendar/gui/tasks-control-factory.c b/calendar/gui/tasks-control-factory.c
deleted file mode 100644
index 8f884f4f6f..0000000000
--- a/calendar/gui/tasks-control-factory.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* tasks-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.
- *
- * Authors: Ettore Perazzoli
- * Damon Chaplin <damon@helixcode.com>
- */
-
-#include <config.h>
-#include <bonobo/bonobo-control.h>
-#include <bonobo/bonobo-generic-factory.h>
-
-#include <liboaf/liboaf.h>
-
-#include "tasks-control-factory.h"
-#include "tasks-control.h"
-
-
-#define TASKS_CONTROL_FACTORY_ID "OAFIID:GNOME_Evolution_Tasks_ControlFactory"
-
-
-CORBA_Environment ev;
-CORBA_ORB orb;
-
-static BonoboObject *tasks_control_factory_fn (BonoboGenericFactory *Factory,
- void *data);
-
-
-/* Registers the factory with Bonobo. Should be called on startup. */
-void
-tasks_control_factory_init (void)
-{
- static BonoboGenericFactory *factory = NULL;
-
- if (factory != NULL)
- return;
-
- factory = bonobo_generic_factory_new (TASKS_CONTROL_FACTORY_ID,
- tasks_control_factory_fn, NULL);
-
- if (factory == NULL)
- g_error ("I could not register a Tasks control factory.");
-}
-
-
-/* Callback factory function to create a tasks control. */
-static BonoboObject *
-tasks_control_factory_fn (BonoboGenericFactory *Factory,
- void *data)
-{
- BonoboControl *control;
-
- control = tasks_control_new ();
-
- if (control)
- return BONOBO_OBJECT (control);
- else
- return NULL;
-}
-
-
diff --git a/calendar/gui/tasks-control-factory.h b/calendar/gui/tasks-control-factory.h
deleted file mode 100644
index 217ebc68fc..0000000000
--- a/calendar/gui/tasks-control-factory.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* tasks-control-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.
- *
- * Authors: Federico Mena Quintero <federico@helixcode.com>
- * Damon Chaplin <damon@helixcode.com>
- */
-
-#ifndef _TASKS_CONTROL_FACTORY_H_
-#define _TASKS_CONTROL_FACTORY_H_
-
-void tasks_control_factory_init (void);
-BonoboControl *tasks_control_factory_new_control (void);
-
-#endif /* _TASKS_CONTROL_FACTORY_H_ */
diff --git a/calendar/gui/tasks-control.c b/calendar/gui/tasks-control.c
deleted file mode 100644
index eb99241262..0000000000
--- a/calendar/gui/tasks-control.c
+++ /dev/null
@@ -1,242 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* tasks-control.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: Damon Chaplin <damon@helixcode.com>
- * Ettore Perazzoli
- */
-
-#include <config.h>
-#include <gtk/gtksignal.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnome/gnome-util.h>
-#include <bonobo/bonobo-control.h>
-#include <bonobo/bonobo-ui-util.h>
-#include "e-tasks.h"
-#include "tasks-control.h"
-#include "e-util/e-gui-utils.h"
-
-#define TASKS_CONTROL_PROPERTY_URI "folder_uri"
-#define TASKS_CONTROL_PROPERTY_URI_IDX 1
-
-
-static void tasks_control_properties_init (BonoboControl *control,
- ETasks *tasks);
-static void tasks_control_get_property (BonoboPropertyBag *bag,
- BonoboArg *arg,
- guint arg_id,
- CORBA_Environment *ev,
- gpointer user_data);
-static void tasks_control_set_property (BonoboPropertyBag *bag,
- const BonoboArg *arg,
- guint arg_id,
- CORBA_Environment *ev,
- gpointer user_data);
-static void tasks_control_activate_cb (BonoboControl *control,
- gboolean activate,
- gpointer user_data);
-static void tasks_control_activate (BonoboControl *control,
- ETasks *tasks);
-static void tasks_control_deactivate (BonoboControl *control);
-
-static void tasks_control_new_task_cmd (BonoboUIComponent *uic,
- gpointer data,
- const char *path);
-
-
-BonoboControl *
-tasks_control_new (void)
-{
- BonoboControl *control;
- GtkWidget *tasks;
-
- tasks = e_tasks_new ();
- if (!tasks)
- return NULL;
-
- gtk_widget_show (tasks);
-
- control = bonobo_control_new (tasks);
- if (!control) {
- g_message ("control_factory_fn(): could not create the control!");
- return NULL;
- }
-
- tasks_control_properties_init (control, E_TASKS (tasks));
-
- gtk_signal_connect (GTK_OBJECT (control), "activate",
- GTK_SIGNAL_FUNC (tasks_control_activate_cb),
- tasks);
-
- return control;
-}
-
-
-/* Creates the property bag for our new control. */
-static void
-tasks_control_properties_init (BonoboControl *control,
- ETasks *tasks)
-
-{
- BonoboPropertyBag *pbag;
-
- pbag = bonobo_property_bag_new (tasks_control_get_property,
- tasks_control_set_property, tasks);
-
- bonobo_property_bag_add (pbag,
- TASKS_CONTROL_PROPERTY_URI,
- TASKS_CONTROL_PROPERTY_URI_IDX,
- BONOBO_ARG_STRING,
- NULL,
- _("The URI of the tasks folder to display"),
- 0);
-
- bonobo_control_set_properties (control, pbag);
-}
-
-
-/* Gets a property of our control. FIXME: Finish. */
-static void
-tasks_control_get_property (BonoboPropertyBag *bag,
- BonoboArg *arg,
- guint arg_id,
- CORBA_Environment *ev,
- gpointer user_data)
-{
- /*GnomeCalendar *gcal = user_data;*/
-
- switch (arg_id) {
-
- case TASKS_CONTROL_PROPERTY_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
-tasks_control_set_property (BonoboPropertyBag *bag,
- const BonoboArg *arg,
- guint arg_id,
- CORBA_Environment *ev,
- gpointer user_data)
-{
- ETasks *tasks = user_data;
- char *filename;
-
- switch (arg_id) {
-
- case TASKS_CONTROL_PROPERTY_URI_IDX:
- filename = g_strdup_printf ("%s/tasks.ics",
- BONOBO_ARG_GET_STRING (arg));
- e_tasks_open (tasks, filename);
- g_free (filename);
- break;
-
- default:
- g_warning ("Unhandled arg %d\n", arg_id);
- break;
- }
-}
-
-
-static void
-tasks_control_activate_cb (BonoboControl *control,
- gboolean activate,
- gpointer user_data)
-{
- if (activate)
- tasks_control_activate (control, user_data);
- else
- tasks_control_deactivate (control);
-}
-
-
-static BonoboUIVerb verbs [] = {
- BONOBO_UI_VERB ("TasksNewTask", tasks_control_new_task_cmd),
-
- BONOBO_UI_VERB_END
-};
-
-static EPixmap pixmaps [] = {
- E_PIXMAP ("/menu/File/New/NewFirstItem/NewTask", "evolution-tasks-mini.png"),
- E_PIXMAP ("/menu/File/Print/Print", "print.xpm"),
- E_PIXMAP_END
-};
-
-static void
-tasks_control_activate (BonoboControl *control,
- ETasks *tasks)
-{
- Bonobo_UIContainer remote_uih;
- BonoboUIComponent *uic;
-
- uic = bonobo_control_get_ui_component (control);
- g_assert (uic != NULL);
-
- remote_uih = bonobo_control_get_remote_ui_container (control);
- bonobo_ui_component_set_container (uic, remote_uih);
- bonobo_object_release_unref (remote_uih, NULL);
-
- bonobo_ui_component_add_verb_list_with_data (uic, verbs, tasks);
-
- bonobo_ui_component_freeze (uic, NULL);
-
- bonobo_ui_util_set_ui (uic, EVOLUTION_DATADIR,
- "evolution-tasks.xml",
- "evolution-tasks");
-
- e_tasks_setup_menus(tasks, uic);
-
- e_pixmaps_update (uic, pixmaps);
-
- bonobo_ui_component_thaw (uic, NULL);
-}
-
-
-static void
-tasks_control_deactivate (BonoboControl *control)
-{
- BonoboUIComponent *uic = bonobo_control_get_ui_component (control);
- g_assert (uic != NULL);
-
- bonobo_ui_component_rm (uic, "/", NULL);
- bonobo_ui_component_unset_container (uic);
-}
-
-
-static void
-tasks_control_new_task_cmd (BonoboUIComponent *uic,
- gpointer data,
- const char *path)
-{
- ETasks *tasks = data;
-
- e_tasks_new_task (tasks);
-}
-
diff --git a/calendar/gui/tasks-control.h b/calendar/gui/tasks-control.h
deleted file mode 100644
index d2f0f4e2fb..0000000000
--- a/calendar/gui/tasks-control.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* tasks-control.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.
- *
- * Authors: Federico Mena Quintero <federico@helixcode.com>
- * Damon Chaplin <damon@helixcode.com>
- */
-
-#ifndef _TASKS_CONTROL_H_
-#define _TASKS_CONTROL_H_
-
-
-BonoboControl *tasks_control_new (void);
-
-
-#endif /* _TASKS_CONTROL_H_ */
diff --git a/calendar/gui/tasks-migrate.c b/calendar/gui/tasks-migrate.c
deleted file mode 100644
index a658479cac..0000000000
--- a/calendar/gui/tasks-migrate.c
+++ /dev/null
@@ -1,308 +0,0 @@
-/* Evolution calendar - Migrate tasks from the calendar folder to the tasks folder
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Authors: Federico Mena-Quintero <federico@ximian.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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <gtk/gtkwindow.h>
-#include <gtk/gtksignal.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-dialog-util.h>
-#include <cal-client/cal-client.h>
-#include "component-factory.h"
-#include "tasks-migrate.h"
-
-
-
-/* Client for the calendar folder */
-static CalClient *calendar_client = NULL;
-
-/* Client for the tasks folder */
-static CalClient *tasks_client = NULL;
-
-/* Whether we have done the migration yet */
-static gboolean migrated = FALSE;
-
-
-
-/* Performs the actual migration process */
-static void
-migrate (void)
-{
- GList *uids;
- GList *l;
- gboolean success;
- gboolean at_least_one;
-
- g_assert (calendar_client != NULL);
- g_assert (tasks_client != NULL);
- g_assert (cal_client_get_load_state (calendar_client) == CAL_CLIENT_LOAD_LOADED);
- g_assert (cal_client_get_load_state (tasks_client) == CAL_CLIENT_LOAD_LOADED);
-
- uids = cal_client_get_uids (calendar_client, CALOBJ_TYPE_TODO);
-
- success = TRUE;
- at_least_one = FALSE;
-
- for (l = uids; l; l = l->next) {
- const char *uid;
- CalComponent *comp;
- CalClientGetStatus status;
-
- at_least_one = TRUE;
-
- uid = l->data;
- status = cal_client_get_object (calendar_client, uid, &comp);
-
- switch (status) {
- case CAL_CLIENT_GET_SUCCESS:
- if (cal_client_update_object (tasks_client, comp))
- cal_client_remove_object (calendar_client, uid);
- else
- success = FALSE;
-
- gtk_object_unref (GTK_OBJECT (comp));
- break;
-
- case CAL_CLIENT_GET_NOT_FOUND:
- /* This is OK; the object may have disappeared from the server */
- break;
-
- case CAL_CLIENT_GET_SYNTAX_ERROR:
- success = FALSE;
- break;
-
- default:
- g_assert_not_reached ();
- }
- }
-
- cal_obj_uid_list_free (uids);
-
- if (!at_least_one)
- return;
-
- if (success)
- gnome_ok_dialog (_("Evolution has taken the tasks that were in your calendar folder "
- "and automatically migrated them to the new tasks folder."));
- else
- gnome_ok_dialog (_("Evolution has tried to take the tasks that were in your "
- "calendar folder and migrate them to the new tasks folder.\n"
- "Some of the tasks could not be migrated, so "
- "this process may be attempted again in the future."));
-}
-
-/* Displays an error to indicate that a calendar could not be opened */
-static void
-open_error (const char *uri)
-{
- char *msg;
-
- msg = g_strdup_printf (_("Could not open `%s'; no items from the calendar folder "
- "will be migrated to the tasks folder."),
- uri);
- gnome_error_dialog (msg);
- g_free (msg);
-}
-
-/* Displays an error to indicate that a URI method is not supported */
-static void
-method_error (const char *uri)
-{
- char *msg;
-
- msg = g_strdup_printf (_("The method required to load `%s' is not supported; "
- "no items from the calendar folder will be migrated "
- "to the tasks folder."),
- uri);
- gnome_error_dialog (msg);
- g_free (msg);
-}
-
-/* Callback used when the tasks client is finished loading */
-static void
-tasks_opened_cb (CalClient *client, CalClientOpenStatus status, gpointer data)
-{
- g_assert (calendar_client != NULL);
- g_assert (cal_client_get_load_state (calendar_client) == CAL_CLIENT_LOAD_LOADED);
-
- switch (status) {
- case CAL_CLIENT_OPEN_SUCCESS:
- migrate ();
- break;
-
- case CAL_CLIENT_OPEN_ERROR:
- open_error (cal_client_get_uri (client));
- migrated = FALSE;
- break;
-
- case CAL_CLIENT_OPEN_NOT_FOUND:
- /* This can't happen because we did not specify only_if_exists when
- * issuing the open request.
- */
- g_assert_not_reached ();
- break;
-
- case CAL_CLIENT_OPEN_METHOD_NOT_SUPPORTED:
- method_error (cal_client_get_uri (client));
- migrated = FALSE;
- break;
-
- default:
- g_assert_not_reached ();
- }
-
- gtk_object_unref (GTK_OBJECT (calendar_client));
- calendar_client = NULL;
-
- gtk_object_unref (GTK_OBJECT (tasks_client));
- tasks_client = NULL;
-}
-
-/* Initiates the loading process for the tasks client */
-static gboolean
-load_tasks_client (void)
-{
- char *uri;
- gboolean success;
-
- g_assert (calendar_client != NULL);
- g_assert (cal_client_get_load_state (calendar_client) == CAL_CLIENT_LOAD_LOADED);
-
- tasks_client = cal_client_new ();
- if (!tasks_client)
- goto error;
-
- gtk_signal_connect (GTK_OBJECT (tasks_client), "cal_opened",
- GTK_SIGNAL_FUNC (tasks_opened_cb),
- NULL);
-
- uri = g_strdup_printf ("%s/local/Tasks/tasks.ics", evolution_dir);
- success = cal_client_open_calendar (tasks_client, uri, FALSE);
- g_free (uri);
-
- if (success)
- return TRUE;
-
- error:
- g_message ("load_tasks_client(): could not issue open request for the tasks client");
-
- if (tasks_client) {
- gtk_object_unref (GTK_OBJECT (tasks_client));
- tasks_client = NULL;
- }
-
- return FALSE;
-}
-
-/* Callback used when the calendar client finishes loading */
-static void
-calendar_opened_cb (CalClient *client, CalClientOpenStatus status, gpointer data)
-{
- switch (status) {
- case CAL_CLIENT_OPEN_SUCCESS:
- if (!load_tasks_client ()) {
- migrated = FALSE;
- break;
- }
-
- return;
-
- case CAL_CLIENT_OPEN_ERROR:
- open_error (cal_client_get_uri (client));
- migrated = FALSE;
- break;
-
- case CAL_CLIENT_OPEN_NOT_FOUND:
- /* This is OK; the calendar folder did not exist in the first
- * place so there is nothing to migrate.
- */
- break;
-
- case CAL_CLIENT_OPEN_METHOD_NOT_SUPPORTED:
- method_error (cal_client_get_uri (client));
- migrated = FALSE;
- break;
-
- default:
- g_assert_not_reached ();
- }
-
- gtk_object_unref (GTK_OBJECT (calendar_client));
- calendar_client = NULL;
-}
-
-/* Initiates the loading process for the calendar client */
-static gboolean
-load_calendar_client (void)
-{
- char *uri;
- gboolean success;
-
- /* First we load the calendar client; the tasks client will be loaded
- * later only if the former one succeeds.
- */
-
- calendar_client = cal_client_new ();
- if (!calendar_client)
- goto error;
-
- gtk_signal_connect (GTK_OBJECT (calendar_client), "cal_opened",
- GTK_SIGNAL_FUNC (calendar_opened_cb),
- NULL);
-
- uri = g_strdup_printf ("%s/local/Calendar/calendar.ics", evolution_dir);
- success = cal_client_open_calendar (calendar_client, uri, TRUE);
- g_free (uri);
-
- if (success)
- return TRUE;
-
- error:
- g_message ("load_calendar_client(): could not issue open request for the calendar client");
-
- if (calendar_client) {
- gtk_object_unref (GTK_OBJECT (calendar_client));
- calendar_client = NULL;
- }
-
- return FALSE;
-}
-
-/**
- * tasks_migrate:
- *
- * Initiates the asynchronous process that migrates the tasks from the default
- * user calendar folder to the default tasks folder. This is because Evolution
- * used to store tasks in the same folder as the calendar by default, but they
- * are separate folders now.
- **/
-void
-tasks_migrate (void)
-{
- g_assert (!migrated);
- migrated = TRUE;
-
- if (!load_calendar_client ())
- migrated = FALSE;
-}
diff --git a/calendar/gui/tasks-migrate.h b/calendar/gui/tasks-migrate.h
deleted file mode 100644
index 01f124222b..0000000000
--- a/calendar/gui/tasks-migrate.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Evolution calendar - Migrate tasks from the calendar folder to the tasks folder
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Authors: Federico Mena-Quintero <federico@ximian.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 TASKS_MIGRATE_H
-#define TASKS_MIGRATE_H
-
-
-void tasks_migrate (void);
-
-
-#endif
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/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/weekday-picker.c b/calendar/gui/weekday-picker.c
deleted file mode 100644
index c34dd3da03..0000000000
--- a/calendar/gui/weekday-picker.c
+++ /dev/null
@@ -1,575 +0,0 @@
-/* Evolution calendar - Week day picker widget
- *
- * Copyright (C) 2000 Helix Code, Inc.
- *
- * Author: Federico Mena-Quintero <federico@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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <string.h>
-#include <gtk/gtksignal.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-canvas-rect-ellipse.h>
-#include <libgnomeui/gnome-canvas-text.h>
-#include "weekday-picker.h"
-
-
-
-#define PADDING 2
-
-/* Private part of the WeekdayPicker structure */
-struct _WeekdayPickerPrivate {
- /* Selected days; see weekday_picker_set_days() */
- guint8 day_mask;
-
- /* Blocked days; these cannot be modified */
- guint8 blocked_day_mask;
-
- /* Day that defines the start of the week; 0 = Sunday, ..., 6 = Saturday */
- int week_start_day;
-
- /* Metrics */
- int font_ascent, font_descent;
- int max_letter_width;
-
- /* Components */
- GnomeCanvasItem *boxes[7];
- GnomeCanvasItem *labels[7];
-};
-
-
-
-/* Signal IDs */
-enum {
- CHANGED,
- LAST_SIGNAL
-};
-
-static void weekday_picker_class_init (WeekdayPickerClass *class);
-static void weekday_picker_init (WeekdayPicker *wp);
-static void weekday_picker_finalize (GtkObject *object);
-
-static void weekday_picker_realize (GtkWidget *widget);
-static void weekday_picker_size_request (GtkWidget *widget, GtkRequisition *requisition);
-static void weekday_picker_size_allocate (GtkWidget *widget, GtkAllocation *allocation);
-static void weekday_picker_style_set (GtkWidget *widget, GtkStyle *previous_style);
-
-static GnomeCanvasClass *parent_class;
-
-static guint wp_signals[LAST_SIGNAL];
-
-
-
-/**
- * weekday_picker_get_type:
- *
- * Registers the #WeekdayPicker class if necessary, and returns the type ID
- * associated to it.
- *
- * Return value: The type ID of the #WeekdayPicker class.
- **/
-GtkType
-weekday_picker_get_type (void)
-{
- static GtkType weekday_picker_type = 0;
-
- if (!weekday_picker_type) {
- static const GtkTypeInfo weekday_picker_info = {
- "WeekdayPicker",
- sizeof (WeekdayPicker),
- sizeof (WeekdayPickerClass),
- (GtkClassInitFunc) weekday_picker_class_init,
- (GtkObjectInitFunc) weekday_picker_init,
- NULL, /* reserved_1 */
- NULL, /* reserved_2 */
- (GtkClassInitFunc) NULL
- };
-
- weekday_picker_type = gtk_type_unique (GNOME_TYPE_CANVAS, &weekday_picker_info);
- }
-
- return weekday_picker_type;
-}
-
-/* Class initialization function for the weekday picker */
-static void
-weekday_picker_class_init (WeekdayPickerClass *class)
-{
- GtkObjectClass *object_class;
- GtkWidgetClass *widget_class;
-
- object_class = (GtkObjectClass *) class;
- widget_class = (GtkWidgetClass *) class;
-
- parent_class = gtk_type_class (GNOME_TYPE_CANVAS);
-
- wp_signals[CHANGED] =
- gtk_signal_new ("changed",
- GTK_RUN_FIRST,
- object_class->type,
- GTK_SIGNAL_OFFSET (WeekdayPickerClass, changed),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
-
- gtk_object_class_add_signals (object_class, wp_signals, LAST_SIGNAL);
-
- object_class->finalize = weekday_picker_finalize;
-
- widget_class->realize = weekday_picker_realize;
- widget_class->size_request = weekday_picker_size_request;
- widget_class->size_allocate = weekday_picker_size_allocate;
- widget_class->style_set = weekday_picker_style_set;
-
- class->changed = NULL;
-}
-
-/* Event handler for the day items */
-static gint
-day_event_cb (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
-{
- WeekdayPicker *wp;
- WeekdayPickerPrivate *priv;
- int i;
- guint8 day_mask;
-
- wp = WEEKDAY_PICKER (data);
- priv = wp->priv;
-
- if (!(event->type == GDK_BUTTON_PRESS && event->button.button == 1))
- return FALSE;
-
- /* Find which box was clicked */
-
- for (i = 0; i < 7; i++)
- if (priv->boxes[i] == item || priv->labels[i] == item)
- break;
-
- g_assert (i != 7);
-
- /* Turn on that day */
-
- i += priv->week_start_day;
- if (i >= 7)
- i -= 7;
-
- if (priv->blocked_day_mask & (0x1 << i))
- return TRUE;
-
- if (priv->day_mask & (0x1 << i))
- day_mask = priv->day_mask & ~(0x1 << i);
- else
- day_mask = priv->day_mask | (0x1 << i);
-
- weekday_picker_set_days (wp, day_mask);
-
- return TRUE;
-}
-
-
-/* Creates the canvas items for the weekday picker. The items are empty until
- * they are configured elsewhere.
- */
-static void
-create_items (WeekdayPicker *wp)
-{
- WeekdayPickerPrivate *priv;
- GnomeCanvasGroup *parent;
- int i;
-
- priv = wp->priv;
-
- parent = gnome_canvas_root (GNOME_CANVAS (wp));
-
- for (i = 0; i < 7; i++) {
- priv->boxes[i] = gnome_canvas_item_new (parent,
- GNOME_TYPE_CANVAS_RECT,
- NULL);
- gtk_signal_connect (GTK_OBJECT (priv->boxes[i]), "event",
- GTK_SIGNAL_FUNC (day_event_cb),
- wp);
-
- priv->labels[i] = gnome_canvas_item_new (parent,
- GNOME_TYPE_CANVAS_TEXT,
- NULL);
- gtk_signal_connect (GTK_OBJECT (priv->labels[i]), "event",
- GTK_SIGNAL_FUNC (day_event_cb),
- wp);
- }
-}
-
-/* Object initialization function for the weekday picker */
-static void
-weekday_picker_init (WeekdayPicker *wp)
-{
- WeekdayPickerPrivate *priv;
-
- GTK_WIDGET_UNSET_FLAGS (wp, GTK_CAN_FOCUS);
-
- priv = g_new0 (WeekdayPickerPrivate, 1);
-
- wp->priv = priv;
-
- create_items (wp);
-}
-
-/* Finalize handler for the weekday picker */
-static void
-weekday_picker_finalize (GtkObject *object)
-{
- WeekdayPicker *wp;
- WeekdayPickerPrivate *priv;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_WEEKDAY_PICKER (object));
-
- wp = WEEKDAY_PICKER (object);
- priv = wp->priv;
-
- g_free (priv);
- wp->priv = NULL;
-
- if (GTK_OBJECT_CLASS (parent_class)->finalize)
- (* GTK_OBJECT_CLASS (parent_class)->finalize) (object);
-}
-
-static void
-colorize_items (WeekdayPicker *wp)
-{
- WeekdayPickerPrivate *priv;
- GdkColor *outline;
- GdkColor *fill, *sel_fill;
- GdkColor *text_fill, *sel_text_fill;
- int i;
-
- priv = wp->priv;
-
- outline = &GTK_WIDGET (wp)->style->fg[GTK_WIDGET_STATE (wp)];
-
- fill = &GTK_WIDGET (wp)->style->base[GTK_WIDGET_STATE (wp)];
- text_fill = &GTK_WIDGET (wp)->style->fg[GTK_WIDGET_STATE (wp)];
-
- sel_fill = &GTK_WIDGET (wp)->style->bg[GTK_STATE_SELECTED];
- sel_text_fill = &GTK_WIDGET (wp)->style->fg[GTK_STATE_SELECTED];
-
- for (i = 0; i < 7; i++) {
- int day;
- GdkColor *f, *t;
-
- day = i + priv->week_start_day;
- if (day >= 7)
- day -= 7;
-
- if (priv->day_mask & (0x1 << day)) {
- f = sel_fill;
- t = sel_text_fill;
- } else {
- f = fill;
- t = text_fill;
- }
-
- gnome_canvas_item_set (priv->boxes[i],
- "fill_color_gdk", f,
- "outline_color_gdk", outline,
- NULL);
-
- gnome_canvas_item_set (priv->labels[i],
- "fill_color_gdk", t,
- NULL);
- }
-}
-
-/* Configures the items in the weekday picker by setting their attributes. */
-static void
-configure_items (WeekdayPicker *wp)
-{
- WeekdayPickerPrivate *priv;
- int width, height;
- int box_width;
- const char *str;
- int i;
-
- priv = wp->priv;
-
- width = GTK_WIDGET (wp)->allocation.width;
- height = GTK_WIDGET (wp)->allocation.height;
-
- box_width = (width - 1) / 7;
- str = _("SMTWTFS");
-
- for (i = 0; i < 7; i++) {
- char *c;
- int day;
-
- day = i + priv->week_start_day;
- if (day >= 7)
- day -= 7;
-
- gnome_canvas_item_set (priv->boxes[i],
- "x1", (double) (i * box_width),
- "y1", (double) 0,
- "x2", (double) ((i + 1) * box_width),
- "y2", (double) (height - 1),
- "width_pixels", 0,
- NULL);
-
- c = g_strndup (str + day, 1);
- gnome_canvas_item_set (priv->labels[i],
- "text", c,
- "font_gdk", GTK_WIDGET (wp)->style->font,
- "x", (double) (i * box_width) + box_width / 2.0,
- "y", (double) (1 + PADDING),
- "anchor", GTK_ANCHOR_N,
- NULL);
- g_free (c);
- }
-
- colorize_items (wp);
-}
-
-/* Realize handler for the weekday picker */
-static void
-weekday_picker_realize (GtkWidget *widget)
-{
- WeekdayPicker *wp;
-
- wp = WEEKDAY_PICKER (widget);
-
- if (GTK_WIDGET_CLASS (parent_class)->realize)
- (* GTK_WIDGET_CLASS (parent_class)->realize) (widget);
-
- configure_items (wp);
-}
-
-/* Size_request handler for the weekday picker */
-static void
-weekday_picker_size_request (GtkWidget *widget, GtkRequisition *requisition)
-{
- WeekdayPicker *wp;
- WeekdayPickerPrivate *priv;
-
- wp = WEEKDAY_PICKER (widget);
- priv = wp->priv;
-
- requisition->width = (priv->max_letter_width + 2 * PADDING + 1) * 7 + 1;
- requisition->height = (priv->font_ascent + priv->font_descent + 2 * PADDING + 2);
-}
-
-/* Size_allocate handler for the weekday picker */
-static void
-weekday_picker_size_allocate (GtkWidget *widget, GtkAllocation *allocation)
-{
- WeekdayPicker *wp;
-
- wp = WEEKDAY_PICKER (widget);
-
- if (GTK_WIDGET_CLASS (parent_class)->size_allocate)
- (* GTK_WIDGET_CLASS (parent_class)->size_allocate) (widget, allocation);
-
- gnome_canvas_set_scroll_region (GNOME_CANVAS (wp),
- 0, 0, allocation->width, allocation->height);
-
- configure_items (wp);
-}
-
-/* Style_set handler for the weekday picker */
-static void
-weekday_picker_style_set (GtkWidget *widget, GtkStyle *previous_style)
-{
- WeekdayPicker *wp;
- WeekdayPickerPrivate *priv;
- int max_width;
- const char *str;
- int i, len;
-
- wp = WEEKDAY_PICKER (widget);
- priv = wp->priv;
-
- priv->font_ascent = widget->style->font->ascent;
- priv->font_descent = widget->style->font->descent;
-
- max_width = 0;
-
- str = _("SMTWTFS");
- len = strlen (str);
-
- for (i = 0; i < len; i++) {
- int w;
-
- w = gdk_char_measure (widget->style->font, str[i]);
- if (w > max_width)
- max_width = w;
- }
-
- priv->max_letter_width = max_width;
-
- configure_items (wp);
-
- if (GTK_WIDGET_CLASS (parent_class)->style_set)
- (* GTK_WIDGET_CLASS (parent_class)->style_set) (widget, previous_style);
-}
-
-
-
-/**
- * weekday_picker_new:
- * @void:
- *
- * Creates a new weekday picker widget.
- *
- * Return value: A newly-created weekday picker.
- **/
-GtkWidget *
-weekday_picker_new (void)
-{
- return gtk_type_new (TYPE_WEEKDAY_PICKER);
-}
-
-/**
- * weekday_picker_set_days:
- * @wp: A weekday picker.
- * @day_mask: Bitmask with the days to be selected.
- *
- * Sets the days that are selected in a weekday picker. In the @day_mask,
- * Sunday is bit 0, Monday is bit 1, etc.
- **/
-void
-weekday_picker_set_days (WeekdayPicker *wp, guint8 day_mask)
-{
- WeekdayPickerPrivate *priv;
-
- g_return_if_fail (wp != NULL);
- g_return_if_fail (IS_WEEKDAY_PICKER (wp));
-
- priv = wp->priv;
-
- priv->day_mask = day_mask;
- colorize_items (wp);
-
- gtk_signal_emit (GTK_OBJECT (wp), wp_signals[CHANGED]);
-}
-
-/**
- * weekday_picker_get_days:
- * @wp: A weekday picker.
- *
- * Queries the days that are selected in a weekday picker.
- *
- * Return value: Bit mask of selected days. Sunday is bit 0, Monday is bit 1,
- * etc.
- **/
-guint8
-weekday_picker_get_days (WeekdayPicker *wp)
-{
- WeekdayPickerPrivate *priv;
-
- g_return_val_if_fail (wp != NULL, 0);
- g_return_val_if_fail (IS_WEEKDAY_PICKER (wp), 0);
-
- priv = wp->priv;
- return priv->day_mask;
-}
-
-/**
- * weekday_picker_set_blocked_days:
- * @wp: A weekday picker.
- * @blocked_day_mask: Bitmask with the days to be blocked.
- *
- * Sets the days that the weekday picker will prevent from being modified by the
- * user. The @blocked_day_mask is specified in the same way as in
- * weekday_picker_set_days().
- **/
-void
-weekday_picker_set_blocked_days (WeekdayPicker *wp, guint8 blocked_day_mask)
-{
- WeekdayPickerPrivate *priv;
-
- g_return_if_fail (wp != NULL);
- g_return_if_fail (IS_WEEKDAY_PICKER (wp));
-
- priv = wp->priv;
- priv->blocked_day_mask = blocked_day_mask;
-}
-
-/**
- * weekday_picker_get_blocked_days:
- * @wp: A weekday picker.
- *
- * Queries the set of days that the weekday picker prevents from being modified
- * by the user.
- *
- * Return value: Bit mask of blocked days, with the same format as that returned
- * by weekday_picker_get_days().
- **/
-guint
-weekday_picker_get_blocked_days (WeekdayPicker *wp)
-{
- WeekdayPickerPrivate *priv;
-
- g_return_val_if_fail (wp != NULL, 0);
- g_return_val_if_fail (IS_WEEKDAY_PICKER (wp), 0);
-
- priv = wp->priv;
- return priv->blocked_day_mask;
-}
-
-/**
- * weekday_picker_set_week_start_day:
- * @wp: A weekday picker.
- * @week_start_day: Index of the day that defines the start of the week; 0 is
- * Sunday, 1 is Monday, etc.
- *
- * Sets the day that defines the start of the week for a weekday picker.
- **/
-void
-weekday_picker_set_week_start_day (WeekdayPicker *wp, int week_start_day)
-{
- WeekdayPickerPrivate *priv;
-
- g_return_if_fail (wp != NULL);
- g_return_if_fail (IS_WEEKDAY_PICKER (wp));
- g_return_if_fail (week_start_day >= 0 && week_start_day < 7);
-
- priv = wp->priv;
- priv->week_start_day = week_start_day;
-
- configure_items (wp);
-}
-
-/**
- * weekday_picker_get_week_start_day:
- * @wp: A weekday picker.
- *
- * Queries the day that defines the start of the week in a weekday picker.
- *
- * Return value: Index of the day that defines the start of the week. See
- * weekday_picker_set_week_start_day() to see how this is represented.
- **/
-int
-weekday_picker_get_week_start_day (WeekdayPicker *wp)
-{
- WeekdayPickerPrivate *priv;
-
- g_return_val_if_fail (wp != NULL, -1);
- g_return_val_if_fail (IS_WEEKDAY_PICKER (wp), -1);
-
- priv = wp->priv;
- return priv->week_start_day;
-}
diff --git a/calendar/gui/weekday-picker.h b/calendar/gui/weekday-picker.h
deleted file mode 100644
index 00c51b7a62..0000000000
--- a/calendar/gui/weekday-picker.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/* Evolution calendar - Week day picker widget
- *
- * Copyright (C) 2000 Helix Code, Inc.
- *
- * Author: Federico Mena-Quintero <federico@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 WEEKDAY_PICKER_H
-#define WEEKDAY_PICKER_H
-
-#include <libgnome/gnome-defs.h>
-#include <libgnomeui/gnome-canvas.h>
-
-BEGIN_GNOME_DECLS
-
-
-
-#define TYPE_WEEKDAY_PICKER (weekday_picker_get_type ())
-#define WEEKDAY_PICKER(obj) (GTK_CHECK_CAST ((obj), TYPE_WEEKDAY_PICKER, WeekdayPicker))
-#define WEEKDAY_PICKER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), TYPE_WEEKDAY_PICKER, \
- WeekdayPickerClass))
-#define IS_WEEKDAY_PICKER(obj) (GTK_CHECK_TYPE ((obj), TYPE_WEEKDAY_PICKER))
-#define IS_WEEKDAY_PICKER_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), TYPE_WEEKDAY_PICKER))
-
-typedef struct _WeekdayPicker WeekdayPicker;
-typedef struct _WeekdayPickerClass WeekdayPickerClass;
-typedef struct _WeekdayPickerPrivate WeekdayPickerPrivate;
-
-struct _WeekdayPicker {
- GnomeCanvas canvas;
-
- /* Private data */
- WeekdayPickerPrivate *priv;
-};
-
-struct _WeekdayPickerClass {
- GnomeCanvasClass parent_class;
-
- void (* changed) (WeekdayPicker *wp);
-};
-
-GtkType weekday_picker_get_type (void);
-
-GtkWidget *weekday_picker_new (void);
-
-void weekday_picker_set_days (WeekdayPicker *wp, guint8 day_mask);
-guint8 weekday_picker_get_days (WeekdayPicker *wp);
-
-void weekday_picker_set_blocked_days (WeekdayPicker *wp, guint8 blocked_day_mask);
-guint weekday_picker_get_blocked_days (WeekdayPicker *wp);
-
-void weekday_picker_set_week_start_day (WeekdayPicker *wp, int week_start_day);
-int weekday_picker_get_week_start_day (WeekdayPicker *wp);
-
-
-
-END_GNOME_DECLS
-
-#endif
diff --git a/calendar/gui/widget-util.c b/calendar/gui/widget-util.c
deleted file mode 100644
index d6034ce8b0..0000000000
--- a/calendar/gui/widget-util.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/* Evolution calendar - Widget utilities
- *
- * Copyright (C) 2000 Helix Code, Inc.
- *
- * Author: Federico Mena-Quintero <federico@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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <widgets/misc/e-dateedit.h>
-#include "calendar-config.h"
-#include "widget-util.h"
-
-
-
-/**
- * date_edit_new:
- * @show_date: Whether to show a date picker in the widget.
- * @show_time: Whether to show a time picker in the widget.
- *
- * Creates a new #EDateEdit widget, configured using the calendar's preferences.
- *
- * Return value: A newly-created #EDateEdit widget.
- **/
-GtkWidget *
-date_edit_new (gboolean show_date, gboolean show_time)
-{
- EDateEdit *dedit;
-
- dedit = E_DATE_EDIT (e_date_edit_new ());
-
- e_date_edit_set_show_date (dedit, show_date);
- e_date_edit_set_show_time (dedit, show_time);
-
- calendar_config_configure_e_date_edit (dedit);
-
- return GTK_WIDGET (dedit);
-}
diff --git a/calendar/gui/widget-util.h b/calendar/gui/widget-util.h
deleted file mode 100644
index 930e0f9b6e..0000000000
--- a/calendar/gui/widget-util.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Evolution calendar - Widget utilities
- *
- * Copyright (C) 2000 Helix Code, Inc.
- *
- * Author: Federico Mena-Quintero <federico@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 WIDGET_UTIL_H
-#define WIDGET_UTIL_H
-
-#include <gtk/gtkwidget.h>
-
-
-GtkWidget *date_edit_new (gboolean show_date, gboolean show_time);
-
-
-#endif
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 e21f77fe2e..0000000000
--- a/calendar/idl/evolution-calendar.idl
+++ /dev/null
@@ -1,260 +0,0 @@
-/* Evolution calendar interface
- *
- * Copyright (C) 2000 Eskil Heyn Olsen
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Authors: Eskil Heyn Olsen <deity@eskil.dk>
- * Federico Mena-Quintero <federico@ximian.com>
- */
-
-#ifndef _EVOLUTION_CALENDAR_IDL_
-#define _EVOLUTION_CALENDAR_IDL_
-
-#include <Bonobo.idl>
-
-module GNOME {
-module Evolution {
-
-module Calendar {
- /* A calendar component (event/todo/journal/etc), represented as an
- * iCalendar string.
- */
- typedef string CalObj;
-
- /* A unique identifier for a calendar component */
- typedef string CalObjUID;
-
- /* Sequence of unique identifiers */
- typedef sequence<CalObjUID> CalObjUIDSeq;
-
- /* A unique identifier for an alarm subcomponent */
- typedef string CalAlarmUID;
-
- /* 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_ANY = 0x07;
-
- /* Types of object changes made */
- typedef long CalObjChangeType;
- const CalObjChangeType ADDED = 1 << 0;
- const CalObjChangeType MODIFIED = 1 << 1;
- const CalObjChangeType DELETED = 1 << 2;
-
- /* 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 component 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;
- };
-
- /* Used to transfer a list of component occurrences */
- typedef sequence<CalObjInstance> CalObjInstanceSeq;
-
- /* An object change */
- struct CalObjChange {
- CalObj calobj;
- CalObjChangeType type;
- };
-
- /* Used to transfer a list of changed components */
- typedef sequence<CalObjChange> CalObjChangeSeq;
-
- /* An alarm trigger instance */
- struct CalAlarmInstance {
- CalAlarmUID auid;
- Time_t trigger;
- Time_t occur;
- };
-
- /* Used to represent a list of alarm triggers for a single component */
- typedef sequence<CalAlarmInstance> CalAlarmInstanceSeq;
-
- /* Alarms for a component */
- struct CalComponentAlarms {
- CalObj calobj;
- CalAlarmInstanceSeq alarms;
- };
-
- /* Used to represent a list of components plus their triggers */
- typedef sequence<CalComponentAlarms> CalComponentAlarmsSeq;
-
- interface Query;
-
- interface Listener;
-
- interface QueryListener;
-
- /* Calendar client interface */
- interface Cal : Bonobo::Unknown {
- exception NotFound {};
- exception InvalidRange {};
- exception InvalidObject {};
- exception CouldNotCreate {};
-
- /* A calendar is identified by its URI */
- readonly attribute string uri;
-
- /* Gets the number of components of the specified types */
- long countObjects (in CalObjType type);
-
- /* Gets a component based on its URI */
- CalObj getObject (in CalObjUID uid)
- raises (NotFound);
-
- /* Gets a list of UIDs based on component type */
- CalObjUIDSeq getUIDs (in CalObjType type);
-
- /* Gets a list of components that changed based on object type */
- CalObjChangeSeq getChanges (in CalObjType type, in string change_id);
-
- /* Gets a list of components that occur or recur in the specified time range */
- CalObjUIDSeq getObjectsInRange (in CalObjType type,
- in Time_t start, in Time_t end)
- raises (InvalidRange);
-
- /* Gets a list of the components that have alarms that trigger
- * in the specified range of time, and the trigger/occurrence
- * structures themselves.
- */
- CalComponentAlarmsSeq getAlarmsInRange (in Time_t start, in Time_t end)
- raises (InvalidRange);
-
- /* Gets the alarms for the specified component that trigger in
- * the specified time range.
- */
- CalComponentAlarms getAlarmsForObject (in CalObjUID uid,
- in Time_t start, in Time_t end)
- raises (NotFound, InvalidRange);
-
-
- /* Updates a component by adding it if it does not exist or by
- * changing an existing one.
- */
- void updateObject (in CalObjUID uid, in CalObj calobj)
- raises (InvalidObject);
-
- /* Removes a component */
- void removeObject (in CalObjUID uid)
- raises (NotFound);
-
- /* Initiates a live query of the calendar. Returns a handle
- * to the live query itself; changes to components that are
- * present in the query are notified to the listener.
- */
- Query getQuery (in string sexp, in QueryListener ql)
- raises (CouldNotCreate);
- };
-
- /* Listener for changes in a calendar */
- interface Listener : Bonobo::Unknown {
- /* Return status when opening a calendar */
- enum OpenStatus {
- SUCCESS, /* All OK */
- ERROR, /* Generic error */
- NOT_FOUND, /* Requested opening in only_if_exists mode
- * when the URI did not exist.
- */
- METHOD_NOT_SUPPORTED /* A method handler is not registered */
- };
-
- /* Called from a CalFactory when a calendar is initially opened.
- * The listener must remember the cal object.
- */
- void notifyCalOpened (in OpenStatus status, in Cal cal);
-
- /* Called from a Calendar when a component is added or changed */
- void notifyObjUpdated (in CalObjUID uid);
-
- /* Called from a Calendar when a component is removed */
- void notifyObjRemoved (in CalObjUID uid);
- };
-
- /* Handle to a live query on a calendar */
- interface Query : Bonobo::Unknown {
- };
-
- /* Listener for changes in a query of a calendar */
- interface QueryListener : Bonobo::Unknown {
- /* Called when a component is added or changed. If
- * query_in_progress is true, then the initial query results are
- * being populated and the other arguments indicate the
- * percentage of completion Otherwise, the percent value is
- * unspecified. */
- void notifyObjUpdated (in CalObjUID uid,
- in boolean query_in_progress,
- in long n_scanned,
- in long total);
-
- /* Called when a component is removed */
- void notifyObjRemoved (in CalObjUID uid);
-
- /* Reported when a query ends */
- enum QueryDoneStatus {
- SUCCESS,
- PARSE_ERROR
- };
-
- /* Called when the query finishes populating itself some time
- * after it is created. Before this is called,
- * notifyObjUpdated() may have been called several times to
- * indicate which objects are actually in the query, unless the
- * status result is a parse error.
- */
- void notifyQueryDone (in QueryDoneStatus status, in string error_str);
-
- /* Called when an evaluation error occurs while performing a query */
- void notifyEvalError (in string error_str);
- };
-
- /* A calendar factory, can load and create calendars */
- interface CalFactory : Bonobo::Unknown {
- exception NilListener {};
-
- /* Open a calendar from an URI */
- void open (in string uri, in boolean only_if_exists, in Listener listener)
- raises (NilListener);
- };
-
- /* Interface to the alarm notification service */
- interface AlarmNotify : Bonobo::Unknown {
- exception InvalidURI {};
- exception BackendContactError {};
- exception NotFound {};
-
- /* Adds a calendar to the alarm notification system */
- void addCalendar (in string uri)
- raises (InvalidURI, BackendContactError);
-
- /* Removes a calendar from the alarm notification system */
- void removeCalendar (in string uri)
- raises (InvalidURI, NotFound);
-
- /* Makes the alarm notification daemon unconditionally exit */
- void die ();
- };
-};
-
-};
-};
-
-#endif
diff --git a/calendar/pcs/.cvsignore b/calendar/pcs/.cvsignore
deleted file mode 100644
index ac51a554db..0000000000
--- a/calendar/pcs/.cvsignore
+++ /dev/null
@@ -1,11 +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
diff --git a/calendar/pcs/Makefile.am b/calendar/pcs/Makefile.am
deleted file mode 100644
index 0719a5e566..0000000000
--- a/calendar/pcs/Makefile.am
+++ /dev/null
@@ -1,48 +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_VFS_GNOME_CFLAGS) \
- -DGNOMELOCALEDIR=\""$(localedir)"\"
-
-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 = -I $(srcdir) `$(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-file.c \
- cal-backend-file.h \
- cal-common.h \
- cal-factory.c \
- cal-factory.h \
- job.c \
- job.h \
- query.c \
- query.h
-
-
-BUILT_SOURCES = $(CORBA_GENERATED)
-CLEANFILES += $(BUILT_SOURCES)
-
-dist-hook:
- cd $(distdir); rm -f $(BUILT_SOURCES)
-
diff --git a/calendar/pcs/cal-backend-db.c b/calendar/pcs/cal-backend-db.c
deleted file mode 100644
index d4773760f8..0000000000
--- a/calendar/pcs/cal-backend-db.c
+++ /dev/null
@@ -1,1503 +0,0 @@
-/* Evolution calendar - iCalendar DB backend
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Author: Rodrigo Moya <rodrigo@ximian.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 <gtk/gtksignal.h>
-#include "cal-util/cal-recur.h"
-#include "cal-backend-db.h"
-#include <db.h>
-#if DB_VERSION_MAJOR < 3
-# error "You need libdb3 to compile the DB backend"
-#endif
-
-#define ENVIRONMENT_DIRECTORY "%s/evolution/local/Calendar/db.environment"
-
-/* structure to identify an open cursor */
-typedef struct {
- gint ref;
- DBC* dbc;
- DB* parent_db;
-
- /* data in the cursor */
- GList *keys;
- GList *data;
-} CalBackendDBCursor;
-
-/* private part of the CalBackendDB structure */
-struct _CalBackendDBPrivate {
- /* URI where the calendar data is stored */
- GnomeVFSURI *uri;
-
- /* Berkeley DB's library handles */
- DB_ENV *environment;
- DB *objects_db;
- DB *history_db;
-
- /* list of open cursors */
- GList *cursors;
-
- /* list of clients using this backend */
- GList *clients;
-};
-
-static void cal_backend_db_class_init (CalBackendDBClass *klass);
-static void cal_backend_db_init (CalBackendDB *cbdb);
-static void cal_backend_db_destroy (GtkObject *object);
-
-static GnomeVFSURI *cal_backend_db_get_uri (CalBackend *backend);
-static void cal_backend_db_add_cal (CalBackend *backend, Cal *cal);
-static CalBackendOpenStatus cal_backend_db_open (CalBackend *backend,
- GnomeVFSURI *uri,
- gboolean only_if_exists);
-static gboolean cal_backend_db_is_loaded (CalBackend *backend);
-
-static int cal_backend_db_get_n_objects (CalBackend *backend, CalObjType type);
-static char *cal_backend_db_get_object (CalBackend *backend, const char *uid);
-static CalObjType cal_backend_db_get_type_by_uid (CalBackend *backend, const char *uid);
-static GList* cal_backend_db_get_uids (CalBackend *backend, CalObjType type);
-static GList* cal_backend_db_get_objects_in_range (CalBackend *backend,
- CalObjType type,
- time_t start,
- time_t end);
-static GNOME_Evolution_Calendar_CalObjChangeSeq *cal_backend_db_get_changes (
- CalBackend *backend, CalObjType type, const char *change_id);
-
-static GNOME_Evolution_Calendar_CalComponentAlarmsSeq *cal_backend_db_get_alarms_in_range (
- CalBackend *backend, time_t start, time_t end);
-
-static GNOME_Evolution_Calendar_CalComponentAlarms *cal_backend_db_get_alarms_for_object (
- CalBackend *backend, const char *uid, time_t start, time_t end, gboolean *object_found);
-
-static gboolean cal_backend_db_update_object (CalBackend *backend,
- const char *uid,
- const char *calobj);
-static gboolean cal_backend_db_remove_object (CalBackend *backend, const char *uid);
-
-static void close_cursor (CalBackendDB *cbdb, CalBackendDBCursor *cursor);
-static CalBackendDBCursor *open_cursor (CalBackendDB *cbdb, DB *db);
-static CalBackendDBCursor *find_cursor_by_db (CalBackendDB *cbdb, DB *db);
-static DBT *find_record_by_id (CalBackendDBCursor *cursor, const gchar *id);
-
-static DB_TXN *begin_transaction (CalBackendDB *cbdb);
-static void commit_transaction (DB_TXN *tid);
-static void rollback_transaction (DB_TXN *tid);
-
-static CalBackendClass *parent_class;
-
-/**
- * cal_backend_db_get_type:
- * @void:
- *
- * Registers the #CalBackendDB class if necessary and returns the type ID
- * associated to it.
- *
- * Return value: The type ID of the #CalBackendDB class.
- */
-GtkType
-cal_backend_db_get_type (void)
-{
- static GtkType cal_backend_db_type = 0;
-
- if (!cal_backend_db_type) {
- static const GtkTypeInfo cal_backend_db_info = {
- "CalBackendDB",
- sizeof (CalBackendDB),
- sizeof (CalBackendDBClass),
- (GtkClassInitFunc) cal_backend_db_class_init,
- (GtkObjectInitFunc) cal_backend_db_init,
- NULL,
- NULL,
- (GtkClassInitFunc) NULL
- };
-
- cal_backend_db_type = gtk_type_unique(CAL_BACKEND_TYPE, &cal_backend_db_info);
- }
-
- return cal_backend_db_type;
-}
-
-/* class initialization function for the DB backend */
-static void
-cal_backend_db_class_init (CalBackendDBClass *klass)
-{
- GtkObjectClass *object_class;
- CalBackendClass *backend_class;
-
- object_class = (GtkObjectClass *) klass;
- backend_class = (CalBackendClass *) klass;
-
- parent_class = gtk_type_class(CAL_BACKEND_TYPE);
-
- object_class->destroy = cal_backend_db_destroy;
-
- backend_class->get_uri = cal_backend_db_get_uri;
- backend_class->add_cal = cal_backend_db_add_cal;
- backend_class->open = cal_backend_db_open;
- backend_class->is_loaded = cal_backend_db_is_loaded;
- backend_class->get_n_objects = cal_backend_db_get_n_objects;
- backend_class->get_object = cal_backend_db_get_object;
- backend_class->get_type_by_uid = cal_backend_db_get_type_by_uid;
- backend_class->get_uids = cal_backend_db_get_uids;
- backend_class->get_objects_in_range = cal_backend_db_get_objects_in_range;
- backend_class->get_changes = cal_backend_db_get_changes;
- backend_class->get_alarms_in_range = cal_backend_db_get_alarms_in_range;
- backend_class->get_alarms_for_object = cal_backend_db_get_alarms_for_object;
- backend_class->update_object = cal_backend_db_update_object;
- backend_class->remove_object = cal_backend_db_remove_object;
-}
-
-/* object initialization function for the DB backend */
-static void
-cal_backend_db_init (CalBackendDB *cbdb)
-{
- CalBackendDBPrivate *priv;
-
- priv = g_new0(CalBackendDBPrivate, 1);
- cbdb->priv = priv;
-}
-
-/* Destroy handler for the DB backend */
-static void
-cal_backend_db_destroy (GtkObject *object)
-{
- CalBackendDB *cbdb;
- CalBackendDBPrivate *priv;
- GList *node;
-
- g_return_if_fail(object != NULL);
- g_return_if_fail(IS_CAL_BACKEND_DB(object));
-
- cbdb = CAL_BACKEND_DB(object);
- priv = cbdb->priv;
-
- g_assert(cbdb->priv->clients == NULL);
-
- /* clean up */
- if (priv->uri) {
- gnome_vfs_uri_unref(priv->uri);
- priv->uri = NULL;
- }
-
- /* close open cursors */
- while ((node = g_list_first(cbdb->priv->cursors))) {
- close_cursor(cbdb, (CalBackendDBCursor *) node->data);
- }
-
- /* close open databases */
- if (cbdb->priv->objects_db)
- cbdb->priv->objects_db->close(cbdb->priv->objects_db, 0);
- if (cbdb->priv->history_db)
- cbdb->priv->history_db->close(cbdb->priv->history_db, 0);
-
- /* close DB environment */
- if (cbdb->priv->environment)
- cbdb->priv->environment->close(cbdb->priv->environment, 0);
-
- g_free((gpointer) priv);
- cbdb->priv = NULL;
-
- if (GTK_OBJECT_CLASS(parent_class)->destroy)
- (*GTK_OBJECT_CLASS(parent_class)->destroy)(object);
-}
-
-/*
- * Private functions
- */
-
-/* close an open cursor and frees all associated memory */
-static void
-close_cursor (CalBackendDB *cbdb, CalBackendDBCursor *cursor)
-{
- GList *node;
- DBT *dbt;
-
- g_return_if_fail(cursor != NULL);
-
- cursor->ref--;
- if (cursor->ref > 0)
- return;
-
- /* free all keys and data */
- while ((node = g_list_first(cursor->keys))) {
- dbt = (DBT *) node->data;
- cursor->keys = g_list_remove(cursor->keys, (gpointer) dbt);
- g_free((gpointer) dbt);
- }
- while ((node = g_list_first(cursor->data))) {
- dbt = (DBT *) node->data;
- cursor->data = g_list_remove(cursor->data, (gpointer) dbt);
- g_free((gpointer) dbt);
- }
-
- /* finally, close the cursor */
- cursor->dbc->c_close(cursor->dbc);
-
- cbdb->priv->cursors = g_list_remove(cbdb->priv->cursors, (gpointer) cursor);
- g_free((gpointer) cursor);
-}
-
-/* open a cursor for the given database */
-static CalBackendDBCursor *
-open_cursor (CalBackendDB *cbdb, DB *db)
-{
- CalBackendDBCursor *cursor;
- gint ret;
-
- g_return_val_if_fail(IS_CAL_BACKEND_DB(cbdb), NULL);
- g_return_val_if_fail(db != NULL, NULL);
-
- /* search for the cursor in our list of cursors */
- cursor = find_cursor_by_db(cbdb, db);
- if (cursor) {
- cursor->ref++;
- return cursor;
- }
-
- /* create the cursor */
- cursor = g_new0(CalBackendDBCursor, 1);
- cursor->parent_db = db;
- cursor->ref = 1;
-
- ret = db->cursor(db, NULL, &cursor->dbc, 0);
- if (ret == 0) {
- DBT key;
- DBT data;
-
- /* read data */
- memset(&key, 0, sizeof(key));
- memset(&data, 0, sizeof(data));
-
- while ((ret = cursor->dbc->c_get(cursor->dbc, &key, &data, DB_NEXT)) == 0) {
- cursor->keys = g_list_append(cursor->keys, g_memdup(&key, sizeof(key)));
- cursor->data = g_list_append(cursor->data, g_memdup(&data, sizeof(data)));
-
- memset(&key, 0, sizeof(key));
- memset(&data, 0, sizeof(data));
- }
- if (ret == DB_NOTFOUND) {
- cbdb->priv->cursors = g_list_prepend(cbdb->priv->cursors, (gpointer) cursor);
- return cursor;
- }
-
- /* close cursor on error */
- close_cursor(cbdb, cursor);
- }
-
- return NULL;
-}
-
-/* search for a cursor in the given backend */
-static CalBackendDBCursor *
-find_cursor_by_db (CalBackendDB *cbdb, DB *db)
-{
- GList *node;
-
- g_return_val_if_fail(IS_CAL_BACKEND_DB(cbdb), NULL);
- g_return_val_if_fail(cbdb->priv != NULL, NULL);
- g_return_val_if_fail(db != NULL, NULL);
-
- for (node = g_list_first(cbdb->priv->cursors); node != NULL; node = g_list_next(node)) {
- CalBackendDBCursor* cursor = (CalBackendDBCursor *) node->data;
-
- if (cursor && cursor->parent_db == db)
- return cursor;
- }
-
- return NULL; /* not found */
-}
-
-/* finds a record in a cursor by its ID */
-static DBT *
-find_record_by_id (CalBackendDBCursor *cursor, const gchar *id)
-{
- GList *node;
-
- g_return_val_if_fail(cursor != NULL, NULL);
- g_return_val_if_fail(id != NULL, NULL);
-
-
- for (node = g_list_first(cursor->keys); node != NULL; node = g_list_next(node)) {
- DBT *key;
-
- key = (DBT *) node->data;
- if (key && !strcmp(key->data, id)) {
- GList *tmp;
-
- tmp = g_list_nth(cursor->data, g_list_position(cursor->keys, node));
- if (tmp)
- return (DBT *) tmp->data;
- return NULL; /* no data associated with this key */
- }
- }
-
- return NULL; /* not found */
-}
-
-/* start a new transaction */
-static DB_TXN *
-begin_transaction (CalBackendDB *cbdb)
-{
- DB_TXN *tid;
- gint ret;
-
- g_return_val_if_fail(IS_CAL_BACKEND_DB(cbdb), NULL);
- g_return_val_if_fail(cbdb->priv != NULL, NULL);
-
- if ((ret = txn_begin(cbdb->priv->environment, NULL, &tid, 0)) != 0) {
- /* TODO: error logging */
- return NULL;
- }
-
- return tid;
-}
-
-/* finish successfully a transaction */
-static void
-commit_transaction (DB_TXN *tid)
-{
- gint ret;
-
- g_return_if_fail(tid != NULL);
-
- if ((ret = txn_commit(tid, 0)) != 0) {
- /* TODO: error logging? */
- }
-}
-
-/* abort a transaction */
-static void
-rollback_transaction (DB_TXN *tid)
-{
- gint ret;
-
- g_return_if_fail(tid != NULL);
-
- if ((ret = txn_abort(tid)) != 0) {
- /* TODO: error logging? */
- }
-}
-
-/*
- * Calendar backend methods
- */
-
-/* get_uri handler for the DB backend */
-static GnomeVFSURI *
-cal_backend_db_get_uri (CalBackend *backend)
-{
- CalBackendDB *cbdb;
-
- cbdb = CAL_BACKEND_DB(backend);
- g_return_val_if_fail(IS_CAL_BACKEND_DB(cbdb), NULL);
- g_return_val_if_fail(cbdb->priv != NULL, NULL);
-
- return cbdb->priv->uri;
-}
-
-/* callback used when a Cal is destroyed */
-static void
-destroy_cal_cb (GtkObject *object, gpointer data)
-{
- Cal *cal;
- Cal *tmp_cal;
- CalBackendDB *cbdb;
- GList *node;
-
- cal = CAL(object);
- cbdb = CAL_BACKEND_DB(data);
-
- g_return_if_fail(IS_CAL_BACKEND_DB(cbdb));
- g_return_if_fail(cbdb->priv != NULL);
-
- /* find the Cal in the list of clients */
- for (node = cbdb->priv->clients; node != NULL; node = g_list_next(node)) {
- tmp_cal = CAL(node->data);
- if (tmp_cal == cal)
- break;
- }
-
- if (node) {
- /* disconnect this Cal */
- cbdb->priv->clients = g_list_remove_link(cbdb->priv->clients, node);
- g_list_free_1(node);
-
- /* when all clients go away, notify the parent factory about it so that
- * it may decide to kill the backend or not.
- */
- if (!cbdb->priv->clients)
- cal_backend_last_client_gone(CAL_BACKEND(cbdb));
- }
-}
-
-/* add_cal_handler for the DB backend */
-static void
-cal_backend_db_add_cal (CalBackend *backend, Cal *cal)
-{
- CalBackendDB *cbdb;
-
- cbdb = CAL_BACKEND_DB(backend);
- g_return_if_fail(IS_CAL_BACKEND_DB(cbdb));
- g_return_if_fail(cbdb->priv != 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(destroy_cal_cb),
- backend);
-
- cbdb->priv->clients = g_list_prepend(cbdb->priv->clients, (gpointer) cal);
-}
-
-/* database file initialization */
-static gboolean
-open_database_file (CalBackendDB *cbdb, const gchar *str_uri, gboolean only_if_exists)
-{
- gint ret;
- struct stat sb;
- gchar *dir;
-
- g_return_val_if_fail(IS_CAL_BACKEND_DB(cbdb), FALSE);
- g_return_val_if_fail(cbdb->priv != NULL, FALSE);
- g_return_val_if_fail(cbdb->priv->objects_db != NULL, FALSE);
- g_return_val_if_fail(cbdb->priv->history_db != NULL, FALSE);
- g_return_val_if_fail(str_uri != NULL, FALSE);
-
- /* initialize DB environment (for transactions) */
- dir = g_strdup_printf(ENVIRONMENT_DIRECTORY, g_get_home_dir());
- if (stat(dir, &sb) != 0) {
-
- /* if the directory exists, we're done, since DB will fail if it's the
- * wrong one. If it does not exist, create the environment */
- if (mkdir(dir, S_IRWXU) != 0) {
- g_free((gpointer) dir);
- return FALSE;
- }
-
- /* create the environment handle */
- if ((ret = db_env_create(&cbdb->priv->environment, 0)) != 0) {
- g_free((gpointer) dir);
- return FALSE;
- }
-
- cbdb->priv->environment->set_errpfx(cbdb->priv->environment, "cal-backend-db");
-
- /* open the transactional environment */
- if ((ret = cbdb->priv->environment->open(cbdb->priv->environment,
- ENVIRONMENT_DIRECTORY,
- DB_CREATE | DB_INIT_LOCK | DB_INIT_LOG |
- DB_INIT_MPOOL | DB_INIT_TXN |
- DB_RECOVER | DB_THREAD,
- S_IRUSR | S_IWUSR)) != 0) {
- g_free((gpointer) dir);
- return FALSE;
- }
- }
-
- g_free((gpointer) dir);
-
- /* open/create objects database into given file */
- if ((ret = db_create(&cbdb->priv->objects_db, cbdb->priv->environment, 0)) != 0
- || (ret = db_create(&cbdb->priv->history_db, cbdb->priv->environment, 0)) != 0) {
- return FALSE;
- }
-
- if (only_if_exists) {
- ret = cbdb->priv->objects_db->open(cbdb->priv->objects_db,
- str_uri,
- "calendar_objects",
- DB_HASH,
- DB_THREAD,
- 0644);
- }
- else {
- ret = cbdb->priv->objects_db->open(cbdb->priv->objects_db,
- str_uri,
- "calendar_objects",
- DB_HASH,
- DB_CREATE | DB_THREAD,
- 0644);
- }
- if (ret == 0) {
- /* now, open the history database */
- ret = cbdb->priv->history_db->open(cbdb->priv->history_db,
- str_uri,
- "calendar_history",
- DB_BTREE,
- DB_CREATE | DB_THREAD,
- 0644);
- if (ret == 0) return TRUE;
-
- /* close objects database on error */
- cbdb->priv->objects_db->close(cbdb->priv->objects_db, 0);
- }
-
- return FALSE;
-}
-
-/* open handler for the DB backend */
-static CalBackendOpenStatus
-cal_backend_db_open (CalBackend *backend, GnomeVFSURI *uri, gboolean only_if_exists)
-{
- CalBackendDB *cbdb;
- gchar *str_uri;
-
- cbdb = CAL_BACKEND_DB(backend);
- g_return_val_if_fail(IS_CAL_BACKEND_DB(cbdb), CAL_BACKEND_OPEN_ERROR);
- g_return_val_if_fail(cbdb->priv != NULL, CAL_BACKEND_OPEN_ERROR);
- g_return_val_if_fail(uri != NULL, CAL_BACKEND_OPEN_ERROR);
- g_return_val_if_fail(cbdb->priv->objects_db == NULL, CAL_BACKEND_OPEN_ERROR);
-
- /* open the given URI */
- if (!gnome_vfs_uri_is_local(uri))
- return CAL_BACKEND_OPEN_ERROR;
- 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));
-
- /* open database file */
- if (!open_database_file(cbdb, (const gchar *) str_uri, only_if_exists)) {
- g_free((gpointer) str_uri);
- return CAL_BACKEND_OPEN_ERROR;
- }
-
- gnome_vfs_uri_ref(uri);
- cbdb->priv->uri = uri;
- g_free((gpointer) str_uri);
-
- return CAL_BACKEND_OPEN_SUCCESS;
-}
-
-/* is_loaded handler for the DB backend */
-static gboolean
-cal_backend_db_is_loaded (CalBackend *backend)
-{
- CalBackendDB *cbdb;
-
- cbdb = CAL_BACKEND_DB (backend);
-
- return (cbdb->priv->uri != NULL);
-}
-
-/* get_n_objects handler for the DB backend */
-static int
-cal_backend_db_get_n_objects (CalBackend *backend, CalObjType type)
-{
- CalBackendDB *cbdb;
- CalBackendDBCursor *cursor;
- int total_count = 0;
-
- cbdb = CAL_BACKEND_DB(backend);
- g_return_val_if_fail(IS_CAL_BACKEND_DB(cbdb), -1);
- g_return_val_if_fail(cbdb->priv != NULL, -1);
-
- /* open the cursor */
- cursor = open_cursor(cbdb, cbdb->priv->objects_db);
- if (cursor) {
- GList *node;
-
- /* we traverse all data, to check for each object's type */
- for (node = g_list_first(cursor->data); node != NULL; node = g_list_next(node)) {
- icalcomponent *icalcomp;
- DBT *data = (DBT *) node->data;
-
- icalcomp = icalparser_parse_string((char *) data->data);
- if (icalcomp) {
- switch (icalcomponent_isa(icalcomp)) {
- case ICAL_VEVENT_COMPONENT :
- if (type & CALOBJ_TYPE_EVENT)
- total_count++;
- break;
- case ICAL_VTODO_COMPONENT :
- if (type & CALOBJ_TYPE_TODO)
- total_count++;
- break;
- case ICAL_VJOURNAL_COMPONENT :
- if (type & CALOBJ_TYPE_JOURNAL)
- total_count++;
- break;
- default :
- break;
- }
- icalcomponent_free(icalcomp);
- }
- }
- close_cursor(cbdb, cursor);
- }
-
- return total_count;
-}
-
-/* get_object handler for the DB backend */
-static char *
-cal_backend_db_get_object (CalBackend *backend, const char *uid)
-{
- CalBackendDB *cbdb;
- gint ret;
- DBT key;
- DBT data;
-
- cbdb = CAL_BACKEND_DB(backend);
- g_return_val_if_fail(IS_CAL_BACKEND_DB(cbdb), NULL);
- g_return_val_if_fail(cbdb->priv != NULL, NULL);
- g_return_val_if_fail(cbdb->priv->objects_db != NULL, NULL);
- g_return_val_if_fail(uid != NULL, NULL);
-
- memset(&key, 0, sizeof(key));
- memset(&data, 0, sizeof(data));
- key.data = (void *) uid;
- key.size = strlen(uid); // + 1
-
- /* read record from database */
- if ((ret = cbdb->priv->objects_db->get(cbdb->priv->objects_db,
- NULL,
- &key,
- &data,
- 0)) == 0) {
- gchar *str = g_strdup((gchar *) data.data);
- return str;
- }
-
- return NULL;
-}
-
-/* get_type_by_uid handler for the DB backend */
-static CalObjType
-cal_backend_db_get_type_by_uid (CalBackend *backend, const char *uid)
-{
- CalBackendDB *cbdb;
- DBT key;
- DBT data;
- gint ret;
-
- cbdb = CAL_BACKEND_DB(backend);
- g_return_val_if_fail(IS_CAL_BACKEND_DB(cbdb), CAL_COMPONENT_NO_TYPE);
- g_return_val_if_fail(cbdb->priv != NULL, CAL_COMPONENT_NO_TYPE);
- g_return_val_if_fail(cbdb->priv->objects_db != NULL, CAL_COMPONENT_NO_TYPE);
- g_return_val_if_fail(uid != NULL, CAL_COMPONENT_NO_TYPE);
-
- memset(&key, 0, sizeof(key));
- memset(&data, 0, sizeof(data));
- key.data = (void *) uid;
- key.size = strlen(uid); // + 1
-
- /* read record from database */
- if ((ret = cbdb->priv->objects_db->get(cbdb->priv->objects_db,
- NULL,
- &key,
- &data,
- 0)) == 0) {
- icalcomponent *icalcomp = icalparser_parse_string((char *) data.data);
- if (icalcomp) {
- CalObjType type;
-
- switch (icalcomponent_isa(icalcomp)) {
- case ICAL_VEVENT_COMPONENT :
- type = CALOBJ_TYPE_EVENT;
- break;
- case ICAL_VTODO_COMPONENT :
- type = CALOBJ_TYPE_TODO;
- break;
- case ICAL_VJOURNAL_COMPONENT :
- type = CALOBJ_TYPE_JOURNAL;
- break;
- default :
- type = CAL_COMPONENT_NO_TYPE;
- }
-
- icalcomponent_free(icalcomp);
- return type;
- }
- }
-
- return CAL_COMPONENT_NO_TYPE;
-}
-
-static GList *
-add_uid_if_match (GList *list, CalBackendDBCursor *cursor, GList *data_node, CalObjType type)
-{
- DBT *data;
-
- g_return_val_if_fail(cursor != NULL, list);
- g_return_val_if_fail(data_node != NULL, list);
-
- data = (DBT *) data_node->data;
- if (data) {
- icalcomponent *icalcomp;
- gchar *uid = NULL;
-
- icalcomp = icalparser_parse_string(data->data);
- if (!icalcomp) return list;
-
- switch (icalcomponent_isa(icalcomp)) {
- case ICAL_VEVENT_COMPONENT :
- if (type & CALOBJ_TYPE_EVENT)
- uid = (gchar *) icalcomponent_get_uid(icalcomp);
- break;
- case ICAL_VTODO_COMPONENT :
- if (type & CALOBJ_TYPE_TODO)
- uid = (gchar *) icalcomponent_get_uid(icalcomp);
- break;
- case ICAL_VJOURNAL_COMPONENT :
- if (type & CALOBJ_TYPE_JOURNAL)
- uid = (gchar *) icalcomponent_get_uid(icalcomp);
- break;
- default :
- uid = NULL;
- }
-
- if (uid)
- list = g_list_prepend(list, g_strdup(uid));
- icalcomponent_free(icalcomp);
- }
-
- return list;
-}
-
-/* get_uids handler for the DB backend */
-static GList *
-cal_backend_db_get_uids (CalBackend *backend, CalObjType type)
-{
- CalBackendDB *cbdb;
- GList *list = NULL;
- CalBackendDBCursor *cursor;
-
- cbdb = CAL_BACKEND_DB(backend);
- g_return_val_if_fail(IS_CAL_BACKEND_DB(cbdb), NULL);
- g_return_val_if_fail(cbdb->priv != NULL, NULL);
- g_return_val_if_fail(cbdb->priv->objects_db != NULL, NULL);
-
- /* open cursor */
- cursor = open_cursor(cbdb, cbdb->priv->objects_db);
- if (cursor) {
- GList *node;
-
- /* we traverse all data, to check for each object's type */
- for (node = g_list_first(cursor->data); node != NULL; node = g_list_next(node)) {
- list = add_uid_if_match(list, cursor, node, type);
- }
- close_cursor(cbdb, cursor);
- }
-
- return list;
-}
-
-/* callback used from cal_recur_generate_instances(): adds the component's UID to
- * our hash table
- */
-static gboolean
-add_instance (CalComponent *comp, time_t start, time_t end, gpointer data)
-{
- GHashTable *uid_hash;
- const char *uid;
- const char *old_uid;
-
- uid_hash = data;
-
- cal_component_get_uid(comp, &uid);
-
- old_uid = g_hash_table_lookup(uid_hash, uid);
- if (old_uid)
- return FALSE;
-
- g_hash_table_insert(uid_hash, (char *) uid, NULL);
- return FALSE;
-}
-
-/* creates the list of UIDs in the given range */
-static void
-get_instances_in_range (GHashTable *uid_hash,
- CalBackendDBCursor *cursor,
- CalObjType type,
- time_t start,
- time_t end)
-{
- GList *node;
-
- g_return_if_fail(uid_hash != NULL);
- g_return_if_fail(cursor != NULL);
-
- for (node = g_list_first(cursor->data); node != NULL; node = g_list_next(node)) {
- DBT *data;
- icalcomponent *icalcomp;
-
- data = (DBT *) node->data;
- if (data) {
- icalcomp = icalparser_parse_string((char *) data->data);
- if (icalcomp) {
- CalComponent *comp = cal_component_new();
- cal_component_set_icalcomponent(comp, icalcomp);
-
- switch (icalcomponent_isa(icalcomp)) {
- case ICAL_VEVENT_COMPONENT :
- if (type & CALOBJ_TYPE_EVENT)
- cal_recur_generate_instances(comp,
- start,
- end,
- add_instance,
- uid_hash);
- break;
- case ICAL_VTODO_COMPONENT :
- if (type & CALOBJ_TYPE_TODO)
- cal_recur_generate_instances(comp,
- start,
- end,
- add_instance,
- uid_hash);
- break;
- case ICAL_VJOURNAL_COMPONENT :
- if (type & CALOBJ_TYPE_JOURNAL)
- cal_recur_generate_instances(comp,
- start,
- end,
- add_instance,
- uid_hash);
- break;
- default :
- break;
- }
-
- gtk_object_unref(GTK_OBJECT(comp));
- icalcomponent_free(icalcomp);
- }
- }
- }
-}
-
-/* callback used from g_hash_table_foreach: adds a UID from the hash table to our list */
-static void
-add_uid_to_list (gpointer key, gpointer value, gpointer data)
-{
- GList **list;
- const char *uid;
-
- list = (GList **) data;
-
- uid = (const char *) key;
- *list = g_list_prepend(*list, (gpointer) g_strdup(uid));
-}
-
-/* get_objects_in_range handler for the DB backend */
-static GList *
-cal_backend_db_get_objects_in_range (CalBackend *backend,
- CalObjType type,
- time_t start,
- time_t end)
-{
- CalBackendDB *cbdb;
- GList *list = NULL;
- CalBackendDBCursor *cursor;
-
- cbdb = CAL_BACKEND_DB(backend);
- g_return_val_if_fail(IS_CAL_BACKEND_DB(cbdb), NULL);
- g_return_val_if_fail(cbdb->priv != NULL, NULL);
-
- /* open cursor */
- cursor = open_cursor(cbdb, cbdb->priv->objects_db);
- if (cursor) {
- GHashTable *uid_hash;
-
- /* build the hash table */
- uid_hash = g_hash_table_new(g_str_hash, g_str_equal);
- get_instances_in_range(uid_hash, cursor, type, start, end);
-
- /* build the list to be returned from the hash table */
- g_hash_table_foreach(uid_hash, add_uid_to_list, &list);
- g_hash_table_destroy(uid_hash);
-
- close_cursor(cbdb, cursor);
- }
-
- return list;
-}
-
-/* get_changes handler for the DB backend */
-static GNOME_Evolution_Calendar_CalObjChangeSeq *
-cal_backend_db_get_changes (CalBackend *backend, CalObjType type, const char *change_id)
-{
- CalBackendDB *cbdb;
-
- cbdb = CAL_BACKEND_DB(backend);
- g_return_val_if_fail(IS_CAL_BACKEND_DB(cbdb), NULL);
- g_return_val_if_fail(cbdb->priv != NULL, NULL);
-
- return NULL;
-}
-
-/* computes the range of time in which recurrences should be generated for a
- * component in order to compute alarm trigger times.
- */
-static void
-compute_alarm_range (CalComponent *comp,
- GList *alarm_uids,
- time_t start,
- time_t end,
- time_t *alarm_start,
- time_t *alarm_end)
-{
- GList *l;
-
- *alarm_start = start;
- *alarm_end = end;
-
- for (l = alarm_uids; l; l = l->next) {
- const char *auid;
- CalComponentAlarm *alarm;
- CalAlarmTrigger trigger;
- struct icaldurationtype *dur;
- time_t dur_time;
-
- auid = l->data;
- alarm = cal_component_get_alarm (comp, auid);
- g_assert (alarm != NULL);
-
- cal_component_alarm_get_trigger (alarm, &trigger);
- cal_component_alarm_free (alarm);
-
- switch (trigger.type) {
- case CAL_ALARM_TRIGGER_NONE:
- case CAL_ALARM_TRIGGER_ABSOLUTE:
- continue;
- case CAL_ALARM_TRIGGER_RELATIVE_START:
- case CAL_ALARM_TRIGGER_RELATIVE_END:
- dur = &trigger.u.rel_duration;
- dur_time = icaldurationtype_as_int (*dur);
-
- if (dur->is_neg)
- *alarm_end = MAX (*alarm_end, end + dur_time);
- else
- *alarm_start = MIN (*alarm_start, start - dur_time);
-
- break;
- default:
- g_assert_not_reached ();
- }
- }
-
- g_assert (*alarm_start <= *alarm_end);
-}
-
-/* closure data to generate alarm occurrences */
-struct alarm_occurrence_data {
- /* these are the info we have */
- GList *alarm_uids;
- time_t start;
- time_t end;
-
- /* this is what we compute */
- GSList *triggers;
- int n_triggers;
-};
-
-/* callback used from cal_recur_generate_instances(); generates triggers for all
- * of a component's RELATIVE alarms.
- */
-static gboolean
-add_alarm_occurrences_cb (CalComponent *comp, time_t start, time_t end, gpointer data)
-{
- struct alarm_occurrence_data *aod;
- GList *l;
-
- aod = data;
-
- for (l = aod->alarm_uids; l; l = l->next) {
- const char *auid;
- CalComponentAlarm *alarm;
- CalAlarmTrigger trigger;
- struct icaldurationtype *dur;
- time_t dur_time;
- time_t occur_time, trigger_time;
- CalAlarmInstance *instance;
-
- auid = l->data;
- alarm = cal_component_get_alarm (comp, auid);
- g_assert (alarm != NULL);
-
- cal_component_alarm_get_trigger (alarm, &trigger);
- cal_component_alarm_free (alarm);
-
- if (trigger.type != CAL_ALARM_TRIGGER_RELATIVE_START
- && trigger.type != CAL_ALARM_TRIGGER_RELATIVE_END)
- continue;
-
- dur = &trigger.u.rel_duration;
- dur_time = icaldurationtype_as_int (*dur);
-
- if (trigger.type == CAL_ALARM_TRIGGER_RELATIVE_START)
- occur_time = start;
- else
- occur_time = end;
-
- if (dur->is_neg)
- trigger_time = occur_time - dur_time;
- else
- trigger_time = occur_time + dur_time;
-
- if (trigger_time < aod->start || trigger_time >= aod->end)
- continue;
-
- instance = g_new (CalAlarmInstance, 1);
- instance->auid = auid;
- instance->trigger = trigger_time;
- instance->occur = occur_time;
-
- aod->triggers = g_slist_prepend (aod->triggers, instance);
- aod->n_triggers++;
- }
-
- return TRUE;
-}
-
-/* generates the absolute triggers for a component */
-static void
-generate_absolute_triggers (CalComponent *comp, struct alarm_occurrence_data *aod)
-{
- GList *l;
-
- for (l = aod->alarm_uids; l; l = l->next) {
- const char *auid;
- CalComponentAlarm *alarm;
- CalAlarmTrigger trigger;
- time_t abs_time;
- CalAlarmInstance *instance;
-
- auid = l->data;
- alarm = cal_component_get_alarm (comp, auid);
- g_assert (alarm != NULL);
-
- cal_component_alarm_get_trigger (alarm, &trigger);
- cal_component_alarm_free (alarm);
-
- if (trigger.type != CAL_ALARM_TRIGGER_ABSOLUTE)
- continue;
-
- abs_time = icaltime_as_timet (trigger.u.abs_time);
-
- if (abs_time < aod->start || abs_time >= aod->end)
- continue;
-
- instance = g_new (CalAlarmInstance, 1);
- instance->auid = auid;
- instance->trigger = abs_time;
- instance->occur = abs_time; /* No particular occurrence, so just use the same time */
-
- aod->triggers = g_slist_prepend (aod->triggers, instance);
- aod->n_triggers++;
- }
-}
-
-/* compares two alarm instances; called from g_slist_sort() */
-static gint
-compare_alarm_instance (gconstpointer a, gconstpointer b)
-{
- const CalAlarmInstance *aia, *aib;
-
- aia = a;
- aib = b;
-
- if (aia->trigger < aib->trigger)
- return -1;
- else if (aia->trigger > aib->trigger)
- return 1;
- else
- return 0;
-}
-
-/* generates alarm instances for a calendar component. Returns the instances
- * structure, or NULL if no alarm instances occurred in the specified time
- * range.
- */
-static CalComponentAlarms *
-generate_alarms_for_comp (CalComponent *comp, time_t start, time_t end)
-{
- CalComponentAlarms *alarms = NULL;
- GList *alarm_uids;
- time_t alarm_start, alarm_end;
- struct alarm_occurrence_data aod;
-
- g_return_val_if_fail(IS_CAL_COMPONENT(comp), NULL);
-
- if (!cal_component_has_alarms(comp))
- return NULL;
-
- alarm_uids = cal_component_get_alarm_uids(comp);
- compute_alarm_range(comp, alarm_uids, start, end, &alarm_start, &alarm_end);
-
- aod.alarm_uids = alarm_uids;
- aod.start = start;
- aod.end = end;
- aod.triggers = NULL;
- aod.n_triggers = 0;
- cal_recur_generate_instances(comp, alarm_start, alarm_end, add_alarm_occurrences_cb, &aod);
-
- /* we add the ABSOLUTE triggers separately */
- generate_absolute_triggers(comp, &aod);
-
- if (aod.n_triggers == 0)
- return NULL;
-
- /* create the component alarm instances structure */
- alarms = g_new (CalComponentAlarms, 1);
- alarms->comp = comp;
- gtk_object_ref (GTK_OBJECT (alarms->comp));
- alarms->alarms = g_slist_sort (aod.triggers, compare_alarm_instance);
-
- return alarms;
-}
-
-/* retrieve list of alarms */
-static GSList *
-get_list_of_alarms (CalBackendDBCursor *cursor, time_t start, time_t end)
-{
- GSList *list = NULL;
- GList *node;
-
- g_return_val_if_fail(cursor != NULL, NULL);
-
- for (node = g_list_first(cursor->data); node != NULL; node = g_list_next(node)) {
- icalcomponent *icalcomp;
- icalcomponent_kind kind;
- DBT *data;
-
- data = (DBT *) node->data;
- if (data) {
- icalcomp = icalparser_parse_string((char *) data->data);
- if (icalcomp) {
- /* per RFC 2445, only VEVENTs and VTODOs can have alarms */
- kind = icalcomponent_isa(icalcomp);
- if (kind == ICAL_VEVENT_COMPONENT || kind == ICAL_VTODO_COMPONENT) {
- CalComponent *comp;
- CalComponentAlarms *alarms;
-
- /* create the CalComponent to compute the alarms */
- comp = cal_component_new();
- cal_component_set_icalcomponent(comp, icalcomp);
-
- alarms = generate_alarms_for_comp(comp, start, end);
- if (alarms)
- list = g_slist_prepend(list, (gpointer) alarms);
-
- gtk_object_unref(GTK_OBJECT(comp));
- }
-
- icalcomponent_free(icalcomp);
- }
- }
- }
-
- return list;
-}
-
-/* fills a CORBA sequence of alarm instances */
-static void
-fill_alarm_instances_seq (GNOME_Evolution_Calendar_CalAlarmInstanceSeq *seq, GSList *alarms)
-{
- int n_alarms;
- GSList *l;
- int i;
-
- n_alarms = g_slist_length(alarms);
-
- CORBA_sequence_set_release(seq, TRUE);
- seq->_length = n_alarms;
- seq->_buffer = CORBA_sequence_GNOME_Evolution_Calendar_CalAlarmInstance_allocbuf(n_alarms);
-
- for (l = alarms, i = 0; l != NULL; l = l->next, i++) {
- CalAlarmInstance *instance;
- GNOME_Evolution_Calendar_CalAlarmInstance *corba_instance;
-
- instance = (CalAlarmInstance *) l->data;
- corba_instance = seq->_buffer + i;
-
- corba_instance->auid = CORBA_string_dup(instance->auid);
- corba_instance->trigger = (long) instance->trigger;
- corba_instance->occur = (long) instance->occur;
- }
-}
-
-/* get_alarms_in_range handler for the DB backend */
-static GNOME_Evolution_Calendar_CalComponentAlarmsSeq *
-cal_backend_db_get_alarms_in_range (CalBackend *backend, time_t start, time_t end)
-{
- CalBackendDB *cbdb;
- CalBackendDBCursor *cursor;
- gint number_of_alarms;
- GSList *alarm_list;
- GSList *node;
- gint i;
- GNOME_Evolution_Calendar_CalComponentAlarmsSeq *seq = NULL;
-
- cbdb = CAL_BACKEND_DB(backend);
- g_return_val_if_fail(IS_CAL_BACKEND_DB(cbdb), NULL);
- g_return_val_if_fail(cbdb->priv != NULL, NULL);
- g_return_val_if_fail (start != -1 && end != -1, NULL);
- g_return_val_if_fail (start <= end, NULL);
-
- /* open cursor */
- cursor = open_cursor(cbdb, cbdb->priv->objects_db);
- if (cursor) {
- alarm_list = get_list_of_alarms(cursor, start, end);
- number_of_alarms = g_slist_length(alarm_list);
-
- /* create the CORBA sequence */
- seq = GNOME_Evolution_Calendar_CalComponentAlarmsSeq__alloc();
- CORBA_sequence_set_release(seq, TRUE);
- seq->_length = number_of_alarms;
- seq->_buffer = CORBA_sequence_GNOME_Evolution_Calendar_CalComponentAlarms_allocbuf(
- number_of_alarms);
-
- /* populate CORBA sequence */
- for (node = alarm_list, i = 0; node != NULL; node = node->next, i++) {
- CalComponentAlarms *alarms;
- gchar *comp_str;
-
- alarms = (CalComponentAlarms *) node->data;
-
- comp_str = cal_component_get_as_string (alarms->comp);
- seq->_buffer[i].calobj = CORBA_string_dup(comp_str);
- g_free((gpointer) comp_str);
-
- fill_alarm_instances_seq(&seq->_buffer[i].alarms, alarms->alarms);
-
- cal_component_alarms_free(alarms);
- }
-
- g_slist_free(alarm_list);
- close_cursor(cbdb, cursor);
- }
-
- return seq;
-}
-
-/* get_alarms_for_object handler for the DB backend */
-static GNOME_Evolution_Calendar_CalComponentAlarms *
-cal_backend_db_get_alarms_for_object (CalBackend *backend,
- const char *uid,
- time_t start,
- time_t end,
- gboolean *object_found)
-{
- CalBackendDB *cbdb;
- CalBackendDBCursor *cursor;
- GNOME_Evolution_Calendar_CalComponentAlarms *corba_alarms = NULL;
- DBT *data;
- gchar *comp_str;
- CalComponentAlarms *alarms;
-
- cbdb = CAL_BACKEND_DB(backend);
- g_return_val_if_fail(IS_CAL_BACKEND_DB(cbdb), NULL);
- g_return_val_if_fail(cbdb->priv != NULL, NULL);
- g_return_val_if_fail(uid != NULL, NULL);
- g_return_val_if_fail(start != -1 && end != -1, NULL);
- g_return_val_if_fail(start <= end, NULL);
- g_return_val_if_fail(object_found != NULL, NULL);
-
- *object_found = FALSE;
-
- /* open the cursor */
- cursor = open_cursor(cbdb, cbdb->priv->objects_db);
- if (cursor) {
- data = find_record_by_id(cursor, uid);
- if (data) {
- icalcomponent *icalcomp;
- CalComponent *comp;
-
- *object_found = TRUE;
-
- comp_str = (gchar *) data->data;
-
- icalcomp = icalparser_parse_string(comp_str);
- if (!icalcomp) {
- close_cursor(cbdb, cursor);
- return NULL;
- }
-
- comp = cal_component_new();
- cal_component_set_icalcomponent(comp, icalcomp);
-
- /* create the CORBA alarms */
- corba_alarms = GNOME_Evolution_Calendar_CalComponentAlarms__alloc();
- corba_alarms->calobj = CORBA_string_dup (comp_str);
-
- /* populate the CORBA sequence */
- alarms = generate_alarms_for_comp(comp, start, end);
- if (alarms) {
- fill_alarm_instances_seq(&corba_alarms->alarms, alarms->alarms);
- cal_component_alarms_free(alarms);
- }
- else
- fill_alarm_instances_seq(&corba_alarms->alarms, NULL);
-
- gtk_object_unref(GTK_OBJECT(comp));
- icalcomponent_free(icalcomp);
- }
-
- close_cursor(cbdb, cursor);
- }
-
- return corba_alarms;
-}
-
-/* do notifications to Cal clients */
-static void
-do_notify (CalBackendDB *cbdb, void (*notify_fn)(Cal *, gchar *), const gchar *uid)
-{
- GList *node;
-
- g_return_if_fail(IS_CAL_BACKEND_DB(cbdb));
- g_return_if_fail(cbdb->priv != NULL);
- g_return_if_fail(notify_fn != NULL);
- g_return_if_fail(uid != NULL);
-
- /* FIXME: do notification asynchronously */
- for (node = g_list_first(cbdb->priv->clients); node != NULL; node = g_list_next(node)) {
- Cal *cal;
-
- cal = CAL(node->data);
- (*notify_fn)(cal, (gpointer) uid);
- }
-}
-
-/* adds a record to the history database */
-static gboolean
-add_history (CalBackendDB *cbdb, DB_TXN *tid, const gchar *uid, const gchar *calobj)
-{
- DBT key;
- DBT new_data;
- gint ret;
-
- g_return_val_if_fail(IS_CAL_BACKEND_DB(cbdb), FALSE);
- g_return_val_if_fail(uid != NULL, FALSE);
- g_return_val_if_fail(calobj != NULL, FALSE);
-
- /* fill in DBT structures */
- memset(&key, 0, sizeof(key));
- key.data = (void *) uid;
- key.size = strlen(uid); // + 1
-
- memset(&new_data, 0, sizeof(new_data));
- new_data.data = (void *) calobj;
- new_data.size = strlen(calobj); // + 1
-
- /* add the new record to the database */
- if ((ret = cbdb->priv->history_db->put(cbdb->priv->objects_db,
- tid,
- &key,
- &new_data,
- 0)) != 0) {
- return FALSE;
- }
-
- return TRUE;
-}
-
-/* update_object handler for the DB backend */
-static gboolean
-cal_backend_db_update_object (CalBackend *backend, const char *uid, const char *calobj)
-{
- CalBackendDB *cbdb;
- DB_TXN *tid;
- DBT key;
- DBT new_data;
- gint ret;
-
- cbdb = CAL_BACKEND_DB(backend);
- g_return_val_if_fail(IS_CAL_BACKEND_DB(cbdb), FALSE);
- g_return_val_if_fail(cbdb->priv != NULL, FALSE);
- g_return_val_if_fail(cbdb->priv->objects_db != NULL, FALSE);
- g_return_val_if_fail(uid != NULL, FALSE);
- g_return_val_if_fail(calobj != NULL, FALSE);
-
- /* start transaction */
- tid = begin_transaction(cbdb);
- if (!tid)
- return FALSE;
-
- memset(&key, 0, sizeof(key));
- key.data = (void *) uid;
- key.size = strlen(uid); // + 1
-
- memset(&new_data, 0, sizeof(new_data));
- new_data.data = (void *) calobj;
- new_data.size = strlen(calobj); // + 1
-
- if ((ret = cbdb->priv->objects_db->put(cbdb->priv->objects_db,
- tid,
- &key,
- &new_data,
- 0)) != 0) {
- rollback_transaction(tid);
- return FALSE;
- }
-
- if (!add_history(cbdb, tid, uid, calobj)) {
- rollback_transaction(tid);
- return FALSE;
- }
- commit_transaction(tid);
-
- cal_backend_obj_updated (CAL_BACKEND (cbdb), uid);
- do_notify(cbdb, cal_notify_update, uid);
- return TRUE;
-}
-
-/* remove_object handler for the DB backend */
-static gboolean
-cal_backend_db_remove_object (CalBackend *backend, const char *uid)
-{
- CalBackendDB *cbdb;
- DB_TXN *tid;
- DBT key;
- gint ret;
-
- cbdb = CAL_BACKEND_DB(backend);
- g_return_val_if_fail(IS_CAL_BACKEND_DB(cbdb), FALSE);
- g_return_val_if_fail(cbdb->priv != NULL, FALSE);
- g_return_val_if_fail(uid != NULL, FALSE);
-
- memset(&key, 0, sizeof(key));
- key.data = (void *) uid;
- key.size = strlen(uid); // + 1
-
- /* start transaction */
- tid = begin_transaction(cbdb);
- if (!tid)
- return FALSE;
-
- /* remove record from database */
- if ((ret = cbdb->priv->objects_db->del(cbdb->priv->objects_db, tid, &key, 0)) != 0) {
- rollback_transaction(tid);
- return FALSE;
- }
-
- /* TODO: update history database */
- commit_transaction(tid);
-
- cal_backend_obj_removed (CAL_BACKEND (cbdb), uid);
- do_notify(cbdb, cal_notify_remove, uid);
-
- return TRUE;
-}
diff --git a/calendar/pcs/cal-backend-db.h b/calendar/pcs/cal-backend-db.h
deleted file mode 100644
index c73dbb5a83..0000000000
--- a/calendar/pcs/cal-backend-db.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* Evolution calendar - iCalendar DB backend
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Author: Rodrigo Moya <rodrigo@ximian.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 CAL_BACKEND_DB_H
-#define CAL_BACKEND_DB_H
-
-#include "cal-backend.h"
-
-BEGIN_GNOME_DECLS
-
-#define CAL_BACKEND_DB_TYPE (cal_backend_db_get_type ())
-#define CAL_BACKEND_DB(obj) (GTK_CHECK_CAST ((obj), CAL_BACKEND_DB_TYPE, \
- CalBackendDB))
-#define CAL_BACKEND_DB_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), CAL_BACKEND_DB_TYPE, \
- CalBackendDBClass))
-#define IS_CAL_BACKEND_DB(obj) (GTK_CHECK_TYPE ((obj), CAL_BACKEND_DB_TYPE))
-#define IS_CAL_BACKEND_DB_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), CAL_BACKEND_DB_TYPE))
-
-typedef struct _CalBackendDB CalBackendDB;
-typedef struct _CalBackendDBClass CalBackendDBClass;
-
-typedef struct _CalBackendDBPrivate CalBackendDBPrivate;
-
-struct _CalBackendDB {
- CalBackend backend;
-
- /* Private data */
- CalBackendDBPrivate *priv;
-};
-
-struct _CalBackendDBClass {
- CalBackendClass parent_class;
-};
-
-GtkType cal_backend_db_get_type (void);
-
-END_GNOME_DECLS
-
-#endif
diff --git a/calendar/pcs/cal-backend-file.c b/calendar/pcs/cal-backend-file.c
deleted file mode 100644
index 1267f44e3f..0000000000
--- a/calendar/pcs/cal-backend-file.c
+++ /dev/null
@@ -1,1623 +0,0 @@
-/* Evolution calendar - iCalendar file backend
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Author: Federico Mena-Quintero <federico@ximian.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 <gtk/gtksignal.h>
-#include "e-util/e-dbhash.h"
-#include "cal-util/cal-recur.h"
-#include "cal-backend-file.h"
-
-
-
-/* Private part of the CalBackendFile structure */
-struct _CalBackendFilePrivate {
- /* URI where the calendar data is stored */
- GnomeVFSURI *uri;
-
- /* List of Cal objects with their listeners */
- GList *clients;
-
- /* Toplevel VCALENDAR component */
- icalcomponent *icalcomp;
-
- /* All the CalComponent objects in the calendar, hashed by UID. The
- * hash key *is* the uid returned by cal_component_get_uid(); it is not
- * copied, so don't free it when you remove an object from the hash
- * table.
- */
- GHashTable *comp_uid_hash;
-
- /* All event, to-do, and journal components in the calendar; they are
- * here just for easy access (i.e. so that you don't have to iterate
- * over the comp_uid_hash). If you need *all* the components in the
- * calendar, iterate over the hash instead.
- */
- GList *events;
- GList *todos;
- GList *journals;
-
- /* Idle handler for saving the calendar when it is dirty */
- guint idle_id;
-};
-
-
-
-static void cal_backend_file_class_init (CalBackendFileClass *class);
-static void cal_backend_file_init (CalBackendFile *cbfile);
-static void cal_backend_file_destroy (GtkObject *object);
-
-static GnomeVFSURI *cal_backend_file_get_uri (CalBackend *backend);
-static void cal_backend_file_add_cal (CalBackend *backend, Cal *cal);
-static CalBackendOpenStatus cal_backend_file_open (CalBackend *backend, GnomeVFSURI *uri,
- gboolean only_if_exists);
-static gboolean cal_backend_file_is_loaded (CalBackend *backend);
-
-static int cal_backend_file_get_n_objects (CalBackend *backend, CalObjType type);
-static char *cal_backend_file_get_object (CalBackend *backend, const char *uid);
-static CalObjType cal_backend_file_get_type_by_uid (CalBackend *backend, const char *uid);
-static GList *cal_backend_file_get_uids (CalBackend *backend, CalObjType type);
-static GList *cal_backend_file_get_objects_in_range (CalBackend *backend, CalObjType type,
- time_t start, time_t end);
-static GNOME_Evolution_Calendar_CalObjChangeSeq *cal_backend_file_get_changes (
- CalBackend *backend, CalObjType type, const char *change_id);
-
-static GNOME_Evolution_Calendar_CalComponentAlarmsSeq *cal_backend_file_get_alarms_in_range (
- CalBackend *backend, time_t start, time_t end);
-
-static GNOME_Evolution_Calendar_CalComponentAlarms *cal_backend_file_get_alarms_for_object (
- CalBackend *backend, const char *uid,
- time_t start, time_t end, gboolean *object_found);
-
-static gboolean cal_backend_file_update_object (CalBackend *backend, const char *uid,
- const char *calobj);
-static gboolean cal_backend_file_remove_object (CalBackend *backend, const char *uid);
-
-static CalBackendClass *parent_class;
-
-
-
-/**
- * cal_backend_file_get_type:
- * @void:
- *
- * Registers the #CalBackendFile class if necessary, and returns the type ID
- * associated to it.
- *
- * Return value: The type ID of the #CalBackendFile class.
- **/
-GtkType
-cal_backend_file_get_type (void)
-{
- static GtkType cal_backend_file_type = 0;
-
- if (!cal_backend_file_type) {
- static const GtkTypeInfo cal_backend_file_info = {
- "CalBackendFile",
- sizeof (CalBackendFile),
- sizeof (CalBackendFileClass),
- (GtkClassInitFunc) cal_backend_file_class_init,
- (GtkObjectInitFunc) cal_backend_file_init,
- NULL, /* reserved_1 */
- NULL, /* reserved_2 */
- (GtkClassInitFunc) NULL
- };
-
- cal_backend_file_type = gtk_type_unique (CAL_BACKEND_TYPE, &cal_backend_file_info);
- }
-
- return cal_backend_file_type;
-}
-
-/* Class initialization function for the file backend */
-static void
-cal_backend_file_class_init (CalBackendFileClass *class)
-{
- GtkObjectClass *object_class;
- CalBackendClass *backend_class;
-
- object_class = (GtkObjectClass *) class;
- backend_class = (CalBackendClass *) class;
-
- parent_class = gtk_type_class (CAL_BACKEND_TYPE);
-
- object_class->destroy = cal_backend_file_destroy;
-
- backend_class->get_uri = cal_backend_file_get_uri;
- backend_class->add_cal = cal_backend_file_add_cal;
- backend_class->open = cal_backend_file_open;
- backend_class->is_loaded = cal_backend_file_is_loaded;
- backend_class->get_n_objects = cal_backend_file_get_n_objects;
- backend_class->get_object = cal_backend_file_get_object;
- backend_class->get_type_by_uid = cal_backend_file_get_type_by_uid;
- backend_class->get_uids = cal_backend_file_get_uids;
- backend_class->get_objects_in_range = cal_backend_file_get_objects_in_range;
- backend_class->get_changes = cal_backend_file_get_changes;
- backend_class->get_alarms_in_range = cal_backend_file_get_alarms_in_range;
- backend_class->get_alarms_for_object = cal_backend_file_get_alarms_for_object;
- backend_class->update_object = cal_backend_file_update_object;
- backend_class->remove_object = cal_backend_file_remove_object;
-}
-
-/* Object initialization function for the file backend */
-static void
-cal_backend_file_init (CalBackendFile *cbfile)
-{
- CalBackendFilePrivate *priv;
-
- priv = g_new0 (CalBackendFilePrivate, 1);
- cbfile->priv = priv;
-
- priv->uri = NULL;
- priv->clients = NULL;
- priv->icalcomp = NULL;
- priv->comp_uid_hash = NULL;
- priv->events = NULL;
- priv->todos = NULL;
- priv->journals = NULL;
-}
-
-/* g_hash_table_foreach() callback to destroy a CalComponent */
-static void
-free_cal_component (gpointer key, gpointer value, gpointer data)
-{
- CalComponent *comp;
-
- comp = CAL_COMPONENT (value);
- gtk_object_unref (GTK_OBJECT (comp));
-}
-
-/* Saves the calendar data */
-static void
-save (CalBackendFile *cbfile)
-{
- CalBackendFilePrivate *priv;
- GnomeVFSHandle *handle = NULL;
- GnomeVFSResult result;
- GnomeVFSFileSize out;
- gchar *tmp;
- char *buf;
-
- priv = cbfile->priv;
- g_assert (priv->uri != NULL);
- g_assert (priv->icalcomp != NULL);
-
- /* Make a backup copy of the file if it exists */
- tmp = gnome_vfs_uri_to_string (priv->uri, GNOME_VFS_URI_HIDE_NONE);
- if (tmp) {
- GnomeVFSURI *backup_uri;
- gchar *backup_uristr;
-
- backup_uristr = g_strconcat (tmp, "~", NULL);
- backup_uri = gnome_vfs_uri_new (backup_uristr);
-
- result = gnome_vfs_move_uri (priv->uri, backup_uri, TRUE);
- gnome_vfs_uri_unref (backup_uri);
-
- g_free (tmp);
- g_free (backup_uristr);
- }
-
- /* Now write the new file out */
- result = gnome_vfs_create_uri (&handle, priv->uri,
- GNOME_VFS_OPEN_WRITE,
- FALSE, 0666);
-
- if (result != GNOME_VFS_OK)
- goto error;
-
- buf = icalcomponent_as_ical_string (priv->icalcomp);
- result = gnome_vfs_write (handle, buf, strlen (buf) * sizeof (char), &out);
-
- if (result != GNOME_VFS_OK)
- goto error;
-
- gnome_vfs_close (handle);
-
- return;
-
- error:
- g_warning ("Error writing calendar file.");
- return;
-}
-
-/* Destroy handler for the file backend */
-static void
-cal_backend_file_destroy (GtkObject *object)
-{
- CalBackendFile *cbfile;
- CalBackendFilePrivate *priv;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_CAL_BACKEND_FILE (object));
-
- cbfile = CAL_BACKEND_FILE (object);
- priv = cbfile->priv;
-
- g_assert (priv->clients == NULL);
-
- /* Save if necessary */
-
- if (priv->idle_id != 0) {
- save (cbfile);
- g_source_remove (priv->idle_id);
- priv->idle_id = 0;
- }
-
- /* Clean up */
-
- if (priv->uri) {
- gnome_vfs_uri_unref (priv->uri);
- priv->uri = NULL;
- }
-
- if (priv->comp_uid_hash) {
- g_hash_table_foreach (priv->comp_uid_hash,
- free_cal_component, NULL);
- g_hash_table_destroy (priv->comp_uid_hash);
- priv->comp_uid_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;
-
- if (priv->icalcomp) {
- icalcomponent_free (priv->icalcomp);
- priv->icalcomp = NULL;
- }
-
- g_free (priv);
- cbfile->priv = NULL;
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-
-
-/* Looks up a component by its UID on the backend's component hash table */
-static CalComponent *
-lookup_component (CalBackendFile *cbfile, const char *uid)
-{
- CalBackendFilePrivate *priv;
- CalComponent *comp;
-
- priv = cbfile->priv;
-
- comp = g_hash_table_lookup (priv->comp_uid_hash, uid);
-
- return comp;
-}
-
-
-
-/* Calendar backend methods */
-
-/* Get_uri handler for the file backend */
-static GnomeVFSURI *
-cal_backend_file_get_uri (CalBackend *backend)
-{
- CalBackendFile *cbfile;
- CalBackendFilePrivate *priv;
-
- cbfile = CAL_BACKEND_FILE (backend);
- priv = cbfile->priv;
-
- g_return_val_if_fail (priv->icalcomp != NULL, 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;
- CalBackendFile *cbfile;
- CalBackendFilePrivate *priv;
- GList *l;
-
- cal = CAL (object);
-
- cbfile = CAL_BACKEND_FILE (data);
- priv = cbfile->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 (cbfile));
-}
-
-/* Add_cal handler for the file backend */
-static void
-cal_backend_file_add_cal (CalBackend *backend, Cal *cal)
-{
- CalBackendFile *cbfile;
- CalBackendFilePrivate *priv;
-
- cbfile = CAL_BACKEND_FILE (backend);
- priv = cbfile->priv;
-
- g_return_if_fail (priv->icalcomp != NULL);
- 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);
-}
-
-/* Idle handler; we save the calendar since it is dirty */
-static gboolean
-save_idle (gpointer data)
-{
- CalBackendFile *cbfile;
- CalBackendFilePrivate *priv;
-
- cbfile = CAL_BACKEND_FILE (data);
- priv = cbfile->priv;
-
- g_assert (priv->icalcomp != NULL);
-
- save (cbfile);
-
- priv->idle_id = 0;
- return FALSE;
-}
-
-/* Marks the file backend as dirty and queues a save operation */
-static void
-mark_dirty (CalBackendFile *cbfile)
-{
- CalBackendFilePrivate *priv;
-
- priv = cbfile->priv;
-
- if (priv->idle_id != 0)
- return;
-
- priv->idle_id = g_idle_add (save_idle, cbfile);
-}
-
-/* Checks if the specified component has a duplicated UID and if so changes it */
-static void
-check_dup_uid (CalBackendFile *cbfile, CalComponent *comp)
-{
- CalBackendFilePrivate *priv;
- CalComponent *old_comp;
- const char *uid;
- char *new_uid;
-
- priv = cbfile->priv;
-
- cal_component_get_uid (comp, &uid);
-
- old_comp = g_hash_table_lookup (priv->comp_uid_hash, uid);
- if (!old_comp)
- return; /* Everything is fine */
-
- g_message ("check_dup_uid(): Got object with duplicated UID `%s', changing it...", uid);
-
- new_uid = cal_component_gen_uid ();
- cal_component_set_uid (comp, new_uid);
- g_free (new_uid);
-
- /* FIXME: I think we need to reset the SEQUENCE property and reset the
- * CREATED/DTSTAMP/LAST-MODIFIED.
- */
-
- mark_dirty (cbfile);
-}
-
-/* Tries to add an icalcomponent to the file backend. We only store the objects
- * of the types we support; all others just remain in the toplevel component so
- * that we don't lose them.
- */
-static void
-add_component (CalBackendFile *cbfile, CalComponent *comp, gboolean add_to_toplevel)
-{
- CalBackendFilePrivate *priv;
- GList **list;
- const char *uid;
-
- priv = cbfile->priv;
-
- switch (cal_component_get_vtype (comp)) {
- case CAL_COMPONENT_EVENT:
- list = &priv->events;
- break;
-
- case CAL_COMPONENT_TODO:
- list = &priv->todos;
- break;
-
- case CAL_COMPONENT_JOURNAL:
- list = &priv->journals;
- break;
-
- default:
- g_assert_not_reached ();
- return;
- }
-
- /* Ensure that the UID is unique; some broken implementations spit
- * components with duplicated UIDs.
- */
- check_dup_uid (cbfile, comp);
- cal_component_get_uid (comp, &uid);
- g_hash_table_insert (priv->comp_uid_hash, (char *)uid, comp);
-
- *list = g_list_prepend (*list, comp);
-
- /* Put the object in the toplevel component if required */
-
- if (add_to_toplevel) {
- icalcomponent *icalcomp;
-
- icalcomp = cal_component_get_icalcomponent (comp);
- g_assert (icalcomp != NULL);
-
- icalcomponent_add_component (priv->icalcomp, icalcomp);
- }
-}
-
-/* Removes a component from the backend's hash and lists. Does not perform
- * notification on the clients. Also removes the component from the toplevel
- * icalcomponent.
- */
-static void
-remove_component (CalBackendFile *cbfile, CalComponent *comp)
-{
- CalBackendFilePrivate *priv;
- icalcomponent *icalcomp;
- const char *uid;
- GList **list, *l;
-
- priv = cbfile->priv;
-
- /* Remove the icalcomp from the toplevel */
-
- icalcomp = cal_component_get_icalcomponent (comp);
- g_assert (icalcomp != NULL);
-
- icalcomponent_remove_component (priv->icalcomp, icalcomp);
-
- /* Remove it from our mapping */
-
- cal_component_get_uid (comp, &uid);
- g_hash_table_remove (priv->comp_uid_hash, uid);
-
- switch (cal_component_get_vtype (comp)) {
- case CAL_COMPONENT_EVENT:
- list = &priv->events;
- break;
-
- case CAL_COMPONENT_TODO:
- list = &priv->todos;
- break;
-
- case CAL_COMPONENT_JOURNAL:
- list = &priv->journals;
- break;
-
- default:
- /* Make the compiler shut up. */
- list = NULL;
- g_assert_not_reached ();
- }
-
- l = g_list_find (*list, comp);
- g_assert (l != NULL);
-
- *list = g_list_remove_link (*list, l);
- g_list_free_1 (l);
-
- gtk_object_unref (GTK_OBJECT (comp));
-}
-
-/* Scans the toplevel VCALENDAR component and stores the objects it finds */
-static void
-scan_vcalendar (CalBackendFile *cbfile)
-{
- CalBackendFilePrivate *priv;
- icalcompiter iter;
-
- priv = cbfile->priv;
- g_assert (priv->icalcomp != NULL);
- g_assert (priv->comp_uid_hash != NULL);
-
- for (iter = icalcomponent_begin_component (priv->icalcomp, ICAL_ANY_COMPONENT);
- icalcompiter_deref (&iter) != NULL;
- icalcompiter_next (&iter)) {
- icalcomponent *icalcomp;
- icalcomponent_kind kind;
- CalComponent *comp;
-
- icalcomp = icalcompiter_deref (&iter);
-
- kind = icalcomponent_isa (icalcomp);
-
- if (!(kind == ICAL_VEVENT_COMPONENT
- || kind == ICAL_VTODO_COMPONENT
- || kind == ICAL_VJOURNAL_COMPONENT))
- continue;
-
- comp = cal_component_new ();
-
- if (!cal_component_set_icalcomponent (comp, icalcomp))
- continue;
-
- add_component (cbfile, comp, FALSE);
- }
-}
-
-/* Callback used from icalparser_parse() */
-static char *
-get_line_fn (char *s, size_t size, void *data)
-{
- FILE *file;
-
- file = data;
- return fgets (s, size, file);
-}
-
-/* Parses an open iCalendar file and returns a toplevel component with the contents */
-static icalcomponent *
-parse_file (FILE *file)
-{
- icalparser *parser;
- icalcomponent *icalcomp;
-
- parser = icalparser_new ();
- icalparser_set_gen_data (parser, file);
-
- icalcomp = icalparser_parse (parser, get_line_fn);
- icalparser_free (parser);
-
- return icalcomp;
-}
-
-/* Parses an open iCalendar file and loads it into the backend */
-static CalBackendOpenStatus
-open_cal (CalBackendFile *cbfile, GnomeVFSURI *uri, FILE *file)
-{
- CalBackendFilePrivate *priv;
- icalcomponent *icalcomp;
-
- priv = cbfile->priv;
-
- icalcomp = parse_file (file);
-
- if (fclose (file) != 0) {
- if (icalcomp)
- icalcomponent_free (icalcomp);
-
- return CAL_BACKEND_OPEN_ERROR;
- }
-
- if (!icalcomp)
- return CAL_BACKEND_OPEN_ERROR;
-
- /* FIXME: should we try to demangle XROOT components and
- * individual components as well?
- */
-
- if (icalcomponent_isa (icalcomp) != ICAL_VCALENDAR_COMPONENT) {
- icalcomponent_free (icalcomp);
- return CAL_BACKEND_OPEN_ERROR;
- }
-
- priv->icalcomp = icalcomp;
-
- priv->comp_uid_hash = g_hash_table_new (g_str_hash, g_str_equal);
- scan_vcalendar (cbfile);
-
- gnome_vfs_uri_ref (uri);
- priv->uri = uri;
-
- return CAL_BACKEND_OPEN_SUCCESS;
-}
-
-static CalBackendOpenStatus
-create_cal (CalBackendFile *cbfile, GnomeVFSURI *uri)
-{
- CalBackendFilePrivate *priv;
- icalproperty *prop;
-
- priv = cbfile->priv;
-
- /* Create the new calendar information */
-
- priv->icalcomp = icalcomponent_new (ICAL_VCALENDAR_COMPONENT);
-
- /* RFC 2445, section 4.7.1 */
- prop = icalproperty_new_calscale ("GREGORIAN");
- icalcomponent_add_property (priv->icalcomp, prop);
-
- /* RFC 2445, section 4.7.3 */
- prop = icalproperty_new_prodid ("-//Ximian//NONSGML Evolution Calendar//EN");
- icalcomponent_add_property (priv->icalcomp, prop);
-
- /* RFC 2445, section 4.7.4. This is the iCalendar spec version, *NOT*
- * the product version! Do not change this!
- */
- prop = icalproperty_new_version ("2.0");
- icalcomponent_add_property (priv->icalcomp, prop);
-
- /* Create our internal data */
-
- priv->comp_uid_hash = g_hash_table_new (g_str_hash, g_str_equal);
-
- gnome_vfs_uri_ref (uri);
- priv->uri = uri;
-
- mark_dirty (cbfile);
-
- return CAL_BACKEND_OPEN_SUCCESS;
-}
-
-/* Open handler for the file backend */
-static CalBackendOpenStatus
-cal_backend_file_open (CalBackend *backend, GnomeVFSURI *uri, gboolean only_if_exists)
-{
- CalBackendFile *cbfile;
- CalBackendFilePrivate *priv;
- char *str_uri;
- FILE *file;
-
- cbfile = CAL_BACKEND_FILE (backend);
- priv = cbfile->priv;
-
- g_return_val_if_fail (priv->icalcomp == NULL, CAL_BACKEND_OPEN_ERROR);
- g_return_val_if_fail (uri != NULL, CAL_BACKEND_OPEN_ERROR);
-
- g_assert (priv->uri == NULL);
- g_assert (priv->comp_uid_hash == NULL);
-
- if (!gnome_vfs_uri_is_local (uri))
- return CAL_BACKEND_OPEN_ERROR;
-
- 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));
-
- /* Load! */
- file = fopen (str_uri, "r");
- g_free (str_uri);
-
- if (file)
- return open_cal (cbfile, uri, file);
- else {
- if (only_if_exists)
- return CAL_BACKEND_OPEN_NOT_FOUND;
-
- return create_cal (cbfile, uri);
- }
-}
-
-/* is_loaded handler for the file backend */
-static gboolean
-cal_backend_file_is_loaded (CalBackend *backend)
-{
- CalBackendFile *cbfile;
- CalBackendFilePrivate *priv;
-
- cbfile = CAL_BACKEND_FILE (backend);
- priv = cbfile->priv;
-
- return (priv->icalcomp != NULL);
-}
-
-/* Get_n_objects handler for the file backend */
-static int
-cal_backend_file_get_n_objects (CalBackend *backend, CalObjType type)
-{
- CalBackendFile *cbfile;
- CalBackendFilePrivate *priv;
- int n;
-
- cbfile = CAL_BACKEND_FILE (backend);
- priv = cbfile->priv;
-
- g_return_val_if_fail (priv->icalcomp != NULL, -1);
-
- n = 0;
-
- if (type & CALOBJ_TYPE_EVENT)
- n += g_list_length (priv->events);
-
- if (type & CALOBJ_TYPE_TODO)
- n += g_list_length (priv->todos);
-
- if (type & CALOBJ_TYPE_JOURNAL)
- n += g_list_length (priv->journals);
-
- return n;
-}
-
-/* Get_object handler for the file backend */
-static char *
-cal_backend_file_get_object (CalBackend *backend, const char *uid)
-{
- CalBackendFile *cbfile;
- CalBackendFilePrivate *priv;
- CalComponent *comp;
-
- cbfile = CAL_BACKEND_FILE (backend);
- priv = cbfile->priv;
-
- g_return_val_if_fail (uid != NULL, NULL);
-
- g_return_val_if_fail (priv->icalcomp != NULL, NULL);
- g_assert (priv->comp_uid_hash != NULL);
-
- comp = lookup_component (cbfile, uid);
-
- if (!comp)
- return NULL;
-
- return cal_component_get_as_string (comp);
-}
-
-static CalObjType
-cal_backend_file_get_type_by_uid (CalBackend *backend, const char *uid)
-{
- CalBackendFile *cbfile;
- CalBackendFilePrivate *priv;
- CalComponent *comp;
- CalComponentVType type;
-
- cbfile = CAL_BACKEND_FILE (backend);
- priv = cbfile->priv;
-
- comp = lookup_component (cbfile, uid);
- if (!comp)
- return CAL_COMPONENT_NO_TYPE;
-
- type = cal_component_get_vtype (comp);
- switch (type) {
- case CAL_COMPONENT_EVENT:
- return CALOBJ_TYPE_EVENT;
- case CAL_COMPONENT_TODO:
- return CALOBJ_TYPE_TODO;
- case CAL_COMPONENT_JOURNAL:
- return CALOBJ_TYPE_JOURNAL;
- default:
- return CAL_COMPONENT_NO_TYPE;
- }
-}
-
-/* Builds a list of UIDs from a list of CalComponent objects */
-static void
-build_uids_list (GList **list, GList *components)
-{
- GList *l;
-
- for (l = components; l; l = l->next) {
- CalComponent *comp;
- const char *uid;
-
- comp = CAL_COMPONENT (l->data);
- cal_component_get_uid (comp, &uid);
- *list = g_list_prepend (*list, g_strdup (uid));
- }
-}
-
-/* Get_uids handler for the file backend */
-static GList *
-cal_backend_file_get_uids (CalBackend *backend, CalObjType type)
-{
- CalBackendFile *cbfile;
- CalBackendFilePrivate *priv;
- GList *list;
-
- cbfile = CAL_BACKEND_FILE (backend);
- priv = cbfile->priv;
-
- g_return_val_if_fail (priv->icalcomp != NULL, NULL);
-
- list = NULL;
-
- if (type & CALOBJ_TYPE_EVENT)
- build_uids_list (&list, priv->events);
-
- if (type & CALOBJ_TYPE_TODO)
- build_uids_list (&list, priv->todos);
-
- if (type & CALOBJ_TYPE_JOURNAL)
- build_uids_list (&list, priv->journals);
-
- return list;
-}
-
-/* Callback used from cal_recur_generate_instances(); adds the component's UID
- * to our hash table.
- */
-static gboolean
-add_instance (CalComponent *comp, time_t start, time_t end, gpointer data)
-{
- GHashTable *uid_hash;
- const char *uid;
- const char *old_uid;
-
- uid_hash = data;
-
- /* We only care that the component's UID is listed in the hash table;
- * that's why we only allow generation of one instance (i.e. return
- * FALSE every time).
- */
-
- cal_component_get_uid (comp, &uid);
-
- old_uid = g_hash_table_lookup (uid_hash, uid);
- if (old_uid)
- return FALSE;
-
- g_hash_table_insert (uid_hash, (char *) uid, NULL);
- return FALSE;
-}
-
-/* Populates a hash table with the UIDs of the components that occur or recur
- * within a specific time range.
- */
-static void
-get_instances_in_range (GHashTable *uid_hash, GList *components, time_t start, time_t end)
-{
- GList *l;
-
- for (l = components; l; l = l->next) {
- CalComponent *comp;
-
- comp = CAL_COMPONENT (l->data);
- cal_recur_generate_instances (comp, start, end, add_instance, uid_hash);
- }
-}
-
-/* Used from g_hash_table_foreach(), adds a UID from the hash table to our list */
-static void
-add_uid_to_list (gpointer key, gpointer value, gpointer data)
-{
- GList **list;
- const char *uid;
- char *uid_copy;
-
- list = data;
-
- uid = key;
- uid_copy = g_strdup (uid);
-
- *list = g_list_prepend (*list, uid_copy);
-}
-
-/* Get_objects_in_range handler for the file backend */
-static GList *
-cal_backend_file_get_objects_in_range (CalBackend *backend, CalObjType type,
- time_t start, time_t end)
-{
- CalBackendFile *cbfile;
- CalBackendFilePrivate *priv;
- GList *event_list;
- GHashTable *uid_hash;
-
- cbfile = CAL_BACKEND_FILE (backend);
- priv = cbfile->priv;
-
- g_return_val_if_fail (priv->icalcomp != NULL, NULL);
-
- g_return_val_if_fail (start != -1 && end != -1, NULL);
- g_return_val_if_fail (start <= end, NULL);
-
- uid_hash = g_hash_table_new (g_str_hash, g_str_equal);
-
- if (type & CALOBJ_TYPE_EVENT)
- get_instances_in_range (uid_hash, priv->events, start, end);
-
- if (type & CALOBJ_TYPE_TODO)
- get_instances_in_range (uid_hash, priv->todos, start, end);
-
- if (type & CALOBJ_TYPE_JOURNAL)
- get_instances_in_range (uid_hash, priv->journals, start, end);
-
- event_list = NULL;
- g_hash_table_foreach (uid_hash, add_uid_to_list, &event_list);
- g_hash_table_destroy (uid_hash);
-
- return event_list;
-}
-
-
-typedef struct
-{
- CalBackend *backend;
- GList *changes;
- GList *change_ids;
-} CalBackendFileComputeChangesData;
-
-static void
-cal_backend_file_compute_changes_foreach_key (const char *key, gpointer data)
-{
- CalBackendFileComputeChangesData *be_data = data;
- char *calobj = cal_backend_get_object (be_data->backend, key);
-
- if (calobj == NULL) {
- CalComponent *comp;
- GNOME_Evolution_Calendar_CalObjChange *coc;
-
- comp = cal_component_new ();
- cal_component_set_new_vtype (comp, CAL_COMPONENT_TODO);
- cal_component_set_uid (comp, key);
-
- coc = GNOME_Evolution_Calendar_CalObjChange__alloc ();
- coc->calobj = CORBA_string_dup (cal_component_get_as_string (comp));
- coc->type = GNOME_Evolution_Calendar_DELETED;
- be_data->changes = g_list_prepend (be_data->changes, coc);
- be_data->change_ids = g_list_prepend (be_data->change_ids, (gpointer) key);
- }
-}
-
-static GNOME_Evolution_Calendar_CalObjChangeSeq *
-cal_backend_file_compute_changes (CalBackend *backend, CalObjType type, const char *change_id)
-{
- char *filename;
- EDbHash *ehash;
- CalBackendFileComputeChangesData be_data;
- GNOME_Evolution_Calendar_CalObjChangeSeq *seq;
- GList *uids, *changes = NULL, *change_ids = NULL;
- GList *i, *j;
- int n;
-
- /* Find the changed ids - FIX ME, path should not be hard coded */
- if (type == GNOME_Evolution_Calendar_TYPE_TODO)
- filename = g_strdup_printf ("%s/evolution/local/Tasks/%s.db", g_get_home_dir (), change_id);
- else
- filename = g_strdup_printf ("%s/evolution/local/Calendar/%s.db", g_get_home_dir (), change_id);
- ehash = e_dbhash_new (filename);
- g_free (filename);
-
- uids = cal_backend_get_uids (backend, type);
-
- /* Calculate adds and modifies */
- for (i = uids; i != NULL; i = i->next) {
- GNOME_Evolution_Calendar_CalObjChange *coc;
- char *uid = i->data;
- char *calobj = cal_backend_get_object (backend, uid);
-
- g_assert (calobj != NULL);
-
- /* check what type of change has occurred, if any */
- switch (e_dbhash_compare (ehash, uid, calobj)) {
- case E_DBHASH_STATUS_SAME:
- break;
- case E_DBHASH_STATUS_NOT_FOUND:
- coc = GNOME_Evolution_Calendar_CalObjChange__alloc ();
- coc->calobj = CORBA_string_dup (calobj);
- coc->type = GNOME_Evolution_Calendar_ADDED;
- changes = g_list_prepend (changes, coc);
- change_ids = g_list_prepend (change_ids, uid);
- break;
- case E_DBHASH_STATUS_DIFFERENT:
- coc = GNOME_Evolution_Calendar_CalObjChange__alloc ();
- coc->calobj = CORBA_string_dup (calobj);
- coc->type = GNOME_Evolution_Calendar_MODIFIED;
- changes = g_list_prepend (changes, coc);
- change_ids = g_list_prepend (change_ids, uid);
- break;
- }
- }
-
- /* Calculate deletions */
- be_data.backend = backend;
- be_data.changes = changes;
- be_data.change_ids = change_ids;
- e_dbhash_foreach_key (ehash, (EDbHashFunc)cal_backend_file_compute_changes_foreach_key, &be_data);
- changes = be_data.changes;
- change_ids = be_data.change_ids;
-
- /* Build the sequence and update the hash */
- n = g_list_length (changes);
-
- seq = GNOME_Evolution_Calendar_CalObjChangeSeq__alloc ();
- seq->_length = n;
- seq->_buffer = CORBA_sequence_GNOME_Evolution_Calendar_CalObjChange_allocbuf (n);
- CORBA_sequence_set_release (seq, TRUE);
-
- for (i = changes, j = change_ids, n = 0; i != NULL; i = i->next, j = j->next, n++) {
- GNOME_Evolution_Calendar_CalObjChange *coc = i->data;
- GNOME_Evolution_Calendar_CalObjChange *seq_coc;
- char *uid = j->data;
-
- /* sequence building */
- seq_coc = &seq->_buffer[n];
- seq_coc->calobj = CORBA_string_dup (coc->calobj);
- seq_coc->type = coc->type;
-
- /* hash updating */
- if (coc->type == GNOME_Evolution_Calendar_ADDED
- || coc->type == GNOME_Evolution_Calendar_MODIFIED) {
- e_dbhash_add (ehash, uid, coc->calobj);
- } else {
- e_dbhash_remove (ehash, uid);
- }
-
- CORBA_free (coc);
- }
- e_dbhash_write (ehash);
- e_dbhash_destroy (ehash);
-
- cal_obj_uid_list_free (uids);
- g_list_free (change_ids);
- g_list_free (changes);
-
- return seq;
-}
-
-/* Get_changes handler for the file backend */
-static GNOME_Evolution_Calendar_CalObjChangeSeq *
-cal_backend_file_get_changes (CalBackend *backend, CalObjType type, const char *change_id)
-{
- g_return_val_if_fail (backend != NULL, NULL);
- g_return_val_if_fail (IS_CAL_BACKEND (backend), NULL);
-
- return cal_backend_file_compute_changes (backend, type, change_id);
-}
-
-/* Computes the range of time in which recurrences should be generated for a
- * component in order to compute alarm trigger times.
- */
-static void
-compute_alarm_range (CalComponent *comp, GList *alarm_uids, time_t start, time_t end,
- time_t *alarm_start, time_t *alarm_end)
-{
- GList *l;
-
- *alarm_start = start;
- *alarm_end = end;
-
- for (l = alarm_uids; l; l = l->next) {
- const char *auid;
- CalComponentAlarm *alarm;
- CalAlarmTrigger trigger;
- struct icaldurationtype *dur;
- time_t dur_time;
-
- auid = l->data;
- alarm = cal_component_get_alarm (comp, auid);
- g_assert (alarm != NULL);
-
- cal_component_alarm_get_trigger (alarm, &trigger);
- cal_component_alarm_free (alarm);
-
- switch (trigger.type) {
- case CAL_ALARM_TRIGGER_NONE:
- case CAL_ALARM_TRIGGER_ABSOLUTE:
- continue;
-
- case CAL_ALARM_TRIGGER_RELATIVE_START:
- case CAL_ALARM_TRIGGER_RELATIVE_END:
- dur = &trigger.u.rel_duration;
- dur_time = icaldurationtype_as_int (*dur);
-
- if (dur->is_neg)
- *alarm_end = MAX (*alarm_end, end + dur_time);
- else
- *alarm_start = MIN (*alarm_start, start - dur_time);
-
- break;
-
- default:
- g_assert_not_reached ();
- }
- }
-
- g_assert (*alarm_start <= *alarm_end);
-}
-
-/* Closure data to generate alarm occurrences */
-struct alarm_occurrence_data {
- /* These are the info we have */
- GList *alarm_uids;
- time_t start;
- time_t end;
-
- /* This is what we compute */
- GSList *triggers;
- int n_triggers;
-};
-
-/* Callback used from cal_recur_generate_instances(); generates triggers for all
- * of a component's RELATIVE alarms.
- */
-static gboolean
-add_alarm_occurrences_cb (CalComponent *comp, time_t start, time_t end, gpointer data)
-{
- struct alarm_occurrence_data *aod;
- GList *l;
-
- aod = data;
-
- for (l = aod->alarm_uids; l; l = l->next) {
- const char *auid;
- CalComponentAlarm *alarm;
- CalAlarmTrigger trigger;
- struct icaldurationtype *dur;
- time_t dur_time;
- time_t occur_time, trigger_time;
- CalAlarmInstance *instance;
-
- auid = l->data;
- alarm = cal_component_get_alarm (comp, auid);
- g_assert (alarm != NULL);
-
- cal_component_alarm_get_trigger (alarm, &trigger);
- cal_component_alarm_free (alarm);
-
- if (trigger.type != CAL_ALARM_TRIGGER_RELATIVE_START
- && trigger.type != CAL_ALARM_TRIGGER_RELATIVE_END)
- continue;
-
- dur = &trigger.u.rel_duration;
- dur_time = icaldurationtype_as_int (*dur);
-
- if (trigger.type == CAL_ALARM_TRIGGER_RELATIVE_START)
- occur_time = start;
- else
- occur_time = end;
-
- if (dur->is_neg)
- trigger_time = occur_time - dur_time;
- else
- trigger_time = occur_time + dur_time;
-
- if (trigger_time < aod->start || trigger_time >= aod->end)
- continue;
-
- instance = g_new (CalAlarmInstance, 1);
- instance->auid = auid;
- instance->trigger = trigger_time;
- instance->occur = occur_time;
-
- aod->triggers = g_slist_prepend (aod->triggers, instance);
- aod->n_triggers++;
- }
-
- return TRUE;
-}
-
-/* Generates the absolute triggers for a component */
-static void
-generate_absolute_triggers (CalComponent *comp, struct alarm_occurrence_data *aod)
-{
- GList *l;
-
- for (l = aod->alarm_uids; l; l = l->next) {
- const char *auid;
- CalComponentAlarm *alarm;
- CalAlarmTrigger trigger;
- time_t abs_time;
- CalAlarmInstance *instance;
-
- auid = l->data;
- alarm = cal_component_get_alarm (comp, auid);
- g_assert (alarm != NULL);
-
- cal_component_alarm_get_trigger (alarm, &trigger);
- cal_component_alarm_free (alarm);
-
- if (trigger.type != CAL_ALARM_TRIGGER_ABSOLUTE)
- continue;
-
- abs_time = icaltime_as_timet (trigger.u.abs_time);
-
- if (abs_time < aod->start || abs_time >= aod->end)
- continue;
-
- instance = g_new (CalAlarmInstance, 1);
- instance->auid = auid;
- instance->trigger = abs_time;
- instance->occur = abs_time; /* No particular occurrence, so just use the same time */
-
- aod->triggers = g_slist_prepend (aod->triggers, instance);
- aod->n_triggers++;
- }
-}
-
-/* Compares two alarm instances; called from g_slist_sort() */
-static gint
-compare_alarm_instance (gconstpointer a, gconstpointer b)
-{
- const CalAlarmInstance *aia, *aib;
-
- aia = a;
- aib = b;
-
- if (aia->trigger < aib->trigger)
- return -1;
- else if (aia->trigger > aib->trigger)
- return 1;
- else
- return 0;
-}
-
-/* Generates alarm instances for a calendar component. Returns the instances
- * structure, or NULL if no alarm instances occurred in the specified time
- * range.
- */
-static CalComponentAlarms *
-generate_alarms_for_comp (CalComponent *comp, time_t start, time_t end)
-{
- GList *alarm_uids;
- time_t alarm_start, alarm_end;
- struct alarm_occurrence_data aod;
- CalComponentAlarms *alarms;
-
- if (!cal_component_has_alarms (comp))
- return NULL;
-
- alarm_uids = cal_component_get_alarm_uids (comp);
- compute_alarm_range (comp, alarm_uids, start, end, &alarm_start, &alarm_end);
-
- aod.alarm_uids = alarm_uids;
- aod.start = start;
- aod.end = end;
- aod.triggers = NULL;
- aod.n_triggers = 0;
- cal_recur_generate_instances (comp, alarm_start, alarm_end, add_alarm_occurrences_cb, &aod);
-
- /* We add the ABSOLUTE triggers separately */
- generate_absolute_triggers (comp, &aod);
-
- if (aod.n_triggers == 0)
- return NULL;
-
- /* Create the component alarm instances structure */
-
- alarms = g_new (CalComponentAlarms, 1);
- alarms->comp = comp;
- gtk_object_ref (GTK_OBJECT (alarms->comp));
- alarms->alarms = g_slist_sort (aod.triggers, compare_alarm_instance);
-
- return alarms;
-}
-
-/* Iterates through all the components in the comps list and generates alarm
- * instances for them; putting them in the comp_alarms list. Returns the number
- * of elements it added to that list.
- */
-static int
-generate_alarms_for_list (GList *comps, time_t start, time_t end, GSList **comp_alarms)
-{
- GList *l;
- int n;
-
- n = 0;
-
- for (l = comps; l; l = l->next) {
- CalComponent *comp;
- CalComponentAlarms *alarms;
-
- comp = CAL_COMPONENT (l->data);
- alarms = generate_alarms_for_comp (comp, start, end);
-
- if (alarms) {
- *comp_alarms = g_slist_prepend (*comp_alarms, alarms);
- n++;
- }
- }
-
- return n;
-}
-
-/* Fills a CORBA sequence of alarm instances */
-static void
-fill_alarm_instances_seq (GNOME_Evolution_Calendar_CalAlarmInstanceSeq *seq, GSList *alarms)
-{
- int n_alarms;
- GSList *l;
- int i;
-
- n_alarms = g_slist_length (alarms);
-
- CORBA_sequence_set_release (seq, TRUE);
- seq->_length = n_alarms;
- seq->_buffer = CORBA_sequence_GNOME_Evolution_Calendar_CalAlarmInstance_allocbuf (n_alarms);
-
- for (l = alarms, i = 0; l; l = l->next, i++) {
- CalAlarmInstance *instance;
- GNOME_Evolution_Calendar_CalAlarmInstance *corba_instance;
-
- instance = l->data;
- corba_instance = seq->_buffer + i;
-
- corba_instance->auid = CORBA_string_dup (instance->auid);
- corba_instance->trigger = (long) instance->trigger;
- corba_instance->occur = (long) instance->occur;
- }
-}
-
-/* Get_alarms_in_range handler for the file backend */
-static GNOME_Evolution_Calendar_CalComponentAlarmsSeq *
-cal_backend_file_get_alarms_in_range (CalBackend *backend, time_t start, time_t end)
-{
- CalBackendFile *cbfile;
- CalBackendFilePrivate *priv;
- int n_comp_alarms;
- GSList *comp_alarms;
- GSList *l;
- int i;
- GNOME_Evolution_Calendar_CalComponentAlarmsSeq *seq;
-
- cbfile = CAL_BACKEND_FILE (backend);
- priv = cbfile->priv;
-
- g_return_val_if_fail (priv->icalcomp != NULL, NULL);
-
- g_return_val_if_fail (start != -1 && end != -1, NULL);
- g_return_val_if_fail (start <= end, NULL);
-
- /* Per RFC 2445, only VEVENTs and VTODOs can have alarms */
-
- n_comp_alarms = 0;
- comp_alarms = NULL;
-
- n_comp_alarms += generate_alarms_for_list (priv->events, start, end, &comp_alarms);
- n_comp_alarms += generate_alarms_for_list (priv->todos, start, end, &comp_alarms);
-
- seq = GNOME_Evolution_Calendar_CalComponentAlarmsSeq__alloc ();
- CORBA_sequence_set_release (seq, TRUE);
- seq->_length = n_comp_alarms;
- seq->_buffer = CORBA_sequence_GNOME_Evolution_Calendar_CalComponentAlarms_allocbuf (
- n_comp_alarms);
-
- for (l = comp_alarms, i = 0; l; l = l->next, i++) {
- CalComponentAlarms *alarms;
- char *comp_str;
-
- alarms = l->data;
-
- comp_str = cal_component_get_as_string (alarms->comp);
- seq->_buffer[i].calobj = CORBA_string_dup (comp_str);
- g_free (comp_str);
-
- fill_alarm_instances_seq (&seq->_buffer[i].alarms, alarms->alarms);
-
- cal_component_alarms_free (alarms);
- }
-
- g_slist_free (comp_alarms);
-
- return seq;
-}
-
-/* Get_alarms_for_object handler for the file backend */
-static GNOME_Evolution_Calendar_CalComponentAlarms *
-cal_backend_file_get_alarms_for_object (CalBackend *backend, const char *uid,
- time_t start, time_t end, gboolean *object_found)
-{
- CalBackendFile *cbfile;
- CalBackendFilePrivate *priv;
- CalComponent *comp;
- char *comp_str;
- GNOME_Evolution_Calendar_CalComponentAlarms *corba_alarms;
- CalComponentAlarms *alarms;
-
- cbfile = CAL_BACKEND_FILE (backend);
- priv = cbfile->priv;
-
- g_return_val_if_fail (priv->icalcomp != NULL, NULL);
-
- g_return_val_if_fail (uid != NULL, NULL);
- g_return_val_if_fail (start != -1 && end != -1, NULL);
- g_return_val_if_fail (start <= end, NULL);
- g_return_val_if_fail (object_found != NULL, NULL);
-
- comp = lookup_component (cbfile, uid);
- if (!comp) {
- *object_found = FALSE;
- return NULL;
- }
-
- *object_found = TRUE;
-
- comp_str = cal_component_get_as_string (comp);
- corba_alarms = GNOME_Evolution_Calendar_CalComponentAlarms__alloc ();
-
- corba_alarms->calobj = CORBA_string_dup (comp_str);
- g_free (comp_str);
-
- alarms = generate_alarms_for_comp (comp, start, end);
- if (alarms) {
- fill_alarm_instances_seq (&corba_alarms->alarms, alarms->alarms);
- cal_component_alarms_free (alarms);
- } else
- fill_alarm_instances_seq (&corba_alarms->alarms, NULL);
-
- return corba_alarms;
-}
-
-/* Notifies a backend's clients that an object was updated */
-static void
-notify_update (CalBackendFile *cbfile, const char *uid)
-{
- CalBackendFilePrivate *priv;
- GList *l;
-
- priv = cbfile->priv;
-
- cal_backend_obj_updated (CAL_BACKEND (cbfile), uid);
-
- 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 (CalBackendFile *cbfile, const char *uid)
-{
- CalBackendFilePrivate *priv;
- GList *l;
-
- priv = cbfile->priv;
-
- cal_backend_obj_removed (CAL_BACKEND (cbfile), uid);
-
- for (l = priv->clients; l; l = l->next) {
- Cal *cal;
-
- cal = CAL (l->data);
- cal_notify_remove (cal, uid);
- }
-}
-
-/* Update_object handler for the file backend */
-static gboolean
-cal_backend_file_update_object (CalBackend *backend, const char *uid, const char *calobj)
-{
- CalBackendFile *cbfile;
- CalBackendFilePrivate *priv;
- icalcomponent *icalcomp;
- icalcomponent_kind kind;
- CalComponent *old_comp;
- CalComponent *comp;
- const char *comp_uid;
-
- cbfile = CAL_BACKEND_FILE (backend);
- priv = cbfile->priv;
-
- g_return_val_if_fail (priv->icalcomp != NULL, FALSE);
-
- g_return_val_if_fail (uid != NULL, FALSE);
- g_return_val_if_fail (calobj != NULL, FALSE);
-
- /* Pull the component from the string and ensure that it is sane */
-
- icalcomp = icalparser_parse_string ((char *) calobj);
-
- if (!icalcomp)
- return FALSE;
-
- kind = icalcomponent_isa (icalcomp);
-
- if (!(kind == ICAL_VEVENT_COMPONENT
- || kind == ICAL_VTODO_COMPONENT
- || kind == ICAL_VJOURNAL_COMPONENT)) {
- /* We don't support this type of component */
- icalcomponent_free (icalcomp);
- return FALSE;
- }
-
- comp = cal_component_new ();
- if (!cal_component_set_icalcomponent (comp, icalcomp)) {
- gtk_object_unref (GTK_OBJECT (comp));
- icalcomponent_free (icalcomp);
- return FALSE;
- }
-
- /* Check the UID for sanity's sake */
-
- cal_component_get_uid (comp, &comp_uid);
-
- if (strcmp (uid, comp_uid) != 0) {
- gtk_object_unref (GTK_OBJECT (comp));
- return FALSE;
- }
-
- /* Update the component */
-
- old_comp = lookup_component (cbfile, uid);
-
- if (old_comp)
- remove_component (cbfile, old_comp);
-
- add_component (cbfile, comp, TRUE);
-
- mark_dirty (cbfile);
-
- /* FIXME: do the notification asynchronously */
- notify_update (cbfile, comp_uid);
-
- return TRUE;
-}
-
-/* Remove_object handler for the file backend */
-static gboolean
-cal_backend_file_remove_object (CalBackend *backend, const char *uid)
-{
- CalBackendFile *cbfile;
- CalBackendFilePrivate *priv;
- CalComponent *comp;
-
- cbfile = CAL_BACKEND_FILE (backend);
- priv = cbfile->priv;
-
- g_return_val_if_fail (priv->icalcomp != NULL, FALSE);
-
- g_return_val_if_fail (uid != NULL, FALSE);
-
- comp = lookup_component (cbfile, uid);
- if (!comp)
- return FALSE;
-
- remove_component (cbfile, comp);
- mark_dirty (cbfile);
-
- /* FIXME: do the notification asynchronously */
- notify_remove (cbfile, uid);
-
- return TRUE;
-}
-
diff --git a/calendar/pcs/cal-backend-file.h b/calendar/pcs/cal-backend-file.h
deleted file mode 100644
index a85c6d20fd..0000000000
--- a/calendar/pcs/cal-backend-file.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* Evolution calendar - iCalendar file backend
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Author: Federico Mena-Quintero <federico@ximian.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 CAL_BACKEND_FILE_H
-#define CAL_BACKEND_FILE_H
-
-#include <libgnome/gnome-defs.h>
-#include "cal-backend.h"
-
-BEGIN_GNOME_DECLS
-
-
-
-#define CAL_BACKEND_FILE_TYPE (cal_backend_file_get_type ())
-#define CAL_BACKEND_FILE(obj) (GTK_CHECK_CAST ((obj), CAL_BACKEND_FILE_TYPE, \
- CalBackendFile))
-#define CAL_BACKEND_FILE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), CAL_BACKEND_FILE_TYPE, \
- CalBackendFileClass))
-#define IS_CAL_BACKEND_FILE(obj) (GTK_CHECK_TYPE ((obj), CAL_BACKEND_FILE_TYPE))
-#define IS_CAL_BACKEND_FILE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), CAL_BACKEND_FILE_TYPE))
-
-typedef struct _CalBackendFile CalBackendFile;
-typedef struct _CalBackendFileClass CalBackendFileClass;
-
-typedef struct _CalBackendFilePrivate CalBackendFilePrivate;
-
-struct _CalBackendFile {
- CalBackend backend;
-
- /* Private data */
- CalBackendFilePrivate *priv;
-};
-
-struct _CalBackendFileClass {
- CalBackendClass parent_class;
-};
-
-GtkType cal_backend_file_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 350e6468e4..0000000000
--- a/calendar/pcs/cal-backend.c
+++ /dev/null
@@ -1,542 +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.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Authors: Federico Mena-Quintero <federico@ximian.com>
- * JP Rosevear <jpr@ximian.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 <gtk/gtkobject.h>
-#include <gtk/gtksignal.h>
-#include <gnome-xml/parser.h>
-#include <gnome-xml/parserInternals.h>
-#include <gnome-xml/xmlmemory.h>
-
-#include "cal-backend.h"
-#include "libversit/vcc.h"
-
-
-
-/* Signal IDs */
-enum {
- LAST_CLIENT_GONE,
- OPENED,
- OBJ_UPDATED,
- OBJ_REMOVED,
- LAST_SIGNAL
-};
-
-static void cal_backend_class_init (CalBackendClass *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;
-
- 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);
- cal_backend_signals[OPENED] =
- gtk_signal_new ("opened",
- GTK_RUN_FIRST,
- object_class->type,
- GTK_SIGNAL_OFFSET (CalBackendClass, opened),
- gtk_marshal_NONE__ENUM,
- GTK_TYPE_NONE, 1,
- GTK_TYPE_ENUM);
- cal_backend_signals[OBJ_UPDATED] =
- gtk_signal_new ("obj_updated",
- GTK_RUN_FIRST,
- object_class->type,
- GTK_SIGNAL_OFFSET (CalBackendClass, obj_updated),
- gtk_marshal_NONE__STRING,
- GTK_TYPE_NONE, 1,
- GTK_TYPE_STRING);
- cal_backend_signals[OBJ_REMOVED] =
- gtk_signal_new ("obj_removed",
- GTK_RUN_FIRST,
- object_class->type,
- GTK_SIGNAL_OFFSET (CalBackendClass, obj_removed),
- gtk_marshal_NONE__STRING,
- GTK_TYPE_NONE, 1,
- GTK_TYPE_STRING);
-
- gtk_object_class_add_signals (object_class, cal_backend_signals, LAST_SIGNAL);
-
- class->last_client_gone = NULL;
- class->opened = NULL;
- class->obj_updated = NULL;
- class->obj_removed = NULL;
-
- class->get_uri = NULL;
- class->add_cal = NULL;
- class->open = NULL;
- class->get_n_objects = NULL;
- class->get_object = NULL;
- class->get_type_by_uid = NULL;
- class->get_uids = NULL;
- class->get_objects_in_range = NULL;
- class->get_changes = NULL;
- class->get_alarms_in_range = NULL;
- class->get_alarms_for_object = NULL;
- class->update_object = NULL;
- class->remove_object = NULL;
-}
-
-
-
-/**
- * cal_backend_get_uri:
- * @backend: A calendar backend.
- *
- * Queries the URI of a calendar backend, which must already have an open
- * 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 an open 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_open:
- * @backend: A calendar backend.
- * @uri: URI that contains the calendar data.
- * @only_if_exists: Whether the calendar should be opened only if it already
- * exists. If FALSE, a new calendar will be created when the specified @uri
- * does not exist.
- *
- * Opens a calendar backend with data from a calendar stored at the specified
- * URI.
- *
- * Return value: An operation status code.
- **/
-CalBackendOpenStatus
-cal_backend_open (CalBackend *backend, GnomeVFSURI *uri, gboolean only_if_exists)
-{
- CalBackendOpenStatus result;
-
- g_return_val_if_fail (backend != NULL, CAL_BACKEND_OPEN_ERROR);
- g_return_val_if_fail (IS_CAL_BACKEND (backend), CAL_BACKEND_OPEN_ERROR);
- g_return_val_if_fail (uri != NULL, CAL_BACKEND_OPEN_ERROR);
-
- g_assert (CLASS (backend)->open != NULL);
- result = (* CLASS (backend)->open) (backend, uri, only_if_exists);
-
- return result;
-}
-
-/**
- * cal_backend_is_loaded:
- * @backend: A calendar backend.
- *
- * Queries whether a calendar backend has been loaded yet.
- *
- * Return value: TRUE if the backend has been loaded with data, FALSE otherwise.
- **/
-gboolean
-cal_backend_is_loaded (CalBackend *backend)
-{
- gboolean result;
-
- g_return_val_if_fail (backend != NULL, FALSE);
- g_return_val_if_fail (IS_CAL_BACKEND (backend), FALSE);
-
- g_assert (CLASS (backend)->is_loaded != NULL);
- result = (* CLASS (backend)->is_loaded) (backend);
-
- return result;
-}
-
-/**
- * cal_backend_get_n_objects:
- * @backend: A calendar backend.
- * @type: Types of objects that will be included in the count.
- *
- * Queries the number of calendar objects of a particular type.
- *
- * Return value: Number of objects of the specified @type.
- **/
-int
-cal_backend_get_n_objects (CalBackend *backend, CalObjType type)
-{
- g_return_val_if_fail (backend != NULL, -1);
- g_return_val_if_fail (IS_CAL_BACKEND (backend), -1);
-
- g_assert (CLASS (backend)->get_n_objects != NULL);
- return (* CLASS (backend)->get_n_objects) (backend, type);
-}
-
-/**
- * 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. The list should be
- * freed using the cal_obj_uid_list_free() function.
- **/
-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_objects_in_range:
- * @backend: A calendar backend.
- * @type: Bitmask with types of objects to return.
- * @start: Start time for query.
- * @end: End time for query.
- *
- * Builds a list of unique identifiers corresponding to calendar objects of the
- * specified type that occur or recur within the specified time range.
- *
- * Return value: A list of UID strings. The list should be freed using the
- * cal_obj_uid_list_free() function.
- **/
-GList *
-cal_backend_get_objects_in_range (CalBackend *backend, CalObjType type,
- 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_objects_in_range != NULL);
- return (* CLASS (backend)->get_objects_in_range) (backend, type, start, end);
-}
-
-/**
- * cal_backend_get_changes:
- * @backend: A calendar backend
- * @type: Bitmask with types of objects to return.
- * @change_id: A unique uid for the callers change list
- *
- * Builds a sequence of objects and the type of change that occurred on them since
- * the last time the give change_id was seen
- *
- * Return value: A list of the objects that changed and the type of change
- **/
-GNOME_Evolution_Calendar_CalObjChangeSeq *
-cal_backend_get_changes (CalBackend *backend, CalObjType type, const char *change_id)
-{
- g_return_val_if_fail (backend != NULL, NULL);
- g_return_val_if_fail (IS_CAL_BACKEND (backend), NULL);
- g_return_val_if_fail (change_id != NULL, NULL);
-
- g_assert (CLASS (backend)->get_changes != NULL);
- return (* CLASS (backend)->get_changes) (backend, type, change_id);
-}
-
-/**
- * cal_backend_get_alarms_in_range:
- * @backend: A calendar backend.
- * @start: Start time for query.
- * @end: End time for query.
- * @valid_range: Return value that says whether the range is valid or not.
- *
- * Builds a sorted list of the alarms that trigger in the specified time range.
- *
- * Return value: A sequence of component alarm instances structures, or NULL
- * if @valid_range returns FALSE.
- **/
-GNOME_Evolution_Calendar_CalComponentAlarmsSeq *
-cal_backend_get_alarms_in_range (CalBackend *backend, time_t start, time_t end, gboolean *valid_range)
-{
- g_return_val_if_fail (backend != NULL, NULL);
- g_return_val_if_fail (IS_CAL_BACKEND (backend), NULL);
- g_return_val_if_fail (valid_range != NULL, NULL);
-
- g_assert (CLASS (backend)->get_alarms_in_range != NULL);
-
- if (!(start != -1 && end != -1 && start <= end)) {
- *valid_range = FALSE;
- return NULL;
- } else {
- *valid_range = TRUE;
- 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.
- * @result: Return value for the result code for the operation.
- *
- * Builds a sorted list of the alarms of the specified event that trigger in a
- * particular time range.
- *
- * Return value: A structure of the component's alarm instances, or NULL if @result
- * returns something other than #CAL_BACKEND_GET_ALARMS_SUCCESS.
- **/
-GNOME_Evolution_Calendar_CalComponentAlarms *
-cal_backend_get_alarms_for_object (CalBackend *backend, const char *uid,
- time_t start, time_t end,
- CalBackendGetAlarmsForObjectResult *result)
-{
- 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_return_val_if_fail (result != NULL, NULL);
-
- g_assert (CLASS (backend)->get_alarms_for_object != NULL);
-
- if (!(start != -1 && end != -1 && start <= end)) {
- *result = CAL_BACKEND_GET_ALARMS_INVALID_RANGE;
- return NULL;
- } else {
- gboolean object_found;
- GNOME_Evolution_Calendar_CalComponentAlarms *alarms;
-
- alarms = (* CLASS (backend)->get_alarms_for_object) (backend, uid, start, end,
- &object_found);
-
- if (object_found)
- *result = CAL_BACKEND_GET_ALARMS_SUCCESS;
- else
- *result = CAL_BACKEND_GET_ALARMS_NOT_FOUND;
-
- return 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 or one
- * with an unsupported type.
- **/
-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]);
-}
-
-/**
- * cal_backend_opened:
- * @backend: A calendar backend.
- * @status: Open status code.
- *
- * Emits the "opened" signal of a calendar backend. This function is to be used
- * only by backend implementations.
- **/
-void
-cal_backend_opened (CalBackend *backend, CalBackendOpenStatus status)
-{
- g_return_if_fail (backend != NULL);
- g_return_if_fail (IS_CAL_BACKEND (backend));
-
- gtk_signal_emit (GTK_OBJECT (backend), cal_backend_signals[OPENED],
- status);
-}
-
-/**
- * cal_backend_obj_updated:
- * @backend: A calendar backend.
- * @uid: Unique identifier of the component that was updated.
- *
- * Emits the "obj_updated" signal of a calendar backend. This function is to be
- * used only by backend implementations.
- **/
-void
-cal_backend_obj_updated (CalBackend *backend, const char *uid)
-{
- g_return_if_fail (backend != NULL);
- g_return_if_fail (IS_CAL_BACKEND (backend));
- g_return_if_fail (uid != NULL);
-
- gtk_signal_emit (GTK_OBJECT (backend), cal_backend_signals[OBJ_UPDATED],
- uid);
-}
-
-/**
- * cal_backend_obj_removed:
- * @backend: A calendar backend.
- * @uid: Unique identifier of the component that was removed.
- *
- * Emits the "obj_removed" signal of a calendar backend. This function is to be
- * used only by backend implementations.
- **/
-void
-cal_backend_obj_removed (CalBackend *backend, const char *uid)
-{
- g_return_if_fail (backend != NULL);
- g_return_if_fail (IS_CAL_BACKEND (backend));
- g_return_if_fail (uid != NULL);
-
- gtk_signal_emit (GTK_OBJECT (backend), cal_backend_signals[OBJ_REMOVED],
- uid);
-}
diff --git a/calendar/pcs/cal-backend.h b/calendar/pcs/cal-backend.h
deleted file mode 100644
index dab06b21e8..0000000000
--- a/calendar/pcs/cal-backend.h
+++ /dev/null
@@ -1,153 +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.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Author: Federico Mena-Quintero <federico@ximian.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 CAL_BACKEND_H
-#define CAL_BACKEND_H
-
-#include <libgnome/gnome-defs.h>
-#include <libgnomevfs/gnome-vfs.h>
-#include <cal-util/cal-util.h>
-#include <cal-util/cal-component.h>
-#include "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))
-
-/* Open status values */
-typedef enum {
- CAL_BACKEND_OPEN_SUCCESS, /* Loading OK */
- CAL_BACKEND_OPEN_ERROR, /* We need better error reporting in libversit */
- CAL_BACKEND_OPEN_NOT_FOUND
-} CalBackendOpenStatus;
-
-/* Result codes for ::get_alarms_in_range() */
-typedef enum {
- CAL_BACKEND_GET_ALARMS_SUCCESS,
- CAL_BACKEND_GET_ALARMS_NOT_FOUND,
- CAL_BACKEND_GET_ALARMS_INVALID_RANGE
-} CalBackendGetAlarmsForObjectResult;
-
-struct _CalBackend {
- GtkObject object;
-};
-
-struct _CalBackendClass {
- GtkObjectClass parent_class;
-
- /* Notification signals */
- void (* last_client_gone) (CalBackend *backend);
-
- void (* opened) (CalBackend *backend, CalBackendOpenStatus status);
- void (* obj_updated) (CalBackend *backend, const char *uid);
- void (* obj_removed) (CalBackend *backend, const char *uid);
-
- /* Virtual methods */
- GnomeVFSURI *(* get_uri) (CalBackend *backend);
- void (* add_cal) (CalBackend *backend, Cal *cal);
-
- CalBackendOpenStatus (* open) (CalBackend *backend, GnomeVFSURI *uri,
- gboolean only_if_exists);
-
- gboolean (* is_loaded) (CalBackend *backend);
-
- /* General object acquirement and information related virtual methods */
- int (* get_n_objects) (CalBackend *backend, CalObjType type);
- char *(* get_object) (CalBackend *backend, const char *uid);
- CalObjType(* get_type_by_uid) (CalBackend *backend, const char *uid);
- GList *(* get_uids) (CalBackend *backend, CalObjType type);
-
- GList *(* get_objects_in_range) (CalBackend *backend, CalObjType type,
- time_t start, time_t end);
-
- /* Change related virtual methods */
- GNOME_Evolution_Calendar_CalObjChangeSeq * (* get_changes) (
- CalBackend *backend, CalObjType type, const char *change_id);
-
- /* Alarm related virtual methods */
- GNOME_Evolution_Calendar_CalComponentAlarmsSeq *(* get_alarms_in_range) (
- CalBackend *backend, time_t start, time_t end);
- GNOME_Evolution_Calendar_CalComponentAlarms *(* get_alarms_for_object) (
- CalBackend *backend, const char *uid,
- time_t start, time_t end, gboolean *object_found);
-
- /* Object manipulation virtual methods */
- 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);
-
-CalBackendOpenStatus cal_backend_open (CalBackend *backend, GnomeVFSURI *uri,
- gboolean only_if_exists);
-
-gboolean cal_backend_is_loaded (CalBackend *backend);
-
-int cal_backend_get_n_objects (CalBackend *backend, CalObjType type);
-
-char *cal_backend_get_object (CalBackend *backend, const char *uid);
-
-GList *cal_backend_get_uids (CalBackend *backend, CalObjType type);
-
-GList *cal_backend_get_objects_in_range (CalBackend *backend, CalObjType type,
- time_t start, time_t end);
-
-GNOME_Evolution_Calendar_CalObjChangeSeq * cal_backend_get_changes (
- CalBackend *backend, CalObjType type, const char *change_id);
-
-GNOME_Evolution_Calendar_CalComponentAlarmsSeq *cal_backend_get_alarms_in_range (
- CalBackend *backend, time_t start, time_t end, gboolean *valid_range);
-
-GNOME_Evolution_Calendar_CalComponentAlarms *cal_backend_get_alarms_for_object (
- CalBackend *backend, const char *uid,
- time_t start, time_t end,
- CalBackendGetAlarmsForObjectResult *result);
-
-
-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);
-void cal_backend_opened (CalBackend *backend, CalBackendOpenStatus status);
-void cal_backend_obj_updated (CalBackend *backend, const char *uid);
-void cal_backend_obj_removed (CalBackend *backend, const char *uid);
-
-
-
-END_GNOME_DECLS
-
-#endif
diff --git a/calendar/pcs/cal-common.h b/calendar/pcs/cal-common.h
deleted file mode 100644
index 3454742ce8..0000000000
--- a/calendar/pcs/cal-common.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* Evolution calendar server - common declarations
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Author: Federico Mena-Quintero <federico@ximian.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 CAL_COMMON_H
-#define CAL_COMMON_H
-
-#include <libgnome/gnome-defs.h>
-
-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 d0bbd278d1..0000000000
--- a/calendar/pcs/cal-factory.c
+++ /dev/null
@@ -1,799 +0,0 @@
-/* Evolution calendar factory
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Author: Federico Mena-Quintero <federico@ximian.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 <ctype.h>
-#include <stdio.h>
-#include <gtk/gtksignal.h>
-#include <liboaf/liboaf.h>
-#include "cal.h"
-#include "cal-backend.h"
-#include "cal-factory.h"
-#include "job.h"
-
-
-
-/* OAF ID for registration */
-#define CAL_FACTORY_OAF_ID "OAFIID:GNOME_Evolution_Wombat_CalendarFactory"
-
-/* Private part of the CalFactory structure */
-struct _CalFactoryPrivate {
- /* Hash table from URI method strings to GtkType * for backend class types */
- GHashTable *methods;
-
- /* Hash table from GnomeVFSURI structures to CalBackend objects */
- GHashTable *backends;
-
- /* Whether we have been registered with OAF yet */
- guint registered : 1;
-};
-
-
-
-/* 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_GNOME_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.GNOME_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);
- priv->registered = FALSE;
-}
-
-/* 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;
-
- if (priv->registered) {
- CORBA_Object obj;
-
- obj = bonobo_object_corba_objref (BONOBO_OBJECT (factory));
- oaf_active_server_unregister (CAL_FACTORY_OAF_ID, obj);
- priv->registered = FALSE;
- }
-
- g_free (priv);
- factory->priv = NULL;
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-
-
-/* Opening calendars */
-
-/* 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;
-
- fprintf (stderr, "backend_last_client_gone_cb() called!\n");
-
- 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, GNOME_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);
- GNOME_Evolution_Calendar_Listener_notifyCalOpened (
- listener,
- GNOME_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;
-}
-
-/* Opens a calendar backend and puts it in the factory's backend hash table */
-static CalBackend *
-open_backend (CalFactory *factory, GnomeVFSURI *uri, gboolean only_if_exists,
- GNOME_Evolution_Calendar_Listener listener)
-{
- CalFactoryPrivate *priv;
- CalBackend *backend;
- CalBackendOpenStatus status;
- CORBA_Environment ev;
-
- priv = factory->priv;
-
- backend = launch_backend_for_uri (factory, uri, listener);
- if (!backend)
- return NULL;
-
- status = cal_backend_open (backend, uri, only_if_exists);
-
- switch (status) {
- case CAL_BACKEND_OPEN_SUCCESS:
- add_backend (factory, uri, backend);
- return backend;
-
- case CAL_BACKEND_OPEN_ERROR:
- gtk_object_unref (GTK_OBJECT (backend));
-
- CORBA_exception_init (&ev);
- GNOME_Evolution_Calendar_Listener_notifyCalOpened (
- listener,
- GNOME_Evolution_Calendar_Listener_ERROR,
- CORBA_OBJECT_NIL,
- &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION)
- g_message ("open_backend(): could not notify the listener");
-
- CORBA_exception_free (&ev);
- return NULL;
-
- case CAL_BACKEND_OPEN_NOT_FOUND:
- gtk_object_unref (GTK_OBJECT (backend));
-
- CORBA_exception_init (&ev);
- GNOME_Evolution_Calendar_Listener_notifyCalOpened (
- listener,
- GNOME_Evolution_Calendar_Listener_NOT_FOUND,
- CORBA_OBJECT_NIL,
- &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION)
- g_message ("open_backend(): could not notify the listener");
-
- CORBA_exception_free (&ev);
- return NULL;
-
- default:
- g_assert_not_reached ();
- return NULL;
- }
-}
-
-/* Adds a listener to a calendar backend by creating a calendar client interface
- * object.
- */
-static void
-add_calendar_client (CalFactory *factory, CalBackend *backend, GNOME_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);
- GNOME_Evolution_Calendar_Listener_notifyCalOpened (
- listener,
- GNOME_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);
- GNOME_Evolution_Calendar_Listener_notifyCalOpened (
- listener,
- GNOME_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 data */
-typedef struct {
- CalFactory *factory;
- char *uri;
- gboolean only_if_exists;
- GNOME_Evolution_Calendar_Listener listener;
-} OpenJobData;
-
-/* Job handler for the open calendar command */
-static void
-open_fn (gpointer data)
-{
- OpenJobData *jd;
- CalFactory *factory;
- GnomeVFSURI *uri;
- gboolean only_if_exists;
- GNOME_Evolution_Calendar_Listener listener;
- CalBackend *backend;
- CORBA_Environment ev;
-
- jd = data;
- g_assert (jd->uri != NULL);
-
- /* Check the URI */
-
- uri = gnome_vfs_uri_new (jd->uri);
- g_free (jd->uri);
-
- only_if_exists = jd->only_if_exists;
- factory = jd->factory;
- listener = jd->listener;
- g_free (jd);
-
- if (!uri) {
- CORBA_exception_init (&ev);
- GNOME_Evolution_Calendar_Listener_notifyCalOpened (
- listener,
- GNOME_Evolution_Calendar_Listener_ERROR,
- CORBA_OBJECT_NIL,
- &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION)
- g_message ("open_fn(): Could not notify the listener!");
-
- CORBA_exception_free (&ev);
- goto out;
- }
-
- /* Look up the backend and create it if needed */
-
- backend = lookup_backend (factory, uri);
-
- if (!backend)
- backend = open_backend (factory, uri, only_if_exists, listener);
-
- gnome_vfs_uri_unref (uri);
-
- if (backend)
- add_calendar_client (factory, backend, listener);
-
- out:
-
- CORBA_exception_init (&ev);
- CORBA_Object_release (listener, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION)
- g_message ("open_fn(): could not release the listener");
-
- CORBA_exception_free (&ev);
-}
-
-
-
-/* CORBA servant implementation */
-
-/* CalFactory::open method */
-static void
-CalFactory_open (PortableServer_Servant servant,
- const CORBA_char *uri,
- CORBA_boolean only_if_exists,
- GNOME_Evolution_Calendar_Listener listener,
- CORBA_Environment *ev)
-{
- CalFactory *factory;
- CalFactoryPrivate *priv;
- CORBA_Environment ev2;
- gboolean result;
- OpenJobData *jd;
- GNOME_Evolution_Calendar_Listener listener_copy;
-
- 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_GNOME_Evolution_Calendar_CalFactory_NilListener,
- NULL);
-
- CORBA_exception_free (&ev2);
- return;
- }
- CORBA_exception_free (&ev2);
-
- CORBA_exception_init (&ev2);
- listener_copy = CORBA_Object_duplicate (listener, &ev2);
-
- if (ev2._major != CORBA_NO_EXCEPTION) {
- g_message ("CalFactory_open(): could not duplicate the listener");
- CORBA_exception_free (&ev2);
- CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
- ex_GNOME_Evolution_Calendar_CalFactory_NilListener,
- NULL);
- return;
- }
-
- CORBA_exception_free (&ev2);
-
- jd = g_new (OpenJobData, 1);
- jd->factory = factory;
- jd->uri = g_strdup (uri);
- jd->only_if_exists = only_if_exists;
- jd->listener = listener_copy;
-
- job_add (open_fn, jd);
-}
-
-/**
- * cal_factory_get_epv:
- * @void:
- *
- * Creates an EPV for the CalFactory CORBA class.
- *
- * Return value: A newly-allocated EPV.
- **/
-POA_GNOME_Evolution_Calendar_CalFactory__epv *
-cal_factory_get_epv (void)
-{
- POA_GNOME_Evolution_Calendar_CalFactory__epv *epv;
-
- epv = g_new0 (POA_GNOME_Evolution_Calendar_CalFactory__epv, 1);
- epv->open = CalFactory_open;
-
- 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, GNOME_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.
- **/
-GNOME_Evolution_Calendar_CalFactory
-cal_factory_corba_object_create (BonoboObject *object)
-{
- POA_GNOME_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_GNOME_Evolution_Calendar_CalFactory *) g_new0 (BonoboObjectServant, 1);
- servant->vepv = &cal_factory_vepv;
-
- CORBA_exception_init (&ev);
- POA_GNOME_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 (GNOME_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;
- GNOME_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;
- unsigned char *p;
-
- str = g_strdup (s);
- for (p = str; *p; p++)
- if (isalpha (*p))
- *p = tolower (*p);
-
- return str;
-}
-
-/**
- * cal_factory_oaf_register:
- * @factory: A calendar factory.
- *
- * Registers a calendar factory with the OAF object activation daemon. This
- * function must be called before any clients can activate the factory.
- *
- * Return value: TRUE on success, FALSE otherwise.
- **/
-gboolean
-cal_factory_oaf_register (CalFactory *factory)
-{
- CalFactoryPrivate *priv;
- OAF_RegistrationResult result;
- CORBA_Object obj;
-
- g_return_val_if_fail (factory != NULL, FALSE);
- g_return_val_if_fail (IS_CAL_FACTORY (factory), FALSE);
-
- priv = factory->priv;
-
- g_return_val_if_fail (!priv->registered, FALSE);
-
- obj = bonobo_object_corba_objref (BONOBO_OBJECT (factory));
- result = oaf_active_server_register (CAL_FACTORY_OAF_ID, obj);
-
- switch (result) {
- case OAF_REG_SUCCESS:
- priv->registered = TRUE;
- return TRUE;
-
- case OAF_REG_NOT_LISTED:
- g_message ("cal_factory_oaf_register(): Cannot register the calendar factory: "
- "not listed");
- break;
-
- case OAF_REG_ALREADY_ACTIVE:
- g_message ("cal_factory_oaf_register(): Cannot register the calendar factory: "
- "already active");
- break;
-
- case OAF_REG_ERROR:
- default:
- g_message ("cal_factory_oaf_register(): Cannot register the calendar factory: "
- "generic error");
- break;
- }
-
- return FALSE;
-}
-
-/**
- * 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 open 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 ac28a5935b..0000000000
--- a/calendar/pcs/cal-factory.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/* Evolution calendar factory
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Author: Federico Mena-Quintero <federico@ximian.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 CAL_FACTORY_H
-#define CAL_FACTORY_H
-
-#include <libgnome/gnome-defs.h>
-#include <bonobo/bonobo-object.h>
-
-#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;
-
-typedef struct _CalFactoryPrivate CalFactoryPrivate;
-
-struct _CalFactory {
- BonoboObject object;
-
- /* Private data */
- CalFactoryPrivate *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,
- GNOME_Evolution_Calendar_CalFactory corba_factory);
-GNOME_Evolution_Calendar_CalFactory cal_factory_corba_object_create (BonoboObject *object);
-
-CalFactory *cal_factory_new (void);
-
-gboolean cal_factory_oaf_register (CalFactory *factory);
-
-void cal_factory_register_method (CalFactory *factory, const char *method, GtkType backend_type);
-
-int cal_factory_get_n_backends (CalFactory *factory);
-
-POA_GNOME_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 e723c077cb..0000000000
--- a/calendar/pcs/cal.c
+++ /dev/null
@@ -1,707 +0,0 @@
-/* Evolution calendar client interface object
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Author: Federico Mena-Quintero <federico@ximian.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 "cal.h"
-#include "query.h"
-
-
-
-/* Private part of the Cal structure */
-struct _CalPrivate {
- /* Our backend */
- CalBackend *backend;
-
- /* Listener on the client we notify */
- GNOME_Evolution_Calendar_Listener listener;
-};
-
-
-
-static void cal_class_init (CalClass *class);
-static void cal_init (Cal *cal);
-static void cal_destroy (GtkObject *object);
-
-static POA_GNOME_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.GNOME_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;
-}
-
-/* Converts a calendar object type from its CORBA representation to our own
- * representation.
- */
-static CalObjType
-uncorba_obj_type (GNOME_Evolution_Calendar_CalObjType type)
-{
- return (((type & GNOME_Evolution_Calendar_TYPE_EVENT) ? CALOBJ_TYPE_EVENT : 0)
- | ((type & GNOME_Evolution_Calendar_TYPE_TODO) ? CALOBJ_TYPE_TODO : 0)
- | ((type & GNOME_Evolution_Calendar_TYPE_JOURNAL) ? CALOBJ_TYPE_JOURNAL : 0));
-}
-
-/* Cal::get_n_objects method */
-static CORBA_long
-Cal_get_n_objects (PortableServer_Servant servant,
- GNOME_Evolution_Calendar_CalObjType type,
- CORBA_Environment *ev)
-{
- Cal *cal;
- CalPrivate *priv;
- int t;
- int n;
-
- cal = CAL (bonobo_object_from_servant (servant));
- priv = cal->priv;
-
- t = uncorba_obj_type (type);
- n = cal_backend_get_n_objects (priv->backend, t);
- return n;
-}
-
-/* Cal::get_object method */
-static GNOME_Evolution_Calendar_CalObj
-Cal_get_object (PortableServer_Servant servant,
- const GNOME_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_GNOME_Evolution_Calendar_Cal_NotFound,
- NULL);
- return NULL;
- }
-}
-
-static GNOME_Evolution_Calendar_CalObjUIDSeq *
-build_uid_seq (GList *uids)
-{
- GNOME_Evolution_Calendar_CalObjUIDSeq *seq;
- GList *l;
- int n, i;
-
- n = g_list_length (uids);
-
- seq = GNOME_Evolution_Calendar_CalObjUIDSeq__alloc ();
- CORBA_sequence_set_release (seq, TRUE);
- seq->_length = n;
- seq->_buffer = CORBA_sequence_GNOME_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);
- }
-
- return seq;
-}
-
-/* Cal::get_uids method */
-static GNOME_Evolution_Calendar_CalObjUIDSeq *
-Cal_get_uids (PortableServer_Servant servant,
- GNOME_Evolution_Calendar_CalObjType type,
- CORBA_Environment *ev)
-{
- Cal *cal;
- CalPrivate *priv;
- GList *uids;
- GNOME_Evolution_Calendar_CalObjUIDSeq *seq;
- int t;
-
- cal = CAL (bonobo_object_from_servant (servant));
- priv = cal->priv;
-
- t = uncorba_obj_type (type);
-
- uids = cal_backend_get_uids (priv->backend, t);
- seq = build_uid_seq (uids);
-
- cal_obj_uid_list_free (uids);
-
- return seq;
-}
-
-/* Cal::get_changes method */
-static GNOME_Evolution_Calendar_CalObjChangeSeq *
-Cal_get_changes (PortableServer_Servant servant,
- GNOME_Evolution_Calendar_CalObjType type,
- const CORBA_char *change_id,
- CORBA_Environment *ev)
-{
- Cal *cal;
- CalPrivate *priv;
- int t;
-
- cal = CAL (bonobo_object_from_servant (servant));
- priv = cal->priv;
-
- t = uncorba_obj_type (type);
-
- return cal_backend_get_changes (priv->backend, t, change_id);
-}
-
-/* Cal::get_objects_in_range method */
-static GNOME_Evolution_Calendar_CalObjUIDSeq *
-Cal_get_objects_in_range (PortableServer_Servant servant,
- GNOME_Evolution_Calendar_CalObjType type,
- GNOME_Evolution_Calendar_Time_t start,
- GNOME_Evolution_Calendar_Time_t end,
- CORBA_Environment *ev)
-{
- Cal *cal;
- CalPrivate *priv;
- int t;
- time_t t_start, t_end;
- GNOME_Evolution_Calendar_CalObjUIDSeq *seq;
- GList *uids;
-
- cal = CAL (bonobo_object_from_servant (servant));
- priv = cal->priv;
-
- t = uncorba_obj_type (type);
- 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_GNOME_Evolution_Calendar_Cal_InvalidRange,
- NULL);
- return NULL;
- }
-
- uids = cal_backend_get_objects_in_range (priv->backend, t, t_start, t_end);
- seq = build_uid_seq (uids);
-
- cal_obj_uid_list_free (uids);
-
- return seq;
-}
-
-/* Cal::get_alarms_in_range method */
-static GNOME_Evolution_Calendar_CalComponentAlarmsSeq *
-Cal_get_alarms_in_range (PortableServer_Servant servant,
- GNOME_Evolution_Calendar_Time_t start,
- GNOME_Evolution_Calendar_Time_t end,
- CORBA_Environment *ev)
-{
- Cal *cal;
- CalPrivate *priv;
- time_t t_start, t_end;
- gboolean valid_range;
- GNOME_Evolution_Calendar_CalComponentAlarmsSeq *seq;
-
- cal = CAL (bonobo_object_from_servant (servant));
- priv = cal->priv;
-
- t_start = (time_t) start;
- t_end = (time_t) end;
-
- seq = cal_backend_get_alarms_in_range (priv->backend, t_start, t_end, &valid_range);
- if (!valid_range) {
- CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
- ex_GNOME_Evolution_Calendar_Cal_InvalidRange,
- NULL);
- return NULL;
- }
-
- return seq;
-}
-
-/* Cal::get_alarms_for_object method */
-static GNOME_Evolution_Calendar_CalComponentAlarms *
-Cal_get_alarms_for_object (PortableServer_Servant servant,
- const GNOME_Evolution_Calendar_CalObjUID uid,
- GNOME_Evolution_Calendar_Time_t start,
- GNOME_Evolution_Calendar_Time_t end,
- CORBA_Environment * ev)
-{
- Cal *cal;
- CalPrivate *priv;
- time_t t_start, t_end;
- GNOME_Evolution_Calendar_CalComponentAlarms *alarms;
- CalBackendGetAlarmsForObjectResult result;
-
- cal = CAL (bonobo_object_from_servant (servant));
- priv = cal->priv;
-
- t_start = (time_t) start;
- t_end = (time_t) end;
-
- alarms = cal_backend_get_alarms_for_object (priv->backend, uid, t_start, t_end, &result);
-
- switch (result) {
- case CAL_BACKEND_GET_ALARMS_SUCCESS:
- return alarms;
-
- case CAL_BACKEND_GET_ALARMS_NOT_FOUND:
- CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
- ex_GNOME_Evolution_Calendar_Cal_NotFound,
- NULL);
- return NULL;
-
- case CAL_BACKEND_GET_ALARMS_INVALID_RANGE:
- CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
- ex_GNOME_Evolution_Calendar_Cal_InvalidRange,
- NULL);
- return NULL;
-
- default:
- g_assert_not_reached ();
- return NULL;
- }
-}
-
-/* Cal::update_object method */
-static void
-Cal_update_object (PortableServer_Servant servant,
- const GNOME_Evolution_Calendar_CalObjUID uid,
- const GNOME_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_GNOME_Evolution_Calendar_Cal_InvalidObject,
- NULL);
-}
-
-/* Cal::remove_object method */
-static void
-Cal_remove_object (PortableServer_Servant servant,
- const GNOME_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_GNOME_Evolution_Calendar_Cal_NotFound,
- NULL);
-}
-
-/* Cal::getQuery implementation */
-static GNOME_Evolution_Calendar_Query
-Cal_get_query (PortableServer_Servant servant,
- const CORBA_char *sexp,
- GNOME_Evolution_Calendar_QueryListener ql,
- CORBA_Environment *ev)
-{
- Cal *cal;
- CalPrivate *priv;
- Query *query;
- CORBA_Environment ev2;
- GNOME_Evolution_Calendar_Query query_copy;
-
- cal = CAL (bonobo_object_from_servant (servant));
- priv = cal->priv;
-
- query = query_new (priv->backend, ql, sexp);
- if (!query) {
- CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
- ex_GNOME_Evolution_Calendar_Cal_CouldNotCreate,
- NULL);
- return CORBA_OBJECT_NIL;
- }
-
- CORBA_exception_init (&ev2);
- query_copy = CORBA_Object_duplicate (BONOBO_OBJREF (query), &ev2);
- if (ev2._major != CORBA_NO_EXCEPTION) {
- CORBA_exception_free (&ev2);
- g_message ("Cal_get_query(): Could not duplicate the query reference");
- CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
- ex_GNOME_Evolution_Calendar_Cal_CouldNotCreate,
- NULL);
- return CORBA_OBJECT_NIL;
- }
-
- CORBA_exception_free (&ev2);
-
- return query_copy;
-}
-
-/**
- * cal_get_epv:
- * @void:
- *
- * Creates an EPV for the Cal CORBA class.
- *
- * Return value: A newly-allocated EPV.
- **/
-POA_GNOME_Evolution_Calendar_Cal__epv *
-cal_get_epv (void)
-{
- POA_GNOME_Evolution_Calendar_Cal__epv *epv;
-
- epv = g_new0 (POA_GNOME_Evolution_Calendar_Cal__epv, 1);
- epv->_get_uri = Cal_get_uri;
- epv->countObjects = Cal_get_n_objects;
- epv->getObject = Cal_get_object;
- epv->getUIDs = Cal_get_uids;
- epv->getChanges = Cal_get_changes;
- epv->getObjectsInRange = Cal_get_objects_in_range;
- epv->getAlarmsInRange = Cal_get_alarms_in_range;
- epv->getAlarmsForObject = Cal_get_alarms_for_object;
- epv->updateObject = Cal_update_object;
- epv->removeObject = Cal_remove_object;
- epv->getQuery = Cal_get_query;
-
- 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,
- GNOME_Evolution_Calendar_Cal corba_cal,
- CalBackend *backend,
- GNOME_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.
- **/
-GNOME_Evolution_Calendar_Cal
-cal_corba_object_create (BonoboObject *object)
-{
- POA_GNOME_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_GNOME_Evolution_Calendar_Cal *) g_new0 (BonoboObjectServant, 1);
- servant->vepv = &cal_vepv;
-
- CORBA_exception_init (&ev);
- POA_GNOME_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 (GNOME_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, GNOME_Evolution_Calendar_Listener listener)
-{
- Cal *cal, *retval;
- GNOME_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);
- GNOME_Evolution_Calendar_Listener_notifyObjUpdated (priv->listener, (char *) 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);
- GNOME_Evolution_Calendar_Listener_notifyObjRemoved (priv->listener, (char *) 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 844640cd8d..0000000000
--- a/calendar/pcs/cal.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/* Evolution calendar client interface object
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Author: Federico Mena-Quintero <federico@ximian.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 CAL_H
-#define CAL_H
-
-#include <libgnome/gnome-defs.h>
-#include <bonobo/bonobo-object.h>
-#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))
-
-typedef struct _CalPrivate CalPrivate;
-
-struct _Cal {
- BonoboObject object;
-
- /* Private data */
- CalPrivate *priv;
-};
-
-struct _CalClass {
- BonoboObjectClass parent_class;
-};
-
-GtkType cal_get_type (void);
-
-Cal *cal_construct (Cal *cal,
- GNOME_Evolution_Calendar_Cal corba_cal,
- CalBackend *backend,
- GNOME_Evolution_Calendar_Listener listener);
-GNOME_Evolution_Calendar_Cal cal_corba_object_create (BonoboObject *object);
-
-Cal *cal_new (CalBackend *backend, GNOME_Evolution_Calendar_Listener listener);
-
-void cal_notify_update (Cal *cal, const char *uid);
-void cal_notify_remove (Cal *cal, const char *uid);
-
-POA_GNOME_Evolution_Calendar_Cal__epv *cal_get_epv (void);
-
-
-
-END_GNOME_DECLS
-
-#endif
diff --git a/calendar/pcs/job.c b/calendar/pcs/job.c
deleted file mode 100644
index f8223f0bab..0000000000
--- a/calendar/pcs/job.c
+++ /dev/null
@@ -1,99 +0,0 @@
-/* GNOME personal calendar server - job manager
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Author: Federico Mena-Quintero <federico@ximian.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 "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 f9a0d86923..0000000000
--- a/calendar/pcs/job.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* GNOME personal calendar server - job manager
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Author: Federico Mena-Quintero <federico@ximian.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 JOB_H
-#define JOB_H
-
-#include <glib.h>
-
-
-
-typedef void (* JobFunc) (gpointer data);
-
-void job_add (JobFunc func, gpointer data);
-
-
-
-#endif
diff --git a/calendar/pcs/query.c b/calendar/pcs/query.c
deleted file mode 100644
index 48e77d216a..0000000000
--- a/calendar/pcs/query.c
+++ /dev/null
@@ -1,1215 +0,0 @@
-/* Evolution calendar - Live search query implementation
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Author: Federico Mena-Quintero <federico@ximian.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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <string.h>
-#include <glib.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <gtk/gtksignal.h>
-#include <gal/widgets/e-unicode.h>
-#include <e-util/e-sexp.h>
-#include <cal-util/cal-recur.h>
-#include <cal-util/timeutil.h>
-#include "query.h"
-
-
-
-/* Private part of the Query structure */
-struct _QueryPrivate {
- /* The backend we are monitoring */
- CalBackend *backend;
-
- /* Listener to which we report changes in the live query */
- GNOME_Evolution_Calendar_QueryListener ql;
-
- /* Sexp that defines the query */
- char *sexp;
- ESExp *esexp;
-
- /* Idle handler ID for asynchronous queries */
- guint idle_id;
-
- /* List of UIDs that we still have to process */
- GList *pending_uids;
- int n_pending;
- int pending_total;
-
- /* Table of the UIDs we know do match the query */
- GHashTable *uids;
-
- /* The next component that will be handled in e_sexp_eval(); put here
- * just because the query object itself is the esexp context.
- */
- CalComponent *next_comp;
-};
-
-
-
-static void query_class_init (QueryClass *class);
-static void query_init (Query *query);
-static void query_destroy (GtkObject *object);
-
-static BonoboXObjectClass *parent_class;
-
-
-
-BONOBO_X_TYPE_FUNC_FULL (Query,
- GNOME_Evolution_Calendar_Query,
- BONOBO_X_OBJECT_TYPE,
- query);
-
-/* Class initialization function for the live search query */
-static void
-query_class_init (QueryClass *class)
-{
- GtkObjectClass *object_class;
-
- object_class = (GtkObjectClass *) class;
-
- parent_class = gtk_type_class (BONOBO_X_OBJECT_TYPE);
-
- object_class->destroy = query_destroy;
-
- /* The Query interface (ha ha! query interface!) has no methods, so we
- * don't need to fiddle with the epv.
- */
-}
-
-/* Object initialization function for the live search query */
-static void
-query_init (Query *query)
-{
- QueryPrivate *priv;
-
- priv = g_new0 (QueryPrivate, 1);
- query->priv = priv;
-
- priv->backend = NULL;
- priv->ql = CORBA_OBJECT_NIL;
- priv->sexp = NULL;
-
- priv->pending_uids = NULL;
- priv->uids = g_hash_table_new (g_str_hash, g_str_equal);
-
- priv->next_comp = NULL;
-}
-
-/* Used from g_hash_table_foreach(); frees a UID */
-static void
-free_uid_cb (gpointer key, gpointer value, gpointer data)
-{
- char *uid;
-
- uid = key;
- g_free (uid);
-}
-
-/* Destroy handler for the live search query */
-static void
-query_destroy (GtkObject *object)
-{
- Query *query;
- QueryPrivate *priv;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_QUERY (object));
-
- query = QUERY (object);
- priv = query->priv;
-
- if (priv->backend) {
- gtk_signal_disconnect_by_data (GTK_OBJECT (priv->backend), query);
- gtk_object_unref (GTK_OBJECT (priv->backend));
- priv->backend = NULL;
- }
-
- if (priv->ql != CORBA_OBJECT_NIL) {
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
- bonobo_object_release_unref (priv->ql, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION)
- g_message ("query_destroy(): Could not unref the listener\n");
-
- CORBA_exception_free (&ev);
-
- priv->ql = CORBA_OBJECT_NIL;
- }
-
- if (priv->sexp) {
- g_free (priv->sexp);
- priv->sexp = NULL;
- }
-
- if (priv->esexp) {
- e_sexp_unref (priv->esexp);
- priv->esexp = NULL;
- }
-
- if (priv->idle_id) {
- g_source_remove (priv->idle_id);
- priv->idle_id = 0;
- }
-
- if (priv->pending_uids) {
- GList *l;
-
- for (l = priv->pending_uids; l; l = l->next) {
- char *uid;
-
- uid = l->data;
- g_assert (uid != NULL);
- g_free (uid);
- }
-
- g_list_free (priv->pending_uids);
- priv->pending_uids = NULL;
- priv->n_pending = 0;
- }
-
- g_hash_table_foreach (priv->uids, free_uid_cb, NULL);
- g_hash_table_destroy (priv->uids);
- priv->uids = NULL;
-
- g_free (priv);
- query->priv = NULL;
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-
-
-/* E-Sexp functions */
-
-/* (time-now)
- *
- * Returns a time_t of time (NULL).
- */
-static ESExpResult *
-func_time_now (ESExp *esexp, int argc, ESExpResult **argv, void *data)
-{
- ESExpResult *result;
-
- if (argc != 0) {
- e_sexp_fatal_error (esexp, _("time-now expects 0 arguments"));
- return NULL;
- }
-
- result = e_sexp_result_new (esexp, ESEXP_RES_TIME);
- result->value.time = time (NULL);
-
- return result;
-}
-
-/* (make-time ISODATE)
- *
- * ISODATE - string, ISO 8601 date/time representation
- *
- * Constructs a time_t value for the specified date.
- */
-static ESExpResult *
-func_make_time (ESExp *esexp, int argc, ESExpResult **argv, void *data)
-{
- const char *str;
- time_t t;
- ESExpResult *result;
-
- if (argc != 1) {
- e_sexp_fatal_error (esexp, _("make-time expects 1 argument"));
- return NULL;
- }
-
- if (argv[0]->type != ESEXP_RES_STRING) {
- e_sexp_fatal_error (esexp, _("make-time expects argument 1 "
- "to be a string"));
- return NULL;
- }
- str = argv[0]->value.string;
-
- t = time_from_isodate (str);
- if (t == -1) {
- e_sexp_fatal_error (esexp, _("make-time argument 1 must be an "
- "ISO 8601 date/time string"));
- return NULL;
- }
-
- result = e_sexp_result_new (esexp, ESEXP_RES_TIME);
- result->value.time = t;
-
- return result;
-}
-
-/* (time-add-day TIME N)
- *
- * TIME - time_t, base time
- * N - int, number of days to add
- *
- * Adds the specified number of days to a time value.
- */
-static ESExpResult *
-func_time_add_day (ESExp *esexp, int argc, ESExpResult **argv, void *data)
-{
- ESExpResult *result;
- time_t t;
- int n;
-
- if (argc != 2) {
- e_sexp_fatal_error (esexp, _("time-add-day expects 2 arguments"));
- return NULL;
- }
-
- if (argv[0]->type != ESEXP_RES_TIME) {
- e_sexp_fatal_error (esexp, _("time-add-day expects argument 1 "
- "to be a time_t"));
- return NULL;
- }
- t = argv[0]->value.time;
-
- if (argv[1]->type != ESEXP_RES_INT) {
- e_sexp_fatal_error (esexp, _("time-add-day expects argument 2 "
- "to be an integer"));
- return NULL;
- }
- n = argv[1]->value.number;
-
- result = e_sexp_result_new (esexp, ESEXP_RES_TIME);
- result->value.time = time_add_day (t, n);
-
- return result;
-}
-
-/* (time-day-begin TIME)
- *
- * TIME - time_t, base time
- *
- * Returns the start of the day, according to the local time.
- */
-static ESExpResult *
-func_time_day_begin (ESExp *esexp, int argc, ESExpResult **argv, void *data)
-{
- time_t t;
- ESExpResult *result;
-
- if (argc != 1) {
- e_sexp_fatal_error (esexp, _("time-day-begin expects 1 argument"));
- return NULL;
- }
-
- if (argv[0]->type != ESEXP_RES_TIME) {
- e_sexp_fatal_error (esexp, _("time-day-begin expects argument 1 "
- "to be a time_t"));
- return NULL;
- }
- t = argv[0]->value.time;
-
- result = e_sexp_result_new (esexp, ESEXP_RES_TIME);
- result->value.time = time_day_begin (t);
-
- return result;
-}
-
-/* (time-day-end TIME)
- *
- * TIME - time_t, base time
- *
- * Returns the end of the day, according to the local time.
- */
-static ESExpResult *
-func_time_day_end (ESExp *esexp, int argc, ESExpResult **argv, void *data)
-{
- time_t t;
- ESExpResult *result;
-
- if (argc != 1) {
- e_sexp_fatal_error (esexp, _("time-day-end expects 1 argument"));
- return NULL;
- }
-
- if (argv[0]->type != ESEXP_RES_TIME) {
- e_sexp_fatal_error (esexp, _("time-day-end expects argument 1 "
- "to be a time_t"));
- return NULL;
- }
- t = argv[0]->value.time;
-
- result = e_sexp_result_new (esexp, ESEXP_RES_TIME);
- result->value.time = time_day_end (t);
-
- return result;
-}
-
-/* (get-vtype)
- *
- * Returns a string indicating the type of component (VEVENT, VTODO, VJOURNAL,
- * VFREEBUSY, VTIMEZONE, UNKNOWN).
- */
-static ESExpResult *
-func_get_vtype (ESExp *esexp, int argc, ESExpResult **argv, void *data)
-{
- Query *query;
- QueryPrivate *priv;
- CalComponent *comp;
- CalComponentVType vtype;
- char *str;
- ESExpResult *result;
-
- query = QUERY (data);
- priv = query->priv;
-
- g_assert (priv->next_comp != NULL);
- comp = priv->next_comp;
-
- /* Check argument types */
-
- if (argc != 0) {
- e_sexp_fatal_error (esexp, _("get-vtype expects 0 arguments"));
- return NULL;
- }
-
- /* Get the type */
-
- vtype = cal_component_get_vtype (comp);
-
- switch (vtype) {
- case CAL_COMPONENT_EVENT:
- str = g_strdup ("VEVENT");
- break;
-
- case CAL_COMPONENT_TODO:
- str = g_strdup ("VTODO");
- break;
-
- case CAL_COMPONENT_JOURNAL:
- str = g_strdup ("VJOURNAL");
- break;
-
- case CAL_COMPONENT_FREEBUSY:
- str = g_strdup ("VFREEBUSY");
- break;
-
- case CAL_COMPONENT_TIMEZONE:
- str = g_strdup ("VTIMEZONE");
- break;
-
- default:
- str = g_strdup ("UNKNOWN");
- break;
- }
-
- result = e_sexp_result_new (esexp, ESEXP_RES_STRING);
- result->value.string = str;
-
- return result;
-}
-
-/* Sets a boolean value in the data to TRUE; called from
- * cal_recur_generate_instances() to indicate that at least one instance occurs
- * in the sought time range. We always return FALSE because we want the
- * recurrence engine to finish as soon as possible.
- */
-static gboolean
-instance_occur_cb (CalComponent *comp, time_t start, time_t end, gpointer data)
-{
- gboolean *occurs;
-
- occurs = data;
- *occurs = TRUE;
-
- return FALSE;
-}
-
-/* (occur-in-time-range? START END)
- *
- * START - time_t, start of the time range
- * END - time_t, end of the time range
- *
- * Returns a boolean indicating whether the component has any occurrences in the
- * specified time range.
- */
-static ESExpResult *
-func_occur_in_time_range (ESExp *esexp, int argc, ESExpResult **argv, void *data)
-{
- Query *query;
- QueryPrivate *priv;
- CalComponent *comp;
- time_t start, end;
- gboolean occurs;
- ESExpResult *result;
-
- query = QUERY (data);
- priv = query->priv;
-
- g_assert (priv->next_comp != NULL);
- comp = priv->next_comp;
-
- /* Check argument types */
-
- if (argc != 2) {
- e_sexp_fatal_error (esexp, _("occur-in-time-range? expects 2 arguments"));
- return NULL;
- }
-
- if (argv[0]->type != ESEXP_RES_TIME) {
- e_sexp_fatal_error (esexp, _("occur-in-time-range? expects argument 1 "
- "to be a time_t"));
- return NULL;
- }
- start = argv[0]->value.time;
-
- if (argv[1]->type != ESEXP_RES_TIME) {
- e_sexp_fatal_error (esexp, _("occur-in-time-range? expects argument 2 "
- "to be a time_t"));
- return NULL;
- }
- end = argv[1]->value.time;
-
- /* See if there is at least one instance in that range */
-
- occurs = FALSE;
- cal_recur_generate_instances (comp, start, end, instance_occur_cb, &occurs);
-
- result = e_sexp_result_new (esexp, ESEXP_RES_BOOL);
- result->value.bool = occurs;
-
- return result;
-}
-
-/* Returns whether a list of CalComponentText items matches the specified string */
-static gboolean
-matches_text_list (GSList *text_list, const char *str)
-{
- GSList *l;
- gboolean matches;
-
- matches = FALSE;
-
- for (l = text_list; l; l = l->next) {
- CalComponentText *text;
-
- text = l->data;
- g_assert (text->value != NULL);
-
- if (e_utf8_strstrcase (text->value, str) != NULL) {
- matches = TRUE;
- break;
- }
- }
-
- return matches;
-}
-
-/* Returns whether the comments in a component matches the specified string */
-static gboolean
-matches_comment (CalComponent *comp, const char *str)
-{
- GSList *list;
- gboolean matches;
-
- cal_component_get_comment_list (comp, &list);
- matches = matches_text_list (list, str);
- cal_component_free_text_list (list);
-
- return matches;
-}
-
-/* Returns whether the description in a component matches the specified string */
-static gboolean
-matches_description (CalComponent *comp, const char *str)
-{
- GSList *list;
- gboolean matches;
-
- cal_component_get_description_list (comp, &list);
- matches = matches_text_list (list, str);
- cal_component_free_text_list (list);
-
- return matches;
-}
-
-/* Returns whether the summary in a component matches the specified string */
-static gboolean
-matches_summary (CalComponent *comp, const char *str)
-{
- CalComponentText text;
-
- cal_component_get_summary (comp, &text);
-
- if (!text.value)
- return FALSE;
-
- return e_utf8_strstrcase (text.value, str) != NULL;
-}
-
-/* Returns whether any text field in a component matches the specified string */
-static gboolean
-matches_any (CalComponent *comp, const char *str)
-{
- /* As an optimization, and to make life easier for the individual
- * predicate functions, see if we are looking for the empty string right
- * away.
- */
- if (strlen (str) == 0)
- return TRUE;
-
- return (matches_comment (comp, str)
- || matches_description (comp, str)
- || matches_summary (comp, str));
-}
-
-/* (contains? FIELD STR)
- *
- * FIELD - string, name of field to match (any, comment, description, summary)
- * STR - string, match string
- *
- * Returns a boolean indicating whether the specified field contains the
- * specified string.
- */
-static ESExpResult *
-func_contains (ESExp *esexp, int argc, ESExpResult **argv, void *data)
-{
- Query *query;
- QueryPrivate *priv;
- CalComponent *comp;
- const char *field;
- const char *str;
- gboolean matches;
- ESExpResult *result;
-
- query = QUERY (data);
- priv = query->priv;
-
- g_assert (priv->next_comp != NULL);
- comp = priv->next_comp;
-
- /* Check argument types */
-
- if (argc != 2) {
- e_sexp_fatal_error (esexp, _("contains? expects 2 arguments"));
- return NULL;
- }
-
- if (argv[0]->type != ESEXP_RES_STRING) {
- e_sexp_fatal_error (esexp, _("contains? expects argument 1 "
- "to be a string"));
- return NULL;
- }
- field = argv[0]->value.string;
-
- if (argv[1]->type != ESEXP_RES_STRING) {
- e_sexp_fatal_error (esexp, _("contains? expects argument 2 "
- "to be a string"));
- return NULL;
- }
- str = argv[1]->value.string;
-
- /* See if it matches */
-
- if (strcmp (field, "any") == 0)
- matches = matches_any (comp, str);
- else if (strcmp (field, "comment") == 0)
- matches = matches_comment (comp, str);
- else if (strcmp (field, "description") == 0)
- matches = matches_description (comp, str);
- else if (strcmp (field, "summary") == 0)
- matches = matches_summary (comp, str);
- else {
- e_sexp_fatal_error (esexp, _("contains? expects argument 1 to "
- "be one of \"any\", \"summary\", \"description\""));
- return NULL;
- }
-
- result = e_sexp_result_new (esexp, ESEXP_RES_BOOL);
- result->value.bool = matches;
-
- return result;
-}
-
-/* (has-categories? STR+)
- *
- * STR - At least one string specifying a category
- *
- * Returns a boolean indicating whether the component has all the specified
- * categories.
- */
-static ESExpResult *
-func_has_categories (ESExp *esexp, int argc, ESExpResult **argv, void *data)
-{
- Query *query;
- QueryPrivate *priv;
- CalComponent *comp;
- int i;
- GSList *categories;
- gboolean matches;
- ESExpResult *result;
-
- query = QUERY (data);
- priv = query->priv;
-
- g_assert (priv->next_comp != NULL);
- comp = priv->next_comp;
-
- /* Check argument types */
-
- if (argc < 1) {
- e_sexp_fatal_error (esexp, _("has-categories? expects at least 1 argument"));
- return NULL;
- }
-
- for (i = 0; i < argc; i++)
- if (argv[i]->type != ESEXP_RES_STRING) {
- e_sexp_fatal_error (esexp, _("has-categories? expects all arguments "
- "to be strings"));
- return NULL;
- }
-
- /* Search categories */
-
- cal_component_get_categories_list (comp, &categories);
- if (!categories) {
- result = e_sexp_result_new (esexp, ESEXP_RES_BOOL);
- result->value.bool = FALSE;
-
- return result;
- }
-
- matches = TRUE;
-
- for (i = 0; i < argc; i++) {
- const char *sought;
- GSList *l;
- gboolean has_category;
-
- sought = argv[i]->value.string;
-
- has_category = FALSE;
-
- for (l = categories; l; l = l->next) {
- const char *category;
-
- category = l->data;
-
- if (strcmp (category, sought) == 0) {
- has_category = TRUE;
- break;
- }
- }
-
- if (!has_category) {
- matches = FALSE;
- break;
- }
- }
-
- cal_component_free_categories_list (categories);
-
- result = e_sexp_result_new (esexp, ESEXP_RES_BOOL);
- result->value.bool = matches;
-
- return result;
-}
-
-
-
-/* Adds a component to our the UIDs hash table and notifies the client */
-static void
-add_component (Query *query, const char *uid, gboolean query_in_progress, int n_scanned, int total)
-{
- QueryPrivate *priv;
- char *old_uid;
- CORBA_Environment ev;
-
- if (query_in_progress)
- g_assert (n_scanned > 0 || n_scanned <= total);
-
- priv = query->priv;
-
- if (g_hash_table_lookup_extended (priv->uids, uid, (gpointer *) &old_uid, NULL)) {
- g_hash_table_remove (priv->uids, old_uid);
- g_free (old_uid);
- }
-
- g_hash_table_insert (priv->uids, g_strdup (uid), NULL);
-
- CORBA_exception_init (&ev);
- GNOME_Evolution_Calendar_QueryListener_notifyObjUpdated (
- priv->ql,
- (char *) uid,
- query_in_progress,
- n_scanned,
- total,
- &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION)
- g_message ("add_component(): Could not notify the listener of an "
- "updated component");
-
- CORBA_exception_free (&ev);
-}
-
-/* Removes a component from our the UIDs hash table and notifies the client */
-static void
-remove_component (Query *query, const char *uid)
-{
- QueryPrivate *priv;
- char *old_uid;
- CORBA_Environment ev;
-
- priv = query->priv;
-
- if (!g_hash_table_lookup_extended (priv->uids, uid, (gpointer *) &old_uid, NULL))
- return;
-
- /* The component did match the query before but it no longer does, so we
- * have to notify the client.
- */
-
- g_hash_table_remove (priv->uids, old_uid);
- g_free (old_uid);
-
- CORBA_exception_init (&ev);
- GNOME_Evolution_Calendar_QueryListener_notifyObjRemoved (
- priv->ql,
- (char *) uid,
- &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION)
- g_message ("remove_component(): Could not notify the listener of a "
- "removed component");
-
- CORBA_exception_free (&ev);
-}
-
-/* Removes a component from the list of pending UIDs */
-static void
-remove_from_pending (Query *query, const char *remove_uid)
-{
- QueryPrivate *priv;
- GList *l;
-
- priv = query->priv;
-
- for (l = priv->pending_uids; l; l = l->next) {
- char *uid;
-
- g_assert (priv->n_pending > 0);
-
- uid = l->data;
- if (strcmp (remove_uid, uid))
- continue;
-
- g_free (uid);
-
- priv->pending_uids = g_list_remove_link (priv->pending_uids, l);
- g_list_free_1 (l);
- priv->n_pending--;
-
- g_assert ((priv->pending_uids && priv->n_pending != 0)
- || (!priv->pending_uids && priv->n_pending == 0));
-
- break;
- }
-}
-
-static struct {
- char *name;
- ESExpFunc *func;
-} functions[] = {
- /* Time-related functions */
- { "time-now", func_time_now },
- { "make-time", func_make_time },
- { "time-add-day", func_time_add_day },
- { "time-day-begin", func_time_day_begin },
- { "time-day-end", func_time_day_end },
-
- /* Component-related functions */
- { "get-vtype", func_get_vtype },
- { "occur-in-time-range?", func_occur_in_time_range },
- { "contains?", func_contains },
- { "has-categories?", func_has_categories }
-};
-
-/* Initializes a sexp by interning our own symbols */
-static ESExp *
-create_sexp (Query *query)
-{
- ESExp *esexp;
- int i;
-
- esexp = e_sexp_new ();
-
- for (i = 0; i < (sizeof (functions) / sizeof (functions[0])); i++)
- e_sexp_add_function (esexp, 0, functions[i].name, functions[i].func, query);
-
- return esexp;
-}
-
-/* Evaluates the query sexp on the specified component and notifies the listener
- * as appropriate.
- */
-static void
-match_component (Query *query, const char *uid,
- gboolean query_in_progress, int n_scanned, int total)
-{
- QueryPrivate *priv;
- char *comp_str;
- CalComponent *comp;
- icalcomponent *icalcomp;
- gboolean set_succeeded;
- ESExpResult *result;
-
- priv = query->priv;
-
- comp_str = cal_backend_get_object (priv->backend, uid);
- g_assert (comp_str != NULL);
-
- icalcomp = icalparser_parse_string (comp_str);
- g_assert (icalcomp != NULL);
-
- g_free (comp_str);
-
- comp = cal_component_new ();
- set_succeeded = cal_component_set_icalcomponent (comp, icalcomp);
- g_assert (set_succeeded);
-
- /* Eval the sexp */
-
- g_assert (priv->next_comp == NULL);
-
- priv->next_comp = comp;
- result = e_sexp_eval (priv->esexp);
- gtk_object_unref (GTK_OBJECT (comp));
- priv->next_comp = NULL;
-
- if (!result) {
- const char *error_str;
- CORBA_Environment ev;
-
- error_str = e_sexp_error (priv->esexp);
- g_assert (error_str != NULL);
-
- CORBA_exception_init (&ev);
- GNOME_Evolution_Calendar_QueryListener_notifyEvalError (
- priv->ql,
- error_str,
- &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION)
- g_message ("match_component(): Could not notify the listener of "
- "an evaluation error");
-
- CORBA_exception_free (&ev);
- return;
- } else if (result->type != ESEXP_RES_BOOL) {
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
- GNOME_Evolution_Calendar_QueryListener_notifyEvalError (
- priv->ql,
- _("Evaluation of the search expression did not yield a boolean value"),
- &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION)
- g_message ("match_component(): Could not notify the listener of "
- "an unexpected result value type when evaluating the "
- "search expression");
-
- CORBA_exception_free (&ev);
- } else {
- /* Success; process the component accordingly */
-
- if (result->value.bool)
- add_component (query, uid, query_in_progress, n_scanned, total);
- else
- remove_component (query, uid);
- }
-
- e_sexp_result_free (priv->esexp, result);
-}
-
-/* Processes a single component that is queued in the list */
-static gboolean
-process_component_cb (gpointer data)
-{
- Query *query;
- QueryPrivate *priv;
- char *uid;
- GList *l;
-
- query = QUERY (data);
- priv = query->priv;
-
- /* No more components? */
-
- if (!priv->pending_uids) {
- g_assert (priv->n_pending == 0);
-
- priv->idle_id = 0;
- return FALSE;
- }
-
- g_assert (priv->n_pending > 0);
-
- /* Fetch the component */
-
- l = priv->pending_uids;
- priv->pending_uids = g_list_remove_link (priv->pending_uids, l);
- priv->n_pending--;
-
- g_assert ((priv->pending_uids && priv->n_pending != 0)
- || (!priv->pending_uids && priv->n_pending == 0));
-
- uid = l->data;
- g_assert (uid != NULL);
-
- g_list_free_1 (l);
-
- bonobo_object_ref (BONOBO_OBJECT (query));
-
- match_component (query, uid,
- TRUE,
- priv->pending_total - priv->n_pending,
- priv->pending_total);
-
- bonobo_object_unref (BONOBO_OBJECT (query));
-
- g_free (uid);
-
- return TRUE;
-}
-
-/* Populates the query with pending UIDs so that they can be processed
- * asynchronously.
- */
-static void
-populate_query (Query *query)
-{
- QueryPrivate *priv;
-
- priv = query->priv;
- g_assert (priv->idle_id == 0);
-
- priv->pending_uids = cal_backend_get_uids (priv->backend, CALOBJ_TYPE_ANY);
- priv->pending_total = g_list_length (priv->pending_uids);
- priv->n_pending = priv->pending_total;
-
- priv->idle_id = g_idle_add (process_component_cb, query);
-}
-
-/* Idle handler for starting a query */
-static gboolean
-start_query_cb (gpointer data)
-{
- Query *query;
- QueryPrivate *priv;
- CORBA_Environment ev;
-
- query = QUERY (data);
- priv = query->priv;
-
- priv->idle_id = 0;
-
- priv->esexp = create_sexp (query);
-
- /* Compile the query string */
-
- g_assert (priv->sexp != NULL);
- e_sexp_input_text (priv->esexp, priv->sexp, strlen (priv->sexp));
-
- if (e_sexp_parse (priv->esexp) == -1) {
- const char *error_str;
-
- error_str = e_sexp_error (priv->esexp);
- g_assert (error_str != NULL);
-
- CORBA_exception_init (&ev);
- GNOME_Evolution_Calendar_QueryListener_notifyQueryDone (
- priv->ql,
- GNOME_Evolution_Calendar_QueryListener_PARSE_ERROR,
- error_str,
- &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION)
- g_message ("start_query_cb(): Could not notify the listener of "
- "a parse error");
-
- CORBA_exception_free (&ev);
- return FALSE;
- }
-
- /* Populate the query with UIDs so that we can process them asynchronously */
-
- populate_query (query);
-
- return FALSE;
-}
-
-/* Callback used when the backend gets loaded; we just queue the query to be
- * started later.
- */
-static void
-backend_opened_cb (CalBackend *backend, CalBackendOpenStatus status, gpointer data)
-{
- Query *query;
- QueryPrivate *priv;
-
- query = QUERY (data);
- priv = query->priv;
-
- if (status == CAL_BACKEND_OPEN_SUCCESS) {
- g_assert (cal_backend_is_loaded (backend));
- g_assert (priv->idle_id == 0);
-
- priv->idle_id = g_idle_add (start_query_cb, query);
- }
-}
-
-/* Callback used when a component changes in the backend */
-static void
-backend_obj_updated_cb (CalBackend *backend, const char *uid, gpointer data)
-{
- Query *query;
-
- query = QUERY (data);
-
- bonobo_object_ref (BONOBO_OBJECT (query));
-
- match_component (query, uid, FALSE, 0, 0);
- remove_from_pending (query, uid);
-
- bonobo_object_unref (BONOBO_OBJECT (query));
-}
-
-/* Callback used when a component is removed from the backend */
-static void
-backend_obj_removed_cb (CalBackend *backend, const char *uid, gpointer data)
-{
- Query *query;
- QueryPrivate *priv;
-
- query = QUERY (data);
- priv = query->priv;
-
- bonobo_object_ref (BONOBO_OBJECT (query));
-
- remove_component (query, uid);
- remove_from_pending (query, uid);
-
- bonobo_object_unref (BONOBO_OBJECT (query));
-}
-
-/**
- * query_construct:
- * @query: A live search query.
- * @backend: Calendar backend that the query object will monitor.
- * @ql: Listener for query results.
- * @sexp: Sexp that defines the query.
- *
- * Constructs a #Query object by binding it to a calendar backend and a query
- * listener. The @query object will start to populate itself asynchronously and
- * call the listener as appropriate.
- *
- * Return value: The same value as @query, or NULL if the query could not
- * be constructed.
- **/
-Query *
-query_construct (Query *query,
- CalBackend *backend,
- GNOME_Evolution_Calendar_QueryListener ql,
- const char *sexp)
-{
- QueryPrivate *priv;
- CORBA_Environment ev;
-
- g_return_val_if_fail (query != NULL, NULL);
- g_return_val_if_fail (IS_QUERY (query), NULL);
- g_return_val_if_fail (backend != NULL, NULL);
- g_return_val_if_fail (IS_CAL_BACKEND (backend), NULL);
- g_return_val_if_fail (ql != CORBA_OBJECT_NIL, NULL);
- g_return_val_if_fail (sexp != NULL, NULL);
-
- priv = query->priv;
-
- CORBA_exception_init (&ev);
- priv->ql = CORBA_Object_duplicate (ql, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_message ("query_construct(): Could not duplicate the listener");
- priv->ql = CORBA_OBJECT_NIL;
- CORBA_exception_free (&ev);
- return NULL;
- }
- CORBA_exception_free (&ev);
-
- priv->backend = backend;
- gtk_object_ref (GTK_OBJECT (priv->backend));
-
- gtk_signal_connect (GTK_OBJECT (priv->backend), "obj_updated",
- GTK_SIGNAL_FUNC (backend_obj_updated_cb),
- query);
- gtk_signal_connect (GTK_OBJECT (priv->backend), "obj_removed",
- GTK_SIGNAL_FUNC (backend_obj_removed_cb),
- query);
-
- priv->sexp = g_strdup (sexp);
-
- /* Queue the query to be started asynchronously */
-
- if (cal_backend_is_loaded (priv->backend)) {
- g_assert (priv->idle_id == 0);
- priv->idle_id = g_idle_add (start_query_cb, query);
- } else
- gtk_signal_connect (GTK_OBJECT (priv->backend), "opened",
- GTK_SIGNAL_FUNC (backend_opened_cb),
- query);
-
- return query;
-}
-
-/**
- * query_new:
- * @backend: Calendar backend that the query object will monitor.
- * @ql: Listener for query results.
- * @sexp: Sexp that defines the query.
- *
- * Creates a new query engine object that monitors a calendar backend.
- *
- * Return value: A newly-created query object, or NULL on failure.
- **/
-Query *
-query_new (CalBackend *backend,
- GNOME_Evolution_Calendar_QueryListener ql,
- const char *sexp)
-{
- Query *query;
-
- query = QUERY (gtk_type_new (QUERY_TYPE));
- if (!query_construct (query, backend, ql, sexp)) {
- bonobo_object_unref (BONOBO_OBJECT (query));
- return NULL;
- }
-
- return query;
-}
diff --git a/calendar/pcs/query.h b/calendar/pcs/query.h
deleted file mode 100644
index bd10351fcb..0000000000
--- a/calendar/pcs/query.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* Evolution calendar - Live search query implementation
- *
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Author: Federico Mena-Quintero <federico@ximian.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 QUERY_H
-#define QUERY_H
-
-#include <libgnome/gnome-defs.h>
-#include <bonobo/bonobo-xobject.h>
-#include "cal-backend.h"
-
-BEGIN_GNOME_DECLS
-
-
-
-#define QUERY_TYPE (query_get_type ())
-#define QUERY(obj) (GTK_CHECK_CAST ((obj), QUERY_TYPE, Query))
-#define QUERY_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), QUERY_TYPE, QueryClass))
-#define IS_QUERY(obj) (GTK_CHECK_TYPE ((obj), QUERY_TYPE))
-#define IS_QUERY_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), QUERY_TYPE))
-
-typedef struct _QueryPrivate QueryPrivate;
-
-typedef struct {
- BonoboXObject xobject;
-
- /* Private data */
- QueryPrivate *priv;
-} Query;
-
-typedef struct {
- BonoboXObjectClass parent_class;
-
- POA_GNOME_Evolution_Calendar_Query__epv epv;
-} QueryClass;
-
-GtkType query_get_type (void);
-
-Query *query_construct (Query *query,
- CalBackend *backend,
- GNOME_Evolution_Calendar_QueryListener ql,
- const char *sexp);
-
-Query *query_new (CalBackend *backend,
- GNOME_Evolution_Calendar_QueryListener ql,
- const char *sexp);
-
-
-
-END_GNOME_DECLS
-
-#endif
diff --git a/camel/.cvsignore b/camel/.cvsignore
deleted file mode 100644
index 3fa8afaa38..0000000000
--- a/camel/.cvsignore
+++ /dev/null
@@ -1,11 +0,0 @@
-.deps
-Makefile
-Makefile.in
-.libs
-.deps
-*.lo
-*.la
-*.bb
-*.bbg
-*.da
-*.gcov
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 dca89bc6a1..0000000000
--- a/camel/ChangeLog
+++ /dev/null
@@ -1,12134 +0,0 @@
-2001-04-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-utils.c (header_raw_check_mailing_list): regex
- doesn't set errno and regcomp returns 0 on success and any other
- value for an error (so don't *just* check for -1).
-
-2001-04-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-cipher-context.c: Check to make sure the context is a
- valid context in all the user functions.
-
-2001-04-13 Jon Trowbridge <trow@ximian.com>
-
- * providers/imap/camel-imap-store.c (imap_disconnect):
- s/imap_store/store/, fixing a typo that was causing the build to
- fail.
-
- * camel-filter-search.c (get_source): Make the (previously unused)
- get-source command actually do the right thing, properly shrouding
- any passed-in source and falling back to use the source attached
- to the mime message.
-
-2001-04-13 Dan Winship <danw@ximian.com>
-
- * camel-object.c (camel_object_hook_event):
- * camel-uid-cache.c (camel_uid_cache_get_new_uids):
- * camel-url.c (camel_url_new_with_base): Plug leaks.
-
- * camel-remote-store.c (camel_remote_store_init): Don't
- re-initialize the folders hash table.
-
- * providers/imap/camel-imap-store.c (imap_disconnect): Free
- authtypes since they'll be re-read on re-connect.
- (get_folder_info): Free folderinfos that we're discarding from the
- list.
-
-2001-04-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-pgp-context.c (camel_pgp_context_get_type): Oops, lets not
- get into a recursive call here ;-)
-
- * tests/smime/pgp.c: Updated to reflect changes to the PGP code.
-
- * tests/smime/pgp-mime.c: Same.
-
-2001-04-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-pgp-mime.c: Updated to reflect the few changes made to the
- CamelPgpContext class.
-
- * camel-pgp-context.c: Updated to subclass of CamelCipherContext.
-
- * camel-cipher-context.[c,h]: New base class for
- CamelPgpContext. Also contains the replacement for
- CamelPgpValidity, CamelCipherValidity.
-
-2001-04-12 Dan Winship <danw@ximian.com>
-
- * camel-mime-filter-crlf.c (filter): Fix a pair of array bounds
- reads noted by purify
-
-2001-04-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel.h: #include the pgp stuff.
-
-2001-04-12 Dan Winship <danw@ximian.com>
-
- * providers/imap/camel-imap-message-cache.c
- (camel_imap_message_cache_remove):
- * camel-url.c (camel_url_to_string): Plug memory leaks.
-
-2001-04-11 Dan Winship <danw@ximian.com>
-
- * providers/imap/camel-imap-utils.c (imap_parse_string_generic):
- Simplify peterw's imap_is_atom_char fix.
-
-2001-04-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * tests/smime/Makefile.am: Added pgp-mime.c to the tests.
-
- * tests/smime/pgp-mime.c: Test suite for camel-pgp-mime.c functions.
-
- * Makefile.am: Add camel-pgp-mime.[c,h] to the build.
-
- * camel-pgp-mime.c: Made a number of fixes to get it to compile
- and also fixed a few logic errors (mostly forgetting to reset
- streams) so that it worked (thanks to the pgp-mime test program).
-
-2001-04-11 JP Rosevear <jpr@ximian.com>
-
- * providers/imap/Makefile.am: user GNOME_INCLUDEDIR since gnome
- files are included in the top level camel headers and the gtk
- include dir is now versioned and such
-
- * providers/local/Makefile.am: ditto
-
- * providers/pop3/Makefile.am: ditto
-
- * providers/smtp/Makefile.am: ditto
-
- * providers/sendmail/Makefile.am: ditto
-
- * camel-service.c: use five arg version of gethostbyname_r if
- appropriate
- (camel_get_host_byname): check if msg->herr is non-zero instead of
- checking if msg->hp is null since we may not always have msg->hp
-
-2001-04-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-sasl-digest-md5.c (digest_response): Use
- camel_charset_locale_name() to get the locale charset rather than
- checking the CHARSET environment variable. This is a much less
- ugly hack. Also: If we fail to be able to convert to UTF8, then
- disavow all knowledge of the charset parameter.
-
- * camel-charset-map.c (camel_charset_locale_name): New function to
- return the locale charset (or NULL if US-ASCII).
-
-2001-04-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-pgp-context.c (camel_pgp_verify): Use
- e_utf8_from_locale_string() rather than trying to do it manually
- since Lauris's version works much better.
-
-2001-04-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * Makefile.am: Added camel-pgp-context.[c,h] to the build. Also
- added tests/smime/pgp.c and Makefile.am
-
- * tests/smime/pgp.c: New test suite for PGP functions.
-
- * camel-pgp-context.c: Various fixes to get it to build.
-
-2001-04-07 Peter Williams <peterw@ximian.com>
-
- * providers/imap/camel-imap-utils.c (imap_parse_string_generic): It
- would be a good idea to recognize '\0'. Before, this code was running
- off the ends of strings and intermittently coredumping (if it didn't
- hit an imap_atom_char first) -- whoops!
-
-2001-04-05 Not Zed <NotZed@Ximian.com>
-
- * merge from evolution-0-10-branch to evolution-0-10-merge-0
-
-2001-04-03 Jeffrey Stedfast <fejj@ximian.com>
-
- * Makefile.am: Added tests/ back in
-
- * camel-mime-utils.c (header_decode_text): Ignore whitespace
- between encoded words (there were a few cases where it didn't
- before).
- (header_encode_string): Preserve whitespace between words that are
- to be encoded by encoding them too.
- (header_encode_phrase): Same here but with phrases.
-
-2001-04-03 Dan Winship <danw@ximian.com>
-
- * providers/imap/camel-imap-folder.c (imap_sync): If we don't
- change any flags or expunge, send a NOOP to give the server a
- chance to send EXISTS, etc, messages.
- (imap_get_message): If the server_level < IMAP4rev1, always fetch
- messages all-at-once, since they don't support the [#.MIME]
- syntax.
- (imap_update_summary): When reading message flags, set the
- server_flags field as well, and don't overwrite any flags set by
- camel_folder_summary_info_new_from_message. Might help with some
- of the flag problems...
-
-2001-04-02 Dan Winship <danw@ximian.com>
-
- * camel-service.h: Remove the "quick_login" member, which is
- unnecessary.
-
- * providers/smtp/camel-smtp-transport.c (smtp_auth): Remove the
- references to quick_login and fix this to use the CamelSasl
- interfaces correctly to do the same thing.
- (connect_to_server): Split this out of smtp_connect
- (smtp_connect): Use connect_to_server. When re-EHLO'ing after
- auth, ignore errors.
- (query_auth_types): Use connect_to_server rather than
- smtp_connect, so it doesn't try to authenticate. Add LOGIN
- authtype to the list of authtypes to check for.
-
- * providers/smtp/camel-smtp-provider.c
- (camel_provider_module_init): Add LOGIN authtype to the authtypes
- list explicitly.
-
- * camel-sasl.c (camel_sasl_authtype_list): Don't list LOGIN here:
- it's not a real SASL authtype and is only used for SMTP.
-
- * camel-sasl-plain.c:
- * camel-sasl-login.c:
- * camel-sasl-kerberos4.c:
- * camel-sasl-cram-md5.c:
- * camel-sasl-anonymous.c:
- * providers/pop3/camel-pop3-provider.c: Remove "quick_login"
- argument from authtypes.
-
-2001-04-02 Gediminas Paulauskas <menesis@delfi.lt>
-
- * camel-filter-driver.c: marked missing report status' for translation.
-
-2001-04-02 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-pgp-context.c (camel_pgp_sign): mutex lock & unlock the
- context.
- (camel_pgp_clearsign): Same.
- (camel_pgp_verify): Same.
- (camel_pgp_encrypt): Same.
- (camel_pgp_decrypt): And finally here...
-
- * camel-pgp-context.h: Update the function prototypes to match
- those found in camel-pgp-context.c.
-
- * camel-pgp-context.c: Updated.
-
- * camel-pgp-mime.c (camel_pgp_mime_part_sign): Implemented.
- (camel_pgp_mime_part_verify): Implemented.
- (camel_pgp_mime_part_encrypt): Implemented.
- (camel_pgp_mime_part_decrypt): Implemented.
-
-2001-04-01 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-sasl-login.[c,h]: New files to handle the LOGIN SASL
- mechanism.
-
- * camel-sasl-plain.c: Removed the definition of
- camel_sasl_login_authtype.
-
- * camel-sasl.c (camel_sasl_new): Oops. I thought LOGIN was an
- alias to PLAIN. I was wrong. These two SASL objects have to be
- separate.
-
- * providers/smtp/camel-smtp-transport.c (smtp_auth): Updated to
- check for and use authmech->quick_login when available.
-
-2001-04-01 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/pop3/camel-pop3-provider.c: Updated the authtypes here
- too.
-
- * camel-sasl-plain.c:
- * camel-sasl-anonymous.c:
- * camel-sasl-digest-md5.c:
- * camel-sasl-cram-md5.c:
- * camel-sasl-kerberos4.c: Updated the authtype values.
-
- * camel-service.h: Added another field to CamelServiceAuthType
- that specifies whether or not the mechanism supports "quick auth"
- which means that the client can send the initial challenge in the
- AUTH request.
-
- * camel-sasl.c (camel_sasl_new): Add support for LOGIN.
- (camel_sasl_authtype_list): Here too.
- (camel_sasl_authtype): And finally here.
-
- * camel-sasl-plain.c: Define camel_sasl_login_authtype.
-
- * providers/smtp/camel-smtp-transport.c (smtp_auth): Only unref
- the SASL object if it exists.
-
-2001-03-30 Dan Winship <danw@ximian.com>
-
- * providers/pop3/camel-pop3-store.c (connect_to_server,
- query_auth_types, pop3_connect): Move things around here to make
- this all work right again (so you don't get prompted for a
- password when checking the supported authtypes.)
-
-2001-03-30 Jon Trowbridge <trow@ximian.com>
-
- * camel-mime-message.c (camel_mime_message_set_source): Shrould
- our source URL before putting it into X-Evolution-Source.
-
-2001-03-29 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-store.c (get_folder_info): Don't
- blindly append "/INBOX", construct a CamelURL and set the path
- that way.
- (parse_list_response_as_folder_info): Don't blindly append
- "/<foldername>", construct a CamelURL and set the path that way
- instead.
- (get_folders_offline): And again here.
-
-2001-03-30 Not Zed <NotZed@Ximian.com>
-
- * camel-service.c (camel_get_host_byname): Dont overwrite an
- exception if we got one already. Added camel_operation status to
- it, and comment out some debug.
-
-2001-03-29 Not Zed <NotZed@Ximian.com>
-
- * providers/smtp/camel-smtp-transport.c (smtp_connect): Free host
- name info when done ... blah blah.
-
- * camel-sasl-kerberos4.c (krb4_challenge): Free host name info
- after we're done with it.
-
- * camel-sasl-digest-md5.c (digest_md5_challenge): Free host name
- info after we're done with it.
-
- * camel-remote-store.c (remote_connect): Free the host name info
- from get_host after we're finished with it.
-
- * camel-service.c (camel_get_host_byname): New function to
- lookup a name, and still be cancellable.
- (camel_free_host): And a function to free the structure
- returned.
- (camel_service_gethost): Call get_host_byname for this.
-
-2001-03-29 Jon Trowbridge <trow@ximian.com>
-
- * camel-filter-driver.c (camel_filter_driver_filter_message): Save
- the source URL using camel_mime_message_set_source.
-
- * camel-mime-message.c (camel_mime_message_set_source): Renamed
- camel_mime_message_set_identity to this. Sets the X-Evolution-Source
- header.
- (camel_mime_message_get_source): Returns the X-Evolution-Source
- header.
-
-2001-03-29 Kjartan Maraas <kmaraas@gnome.org>
-
- * broken-date-parser.c: #include <stdio.h>, <stdlib.h> and <string.h>
- * broken-date-parser.h: Remove all includes but <glib.h>
- * camel-address.h: Added #include <glib.h>
- * camel-data-wrapper.c: Move system includes to the top.
- * camel-data-wrapper.h: #include <glib.h>
- * camel-exception.c: #ifdef HAVE_CONFIG_H
- * camel-exception.h: Remove #include <glib.h>
- * camel-filter-driver.c: #ifdef HAVE_CONFIG_H and move system
- headers to top. Mark strings in camel_exception_set*() for i18n.
- * camel-filter-driver.h: #include <glib.h>
- * camel-filter-search.c: #ifdef HAVE_CONFIG_H
- * camel-folder-search.c: #include <config.h>
- * camel-folder-search.h: Header shuffling
- * camel-folder-summary.h: Same here
- * camel-folder-thread.c: #ifdef HAVE_CONFIG_H
- * camel-folder.c: Here too.
- * camel-folder.h: #include <glib.h>
- * camel-internet-address.c: Move system headers up
- * camel-lock.c: #ifdef HAVE_CONFIG_H
- * camel-medium.c: Same here
- * camel-mime-filter-bestenc.c: Move system headers up
- * camel-mime-filter-from.c: Same here
- * camel-mime-filter-linewrap.c: And here
- * camel-mime-filter.c: #include <string.h> to fix warnings from new gcc
- * camel-mime-filter.h: System headers moved up
- * camel-mime-message.c: Here too. #ifdef HAVE_CONFIG_H added
- * camel-mime-part-utils.c: #ifdef HAVE_CONFIG_H added
- * camel-mime-part.c: Here too, and shuffle headers
- * camel-mime-utils.c: #ifdef HAVE_CONFIG_H. Remove const from two
- variables to remove warning.
- * camel-mime-utils.h: Shuffle headers
- * camel-movemail.c: #ifdef HAVE_CONFIG_H. Mark string in camel_exception_set
- * camel-multipart.c: #ifdef HAVE_CONFIG_H. Added includes to remove
- warnings from new gcc
- * camel-object.c: #ifdef HAVE_CONFIG_H
- * camel-object.h: Shuffle headers
- * camel-operation.c: #ifdef HAVE_CONFIG_H
- * camel-provider.c: #ifdef HAVE_CONFIG_H. Shuffle headers. Mark a string
- * camel-remote-store.c: #ifdef HAVE_CONFIG_H
- * camel-sasl-anonymous.c: #ifdef HAVE_CONFIG_H. #include <string.h>
- * camel-sasl-cram-md5.c: #ifdef HAVE_CONFIG_H. #include <string.h> and
- <stdio.h> to remove warnings.
- * camel-sasl-digest-md5.c: #ifdef HAVE_CONFIG_H. shuffle headers
- * camel-sasl-digest-md5.h: Shuffle headers.
- * camel-sasl-kerberos4.c: #ifdef HAVE_CONFIG_H. Shuffle headers.
- * camel-sasl-kerberos4.h: Shuffle headers.
- * camel-sasl-plain.c: #ifdef HAVE_CONFIG_H. Shuffle
- * camel-sasl.c: #ifdef HAVE_CONFIG_H. #include <string.h>
- * camel-search-private.c: #include <config.h>
- * camel-seekable-stream.c: #ifdef HAVE_CONFIG_H
- * camel-seekable-stream.h: Shuffle
- * camel-seekable-substream.c: #ifdef HAVE_CONFIG_H
- * camel-service.c: Same
- * camel-service.h: Shuffle
- * camel-session.c: #ifdef HAVE_CONFIG_H
- * camel-store.c: Same
- * camel-stream-buffer.c: Here too
- * camel-stream-buffer.h: Shuffle
- * camel-stream-filter.c: #include <string.h>
- * camel-stream-fs.c: #ifdef HAVE_CONFIG_H
- * camel-stream-fs.h: Shuffle headers
- * camel-stream-mem.c: Same as above
- * camel-stream-mem.h: Here too
- * camel-stream-null.c: #ifdef HAVE_CONFIG_H
- * camel-stream.c: Here too
- * camel-stream.h: Shuffle
- * camel-tcp-stream-openssl.c: #ifdef HAVE_CONFIG_H
- * camel-tcp-stream-raw.c: Same here. and move local includes down
- * camel-tcp-stream-ssl.c: Same as above
- * camel-tcp-stream.c: #ifdef HAVE_CONFIG_H
- * camel-tcp-stream.h: move local include down
- * camel-transport.c: #ifdef HAVE_CONFIG_H
- * camel-transport.h: #include <glib.h>
- * camel-uid-cache.c: #ifdef HAVE_CONFIG_H. Shuffle headers
- * camel-uid-cache.h: Shuffle
- * camel-url.c: #ifdef HAVE_CONFIG_H
- * camel-vee-folder.c: #ifdef HAVE_CONFIG_H. Shuffle headers
- * camel-vee-folder.h: #include <glib.h>
- * camel-vee-store.h: Same here
- * camel.c: #ifdef HAVE_CONFIG_H
- * gstring-util.c: Here too
- * hash-table-utils.c: Remove #include <glib.h>
- * hash-table-utils.h: #include it here instead.
- * string-utils.c: #ifdef HAVE_CONFIG_H
- * providers/cache/camel-cache-map.c: #ifdef HAVE_CONFIG_H, shuffle
- headers and mark strings in camel_exception_set*()
- * providers/cache/camel-cache-provider.c: #ifdef HAVE_CONFIG_H
- * providers/cache/camel-cache-store.c: Same here, and mark a string.
- * providers/imap/camel-imap-command.c: #ifdef HAVE_CONFIG_H
- * providers/imap/camel-imap-command.h: Shuffle header
- * providers/imap/camel-imap-folder.c: #ifdef HAVE_CONFIG_H
- * providers/imap/camel-imap-message-cache.c: #ifdef HAVE_CONFIG_H
- * providers/imap/camel-imap-provider.c: #ifdef HAVE_CONFIG_H and
- #include <string.h>
- * providers/imap/camel-imap-search.c: #ifdef HAVE_CONFIG_H
- * providers/imap/camel-imap-store.c: #ifdef HAVE_CONFIG_H and mark
- a string.
- * providers/imap/camel-imap-summary.c: Shuffle headers
- * providers/imap/camel-imap-wrapper.c: #ifdef HAVE_CONFIG_H. Shuffle
- * providers/local/camel-local-folder.c: #ifdef HAVE_CONFIG_H
- * providers/local/camel-local-provider.c: #ifdef HAVE_CONFIG_H
- * providers/local/camel-local-store.c: Same here
- * providers/local/camel-local-summary.c: Here too, shuffle, mark a string
- * providers/local/camel-maildir-folder.c: #ifdef HAVE_CONFIG_H
- * providers/local/camel-maildir-store.c: Same
- * providers/local/camel-maildir-summary.c: Here too
- * providers/local/camel-mbox-summary.c: And here
- * providers/local/camel-mbox-store.c: And here
- * providers/local/camel-mbox-summary.c: #include <config.h>
- * providers/local/camel-mh-folder.c: #ifdef HAVE_CONFIG_H
- * providers/local/camel-mh-store.c: same
- * providers/local/camel-mh-summary.c: #ifdef HAVE_CONFIG_H, shuffle headers
- and mark a string for translation.
- * providers/nntp/camel-nntp-auth.c: #include <config.h>
- * providers/nntp/camel-nntp-store.c: Remove superfluous arg to
- CAMEL_SERVICE_CLASS to make it compile
- * providers/pop3/camel-pop3-provider.c: #ifdef HAVE_CONFIG_H
- * providers/pop3/camel-pop3-store.c: Same here
- * providers/sendmail/camel-sendmail-provider.c: Here too
- * providers/sendmail/camel-sendmail-transport.c: Here too
- * providers/smtp/camel-smtp-provider.c: Same
- * providers/smtp/camel-smtp-transport.c: #ifdef HAVE_CONFIG_H, mark
- strings for translations.
-
-2001-03-29 Dan Winship <danw@ximian.com>
-
- * camel-url.c (camel_url_to_string): change "gboolean show_passwd"
- to "guint32 flags".
-
- * tests/misc/url.c (main): Update calls to camel_url_to_string
-
- * providers/imap/camel-imap-store.c (construct): Call
- camel_url_to_string with flags to hide password, authtype, and
- params to create the base_url.
- (etc): Update for the fact that the base_url no longer has the "/"
- at the end.
-
- * camel-service.c (construct): Update calls to camel_url_to_string
- (pass CAMEL_URL_HIDE_PASSWORD)
-
-2001-04-03 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-utils.c (header_decode_text): Ignore whitespace
- between encoded words (there were a few cases where it didn't
- before).
- (header_encode_string): Preserve whitespace between words that are
- to be encoded by encoding them too.
- (header_encode_phrase): Same here but with phrases.
-
-2001-04-04 Kjartan Maraas <kmaraas@gnome.org>
-
- * camel-filter-driver.c: Added #include <config.h>. Marked
- a bunch of strings for translation.
- * camel-folder-search.c: Added #include <config.h>.
- * camel-folder-summary.c: Same here.
- * camel-movemail.c: Marked strings for translation.
- * camel-provider.c: Same here.
- * camel-search-private.c: #include <config.h>
- * camel-vee-folder.c: Mark string for translation.
- * providers/local/camel-mbox-summary.c: #include <config.h>
-
-2001-04-03 Dan Winship <danw@ximian.com>
-
- * providers/imap/camel-imap-folder.c (imap_sync): If we don't
- change any flags or expunge, send a NOOP to give the server a
- chance to send EXISTS, etc, messages.
- (imap_get_message): If the server_level < IMAP4rev1, always fetch
- messages all-at-once, since they don't support the [#.MIME]
- syntax.
-
-2001-04-01 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-store.c (get_folder_info): Don't
- blindly append "/INBOX", construct a CamelURL and set the path
- that way.
- (parse_list_response_as_folder_info): Don't blindly append
- "/<foldername>", construct a CamelURL and set the path that way
- instead.
- (get_folders_offline): And again here.
-
-2001-03-31 Not Zed <NotZed@Ximian.com>
-
- * camel-operation.c (struct _status_stack): change stamp to
- unsigned to avoid overflow.
- (camel_operation_end):
- (camel_operation_progress_count):
- (camel_operation_progress): Double the delay before transient
- events start showing their own progress.
-
-2001-03-30 Not Zed <NotZed@Ximian.com>
-
- * providers/pop3/camel-pop3-folder.c (pop3_get_message): Change
- the pop download into a transient event.
-
- * camel-operation.c (stamp): Get a timestamp that changes 4x a
- second (or rather, arbitrarily more often than 1/second).
- (camel_operation_progress): Use stamp() for time updates.
- (camel_operation_progress_count): "
- (camel_operation_start): Store the status as a struct status_stack
- item.
- (camel_operation_start_transient): New function to start a
- transient event, which is only reported if it runs for too
- long/and is reset afterwards.
- (camel_operation_progress):
- (camel_operation_progress_count): Fix for status_stack changes,
- and account for transient updates.
-
- * camel-filter-driver.c (camel_filter_driver_filter_folder): When
- we remove things (set deleted), always set seen too, to mirror
- interface behaviour when you delete.
- (camel_filter_driver_filter_message): And same here too.
-
-2001-03-30 Dan Winship <danw@ximian.com>
-
- * providers/pop3/camel-pop3-store.c (connect_to_server,
- query_auth_types, pop3_connect): Move things around here to make
- this all work right again (so you don't get prompted for a
- password when checking the supported authtypes.)
-
-2001-03-29 Dan Winship <danw@ximian.com>
-
- * camel-url.c (camel_url_to_string): change "gboolean show_passwd"
- to "guint32 flags".
-
- * tests/misc/url.c (main): Update calls to camel_url_to_string
-
- * providers/imap/camel-imap-store.c (construct): Call
- camel_url_to_string with flags to hide password, authtype, and
- params to create the base_url.
- (etc): Update for the fact that the base_url no longer has the "/"
- at the end.
-
- * camel-service.c (construct): Update calls to camel_url_to_string
- (pass CAMEL_URL_HIDE_PASSWORD)
-
-2001-03-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-pgp-context.[c,h]: New class for PGP encrypting,
- decrypting, signing and verifying. Next I'll be moving the
- contents of mail/mail-crypto into Camel. These files will
- basically replace mail/openpgp-utils.[c,h].
-
-2001-03-29 Not Zed <NotZed@Ximian.com>
-
- * camel-folder-search.c (search_body_contains): Optimise the match
- "" case, just match everything in the folder (if we have it).
-
- * camel-vtrash-folder.c (vtrash_move_messages_to): Access the
- folder directly from the message info.
- (vtrash_move_messages_to): I think we also need to call the real
- move_messages_to, and not try and bypass the lock, since we dont
- have the lock for that folder.
-
- * camel-vee-folder.h: Move CamelVeeMessageInfo to public, so
- subclasses can get to it.
-
- * camel-vee-folder.c (camel_vee_folder_add_folder): Dont let you
- add a vfolder to itself.
- (folder_changed):
- (vee_folder_remove_folder):
- (vee_folder_build_folder): Copy changes before triggering changed
- events, so we can do them outside of locks.
- (camel_vee_folder_get_message_folder): Removed function.
- (camel_vee_folder_hash_folder): Made public (renamed from
- hash_folder), simply for subclasses (probably not needed).
- (vee_expunge): Oops, call the class sync, not superclass sync.
- (vee_sync): Remove some accidental debug.
-
-2001-03-27 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-service.c (get_path): Add the port (if user defined) to
- the path to fix bug #1996.
-
- Danw: I'm iffy on the "fix" so I'd like you to comment.
-
-2001-03-27 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/pop3/camel-pop3-folder.c (pop3_sync): If we aren't
- going to even check the resp/free buffer that gets returned from
- camel_pop3_command, don't even bother using it. Send in NULL
- instead.
- (pop3_get_message): Check to make sure that the `result' string is
- non-NULL. It's possible that some POP servers may return with
- "+OK\r\n<message>..." rather than the expected
- "+OK ### octets\r\n<message>..."
-
-2001-03-27 Not Zed <NotZed@Ximian.com>
-
- * camel-folder-summary.c (camel_folder_summary_finalize): Unref
- the html filter when done.
- (summary_build_content_info): Disable using the html parser to
- help index html mails until it gets sorted out.
-
- * camel-vee-folder.c (folder_changed): Fix a cut n paste bug, we
- want uid_removed not uid_changed deref, fixes bug #1999.
-
-2001-03-27 Dan Winship <danw@ximian.com>
-
- * camel-sasl.c (camel_sasl_authtype_list): add an argument to say
- whether or not you want "PLAIN" in the list (so you don't end up
- with "Password" twice in the config dialog).
-
- * providers/imap/camel-imap-provider.c (camel_provider_module_init):
- * providers/imap/camel-imap-store.c (query_auth_types): We don't
- want PLAIN.
-
- * providers/smtp/camel-smtp-provider.c (camel_provider_module_init):
- * providers/smtp/camel-smtp-transport.c (query_auth_types): But we
- do.
-
-2001-03-27 Dan Winship <danw@ximian.com>
-
- * camel-provider.h: Add an "extra_conf" field to CamelProvider
- with structures and defines and stuff, for providers to specify
- additional configuration options that they want. Also add a
- "supports ssl" flag to the provider flags.
-
- * camel-url.c (camel_url_new_with_base): Fix parsing of params.
- (output_param): And unparsing...
-
- * camel-remote-store.c: add a "default_ssl_port" field.
- (remote_construct): If the URL has the "use_ssl" parameter, set
- the store's use_ssl flag.
- (remote_connect): If using SSL and no port specified, use the
- default_ssl_port rather than the default_port.
-
- * providers/smtp/camel-smtp-provider.c (smtp_provider): add
- CAMEL_PROVIDER_SUPPORTS_SSL and CAMEL_URL_ALLOW_USER. (The config
- gui code knows that the ALLOW_USER and ALLOW_AUTH go together.)
- (ssmtp_provider): gone
-
- * providers/smtp/camel-smtp-transport.c (smtp_construct): Set a
- flag if "use_ssl" param is set.
- (smtp_connect): Check the CamelSmtpTransport use_ssl flag rather
- than checking if this is smtp or ssmtp.
-
- * providers/imap/camel-imap-provider.c (imap_conf_entries): Add a
- bunch of IMAP-specific configuration options, like "check for new
- mail in all folders" (default TRUE), "show only subscribed
- folders" (default TRUE), "ignore server-supplied namespace", and
- "apply filters to INBOX" (not yet implemented).
- (imap_provider): We support SSL and we no longer allow a path in
- the URL. (namespace is handled via extra_conf)
- (simap_provider): Gone
-
- * providers/imap/camel-imap-store.c (camel_imap_store_init): Set
- default_ssl_port, don't set CAMEL_STORE_SUBSCRIPTIONS here
- (construct): remove simap stuff, deal with "use_lsub",
- "namespace", "check_all", and "filter" parameters. Set base_url
- to not include params.
- (imap_store_setup_online): Don't ask for the namespace if it was
- set explicitly. Don't get subscribed folders if !use_lsub.
- (imap_concat): Fix a bug.
- (get_folder_info): Support for not checking all folders.
-
- * providers/imap/camel-imap-folder.c (imap_get_full_name): Rewrite
- to use imap_store->namespace, not service->url->path
-
- * providers/pop3/camel-pop3-provider.c (pop3_conf_entries): "keep
- on server" (currently still implemented by the mailer code, not
- here), "delete after N days" (not yet implemented).
- (pop3_provider): we support SSL
- (spop_provider): gone
-
- * providers/pop3/camel-pop3-store.c (camel_pop3_store_init): Set
- default_ssl_port
- (pop3_connect): Remove spop code
-
-2001-03-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-vee-folder.c (vee_folder_construct): Move all of the
- camel_vee_folder_construct() internals here.
- (camel_vee_folder_construct): This function basically becomes a
- wrapper for vee_folder_construct and also checks to make sure that
- the UNMATCHED vfodler is constructed otherwise constructs it.
- (camel_vee_folder_new): Call vee_folder_construct() instead so
- that we don't get into a dead-lock.
-
-2001-03-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-store.c (init_trash): Use camel_vtrash_folder_new() to
- create the vtrash folder now.
-
- * camel-vtrash-folder.[c,h]: New subclass of CamelVeeFolder for
- our vTrash folders.
-
- * camel-folder.c (camel_folder_copy_messages_to): Don't watch for
- vtrash folders anymore.
- (camel_folder_move_messages_to): Same.
-
- * camel-vee-folder.c (camel_vee_folder_class_init): Update.
- (vee_move_messages_to): Rewrite to use the new move API.
-
- * camel-filter-driver.c (do_copy): Updated to reflect
- copy_message_to changes. Create a temporary uid array and use
- that.
- (do_move): Same.
- (camel_filter_driver_filter_message): And again, here...
-
- * providers/imap/camel-imap-folder.c (imap_copy_messages_to):
- Update to the new API.
- (imap_move_messages_to): Same.
- (get_uid_set): New function to create a `set' string based on an
- array of UIDs for use with imap_copy_messages_to.
-
- * camel-folder.c (camel_folder_copy_messages_to): Replaces
- camel_folder_copy_message_to
- (camel_folder_move_message_to): Replaces
- camel_folder_move_message_to.
-
-2001-03-27 Not Zed <NotZed@Ximian.com>
-
- * camel-vee-store.c (vee_get_folder): Added folder_created event
- here.
-
- * camel-vee-folder.c (unmatched_finalise): Removed, moved into
- main finalise code.
- (message_changed): Just create a new change entry and promote it
- to a folder_changed thing.
- (vee_sync): Always rebuild folder on sync, even when not expunge.
- (folder_changed): If not autoupdating, make sure we remove any
- removed entries.
- (vee_folder_build_folder):
- (vee_folder_remove_folder): NOP if we're called on
- folder_unmatched.
- (vee_search_by_expression): Only search each folder once. Should
- we also order the result in summary order?
-
-2001-03-20 Not Zed <NotZed@Ximian.com>
-
- * camel-store.c (init_trash): Fix calling for vee_folder_new().
-
- * camel-folder-summary.c (camel_folder_summary_remove_index):
- Optimise slightly, use ptr_array_remove_index rather than have to
- search for the index by using summary_remove.
-
- * camel-vee-folder.h: Removed local member from VeeFolder, since
- it was never used.
-
- * camel-vee-store.c (camel_vee_store_finalise): Setup finalise
- function.
-
- * camel-vee-folder.c (camel_vee_folder_set_expression): New
- function to set the query of an existing vfolder.
- (camel_vee_folder_construct): New function for
- convenience/subclasses.
- (camel_vee_folder_new): Removed exception parameter, no longer
- needed (since we dont search yet).
- (camel_vee_folder_new): Changed to use folder_construct, and no
- longer raise the folder created signal.
- (vee_folder_build_folder): Make it return error on exception, so
- we can work without exceptions.
- (vee_folder_remove_folder): Use remove index rather than
- remove_uid, this is ok since we have the summary locked for our
- own access.
- (camel_vee_folder_add_folder): Only add the folder to the
- unmatched private if it is not a private folder.
- (camel_vee_folder_remove_folder): Only remove the folder from
- unmatched if it is not private.
- (vee_expunge): Just call sync with expunge set.
- (vee_sync): If expunging, also refresh the search.
- (vee_folder_build_folder): We do our own locking now, removed from
- callers, also trigger changed events here too (within locks),
- fixed callers appropriately.
- (vee_folder_remove_folder): Do our own locking, and trigger
- changed events.
- (vee_folder_add_info): Renamed of vee_folder_add, we now take a
- hash of the folder name, rather than use the folders address.
- (hash_folder): Convert a folder name into an 8 character hash.
- (vee_get_message, vee_search_by_expression, vee_set_message_flags,
- vee_set_message_user_flag, vee_move_message_to): Changed the uid
- to be an 8 byte hash + original uid, with no ':' anymore.
-
-2001-03-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-utils.c (header_decode_text): When writing the last
- token (if not rfc2047 encoded), don't use g_string_append_len, use
- append_latin1.
-
- * camel-mime-message.c (write_to_stream): Don't spew a warning if
- the message-id wasn't set by the application, not a big deal since
- we create one right here.
-
-2001-03-26 Dan Winship <danw@ximian.com>
-
- * providers/imap/camel-imap-command.c (camel_imap_command): keep a
- reference on the store's current_folder.
-
- * providers/imap/camel-imap-store.c (camel_imap_store_finalize):
- (imap_disconnect): unref the current_folder before clearing it.
-
- * camel-url.c (camel_url_get_param): Add missing accessor.
-
- * camel-session.c (camel_session_get_provider): New. Return
- the provider for a URL.
-
-2001-03-25 Dan Winship <danw@ximian.com>
-
- * camel-url.c (camel_url_new_with_base): New URL parser with full
- RFC1808 relative URL support. Yum.
- (camel_url_new): Wrapper around camel_url_new_with_base now.
-
- * tests/Makefile.am: add misc subdir
-
- * tests/misc/url.c: relative URL test cases from RFC 1808
-
-2001-03-25 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-filter-driver.c (do_copy): Don't use copy_to if the source
- folder doesn't support summary info's.
- (do_move): Same.
- (camel_filter_driver_filter_message): And again here. I think
- this will fix the problem of "colour" tags not staying with the
- message when it's copied to a folder during the filter process.
-
-2001-03-24 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-sasl-digest-md5.c (digest_response): Do charset conversion
- on the username param here if needed.
- (parse_server_challenge): Protect against possibly empty-string
- charset values.
-
-2001-03-23 Jon Trowbridge <trow@ximian.com>
-
- * camel-filter-driver.c (camel_filter_driver_filter_message):
- Don't call camel_mime_message_set_identity. (The call is
- commented out, left over from some earlier experimentation that I
- want to be able to remember later...)
-
- * camel-mime-message.c (camel_mime_message_set_identity): Added.
- A function to set the X-Evolution-Identity header.
-
-2001-03-22 Dan Winship <danw@ximian.com>
-
- * providers/imap/camel-imap-command.c (imap_read_response): Don't
- look at untagged responses other than "* BYE"...
- (camel_imap_response_free): ...do it here instead...
- (camel_imap_response_free_without_processing): ...but not here.
-
- * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
- Remove the "EXISTS" line from the response so
- camel_imap_response_free won't try to process it.
- (camel_imap_folder_selected): If we get an EXISTS response mixed
- in with the FETCH responses, record the new EXISTS value.
- Use camel_imap_response_free_without_processing so that an EXISTS
- response won't cause a loop.
- (imap_rescan): Use camel_imap_response_free_without_processing.
- (imap_update_summary): Use
- camel_imap_response_free_without_processing. If an EXISTS response
- shows up, call imap_update_summary again to get the new messages.
- (imap_protocol_get_summary_specifier): Use BODY.PEEK[0], not
- RFC822.HEADER for prev IMAP4rev1, since the FETCH parser won't
- deal with RFC822.HEADER responses.
-
- * providers/imap/camel-imap-store.c (get_folder_info): Fix an
- uninitialized variable
-
-2001-03-21 Dan Winship <danw@ximian.com>
-
- * camel-provider.h: (CamelProvider) add a "GList *authtypes", so
- you can get the list of authtypes used by a provider without
- needing to have an actual CamelService object handy. (Will be
- needed by the new config druid.)
- (CAMEL_PROVIDER_ALLOWS, CAMEL_PROVIDER_NEEDS): New macros to test
- the URL part stuff, since the way it works is too complicated and
- everyone always does it wrong.
-
- * camel-service.c (camel_service_query_auth_types): Remove the
- @connected arg again: if you don't want to connect, you can just
- get the list of authtypes off the provider.
- (camel_service_free_auth_types): Remove this. All existing
- implementations do authtypes the same way, so just say the caller
- should "g_list_free" the list. (Oh, look, removing this function
- doesn't actually cause the mailer to not build. How 'bout that.)
- (construct, get_path): Use the new URL part macros.
-
- * camel-remote-store.c (remote_query_auth_types): Update
- (remote_free_auth_types): Nuke
- (camel_remote_store_authtype_list): New function for use by
- subclasses.
-
- * providers/imap/camel-imap-provider.c:
- * providers/pop3/camel-pop3-provider.c:
- * providers/smtp/camel-smtp-provider.c: Update CamelProvider
- structures.
- (camel_provider_module_init): Put all the SSL parts together so
- there's only 1 #ifdef. Set up the provider authtypes field using
- the SASL, CamelRemoteStore, and standard authtypes, as
- appropriate. Copy that from the normal provider to the SSL
- provider.
-
- * providers/local/camel-local-provider.c:
- * providers/sendmail/camel-sendmail-provider.c:
- * camel-session.c: Update CamelProvider structures.
-
- * providers/imap/camel-imap-store.c (query_auth_types):
- * providers/pop3/camel-pop3-store.c (query_auth_types): Update
-
- * providers/smtp/camel-smtp-store.c (query_auth_types): Update.
- Remove the no_authtype, because that's what "ALLOW_AUTH" rather
- than "NEED_AUTH" means.
- (free_auth_types): Nuke.
-
-2001-03-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-filter-driver.c (camel_filter_driver_filter_message):
- Return -1 on fail.
- (camel_filter_driver_filter_folder): Same.
- (camel_filter_driver_filter_mbox): Same.
- (camel_filter_driver_filter_folder): Return -1 if an exception was
- set as well.
-
-2001-03-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-tcp-stream-openssl.c (camel_tcp_stream_openssl_finalize):
- Free the expected host.
- (camel_tcp_stream_openssl_new): Now takes a Service and an
- expected_host. Set them.
-
-2001-03-20 Dan Winship <danw@ximian.com>
-
- * providers/imap/camel-imap-store.c
- (camel_imap_store_check_online): Function to check if the store is
- online and set an exception if not. Currently controlled by an
- environment variable, but eventually there will be both a global
- (session-level) setting and a per-store setting.
- (construct): Set up storage_path and base_url here rather than at
- connect-time.
- (imap_auth_loop): Split out from imap_connect.
- (imap_setup_online): Split out from imap_connect. Do the
- post-authentication connection setup, and cache the results to
- disk.
- (imap_setup_offline): Set up a CamelImapStore with information
- saved from a previous imap_setup_online.
- (imap_connect): If online, do connect_to_server(),
- imap_auth_loop(), and imap_setup_online(). Otherwise, do
- imap_setup_offline().
- (get_folder, get_folder_info): Add offline support.
- (create_folder, subscribe_folder, unsubscribe_folder): Disable
- these when offline (for now).
-
- * providers/imap/camel-imap-folder.c (camel_imap_folder_new):
- Remove the sync'ing-with-server stuff... it's done by
- camel_imap_folder_selected now, which only gets called if the
- store is online.
- (camel_imap_folder_selected): add the code removed from
- camel_imap_folder_new. Besides simplifying the folder_new and
- summary_new code, this also means now that we'll DTRT if a
- folder's UIDVALIDITY changes while we're connected. Also, when
- that happens, clear the message cache explicitly.
- (imap_refresh_info, imap_sync): These are no-ops when offline.
- (imap_expunge, imap_append_message, imap_copy_message_to,
- imap_search_by_expression): These don't yet work offline.
- (imap_get_message, camel_imap_folder_fetch_data): Return an error
- when trying to fetch a non-cached body part when we're offline.
-
- * providers/imap/camel-imap-summary.c (camel_imap_summary_new):
- Rewrite to not check the validity here. (We'll do it from
- camel_imap_folder_selected instead.)
-
- * providers/imap/camel-imap-command.c (camel_imap_command): Call
- camel_imap_folder_selected even when the selection is all we're
- doing, to match the changes in camel-imap-folder.c.
-
- * providers/imap/camel-imap-message-cache.c
- (camel_imap_message_cache_clear): New function to clear out a
- message cache.
-
-2001-03-19 Christopher James Lahey <clahey@ximian.com>
-
- * Makefile.am (INCLUDES): Added $(EXTRA_GNOME_CFLAGS)
-
-2001-03-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/pop3/camel-pop3-store.c (pop3_connect): Set the errbuf
- to NULL after freeing it? I don't think this should fix bug #1801
- but I guess it can't hurt.
-
-2001-03-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-remote-store.c (remote_recv_line): Protect against a
- possibly NULL exception.
-
- * camel-filter-driver.c (camel_filter_driver_filter_message):
- Document and modify to return a boolean value denoting whether or
- not errors occured during processing.
- (camel_filter_driver_filter_mbox): Same as above and also modified
- to check return codes of filter_message rather than relying only
- on whether or not the exception was set (as it's possible to pass
- in NULL for the exception).
- (camel_filter_driver_filter_folder): Same as above.
-
- * camel-mime-utils.c (header_param_list_format_append): Quote the
- param value if it contains whitespace as well.
-
-2001-03-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * Makefile.am: Don't include system include dir.
-
- * camel.c: Use quotes around the nss.h include so it doesn't try
- to use the systen nss.h file.
-
- * camel-tcp-stream-ssl.c: Same here.
-
-2001-03-17 Not Zed <NotZed@Ximian.com>
-
- * providers/local/camel-maildir-summary.c (maildir_summary_sync):
- Modified patch from Dan Berger <dberger@ix.netcom.com> to re-check
- the maildir directory for new/updated messages at sync time.
-
- * camel-folder.c (camel_folder_ref_message_info): Implemented.
- (ref_message_info): And default implementation.
-
- * camel-folder.h: Added ref_message_info virtual method.
-
-2001-03-16 Not Zed <NotZed@Ximian.com>
-
- * camel-folder-thread.c
- (camel_folder_thread_messages_new_summary): New function to create
- a thread tree from a supplied summary array.
- (camel_folder_thread_messages_destroy): Handle thread trees
- generated by the above function properly.
-
-2001-03-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-private.h: Same.
-
- * camel-remote-store.h: Fixed #include to use <>'s instead of ""'s
-
-2001-03-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-tcp-stream-ssl.c (ssl_bad_cert): Print info about the
- issuer of the certificate.
-
- * providers/smtp/camel-smtp-transport.c (smtp_connect): Use
- camel_tcp_stream_get_socket().
-
- * camel-tcp-stream-openssl.c (stream_get_socket): Implemented.
-
- * camel-tcp-stream-ssl.c (stream_get_socket): Implemented.
-
- * camel-tcp-stream-raw.c (stream_get_socket): Implemented.
-
- * camel-tcp-stream.c (camel_tcp_stream_get_socket): New function.
-
-2001-03-16 Kjartan Maraas <kmaraas@gnome.org>
-
- * providers/pop3/camel-pop3-folder.c: Added #include <config.h>
-
-2001-03-16 Dan Winship <danw@ximian.com>
-
- * camel-mime-utils.c (header_msgid_generate): Don't use
- getdomainname: it's NIS crap, not DNS.
-
-2001-03-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel.c (camel_init): Don't use the hardcoded cert db directory,
- use the one passed in.
-
- * camel-tcp-stream-ssl.c (ssl_get_client_auth): Wrote the default
- implementation. Not that we'll use this though, since this is the
- default implementation provided by NSS anyway. This more or less
- serves as a reference in case we want to change anything.
- (ssl_auth_cert): Same.
- (ssl_bad_cert): Changed the prompt string and free it when we're
- done.
-
-2001-03-15 Dan Winship <danw@ximian.com>
-
- First batch of disconnected IMAP-related stuff. This adds local
- caching of message parts, but NOT any actual disconnected support.
- (But it should speed up IMAP use.)
-
- * providers/imap/camel-imap-message-cache.c: New class for caching
- message data to disk, and removing it when it's no longer
- relevant. Will eventually also support merging message parts
- together to save on files. Or maybe using a db instead of files?
-
- * providers/imap/camel-imap-private.h: Add a cache_lock to
- CamelImapFolderPrivate. This lock must be recursive, so make both
- locks EMutexes rather than GMutex.
-
- * providers/imap/camel-imap-folder.c (parse_fetch_response): "The
- only FETCH response parser you need!" Replaces the various
- almost-correct bits of code formerly scattered throughout this
- file with a single fully-correct function that can handle any
- FETCH response at any time, so we don't get confused by seeing a
- flags update when we were only expecting a message body, etc.
- (camel_imap_folder_fetch_data): FETCH a message body part either
- from the cache or the server
- (camel_imap_folder_changed): Remove expunged messages from the
- message cache.
- (camel_imap_folder_new): Change to take a directory instead of a
- summary file name. Create a CamelImapMessageCache for the folder.
- (imap_finalize): Unref the message cache.
- (camel_imap_folder_selected, imap_rescan, get_content,
- get_message, imap_get_message, imap_update_summary): Redone a
- bunch to use parse_fetch_data, CamelImapMessageCache, etc.
-
- * providers/imap/camel-imap-store.c (get_folder): Pass directory
- name to camel_imap_folder_new, not summary filename. Use
- e_path_to_physical to generate a path with /subfolders/ inserted
- between directory components.
-
- * providers/imap/camel-imap-wrapper.c (camel_imap_wrapper_new):
- Call camel_imap_folder_fetch_data (with cache_only TRUE) and if
- the data is cached, return an online datawrapper rather than an
- offline one.
- (write_to_stream): Use camel_imap_folder_fetch_data (with
- cache_only FALSE) here too
-
- * providers/imap/camel-imap-utils.c (imap_skip_list): Renamed from
- skip_list and made non-static.
-
-2001-03-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-tcp-stream-ssl.h: Uninclude prnetdb.h since it's not
- needed here.
-
- * providers/smtp/camel-smtp-transport.c: #include prnetdb.h here
- instead of making camel-tcp-stream-ssl.h include it. Prevents some
- header bloat.
-
- * providers/smtp/Makefile.am: Include the NSPR_CFLAGS and
- NSS_CFLAGS.
-
-2001-03-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/smtp/camel-smtp-transport.c (smtp_connect): Update for
- using CamelTcpStreams and also for using SSL.
-
- * providers/smtp/libcamelsmtp.urls: defined "ssmtp"
-
- * providers/smtp/camel-smtp-provider.c: Defined the Secure SMTP
- provider.
- (camel_provider_module_init): Register the Secure SMTP provider.
-
-2001-03-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-store.c (imap_connect): Check for
- "simap" instead of "imaps".
-
- * providers/pop3/camel-pop3-store.c (pop3_connect): Change the
- port to be 995 for spop.
-
- * providers/pop3/libcamelpop3.urls: Change to "spop".
-
- * providers/imap/libcamelimap.urls: Change "imaps" to "simap" to
- correspond to /etc/services.
-
-2001-03-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/pop3/camel-pop3-store.c (pop3_connect): Check to see
- if we are using "pops" and then set the appropriate SSL settings.
-
- * providers/pop3/libcamelpop3.urls: Add "pops"
-
- * providers/pop3/camel-pop3-provider.c: Defined the pops provider.
- (camel_provider_module_init): Register the pops provider.
-
-2001-03-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_new): Ya know what?
- Lets not ref the service because otherwise we'll start having the
- same problems we had back with vtrash. Besides, since the store
- owns the stream, it's not like the store is going anywhere without
- the stream anyway.
- (camel_tcp_stream_ssl_finalize): No need to unref the service.
-
-2001-03-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-remote-store.c (remote_connect): Pass the service into the
- SSL stream, not the session.
-
- * camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_init): Set the
- service to NULL.
- (camel_tcp_stream_ssl_finalize): Unref the service.
- (camel_tcp_stream_ssl_new): Takes a CamelService arg now rather
- than a CamelSession arg.
-
-2001-03-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel.c (camel_init): So it turns out that NSS_Init *isn't*
- idempotent, so we have to protect against initializing it more
- than once(contrary to what their design specs suggest).
-
- * camel-session.c (camel_session_get_service): Use
- camel_exception_is_set() - Makes no difference but it's more
- consistant with how we normally do it.
-
- * camel-provider.h (CAMEL_URL_ALLOW_SSL): We don't need this.
-
- * providers/imap/camel-imap-provider.c: Define the imaps provider.
- (camel_provider_module_init): Register the imaps provider.
-
- * camel-provider.c (camel_provider_init): Only add the protocol to
- the hash table if it's non empty. Also, g_strdup() the filename
- into the hash table.
-
- * providers/imap/camel-imap-store.c (camel_imap_store_init): Eek!
- So the service's URL isn't set until after this is
- initialized. This means we can't check for SSL here.
- (imap_connect): Set the SSL options here instead.
-
-2001-03-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-tcp-stream-ssl.c: Numerous fixes to get it to build
- correctly with NSS enabled.
-
- * camel-remote-store.c (remote_connect): Pass in the session and
- expected host args, oops.
-
- * camel-provider.h (CAMEL_URL_ALLOW_SSL): Defined.
-
- * providers/imap/camel-imap-store.c (camel_imap_store_init): Check
- to see if we are supposed to use SSL and set the options
- accordingly.
- (imap_connect): Return FALSE here instead of NULL.
-
- * providers/imap/camel-imap-provider.c: Add CAMEL_URL_ALLOW_SSL.
-
- * providers/imap/libcamelimap.urls: Add "imaps" which is the
- protocol for Secure IMAP.
-
-2001-03-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-tcp-stream-openssl.[c,h]: Added
-
- * Makefile.am: Added camel-tcp-stream-openssl.[c,h] to the build.
-
- * camel-types.h: Added CamelTcpStreamSSL and CamelTcpStreamOpenSSL
-
-2001-03-14 Not Zed <NotZed@Ximian.com>
-
- * camel-mime-filter-charset.c (filter, complete): re-constify
- inbuf, to remove a warning.
-
- * camel-mime-parser.c (folder_scan_step): When we're out of data,
- run the filter_complete. For some reason the logic that was there
- was never being run, always try it now, i think it was to work
- around a buggy filter, rather than fix it the right way.
-
- * camel-folder-summary.c (summary_build_content_info): If indexing
- html parts, use the html filter to convert it to some indexable
- format.
- (summary_build_content_info): Reset the filters before adding them
- back to the stream, if they get re-used in a given instance
- (likely).
-
- * Makefile.am (libcamelinclude_HEADERS): Added
- camel-mime-filter-html.[ch].
- (INCLUDES): Added xml clags
-
-2001-03-05 Not Zed <NotZed@Ximian.com>
-
- * camel-folder-search.c (camel_folder_search_class_init): Setup a
- new function, "uid" which matches uids.
- (search_uid): Implement the "match uid" command.
-
-2001-03-13 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-utils.c: Check for a new type of mailing list header.
-
-2001-03-13 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-tcp-stream-raw.c (stream_read): Made cancellable.
- (stream_write): Same.
- (stream_connect): Removed checks for DIVINE_INTERVENTION as the
- code worked fine.
-
- * camel-tcp-stream-ssl.c (stream_write): get rid of 'w' as it
- wasn't really needed.
- (set_errno): New function to set errno based on the NSPR error
- code.
- (stream_read): If an error occured, call set_errno().
- (stream_write): Same.
-
-2001-03-13 Jeffrey Stedfast <fejj@ximian.com>
-
- * Makefile.am: Added camel-tcp-stream-ssl to the build.
-
- * camel-remote-store.h: Add a use_ssl member to the
- CamelRemoteStore object.
-
-2001-03-13 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_get_type):
- Oops. Make this a subclass of CamelTcpStream, not CamelStream.
-
- * camel-types.h: Add the defs for CamelTcpStream and
- CamelTcpStreamRaw
-
- * Makefile.am: Add camel-tcp-stream and camel-tcp-stream-raw to
- the build.
-
- * camel-remote-store.c (remote_connect): Update to use
- CamelTcpStreams.
-
- * camel-tcp-stream-raw.c (stream_connect): Made cancellable by
- copying the currently used code in camel-remote-store.c.
- (stream_setsockopt): Oops, flags = fcntl (..., GET_FL);
- (camel_tcp_stream_raw_get_type): Oops. Make this a subclass of
- CamelTcpStream, not CamelStream.
-
-2001-03-13 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel.c (camel_init): Since all of the Mozilla libs (including
- NSPR and NSS) correctly handle reinitializations, we might as well
- init both NSPR and NSS in camel_init so we can be sure of that
- these libs have been initialized.
- (camel_shutdown): New function to call the NSS cleanup stuff.
-
-2001-03-13 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-folder.c (camel_folder_copy_message_to): Don't allow the
- user to copy a message to or from the vtrash folder. Set an
- exception if they try.
- (camel_folder_move_message_to): This one is a bit more
- complicated: 1) If the user tried to move a message from the
- vtrash into the original folder, just undelete the message. 2) If
- the user tries to move the message to the vtrash folder, then just
- mark the message as deleted. 3) If the user tries to move the
- message from the vTrash to a folder other than the original, use
- the original folder as the source. As another optimization, I've
- made it so that if the user tries to move a message to the same
- folder, just no-op.
- (move_message_to): Unset the deleted flag before moving (assuming
- it's there).
- (copy_message_to): Same.
-
- * camel-vee-folder.c (camel_vee_folder_get_message_folder): New
- convenience function to get the folder from which the message uid
- is derived from.
-
-2001-03-13 Dan Winship <danw@ximian.com>
-
- * providers/imap/camel-imap-store.c (imap_connect): When trying
- again after a failed password attempt, check if the connection got
- dropped (which Courier will do) and deal accordingly.
-
- * providers/sendmail/camel-sendmail-transport.c (sendmail_send_to,
- sendmail_send): More fixing for exim: It can't deal with "-tif",
- you need to say "-t -i -f".
-
-2001-03-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-store.c (init_trash): Rename the folder to "Trash" and
- i18nify it.
-
-2001-03-09 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-tcp-stream-ssl.h: Comment out everything unless HAVE_NSS
- is defined.
-
- * camel-tcp-stream-ssl.c (stream_read): Don't use errno, use
- nspr's error code stuff.
- (stream_write): Same.
-
-2001-03-09 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-session.c (camel_session_query_authenticator): Created a
- new mode (CAMEL_AUTHENTICATOR_ACCEPT) which is a Yes/No prompt to
- the user. This will be needed by the SSL/TLS code to come. Also
- changed the return value to a gpointer rather than a char* to
- allow the returning of TRUE/FALSE values.
-
- * camel.c: Wrap stuff with HAVE_NSS
-
-2001-03-09 Dan Winship <danw@ximian.com>
-
- * providers/sendmail/camel-sendmail-transport.c (sendmail_send,
- sendmail_send_to): Remove the "-U" for now, because it breaks
- exim's "sendmail" wrapper. (And it doesn't actually do all that
- much to sendmail's behavior, and it was working fine before
- anyway.)
-
- * camel-mime-utils.c (header_fold): Fix a bug that could make this
- walk off the end of a string. (The bug has been there since
- December... maybe this will fix some unreproduceable crashes?)
-
-2001-03-08 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-store.c (camel_store_get_folder): Changes so that the
- folder gets added to the vtrash reguardless of whether or not the
- store is holding it's own folder lookup hash.
- (init_trash): Oops, lets try locking the cache before we go and
- add all the cached folders to the vtrash.
-
-2001-03-08 Jeffrey Stedfast <fejj@ximian.com>
- These fixes make it so that the CamelStore does not actually hold
- a ref on it's vTrash folder. The vTrash folder is now created ONLY
- when it is requested. This solves the problem of not being able to
- unref a Store and have it disconnect/finalize like we expect it to.
-
- * camel-store.c (init_trash): When we create the vtrash, add all
- previously opened folders to it and hook on to the finalize event
- so that we can then set the store->vtrash to NULL.
- (get_trash): If a vtrash folder for the store doesn't exist,
- init_trash() and then try.
- (construct): No longer need this.
- (camel_store_class_init): Don't override the construct method.
- (camel_store_finalize): We no longer hold a ref on the vtrash so
- don't unref it.
-
-2001-03-07 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/pop3/camel-pop3-store.c (init_trash): Implement.
- (get_trash): Implement.
- (camel_pop3_store_class_init): Override the default init_trash and
- get_trash virtual functions. Hopefully this should fix the problem
- of pop3 sotre's not disconnecting after the send&recv code
- finishes downloading mail.
-
- Wonder if I should override the default implementation for the
- mbox, mh, and maildir too?
-
-2001-03-07 Dan Winship <danw@ximian.com>
-
- * camel-remote-store.c (camel_remote_store_connected): Return the
- return value of camel_service_connect rather than returning
- !camel_exception_is_set(), since that will be wrong if ex==NULL...
- Fixes a crash in the IMAP keepalive code, but this same problem
- probably exists in other places too...
- (remote_recv_line): Fix another problem...
-
- * providers/local/camel-mbox-provider.c:
- * providers/vee/.cvsignore:
- * providers/vee/libcamelvee.urls: Remove some unused stuff
-
-2001-03-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-sasl-digest-md5.c (compute_response): Redone so as to save
- on memory allocations and speed.
-
-2001-03-05 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-sasl-plain.c (plain_challenge): Don't return NULL if the
- token is non-NULL. This is why:
-
- sending : AUTH PLAIN
- received: 334 ok. go on. <-- this is why
- sending : ZGZPaQpAZ214Lm5ldBBnb29jYXI=
- received: 235 {mp005-rz3} go ahead
-
- * camel-sasl.c (camel_sasl_authtype): Add the PLAIN type here.
- (camel_sasl_authtype_list): And here too.
-
- * camel-sasl-plain.c: Initialize the camel_sasl_plain_authtype.
-
- * camel-sasl-plain.h: extern the camel_sasl_plain_authtype.
-
-2001-03-05 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-store.c (imap_connect): i18n'd some
- strings in here.
-
- * providers/smtp/camel-smtp-transport.c (smtp_connect): Keep
- trying to authenticate until either we succeed or until the user
- cancels.
-
-2001-03-04 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-utils.c: Wrote a new version of header_fold() that
- takes a 'force' option and uses another new function called
- header_fold_next_space() in place of strchr(inptr, ' ') to get the
- next whitespace char. The idea of header_fold_next_space() is to
- not treat spaces between a set of quotes as a space - this way it
- will be possible to fold (for example) the Content-Type MIME
- header without worrying about breaking up a boundary string.
- Note: This code is #if 0'd out until Zucchi approves of the patch.
- Another Note: We will probably still want to use the "don't fold
- this header" hash lookup for headers like the Message-Id and
- possibly a few others.
-
-2001-03-04 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-internet-address.c
- (camel_internet_address_encode_address): Make sure there is a
- space between the name and the address tokens.
-
- * camel-mime-utils.c (rfc2047_decode_word): encoded string
- segments need to be at least 8 chars (7 doesn't leave room for an
- ecoding value. To be more realistic, even 8 chars isn't enough as
- this assumes there is no charset nor any encoded text. If the
- encoding value is not 'Q' or 'B', then return NULL. This fixes bug
- #1689.
-
-2001-03-03 Not Zed <NotZed@Ximian.com>
-
- * camel-vee-folder.c (vee_folder_remove_folder): New function to
- remove a folder from a vfolder.
- (camel_vee_folder_remove_folder): New public function to remove a
- folder from a vfolder.
-
-2001-03-02 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/smtp/camel-smtp-provider.c: Doh! Set the
- CAMEL_URL_ALLOW_AUTH flag.
-
- * providers/smtp/camel-smtp-transport.c (get_smtp_error_string):
- Updated with the extended AUTH return codes.
-
-2001-03-02 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-store.c (try_auth): Don't forget to
- unref the SASL object.
-
- * providers/smtp/camel-smtp-transport.c (query_auth_types):
- Implemented.
- (smtp_auth): Implemented.
- (smtp_helo): Don't bother parsing the authtypes if we already have
- them.
- (smtp_connect): call smtp_auth() here if we found any authtypes.
- (smtp_disconnect): Updated as I now use a hash table for the
- supported authtypes rather than a linked list.
- (esmtp_get_authtypes): modify to use a hash table instead of a
- linked list and also use isspace() rather than == ' '.
-
-2001-03-02 Dan Winship <danw@ximian.com>
-
- * providers/sendmail/camel-sendmail-transport.c (sendmail_send_to,
- sendmail_send): Use "-f" to set the envelope from address so
- bounces go to the right place. Also, pass "-U" since the man page
- says we're supposed to...
-
-2001-03-01 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-sasl.c: #include "camel-sasl-digest-md5.h"
- (camel_sasl_authtype_list): add DIGEST-MD5 stuff here.
- (camel_sasl_authtype): And here too.
- (camel_sasl_new): And here...
-
- * camel-sasl-digest-md5.[c,h]: new SASL class for DIGEST-MD5 (has
- been tested and proven to work).
-
-2001-03-01 Dan Winship <danw@ximian.com>
-
- * camel-sasl.c (camel_sasl_challenge): Take a GByteArray as input
- as well. Comment that you can pass %NULL for @token to get the
- initial auth data for mechanisms that are client-initiated.
- (camel_sasl_challenge_base64): Convenience function for protocols
- that use base64-encoded SASL.
- (camel_sasl_authenticated): Implement this... (it was prototyped
- already)
- (camel_sasl_new): Function to take a service name, a mechanism
- name, and a CamelService, and return a CamelSasl for it.
- (camel_sasl_authtype, camel_sasl_authtype_list): Functions to
- return CamelServiceAuthType information about SASL mechanisms, to
- allow providers to deal with them generically.
-
- * camel-sasl-anonymous.c, camel-sasl-plain.c: Update/simplify for
- CamelSasl changes. Both of these are single-round
- (client-initiated) mechanisms, so they don't need to keep state.
- (camel_sasl_plain_new): Removed; use camel_sasl_new instead.
- (Can't get rid of camel_sasl_anonymous_new though...)
-
- * camel-sasl-cram-md5.c: Update/simplify for CamelSasl changes.
- (camel_sasl_cram_md5_new): Removed; use camel_sasl_new instead.
- (cram_md5_challenge): Use md5_get_digest where possible, and
- various other minor simplifications. CRAM-MD5 only has a single
- round, so there's no need to keep track of state. This code is now
- tested (against Cyrus IMAPd) and known to work.
-
- * camel-sasl-kerberos4.h: Update/simplify for CamelSasl changes.
- Make only a single #ifdef HAVE_KRB4. Remove stuff from priv that
- isn't needed between rounds.
- (camel_sasl_kerberos4_new): Removed; use camel_sasl_new instead
- (krb4_challenge): Fix up the logic I broke in my previous "at
- least make it compile" fixes, update to match other changes, and
- remove IMAP-isms that shouldn't be in the generic code. This still
- isn't tested, because we're stuck behind a NAT right now...
-
- * providers/imap/camel-imap-store.c: Add an "authtypes" hash table
- to CamelImapStore recording the supported authtypes.
- (connect_to_server): Record supported authtypes in the authtypes
- hash rather than the capabilities bitmask, since now the IMAP code
- is no longer responsible for keeping track of which authtypes we
- support.
- (query_auth_types): Use camel_sasl_authtype_list to get the
- SASL-supported authtypes.
- (try_auth): New function to try a SASL auth mechanism. Sort of
- formerly imap_try_kerberos_v4_auth.
- (imap_connect): Get rid of the krb4-specific bits and genericize
- them for any SASL authtype.
-
- * providers/imap/Makefile.am: Remove camel-imap-auth.[ch] (moved
- into camel-imap-store.c since it's now constant size) and the
- KRB4_CFLAGS and KRB4_LDFLAGS references.
-
-2001-03-01 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-sasl-anonymous.c (anon_challenge): Don't base64 encode the
- data, leave that up to the provider to do if it needs to. Also
- save on some memory allocations and stuff.
-
- * camel-sasl-cram-md5.c (cram_md5_challenge): Same here. Also get
- rid of the need for the temp buf as we can just write it to the
- GByteArray.
-
-2001-03-02 Not Zed <NotZed@Ximian.com>
-
- * camel-mime-utils.c (rfc2047_encode_word, rfc2047_decode_word):
- Reconstify variables to match iconv.
-
- * camel-search-private.c (camel_ustrstrcase): Change some
- assertions back into valid returns.
-
-2001-03-01 Dan Winship <danw@ximian.com>
-
- * Makefile.am (libcamel_la_LIBADD, INCLUDES): camel depends on
- krb4 now (where available), for camel-sasl-kerberos4.c
-
- * camel-sasl-kerberos4.[ch]: Make this at least compile. Dunno if
- it works yet.
-
-2001-03-01 Peter Williams <peterw@ximian.com>
-
- * camel-url.c (camel_url_new): Assert url_string != NULL.
-
-2001-02-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * Makefile.am: Added camel-sasl-anonymous.[c,h] to the build.
-
- * camel-sasl-anonymous.[c,h]: new SASL class for ANONYMOUS
-
- * camel-sasl-plain.c (plain_challenge): Oops, have a state for
- setting sasl->authenticated = TRUE;
-
- * camel-sasl-cram-md5.c (cram_md5_challenge): Same here.
-
-2001-02-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-utils.c (header_decode_date): A fix for broken
- mailers that send 2-digit years (ie "Wed, 28 Feb 01
- 04:59:41"). Fixes bug #1633.
-
- * camel-filter-driver.c (camel_filter_driver_filter_folder): Check
- to make sure message isn't NULL.
-
-2001-02-28 Dan Winship <danw@ximian.com>
-
- * camel-remote-store.c (remote_recv_line): If we get back 0 bytes
- from camel_stream_buffer_gets, that means the socket got
- disconnected, so set an exception. (Noticed because of a message
- that crashes our IMAP server when you try to look at it. :)
-
-2001-02-28 Jeffrey Stedfast <fejj@ximian.com>
-
- * Makefile.am: Added camel-sasl*.[c,h] to the build.
-
- * camel-sasl.[c,h]: new "abstract" SASL class
-
- * camel-sasl-kerberos4.[c,h]: new SASL class for KERBEROS_V4
-
- * camel-sasl-cram-md5.[c,h]: new SASL class for CRAM-MD5
-
- * camel-sasl-plain.[c,h]: new SASL class for PLAIN
-
- * providers/imap/camel-imap-auth.c: Removed the base64 functions.
-
- * camel-mime-utils.c (base64_encode_simple): Moved here from
- camel-imap-auth.c
- (base64_decode_simple): Same.
-
-2001-02-26 Dan Winship <danw@ximian.com>
-
- * providers/imap/camel-imap-folder.c (imap_sync): Group messages
- into sets with the same flags and use the IMAP message set
- notation rather than doing a separate STORE FLAGS for each one.
- This cuts the network traffic down to just a handful of commands
- per sync rather than one per changed message. Removed the progress
- notification stuff since it's no longer meaningful and should
- hopefully be unnecessary.
- (imap_copy_message_to): move the former sync_message function
- into here, since it's no longer shared with imap_sync.
-
-2001-02-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-utils.c: Made thread-safe and moved to above the test
- code.
-
- * camel-mime-message.c (camel_mime_message_init): Set the
- message_id to NULL.
- (camel_mime_message_finalize): Free the message_id.
- (camel_mime_message_set_message_id): New function to set the
- Message-Id.
- (camel_mime_message_get_message_id): New function to get the
- Message-Id.
- (process_header): Decode the message-id.
-
-2001-02-24 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-store.c (construct): init the vTrash folder here instead
- of in store_init.
- (camel_store_class_init): init service_class->construct.
- (camel_store_finalize): We only need to unref the vtrash folder.
- (init_trash): don't create a vstore since we don't need it.
-
-2001-02-23 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-store.c (camel_store_class_init): init get_trash and
- init_trash.
- (camel_store_init): call the virtual init_trash function.
- (camel_store_finalize): unref the vtrash folder/store if present.
- (camel_store_get_folder): Add the new folder to the vtrash
- vfolder.
- (init_trash): default implementation of init_trash.
- (get_trash): default implementation of get_trash.
-
- * camel-vee-store.c (vee_init_trash): No-op.
- (vee_get_trash): return NULL
-
-2001-02-23 Not Zed <NotZed@Ximian.com>
-
- * camel-folder-summary.c (camel_message_info_new_from_header):
- Doh, cut and paste problem, use mlist not cc.
-
- * camel-folder.c (move_message_to):
- (copy_message_to): If the source folder doesn't support a
- summary, dont try and get the message info from it.
-
- * camel-filter-search.c (check_header): Implement a pseudo-header
- "x-camel-mlist" which just looks up in the message info for a
- match.
-
- * camel-folder-search.c (check_header): Add pseudo-header
- "x-camel-mlist" which can be used to match on mailing list.
-
- * providers/imap/camel-imap-folder.c (imap_sync): Add some
- internal progress reporting.
- (imap_rescan): Do some progress reporting.
-
- * camel-mime-part.c (init_header_name_table): Add the message-id
- to the formatted table, so we dont try and wrap it, and break it.
-
-2001-02-22 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-folder.h: Remove the 'FIXME: remove because this isn't
- required...' comment for copy_message_to since we now need and
- cherish its existance in the filter-driver code ;-)
-
- * camel-filter-driver.c (camel_filter_driver_filter_message): Now
- takes a UID and CamelFolder arguments (which can be NULL) to allow
- for possible optimizations when copying messages between folders
- on the same store.
- (camel_filter_driver_filter_mbox): Updated (passes NULL for both
- since this case can't be optimized anyway).
- (camel_filter_driver_filter_folder): Updated to pass in the uid
- and folder of the message.
-
-2001-02-22 Dan Winship <danw@ximian.com>
-
- * providers/imap/camel-imap-summary.h (CAMEL_IMAP_SERVER_FLAGS):
- #define this as the set of all IMAP system flags
-
- * providers/imap/camel-imap-folder.c (sync_message): after syncing
- flags, set server_flags to (flags & CAMEL_IMAP_SERVER_FLAGS)
- rather than just "flags", since any other flags won't have been
- synced. Prevents the CAMEL_MESSAGE_ATTACHMENTS flag from getting
- lost.
-
-2001-02-22 Not Zed <NotZed@Ximian.com>
-
- * providers/vee/*: Removed all files.
-
- * camel-private.h: Move camel-vee-private.h stuff into here.
-
- * camel-session.c: Move the vee_provider here, and initialise it
- always as part of a session. The vfolder provider is always
- available.
-
- * providers/Makefile.am: Remove "vee" from the build list, now
- built as part of the main library.
-
- * Makefile.am (libcamelinclude_HEADERS):
- (libcamel_la_SOURCES): Added camel-vee-store.[ch],
- camel-vee-folder.[ch].
-
- * providers/vee/camel-vee-folder.c (vee_folder_build): Removed,
- not used.
- (camel_vee_folder_new): Removed call to build_folder.
- (vee_get_message): Dont try and free the mi if we didn't get it.
-
- * camel-folder.c (camel_folder_change_info_new): Added a hash
- table of what we have in the lists, plus moved private things into
- private pointer.
- (camel_folder_change_info_add_source): Fixed up private accesses.
- (camel_folder_change_info_add_uid): Changed to use a hashtable to
- see if we already have the uid, etc.
- (camel_folder_change_info_remove_uid): Similar.
- (change_info_remove): Likewise.
- (camel_folder_change_info_clear): Fixes for privatisations.
- (camel_folder_change_info_free): "
-
-2001-02-21 Dan Winship <danw@ximian.com>
-
- * providers/imap/camel-imap-folder.c (fetch_medium): Fixes for
- IMAP4-pre-rev1 from Torsten Schulz.
-
-2001-02-20 Not Zed <NotZed@Ximian.com>
-
- * camel-mime-utils.c (mail_list_magic): Take the ^Header: part out
- of the expression, since we look that up ourselves.
- (header_raw_check_mailing_list): When getting the match, get match
- 1, not match 0, we dont want the full string match.
-
- * camel-folder-summary.c (CAMEL_FOLDER_SUMMARY_VERSION): Bumped
- for summary change.
- (message_info_new): Extract the mlist info from the headers.
- (message_info_load): Load mlist from summary.
- (message_info_save): Save mlist to summary.
- (message_info_free): Save the mlist entry.
- (camel_message_info_new_from_header): Extract mailing list header.
- (camel_message_info_dup_to): Copy the mlist entry.
- (camel_message_info_free): Free mlist.
- (message_info_dump): Dump the mlist.
-
- * camel-folder-summary.h: Add an mlist (mailing list) string to
- the summary.
-
-2001-02-19 Not Zed <NotZed@Ximian.com>
-
- * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Added
- flags argument.
- (message_changed): Add support for the auto-update flag, in which
- case we auto-match the content as it changes.
- (camel_vee_folder_init): Remoive "DYNAMIC" optionality
- (camel_vee_folder_finalise): "
- (vee_expunge): As we expunge folders, re-sync their content by
- rerunning the query.
-
- * providers/vee/camel-vee-store.c (vee_get_folder): Pass flags to
- folder new.
-
-2001-02-18 Not Zed <NotZed@Ximian.com>
-
- * providers/vee/Makefile.am (noinst_HEADERS): Added
- camel-vee-private.h.
-
- * providers/vee/camel-vee-private.h: New file to add locking stuff
- for vee folders.
-
- * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Add
- locking around unmatched setup.
- (camel_vee_folder_init): Setup lock.
- (camel_vee_folder_finalise): Free locks.
- (folder_changed): Add locking.
- (unmatched_finalise): "
- (message_changed): "
- (vee_folder_build): "
-
-2001-02-17 Not Zed <NotZed@Ximian.com>
-
- * providers/vee/camel-vee-folder.c (vee_folder_add): Check uid
- doesn't exist before adding it.
-
-2001-02-16 Not Zed <NotZed@Ximian.com>
-
- * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Create
- a new virtual virtual folder UNMATCHED, to store all messages that
- dont match other vfolders.
- (unmatched_folder_changed): When a vfolder issues a changed event,
- use its info to update the unmatched folder info.
- (unmatched_finalise): When a vfolder is finalised, remove any uids
- it has as if we had a removed event for it.
-
-2001-02-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-filter-driver.c (camel_filter_driver_finalise): Thaw the
- defaultfolder.
- (camel_filter_driver_set_default_folder): Thaw the defaultfolder
- we're about to replace, and freeze the new defaultfolder.
-
-2001-02-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Emit
- the folder_created signal here.
-
- * providers/local/camel-local-folder.c
- (camel_local_folder_construct): Emit the folder_created signal.
-
- * providers/local/camel-local-store.c (delete_folder): On error,
- free the 'name' string so we don't leak. Also emit the
- folder_deleted signal.
-
- * providers/imap/camel-imap-store.c (subscribe_folder): Emit the
- folder_created signal.
- (unsubscribe_folder): Emit the folder_deleted signal.
-
- * camel-store.c (camel_store_class_init): Added folder_created and
- folder_deleted signal defs.
-
-2001-02-15 Dan Winship <danw@ximian.com>
-
- * camel-folder-thread.c (container_parent_child): Deal with
- out-of-order References headers so they don't cause messages to
- disappear in threaded view.
-
- * providers/imap/camel-imap-folder.c (fetch_medium): IMAP4
- (pre-rev1) doesn't allow BODY.PEEK[], so use RFC822.PEEK instead
- in that case.
-
-2001-02-14 Christopher James Lahey <clahey@ximian.com>
-
- * camel-mime-filter-charset.c (complete, filter),
- camel-mime-utils.c (rfc2047_decode_word, rfc2047_encode_word):
- Changed this code to match the glibc iconv signature.
-
-2001-02-14 Dan Winship <danw@ximian.com>
-
- * camel-store.c (camel_store_create_folder): New method to create
- a folder when you don't know its full name.
-
- * providers/imap/camel-imap-store.c (create_folder): Implement.
- (create_folder): Oops, and fix bug involving namespaces
-
-2001-02-12 Not Zed <NotZed@Ximian.com>
-
- * camel-mime-part.c (init_header_name_table): Add address headers
- to list that we dont fold when writing. The are properly
- formatted as we build them.
- (write_to_stream): DOH, lookup the header name in the formatted
- hash table, not the value, that would never have worked.
-
- * camel-internet-address.c
- (camel_internet_address_encode_address): Changed to take a
- parameter saying how much we've printed so far. We now fold the
- header as we format it. We dont fold addresses, even if they are
- too long, we simply put them on another line by themselves: this
- should make the result more parsable by mailers that can't handle
- split up addresses (which are legal).
- (internet_encode): Fix for changes to above.
-
-2001-02-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/local/camel-local-provider.c: mbox, mh, and maildir
- camel-url's need absolute paths.
-
- * camel-provider.h (CAMEL_URL_PATH_IS_ABSOLUTE): New flaggy flag.
-
-2001-02-08 Dan Winship <danw@ximian.com>
-
- * camel-store.c: Rewrite a bunch. Replace the existing folder
- cache stuff with much simpler code that still handles all the
- existing cases. Now the folder hash table is always created by the
- base class, using hash and compare functions provided by the class
- implementation. (If they are set to NULL, CamelStore won't cache
- folders.) lookup_folder, cache_folder, and uncache_folder are no
- longer class methods, and get_name is gone completely.
-
- (camel_store_get_inbox): Renamed from
- camel_store_get_default_folder, since that wasn't being used, and
- this is what we actually need.
- (camel_store_get_root_folder): Removed, since it's not needed for
- anything given get_folder_info.
-
- * camel-remote-store.c:
- * providers/local/camel-local-store.c:
- * providers/local/camel-mbox-store.c:
- * providers/local/camel-mh-store.c:
- * providers/local/camel-maildir-store.c:
- * providers/nntp/camel-nntp-store.c:
- * providers/pop3/camel-pop3-store.c:
- * providers/vee/camel-vee-store.c: Minor updates for CamelStore
- changes
-
- * providers/imap/camel-imap-store.c (camel_imap_store_class_init):
- Update for CamelStore changes.
- (hash_folder_name, compare_folder_name): treat INBOX
- case-insensitively, otherwise use g_str_hash and g_str_equal.
-
- * camel-service.c (camel_service_construct): Remove
- camel_service_new and create camel_service_construct (as a class
- method) in its place.
-
- * camel-session.c (camel_session_get_service): Use
- camel_object_new and camel_service_construct to replace
- camel_service_new.
-
- * providers/local/camel-local-store.c (construct): Append a '/' to
- the URL path if it doesn't end with one
-
-2001-01-31 Jeffrey Stedfast <fejj@helixcode.com>
-
- * camel-tcp-stream-ssl.c: Oops, include the camel-tcp-stream-ssl
- header instead of the raw one.
-
-2001-02-07 Not Zed <NotZed@Ximian.com>
-
- * camel-operation.c (camel_operation_start): Changed to push the
- operation into a status stack.
- (camel_operation_progress): Changed to only accept % complete.
- (camel_operation_reset): Free status stack as well.
-
- * providers/pop3/camel-pop3-folder.c (pop3_get_message): Get the
- octect count from the return line, and pass it to
- get_additional_data().
- (pop3_refresh_info): Added status stuff.
-
- * providers/pop3/camel-pop3-store.c
- (camel_pop3_command_get_additional_data): Added a total bytes
- expected argument for progress reporting & fixed callers.
- (camel_pop3_command_get_additional_data): Added progress
- reporting.
-
- * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
- (mbox_summary_sync_quick):
- (summary_rebuild): Added progress reporting stuff.
-
-2001-02-07 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-search-private.c (CAMEL_SEARCH_COMPARE): Macro for making
- comparisons easy.
- (camel_ustrcasecmp): Use CAMEL_SEARCH_COMPARE and check for
- end-of-string before the utf-8 error check.
- (camel_ustrncasecmp): Same.
- (camel_search_header_match): Strip leading spaces before doing
- anything else. Also use vlen and mlen so as to not need to do 500
- strlen()'s.
- (camel_ustrcasecmp): Don't get_utf8() for the 2 strings in the
- comparison part of the loop because of short-circuit expression
- evaluation. (blame JPR if this is the wrong term!)
- (camel_ustrncasecmp): Same.
-
-2001-02-06 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-search-private.c (utf8_get): Rewrote using unicode_get_utf8().
- (camel_ustrcasecmp): Use unicode_char_t
- (camel_ustrncasecmp): Same.
-
-2001-02-06 Christopher James Lahey <clahey@ximian.com>
-
- * camel-mime-filter-charset.c (complete, filter),
- camel-mime-utils.c (rfc2047_decode_word, rfc2047_encode_word):
- Made these pass char ** as the second parameter to iconv.
-
-2001-02-06 Not Zed <NotZed@Ximian.com>
-
- * camel-session.c: Removed all the camel_cancel stuff.
-
- * camel-stream-fs.c (stream_read): Change to use camel_operation.
- (stream_write): "
-
- * camel-remote-store.c (socket_connect): Change to use
- camel_operation rather than camel_cancel stuff.
- Removed gal include, WTF is that doing there anyway?
-
- * Makefile.am (libcamel_la_SOURCES):
- (libcamelinclude_HEADERS): Added camel-operation.[ch], stuff to
- handle notification and cancellation.
-
- * camel-search-private.c: Removed unwanted header. It was never
- put in for a reason. Stop fixing irrelevant warnings.
-
- (camel_ustrstrcase): Our own strstrcase impl for utf8 strings.
- (camel_ustrcasecmp): Ditto for strcasecmp.
- (camel_ustrncasecmp): And strncasecmp.
- (utf8_get): Simpler interface to utf8 string processing.
- (camel_search_header_match): Use the new things.
-
-2001-02-05 Not Zed <NotZed@Ximian.com>
-
- * camel-folder.c (get_summary): Removed some old variables/a small
- memleak.
- (free_summary): Removed old variables.
-
- * camel-mime-utils.c (header_raw_check_mailing_list): New utility
- function to get the mailing list (if any) that a set of headers
- came from.
-
-2001-02-05 Christopher James Lahey <clahey@helixcode.com>
-
- * camel-stream-fs.c: Added a missing #include.
-
- * camel-search-private.c: Added a missing #include.
-
-2001-02-05 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-remote-store.c (remote_query_auth_types): Oops. Change
- this too.
-
- * providers/smtp/camel-smtp-transport.c (query_auth_types): Updated.
-
- * providers/nntp/camel-nntp-store.c (nntp_store_query_auth_types):
- Updated.
-
- * providers/pop3/camel-pop3-store.c (query_auth_types): Updated.
-
- * providers/imap/camel-imap-store.c (query_auth_types): Updated.
-
- * camel-service.c (camel_service_query_auth_types): Now takes a
- boolean value to specify whether or not to connect when
- constructing a supported authtype list.
-
-2001-02-05 Not Zed <NotZed@Ximian.com>
-
- * camel-stream-filter.c (do_write): Revert jeff's earlier change,
- the change below is the more-correct fix. All his was doing was
- ignoring the return code & looping actually :)
-
- * camel-stream-fs.c (stream_write): Since we are non-blocking on
- the outgoing fd, keep looping if writing out large blocks, so we
- can keep checking for cancel, etc.
-
-2001-02-02 Not Zed <NotZed@Ximian.com>
-
- * camel-folder-thread.c (camel_folder_thread_messages_new): When
- we drop a fake node, dont skip checking the next in the list.
- (camel_folder_thread_messages_new): Add an assertion check just to
- make sure we dont get any pseudo nodes, and spit a warning if we
- do.
-
-2001-02-04 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-stream-filter.c (do_write): Make do_write loop until the
- entire buffer is written.
-
-2001-02-02 Not Zed <NotZed@Ximian.com>
-
- * camel-stream-fs.c: Add missing header for cancel check stuff.
-
- * camel-session.c (camel_cancel_cancel): Fix a wrong cast.
-
- * camel-mime-part.c (init_header_name_table): Setup a new table
- header_formatted_table, that lists headers that we dont want to
- fold (they've already been folded).
- (write_to_stream): Check for already formatted headers, and dont
- try and fold them. This is a fix for bug #1097.
-
-2001-02-01 Not Zed <NotZed@Ximian.com>
-
- * camel-mime-utils.c (header_fold): If we are folding, drop the
- space at the end of the line.
-
-2001-01-30 Not Zed <NotZed@Ximian.com>
-
- * camel-remote-store.c (timeout_cb): Remvoe the stream locking
- here. I think this was leading to a deadlock when a keepalive is
- being sent, in imap.
-
-2001-01-29 Not Zed <NotZed@Ximian.com>
-
- * providers/imap/camel-imap-command.c
- (imap_command_strdup_vprintf): Include the terminating NUL in the
- calculated string length. This hit memcheck.
-
-2001-01-25 Not Zed <NotZed@Ximian.com>
-
- * tests/folder/test3.c: Changed the subject search to handle case
- sensitive when it is mixed case.
-
- * Makefile.am (libcamel_la_SOURCES): Added camel-ssearch-private.c
- (noinst_HEADERS): Added camel-search-private.h
-
- * camel-folder-search.c (check_header): New function to do the
- work of the various header checks.
- (search_header_matches):
- (search_header_starts_with):
- (search_header_ends_with):
- (search_header_contains): Use check_header to do the work.
- (build_match_regex): Removed.
-
- * camel-search-private.c (header_soundex): New
- function to match words to phrases using soundex algorithm.
-
- * camel-filter-search.c (soundexcmp): Removed.
- (check_match): Moved to search-private.h
-
-2001-01-24 Not Zed <NotZed@Ximian.com>
-
- * camel-search-private.c (camel_search_build_match_regex): Added
- extra flags, so the same function can be used for
- start/end/whole/partial matches.
- (camel_search_header_match): Convenience function to check a
- single header against all sorts of different matches.
-
- * providers/imap/camel-imap-search.c (imap_body_contains): Fix for
- e_sexp api changes.
-
- * camel-folder-search.c: Fix for e_sexp api changes.
- (search_header_contains): Free args/quit on unknown header.
- (search_header_matches): "
- (search_header_starts_with): "
- (search_header_ends_with): "
- (match_message): Add an exception argument.
- (search_body_contains): Free args/quit on fatal error.
- (message_body_contains): Removed (moved to
- camel-search-private.c), fixed callers.
-
- * camel-filter-search.c: Fix for e_sexp api changes.
- (build_match_regex, message_body_contains): Moved into
- camel-filter-private.c Fixed callers.
- (check_header): moved guts to camel-search-private, and
- changed to use regex's for everything. Just calls that with the
- right args.
- (check_header): GEts the header, decodes it, and checks for
- failure, and whatnot.
- (check_match): Removed.
- (header_soundex): Changed significantly. Now it soundexes each
- word in the header separately, and compares it to the first
- argument.
-
- * tests/folder/test9.c (main): Fix for api changes.
- (main): Added tests to see that invalid match and action
- rules are properly detected.
-
- * camel-filter-driver.c (camel_filter_driver_filter_mbox): Remove
- the 'finished message' bit.
- (camel_filter_driver_filter_message): Remove an accidentally
- checked in debug.
- (camel_filter_driver_filter_message): Fix for e-sexp api changes.
-
-2001-01-23 Dan Winship <danw@ximian.com>
-
- * providers/imap/camel-imap-wrapper.c: Add a lock around the
- delayed loading, so two threads won't try to do it at the same
- time.
-
-2001-01-22 Dan Winship <danw@ximian.com>
-
- * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Set the
- CamelFolder::name to just the base part of the vfolder name (the
- non-query part)
-
-2001-01-23 Not Zed <NotZed@Ximian.com>
-
- * camel-filter-search.c (camel_filter_search_match): Perform error
- checking on parsing/execution.
-
- * camel-folder-search.c (camel_folder_search_execute_expression):
- Perform error handling on search expression.
- (CamelFolderSearchPrivate): Add a camelexception for error
- returns.
- (camel_folder_search_execute_expression): Setup exception pointer.
- (search_match_all): Quit on error.
-
- * providers/imap/camel-imap-summary.c (message_info_load): Removed
- some debug 'warnings', as they should now be displayed at the
- toplevel loader, and just made the code match similar code
- elsewhere.
-
- * providers/local/camel-mbox-summary.c (message_info_load): Error
- handling.
- (message_info_save): more error handling.
-
- * camel-folder-summary.c (message_info_load): Add error handling
- and sanity checking.
- (camel_folder_summary_load): Add error checks.
- (perform_content_info_load): Error + sanity checks.
- (content_info_load): error + sanity checks.
-
- * camel-filter-driver.c (close_folder): avoid /0 by updating after
- we've done the sync.
- (close_folders): Setup the first progress report to start it off.
- (camel_filter_driver_filter_message): Fix a fixme, check errors in
- e_sexp parsing, etc.
-
-2001-01-22 Christopher James Lahey <clahey@helixcode.com>
-
- * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
- Initialize the value of the variable exists here.
-
-2001-01-22 Not Zed <NotZed@Ximian.com>
-
- * .cvsignore */*/.cvsignore: Added profiling temp
- files.
-
- * camel-folder-thread.c (camel_folder_thread_messages_new): When
- removing phantom nodes, check for the end node too.
-
- * camel-filter-driver.[ch]: Changed status vars to be
- CAMEL_FILTER_STATUS_ etc.
-
-2001-01-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-mime-utils.c (header_param_list_format_append): Make the
- output a little prettier. Okay, so I'm anal...
-
-2001-01-21 Not Zed <NotZed@Ximian.com>
-
- * camel-filter-driver.h: Added an exception to
- CamelFilterGetFolderFunc.
-
- * camel-filter-driver.c (camel_filter_driver_filter_message):
- Remove source parameter, as it is determined elsewhere now.
- (camel_filter_driver_filter_folder): Same here.
- (camel_filter_driver_filter_mbox): And here.
- (do_move): If we cannot open a folder, quit, rather than ignoring
- it.
- (do_copy): Here too.
- (open_folder): Pass an exception into get_folder callback.
- (camel_filter_driver_filter_folder): Report that we're syncing,
- when we are.
- (camel_filter_driver_filter_mbox): And here too.
- (close_folder): And here.
-
-2001-01-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-filter-driver.c (camel_filter_driver_filter_message): Set
- the deleted bit *before* copying to the default folder, this way
- if they are importing mail and have a rule to delete it, it
- doesn't get copied to the default folder un-deleted.
-
-2001-01-19 Dan Winship <danw@ximian.com>
-
- * providers/imap/camel-imap-store.c
- (get_subscribed_folders_by_hand): If LISTing a subscribed folder
- doesn't return a LIST response, just ignore that folder. Yay
- RFC2060.
- (subscribe_folder): add a missing UNLOCK
-
-2001-01-19 Kjartan Maraas <kmaraas@gnome.org>
-
- * providers/smtp/camel-smtp-provider.c: Mark strings for translation.
-
-2001-01-19 Not Zed <NotZed@Ximian.com>
-
- * camel-filter-driver.c (report_status): Add a percentage complete
- indicator to the status thing.
- (camel_filter_driver_filter_mbox): Add percentage complete to
- reporting.
- (camel_filter_driver_filter_folder): Same.
-
-2001-01-18 Dan Winship <danw@ximian.com>
-
- * camel-store.c (camel_folder_info_build): More tweaking... skip
- separator characters after the namespace character. (Gets rid of
- the shell folder registration warning some people have had with
- IMAP)
-
- * providers/imap/camel-imap-store.c (imap_connect): I'm sure there
- was some clever reason I was storing the flags of the folder in
- the hash table rather than just "1", but I don't remember what it
- was now. Anyway, since we only ever test NULL/non-NULL, store 1,
- since flags is sometimes 0.
-
- * providers/imap/camel-imap-folder.c (imap_update_summary): Oops.
- Somewhere in one of the reorgs, the code to add new messages to
- the CamelFolderChangeInfo structure got removed. Fix that.
-
-2001-01-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/imap/camel-imap-summary.c (message_info_load): Add
- some g_warnings() to help debug later if I ever get the segfaults
- I was getting earlier. Can't seem to reproduce them after my
- previous "fix".
-
- * camel-folder-summary.c (camel_folder_summary_load): Undid my
- change here, NotZed said it was wrong and that if it gets a NULL
- mi then it should abort and not continue.
-
-2001-01-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-folder-summary.c (camel_folder_summary_load): Make sure
- that the message-info is non-null before we go accessing inner
- parts of it and/or adding it to the summary array. I may not have
- handled the error correctly, but it does seem to work
- correctly. If NotZed could double-check this it'd be great.
-
- * providers/smtp/camel-smtp-transport.c (get_smtp_error_string):
- New smtp error-code to string mapping function.
- (smtp_connect): Use the new error->string function for reporting
- useful errors.
- (smtp_helo): Same. Also use a case-insensitive strstr for 8BITMIEM
- as it seems Exchange sends back lowercase for that one single SMTP
- extension. Everything else is uppercase. I'm seeing a lack of love
- for that extension by Microsoft dudes...
- (smtp_mail): Use get_smtp_error_string.
- (smtp_rcpt): Same.
- (smtp_data): Same.
- (smtp_quit): Same.
- (smtp_rset): Same.
-
-2001-01-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-folder-summary.c (camel_folder_summary_array): Add an int
- i so this code will compile. Should I be worried about how well
- this code will work? ;-)
-
-2001-01-17 Not Zed <NotZed@Ximian.com>
-
- * camel-folder.c (free_summary): Call
- camel_folder_summary_array_free() to do the work.
- (get_summary): Use camel_folder_summary_array() to get the array
- atomically. These fixes allow folder/test8 to work again, and fix
- a sort of race where the summary size can change while we were
- making a copy of it.
-
- * camel-folder-summary.c (camel_folder_summary_array): Get the
- summary array atomically, so it can't contain empty records.
- (camel_folder_summary_array_free): And free it.
-
- * tests/lib/camel-test.c (die): If we are verbose & in threads,
- then goto sleep so we can debug.
-
- * tests/folder/test8.c (worker): Add a missing pull() for
- comnparing content.
-
- * camel-filter-search.c: Fix the symbol table, so match-all is an
- immediate function, as it should be.
-
- * tests/folder/test9.c (main): New test, tests some filtering
- things.
-
- * tests/message/test3.c (main): Dont use a boundary string with
- spaces in it. Folding can corrupt it. Maybe the folding isn't
- working entirely right, but anyway.
-
- * camel-session.c: Debug out the debug.
-
- * camel-filter-driver.c (camel_filter_driver_filter_folder): Plug
- a messageinfo leak.
-
-2001-01-16 Dan Winship <danw@ximian.com>
-
- Delayed loading of IMAP message parts.
-
- * camel-types.h: typedef CamelMessageInfo and
- CamelMessageContentInfo here
-
- * camel-folder-summary.h: Add a "size" field to
- CamelMessageContentInfo.
-
- * camel-folder-summary.c (camel_folder_summary_content_info_new,
- camel_folder_summary_content_info_free): Renamed and made
- non-static for providers that construct their own content info.
- (content_info_load, content_info_save): load/save size
-
- * camel-data-wrapper.c (camel_data_wrapper_is_offline): New
- function to return if a data wrapper's contents are "offline". (So
- that, for example, we don't make thumbnails of images that haven't
- been loaded off the IMAP server yet.) Defaults to FALSE.
-
- * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
- Fix a bug in re-selecting a folder when messages have been
- expunged from it by another client in the meantime.
- (imap_get_message): Rewrite. If the message is larger than a
- certain size, just create a skeleton message containing
- CamelImapWrappers that will read parts as needed. This way, large
- attachments only need to be downloaded if the user looks at them,
- and multipart/alternative alternatives that aren't used will never
- be downloaded at all.
- (imap_update_summary): Rewrite this a bunch too to make the
- parsing more robust.
-
- * providers/imap/camel-imap-summary.c
- (CAMEL_IMAP_SUMMARY_VERSION): bump.
- (camel_imap_summary_new): Set build_content to TRUE.
- (content_info_load, content_info_save): Only save/load the content
- for messages that have it. (The content info gets created as a
- side effect of imap_get_message.)
-
- * providers/imap/camel-imap-utils.c (imap_parse_body): New routine
- (and helpers) to parse an IMAP 'body' FETCH response and fill in a
- CamelMessageContentInfo from it.
-
- * providers/imap/Makefile.am (libcamelimap_la_SOURCES,
- libcamelimap_la_HEADERS): add camel-imap-wrapper.
-
-2001-01-16 Dan Winship <danw@ximian.com>
-
- * camel-tcp-stream-raw.c (stream_getsockopt, stream_setsockopt):
- * camel-stream-fs.c (stream_read, stream_write):
- * camel-remote-store.c (socket_connect): fcntl(fd, F_GETFL)
- returns the flags as the return value, not via a passed in
- pointer. And F_SETFL looks for an int, not a long, and you have to
- pass it what it's expecting because it's a va_arg parameter. (Yes,
- the man page lies on Linux. But check the UNIX98 spec or the glibc
- source.) Also, fix another bug in socket_connect: if we manage to
- connect right away, unset O_NONBLOCK so it doesn't mess us up
- later.
-
- Fixes a bunch of problems with non-blocking I/O being done in the
- allegedly-blocking case and then returning EWOULDBLOCK.
-
-2001-01-16 Chris Toshok <toshok@ximian.com>
-
- * providers/Makefile.am (NNTP_DIR): set to nntp if ENABLE_NNTP
- (SUBDIRS): use $(NNTP_DIR)
-
-2001-01-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * providers/smtp/camel-smtp-transport.c (smtp_rcpt): Don't check
- errno as it's not being set. Fixes bug #1150.
-
-2001-01-16 Jeffrey Stedfast <fejj@ximian.com>
-
- Ugh, this design is ugly like my butt.
-
- * camel-session.c (camel_session_query_cert_authenticator): New
- function which will be useful when we integrate SSL.
-
- * camel-tcp-stream-ssl.c (ssl_auth_cert): Callback to authenticate
- a certificate.
- (ssl_bad_cert): Callback that gets the reason the certificate is
- bad and then calls camel's cert-authenticator callback to notify
- the user and to allow the user to override the check.
- (stream_connect): Set the URL we expect to connect with and setup
- the auth_cert and bad_cert callbacks.
- (camel_tcp_stream_ssl_new): Now takes a CamelSession and a
- expected_host argument that it will use for certificate
- authentication.
- (camel_tcp_stream_ssl_finalize): Unref the session and free the
- expected_host.
-
-2001-01-16 Not Zed <NotZed@Ximian.com>
-
- * camel-filter-search.c (header_exists): Changed to support
- multiple args (or'd together).
- (header_contains): Cleaned up to match the search code. Why did
- fejj change it? I'll never know.
- (header_matches):
- (header_starts_with):
- (header_ends_with): Big cleanup of fejj's "i'm the cut & paste
- king" code. Also properly handle or'ing of additional args to
- match what the folder-search code should do.
- (check_match): New function which does the annoying matching
- stuff (for header matches).
- (check_header): Similarly, handles or'ing of the matches together.
- (header_contains):
- (header_matches):
- (header_starts_with):
- (header_ends_with): Call check_header to do the actual work.
- (header_soundex): And here too.
- (match_all): Yeah like match-all isn't passed expression results,
- its passed expression terms. Fix this so match-all works like it
- should, by executing the contained expression.
- (message_body_contains): Copied directly from
- camel-folder-search.c, a more robust/faster/simpler body search
- code.
- (mime_part_matches): Removed entirely.
- (handle_multipart): Removed entirely.
- (build_match_regex): Copied from camel-folder-search. Builds a
- set of simple strings into a regex pattern that matches any of
- them (for faster & simpler matching). Expanded to accept regex
- patterns itself, so it can merge them together.
- (body_contains): Use build match/match message to match using a
- built regex.
- (body_regex): Likewise, this time we tell it we're building a
- regex though.
- (header_full_regex): Use build_match_regex to take the drudgery
- out of it, and expand it to handle multiple regex's at once.
- (get_full_header): slightly cleaner (well i dunno, the sprintf
- stuff just got to me).
- (header_regex): Cleaned up to use build_match_Regex too, and to
- properly check types.
- (filter_message_search): Just allocate 'fms' on the stack.
-
- * camel-filter-driver.c (camel_filter_driver_finalise):
- (camel_filter_driver_init):
- (camel_filter_driver_class_init):
- (camel_filter_driver_get_type): Changed from gtk object to camel
- object.
- (camel_filter_driver_add_rule): New function to add a rule to be
- processed in sexp form.
- (camel_filter_driver_init): Init the rules list.
- (camel_filter_driver_finalise): Clear the rules/rules list.
- (camel_filter_driver_filter_message): Scan rules list directly
- rather than creating on the fly.
-
- * Makefile.am (libcamelinclude_HEADERS): Added camel-filter-driver.h
- (libcamel_la_SOURCES): Added camel-filter-driver.c, code taken
- from filter-driver, which can drive, uh, filters based on sexp's.
- (libcamelinclude_HEADERS):
- (libcamel_la_SOURCES): Added camel-filter-search.[ch]
-
- * camel-folder-summary.c (camel_folder_summary_decode_string):
- Chganged len back to be unsigned. And do a simple range check on
- the string value to try and detect corrupted summary files.
-
- * providers/imap/camel-imap-command.c (imap_read_untagged): Handle
- cancelled stream reads with an appropriate exception.
-
- * providers/imap/camel-imap-private.h: Fix the include-once
- macro. Doh, confliced with camel-private.h.
-
- * providers/imap/camel-imap-store.c (imap_store_refresh_folders):
- A copy of camel_remote_store_refresh_folders. We avoid locking
- each folder when we call it though. This should be removed when i
- can work out how to remove the folder lock from this function
- easily.
-
- * camel-stream-fs.c (stream_write): Fix n' argument of select.
- (stream_read): Likewise.
-
- * camel-remote-store.c (socket_connect): Bump the connect timeout
- upto 4 minutes.
- (socket_connect): Oops, fix the 'n' argument of select.
-
- * camel-session.c (camel_cancel_cancel): If we are given no
- cancellation node, then do it for all active ones.
-
-2001-01-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-stream-fs.c (stream_close): If the close() is successful,
- set the fd to -1.
-
- * camel-tcp-stream-raw.c: Removed the disconnect() method.
- (stream_close): If the close() is successful, set the sockfd to
- -1.
-
- * camel-tcp-stream-ssl.c: Removed the disconnect() method.
- (stream_close): If the close() is successful, set the sockfd to
- NULL.
-
- * camel-tcp-stream.c (camel_tcp_stream_disconnect): Removed,
- easier to just use the close() method as it did the same thing
- anyway.
-
-2001-01-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-tcp-stream-raw.c (stream_getsockopt): Updated to be able
- to get the CAMEL_SOCKOPT_NONBLOCKING socket opt.
- (stream_setsockopt): Updated to be able to set the
- CAMEL_SOCKOPT_NONBLOCKING socket opt.
-
-2001-01-15 Peter Williams <peterw@ximian.com>
-
- * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Lock
- around the imap_rescan, which needs it.
-
-2001-01-15 Not Zed <NotZed@Ximian.com>
-
- * camel-remote-store.c (socket_connect): A cancellable connection
- routine.
- (remote_send_string): Return cancelled exception if we were.
- (remote_send_stream): "
- (remote_recv_line): "
-
- * camel-stream-fs.c (stream_read): First cut at cancellation
- stuff. Its looking a bit ugly.
-
-2001-01-15 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-tcp-stream-ssl.c (stream_connect): Uses an SSL socket now
- although there's still a few things missing (like certificate
- handling and such).
-
- * camel.c (camel_ssl_init): A replacement function for
- camel_init() that also initializes SSL.
-
-2001-01-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-tcp-stream-ssl.c (stream_getsockopt): Implemented.
- (stream_setsockopt): Implemented.
-
- * camel-tcp-stream-raw.c (stream_getsockopt): Implemented.
- (stream_setsockopt): Implemented.
-
- * camel-tcp-stream.c (camel_tcp_stream_getsockopt): New method.
- (camel_tcp_stream_setsockopt): Another new method. I think you get
- the idea of what these are for so I won't explain them.
-
-2001-01-14 Jeffrey Stedfast <fejj@helixcode.com>
-
- * camel-tcp-stream-ssl.[c,h]: New CamelTcpStream class that
- implements nspr sockets and eventually will use nss for
- SSL/TLS. Currently doesn't do any SSL/TLS but it should still
- work. It's functionally equivalent to CamelTcpStreamRaw at the
- moment only it uses nspr i/o.
-
- * camel-tcp-stream-raw.[c,h]: New CamelTcpStream class that
- implements native sockets. Should be usable but may have some bugs
- yet.
-
-2001-01-13 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-tcp-stream.[c,h]: New abstract class for TCP streams. The
- next step is to write child classes (CamelTcpStreamBSD and
- CamelTcpStreamSSL). The BSD stream will use normal BSD sockets
- while SSL will use Mozilla's NSPR and NSS libraries to do Secure
- Socket Layers which wille ventually replace CamelStreamSSL which I
- just commit'd. Oh well.
-
-2001-01-13 Jeffrey Stedfast <fejj@ximian.com>
-
- * camel-stream-ssl.[c,h]: New stream for handling SSL/TLS
- connections.
-
-2001-01-12 Not Zed <NotZed@Ximian.com>
-
- * camel-folder-thread.c (camel_folder_thread_messages_new):
- Perform a final pass, removing any pseudo nodes we added earlier.
- Quick patch to test the idea.
- (camel_folder_thread_messages_new): Added casts to rmeove some
- warnings for the analites out there.
-
-2001-01-11 Dan Winship <danw@ximian.com>
-
- * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
- Fix a bug in previous commit: don't check for deleted messages if
- there are no known messages in the folder (because it would end up
- sending "FETCH 0 ...").
- (imap_copy_message_to): Fix this up: sync flags to the server
- before copying so that they end up correct in the remote folder.
- And poke the destination folder after doing the copy so it notices
- the new message right away.
- (imap_move_message_to): Call imap_copy_message_to for most of the
- work rather than duplicating the code (since it's much more
- complicated now).
-
-2001-01-11 Dan Winship <danw@ximian.com>
-
- * providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
- New function to check for added/deleted messages when re-selecting
- a folder.
- (imap_refresh_info, imap_rescan, imap_update_summary): Various
- locking tweaks that turn out to be irrelevant since command_lock
- is recursive, but whatever.
-
- * providers/imap/camel-imap-command.c (camel_imap_command): When
- selecting a new folder, call camel_imap_folder_selected on it.
-
- * camel-folder.c (camel_folder_copy_message_to): Fix a locking
- problem. (One branch of an if statement was returning with the
- lock still locked.) Also remove the deprecation comments, to match
- move_message_to.
-
-2001-01-10 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/local/camel-local-provider.c: Changed the descriptions
- for mh, mbox, and maildir to be more "user-friendly".
-
-2001-01-10 Dan Winship <danw@helixcode.com>
-
- * providers/imap/camel-imap-types.h: New header to prevent
- recursive #include problems
-
- * providers/imap/*.h: Replace some #includes with #include
- "camel-imap-types.h", remove typedefs that were moved to
- camel-imap-types.h
-
- * providers/imap/*.c: Add #includes to make up for #includes
- removed from .h files
-
- * providers/imap/Makefile.am (libcamelimapinclude_HEADERS): Add
- camel-imap-types.h
-
-2001-01-10 Dan Winship <danw@helixcode.com>
-
- * camel-store.c (camel_store_sync): New class function, parallel
- to camel_folder_sync. (The default implementation just calls
- camel_folder_sync on each cached folder.)
-
- * providers/imap/camel-imap-store.c (get_folder_info): Call
- camel_store_sync before doing anything else so that the IMAP
- server and Camel are working from the same data. Don't ask the
- server for the unread message count of the current folder, since
- UW will return often-incorrect cached data, and we can calculate
- it without talking to the server anyway.
-
-2001-01-09 Dan Winship <danw@helixcode.com>
-
- Mostly IMAP changes. Use the NAMESPACE extension (where
- available). Deal with servers that don't return LIST flags in
- response to LSUB (like UW) to get rid of the "not a selectable
- folder" error messages in the UI. Take advantage of the \Marked
- and \Unmarked flags to try to speed up the folder scan by not
- doing STATUS on unmarked folders. Some further tweaks on the shape
- of the resulting folder tree in various situations...
-
- * camel-store.h: Remove the (read) message_count, since nothing
- uses it, and we can speed up IMAP a bit this way.
-
- * camel-store.c (camel_folder_info_build): Redo this a bit to make
- it more useful for IMAP since that's the only thing that uses it.
-
- * camel-remote-store.c (camel_remote_store_connected): Public
- function to check if the store is connected, and try to connect it
- if it's not.
- (remote_send_string, remote_send_stream, remote_recv_line): Use
- that.
-
- * providers/imap/camel-imap-store.c (camel_imap_store_finalize):
- fix up for changes.
- (camel_imap_store_init): Initialize subscribed_folders to NULL
- rather than an empty hash table.
- (imap_connect): Get the list of subscribed folders here. If the
- server doesn't claim that any of them are either Marked or
- Unmarked, then assume that it doesn't do that for LSUB and
- remember that for later. If the server supports the NAMESPACE
- extension and the user didn't specify a namespace, use the
- server-provided one.
- (imap_disconnect): Free the list of subscribed folders, and the
- namespace.
- (get_folder): check camel_remote_store_connected
- (get_folder_info): check camel_remote_store_connected. Add a bunch
- of new cleverness. If we learned that the server doesn't do LSUB
- usefully, do a bunch of LISTs by hand. Then, if we're getting
- unread counts, only do it for folders that weren't listed as
- Unmarked. Also, deal with namespaces that end with the separator
- character, and update for changes to camel_folder_info_build.
- (folder_subscribed): Add a g_return_val_if_fail.
- (subscribe_folder, unsubscribe_folder): check
- camel_remote_store_connected.
-
- * providers/nntp/camel-nntp-store.c (build_folder_info,
- build_folder_info_from_grouplist, nntp_store_get_folder_info):
- Don't fill in message_count since it doesn't exist any more.
-
-2001-01-09 Dan Winship <danw@helixcode.com>
-
- Kill off a long-hated Camel kludge: "empty" URLs and
- query_auth_types_generic.
-
- * camel-url.c: Remove "empty" from CamelURL.
- (camel_url_new): No longer set it.
- (camel_url_to_string): Treat "" as equivalent to NULL for
- authmech. (Unrelated change, but it simplifies some stuff with the
- new config dialog.)
-
- * camel-service.c (camel_service_new): Remove url->empty check: if
- the URL isn't valid, we don't create the service.
- (camel_service_query_auth_types): No longer need to switch between
- generic and connected variants.
-
- * providers/smtp/camel-smtp-transport.c (query_auth_types):
- * providers/pop3/camel-pop3-store.c (query_auth_types):
- * providers/nntp/camel-nntp-store.c (nntp_store_query_auth_types):
- * providers/imap/camel-imap-store.c (query_auth_types):
- * camel-remote-store.c (remote_query_auth_types): Remove generic
- version, rename connected version.
-
-2001-01-06 Not Zed <NotZed@HelixCode.com>
-
- * providers/vee/camel-vee-folder.c (vee_folder_build_folder): Dont
- try and unref a messageinfo that wasn't there, and use the right
- free function too. Modified patch from Iain.
- (vee_move_message_to): New method, call the real folders'
- move_message_to method.
-
-2001-01-04 JP Rosevear <jpr@helixcode.com>
-
- * tests/lib/Makefile.am: fix includes for compilation
-
- * tests/message/Makefile.am: Build test3 again
-
- * tests/message/test2.c: Kill warnings with header includes
-
- * tests/message/test3.c: ditto
-
- * tests/lib/streams.c: ditto
-
- * tests/lib/camel-test.c: ditto
-
- * tests/lib/messages.c: ditto
-
- * tests/lib/folders.c: ditto
-
-2001-01-04 Dan Winship <danw@helixcode.com>
-
- * providers/imap/camel-imap-folder.c (imap_rescan): Fix two
- problems in figuring out server-expunged messages.
-
-2001-01-04 Not Zed <NotZed@HelixCode.com>
-
- * camel-folder.c (thaw): If we have a lot of messages changed,
- promote it to a folder changed event.
-
-2000-01-03 Jeffrey Stedfast <fejj@helixcode.com>
-
- * camel-folder-search.c (search_header_matches): Implemented.
- (search_header_exists): Implemented.
- (search_header_starts_with): Implemented.
- (search_header_ends_with): Implemented.
-
-2001-01-03 Christopher James Lahey <clahey@helixcode.com>
-
- * providers/imap/camel-imap-folder.c (camel_imap_folder_new):
- Initialize the exists variable so that we don't do random things
- if the imap server misbehaves.
-
-2000-12-29 Not Zed <NotZed@HelixCode.com>
-
- * camel-folder.c (camel_folder_move_message_to): REmove warning,
- this isn't really deprecated, sigh.
-
- * camel-mime-utils.c (header_fold): Comment out some debug.
-
-2001-01-02 Christopher James Lahey <clahey@helixcode.com>
-
- * providers/maildir/, providers/mbox/, providers/mh/: Removed
- these directories since they're unused.
-
-2001-01-02 Dan Winship <danw@helixcode.com>
-
- IMAP randomness.
-
- * providers/imap/camel-imap-stream.[ch]: Remove. To be replaced.
-
- * providers/imap/Makefile.am (libcamelimapinclude_HEADERS): Remove
- camel-imap-stream.h
-
- * providers/imap/camel-imap-utils.c (imap_parse_flag_list): Take a
- char ** instead of char *, to return the position at the end of
- parsing like the string parsing functions.
- (imap_parse_string_generic): New function to parse a string,
- nstring, or astring.
- (imap_parse_nstring, imap_parse_astring): Now macros
- (imap_parse_string): Added
-
- * providers/imap/camel-imap-folder.h: Remove the "exists" field
- from CamelImapFolder.
-
- * providers/imap/camel-imap-folder.c: Remove unused include of
- camel-imap-stream.h.
- (camel_imap_folder_init): Remove no-longer-relevant summary
- initialization.
- (camel_imap_folder_new): Update for imap_parse_flag_list change,
- exists removal, and imap_rescan.
- (imap_rescan): New function that does most of the work of the old
- imap_refresh_info, but taking "exists" as an argument instead of
- getting it from the folder. Also calls camel_imap_folder_changed
- to do the summary updating and signalling, rather than duplicating
- that code.
- (imap_refresh_info): Just call imap_rescan (using the size of the
- folder summary as "exists").
- (imap_update_summary): Update for imap_parse_flag_list change
- (camel_imap_folder_changed): Update for "exists" change.
-
-2001-01-02 Dan Winship <danw@helixcode.com>
-
- * camel-mime-utils.c (header_content_type_simple): New function to
- return just foo/bar with no parameters.
-
- * camel-data-wrapper.c (get_mime_type): Use
- header_content_type_simple rather than header_content_type_format.
-
-2000-12-28 Dan Winship <danw@helixcode.com>
-
- * gmime-content-field.[ch]: Remove this. It was only a thin
- wrapper around struct _header_content_type anyway, and didn't
- match the naming scheme of anything else.
-
- * Makefile.am: Remove gmime-content-field.[ch]
-
- * camel.h: Remove gmime-content-field.h
-
- * camel-types.h: Add CamelContentType as a typedef for struct
- _header_content_type (especially for use outside of camel).
-
- * camel-multipart.c:
- * camel-mime-part.c:
- * camel-mime-message.c:
- * camel-folder-summary.c:
- * camel-folder-search.c:
- * camel-data-wrapper.[ch]: Use CamelContentType and
- header_content_type_* functions rather than the GMime stuff.
-
- * camel-mime-part-utils.c:
- * camel-medium.c: Remove unused gmime-content-field.h include.
-
-2000-12-27 Dan Winship <danw@helixcode.com>
-
- * providers/pop3/camel-pop3-store.c (connect_to_server): Fix the
- APOP check to not crash on servers that don't return any
- information on the +OK greeting line.
-
-2000-12-24 Not Zed <NotZed@HelixCode.com>
-
- * providers/imap/camel-imap-search.c (imap_body_contains): Lock
- the command channel while searching.
- (imap_body_contains): If performing a whole uid search, then add
- references to our own summary items, dont look it up in the
- folder. This way they can't vanish unexpectedly.
-
- * providers/imap/camel-imap-folder.h (CamelImapFolder): Added a
- private field.
- (CamelImapFolder): Removed summary again from here.
-
- * providers/imap/camel-imap-private.h: Added lock for imap
- searches.
-
- * Merge from camel-mt-branch.
-
- * providers/imap/camel-imap-folder.c (imap_update_summary): Merge
- fix, use the folder->summary.
- (imap_get_message_flags, imap_set_message_flags,
- imap_get_message_user_flag, imap_set_message_user_flag): Removed
- again.
- (camel_imap_folder_init): Setup private data/lock.
- (imap_finalize): Free private data/search lock.
- (imap_search_free): Lock the search_lock.
- (imap_search_by_expression): Lock the search lock when using the
- search object. Also copy/ref hte summary, rather than getting it
- directly.
- (imap_refresh_info): Free any info lookups. Use folder->summary
- not imap_folder->summary. And lock around commands.
- (camel_imap_folder_changed): Use folder->summary again.
- (camel_imap_folder_changed): Make sure we unref the summary lookup.
-
-2000-12-22 Dan Winship <danw@helixcode.com>
-
- * providers/imap/camel-imap-store.c (get_folder_info): When
- getting the top-level folder list, include INBOX even if it's not
- subscribed. Don't show subscribed folders outside of the given
- namespace. Do a better job of pruning the namespace from the
- returned folder tree.
-
-2000-12-21 Dan Winship <danw@helixcode.com>
-
- * providers/imap/camel-imap-search.c: New CamelFolderSearch
- subclass that just reimplements body_contains (using the IMAP
- SEARCH command). All other kinds of searching are done against the
- local summary.
-
- * providers/imap/camel-imap-folder.c (imap_search_by_expression):
- Use a CamelImapSearch to do searching.
-
- * providers/imap/camel-imap-utils.c (imap_translate_sexp, etc): No
- longer needed.
-
- * camel-folder-search.h: Add missing CAMEL_FOLDER_SEARCH_TYPE
- #define
-
-2000-12-21 Dan Winship <danw@helixcode.com>
-
- * camel-stream-buffer.c (camel_stream_buffer_gets): Update the
- doc comment: since it always NUL-terminates the buffer, it reads
- at most @max-1 bytes, not @max.
-
- * camel-remote-store.c (remote_recv_line): Fix the "did
- camel_stream_buffer_gets fill the whole buffer" check. Fixes a bug
- when reading lines longer than 1024 characters (eg, IMAP SEARCH
- responses in very large folders).
-
-2000-12-19 Dan Winship <danw@helixcode.com>
-
- * providers/imap/camel-imap-folder.c (imap_refresh_info): Oops.
- Don't do "FETCH 1:0" when the folder is empty.
- (imap_protocol_get_summary_specifier): Request RFC822.SIZE too.
- (imap_update_summary): Parse RFC822.SIZE and add it to the
- summary.
-
-2000-12-18 Dan Winship <danw@helixcode.com>
-
- * providers/imap/camel-imap-summary.c: Add "guint32 server_flags"
- to CamelImapMessageInfo to keep track of the last known message
- flag state on the server.
- (message_info_save, message_info_load): Save/load the
- server_flags.
-
- * providers/imap/camel-imap-folder.c: Make this use
- CamelFolderChangeInfo and emit folder_changed notifications as it
- gets them rather than only on refresh_info.
- (imap_refresh_info): Notice flags that get cleared on the server
- as well as flags that get set.
- (imap_update_summary): Remove a comment that never actually
- applied to the committed code.
-
-2000-12-15 Dan Winship <danw@helixcode.com>
-
- * providers/imap/camel-imap-command.c (camel_imap_command): Change
- the semantics of fmt: Now %S (capital S) means an IMAP "string",
- (which can be sent as either a quoted string or a literal). If
- the server supports LITERAL+, these will be sent as extended
- literals (which don't require any special escaping). Otherwise
- they'll be sent as quoted strings (and it now properly deals with
- " or \ in the string).
- (imap_command_strdup_vprintf): Utility routine that does the real
- work for the functionality mentioned above.
-
- * providers/imap/camel-imap-utils.c (imap_quote_string): Turns a
- string into a proper IMAP "quoted string".
-
- * providers/imap/camel-imap-store.c:
- * providers/imap/camel-imap-folder.c: Use %S instead of "%s" where
- appropriate.
-
-2000-12-22 Not Zed <NotZed@HelixCode.com>
-
- * camel-folder-summary.c (GLOBAL_INFO_UNLOCK): Doh, cut and paste
- victim again, call unlock instead of lock!
- (summary_assign_uid): Unlock around trying to get a new uid, if we
- have a clash.
-
-2000-12-21 Not Zed <NotZed@HelixCode.com>
-
- * tests/folder/Makefile.am (TESTS): reenabled the tests here.
-
- * providers/nntp/camel-nntp-newsrc.c (CamelNNTPNewsrc): Add a
- lock. Made completely mt-safe. Sigh, this is all so i can
- support snooping of the set_flags stuff inside camel-nntp-folder,
- since i've removed the global folder lock from all of the other
- folder summary operations.
- (camel_nntp_newsrc_read_for_server): Setup lock.
- (camel_nntp_newsrc_get_highest_article_read): Lock internal access.
- (camel_nntp_newsrc_get_num_articles_read):
- (camel_nntp_newsrc_mark_article_read):
- (camel_nntp_newsrc_mark_range_read):
- (camel_nntp_newsrc_article_is_read):
- (camel_nntp_newsrc_group_is_subscribed):
- (camel_nntp_newsrc_unsubscribe_group):
- (camel_nntp_newsrc_subscribe_group):
- (camel_nntp_newsrc_get_subscribed_group_names):
- (camel_nntp_newsrc_get_all_group_names): "
- (camel_nntp_newsrc_write_to_file): Lock internal accesses.
- (camel_nntp_newsrc_write): Lock around diry stuff.
-
- * providers/local/camel-maildir-summary.c (maildir_summary_check):
- Lock around our internal poking of the summary hashtable/array.
- (maildir_summary_sync): And the same here too.
-
- * camel-folder-summary.c: Moved the summaryprivate data into
- camel-private.h. Only needed for the locks really.
- (camel_folder_summary_init): Setup locks.
- (camel_folder_summary_set_filename): Lock.
- (camel_folder_summary_index): lock
- (camel_folder_summary_uid): Lock
- (camel_folder_summary_next_uid): "
- (camel_folder_summary_set_uid): "
- (camel_folder_summary_load): Lock around whole load. Hrm,
- probably not required.
- (camel_folder_summary_save): Lock around whole save, this is
- reqwuired, unless we ref/copy the whole list first, and i couldn't
- be bothreed.
- (camel_folder_summary_add): lock
- (summary_assign_uid): Lock around internal accesses.
- (camel_folder_summary_info_new_from_parser): Lock around filtr stuff.
- (camel_folder_summary_info_ref): Add locking. Could probably use
- its own lock?
- (camel_folder_summary_touch): Add locking, likewise.
- (camel_folder_summary_clear): Lock. If the preiovus two are
- changed, then so this will need mroe locking.
- (camel_folder_summary_info_free): Lock around refcounting.
- (camel_folder_summary_remove): Locking.
- (camel_folder_summary_remove_uid): Lock ref, unlock, unref. Also
- fixed a bug that would have made this never work, freeing the key,
- which isn't allocated.
- (camel_folder_summary_remove_index): lock, ref, unlock unref also.
- (camel_message_info_ref): Lock using a separate global lock, since
- we have no context here.
- (camel_message_info_free): Here too.
- (content_info_alloc): Use an alocation lock here. avoids races
- with setting up content_info_chunks, etc.
- (camel_folder_summary_info_new): And here too.
- (camel_folder_summary_load): Changed to use a differnet lock for
- loading/saving.
- (camel_folder_summary_init): Doh, i do need a reflock afterall,
- set one up.
- (camel_folder_summary_finalize): Free it.
- (camel_folder_summary_index): Add a reflock.
- (camel_folder_summary_uid): And here too.
- (camel_folder_summary_info_free): Use reflock instead of
- summary_lock.
- (camel_folder_summary_info_ref): Likewise.
- (camel_folder_summary_remove_uid): Add reflocking.
- (camel_folder_summary_remove_index): And here too.
-
- * providers/vee/camel-vee-folder.c (camel_vee_folder_new): Setup a
- summary object.
- (vee_folder_build): Build each item into the real summary object.
- (vee_folder_add, vee_folder_add_uid, vee_folder_add_change): New
- functions to add a single record to the vfolder summary.
- (vee_folder_build_folder): Use a real summary.
- (vee_get_uids): Removed, use default impl.
- (vee_free_message_info): "
- (vee_get_message_info): "
- (vee_get_summary): "
- (vee_get_unread_message_count): "
- (vee_get_message_count): "
- (vee_sync): Make vee-folder-sync sync all subordinate folders.
- Well i dont think this is right, but enough peopl ehave aksed for
- it.
- (vee_expunge): Same for expunge.
- (vee_set_message_flags): Call parent class, then mirror flags to
- subfolder.
- (vee_get_message_user_flag): Removed, we just use the default
- impl, and our flags should always match.
- (vee_set_message_user_flag): Snoop the set and set on subfolder.
- (vee_get_message_flags): Removed, jsut use parent impl, assume our
- copy matches the real ones.
- (get_real_message): Removed. We sort ofneed to keep the
- summaryitem refed while we use it, so this doesn't make as much
- sense as it did once.
- (camel_vee_folder_finalise): Unhook listening events as we unref
- folders.
- (camel_vee_folder_new): Set the summary messageinfo data size
- properly.
- (vfolder_remove_match): Fixed for summary change.
- (folder_changed): ditto. Also stopped changed items from being
- re-searched and possibly removed. Might have to resort to the old
- whole-search idea again.
- (message_changed): Similarly. Might be easier just not to bother
- with a whole search.
-
- * providers/vee/camel-vee-folder.h: Removes summary
- hashtable/array, and use a real summary object. Sigh, more work.
-
- * providers/nntp/camel-nntp-folder.c (nntp_folder_sync): Move
- summary to folder object.
- (nntp_folder_get_message_count): Removed, use default impl.
- (nntp_folder_set_message_flags): Call parent impl to do the work,
- but snoop for newsrc.
- (nntp_folder_get_uids): Removed, use default impl.
- (nntp_folder_get_summary): "
- (nntp_folder_get_message_info): "
- (nntp_folder_free_message_info): "
- (camel_nntp_folder_new): moved summary to folder class
-
- * providers/imap/camel-imap-folder.c (camel_imap_folder_init):
- Move summary to folder object.
- (camel_imap_folder_new): "
- (imap_finalize): No longer unref the summary (or infact, do
- anything else either).
- (imap_refresh_info): move summary to folder object.
- (imap_sync): "
- (imap_get_message_count): Removed, use default impl.
- (imap_get_unread_message_count): "
- (imap_get_uids): "
- (imap_get_summary): "
- (imap_free_summary): "
- (imap_get_message_info): "
- (imap_free_message_info): "
- (imap_get_message_flags): "
- (imap_set_message_flags): "
- (imap_get_message_user_flag): ", this changes functionality, but
- only by providing non-permanent flags.
- (imap_set_message_user_flag): "
- (imap_update_summary): move summary to folder object, and use
- camel_folder_summary_info_new_from_header, instead of calling the
- virtual function directly.
-
- * providers/local/camel-maildir-folder.c (maildir_append_message):
- move summary to folder object, again.
- (maildir_get_message): "
-
- * providers/local/camel-mh-folder.c (mh_append_message): move
- summary to folder object.
- (mh_get_message): "
-
- * providers/local/camel-mbox-folder.c (mbox_append_message): Move
- summary to folder object
- (mbox_get_message): "
- (mbox_set_message_user_flag): We need our own copy of this, sigh,
- so we can track if the xev needs a rewrite (probably, its only a
- guide anyway).
- (mbox_set_message_user_tag): Same same with this one.
- (camel_mbox_folder_class_init): Link in these new virtual functions.
-
- * providers/local/camel-local-folder.h (CamelLocalFolder): removed
- summary.
-
- * providers/local/camel-local-folder.c (local_get_message_count):
- (local_get_unread_message_count):
- (local_get_uids):
- (local_get_summary):
- (local_free_summary):
- (local_get_message_info):
- (local_free_message_info):
- (local_get_message_flags):
- (local_set_message_flags):
- (local_get_message_user_flag):
- (local_set_message_user_flag):
- (local_get_message_user_tag):
- (local_set_message_user_tag): Removed, all now use default
- implementation.
- (camel_local_folder_class_init): Removed overrides.
- (local_init): Clear folder->summary.
- (local_finalize): move summary to folder.
- (camel_local_folder_construct): "
- (local_sync): "
-
- * camel-folder.c (free_summary): Provide a real impl.
- (get_summary): "
- (free_uids): "
- (get_uids): "
- (free_message_info): "
- (get_message_info): "
- (set_message_user_tag): "
- (get_message_user_tag): "
- (set_message_user_flag): "
- (get_message_user_flag): " Sigh, the last so far.
- (get_message_flags): Sigh, 1 more afterall.
- (get_unread_message_count): And and this.
- (get_message_count): and this!
- (set_message_flags): Sigh, and this.
- (camel_folder_finalize): Unref the summary if we have it.
- (camel_folder_free_uids): Remove locking.
- (camel_folder_get_message_flags): Remove locks, since the summary
- is now mt-safe.
- (camel_folder_set_message_flags): "
- (camel_folder_get_message_user_flag): "
- (camel_folder_set_message_user_flag): "
- (camel_folder_get_message_user_tag): "
- (camel_folder_set_message_user_tag): "
- (camel_folder_get_message_info): "
- (camel_folder_free_message_info): "
- (camel_folder_get_uids): "
- (camel_folder_free_summary): "
- (camel_folder_get_unread_message_count): "
- (get_unread_message_count): Check we got info, no big deal, but
- the summary might change while we're counting, and upset the count
- slightly.
- (camel_folder_get_message_count): Remove locks.
-
- * camel-folder.h (struct _CamelFolder): Added CamelFolderSummary
- to the base folder object. Sigh, this is going to be a lot of
- work ...
-
- * camel-service.c (camel_service_init, finalise): changed
- connect_lock to be recursive e_mutex.
-
- * camel-remote-store.c (camel_remote_store_init, finalise): Changed
- stream_lock to recursive e_mutex.
-
- * camel-private.h (RemoteStorePrivate, ServicePrivate): Use
- recursive mutexes for connect_lock & stream_lock. Ick. Because
- of the imap code.
-
- * providers/imap/camel-imap-private.h: Change the command_lock to
- be an EMutex.
-
- * providers/imap/camel-imap-store.c (connect_to_server): Removed
- the command_lock stuff. If we are just connected again, it should
- be safe to assume we have exclusive access at this point without
- it (and yes, removes a deadlock).
- (imap_create): Remove a lock that wasn't even supposed to be
- there.
- (camel_imap_store_finalize, init): g_mutex->e_mutex(E_MUTEX_REC).
- Use a recursive mutex since the imap code is multiply recursivly
- calling some functions (sigh, it would be nice to fix this).
-
-2000-12-20 Not Zed <NotZed@HelixCode.com>
-
- * camel-folder.c (folder_changed): Change the locks to inside the
- if. Stops a deadloc,k and we dont need a lock to read a value.
- (message_changed): Likewise.
-
- * camel.c (camel_init): Blah, comment out g_thread_init, leave it
- to the caller, since it can only ever be done once.
-
- * camel-folder-thread.c (camel_folder_thread_messages_new): Ref
- and save the folder in the thread return. Also get the summary
- once, and access that for the messageinfo's. Added bonus that now
- threads should come out in a similar order. We need to do this so
- that the messageinfo's dont get unref'd under us, and using the
- summary directly simplifies memory management.
- (camel_folder_thread_messages_destroy): Free the summary/unref the
- folder.
-
- * camel-folder-thread.h: Add a folder to CamelFolderThread struct.
-
-2000-12-19 Not Zed <NotZed@HelixCode.com>
-
- * providers/imap/camel-imap-utils.c (imap_translate_sexp): Unref
- using e_sexp_unref, since it is no longer an object.
-
- * tests/lib/camel-test.c: Added a global lock, and made it
- thread-aware.
-
- * camel-exception.c: Add a global lock. Not sure its really
- needed here, but it doesn't really hurt.
- (camel_exception_clear): Lock around access.
- (camel_exception_set): Same.
- (camel_exception_setv): "
- (camel_exception_xfer): "
-
- * providers/local/Makefile.am (noinst_HEADERS): Added, for
- camel-local-private.h
-
- * camel-folder.c (camel_folder_search_by_expression): Removed
- locking here, now upto the implementing class to lock.
- (camel_folder_search_free): Removed the folder lock here too, for
- consistency really, and the locking probably wasn't needed.
-
- * providers/local/camel-local-folder.c (local_get_summary):
- Changed to copy/ref the summary items.
- (local_free_summary): Unref the summary items/free the array.
- (local_get_unread_message_count): Free info lookups.
- (local_search_by_expression): Perform more fine-grained locking,
- and dont lock the whole folder while searching, just the search
- object. Dum de dum, it *would* be possible to not even have to
- lock the search, by using our own copy of the search object each
- time. Could be investigated.
- (local_init): Init priaate data/lock.
- (local_finalize): Free private data/lock.
- (local_search_free): Also lock around the search object, because
- it accesses global data inside.
-
- * README.mt: Some info about the mt code development.
-
- * camel-folder-search.c (match_message): Put in a warning, this
- plain deadlocks so far, but i'm going to bed now.
- (camel_folder_search_finalize): Use e_sexp_unref() since its no
- longer an object.
-
- * camel-session.c (camel_session_init): Init private data/lock.
- (camel_session_finalise): Free private data/lock.
- (camel_session_register_provider): Lock hash insert.
- (service_cache_remove): Lock.
- (camel_session_list_providers): "
- (camel_session_get_service): Lock the whole function.
-
- * camel-session.h (struct _CamelSession): Added private data.
-
- * providers/imap/camel-imap-store.c (camel_imap_store_init): Setup
- private data.
- (camel_imap_store_finalize): Free private data.
- (connect_to_server): Lock around command calls. I dont think its
- needed, but it shouldn't hurt either.
- (imap_connect): Lock around command calls. Again, I don think it
- is needed, but wont hurt.
- (imap_disconnect): ditto for this one.
- (imap_create): Lock around command.
- (get_folder): "
- (get_folder_info): "
- (subscribe_folder): "
- (unsubscribe_folder): "
- (imap_keepalive): "
-
- * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Lock
- around calling a command.
- (imap_refresh_info): Likewise.
- (imap_sync): "
- (imap_append_message): "
- (imap_copy_message_to): "
- (imap_move_message_to): "
- (imap_get_message): "
- (imap_update_summary): "
- (imap_search_by_expression): ", also minor logic cleanup.
- (imap_get_summary): Copy/ref the summary items.
- (imap_free_summary): And free it now too.
-
- * providers/imap/camel-imap-auth.c (imap_try_kerberos_v4_auth):
- Lock the command stream for the command session.
-
- * providers/imap/camel-imap-private.h: Private (locking info)
- stuff for imap provider.
- (CAMEL_IMAP_STORE_UNLOCK): Fix to call unlock, rather than lock!
-
- * camel-service.c (camel_service_query_auth_types): Lock also for
- the connection here, incase the service needs to connect.
-
- * camel-remote-store.c (camel_remote_store_init): Init private
- data/lock.
- (camel_remote_store_finalise): Readded, free private data/lock.
- (remote_send_stream): Changed to return the number of bytes
- written, like a good little stream function should.
- (camel_remote_store_send_string): Lock for stream access.
- (camel_remote_store_send_stream): Same here.
- (camel_remote_store_recv_line): And here.
- (camel_remote_store_refresh_folders): Lock the store for cache
- access.
- (timeout_cb): Lock for stream access.
-
-2000-12-18 Not Zed <NotZed@HelixCode.com>
-
- * camel-service.c (camel_service_init): Init private data.
- (camel_service_finalise): Free private data.
- (camel_service_connect): Lock around connection access.
- (camel_service_disconnect): "
-
- * camel-service.h (struct _CamelService): Added private field.
-
- * camel-store.c (camel_store_init): Init private data/lock.
- (camel_store_finalize): Free private data/lock.
- (camel_store_get_folder): Lock internal calls.
- (camel_store_delete_folder): "
- (camel_store_rename_folder): "
- (camel_store_get_root_folder): "
- (camel_store_get_default_folder): "
- (camel_store_get_folder_info): "
- (camel_store_folder_subscribed): "
- (camel_store_subscribe_folder): "
- (camel_store_unsubscribe_folder): "
- (lookup_folder): Lock accesses to the folder cache.
- (cache_folder): "
- (uncache_folder): And here too.
-
- * camel-store.h (struct _CamelStore): Added a private field.
-
- * Makefile.am (noinst_HEADERS): Add camel-private.h. There is a
- comment in that header as to why it ins't installed.
-
- * camel-private.h: New header for private data, that subclasses
- can get to.
-
- * tests/lib/camel-test.c (camel_test_init): If we do have threads
- enabled already, dont call g_thread_init().
-
- * tests/lib/folders.c (test_folder_counts): Add free of info.
- (test_folder_message): And here too.
-
- * providers/local/camel-maildir-summary.c (remove_summary): Free
- info.
- (maildir_summary_check): Free info lookups.
-
- * providers/local/camel-mh-summary.c (message_info_new): Removed,
- didn't add value.
- (remove_summary): free info after being used.
- (mh_summary_check): Free info lookups.
- (mh_summary_sync): and here too.
-
- * providers/local/camel-mbox-summary.c (summary_update): Free info
- lookups.
- (mbox_summary_sync_full): Likewise.
- (mbox_summary_sync_quick): And here.
- (mbox_summary_sync): ... and here.
-
- * providers/local/camel-maildir-folder.c (maildir_get_message):
- Free messageinfo lookups.
-
- * providers/local/camel-mh-folder.c (mh_get_message): Free
- messageinfo lookups.
-
- * providers/local/camel-mbox-folder.c (mbox_get_message): Free
- messageinfo lookups.
-
- * providers/local/camel-local-summary.c
- (message_info_new_from_message): Removed, since it wasn't doing
- anything useful.
- (message_info_new_from_parser): Same. And some other dead code.
-
- * providers/local/camel-local-folder.c (local_get_message_info):
- deconstify.
- (local_free_message_info):new func to free info.
- (local_get_uids):
- (local_get_message_flags):
- (local_set_message_flags):
- (local_get_message_user_flag):
- (local_set_message_user_flag):
- (local_get_message_user_tag):
- (local_set_message_user_tag): Free all info lookups.
- (local_expunge): Dont call camel_folder_* functions, to avoid a deadlock.
-
- * providers/nntp/camel-nntp-folder.c
- (nntp_folder_get_message_info): deconstify.
- (nntp_folder_free_message_info): Free summary item.
- (nntp_folder_get_message_flags): Free summary lookup.
- (nntp_folder_set_message_flags): and here.
- (nntp_folder_get_uids): And here.
-
- * providers/imap/camel-imap-auth.c: Make base64_*_simple optional
- with the HAVE_KRB4 flag.
-
- * providers/imap/camel-imap-folder.c (imap_free_message_info):
- Added a free of the message info.
- (imap_refresh_info):
- (imap_sync):
- (imap_refresh_info):
- (imap_get_unread_message_count):
- (imap_get_uids):
- (imap_get_message_flags):
- (imap_set_message_flags): Free any summary lookups.
- (imap_get_message_flags): Get the message info directly from the
- summary, not via the folder interface.
- (imap_move_message_to): Dont call folder functions directly
- (delete_message), as it will deadlock since we already have the
- lock.
-
- * providers/vee/camel-vee-folder.c (vee_free_message_info): Free/unref
- the messageinfo.
- (vee_get_message_info): First ref the internal copy, then return it.
- (folder_changed): Free all got message info's.
- (message_changed): And here.
- (get_real_message): And here.
- (vee_folder_build): and here.
- (vee_folder_build_folder): ... and here.
-
- * camel-folder-summary.c (camel_folder_summary_info_new):
- Initialise the messageinfo refcount to 1.
- (camel_folder_summary_info_free): Down the refcount till we need
- to free.
- (camel_folder_summary_info_ref): New function to up the refcount.
- (camel_message_info_dup_to): Sewt the refcount of the dest to 1.
- (camel_message_info_new): Set refcount to 1.
- (camel_message_info_new_from_header): Dont allocate the mi
- ourselves.
- (camel_message_info_free): Handle refcounting.
- (camel_message_info_ref): New function.
- (camel_folder_summary_index): Ref the messageinfo before returning
- it.
- (camel_folder_summary_uid): Likewise.
- (camel_folder_summary_save): Access the messageinfo array
- directly, rather than through accessors (saves ref/unref).
- (camel_folder_summary_clear): Likewise.
- (camel_folder_summary_remove_index): Likewise.
- (main): Free lookups.
-
- * camel-folder-summary.h (CamelMessageInfo): Added a refcount
- value.
-
- * camel-folder.c (camel_folder_free_message_info): New function to
- 'free' a message info.
- (camel_folder_get_message_info): Deconstify return.
- (camel_folder_lock): New (internal) function to thread-lock the
- folder.
- (camel_folder_unlock): Likewise for unlocking.
- (freeze):
- (thaw): Lock around access to folder->frozen/changed_frozen.
- (folder_changed): Likewise.
- (message_changed): Likewise.
- (camel_folder_init): Init private data, locks and moved frozen
- info.
- (camel_folder_finalize): Free new private data, locks and moved
- frozen info.
- (copy_message_to): Free the messageinfo after we've used it.
- (move_message_to): And here too.
- (camel_folder_sync): Lock around virtual method invocation. Just
- locking around any virtual method that is known to need it. This
- is the first cut at locking.
- (camel_folder_refresh_info): "
- (camel_folder_expunge): "
- (camel_folder_get_message_count): "
- (camel_folder_get_unread_message_count): "
- (camel_folder_append_message): "
- (camel_folder_set_message_flags): "
- (camel_folder_get_message_flags): "
- (camel_folder_get_message_user_flag): "
- (camel_folder_set_message_user_flag): "
- (camel_folder_get_message_user_tag): "
- (camel_folder_set_message_user_tag): "
- (camel_folder_get_message): "
- (camel_folder_get_uids): "
- (camel_folder_free_uids): "
- (camel_folder_get_summary): "
- (camel_folder_search_by_expression): "
- (camel_folder_free_summary): "
- (camel_folder_search_free): "
- (camel_folder_move_message_to): "
- (camel_folder_copy_message_to): "
- (copy_message_to): Dont call any of our own folder functions
- directly, otherwise we will deadlock.
- (move_message_to): Likewise.
-
- * camel-folder.h (CamelFolder): Added free_message_info() function
- & deconstify get_message_info()'s return.
- (CamelFolder): Add a private field (for locks).
- (struct _CamelFolder): Moved changed_changed/frozen into private
- data, since it really is private and now needs locked access.
-
-2000-12-15 Jeffrey Stedfast <fejj@helixcode.com>
-
- * camel-mime-utils.c (header_fold): When checking to see if we
- need to fold the header, when we come accross a \n, make sure to
- start at p + 1 the next time through the loop or else we get into
- an infinite loop.
-
-2000-12-13 Dan Winship <danw@helixcode.com>
-
- * Namespace cleanup: change a bunch of IS_CAMEL_* macros to
- CAMEL_IS_*
-
-2000-12-13 Chris Toshok <toshok@helixcode.com>
-
- * providers/imap/camel-imap-auth.c: add #include <sys/types.h> for
- freebsd.
-
-2000-12-12 Christopher James Lahey <clahey@helixcode.com>
-
- * camel-folder-summary.c, camel-folder-summary.h: Added #ifndef
- NO_WARNINGS around a #warning. Added (void) to the prototype and
- declaration of camel_message_info_new.
-
- * camel-mime-message.h: Added an include for
- camel-mime-filter-bestenc.h. Added a prototype for
- camel_mime_message_set_best_encoding. Reformatted prototypes to
- line up.
-
- * camel-mime-parser.c: Added #if d(!)0 around the states string
- lookup table since it's only used in debugging output.
-
- * camel-seekable-substream.c (stream_flush): Added a cast.
-
- * providers/imap/camel-imap-auth.c: Added #include <netinet/in.h>.
-
- * providers/imap/camel-imap-folder.c (imap_refresh_info): Made uid
- and flags const to fix warnings here.
-
- * providers/imap/camel-imap-store.c (get_folder_info): Made p
- const to fix warnings here.
-
-2000-12-12 Dan Winship <danw@helixcode.com>
-
- * tests/lib/Makefile.am: Add missing .h file. (From campd.)
-
-2000-12-11 Not Zed <NotZed@HelixCode.com>
-
- * providers/smtp/camel-smtp-transport.c (smtp_data): Remove use of
- linewrap filter. Headers are now wrapped. encode_8bit already
- enforces a 998 octet line limit.
- (smtp_data): Also fixed a memleak, we always have to unref our own
- copy of the filters. We also dont need to remove them manually,
- so dont bother. The type's an int too ...
-
- * camel-internet-address.c (internet_unformat): When scanning past
- quotes, remove them also.
- (camel_internet_address_format_address): If the name contains "'s,
- or ','s then strip and quotes and wrap the whole lot in one set of
- quotes.
-
- * Makefile.am (noinst_HEADERS): We dont want to install
- camel-charset-map-private.h, ever. There are probably other
- similar files ..?
-
- * camel-mime-part.c (write_to_stream): Fold header lines
- appropriately as we're writing them out.
-
- * camel-mime-utils.c (header_fold): Add a new argument, headerlen,
- tells it how long the associated header token is.
- (header_fold): Also,k check to see if we need to fold first, using
- a better algorithm, and also accept already-folded lines, and
- re-process accordingly.
- (rfc2047_decode_word): Add a little buffer space to iconv output
- for shifting overheads?
- (rfc2047_decode_word): finish the iconv with a null call, to flush
- shift state, etc.
- (rfc2047_encode_word): Attempt to break up long words into
- appropriately sized, independent, chunks. See rfc2047, section 2.
- (header_decode_mailbox): Dont add in extra spaces into the output
- if we are decoding adjacent encoded words. We can only guess this
- case, as some broken mailers put encoded words inside quoted
- words.
- (header_encode_phrase): Dont merge words if they are going to end
- up too long. Also change back ot only merge consecutive words of
- the same type. e.g. 'foo. blah fum.' -> "foo." blah "fum." or
- 'iam an. idiot' -> iam "an." idiot
-
- * camel-medium.c (camel_medium_set_header): Hrm, we actually want
- to call set_header, not add_header here, probably explains some
- duplicate X-Evolution headers i was trying to track down. Also
- changed the api to handle a NULL value == remove the header.
-
- * providers/local/camel-maildir-summary.c
- (maildir_summary_decode_x_evolution): Always return error, we dont
- use x-evolution for maildir.
- (maildir_summary_encode_x_evolution): Always return a NULL string,
- likewise.
- (maildir_summary_add): Hook in here, since the _new function
- doesn't have access to any flags from the caller. If we have
- flags, then update the filename again. Not ideal, but should
- work.
-
-2000-12-08 JP Rosevear <jpr@helixcode.com>
-
- * tests/message/Makefile.am: Remove test3 from build until the files
- show up
-
-2000-12-09 Not Zed <NotZed@HelixCode.com>
-
- * camel-mime-message.c (camel_mime_message_set_date): Change the
- sign of the default date offset when none is supplied.
- (camel_mime_message_set_date): Also do dst if its dst (forward 1
- hour). Fixes #928 + some.
-
-2000-12-06 Not Zed <NotZed@HelixCode.com>
-
- * tests/lib/camel-test.h (check): Change line no format so that
- emacs can detect it.
-
-2000-12-06 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-folder.c (imap_refresh_info): We want
- to bitwise-or the server and cached flags here so that we keep the
- flags that we have set locally and set any additional flags that a
- parallel connection may have set.
-
-2000-12-05 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/smtp/camel-smtp-transport.c (smtp_data): If the data
- wrapper fails to be written to the stream, unref it and the
- filters before returning.
-
-2000-12-05 Dan Winship <danw@helixcode.com>
-
- * providers/imap/camel-imap-folder.c (imap_get_message): use
- BODY.PEEK[] rather than RFC822, so the message doesn't get marked
- as \Seen.
- (imap_refresh_info): Fix a really really really dumb bug.
-
-2000-12-05 Dan Winship <danw@helixcode.com>
-
- * providers/imap/camel-imap-folder.c (imap_set_message_flags): Fix
- the check for "flags aren't actually changing".
-
- * providers/local/camel-local-folder.c (local_set_message_flags,
- local_set_message_user_flag, local_set_message_user_tag): Don't
- emit message_changed unless the flags actually changed.
-
- * providers/nntp/camel-nntp-folder.c
- (nntp_folder_set_message_flags): Don't emit message_changed unless
- the flags actually changed. Fix the check for marked as seen.
-
-2000-12-05 Not Zed <NotZed@HelixCode.com>
-
- * camel-seekable-substream.c (stream_flush): stream_flush does
- make sense for a substream afterall (if you have a stream_write).
- (stream_write): Implement this.
- (stream_seek): Change the STREAM_END behaviour to be more sane.
- if bounded go from the end of the bound, if unbounded, go from the
- end of the parent stream.
-
- * camel-stream-mem.c (stream_read): Dont return error if reading
- past the end of data, just return 0.
-
- * camel-stream-fs.c (camel_stream_fs_init): Initialise the stream
- to be unbound.
- (stream_seek): Fix the logic when seeking from the end of an
- unbounded stream.
- (camel_stream_fs_new_with_fd): If the fd is invalid (-1), then
- return NULL immediately.
- (stream_seek): Range check a SEEK_END so it fits within
- bound_start.
-
-2000-12-01 Not Zed <NotZed@HelixCode.com>
-
- * tests/lib/folders.c (test_folder_basic): New test to perform
- basic store operations on folders (taken from folders/test1).
- (test_folder_message_ops): Tkane the guts out of folders/test2.
-
-2000-12-04 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/smtp/camel-smtp-transport.c (smtp_connect): i18n-ize
- exception strings.
- (get_name): And here.
- (_send_to): Here too.
- (smtp_helo): And here and there...
- (smtp_mail): And around the square...
- (smtp_rcpt): Saying catch me if you can...
- (smtp_data): And here three.
- (smtp_rset): And here.
- (smtp_quit): And finally here.
-
-2000-12-01 Jeffrey Stedfast <fejj@helixcode.com>
-
- * camel-folder-search.h: Added system_flag to CamelFolderSearchClass
-
- * camel-folder-summary.c (camel_system_flag_get): Convenience
- function to return whether or not a flag is set using a string as
- the flag name.
- (camel_system_flag): Return the integer value of the flag string.
-
- * camel-folder-search.c (search_system_flag): New ESExp callback
- for allowing vfoldering on CamelMessageInfo flags.
-
-2000-12-01 Dan Winship <danw@helixcode.com>
-
- * camel-service.c (camel_service_disconnect): Don't
- g_return_if_fail if the service is already disconnected. Just
- return.
-
- * providers/pop3/camel-pop3-store.c (pop3_try_authenticate):
- Return FALSE (don't try again) if we get CAMEL_POP3_FAIL.
- (pop3_connect): If we don't succeed, disconnect.
-
-2000-11-30 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-store.c
- (parse_list_response_as_folder_info): Fix a possible bug where
- 'name' could be uninitialized.
-
- * camel-folder-summary.c (camel_message_info_new): New convenience
- function, doesn't do much but it sure makes code cleaner to read.
- (camel_message_info_new_from_header): This one makes my life heaven.
-
-2000-11-30 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-summary.c (camel_imap_summary_new):
- Handle the case where the summary failed to load - clear the
- summary and then set the dirty bit so that it is sure to save
- later. Is this the right fix?
-
-2000-11-30 Dan Winship <danw@helixcode.com>
-
- * camel-exception.c (camel_exception_setv): Remove unused
- variable.
-
-2000-11-30 Not Zed <NotZed@HelixCode.com>
-
- * providers/local/camel-mbox-folder.c (mbox_get_message): Remove
- assertion that content is there, when it no longer can be.
-
- * camel-folder-summary.h: Removed pos/bodypos/endpos from
- camelmeessagecontentinfo.
- (CamelMessageFlags): Added an attachments flag.
-
- * providers/local/camel-local-summary.h: Added load virtual
- function.
-
- * tests/lib/folders.c (test_message_info): Accessors.
- (test_folder_message): "
-
- * camel-folder-thread.c (get_root_subject): Fix accessors.
- (dump_tree_rec): "
-
- * camel-folder-search.c (camel_folder_search_execute_expression):
- Accessors for messageinfo.
- (search_match_all): "
- (search_header_contains): "
- (search_header_contains): "
- (search_body_contains): "
- (camel_folder_search_execute_expression): Use mepool_strdup.
-
- * providers/local/camel-mbox-summary.c (summary_update): Accessors
- for messageinfo.
- (mbox_summary_sync_full): "
-
- * providers/local/camel-mh-summary.c (remove_summary): Accessors
- for messageinfo.
- (mh_summary_check): "
- (mh_summary_sync_message): "
- (mh_summary_sync): "
-
- * providers/local/camel-mh-folder.c (mh_append_message): Use
- accessor for uid.
-
- * providers/local/camel-local-summary.c
- (local_summary_decode_x_evolution): Use accessor to uid.
- (local_summary_encode_x_evolution): Likewise.
- (message_info_new): And here.
- (camel_local_summary_load): Call virtual load function.
- (local_summary_load): Default load function, load summary.
- (camel_local_summary_load): Check file exists before trying to
- load.
- (camel_local_summary_construct): Turn off building content info!
- (CAMEL_LOCAL_SUMMARY_VERSION): Bump, since we dont build content
- info anymore.
- (camel_local_summary_load): After a successful load/check, do a
- save too so we dont have to go through it again randomly.
-
- * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): Use
- accessors for messageinfo.
-
- * providers/nntp/camel-nntp-folder.c (nntp_folder_get_uids): Use
- accessors for uid.
-
- * providers/imap/camel-imap-folder.c (imap_refresh_info): Use
- accessor for uid.
- (imap_sync): Likewise.
- (imap_get_uids): Likewise.
- (imap_update_summary): And here.
-
- * providers/vee/camel-vee-folder.c (vfolder_remove_match): Use
- accessor for uid.
- (vfolder_add_match): Handle estrv stuff.
- (vfolder_change_match): Accessor for uid.
- (get_real_message): "
- (vee_get_uids): "
- (vee_folder_build): " + estrv.
- (vee_folder_build_folder): "
-
- * providers/local/camel-maildir-folder.c (maildir_append_message):
- Use acccessors for uid's.
- (maildir_get_message): Here too.
-
- * providers/local/camel-maildir-summary.c
- (camel_maildir_summary_init): Setup the string count for us.
- (message_info_new): Access the string array directly.
- (message_info_free): No need to free string if using array.
- (camel_maildir_summary_info_to_name): Use accessor to get to uid.
- (remove_summary): And here.
- (maildir_summary_check): Likewise.
- (maildir_summary_sync): And here.
- (maildir_summary_load): Load up a cache of uid->filename mappings
- before loading the actual summary file. This saves us having to
- waste the diskspace storing the filenames in the summary itself,
- and also helps us sync the summary better on load.
- (message_info_load): If we have the load_map setup, and the uid
- exists, then set the filename cache from it, and update the flags
- from the name, incase our summary mismatches it.
-
- * camel-folder-summary.c (camel_folder_summary_init): Setup string
- count for compressed info record. An optional compile mode which
- stores all strings for a given messageinfo into a packed array,
- which should save 36-50 bytes/record.
- (camel_folder_summary_info_new): Init the string array.
- (message_info_new): Set the string array items, as required.
- (message_info_load): And here too.
- (message_info_save): Use accessors to get to strings.
- (message_info_free): Free strings as one.
- (camel_message_info_dup_to): Handle packed array case.
- (camel_folder_summary_add): Use accessors. And pack the strv
- before storing it.
- (summary_assign_uid): New function to assign a unique uid to a
- message, if it doesn't have one.
- (camel_folder_summary_add): Call assign_uid instead of doing it
- ourselves.
- (camel_folder_summary_info_new_from_parser): "
- (camel_folder_summary_info_new_from_message): "
- (camel_folder_summary_encode_string): constify.
- (camel_folder_summary_encode_token): "
- (summary_build_content_info_message): Fix accessors to messageinfo.
- (CAMEL_FOLDER_SUMMARY_VERSION): Bumped, for removal of
- contentinfo->pos data.
- (camel_folder_summary_info_new_from_parser): Calculate the size
- based on the parser position, not the removed contentinfo stuff.
- (camel_folder_summary_info_new_from_message): Remove size stuff.
- (camel_folder_summary_offset_content): Removed, no longer means anything.
- (content_info_new):
- (content_info_load):
- (content_info_save):
- (summary_build_content_info): Remove stuff for contentinfo->pos*.
- (summary_build_content_info): Take a msginfo argument, set
- attachments flag if we find any attachments.
- (summary_build_content_info_message): set attachments flag if we
- find any attachments.
- (camel_folder_summary_info_new_from_parser): Always scan the
- content info, even if we dont save it.
- (camel_folder_summary_info_new_from_message): And here too.
- (summary_build_content_info): Only create the contentinfo stuff if
- we have it turned on, otherwise just parse and discard.
- (summary_build_content_info_message): Likewise.
-
-2000-11-29 Jeffrey Stedfast <fejj@helixcode.com>
-
- * camel-store.c (camel_store_get_folder): Updated the gtk-doc
- comment.
-
-2000-11-29 Dan Winship <danw@helixcode.com>
-
- * camel-mime-utils.c:
- * camel-mime-filter-charset.c: Use iconv instead of unicode_iconv.
-
- * providers/imap/camel-imap-command.c (imap_read_untagged): Fix
- some off-by-one-ness.
-
- * camel-stream-buffer.c (stream_read): Fix another bug found in
- previously-unused code here.
-
-2000-11-29 Ettore Perazzoli <ettore@helixcode.com>
-
- * tests/lib/Makefile.am (INCLUDES): `$(top_srcdir)' for builddir
- != srcdir compilation.
-
-2000-11-29 Not Zed <NotZed@HelixCode.com>
-
- * tests/message/test2.c (main): Add a missed unref.
-
- * camel-stream-mem.c (camel_stream_mem_set_buffer): We must set
- ourselves as the owner of the byte-array.
- Weird, someone has modified this file (its been reindented), but i
- can't see any changelogs ...
-
- * tests/lib/messages.c (content_finalise): Fix memleak in tester,
- free byte array when our content object is deleted.
-
- * camel-folder-search.c (camel_folder_search_finalize): Yeah
- great, so the sexp is a gtk object, not a camel object. Isn't
- that going to be fun to fix?
-
- * camel-session.c (camel_session_finalise): Free the storage path.
-
- * providers/local/camel-local-store.c (camel_local_store_init): If
- store->folders is setup, free it first, then overwrite. Hmm,
- this seems a bit crappy to me.
-
- * camel-store.c (camel_store_init): Dont setup store->folders if
- its already setup.
-
- * camel-exception.c (camel_exception_setv): Removed a memleak. no
- need to strdup after a strdup_printf!!!
-
- * camel-address.c (camel_address_finalize): Free the address
- ptrarray, once finished.
-
- * providers/local/camel-local-folder.c (local_finalize): Make sure
- we dont leave the folder locked on close.
- (local_finalize): Free summary/search.
-
- * providers/local/camel-mh-summary.c (mh_summary_next_uid_string):
- Small memleak, always free name after using it.
-
- * camel-mime-part.c (set_content_object): Free txt after setting
- the header.
-
- * providers/local/camel-maildir-summary.c (maildir_summary_check):
- Fix a memleak, close the dir after scanning new.
- (message_info_free): Added so we can free the filename cached in
- the messageinfo.
- (camel_maildir_summary_finalise): Free the hostname.
-
- * tests/folder/test[12].c (main): Clear out camel-test before
- starting.
-
- * providers/local/camel-mbox-summary.c (mbox_summary_sync_quick):
- Because encode_x_evolution folds the line (sigh, because
- encode_param does, unlike every other function in
- camel-mime-utils), unfold the encoded result before comparing.
- (mbox_summary_sync_quick): Another small memleak, free xevnew once
- finished with it.
-
- * camel-mime-utils.c (header_decode_quoted_string): Removed a
- redundant check for c=0.
- (header_unfold): New function to un-fold headers.
-
- * providers/local/camel-local-summary.c
- (local_summary_encode_x_evolution): some problems with encoding
- tags, using the wrong output strings.
- (local_summary_encode_x_evolution): We dont need to append a ;
- either, param_list_format_append() will do it for us.
-
-2000-11-28 JP Rosevear <jpr@helixcode.com>
-
- * camel-lock.c: No longer hard code the enabled lock types
-
-2000-11-28 Dan Winship <danw@helixcode.com>
-
- * camel-remote-store.c (remote_recv_line): Don't set exception to
- g_strerror (errno) when nread == 0, because it won't have been
- set.
-
- * providers/pop3/camel-pop3-folder.c (pop3_finalize): Don't try to
- free things if they haven't been set yet.
-
-2000-11-28 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/smtp/camel-smtp-transport.c (smtp_connect): Clear the
- exception if EHLO fails before trying HELO in the cases where the
- SMTP provider doesn't announce its ESMTPness.
-
-2000-11-28 Not Zed <NotZed@HelixCode.com>
-
- * providers/local/camel-maildir-summary.c
- (camel_maildir_summary_init): Set the info size's properly, oops!
-
- * tests/lib/folders.[ch]: Folder testing helpers.
-
- * tests/folder/test2.c: Test basic message ops on folders.
-
- * tests/folder/test1.c (main): Test basic folder ops on (local)
- stores.
-
- * providers/local/camel-local-provider.c
- (camel_provider_module_init): Removed some debug.
-
- * providers/local/camel-maildir-folder.c
- (camel_maildir_folder_class_init): fix parent class.
-
- * providers/local/camel-mh-folder.c (camel_mh_folder_class_init):
- Fix parent class (damn cut & paste).
-
- * providers/local/camel-maildir-store.c (get_folder): Call parent
- impl.
- (camel_maildir_store_class_init): Fix parent class setup.
- (delete_folder): Check the folder exists before trying to delete
- it.
- (delete_folder): Try and make the delete operation atomic/rollback
- failures. e.g. if one directory isn't empty, then create the
- other empty ones back. Also clear the tmp directory fully first.
-
- * providers/local/camel-mbox-store.c (get_folder): Call parent
- impl.
- (camel_mbox_store_class_init): parent class is camel_local_store,
- not camel_folder, oops.
- (delete_folder): Return an error if it doesn't exist, rather than
- covering it up.
-
- * providers/local/camel-mh-store.c (get_folder): Call parent impl.
- (camel_mh_store_class_init): fix parent class setup.
- (delete_folder): Error if it doesn't exist now.
-
- * camel-folder.c (camel_folder_move_message_to):
- (camel_folder_copy_message_to): Added warnings as these functions
- are going to be removed later.
-
- * camel-store.c (camel_store_get_root_folder): Fix for an early
- api change. We want CAMEL_STORE_FOLDER_CREATE, not TRUE, since
- its a flag.
- (camel_store_get_default_folder): And here too.
-
- * providers/local/camel-local-store.c (xrename): Handle renaming
- folders differently to renaming files.
- (get_default_folder_name): local stores dont have a default
- folder, so make it so. Or at least, it doesn't seem to make sense
- to have one.
- (get_root_folder_name): Same for root.
- (get_folder): Added parent implementation, that makes sure the
- service path exists, if we are creating a new folder (but doesn't
- create the folder).
-
-2000-11-27 Not Zed <NotZed@HelixCode.com>
-
- * providers/local/camel-local-store.c (xrename): Fixed races. Use
- link/unlink, rather than rename, to properly detect overwriting
- another file. And allow some files to be missing.
-
-2000-11-28 Radek Doulik <rodo@helixcode.com>
-
- * providers/local/camel-local-summary.c
- (local_summary_decode_x_evolution): add scan = scan->next; to
- avoid infinite loop
-
-2000-11-27 Dan Winship <danw@helixcode.com>
-
- * providers/imap/camel-imap-command.c (imap_read_untagged): Make
- this gratuitously more complicated. No wait, I mean, fix bugs. Now
- fully handles NULs in the data stream (which "can't happen" but
- do) and also handles responses containing multiple literals. Also
- does less copying than the original code.
-
- * camel-stream-buffer.c (stream_read): Fix a bug that could make
- it lose sync and/or overrun buffers.
-
-2000-11-27 JP Rosevear <jpr@helixcode.com>
-
- * providers/local/.cvsignore: shush
-
-2000-11-27 Not Zed <NotZed@HelixCode.com>
-
- * providers/Makefile.am: Removed mh, mbox, added local, to the default.
-
-2000-11-24 Not Zed <NotZed@HelixCode.com>
-
- * tests/data/getaddr.pl: little util to scan mailboxes for any and
- every address they contain.
-
- * tests/message/test2.c (main): Added a bunch of stuff to test
- decoding/reencoding/etc of internationalised addresses.
-
- * tests/message/lib/address-data.h: Copy of some unicode/other
- testing data. **Beware** of editing this file in emacs, it'll
- probably try and convert all the characters to something
- unusable.
-
- * tests/lib/camel-test.c (camel_test_break): Add a debugger hook
- point.
-
- * camel-mime-utils.c (quoted_encode): Check for space and convert
- to _ separately.
- (header_decode_mailbox): Fixed the 'check comments for realname'
- code, problem was the domain getting code was skipping all
- whitespace/comments before we could get a look-in. This is
- approximate but fairly robust.
- (header_decode_text): Dont use the c-type isspace func here, we
- want a specific whitespace only.
- (header_decode_text): If we have decoded words next to each other,
- do not insert whitespaces between them, which is what rfc2047 requires.
- (header_decode_text): Make c unsigned too.
-
- * tests/README: Added at least some explanation of all this stuff.
-
- * tests/lib/camel-test.h (check_msg): Added a non-gcc version of
- the fail command, we dont get the expression that failed, but no
- matter. Should be (more) portable now.
- (check, check_msg): Put the file/lineno in the default message.
-
- * Makefile.am (SUBDIRS): Add tests.
-
- * camel-mime-filter-basic.c (filter): Well, I'll add the extra
- bytes here too, lathough not strictly needed, might save a
- re-malloc when we get to complete().
-
- * camel-mime-filter-charset.c (filter): Make sure we have room if
- we only convert very short data.
- (complete): and here too.
-
- * tests/Makefile.am: Initial test harness & tests. Requires gcc
- for this.
-
- * camel-internet-address.c (d): Turn off debug.
-
- * camel-charset-map.c (camel_charset_step): Oops, & masks for set
- intersection, not | them. Dunno how this got even close to
- working.
-
-2000-11-23 Not Zed <NotZed@HelixCode.com>
-
- * camel-mime-filter-basic.c (filter): For base64 encoding, the
- output size for 0, 1, or 2 bytes of input can exceed input*2, so
- make sure we account for that as well.
- (complete): And here.
- (complete): Similarly for qp encoding, if we have a trailing
- space, we need some extra bytes (not needed for 'filter()', as any
- such bytes are stored in state/save).
-
- * camel-mime-utils.c (quoted_decode_step): Removed fixme not required.
- (quoted_encode_close): Dont append a trailing afterall. Otherwise
- a pass through the encode/decode will grow the message each time.
-
-2000-11-22 Radek Doulik <rodo@helixcode.com>
-
- * camel-mime-utils.c (header_msgid_generate): check for return
- values
-
-2000-11-21 Dan Winship <danw@helixcode.com>
-
- * camel-lock.c:
- * camel-movemail.c: add #ifdef HAVE_ALLOCA_H
-
-2000-11-21 Not Zed <NotZed@HelixCode.com>
-
- * providers/local/camel-mh-summary.c (mh_summary_sync_message):
- Shite, -1 on error, >=0 on success. So i've just been truncating
- all the messages I touched, good one zed.
- (mh_summary_sync_message): Sigh, and write to the right damn fd as
- well.
- (mh_summary_sync_message): Argh, and we need to compare the length
- of the old xev -1 to the new xev, to check if we can optimise it.
-
- * camel-folder.c (camel_folder_change_info_new): Init the pool.
- (camel_folder_change_info_add_source): Allocate string in the
- pool.
- (camel_folder_change_info_add_source_list):
- (camel_folder_change_info_add_update): No longer free the key, as
- it cannot be yet.
- (change_info_add_uid): Add a new arg, copy, telling it whether to
- copy the uid argument or not, and copy using mempool_strdup.
- (change_info_cat): Tell add_uid to copy the string.
- (camel_folder_change_info_add_update): Call add_uid directly.
- (change_info_remove): Call add_uid directly, with no copy, and
- dont free the key.
- (change_info_free_update): No longer required since we dont malloc
- the keys.
- (camel_folder_change_info_add_uid): Fix for add_uid change.
- (camel_folder_change_info_remove_uid):
- (camel_folder_change_info_change_uid):
- (change_info_clear): No longer needed, just set the size to 0 on
- the array directly.
- (camel_folder_change_info_clear): Empty the arrays directly, and
- flush the mempool too, and also clear uid_source, incase anyone
- was silly enough to call us in the wrong order.
- (camel_folder_change_info_free): Dont bother clearing the array's
- contents, just free the pool and throw away all the indexes.
-
- * camel-folder.h: Added a mempool to CamelFolderChangeInfo to
- store the uid's we get.
-
- * camel-folder-search.c (search_match_all): If we are only
- matching a single info, just use that/do the search.
- (camel_folder_search_match_expression): New function. Matches a
- single message info against an expression.
- (camel_folder_search_init): Init a hash table used to map the
- returned gptrarrays' to mempools.
- (camel_folder_search_execute_expression): Store all of the string
- data in a mempool, slightly faster, less wasted space (usually),.
- (camel_folder_search_free_result): Check for the mempool that
- stores the data for the list, and free that if we have it,
- otherwise assume we need to use g_free() (which should only happen
- if the list is empty at the moment).
- : commented out the debugging prints. Got sick of 'executing
- header search' crap.
-
- * providers/vee/camel-vee-folder.c (camel_vee_folder_init): Init
- changes.
- (camel_vee_folder_finalise): Free changes.
- (vfolder_add_match): Simple helper to add a new matching info
- record.
- (camel_vee_folder_add_folder): Only trigger a changed event if we
- have changes.
- (vfolder_change_match): New function, changes our local vfolder
- info to match the source.
- (vfolder_add_match): Add a new info to the vfolder list.
- (vfolder_remove_match): Remove a no-longer matching info from the
- vfolder summary.
- (message_changed): check if the message still matches, and
- remove/etc as required.
- (camel_vee_folder_finalise, init): init/free search object.
- (vee_folder_build_folder): Build the changes to the folder into
- the changes data, as we go.
- (folder_changed): If the folder gave us an explicit list of
- changes, then process each one separately (unless there's a lot
- added/changed).
-
- * providers/vee/camel-vee-folder.h: Added a changes field to the
- folder.
-
- * Makefile.am (libcamel_la_SOURCES): Added
- camel-folder-thread.[ch].
-
- * camel-folder-thread.c: message-threading algorithm, taken from
- evolutions' mail component, as it is generally more useful than
- just for evolution itself. Changed to use e-memchunks as well to
- speed it up a little and use less mem.
-
-2000-11-20 Jeffrey Stedfast <fejj@helixcode.com>
-
- * camel-remote-store.c (remote_recv_line): Fixed to return the
- correct bytecount in all cases which is the real fix to
- imap_parse_nstring.
-
- * providers/imap/camel-imap-command.c (imap_read_untagged): Again,
- don't use strlen for the post-data, use 'n'.
-
- * providers/imap/camel-imap-utils.c (imap_parse_nstring): Undo my
- previous temp-fix.
-
-2000-11-20 Not Zed <NotZed@HelixCode.com>
-
- * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): Fixes for
- the summary messageid changes. Hash the messageid and store it.
- (get_XOVER_headers): Use camel_folder_summary_info_new() to create
- the summary item before adding it.
-
- * camel-folder-summary.h (CamelMessageInfo): Changed the
- messgae-id to be an 8 byte md5 hash, and the references list to be
- an array of these.
-
- * providers/local/camel-mh-summary.c (mh_summary_sync_message):
- New function, sync out the message info stuff. Only updates the
- X-Ev header if it can get away with it, otherwise writes out a
- whole new message.
- (mh_summary_sync): Added more functionality. All summary info is
- now written to the X-Ev header, etc, and new messages re-written
- if required during the sync process.
-
- * providers/local/camel-local-folder.c
- (local_set_message_user_flag): Set the XEVCHANGE flag.
- (local_set_message_user_tag): And here too.
-
- * providers/local/camel-local-summary.h: New flag
- CAMEL_MESSAGE_FOLDER_XEVCHANGE to indicate the XEV header has
- probably changed size and needs to be rewritten in whole.
-
- * camel-folder-summary.c (next_uid_string): Want this static, not
- const.
- (message_info_new): Store the references and message-id values as
- 64 bit, binary hashes.
- (message_info_load): fix for message-id/references changes.
- (message_info_save): Likewise.
- (camel_message_info_dup_to): And here.
- (camel_message_info_free): And here too. No longer free
- message_id, and simple free for references array.
- (CAMEL_FOLDER_SUMMARY_VERSION): Bumped file revision.
- (camel_folder_summary_init): Init memchunk allocators to empty.
- (camel_folder_summary_finalize): Free memchunk allocators if
- there.
- (message_info_new): Use the chunk allocator to allocate message
- info's.
- (camel_folder_summary_info_new): New helper to allocate the
- message info, and setup the memchunk if required.
- (content_info_alloc): Likewise for content info's.
- (message_info_load): Use summary_info_new_empty.
- (content_info_new): Use content_info_alloc.
- (content_info_load): "
- (content_info_free): Free the content info as a memchunk.
- (message_info_free): Free everything directly and the base as a
- memchunk, rather than calling camel_message_info_free(), which
- assumes a malloc'd array.
-
- * providers/local/camel-local-summary.c: Include ctype.h, kill a
- warning.
- (local_summary_decode_x_evolution): If we get a NULL message info,
- then dont try and set anything, just check for validity.
- (camel_local_summary_write_headers): New function to write a set
- of headers to an fd.
- (camel_local_summary_check): Added some statistic generation
- stuff for memory profiling.
-
- * providers/local/camel-mbox-summary.c (header_write): Changed to
- use stdoi functions to write out the header to a buffered stream,
- instead of using writev, which is apparently slow (and writing
- each line separately is slow anyway).
- (mbox_summary_sync_full): New implementation. Does things
- differently, doesn't use or require the content info stuff.
- (summary_rebuild): Dont return an error if we start scanning at
- the end of file.
- (mbox_summary_sync_full): If we are not writing out new headers,
- make sure we copy the From line as we go, and update frompos
- appropriately.
- (mbox_summary_sync_full): Always copy the From line from the
- existing one, rather than trying to make one up ourselves.
- (mbox_summary_sync): If we can get by with a quick-sync, then try
- it, if that fails, then try a full sync anyway.
- (mbox_summary_sync_quick): Quick sync. Only update system flags,
- etc.
- (mbox_summary_sync_full): Use the proper local summary encode_xev
- function.
- (header_evolution_decode): Removed, no longer needed.
- (header_evolution_encode): Same.
- (copy_block): No longer needed, removed.
- (header_write): Removed, replaced with
- camel_local_summary_write_headers.
- (mbox_summary_sync_full): Fixed for header_write change.
-
- * camel-mime-parser.c (folder_scan_step): Implement the new
- optional parser state HSCAN_PRE_FROM, that returns the (currently
- unfiltered) input data.
- (folder_scan_drop_step): Do the right thing for the PRE_FROM
- state.
- (camel_mime_parser_scan_from): Update the doco.
- (camel_mime_parser_scan_pre_from): Ok, make this behaviour
- optional, it simplifies a lot of loops that dont otherwise need to
- know about it.
- (folder_scan_step): Made the PRE_FROM state optional.
- (struct _header_scan_state): Made the bool vars 1 bit.
- (folder_pull_part): Free the from_line buffer if it is there.
- (folder_scan_skip_line): Added a new arg, can save the skpped data
- to a byte_array, as we go.
- (folder_scan_step): Fixed calls to skip_line approrpiately. Now
- we save the from line as we parse it.
- (camel_mime_parser_read): New function to read from the mime
- parser buffer directly. Useful if you use the parser to read the
- first/some headers, then need to scan the rest of the data,
- without needing to use a seek(), or allocate your own buffers.
-
- * camel-mime-parser.h (struct _header_state): Added a new parser state,
- pre-from which returns any data found before a from line during
- parsing (all other data can be retrieved by the caller except
- this).
-
-2000-11-17 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-utils.c (imap_parse_nstring): When
- extracting a literal string, capture up until the end of the last
- line - this we we don't lose any data if the byte count is off.
-
- * providers/imap/camel-imap-command.c (imap_read_untagged): Use
- the byte-read count to decrement the number of bytes left to read
- rather than using strlen. Not only does this protect against a DoS
- (embedded NUL chars in the literal string would make strlen
- inaccurate) but it also improves performace a little.
-
- * camel-remote-store.c (remote_recv_line): *Sigh* Return the
- number of bytes read on success rather than 0. Also don't use
- camel_stream_buffer_read_line since we can't get an accurate octet
- count.
-
-2000-11-17 Not Zed <NotZed@HelixCode.com>
-
- * providers/local/camel-local-summary.c (local_summary_add): Clear
- the NOXEV/FLAGGED bits, since we do have an xev header. um m,
- maybe this is right, this assumes a write is following. Maybe
- this should be done in folder::append() instead ...
-
- * camel-stream-buffer.c (camel_stream_buffer_gets): We should
- always terminate the string. No need to check outptr is in range,
- its already been checked.
-
- * providers/local/camel-mbox-summary.c (mbox_summary_sync): When
- we update the summary, do it from mbox_summary->folder_size, not
- the content info endpos (which isn't any good anymore anyway).
-
- * providers/local/camel-mbox-folder.c (mbox_append_message): Set
- the frompos from the current folder size, since summary_add wont
- have initialised it to anything useful.
-
-2000-11-16 Not Zed <NotZed@HelixCode.com>
-
- * providers/local/camel-local-summary.c
- (local_summary_encode_x_evolution): Check the uid string is all
- digits before trying to write a 'standard' x-ev header.
-
- * providers/local/camel-maildir-summary.c
- (camel_maildir_summary_info_to_name): Convert an info into a
- maildir name:info filename.
- (camel_maildir_summary_name_to_info): Convert a name:info filename
- into an info, and tell us if it didn't match it.
- (message_info_new): When creating a new filename, gets its info
- from the flags field. Likewise if creating from an existing file,
- extract the flags.
- (maildir_summary_sync): Remove a small memleak. Also, if our
- flags and that requires a filename change, perform that here.
- (message_info_new): Get the received date from the filename.
- Also, dont overwirte the uid if we have one.
- (maildir_summary_check): Sort the summary in received order before
- completion.
- (maildir_summary_next_uid_string): Test the name for collusions
- before we give it out. Retry, and if that fails, well, I guess we
- collide :(
-
- * providers/local/camel-mbox-folder.c (mbox_lock): Implement mbox
- locking.
- (mbox_unlock): And unlocking.
- (mbox_append_message): Lock the folder for write before doing
- anything.
- (mbox_get_message): Lock the folder for read before doing
- anything.
-
- * providers/local/camel-local-folder.c (camel_local_folder_lock):
- Implement something here. We handle the recursive ability but
- pass the locking to the folder itself.
- (camel_local_folder_unlock): Likewise for unlocking.
- (local_lock): Default - do nothing, return success.
- (local_unlock): Same.
- (local_sync): Changed slightly for locking api changes, and also,
- only lock around the sync process itself.
-
- * camel-lock.c: New file - utility functions for locking using
- different strategies and/or for locking folders safely.
-
- * Makefile.am (libcamel_la_SOURCES): Adde camel-lock.[ch]
-
-2000-11-15 Radek Doulik <rodo@helixcode.com>
-
- * camel-mime-utils.c: mime_guess_type_from_file_name moved back to
- composer as it introduced unwanted VFS dependency
- removed #include <libgnomevfs/gnome-vfs.h>
-
-2000-11-15 Not Zed <NotZed@HelixCode.com>
-
- * providers/Makefile.am: Removed local again, not quite ready.
-
-2000-11-14 Not Zed <NotZed@HelixCode.com>
-
- * camel-folder-summary.c (message_info_new_from_message): Use
- message_info_new to create the summary from headers, instead of
- getting directly from the message.
- (format_recipients): No longer required.
-
- * providers/Makefile.am (SUBDIRS): Added local.
-
-2000-11-11 Not Zed <NotZed@HelixCode.com>
-
- * camel-mime-parser.c (folder_push_part): Make sure 'atleast' is
- at least 1, always. This is possibly a temporary fix for a
- bad failure mode on bad multipart messages.
- (folder_scan_content): Go until inend, not inend+1. Changed the
- continuation and retry logic to be simpler and more robust. If we
- can't find a marker within
- the atleast we need, just set it to 1, and try again, rather than
- just going to the next smaller limit (boundary check checks the
- length anyway).
- (header_append): streamline the empty line case. And strip
- trailing \r's if there are any (\n's already stripped).
- (folder_scan_header): Reordered and cleaned up a lot. Check for
- continuation only once, and compress lwsp then. Assume the header
- buffer already has end of line's stripped, and simplify some things:
- Only check for end of headers once and easier.
- Dont check to remove end of line character
- Dont bother testing inptr-start if we get a boundary match - it is
- always zero.
- (folder_scan_header): Removed the unused part variable, and a few
- pointless assignments.
- (folder_scan_header): Change the end limit to be 1 higher, to make
- sure we get all content.
- (folder_scan_content): And here too.
- (folder_scan_header): Killed a warning.
- (folder_push_part): Removed a bad comment. Actually
- boundarylenfinal can be zero for a new message not in a
- multipart. So we fix that here.
-
-2000-11-09 Not Zed <NotZed@HelixCode.com>
-
- * camel-mime-utils.c (header_decode_param_list): Renamed from
- header_param_list_decode.
- (header_param_list_decode): New external function to decode a
- parameter list.
- (header_param_list_format_append): Made public.
- (header_param_list_format): Another new public helper function for
- formatting just a param list.
-
- * camel-folder-summary.c (next_uid_string): Default implementation
- is the same as before.
- (camel_folder_summary_class_init): And set it up.
-
- * camel-folder-summary.h: Make next_uid_string a virtual function.
-
- * camel-folder.c (camel_folder_change_info_changed): New function
- to return true if the changeset contains any changes.
-
-2000-11-14 Jeffrey Stedfast <fejj@helixcode.com>
-
- * camel-stream.c (camel_stream_printf): Don't cast an int to a
- ssize_t.
-
-2000-11-10 Dan Winship <danw@helixcode.com>
-
- * providers/mbox/camel-mbox-summary.c
- (camel_mbox_summary_build_from): put a space before a single-digit
- day of the month since it seems some mailers are fantastically
- picky about this. (bugs.gnome.org #27232)
-
-2000-11-10 Radek Doulik <rodo@helixcode.com>
-
- * camel-mime-utils.c (header_msgid_generate): fix ids ending with '.'
-
-2000-11-09 Dan Winship <danw@helixcode.com>
-
- * providers/imap/camel-imap-auth.c (imap_try_kerberos_v4_auth):
- Fix error handling. (Only send a "*" to bail out of authentication
- if the server hasn't already bailed on us.)
-
-2000-11-08 Radek Doulik <rodo@helixcode.com>
-
- * camel-mime-utils.c (mime_guess_type_from_file_name): new
- function, moved from composer
-
-2000-11-08 Not Zed <NotZed@HelixCode.com>
-
- * camel-mime-message.c (find_best_encoding): Keep track of the
- caller bestenc flags that make sense.
-
- * camel-mime-filter-bestenc.c (filter): Added code to detect when
- we have "^From " lines in the sequence of text.
- (camel_mime_filter_bestenc_get_best_encoding): Added a new flag
- CAMEL_BESTENC_NO_FROM: if set, it will not allow any lines
- matching "^From " to appear in the output - currently forcing
- base64 encoding to achieve this.
-
- * camel-mime-parser.c (folder_scan_step): Call
- camel_mime-filter_complete() once we're done, rather than
- filter_filter().
- (folder_scan_content): Some fixes for state changing; so that when
- we do find another boundary it is properly flagged. Since we
- strip the last \n off all data, we must take that into account
- too. Sigh. Fixes a rather nasty set of bugs where multipart
- messages could start including following messages as parts, etc.
- (struct _header_scan_stack): Added new parameter,
- boundarylenfinal, which holds the length of the final boundary, if
- it is different (e.g. for From lines, whihc aren't)
- (folder_scan_step): Setup teh boundarylenfinal value when creating
- a new boundary.
- (folder_scan_content): Hmm, if we hit the end-of-buffer sentinal,
- reset the scanner back to leave 'atleast' chars in the buffer
- still, dump that content, and retry again. Stops us losing a
- check for a boundary on some data we haven't really looked at yet!
- (folder_scan_content): Use boundarylenfinal to calculate
- 'atleast'.
- (folder_scan_header): And here too.
- (folder_boundary_check): Use the atleast value directly, dont
- truncate it. Use the boundarylen/boundarylenfinal values directly
- too.
- (struct _header_scan_stack): Add an atleast parameter to cache the
- atleast info.
- (folder_push_part): Determine/set 'atleast', every time we add a
- new part.
- (folder_scan_header): Get the cached atleast info from the current
- part.
- (folder_scan_content): And here too.
- (folder_scan_header): Fix a problem where a part starting with
- " text" would be interpreted as a followon header wrongly.
-
- * camel-mime-filter-charset.c (complete): Add some assertions to
- find a bug.
-
-2000-11-07 Ettore Perazzoli <ettore@helixcode.com>
-
- * camel-service.c (get_name): Strdup the "???" string you return,
- so that the expected semantics for `::get_name()' is respected.
-
-2000-11-07 Dan Winship <danw@helixcode.com>
-
- * camel-stream-filter.c (d): Kill debugging, as it causes lots of
- evolution-mail spewage.
-
-2000-11-07 Not Zed <NotZed@HelixCode.com>
-
- * camel-mime-filter-bestenc.c (complete): Implement a complete()
- function, now we need one.
- (filter): Upgraded to match rfrc2045 properly. Checks also for
- length of line and valid CRLF sequences.
- (camel_mime_filter_bestenc_get_best_encoding): Do the work of
- working out what is the best encoding given what we found about
- the stream.
-
- * camel-mime-part.c (camel_mime_part_encoding_to_string): Use a
- lookup table to get the encoding naem, and add the binary type.
- (camel_mime_part_encoding_from_string): Likewise for the reverse.
-
- * camel-mime-part.h: Added the binary encoding type, see rfc2045.
-
- * camel-mime-utils.c (header_param_list_format_append): Dont put a
- space before ;'s in parameter lists, makes them more
- readable/consistent.
-
- * camel-mime-message.c (multipart_has_8bit_parts): Cleaned up the
- old stuff, well removed it.
- (camel_mime_message_set_best_encoding): Added another argument
- that lets you select what you want to set the best of. i.e. for
- smtp transport we only need 7 bit, and dont need to optimise the
- charset (although of course, we should always).
- (find_best_encoding): Implement this feature, if we are not
- getting the best charset, use the one we have.
- (best_encoding): Set the charset on the part appropriately. Sigh,
- the interfaces for this are nonexistant.
- (find_best_encoding): Tell the bestenc filter that lf should be
- treated as crlf for the purposes of determining encodings.
-
-2000-11-06 Not Zed <NotZed@HelixCode.com>
-
- * camel-charset-map.c (camel_charset_init): Init function for an
- iterative charset determinator.
- (camel_charset_step): Iterate another buffer.
- (camel_charset_mask): Removed, since it couldn't have worked.
- (camel_charset_best): Use the iterative interface to do the work.
- (camel_charset_best_name): Get the best name for a charset so far.
-
- * camel-mime-filter-bestenc.c: New class, a stream
- filter that can be used to memory-efficiently determine the best
- encoding and/or charset to use for a given stream of bytes.
-
- * Makefile.am (libcamelinclude_HEADERS): Added stream-null*.
- (libcamel_la_SOURCES): Added bestenc*
-
- * camel-stream-null.c: New class, a null-stream, that always
- succeeds, and never has any contents.
-
- * camel-stream.c: Minor pointless changes. Was going to do
- something else but changed my mind. Added trivial default
- implementations for all callbacks.
-
- * camel-mime-message.h: Cleaned up some old cruft.
-
- * camel-folder-summary.c (camel_folder_summary_format_address):
- address_list_format() no longer encodes, so we dont need to decode
- it.
-
- * camel-address.c (camel_address_unformat): New function, attempts
- to reverse the formatting process on display addresses.
- (camel_address_length): New function to get the number of
- addresses, without having to peek the structure.
-
- * camel-mime-message.c (camel_mime_message_set_from): Fix a typo.
- (camel_mime_message_finalize): Only unref from/reply_to if we have
- it.
- (camel_mime_message_set_recipients): New function - set the
- recipients as a CamelInternetAddress. This function effectively
- deprecates the older recipient setting functions.
- (camel_mime_message_add_recipient): What the hell, i'll bite the
- bullet. Terminate this function. The old api was ambiguious and
- inefficient and didn't work right anyway.
- (camel_mime_message_remove_recipient_address): And this one.
- (camel_mime_message_remove_recipient_name): And this one too.
- (camel_mime_message_set_recipients): If we set an empty header,
- then remove it from the header list. Allow a null receipient
- object to clear a header.
- (camel_mime_message_set_from): Likewise, if setting an empty from
- address.
- (camel_mime_message_encode_8bit_parts): Eeek!!
- camel_stream_mem_new_with_byte_array owns the byte_array we give
- it, so make sure we dont free any of it!
- (camel_mime_message_encode_8bit_parts): Infact, i'll just rewrite
- the whole lot, its a bit of a mess. Should really rename it and
- make it a little more useful too, lets see ...
- (best_encoding): This has a string interface? Oh boy.
- (camel_mime_message_foreach_part): New experimental function to
- iterate over all message parts. Might not remain.
- (camel_mime_message_has_8bit_parts): New implementation using
- foreach_part. Fixed a couple of problems.
- (find_best_encoding): New function, that finds the best encoding
- for a given part (will probably be moved to camel-mime-part), and
- also the best charset to use if it is a text part. Since one
- affects the other it is a two pass process, but uses streams and
- not memory to achieve this.
- (camel_mime_message_set_best_encoding): Uses the function above to
- configure an entire message for the best encoding possible given
- transport constraints.
- (camel_mime_message_encode_8bit_parts): Reimplemented to use the
- function above to perform the work.
-
- * camel-internet-address.c
- (camel_internet_address_format_address): Dont put <> around a lone
- address with no real name.
- (camel_internet_address_encode_address): Similarly.
- (internet_decode): Actually return the count of decoded addresses.
- (internet_unformat): Implement the unformatting routine.
-
-2000-11-05 Not Zed <NotZed@HelixCode.com>
-
- * providers/smtp/camel-smtp-transport.c (_send_to): Changed to get
- the internetaddress directly, rather than having to parse it
- itself.
-
- * camel-address.c (camel_address_format): Added a new function
- which will format address, suitable for display.
- (camel_address_cat): Concatentate 1 camel address onto another.
- It is upto the caller to ensure the addresses are of compatible
- types.
- (camel_address_new_clone): New function to create a new address by
- copying an existing one of the same type.
- (camel_address_copy): New helper function to copy an address.
-
- * camel-mime-message.h (struct _CamelMimeMessage): Removed cached
- copy of date string.
- (struct _CamelMimeMessage): Added date_received info.
-
- * camel-mime-message.c (camel_mime_message_get_date_string):
- Removed. Nothing uses it anyway, and it is redundant.
- (camel_mime_message_finalize): No more date_str.
- (camel_mime_message_init): No more date_str, initialise
- date_received*
- (write_to_stream): Change the check for a date header.
- (process_header): No longer track the date_str.
- (camel_mime_message_get_received_date): Removed. totally invalid
- anyway.
- (camel_mime_message_get_sent_date): Removed. Redundant. The only
- 'date' is the sent date, the received date is just made up.
- (camel_mime_message_get_date): Args changed to be more consistent
- with utility functions.
- (camel_mime_message_get_date): Dont set the date when we're asked
- for it (if its not set by the time its written, it'll be set
- then).
- (camel_mime_message_get_date_received): Actually do 'the right
- thing' here, if we have a received header, use that to determine
- the received date. And return the data in the same format as
- get_date.
- (camel_mime_message_set_from): Changed the api to better match
- what we should be doing. Pass a camelinternetaddress, etc.
- (camel_mime_message_set_reply_to): Cahnged similarly to take an
- internetaddress.
- (camel_mime_message_get_reply_to): Likewise.
- (camel_mime_message_finalize): Unref the from/reply_to objects.
- (format_address): Removed, no longer needed.
- (process_header): Changed to store the from/reply_to as
- internetaddress's.
- (write_to_stream): Set the from header directly to empty, if we
- dont have one. Maybe we should just abort, and/or create one
- based on the current user.
-
- * camel-mime-utils.c (header_address_list_format): Renamed to
- header_address_list_encode, which is what it is actually doing.
- (header_address_list_format_append): Similarly.
- (encoding_map[]): Removed, no longer used.
- (header_address_list_encode_append): Take another arg, do we
- encode the address (for internet), or not (for display - utf8
- only).
- (header_address_list_format): Re-added this function, but now it
- generates a display version only. Surprise surprise, that is all
- anythign needs to generate anyway. Sigh.
-
- * camel-internet-address.c (camel_internet_address_get): Return
- false if we get an invalid index only.
- (camel_internet_address_encode_address): Helper function to encode
- a single address for mailing.
- (internet_encode): Use the above function to format it.
- (camel_internet_address_format_address): Format a single address
- for display.
- (internet_format): Implement the display version.
- (camel_internet_address_class_init): Init the internet_format
- virtual function.
- (internet_cat): Implement virtual function to concatenate
- addresses.
-
- * camel-folder-summary.c
- (camel_folder_summary_info_new_from_header): new function, only
- build the summary info, dont add it.
- (camel_folder_summary_info_new_from_parser): Likewise, for new
- info from parser.
- (camel_folder_summary_add_from_parser): Cahnged to call function
- above to build info.
- (camel_folder_summary_add_from_header): Changed to call function
- above, to build info.
- (camel_folder_summary_info_free): New function to free the summary
- message info.
- (camel_folder_summary_clear): Changed to clal above to free info.
- (camel_folder_summary_remove): Likewise.
- (camel_folder_summary_add): Cleaned up the clashing uid
- re-assignment logic a little bit.
- (camel_folder_summary_decode_uint32): Fixed a typo, 01 != -1.
- (camel_folder_summary_decode_time_t): Return -1 on error.
- (camel_folder_summary_encode_off_t): New function to encode an
- off_t type.
- (camel_folder_summary_decode_off_t): And likewise for the reverse.
- (CAMEL_FOLDER_SUMMARY_VERSION): Bumped the summary version, since
- we're now encoding time/off_t's right.
- (summary_header_save): Use time_t encoder to save the timestamp.
- (summary_header_load): Likewise for decoding the timestamp.
- (content_info_load): Decode off_t types directly, now we can.
- (content_info_save): And likewise for encoding.
- (camel_folder_summary_add_from_message): New function, create a
- summary item from an existing message and add it.
- (camel_folder_summary_info_new_from_message): New function, create
- a summary item from an existing message.
- (summary_build_content_info_message): New function to do the dirty
- work of building the conent info/indexing, from a message source.
- (format_recipients): Format an internetaddress suitable for the
- summary.
- (message_info_new_from_message): Build a new summary item from a
- mime message.
- (content_info_new_from_message): Build a new conent info from a
- mime part.
- (camel_folder_summary_class_init): Init the new class functions.
- (message_info_new_from_message): Fixed for message api change.
-
- Added documentation to the functions.
-
-2000-11-03 Radek Doulik <rodo@helixcode.com>
-
- * camel-mime-utils.c (header_msgid_generate): new function,
- generates simple message/content id
-
-2000-11-04 Not Zed <NotZed@HelixCode.com>
-
- * camel-mime-part-utils.c
- (camel_mime_part_construct_content_from_parser): Set the
- preface/postface from the parser into the multipart object.
-
- * camel-multipart.c (camel_multipart_set_postface): Function to
- set the postface text on a multipart.
- (camel_multipart_set_preface): Similarly for preface text.
-
- * camel-mime-parser.c (folder_scan_content): If we scan until a
- boundary, then we do not include the \n that starts the boundary
- line in the content.
- (struct _header_scan_stack): Added a ByteArray to store the
- multipart pre/post-text as we're scanning.
- (folder_pull_part): Free pre/posttext if they are allocated.
- (folder_scan_step): Build into the pre/posttext arrays as we
- encounter data.
- (camel_mime_parser_preface): REturn the multipart preface text, if
- there is any scanned.
- (camel_mime_parser_postface): Likewise for postface text.
- (byte_array_to_string): helper function for above.
-
- * providers/mbox/camel-mbox-folder.c (mbox_append_message): Change
- the from line to be "\nFrom ..." always, so no need to
- check/append a \n to messages.
- (mbox_append_message): Open the output stream with append mode
- [assuming this is more efficient than seeking to the end]
- And dont prepend \n on the From line if its the first in the
- mbox.
- (mbox_append_message): Pass the offset of the real start of the
- "From " line when we perform the update (which may != 'seek')
-
- * camel-mime-filter-charset.c (complete): Removed the terminating
- NUL 'fix'.
-
- * camel-stream-filter.c (do_read): Added some debug.
- (do_flush): And here.
- (do_write): And here too.
- (do_write): ARGH!!! ARGH! Ok, so the filter stream was writing a
- different number of bytes than the requester was asking it to
- write (because of filtering, of course!). So instead of returning
- the true number of written bytes, we'll return what they asked us
- to write - unless there is an error in which case we return -1.
-
- * camel-mime-utils.c (base64_encode_close): Sigh, forgot to make
- it unsigned. I think this is actually a gcc bug as (48 >> 2)
- somehow ended up negative, when it obviously should not, even if
- the data load was signed.
-
-2000-11-03 Jeffrey Stedfast <fejj@helixcode.com>
-
- * camel-url.c: Undo my incorrect fix - I misunderstood danw -
- sorry!
-
-2000-11-03 Dan Winship <danw@helixcode.com>
-
- * providers/pop3/camel-pop3-store.c (camel_pop3_store_expunge):
- Unbreak this.
-
-2000-11-03 Jeffrey Stedfast <fejj@helixcode.com>
-
- * camel-url.c (camel_url_to_string): If show_pass, then base64 the
- password before writing it to the output string.
- (camel_url_new): Assume password has been base64 encoded and
- decode accordingly.
-
-2000-11-03 Dan Winship <danw@helixcode.com>
-
- * camel-provider.h: Add an "url_flags" field to CamelProvider.
- Move the CAMEL_SERVICE_URL_* defines here and remove the SERVICE_
- part of the name.
-
- * camel-service.h: Remove CAMEL_SERVICE_URL_* flags and
- service->url_flags field.
-
- * camel-service.c (check_url, get_path): Get URL flags from
- service->provider, update for changed flag names.
-
- * providers/*/camel-*-provider.c: Add URL flags to provider
- structures.
-
- * providers/*/camel-*-{store,transport}.c, camel-remote-store.c:
- Remove service->url_flags initialization.
-
-2000-11-02 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-store.c (get_folder_info): Quote
- foldernames when sending to the IMAP server because the folder
- name might contain spaces.
-
-2000-11-02 Not Zed <NotZed@HelixCode.com>
-
- * Merged in camel-incremental-branch.
-
-2000-11-01 Dan Winship <danw@helixcode.com>
-
- * providers/imap/camel-imap-store.c (get_folder_info): Remove old
- subbed folders from hash table after freeing them.
-
- * providers/imap/camel-imap-folder.c (imap_get_full_name): Deal
- correctly with namespace == ""
-
-2000-11-01 Gediminas Paulauskas <menesis@delfi.lt>
-
- * camel-charset-map.c, camel-charset-map-private.h: synced all charsets
- with ones found in libunicode. Just include more "iso/*.h" and rebuild
- ...private.h with this.
-
-2000-10-31 Dan Winship <danw@helixcode.com>
-
- * camel-service.c (service_disconnect): Add a new argument, clean,
- that says whether or not to try to disconnect cleanly.
-
- * camel-remote-store.c (remote_send_string, remote_send_stream,
- remote_recv_line): disconnect uncleanly on failure to prevent
- infinite loops when providers would normally send commands from
- disconnect(). Remove some unneeded CamelException goo.
-
- * providers/smtp/camel-smtp-transport.c (smtp_disconnect):
- * providers/pop3/camel-pop3-store.c (pop3_disconnect):
- * providers/nntp/camel-nntp-store.c (nntp_store_disconnect):
- * providers/imap/camel-imap-store.c (imap_disconnect): Don't send
- QUIT/LOGOUT if !clean.
-
-2000-10-30 Dan Winship <danw@helixcode.com>
-
- * providers/imap/camel-imap-auth.c: New file with code for IMAP
- authentication mechanisms. (Currently just krb4, and without
- integrity/privacy protection).
-
- * providers/imap/Makefile.am: Add camel-imap-auth.[ch] and krb4
- CFLAGS/LDFLAGS
-
- * providers/imap/camel-imap-store.c (connect_to_server): Split out
- from imap_connect. Just does the basic connect and CAPABILITY
- check. Redo the CAPABILITY code more robustly.
- (query_auth_types_connected): Do this right rather than punting to
- query_auth_types_generic. Check for KERBEROS_V4 if compiled with
- krb4 support.
- (query_auth_types_generic): Mention KERBEROS_V4 if compiled with
- krb4 support.
- (imap_connect): Use connect_to_server().
-
- * camel-mime-utils.c (base64_encode_step, base64_encode_close):
- Take an additional argument, "break_lines", saying whether or not
- to add '\n's to the output.
-
- * camel-multipart.c (set_boundary):
- * camel-mime-filter-basic.c (filter, complete): Update for base64
- api change.
-
-2000-10-30 Peter Williams <peterw@helixcode.com>
-
- * providers/imap/camel-imap-store.c (unsubscribe_folder): Correct
- parameters to g_hash_table_lookup_extended.
-
-2000-10-29 Dan Winship <danw@helixcode.com>
-
- Improved IMAP namespace handling: leave the namespace in the
- folder names rather than constantly prepending it and stripping it
- off. Also some subscription fixes.
-
- * camel-store.c (camel_folder_info_build): Fix for the case where
- @top isn't in @folders.
-
- * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Add
- a "short_name" argument rather than figuring it out ourselves.
- (imap_get_full_name): Implementation of CamelFolder::get_full_name
- that strips off namespace so the user doesn't have to see it.
- (imap_append_message, imap_copy_message_to, imap_move_message_to):
- Use folder->full_name rather than calling
- camel_imap_store_get_folder_path.
-
- * providers/imap/camel-imap-utils.c (imap_parse_list_response):
- Update this: make @flags a bitmask and @sep a char rather than a
- string. Make all of the out arguments optional. Handle literals in
- the server response.
-
- * providers/imap/camel-imap-store.c (imap_connect): Do a better
- job of getting the correct dir_sep for the namespace we're using.
- Construct a base_url here that will be used by get_folder_info.
- (camel_imap_store_folder_path): Removed
- (imap_folder_exists): Add an argument to return the short name of
- the folder (parsed out of the LIST response). Update for
- imap_parse_list_response change.
- (get_folder): Update for the various other changes.
- (get_folder_info): Update for the various other changes. Be more
- consistent about the returned layout: put everything underneath
- the "namespace" directory, including INBOX, even if it doesn't
- belong there. Don't destroy the list of subscribed folders until
- we've actually gotten the new list.
- (folder_subscribed, subscribe_folder, unsubscribe_folder): Use
- folder_name directly rather than camel_imap_store_folder_Path.
-
- * providers/imap/camel-imap-command.c (camel_imap_command): Update
- for folder name changes.
-
-2000-10-29 Dan Winship <danw@helixcode.com>
-
- * camel.h: Remove md5-utils.h include since it's not part of Camel
- any more.
-
- * camel-charset-map.c: Kill some warnings.
-
- * providers/nntp/camel-nntp-grouplist.c
- (camel_nntp_get_grouplist_from_file, camel_nntp_grouplist_save):
- Clean up warnings about time_t casts.
-
- * providers/smtp/camel-smtp-transport.c: Remove unused md5-utils.h
- include.
-
- * providers/pop3/camel-pop3-store.c: Undefine the "_" macro
- defined by krb4's des.h when compiling with krb support.
- Fix md5-utils.h include.
-
-2000-10-27 Dan Winship <danw@helixcode.com>
-
- * camel-mime-utils.c (header_param_list_format_append): Only quote
- Content-type parameters when the quoting is mandatory, and deal
- with embedded quotes/backslashes when quoting.
-
-2000-10-27 <jpr@helixcode.com>
-
- * providers/pop3/Makefile.am: Tidy up build
-
- * providers/smtp/Makefile.am: ditto
-
- * Makefile.am: Move md5-utils.[hc] to e-util because the
- addressbook is going to use md5 hashes for pilot syncing.
- Maybe the calendar conduits as well because this is a good idea
- Chris had.
-
-2000-10-26 Kjartan Maraas <kmaraas@gnome.org>
-
- * camel-exceptions-list.def: Add newline to kill warnings.
-
-2000-10-25 Dan Winship <danw@helixcode.com>
-
- * providers/imap/camel-imap-store.c (get_folder_info): Fix folder
- listing code infinite loop.
-
- * camel-store.h: Add a "parent" field to CamelFolderInfo.
-
- * camel-store.c (camel_folder_info_build): Deal with "parent"
- (camel_store_folder_subscribed, camel_store_subscribe_folder,
- camel_store_unsubscribe_folder): Add g_return_if_fails checking
- that the folder supports subscriptions.
-
- * providers/imap/camel-imap-store.c (folder_subscribed,
- subscribe_folder, unsubscribe_folder): Remove "+ 1"s since the
- mail subscribe UI won't prepend / to the folder names now.
- (get_folder_info): Clear the "parent" field of the folderinfos
- when removing an empty top level.
-
- * providers/nntp/camel-nntp-store.c (nntp_store_folder_subscribed,
- nntp_store_subscribe_folder, nntp_store_unsubscribe_folder):
- Remove "+ 1"s since the mail subscribe UI won't prepend / to the
- folder names now.
-
-2000-10-24 Chris Toshok <toshok@helixcode.com>
-
- * providers/imap/camel-imap-store.h: add subscribed_folders.
-
- * providers/imap/camel-imap-store.c (camel_imap_store_class_init):
- fill in vtable entries for subscription functions.
- (camel_imap_store_finalize): new function, so we can free up our
- subscribed_folders hashtable.
- (camel_imap_store_init): set CAMEL_STORE_SUBSCRIPTIONS in the
- CamelStore flags, and create our subscribed_folders hashtable.
- (camel_imap_store_get_type): camel_imap_store_finalize is our
- finalize function.
- (get_folder_info): if we're looking at subscribed_only, clear out
- the subscribed_folders hashtable, use LSUB instead of LIST, and
- insert folder paths (prepended by their namespace if there is one)
- into subscribed_folders. INBOX subscription support needs work,
- since we always show it, regardless of it's subscribed state.
- (folder_subscribed): new function. just look up the folder_path
- in the hashtable.
- (subscribe_folder): new function. use the imap SUBSCRIBE command,
- and if successful add it to the hashtable.
- (unsubscribe_folder): new function. use the imap UNSUBSCRIBE
- command, and if successful remove it from the hashtable.
-
-2000-10-24 Dan Winship <danw@helixcode.com>
-
- * providers/imap/camel-imap-store.c (get_folder_info): Fill in the
- message_count and unread_message_count flags (if !fast).
-
-2000-10-23 Dan Winship <danw@helixcode.com>
-
- * camel-object.h: #include gnome-i18n.h (and gnome-defs.h since
- the former depends on it.)
-
- * *: Add lots of _() and N_().
-
-2000-10-23 Chris Toshok <toshok@helixcode.com>
-
- * providers/nntp/Makefile.am (libcamelnntpinclude_HEADERS): add
- camel-nntp-types.h.
-
-2000-10-23 Dan Winship <danw@helixcode.com>
-
- * providers/imap/camel-imap-command.c (imap_read_untagged): Fix a
- "how could this have been working before" memory overrun bug
- found by Vlad.
-
- * camel-op-queue.[ch], camel-thread-proxy.[ch]: These should have
- gone away a long time ago.
-
-2000-10-20 Chris Toshok <toshok@helixcode.com>
-
- * providers/Makefile.am (SUBDIRS): re-enable the nntp provider.
-
-2000-10-20 Chris Toshok <toshok@helixcode.com>
-
- * providers/nntp/camel-nntp-store.c (build_folder_info): add
- function to build a tree from the nntp group names (using '.' as a
- heirarchy separator.) #ifdefed INFO_AS_TREE only.
- (build_folder_info_from_grouplist): if INFO_AS_TREE is selected,
- call build_folder_info instead of appending a new CamelFolderInfo
- to our list.
- (ensure_news_dir_exists): use e_mkdir_hier instead of failing if a
- parent directory (~/evolution/news generally) isn't there.
-
-2000-10-19 Chris Toshok <toshok@helixcode.com>
-
- * camel-folder-search.c: #include <sys/types.h> before <regex.h>
-
-2000-10-19 Dan Winship <danw@helixcode.com>
-
- * providers/imap/camel-imap-utils.c (imap_parse_list_response):
- Fix a bug with "INBOX" (or anything else with NIL hierarchy
- separator) as the namespace.
-
- * providers/imap/camel-imap-folder.c (imap_refresh_info): Emit
- message_changed and folder_changed as appropriate.
-
-2000-10-19 Dan Winship <danw@helixcode.com>
-
- * camel-folder.c (camel_folder_refresh_info): Update comment here
- so refresh_info isn't just for reconnects any more. Make the
- default implementation a no-op rather than an error.
-
- * providers/nntp/camel-nntp-folder.c: Move refresh_info impl into
- camel_nntp_folder_new, since it would have leaked memory and not
- done anything useful if it was called later.
-
- * providers/mbox/camel-mbox-folder.c: Remove no-longer-necessary
- refresh_info impl.
-
- * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
- Update imap_folder->exists, but don't actually load the new
- messages. This is a temporary workaround to deal with the IMAP
- provider stealing the message list focus at annoying times.
- (imap_copy_message_to, imap_move_message_to): Emit a
- folder_changed by hand, for now.
-
-2000-10-19 Ettore Perazzoli <ettore@helixcode.com>
-
- * providers/imap/Makefile.am (libcamelimapinclude_HEADERS): Add
- `camel-imap-stream.h'.
-
- * Makefile.am (libcamelinclude_HEADERS): Add `camel-charset-map.h'
- and `camel-charset-map-private.h'.
-
-2000-10-18 Jeffrey Stedfast <fejj@helixcode.com>
-
- * camel-mime-part.c (camel_mime_part_set_description): The correct
- fix this time - the description should be encoded here and not in
- the camel-medium layer.
-
-2000-10-30 Not Zed <NotZed@HelixCode.com>
-
- * camel-folder.c (camel_folder_change_info_add_update): Fixed the
- changeset logic, which was completely wrong.
-
-2000-10-27 Not Zed <NotZed@HelixCode.com>
-
- * camel-mime-utils.c (quoted_encode_step): Removed is_blank() stuff.
- (header_decode_init): When we set the 'space' bit, dont clear all
- the others.
- (quoted_encode): Put back the safemask. Yes we totally need it,
- see rfc 2047 section 5, parts (1) and (3).
- (CHARS_PSPECIAL): Remove '=' and '_' from the list of allowed
- characters (this is an allowed list, not a not-allowed list, like
- the ESPECIAL).
- (camel_mime_special_table): Updated for fixes to definitions.
- (CHARS_ESPECIAL): Added '_' to list of characters that should be
- encoded.
-
-2000-10-26 Not Zed <NotZed@HelixCode.com>
-
- * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_update):
- Use the new camel_folder_change_info_* stuff to build the update
- diff, rather than doing it ourselves.
-
- * camel-folder.c (camel_folder_change_info_add_source): Add a
- 'source' list, used to create change lists.
- (camel_folder_change_info_add_source_list): Add a list of uid's,
- convenience function.
- (camel_folder_change_info_add_update): Add a uid to the list of
- uid's in the new updated list.
- (camel_folder_change_info_add_update_list): Add a bunch of uid's
- at once for the same purpose.
- (camel_folder_change_info_build_diff): Take the source list, the
- update list, and find the differences, building on the added or
- removed list as appropriate.
-
-2000-10-20 Not Zed <NotZed@HelixCode.com>
-
- * providers/mbox/camel-mbox-summary.c (removed_uids): REnamed from
- add_uid.
- (camel_mbox_summary_update): Oops, fix the reversed logic for
- determining the uid changesets.
-
- * camel-folder.c (message_changed): Oops, we want to change the
- uid, not add it.
-
-2000-10-19 Not Zed <NotZed@HelixCode.com>
-
- * providers/mh/camel-mh-summary.c (camel_mh_summary_sync): Added a
- change list argument, and add expunged uid's to it.
-
- * providers/mh/camel-mh-folder.c (mh_init): Setup the change list.
- (mh_finalize): And free it.
- (mh_sync): Track changes, and send a folder_changed signal as
- appropriate.
- (mh_expunge): Likewise.
- (mh_append_message): Add the new uid to the change list and
- trigger a folder_changed event.
-
- * providers/mbox/camel-mbox-folder.c (camel_mbox_folder_new):
- Setup a mbox list of changes structure.
- (mbox_finalize): And free it.
- (mbox_expunge): Include the change list with the folder_changed
- event, and clear it off.
- (mbox_sync): And the same for when we are just syncing the folder.
- (mbox_append_message): And do the same here, after we've updated
- the folder.
-
- * providers/mbox/camel-mbox-summary.c
- (camel_mbox_summary_build_from): Use gmtime_r to get the time
- thread-safely.
- (camel_mbox_summary_sync): Added a changeinfo argument. Add any
- removed or changed messages to the changelists as appropriate.
- (camel_mbox_summary_update): Added a changeinfo argument.
- Genereate a list of added/removed uid's based on the difference
- before and after rebuilding the summary.
-
- * camel-folder.c (camel_folder_change_info_new):
- (camel_folder_change_info_add_uid):
- (change_info_add_uid):
- (camel_folder_change_info_remove_uid):
- (camel_folder_change_info_change_uid):
- (change_info_clear):
- (camel_folder_change_info_clear):
- (camel_folder_change_info_free):
- (change_info_cat):
- (camel_folder_change_info_cat): Bunch of utility functions for
- working with change info lists.
- (camel_folder_init): Init the change info list.
- (camel_folder_finalize): And free it.
- (thaw): Changed to pass through a list of changes, or to get the
- changed message uids from the camelfolderchangeinfo struct, and
- reset it.
- (folder_changed): Add the changed lists to the frozen change list
- if we are frozen.
- (message_changed): Add the message to the changed list if we are
- in the frozen state.
-
- * camel-folder.h (CamelFolderChangeInfo): New structure to hold
- information for the folder_changed event.
-
-2000-10-18 Ettore Perazzoli <ettore@helixcode.com>
-
- * camel-mime-filter-charset.c (complete): Put a zero at the start
- of the outbuf.
-
-2000-10-18 Not Zed <NotZed@HelixCode.com>
-
- * camel-mime-part.c (add_header): No, we must not encode the
- headers here. These interfaces ARE raw interfaces as they are
- defined in camel_medium. Also removed a bogus/meaningless FIXME.
- (set_header): Likewise here, we must not.
- (process_header): Removed another bogus comment.
-
- * camel-object.c (shared_is_of_type): Comment out the spitting of
- a big warning when we're trying to determine types from code.
-
- * providers/mbox/camel-mbox-summary.c
- (message_info_new_from_parser): Only call ibex funcitons if we
- have an index.
-
- * providers/mh/camel-mh-summary.c (camel_mh_summary_add): Only
- call ibex functions if we have an index.
- (remove_summary): Likewise.
- (camel_mh_summary_check): Likewise.
-
- * providers/nntp/camel-nntp-store.c (nntp_store_get_folder):
- get_folder -> flags argument.
-
- * providers/vee/camel-vee-store.c (vee_get_folder): create->flags.
-
- * providers/pop3/camel-pop3-store.c (get_folder): Changed create
- -> flags.
-
- * providers/imap/camel-imap-store.c (get_folder): Added flags
- argument.
-
- * providers/mh/camel-mh-folder.c (camel_mh_folder_new): Added
- flags argument, and fixed code appropriately.
-
- * providers/mh/camel-mh-store.c (get_folder): Added flags argument.
-
- * camel-folder-search.c (message_body_contains): Perform a regex
- match on the contents of messages. This wont quite work yet as
- message contents are encoded when written to a stream.
- (build_match_regex): Converts a number of strings into a regex
- matching pattern, escaping special chars.
- (match_message): match a single message from a folder, by uid.
- Slow.
- (search_body_contains): Changed to support matching where no index
- is supplied. Matches are performed by retrieving message
- contents, etc.
- () WTF? camel should not be including any widget headers.
-
- * providers/mbox/camel-mbox-folder.c (camel_mbox_folder_new):
- Added flags argument.
- (mbox_refresh_info): Changed into a NOP, the refresh info code
- moved into the new function.
- (camel_mbox_folder_new): If we have an index requested, build one,
- otherwise, remove an old one, or just dont do anything.
-
- * providers/mbox/camel-mbox-store.c (get_folder): Changed create
- to flags, changed code to suit.
-
- * camel-store.c (camel_store_get_folder): Changed create to flags.
- (get_folder_internal): And here.
- (get_folder): And here too.
-
- * camel-store.h (camel_store_get_folder): Change the create
- argument to be a flags argument.
-
-2000-10-17 Dan Winship <danw@helixcode.com>
-
- * providers/imap/camel-imap-folder.c (imap_refresh_info): Remove
- cached info at the end of the summary when the folder shrinks
- between sessions. Also remove an untrue comment.
- (camel_imap_folder_new): Move the summary creation to after the
- folder selection again, since it depends on the uidvalidity
- having been set.
-
- * providers/imap/camel-imap-store.c (get_folder): Fix up
- summary_file to not include the namespace twice.
-
-2000-10-17 Jeffrey Stedfast <fejj@helixcode.com>
-
- * camel-mime-part.c (set_header): Encode the header value.
- (add_header): Same.
-
-2000-10-17 Not Zed <NotZed@HelixCode.com>
-
- * camel-mime-filter.c: Added some malloc check debugging stuff.
-
- * camel-mime-parser.c
- (struct _header_scan_state): Removed top_part, top_start, and
- pending. I can't even remember why they were there, and they're
- not used anymore.
-
- * camel-mime-filter-basic.c (filter): Forgot to up the space here
- too.
-
-2000-10-14 Not Zed <NotZed@HelixCode.com>
-
- * camel-mime-filter-basic.c (complete): Ok, so we hit a fixme, 3x
- just wasn't enough for some sequences.
-
-2000-10-16 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-command.c
- (imap_read_response): Don't imap_next_word(respbuf + 2), instead
- use imap_next_word(respbuf) or else we'll skip over the second
- token.
-
-2000-10-16 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-command.c
- (camel_imap_response_extract): Don't free 'resp' as it doesn't
- point to the beginning of the allocated data, instead free
- response->untagged->pdata[i]. Also, if '*resp' is equal to a space
- character, then set resp = imap_next_word (resp) rather than
- expecting resp++ to work (there's a list broken IMAP daemons that
- like to put extra spaces between tokens).
- (imap_read_response): Don't expect 'respbuf+2' to be where the
- untagged number response to start (see above fix for an
- explanation).
-
-2000-10-16 Chris Toshok <toshok@helixcode.com>
-
- * camel-service.c (get_path): when using the construct (flags &
- CAMEL_SERVICE_URL_NEED_*) make sure to do ((flags &
- CAMEL_SERVICE_URL_NEED_*) == CAMEL_SERVICE_URL_NEED_*)
- (check_url): same.
-
-2000-10-16 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-store.c (imap_disconnect): Only send
- the LOGOUT command if the store is connected.
- (imap_connect): Set the 'connected' state to TRUE when we
- successfully connect.
- (get_folder_info): if (!topfi), 'topfi' was allocated but then
- 'fi' was set. I think Dan meant to set topfi since fi is an
- uninitialized value at this point.
-
- * providers/imap/camel-imap-command.c (imap_read_response): Check
- for the untagged BYE response and set the 'connected' state to
- FALSE if we receive the BYE response. Return NULL if we get a BYE
- response.
-
-2000-10-16 Dan Winship <danw@helixcode.com>
-
- * providers/imap/camel-imap-store.c (get_folder_info): Deal with
- the possibility of not getting a LIST response back for the top
- level.
-
-2000-10-12 Dan Winship <danw@helixcode.com>
-
- * providers/imap/camel-imap-summary.c: Simple subclass of
- CamelFolderSummary that also keeps a UIDVALIDITY value (and
- doesn't, for the moment, build content info).
-
- * providers/imap/camel-imap-folder.c:
- (various): Use a CamelImapSummary to store/fetch summary info.
- (camel_imap_folder_new): Take a path to a file to use for the
- summary. Set the folder's permanent_flags correctly according to
- the server response. Read in the summary (checking the
- UIDVALIDITY) and update it if it's out of date.
- (imap_refresh_info): Just fetch UIDs and flags. If the UIDs all
- match, update the flags as needed and be done with it. Otherwise,
- delete messages that have been expunged from the server and fetch
- full summary info for any new messages.
- (imap_sync): Save the summary to disk.
- (imap_update_summary): Renamed from imap_get_summary_internal. Can
- now be told to get summary for only a subset of messages. Use
- camel-mime-utils functions rather than rolling our own header
- parsing.
- (imap_get_message_info_internal): Merged into imap_update_summary.
- (imap_set_message_flags): Don't marked the message FOLDER_FLAGGED
- if we're not actually changing the value of any of the flags.
- (camel_imap_folder_changed): Deal with EXISTS rather than RECENT.
-
- * providers/imap/camel-imap-store.c (imap_connect): Call
- camel_session_get_storage_path and save the value.
- (get_folder): Create a local directory to store summary
- information and pass a summary file name to camel_imap_folder_new.
- Don't call camel_folder_refresh_info from here any more since
- camel_imap_folder_new does it again.
-
- * providers/imap/camel-imap-command.c (camel_imap_command): Add a
- special case to this to make it possible to get the repsonses from
- a SELECT and still have store->current_folder be updated
- correctly.
- (imap_read_response): parse EXISTS rather than RECENT
-
- * camel-session.c (camel_session_get_storage_path): Use
- e_mkdir_hier.
-
- * camel-folder-summary.c (camel_folder_summary_remove_index): New
- function.
-
- * camel-mime-utils.c (header_raw_append_parse): fix this.
- (camel-mime-parser.c doesn't use this code because of the MEMPOOL
- optimization, so nothing was ever actually calling it before.)
-
-2000-10-11 Not Zed <NotZed@HelixCode.com>
-
- * camel-mime-part.h (struct _CamelMimePart): Removed
- temp_message_buffer, and content_input_stream fields which seem to
- have come from nowhere, and are unused.
-
- * camel-mime-utils.c: Added a note about touching this file.
- Nobody is to touch it without asking me first. That goes for you
- too Jeff.
- (header_decode_text): In what way is this broken?
-
-2000-10-10 Not Zed <NotZed@HelixCode.com>
-
- * providers/imap/camel-imap-folder.c (imap_get_summary_internal):
- Fix camel_summary_* function rename
- (imap_get_message_info_internal): Likewise.
-
- * camel-mime-parser.c (camel_mime_parser_finalise): Fixed a spelling mistake.
-
- * camel-folder-summary.c (camel_summary_format_address): Uh, why
- do we encode and then decode here ... sigh. This is not the way
- to fix this.
- (camel_folder_summary_format_address): Renamed to a proper name,
- this was only supposed to be a private function.
- (camel_folder_summary_format_string): Likewise. Oh i see why it
- was made public, code reuse by cut & paste. Joy.
-
-2000-10-11 Chris Toshok <toshok@helixcode.com>
-
- * providers/nntp/camel-nntp-store.c (nntp_store_unsubscribe_folder): remove the leading '/'.
- (nntp_store_subscribe_folder): same.
- (nntp_store_folder_subscribed): same.
-
-2000-10-11 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-folder.c (imap_move_message_to): Quote
- the mailbox name as it may contain spaces.
- (imap_copy_message_to): Same.
-
-2000-10-10 Chris Toshok <toshok@helixcode.com>
-
- * providers/nntp/camel-nntp-store.c
- (build_folder_info_from_grouplist): fill in message_count and
- unread_message_count properly.
-
- * providers/nntp/camel-nntp-newsrc.h: reformat.
-
- * providers/nntp/camel-nntp-grouplist.c
- (camel_nntp_get_grouplist_from_file): remove spew.
-
- * providers/nntp/camel-nntp-newsrc.c
- (camel_nntp_newsrc_group_get_num_articles_read): new function.
- (camel_nntp_newsrc_group_get_highest_article_read): robustification.
-
-2000-10-10 Joe Shaw <joe@helixcode.com>
-
- * providers/imap/camel-imap-store.c
- (parse_list_response_as_folder_info): Check before dereferencing the
- sep pointer.
-
-2000-10-10 Jacob "Ulysses" Berkman <jacob@helixcode.com>
-
- * camel-*.c: teach camel about "its" vs. "it's"
-
-2000-10-09 Chris Toshok <toshok@helixcode.com>
-
- * providers/nntp/camel-nntp-store.c (finalize): write out the
- newsrc.
- (nntp_store_get_name): if @brief, just return host.
-
- * providers/nntp/camel-nntp-newsrc.c: robustification and bug
- fixes.
-
-2000-10-06 Jeffrey Stedfast <fejj@helixcode.com>
-
- * camel-folder-summary.c (camel_summary_format_address): Decode
- the resulting string.
-
-2000-10-06 Chris Toshok <toshok@helixcode.com>
-
- * providers/nntp/camel-nntp-grouplist.c: new file.
-
- * providers/nntp/camel-nntp-grouplist.h: new file.
-
- * providers/nntp/camel-nntp-types.h: new file.
-
-2000-10-06 Jeffrey Stedfast <fejj@helixcode.com>
-
- * camel-mime-utils.c (quoted_encode): Fix so that we don't encode
- every single char in the word. Also, do we need a safemask? I
- don't see why we would.
- (header_encode_string): Don't strip off the last char!!
-
-2000-10-06 Chris Toshok <toshok@helixcode.com>
-
- * providers/nntp/Makefile.am (libcamelnntpinclude_HEADERS): add
- camel-nntp-grouplist.h
- (libcamelnntp_la_SOURCES): add camel-nntp-grouplist.c
-
- * providers/nntp/camel-nntp-provider.c: add our own hash functions
- for nntp urls.
-
- * providers/nntp/camel-nntp-newsrc.c
- (camel_nntp_newsrc_group_is_subscribed): new function.
- (camel_nntp_newsrc_subscribe_group): new function.
- (camel_nntp_newsrc_unsubscribe_group): new function.
-
- * providers/nntp/camel-nntp-newsrc.h: add prototypes for
- _group_is_subscribed, _subscribe_group, and _unsubscribe_group.
-
- * providers/nntp/camel-nntp-store.c
- (build_folder_info_from_grouplist): new function.
- (nntp_store_get_folder_info): add subscribed_only_parameter. if
- it's FALSE, load the grouplist and call
- build_folder_info_from_grouplist.
- (nntp_store_folder_subscribed): implement.
- (nntp_store_subscribe_folder): implement.
- (nntp_store_unsubscribe_folder): implement.
- (camel_nntp_store_init): add CAMEL_STORE_SUBSCRIPTIONS to the
- store's flags.
-
- * providers/mh/camel-mh-store.c (get_folder_info): add
- subscribed_only parameter.
-
- * providers/mbox/camel-mbox-store.c (get_folder_info): add
- subscribed_only parameter.
-
- * providers/imap/camel-imap-store.c (get_folder_info): add
- subscribed_only parameter.
-
- * camel-store.c (camel_store_supports_subscriptions): new function.
- (camel_store_folder_subscribed): new function.
- (camel_store_subscribe_folder): new function.
- (camel_store_unsubscribe_folder): new function.
-
- * camel-store.h: add prototypes and virtual functions for the
- subscribe implementation. also, add a subscribed_only argument to
- camel_store_get_folder_info.
-
-2000-10-05 Jeffrey Stedfast <fejj@helixcode.com>
-
- * camel-mime-utils.c (header_address_list_format_append): Encode
- the name part of the address and don't quote the name.
- (header_decode_text): Rewrote from scratch, the old code was badly
- broken.
-
-2000-10-05 Jeffrey Stedfast <fejj@helixcode.com>
-
- * camel-mime-message.c (camel_mime_message_set_reply_to): Use the
- camel_address_encode function again.
- (camel_mime_message_set_from): Same.
-
-2000-10-05 Jeffrey Stedfast <fejj@helixcode.com>
-
- * camel-mime-utils.c (quoted_encode_step): Modified to not encode
- space chars in the middle of a line.
- (isblank): New macro if we're not on a system with the GNU isblank
- extension.
-
- * camel-mime-message.c (camel_mime_message_set_from): Reversed my
- changes, don't header_encode_phrase - it generates broken headers.
- (camel_mime_message_set_reply_to): Same.
-
-2000-10-04 Chris Toshok <toshok@helixcode.com>
-
- * providers/nntp/camel-nntp-utils.c (camel_nntp_get_headers):
- revert to old method (only use XOVER if OVER is supported.)
-
- * providers/nntp/camel-nntp-store.c
- (camel_nntp_store_get_overview_fmt): handle the case where the
- OVER extension isn't listed but LIST OVERVIEW.FMT works (again,
- INN 2.2). enable the OVER extension in this case.
-
-2000-10-04 Chris Toshok <toshok@helixcode.com>
-
- * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): return a
- gboolean so we can tell if this command worked. we can't key off
- the OVER extension being present because at least one server (INN
- 2.2) doesn't report the OVER extension but implements the XOVER
- command. This could of course just be because I'm a loser for
- thinking they were related in the first place.
- (camel_nntp_get_headers): always try XOVER first, and if it fails
- revert to the slow method.
-
-2000-10-04 Dan Winship <danw@helixcode.com>
-
- * providers/mbox/camel-mbox-store.c (get_folder): Fix a case where
- a variable was free'd and then possibly used in an error message.
-
-2000-10-04 Chris Toshok <toshok@helixcode.com>
-
- * providers/nntp/camel-nntp-provider.c
- (camel_provider_module_init): news: -> nntp:.
-
-2000-10-04 Chris Toshok <toshok@helixcode.com>
-
- * providers/nntp/camel-nntp-store.c (nntp_store_get_folder_info):
- use "nntp:" instead of "news:" since "news:" urls aren't supposed
- to have host/user/port info in them. also, if there's a user
- defined in the url, put it in the urls for our folders.
-
-2000-10-04 Chris Toshok <toshok@helixcode.com>
-
- * providers/nntp/camel-nntp-auth.c (camel_nntp_auth_authenticate):
- borrow some code from the imap provider to query the user for
- their password, and pass the user/passwd to nntp. be extra
- paranoid and zero out the password before freeing it.
-
- * providers/nntp/camel-nntp-store.c (camel_nntp_store_init): add
- ALLOW_USER/ALLOW_PASSWORD/ALLOW_AUTH to the url flags.
- (nntp_store_query_auth_types_generic): return our list of
- auth_types.
- (nntp_store_query_auth_types_connected): broken, return same as in
- query_auth_types_generic.
-
-2000-10-04 Dan Winship <danw@helixcode.com>
-
- * providers/imap/camel-imap-store.c (imap_connect): IMAP4
- (pre-rev1) doesn't support the 'LIST "" ""' idiom, so don't use
- it. Just assume the dir_sep is '/'. Shrug.
-
-2000-10-04 Jeffrey Stedfast <fejj@helixcode.com>
-
- * camel-mime-message.c (camel_mime_message_set_reply_to): Use
- header_encode_phrase instead.
- (camel_mime_message_set_from): Same.
-
-2000-10-04 Not Zed <NotZed@HelixCode.com>
-
- * camel-mime-utils.c (header_content_type_is): Handle the case
- where ct != NULL, but type and subtype are, and also match that
- against text/plain.
-
- * camel-folder-summary.c: Bump summary file version.
- (message_info_save): Save the size from the messageinfo.
- (message_info_load): Load the size from the summary file.
- (message_info_load): Fixed up the time_t saving/loading. There
- was a reason the warning was left there ... obviously nobody could
- read the comment "/* warnings, leave them here */", why do i even
- bother.
- (camel_folder_summary_decode_time_t): Decode a time_t value from
- the summary file.
- (camel_folder_summary_encode_time_t): Encode a time_t value to the
- summary file.
-
-2000-10-03 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-command.c (camel_imap_command): Quote
- the mailbox name when sending a SELECT request otherwise mailboxes
- with spaces in their names will cause problems.
-
- * camel-mime-message.c (camel_mime_message_set_reply_to): encode
- before setting.
- (camel_mime_message_set_from): Same.
-
-2000-10-03 Dan Winship <danw@helixcode.com>
-
- * providers/imap/camel-imap-command.c: New file containing
- camel_imap_command and friends. Major camel_imap_command rewrite
- to remove duplicated code, make the parsing of literals be
- more safe/correct, deal with RECENT/EXPUNGE responses more
- consistently, and make it possible to implement the AUTHENTICATE
- command.
-
- * providers/imap/camel-imap-utils.c (imap_parse_nstring): New
- function, to parse an IMAP "nstring".
-
- * providers/imap/camel-imap-store.c: Move command stuff to
- camel-imap-command.c. Update for camel_imap_command changes.
-
- * providers/imap/camel-imap-folder.c: Update for
- camel_imap_command changes.
- (imap_append_message): CRLF filter the message before sending it.
-
- * providers/imap/Makefile.am: Add camel-imap-command.[ch], remove
- camel-imap-stream.[ch] for now.
-
-2000-10-02 Jeffrey Stedfast <fejj@helixcode.com>
-
- * camel-mime-message.c (camel_mime_message_has_8bit_parts): New
- convenience function to determine if there are any 8bit mime parts
- in a mime message.
- (camel_mime_message_encode_8bit_parts): New convenience function
- to recursively reencode all 8bit mime parts to either
- quoted-printable or base64 depending on which would be the best
- encoding for that part.
-
- * providers/smtp/camel-smtp-transport.c (smtp_data): If the mime
- message contains 8bit parts and the server doesn't support 8bit
- transfers, reencode those parts before proceding with the send.
- (smtp_mail): If the mime message contains 8bit parts and the
- server supports the 8BITMIME extension to SMTP, notify the server
- that we'll be sending it 8bit mime parts.
- (_send_to): Find out if the message contains 8bit parts.
-
-2000-10-02 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/smtp/camel-smtp-transport.c (_send_to): Use the
- CamelInternetAddress parser.
- (smtp_get_email_addr_from_text): deprecated.
-
-2000-10-02 Dan Winship <danw@helixcode.com>
-
- * camel-provider.h: Remove default_ports.
-
- * camel-remote-store.c (remote_connect): Get default_port from
- CamelRemoteStore rather than CamelProvider.
-
- * providers/{imap,nntp,pop3}/camel-*-store.c: Initialize
- CamelRemoteStore::default_port
-
- * providers/*/camel-*-provider.c: Remove default_ports.
-
-2000-10-02 Dan Winship <danw@helixcode.com>
-
- * camel-folder.[ch]: Remove
- camel_folder_{get,free}_subfolder_info, as we want to be able to
- scan the whole subfolder tree without having to open any folders,
- so this needs to be in CamelStore. Remove can_hold_folders and
- can_hold_messages flags; things that don't hold messages are no
- longer considered CamelFolders.
-
- * camel-folder-summary.[ch]: Remove CamelFolderInfo stuff.
-
- * camel-store.[ch]: Add camel_store_{get,free}_folder_info, as
- well as camel_store_free_folder_info_full and ..._nop for default
- implementations, and camel_folder_info_free and
- camel_folder_info_build as convenience functions. Turn
- CamelFolderInfo into a tree structure and also add an "url"
- member.
-
- * providers/*/camel-*-folder.c: Remove subfolder_info and can_hold
- stuff.
- * providers/*/camel-*-store.c: Add folder_info stuff.
-
- * providers/imap/camel-imap-folder.c (imap_summary_free): Free the
- summary elements with camel_message_info_free, not
- camel_folder_info_free. Oops.
-
- * providers/imap/camel-imap-utils.c: const poison
-
-2000-09-28 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/smtp/camel-smtp-transport.c: Fixed some memory leaks.
- (camel_smtp_transport_init): Initialize supports_8bit to FALSE.
- (smtp_helo): If server supports 8bit, set supports_8bit to TRUE.
-
- * camel-transport.h (struct _CamelTransport): Added variable
- gboolean supports_8bit (we'll need this eventually? - see bugzilla
- bug #53)
-
- * providers/smtp/camel-smtp-transport.c
- (smtp_get_email_addr_from_text): Ugh, no wonder people were
- getting illegal seek warnings *sigh*. I guess I can only blame
- myself for this one though :-(
-
-2000-09-28 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/smtp/camel-smtp-transport.c (_send_to): Don't send the
- recipient data through smtp_get_email_addr_from_text - this is a
- complete waste. In fact, we don't want to have to use that
- function ever.
-
- * camel-internet-address.c, camel-address.c: Added some gtk-doc
- comments.
-
-2000-09-28 Jeffrey Stedfast <fejj@helixcode.com>
-
- * camel-mime-utils.c (header_encode_string): Make sure to add the
- space char after an encoded word when the encoding is iso-8859-1.
-
-2000-09-28 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-folder.c (imap_get_message): When
- getting a literal string response, don't include the \r\n after
- the closing } (as in: "... {798}\r\n...")
-
- * providers/imap/camel-imap-stream.c (stream_read): Same.
-
-2000-09-28 Not Zed <NotZed@HelixCode.com>
-
- * camel-mime-utils.c (header_fold): New function to fold headers.
-
-2000-09-27 Not Zed <NotZed@HelixCode.com>
-
- * camel-mime-parser.c (folder_scan_header): If we had an empty
- header, then it must be end of the headers too.
- (folder_scan_init): No we dont need to init the outbuf with a nul
- terminator.
-
- * camel-folder-summary.c (camel_folder_summary_set_uid): New
- function to reset the uid to a higher value.
-
- * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_sync):
- "something failed (yo!)" what sort of crap is this? Fixed all the
- indenting again, what wanker keeps running stuff through indent?
- (message_info_new): Check the uid we loaded off the disk, if it
- existed already, assign a new one. If it didn't then make sure
- the nextuid is higher.
-
- * camel-charset-map.c: New file, used to build a large unicode
- decoding mapping table, and use it to determine what is the
- lowest charset a given word can be encoded with. Uses tables from
- libunicode's source.
-
- * camel-internet-address.c (internet_encode): Use
- header_phrase_encode to properly encode the fullname, as required.
- refixed indenting. Who keeps doing that?
- (camel_internet_address_find_address): Changed fatal return/warnings
- into assertions.
-
- * camel-mime-utils.c (header_raw_append_parse): Check : explicitly
- (removed from is_fieldname() macro).
- (camel_mime_special_table): Changed to short, so we can represent
- more bit types.
- (quoted_encode): Take a mask of the safe chars for this encoding.
- (header_address_decode): Removed a #warning that makes no sense
- anymore.
- (header_decode_date): Fixed the 'broken date' parser code, if it
- ever decoded it it just threw away the result.
- (header_encode_string): Use better charset matching for encoding
- strings as well.
-
-2000-08-31 Not Zed <NotZed@HelixCode.com>
-
- * providers/mh/camel-mh-summary.c (camel_mh_summary_sync): Save
- the index if we do a sync.
- (camel_mh_summary_check): Save the index here too. Probably.
-
-2000-09-27 Dan Winship <danw@helixcode.com>
-
- * providers/imap/camel-imap-store.c (camel_imap_command_extended):
- Return untagged data in a GPtrArray rather than a string, since it
- saves processing time and is much easier to deal with for several
- commands. Update for camel_imap_folder_changed change.
- (camel_imap_fetch_command): Update for camel_imap_folder_changed
- change.
- (imap_connect, imap_folder_exists): Update for
- camel_imap_command_extended change.
-
- * providers/imap/camel-imap-folder.c
- (imap_get_message_count_internal,
- imap_get_subfolder_info_internal, imap_search_by_expression):
- Update for camel_imap_command_extended change.
-
- (imap_get_summary_internal, imap_get_message_info_internal): Use
- camel_imap_fetch_command here now to get around the
- camel_imap_command_extended change.
-
- (camel_imap_folder_changed): turn expunged into a GArray of ints
- rather than a GPtrArray of strings representing ints.
-
-2000-09-26 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-folder.c
- (imap_get_message_count_internal): Quote the folder name as it may
- contain spaces.
- (imap_get_subfolder_info_internal): Same.
-
- * providers/imap/camel-imap-utils.c (imap_parse_list_response): Do
- proper unquoting for folder names.
- (func_get_current_date): Implemented.
-
- * providers/imap/camel-imap-store.c
- (imap_folder_exists): Quote the folder name as it may have spaces.
- (imap_create): Same.
- (check_current_folder): Same.
-
-2000-09-22 Dan Winship <danw@helixcode.com>
-
- * providers/imap/camel-imap-folder.c
- (imap_get_subfolder_info_internal): The root folder's name is "",
- not the namespace.
- (camel_imap_folder_new): constify folder_name.
-
- * providers/imap/camel-imap-store.c (get_folder): Create the
- folder with folder_name, not folder_path.
- (camel_imap_command_preliminary): Don't free cmdid here.
-
-2000-09-21 Dan Winship <danw@helixcode.com>
-
- * providers/imap/camel-imap-utils.c (imap_create_flag_list): New
- function to convert Camel flags to an IMAP flag_list.
- (imap_parse_flag_list): Contrariwise.
-
- * providers/imap/camel-imap-store.c (camel_imap_command_*): Make
- the @ret arg actually optional, as (mostly) documented.
- (various): Don't pass "&result" to camel_imap_command_* if we're
- just going to immediately free it. Don't record status if we're
- not going to look at it.
-
- * providers/imap/camel-imap-folder.c: Likewise.
- (imap_summary_free): Use camel_folder_info_free.
- (imap_sync): Use imap_create_flag_list. Clear
- CAMEL_MESSAGE_FOLDER_FLAGGED after syncing so we don't keep
- re-syncing.
- (imap_append_message): Use imap_create_flag_list. Don't leak the
- memstream if the append fails.
- (imap_move_message_to): Use camel_folder_delete_message rather
- than doing it by hand.
- (imap_get_summary_internal, imap_get_message_info_internal): Use
- imap_parse_flag_list and header_raw_clear.
- (camel_imap_folder_changed): Use camel_message_info_free.
-
-2000-09-21 Dan Winship <danw@helixcode.com>
-
- * providers/imap/camel-imap-store.c (get_folder_name): INBOX is
- case-insensitive.
- (get_root_folder_name): Make the root folder "" rather than "/".
- (get_folder): Update for root folder name change.
- (camel_imap_store_get_toplevel_dir): Removed. (Unused, unneeded.)
- (camel_imap_store_folder_path): New function to turn a Camel
- folder name into the corresponding namespaced IMAP path.
- (imap_folder_exists): Make this take a store and a path rather
- than a folder.
- (imap_create): Likewise
- (get_folder): Update for camel_imap_store_folder_path and other
- changes.
- (check_current_folder): Likewise.
-
- * providers/imap/camel-imap-folder.c: Change a bunch of CamelStore
- variables to CamelImapStore (and add a few more) to prevent excess
- gratuitous casting. Use camel_imap_store_folder_path where
- appropriate.
- (camel_imap_folder_new): Update for root folder name change.
-
-2000-09-19 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/smtp/camel-smtp-transport.c (smtp_data): Use the
- linewrap filter to achieve full RFC0821 compliance.
-
- * camel-mime-filter-linewrap.[c,h]: New mime-filter to word-wrap.
-
-2000-09-19 Jeffrey Stedfast <fejj@helixcode.com>
-
- * camel-internet-address.c (internet_encode): When encoding the
- internet address, quote the name as the name may have commas or
- any other token which may later confuse our address parser.
-
-2000-09-19 Dan Winship <danw@helixcode.com>
-
- * providers/imap/camel-imap-folder.c
- (imap_get_subfolder_info_internal): Fix the case where INBOX
- isn't returned in the folder listing.
-
-2000-09-19 Dan Winship <danw@helixcode.com>
-
- * camel-folder.c: (init): Removed
- (camel_folder_init, camel_folder_construct): New object init
- function and public object constructor to replace the old init
- method in a more Gtk-like fashion.
-
- (get_parent_folder, camel_folder_get_parent_folder): Removed. No
- CamelFolder subclass was ever setting the parent_folder member, no
- code has ever needed to look at it, and fixing it would actually
- be pretty hard.
-
- (get_subfolder_info, camel_folder_get_subfolder_info): Renamed
- from ..._names. Deals in CamelFolderInfo now.
- (free_subfolder_info, camel_folder_free_subfolder_info): Likewise.
-
- (get_subfolder, camel_folder_get_subfolder): Removed.
- CamelFolderInfo contains the subfolder's full name, so this is
- unnecessary now, and removing it lets us get rid of the
- CamelFolder separator member, which is needed for the default
- implementation of this function, but not otherwise needed for most
- providers.
-
- Also, lots of code style fixes.
-
- * providers/*: Update CamelFolder subclasses for changes, although
- none of them fill in the message counts in the CamelFolderInfo
- yet.
-
-2000-09-18 Christopher James Lahey <clahey@helixcode.com>
-
- * camel-folder-search.c, camel-folder-search.h,
- camel-remote-store.c, providers/imap/camel-imap-folder.c,
- providers/imap/camel-imap-store.c: Fixed the #include lines to
- deal properly with gal.
-
-2000-09-17 Dan Winship <danw@helixcode.com>
-
- * camel-folder-summary.h: update CamelFolderInfo
- * camel-folder-summary.c (camel_folder_info_free): New function to
- free the contents of a CamelFolderInfo
-
-2000-09-15 Dan Winship <danw@helixcode.com>
-
- * camel.c (camel_init): Set camel_verbose_debug to TRUE if
- CAMEL_VERBOSE_DEBUG is set in the environment.
-
- * camel-remote-store.c (remote_send_line, remote_recv_line): only
- log if camel_verbose_debug is TRUE.
-
-2000-09-14 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-store.c (get_folder): Don't use
- dir_sep as top-level directory, use "/".
-
- * providers/imap/camel-imap-folder.c (imap_expunge): Get rid of
- unused variable.
-
-2000-09-13 Dan Winship <danw@helixcode.com>
-
- * providers/imap/camel-imap-folder.c (imap_expunge): Don't look at
- the response of the command. camel_imap_command_extended()
- processes EXPUNGE responses itself, so if we do it here too we
- remove twice as many summary items as we should.
-
-2000-09-13 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-store.c (imap_folder_exists): Rewrote
- to take a third argument (gboolean *selectable) so that we can
- find out if the folder is selectable or not as we look to see if
- it exists. Also, don't use EXAMINE because that will not work on
- non-selectable folders, so use LIST instead.
- (get_folder): Check to see if the folder exists even vefore
- calling imap_create as this will save time. If the folder does
- exist, find out if it's selectable. Moved the call to refresh_info
- here.
-
- * providers/imap/camel-imap-folder.c (imap_get_uids): Check for a
- NULL summary.
- (camel_imap_folder_new): Don't call refresh_info here - call it in
- get_folder() because we don't know if this folder even exists on
- the server yet! And even if it does, we don't know if it can hold
- messages or not yet.
-
-2000-09-12 Jeffrey Stedfast <fejj@helixcode.com>
-
- * camel-mime-parser.c (folder_scan_step): Make sure *datalength is
- > 0 before calling camel_mime_filter_filter otherwise we will get
- a segfault if the filter calls iconv().
-
-2000-09-08 Christopher James Lahey <clahey@helixcode.com>
-
- * providers/nntp/camel-nntp-auth.c,
- providers/nntp/camel-nntp-auth.h: Fixed a warning.
-
-2000-09-07 Dan Winship <danw@helixcode.com>
-
- * camel-session.c (camel_session_get_storage_path): Make this not
- leak.
-
-2000-09-07 Dan Winship <danw@helixcode.com>
-
- * camel-session.c (camel_session_new): Make this take a path to a
- directory that Camel can use for its own nefarious purposes.
- (camel_session_get_storage_path): New function to return a path
- that a service can use for its own nefarious sub-purposes.
-
- * camel-service.c (camel_service_get_path): New method (and
- useful default implementation) to get a (relative) pathname
- corresponding to the service.
-
-2000-09-06 Dan Winship <danw@helixcode.com>
-
- * providers/pop3/camel-pop3-store.c (connect_to_server): Make KPOP
- work again.
-
-2000-09-06 Jeffrey Stedfast <fejj@helixcode.com>
-
- * camel-mime-message.c (camel_mime_message_get_received_date):
- Implemented (someone added these to camel-mime-message.h but never
- implemented them!!) - though it may not be right.
- (camel_mime_message_get_sent_date): Same.
-
-2000-09-05 Dan Winship <danw@helixcode.com>
-
- * camel-mime-part.c (camel_mime_part_get_filename): If a MIME part
- has no Content-Disposition, but does have a "name" on the
- Content-Type, return that as the filename.
- (process_header): strstrip the Content-Description
-
-2000-09-05 Chris Toshok <toshok@helixcode.com>
-
- * providers/nntp/camel-nntp-utils.c (get_OVER_headers): care about
- response code.
- (get_HEAD_headers): same.
- (camel_nntp_get_headers): same.
-
- * providers/nntp/camel-nntp-store.h: get rid of
- CAMEL_NNTP_OK/ERR/FAIL.
-
- * providers/nntp/camel-nntp-store.c
- (camel_nntp_store_get_extensions): take CamelException arg and
- pass along to camel_nntp_command.
- (camel_nntp_store_get_overview_fmt): same.
- (nntp_store_connect): convert to using constants in
- camel-nntp-resp-codes.h
- (nntp_store_get_folder): make use of camel_nntp_folder_new.
- (camel_nntp_command_send_recv): new function to deal with auth
- challenge.
- (camel_nntp_command): split out most of this function into
- camel_nntp_command_send_recv. also, return the actual response
- code instead of CAMEL_NNTP_OK/ERR/FAIL.
-
- * providers/nntp/camel-nntp-resp-codes.h: new file.
-
- * providers/nntp/camel-nntp-folder.h: prototype for
- camel_nntp_folder_new.
-
- * providers/nntp/camel-nntp-folder.c (camel_nntp_folder_new): new
- convenience function.
- (nntp_folder_get_message): care more about the actual response
- code.
-
- * providers/nntp/Makefile.am (libcamelnntp_la_SOURCES): add
- camel-nntp-auth.c.
- (libcamelnntpinclude_HEADERS): add camel-nntp-auth.h.
-
- * providers/nntp/camel-nntp-auth.h: new file.
-
- * providers/nntp/camel-nntp-auth.c: new file.
-
-2000-09-05 Peter Williams <peterw@helixcode.com>
-
- * providers/imap/camel-imap-store.c (imap_folder_exists): Don't free the
- result on error; the exception will have the relevant info.
-
- * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Check for
- exceptions here.
-
- * providers/imap/camel-imap-store.c (imap_connect): Check the exception
- on the refresh_folders call.
-
- * providers/imap/camel-imap-store.h: Clean up some now-unused fields.
-
- * camel.c (camel_init): Call unicode_init again, now that libunicode
- will not initialize itself twice.
-
-2000-09-02 Lauris Kaplinski <lauris@helixcode.com>
-
- * camel-folder-search (search_header_contains): Use e_utf8_strstrcase
-
-2000-09-01 Christopher James Lahey <clahey@helixcode.com>
-
- * providers/imap/camel-imap-utils.c: Removed some unused
- functions.
-
-2000-09-01 Peter Williams <peterw@helixcode.com>
-
- * providers/nntp/camel-nntp-store.c (camel_nntp_command): Initialize
- the statically-allocated CamelException so that it doesn't contain
- junk data that camel_exception_set() may try to free.
- (camel_nntp_store_get_extensions): Same.
- (camel_nntp_store_get_overview_fmt): Same.
-
- * providers/pop3/camel-pop3-store.c (camel_pop3_command): Typo
- fix (if (*ret) -> if (ret)).
-
- * providers/pop3/camel-pop3-store.c (pop3_connect): Set the
- port # back to what was specified ASAP, so that the hash of
- the URL doesn't change (which causes a failure in
- service_cache_remove that leads to a segfault).
-
- * providers/imap/camel-imap-store.c (imap_connect): Clear the
- exception after a failed LOGIN so that it doesn't pass through
- to the upper level and make mail think that the login failed.
-
- * providers/pop3/camel-pop3-store.c (pop3_connect): As above.
-
-2000-08-31 Peter Williams <peterw@helixcode.com>
-
- * providers/pop3/camel-pop3-store.c (camel_pop3_store_get_type):
- Implement POP3 with the CamelRemoteStore now.
- (connect_to_server): Hack this a bit to get KPOP to work. Obey
- the new connection semantics of the remote store (implicitly).
- (query_auth_types_connected): Clear exceptions after attempts
- to connect; the code at the bottom will catch hard errors.
- Use camel_service_connect.
- (camel_pop3_command): Take a CamelException; now, when an error
- occurs, ret is set to NULL and the exception passes back the
- appropriate information.
- (pop3_get_response): Same as above.
- (pop3_try_authenticate): Give camel_pop3_command its exception
- and handle it properly.
- (pop3_connect): Call the parent classfuncs. Don't disconnect
- on error (done for us).
-
- * providers/pop3/camel-pop3-folder.c: Obey the camel_pop3_command
- semantics.
-
- * camel-remote-store.c (remote_query_auth_types_connected): Don't
- warn; just return NULL.
- (remote_query_auth_types_generic): Same.
- (remote_send_string): Filter out passwords in debugging output.
-
- * providers/pop3/camel-pop3-store.c (camel_pop3_store_init): Also
- set the ALLOW_AUTH flag.
-
- * providers/imap/camel-imap-store.c (camel_imap_store_init): Same.
-
-2000-08-31 Chris Toshok <toshok@helixcode.com>
-
- * providers/nntp/camel-nntp-store.c (camel_nntp_store_class_init):
- remove get_folder_name.
- (nntp_store_get_folder_name): remove.
-
-2000-08-31 Lauris Kaplinski <lauris@helixcode.com>
-
- * camel-mime-part.c (write_to-stream): Use filter only if we have one
-
-2000-08-31 Chris Toshok <toshok@helixcode.com>
-
- * providers/nntp/camel-nntp-utils.c (get_OVER_headers): use
- camel_remote_store_recv_line.
-
- * providers/nntp/camel-nntp-folder.c (nntp_folder_get_message):
- use camel_remote_store_recv_line to build message. also, free our
- buffer so we don't leak like mad.
-
- * providers/nntp/camel-nntp-store.c:
- (camel_nntp_store_get_additional_data) remove.
- (camel_nntp_store_get_extensions): use
- camel_remote_store_recv_line.
- (camel_nntp_store_get_overview_fmt): same. also, don't rely on
- _get_additional_data anymore since it's easier to parse without.
- (camel_nntp_command): use camel_remote_store_send_string and
- camel_remote_store_recv_line.
-
- * providers/nntp/camel-nntp-store.h: CamelRemoteStore is the
- parent class now. remove istream/ostream since CamelRemoteStore
- takes care of that for us. also remove the prototype for
- camel_nntp_store_get_additional_data.
-
- * providers/nntp/camel-nntp-newsrc.c (camel_nntp_newsrc_write):
- make sure to clear dirty bit.
- (camel_nntp_newsrc_read_for_server): don't worry about continually
- trying to open the file - if it fails we just return an
- unpopulated .newsrc file.
-
-2000-08-31 Chris Toshok <toshok@helixcode.com>
-
- * providers/nntp/camel-nntp-newsrc.c
- (camel_nntp_newsrc_read_for_server): make this a bit more robust.
- try to create an empty .newsrc file for the server if we can't
- open it for reading. also, don't allocate everything until we've
- opened the file.
-
- * providers/nntp/camel-nntp-utils.c (get_OVER_headers): make use
- of our overview field indices.
- (camel_nntp_get_headers): only call get_OVER_headers if the
- extension is present. warn if it's not - since get_HEAD_headers
- needs work before it works.
-
- * providers/nntp/camel-nntp-store.c
- (camel_nntp_store_get_extensions): new function - query the server
- for it's extensions.
- (camel_nntp_store_get_overview_fmt): new function - query the
- server for the overview format and build our table of the indices
- we care about. support the "full" suffix on fields.
- (nntp_store_connect): call camel_nntp_store_get_extensions and
- camel_nntp_store_get_overview_fmt.
-
- * providers/nntp/camel-nntp-store.h: add codes for extensions
- found on news.mozilla.org. only one that we care about is OVER.
- also, add CamelNNTPOverField and an enum of the overview fields
- that we care about.
-
-2000-08-31 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-utils.c (imap_translate_sexp):
- Reimplemented. It should now work correctly for most possible
- VFolder rules.
-
-2000-08-31 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-store.c (camel_imap_command_extended):
- Don't save any exceptions caused by camel_imap_folder_changed
- (camel_imap_fetch_command): Same.
-
- * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
- Using a new way of calculating the first recent message that seems
- more accurate. Also added code to make sure we don't accidently
- add a duplicate summary.
-
-2000-08-31 Not Zed <NotZed@HelixCode.com>
-
- * camel-mime-part.c (write_to_stream): Use the proper type
- checking function to check for text types.
- (write_to_stream): If we have a charset on a text type that
- isn't us-ascii or utf-8, then we need to reencode it, so add a
- filter to do that too.
- (write_to_stream): Fix some warnings/use the right constructor,
- oops.
- (write_to_stream): Rearrange the logic so it always does charset
- conversion, and not just if we have a qp/base64 block.
-
- * camel-mime-utils.c (append_latin1): New function - even though
- its broken, we'll assume mailers send latin1 headers instead of
- us-ascii. We just have to encode high chars into utf-8.
- (header_decode_text): Call append_latin1 for appending unencoded
- text segments.
- (append_latin1): Do an additional mask for account for c's
- undefined behaviour for sign extension whilst shifting right.
-
-2000-08-30 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-store.c (camel_imap_fetch_command):
- Rewrote to ignore strings that look like server responses until it
- is sure that it has finished reading the literal string response.
-
-2000-08-30 Jeffrey Stedfast <fejj@helixcode.com>
-
- * camel-remote-store.c (remote_send_string): Don't wrap printed
- strings in quotes, makes things messy
-
- * providers/imap/camel-imap-folder.c (imap_get_message): Updated
- to use the camel_imap_fetch_command
-
- * providers/imap/camel-imap-stream.c (stream_read): Updated to use
- camel_imap_fetch_command
-
- * providers/imap/camel-imap-store.c (camel_imap_command_extended):
- No longer handles FETCH requests so no longer needs to be
- concerned with checking to make sure that server responses are
- valid (they have to be).
- (camel_imap_fetch_command): New convenience function that handles
- all FETCH requests
-
-2000-08-30 Peter Williams <peterw@helixcode.com>
-
- * camel-remote-store.c (remote_connect): Unify with remote_post_connect.
- (remote_disconnect): Unify with remote_pre_disconnect.
- (camel_remote_store_class_init): Don't use the post_connect and
- pre_disconnect classfuncs anymore ; they weren't especially useful.
-
- * providers/imap/camel-imap-store.c (imap_connect): Use this again
- instead of implementing post_connect.
- (imap_disconnect): Analogous to above.
-
- * camel-session.c (camel_session_get_service_connected): New function.
- Like camel_session_get_service() but also connects to the service
- if needed. camel_session_get_{store,transport} (defined in the header)
- used this now, preventing annoying when-to-connect problems.
-
- * camel-service.c (camel_service_new): Revert to the old behavior
- of not connecting until told to do so. Otherwise doing auth
- testing correctly is really hard.
- (camel_service_connect): Fix behavior here (set the connected
- flag).
- (camel_service_disconnect): Unset the connected flag.
-
-2000-08-30 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-store.c: General cleanup / moving
- stuff around to make things easier to follow.
-
-2000-08-30 Jeffrey Stedfast <fejj@helixcode.com>
-
- * camel-remote-store.c: Prevent exceptions from being overwritten
-
- * providers/imap/camel-imap-folder.c (imap_expunge): Beautified
- (imap_get_subfolder_names_internal): Removed old code as the
- replacement code has now been tested and proven to work
-
-2000-08-29 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-utils.c: Removed old code that will
- never be needed again
-
- * providers/imap/camel-imap-store.c: Removed old code for
- try_connect - will never need this code
- (slurp_response): Update to make sure we aren't falsely detecting
- EXPUNGE flags
-
-2000-08-29 Peter Williams <peterw@helixcode.com>
-
- * camel-service.c (camel_service_connect): Uncomment this.
- (camel_service_disconnect): Same.
-
- * camel-remote-store.[ch]: New files. Abstract remote storages
- (IMAP, POP3, NNTP) and hides the lower-level networky stuff.
-
- * camel-service.c (camel_service_new): Take an extra argument, the
- provider that created us, cause it's useful.
- (camel_service_finalize): Unref our new provider member.
-
- * camel-session.c (camel_session_get_service): Pass the proper number of
- arguments to camel_service_new().
-
- * camel-imap-store.c: Massive update: 1) use the CamelRemoteService to
- make our life Very Easy (TM). 2) Change the semantics of all
- camel_imap_command* functions to take exceptions, centralize tons of
- duplicate code, and use the handy RemoteStore utility functions
-
- * camel-imap-folder.c: Use the new semantics of camel_imap_command*
-
- * camel-imap-stream.c: Same.
-
-2000-08-29 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-store.c (camel_imap_command_extended):
- Updated to check for EXPUNGE notifications
-
- * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
- Updated to account for messages which have been expunged (now
- takes a new arg, a GPtrArray of message id's that have been
- expunged)
- (imap_expunge): Updated (we may want to just use the code in
- folder_changed now instead of doing our own summary
- expunging...but that can be fixed later)
- (imap_append_message): Updated.
- (imap_copy_message_to): Updated.
- (imap_move_message_to): Updated.
-
-2000-08-28 Peter Williams <peterw@helixcode.com>
-
- * camel-folder.c (camel_folder_refresh_info): New member function,
- refresh_info, used for rereading folder state after its state has
- somehow become unknown. Tries to preserve last-known status of
- messages.
-
- * providers/mbox/camel-mbox-folder.c (mbox_refresh_info): Implement
- ::refresh_info (split up ::init)
-
- * providers/mbox/camel-mbox-store.c (get_folder): Call ::refresh_info.
-
- * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Call
- ::refresh_info once initialized.
- (imap_refresh_info): New member function; reads the summary from
- the server (used to be in camel_imap_folder_new; split out).
-
- * providers/imap/camel-imap-store.c (imap_connect): Set
- CamelService::connected a little early so that
- camel_imap_command won't try to connect while already
- connnecting.
- (camel_imap_command*): Try to connect if not connected already.
-
- * providers/pop3/camel-pop3-folder.c (pop3_refresh_info): Same as above.
-
- * providers/pop3/camel-pop3-folder.c (camel_pop3_folder_new): Same
- as above.
-
- * providers/pop3/camel-pop3-store.c (pop3_connect): Set
- CamelService::connected a little early so that
- camel_pop3_command won't try to connect while already
- connecting
- (connect_to_server): Same.
-
- * providers/nntp/camel-nntp-folder.c (nntp_folder_refresh_info): Same
- as above.
-
-2000-08-28 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-folder.c (imap_get_message): Fixed the
- hack around quoted string responses - should now handle them
- according to the specifications in the RFC
-
- * providers/imap/camel-imap-stream.c (stream_read): Updated to
- match the code currently used in camel-imap-folder.c
-
-2000-08-28 Ettore Perazzoli <ettore@helixcode.com>
-
- * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_sync):
- Never ever free `tmpname' as it comes from `alloca()'!
-
-2000-08-26 Ettore Perazzoli <ettore@helixcode.com>
-
- * camel-mime-utils.c (header_decode_text): Use `g_free()', not
- `free()', to free `decword'.
-
-2000-08-25 Peter Williams <peterw@helixcode.com>
-
- * camel.c (camel_init): Don't call unicode_init; code in e-util
- will do it, and if unicode_init is called twice, you get an
- infinite loop when looking up nonexistant encodings (patch
- has been submitted to libunicode's maintainer).
-
- * camel-provider.h: Add a new field, default_ports, which
- helps the configuration code guess about how to make CamelURL's
- from providers.
-
- * providers/*/camel-*-provider.c: Specify default ports.
-
-2000-08-25 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-folder.c
- (imap_get_subfolder_names_internal): If the url path is "/" and
- the folder path is "/", just LIST "" "*" (this should fix some
- cyrus imapd problems). Also, INBOX is case insensitive so use
- g_strcasecmp
-
-2000-08-24 Lauris Kaplinski <lauris@helixcode.com>
-
- * camel-folder-summary.c (summary_build_content_info):
- Use UTF-8 as default
- * camel-mime-part-utils.c (simple_data_wrapper_construct_from_parser):
- Use UTF-8 as default
- * camel-mime-utils.c (rfc2047_decode_word): Use UTF-8
-
-2000-08-17 Not Zed <NotZed@HelixCode.com>
-
- * providers/mh/camel-mh-folder.c (mh_finalize): And here too.
-
- * providers/mbox/camel-mbox-folder.c (mbox_finalize): Close index
- on exit.
-
-2000-08-23 Dan Winship <danw@helixcode.com>
-
- * camel-mime-utils.c (header_address_list_format_append): put
- commas between addresses.
-
-2000-08-22 Dan Winship <danw@helixcode.com>
-
- * providers/imap/camel-imap-folder.c
- (imap_protocol_get_summary_specifier): use BODY.PEEK, not BODY, so
- we don't set the message \Seen.
-
-2000-08-22 Christopher James Lahey <clahey@helixcode.com>
-
- * providers/pop3/camel-pop3-store.c: Fixed a small warning.
-
-2000-08-22 Peter Williams <peterw@helixcode.com>
-
- * camel-service.c (camel_service_new): Connect automatically if the
- URL is not empty.
- (finalize): Disconnect automatically if connected.
- (camel_service_query_auth_types): Split into two functions; one to
- be called if we're connected to an actual server (_connected), one
- to be called if we're just gauging the general authtypes supported
- (_generic).
- (is_connected): Remove.
-
- * camel-store.c (camel_store_get_folder): Don't connect explicitly to
- the service.
-
- * providers/nntp/camel-nntp-store.c (query_auth_types_generic): Split
- the query_auth_types function. Hook it up in _new.
- (finalize): Don't try to disconnect here.
-
- * providers/pop3/camel-pop3-store.c (query_auth_types_generic): Same.
- (finalize): Don't try to disconnect here.
-
- * providers/imap/camel-imap-store.c (query_auth_types_generic): Same.
- (finalize): Don't try to disconnect here.
-
- * providers/smtp/camel-smtp-transport.c (query_auth_types_generic): Split
- the query_auth_types (dummy, in this case) function. Hook it up in _new.
- (finalize): Don't try to disconnect here.
-
-2000-08-21 JP Rosevear <jpr@helixcode.com>
-
- * providers/nntp/camel-nntp-folder.c (nntp_folder_get_subfolder_names):
- Make sure newsrc is not null
- (nntp_folder_get_subfolder_names): ditto
-
- * providers/nntp/camel-nntp-newsrc.c
- (camel_nntp_newsrc_get_subscribed_group_names): Programming check
- for newsrc == NULL
- (camel_nntp_newsrc_get_all_group_names): ditto
- (camel_nntp_newsrc_write_to_file): ditto
- (camel_nntp_newsrc_write): ditto
-
-2000-08-21 JP Rosevear <jpr@helixcode.com>
-
- * providers/nntp/camel-nntp-store.c (camel_nntp_command):
- Make sure respbuffer is not null before manipulating it.
- If it is null, return CAMEL_NNTP_FAIL and a decent error
- message.
-
-2000-08-18 Peter Williams <peterw@helixcode.com>
-
- * camel-internet-address.c (internet_encode): If the name is "" we
- weren't outputting anything; output the address at least.
-
-2000-08-16 Peter Williams <peterw@helixcode.com>
-
- * camel-internet-address.c (internet_encode): Fix a leak when
- name = "". It's a single-byte leak, but it's the little things
- that count.
-
- * camel-object.c (camel_type_lock_up): Don't leave the type
- system locked when a bad unlock happens.
-
- * providers/mbox/camel-mbox-store.c (get_folder): Fix a leak.
-
-2000-08-15 Peter Williams <peterw@helixcode.com>
-
- * providers/imap/camel-imap-folder.c (imap_copy_message_to): Typo fix.
-
-2000-08-14 Peter Williams <peterw@helixcode.com>
-
- * camel-folder-search.c (search_get_sent_date): New search function;
- returns the time_t when the message was sent.
- (search_get_receive_date): Same for when it was received.
- (search_get_current_date): Gets the current time for use with the
- above two. Is this in the right place?
-
- * camel-folder-search.h: Add the new functions above to the class.
-
-2000-08-13 Dan Winship <danw@helixcode.com>
-
- * providers/nntp/Makefile.am (libcamelnntpinclude_HEADERS): Add
- camel-nntp-utils.h
-
- * providers/imap/camel-imap-folder.c
- (imap_get_subfolder_names_internal): do a strcasecmp rather than
- just a strcmp when checking if a folder is "INBOX", since it is
- a case-insensitive name.
-
-2000-08-12 Dan Winship <danw@helixcode.com>
-
- * providers/imap/camel-imap-folder.c (imap_get_summary_internal):
- Don't assume the FETCH results will come back in the order they
- were requested.
- (imap_get_subfolder_names_internal): Add "INBOX" to the list as
- g_malloc'ed memory, not a static string.
-
-2000-08-12 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-store.c
- (camel_imap_command_continuation): Now takes a char * parameter
- rather than a stream
- (camel_imap_command_continuation_with_stream): Same function as
- above but takes a stream parameter instead
-
- * providers/imap/camel-imap-folder.c (imap_append_message): Use
- camel_imap_command_continuation_with_stream
-
-2000-08-12 Dan Winship <danw@helixcode.com>
-
- * providers/pop3/camel-pop3-store.c (pop3_try_authenticate): New
- function to do one round of attempted authentication.
- (pop3_connect): Move a bunch of code out into
- pop3_try_authenticate and fix some bugs in the edge cases.
-
-2000-08-12 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-store.c (query_auth_types): No longer
- calls try_connect() to get authtypes
-
-2000-08-11 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-store.c
- (camel_imap_command_continuation): Changed param order a bit and
- fixed some logic
-
- * providers/imap/camel-imap-folder.c (imap_append_message): Use
- the new multi-transactional convenience functions
-
-2000-08-11 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-store.c
- (camel_imap_command_preliminary): New convenience function for
- multi-transactional commands (opening request)
- (camel_imap_command_continuation): New convenience function for
- multi-transactional commands (followup data)
-
-2000-08-11 Christopher James Lahey <clahey@helixcode.com>
-
- * providers/mh/camel-mh-folder.c: Fixed a warning.
-
-2000-08-11 Chris Toshok <toshok@helixcode.com>
-
- * providers/nntp/camel-nntp-folder.c
- (camel_nntp_folder_class_init): remove get_name and get_full_name
- assignments, since the camel-folder.c implementation does what we
- need.
-
-2000-08-11 Chris Toshok <toshok@helixcode.com>
-
- * providers/nntp/camel-nntp-store.c
- (camel_nntp_store_get_toplevel_dir): use g_get_home_dir, since
- evolution_dir isn't available in the providers.
-
-2000-08-11 Peter Williams <peterw@helixcode.com>
-
- * camel-folder.c (thaw): Fix a bug where the message_changed
- signal wasn't being emitted.
-
-2000-08-11 Not Zed <NotZed@HelixCode.com>
-
- * providers/mh/camel-mh-folder.c (mh_set_message_user_tag):
- Implement.
- (mh_get_message_user_tag): Implement.
-
- * providers/mbox/camel-mbox-folder.c (mbox_get_message_user_tag):
- (mbox_set_message_user_tag): Implement.
-
- * camel-folder.c (move_message_to): Yay so lets fix an already
- fixed fix, again.
- (copy_message_to): and here too ... update for api change to append().
- And removed another warning.
- (camel_folder_set_message_user_tag): Routine to set message tags.
- (camel_folder_get_message_user_tag): And accessor.
-
-2000-08-10 Christopher James Lahey <clahey@helixcode.com>
-
- * camel-folder-search.c, camel-folder-summary.c, camel-medium.c,
- camel-mime-filter-charset.c, camel-mime-filter.c,
- camel-mime-filter.h, camel-mime-message.c, camel-mime-parser.c,
- camel-mime-part-utils.c, camel-mime-part.c, camel-mime-utils.c,
- camel-movemail.c, camel-multipart.c, camel-object.c,
- camel-stream-mem.c, providers/mbox/camel-mbox-folder.c,
- providers/mbox/camel-mbox-summary.c,
- providers/mh/camel-mh-folder.c,
- providers/smtp/camel-smtp-transport.c: Fixed some warnings.
-
-2000-08-11 Not Zed <NotZed@HelixCode.com>
-
- * providers/vee/camel-vee-folder.c (vee_folder_build_folder): Free
- the search properly.
- (vee_folder_build): And here too.
-
-2000-08-10 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
- If we go over the max number of messages, don't keep requesting
- new message summaries, just break.
-
-2000-08-11 Not Zed <NotZed@HelixCode.com>
-
- * camel-mime-parser.c (folder_scan_header): A better way to
- compress leading whitespace. The code is probably invalid anyway,
- I dont think it will work across buffer boundaries.
-
- * providers/mbox/camel-mbox-folder.c (mbox_append_message): And
- write out proper format From lines here too.
-
- * providers/mbox/camel-mbox-summary.c
- (camel_mbox_summary_build_from): New function to build a more
- compatible mbox "From " line.
- (camel_mbox_summary_sync): Write From lines in the proper format.
-
-2000-08-10 Not Zed <NotZed@HelixCode.com>
-
- * providers/mh/camel-mh-store.c (get_folder): Remove warnin g.
-
- * providers/mbox/camel-mbox-store.c (xrename): Kill some warnings
- with constification.
-
- * providers/imap/camel-imap-folder.c (imap_append_message): Fixed
- for append api change. Eek this routine seriously wastes memory.
-
- * providers/mh/camel-mh-folder.c (mh_search_free): Impelemnt.
- (mh_append_message): Fix for api change, and include user flags
- and tags in new message.
-
- * providers/vee/camel-vee-folder.c (vee_search_by_expression): Fix
- for search api change.
-
- * camel-folder.c (camel_folder_search_free): New function for
- freeing search results.
- (search_free): Changed my mind, implement a default that actually
- does something. Free as to the old interface.
- (camel_folder_append_message): Changed to accept a
- camelmessageinfo rather than flags, which just doesn't have enough
- info in it.
- (copy_message_to): Change for append_message api change.
- (move_message_to): Likewise.
-
- * providers/mbox/camel-mbox-folder.c (mbox_search_free):
- Implement.
- (mbox_append_message): Fix for api change, and also copy user
- flags/tags across to new summary.
-
- * camel-folder-search.c (search_user_tag): A search expression
- that returns the current use flag by name.
- (camel_folder_search_free_result): New function to free the result
- of a search.
-
- * camel-folder-summary.c: Bump summary version.
- (message_info_new):
- (message_info_load):
- (message_info_save):
- (camel_message_info_dup_to):
- (camel_message_info_free): Added support for arbitrary tag/value
- pairs (CamelTag's).
- (camel_tag_get):
- (camel_tag_set):
- (camel_tag_list_size):
- (camel_tag_list_free): Operations for working with CamelTags.
-
-2000-08-09 Peter Williams <peterw@helixcode.com>
-
- * camel-store.c (camel_store_get_folder): Connect beforehand, if
- necessary.
-
- * providers/imap/camel-imap-store.c (camel_imap_store_init): Default
- the dir_sep to "/" so that certain functions can safely assume that
- dir_sep is valid (at least, nonnull).
-
-2000-08-09 Ettore Perazzoli <ettore@helixcode.com>
-
- * providers/nntp/camel-nntp-folder.c
- (nntp_folder_set_message_flags): Get rid of an unused variable.
-
- * providers/nntp/Makefile.am (INCLUDES): Fix includes so that we
- don't use installed headers anymore. [I copied this over from the
- IMAP provider, that does not seem to have this problem.]
-
-2000-08-09 Not Zed <NotZed@HelixCode.com>
-
- * camel-folder-search.c (camel_folder_search_execute_expression):
- Reorder search result in summary order if we searched with a
- summary.
-
-2000-08-08 Dan Winship <danw@helixcode.com>
-
- * camel-uid-cache.c: New code to keep an on-disk cache of what
- UIDs have been seen in a folder.
-
- * camel-provider.h: Add new flags CAMEL_PROVIDER_IS_SOURCE (mail
- can arrive in it by non-Camel means) and CAMEL_PROVIDER_IS_STORAGE
- (you can work with mail directly without needing to copy it local).
-
- * providers/*/camel-*-provider.c: Add flags as needed: imap and
- mbox are SOURCE and STORAGE. mh and nntp are just STORAGE, pop3 is
- just SOURCE.
-
- * camel-mime-message.c (process_header): Add another subject
- g_strstrip that fejj's earlier commit missed.
-
-2000-08-08 Peter Williams <peterw@helixcode.com>
-
- * camel-provider.h: Remove some GTK stuff that I missed.
-
- * providers/imap/camel-imap-store.c (imap_noop): Turn this
- back on with the new timeout interface in CamelSession.
-
- * camel-session.[ch] (camel_session_register_timeout): New
- interface for Camel to register timeouts. Basically the
- GTK timeout interface is copied. We do this because Camel isn't
- allowed to use GTK anymore.
-
-2000-08-07 Not Zed <NotZed@HelixCode.com>
-
- * providers/mh/camel-mh-folder.c (mh_append_message): Only retry
- another uid if we had a name clash, otherwise fail.
-
-2000-08-07 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-folder.c
- (imap_get_subfolder_names_internal): If we are trying to get a
- subfolder listing of the root folder, always make sure INBOX is
- there...
-
- * providers/imap/camel-imap-utils.c (imap_parse_list_response):
- Check for NIL as a directory separator.
-
-2000-08-07 Peter Williams <peterw@helixcode.com>
-
- * providers/nntp/Makefile.am: Reorder the INCLUDES to pull
- in the camel headers from the local source tree before
- the ones in $(includedir). This was causing compile problems
- because the installed, Gtk-based camel-object.h was included
- before the uninstall Camel-based one.
-
-2000-08-07 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-utils.c (imap_translate_sexp): Strip
- all \n's from the expression
-
- * string-utils.c (strip): New convenience function to strip
- occurences of a single char from a string
-
- * camel-mime-message.c (camel_mime_message_set_subject): Do a
- g_strstrip on the subject so we can stop getting those annoying
- leading spaces
-
-2000-08-07 Dan Winship <danw@helixcode.com>
-
- * camel-folder.c (camel_folder_free_deep): Fix this to not require
- NULL-termination of the array.
-
-2000-08-04 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-store.c (imap_connect): If we fail to
- get a dir_sep, then supply the default of "/".
- (get_folder): Undo changes by Peter
-
-2000-08-04 Peter Williams <peterw@helixcode.com>
-
- * providers/imap/camel-imap-store.c (get_folder): Prevent a coredump
- when get_folder()ing from a store with dir_sep = NULL.
-
-2000-08-04 Peter Williams <peterw@helixcode.com>
-
- * camel-store.h: Include camel-object.h. Ettore said this wasn't
- compiling.
-
-2000-08-04 Not Zed <NotZed@HelixCode.com>
-
- * camel-url.c (camel_url_set_protocol):
- (camel_url_set_host):
- (camel_url_set_path):
- (camel_url_set_port): Url editing functions.
-
-2000-08-04 Dan Winship <danw@helixcode.com>
-
- * providers/pop3/camel-pop3-folder.c (pop3_set_message_flags):
- (pop3_sync): Indexes into the flags array are message_number minus
- 1, not just message_number.
-
- * providers/pop3/camel-pop3-store.c: add a debugging macro for
- doing protocol tracing.
-
-2000-08-03 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Only
- call imap_get_summary_internal if the folder can hold messages
-
- * providers/nntp/camel-nntp-provider.c (camel_provider_module_init):
- Initialize the service_cache for the news/nntp providers
-
-2000-08-03 Peter Williams <peterw@helixcode.com>
-
- * providers/nntp/Makefile.am (INCLUDES): Add -I$(top_srcdir) to
- pull in libibex/ibex.h
-
-2000-08-02 Not Zed <NotZed@HelixCode.com>
-
- * providers/mh/camel-mh-summary.c (camel_mh_summary_sync): Expunge
- from the end, so the index isn't messed up when you remove a
- message.
-
- * providers/mh/camel-mh-folder.c (mh_append_message): Fix a bug
- where it would never open an output file/uid.
-
- * providers/mbox/camel-mbox-store.c (rename_folder):
- Implementation for mbox as well.
-
- * camel-store.c (camel_store_rename_folder): New method to rename folders.
- (rename_folder): Default implementation.
-
- * providers/mh/camel-mh-store.c (delete_folder): Implement this.
- (rename_folder): Implement a rename operation.
-
-2000-08-02 Dan Winship <danw@helixcode.com>
-
- * providers/MH: Kill this. It doesn't have any code to do anything
- the new mh provider doesn't do better.
-
- * providers/Makefile.am: Remove reference to MH subdir, and
- promote nntp to fully-supported status, since it does compile and
- all.
-
- * camel-mime-message.c (camel_mime_message_set_subject): Trim
- trailing space from the subject. I've now seen replies from two
- different people that tricked the threading code by (a) not having
- References/In-Reply-To, and (b) adding an extra space to the end
- of the subject line so the subject-based threading fails too. Who
- writes these broken mailers anyway?
-
-2000-08-01 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/smtp/camel-smtp-transport.c (smtp_helo): When forced
- to use the IP, place it in square brackets.
-
- * providers/imap/camel-imap-utils.c (imap_translate_sexp): New and
- improved sexp parser. An honest try at using e-sexp is wrapped in
- a #ifdef at the bottom of the file but is currently not used
-
- * providers/imap/camel-imap-folder.c (imap_search_by_expression):
- We want to do a UID SEARCH so we get UIDs back instead of sequence
- numbers
-
-2000-08-01 Not Zed <NotZed@HelixCode.com>
-
- * providers/mh: New mh provider implementation.
-
- * providers/Makefile.am (SUBDIRS): Added mh provider.
-
-2000-07-31 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-folder.c (imap_get_message_info_internal):
- Some IMAP servers don't wrap the UID in ()'s so don't depend on that
- (imap_get_summary_internal): Same
-
- * providers/imap/camel-imap-utils.c (free_sexp_node): Oops, forgot to
- free node->function - not good.
-
-2000-07-31 Peter Williams <peterw@helixcode.com>
-
- * providers/vee/camel-vee-folder.c (vee_search_by_expression): Add
- a NULL to the matches pointer array so that g_strfreev knows where
- the end is.
-
-2000-07-31 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-utils.c (imap_translate_sexp): New
- convenience function to translate a Camel sexp into the equivalent
- IMAP sexp.
-
- * providers/imap/camel-imap-store.c: More places now use
- imap_next_word
-
- * providers/imap/camel-imap-folder.c (imap_search_by_expression):
- Implemented initial version (this may or may not work quite right)
-
-2000-07-28 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-folder.c (imap_expunge): Make sure
- the third word/token (whatever) is "EXPUNGE" and not something
- else like "EXISTS" or "RECENT". When removing the message from
- the summary also make sure to free that data to avoid leakage.
- Also make sure to subtract 1 from the 'id' since IMAP starts
- at 1 and our summary starts at 0 :-)
-
-2000-07-28 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-store.c (camel_imap_status): Cleaned
- up a bit, now uses imap_next_word()
- (camel_imap_command_extended): Now uses imap_next_word(). When
- checking for RECENT, allow the first digit of the recent-count
- be between 0 and 9 inclusive instead of exclusive.
-
- * providers/imap/camel-imap-folder.c (imap_expunge): Optimized.
- No longer will it need to reload the summary as it now instead
- removes the appropriate message summaries from the cache.
- (camel_imap_folder_changed): If recent == 0 then return. If
- recent < 0 then just emit the folder_changed signal, don't reload
- summaries.
-
-2000-07-28 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-folder.c
- (imap_get_message_count_internal): Get message count when STATUS
- is not available.
- (imap_init): folder->has_search_capability is required for IMAP so
- should always be set to TRUE (is currently being set to FALSE as
- I've not yet implemented SEARCH support).
- (camel_imap_folder_changed): Seem to have fixed my optimization
- hack
-
-2000-07-28 Jon K Hellan <hellan@acm.org>
-
- * providers/imap/camel-imap-store.h (CamelImapServerLevel): New
- enum.
- (CamelImapStore): Added server_level and has_status_capability
- members.
-
- * providers/imap/camel-imap-store.c (imap_connect): Detect
- IMAP4REV1, IMAP4 and STATUS in capability response.
-
- * providers/imap/camel-imap-folder.c
- (imap_get_message_count_internal): Use STATUS only if server
- supports it. TODO: Get message count when STATUS not supported.
- (imap_get_message, imap_get_summary_internal,
- imap_get_message_info_internal): Handle IMAP4 as well.
- (imap_protocol_get_summary_specifier): New function: Make a data
- item specifier for the header lines we need, appropriate to the
- server level.
-
-2000-07-27 Peter Williams <peterw@helixcode.com>
-
- * camel-mime-utils.c (header_decode_lwsp): More
- checks for end of string.
-
- * providers/imap/camel-imap-store.c:
- (imap_command_extended): Free the elements of our
- array (huge mem leak)
-
- * providers/imap/camel-imap-folder.c:
- (summary_get_internal): Same as above.
-
-
-2000-07-27 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
- Fixed my routine to only fetch new headers, my IDs were off by 1
- on the high end, so when it would fetch the last newly arrived
- message it would fail and end up fetching all of the summaries
- because of the corruption.
-
-2000-07-27 Jeffrey Stedfast <fejj@helixcode.com>
-
- * camel-url.c (camel_url_to_string): If the path doesn't begin
- with a / and there is a host, prepend a / to the path.
-
-2000-07-27 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/Makefile.am: Added camel-imap-utils.[c,h]
-
- * providers/imap/camel-imap-utils.[c,h]: Utilities for parsing
- server responses for use in both camel-imap-store.c and
- camel-imap-folder.c
-
- * providers/imap/camel-imap-folder.c (imap_get_summary_internal):
- Free all the pointers in the headers array.
- (imap_get_subfolder_names_internal): Updated to use
- imap_parse_list_response
- (imap_parse_subfolder_list): Removed in favor of
- imap_parse_list_response
-
- * providers/imap/camel-imap-store.c (camel_imap_command_extended):
- Free all the pointers in the data array.
- (imap_connect): Updated to use imap_parse_list_response and fixed
- a leak
- (folder_is_selectable): Updated.
-
-2000-07-27 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-folder.c (imap_get_message_info): Now
- uses a hash table for looking up message info rather than a linear
- search :)
-
-2000-07-27 Peter Williams <peterw@helixcode.com>
-
- * providers/*/Makefile.am: Don't specify SUBDIRS =
- [nothing]. Messes up distcheck.
-
-2000-07-26 Peter Williams <peterw@helixcode.com>
-
- * camel-mime-parser.c (folder_scan_init): Initialize
- outbuf to be "" -- it's not guaranteed to be zeroed.
-
- * camel-mime-utils.c (header_references_decode): Return
- if the header is NULL -> or "" <-. Don't do our stupid
- mailer trick if we point to \0.
- (header_decode_quoted_string): Don't rip past end of
- string!
-
-2000-07-26 Dan Winship <danw@helixcode.com>
-
- * camel-movemail.c (movemail_external): routine to call an
- external movemail program.
- (camel_movemail): Nuke return value, use movemail_external when
- available and useful, and don't delete "dest" on errors, since
- it might have started non-empty.
-
-2000-07-26 Jeffrey Stedfast <fejj@helixcode.com>
-
- * camel-url.c (camel_url_to_string): Should now always prepend a '/'
- before the path if it doesn't already exist.
-
- * providers/imap/camel-imap-folder.c: Fixed a few compiler warnings
-
-2000-07-25 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-folder.c (imap_summary_free): Fixed the
- real problem that Peter was running into.
-
-2000-07-25 Dan Winship <danw@helixcode.com>
-
- * camel-mime-message.c (write_to_stream): Don't add a Mime-Version
- header to a message that already has one.
-
- * camel-internet-address.c (internet_encode): Don't put <>s around
- addresses with no name part.
-
-2000-07-25 Peter Williams <peterw@helixcode.com>
-
- * providers/imap/camel-imap-folder.c (imap_expunge): Set
- imap_folder->summary to NULL after calling imap_summary_free,
- so we don't get stuck with a junk summary pointer. Should
- we free it at all?
-
-2000-07-25 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
- Optimized to try and get the new message headers without reloading
- the entire summary from scratch.
- (imap_get_summary_internal): Will now sync() before attempting to
- reload the summary so that flags are set in the reloaded summary
- as well.
-
-2000-07-24 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-store.c (get_folder): Updated to give
- special attention to the root folder.
-
- * providers/imap/camel-imap-folder.c
- (imap_get_subfolder_names_internal): Updated to handle the root
- folder
- (imap_get_message_count_internal): return 0 if folder can't hold
- messages
- (camel_imap_folder_new): Change so that root folder gets special
- attention and always gets can_hold_messages set to FALSE
-
-2000-07-24 Dan Winship <danw@helixcode.com>
-
- * camel-folder.c: Remove exceptions from a number of methods that
- work on what ought to be static data: get_parent_folder,
- get_parent_store, get_message_count, get_unread_message_count,
- get_permanent_flags, get_message_flags, set_message_flags,
- get_message_user_flag, set_message_user_flag, get_uids,
- get_summary, get_subfolder_names. Turn camel_folder_delete_message
- into a macro. (Mostly a pull-up from the camel-async branch.)
-
- * providers/{imap,mbox,nntp,pop3,vee}: Update for CamelFolder
- changes
-
-2000-07-24 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-folder.c (imap_get_message_info): Updated
- to port easily to the new Camel API
- (imap_init): Don't SELECT INBOX, we don't need to do that
-
-2000-07-24 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-folder.c (camel_imap_folder_new):
- Initialize the summary and subfolder listing.
- (imap_summary_free): Now takes a GPtrArray arg rather than a
- CamelImapFolder as it increases it's usefullness for free()'ing
- temporary summaries.
- (imap_get_message_count_internal): A new convenience function for
- getting the actual message count on a server to be used by
- imap_get_summary_internal)
- (imap_get_message_count): Since the Camel API is on the move again,
- the future version of this function will not be able to make a
- call to the store, it must only access previously fetched data (thus
- the creation of the _internal function)
- (imap_get_subfolder_names_internal): Again, because the future version
- of imap_get_subfolder_names will not take an exception, we must rename
- this function which will be called by camel_imap_folder_new()
- (imap_get_subfolder_names): We now return the previously collected
- subfolder listing that the _internal function fetched previously
- (imap_get_summary_internal): Again, same idea as the previous _internal
- functions...
- (imap_get_summary): Again... now returns a previously aquired summary
-
- * providers/imap/camel-imap-store.c (imap_noop): This will hopefully
- prevent the imap store from disconnecting.
- (imap_connect): Modified to add a gtk timeout event that will call
- imap_noop() every 10 minutes (we may want to change this time value)
- (imap_disconnect): Modified to remove the NOOP timeout event from the
- store.
- (camel_imap_command_extended): Commented out the code that would try
- and detect if the store was disconnected and then reconnect if it was
- needed.
-
-2000-07-24 Dan Winship <danw@helixcode.com>
-
- * camel-folder.[ch]: Remove camel_folder_get_message_uid, which
- was not used, and not implemented by any provider.
-
- * providers/nntp/camel-nntp-folder.c: Remove get_message_uid
- non-implementation.
-
- * camel-folder-pt-proxy.[ch], camel-arg-collector.c,
- camel-marshal-utils.[ch]: Bye bye bye.
-
- * Makefile.am: remove reference to camel-arg-collector.c
-
-2000-07-23 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-store.c (imap_disconnect): Made it a
- little more forgiving. Also set current_folder to NULL as there is
- no selected folder after a disconnect.
- (stream_is_alive): Detects whether or not a socket is "alive"
- (camel_imap_command_extended): Use stream_is_alive() to aid in the
- detection of a disconnected state.
-
-2000-07-22 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-store.c (get_folder): Clear
- CamelExceptions when appropriate (eg when folder is marked as
- \NoSelect). Still needs some cleanup and perhaps Dan will have a
- better way of doing this as this seems like a messy way of
- handling this.
-
- * providers/imap/camel-imap-folder.c (imap_get_uids): Took out
- some debug statements as they are no longer needed.
-
-2000-07-21 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-folder.c (imap_get_subfolder_names):
- Updated to not strip out subfolders that are marked as \NoSelect
- because this will be correctly handled in store->get_folder from
- now on.
-
- * providers/imap/camel-imap-store.c (folder_is_selectable): New
- convenience function for use in get_folder().
- (parse_list_response): Now takes a char **flags argument which is
- needed by folder_is_selectable().
- (imap_connect): Updated to reflect changes to
- parse_list_response().
-
-2000-07-21 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-stream.c (stream_read): Updated with
- some of the same fixes I've made to camel-imap-folder.c like
- recalculating message part lengths.
-
- * providers/imap/camel-imap-store.c (camel_imap_command_extended):
- Rewrote the code to check for "* %d RECENT". Still needs to be
- modified, but should no longer cause an infinite loop by detecting
- mis-detecting RECENT messages.
-
-2000-07-20 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-folder.c (imap_get_summary):
- (imap_get_message_info): Oops. Fix UID parser to allow 0 and 9 to
- be in the range of valid UID chars.
-
-2000-07-20 Peter Williams <peterw@helixcode.com>
-
- * camel-object.c (camel_object_unref): Add a new global mutex
- 'refcount' held when refcounting operations occur.
-
-2000-07-19 Peter Williams <peterw@helixcode.com>
-
- * camel-object.c (camel_type_lock_up): Correct the recursiveness;
- the locklevel is stored as a private, so each thread has its own
- idea of the locklevel. Thus one thread can relock, but a different
- one will think that it's a level 0 and try to lock the type_system
- mutex.
-
-2000-07-19 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-folder.c: General cleanup working
- towards getting Actions->Expunge working correctly.
-
- * providers/imap/camel-imap-store.c
- (cammel_imap_command_extended): Added code to look for "* %d
- RECENT" and to emit the folder_changed signal if there are any
- recent messages. Note: this is a hack and needs to be rewritten
- badly.
-
-2000-07-19 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-folder.c (imap_get_summary): If the
- folder's message count is not the same as the number of summaries,
- free the old summary and create a new summary.
-
-2000-07-18 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-folder.c
- (camel_imap_folder_class_init): Added in
- imap_[g,s]et_message_user_flag() methods
- (imap_get_message_info): Rewrote to use the more efficient way of
- downloading summary information and also added a UID comparison so
- that if the UID requested doesn't match the UID received, it
- returns NULL. FIXME: When the mailer gets NULL when it requested
- message info, it seems that it displays a row for that message and
- when you try and select the blank row, it segfaults.
-
- * providers/imap/camel-imap-store.c (get_folder): Oops, this
- should not be checking against "/", it should be checking against
- dir_sep.
-
- * providers/imap/camel-imap-folder.c (imap_parse_subfolder_line):
- Updated to trim out the leading namespace.
- (imap_get_subfolder_names): Let the subfolder parser trim the
- namespace off the folder name.
-
-2000-07-17 Peter Williams <peterw@helixcode.com>
-
- * camel-object.c (camel_type_lock_up): New function; the
- Camel type_system lock is now fakey-recursive, being controlled
- by a semaphore that goes up and down and is protected by another
- lock. Theoretically all we need is the lock on the semaphore,
- but this we catch exceptions "better" (by deadlocking).
- (camel_type_lock_down): Corresponding to above.
- (all functions): s,G_LOCK,camel_type_lock_up, etc.
-
-2000-07-17 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-store.c (imap_disconnect): Send a
- "LOGOUT" command.
-
- * providers/imap/camel-imap-folder.c (imap_get_message): Hacks to
- get IMAP code to work with CommunigatePro and MS Exchange (and any
- other servers that send back a UID at the end of each FETCH inside
- of the main body of the message part).
- (imap_sync): Un-#if 0 the code that sets the flags on the IMAP
- server for messages that have changed. Oops, don't mask with
- DELETED to find out if the message has been answered ;-)
- (imap_expunge): sync before expunging.
-
-2000-07-16 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-store.c: All SELECT calls now pass
- a NULL folder argument to camel_imap_command_extended() since it's
- not needed.
- (imap_connect): Moved service_class->connect() to the point right
- after a connection is established with the server rather than
- waiting until the end of the function.
- (camel_imap_command): Updated the documentation comment
- (camel_imap_command_extended): Before sending a command, first
- check to make sure we are connected; if we aren't, then reconnect.
- Don't strncmp() command with "SELECT" as it's redundant.
-
- * providers/imap/camel-imap-folder.c: All SELECT calls now pass
- a NULL folder argument to camel_imap_command_extended() since it's
- not needed. Also s/camel_imap_command/camel_imap_command_extended as
- I will probably be doing away with camel_imap_command() or at least
- only using it for LOGIN and similar commands where the server won't
- notify us of any recent messages.
-
-2000-07-15 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-folder.c (camel_imap_folder_new):
- One last fix to get rid of hard-coded "/" directory separators
-
-2000-07-14 Peter Williams <peterw@helixcode.com>
-
- * camel-object.c : Implement 'events', which are suspiciously
- like signals except without all the marshalling baggage, and
- with quasi-thread-safety.
- (camel_object_class_declare_event): New func.
- (camel_object_hook_event): Ditto.
- (camel_object_trigger_event): Ditto.
- (obj_class_init): Declare the "finalize" event.
- (obj_class_finalize): Free the hashtable of events->preps
- (obj_finalize): Free the hashtable of events->hooklists
- (camel_object_unref): Trigger the finalize event (ourselves,
- to prevent massively unpleasant looping things.)
-
-2000-07-14 Peter Williams <peterw@helixcode.com>
-
- * camel-object.c (make_global_classfuncs): Change to return
- a CamelObjectClass. Change parents to a GSList and free it
- when done.
- (camel_object_new): Don't allocate a classfuncs for every object;
- merely give it a reference to the global_classfuncs. Convert
- parents to a GSList and free it when done.
- (camel_object_unref): Don't free the classfuncs. Free the parents
- list, which is changed to a GSList.
-
-2000-07-14 Jeffrey Stedfast <fejj@helixcode.com>
-
- * string-utils.c (string_unquote): New convenience function
- to unquote a string if it's encapsulated by "'s
-
- * providers/imap/camel-imap-folder.c:
- * providers/imap/camel-imap-store.c: Made the necessary changes
- to stop using hard coded directory separators.
-
-2000-07-13 Dan Winship <danw@helixcode.com>
-
- * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_load):
- If the summary is for a smaller mbox, and rebuilding from the
- last-known end position fails, try rebuilding from the beginning.
- Deals with the case where the user edits the mbox and makes it
- bigger, without adding new messages.
-
-2000-07-13 Peter Williams <peterw@helixcode.com>
-
- * camel-object.c: Rewritten to not be based on GtkObject,
- but a tiny threadsafe ripoff thereof. Objects still cannot
- be shared across threads, but ref/unref/destroy/new/etc
- will work. Signals are not implemented because doing it
- robustly would be a major pain in the butt, but class
- functions are. There's a small demonstration that it doesn't
- crash in ./temp-test.c: build it with ./make-test.sh.
- * camel-stream.c, camel-seekable-stream.c, camel-stream-mem.c:
- moved over to CamelObject. Proof of concept: two levels of
- subclass and class functions, all working without coredumps.
- To port to CamelObject:
- - s,GTK_,CAMEL_,g in the cast checks
- - s,gtk_type_new,camel_object_new,g
- - s,GtkType,CamelType,g
- - Change get_type function over to camel_type_declare
- - instead of hooking to finalize function, it goes into the
- type declaration.
- - remove signals.
- - instead of GTK_OBJECT(so)->klass, CAMEL_OBJECT_GET_CLASS(so)
- - s,gtk_type_class,camel_type_get_global_classfuncs,g
- - don't chain finalize handlers; it will be done for you
-
-2000-07-13 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-folder.c:
- * providers/imap/camel-imap-store.c: If a SELECT fails, set
- imap_store->current_folder to NULL so a SELECT is forced before
- any message/folder operations are requested. Also, because some
- users don't use a namespace, make sure that if the url->path is
- "/" we don't use it when creating the folder_path.
- (camel_imap_command[_extended]): Since we allow the passing of
- a NULL folder which we can use to bypass a forced SELECT, no need
- to check for the individual commands that don't require a folder
- to be selected.
-
-2000-07-13 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-folder.c:
- * providers/imap/camel-imap-store.c: Updated to use CAMEL_IMAP_OK,
- CAMEL_IMAP_NO, CAMEL_IMAP_BAD, and CAMEL_IMAP_FAIL rather than the
- ones copied from the POP3 provider.
-
-2000-07-13 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-folder.c (imap_get_summary): Oops.
- If the number of messages in the folder is 0, don't fetch
- summaries 1 thru 0, just return an empty summary.
- (imap_copy_message_to): Fixed to use message UID and also send
- the source folder as an arg to camel_imap_command rather than NULL.
- (imap_move_message_to): Same.
- (imap_init): If SELECT is successful, we need to set the current
- folder to the one selected, this was causing problems with move/copy
-
-2000-07-13 Dan Winship <danw@helixcode.com>
-
- * camel-service.h: define a set of CAMEL_SERVICE_URL_ALLOW_* flags
- parallel to the _NEED_* flags, and make the _NEED_* flags imply
- the _ALLOW_* ones.
-
- * providers/imap/camel-imap-store.c (camel_imap_store_init): imap
- urls ALLOW_PATH
-
-2000-07-13 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-folder.c (imap_get_summary): New
- and improved approach to fetching an entire folder summary
- that should be much much faster than the old way as it gets
- the entire folder summary in 1 shot rather than requesting
- message by message. As with the last update, this version
- also only fetches the minimum number of header fields.
- (imap_get_summary): Oops, forgot to free the temp
- GPtrArray *headers
-
-2000-07-13 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-folder.c (imap_get_summary): Don't
- fetch the entire RFC822 header, just fetch the fields we want.
- (imap_get_message_info): Same.
-
-2000-07-13 Not Zed <NotZed@HelixCode.com>
-
- * camel-mime-filter-basic.c (camel_mime_filter_basic_new_type):
- Reset filter on setup.
- (reset): When resetting qp encoding, set the state to -1, instead
- of 0.
-
- * camel-mime-utils.c (quoted_encode_step): Actually count the
- characters output sofar (it never counted any). Bunch of other
- fixes.
- (quoted_encode_close): Also flush out final character, if there's
- one.
-
-2000-07-12 Jeffrey Stedfast <fejj@helixcode.com>
-
- Chris forgot to add #include <e-util/e-util.h> to the source files
-
- * providers/imap/camel-imap-store.c (imap_connect): Fixed Peter's
- fix, we don't want to send a string to a %d.
-
-2000-07-12 Christopher James Lahey <clahey@helixcode.com>
-
- * camel-folder-search.c, providers/imap/camel-imap-store.c:
- Changed from strstrcase to e_strstrcase.
-
- * string-utils.c, string-utils.h: Removed strstrcase (in favor of
- e_strstrcase in e-util/e-util.c.)
-
-2000-07-12 Chris Toshok <toshok@helixcode.com>
-
- * providers/nntp/camel-nntp-folder.c
- (nntp_folder_set_message_flags): get the article num out of our
- uid and mark it read in the newsrc.
- (nntp_folder_get_message): get the message id out of the uid to
- fetch the article.
-
- * providers/nntp/camel-nntp-utils.c (get_XOVER_headers): the uid
- is now <article-num>,<messageid>
- (get_HEAD_headers): same.
-
- * camel-mime-parser.c (folder_scan_step): go to HSCAN_MESSAGE
- state when ct->subtype is "news" as well as "rfc822". this makes
- attachments of type "message/news" display properly.
-
-2000-07-12 Dan Winship <danw@helixcode.com>
-
- * camel-folder.c (camel_folder_free_deep,
- camel_folder_free_shallow, camel_folder_free_nop): Useful default
- implementations for free_{uids,subfolder_names,summary}.
- (free_subfolder_names, free_uids): Make these g_warning-ing
- default implementations.
-
- * providers/*/camel-*-folder.c: Use the new functions where
- appropriate, remove duplicated code.
-
-2000-07-12 Peter Williams <peterw@helixcode.com>
-
- * providers/imap/camel-imap-store.c (query_auth_types): Check for
- NULL parameters when setting the exception so as to not crash on
- Solaris (can't handle a %s passed NULL).
- (imap_connect): Same.
-
-2000-07-12 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/mbox/camel-mbox-folder.c (mbox_delete_message): Use
- mbox_set_message_flags () instead of setting the flags by hand. This
- fixes the problem of the "message_changed" signal not being emitted
- at the correct time.
-
- * providers/imap/camel-imap-folder.c: "folder_changed" signals should
- pass a third argument (which is ignored).
-
- * camel-folder.c: Undo gtk signal emits done in set_flags and
- expunge.
- (move_message_to):
- (copy_message_to): Create info as a const CamelMessageInfo
-
-2000-07-12 Chris Toshok <toshok@helixcode.com>
-
- * providers/nntp/Makefile.am: don't add test-newsrc to the build
- since it needs libcamel (which isn't built at the time test-newsrc
- needs linking.)
-
- * providers/nntp/camel-nntp-utils.c (get_HEAD_headers): fill in
- MessageInfo->message_id.
- (get_XOVER_headers): same.
-
- * providers/nntp/camel-nntp-folder.c (nntp_folder_init): move
- summary loading here.
- (nntp_folder_sync): summary/newsrc changes should be stored here.
- put a comment to that effect.
- (nntp_folder_set_message_flags): don't save the newsrc here.
- (nntp_folder_get_uids): use g_ptr_array_index instead of the
- cast/addition.
- (nntp_folder_get_summary): no need to check if we should generate
- the summary here. already done.
- (nntp_folder_get_message_info): implement.
-
- * providers/nntp/camel-nntp-store.c
- (camel_nntp_store_get_toplevel_dir): use evolution_dir instead of
- computing it ourselves.
- (nntp_store_disconnect): call camel_nntp_newsrc_write.
- (ensure_news_dir_exists): new function to create the news/<news
- server> subdir.
- (camel_nntp_store_class_init): hook up connect/disconnect and
- finalize.
- (nntp_store_connect): if ensure_news_dir_exists fails throw an
- exception.
-
-2000-07-12 Peter Williams <peterw@helixcode.com>
-
- * camel-folder.c (camel_folder_set_message_flags): Emit a message_changed
- signal once the flags are set on the message.
- (camel_folder_set_user_flag): Ditto.
- (camel_folder_expunge): Emit a folder_changed if no exception.
-
-2000-07-12 Jeffrey Stedfast <fejj@helixcode.com>
-
- * camel-stream.c: Use size_t and ssize_t for read/write methods
-
- * providers/imap/camel-imap-folder.c (imap_set_message_flags):
- Updated to emit the message_changed signal.
- (imap_delete_message): Updated to use imap_set_message_flags ().
- (imap_move_message_to): Updated to use imap_set_message_flags ()
- and to emit the folder_changed signal on the destination folder.
- (imap_copy_message_to): Updated to emit the folder_changed signal
- on the destination folder.
- (imap_append_message): Updated to emit the folder_changed signal
- on the destination folder.
-
-2000-07-11 Jeffrey Stedfast <fejj@helixcode.com>
-
- * camel-folder.c (camel_folder_append_message): Now takes a
- flags argument to specify the flags to be set on the message
- since we might not necessarily want the flags to be wiped clean.
- (move_message_to):
- (copy_message_to): Updated to send a flags argument to
- append_message (); currently sends the original message's flags.
-
- * providers/mbox/camel-mbox-folder.c (mbox_append_message):
- * providers/imap/camel-imap-folder.c (imap_append_message):
- Updated.
-
-2000-07-11 Dan Winship <danw@helixcode.com>
-
- * camel-folder.c: Remove exceptions from a number of methods
- that work on what ought to be static data: get_parent_folder,
- get_parent_store, get_message_count, get_unread_message_count,
- get_permanent_flags, get_message_flags, set_message_flags,
- get_message_user_flag, set_message_user_flag, get_message_uid,
- get_uids, get_summary, get_subfolder_names. Turn
- camel_folder_delete_message into a macro.
-
- * providers/{mbox,pop3,vee}: Update for CamelFolder changes
-
- * providers/Makefile.am: Disable imap and nntp for now
-
-2000-07-11 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-folder.c (imap_search_by_expression):
- This shouldn't return NULL, it should return g_ptr_array_new ()
- so the mailer gets what it expects.
-
-2000-07-10 Jeffrey Stedfast <fejj@helixcode.com>
-
- * camel-folder-summary.c (camel_folder_summary_decode_string):
- Oops, an unsigned integer can never be < 0
-
-2000-07-10 Dan Winship <danw@helixcode.com>
-
- * providers/vee/camel-vee-folder.c (vee_search_by_expression):
- Initialize a variable to make this not crash again. And fix a bug
- so it actually does something.
-
-2000-07-10 Jeffrey Stedfast <fejj@helixcode.com>
-
- * camel-folder-summary.c: Cleaned up a bunch of compile warnings
-
-2000-07-10 Dan Winship <danw@helixcode.com>
-
- * providers/vee: kill more debugging messages
-
-2000-07-10 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/mbox/camel-mbox-folder.c (mbox_get_unread_message_count):
- * providers/vee/camel-vee-folder.c (vee_get_unread_message_count):
- * providers/imap/camel-imap-folder.c (imap_get_unread_message_count):
- Implemented.
-
- * camel-folder.c (camel_folder_get_unread_message_count): New
- convenience function to allow the mailer to query the number
- of unread messages in a folder (for displaying message stats
- in a folder tree?).
-
-2000-07-09 Dan Winship <danw@helixcode.com>
-
- * camel-mime-utils.c (header_references_dup): New function to copy
- a header_references structure.
-
- * camel-folder-summary.c (camel_message_info_dup_to): New function
- to (deep) copy the data from one CamelMessageInfo into another.
- (camel_message_info_free): And free the data.
-
- * providers/vee/camel-vee-folder.c (vee_sync): Implement. (empty).
- (vee_search_by_expression): belatedly update for
- camel_folder_search change.
- (vee_folder_build): belatedly update for camel_folder_search
- change. Use camel_message_info_dup_to and camel_message_info_free
- (in particular, so that we get message_id and references info so
- vfolders can be threaded).
- (vee_folder_build_folder): Ditto.
-
-2000-07-08 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/nntp/camel-nntp-folder.c:
- * providers/nntp/camel-nntp-utils.c:
- * providers/nntp/camel-nntp-store.c: Update to reflect past changes
- in the Camel API. Use gtk macro casts wherever possible and use glib's
- memory functions instead of standard c's (since they are not
- compatable)
-
- * providers/smtp/camel-smtp-transport.c:
- * providers/imap/camel-imap-store.c: Wrap debug print statements
- in a macro
-
- * providers/imap/camel-imap-stream.c (stream_read): Make sure
- that we get up to and including the last \n of the mime part.
-
- * providers/imap/camel-imap-folder.c (imap_get_message): Make sure
- that we get up to and including the last \n of the mime part.
- Wrap debug print statements in a macro.
-
- * providers/imap/camel-imap-stream.c (stream_read): Only cache
- the important data (aka the mime part requested and no extra
- server response stuff)
-
-2000-07-07 Dan Winship <danw@helixcode.com>
-
- * camel-mime-utils.c (header_references_decode): Work around
- In-Reply-To's with unquoted punctuation. So many broken mailers.
-
- * camel-folder.c (camel_folder_search_by_expression): Make this
- return a GPtrArray rather than a GList.
-
- * camel-folder-search.c (camel_folder_search_execute_expression):
- * providers/imap/camel-imap-folder.c (imap_search_by_expression):
- * providers/mbox/camel-mbox-folder.c (mbox_search_by_expression):
- * providers/nntp/camel-nntp-folder.c (nntp_search_by_expression):
- Update to return a GPtrArray rather than a GList.
-
-2000-07-07 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/smtp/camel-smtp-transport.c (esmtp_get_authtypes):
- Fixed the parser to actually work
-
-2000-07-06 Dan Winship <danw@helixcode.com>
-
- * camel-mime-utils.c (header_references_decode): Make this deal
- with the full RFC822 References/In-Reply-To format rather than
- just the more-nicely-behaved RFC1036 version. (Needed to parse
- In-Reply-To headers with extra junk in them.)
-
-2000-07-06 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-folder.c (imap_get_summary): Parse for
- more header information to allow message threading in IMAP.
- (imap_get_message_info): Same.
-
- * camel-folder-summary.c: Renamed summary_format_* to
- camel_summary_format_* and moved them into public scope.
-
- * providers/smtp/camel-smtp-transport.c (smtp_connect): Oops. Don't
- pass port # as a string in the error code (if it fails to connect).
-
- * providers/imap/camel-imap-folder.c (imap_append_message): Changed
- over to camel_imap_command_extended as that was the source of the
- problems - apparently appending replies with more than just 1 line.
-
-2000-07-05 Dan Winship <danw@helixcode.com>
-
- * camel-folder-search.c (search_header_contains): make header
- matching case-insensitive
-
- * camel-folder-summary.c:
- * camel-session.c:
- * providers/mbox/camel-mbox-folder.c:
- * providers/mbox/camel-mbox-summary.c: Remove some non-error case
- debugging-type messages.
-
-2000-07-05 Ettore Perazzoli <ettore@helixcode.com>
-
- * providers/mbox/camel-mbox-summary.c (d): Define to empty so that
- we get rid of a ton of debugging messages.
-
-2000-07-05 Jeffrey Stedfast <fejj@helixcode.com>
-
- * camel-mime-utils.h: Added prototype for uudecode_step
-
- * camel-mime-utils.c (uudecode_step): Cleaned up some junk that
- should have been cleaned up when debugging printf's were taken out.
-
-2000-07-05 Ettore Perazzoli <ettore@helixcode.com>
-
- * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_sync):
- Update the X-Evolution: header even if the in-memory UID and the
- saved UID are not the same. Otherwise mboxes with clashing UIDs
- can never be fixed.
-
- * camel-folder-summary.c
- (camel_folder_summary_add_from_parser): Add the message to the
- summary before doing any ibex stuff. In fact, this might also
- have the side effect of reassigning the UID so it needs to be done
- before we start using the UID.
-
- * providers/mbox/camel-mbox-folder.c (mbox_append_message): Add
- debugging message to keep track of the UIDs we add.
-
-2000-07-05 Dan Winship <danw@helixcode.com>
-
- * camel-folder-summary.c: Add "Cc" to summary and bump summary
- version number.
-
- * camel-folder-search.c (search_header_contains): make "Cc" a
- searchable header.
-
-2000-07-03 Ettore Perazzoli <ettore@helixcode.com>
-
- * camel-folder-summary.c (camel_folder_summary_next_uid_string):
- New.
- (camel_folder_summary_add): Use
- `camel_folder_summary_next_uid_string()' instead of recomputing
- the UID manually here.
- (camel_folder_summary_add_from_parser): Likewise.
-
-2000-07-03 Ettore Perazzoli <ettore@helixcode.com>
-
- * camel-folder-summary.c (camel_folder_summary_set_uid): Removed.
-
-2000-07-03 Dan Winship <danw@helixcode.com>
-
- * camel-folder-summary.c (message_info_new): Parse In-Reply-To
- with header_references_decode, not header_msgid_decode.
-
- * camel-mime-message.c (camel_mime_message_class_init): message
- headers are case-insensitive.
-
- * providers/pop3/camel-pop3-store.c (camel_pop3_command): Fix a
- bug in error-setting code.
- (pop3_connect): Don't re-prompt for password in the KPOP case.
- (pop3_get_response): New function, split out from
- camel_pop3_command.
- (connect_to_server): Use pop3_get_response to parse the greeting
- message, and error out appropriately if it's -ERR.
-
-2000-07-02 Dan Winship <danw@helixcode.com>
-
- * camel-folder.c (camel_folder_freeze, camel_folder_thaw): New
- functions to freeze and thaw a folder (to prevent message/folder
- changed signals in the middle of a long series of operations).
- (camel_folder_class_init): Change signals to GTK_RUN_FIRST.
- (message_changed, folder_changed): Add default implementations
- that stop the emission and record info for later if the folder is
- frozen.
-
- * providers/mbox/camel-mbox-folder.c (mbox_sync): leftover fixes
- from the close->sync change: don't destroy the ibex, summary, and
- search when syncing.
- (append_message): emit "folder_changed" on a successful append.
-
-2000-07-02 Jeffrey Stedfast <fejj@helixcode.com>
-
- * camel-mime-utils.c (uudecode_step): A rather complex uudecoder
- written in the spirit of Zucchi-ness, is it up to par? Only the
- Z-man can tell us :-)
-
-2000-07-01 Dan Winship <danw@helixcode.com>
-
- * camel-service.c (camel_service_get_name): New method, to return
- an end-user-friendly name corresponding to a service. (eg, "POP
- service for danw on trna.helixcode.com").
-
- * providers/imap/camel-imap-store.c,
- providers/mbox/camel-mbox-store.c,
- providers/nntp/camel-nntp-store.c,
- providers/pop3/camel-pop3-store.c,
- providers/sendmail/camel-sendmail-transport.c,
- providers/smtp/camel-smtp-transport.c: Implement.
-
- * providers/imap/Makefile.am: remove unneeded
- libcamelimap_la_LDADD.
-
- * providers/pop3/camel-pop3-store.c (connect_to_server): fix the
- CAPA-parsing code to not get into an infinite loop.
-
-2000-07-01 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-folder.c (imap_get_message): Fixed
- the bug that would sometimes leave part of the server response
- tacked on to the end of the message.
-
- * camel-folder.c: Renamed _by_uid methods. Since we no longer
- have get-by-number methods, no need to have the _by_uid
- extensions.
- (get_message_by_uid): Renamed to get_message
- (delete_message_by_uid): Renamed to delete_message
- (summary_get_by_uid): Renamed to get_message_info
-
- * providers/mbox/camel-mbox-folder.c:
- * providers/pop3/camel-pop3-folder.c:
- * providers/imap/camel-imap-folder.c:
- * providers/vee/camel-vee-folder.c: Updated to reflect
- camel-folder changes.
-
-2000-06-30 Jeffrey Stedfast <fejj@helixcode.com>
-
- * camel-folder.c (camel_folder_copy_message_to): New function, to
- copy a message from one folder to another. The default
- implementation just uses append_message, but providers can
- implement more efficient versions for use when both folders are on
- the same store.
-
- * broken-date-parser.[c,h]: Utilities for parsing broken
- date strings.
-
- * providers/imap/camel-imap-folder.c (imap_move_message_to):
- (imap_copy_message_to): Implemented.
-
- * camel-mime-utils.c (header_decode_date): Wrote some code to try
- and un-mangle broken date formats and then parse that new string
- instead.
-
-2000-06-30 Dan Winship <danw@helixcode.com>
-
- * camel-folder.c (camel_folder_move_message_to): New function, to
- move a message from one folder to another. The default
- implementation just uses append_message and delete_message, but
- providers can implement more efficient versions for use when both
- folders are on the same store.
-
-2000-06-29 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-folder.c (imap_expunge): Should now
- print a meaningful error message when it doesn't succeed
-
-2000-06-28 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-store.c (imap_connect): Changed to
- keep prompting user for a valid password until it either
- authenticates or until Canceled by the user.
- (camel_imap_command_extended): Improved speed (replaced the
- g_strjoinv call with a faster implementation)
-
- * providers/pop3/camel-pop3-store.c
- (camel_pop3_command_get_additional_data): Fixed.
- (pop3_connect): Changed to keep prompting the user for a
- password until it either works or until Canceled by the user.
-
- * providers/mbox/camel-mbox-summary.c: General cleanup
- (camel_mbox_summary_sync): Fixed a memory leak and added
- CamelException handling.
-
- * providers/mbox/camel-mbox-store.c (delete_folder): Fixed a
- memory leak
-
- * providers/mbox/camel-mbox-folder.c (mbox_append_message):
- Default 'off_t seek' to -1 so as to make sure it's initialized
- before it's used in the case of a bad stat() call.
- (mbox_sync): Updated
- (mbox_expunge): Updated
-
-2000-06-27 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-store.c (imap_connect): Move the
- CAPABILITY command here so we don't have to keep checking
- each time we open a folder.
- (camel_imap_command_extended): If we are doing an EXAMINE,
- don't bother doing a SELECT first.
-
- * providers/imap/camel-imap-folder.c (imap_init): Update so
- folder->has_search_capability depends on the parent IMAP store
- (since this is really dependant on the IMAP implementation and
- not the folder)
-
-2000-06-27 Christopher James Lahey <clahey@helixcode.com>
-
- * providers/smtp/camel-smtp-transport.c: Don't close the filter
- stream when done with it (this causes the source stream to close);
- Instead, just flush it when done.
-
-2000-06-27 Michael Zucchi <zucchi@zedzone.mmc.com.au>
-
- * camel-folder-search.c (search_header_contains): Make header
- search 'to' match 'to', and not 'from', small typo, fixes #317.
-
-2000-06-26 Christopher James Lahey <clahey@helixcode.com>
-
- * providers/mbox/camel-mbox-summary.c: Added debugging
- information.
-
-2000-06-23 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-store.c:
- * providers/imap/camel-imap-folder.c: Improved folder parsing.
- Not specifying a namespace should no longer list the entire
- filesystem.
-
-2000-06-22 Chris Toshok <toshok@helixcode.com>
-
- * providers/nntp/.cvsignore: ignore test-newsrc
-
- * providers/nntp/camel-nntp-store.c,
- providers/nntp/camel-nntp-store.h,
- providers/nntp/camel-nntp-folder.c,
- providers/nntp/camel-nntp-folder.h,
- providers/nntp/camel-nntp-utils.c: Bring the nntp provider up to a
- state where it builds and is usable with the current camel. there
- are still warts (semi-broken .newsrc file handling, and a lack of
- a subscribe ui -- in fact no way to add a new server, really), but
- it'll display news messages.
-
- * providers/nntp/Makefile.am (libcamelnntp_la_SOURCES): add
- camel-nntp-newsrc.c
- (libcamelnntpinclude_HEADERS): add camel-nntp-newsrc.h
- also, add test-newsrc stuff.
-
- * providers/nntp/test-newsrc.c: new file that tests the newsrc
- stuff by parsing and regurgitating a .newsrc file for a particular
- server.
-
- * providers/nntp/camel-nntp-newsrc.c,
- providers/nntp/camel-nntp-newsrc.h: new files, initial support for .newsrc files.
-
-2000-06-22 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-folder.c (imap_get_message_count):
- Oops. Now appends the namespace to the folder before querying
- for the number of messages.
-
- * providers/imap/camel-imap-store.c (imap_folder_exists): New
- convenience function for use by imap_create().
- (get_folder): If folder is specified as "/", we really want
- "INBOX".
-
- * providers/sendmail/camel-sendmail-provider.c:
- * providers/vee/camel-vee-provider.c:
- * providers/smtp/camel-smtp-provider.c:
- * providers/mbox/camel-mbox-provider.c:
- * providers/pop3/camel-pop3-provider.c:
- * providers/imap/camel-imap-provider.c: Updated
-
- * camel-session.c: Moved service_cache hash table into the
- providers.
- (service_cache_remove): Updated.
- (camel_session_get_service): Updated.
-
- * camel-url.c (camel_url_hash): Took out the hashing of
- url->passwd. We don't want this anymore.
-
- * providers/imap/camel-imap-folder.c (imap_init): Took out
- references to 'namespace'
- (camel_imap_folder_init): Same
-
- * providers/imap/camel-imap-folder.h: No more namespace. We are
- instead going to use url->path as the namespace.
-
-2000-06-21 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-store.c (imap_create): Modified to
- use the "namespace" (url->path) if it exists.
-
- * providers/imap/camel-imap-folder.c (imap_delete_message_by_uid):
- Now just sets the deleted flag on the summary rather than speaking
- directly to the IMAP server. This is both faster and cleaner.
-
-2000-06-21 Dan Winship <danw@helixcode.com>
-
- * providers/pop3/camel-pop3-store.c (query_auth_types): Fix dumb
- bug.
-
-2000-06-21 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-folder.c (imap_get_message_by_uid):
- We are getting mail in IMAP now!! whoo-hoo!. Stripped out the
- filtering so messages may have some dot-stuffing, but the
- filtering can always be added back in later when we know it
- works and isn't the problem.
-
-2000-06-21 Peter Williams <peterw@curious-george.helixcode.com>
-
- * providers/mbox/camel-mbox-folder.c (mbox_init): Use the basename
- of the mailbox so we don't get pathnames like ~/evolution/inbox///movemail.ibex
-
-2000-06-21 Dan Winship <danw@helixcode.com>
-
- * camel-folder-summary.c (message_info_new): Set date_received
- based on the first (most recent) "Received" header.
-
-2000-06-20 Dan Winship <danw@helixcode.com>
-
- * camel-mime-part.c (write_to_stream): flush the filter stream
- before unreffing it, so it will camel_mime_filter_complete.
-
- * camel-stream-filter.c (camel_stream_filter_class_init): Fix a
- braino so camel_stream_flush works here.
-
- * camel-stream-mem.c (stream_seek): Fix a bug that resulted in
- large attachments being silently dropped.
-
- * providers/pop3/camel-pop3-store.c
- (camel_pop3_command_get_additional_data): Don't use g_strjoinv
- here, since it is O(n^2) on the length of the output string, and
- we can do O(n).
-
- * camel-mime-part-utils.c
- (simple_data_wrapper_construct_from_parser): add a CRLF decoder
- after the QP/B64 decoder if it's text.
-
-2000-06-20 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-folder.c (imap_get_summary): Only
- fetch the summary if the folder summary doesn't already exist.
- When the summary *does* exist, start fetching from 1, not 0.
- (imap_free_summary): Don't do anything here.
- (imap_finalize): Free the summary here instead of in
- imap_free_summary().
- (imap_set_message_flags): Implemented
- (imap_sync): Added code to set flags on messages that have had
- their flags changed (however I #if'd it out until we are more
- confidant in the IMAP code :)
- (imap_summary_get_by_uid): Now parese flags correctly.
- (imap_get_summary): Now parese flags correctly. Also correctly
- parses the UID correctly.
-
- * camel-url.c (check_equal): No need to check s1 if s2 is NULL
- (camel_url_equal): Don't check the passwd component of the url.
-
-2000-06-20 Dan Winship <danw@helixcode.com>
-
- * camel-folder-summary.c (camel_folder_summary_add): mark the
- message info with CAMEL_MESSAGE_FOLDER_FLAGGED if we change the
- uid, so the folder will know that it's dirty.
-
-2000-06-20 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-store.c (camel_imap_command_extended):
- Now returns the last line of data that the server sends back as
- well. This is needed for commands like SELECT (like Peter pointed
- out).
- (camel_imap_command): No longer checks for SELECT (no need)
-
- * providers/imap/camel-imap-folder.c: Added namespace stuff
- which we will need later on...
- (imap_parse_subfolder_line): Convenience function for use in
- get_subfolder_names()
- (imap_get_subfolder_names): Updated. Also changed it to use LIST
- instead of LSUB (temporary change).
-
-2000-06-19 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-folder.c (camel_imap_folder_init): Set
- summary equal to NULL.
- (imap_get_summary): Store the summary in the ImapFolder
- (imap_summary_get_by_uid): If we have a summary cache in the
- ImapFolder, first check to see if that message info is in the
- cached summary first, if not fetch it directly from the IMAP
- server and append it to the summary cache.
- (imap_get_message_flags): Don't free the message info that we get
- back from summary_get_by_uid as we don't want to be corrupting our
- cached summary.
-
-2000-06-19 Peter Williams <peterw@curious-george.helixcode.com>
-
- * providers/imap/camel-imap-store.c (camel_imap_command{,_extended}): When
- SELECT'ing a folder for an IMAP command, use _extended to grab the entire
- response (before we just used camel_imap_command and missed the OK codes)
-
-2000-06-18 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-folder.c (imap_summary_get_by_uid):
- Now gets the message flags as it should.
- (imap_get_summary): Same as imap_summary_get_by_uid
- (imap_get_permanent_flags): Return the permanent flags stored
- on the folder.
- (imap_get_message_flags): Return message flags associated with
- given uid. Note: we may want to somehow cache summary info so
- that we don't have to keep querying the IMAP provider in
- imap_summary_get_by_uid().
-
-2000-06-17 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-folder.c (imap_free_summary): We were
- leaking memory - but not anymore!
- (imap_get_summary): We now get the UIDs and the beginnings of the
- code to get the message flags as well.
-
-2000-06-17 Dan Winship <danw@helixcode.com>
-
- * camel-mime-parser.c (folder_scan_header): Don't copy newlines
- into the parsed header text, and turn any number of tabs and
- spaces after a newline into a single space.
-
-2000-06-17 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-folder.c (imap_init): Should now
- correctly do CAPABILITY.
-
-2000-06-17 Dan Winship <danw@helixcode.com>
-
- * providers/mbox/camel-mbox-summary.c: Add some debugging printfs
- when rebulding summary to help figure out why people's summaries
- are always being rebuilt.
-
-2000-06-17 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-folder.c (imap_search_by_expression):
- Began to implement, need to get information on how to
- deconstruct @expression into an IMAP search expression and
- parse the results.
- (imap_init): Now queries the IMAP provider for CAPABILITY to
- determine if SEARCH is implemented or not.
-
- * providers/imap/imap.c: Removed - no longer a need to have
- this as an example for anyone interesting to help mecode IMAP
- support.
-
-2000-06-16 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-folder.c (imap_sync): Added code
- to expunge if called for (still need to finish coding this).
- (imap_get_uids): Implemented.
- (imap_get_summary): Found a way to get the date
- (imap_summary_get_by_uid): Same.
- (imap_free_summary): Implemented.
-
- * string-utils.c (strstrcase): Fixed a compile warning
-
- * providers/imap/camel-imap-summary.c: Removed - we don't
- need a CamelImapSummary structure.
-
-2000-06-16 Dan Winship <danw@helixcode.com>
-
- Move flag handling from CamelMimeMessage to CamelFolder. This
- simplifies several flag-handling pieces of code in the mailer, and
- lets you change a message's flags without having to fetch the
- message body. It also means that fully-constructed
- CamelMimeMessages are now essentially constant, which will help
- simplify locking issues later since it means two threads
- interested in the same message can just work with separate copies
- of it.
-
- * camel-mime-message.h (struct _CamelMimeMessage): Removed flags
- and user_flags (moved to summary). Removed expunged and
- message_number which were unused. Removed message_uid and folder
- which are no longer needed in the new scheme.
- (struct CamelMimeMessageClass): Removed message_changed signal and
- get/set_message_number methods.
-
- * camel-mime-message.c: Updates for CamelMimeMessage changes.
- (camel_mime_message_get/set_flags,
- camel_mime_message_get/set_user_flag): Replaced with methods in
- CamelFolder.
- (camel_flag_get, camel_flag_set, camel_flag_list_size,
- camel_flag_list_free): Moved verbatim to camel-folder-summary.c
-
- * camel-folder.c (camel_folder_get/set_message_flags,
- camel_folder_get/set_message_user_flag): New methods (and
- corresponding useless default implementations)
- (camel_folder_class_init): add a message_changed signal
-
- * camel-folder-summary.c (camel_flag_get, camel_flag_set,
- camel_flag_list_size, camel_flag_list_free): Moved here from
- camel-mime-message.c
-
- * providers/mbox/camel-mbox-folder.c (message_changed): Removed.
- (mbox_get_message_flags, mbox_set_message_flags,
- mbox_get_message_user_flag, mbox_set_message_user_flag): Tweak
- summary bits as appropriate. (Functionality moved here from
- message_changed.)
- (mbox_get_message_by_uid): Update for CamelMimeMessage changes
- (less stuff to initialize).
-
- * providers/imap/camel-imap-folder.c (message_changed): Remove
- this. It was just copied from the mbox provider and doesn't deal
- with the real IMAP flag stuff anyway. (So there's currently no
- flag support in the IMAP provider.)
- (imap_get_message_by_uid): Update for CamelMimeMessage changes.
-
- * providers/vee/camel-vee-folder.c: (message_changed): Remove old
- one. Add a new one to listen for message_changed on each folder
- and re-emit message_changed signals that correspond to messages in
- the vfolder.
- (vee_get/set_message_flags, vee_get/set_message_user_flag): Proxy
- flag setting to the underlying real messages.
- (vee_append_message): Removed for now; there's no way to translate
- this into the new CamelMimeMessage/CamelFolder scheme, but (a)
- there's also no code which would ever call it and (b) we're
- probably going want a better interface than append_message for
- message drag and drop to work anyway. To be revisited.
-
-2000-06-16 Dan Winship <danw@helixcode.com>
-
- * camel-mime-utils.c (rfc2047_decode_word):
- * camel-mime-part-utils.c (simple_data_wrapper_construct_from_parser):
- * camel-folder-summary.c (summary_build_content_info):
- KLUDGE! Since neither ETable nor GtkHTML supports UTF-8 yet,
- output ISO-8859-1 instead, so Ettore can read his Italian mail. :)
- This will be reverted later.
-
-2000-06-15 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-folder.c (imap_get_summary): Started to
- implement - may want to use ENVELOPE instead of BODY.PEEK[HEADER]
- (imap_summary_get_by_uid): Started to code, I've got to find a way to
- get the date in time_t format and also get the flags
-
- * string-utils.c (strstrcase): Added this convenience function - I
- know about strcasestr() but it's not portable.
-
-2000-06-15 Dan Winship <danw@helixcode.com>
-
- * camel-service.c: Remove camel_service_connect_with_url. (URLs
- must be specified when the service is requested from the session,
- so that there can only ever be one service for any URL.)
-
- * camel-folder.c: (camel_folder_open, camel_folder_is_open,
- camel_folder_get_mode): Kill. Folders are now always open, and
- handle "closing" sorts of operations at sync or finalize time.
- (camel_folder_sync): renamed from camel_folder_close. Syncs state
- to the store but doesn't necessarily close/disconnect.
-
- * providers/*/camel-*-folder.c: Merge "open" methods into "init"
- methods. Rename close to sync and update appropriately.
-
- * providers/imap/camel-imap-store.c: Remove camel_imap_store_open
- and camel_imap_store_close, which should not have been copied from
- the POP provider (where the exist to work around limitations of
- the POP protocol).
-
- * providers/mbox/camel-mbox-summary.c: fix a bug. (don't expunge
- deleted messages if called with expunge == FALSE)
-
- * providers/pop3/camel-pop3-store.c (connect_to_server): Check
- server for various interesting extensions.
-
- * providers/pop3/camel-pop3-folder.c (get_uids): If the server
- supports UIDL, use real UIDs rather than fake ones.
- (etc): Map uids back to numbers appropriately
-
- * providers/mbox/camel-mbox-folder.c (mbox_append_message): Fix to
- previous change: make sure the "seek" variable ends up with the
- value it should.
-
- * providers/mbox/camel-mbox-summary.c (summary_rebuild): Update
- summary mtime as well as size.
-
-2000-06-14 Dan Winship <danw@helixcode.com>
-
- * providers/mbox/camel-mbox-folder.c (mbox_append_message): if the
- mbox doesn't end with a '\n', write one before appending the new
- message.
-
-2000-06-14 Jeffrey Stedfast <fejj@helixcode.com>
-
- * camel-mime-filter-crlf.c (filter): Updated the encoder to allocate
- more memory (since we are also now adding dots). Also updated the
- decoder as we have found that it sometimes passes the end of the
- buffer.
-
- * providers/pop3/camel-pop3-folder.c (get_message_by_uid): Took out the
- filter code (we already filter in
- camel_pop3_command_get_additional_data)
-
- * camel-folder.c (init): Updated: a separator is now a char* rather
- than a single char because IMAP can have a string for a directory
- separator. Also, since IMAP does not begin with a directory separator,
- there is a new argument (path_begins_with_sep) which decides if a
- directory should begin with a directory separator.
-
- * providers/imap/camel-imap-store.c (imap_create): Since, on connect,
- Camel tries to create INBOX (which already exists on every IMAP
- provider) we can return TRUE when the folder name is "INBOX".
-
- * providers/vee/camel-vee-folder.c (vee_init): Updated.
-
- * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Updated.
-
- * providers/mbox/camel-mbox-store.c (get_folder): Updated.
-
- * providers/mbox/camel-mbox-folder.c (mbox_init): Updated.
-
- * providers/pop3/camel-pop3-folder.c (camel_pop3_folder_new): Updated.
-
-2000-06-14 Dan Winship <danw@helixcode.com>
-
- * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_sync):
- Renamed from camel_mbox_summary_expunge. Takes a gboolean saying
- whether to expunge or just sync the mbox file. Change some
- g_errors to g_warning so we don't abort. Make the quick
- X-Evolution updating code lseek around correctly. Update the
- mbox mtime in the summary file even in the quick case.
-
- * providers/mbox/camel-mbox-summary.h: make
- CAMEL_MESSAGE_FOLDER_NOXEV not conflict with
- CAMEL_MESSAGE_FOLDER_FLAGGED defined in camel-mime-message.h
-
- * providers/mbox/camel-mbox-folder.c (mbox_close): call
- camel_mbox_summary_sync to save flag state if not expunging.
- (mbox_expunge): Update for camel_mbox_summary_expunge rename.
-
-2000-06-13 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-store.c (camel_imap_store_open):
- (camel_imap_store_close): Added.
- (camel_imap_command_extended): Fixed a segfault and updated
- to use camel_imap_status()
- (camel_imap_command): Updated to use camel_imap_status()
- (camel_imap_status): New convenience function for parsing
- the return status of an IMAP command
-
-2000-06-12 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-folder.c (imap_get_message_by_uid):
- Works like the POP fetch code, should work temporarily until
- we get around to coding it the way it "Should Be".
-
- * providers/pop3/camel-pop3-folder.c (get_message_by_uid): Now uses
- the camel-mime-filter-crlf decoder when retrieving messages.
-
- * camel-mime-filter-smtp.c: Deprecated.
-
- * providers/smtp/camel-smtp-transport.c (smtp_data): Updated to use
- camel-mime-filter-crlf with my 'dot' extension in place of
- camel-mime-filter-smtp
-
- * camel-mime-part.c (write_to_stream): Updated to reflect changes
- made to camel-mime-filter-crlf.c
-
- * camel-mime-filter-crlf.c (filter): Modified to be able to
- encode/decode dots ("\n.\n"<->"\n..\n"). Also fixed the decoder
- so that it should no longer get caught in an infinite loop.
-
-2000-06-12 Dan Winship <danw@helixcode.com>
-
- * providers/*/Makefile.am: don't pass a second (incorrect) -rpath
- in addition to the (correct) one automatically provided by
- automake.
-
- * camel-mime-filter-crlf.c: New filter to do CRLF<->LF conversion.
- (Currently only tested in the LF->CRLF direction.)
-
- * camel-mime-part.c (write_to_stream): if content-type is text,
- and it's QP or B64 encoded, pass through the CRLF filter before
- the other filter to satisfy the "canonical encoding" rules in the
- MIME spec.
-
-2000-06-09 Dan Winship <danw@helixcode.com>
-
- * camel-session.c (camel_session_query_authenticator): Add another
- argument, "mode", which can be CAMEL_AUTHENTICATOR_ASK or
- CAMEL_AUTHENTICATOR_TELL, so callers can get the app to un-cache
- bad info.
-
- * providers/pop3/camel-pop3-store.c (pop3_connect): uncache the
- password if it doesn't work.
-
-2000-06-09 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-stream.c (stream_read): Updated to reflect
- changes made in camel-imap-store.c
-
- * providers/imap/camel-imap-store.c (imap_create): No longer checks to
- make sure a folder doesn't already exists (as this is no longer needed)
- (camel_imap_command): Now takes a CamelFolder argument so it can detect
- whether or not it needs to SELECT a folder or not
- (camel_imap_command_extended): Same.
-
- * providers/smtp/camel-smtp-transport.c (smtp_connect): Will now always
- send EHLO first, if that fails it will fall back on HELO.
- (esmtp_get_authtypes): Should now correctly parse authtypes.
-
-2000-06-07 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-summary.c: Now builds (not that it's worth
- much yet).
-
- * providers/imap/camel-imap-folder.c (imap_get_uids): Now uses the
- correct cast to a CamelImapMessageInfo structure (should get rid of
- compile warnings).
-
- * providers/imap/Makefile.am: Added rules to build
- camel-imap-stream
-
- * providers/imap/camel-imap-store.c (get_folder): Update.
- Moved imap_create here.
-
- * providers/imap/camel-imap-folder.c (delete_messages): Remove.
- (imap_create): Removed.
- (imap_delete): Removed.
- (imap_exists): Removed.
-
- * providers/imap/camel-imap-stream.h: Added typedef's for the stream
-
- * providers/imap/camel-imap-stream.c: Modified to build cleanly
-
-2000-06-07 Not Zed <NotZed@HelixCode.com>
-
- * camel-mime-utils.c (header_msgid_decode_internal): Properly
- dereference warning/debug messages.
- (header_references_decode): Check we actually have msgid stuff
- before trying to decode it ...
-
-2000-06-06 Jeffrey Stedfast <fejj@helixcode.com>
-
- * camel-imap-stream.[c,h]: Removed
-
- * providers/imap/camel-imap-stream.[c,h]: Relocated to this
- location
-
- * providers/imap/camel-imap-summary.c: Added
-
-2000-06-06 Dan Winship <danw@helixcode.com>
-
- * camel-folder.c: Remove exists, create, delete. A CamelFolder
- now always references an existing folder. Remove delete_messages
- too since it wasn't being used. Add a "create" flag to
- get_subfolder saying whether or not to create the subfolder if it
- doesn't yet exist.
-
- * camel-store.c (camel_store_get_folder): Add a "create" flag to
- say whether or not to create the folder if it doesn't yet exist.
- (camel_store_delete_folder): New method, moved from CamelFolder.
- (cache_folder, uncache_folder): Fix up a bit.
- (get_folder_name): Explain what this is for.
-
- * providers/mbox/camel-mbox-folder.c:
- * providers/mbox/camel-mbox-store.c: Update. Remove support for
- hierarchical folders to simplify this for now, since we're not
- using it, and it's not completely clear how they should work in an
- ELocalStorage world. Needs to be revisited.
-
- * providers/pop3/camel-pop3-folder.c (delete_messages): Remove.
- * providers/pop3/camel-pop3-store.c (get_folder): Update.
-
- * providers/vee/camel-vee-folder.c (exists): Remove.
- * providers/vee/camel-vee-store.c (vee_get_folder): Update.
-
-2000-06-06 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-*.[c,h]: Started on getting
- imap to build cleanly (tho some work has not been completed
- so it still won't build until camel-imap-summary is finished
- along with a few methods in camel-imap-folder)
-
- * camel-stream.[c,h]: Changed the read and write method prototypes
- to return an ssize_t type rather than an int and also changed
- the 'number of bytes' to read or write to a size_t type
-
- * camel-stream-fs.c: same as above
-
- * camel-stream-mem.c: again, same as above
-
- * camel-stream-buffer.c: same
-
- * camel-imap-stream.[c,h]: Added this new stream, cache's previously
- read data so each successive call will instead read from the cache
-
-2000-06-05 Dan Winship <danw@helixcode.com>
-
- * camel-mime-part.c (camel_mime_part_set_disposition): fix
- typo/braino (set "Content-Disposition", not "Content-Description")
- (camel_mime_part_set_filename): const poison
-
-2000-06-02 Not Zed <NotZed@HelixCode.com>
-
- * camel-mime-utils.c (base64_encode_step): Ick, damn signs! Fix a
- bug with sign extended bytes.
-
- * camel-mime-filter-smtp.c (filter): Changed layout/logic slightly
- (to match From filter)
-
-2000-06-02 Jeffrey Stedfast <fejj@helixcode.com>
-
- * camel-mime-filter-smtp.c (filter): Fixed the filter so that it
- wouldn't insert garbage under certain conditions.
-
-2000-06-02 Christopher James Lahey <clahey@helixcode.com>
-
- * camel-session.c: Don't ref the services in the cache.
-
-2000-06-02 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/smtp/camel-smtp-transport.c: Rearanged where debug
- fprintf statements we placed so that any data the server sends
- back is printed out before an exception is set and the function
- returns.
-
-2000-06-02 Not Zed <NotZed@HelixCode.com>
-
- * camel-mime-utils.c (header_decode_date): If we get a funny
- result, just throw it out. Basically a fix for the one true
- broken TradeClient.
-
-2000-06-01 Not Zed <NotZed@HelixCode.com>
-
- * camel-folder-summary.c (message_info_free): Free
- references/messsage id.
- (message_info_save): Save them.
- (message_info_load): Load them.
- (message_info_new): And get them from the new message.
- (CAMEL_FOLDER_SUMMARY_VERSION): Bumped for new changes.
-
- * camel-folder-summary.h: Added references and messageid to
- summary.
-
-2000-06-02 Christopher James Lahey <clahey@helixcode.com>
-
- * camel-session.c: Ref and unref objects in the service cache
- properly.
-
- * camel-store.c: Ref the folder when returning it using
- lookup_folder. Used the folder's full name for the key for the
- folder cache since that's used to uncache it.
-
-2000-06-02 Dan Winship <danw@helixcode.com>
-
- Fun with purify.
-
- * providers/pop3/camel-pop3-store.c (pop3_connect): free msg on
- success as well as failure.
- (camel_pop3_command_get_additional_data): free buf after reading
- the last line (".").
-
- * providers/pop3/camel-pop3-folder.c (get_message_by_uid): free
- body data after creating the memstream from it (which will copy
- the data).
-
- * providers/mbox/camel-mbox-folder.c (mbox_finalize): free summary
- and index paths.
-
- * camel-data-wrapper.c (finalize): unref the stream, if it exists.
-
-2000-06-01 Not Zed <NotZed@HelixCode.com>
-
- * camel-mime-part.c (construct_from_parser): For a message part,
- set the default content-type to message/rfc822. Maybe needs to be
- done for multiparts too?
-
-2000-05-31 Not Zed <NotZed@HelixCode.com>
-
- * camel-mime-message.c (construct_from_parser): Typo in assersion.
-
- * camel-mime-parser.c (folder_scan_step): Use a default type of
- message/rfc822 for multipart/digest. Bug Z192.
- (folder_scan_drop_step): Remove warning.
-
-2000-05-30 Not Zed <NotZed@HelixCode.com>
-
- * providers/mbox/camel-mbox-folder.c (mbox_append_message): Init
- filter_from to NULL, for exception case.
- (mbox_get_message_by_uid): Cast off_t to long int for diagnostics.
-
- * camel-url.c (camel_url_hash): Hash funciton for using camel
- url's as hash keys.
- (camel_url_equal): equal function for same.
-
- * camel-session.c (camel_session_finalise): Free cached services.
- (camel_session_init): Init service cache.
- (service_cache_remove): destroy callback to remove a service from
- the cache.
-
- * camel-store.c (get_folder_internal): Remove the extra ref of the
- folder. That seems the right behaviour ...?
- (camel_store_get_type): Doh, actually call store init, so the
- cache works.
- (cache_folder): strdup the folder name! no wonder it never found
- it again.
-
-2000-05-30 Jeffrey Stedfast <fejj@helixcode.com>
-
- * providers/imap/camel-imap-folder.c: Implemented a few more
- methods like imap_append and 1 or 2 others
-
-2000-05-29 Not Zed <NotZed@HelixCode.com>
-
- * camel-store.c (camel_store_init): Move it to here. If this
- level is going to maintain it, it should set it up. Lets see what
- caching folders breaks :(
-
- * providers/pop3/camel-pop3-store.c (camel_pop3_store_init): Dont
- init folder cache here.
-
- * providers/mbox/camel-mbox-summary.c
- (camel_mbox_summary_expunge): Make sure we copy messages which are
- still intact to the new folder.
- (camel_mbox_summary_expunge): Update the frompos as well when
- moving the content.
- (camel_mbox_summary_expunge): Remove some debug, and dont offset
- frompos?
-
- * providers/vee/camel-vee-folder.c (vee_folder_build): Check the
- searched folder is open before trying to search it.
- (message_changed): Track changes to the source message in the
- summary.
- (folder_changed): Track folder changes, re-query the folder that
- changed, and cascade the changed event as well.
- (camel_vee_folder_finalise): Free subfolder and subfolder summary.
-
-2000-05-29 Dan Winship <danw@helixcode.com>
-
- * camel-service.c (camel_service_new): Fix up some glib
- precondition stuff. Try to set the URL in camel_service_new before
- checking whether or not it's "empty" so that you can successfully
- set "sendmail:" as a URL.
-
-2000-05-28 Dan Winship <danw@helixcode.com>
-
- * 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 `"" <foo@bar>' for email addresses with no
- name component.
-
-2000-05-27 Jeffrey Stedfast <fejj@helixcode.com>
-
- * 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 <danw@helixcode.com>
-
- * 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 <fejj@helixcode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * providers/vee/camel-vee-folder.c (vee_folder_build_folder):
- Update the vfolder details for a single folder.
-
-2000-05-25 Jeffrey Stedfast <fejj@helixcode.com>
-
- * 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 <danw@helixcode.com>
-
- * camel.h: Re-add camel-simple-data-wrapper.h, which was removed
- for some reason.
-
-2000-05-24 Jeffrey Stedfast <fejj@helixcode.com>
-
- * 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 <fejj@helixcode.com>
-
- * 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 <fejj@helixcode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * 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 <danw@helixcode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * 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 <danw@helixcode.com>
-
- * 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 <danw@helixcode.com>
-
- * 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 <darin@eazel.com>
-
- * 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 <danw@helixcode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * 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 <fejj@stampede.org>
-
- * providers/smtp/camel-smtp-transport.c: (smtp_helo): Error
- checking on gethostbyaddr() eliminating a possible segfault.
-
-2000-05-16 NotZed <NotZed@HelixCode.com>
-
- * providers/mbox/camel-mbox-folder.c (mbox_delete_message_by_uid):
- Implement.
-
-2000-05-12 NotZed <NotZed@HelixCode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * 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 <toshok@helixcode.com>
-
- * 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 <fejj@stampede.org>
-
- * providers/smtp/camel-smtp-transport.c: Added some preliminary
- AUTH support.
-
-2000-05-15 Dan Winship <danw@helixcode.com>
-
- * camel-folder.h: Remove camel_folder_get_summary, which no longer
- exists.
-
-2000-05-11 Dan Winship <danw@helixcode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * providers/mbox/camel-mbox-folder.c (message_changed): Indicate
- the summary changed also.
-
-2000-05-11 Jeffrey Stedfast <fejj@stampede.org>
-
- * providers/smtp/camel-smtp-transport.c: (smtp_helo):
- Updated to more closely comply with RFC 821 standards
-
-2000-05-11 NotZed <NotZed@HelixCode.com>
-
- * 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 <notzed@helixcode.com>
-
- * camel-folder-summary.c (camel_folder_summary_finalise): Free
- summary items and charset filters.
-
-2000-05-10 <notzed@helixcode.com>
-
- * 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 <fejj@stampede.org>
-
- * providers/smtp/camel-smtp-transport.c: (camel_smtp_transport_class_init):
- Added initialization for service_class
-
-2000-05-10 Dan Winship <danw@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * Makefile.am: Added camel-types.h, camel-folder-pt-proxy.h, and
- camel-thread-proxy.h.
-
-2000-05-09 Dan Winship <danw@helixcode.com>
-
- * 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 <fejj@stampede.org>
- * 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 <fejj@stampede.org>
-
- * 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 <danw@helixcode.com>
-
- * providers/mbox/camel-mbox-folder.c (mbox_get_message_by_uid):
- one more refcounting fix I missed before.
-
-2000-05-08 Jeffrey Stedfast <fejj@stampede.org>
-
- * 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 <danw@helixcode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * 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 <danw@helixcode.com>
-
- 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 <camel/foo.h> in header files rather than <foo.h>, "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 <danw@helixcode.com>
-
- * 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 <notzed@helixcode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * 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 <notzed@helixcode.com>
-
- * camel-mime-filter.c (filter_run): Oops, forgot to add the
- backlen to the pre-buffer (*poof*).
-
-2000-05-07 NotZed <NotZed@HelixCode.com>
-
- * 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 <notzed@helixcode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * 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 <notzed@helixcode.com>
-
- * 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 <notzed@helixcode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * 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 <danw@helixcode.com>
-
- * 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 <danw@helixcode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * 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 <leach@wam.umd.edu>
-
- * Makefile.am (INCLUDES): add $(UNICODE_CFLAGS) to the INCLUDES,
- people who installed libunicde in non-standard include paths need
- this.
-
-2000-05-03 NotZed <NotZed@HelixCode.com>
-
- * 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 <lewing@helixcode.com>
-
- * camel-mime-utils.c (header_decode_date): fix typo when
- dereferencing saveoffset.
-
-2000-05-02 NotZed <NotZed@HelixCode.com>
-
- * 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 <matt@helixcode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * 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 <notzed@helixcode.com>
-
- * camel-mime-part-utils.c
- (simple_data_wrapper_construct_from_parser): Dont use autofill on
- these fucking long function anmes!!!!!!
-
-2000-05-02 NotZed <NotZed@HelixCode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * 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 <danw@helixcode.com>
-
- * 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 <danw@helixcode.com>
-
- * 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 <danw@helixcode.com>
-
- * camel-mime-parser.c (folder_scan_header): fix a bug that would
- cause corruption with very long headers.
-
-2000-04-27 Ettore Perazzoli <ettore@helixcode.com>
-
- * providers/pop3/Makefile.am (INCLUDES): Add `-I$(srcdir)/../../..'
- to pick the Camel includes.
- * providers/sendmail/Makefile.am (INCLUDES): Likewise.
-
- * camel.h: Don't #include <camel/data-wrapper-repository.h> anymore.
-
-2000-04-27 NotZed <NotZed@HelixCode.com>
-
- * 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 <danw@helixcode.com>
-
- * 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 <danw@helixcode.com>
-
- * 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 <danw@helixcode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * 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 <errno.h> 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 <NotZed@HelixCode.com>
-
- * 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 <danw@helixcode.com>
-
- * 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 <danw@helixcode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * 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 <danw@helixcode.com>
-
- * camel-mime-utils.c (header_to_decode, header_mime_decode): fix
- some obvious minor bugs noted by -Wall.
-
-2000-04-23 NotZed <NotZed@HelixCode.com>
-
- * 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 <danw@helixcode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * providers/mbox/camel-mbox-utils.[ch]: Removed.
-
- * providers/mbox/camel-mbox-parser.[ch]: Removed. Removed
- references to it.
-
-2000-04-20 Dan Winship <danw@helixcode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * 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 <danw@helixcode.com>
-
- * 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 <danw@helixcode.com>
-
- * 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 <danw@helixcode.com>
-
- * 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 <toshok@helixcode.com>
-
- * providers/Makefile.am (SUBDIRS): add nntp
-
-2000-04-14 Christopher James Lahey <clahey@helixcode.com>
-
- * providers/mbox/camel-mbox-folder.c: Fix switch statement.
-
-2000-04-14 Chris Toshok <toshok@helixcode.com>
-
- * 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 <danw@helixcode.com>
-
- * 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 <matt@helixcode.com>
-
- * camel-folder-pt-proxy.c (_folder_open_cb): Print warning message
- for broken function.
- (_folder_close_cb): Same.
-
-2000-04-12 Miguel de Icaza <miguel@gnu.org>
-
- * Makefile.am (pthread_SRC): Use correct names for the pthread
- source variables.
-
-2000-04-10 Dan Winship <danw@helixcode.com>
-
- * 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 <fejj@stampede.org>
-
- * providers/smtp/camel-smtp-transport.c: reformatted to fit
- the standard indent format used by helix code
-
-2000-04-09 Dan Winship <danw@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * providers/smtp/.cvsignore: Added a .cvsignore file.
-
-2000-04-08 Dan Winship <danw@helixcode.com>
-
- * 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 <sys/param.h>
- for MAXHOSTNAMELEN. (This is a stopgap: some of the uses of
- MAXHOSTNAMELEN are wrong anyway...)
-
-2000-04-07 Jeffrey Stedfast <fejj@stampede.org>
-
- * 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 <NotZed@HelixCode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * 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 <danw@helixcode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * 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 <matt@helixcode.com>
-
- * 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 <danw@helixcode.com>
-
- * 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 <danw@helixcode.com>
-
- * 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 <danw@helixcode.com>
-
- * 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 <danw@helixcode.com>
-
- * 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 <matt@helixcode.com>
-
- * camel-formatter.c (text_to_html): Added "convert_newlines_to_br"
- boolean param, to give the option of not converting '\n's to <br>
- tags. This way, when we stick stuff in a <pre> tag, newlines stay
- newlines.
-
-2000-03-30 Matt Loper <matt@helixcode.com>
-
- * camel-formatter.c (handle_text_plain): Use <pre> tag to force
- the use of monospaced fonts.
-
-2000-03-30 Dan Winship <danw@helixcode.com>
-
- * 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 <miguel@gnu.org>
-
- * 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 <danw@helixcode.com>
-
- * 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 <danw@helixcode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * 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 <danw@helixcode.com>
-
- * 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 <michael@helixcode.com>
-
- * 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 <danw@helixcode.com>
-
- * 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 <danw@helixcode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * providers/mbox/camel-mbox-provider.c: Added flag to provider
- initialisation, to match changed structure.
-
-2000-03-22 NotZed <NotZed@HelixCode.com>
-
- * 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 <danw@helixcode.com>
-
- * 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 <danw@helixcode.com>
-
- * 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 <matt@helixcode.com>
-
- * camel-formatter.c (debug): Disabled some useless debug
- messaging.
-
-2000-03-21 Dan Winship <danw@helixcode.com>
-
- * providers/pop3: some initial bits of the POP3 provider, to
- make Matt happy. Incomplete, untested, etc.
-
-2000-03-21 bertrand <bertrand@helixcode.com>
-
- * 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 <bertrand@helixcode.com>
-
- * camel-service.h: cosmetic changes.
-
-2000-03-09 Dan Winship <danw@helixcode.com>
-
- * s/HelixCode/Helix Code, Inc./ in the copyrights
-
-2000-03-07 bertrand <bertrand@helixcode.com>
-
- * 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 <bertrand@helixcode.com>
-
- * camel-stream-fs.c (_seek): fix a bogus calculation
- in the return position.
-
-2000-03-05 bertrand <bertrand@helixcode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * providers/mbox/camel-mbox-search.c
- (camel_mbox_folder_search_by_expression): Ref the summary
- after we have got it.
-
-2000-03-04 bertrand <bertrand@helixcode.com>
-
- * 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 <object> tag.
- (get_bonobo_tag_for_object): the correct syntax for the
- to set a parameter inside an <object> tag is :
- <object classid="..."> <param name="uid" value="..."> <param ...>
- </object>
-
-2000-03-03 bertrand <bertrand@helixcode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * providers/mbox/camel-mbox-utils.c (camel_mbox_write_xev): Make
- sure we open with create with a creation mask.
-
-2000-03-01 NotZed <NotZed@HelixCode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * 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 <bertrand@helixcode.com>
-
- * 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 <bertrand@helixcode.com>
-
- * 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 <bertrand@helixcode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * 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 <bertrand@helixcode.com>
-
- * camel-stream-b64.c (my_read_encode): encoding
- filter.
-
-2000-02-23 bertrand <Bertrand.Guiheneuf@aful.org>
-
- * 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 <danw@helixcode.com>
-
- * 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 <danw@helixcode.com>
-
- * 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 <danw@helixcode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * providers/mbox/camel-mbox-search.c: Dont compile by default.
-
- * providers/mbox/Makefile.am: Fuck off the filter code.
-
-2000-02-22 bertrand <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * camel-seekable-substream.c (_reemit_parent_signal):
- emit "data_available" when parent stream emits it.
-
-
-2000-02-21 NotZed <NotZed@HelixCode.com>
-
- * 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 <danw@helixcode.com>
-
- * 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 <danw@helixcode.com>
-
- * 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 <danw@helixcode.com>
-
- * providers/mbox/Makefile.am: add libibex back to
- libcamelmbox_la_LIBADD
-
-2000-02-18 NotZed <NotZed@HelixCode.com>
-
- * 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 <danw@helixcode.com>
-
- * 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 <danw@helixcode.com>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <danw@helixcode.com>
-
- * camel/url-util.c (g_url_to_string): New function to convert
- a Gurl back into a char *.
-
-2000-02-17 bertrand <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <NotZed@HelixCode.com>
-
- * providers/mbox/Makefile.am (libcamelmbox_la_LIBADD): Added
- libfilter to link line (temporarily?). Required for
- filter-sexp.
-
-2000-02-15 bertrand <bertrand@helixcode.com>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <miguel@gnu.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <Bertrand.Guiheneuf@aful.org>
-
- * 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 <notzed@zedzone.helixcode.com>
-
- * 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 <notzed@zedzone.helixcode.com>
-
- * 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 <notzed@helixcode.com>
-
- * 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 0a42ed8368..0000000000
--- a/camel/Makefile.am
+++ /dev/null
@@ -1,202 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-SUBDIRS = providers tests
-
-libcamelincludedir = $(includedir)/camel
-providerdir = $(libdir)/evolution/camel-providers/$(VERSION)
-
-lib_LTLIBRARIES = libcamel.la
-
-INCLUDES = -I.. -I$(srcdir)/.. \
- -I$(top_srcdir)/intl \
- -I$(top_srcdir)/e-util \
- $(GNOME_INCLUDEDIR) \
- $(GLIB_CFLAGS) \
- $(GNOME_XML_CFLAGS) \
- $(UNICODE_CFLAGS) \
- $(KRB4_CFLAGS) \
- $(NSPR_CFLAGS) \
- $(NSS_CFLAGS) \
- $(EXTRA_GNOME_CFLAGS) \
- -DCAMEL_PROVIDERDIR=\""$(providerdir)"\" \
- -DG_LOG_DOMAIN=\"camel\"
-
-libcamel_la_SOURCES = \
- broken-date-parser.c \
- camel-address.c \
- camel-cipher-context.c \
- camel-data-wrapper.c \
- camel-exception.c \
- camel-filter-driver.c \
- camel-filter-search.c \
- camel-folder-search.c \
- camel-folder-summary.c \
- camel-folder-thread.c \
- camel-folder.c \
- camel-internet-address.c \
- camel-lock.c \
- camel-medium.c \
- camel-mime-filter-bestenc.c \
- camel-mime-filter-basic.c \
- camel-mime-filter-charset.c \
- camel-mime-filter-crlf.c \
- camel-mime-filter-from.c \
- camel-mime-filter-html.c \
- camel-mime-filter-index.c \
- camel-mime-filter-linewrap.c \
- camel-mime-filter-save.c \
- camel-mime-filter.c \
- camel-mime-message.c \
- camel-mime-parser.c \
- camel-mime-part-utils.c \
- camel-mime-part.c \
- camel-mime-utils.c \
- camel-movemail.c \
- camel-multipart.c \
- camel-object.c \
- camel-operation.c \
- camel-pgp-context.c \
- camel-pgp-mime.c \
- camel-provider.c \
- camel-remote-store.c \
- camel-sasl.c \
- camel-sasl-anonymous.c \
- camel-sasl-cram-md5.c \
- camel-sasl-digest-md5.c \
- camel-sasl-kerberos4.c \
- camel-sasl-login.c \
- camel-sasl-plain.c \
- camel-search-private.c \
- camel-seekable-stream.c \
- camel-seekable-substream.c \
- camel-service.c \
- camel-session.c \
- camel-store.c \
- camel-stream-buffer.c \
- camel-stream-filter.c \
- camel-stream-fs.c \
- camel-stream-mem.c \
- camel-stream-null.c \
- camel-stream.c \
- camel-tcp-stream-raw.c \
- camel-tcp-stream-ssl.c \
- camel-tcp-stream-openssl.c \
- camel-tcp-stream.c \
- camel-transport.c \
- camel-uid-cache.c \
- camel-url.c \
- camel-vee-folder.c \
- camel-vee-store.c \
- camel-vtrash-folder.c \
- camel-charset-map.c \
- camel.c \
- gstring-util.c \
- hash-table-utils.c \
- string-utils.c
-
-libcamelinclude_HEADERS = \
- broken-date-parser.h \
- camel-address.h \
- camel-charset-map.h \
- camel-cipher-context.h \
- camel-data-wrapper.h \
- camel-exception-list.def \
- camel-exception.h \
- camel-filter-driver.h \
- camel-filter-search.h \
- camel-folder-search.h \
- camel-folder-summary.h \
- camel-folder-thread.h \
- camel-folder.h \
- camel-internet-address.h \
- camel-lock.h \
- camel-medium.h \
- camel-mime-filter-bestenc.h \
- camel-mime-filter-basic.h \
- camel-mime-filter-charset.h \
- camel-mime-filter-crlf.h \
- camel-mime-filter-from.h \
- camel-mime-filter-html.h \
- camel-mime-filter-index.h \
- camel-mime-filter-linewrap.h \
- camel-mime-filter-save.h \
- camel-mime-filter.h \
- camel-mime-message.h \
- camel-mime-parser.h \
- camel-mime-part-utils.h \
- camel-mime-part.h \
- camel-mime-utils.h \
- camel-movemail.h \
- camel-multipart.h \
- camel-object.h \
- camel-operation.h \
- camel-pgp-context.h \
- camel-pgp-mime.h \
- camel-provider.h \
- camel-remote-store.h \
- camel-sasl.h \
- camel-sasl-anonymous.h \
- camel-sasl-cram-md5.h \
- camel-sasl-digest-md5.h \
- camel-sasl-kerberos4.h \
- camel-sasl-login.h \
- camel-sasl-plain.h \
- camel-seekable-stream.h \
- camel-seekable-substream.h \
- camel-service.h \
- camel-session.h \
- camel-store.h \
- camel-stream-buffer.h \
- camel-stream-filter.h \
- camel-stream-fs.h \
- camel-stream-mem.h \
- camel-stream-null.h \
- camel-stream.h \
- camel-tcp-stream-raw.h \
- camel-tcp-stream-ssl.h \
- camel-tcp-stream-openssl.h \
- camel-tcp-stream.h \
- camel-transport.h \
- camel-types.h \
- camel-uid-cache.h \
- camel-url.h \
- camel-vee-folder.h \
- camel-vee-store.h \
- camel-vtrash-folder.h \
- camel.h \
- gstring-util.h \
- hash-table-utils.h \
- string-utils.h
-
-libcamel_la_LDFLAGS = -version-info 0:0:0 -rpath $(libdir)
-
-libcamel_la_LIBADD = $(top_builddir)/e-util/libeutil.la \
- $(UNICODE_LIBS) \
- $(KRB4_LDFLAGS) \
- $(NSPR_LDFLAGS) \
- $(NSS_LDFLAGS)
-
-
-noinst_HEADERS = \
- camel-charset-map-private.h \
- camel-private.h \
- camel-search-private.h
-
-EXTRA_DIST = \
- 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 <Bertrand.Guiheneuf@aful.org> \ No newline at end of file
diff --git a/camel/README.mt b/camel/README.mt
deleted file mode 100644
index aeece1b0bb..0000000000
--- a/camel/README.mt
+++ /dev/null
@@ -1,171 +0,0 @@
-
-This version of camel is working towards being multi-thread safe
-(MT-SAFE). At least, for the important api's.
-
-This code has now been merged into the main head, but this file
-will remain here as a log of how it was done, incase any issues
-arise. The ChangeLog of course has a much more detailed list
-of changes.
-
-Intended method
-===============
-
-I intend working on it in several stages:
-
-1. Making the api multi-threadable. Basically removing some const-returns,
-and copying some data where it wasn't before. The api should
-still continue to work if not being used in a multithreaded
-application. There is not a significant amount of work here since
-this was more or less the intention all along.
-
-Some functions where references to objects are returned may have to be
-changed slightly, so that refcounts are incremented before return.
-This doesn't affect much though.
-
-camel_folder::get_message_info done
-camel_folder_summary::uid done
-camel_folder_summary::index done
-camel_folder::get_summary
- Needs to ref each summary item it points to. done
-camel_folder::free_summary
- Needs to unref each summary item it points to. done
-camel_folder_get_message_tag
- needs to copy the tag return
-camel_maildir_summary filename string
- should not be able to modify the string
- array contents after it has been added to
- the summary.
-camel_folder done
- Make every camel-folder use a camel-folder-summary.
- This just reduces some of the code duplication,
- since everything but vee-folder does this already.
-
-2. Adding high level locks for proof of concept. The locks will
-be stored in private or global data, so the api should remain the same for
-non-threaded applications.
-
-A per-folder lock which governs access to the folder
- summary, the folder file or
- communications socket, etc. done
-Locking for exceptions. done
-Per store locks for internal stuff. done
-Per-service locks for various internal lists and
- caches done
-
-3. Further fine-grained locking where it can be done/is worthwhile.
-
-A per-index lock for libibex done
-Locking for the search object half done
-Internal lock for the folder_summary itself
- So that searching can be detatched from other
- folder operations, etc. done
-Possibly a lock for access to parts of a mime-part
- or message
-
-4. A method to cancel operations.
-
-Individual outstanding operations must be cancellable, and not just
-'all current operations'. This will probably not use pthread_cancel
-type of cancelling.
-
-This will however, probably use a method for starting a new thread,
-through camel, that can then be cancelled, and/or some method of
-registering that a thread can be cancelled. Blocking states within
-camel, within that thread, will then act as checkpoints for if the
-operation, and if it is cancelled, the operation will abort
-(i.e. fail, with an appropriate exception code).
-
-Operation cancelling should also function when the application is not
-multi-threaded. Not sure of the api for this yet, probably a callback
-system. Hopefully the api for both scenarios can be made the same.
-
-Other thoughts
-==============
-
-Basically much of the code in camel that does the actual work does NOT
-need to be thread safe to make it safely usable in an mt context.
-
-camel-folder, camel-summary, camel-imap-search, and the camel-service
-classes (at least) are the important ones to be made multithreaded.
-
-For other things, they are either resources that are created
-one-off (for example, camel-mime-message, and its associated
-parts, like camel-internet-address), or multithreadedness
-doesn't make a lot of sense - e.g. camel-stream, or camel-mime-parser.
-
-So basically the approach is a low-risk one. Adding the minimum
-number of locks to start with, and providing further fine-grained
-locks as required. The locks should not need to be particularly
-fine-grained in order to get reasonable results.
-
-Log of changes
-==============
-
-Changed CamelFolder:get_message_info() to return a ref'd copy, requiring
-all get_message_info()'s to have a matching free_message_info().
-
-Moved the CamelFolder frozen changelog data to a private structure.
-
-Added a mutex for CamelFolder frozen changelog stuff (it was just easy
-to do, although it isn't needed yet).
-
-Added a single mutex around all other CamelFolder functions that need
-it, this is just the first cut at mt'edness.
-
-Fixed all camel-folder implementations that call any other
-camel-folder functions to call via virtual methods, to bypass the locks.
-
-Added camel-store private data.
-
-Added a single mutex lock for camel-store's folder functions.
-
-Added camel-service private data.
-
-Added a single mutex lock for camel-service's connect stuff.
-
-Added a mutex for remote-store stream io stuff.
-
-Added a mutex for imap, so it can bracket a compound command
-exclusively. Pop doesn't need this since you can only have a single
-folder per store, and the folder interface is already forced
-single-threaded.
-
-Added mutex for camel-session, most operations.
-
-Running the tests finds at least 1 deadlock so far. Need to
-work on that.
-
-Fixed get_summary to ref/unref its items.
-
-Removed the global folder lock from the toplevel
-camel_folder_search(), each implementation must now handle locking.
-
-Fixed the local-folder implementation of searching. imap-folder
-searching should already be mt-safe through the command lock.
-
-Fixed imap summary to ref/unref too.
-
-Built some test cases, and expanded the test framework library to
-handle multiple threads. It works!
-
-Next, added a recursive mutex class, so that locking inside imap had
-any chance of working. Got imap working.
-
-Moved the camel folder summary into the base folder class, and fixed
-everything to use it that way.
-
-Made the vfolder use a real camel-folder-summary rather than a
-hashtable + array that it was using, and probably fixed some problems
-which caused evolution-mail not to always catch flag updates. Oh, and
-made it sync/expunge all its subfolders when sync/expungeing.
-
-Made the camel-folder summary completely mt-safe.
-
-Removed all of the locks on the folder functions dealing directly with
-the summary, so now for example all summary lookups will not be
-interupted by long operations.
-
-Made the nntp newsrc thing mt-safe, because of some unfortunate
-sideeffect of it being called from the summary interaction code in
-nntp-folder.
-
diff --git a/camel/broken-date-parser.c b/camel/broken-date-parser.c
deleted file mode 100644
index 4e168efb64..0000000000
--- a/camel/broken-date-parser.c
+++ /dev/null
@@ -1,318 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@helixcode.com>
- *
- * Copyright 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 Street #330, Boston, MA 02111-1307, USA.
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "broken-date-parser.h"
-
-/* prototypes for functions dealing with broken date formats */
-static GList *datetok (const gchar *date);
-static gint get_days_in_month (gint mon, gint year);
-static gint get_weekday (gchar *str);
-static gint get_month (gchar *str);
-
-static char *tz_months [] = {
- "Jan", "Feb", "Mar", "Apr", "May", "Jun",
- "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
-};
-
-/*****************************************************************************
- * The following functions are here in the case of badly broken date formats *
- * *
- * -- fejj@helixcode.com *
- *****************************************************************************/
-
-typedef struct {
- gchar dow[6]; /* day of week (should only need 4 chars) */
- gint day;
- gint mon; /* 1->12 or 0 if invalid */
- gint year;
- gint hour;
- gint min;
- gint sec;
- gchar zone[6]; /* time zone */
-} date_t;
-
-static
-GList *datetok (const gchar *date)
-{
- GList *tokens = NULL;
- gchar *token, *start, *end;
-
- start = (gchar *) date;
- while (*start) {
- /* find the end of this token */
- for (end = start; *end && *end != ' '; end++);
-
- token = g_strndup (start, (end - start));
-
- if (token && *token)
- tokens = g_list_append (tokens, token);
- else
- g_free (token);
-
- if (*end)
- start = end + 1;
- else
- break;
- }
-
- return tokens;
-}
-
-static gint
-get_days_in_month (gint mon, gint year)
-{
- switch (mon) {
- case 1: case 3: case 5: case 7: case 8: case 10: case 12:
- return 31;
- case 4: case 6: case 9: case 11:
- return 30;
- case 2:
- if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0)
- return 29;
- return 28;
- default:
- return 30;
- }
-}
-
-static gint
-get_weekday (gchar *str)
-{
- g_return_val_if_fail ((str != NULL), 0);
-
- if (strncmp (str, "Mon", 3) == 0) {
- return 1;
- } else if (strncmp (str, "Tue", 3) == 0) {
- return 2;
- } else if (strncmp (str, "Wed", 3) == 0) {
- return 3;
- } else if (strncmp (str, "Thu", 3) == 0) {
- return 4;
- } else if (strncmp (str, "Fri", 3) == 0) {
- return 5;
- } else if (strncmp (str, "Sat", 3) == 0) {
- return 6;
- } else if (strncmp (str, "Sun", 3) == 0) {
- return 7;
- }
-
- return 0; /* unknown week day */
-}
-
-static gint
-get_month (gchar *str)
-{
- g_return_val_if_fail (str != NULL, 0);
-
- if (strncmp (str, "Jan", 3) == 0) {
- return 1;
- } else if (strncmp (str, "Feb", 3) == 0) {
- return 2;
- } else if (strncmp (str, "Mar", 3) == 0) {
- return 3;
- } else if (strncmp (str, "Apr", 3) == 0) {
- return 4;
- } else if (strncmp (str, "May", 3) == 0) {
- return 5;
- } else if (strncmp (str, "Jun", 3) == 0) {
- return 6;
- } else if (strncmp (str, "Jul", 3) == 0) {
- return 7;
- } else if (strncmp (str, "Aug", 3) == 0) {
- return 8;
- } else if (strncmp (str, "Sep", 3) == 0) {
- return 9;
- } else if (strncmp (str, "Oct", 3) == 0) {
- return 10;
- } else if (strncmp (str, "Nov", 3) == 0) {
- return 11;
- } else if (strncmp (str, "Dec", 3) == 0) {
- return 12;
- }
-
- return 0; /* unknown month */
-}
-
-gchar *
-parse_broken_date (const gchar *datestr)
-{
- GList *tokens;
- date_t date;
- gchar *token, *ptr, *newdatestr;
- guint len, i, retval;
- gdouble tz = 0.0;
-
- memset ((void*)&date, 0, sizeof (date_t));
- g_return_val_if_fail (datestr != NULL, NULL);
-
- tokens = datetok (datestr);
- len = g_list_length (tokens);
- for (i = 0; i < len; i++) {
- token = g_list_nth_data (tokens, i);
-
- if ((retval = get_weekday (token))) {
- strncpy (date.dow, datestr, 4);
- } else if ((retval = get_month (token))) {
- date.mon = retval;
- } else if (strlen (token) <= 2) {
- /* this could be a 1 or 2 digit day of the month */
- for (retval = 1, ptr = token; *ptr; ptr++)
- if (*ptr < '0' || *ptr > '9')
- retval = 0;
-
- if (retval && atoi (token) <= 31 && !date.day) /* probably should find a better way */
- date.day = atoi (token);
- else /* fubar'd client using a 2-digit year */
- date.year = atoi (token) < 69 ? 2000 + atoi (token) : 1900 + atoi (token);
- } else if (strlen (token) == 4) {
- /* this could be the year... */
- for (retval = 1, ptr = token; *ptr; ptr++)
- if (*ptr < '0' || *ptr > '9')
- retval = 0;
-
- if (retval)
- date.year = atoi (token);
- } else if (strchr (token, ':')) {
- /* this must be the time: hh:mm:ss */
- sscanf (token, "%d:%d:%d", &date.hour, &date.min, &date.sec);
- } else if (*token == '-' || *token == '+') {
- tz = atoi (token) / 100.0;
- }
- }
-
- g_list_free (tokens);
-
- /* adjust times based on time zones */
-
- if (tz != 0) {
- /* check for time-zone shift */
- if (tz > 0) {
- /* correct for positive hours off of UCT */
- date.hour -= (tz / 100);
- tz = (gint)tz % 100;
-
- if (tz > 0) /* correct for positive minutes off of UCT */
- date.min -= (gint)(((gdouble) tz / 100.0) * 60.0);
- } else {
- if (tz < 0) {
- /* correct for negative hours off of UCT */
- tz = -tz;
- date.hour += (tz / 100);
- tz = -((gint)tz % 100);
-
- if (tz < 0)
- date.min -= (gint)(((gdouble) tz / 100.0) * 60.0);
- }
- }
-
- /* adjust seconds to proper range */
- if (date.sec > 59) {
- date.min += (date.sec / 60);
- date.sec = (date.sec % 60);
- }
-
- /* adjust minutes to proper range */
- if (date.min > 59) {
- date.hour += (date.min / 60);
- date.min = (date.min % 60);
- } else {
- if (date.min < 0) {
- date.min = -date.min;
- date.hour -= (date.min / 60) - 1;
- date.min = 60 - (date.min % 60);
- }
- }
-
- /* adjust hours to the proper randge */
- if (date.hour > 23) {
- date.day += (date.hour / 24);
- date.hour -= (date.hour % 24);
- } else {
- if (date.hour < 0) {
- date.hour = -date.hour;
- date.day -= (date.hour / 24) - 1;
- date.hour = 24 - (date.hour % 60);
- }
- }
-
- /* adjust days to the proper range */
- while (date.day > get_days_in_month (date.mon, date.year)) {
- date.day -= get_days_in_month (date.mon, date.year);
- date.mon++;
- if (date.mon > 12) {
- date.year += (date.mon / 12);
- date.mon = (date.mon % 12);
- if (date.mon == 0) {
- /* month sanity check */
- date.mon = 12;
- date.year -= 1;
- }
- }
- }
-
- while (date.day < 1) {
- date.day += get_days_in_month (date.mon, date.year);
- date.mon--;
- if (date.mon < 1) {
- date.mon = -date.mon;
- date.year -= (date.mon / 12) - 1;
- date.mon = 12 - (date.mon % 12);
- }
- }
-
- /* adjust months to the proper range */
- if (date.mon > 12) {
- date.year += (date.mon / 12);
- date.mon = (date.mon % 12);
- if (date.mon == 0) {
- /* month sanity check */
- date.mon = 12;
- date.year -= 1;
- }
- } else {
- if (date.mon < 1) {
- date.mon = -date.mon;
- date.year -= (date.mon / 12) - 1;
- date.mon = 12 - (date.mon % 12);
- }
- }
- }
-
- /* now lets print this date into a string with the correct format */
- newdatestr = g_strdup_printf ("%s, %d %s %d %s%d:%s%d:%s%d -0000",
- date.dow, date.day, tz_months[date.mon-1],
- date.year,
- date.hour > 10 ? "" : "0", date.hour,
- date.min > 10 ? "" : "0", date.min,
- date.sec > 10 ? "" : "0", date.sec);
-
- return newdatestr;
-}
-
-/*****************************************************************************
- * This ends the code for the broken date parser... *
- * *
- * -- fejj@helixcode.com *
- *****************************************************************************/
diff --git a/camel/broken-date-parser.h b/camel/broken-date-parser.h
deleted file mode 100644
index 57607a7bdf..0000000000
--- a/camel/broken-date-parser.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@helixcode.com>
- *
- * Copyright 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 Street #330, Boston, MA 02111-1307, USA.
- *
- */
-
-#include <glib.h>
-
-/* prototypes for functions dealing with broken date formats */
-
-gchar *parse_broken_date (const gchar *datestr);
-
-
-
-
-
diff --git a/camel/camel-address.c b/camel/camel-address.c
deleted file mode 100644
index a1c0990dec..0000000000
--- a/camel/camel-address.c
+++ /dev/null
@@ -1,240 +0,0 @@
-/*
- * Copyright (C) 2000 Helix Code Inc.
- *
- * Authors: Michael Zucchi <notzed@helixcode.com>
- *
- * 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_finalize (CamelObject *obj);
-
-static CamelObjectClass *camel_address_parent;
-
-static void
-camel_address_class_init (CamelAddressClass *klass)
-{
- camel_address_parent = camel_type_get_global_classfuncs (camel_object_get_type ());
-}
-
-static void
-camel_address_init (CamelAddress *obj)
-{
- obj->addresses = g_ptr_array_new();
-}
-
-static void
-camel_address_finalize (CamelObject *obj)
-{
- camel_address_remove((CamelAddress *)obj, -1);
- g_ptr_array_free(((CamelAddress *)obj)->addresses, TRUE);
-}
-
-CamelType
-camel_address_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (camel_object_get_type (), "CamelAddress",
- sizeof (CamelAddress),
- sizeof (CamelAddressClass),
- (CamelObjectClassInitFunc) camel_address_class_init,
- NULL,
- (CamelObjectInitFunc) camel_address_init,
- (CamelObjectFinalizeFunc) camel_address_finalize);
- }
-
- return type;
-}
-
-/**
- * camel_address_new:
- *
- * Create a new CamelAddress object.
- *
- * Return value: A new CamelAddress widget.
- **/
-CamelAddress *
-camel_address_new (void)
-{
- CamelAddress *new = CAMEL_ADDRESS(camel_object_new(camel_address_get_type()));
- return new;
-}
-
-/**
- * camel_address_new_clone:
- * @in:
- *
- * Clone an existing address type.
- *
- * Return value:
- **/
-CamelAddress *
-camel_address_new_clone(const CamelAddress *in)
-{
- CamelAddress *new = CAMEL_ADDRESS(camel_object_new(CAMEL_OBJECT_GET_TYPE(in)));
-
- camel_address_cat(new, in);
- return new;
-}
-
-/**
- * camel_address_length:
- * @a:
- *
- * Return the number of addresses stored in the address @a.
- *
- * Return value:
- **/
-int
-camel_address_length(CamelAddress *a)
-{
- return a->addresses->len;
-}
-
-/**
- * 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(CAMEL_IS_ADDRESS(a), -1);
-
- return CAMEL_ADDRESS_CLASS (CAMEL_OBJECT_GET_CLASS (a))->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(CAMEL_IS_ADDRESS(a), NULL);
-
- return CAMEL_ADDRESS_CLASS (CAMEL_OBJECT_GET_CLASS (a))->encode(a);
-}
-
-/**
- * camel_address_unformat:
- * @a:
- * @raw:
- *
- * Attempt to convert a previously formatted and/or edited
- * address back into internal form.
- *
- * Return value: -1 if it could not be parsed, or the number
- * of valid addresses found.
- **/
-int
-camel_address_unformat(CamelAddress *a, const char *raw)
-{
- g_return_val_if_fail(CAMEL_IS_ADDRESS(a), -1);
-
- return CAMEL_ADDRESS_CLASS (CAMEL_OBJECT_GET_CLASS (a))->unformat(a, raw);
-}
-
-/**
- * camel_address_format:
- * @a:
- *
- * Format an address in a format suitable for display.
- *
- * Return value: The formatted address.
- **/
-char *
-camel_address_format (CamelAddress *a)
-{
- if (a == NULL)
- return NULL;
-
- g_return_val_if_fail(CAMEL_IS_ADDRESS(a), NULL);
-
- return CAMEL_ADDRESS_CLASS (CAMEL_OBJECT_GET_CLASS (a))->format(a);
-}
-
-/**
- * camel_address_cat:
- * @dest:
- * @source:
- *
- * Concatenate one address onto another. The addresses must
- * be of the same type.
- *
- * Return value:
- **/
-int
-camel_address_cat (CamelAddress *dest, const CamelAddress *source)
-{
- g_return_val_if_fail(CAMEL_IS_ADDRESS(dest), -1);
- g_return_val_if_fail(CAMEL_IS_ADDRESS(source), -1);
-
- return CAMEL_ADDRESS_CLASS(CAMEL_OBJECT_GET_CLASS(dest))->cat(dest, source);
-}
-
-/**
- * camel_address_copy:
- * @dest:
- * @source:
- *
- * Copy an address contents.
- *
- * Return value:
- **/
-int
-camel_address_copy (CamelAddress *dest, const CamelAddress *source)
-{
- g_return_val_if_fail(CAMEL_IS_ADDRESS(dest), -1);
- g_return_val_if_fail(CAMEL_IS_ADDRESS(source), -1);
-
- camel_address_remove(dest, -1);
- return camel_address_cat(dest, source);
-}
-
-/**
- * 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(CAMEL_IS_ADDRESS(a));
-
- if (index == -1) {
- for (index=a->addresses->len; index>-1; index--)
- CAMEL_ADDRESS_CLASS (CAMEL_OBJECT_GET_CLASS (a))->remove(a, index);
- } else {
- CAMEL_ADDRESS_CLASS (CAMEL_OBJECT_GET_CLASS (a))->remove(a, index);
- }
-}
diff --git a/camel/camel-address.h b/camel/camel-address.h
deleted file mode 100644
index 5115ee652b..0000000000
--- a/camel/camel-address.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (C) 2000 Helix Code Inc.
- *
- * Authors: Michael Zucchi <notzed@helixcode.com>
- *
- * 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 <glib.h>
-#include <camel/camel-object.h>
-
-#define CAMEL_ADDRESS(obj) CAMEL_CHECK_CAST (obj, camel_address_get_type (), CamelAddress)
-#define CAMEL_ADDRESS_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_address_get_type (), CamelAddressClass)
-#define CAMEL_IS_ADDRESS(obj) CAMEL_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 *);
-
- int (*unformat) (CamelAddress *, const char *raw);
- char *(*format) (CamelAddress *);
-
- int (*cat) (CamelAddress *, const CamelAddress *);
-
- void (*remove) (CamelAddress *, int index);
-};
-
-guint camel_address_get_type (void);
-CamelAddress *camel_address_new (void);
-CamelAddress *camel_address_new_clone (const CamelAddress *);
-int camel_address_length (CamelAddress *);
-
-int camel_address_decode (CamelAddress *, const char *);
-char *camel_address_encode (CamelAddress *);
-int camel_address_unformat (CamelAddress *, const char *);
-char *camel_address_format (CamelAddress *);
-
-int camel_address_cat (CamelAddress *, const CamelAddress *);
-int camel_address_copy (CamelAddress *, const CamelAddress *);
-
-void camel_address_remove (CamelAddress *, int index);
-
-#endif /* ! _CAMEL_ADDRESS_H */
diff --git a/camel/camel-charset-map-private.h b/camel/camel-charset-map-private.h
deleted file mode 100644
index 18b603148a..0000000000
--- a/camel/camel-charset-map-private.h
+++ /dev/null
@@ -1,4345 +0,0 @@
-/* This file is automatically generated: DO NOT EDIT */
-
-static unsigned char m000[256] = {
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xd0, 0xd0, 0xf2, 0xf7, 0xf2, 0xf0, 0xff,
- 0xf7, 0xf0, 0xb0, 0xf0, 0xe0, 0xff, 0xf2, 0x94,
- 0xf7, 0xf0, 0xf2, 0xf2, 0xd7, 0xd2, 0xd0, 0xf2,
- 0xd7, 0xd0, 0x90, 0xe0, 0xd0, 0xf2, 0xd2, 0xc0,
- 0xd2, 0xc7, 0xc7, 0xc6, 0xc7, 0xc4, 0xc4, 0xc3,
- 0xc2, 0xc7, 0xc2, 0xc7, 0xc2, 0xc7, 0xc7, 0xc2,
- 0x42, 0xc2, 0xe2, 0xc3, 0xc7, 0xc4, 0xc7, 0xc7,
- 0xc4, 0xc2, 0xc7, 0xd6, 0xd7, 0x51, 0x50, 0x97,
- 0x82, 0x87, 0x87, 0x86, 0x87, 0x84, 0x84, 0x83,
- 0x82, 0x87, 0x82, 0x87, 0x82, 0x87, 0x87, 0x82,
- 0x02, 0x82, 0x82, 0x93, 0x97, 0x94, 0x97, 0xd7,
- 0x94, 0x92, 0x97, 0xd6, 0xd7, 0x51, 0x50, 0xf0,
-};
-
-static unsigned char m001[256] = {
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0x0f, 0x2f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f,
- 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x2f, 0x0f, 0x2f,
- 0x2f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f,
- 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x2f, 0x0f, 0x0f,
- 0xff, 0x28, 0x6a, 0x6e, 0x72, 0x28, 0x72, 0x7f,
- 0x70, 0xfe, 0x28, 0x7a, 0x7a, 0x7f, 0x7e, 0x68,
- 0xfb, 0x7a, 0xea, 0x6a, 0x70, 0x7a, 0x7e, 0xfb,
- 0x70, 0x6a, 0x28, 0x7a, 0x62, 0x62, 0x62, 0x28,
- 0x2c, 0x3d, 0x3d, 0x2d, 0x7f, 0x6f, 0x6f, 0x3c,
- 0x2c, 0x7f, 0x2c, 0x3d, 0x2c, 0x3d, 0x3d, 0x2d,
- 0x29, 0x2c, 0x2c, 0x7f, 0x3d, 0x6f, 0x7f, 0x7a,
- 0x6f, 0x2c, 0x3d, 0x2d, 0x7f, 0x3d, 0x29, 0x7f,
- 0x2c, 0x3d, 0x3d, 0x2d, 0x7f, 0x6f, 0x6f, 0x3c,
- 0x2c, 0x7f, 0x2c, 0x3d, 0x2c, 0x3d, 0x3d, 0x2d,
- 0x29, 0x2c, 0x2c, 0x7f, 0x3d, 0x6f, 0x7f, 0xfa,
- 0x6f, 0x2c, 0x3d, 0x2d, 0x7f, 0x3d, 0x29, 0x2c,
-};
-
-static unsigned char m002[256] = {
- 0x1f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
- 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
- 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
- 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
- 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f,
- 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f,
- 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f,
- 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f,
- 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f,
- 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f,
- 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f,
- 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f,
- 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f,
- 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f,
- 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f,
- 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x3f, 0x3f,
- 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e,
- 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e,
- 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e,
- 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e,
- 0x1f, 0x18, 0x58, 0x58, 0x18, 0x58, 0x18, 0x7c,
- 0x78, 0x19, 0x18, 0x1c, 0x58, 0x18, 0x18, 0x18,
- 0x79, 0x78, 0x19, 0x18, 0x78, 0x18, 0x78, 0x19,
- 0x18, 0x18, 0x18, 0x1c, 0x18, 0x18, 0x18, 0x18,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x02, 0x02, 0x1a, 0x1a, 0x18,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x79,
- 0x18, 0x18, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a,
-};
-
-static unsigned char m010[256] = {
- 0x04, 0x04, 0x01, 0x01, 0x05, 0x05, 0x01, 0x01,
- 0x02, 0x02, 0x02, 0x02, 0x05, 0x05, 0x01, 0x01,
- 0x05, 0x05, 0x04, 0x04, 0x00, 0x00, 0x04, 0x04,
- 0x05, 0x05, 0x01, 0x01, 0x02, 0x02, 0x82, 0x82,
- 0x02, 0x02, 0x04, 0x04, 0x02, 0x02, 0x02, 0x02,
- 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x04, 0x04,
- 0x82, 0x82, 0x00, 0x00, 0x02, 0x02, 0x04, 0x04,
- 0x04, 0x01, 0x01, 0x04, 0x04, 0x01, 0x01, 0x00,
- 0x00, 0x01, 0x01, 0x01, 0x01, 0x04, 0x04, 0x01,
- 0x01, 0x00, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00,
- 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x04, 0x04,
- 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x83, 0x83,
- 0x05, 0x05, 0x01, 0x01, 0x01, 0x01, 0x04, 0x04,
- 0x04, 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x01,
- 0x01, 0x01, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x01, 0x01, 0x03, 0x03, 0x05, 0x05, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m011[256] = {
- 0x43, 0x43, 0x10, 0x10, 0x53, 0x53, 0x52, 0x52,
- 0x00, 0x00, 0x04, 0x04, 0x53, 0x53, 0x10, 0x10,
- 0x11, 0x11, 0x43, 0x43, 0x00, 0x00, 0x43, 0x43,
- 0x53, 0x53, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00,
- 0x04, 0x04, 0x43, 0x43, 0x00, 0x00, 0x00, 0x00,
- 0x01, 0x01, 0x43, 0x43, 0x00, 0x00, 0x43, 0x43,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x43,
- 0x01, 0x10, 0x10, 0x43, 0x43, 0x10, 0x10, 0x00,
- 0x00, 0x52, 0x52, 0x52, 0x52, 0x43, 0x43, 0x10,
- 0x10, 0x00, 0x01, 0x01, 0x43, 0x43, 0x00, 0x00,
- 0x10, 0x10, 0x28, 0x28, 0x10, 0x10, 0x42, 0x42,
- 0x10, 0x10, 0x52, 0x52, 0x00, 0x00, 0x10, 0x10,
- 0x7b, 0x7b, 0x10, 0x10, 0x10, 0x10, 0x01, 0x01,
- 0x01, 0x01, 0x43, 0x43, 0x00, 0x00, 0x10, 0x10,
- 0x10, 0x10, 0x43, 0x43, 0x04, 0x04, 0x04, 0x04,
- 0x2c, 0x52, 0x52, 0x52, 0x52, 0x7b, 0x7b, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m020[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x03, 0x07, 0x00, 0x05, 0x00, 0x01, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m021[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x50,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x10, 0x50, 0x00, 0x50, 0x20, 0x10, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m022[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m030[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x20, 0x00,
- 0x20, 0x20, 0x20, 0x00, 0x20, 0x00, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m032[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x00, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x00, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m040[256] = {
- 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
- 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x08, 0x08,
- 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
- 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
- 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
- 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
- 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
- 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
- 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
- 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
- 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
- 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x08, 0x08,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m041[256] = {
- 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
- 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
- 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
- 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
- 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
- 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
- 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
- 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
- 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m042[256] = {
- 0x00, 0x61, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61,
- 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61,
- 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61,
- 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61,
- 0x61, 0x61, 0x61, 0x61, 0x61, 0x60, 0x61, 0x61,
- 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61,
- 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61,
- 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61, 0x61,
- 0x00, 0x61, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m050[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
- 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
- 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
- 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m052[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
- 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
- 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
- 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
- 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x00,
- 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x00,
- 0x00, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
- 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
- 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
- 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
- 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
- 0x00, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m060[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10,
- 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10,
- 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10,
- 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10,
- 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10,
- 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10,
- 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m0e2[256] = {
- 0x00, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
- 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
- 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m102[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
- 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
- 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
- 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
- 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m1e1[256] = {
- 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m200[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x40,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m201[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x70, 0x71, 0x00, 0x00, 0x00,
- 0x70, 0x72, 0x70, 0x00, 0x72, 0x72, 0x72, 0x00,
- 0x70, 0x70, 0xf0, 0x00, 0x00, 0x00, 0x70, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x70, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m202[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x64, 0x00, 0x00, 0x00, 0x04, 0x60, 0x40, 0x00,
- 0x78, 0x78, 0x00, 0x00, 0x60, 0x60, 0x18, 0x18,
- 0x60, 0x60, 0x01, 0x00, 0x00, 0x60, 0x64, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x40, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m210[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m211[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m212[256] = {
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m221[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m222[256] = {
- 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x20, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x61, 0x00, 0x00, 0x60, 0x60, 0x20,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, 0x20, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x01, 0x01, 0x60, 0x60,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m231[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m232[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m242[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m251[256] = {
- 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
- 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
- 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
- 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
- 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
- 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
- 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
- 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m252[256] = {
- 0x61, 0x60, 0x61, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x61, 0x00, 0x00, 0x60,
- 0x61, 0x00, 0x00, 0x60, 0x61, 0x00, 0x00, 0x60,
- 0x61, 0x00, 0x00, 0x60, 0x61, 0x60, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x61, 0x60, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x61, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x60, 0x61, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x60, 0x61, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x01, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
- 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
- 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x61, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m262[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m302[256] = {
- 0x60, 0x60, 0x60, 0x60, 0x00, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x40, 0x20, 0x00, 0x20,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x60, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x60, 0x00,
-};
-
-static unsigned char m322[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m332[256] = {
- 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
- 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x20, 0x20, 0x00, 0x00, 0x20, 0x20,
- 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00,
- 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x20, 0x20, 0x00, 0x00, 0x20, 0x00, 0x00,
- 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x20, 0x20, 0x20, 0x20, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x20, 0x00,
- 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m4e2[256] = {
- 0x60, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x00, 0x60, 0x60, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x20, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x60, 0x60, 0x00, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x00, 0x60, 0x60, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x60, 0x60, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x60, 0x00, 0x60, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x60, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60,
- 0x00, 0x20, 0x00, 0x60, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x20, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m4f2[256] = {
- 0x20, 0x60, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x60, 0x20, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x00, 0x60, 0x00, 0x60, 0x20, 0x60,
- 0x00, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x20, 0x60, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x60, 0x20, 0x00, 0x20, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x20, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x20, 0x60, 0x00, 0x00, 0x20, 0x60, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x60, 0x60, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x60, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x60, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x20,
-};
-
-static unsigned char m502[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x60, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x20, 0x60,
- 0x00, 0x60, 0x20, 0x60, 0x60, 0x60, 0x60, 0x00,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x20, 0x00, 0x20, 0x60, 0x00, 0x00, 0x20, 0x60,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x20, 0x00, 0x60, 0x00, 0x60, 0x60, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x60, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x20, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x20, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m512[256] = {
- 0x60, 0x60, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x60, 0x60, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x60,
- 0x60, 0x60, 0x00, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x20, 0x60, 0x60, 0x60, 0x60, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x20, 0x60, 0x00, 0x00,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x60, 0x60, 0x00, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x00, 0x60, 0x60, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x60, 0x60, 0x60, 0x00,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x20, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x60, 0x60, 0x00, 0x20, 0x60, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x60, 0x60, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00,
-};
-
-static unsigned char m522[256] = {
- 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x60, 0x60,
- 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x20, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x60,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x60, 0x60, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x20, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x20, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, 0x20,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x20, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60,
- 0x60, 0x60, 0x00, 0x20, 0x00, 0x60, 0x60, 0x60,
- 0x60, 0x00, 0x60, 0x60, 0x60, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x60,
-};
-
-static unsigned char m532[256] = {
- 0x20, 0x60, 0x60, 0x00, 0x00, 0x60, 0x60, 0x20,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x60, 0x20, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x60, 0x00, 0x60, 0x00, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x60, 0x60, 0x20, 0x60, 0x60, 0x60, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x60, 0x00, 0x20, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x60,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x20, 0x00, 0x60,
- 0x00, 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x60, 0x60,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m542[256] = {
- 0x00, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x60, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x60, 0x00, 0x60, 0x60, 0x60, 0x60, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x60, 0x00, 0x60, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x20, 0x60, 0x60, 0x00, 0x60, 0x60,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x60, 0x20, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x00,
- 0x60, 0x60, 0x60, 0x00, 0x60, 0x00, 0x00, 0x60,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x20,
-};
-
-static unsigned char m552[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x20, 0x60,
- 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x60, 0x00, 0x60, 0x60, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00,
-};
-
-static unsigned char m562[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x60,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60,
-};
-
-static unsigned char m572[256] = {
- 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x20, 0x60, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x20, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x20,
- 0x20, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m582[256] = {
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x60, 0x00, 0x00, 0x60,
- 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x20, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x20, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60,
- 0x60, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00,
-};
-
-static unsigned char m592[256] = {
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x20, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x60, 0x60, 0x00, 0x20, 0x60, 0x60, 0x00, 0x60,
- 0x60, 0x00, 0x60, 0x20, 0x00, 0x20, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x20, 0x00, 0x60, 0x00, 0x60,
- 0x60, 0x60, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x20, 0x60, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x20, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,
-};
-
-static unsigned char m5a2[256] = {
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m5b2[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x60, 0x60, 0x20, 0x60,
- 0x60, 0x00, 0x60, 0x60, 0x60, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60,
- 0x60, 0x60, 0x00, 0x60, 0x60, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x60, 0x60, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x60, 0x60, 0x60, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x20, 0x00, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x20, 0x00, 0x00, 0x60, 0x00, 0x60, 0x60, 0x60,
- 0x00, 0x60, 0x60, 0x00, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x00, 0x60, 0x20, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x60, 0x60, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x60,
-};
-
-static unsigned char m5c2[256] = {
- 0x00, 0x60, 0x60, 0x00, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x00, 0x60, 0x60, 0x60,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x20, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x60, 0x00, 0x60, 0x60, 0x00, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00,
- 0x60, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x60, 0x60,
- 0x60, 0x00, 0x20, 0x60, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x20, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x60, 0x00, 0x00,
-};
-
-static unsigned char m5d2[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x20,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x60, 0x20, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x20, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x20, 0x20, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x20, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x60, 0x60,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x60, 0x00,
-};
-
-static unsigned char m5e2[256] = {
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x60, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x60, 0x60, 0x60, 0x00,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x00, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x60, 0x00, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x60, 0x60, 0x00, 0x60, 0x60,
- 0x60, 0x00, 0x60, 0x60, 0x60, 0x00, 0x60, 0x60,
-};
-
-static unsigned char m5f2[256] = {
- 0x00, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, 0x60,
- 0x60, 0x60, 0x00, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x20, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x20, 0x60, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x20,
- 0x00, 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, 0x60,
- 0x60, 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x20,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x60, 0x60, 0x00, 0x00, 0x60, 0x60, 0x20, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60,
-};
-
-static unsigned char m602[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x60, 0x60, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x20, 0x00, 0x60,
- 0x60, 0x00, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x60, 0x20, 0x00, 0x00,
- 0x00, 0x60, 0x20, 0x60, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x60, 0x60, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x20, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x20, 0x60,
- 0x60, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x20, 0x60, 0x60, 0x00, 0x60, 0x60,
- 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m612[256] = {
- 0x60, 0x60, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60,
- 0x00, 0x20, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x20, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x20, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x20,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x60, 0x60, 0x60, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x60, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x60, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x60,
- 0x60, 0x60, 0x00, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x20, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x60, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x60,
- 0x60, 0x00, 0x60, 0x00, 0x60, 0x60, 0x60, 0x60,
-};
-
-static unsigned char m622[256] = {
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x60, 0x00, 0x60, 0x60, 0x60, 0x00,
- 0x60, 0x60, 0x60, 0x20, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x60, 0x60, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x60, 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x60, 0x00, 0x60, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60, 0x60,
- 0x60, 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x00, 0x60, 0x60, 0x00, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x60,
- 0x60, 0x60, 0x00, 0x60, 0x60, 0x60, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x60,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60,
-};
-
-static unsigned char m632[256] = {
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x60, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x00, 0x60, 0x00, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x20, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m642[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x20, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x60, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x20, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00,
-};
-
-static unsigned char m652[256] = {
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x00, 0x60, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x20, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x60, 0x60, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x60, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x60, 0x00, 0x00, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m662[256] = {
- 0x20, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x20, 0x60, 0x00, 0x60, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x20, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x20, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x20, 0x60, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x20, 0x60,
- 0x00, 0x20, 0x00, 0x00, 0x60, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x20, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x20,
- 0x00, 0x20, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x20, 0x60, 0x60,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x60, 0x00, 0x00, 0x20, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x60, 0x20, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x20, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x20, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60, 0x20,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x60, 0x60, 0x60, 0x00, 0x60,
- 0x60, 0x60, 0x20, 0x20, 0x60, 0x60, 0x60, 0x60,
-};
-
-static unsigned char m672[256] = {
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x60, 0x00, 0x60, 0x20, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x60, 0x00, 0x60, 0x60, 0x60, 0x60, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60, 0x60,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x60, 0x60, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x20, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x60, 0x60,
- 0x60, 0x60, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00,
- 0x20, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x60, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60, 0x60,
- 0x00, 0x60, 0x00, 0x60, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x60,
-};
-
-static unsigned char m682[256] = {
- 0x00, 0x20, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x60, 0x60, 0x60, 0x60, 0x20, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x60, 0x60, 0x20, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60,
- 0x60, 0x60, 0x00, 0x60, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x20, 0x60, 0x60, 0x60, 0x00, 0x60, 0x00, 0x20,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x60, 0x00, 0x60,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m692[256] = {
- 0x60, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x00, 0x60, 0x60, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x60, 0x60, 0x60, 0x00,
- 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x20, 0x00, 0x60, 0x60, 0x00, 0x60, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x00, 0x60,
- 0x60, 0x60, 0x00, 0x00, 0x60, 0x60, 0x60, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x20, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x60, 0x60, 0x60, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60,
-};
-
-static unsigned char m6a2[256] = {
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x60, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x20, 0x60,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x20, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x20, 0x00, 0x20, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m6b2[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60,
- 0x60, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x60, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x60, 0x60, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x60, 0x00, 0x20, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m6c2[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x20,
- 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x20, 0x60, 0x60, 0x60,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x20,
- 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x20, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x60, 0x20, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m6d2[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x60, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x60, 0x00, 0x60, 0x20,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x20,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x20, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x20,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x60, 0x60, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x20, 0x60, 0x00, 0x60, 0x00, 0x60,
- 0x20, 0x60, 0x60, 0x60, 0x20, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m6e2[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x00, 0x60, 0x00, 0x60,
- 0x60, 0x60, 0x00, 0x60, 0x60, 0x60, 0x60, 0x20,
- 0x00, 0x60, 0x00, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x20, 0x60, 0x00, 0x20, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x20, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x20,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60,
-};
-
-static unsigned char m6f2[256] = {
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x60, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x20, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x60, 0x60,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x20, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00,
-};
-
-static unsigned char m702[256] = {
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x20, 0x00, 0x20,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x60, 0x00, 0x60, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x20, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x20, 0x60, 0x60, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x60, 0x20, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
-};
-
-static unsigned char m712[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x60, 0x60, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x20, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x60, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x60, 0x00, 0x20, 0x60,
-};
-
-static unsigned char m722[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x20, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
-};
-
-static unsigned char m732[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x20, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x20,
- 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x20, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x20, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x20, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
-};
-
-static unsigned char m742[256] = {
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x60, 0x20,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x20, 0x00,
- 0x00, 0x20, 0x20, 0x00, 0x00, 0x00, 0x20, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x60, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x60, 0x00, 0x60, 0x60,
- 0x60, 0x00, 0x20, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x20, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x20,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m752[256] = {
- 0x00, 0x20, 0x00, 0x60, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x20,
- 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x60, 0x60, 0x60, 0x60,
- 0x00, 0x60, 0x60, 0x60, 0x00, 0x60, 0x00, 0x20,
- 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x60, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x60, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x60,
-};
-
-static unsigned char m762[256] = {
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x60, 0x60, 0x00, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x60, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x60, 0x60, 0x60, 0x60, 0x60, 0x00,
- 0x60, 0x00, 0x20, 0x60, 0x60, 0x00, 0x60, 0x60,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x60, 0x20, 0x20, 0x00, 0x20, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60,
- 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x60, 0x60,
- 0x00, 0x60, 0x00, 0x60, 0x60, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00,
-};
-
-static unsigned char m772[256] = {
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60,
- 0x60, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x60, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m782[256] = {
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x20, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x20, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
-};
-
-static unsigned char m792[256] = {
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x60, 0x60, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x60, 0x60,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x20, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x60, 0x60, 0x00, 0x60, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m7a2[256] = {
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60,
- 0x60, 0x60, 0x60, 0x00, 0x60, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x60, 0x60, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x00, 0x60,
- 0x60, 0x00, 0x60, 0x60, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x20, 0x60, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x60, 0x60, 0x00, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x00, 0x60, 0x60, 0x20,
- 0x00, 0x00, 0x60, 0x20, 0x00, 0x60, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
-};
-
-static unsigned char m7b2[256] = {
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x60, 0x60, 0x00, 0x60, 0x60, 0x60, 0x00, 0x60,
- 0x60, 0x60, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x60, 0x00, 0x60,
- 0x60, 0x60, 0x60, 0x00, 0x60, 0x60, 0x20, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60, 0x60,
- 0x00, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m7c2[256] = {
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x60, 0x00, 0x60, 0x60, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x60,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00,
-};
-
-static unsigned char m7d2[256] = {
- 0x60, 0x00, 0x60, 0x00, 0x60, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x60, 0x60,
- 0x60, 0x00, 0x60, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x60, 0x60, 0x60, 0x60, 0x00,
- 0x20, 0x00, 0x00, 0x60, 0x60, 0x00, 0x60, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x20, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x60,
- 0x20, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x00, 0x60, 0x60, 0x00, 0x20,
- 0x60, 0x00, 0x60, 0x60, 0x00, 0x60, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x20, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x60, 0x60, 0x60, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m7e2[256] = {
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x60, 0x60, 0x60, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x20, 0x00, 0x60, 0x60, 0x60, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x60, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x20, 0x00, 0x60, 0x00, 0x60, 0x60,
- 0x60, 0x00, 0x60, 0x60, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m7f2[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x20,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x60, 0x60, 0x60,
- 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x20, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m802[256] = {
- 0x60, 0x60, 0x00, 0x60, 0x60, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60,
- 0x60, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x60, 0x60, 0x60, 0x00, 0x60, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x60,
- 0x00, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x60, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x60, 0x60, 0x00, 0x60,
- 0x00, 0x60, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
-};
-
-static unsigned char m812[256] = {
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x60, 0x00, 0x60, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x60, 0x60, 0x60,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x60, 0x00, 0x60, 0x00,
-};
-
-static unsigned char m822[256] = {
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60,
- 0x60, 0x60, 0x60, 0x00, 0x60, 0x60, 0x60, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x60, 0x60, 0x00, 0x60, 0x60,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m832[256] = {
- 0x00, 0x20, 0x60, 0x60, 0x60, 0x60, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x60, 0x00, 0x60, 0x60, 0x60, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x20,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x20,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x60, 0x60, 0x00, 0x60, 0x00, 0x20, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00,
-};
-
-static unsigned char m842[256] = {
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x20, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x20, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x20, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60,
-};
-
-static unsigned char m852[256] = {
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x60, 0x60, 0x00, 0x60,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x20, 0x00, 0x60, 0x00, 0x60,
- 0x60, 0x20, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x60, 0x20, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, 0x60, 0x60,
- 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00,
-};
-
-static unsigned char m862[256] = {
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x60,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x60, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00,
-};
-
-static unsigned char m872[256] = {
- 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00,
-};
-
-static unsigned char m882[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x20,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x60, 0x20, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x60, 0x60, 0x60, 0x00,
-};
-
-static unsigned char m892[256] = {
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x20, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x60, 0x60,
- 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x60,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x60, 0x60, 0x00, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m8a2[256] = {
- 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x20, 0x60, 0x00, 0x00, 0x60, 0x60,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x60, 0x00, 0x60, 0x20,
- 0x00, 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x60, 0x60, 0x60, 0x00,
- 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x20, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x60, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x60, 0x00, 0x60, 0x60, 0x60, 0x60, 0x20,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x20, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x60, 0x00, 0x60, 0x20,
- 0x60, 0x60, 0x60, 0x00, 0x60, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x20, 0x60,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00,
-};
-
-static unsigned char m8b2[256] = {
- 0x60, 0x60, 0x60, 0x00, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x60,
- 0x00, 0x60, 0x60, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60,
- 0x60, 0x60, 0x60, 0x00, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x20,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m8c2[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x60, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x00, 0x60, 0x60, 0x60, 0x00, 0x60, 0x60,
- 0x60, 0x00, 0x00, 0x60, 0x60, 0x60, 0x00, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x60, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x60, 0x60, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x20, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00,
-};
-
-static unsigned char m8d2[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x60,
- 0x60, 0x00, 0x60, 0x60, 0x00, 0x60, 0x00, 0x60,
- 0x60, 0x00, 0x20, 0x60, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x60, 0x60, 0x00, 0x20, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60,
-};
-
-static unsigned char m8e2[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x60,
- 0x60, 0x60, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x60,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x60, 0x00, 0x60, 0x60, 0x60, 0x60, 0x00, 0x20,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x60, 0x60, 0x60, 0x00,
-};
-
-static unsigned char m8f2[256] = {
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x60, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x60, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x60, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x00, 0x60, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60,
- 0x60, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00,
-};
-
-static unsigned char m902[256] = {
- 0x60, 0x60, 0x00, 0x60, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x00, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x60, 0x60, 0x60, 0x00, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x60, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x20,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x60, 0x60,
- 0x60, 0x00, 0x60, 0x00, 0x60, 0x60, 0x00, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x20, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
-};
-
-static unsigned char m912[256] = {
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x20, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x60, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x60, 0x60, 0x00, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x20,
- 0x60, 0x00, 0x20, 0x60, 0x60, 0x60, 0x20, 0x60,
- 0x00, 0x60, 0x00, 0x60, 0x20, 0x20, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60,
-};
-
-static unsigned char m922[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00,
- 0x00, 0x00, 0x20, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x20, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x20, 0x20, 0x00, 0x20, 0x00, 0x00, 0x60,
- 0x20, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x60, 0x00, 0x00, 0x20, 0x00,
- 0x60, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x20, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x20,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20,
- 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x60, 0x00,
- 0x60, 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x20, 0x00, 0x60, 0x20, 0x00, 0x20, 0x00, 0x20,
- 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x20, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x20,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x20, 0x60, 0x20, 0x60, 0x00, 0x00, 0x20,
-};
-
-static unsigned char m932[256] = {
- 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x60, 0x00, 0x00, 0x20, 0x20, 0x00,
- 0x60, 0x20, 0x60, 0x60, 0x00, 0x20, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x20, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x20,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x20, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x20, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x20, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m942[256] = {
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x20, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x20, 0x00, 0x00,
- 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m952[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x20, 0x60, 0x60, 0x00, 0x60, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x60, 0x60, 0x60, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m962[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x00, 0x00, 0x60, 0x60, 0x60, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x60, 0x00, 0x60, 0x60, 0x60,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x60, 0x00, 0x60, 0x60, 0x00, 0x60, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x60,
- 0x60, 0x60, 0x00, 0x60, 0x60, 0x20, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x20,
- 0x60, 0x60, 0x60, 0x00, 0x60, 0x00, 0x60, 0x60,
- 0x60, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x60, 0x60, 0x60, 0x60,
- 0x00, 0x60, 0x00, 0x60, 0x60, 0x60, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m972[256] = {
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x60,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x60, 0x60, 0x60,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x20, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x20, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x20, 0x60, 0x00, 0x60, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x20, 0x00, 0x20,
- 0x00, 0x20, 0x60, 0x00, 0x00, 0x20, 0x60, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x60, 0x60, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x60, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,
-};
-
-static unsigned char m982[256] = {
- 0x00, 0x60, 0x60, 0x60, 0x00, 0x60, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x60, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x20,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x60, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x00,
-};
-
-static unsigned char m992[256] = {
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x20,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x60, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,
-};
-
-static unsigned char m9a2[256] = {
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x60, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x20, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x20, 0x00, 0x00, 0x20, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x60, 0x60, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m9b2[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x60, 0x00, 0x60,
- 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x20, 0x00, 0x60, 0x20, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x20,
- 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x60, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x20, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m9c2[256] = {
- 0x20, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x60, 0x60, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60,
- 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char m9d2[256] = {
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x60,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x60, 0x60, 0x60, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x20, 0x60, 0x00, 0x00, 0x60,
- 0x20, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00,
-};
-
-static unsigned char m9e2[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x20, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00,
- 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x20, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x60, 0x60, 0x60, 0x60, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x60,
- 0x00, 0x60, 0x00, 0x60, 0x60, 0x60, 0x00, 0x00,
-};
-
-static unsigned char m9f2[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x60, 0x00, 0x60, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
- 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char mf02[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char mf92[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char mfa2[256] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-static unsigned char mff2[256] = {
- 0x00, 0x60, 0x20, 0x60, 0x60, 0x60, 0x60, 0x20,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x20, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x20, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x20, 0x00,
- 0x00, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x20, 0x20, 0x20, 0x60, 0x20, 0x60, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-struct {
- unsigned char *bits0;
- unsigned char *bits1;
- unsigned char *bits2;
-} camel_charmap[256] = {
- { m000, m001, m002, }, { m010, m011, 0, }, { m020, m021, m022, }, { m030, 0, m032, }, { m040, m041, m042, }, { m050, 0, m052, }, { m060, 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, m0e2, }, { 0, 0, 0, },
- { 0, 0, m102, }, { 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, m1e1, 0, }, { 0, 0, 0, },
- { m200, m201, m202, }, { m210, m211, m212, }, { 0, m221, m222, }, { 0, m231, m232, }, { 0, 0, m242, }, { 0, m251, m252, }, { 0, 0, m262, }, { 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, m302, }, { 0, 0, 0, }, { 0, 0, m322, }, { 0, 0, m332, }, { 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, m4e2, }, { 0, 0, m4f2, },
- { 0, 0, m502, }, { 0, 0, m512, }, { 0, 0, m522, }, { 0, 0, m532, }, { 0, 0, m542, }, { 0, 0, m552, }, { 0, 0, m562, }, { 0, 0, m572, },
- { 0, 0, m582, }, { 0, 0, m592, }, { 0, 0, m5a2, }, { 0, 0, m5b2, }, { 0, 0, m5c2, }, { 0, 0, m5d2, }, { 0, 0, m5e2, }, { 0, 0, m5f2, },
- { 0, 0, m602, }, { 0, 0, m612, }, { 0, 0, m622, }, { 0, 0, m632, }, { 0, 0, m642, }, { 0, 0, m652, }, { 0, 0, m662, }, { 0, 0, m672, },
- { 0, 0, m682, }, { 0, 0, m692, }, { 0, 0, m6a2, }, { 0, 0, m6b2, }, { 0, 0, m6c2, }, { 0, 0, m6d2, }, { 0, 0, m6e2, }, { 0, 0, m6f2, },
- { 0, 0, m702, }, { 0, 0, m712, }, { 0, 0, m722, }, { 0, 0, m732, }, { 0, 0, m742, }, { 0, 0, m752, }, { 0, 0, m762, }, { 0, 0, m772, },
- { 0, 0, m782, }, { 0, 0, m792, }, { 0, 0, m7a2, }, { 0, 0, m7b2, }, { 0, 0, m7c2, }, { 0, 0, m7d2, }, { 0, 0, m7e2, }, { 0, 0, m7f2, },
- { 0, 0, m802, }, { 0, 0, m812, }, { 0, 0, m822, }, { 0, 0, m832, }, { 0, 0, m842, }, { 0, 0, m852, }, { 0, 0, m862, }, { 0, 0, m872, },
- { 0, 0, m882, }, { 0, 0, m892, }, { 0, 0, m8a2, }, { 0, 0, m8b2, }, { 0, 0, m8c2, }, { 0, 0, m8d2, }, { 0, 0, m8e2, }, { 0, 0, m8f2, },
- { 0, 0, m902, }, { 0, 0, m912, }, { 0, 0, m922, }, { 0, 0, m932, }, { 0, 0, m942, }, { 0, 0, m952, }, { 0, 0, m962, }, { 0, 0, m972, },
- { 0, 0, m982, }, { 0, 0, m992, }, { 0, 0, m9a2, }, { 0, 0, m9b2, }, { 0, 0, m9c2, }, { 0, 0, m9d2, }, { 0, 0, m9e2, }, { 0, 0, m9f2, },
- { 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, 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, mf02, }, { 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, mf92, }, { 0, 0, mfa2, }, { 0, 0, 0, }, { 0, 0, 0, }, { 0, 0, 0, }, { 0, 0, 0, }, { 0, 0, mff2, },
-};
-
-struct {
- const char *name;
- unsigned int bit;
-} camel_charinfo[] = {
- { "iso-8859-2", 0x0001 },
- { "iso-8859-3", 0x0002 },
- { "iso-8859-4", 0x0004 },
- { "iso-8859-5", 0x0008 },
- { "iso-8859-6", 0x0010 },
- { "iso-8859-7", 0x0020 },
- { "iso-8859-8", 0x0040 },
- { "iso-8859-9", 0x0080 },
- { "iso-8859-10", 0x0100 },
- { "iso-8859-13", 0x0200 },
- { "iso-8859-14", 0x0400 },
- { "iso-8859-15", 0x0800 },
- { "windows-1250", 0x1000 },
- { "windows-1252", 0x2000 },
- { "windows-1257", 0x4000 },
- { "koi8-r", 0x8000 },
- { "koi8-u", 0x10000 },
- { "tis620.2533-1", 0x20000 },
- { "armscii-8", 0x40000 },
- { "georgian-academy", 0x80000 },
- { "georgian-ps", 0x100000 },
- { "CP932", 0x200000 },
- { "Shift-JIS", 0x400000 },
-};
-
-#define charset_mask(x) \
- (camel_charmap[(x)>>8].bits0?camel_charmap[(x)>>8].bits0[(x)&0xff]<<0:0) \
- | (camel_charmap[(x)>>8].bits1?camel_charmap[(x)>>8].bits1[(x)&0xff]<<8:0) \
- | (camel_charmap[(x)>>8].bits2?camel_charmap[(x)>>8].bits2[(x)&0xff]<<16:0)
-
diff --git a/camel/camel-charset-map.c b/camel/camel-charset-map.c
deleted file mode 100644
index d5d7665dac..0000000000
--- a/camel/camel-charset-map.c
+++ /dev/null
@@ -1,322 +0,0 @@
-
-#include <stdio.h>
-
-/*
- if you want to build the charset map, add the root directory of
- libunicode to the include path and define BUILD_MAP,
- then run it as
- ./a.out > camel-charset-map-private.h
-
- The tables genereated work like this:
-
- An indirect array for each page of unicode character
- Each array element has an indirect pointer to one of the bytes of
- the generated bitmask.
-*/
-
-#ifdef BUILD_MAP
-#include "iso/iso8859-2.h"
-#include "iso/iso8859-3.h"
-#include "iso/iso8859-4.h"
-#include "iso/iso8859-5.h"
-#include "iso/iso8859-6.h"
-#include "iso/iso8859-7.h"
-#include "iso/iso8859-8.h"
-#include "iso/iso8859-9.h"
-#include "iso/iso8859-10.h"
-#include "iso/iso8859-13.h"
-#include "iso/iso8859-14.h"
-#include "iso/iso8859-15.h"
-#include "iso/windows-1250.h"
-#include "iso/windows-1252.h"
-#include "iso/windows-1257.h"
-#include "iso/koi8-r.h"
-#include "iso/koi8-u.h"
-#include "iso/tis620.2533-1.h"
-#include "iso/armscii-8.h"
-#include "iso/georgian-academy.h"
-#include "iso/georgian-ps.h"
-#include "msft/cp932.h"
-#include "jis/shiftjis.h"
-
-static struct {
- unsigned short *table;
- char *name;
- int type; /* type of table */
- unsigned int bit; /* assigned bit */
-} tables[] = {
- { iso8859_2_table, "iso-8859-2", 0, 0} ,
- { iso8859_3_table, "iso-8859-3", 0, 0} ,
- { iso8859_4_table, "iso-8859-4", 0, 0},
- { iso8859_5_table, "iso-8859-5", 0, 0},
-/* apparently -6 has special digits? */
- { iso8859_6_table, "iso-8859-6", 0, 0},
- { iso8859_7_table, "iso-8859-7", 0, 0},
- { iso8859_8_table, "iso-8859-8", 0, 0},
- { iso8859_9_table, "iso-8859-9", 0, 0},
- { iso8859_10_table, "iso-8859-10", 0, 0},
- { iso8859_13_table, "iso-8859-13", 0, 0},
- { iso8859_14_table, "iso-8859-14", 0, 0},
- { iso8859_15_table, "iso-8859-15", 0, 0},
- { windows_1250_table, "windows-1250", 0, 0},
- { windows_1252_table, "windows-1252", 0, 0},
- { windows_1257_table, "windows-1257", 0, 0},
- { koi8_r_table, "koi8-r", 0, 0},
- { koi8_u_table, "koi8-u", 0, 0},
- { tis_620_table, "tis620.2533-1", 0, 0},
- { armscii_8_table, "armscii-8", 0, 0},
- { georgian_academy_table, "georgian-academy", 0, 0},
- { georgian_ps_table, "georgian-ps", 0, 0},
- { cp932_table, "CP932", 1, 0},
- { sjis_table, "Shift-JIS", 1, 0},
- { 0, 0}
-};
-
-unsigned int encoding_map[256 * 256];
-
-static void
-add_bigmap(unsigned short **table, int bit)
-{
- int i;
- int j;
-
- for (i=0;i<256;i++) {
- unsigned short *tab = table[i];
- if (tab) {
- for (j=0;j<256;j++) {
- if (tab[j])
- encoding_map[tab[j]] |= bit;
- }
- }
- }
-}
-
-void main(void)
-{
- int i, j;
- unsigned short *tab;
- int max, min;
- int bit = 0x01;
- int k;
- int bytes;
-
-#if 0
- /* iso-latin-1 (not needed-detected in code) */
- for (i=0;i<256;i++) {
- encoding_map[i] |= bit;
- }
- bit <<= 1;
-#endif
-
- /* dont count the terminator */
- bytes = ((sizeof(tables)/sizeof(tables[0]))+7-1)/8;
-
- /* the other latin charsets */
- for (j=0;tables[j].table;j++) {
- switch (tables[j].type) {
- case 0: /* table from 128-256 */
- tab = tables[j].table;
- for (i=0;i<128;i++) {
- /* 0-127 is the common */
- encoding_map[i] |= bit;
- encoding_map[tab[i]] |= bit;
- }
- break;
- case 1: /* sparse table */
- add_bigmap(tables[j].table, bit);
- break;
- }
- tables[j].bit = bit;
- bit <<= 1;
- }
-
- printf("/* This file is automatically generated: DO NOT EDIT */\n\n");
-
- for (i=0;i<256;i++) {
- /* first, do we need this block? */
- for (k=0;k<bytes;k++) {
- for (j=0;j<256;j++) {
- if ((encoding_map[i*256 + j] & (0xff << (k*8))) != 0)
- break;
- }
- if (j < 256) {
- /* yes, dump it */
- printf("static unsigned char m%02x%x[256] = {\n\t", i, k);
- for (j=0;j<256;j++) {
- printf("0x%02x, ", (encoding_map[i*256+j] >> (k*8)) & 0xff );
- if (((j+1)&7) == 0 && j<255)
- printf("\n\t");
- }
- printf("\n};\n\n");
- }
- }
- }
-
- printf("struct {\n");
- for (k=0;k<bytes;k++) {
- printf("\tunsigned char *bits%d;\n", k);
- }
- printf("} camel_charmap[256] = {\n\t");
- for (i=0;i<256;i++) {
- /* first, do we need this block? */
- printf("{ ");
- for (k=0;k<bytes;k++) {
- for (j=0;j<256;j++) {
- if ((encoding_map[i*256 + j] & (0xff << (k*8))) != 0)
- break;
- }
- if (j < 256) {
- printf("m%02x%x, ", i, k);
- } else {
- printf("0, ");
- }
- }
- printf("}, ");
- if (((i+1)&7) == 0 && i<255)
- printf("\n\t");
- }
- printf("\n};\n\n");
-
- printf("struct {\n\tconst char *name;\n\tunsigned int bit;\n} camel_charinfo[] = {\n");
- for (j=0;tables[j].table;j++) {
- printf("\t{ \"%s\", 0x%04x },\n", tables[j].name, tables[j].bit);
- }
- printf("};\n\n");
-
- printf("#define charset_mask(x) \\\n");
- for (k=0;k<bytes;k++) {
- if (k!=0)
- printf("\t| ");
- else
- printf("\t");
- printf("(camel_charmap[(x)>>8].bits%d?camel_charmap[(x)>>8].bits%d[(x)&0xff]<<%d:0)", k, k, k*8);
- if (k<bytes-1)
- printf("\t\\\n");
- }
- printf("\n\n");
-
-}
-
-#else
-
-#include "camel-charset-map.h"
-#include "camel-charset-map-private.h"
-#include <unicode.h>
-#include <locale.h>
-#include <glib.h>
-
-void camel_charset_init(CamelCharset *c)
-{
- c->mask = ~0;
- c->level = 0;
-}
-
-void
-camel_charset_step(CamelCharset *c, const char *in, int len)
-{
- register unsigned int mask;
- register int level;
- const char *inptr = in, *inend = in+len;
-
- mask = c->mask;
- level = c->level;
-
- /* check what charset a given string will fit in */
- while (inptr < inend) {
- unicode_char_t c;
- const char *newinptr;
- newinptr = unicode_get_utf8(inptr, &c);
- if (newinptr == NULL) {
- inptr++;
- continue;
- }
- inptr = newinptr;
- if (c<=0xffff) {
- mask &= charset_mask(c);
-
- if (c>=128 && c<256)
- level = MAX(level, 1);
- else if (c>=256)
- level = MAX(level, 2);
- } else {
- mask = 0;
- level = MAX(level, 2);
- }
- }
-
- c->mask = mask;
- c->level = level;
-}
-
-/* gets the best charset from the mask of chars in it */
-static const char *
-camel_charset_best_mask(unsigned int mask)
-{
- int i;
-
- for (i=0;i<sizeof(camel_charinfo)/sizeof(camel_charinfo[0]);i++) {
- if (camel_charinfo[i].bit & mask)
- return camel_charinfo[i].name;
- }
- return "UTF-8";
-}
-
-const char *camel_charset_best_name(CamelCharset *charset)
-{
- if (charset->level == 1)
- return "ISO-8859-1";
- else if (charset->level == 2)
- return camel_charset_best_mask(charset->mask);
- else
- return NULL;
-
-}
-
-/* finds the minimum charset for this string NULL means US-ASCII */
-const char *
-camel_charset_best(const char *in, int len)
-{
- CamelCharset charset;
-
- camel_charset_init(&charset);
- camel_charset_step(&charset, in, len);
- return camel_charset_best_name(&charset);
-}
-
-char *
-camel_charset_locale_name (void)
-{
- char *locale, *charset;
-
- locale = setlocale (LC_ALL, NULL);
-
- if (!locale || !strcmp (locale, "C") || !strcmp (locale, "POSIX")) {
- /* The locale "C" or "POSIX" is a portable locale; its
- * LC_CTYPE part corresponds to the 7-bit ASCII character
- * set.
- */
-
- return NULL;
- } else {
- /* A locale name is typically of the form language[_terri-
- * tory][.codeset][@modifier], where language is an ISO 639
- * language code, territory is an ISO 3166 country code, and
- * codeset is a character set or encoding identifier like
- * ISO-8859-1 or UTF-8.
- */
- char *p;
- int len;
-
- p = strchr (locale, '@');
- len = p ? (p - locale) : strlen (locale);
- if ((p = strchr (locale, '.'))) {
- charset = g_strndup (p + 1, len - (p - locale) + 1);
- g_strdown (charset);
- }
- }
-
- return charset;
-}
-
-#endif /* !BUILD_MAP */
-
diff --git a/camel/camel-charset-map.h b/camel/camel-charset-map.h
deleted file mode 100644
index db76281c6f..0000000000
--- a/camel/camel-charset-map.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (C) 2000 Helix Code Inc.
- *
- * Authors: Michael Zucchi <notzed@helixcode.com>
- *
- * 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_CHARSET_MAP_H
-#define _CAMEL_CHARSET_MAP_H
-
-typedef struct _CamelCharset CamelCharset;
-
-struct _CamelCharset {
- unsigned int mask;
- int level;
-};
-
-void camel_charset_init(CamelCharset *);
-void camel_charset_step(CamelCharset *, const char *in, int len);
-const char *camel_charset_best_name(CamelCharset *);
-
-/* helper function */
-const char *camel_charset_best(const char *in, int len);
-
-char *camel_charset_locale_name (void);
-
-#endif /* ! _CAMEL_CHARSET_MAP_H */
diff --git a/camel/camel-cipher-context.c b/camel/camel-cipher-context.c
deleted file mode 100644
index dde023eb10..0000000000
--- a/camel/camel-cipher-context.c
+++ /dev/null
@@ -1,448 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2001 Ximian, Inc. (www.ximian.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.
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "camel-cipher-context.h"
-
-#include <glib.h>
-
-#include <iconv.h>
-
-#ifdef ENABLE_THREADS
-#include <pthread.h>
-#define CIPHER_LOCK(ctx) g_mutex_lock (((CamelCipherContext *) ctx)->priv->lock)
-#define CIPHER_UNLOCK(ctx) g_mutex_unlock (((CamelCipherContext *) ctx)->priv->lock);
-#else
-#define CIPHER_LOCK(ctx)
-#define CIPHER_UNLOCK(ctx)
-#endif
-
-#define d(x)
-
-#define CCC_CLASS(o) CAMEL_CIPHER_CONTEXT_CLASS(CAMEL_OBJECT_GET_CLASS(o))
-
-struct _CamelCipherContextPrivate {
-#ifdef ENABLE_THREADS
- GMutex *lock;
-#endif
-};
-
-static int cipher_sign (CamelCipherContext *ctx, const char *userid, CamelCipherHash hash,
- CamelStream *istream, CamelStream *ostream, CamelException *ex);
-static int cipher_clearsign (CamelCipherContext *context, const char *userid, CamelCipherHash hash,
- CamelStream *istream, CamelStream *ostream, CamelException *ex);
-static CamelCipherValidity *cipher_verify (CamelCipherContext *context, CamelStream *istream,
- CamelStream *sigstream, CamelException *ex);
-static int cipher_encrypt (CamelCipherContext *context, gboolean sign, const char *userid,
- GPtrArray *recipients, CamelStream *istream, CamelStream *ostream,
- CamelException *ex);
-static int cipher_decrypt (CamelCipherContext *context, CamelStream *istream, CamelStream *ostream,
- CamelException *ex);
-
-static CamelObjectClass *parent_class;
-
-static void
-camel_cipher_context_init (CamelCipherContext *context)
-{
- context->priv = g_new0 (struct _CamelCipherContextPrivate, 1);
-#ifdef ENABLE_THREADS
- context->priv->lock = g_mutex_new ();
-#endif
-}
-
-static void
-camel_cipher_context_finalise (CamelObject *o)
-{
- CamelCipherContext *context = (CamelCipherContext *)o;
-
- camel_object_unref (CAMEL_OBJECT (context->session));
-
-#ifdef ENABLE_THREADS
- g_mutex_free (context->priv->lock);
-#endif
-
- g_free (context->priv);
-}
-
-static void
-camel_cipher_context_class_init (CamelCipherContextClass *camel_cipher_context_class)
-{
- parent_class = camel_type_get_global_classfuncs (camel_object_get_type ());
-
- camel_cipher_context_class->sign = cipher_sign;
- camel_cipher_context_class->clearsign = cipher_clearsign;
- camel_cipher_context_class->verify = cipher_verify;
- camel_cipher_context_class->encrypt = cipher_encrypt;
- camel_cipher_context_class->decrypt = cipher_decrypt;
-}
-
-CamelType
-camel_cipher_context_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (camel_object_get_type (),
- "CamelCipherContext",
- sizeof (CamelCipherContext),
- sizeof (CamelCipherContextClass),
- (CamelObjectClassInitFunc) camel_cipher_context_class_init,
- NULL,
- (CamelObjectInitFunc) camel_cipher_context_init,
- (CamelObjectFinalizeFunc) camel_cipher_context_finalise);
- }
-
- return type;
-}
-
-
-/**
- * camel_cipher_context_new:
- * @session: CamelSession
- *
- * This creates a new CamelCipherContext object which is used to sign,
- * verify, encrypt and decrypt streams.
- *
- * Return value: the new CamelCipherContext
- **/
-CamelCipherContext *
-camel_cipher_context_new (CamelSession *session)
-{
- CamelCipherContext *context;
-
- g_return_val_if_fail (session != NULL, NULL);
-
- context = CAMEL_CIPHER_CONTEXT (camel_object_new (CAMEL_CIPHER_CONTEXT_TYPE));
-
- camel_object_ref (CAMEL_OBJECT (session));
- context->session = session;
-
- return context;
-}
-
-
-/**
- * camel_cipher_context_construct:
- * @context: CamelCipherContext
- * @session: CamelSession
- *
- * Constucts the CamelCipherContext
- **/
-void
-camel_cipher_context_construct (CamelCipherContext *context, CamelSession *session)
-{
- g_return_if_fail (CAMEL_IS_CIPHER_CONTEXT (context));
- g_return_if_fail (CAMEL_IS_SESSION (session));
-
- camel_object_ref (CAMEL_OBJECT (session));
- context->session = session;
-}
-
-
-static int
-cipher_sign (CamelCipherContext *ctx, const char *userid, CamelCipherHash hash,
- CamelStream *istream, CamelStream *ostream, CamelException *ex)
-{
- camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Signing is not supported by this cipher"));
- return -1;
-}
-
-/**
- * camel_cipher_sign:
- * @context: Cipher Context
- * @userid: private key to use to sign the stream
- * @hash: preferred Message-Integrity-Check hash algorithm
- * @istream: input stream
- * @ostream: output stream
- * @ex: exception
- *
- * Signs the input stream and writes the resulting signature to the output stream.
- *
- * Return value: 0 for success or -1 for failure.
- **/
-int
-camel_cipher_sign (CamelCipherContext *context, const char *userid, CamelCipherHash hash,
- CamelStream *istream, CamelStream *ostream, CamelException *ex)
-{
- int retval;
-
- g_return_val_if_fail (CAMEL_IS_CIPHER_CONTEXT (context), -1);
-
- CIPHER_LOCK(context);
-
- retval = CCC_CLASS (context)->sign (context, userid, hash, istream, ostream, ex);
-
- CIPHER_UNLOCK(context);
-
- return retval;
-}
-
-
-static int
-cipher_clearsign (CamelCipherContext *context, const char *userid, CamelCipherHash hash,
- CamelStream *istream, CamelStream *ostream, CamelException *ex)
-{
- camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Clearsigning is not supported by this cipher"));
- return -1;
-}
-
-/**
- * camel_cipher_clearsign:
- * @context: Cipher Context
- * @userid: key id or email address of the private key to sign with
- * @hash: preferred Message-Integrity-Check hash algorithm
- * @istream: input stream
- * @ostream: output stream
- * @ex: exception
- *
- * Clearsigns the input stream and writes the resulting clearsign to the output stream.
- *
- * Return value: 0 for success or -1 for failure.
- **/
-int
-camel_cipher_clearsign (CamelCipherContext *context, const char *userid, CamelCipherHash hash,
- CamelStream *istream, CamelStream *ostream, CamelException *ex)
-{
- int retval;
-
- g_return_val_if_fail (CAMEL_IS_CIPHER_CONTEXT (context), -1);
-
- CIPHER_LOCK(context);
-
- retval = CCC_CLASS (context)->clearsign (context, userid, hash, istream, ostream, ex);
-
- CIPHER_UNLOCK(context);
-
- return retval;
-}
-
-
-static CamelCipherValidity *
-cipher_verify (CamelCipherContext *context, CamelStream *istream,
- CamelStream *sigstream, CamelException *ex)
-{
- camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Verifying is not supported by this cipher"));
- return NULL;
-}
-
-/**
- * camel_cipher_verify:
- * @context: Cipher Context
- * @istream: input stream
- * @sigstream: optional detached-signature stream
- * @ex: exception
- *
- * Verifies the signature. If @istream is a clearsigned stream,
- * you should pass %NULL as the sigstream parameter. Otherwise
- * @sigstream is assumed to be the signature stream and is used to
- * verify the integirity of the @istream.
- *
- * Return value: a CamelCipherValidity structure containing information
- * about the integrity of the input stream or %NULL on failure to
- * execute at all.
- **/
-CamelCipherValidity *
-camel_cipher_verify (CamelCipherContext *context, CamelStream *istream,
- CamelStream *sigstream, CamelException *ex)
-{
- CamelCipherValidity *valid;
-
- g_return_val_if_fail (CAMEL_IS_CIPHER_CONTEXT (context), NULL);
-
- CIPHER_LOCK(context);
-
- valid = CCC_CLASS (context)->verify (context, istream, sigstream, ex);
-
- CIPHER_UNLOCK(context);
-
- return valid;
-}
-
-
-static int
-cipher_encrypt (CamelCipherContext *context, gboolean sign, const char *userid, GPtrArray *recipients,
- CamelStream *istream, CamelStream *ostream, CamelException *ex)
-{
- camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Encryption is not supported by this cipher"));
- return -1;
-}
-
-/**
- * camel_cipher_encrypt:
- * @context: Cipher Context
- * @sign: sign as well as encrypt
- * @userid: key id (or email address) to use when signing (assuming @sign is %TRUE)
- * @recipients: an array of recipient key ids and/or email addresses
- * @istream: cleartext input stream
- * @ostream: ciphertext output stream
- * @ex: exception
- *
- * Encrypts (and optionally signs) the cleartext input stream and
- * writes the resulting ciphertext to the output stream.
- *
- * Return value: 0 for success or -1 for failure.
- **/
-int
-camel_cipher_encrypt (CamelCipherContext *context, gboolean sign, const char *userid, GPtrArray *recipients,
- CamelStream *istream, CamelStream *ostream, CamelException *ex)
-{
- int retval;
-
- g_return_val_if_fail (CAMEL_IS_CIPHER_CONTEXT (context), -1);
-
- CIPHER_LOCK(context);
-
- retval = CCC_CLASS (context)->encrypt (context, sign, userid, recipients, istream, ostream, ex);
-
- CIPHER_UNLOCK(context);
-
- return retval;
-}
-
-
-static int
-cipher_decrypt (CamelCipherContext *context, CamelStream *istream,
- CamelStream *ostream, CamelException *ex)
-{
- camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Decryption is not supported by this cipher"));
- return -1;
-}
-
-/**
- * camel_cipher_decrypt:
- * @context: Cipher Context
- * @ciphertext: ciphertext stream (ie input stream)
- * @cleartext: cleartext stream (ie output stream)
- * @ex: exception
- *
- * Decrypts the ciphertext input stream and writes the resulting
- * cleartext to the output stream.
- *
- * Return value: 0 for success or -1 for failure.
- **/
-int
-camel_cipher_decrypt (CamelCipherContext *context, CamelStream *istream,
- CamelStream *ostream, CamelException *ex)
-{
- int retval;
-
- g_return_val_if_fail (CAMEL_IS_CIPHER_CONTEXT (context), -1);
-
- CIPHER_LOCK(context);
-
- retval = CCC_CLASS (context)->decrypt (context, istream, ostream, ex);
-
- CIPHER_UNLOCK(context);
-
- return retval;
-}
-
-
-/* Cipher Validity stuff */
-struct _CamelCipherValidity {
- gboolean valid;
- gchar *description;
-};
-
-CamelCipherValidity *
-camel_cipher_validity_new (void)
-{
- CamelCipherValidity *validity;
-
- validity = g_new (CamelCipherValidity, 1);
- validity->valid = FALSE;
- validity->description = NULL;
-
- return validity;
-}
-
-void
-camel_cipher_validity_init (CamelCipherValidity *validity)
-{
- g_assert (validity != NULL);
-
- validity->valid = FALSE;
- validity->description = NULL;
-}
-
-gboolean
-camel_cipher_validity_get_valid (CamelCipherValidity *validity)
-{
- if (validity == NULL)
- return FALSE;
-
- return validity->valid;
-}
-
-void
-camel_cipher_validity_set_valid (CamelCipherValidity *validity, gboolean valid)
-{
- g_assert (validity != NULL);
-
- validity->valid = valid;
-}
-
-gchar *
-camel_cipher_validity_get_description (CamelCipherValidity *validity)
-{
- if (validity == NULL)
- return NULL;
-
- return validity->description;
-}
-
-void
-camel_cipher_validity_set_description (CamelCipherValidity *validity, const gchar *description)
-{
- g_assert (validity != NULL);
-
- g_free (validity->description);
- validity->description = g_strdup (description);
-}
-
-void
-camel_cipher_validity_clear (CamelCipherValidity *validity)
-{
- g_assert (validity != NULL);
-
- validity->valid = FALSE;
- g_free (validity->description);
- validity->description = NULL;
-}
-
-void
-camel_cipher_validity_free (CamelCipherValidity *validity)
-{
- if (validity == NULL)
- return;
-
- g_free (validity->description);
- g_free (validity);
-}
diff --git a/camel/camel-cipher-context.h b/camel/camel-cipher-context.h
deleted file mode 100644
index a2f0dd885f..0000000000
--- a/camel/camel-cipher-context.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2001 Ximian, Inc. (www.ximian.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.
- *
- */
-
-#ifndef CAMEL_CIPHER_CONTEXT_H
-#define CAMEL_CIPHER_CONTEXT_H
-
-#include <camel/camel-session.h>
-#include <camel/camel-stream.h>
-#include <camel/camel-exception.h>
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#define CAMEL_CIPHER_CONTEXT_TYPE (camel_cipher_context_get_type ())
-#define CAMEL_CIPHER_CONTEXT(obj) (CAMEL_CHECK_CAST((obj), CAMEL_CIPHER_CONTEXT_TYPE, CamelCipherContext))
-#define CAMEL_CIPHER_CONTEXT_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_CIPHER_CONTEXT_TYPE, CamelCipherContextClass))
-#define CAMEL_IS_CIPHER_CONTEXT(o) (CAMEL_CHECK_TYPE((o), CAMEL_CIPHER_CONTEXT_TYPE))
-
-typedef struct _CamelCipherValidity CamelCipherValidity;
-
-typedef enum {
- CAMEL_CIPHER_HASH_DEFAULT,
- CAMEL_CIPHER_HASH_MD5,
- CAMEL_CIPHER_HASH_SHA1
-} CamelCipherHash;
-
-typedef struct _CamelCipherContext {
- CamelObject parent_object;
-
- struct _CamelCipherContextPrivate *priv;
-
- CamelSession *session;
-
-} CamelCipherContext;
-
-typedef struct _CamelCipherContextClass {
- CamelObjectClass parent_class;
-
- int (*sign) (CamelCipherContext *ctx, const char *userid, CamelCipherHash hash,
- CamelStream *istream, CamelStream *ostream, CamelException *ex);
-
- int (*clearsign) (CamelCipherContext *context, const char *userid, CamelCipherHash hash,
- CamelStream *istream, CamelStream *ostream, CamelException *ex);
-
- CamelCipherValidity * (*verify) (CamelCipherContext *context, CamelStream *istream,
- CamelStream *sigstream, CamelException *ex);
-
- int (*encrypt) (CamelCipherContext *context, gboolean sign, const char *userid,
- GPtrArray *recipients, CamelStream *istream, CamelStream *ostream,
- CamelException *ex);
-
- int (*decrypt) (CamelCipherContext *context, CamelStream *istream, CamelStream *ostream,
- CamelException *ex);
-
-} CamelCipherContextClass;
-
-CamelType camel_cipher_context_get_type (void);
-
-CamelCipherContext *camel_cipher_context_new (CamelSession *session);
-
-void camel_cipher_context_construct (CamelCipherContext *context, CamelSession *session);
-
-/* cipher routines */
-int camel_cipher_sign (CamelCipherContext *context, const char *userid, CamelCipherHash hash,
- CamelStream *istream, CamelStream *ostream, CamelException *ex);
-
-int camel_cipher_clearsign (CamelCipherContext *context, const char *userid, CamelCipherHash hash,
- CamelStream *istream, CamelStream *ostream, CamelException *ex);
-
-CamelCipherValidity *camel_cipher_verify (CamelCipherContext *context, CamelStream *istream, CamelStream *sigstream,
- CamelException *ex);
-
-int camel_cipher_encrypt (CamelCipherContext *context, gboolean sign, const char *userid,
- GPtrArray *recipients, CamelStream *istream, CamelStream *ostream,
- CamelException *ex);
-
-int camel_cipher_decrypt (CamelCipherContext *context, CamelStream *istream, CamelStream *ostream,
- CamelException *ex);
-
-/* CamelCipherValidity utility functions */
-CamelCipherValidity *camel_cipher_validity_new (void);
-
-void camel_cipher_validity_init (CamelCipherValidity *validity);
-
-gboolean camel_cipher_validity_get_valid (CamelCipherValidity *validity);
-
-void camel_cipher_validity_set_valid (CamelCipherValidity *validity, gboolean valid);
-
-char *camel_cipher_validity_get_description (CamelCipherValidity *validity);
-
-void camel_cipher_validity_set_description (CamelCipherValidity *validity, const char *description);
-
-void camel_cipher_validity_clear (CamelCipherValidity *validity);
-
-void camel_cipher_validity_free (CamelCipherValidity *validity);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_CIPHER_CONTEXT_H */
diff --git a/camel/camel-data-wrapper.c b/camel/camel-data-wrapper.c
deleted file mode 100644
index e2d7f10281..0000000000
--- a/camel/camel-data-wrapper.c
+++ /dev/null
@@ -1,294 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; -*- */
-/* camel-data-wrapper.c : Abstract class for a data_wrapper */
-
-/*
- *
- * Authors: Bertrand Guiheneuf <bertrand@helixcode.com>
- *
- * 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <errno.h>
-
-#include "camel-data-wrapper.h"
-#include "camel-mime-utils.h"
-#include "camel-stream.h"
-#include "camel-exception.h"
-
-#define d(x)
-
-static CamelObjectClass *parent_class = NULL;
-
-/* Returns the class for a CamelDataWrapper */
-#define CDW_CLASS(so) CAMEL_DATA_WRAPPER_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-
-
-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 CamelContentType *get_mime_type_field (CamelDataWrapper *data_wrapper);
-static void set_mime_type_field (CamelDataWrapper *data_wrapper, CamelContentType *mime_type);
-
-static void
-camel_data_wrapper_class_init (CamelDataWrapperClass *camel_data_wrapper_class)
-{
- parent_class = camel_type_get_global_classfuncs (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;
-}
-
-static void
-camel_data_wrapper_init (gpointer object, gpointer klass)
-{
- CamelDataWrapper *camel_data_wrapper = CAMEL_DATA_WRAPPER (object);
-
- camel_data_wrapper->mime_type = header_content_type_new ("application", "octet-stream");
- camel_data_wrapper->offline = FALSE;
-}
-
-static void
-camel_data_wrapper_finalize (CamelObject *object)
-{
- CamelDataWrapper *camel_data_wrapper = CAMEL_DATA_WRAPPER (object);
-
- if (camel_data_wrapper->mime_type)
- header_content_type_unref (camel_data_wrapper->mime_type);
-
- if (camel_data_wrapper->stream)
- camel_object_unref (CAMEL_OBJECT (camel_data_wrapper->stream));
-}
-
-CamelType
-camel_data_wrapper_get_type (void)
-{
- static CamelType camel_data_wrapper_type = CAMEL_INVALID_TYPE;
-
- if (camel_data_wrapper_type == CAMEL_INVALID_TYPE) {
- camel_data_wrapper_type = camel_type_register (CAMEL_OBJECT_TYPE, "CamelDataWrapper",
- sizeof (CamelDataWrapper),
- sizeof (CamelDataWrapperClass),
- (CamelObjectClassInitFunc) camel_data_wrapper_class_init,
- NULL,
- (CamelObjectInitFunc) camel_data_wrapper_init,
- (CamelObjectFinalizeFunc) camel_data_wrapper_finalize);
- }
-
- return camel_data_wrapper_type;
-}
-
-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 *)camel_object_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)
- camel_object_unref((CamelObject *)data_wrapper->stream);
-
- data_wrapper->stream = stream;
- camel_object_ref (CAMEL_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)
-{
- if (data_wrapper->mime_type)
- header_content_type_unref (data_wrapper->mime_type);
- data_wrapper->mime_type = header_content_type_decode (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 header_content_type_simple (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,
- * which the caller must free.
- **/
-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 CamelContentType *
-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
- **/
-CamelContentType *
-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,
- CamelContentType *mime_type)
-{
- g_return_if_fail (CAMEL_IS_DATA_WRAPPER (data_wrapper));
- g_return_if_fail (mime_type != NULL);
-
- if (data_wrapper->mime_type)
- header_content_type_unref (data_wrapper->mime_type);
- data_wrapper->mime_type = mime_type;
- if (mime_type)
- header_content_type_ref (data_wrapper->mime_type);
-}
-
-void
-camel_data_wrapper_set_mime_type_field (CamelDataWrapper *data_wrapper,
- CamelContentType *mime_type)
-{
- CDW_CLASS (data_wrapper)->set_mime_type_field (data_wrapper, mime_type);
-}
-
-
-/**
- * camel_data_wrapper_is_offline:
- * @data_wrapper: a data wrapper
- *
- * Return value: whether @data_wrapper is "offline" (data stored
- * remotely) or not. Some optional code paths may choose to not
- * operate on offline data.
- **/
-gboolean
-camel_data_wrapper_is_offline (CamelDataWrapper *data_wrapper)
-{
- return data_wrapper->offline;
-}
diff --git a/camel/camel-data-wrapper.h b/camel/camel-data-wrapper.h
deleted file mode 100644
index 1b3361f26d..0000000000
--- a/camel/camel-data-wrapper.h
+++ /dev/null
@@ -1,94 +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 <bertrand@helixcode.com>
- *
- * 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 <glib.h>
-#include <camel/camel-object.h>
-
-#define CAMEL_DATA_WRAPPER_TYPE (camel_data_wrapper_get_type ())
-#define CAMEL_DATA_WRAPPER(obj) (CAMEL_CHECK_CAST((obj), CAMEL_DATA_WRAPPER_TYPE, CamelDataWrapper))
-#define CAMEL_DATA_WRAPPER_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_DATA_WRAPPER_TYPE, CamelDataWrapperClass))
-#define CAMEL_IS_DATA_WRAPPER(o) (CAMEL_CHECK_TYPE((o), CAMEL_DATA_WRAPPER_TYPE))
-
-struct _CamelDataWrapper
-{
- CamelObject parent_object;
-
- CamelContentType *mime_type;
- CamelStream *stream;
- gboolean offline;
-};
-
-typedef struct {
- CamelObjectClass parent_class;
-
- /* Virtual methods */
- void (*set_mime_type) (CamelDataWrapper *data_wrapper,
- const gchar * mime_type);
- gchar * (*get_mime_type) (CamelDataWrapper *data_wrapper);
- CamelContentType * (*get_mime_type_field) (CamelDataWrapper *data_wrapper);
- void (*set_mime_type_field) (CamelDataWrapper *data_wrapper,
- CamelContentType *mime_type_field);
-
- int (*write_to_stream) (CamelDataWrapper *data_wrapper,
- CamelStream *stream);
-
- int (*construct_from_stream) (CamelDataWrapper *data_wrapper,
- CamelStream *);
-} CamelDataWrapperClass;
-
-/* Standard Camel function */
-CamelType 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);
-CamelContentType * camel_data_wrapper_get_mime_type_field (CamelDataWrapper *data_wrapper);
-void camel_data_wrapper_set_mime_type_field (CamelDataWrapper *data_wrapper,
- CamelContentType *mime_type);
-
-int camel_data_wrapper_construct_from_stream (CamelDataWrapper *data_wrapper, CamelStream *stream);
-
-gboolean camel_data_wrapper_is_offline (CamelDataWrapper *data_wrapper);
-
-#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 8fe1e268cf..0000000000
--- a/camel/camel-exception-list.def
+++ /dev/null
@@ -1,37 +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,
-CAMEL_EXCEPTION_STORE_NO_FOLDER,
-
-/* CamelServiceException */
-CAMEL_EXCEPTION_SERVICE_NULL = 300,
-CAMEL_EXCEPTION_SERVICE_INVALID,
-CAMEL_EXCEPTION_SERVICE_URL_INVALID,
-CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
-CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
-CAMEL_EXCEPTION_SERVICE_NOT_CONNECTED
diff --git a/camel/camel-exception.c b/camel/camel-exception.c
deleted file mode 100644
index 42ef0df339..0000000000
--- a/camel/camel-exception.c
+++ /dev/null
@@ -1,281 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-execpetion.c : exception utils */
-
-/*
- *
- * Author :
- * Bertrand Guiheneuf <bertrand@helixcode.com>
- *
- * 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <glib.h>
-#include "camel-exception.h"
-
-/* i dont know why gthread_mutex stuff even exists, this is easier */
-
-/* also, i'm not convinced mutexes are needed here. But it
- doesn't really hurt either */
-#ifdef ENABLE_THREADS
-#include <pthread.h>
-
-static pthread_mutex_t exception_mutex = PTHREAD_MUTEX_INITIALIZER;
-
-#define CAMEL_EXCEPTION_LOCK(e) (pthread_mutex_lock(&exception_mutex))
-#define CAMEL_EXCEPTION_UNLOCK(e) (pthread_mutex_unlock(&exception_mutex))
-#else
-#define CAMEL_EXCEPTION_LOCK(e)
-#define CAMEL_EXCEPTION_UNLOCK(e)
-#endif
-
-/**
- * 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;
-
- CAMEL_EXCEPTION_LOCK(exception);
-
- if (exception->desc)
- g_free (exception->desc);
- exception->desc = NULL;
- exception->id = CAMEL_EXCEPTION_NONE;
-
- CAMEL_EXCEPTION_UNLOCK(exception);
-}
-
-/**
- * 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;
-
- if (exception->desc)
- g_free (exception->desc);
- 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 (!ex)
- return;
-
- CAMEL_EXCEPTION_LOCK(exception);
-
- ex->id = id;
-
- if (ex->desc)
- g_free(ex->desc);
- ex->desc = g_strdup(desc);
-
- CAMEL_EXCEPTION_UNLOCK(exception);
-}
-
-/**
- * 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;
-
- if (!ex)
- return;
-
- CAMEL_EXCEPTION_LOCK(exception);
-
- if (ex->desc)
- g_free (ex->desc);
-
- va_start(args, format);
- ex->desc = g_strdup_vprintf (format, args);
- va_end (args);
-
- ex->id = id;
-
- CAMEL_EXCEPTION_UNLOCK(exception);
-}
-
-/**
- * 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)
-{
- CAMEL_EXCEPTION_LOCK(exception);
-
- 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_UNLOCK(exception);
-}
-
-/**
- * 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)
-{
- char *ret = NULL;
-
- if (ex)
- ret = ex->desc;
-
- return ret;
-}
diff --git a/camel/camel-exception.h b/camel/camel-exception.h
deleted file mode 100644
index 2bd1bec90c..0000000000
--- a/camel/camel-exception.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-execpetion.h : exception utils */
-
-/*
- *
- * Author :
- * Bertrand Guiheneuf <bertrand@helixcode.com>
- *
- * 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 <camel/camel-types.h>
-
-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 char * 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-filter-driver.c b/camel/camel-filter-driver.c
deleted file mode 100644
index 08d01da694..0000000000
--- a/camel/camel-filter-driver.c
+++ /dev/null
@@ -1,911 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000 Helix Code Inc.
- * Copyright (C) 2001 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@helixcode.com>
- * Jeffrey Stedfast <fejj@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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <string.h>
-#include <time.h>
-
-#include <glib.h>
-
-#include "camel-filter-driver.h"
-#include "camel-filter-search.h"
-
-#include "camel-exception.h"
-#include "camel-service.h"
-#include "camel-mime-message.h"
-
-#include "e-util/e-sexp.h"
-#include "e-util/e-memory.h"
-#include "e-util/e-msgport.h" /* for edlist */
-
-#define d(x)
-
-/* type of status for a log report */
-enum filter_log_t {
- FILTER_LOG_NONE,
- FILTER_LOG_START, /* start of new log entry */
- FILTER_LOG_ACTION, /* an action performed */
- FILTER_LOG_END, /* end of log */
-};
-
-/* list of rule nodes */
-struct _filter_rule {
- struct _filter_rule *next;
- struct _filter_rule *prev;
-
- char *match;
- char *action;
- char *name;
-};
-
-struct _CamelFilterDriverPrivate {
- GHashTable *globals; /* global variables */
-
- CamelFolder *defaultfolder; /* defualt folder */
-
- CamelFilterStatusFunc *statusfunc; /* status callback */
- void *statusdata; /* status callback data */
-
- /* for callback */
- CamelFilterGetFolderFunc get_folder;
- void *data;
-
- /* run-time data */
- GHashTable *folders; /* folders that message has been copied to */
- int closed; /* close count */
- GHashTable *forwards; /* addresses that have been forwarded the message */
-
- gboolean terminated; /* message processing was terminated */
- gboolean deleted; /* message was marked for deletion */
- gboolean copied; /* message was copied to some folder or another */
-
- CamelMimeMessage *message; /* input message */
- CamelMessageInfo *info; /* message summary info */
- const char *uid; /* message uid */
- CamelFolder *source; /* message source folder */
-
- FILE *logfile; /* log file */
-
- EDList rules; /* list of _filter_rule structs */
-
- CamelException *ex;
-
- /* evaluator */
- ESExp *eval;
-};
-
-#define _PRIVATE(o) (((CamelFilterDriver *)(o))->priv)
-
-static void camel_filter_driver_class_init (CamelFilterDriverClass *klass);
-static void camel_filter_driver_init (CamelFilterDriver *obj);
-static void camel_filter_driver_finalise (CamelObject *obj);
-
-static void camel_filter_driver_log (CamelFilterDriver *driver, enum filter_log_t status, const char *desc, ...);
-
-static CamelFolder *open_folder (CamelFilterDriver *d, const char *folder_url);
-static int close_folders (CamelFilterDriver *d);
-
-static ESExpResult *do_delete (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriver *);
-static ESExpResult *mark_forward (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriver *);
-static ESExpResult *do_copy (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriver *);
-static ESExpResult *do_move (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriver *);
-static ESExpResult *do_stop (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriver *);
-static ESExpResult *do_colour (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriver *);
-static ESExpResult *do_score (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriver *);
-static ESExpResult *do_flag (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriver *);
-
-/* these are our filter actions - each must have a callback */
-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 *) mark_forward, 0 },
- { "copy-to", (ESExpFunc *) do_copy, 0 },
- { "move-to", (ESExpFunc *) do_move, 0 },
- { "stop", (ESExpFunc *) do_stop, 0 },
- { "set-colour", (ESExpFunc *) do_colour, 0 },
- { "set-score", (ESExpFunc *) do_score, 0 },
- { "set-system-flag", (ESExpFunc *) do_flag, 0 }
-};
-
-static CamelObjectClass *camel_filter_driver_parent;
-
-guint
-camel_filter_driver_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register(CAMEL_OBJECT_TYPE, "CamelFilterDriver",
- sizeof(CamelFilterDriver),
- sizeof(CamelFilterDriverClass),
- (CamelObjectClassInitFunc)camel_filter_driver_class_init,
- NULL,
- (CamelObjectInitFunc)camel_filter_driver_init,
- (CamelObjectFinalizeFunc)camel_filter_driver_finalise);
- }
-
- return type;
-}
-
-static void
-camel_filter_driver_class_init (CamelFilterDriverClass *klass)
-{
- /*CamelObjectClass *object_class = (CamelObjectClass *) klass;*/
-
- camel_filter_driver_parent = camel_type_get_global_classfuncs(camel_object_get_type());
-}
-
-static void
-camel_filter_driver_init (CamelFilterDriver *obj)
-{
- struct _CamelFilterDriverPrivate *p;
- int i;
-
- p = _PRIVATE (obj) = g_malloc0 (sizeof (*p));
-
- e_dlist_init(&p->rules);
-
- p->eval = e_sexp_new ();
- /* Load in builtin symbols */
- for (i = 0; i < sizeof (symbols) / sizeof (symbols[0]); i++) {
- if (symbols[i].type == 1) {
- e_sexp_add_ifunction (p->eval, 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->folders = g_hash_table_new (g_str_hash, g_str_equal);
-}
-
-static void
-free_hash_strings (void *key, void *value, void *data)
-{
- g_free (key);
- g_free (value);
-}
-
-static void
-camel_filter_driver_finalise (CamelObject *obj)
-{
- CamelFilterDriver *driver = (CamelFilterDriver *) obj;
- struct _CamelFilterDriverPrivate *p = _PRIVATE (driver);
- struct _filter_rule *node;
-
- /* close all folders that were opened for appending */
- close_folders (driver);
- g_hash_table_destroy (p->folders);
-
- g_hash_table_foreach (p->globals, free_hash_strings, driver);
- g_hash_table_destroy (p->globals);
-
- e_sexp_unref(p->eval);
-
- if (p->defaultfolder) {
- camel_folder_thaw (p->defaultfolder);
- camel_object_unref (CAMEL_OBJECT (p->defaultfolder));
- }
-
- while ((node = (struct _filter_rule *)e_dlist_remhead(&p->rules))) {
- g_free(node->match);
- g_free(node->action);
- g_free(node->name);
- g_free(node);
- }
-
- g_free (p);
-}
-
-/**
- * camel_filter_driver_new:
- * @system: path to system rules
- * @user: path to user rules
- * @get_folder: function to call to fetch folders
- *
- * Create a new CamelFilterDriver object.
- *
- * Return value: A new CamelFilterDriver widget.
- **/
-CamelFilterDriver *
-camel_filter_driver_new (CamelFilterGetFolderFunc get_folder, void *data)
-{
- CamelFilterDriver *new;
- struct _CamelFilterDriverPrivate *p;
-
- new = CAMEL_FILTER_DRIVER (camel_object_new(camel_filter_driver_get_type ()));
- p = _PRIVATE (new);
-
- p->get_folder = get_folder;
- p->data = data;
-
- return new;
-}
-
-void
-camel_filter_driver_set_logfile (CamelFilterDriver *d, FILE *logfile)
-{
- struct _CamelFilterDriverPrivate *p = _PRIVATE (d);
-
- p->logfile = logfile;
-}
-
-void
-camel_filter_driver_set_status_func (CamelFilterDriver *d, CamelFilterStatusFunc *func, void *data)
-{
- struct _CamelFilterDriverPrivate *p = _PRIVATE (d);
-
- p->statusfunc = func;
- p->statusdata = data;
-}
-
-void
-camel_filter_driver_set_default_folder (CamelFilterDriver *d, CamelFolder *def)
-{
- struct _CamelFilterDriverPrivate *p = _PRIVATE (d);
-
- if (p->defaultfolder) {
- camel_folder_thaw (p->defaultfolder);
- camel_object_unref (CAMEL_OBJECT (p->defaultfolder));
- }
-
- p->defaultfolder = def;
-
- if (p->defaultfolder) {
- camel_folder_freeze (p->defaultfolder);
- camel_object_ref (CAMEL_OBJECT (p->defaultfolder));
- }
-}
-
-void
-camel_filter_driver_add_rule(CamelFilterDriver *d, const char *name, const char *match, const char *action)
-{
- struct _CamelFilterDriverPrivate *p = _PRIVATE (d);
- struct _filter_rule *node;
-
- node = g_malloc(sizeof(*node));
- node->match = g_strdup(match);
- node->action = g_strdup(action);
- node->name = g_strdup(name);
- e_dlist_addtail(&p->rules, (EDListNode *)node);
-}
-
-static void
-report_status (CamelFilterDriver *driver, enum camel_filter_status_t status, int pc, const char *desc, ...)
-{
- /* call user-defined status report function */
- struct _CamelFilterDriverPrivate *p = _PRIVATE (driver);
- va_list ap;
- char *str;
-
- if (p->statusfunc) {
- va_start (ap, desc);
- str = g_strdup_vprintf (desc, ap);
- p->statusfunc (driver, status, pc, str, p->statusdata);
- g_free (str);
- }
-}
-
-
-#if 0
-void
-camel_filter_driver_set_global (CamelFilterDriver *d, const char *name, const char *value)
-{
- struct _CamelFilterDriverPrivate *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));
- }
-}
-#endif
-
-static ESExpResult *
-do_delete (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriver *driver)
-{
- struct _CamelFilterDriverPrivate *p = _PRIVATE (driver);
-
- d(fprintf (stderr, "doing delete\n"));
- p->deleted = TRUE;
- camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Delete");
-
- return NULL;
-}
-
-static ESExpResult *
-mark_forward (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriver *driver)
-{
- /*struct _CamelFilterDriverPrivate *p = _PRIVATE (driver);*/
-
- d(fprintf (stderr, "marking message for forwarding\n"));
- /* FIXME: do stuff here */
- camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Forward");
-
- return NULL;
-}
-
-static ESExpResult *
-do_copy (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriver *driver)
-{
- struct _CamelFilterDriverPrivate *p = _PRIVATE (driver);
- int i;
-
- d(fprintf (stderr, "copying message...\n"));
-
- for (i = 0; i < argc; i++) {
- if (argv[i]->type == ESEXP_RES_STRING) {
- /* open folders we intent to copy to */
- char *folder = argv[i]->value.string;
- char *service_url;
- CamelFolder *outbox;
-
- outbox = open_folder (driver, folder);
- if (!outbox)
- break;
-
- p->copied = TRUE;
- if (p->uid && p->source && camel_folder_has_summary_capability (p->source)) {
- GPtrArray *uids;
-
- uids = g_ptr_array_new ();
- g_ptr_array_add (uids, (char *) p->uid);
- camel_folder_copy_messages_to (p->source, uids, outbox, p->ex);
- g_ptr_array_free (uids, TRUE);
- } else
- camel_folder_append_message (outbox, p->message, p->info, p->ex);
-
- service_url = camel_service_get_url (CAMEL_SERVICE (camel_folder_get_parent_store (outbox)));
- camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Copy to folder %s",
- service_url);
- g_free (service_url);
- }
- }
-
- return NULL;
-}
-
-static ESExpResult *
-do_move (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriver *driver)
-{
- struct _CamelFilterDriverPrivate *p = _PRIVATE (driver);
- int i;
-
- d(fprintf (stderr, "moving message...\n"));
-
- for (i = 0; i < argc; i++) {
- if (argv[i]->type == ESEXP_RES_STRING) {
- /* open folders we intent to move to */
- char *folder = argv[i]->value.string;
- char *service_url;
- CamelFolder *outbox;
-
- outbox = open_folder (driver, folder);
- if (!outbox)
- break;
-
- p->copied = TRUE;
- p->deleted = TRUE; /* a 'move' is a copy & delete */
-
- if (p->uid && p->source && camel_folder_has_summary_capability (p->source)) {
- GPtrArray *uids;
-
- uids = g_ptr_array_new ();
- g_ptr_array_add (uids, (char *) p->uid);
- camel_folder_copy_messages_to (p->source, uids, outbox, p->ex);
- g_ptr_array_free (uids, TRUE);
- } else
- camel_folder_append_message (outbox, p->message, p->info, p->ex);
-
- service_url = camel_service_get_url (CAMEL_SERVICE (camel_folder_get_parent_store (outbox)));
- camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Move to folder %s",
- service_url);
- g_free (service_url);
- }
- }
-
- return NULL;
-}
-
-static ESExpResult *
-do_stop (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriver *driver)
-{
- struct _CamelFilterDriverPrivate *p = _PRIVATE (driver);
-
- camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Stopped processing");
- d(fprintf (stderr, "terminating message processing\n"));
- p->terminated = TRUE;
-
- return NULL;
-}
-
-static ESExpResult *
-do_colour (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriver *driver)
-{
- struct _CamelFilterDriverPrivate *p = _PRIVATE (driver);
-
- d(fprintf (stderr, "setting colour tag\n"));
- if (argc > 0 && argv[0]->type == ESEXP_RES_STRING) {
- camel_tag_set (&p->info->user_tags, "colour", argv[0]->value.string);
- camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Set colour to %s", argv[0]->value.string);
- }
-
- return NULL;
-}
-
-static ESExpResult *
-do_score (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriver *driver)
-{
- struct _CamelFilterDriverPrivate *p = _PRIVATE (driver);
-
- d(fprintf (stderr, "setting score tag\n"));
- if (argc > 0 && argv[0]->type == ESEXP_RES_INT) {
- char *value;
-
- value = g_strdup_printf ("%d", argv[0]->value.number);
- camel_tag_set (&p->info->user_tags, "score", value);
- camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Set score to %d", argv[0]->value.number);
- g_free (value);
- }
-
- return NULL;
-}
-
-static ESExpResult *
-do_flag (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFilterDriver *driver)
-{
- struct _CamelFilterDriverPrivate *p = _PRIVATE (driver);
-
- d(fprintf (stderr, "setting flag\n"));
- if (argc == 1 && argv[0]->type == ESEXP_RES_STRING) {
- p->info->flags |= camel_system_flag (argv[0]->value.string) | CAMEL_MESSAGE_FOLDER_FLAGGED;
- camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Set %s flag", argv[0]->value.string);
- }
-
- return NULL;
-}
-
-static CamelFolder *
-open_folder (CamelFilterDriver *driver, const char *folder_url)
-{
- struct _CamelFilterDriverPrivate *p = _PRIVATE (driver);
- CamelFolder *camelfolder;
-
- /* we have a lookup table of currently open folders */
- camelfolder = g_hash_table_lookup (p->folders, folder_url);
- if (camelfolder)
- return camelfolder;
-
- camelfolder = p->get_folder (driver, folder_url, p->data, p->ex);
-
- if (camelfolder) {
- g_hash_table_insert (p->folders, g_strdup (folder_url), camelfolder);
- camel_folder_freeze (camelfolder);
- }
-
- return camelfolder;
-}
-
-static void
-close_folder (void *key, void *value, void *data)
-{
- CamelFolder *folder = value;
- CamelFilterDriver *driver = data;
- struct _CamelFilterDriverPrivate *p = _PRIVATE (driver);
-
- p->closed++;
-
- g_free (key);
- camel_folder_sync (folder, FALSE, p->ex);
- camel_folder_thaw (folder);
- camel_object_unref (CAMEL_OBJECT (folder));
-
- report_status(driver, CAMEL_FILTER_STATUS_PROGRESS, g_hash_table_size(p->folders)* 100 / p->closed, _("Syncing folders"));
-}
-
-/* flush/close all folders */
-static int
-close_folders (CamelFilterDriver *driver)
-{
- struct _CamelFilterDriverPrivate *p = _PRIVATE (driver);
-
- report_status(driver, CAMEL_FILTER_STATUS_PROGRESS, 0, _("Syncing folders"));
-
- p->closed = 0;
- g_hash_table_foreach (p->folders, close_folder, driver);
- g_hash_table_destroy (p->folders);
- p->folders = g_hash_table_new (g_str_hash, g_str_equal);
-
- /* FIXME: status from driver */
- return 0;
-}
-
-#if 0
-static void
-free_key (gpointer key, gpointer value, gpointer user_data)
-{
- g_free (key);
-}
-#endif
-
-
-static void
-camel_filter_driver_log (CamelFilterDriver *driver, enum filter_log_t status, const char *desc, ...)
-{
- struct _CamelFilterDriverPrivate *p = _PRIVATE (driver);
-
- if (p->logfile) {
- char *str = NULL;
-
- if (desc) {
- va_list ap;
-
- va_start (ap, desc);
- str = g_strdup_vprintf (desc, ap);
- }
-
- switch (status) {
- case FILTER_LOG_START: {
- /* write log header */
- const char *subject = NULL;
- char *fromstr;
- const CamelInternetAddress *from;
- char date[50];
- time_t t;
-
- /* FIXME: does this need locking? Probably */
-
- from = camel_mime_message_get_from (p->message);
- fromstr = camel_address_format((CamelAddress *)from);
- subject = camel_mime_message_get_subject (p->message);
-
- time (&t);
- strftime (date, 49, "%a, %d %b %Y %H:%M:%S", localtime (&t));
- fprintf (p->logfile, "Applied filter \"%s\" to message from %s - \"%s\" at %s\n",
- str, fromstr ? fromstr : "unknown", subject ? subject : "", date);
- g_free(fromstr);
- break;
- }
- case FILTER_LOG_ACTION:
- fprintf (p->logfile, "Action: %s\n", str);
- break;
- case FILTER_LOG_END:
- fprintf (p->logfile, "\n");
- break;
- default:
- /* nothing else is loggable */
- break;
- }
-
- g_free (str);
- }
-}
-
-
-/**
- * camel_filter_driver_filter_mbox:
- * @driver: CamelFilterDriver
- * @mbox: mbox filename to be filtered
- * @ex: exception
- *
- * Filters an mbox file based on rules defined in the FilterDriver
- * object. Is more efficient as it doesn't need to open the folder
- * through Camel directly.
- *
- * Returns -1 if errors were encountered during filtering,
- * otherwise returns 0.
- *
- **/
-int
-camel_filter_driver_filter_mbox (CamelFilterDriver *driver, const char *mbox, CamelException *ex)
-{
- struct _CamelFilterDriverPrivate *p = _PRIVATE (driver);
- CamelMimeParser *mp = NULL;
- char *source_url = NULL;
- int fd = -1;
- int i = 0;
- struct stat st;
- int status;
-
- fd = open (mbox, O_RDONLY);
- if (fd == -1) {
- camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM, _("Unable to open spool folder"));
- goto fail;
- }
- /* to get the filesize */
- fstat (fd, &st);
-
- mp = camel_mime_parser_new ();
- camel_mime_parser_scan_from (mp, TRUE);
- if (camel_mime_parser_init_with_fd (mp, fd) == -1) {
- camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM, _("Unable to process spool folder"));
- goto fail;
- }
- fd = -1;
-
- source_url = g_strdup_printf ("file://%s", mbox);
-
- while (camel_mime_parser_step (mp, 0, 0) == HSCAN_FROM) {
- CamelMimeMessage *msg;
- int pc = 0;
-
- if (st.st_size > 0)
- pc = (int)(100.0 * ((double)camel_mime_parser_tell (mp) / (double)st.st_size));
-
- report_status (driver, CAMEL_FILTER_STATUS_START, pc, _("Getting message %d (%d%%)"), i, pc);
-
- msg = camel_mime_message_new ();
- if (camel_mime_part_construct_from_parser (CAMEL_MIME_PART (msg), mp) == -1) {
- report_status (driver, CAMEL_FILTER_STATUS_END, 100, _("Failed message %d"), i);
- camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM, _("Cannot open message"));
- camel_object_unref (CAMEL_OBJECT (msg));
- goto fail;
- }
-
- status = camel_filter_driver_filter_message (driver, msg, NULL, NULL, NULL, source_url, ex);
- camel_object_unref (CAMEL_OBJECT (msg));
- if (camel_exception_is_set (ex) || status == -1) {
- report_status (driver, CAMEL_FILTER_STATUS_END, 100, _("Failed message %d"), i);
- goto fail;
- }
-
- i++;
-
- /* skip over the FROM_END state */
- camel_mime_parser_step (mp, 0, 0);
- }
-
- if (p->defaultfolder) {
- report_status(driver, CAMEL_FILTER_STATUS_PROGRESS, 100, _("Syncing folder"));
- camel_folder_sync(p->defaultfolder, FALSE, ex);
- }
-
- report_status (driver, CAMEL_FILTER_STATUS_END, 100, _("Complete"));
-
- return 0;
-
-fail:
- g_free (source_url);
- if (fd != -1)
- close (fd);
- if (mp)
- camel_object_unref (CAMEL_OBJECT (mp));
-
- return -1;
-}
-
-
-/**
- * camel_filter_driver_filter_folder:
- * @driver: CamelFilterDriver
- * @folder: CamelFolder to be filtered
- * @uids: message uids to be filtered or NULL (as a shortcut to filter all messages)
- * @remove: TRUE to mark filtered messages as deleted
- * @ex: exception
- *
- * Filters a folder based on rules defined in the FilterDriver
- * object.
- *
- * Returns -1 if errors were encountered during filtering,
- * otherwise returns 0.
- *
- **/
-int
-camel_filter_driver_filter_folder (CamelFilterDriver *driver, CamelFolder *folder,
- GPtrArray *uids, gboolean remove, CamelException *ex)
-{
- struct _CamelFilterDriverPrivate *p = _PRIVATE (driver);
- int i;
- int freeuids = FALSE;
- CamelMimeMessage *message;
- CamelMessageInfo *info;
- char *source_url, *service_url;
- int status = 0;
-
- service_url = camel_service_get_url (CAMEL_SERVICE (camel_folder_get_parent_store (folder)));
- source_url = g_strdup_printf ("%s%s", service_url, camel_folder_get_full_name (folder));
- g_free (service_url);
-
- if (uids == NULL) {
- uids = camel_folder_get_uids (folder);
- freeuids = TRUE;
- }
-
- for (i = 0; i < uids->len; i++) {
- int pc = (100 * i)/uids->len;
-
- report_status (driver, CAMEL_FILTER_STATUS_START, pc, _("Getting message %d of %d"), i+1,
- uids->len);
-
- message = camel_folder_get_message (folder, uids->pdata[i], ex);
- if (!message || camel_exception_is_set (ex)) {
- report_status (driver, CAMEL_FILTER_STATUS_END, 100, _("Failed at message %d of %d"),
- i+1, uids->len);
- status = -1;
- break;
- }
-
- if (camel_folder_has_summary_capability (folder))
- info = camel_folder_get_message_info (folder, uids->pdata[i]);
- else
- info = NULL;
-
- status = camel_filter_driver_filter_message (driver, message, info, uids->pdata[i],
- folder, source_url, ex);
-
- if (camel_folder_has_summary_capability (folder))
- camel_folder_free_message_info (folder, info);
-
- if (camel_exception_is_set (ex) || status == -1) {
- report_status (driver, CAMEL_FILTER_STATUS_END, 100, _("Failed at message %d of %d"),
- i+1, uids->len);
- status = -1;
- break;
- }
-
- if (remove)
- camel_folder_set_message_flags (folder, uids->pdata[i],
- CAMEL_MESSAGE_DELETED|CAMEL_MESSAGE_SEEN, CAMEL_MESSAGE_DELETED|CAMEL_MESSAGE_SEEN);
-
- camel_object_unref (CAMEL_OBJECT (message));
- }
-
- if (freeuids)
- camel_folder_free_uids (folder, uids);
-
- if (p->defaultfolder) {
- report_status(driver, CAMEL_FILTER_STATUS_PROGRESS, 100, _("Syncing folder"));
- camel_folder_sync (p->defaultfolder, FALSE, ex);
- }
-
- if (i == uids->len)
- report_status (driver, CAMEL_FILTER_STATUS_END, 100, _("Complete"));
-
- g_free (source_url);
-
- return status;
-}
-
-
-/**
- * camel_filter_driver_filter_message:
- * @driver: CamelFilterDriver
- * @message: message to filter
- * @info: message info or NULL
- * @uid: message uid or NULL
- * @source: source folder or NULL
- * @source_url: url of source folder or NULL
- * @ex: exception
- *
- * Filters a message based on rules defined in the FilterDriver
- * object. If the source folder (@source) and the uid (@uid) are
- * provided, the filter will operate on the CamelFolder (which in
- * certain cases is more efficient than using the default
- * camel_folder_append_message() function).
- *
- * Returns -1 if errors were encountered during filtering,
- * otherwise returns 0.
- *
- **/
-int
-camel_filter_driver_filter_message (CamelFilterDriver *driver, CamelMimeMessage *message,
- CamelMessageInfo *info, const char *uid,
- CamelFolder *source, const char *source_url,
- CamelException *ex)
-{
- struct _CamelFilterDriverPrivate *p = _PRIVATE (driver);
- ESExpResult *r;
- struct _filter_rule *node;
- gboolean freeinfo = FALSE;
- gboolean filtered = FALSE;
-
- if (info == NULL) {
- struct _header_raw *h = CAMEL_MIME_PART (message)->headers;
-
- info = camel_message_info_new_from_header (h);
- freeinfo = TRUE;
- } else {
- if (info->flags & CAMEL_MESSAGE_DELETED)
- return 0;
- }
-
- p->ex = ex;
- p->terminated = FALSE;
- p->deleted = FALSE;
- p->copied = FALSE;
- p->message = message;
- p->info = info;
- p->uid = uid;
- p->source = source;
-
- if (camel_mime_message_get_source (message) == NULL)
- camel_mime_message_set_source (message, source_url);
-
- node = (struct _filter_rule *)p->rules.head;
- while (node->next) {
- d(fprintf (stderr, "applying rule %s\n action %s\n", node->match, node->action));
-
- if (camel_filter_search_match(p->message, p->info, source_url, node->match, p->ex)) {
- filtered = TRUE;
- camel_filter_driver_log (driver, FILTER_LOG_START, node->name);
-
- /* perform necessary filtering actions */
- e_sexp_input_text (p->eval, node->action, strlen (node->action));
- if (e_sexp_parse (p->eval) == -1) {
- camel_exception_setv(ex, 1, _("Error parsing filter: %s: %s"), e_sexp_error(p->eval), node->action);
- goto error;
- }
- r = e_sexp_eval (p->eval);
- if (r == NULL) {
- camel_exception_setv(ex, 1, _("Error executing filter: %s: %s"), e_sexp_error(p->eval), node->action);
- goto error;
- }
- e_sexp_result_free (p->eval, r);
- if (p->terminated)
- break;
- }
- node = node->next;
- }
-
- /* *Now* we can set the DELETED flag... */
- if (p->deleted)
- info->flags = info->flags | CAMEL_MESSAGE_DELETED | CAMEL_MESSAGE_FOLDER_FLAGGED | CAMEL_MESSAGE_SEEN;
-
- /* Logic: if !Moved and there exists a default folder... */
- if (!(p->copied && p->deleted) && p->defaultfolder) {
- /* copy it to the default inbox */
- filtered = TRUE;
- camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Copy to default folder");
- if (p->uid && p->source && camel_folder_has_summary_capability (p->source)) {
- GPtrArray *uids;
-
- uids = g_ptr_array_new ();
- g_ptr_array_add (uids, (char *) p->uid);
- camel_folder_copy_messages_to (p->source, uids, p->defaultfolder, p->ex);
- g_ptr_array_free (uids, TRUE);
- } else
- camel_folder_append_message (p->defaultfolder, p->message, p->info, p->ex);
- }
-
- return 0;
-
-error:
- if (filtered)
- camel_filter_driver_log (driver, FILTER_LOG_END, NULL);
-
- if (freeinfo)
- camel_message_info_free (info);
-
- return -1;
-}
diff --git a/camel/camel-filter-driver.h b/camel/camel-filter-driver.h
deleted file mode 100644
index 94cc54820b..0000000000
--- a/camel/camel-filter-driver.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (C) 2000 Helix Code Inc.
- *
- * Authors: Michael Zucchi <notzed@helixcode.com>
- * Jeffrey Stedfast <fejj@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_FILTER_DRIVER_H
-#define _CAMEL_FILTER_DRIVER_H
-
-#include <glib.h>
-#include <camel/camel-object.h>
-#include <camel/camel-session.h>
-#include <camel/camel-folder.h>
-
-#define CAMEL_FILTER_DRIVER_TYPE (camel_filter_driver_get_type())
-#define CAMEL_FILTER_DRIVER(obj) CAMEL_CHECK_CAST (obj, camel_filter_driver_get_type (), CamelFilterDriver)
-#define CAMEL_FILTER_DRIVER_CLASS(klass) CAMEL__CHECK_CLASS_CAST (klass, camel_filter_driver_get_type (), CamelFilterDriverClass)
-#define CAMEL_IS_FILTER_DRIVER(obj) CAMEL_CHECK_TYPE (obj, camel_filter_driver_get_type ())
-
-typedef struct _CamelFilterDriver CamelFilterDriver;
-typedef struct _CamelFilterDriverClass CamelFilterDriverClass;
-
-struct _CamelFilterDriver {
- CamelObject parent;
-
- struct _CamelFilterDriverPrivate *priv;
-};
-
-struct _CamelFilterDriverClass {
- CamelObjectClass parent_class;
-};
-
-/* FIXME: this maybe should change... */
-/* type of status for a status report */
-enum camel_filter_status_t {
- CAMEL_FILTER_STATUS_NONE,
- CAMEL_FILTER_STATUS_START, /* start of new message processed */
- CAMEL_FILTER_STATUS_ACTION, /* an action performed */
- CAMEL_FILTER_STATUS_PROGRESS, /* (an) extra update(s), if its taking longer to process */
- CAMEL_FILTER_STATUS_END, /* end of message */
-};
-
-typedef CamelFolder * (*CamelFilterGetFolderFunc) (CamelFilterDriver *, const char *uri, void *data, CamelException *ex);
-/* report status */
-typedef void (CamelFilterStatusFunc)(CamelFilterDriver *driver, enum camel_filter_status_t status, int pc, const char *desc, void *data);
-
-guint camel_filter_driver_get_type (void);
-CamelFilterDriver *camel_filter_driver_new (CamelFilterGetFolderFunc fetcher, void *data);
-
-/* modifiers */
-void camel_filter_driver_set_logfile (CamelFilterDriver *d, FILE *logfile);
-void camel_filter_driver_set_status_func (CamelFilterDriver *d, CamelFilterStatusFunc *func,
- void *data);
-void camel_filter_driver_set_default_folder (CamelFilterDriver *d, CamelFolder *def);
-void camel_filter_driver_add_rule (CamelFilterDriver *d, const char *name, const char *match,
- const char *action);
-
-/*void camel_filter_driver_set_global(CamelFilterDriver *, const char *name, const char *value);*/
-
-int camel_filter_driver_filter_message (CamelFilterDriver *driver, CamelMimeMessage *message,
- CamelMessageInfo *info, const char *uri,
- CamelFolder *source, const char *source_url,
- CamelException *ex);
-int camel_filter_driver_filter_mbox (CamelFilterDriver *driver, const char *mbox,
- CamelException *ex);
-int camel_filter_driver_filter_folder (CamelFilterDriver *driver, CamelFolder *folder,
- GPtrArray *uids, gboolean remove, CamelException *ex);
-
-#if 0
-/* generate the search query/action string for a filter option */
-void camel_filter_driver_expand_option (CamelFilterDriver *d, GString *s, GString *action, struct filter_option *op);
-
-/* get info about rules (options) */
-int camel_filter_driver_rule_count (CamelFilterDriver *d);
-struct filter_option *camel_filter_driver_rule_get (CamelFilterDriver *d, int n);
-#endif
-
-#endif /* ! _CAMEL_FILTER_DRIVER_H */
diff --git a/camel/camel-filter-search.c b/camel/camel-filter-search.c
deleted file mode 100644
index 78f4ee7b4c..0000000000
--- a/camel/camel-filter-search.c
+++ /dev/null
@@ -1,465 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@helixcode.com>
- * Michael Zucchi <NotZed@Ximian.com>
- *
- * Copyright 2000 Helix Code, Inc. (www.helixcode.com)
- * Copyright 2001 Ximian Inc. (www.ximian.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.
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-/* (from glibc headers:
- POSIX says that <sys/types.h> must be included (by the caller) before <regex.h>. */
-
-#include <sys/types.h>
-#include <regex.h>
-#include <string.h>
-#include <ctype.h>
-
-#include "e-util/e-sexp.h"
-#include "e-util/e-url.h"
-
-#include "camel-mime-message.h"
-#include "camel-filter-search.h"
-#include "camel-exception.h"
-#include "camel-multipart.h"
-#include "camel-stream-mem.h"
-#include "camel-search-private.h"
-
-#define d(x)
-
-typedef struct {
- CamelMimeMessage *message;
- CamelMessageInfo *info;
- const char *source;
- CamelException *ex;
-} FilterMessageSearch;
-
-/* ESExp callbacks */
-static ESExpResult *header_contains (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *header_matches (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *header_starts_with (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *header_ends_with (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *header_exists (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *header_soundex (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *header_regex (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *header_full_regex (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *match_all (struct _ESExp *f, int argc, struct _ESExpTerm **argv, FilterMessageSearch *fms);
-static ESExpResult *body_contains (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *body_regex (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *user_flag (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *user_tag (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *system_flag (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *get_sent_date (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *get_received_date (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *get_current_date (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *get_score (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *get_source (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-
-/* 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[] = {
- { "match-all", (ESExpFunc *) match_all, 1 },
- { "body-contains", (ESExpFunc *) body_contains, 0 },
- { "body-regex", (ESExpFunc *) body_regex, 0 },
- { "header-contains", (ESExpFunc *) header_contains, 0 },
- { "header-matches", (ESExpFunc *) header_matches, 0 },
- { "header-starts-with", (ESExpFunc *) header_starts_with, 0 },
- { "header-ends-with", (ESExpFunc *) header_ends_with, 0 },
- { "header-exists", (ESExpFunc *) header_exists, 0 },
- { "header-soundex", (ESExpFunc *) header_soundex, 0 },
- { "header-regex", (ESExpFunc *) header_regex, 0 },
- { "header-full-regex", (ESExpFunc *) header_full_regex, 0 },
- { "user-tag", (ESExpFunc *) user_tag, 0 },
- { "user-flag", (ESExpFunc *) user_flag, 0 },
- { "system-flag", (ESExpFunc *) system_flag, 0 },
- { "get-sent-date", (ESExpFunc *) get_sent_date, 0 },
- { "get-received-date", (ESExpFunc *) get_received_date, 0 },
- { "get-current-date", (ESExpFunc *) get_current_date, 0 },
- { "get-score", (ESExpFunc *) get_score, 0 },
- { "get-source", (ESExpFunc *) get_source, 0 },
-};
-
-static ESExpResult *
-check_header(struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms, camel_search_match_t how)
-{
- gboolean matched = FALSE;
- ESExpResult *r;
- int i;
-
- if (argc > 1 && argv[0]->type == ESEXP_RES_STRING) {
- char *name = argv[0]->value.string;
- const char *header;
-
- if (strcasecmp(name, "x-camel-mlist") == 0)
- header = camel_message_info_mlist(fms->info);
- else
- header = camel_medium_get_header (CAMEL_MEDIUM (fms->message), argv[0]->value.string);
-
- if (header) {
- for (i=1;i<argc && !matched;i++) {
- if (argv[i]->type == ESEXP_RES_STRING
- && camel_search_header_match(header, argv[i]->value.string, how)) {
- matched = TRUE;
- break;
- }
- }
- }
- }
-
- r = e_sexp_result_new(f, ESEXP_RES_BOOL);
- r->value.bool = matched;
-
- return r;
-}
-
-static ESExpResult *
-header_contains (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
- return check_header(f, argc, argv, fms, CAMEL_SEARCH_MATCH_CONTAINS);
-}
-
-
-static ESExpResult *
-header_matches (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
- return check_header(f, argc, argv, fms, CAMEL_SEARCH_MATCH_EXACT);
-}
-
-static ESExpResult *
-header_starts_with (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
- return check_header(f, argc, argv, fms, CAMEL_SEARCH_MATCH_STARTS);
-}
-
-static ESExpResult *
-header_ends_with (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
- return check_header(f, argc, argv, fms, CAMEL_SEARCH_MATCH_ENDS);
-}
-
-static ESExpResult *
-header_soundex (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
- return check_header(f, argc, argv, fms, CAMEL_SEARCH_MATCH_SOUNDEX);
-}
-
-static ESExpResult *
-header_exists (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
- gboolean matched = FALSE;
- ESExpResult *r;
- int i;
-
- for (i=0;i<argc && !matched;i++) {
- if (argv[i]->type == ESEXP_RES_STRING)
- matched = camel_medium_get_header (CAMEL_MEDIUM (fms->message), argv[i]->value.string) != NULL;
- }
-
- r = e_sexp_result_new(f, ESEXP_RES_BOOL);
- r->value.bool = matched;
-
- return r;
-}
-
-static ESExpResult *
-header_regex (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
- ESExpResult *r = e_sexp_result_new(f, ESEXP_RES_BOOL);
- regex_t pattern;
- const char *contents;
-
- if (argc>1
- && argv[0]->type == ESEXP_RES_STRING
- && (contents = camel_medium_get_header (CAMEL_MEDIUM (fms->message), argv[0]->value.string))
- && camel_search_build_match_regex(&pattern, CAMEL_SEARCH_MATCH_REGEX|CAMEL_SEARCH_MATCH_ICASE, argc-1, argv+1, fms->ex) == 0) {
- r->value.bool = regexec(&pattern, contents, 0, NULL, 0) == 0;
- regfree(&pattern);
- } else
- r->value.bool = FALSE;
-
- return r;
-}
-
-static gchar *
-get_full_header (CamelMimeMessage *message)
-{
- CamelMimePart *mp = CAMEL_MIME_PART (message);
- GString *str = g_string_new ("");
- char *ret;
- struct _header_raw *h;
-
- for (h = mp->headers; h; h = h->next) {
- if (h->value != NULL) {
- g_string_append(str, h->name);
- if (isspace(h->value[0]))
- g_string_append(str, ":");
- else
- g_string_append(str, ": ");
- g_string_append(str, h->value);
- }
- }
-
- ret = str->str;
- g_string_free (str, FALSE);
-
- return ret;
-}
-
-static ESExpResult *
-header_full_regex (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
- ESExpResult *r = e_sexp_result_new(f, ESEXP_RES_BOOL);
- regex_t pattern;
- char *contents;
-
- if (camel_search_build_match_regex(&pattern, CAMEL_SEARCH_MATCH_REGEX|CAMEL_SEARCH_MATCH_ICASE, argc-1, argv+1, fms->ex) == 0) {
- contents = get_full_header (fms->message);
- r->value.bool = regexec(&pattern, contents, 0, NULL, 0) == 0;
- g_free(contents);
- regfree(&pattern);
- } else
- r->value.bool = FALSE;
-
- return r;
-}
-
-static ESExpResult *
-match_all (struct _ESExp *f, int argc, struct _ESExpTerm **argv, FilterMessageSearch *fms)
-{
- /* match-all: when dealing with single messages is a no-op */
- ESExpResult *r;
-
- if (argc > 0)
- return e_sexp_term_eval(f, argv[0]);
-
- r = e_sexp_result_new(f, ESEXP_RES_BOOL);
- r->value.bool = FALSE;
-
- return r;
-}
-
-static ESExpResult *
-body_contains (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
- ESExpResult *r = e_sexp_result_new(f, ESEXP_RES_BOOL);
- regex_t pattern;
-
- if (camel_search_build_match_regex(&pattern, CAMEL_SEARCH_MATCH_ICASE, argc, argv, fms->ex) == 0) {
- r->value.bool = camel_search_message_body_contains((CamelDataWrapper *)fms->message, &pattern);
- regfree(&pattern);
- } else
- r->value.bool = FALSE;
-
- return r;
-}
-
-static ESExpResult *
-body_regex (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
- ESExpResult *r = e_sexp_result_new(f, ESEXP_RES_BOOL);
- regex_t pattern;
-
- if (camel_search_build_match_regex(&pattern, CAMEL_SEARCH_MATCH_ICASE|CAMEL_SEARCH_MATCH_REGEX, argc, argv, fms->ex) == 0) {
- r->value.bool = camel_search_message_body_contains((CamelDataWrapper *)fms->message, &pattern);
- regfree(&pattern);
- } else
- r->value.bool = FALSE;
-
- return r;
-}
-
-static ESExpResult *
-user_flag (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
- ESExpResult *r;
- gboolean truth = FALSE;
- int i;
-
- /* performs an OR of all words */
- for (i = 0; i < argc && !truth; i++) {
- if (argv[i]->type == ESEXP_RES_STRING
- && camel_flag_get (&fms->info->user_flags, argv[i]->value.string)) {
- truth = TRUE;
- break;
- }
- }
-
- r = e_sexp_result_new(f, ESEXP_RES_BOOL);
- r->value.bool = truth;
-
- return r;
-}
-
-static ESExpResult *
-system_flag (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
- ESExpResult *r;
- gboolean truth = FALSE;
-
- if (argc == 1)
- truth = camel_system_flag_get (fms->info->flags, argv[0]->value.string);
-
- r = e_sexp_result_new(f, ESEXP_RES_BOOL);
- r->value.bool = truth;
-
- return r;
-}
-
-static ESExpResult *
-user_tag (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
- ESExpResult *r;
- const char *tag;
-
- tag = camel_tag_get (&fms->info->user_tags, argv[0]->value.string);
-
- r = e_sexp_result_new(f, ESEXP_RES_STRING);
- r->value.string = g_strdup (tag ? tag : "");
-
- return r;
-}
-
-static ESExpResult *
-get_sent_date (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
- ESExpResult *r;
-
- r = e_sexp_result_new(f, ESEXP_RES_INT);
- r->value.number = camel_mime_message_get_date(fms->message, NULL);
-
- return r;
-}
-
-static ESExpResult *
-get_received_date (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
- ESExpResult *r;
-
- r = e_sexp_result_new(f, ESEXP_RES_INT);
- r->value.number = camel_mime_message_get_date_received(fms->message, NULL);
-
- return r;
-}
-
-static ESExpResult *
-get_current_date (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
- ESExpResult *r;
-
- r = e_sexp_result_new(f, ESEXP_RES_INT);
- r->value.number = time (NULL);
-
- return r;
-}
-
-static ESExpResult *
-get_score (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
- ESExpResult *r;
- const char *tag;
-
- tag = camel_tag_get (&fms->info->user_tags, "score");
-
- r = e_sexp_result_new(f, ESEXP_RES_INT);
- if (tag)
- r->value.number = atoi (tag);
- else
- r->value.number = 0;
-
- return r;
-}
-
-static ESExpResult *
-get_source (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
- ESExpResult *r;
-
- r = e_sexp_result_new(f, ESEXP_RES_STRING);
- if (fms->source) {
- r->value.string = e_url_shroud (fms->source);
- } else {
- r->value.string = camel_mime_message_get_source (fms->message);
- }
-
- g_message ("got source: [%s]", r->value.string);
-
- return r;
-}
-
-gboolean
-camel_filter_search_match(CamelMimeMessage *message, CamelMessageInfo *info,
- const char *source, const char *expression, CamelException *ex)
-{
- FilterMessageSearch fms;
- ESExp *sexp;
- ESExpResult *result;
- gboolean retval;
- int i;
-
- fms.message = message;
- fms.info = info;
- fms.source = source;
- fms.ex = ex;
-
- sexp = e_sexp_new ();
-
- for (i = 0; i < sizeof (symbols) / sizeof (symbols[0]); i++) {
- if (symbols[i].type == 1)
- e_sexp_add_ifunction (sexp, 0, symbols[i].name, (ESExpIFunc *)symbols[i].func, &fms);
- else
- e_sexp_add_function (sexp, 0, symbols[i].name, symbols[i].func, &fms);
- }
-
- e_sexp_input_text (sexp, expression, strlen (expression));
- if (e_sexp_parse (sexp) == -1) {
- if (!camel_exception_is_set(ex))
- camel_exception_setv(ex, 1, _("Error executing filter search: %s: %s"), e_sexp_error(sexp), expression);
- goto error;
- }
- result = e_sexp_eval (sexp);
- if (result == NULL) {
- if (!camel_exception_is_set(ex))
- camel_exception_setv(ex, 1, _("Error executing filter search: %s: %s"), e_sexp_error(sexp), expression);
- goto error;
- }
-
- if (result->type == ESEXP_RES_BOOL)
- retval = result->value.bool;
- else
- retval = FALSE;
-
- e_sexp_result_free (sexp, result);
- e_sexp_unref(sexp);
-
- return retval;
-
-error:
- e_sexp_unref(sexp);
- return FALSE;
-}
-
-
-
diff --git a/camel/camel-filter-search.h b/camel/camel-filter-search.h
deleted file mode 100644
index 0dba92eb2d..0000000000
--- a/camel/camel-filter-search.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@helixcode.com>
- * Michael Zucchi <NotZed@Ximian.com>
- *
- * Copyright 2000 Helix Code, Inc. (www.helixcode.com)
- * Copyright 2001 Ximian Inc. (www.ximian.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.
- *
- */
-
-#ifndef CAMEL_FILTER_SEARCH_H
-#define CAMEL_FILTER_SEARCH_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <glib.h>
-#include <camel/camel-mime-message.h>
-#include <camel/camel-folder-summary.h>
-
-gboolean camel_filter_search_match(CamelMimeMessage *message, CamelMessageInfo *info,
- const char *source, const char *expression, CamelException *ex);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* ! CAMEL_FILTER_SEARCH_H */
diff --git a/camel/camel-folder-search.c b/camel/camel-folder-search.c
deleted file mode 100644
index 18f49868ac..0000000000
--- a/camel/camel-folder-search.c
+++ /dev/null
@@ -1,905 +0,0 @@
-/*
- * Copyright (C) 2000,2001 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@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
- */
-
-/* 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. */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <sys/types.h>
-#include <regex.h>
-
-#include <glib.h>
-
-#include "camel-folder-search.h"
-#include "string-utils.h"
-
-#include "camel-exception.h"
-#include "camel-medium.h"
-#include "camel-multipart.h"
-#include "camel-mime-message.h"
-#include "camel-stream-mem.h"
-#include "e-util/e-memory.h"
-#include "camel-search-private.h"
-
-#define d(x)
-#define r(x)
-
-struct _CamelFolderSearchPrivate {
- GHashTable *mempool_hash;
- CamelException *ex;
-};
-
-#define _PRIVATE(o) (((CamelFolderSearch *)(o))->priv)
-
-static ESExpResult *search_header_contains(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *search);
-static ESExpResult *search_header_matches(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *search);
-static ESExpResult *search_header_starts_with(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *search);
-static ESExpResult *search_header_ends_with(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *search);
-static ESExpResult *search_header_exists(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_user_tag(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s);
-static ESExpResult *search_system_flag(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s);
-static ESExpResult *search_get_sent_date(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s);
-static ESExpResult *search_get_received_date(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s);
-static ESExpResult *search_get_current_date(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s);
-static ESExpResult *search_uid(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_finalize (CamelObject *obj);
-
-static CamelObjectClass *camel_folder_search_parent;
-
-static void
-camel_folder_search_class_init (CamelFolderSearchClass *klass)
-{
- camel_folder_search_parent = camel_type_get_global_classfuncs (camel_object_get_type ());
-
- klass->match_all = search_match_all;
- klass->body_contains = search_body_contains;
- klass->header_contains = search_header_contains;
- klass->header_matches = search_header_matches;
- klass->header_starts_with = search_header_starts_with;
- klass->header_ends_with = search_header_ends_with;
- klass->header_exists = search_header_exists;
- klass->user_tag = search_user_tag;
- klass->user_flag = search_user_flag;
- klass->system_flag = search_system_flag;
- klass->get_sent_date = search_get_sent_date;
- klass->get_received_date = search_get_received_date;
- klass->get_current_date = search_get_current_date;
- klass->uid = search_uid;
-}
-
-static void
-camel_folder_search_init (CamelFolderSearch *obj)
-{
- struct _CamelFolderSearchPrivate *p;
-
- p = _PRIVATE(obj) = g_malloc0(sizeof(*p));
-
- obj->sexp = e_sexp_new();
-
- /* use a hash of mempools to associate the returned uid lists with
- the backing mempool. yes pretty weird, but i didn't want to change
- the api just yet */
-
- p->mempool_hash = g_hash_table_new(0, 0);
-}
-
-static void
-free_mempool(void *key, void *value, void *data)
-{
- GPtrArray *uids = key;
- EMemPool *pool = value;
-
- g_warning("Search closed with outstanding result unfreed: %p", uids);
-
- g_ptr_array_free(uids, TRUE);
- e_mempool_destroy(pool);
-}
-
-static void
-camel_folder_search_finalize (CamelObject *obj)
-{
- CamelFolderSearch *search = (CamelFolderSearch *)obj;
- struct _CamelFolderSearchPrivate *p = _PRIVATE(obj);
-
- if (search->sexp)
- e_sexp_unref(search->sexp);
-
- g_free(search->last_search);
- g_hash_table_foreach(p->mempool_hash, free_mempool, obj);
- g_hash_table_destroy(p->mempool_hash);
- g_free(p);
-}
-
-CamelType
-camel_folder_search_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (camel_object_get_type (), "CamelFolderSearch",
- sizeof (CamelFolderSearch),
- sizeof (CamelFolderSearchClass),
- (CamelObjectClassInitFunc) camel_folder_search_class_init,
- NULL,
- (CamelObjectInitFunc) camel_folder_search_init,
- (CamelObjectFinalizeFunc) camel_folder_search_finalize);
- }
-
- return type;
-}
-
-#ifdef offsetof
-#define CAMEL_STRUCT_OFFSET(type, field) ((gint) offsetof (type, field))
-#else
-#define CAMEL_STRUCT_OFFSET(type, field) ((gint) ((gchar*) &((type *) 0)->field))
-#endif
-
-struct {
- char *name;
- int offset;
- int flags; /* 0x02 = immediate, 0x01 = always enter */
-} builtins[] = {
- /* these have default implementations in e-sexp */
- { "and", CAMEL_STRUCT_OFFSET(CamelFolderSearchClass, and), 2 },
- { "or", CAMEL_STRUCT_OFFSET(CamelFolderSearchClass, or), 2 },
- { "not", CAMEL_STRUCT_OFFSET(CamelFolderSearchClass, not), 2 },
- { "<", CAMEL_STRUCT_OFFSET(CamelFolderSearchClass, lt), 2 },
- { ">", CAMEL_STRUCT_OFFSET(CamelFolderSearchClass, gt), 2 },
- { "=", CAMEL_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", CAMEL_STRUCT_OFFSET(CamelFolderSearchClass, match_all), 3 },
- { "body-contains", CAMEL_STRUCT_OFFSET(CamelFolderSearchClass, body_contains), 1 },
- { "header-contains", CAMEL_STRUCT_OFFSET(CamelFolderSearchClass, header_contains), 1 },
- { "header-matches", CAMEL_STRUCT_OFFSET(CamelFolderSearchClass, header_matches), 1 },
- { "header-starts-with", CAMEL_STRUCT_OFFSET(CamelFolderSearchClass, header_starts_with), 1 },
- { "header-ends-with", CAMEL_STRUCT_OFFSET(CamelFolderSearchClass, header_ends_with), 1 },
- { "header-exists", CAMEL_STRUCT_OFFSET(CamelFolderSearchClass, header_exists), 1 },
- { "user-tag", CAMEL_STRUCT_OFFSET(CamelFolderSearchClass, user_tag), 1 },
- { "user-flag", CAMEL_STRUCT_OFFSET(CamelFolderSearchClass, user_flag), 1 },
- { "system-flag", CAMEL_STRUCT_OFFSET(CamelFolderSearchClass, system_flag), 1 },
- { "get-sent-date", CAMEL_STRUCT_OFFSET(CamelFolderSearchClass, get_sent_date), 1 },
- { "get-received-date", CAMEL_STRUCT_OFFSET(CamelFolderSearchClass, get_received_date), 1 },
- { "get-current-date", CAMEL_STRUCT_OFFSET(CamelFolderSearchClass, get_current_date), 1 },
- { "uid", CAMEL_STRUCT_OFFSET(CamelFolderSearchClass, uid), 1 },
-};
-
-void
-camel_folder_search_construct (CamelFolderSearch *search)
-{
- int i;
- CamelFolderSearchClass *klass = (CamelFolderSearchClass *)CAMEL_OBJECT_GET_CLASS(search);
-
- for (i=0;i<sizeof(builtins)/sizeof(builtins[0]);i++) {
- void *func;
- /* c is sure messy sometimes */
- func = *((void **)(((char *)klass)+builtins[i].offset));
- if (func == NULL && builtins[i].flags&1) {
- g_warning("Search class doesn't implement '%s' method: %s", builtins[i].name, camel_type_to_name(CAMEL_OBJECT_GET_CLASS(search)->s.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 ( camel_object_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 an array of
- * all matches as a GPtrArray 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 summary items instead
- * (since they are much more useful to any client).
- *
- * Return value: A GPtrArray of strings of all matching messages.
- * This must only be freed by camel_folder_search_free_result.
- **/
-GPtrArray *
-camel_folder_search_execute_expression(CamelFolderSearch *search, const char *expr, CamelException *ex)
-{
- ESExpResult *r;
- GPtrArray *matches;
- int i;
- GHashTable *results;
- EMemPool *pool;
- struct _CamelFolderSearchPrivate *p = _PRIVATE(search);
-
- p->ex = ex;
-
- /* 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));
- if (e_sexp_parse(search->sexp) == -1) {
- camel_exception_setv(ex, 1, _("Cannot parse search expression: %s:\n%s"), e_sexp_error(search->sexp), expr);
- return NULL;
- }
-
- g_free(search->last_search);
- search->last_search = g_strdup(expr);
- }
- r = e_sexp_eval(search->sexp);
- if (r == NULL) {
- if (!camel_exception_is_set(ex))
- camel_exception_setv(ex, 1, _("Error executing search expression: %s:\n%s"), e_sexp_error(search->sexp), expr);
- return NULL;
- }
-
- matches = g_ptr_array_new();
-
- /* now create a folder summary to return?? */
- if (r
- && r->type == ESEXP_RES_ARRAY_PTR) {
- d(printf("got result ...\n"));
- /* we use a mempool to store the strings, packed in tight as possible, and freed together */
- /* because the strings are often short (like <8 bytes long), we would be wasting appx 50%
- of memory just storing the size tag that malloc assigns us and alignment padding, so this
- gets around that (and is faster to allocate and free as a bonus) */
- pool = e_mempool_new(512, 256, E_MEMPOOL_ALIGN_BYTE);
- if (search->summary) {
- /* reorder result in summary order */
- results = g_hash_table_new(g_str_hash, g_str_equal);
- for (i=0;i<r->value.ptrarray->len;i++) {
- d(printf("adding match: %s\n", (char *)g_ptr_array_index(r->value.ptrarray, i)));
- g_hash_table_insert(results, g_ptr_array_index(r->value.ptrarray, i), (void *)1);
- }
- for (i=0;i<search->summary->len;i++) {
- CamelMessageInfo *info = g_ptr_array_index(search->summary, i);
- char *uid = (char *)camel_message_info_uid(info);
- if (g_hash_table_lookup(results, uid)) {
- g_ptr_array_add(matches, e_mempool_strdup(pool, uid));
- }
- }
- g_hash_table_destroy(results);
- } else {
- for (i=0;i<r->value.ptrarray->len;i++) {
- d(printf("adding match: %s\n", (char *)g_ptr_array_index(r->value.ptrarray, i)));
- g_ptr_array_add(matches, e_mempool_strdup(pool, g_ptr_array_index(r->value.ptrarray, i)));
- }
- }
- e_sexp_result_free(search->sexp, r);
- /* instead of putting the mempool_hash in the structure, we keep the api clean by
- putting a reference to it in a hashtable. Lets us do some debugging and catch
- unfree'd results as well. */
- g_hash_table_insert(p->mempool_hash, matches, pool);
- } else {
- printf("no result!\n");
- }
-
- search->folder = NULL;
- search->summary = NULL;
- search->current = NULL;
- search->body_index = NULL;
-
- return matches;
-}
-
-/**
- * camel_folder_search_match_expression:
- * @search:
- * @expr:
- * @info:
- * @ex:
- *
- * Returns #TRUE if the expression matches the specific message info @info.
- * Note that the folder and index may need to be set for body searches to
- * operate as well.
- *
- * Return value:
- **/
-gboolean
-camel_folder_search_match_expression(CamelFolderSearch *search, const char *expr, const CamelMessageInfo *info, CamelException *ex)
-{
- GPtrArray *uids;
- int ret = FALSE;
-
- search->match1 = (CamelMessageInfo *)info;
-
- uids = camel_folder_search_execute_expression(search, expr, ex);
- if (uids) {
- if (uids->len == 1)
- ret = TRUE;
- camel_folder_search_free_result(search, uids);
- }
- search->match1 = NULL;
-
- return ret;
-}
-
-void camel_folder_search_free_result(CamelFolderSearch *search, GPtrArray *result)
-{
- int i;
- struct _CamelFolderSearchPrivate *p = _PRIVATE(search);
- EMemPool *pool;
-
- pool = g_hash_table_lookup(p->mempool_hash, result);
- if (pool) {
- e_mempool_destroy(pool);
- g_hash_table_remove(p->mempool_hash, result);
- } else {
- for (i=0;i<result->len;i++)
- g_free(g_ptr_array_index(result, i));
- }
- g_ptr_array_free(result, TRUE);
-}
-
-
-
-
-/* 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(f, ESEXP_RES_BOOL);
- r->value.bool = FALSE;
- } else {
- r = e_sexp_result_new(f, 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(f, ESEXP_RES_ARRAY_PTR);
- r->value.ptrarray = g_ptr_array_new();
-
- /* we are only matching a single message? */
- if (search->match1) {
- search->current = search->match1;
-
- d(printf("matching against 1 message: %s\n", camel_message_info_subject(search->current)));
-
- 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, (char *)camel_message_info_uid(search->current));
- } else {
- g_warning("invalid syntax, matches require a single bool result");
- e_sexp_fatal_error(f, _("(match-all) requires a single bool result"));
- }
- e_sexp_result_free(f, r1);
- } else {
- g_ptr_array_add(r->value.ptrarray, (char *)camel_message_info_uid(search->current));
- }
- search->current = NULL;
-
- return r;
- }
-
- 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");
- g_assert(0);
- return r;
- }
-
- /* TODO: Could make this a bit faster in the uncommon case (of match-everything) */
- for (i=0;i<search->summary->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, (char *)camel_message_info_uid(search->current));
- } else {
- g_warning("invalid syntax, matches require a single bool result");
- e_sexp_fatal_error(f, _("(match-all) requires a single bool result"));
- }
- e_sexp_result_free(f, r1);
- } else {
- g_ptr_array_add(r->value.ptrarray, (char *)camel_message_info_uid(search->current));
- }
- }
- search->current = NULL;
-
- return r;
-}
-
-static ESExpResult *
-check_header(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *search, camel_search_match_t how)
-{
- ESExpResult *r;
- int truth = FALSE;
-
- r(printf("executing check-header %d\n", how));
-
- /* are we inside a match-all? */
- if (search->current && argc>1
- && argv[0]->type == ESEXP_RES_STRING) {
- char *headername;
- const char *header = NULL;
- char strbuf[32];
- int i;
-
- /* only a subset of headers are supported .. */
- headername = argv[0]->value.string;
- if (!strcasecmp(headername, "subject")) {
- header = camel_message_info_subject(search->current);
- } 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 = camel_message_info_from(search->current);
- } else if (!strcasecmp(headername, "to")) {
- header = camel_message_info_to(search->current);
- } else if (!strcasecmp(headername, "cc")) {
- header = camel_message_info_cc(search->current);
- } else if (!strcasecmp(headername, "x-camel-mlist")) {
- header = camel_message_info_mlist(search->current);
- } else {
- e_sexp_resultv_free(f, argc, argv);
- e_sexp_fatal_error(f, _("Performing query on unknown header: %s"), headername);
- }
-
- if (header) {
- /* performs an OR of all words */
- for (i=1;i<argc && !truth;i++) {
- if (argv[i]->type == ESEXP_RES_STRING
- && camel_search_header_match(header, argv[i]->value.string, how)) {
- truth = TRUE;
- }
- }
- }
- }
- /* TODO: else, find all matches */
-
- r = e_sexp_result_new(f, ESEXP_RES_BOOL);
- r->value.bool = truth;
-
- return r;
-}
-
-static ESExpResult *
-search_header_contains(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *search)
-{
- return check_header(f, argc, argv, search, CAMEL_SEARCH_MATCH_CONTAINS);
-}
-
-static ESExpResult *
-search_header_matches(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *search)
-{
- return check_header(f, argc, argv, search, CAMEL_SEARCH_MATCH_EXACT);
-}
-
-static ESExpResult *
-search_header_starts_with (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *search)
-{
- return check_header(f, argc, argv, search, CAMEL_SEARCH_MATCH_STARTS);
-}
-
-static ESExpResult *
-search_header_ends_with (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *search)
-{
- return check_header(f, argc, argv, search, CAMEL_SEARCH_MATCH_ENDS);
-}
-
-static ESExpResult *
-search_header_exists (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *search)
-{
- ESExpResult *r;
-
- r(printf ("executing header-exists\n"));
-
- if (search->current) {
- r = e_sexp_result_new(f, ESEXP_RES_BOOL);
- if (argc == 1 && argv[0]->type == ESEXP_RES_STRING)
- r->value.bool = camel_medium_get_header(CAMEL_MEDIUM(search->current), argv[0]->value.string) != NULL;
-
- } else {
- r = e_sexp_result_new(f, ESEXP_RES_ARRAY_PTR);
- r->value.ptrarray = g_ptr_array_new();
- }
-
- 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 int
-match_message(CamelFolder *folder, const char *uid, regex_t *pattern, CamelException *ex)
-{
- CamelMimeMessage *msg;
- int truth = FALSE;
-
- msg = camel_folder_get_message(folder, uid, ex);
- if (!camel_exception_is_set(ex) && msg!=NULL) {
- truth = camel_search_message_body_contains((CamelDataWrapper *)msg, pattern);
- camel_object_unref((CamelObject *)msg);
- }
- return truth;
-}
-
-static ESExpResult *
-search_body_contains(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *search)
-{
- ESExpResult *r;
- int i, j;
- regex_t pattern;
-
- if (search->current) {
- int truth = FALSE;
-
- if (argc == 1 && argv[0]->value.string[0] == 0 && search->folder) {
- truth = TRUE;
- } else if (search->body_index) {
- for (i=0;i<argc && !truth;i++) {
- if (argv[i]->type == ESEXP_RES_STRING) {
- truth = ibex_find_name(search->body_index, (char *)camel_message_info_uid(search->current),
- argv[i]->value.string);
- } else {
- e_sexp_resultv_free(f, argc, argv);
- e_sexp_fatal_error(f, _("Invalid type in body-contains, expecting string"));
- }
- }
- } else if (search->folder) {
- /* we do a 'slow' direct search */
- if (camel_search_build_match_regex(&pattern, CAMEL_SEARCH_MATCH_REGEX|CAMEL_SEARCH_MATCH_ICASE, argc, argv, search->priv->ex) == 0) {
- truth = match_message(search->folder, camel_message_info_uid(search->current), &pattern, search->priv->ex);
- regfree(&pattern);
- }
- } else {
- g_warning("Cannot perform indexed body query with no index or folder set");
- }
- r = e_sexp_result_new(f, ESEXP_RES_BOOL);
- r->value.bool = truth;
- } else {
- r = e_sexp_result_new(f, ESEXP_RES_ARRAY_PTR);
-
- if (argc == 1 && argv[0]->value.string[0] == 0 && search->folder) {
- /* optimise the match "" case - match everything */
- r->value.ptrarray = g_ptr_array_new();
- for (i=0;i<search->summary->len;i++) {
- CamelMessageInfo *info = g_ptr_array_index(search->summary, i);
- g_ptr_array_add(r->value.ptrarray, (char *)camel_message_info_uid(info));
- }
- } else 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;i<argc;i++) {
- if (argv[i]->type == ESEXP_RES_STRING) {
- pa = ibex_find(search->body_index, argv[i]->value.string);
- for (j=0;j<pa->len;j++) {
- g_hash_table_insert(ht, g_ptr_array_index(pa, j), (void *)1);
- }
- g_ptr_array_free(pa, FALSE);
- } else {
- e_sexp_result_free(f, r);
- e_sexp_resultv_free(f, argc, argv);
- e_sexp_fatal_error(f, _("Invalid type in body-contains, expecting string"));
- }
- }
- 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 if (search->folder) {
- /* do a slow search */
- r->value.ptrarray = g_ptr_array_new();
- if (camel_search_build_match_regex(&pattern, CAMEL_SEARCH_MATCH_REGEX|CAMEL_SEARCH_MATCH_ICASE, argc, argv, search->priv->ex) == 0) {
- if (search->summary) {
- for (i=0;i<search->summary->len;i++) {
- CamelMessageInfo *info = g_ptr_array_index(search->summary, i);
-
- if (match_message(search->folder, camel_message_info_uid(info), &pattern, search->priv->ex))
- g_ptr_array_add(r->value.ptrarray, (char *)camel_message_info_uid(info));
- }
- } /* else? we could always get the summary from the folder, but then
- we need to free it later somehow */
- regfree(&pattern);
- }
- } else {
- g_warning("Cannot perform indexed body query with no index or folder set");
- 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;i<argc && !truth;i++) {
- if (argv[i]->type == ESEXP_RES_STRING
- && camel_flag_get(&search->current->user_flags, argv[i]->value.string)) {
- truth = TRUE;
- break;
- }
- }
- r = e_sexp_result_new(f, ESEXP_RES_BOOL);
- r->value.bool = truth;
- } else {
- r = e_sexp_result_new(f, ESEXP_RES_ARRAY_PTR);
- r->value.ptrarray = g_ptr_array_new();
- }
-
- return r;
-}
-
-static ESExpResult *
-search_system_flag (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *search)
-{
- ESExpResult *r;
-
- r(printf ("executing system-flag\n"));
-
- if (search->current) {
- gboolean truth = FALSE;
-
- if (argc == 1)
- truth = camel_system_flag_get (search->current->flags, argv[0]->value.string);
-
- r = e_sexp_result_new(f, ESEXP_RES_BOOL);
- r->value.bool = truth;
- } else {
- r = e_sexp_result_new(f, ESEXP_RES_ARRAY_PTR);
- r->value.ptrarray = g_ptr_array_new ();
- }
-
- return r;
-}
-
-static ESExpResult *search_user_tag(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *search)
-{
- ESExpResult *r;
-
- r(printf("executing user-tag\n"));
-
- /* are we inside a match-all? */
- if (search->current) {
- const char *value = NULL;
- if (argc == 1) {
- value = camel_tag_get(&search->current->user_tags, argv[0]->value.string);
- }
- r = e_sexp_result_new(f, ESEXP_RES_STRING);
- r->value.string = g_strdup(value?value:"");
- } else {
- r = e_sexp_result_new(f, ESEXP_RES_ARRAY_PTR);
- r->value.ptrarray = g_ptr_array_new();
- }
-
- return r;
-}
-
-static ESExpResult *
-search_get_sent_date(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s)
-{
- ESExpResult *r;
-
- r(printf("executing get-sent-date\n"));
-
- /* are we inside a match-all? */
- if (s->current) {
- r = e_sexp_result_new(f, ESEXP_RES_INT);
-
- r->value.number = s->current->date_sent;
- } else {
- r = e_sexp_result_new(f, ESEXP_RES_ARRAY_PTR);
- r->value.ptrarray = g_ptr_array_new ();
- }
-
- return r;
-}
-
-static ESExpResult *
-search_get_received_date(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s)
-{
- ESExpResult *r;
-
- r(printf("executing get-received-date\n"));
-
- /* are we inside a match-all? */
- if (s->current) {
- r = e_sexp_result_new(f, ESEXP_RES_INT);
-
- r->value.number = s->current->date_received;
- } else {
- r = e_sexp_result_new(f, ESEXP_RES_ARRAY_PTR);
- r->value.ptrarray = g_ptr_array_new ();
- }
-
- return r;
-}
-
-static ESExpResult *
-search_get_current_date(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s)
-{
- ESExpResult *r;
-
- r(printf("executing get-current-date\n"));
-
- r = e_sexp_result_new(f, ESEXP_RES_INT);
- r->value.number = time (NULL);
- return r;
-}
-
-static ESExpResult *
-search_uid(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *search)
-{
- ESExpResult *r;
- int i;
-
- r(printf("executing uid\n"));
-
- /* are we inside a match-all? */
- if (search->current) {
- int truth = FALSE;
- const char *uid = camel_message_info_uid(search->current);
-
- /* performs an OR of all words */
- for (i=0;i<argc && !truth;i++) {
- if (argv[i]->type == ESEXP_RES_STRING
- && !strcmp(uid, argv[i]->value.string)) {
- truth = TRUE;
- break;
- }
- }
- r = e_sexp_result_new(f, ESEXP_RES_BOOL);
- r->value.bool = truth;
- } else {
- r = e_sexp_result_new(f, ESEXP_RES_ARRAY_PTR);
- r->value.ptrarray = g_ptr_array_new();
- for (i=0;i<argc;i++) {
- if (argv[i]->type == ESEXP_RES_STRING)
- g_ptr_array_add(r->value.ptrarray, argv[i]->value.string);
- }
- }
-
- return r;
-}
diff --git a/camel/camel-folder-search.h b/camel/camel-folder-search.h
deleted file mode 100644
index 640f2f9327..0000000000
--- a/camel/camel-folder-search.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Copyright (C) 2000 Helix Code Inc.
- *
- * Authors: Michael Zucchi <notzed@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_SEARCH_H
-#define _CAMEL_FOLDER_SEARCH_H
-
-#include <gal/util/e-util.h>
-#include <e-util/e-sexp.h>
-#include <libibex/ibex.h>
-#include <camel/camel-folder.h>
-#include <camel/camel-object.h>
-
-#define CAMEL_FOLDER_SEARCH_TYPE (camel_folder_search_get_type ())
-#define CAMEL_FOLDER_SEARCH(obj) CAMEL_CHECK_CAST (obj, camel_folder_search_get_type (), CamelFolderSearch)
-#define CAMEL_FOLDER_SEARCH_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_folder_search_get_type (), CamelFolderSearchClass)
-#define CAMEL_IS_FOLDER_SEARCH(obj) CAMEL_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 */
- CamelMessageInfo *match1; /* message info, when searching a single message only */
- CamelMimeMessage *current_message; /* cache of current message, if required */
- 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);
-
- /* (header-matches "headername" "string") */
- ESExpResult * (*header_matches)(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s);
-
- /* (header-starts-with "headername" "string") */
- ESExpResult * (*header_starts_with)(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s);
-
- /* (header-ends-with "headername" "string") */
- ESExpResult * (*header_ends_with)(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s);
-
- /* (header-exists "headername") */
- ESExpResult * (*header_exists)(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);
-
- /* (user-tag "flagname") Returns the value of a user tag. Can only be used in match-all */
- ESExpResult * (*user_tag)(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s);
-
- /* (system-flag "flagname") Returns the value of a system flag. Can only be used in match-all */
- ESExpResult * (*system_flag)(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s);
-
- /* (get-sent-date) Retrieve the date that the message was sent on as a time_t */
- ESExpResult * (*get_sent_date)(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s);
-
- /* (get-received-date) Retrieve the date that the message was received on as a time_t */
- ESExpResult * (*get_received_date)(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s);
-
- /* (get-current-date) Retrieve 'now' as a time_t */
- ESExpResult * (*get_current_date)(struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelFolderSearch *s);
-
- /* (uid "uid" ...) True if the uid is in the list */
- ESExpResult * (*uid)(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);
-GPtrArray *camel_folder_search_execute_expression(CamelFolderSearch *search, const char *expr, CamelException *ex);
-gboolean camel_folder_search_match_expression(CamelFolderSearch *search, const char *expr,
- const CamelMessageInfo *info, CamelException *ex);
-void camel_folder_search_free_result(CamelFolderSearch *search, GPtrArray *);
-
-#endif /* ! _CAMEL_FOLDER_SEARCH_H */
diff --git a/camel/camel-folder-summary.c b/camel/camel-folder-summary.c
deleted file mode 100644
index 69444641cd..0000000000
--- a/camel/camel-folder-summary.c
+++ /dev/null
@@ -1,2840 +0,0 @@
-/*
- * Copyright (C) 2000 Helix Code Inc.
- *
- * Authors: Michael Zucchi <notzed@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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <unistd.h>
-#include <netinet/in.h>
-#include <ctype.h>
-#include <string.h>
-#include <errno.h>
-#include <stdlib.h>
-
-#include "camel-folder-summary.h"
-
-#include <camel/camel-mime-message.h>
-#include <camel/camel-multipart.h>
-
-#include <camel/camel-mime-filter.h>
-#include <camel/camel-mime-filter-index.h>
-#include <camel/camel-mime-filter-charset.h>
-#include <camel/camel-mime-filter-save.h>
-#include <camel/camel-mime-filter-basic.h>
-#include <camel/camel-mime-filter-html.h>
-#include <camel/camel-mime-message.h>
-#include <camel/camel-stream-mem.h>
-
-#include "hash-table-utils.h"
-#include "e-util/md5-utils.h"
-#include "e-util/e-memory.h"
-
-#include "camel-private.h"
-
-#ifdef ENABLE_THREADS
-#include <pthread.h>
-
-static pthread_mutex_t info_lock = PTHREAD_MUTEX_INITIALIZER;
-
-/* this lock is ONLY for the standalone messageinfo stuff */
-#define GLOBAL_INFO_LOCK(i) pthread_mutex_lock(&info_lock)
-#define GLOBAL_INFO_UNLOCK(i) pthread_mutex_unlock(&info_lock)
-#else
-#define GLOBAL_INFO_LOCK(i)
-#define GLOBAL_INFO_UNLOCK(i)
-#endif
-
-/* 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 (12)
-
-#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_new_from_message(CamelFolderSummary *s, CamelMimeMessage *msg);
-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_new_from_message(CamelFolderSummary *s, CamelMimePart *mp);
-static CamelMessageContentInfo * content_info_load(CamelFolderSummary *, FILE *);
-static int content_info_save(CamelFolderSummary *, FILE *, CamelMessageContentInfo *);
-static void content_info_free(CamelFolderSummary *, CamelMessageContentInfo *);
-
-static char *next_uid_string(CamelFolderSummary *s);
-
-static CamelMessageContentInfo * summary_build_content_info(CamelFolderSummary *s, CamelMessageInfo *msginfo, CamelMimeParser *mp);
-static CamelMessageContentInfo * summary_build_content_info_message(CamelFolderSummary *s, CamelMessageInfo *msginfo, CamelMimePart *object);
-
-static void camel_folder_summary_class_init (CamelFolderSummaryClass *klass);
-static void camel_folder_summary_init (CamelFolderSummary *obj);
-static void camel_folder_summary_finalize (CamelObject *obj);
-
-static CamelObjectClass *camel_folder_summary_parent;
-
-static void
-camel_folder_summary_class_init (CamelFolderSummaryClass *klass)
-{
- camel_folder_summary_parent = camel_type_get_global_classfuncs (camel_object_get_type ());
-
- 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_new_from_message = message_info_new_from_message;
- 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_new_from_message = content_info_new_from_message;
- klass->content_info_load = content_info_load;
- klass->content_info_save = content_info_save;
- klass->content_info_free = content_info_free;
-
- klass->next_uid_string = next_uid_string;
-}
-
-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->message_info_chunks = NULL;
- s->content_info_chunks = NULL;
-
-#ifdef DOESTRV
- s->message_info_strings = CAMEL_MESSAGE_INFO_LAST;
-#endif
-
- 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);
-
-#ifdef ENABLE_THREADS
- p->summary_lock = g_mutex_new();
- p->io_lock = g_mutex_new();
- p->filter_lock = g_mutex_new();
- p->alloc_lock = g_mutex_new();
- p->ref_lock = g_mutex_new();
-#endif
-}
-
-static void free_o_name(void *key, void *value, void *data)
-{
- camel_object_unref((CamelObject *)value);
- g_free(key);
-}
-
-static void
-camel_folder_summary_finalize (CamelObject *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 (s->message_info_chunks)
- e_memchunk_destroy(s->message_info_chunks);
- if (s->content_info_chunks)
- e_memchunk_destroy(s->content_info_chunks);
-
- if (p->filter_index)
- camel_object_unref((CamelObject *)p->filter_index);
- if (p->filter_64)
- camel_object_unref((CamelObject *)p->filter_64);
- if (p->filter_qp)
- camel_object_unref((CamelObject *)p->filter_qp);
- if (p->filter_save)
- camel_object_unref((CamelObject *)p->filter_save);
- if (p->filter_html)
- camel_object_unref((CamelObject *)p->filter_html);
-
-#ifdef ENABLE_THREADS
- g_mutex_free(p->summary_lock);
- g_mutex_free(p->io_lock);
- g_mutex_free(p->filter_lock);
- g_mutex_free(p->alloc_lock);
- g_mutex_free(p->ref_lock);
-#endif
-
- g_free(p);
-}
-
-CamelType
-camel_folder_summary_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (camel_object_get_type (), "CamelFolderSummary",
- sizeof (CamelFolderSummary),
- sizeof (CamelFolderSummaryClass),
- (CamelObjectClassInitFunc) camel_folder_summary_class_init,
- NULL,
- (CamelObjectInitFunc) camel_folder_summary_init,
- (CamelObjectFinalizeFunc) camel_folder_summary_finalize);
- }
-
- return type;
-}
-
-/**
- * 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 ( camel_object_new (camel_folder_summary_get_type ())); return new;
-}
-
-
-/**
- * camel_folder_summary_set_filename:
- * @s:
- * @name:
- *
- * Set the filename where the summary will be loaded to/saved from.
- **/
-void camel_folder_summary_set_filename(CamelFolderSummary *s, const char *name)
-{
- CAMEL_SUMMARY_LOCK(s, summary_lock);
-
- g_free(s->summary_path);
- s->summary_path = g_strdup(name);
-
- CAMEL_SUMMARY_UNLOCK(s, summary_lock);
-}
-
-/**
- * camel_folder_summary_set_index:
- * @s:
- * @index:
- *
- * Set the index used to index body content. If the index is NULL, or
- * not set (the default), no indexing of body content will take place.
- *
- * Unlike earlier behaviour, build_content need not be set to perform indexing.
- **/
-void camel_folder_summary_set_index(CamelFolderSummary *s, ibex *index)
-{
- struct _CamelFolderSummaryPrivate *p = _PRIVATE(s);
-
- p->index = index;
-}
-
-/**
- * camel_folder_summary_set_build_content:
- * @s:
- * @state:
- *
- * Set a flag to tell the summary to build the content info summary
- * (CamelMessageInfo.content). The default is not to build content info
- * summaries.
- **/
-void camel_folder_summary_set_build_content(CamelFolderSummary *s, gboolean state)
-{
- s->build_content = state;
-}
-
-/**
- * camel_folder_summary_count:
- * @s:
- *
- * Get the number of summary items stored in this summary.
- *
- * Return value: The number of items int he summary.
- **/
-int
-camel_folder_summary_count(CamelFolderSummary *s)
-{
- return s->messages->len;
-}
-
-/**
- * camel_folder_summary_index:
- * @s:
- * @i:
- *
- * Retrieve a summary item by index number.
- *
- * A referenced to the summary item is returned, which may be
- * ref'd or free'd as appropriate.
- *
- * Return value: The summary item, or NULL if the index @i is out
- * of range.
- * It must be freed using camel_folder_summary_info_free().
- **/
-CamelMessageInfo *
-camel_folder_summary_index(CamelFolderSummary *s, int i)
-{
- CamelMessageInfo *info = NULL;
-
- CAMEL_SUMMARY_LOCK(s, ref_lock);
- CAMEL_SUMMARY_LOCK(s, summary_lock);
-
- if (i<s->messages->len)
- info = g_ptr_array_index(s->messages, i);
-
- CAMEL_SUMMARY_UNLOCK(s, summary_lock);
-
- if (info)
- info->refcount++;
-
- CAMEL_SUMMARY_UNLOCK(s, ref_lock);
-
- return info;
-}
-
-/**
- * camel_folder_summary_index:
- * @s:
- * @i:
- *
- * Obtain a copy of the summary array. This is done atomically,
- * so cannot contain empty entries.
- *
- * It must be freed using camel_folder_summary_array_free().
- **/
-GPtrArray *
-camel_folder_summary_array(CamelFolderSummary *s)
-{
- CamelMessageInfo *info;
- GPtrArray *res = g_ptr_array_new();
- int i;
-
- CAMEL_SUMMARY_LOCK(s, ref_lock);
- CAMEL_SUMMARY_LOCK(s, summary_lock);
-
- g_ptr_array_set_size(res, s->messages->len);
- for (i=0;i<s->messages->len;i++) {
- info = res->pdata[i] = g_ptr_array_index(s->messages, i);
- info->refcount++;
- }
-
- CAMEL_SUMMARY_UNLOCK(s, summary_lock);
- CAMEL_SUMMARY_UNLOCK(s, ref_lock);
-
- return res;
-}
-
-/**
- * camel_folder_summary_array_free:
- * @s:
- * @array:
- *
- * Free the folder summary array.
- **/
-void
-camel_folder_summary_array_free(CamelFolderSummary *s, GPtrArray *array)
-{
- int i;
-
- for (i=0;i<array->len;i++)
- camel_folder_summary_info_free(s, array->pdata[i]);
-
- g_ptr_array_free(array, TRUE);
-}
-
-/**
- * camel_folder_summary_uid:
- * @s:
- * @uid:
- *
- * Retrieve a summary item by uid.
- *
- * A referenced to the summary item is returned, which may be
- * ref'd or free'd as appropriate.
- *
- * Return value: The summary item, or NULL if the uid @uid
- * is not available.
- * It must be freed using camel_folder_summary_info_free().
- **/
-CamelMessageInfo *
-camel_folder_summary_uid(CamelFolderSummary *s, const char *uid)
-{
- CamelMessageInfo *info;
-
- CAMEL_SUMMARY_LOCK(s, ref_lock);
- CAMEL_SUMMARY_LOCK(s, summary_lock);
-
- info = g_hash_table_lookup(s->messages_uid, uid);
-
- CAMEL_SUMMARY_UNLOCK(s, summary_lock);
-
- if (info)
- info->refcount++;
-
- CAMEL_SUMMARY_UNLOCK(s, ref_lock);
-
- return info;
-}
-
-/**
- * camel_folder_summary_next_uid:
- * @s:
- *
- * Generate a new unique uid value as an integer. This
- * may be used to create a unique sequence of numbers.
- *
- * Return value: The next unique uid value.
- **/
-guint32 camel_folder_summary_next_uid(CamelFolderSummary *s)
-{
- guint32 uid;
-
-
- CAMEL_SUMMARY_LOCK(s, summary_lock);
-
- uid = s->nextuid++;
-
- CAMEL_SUMMARY_UNLOCK(s, summary_lock);
-
- /* FIXME: sync this to disk */
-/* summary_header_save(s);*/
- return uid;
-}
-
-/**
- * camel_folder_summary_set_uid:
- * @s:
- * @uid: The next minimum uid to assign. To avoid clashing
- * uid's, set this to the uid of a given messages + 1.
- *
- * Set the next minimum uid available. This can be used to
- * ensure new uid's do not clash with existing uid's.
- **/
-void camel_folder_summary_set_uid(CamelFolderSummary *s, guint32 uid)
-{
- /* TODO: sync to disk? */
- CAMEL_SUMMARY_LOCK(s, summary_lock);
-
- s->nextuid = MAX(s->nextuid, uid);
-
- CAMEL_SUMMARY_UNLOCK(s, summary_lock);
-}
-
-/**
- * camel_folder_summary_next_uid_string:
- * @s:
- *
- * Retrieve the next uid, but as a formatted string.
- *
- * Return value: The next uid as an unsigned integer string.
- * This string must be freed by the caller.
- **/
-char *
-camel_folder_summary_next_uid_string(CamelFolderSummary *s)
-{
- return ((CamelFolderSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->next_uid_string(s);
-}
-
-/* loads the content descriptions, recursively */
-static CamelMessageContentInfo *
-perform_content_info_load(CamelFolderSummary *s, FILE *in)
-{
- int i;
- guint32 count;
- CamelMessageContentInfo *ci, *part;
-
- ci = ((CamelFolderSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->content_info_load(s, in);
- if (ci == NULL)
- return NULL;
-
- if (camel_folder_summary_decode_uint32(in, &count) == -1 || count > 500) {
- camel_folder_summary_content_info_free(s, ci);
- return NULL;
- }
-
- for (i=0;i<count;i++) {
- part = perform_content_info_load(s, in);
- if (part) {
- my_list_append((struct _node **)&ci->childs, (struct _node *)part);
- part->parent = ci;
- } else {
- g_warning("Summary file format messed up?");
- camel_folder_summary_content_info_free(s, ci);
- return NULL;
- }
- }
- return ci;
-}
-
-int
-camel_folder_summary_load(CamelFolderSummary *s)
-{
- FILE *in;
- int i;
- CamelMessageInfo *mi;
-
- g_assert(s->summary_path);
-
- in = fopen(s->summary_path, "r");
- if (in == NULL)
- return -1;
-
- CAMEL_SUMMARY_LOCK(s, io_lock);
- if ( ((CamelFolderSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->summary_header_load(s, in) == -1)
- goto error;
-
- /* now read in each message ... */
- for (i=0;i<s->saved_count;i++) {
- mi = ((CamelFolderSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->message_info_load(s, in);
-
- if (mi == NULL)
- goto error;
-
- if (s->build_content) {
- mi->content = perform_content_info_load(s, in);
- if (mi->content == NULL) {
- camel_folder_summary_info_free(s, mi);
- goto error;
- }
- }
-
- camel_folder_summary_add(s, mi);
- }
-
- CAMEL_SUMMARY_UNLOCK(s, io_lock);
-
- if (fclose(in) == -1)
- return -1;
-
- s->flags &= ~CAMEL_SUMMARY_DIRTY;
-
- return 0;
-
-error:
- g_warning("Cannot load summary file: %s", strerror(ferror(in)));
- CAMEL_SUMMARY_UNLOCK(s, io_lock);
- fclose(in);
- s->flags |= ~CAMEL_SUMMARY_DIRTY;
-
- return -1;
-}
-
-/* saves the content descriptions, recursively */
-static int
-perform_content_info_save(CamelFolderSummary *s, FILE *out, CamelMessageContentInfo *ci)
-{
- CamelMessageContentInfo *part;
-
- ((CamelFolderSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->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;
-}
-
-/**
- * camel_folder_summary_save:
- * @s:
- *
- * Writes the summary to disk. The summary is only written if changes
- * have occured.
- *
- * Return value: Returns -1 on error.
- **/
-int
-camel_folder_summary_save(CamelFolderSummary *s)
-{
- FILE *out;
- int fd;
- int i;
- guint32 count;
- CamelMessageInfo *mi;
-
- g_assert(s->summary_path);
-
- if ((s->flags & CAMEL_SUMMARY_DIRTY) == 0)
- return 0;
-
- 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"));
-
- CAMEL_SUMMARY_LOCK(s, io_lock);
-
- if ( ((CamelFolderSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->summary_header_save(s, out) == -1) {
- fclose(out);
- CAMEL_SUMMARY_UNLOCK(s, io_lock);
- return -1;
- }
-
- /* now write out each message ... */
- /* FIXME: check returns */
-
- count = s->messages->len;
- for (i=0;i<count;i++) {
- mi = s->messages->pdata[i];
- ((CamelFolderSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->message_info_save(s, out, mi);
-
- if (s->build_content) {
- perform_content_info_save(s, out, mi->content);
- }
- }
-
- CAMEL_SUMMARY_UNLOCK(s, io_lock);
-
- if (fclose(out) == -1)
- return -1;
-
- s->flags &= ~CAMEL_SUMMARY_DIRTY;
- return 0;
-}
-
-static void
-summary_assign_uid(CamelFolderSummary *s, CamelMessageInfo *info)
-{
- const char *uid;
-
- uid = camel_message_info_uid(info);
- if (uid == NULL || uid[0] == 0) {
- camel_message_info_set_uid(info, camel_folder_summary_next_uid_string(s));
- uid = camel_message_info_uid(info);
- }
-
- CAMEL_SUMMARY_LOCK(s, summary_lock);
-
- while (g_hash_table_lookup(s->messages_uid, uid)) {
- g_warning("Trying to insert message with clashing uid (%s). new uid re-assigned", camel_message_info_uid(info));
- CAMEL_SUMMARY_UNLOCK(s, summary_lock);
- camel_message_info_set_uid(info, camel_folder_summary_next_uid_string(s));
- uid = camel_message_info_uid(info);
- info->flags |= CAMEL_MESSAGE_FOLDER_FLAGGED;
- CAMEL_SUMMARY_LOCK(s, summary_lock);
- }
-
- CAMEL_SUMMARY_UNLOCK(s, summary_lock);
-}
-
-/**
- * camel_folder_summary_add:
- * @s:
- * @info:
- *
- * Adds a new @info record to the summary. If @info->uid is NULL, then a new
- * uid is automatically re-assigned by calling :next_uid_string().
- *
- * The @info record should have been generated by calling one of the
- * info_new_*() functions, as it will be free'd based on the summary
- * class. And MUST NOT be allocated directly using malloc.
- **/
-void camel_folder_summary_add(CamelFolderSummary *s, CamelMessageInfo *info)
-{
- if (info == NULL)
- return;
-
- summary_assign_uid(s, info);
-
- CAMEL_SUMMARY_LOCK(s, summary_lock);
-
-#ifdef DOESTRV
- /* this is vitally important, and also if this is ever modified, then
- the hash table needs to be resynced */
- info->strings = e_strv_pack(info->strings);
-#endif
-
- g_ptr_array_add(s->messages, info);
- g_hash_table_insert(s->messages_uid, (char *)camel_message_info_uid(info), info);
- s->flags |= CAMEL_SUMMARY_DIRTY;
-
- CAMEL_SUMMARY_UNLOCK(s, summary_lock);
-}
-
-/**
- * camel_folder_summary_add_from_header:
- * @s:
- * @h:
- *
- * Build a new info record based on a set of headers, and add it to the
- * summary.
- *
- * Note that this function should not be used if build_content_info has
- * been specified for this summary.
- *
- * Return value: The newly added record.
- **/
-CamelMessageInfo *camel_folder_summary_add_from_header(CamelFolderSummary *s, struct _header_raw *h)
-{
- CamelMessageInfo *info = camel_folder_summary_info_new_from_header(s, h);
-
- camel_folder_summary_add(s, info);
-
- return info;
-}
-
-/**
- * camel_folder_summary_add_from_parser:
- * @s:
- * @mp:
- *
- * Build a new info record based on the current position of a CamelMimeParser.
- *
- * The parser should be positioned before the start of the message to summarise.
- * This function may be used if build_contnet_info or an index has been
- * specified for the summary.
- *
- * Return value: The newly added record.
- **/
-CamelMessageInfo *camel_folder_summary_add_from_parser(CamelFolderSummary *s, CamelMimeParser *mp)
-{
- CamelMessageInfo *info = camel_folder_summary_info_new_from_parser(s, mp);
-
- camel_folder_summary_add(s, info);
-
- return info;
-}
-
-/**
- * camel_folder_summary_add_from_message:
- * @s:
- * @msg:
- *
- * Add a summary item from an existing message.
- *
- * Return value:
- **/
-CamelMessageInfo *camel_folder_summary_add_from_message(CamelFolderSummary *s, CamelMimeMessage *msg)
-{
- CamelMessageInfo *info = camel_folder_summary_info_new_from_message(s, msg);
-
- camel_folder_summary_add(s, info);
-
- return info;
-}
-
-/**
- * camel_folder_summary_info_new_from_header:
- * @s:
- * @h:
- *
- * Create a new info record from a header.
- *
- * Return value: Guess? This info record MUST be freed using
- * camel_folder_summary_info_free(), camel_message_info_free() will not work.
- **/
-CamelMessageInfo *camel_folder_summary_info_new_from_header(CamelFolderSummary *s, struct _header_raw *h)
-{
- return ((CamelFolderSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s))) -> message_info_new(s, h);
-}
-
-/**
- * camel_folder_summary_info_new_from_parser:
- * @s:
- * @mp:
- *
- * Create a new info record from a parser. If the parser cannot
- * determine a uid, then a new one is automatically assigned.
- *
- * If indexing is enabled, then the content will be indexed based
- * on this new uid. In this case, the message info MUST be
- * added using :add().
- *
- * Once complete, the parser will be positioned at the end of
- * the message.
- *
- * Return value: Guess? This info record MUST be freed using
- * camel_folder_summary_info_free(), camel_message_info_free() will not work.
- **/
-CamelMessageInfo *camel_folder_summary_info_new_from_parser(CamelFolderSummary *s, CamelMimeParser *mp)
-{
- CamelMessageInfo *info = NULL;
- char *buffer;
- int len;
- struct _CamelFolderSummaryPrivate *p = _PRIVATE(s);
- off_t start;
-
- /* should this check the parser is in the right state, or assume it is?? */
-
- start = camel_mime_parser_tell(mp);
- if (camel_mime_parser_step(mp, &buffer, &len) != HSCAN_EOF) {
- info = ((CamelFolderSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->message_info_new_from_parser(s, mp);
-
- camel_mime_parser_unstep(mp);
-
- /* assign a unique uid, this is slightly 'wrong' as we do not really
- * know if we are going to store this in the summary, but no matter */
- summary_assign_uid(s, info);
-
- CAMEL_SUMMARY_LOCK(s, filter_lock);
-
- 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, (char *)camel_message_info_uid(info));
- ibex_unindex(p->index, (char *)camel_message_info_uid(info));
- }
-
- /* always scan the content info, even if we dont save it */
- info->content = summary_build_content_info(s, info, mp);
-
- CAMEL_SUMMARY_UNLOCK(s, filter_lock);
-
- info->size = camel_mime_parser_tell(mp) - start;
- }
- return info;
-}
-
-/**
- * camel_folder_summary_info_new_from_message:
- * @:
- * @:
- *
- * Create a summary item from a message.
- *
- * Return value:
- **/
-CamelMessageInfo *camel_folder_summary_info_new_from_message(CamelFolderSummary *s, CamelMimeMessage *msg)
-{
- CamelMessageInfo *info;
- struct _CamelFolderSummaryPrivate *p = _PRIVATE(s);
-
- info = ((CamelFolderSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->message_info_new_from_message(s, msg);
-
- /* assign a unique uid, this is slightly 'wrong' as we do not really
- * know if we are going to store this in the summary, but no matter */
- summary_assign_uid(s, info);
-
- if (p->index)
- ibex_unindex(p->index, (char *)camel_message_info_uid(info));
-
- info->content = summary_build_content_info_message(s, info, (CamelMimePart *)msg);
- /* FIXME: calculate the size as part of build_content_info_message */
- /* info->size = ... */
-
- return info;
-}
-
-/**
- * camel_folder_summary_content_info_free:
- * @s:
- * @ci:
- *
- * Free the content info @ci, and all associated memory.
- **/
-void
-camel_folder_summary_content_info_free(CamelFolderSummary *s, CamelMessageContentInfo *ci)
-{
- CamelMessageContentInfo *pw, *pn;
-
- pw = ci->childs;
- ((CamelFolderSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->content_info_free(s, ci);
- while (pw) {
- pn = pw->next;
- camel_folder_summary_content_info_free(s, pw);
- pw = pn;
- }
-}
-
-/**
- * camel_folder_summary_info_free:
- * @s:
- * @mi:
- *
- * Unref and potentially free the message info @mi, and all associated memory.
- **/
-void camel_folder_summary_info_free(CamelFolderSummary *s, CamelMessageInfo *mi)
-{
- CamelMessageContentInfo *ci;
-
- g_assert(mi);
- g_assert(s);
-
- CAMEL_SUMMARY_LOCK(s, ref_lock);
-
- g_assert(mi->refcount >= 1);
-
- mi->refcount--;
- if (mi->refcount > 0) {
- CAMEL_SUMMARY_UNLOCK(s, ref_lock);
- return;
- }
-
- CAMEL_SUMMARY_UNLOCK(s, ref_lock);
-
- ci = mi->content;
-
- ((CamelFolderSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->message_info_free(s, mi);
- if (s->build_content && ci) {
- camel_folder_summary_content_info_free(s, ci);
- }
-}
-
-/**
- * camel_folder_summary_info_ref:
- * @s:
- * @mi:
- *
- * Add an extra reference to @mi.
- **/
-void camel_folder_summary_info_ref(CamelFolderSummary *s, CamelMessageInfo *mi)
-{
- g_assert(mi);
- g_assert(s);
-
- CAMEL_SUMMARY_LOCK(s, ref_lock);
- g_assert(mi->refcount >= 1);
- mi->refcount++;
- CAMEL_SUMMARY_UNLOCK(s, ref_lock);
-}
-
-/**
- * camel_folder_summary_touch:
- * @s:
- *
- * Mark the summary as changed, so that a save will save it.
- **/
-void
-camel_folder_summary_touch(CamelFolderSummary *s)
-{
- CAMEL_SUMMARY_LOCK(s, summary_lock);
- s->flags |= CAMEL_SUMMARY_DIRTY;
- CAMEL_SUMMARY_UNLOCK(s, summary_lock);
-}
-
-/**
- * camel_folder_summary_clear:
- * @s:
- *
- * Empty the summary contents.
- **/
-void
-camel_folder_summary_clear(CamelFolderSummary *s)
-{
- int i;
-
- CAMEL_SUMMARY_LOCK(s, summary_lock);
- if (camel_folder_summary_count(s) == 0) {
- CAMEL_SUMMARY_UNLOCK(s, summary_lock);
- return;
- }
-
- for (i=0;i<s->messages->len;i++)
- camel_folder_summary_info_free(s, s->messages->pdata[i]);
-
- 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;
- CAMEL_SUMMARY_UNLOCK(s, summary_lock);
-}
-
-/**
- * camel_folder_summary_remove:
- * @s:
- * @info:
- *
- * Remove a specific @info record from the summary.
- **/
-void camel_folder_summary_remove(CamelFolderSummary *s, CamelMessageInfo *info)
-{
- CAMEL_SUMMARY_LOCK(s, summary_lock);
- g_hash_table_remove(s->messages_uid, camel_message_info_uid(info));
- g_ptr_array_remove(s->messages, info);
- s->flags |= CAMEL_SUMMARY_DIRTY;
- CAMEL_SUMMARY_UNLOCK(s, summary_lock);
-
- camel_folder_summary_info_free(s, info);
-}
-
-/**
- * camel_folder_summary_remove_uid:
- * @s:
- * @uid:
- *
- * Remove a specific info record from the summary, by @uid.
- **/
-void camel_folder_summary_remove_uid(CamelFolderSummary *s, const char *uid)
-{
- CamelMessageInfo *oldinfo;
- char *olduid;
-
- CAMEL_SUMMARY_LOCK(s, ref_lock);
- CAMEL_SUMMARY_LOCK(s, summary_lock);
- if (g_hash_table_lookup_extended(s->messages_uid, uid, (void *)&olduid, (void *)&oldinfo)) {
- /* make sure it doesn't vanish while we're removing it */
- oldinfo->refcount++;
- CAMEL_SUMMARY_UNLOCK(s, summary_lock);
- CAMEL_SUMMARY_UNLOCK(s, ref_lock);
- camel_folder_summary_remove(s, oldinfo);
- camel_folder_summary_info_free(s, oldinfo);
- } else {
- CAMEL_SUMMARY_UNLOCK(s, summary_lock);
- CAMEL_SUMMARY_UNLOCK(s, ref_lock);
- }
-}
-
-/**
- * camel_folder_summary_remove_index:
- * @s:
- * @index:
- *
- * Remove a specific info record from the summary, by index.
- **/
-void camel_folder_summary_remove_index(CamelFolderSummary *s, int index)
-{
- CAMEL_SUMMARY_LOCK(s, summary_lock);
- if (index < s->messages->len) {
- CamelMessageInfo *info = s->messages->pdata[index];
-
- g_hash_table_remove(s->messages_uid, camel_message_info_uid(info));
- g_ptr_array_remove_index(s->messages, index);
- s->flags |= CAMEL_SUMMARY_DIRTY;
-
- CAMEL_SUMMARY_UNLOCK(s, summary_lock);
- camel_folder_summary_info_free(s, info);
- } else {
- CAMEL_SUMMARY_UNLOCK(s, summary_lock);
- }
-}
-
-/**
- * camel_folder_summary_encode_uint32:
- * @out:
- * @value:
- *
- * Utility function to save an uint32 to a file.
- *
- * Return value: -1 on error.
- **/
-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)) {
- unsigned int c = (value>>i) & 0x7f;
- if (fputc(c, out) == -1)
- return -1;
- }
- }
- return fputc(value | 0x80, out);
-}
-
-/**
- * camel_folder_summary_decode_uint32:
- * @in:
- * @dest:
- *
- * Retrieve an encoded uint32 from a file.
- *
- * Return value: -1 on error. @*dest will contain the
- * decoded value.
- **/
-int
-camel_folder_summary_decode_uint32(FILE *in, guint32 *dest)
-{
- guint32 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 -1;
- }
- *dest = value | (v&0x7f);
-
- io(printf("Decoding int %u\n", *dest));
-
- return 0;
-}
-
-/**
- * camel_folder_summary_encode_fixed_int32:
- * @out:
- * @value:
- *
- * Encode a gint32, performing no compression, but converting
- * to network order.
- *
- * Return value: -1 on error.
- **/
-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;
-}
-
-/**
- * camel_folder_summary_decode_fixed_int32:
- * @in:
- * @dest:
- *
- * Retrieve a gint32.
- *
- * Return value: -1 on error.
- **/
-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;
- }
-}
-
-/**
- * camel_folder_summary_encode_time_t:
- * @out:
- * @value:
- *
- * Encode a time_t value to the file.
- *
- * Return value: -1 on error.
- **/
-int
-camel_folder_summary_encode_time_t(FILE *out, time_t value)
-{
- int i;
-
- for (i=sizeof(time_t)-1;i>=0;i--) {
- if (fputc((value >> (i*8)) & 0xff, out) == -1)
- return -1;
- }
- return 0;
-}
-
-/**
- * camel_folder_summary_decode_time_t:
- * @in:
- * @dest:
- *
- * Decode a time_t value.
- *
- * Return value: -1 on error.
- **/
-int
-camel_folder_summary_decode_time_t(FILE *in, time_t *dest)
-{
- time_t save = 0;
- unsigned int v;
- int i = sizeof(time_t) - 1;
-
- while ( i>=0 && (v = fgetc(in)) != EOF) {
- save |= v << (i*8);
- i--;
- }
- *dest = save;
- if (v == EOF)
- return -1;
- return 0;
-}
-
-/**
- * camel_folder_summary_encode_off_t:
- * @out:
- * @value:
- *
- * Encode an off_t type.
- *
- * Return value:
- **/
-int
-camel_folder_summary_encode_off_t(FILE *out, off_t value)
-{
- int i;
-
- for (i=sizeof(off_t)-1;i>=0;i--) {
- if (fputc((value >> (i*8)) & 0xff, out) == -1)
- return -1;
- }
- return 0;
-}
-
-/**
- * camel_folder_summary_decode_off_t:
- * @in:
- * @dest:
- *
- * Decode an off_t type.
- *
- * Return value:
- **/
-int
-camel_folder_summary_decode_off_t(FILE *in, off_t *dest)
-{
- off_t save = 0;
- unsigned int v;
- int i = sizeof(off_t) - 1;
-
- while ( i>=0 && (v = fgetc(in)) != EOF) {
- save |= v << (i*8);
- i--;
- }
- *dest = save;
- if (v == EOF)
- return -1;
- return 0;
-}
-
-/* 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
-
-/**
- * camel_folder_summary_encode_token:
- * @out:
- * @str:
- *
- * Encode a string value, but use tokenisation and compression
- * to reduce the size taken for common mailer words. This
- * can still be used to encode normal strings as well.
- *
- * Return value: -1 on error.
- **/
-int
-camel_folder_summary_encode_token(FILE *out, const 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<len;i++)
- lower[i] = tolower(str[i]);
- lower[i] = 0;
-#ifdef USE_BSEARCH
- match = bsearch(lower, tokens, tokens_len, sizeof(char *), (int (*)(const void *, const void *))token_search_cmp);
- if (match)
- token = match-tokens;
-#else
- for (i=0;i<tokens_len;i++) {
- if (!strcmp(tokens[i], lower)) {
- token = i;
- break;
- }
- }
-#endif
- }
- if (token != -1) {
- return camel_folder_summary_encode_uint32(out, token+1);
- } else {
- if (camel_folder_summary_encode_uint32(out, len+32) == -1)
- return -1;
- if (fwrite(str, len, 1, out) != 1)
- return -1;
- }
- }
- return 0;
-}
-
-/**
- * camel_folder_summary_decode_token:
- * @in:
- * @str:
- *
- * Decode a token value.
- *
- * Return value: -1 on error.
- **/
-int
-camel_folder_summary_decode_token(FILE *in, char **str)
-{
- char *ret;
- guint32 len;
-
- io(printf("Decode token ...\n"));
-
- if (camel_folder_summary_decode_uint32(in, &len) == -1) {
- g_warning("Could not decode token from file");
- *str = NULL;
- return -1;
- }
-
- if (len<32) {
- if (len <= 0) {
- ret = NULL;
- } else if (len<= tokens_len) {
- ret = g_strdup(tokens[len-1]);
- } else {
- g_warning("Invalid token encountered: %d", len);
- *str = NULL;
- return -1;
- }
- } else if (len > 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;
-}
-
-/**
- * camel_folder_summary_encode_string:
- * @out:
- * @str:
- *
- * Encode a normal string and save it in the output file.
- *
- * Return value: -1 on error.
- **/
-int
-camel_folder_summary_encode_string(FILE *out, const 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;
-}
-
-
-/**
- * camel_folder_summary_decode_string:
- * @in:
- * @str:
- *
- * Decode a normal string from the input file.
- *
- * Return value: -1 on error.
- **/
-int
-camel_folder_summary_decode_string(FILE *in, char **str)
-{
- guint32 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 > 65536) {
- *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;
-}
-
-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)
-{
- gint32 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_time_t(in, &time) == -1
- || 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_time_t(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 *)(CAMEL_OBJECT_GET_CLASS(s)))->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 *)(CAMEL_OBJECT_GET_CLASS(s)))->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 CamelMessageInfo * message_info_new_from_message(CamelFolderSummary *s, CamelMimeMessage *msg)
-{
- CamelMessageInfo *mi;
-
- mi = ((CamelFolderSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->message_info_new(s, ((CamelMimePart *)msg)->headers);
-
- return mi;
-}
-
-static CamelMessageContentInfo * content_info_new_from_message(CamelFolderSummary *s, CamelMimePart *mp)
-{
- CamelMessageContentInfo *ci;
-
- ci = ((CamelFolderSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->content_info_new(s, mp->headers);
-
- return ci;
-}
-
-#ifndef NO_WARNINGS
-#warning "These should be made private again, easy to fix (used in filter-driver)"
-#endif
-char *
-camel_folder_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;
-}
-
-char *
-camel_folder_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;
- }
-}
-
-/**
- * camel_folder_summary_info_new:
- * @s:
- *
- * Allocate a new camel message info, suitable for adding
- * to this summary.
- *
- * Return value:
- **/
-CamelMessageInfo *
-camel_folder_summary_info_new(CamelFolderSummary *s)
-{
- CamelMessageInfo *mi;
-
- CAMEL_SUMMARY_LOCK(s, alloc_lock);
- if (s->message_info_chunks == NULL)
- s->message_info_chunks = e_memchunk_new(32, s->message_info_size);
- mi = e_memchunk_alloc(s->message_info_chunks);
- CAMEL_SUMMARY_UNLOCK(s, alloc_lock);
-
- memset(mi, 0, s->message_info_size);
-#ifdef DOESTRV
- mi->strings = e_strv_new(s->message_info_strings);
-#endif
- mi->refcount = 1;
- return mi;
-}
-
-/**
- * camel_folder_summary_content_info_new:
- * @s:
- *
- * Allocate a new camel message content info, suitable for adding
- * to this summary.
- *
- * Return value:
- **/
-CamelMessageContentInfo *
-camel_folder_summary_content_info_new(CamelFolderSummary *s)
-{
- CamelMessageContentInfo *ci;
-
- CAMEL_SUMMARY_LOCK(s, alloc_lock);
- if (s->content_info_chunks == NULL)
- s->content_info_chunks = e_memchunk_new(32, s->content_info_size);
- ci = e_memchunk_alloc(s->content_info_chunks);
- CAMEL_SUMMARY_UNLOCK(s, alloc_lock);
-
- memset(ci, 0, s->content_info_size);
- return ci;
-}
-
-static CamelMessageInfo *
-message_info_new(CamelFolderSummary *s, struct _header_raw *h)
-{
- CamelMessageInfo *mi;
- const char *received;
- guchar digest[16];
- struct _header_references *refs, *scan;
- char *msgid;
- int count;
-
- mi = camel_folder_summary_info_new(s);
-
-#ifdef DOESTRV
- msgid = camel_folder_summary_format_string(h, "subject");
- e_strv_set_ref_free(mi->strings, CAMEL_MESSAGE_INFO_SUBJECT, msgid);
- msgid = camel_folder_summary_format_address(h, "from");
- e_strv_set_ref_free(mi->strings, CAMEL_MESSAGE_INFO_FROM, msgid);
- msgid = camel_folder_summary_format_address(h, "to");
- e_strv_set_ref_free(mi->strings, CAMEL_MESSAGE_INFO_TO, msgid);
- msgid = camel_folder_summary_format_address(h, "cc");
- e_strv_set_ref_free(mi->strings, CAMEL_MESSAGE_INFO_CC, msgid);
- msgid = header_raw_check_mailing_list(&h);
- e_strv_set_ref_free(mi->strings, CAMEL_MESSAGE_INFO_MLIST, msgid);
-#else
- mi->subject = camel_folder_summary_format_string(h, "subject");
- mi->from = camel_folder_summary_format_address(h, "from");
- mi->to = camel_folder_summary_format_address(h, "to");
- mi->cc = camel_folder_summary_format_address(h, "cc");
- mi->mlist = header_raw_check_mailing_list(&h);
-#endif
- mi->user_flags = NULL;
- mi->user_tags = NULL;
- mi->date_sent = header_decode_date(header_raw_find(&h, "date", NULL), NULL);
- received = header_raw_find(&h, "received", NULL);
- if (received)
- received = strrchr(received, ';');
- if (received)
- mi->date_received = header_decode_date(received + 1, NULL);
- else
- mi->date_received = 0;
-
- msgid = header_msgid_decode(header_raw_find(&h, "message-id", NULL));
- if (msgid) {
- md5_get_digest(msgid, strlen(msgid), digest);
- memcpy(mi->message_id.id.hash, digest, sizeof(mi->message_id.id.hash));
- g_free(msgid);
- }
- /* if we have a references, use that, otherwise, see if we have an in-reply-to
- header, with parsable content, otherwise *shrug* */
- if ((refs = header_references_decode(header_raw_find(&h, "references", NULL))) != NULL
- || (refs = header_references_decode(header_raw_find(&h, "in-reply-to", NULL))) != NULL) {
- count = header_references_list_size(&refs);
- mi->references = g_malloc(sizeof(*mi->references) + ((count-1) * sizeof(mi->references->references[0])));
- count = 0;
- scan = refs;
- while (scan) {
- /* FIXME: the id might be NULL because of a small bug in camel-mime-utils */
- if (scan->id) {
- md5_get_digest(scan->id, strlen(scan->id), digest);
- memcpy(mi->references->references[count].id.hash, digest, sizeof(mi->message_id.id.hash));
- count++;
- }
- scan = scan->next;
- }
- mi->references->size = count;
- header_references_list_clear(&refs);
- }
-
- return mi;
-}
-
-
-static CamelMessageInfo *
-message_info_load(CamelFolderSummary *s, FILE *in)
-{
- CamelMessageInfo *mi;
- guint count;
- int i;
-#ifdef DOESTRV
- char *tmp;
-#endif
-
- mi = camel_folder_summary_info_new(s);
-
- io(printf("Loading message info\n"));
-#ifdef DOESTRV
- camel_folder_summary_decode_string(in, &tmp);
- e_strv_set_ref_free(mi->strings, CAMEL_MESSAGE_INFO_UID, tmp);
- camel_folder_summary_decode_uint32(in, &mi->flags);
- camel_folder_summary_decode_uint32(in, &mi->size);
- camel_folder_summary_decode_time_t(in, &mi->date_sent);
- camel_folder_summary_decode_time_t(in, &mi->date_received);
- camel_folder_summary_decode_string(in, &tmp);
- e_strv_set_ref_free(mi->strings, CAMEL_MESSAGE_INFO_SUBJECT, tmp);
- camel_folder_summary_decode_string(in, &tmp);
- e_strv_set_ref_free(mi->strings, CAMEL_MESSAGE_INFO_FROM, tmp);
- camel_folder_summary_decode_string(in, &tmp);
- e_strv_set_ref_free(mi->strings, CAMEL_MESSAGE_INFO_TO, tmp);
- camel_folder_summary_decode_string(in, &tmp);
- e_strv_set_ref_free(mi->strings, CAMEL_MESSAGE_INFO_CC, tmp);
- camel_folder_summary_decode_string(in, &tmp);
- e_strv_set_ref_free(mi->strings, CAMEL_MESSAGE_INFO_MLIST, tmp);
-#else
- camel_folder_summary_decode_string(in, &mi->uid);
- camel_folder_summary_decode_uint32(in, &mi->flags);
- camel_folder_summary_decode_uint32(in, &mi->size);
- camel_folder_summary_decode_time_t(in, &mi->date_sent);
- camel_folder_summary_decode_time_t(in, &mi->date_received);
- camel_folder_summary_decode_string(in, &mi->subject);
- camel_folder_summary_decode_string(in, &mi->from);
- camel_folder_summary_decode_string(in, &mi->to);
- camel_folder_summary_decode_string(in, &mi->cc);
- camel_folder_summary_decode_string(in, &mi->mlist);
-#endif
- mi->content = NULL;
-
- camel_folder_summary_decode_fixed_int32(in, &mi->message_id.id.part.hi);
- camel_folder_summary_decode_fixed_int32(in, &mi->message_id.id.part.lo);
-
- if (camel_folder_summary_decode_uint32(in, &count) == -1 || count > 500)
- goto error;
-
- if (count > 0) {
- mi->references = g_malloc(sizeof(*mi->references) + ((count-1) * sizeof(mi->references->references[0])));
- mi->references->size = count;
- for (i=0;i<count;i++) {
- camel_folder_summary_decode_fixed_int32(in, &mi->references->references[i].id.part.hi);
- camel_folder_summary_decode_fixed_int32(in, &mi->references->references[i].id.part.lo);
- }
- }
-
- if (camel_folder_summary_decode_uint32(in, &count) == -1 || count > 500)
- goto error;
-
- for (i=0;i<count;i++) {
- char *name;
- camel_folder_summary_decode_string(in, &name);
- camel_flag_set(&mi->user_flags, name, TRUE);
- g_free(name);
- }
-
- if (camel_folder_summary_decode_uint32(in, &count) == -1 || count > 500)
- goto error;
-
- for (i=0;i<count;i++) {
- char *name, *value;
- camel_folder_summary_decode_string(in, &name);
- camel_folder_summary_decode_string(in, &value);
- camel_tag_set(&mi->user_tags, name, value);
- g_free(name);
- g_free(value);
- }
-
- if (!ferror(in))
- return mi;
-
-error:
- camel_folder_summary_info_free(s, mi);
-
- return NULL;
-}
-
-static int
-message_info_save(CamelFolderSummary *s, FILE *out, CamelMessageInfo *mi)
-{
- guint32 count;
- CamelFlag *flag;
- CamelTag *tag;
- int i;
-
- io(printf("Saving message info\n"));
-
- camel_folder_summary_encode_string(out, camel_message_info_uid(mi));
- camel_folder_summary_encode_uint32(out, mi->flags);
- camel_folder_summary_encode_uint32(out, mi->size);
- camel_folder_summary_encode_time_t(out, mi->date_sent);
- camel_folder_summary_encode_time_t(out, mi->date_received);
- camel_folder_summary_encode_string(out, camel_message_info_subject(mi));
- camel_folder_summary_encode_string(out, camel_message_info_from(mi));
- camel_folder_summary_encode_string(out, camel_message_info_to(mi));
- camel_folder_summary_encode_string(out, camel_message_info_cc(mi));
- camel_folder_summary_encode_string(out, camel_message_info_mlist(mi));
-
- camel_folder_summary_encode_fixed_int32(out, mi->message_id.id.part.hi);
- camel_folder_summary_encode_fixed_int32(out, mi->message_id.id.part.lo);
-
- if (mi->references) {
- camel_folder_summary_encode_uint32(out, mi->references->size);
- for (i=0;i<mi->references->size;i++) {
- camel_folder_summary_encode_fixed_int32(out, mi->references->references[i].id.part.hi);
- camel_folder_summary_encode_fixed_int32(out, mi->references->references[i].id.part.lo);
- }
- } else {
- camel_folder_summary_encode_uint32(out, 0);
- }
-
- 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;
- }
-
- count = camel_tag_list_size(&mi->user_tags);
- camel_folder_summary_encode_uint32(out, count);
- tag = mi->user_tags;
- while (tag) {
- camel_folder_summary_encode_string(out, tag->name);
- camel_folder_summary_encode_string(out, tag->value);
- tag = tag->next;
- }
-
- return ferror(out);
-}
-
-static void
-message_info_free(CamelFolderSummary *s, CamelMessageInfo *mi)
-{
-#ifdef DOESTRV
- e_strv_destroy(mi->strings);
-#else
- g_free(mi->uid);
- g_free(mi->subject);
- g_free(mi->from);
- g_free(mi->to);
- g_free(mi->cc);
- g_free(mi->mlist);
-#endif
- g_free(mi->references);
- camel_flag_list_free(&mi->user_flags);
- camel_tag_list_free(&mi->user_tags);
- e_memchunk_free(s->message_info_chunks, mi);
-}
-
-static CamelMessageContentInfo *
-content_info_new(CamelFolderSummary *s, struct _header_raw *h)
-{
- CamelMessageContentInfo *ci;
-
- ci = camel_folder_summary_content_info_new(s);
-
- 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));
-
- 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 = camel_folder_summary_content_info_new(s);
-
- 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);
- if (camel_folder_summary_decode_uint32(in, &count) == -1 || count > 500)
- goto error;
-
- for (i=0;i<count;i++) {
- char *name, *value;
- camel_folder_summary_decode_token(in, &name);
- camel_folder_summary_decode_token(in, &value);
- header_content_type_set_param(ct, name, value);
- /* TODO: do this so we dont have to double alloc/free */
- g_free(name);
- g_free(value);
- }
- ci->type = 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);
-
- camel_folder_summary_decode_uint32(in, &ci->size);
-
- ci->childs = NULL;
-
- if (!ferror(in))
- return ci;
-
-error:
- camel_folder_summary_content_info_free(s, ci);
- return NULL;
-}
-
-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"));
-
- 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);
- camel_folder_summary_encode_token(out, ci->encoding);
- return camel_folder_summary_encode_uint32(out, ci->size);
-}
-
-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);
- e_memchunk_free(s->content_info_chunks, ci);
-}
-
-static char *
-next_uid_string(CamelFolderSummary *s)
-{
- return g_strdup_printf("%u", camel_folder_summary_next_uid(s));
-}
-
-/*
- OK
- Now this is where all the "smarts" happen, where the content info is built,
- and any indexing and what not is performed
-*/
-
-/* must have filter_lock before calling this function */
-static CamelMessageContentInfo *
-summary_build_content_info(CamelFolderSummary *s, CamelMessageInfo *msginfo, CamelMimeParser *mp)
-{
- int state, len;
- char *buffer;
- CamelMessageContentInfo *info = NULL;
- struct _header_content_type *ct;
- int body;
- int enc_id = -1, chr_id = -1, html_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);
-
- if (s->build_content)
- info = ((CamelFolderSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->content_info_new_from_parser(s, mp);
-
- switch(state) {
- case HSCAN_HEADER:
- /* check content type for indexing, then read body */
- ct = camel_mime_parser_content_type(mp);
- /* update attachments flag as we go */
- if (!header_content_type_is(ct, "text", "*"))
- msginfo->flags |= CAMEL_MESSAGE_ATTACHMENTS;
-
- 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);
- else
- camel_mime_filter_reset((CamelMimeFilter *)p->filter_64);
- 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);
- else
- camel_mime_filter_reset((CamelMimeFilter *)p->filter_qp);
- 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);
- } else {
- camel_mime_filter_reset((CamelMimeFilter *)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);
- }
- }
-
-#if 0
- /* this is disabled for now */
- /* also, should this go before/instead of the charset decoding? xml interfaces are utf8 already? */
- if (header_content_type_is(ct, "text", "html")) {
- if (p->filter_html == NULL)
- p->filter_html = camel_mime_filter_html_new();
- else
- camel_mime_filter_reset((CamelMimeFilter *)p->filter_html);
- html_id = camel_mime_parser_filter_add(mp, (CamelMimeFilter *)p->filter_html);
- }
-#endif
-
- /* 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, html_id);
- camel_mime_parser_filter_remove(mp, idx_id);
- break;
- case HSCAN_MULTIPART:
- d(printf("Summarising multipart\n"));
- /* update attachments flag as we go */
- ct = camel_mime_parser_content_type(mp);
- if (header_content_type_is(ct, "multipart", "mixed"))
- msginfo->flags |= CAMEL_MESSAGE_ATTACHMENTS;
-
- while (camel_mime_parser_step(mp, &buffer, &len) != HSCAN_MULTIPART_END) {
- camel_mime_parser_unstep(mp);
- part = summary_build_content_info(s, msginfo, mp);
- if (part) {
- part->parent = info;
- my_list_append((struct _node **)&info->childs, (struct _node *)part);
- }
- }
- break;
- case HSCAN_MESSAGE:
- d(printf("Summarising message\n"));
- /* update attachments flag as we go */
- msginfo->flags |= CAMEL_MESSAGE_ATTACHMENTS;
-
- part = summary_build_content_info(s, msginfo, mp);
- if (part) {
- part->parent = info;
- my_list_append((struct _node **)&info->childs, (struct _node *)part);
- }
- 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;
- }
-
- d(printf("finished building content info\n"));
-
- return info;
-}
-
-/* build the content-info, from a message */
-/* this needs no lock, as we copy all data, and ibex is threadsafe */
-static CamelMessageContentInfo *
-summary_build_content_info_message(CamelFolderSummary *s, CamelMessageInfo *msginfo, CamelMimePart *object)
-{
- CamelDataWrapper *containee;
- int parts, i;
- struct _CamelFolderSummaryPrivate *p = _PRIVATE(s);
- CamelMessageContentInfo *info = NULL, *child;
-
- if (s->build_content)
- info = ((CamelFolderSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->content_info_new_from_message(s, object);
-
- containee = camel_medium_get_content_object(CAMEL_MEDIUM(object));
-
- if (containee == NULL)
- return info;
-
- /* TODO: I find it odd that get_part and get_content_object do not
- add a reference, probably need fixing for multithreading */
-
- /* check for attachments */
- if (header_content_type_is(CAMEL_DATA_WRAPPER(containee)->mime_type, "multipart", "*")) {
- if (header_content_type_is(CAMEL_DATA_WRAPPER(containee)->mime_type, "multipart", "mixed"))
- msginfo->flags |= CAMEL_MESSAGE_ATTACHMENTS;
- } else if (!header_content_type_is(CAMEL_DATA_WRAPPER(containee)->mime_type, "text", "*"))
- msginfo->flags |= CAMEL_MESSAGE_ATTACHMENTS;
-
- /* using the object types is more accurate than using the mime/types */
- if (CAMEL_IS_MULTIPART(containee)) {
- parts = camel_multipart_get_number(CAMEL_MULTIPART(containee));
- for (i=0;i<parts;i++) {
- CamelMimePart *part = camel_multipart_get_part(CAMEL_MULTIPART(containee), i);
- g_assert(part);
- child = summary_build_content_info_message(s, msginfo, part);
- if (child) {
- child->parent = info;
- my_list_append((struct _node **)&info->childs, (struct _node *)child);
- }
- }
- } else if (CAMEL_IS_MIME_MESSAGE(containee)) {
- /* for messages we only look at its contents */
- child = summary_build_content_info_message(s, msginfo, (CamelMimePart *)containee);
- if (child) {
- child->parent = info;
- my_list_append((struct _node **)&info->childs, (struct _node *)child);
- }
- } else if (p->index
- && header_content_type_is(CAMEL_DATA_WRAPPER(containee)->mime_type, "text", "*")) {
- /* index all text parts if we're indexing */
- CamelStreamMem *mem = (CamelStreamMem *)camel_stream_mem_new();
-
- camel_data_wrapper_write_to_stream(containee, (CamelStream *)mem);
- ibex_index_buffer(p->index, (char *)camel_message_info_uid(msginfo), mem->buffer->data, mem->buffer->len, NULL);
- camel_object_unref((CamelObject *)mem);
- }
-
- return info;
-}
-
-/**
- * camel_flag_get:
- * @list:
- * @name:
- *
- * Find the state of the flag @name in @list.
- *
- * Return value: The state of the flag (TRUE or FALSE).
- **/
-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;
-}
-
-/**
- * camel_flag_set:
- * @list:
- * @name:
- * @value:
- *
- * Set the state of a flag @name in the list @list to @value.
- *
- * Return value: Whether or not it changed.
- **/
-gboolean
-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 !value;
- }
- flag = tmp;
- }
-
- if (value) {
- tmp = g_malloc(sizeof(*tmp) + strlen(name));
- strcpy(tmp->name, name);
- tmp->next = 0;
- flag->next = tmp;
- }
- return value;
-}
-
-/**
- * camel_flag_list_size:
- * @list:
- *
- * Get the length of the flag list.
- *
- * Return value: The number of TRUE flags in the list.
- **/
-int
-camel_flag_list_size(CamelFlag **list)
-{
- int count=0;
- CamelFlag *flag;
-
- flag = *list;
- while (flag) {
- count++;
- flag = flag->next;
- }
- return count;
-}
-
-/**
- * camel_flag_list_free:
- * @list:
- *
- * Free the memory associated with the flag list @list.
- **/
-void
-camel_flag_list_free(CamelFlag **list)
-{
- CamelFlag *flag, *tmp;
- flag = *list;
- while (flag) {
- tmp = flag->next;
- g_free(flag);
- flag = tmp;
- }
- *list = NULL;
-}
-
-const char
-*camel_tag_get(CamelTag **list, const char *name)
-{
- CamelTag *tag;
-
- tag = *list;
- while (tag) {
- if (!strcmp(tag->name, name))
- return (const char *)tag->value;
- tag = tag->next;
- }
- return NULL;
-}
-
-/**
- * camel_tag_set:
- * @list:
- * @name:
- * @value:
- *
- * Set the tag @name in the tag list @list to @value.
- *
- * Return value: whether or not it changed
- **/
-gboolean
-camel_tag_set(CamelTag **list, const char *name, const char *value)
-{
- CamelTag *tag, *tmp;
-
- /* this 'trick' works because tag->next is the first element */
- tag = (CamelTag *)list;
- while (tag->next) {
- tmp = tag->next;
- if (!strcmp(tmp->name, name)) {
- if (value == NULL) { /* clear it? */
- tag->next = tmp->next;
- g_free(tmp->value);
- g_free(tmp);
- return TRUE;
- } else if (strcmp(tmp->value, value)) { /* has it changed? */
- g_free(tmp->value);
- tmp->value = g_strdup(value);
- return TRUE;
- }
- return FALSE;
- }
- tag = tmp;
- }
-
- if (value) {
- tmp = g_malloc(sizeof(*tmp)+strlen(name));
- strcpy(tmp->name, name);
- tmp->value = g_strdup(value);
- tmp->next = 0;
- tag->next = tmp;
- return TRUE;
- }
- return FALSE;
-}
-
-/**
- * camel_tag_list_size:
- * @list:
- *
- * Get the number of tags present in the tag list @list.
- *
- * Return value: The number of tags.
- **/
-int camel_tag_list_size(CamelTag **list)
-{
- int count=0;
- CamelTag *tag;
-
- tag = *list;
- while (tag) {
- count++;
- tag = tag->next;
- }
- return count;
-}
-
-/**
- * camel_tag_list_free:
- * @list:
- *
- * Free the tag list @list.
- **/
-void camel_tag_list_free(CamelTag **list)
-{
- CamelTag *tag, *tmp;
- tag = *list;
- while (tag) {
- tmp = tag->next;
- g_free(tag->value);
- g_free(tag);
- tag = tmp;
- }
- *list = NULL;
-}
-
-struct flag_names_t {
- char *name;
- guint32 value;
-} flag_names[] = {
- { "answered", CAMEL_MESSAGE_ANSWERED },
- { "deleted", CAMEL_MESSAGE_DELETED },
- { "draft", CAMEL_MESSAGE_DELETED },
- { "flagged", CAMEL_MESSAGE_FLAGGED },
- { "seen", CAMEL_MESSAGE_SEEN },
- { "attachments", CAMEL_MESSAGE_ATTACHMENTS },
- { NULL, 0 }
-};
-
-/**
- * camel_system_flag:
- * @name:
- *
- * Returns the integer value of the flag string.
- **/
-guint32
-camel_system_flag (const char *name)
-{
- struct flag_names_t *flag;
-
- g_return_val_if_fail (name != NULL, 0);
-
- for (flag = flag_names; *flag->name; flag++)
- if (!g_strcasecmp (name, flag->name))
- return flag->value;
-
- return 0;
-}
-
-/**
- * camel_system_flag_get:
- * @flags:
- * @name:
- *
- * Find the state of the flag @name in @flags.
- *
- * Return value: The state of the flag (TRUE or FALSE).
- **/
-gboolean
-camel_system_flag_get (guint32 flags, const char *name)
-{
- g_return_val_if_fail (name != NULL, FALSE);
-
- return flags & camel_system_flag (name);
-}
-
-
-/**
- * camel_message_info_new:
- *
- * Returns a new CamelMessageInfo structure.
- **/
-CamelMessageInfo *
-camel_message_info_new (void)
-{
- CamelMessageInfo *info;
-
- info = g_malloc0(sizeof(*info));
-#ifdef DOESTRV
- info->strings = e_strv_new (CAMEL_MESSAGE_INFO_LAST);
-#endif
- info->refcount = 1;
-
- return info;
-}
-
-/**
- * camel_message_info_ref:
- * @info:
- *
- * Reference an info.
- *
- * NOTE: This interface is not MT-SAFE, like the others.
- **/
-void camel_message_info_ref(CamelMessageInfo *info)
-{
- GLOBAL_INFO_LOCK(info);
- info->refcount++;
- GLOBAL_INFO_UNLOCK(info);
-}
-
-/**
- * camel_message_info_new_from_header:
- * @header: raw header
- *
- * Returns a new CamelMessageInfo structure populated by the header.
- **/
-CamelMessageInfo *
-camel_message_info_new_from_header (struct _header_raw *header)
-{
- CamelMessageInfo *info;
- char *subject, *from, *to, *cc, *mlist;
-
- subject = camel_folder_summary_format_string(header, "subject");
- from = camel_folder_summary_format_address(header, "from");
- to = camel_folder_summary_format_address(header, "to");
- cc = camel_folder_summary_format_address(header, "cc");
- mlist = header_raw_check_mailing_list(&header);
-
- info = camel_message_info_new();
-
- camel_message_info_set_subject(info, subject);
- camel_message_info_set_from(info, from);
- camel_message_info_set_to(info, to);
- camel_message_info_set_cc(info, cc);
- camel_message_info_set_mlist(info, mlist);
-
- return info;
-}
-
-/**
- * camel_message_info_dup_to:
- * @from: source message info
- * @to: destination message info
- *
- * Duplicates the contents of one CamelMessageInfo structure into another.
- * (The destination is assumed to be empty: its contents are not freed.)
- * The slightly odd interface is to allow this to be used to initialize
- * "subclasses" of CamelMessageInfo.
- **/
-void
-camel_message_info_dup_to(const CamelMessageInfo *from, CamelMessageInfo *to)
-{
- CamelFlag *flag;
- CamelTag *tag;
-
- /* Copy numbers */
- to->flags = from->flags;
- to->size = from->size;
- to->date_sent = from->date_sent;
- to->date_received = from->date_received;
- to->refcount = 1;
-
- /* Copy strings */
-#ifdef DOESTRV
- to->strings = e_strv_new(CAMEL_MESSAGE_INFO_LAST);
- e_strv_set(to->strings, CAMEL_MESSAGE_INFO_SUBJECT, camel_message_info_subject(from));
- e_strv_set(to->strings, CAMEL_MESSAGE_INFO_FROM, camel_message_info_from(from));
- e_strv_set(to->strings, CAMEL_MESSAGE_INFO_TO, camel_message_info_to(from));
- e_strv_set(to->strings, CAMEL_MESSAGE_INFO_CC, camel_message_info_cc(from));
- e_strv_set(to->strings, CAMEL_MESSAGE_INFO_UID, camel_message_info_uid(from));
- e_strv_set(to->strings, CAMEL_MESSAGE_INFO_UID, camel_message_info_mlist(from));
-#else
- to->subject = g_strdup(from->subject);
- to->from = g_strdup(from->from);
- to->to = g_strdup(from->to);
- to->cc = g_strdup(from->cc);
- to->uid = g_strdup(from->uid);
- to->mlist = g_strdup(from->mlist);
-#endif
- memcpy(&to->message_id, &from->message_id, sizeof(from->message_id));
-
- /* Copy structures */
- if (from->references) {
- int len = sizeof(*from->references) + ((from->references->size-1) * sizeof(from->references->references[0]));
-
- to->references = g_malloc(len);
- memcpy(to->references, from->references, len);
- } else {
- to->references = NULL;
- }
-
- flag = from->user_flags;
- while (flag) {
- camel_flag_set(&to->user_flags, flag->name, TRUE);
- flag = flag->next;
- }
-
- tag = from->user_tags;
- while (tag) {
- camel_tag_set(&to->user_tags, tag->name, tag->value);
- tag = tag->next;
- }
-
- /* No, this is impossible without knowing the class of summary we came from */
- /* FIXME some day */
- to->content = NULL;
-}
-
-/**
- * camel_message_info_free:
- * @mi: the message info
- *
- * Unref's and potentially frees a CamelMessageInfo and its contents.
- *
- * Can only be used to free CamelMessageInfo's created with
- * camel_message_info_dup_to.
- *
- * NOTE: This interface is not MT-SAFE, like the others.
- *
- **/
-void
-camel_message_info_free(CamelMessageInfo *mi)
-{
- g_return_if_fail(mi != NULL);
-
- GLOBAL_INFO_LOCK(info);
- mi->refcount--;
- if (mi->refcount > 0) {
- GLOBAL_INFO_UNLOCK(info);
- return;
- }
- GLOBAL_INFO_UNLOCK(info);
-
-#ifdef DOESTRV
- e_strv_destroy(mi->strings);
-#else
- g_free(mi->uid);
- g_free(mi->subject);
- g_free(mi->from);
- g_free(mi->to);
- g_free(mi->cc);
- g_free(mi->mlist);
-#endif
- g_free(mi->references);
- camel_flag_list_free(&mi->user_flags);
- camel_tag_list_free(&mi->user_tags);
- /* FIXME: content info? */
- g_free(mi);
-}
-
-#ifdef DOESTRV
-const char *camel_message_info_string(const CamelMessageInfo *mi, int type)
-{
- if (mi->strings == NULL)
- return "";
- return e_strv_get(mi->strings, type);
-}
-
-void camel_message_info_set_string(CamelMessageInfo *mi, int type, char *str)
-{
- g_assert(mi->strings != NULL);
-
- mi->strings = e_strv_set_ref_free(mi->strings, type, str);
-}
-#endif
-
-#if 0
-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<empty>\n", p);
- return;
- }
-
- printf("%scontent-type: %s/%s\n", p, ci->type->type, ci->type->subtype);
- printf("%scontent-transfer-encoding: %s\n", p, ci->encoding);
- printf("%scontent-description: %s\n", p, ci->description);
- printf("%ssize: %lu\n", p, (unsigned long)ci->size);
- ci = ci->childs;
- while (ci) {
- content_info_dump(ci, depth+1);
- ci = ci->next;
- }
-}
-
-void
-message_info_dump(CamelMessageInfo *mi)
-{
- if (mi == NULL) {
- printf("No message?\n");
- return;
- }
-
- printf("Subject: %s\n", camel_message_info_subject(mi));
- printf("To: %s\n", camel_message_info_to(mi));
- printf("Cc: %s\n", camel_message_info_cc(mi));
- printf("mailing list: %s\n", camel_message_info_mlist(mi));
- printf("From: %s\n", camel_message_info_from(mi));
- printf("UID: %s\n", camel_message_info_uid(mi));
- printf("Flags: %04x\n", mi->flags & 0xffff);
- content_info_dump(mi->content, 0);
-}
-
-int main(int argc, char **argv)
-{
- CamelMimeParser *mp;
- int fd;
- CamelFolderSummary *s;
- char *buffer;
- int len;
- int i;
- ibex *index;
-
- /*g_tk_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<camel_folder_summary_count(s);i++) {
- CamelMessageInfo *info = camel_folder_summary_index(s, i);
- message_info_dump(info);
- camel_folder_summary_info_free(info);
- }
-
- printf("Saivng summary\n");
- camel_folder_summary_set_filename(s, "index.summary");
- camel_folder_summary_save(s);
-
- {
- CamelFolderSummary *n;
-
- printf("\nLoading summary\n");
- n = camel_folder_summary_new();
- camel_folder_summary_set_build_content(n, TRUE);
- camel_folder_summary_set_filename(n, "index.summary");
- camel_folder_summary_load(n);
-
- printf("Printing summary\n");
- for (i=0;i<camel_folder_summary_count(n);i++) {
- CamelMessageInfo *info = camel_folder_summary_index(s, i);
- message_info_dump(info);
- camel_folder_summary_info_free(info);
- }
- camel_object_unref(n);
- }
-
-
- camel_object_unref(mp);
- camel_object_unref(s);
-
- printf("summarised %d messages\n", camel_folder_summary_count(s));
-#if 0
- printf("g_strdup count = %d\n", strdup_count);
- printf("g_malloc count = %d\n", malloc_count);
- printf("g_free count = %d\n", free_count);
-#endif
- return 0;
-}
-
-#endif
diff --git a/camel/camel-folder-summary.h b/camel/camel-folder-summary.h
deleted file mode 100644
index 99642c9a84..0000000000
--- a/camel/camel-folder-summary.h
+++ /dev/null
@@ -1,334 +0,0 @@
-/*
- * Copyright (C) 2000 Helix Code Inc.
- *
- * Authors: Michael Zucchi <notzed@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_SUMMARY_H
-#define _CAMEL_FOLDER_SUMMARY_H
-
-#include <stdio.h>
-#include <time.h>
-#include <camel/camel-mime-parser.h>
-#include <camel/camel-object.h>
-#include <libibex/ibex.h>
-
-#define CAMEL_FOLDER_SUMMARY(obj) CAMEL_CHECK_CAST (obj, camel_folder_summary_get_type (), CamelFolderSummary)
-#define CAMEL_FOLDER_SUMMARY_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_folder_summary_get_type (), CamelFolderSummaryClass)
-#define CAMEL_IS_FOLDER_SUMMARY(obj) CAMEL_CHECK_TYPE (obj, camel_folder_summary_get_type ())
-
-/*typedef struct _CamelFolderSummary CamelFolderSummary;*/
-typedef struct _CamelFolderSummaryClass CamelFolderSummaryClass;
-
-/* A tree of message content info structures
- describe the content structure of the message (if it has any) */
-struct _CamelMessageContentInfo {
- struct _CamelMessageContentInfo *next;
-
- struct _CamelMessageContentInfo *childs;
- struct _CamelMessageContentInfo *parent;
-
- struct _header_content_type *type;
- char *id;
- char *description;
- char *encoding;
- guint32 size;
-};
-
-/* 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,
- CAMEL_MESSAGE_ATTACHMENTS = 1<<5,
-
- /* 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]; /* name allocated as part of the structure */
-} CamelFlag;
-
-typedef struct _CamelTag {
- struct _CamelTag *next;
- char *value;
- char name[1]; /* name allocated as part of the structure */
-} CamelTag;
-
-/* a summary messageid is a 64 bit identifier (partial md5 hash) */
-typedef struct _CamelSummaryMessageID {
- union {
- guint64 id;
- unsigned char hash[8];
- struct {
- guint32 hi;
- guint32 lo;
- } part;
- } id;
-} CamelSummaryMessageID;
-
-/* summary references is a fixed size array of references */
-typedef struct _CamelSummaryReferences {
- int size;
- CamelSummaryMessageID references[1];
-} CamelSummaryReferences;
-
-#define DOESTRV
-
-#ifdef DOESTRV
-/* string array indices */
-enum {
- CAMEL_MESSAGE_INFO_UID,
- CAMEL_MESSAGE_INFO_SUBJECT,
- CAMEL_MESSAGE_INFO_FROM,
- CAMEL_MESSAGE_INFO_TO,
- CAMEL_MESSAGE_INFO_CC,
- CAMEL_MESSAGE_INFO_MLIST,
- CAMEL_MESSAGE_INFO_LAST,
-};
-#endif
-
-/* information about a given object */
-struct _CamelMessageInfo {
- /* public fields */
-#ifdef DOESTRV
- struct _EStrv *strings; /* all strings packed into a single compact array */
-#else
- char *subject;
- char *from;
- char *to;
- char *cc;
- char *mlist;
-
- char *uid;
-#endif
- guint32 flags;
- guint32 size;
- guint32 refcount;
-
- time_t date_sent;
- time_t date_received;
-
- CamelSummaryMessageID message_id;/* for this message */
- CamelSummaryReferences *references;/* from parent to root */
-
- struct _CamelFlag *user_flags;
- struct _CamelTag *user_tags;
-
- /* tree of content description - NULL if it is not available */
- CamelMessageContentInfo *content;
-};
-
-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;
-
-#ifdef DOESTRV
- guint32 message_info_strings;
-#endif
- /* memory allocators (setup automatically) */
- struct _EMemChunk *message_info_chunks;
- struct _EMemChunk *content_info_chunks;
-
- 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_new_from_message)(CamelFolderSummary *, CamelMimeMessage *);
- 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_new_from_message)(CamelFolderSummary *, CamelMimePart *);
- CamelMessageContentInfo * (*content_info_load)(CamelFolderSummary *, FILE *);
- int (*content_info_save)(CamelFolderSummary *, FILE *, CamelMessageContentInfo *);
- void (*content_info_free)(CamelFolderSummary *, CamelMessageContentInfo *);
-
- /* get the next uid */
- char *(*next_uid_string)(CamelFolderSummary *);
-};
-
-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_build_content(CamelFolderSummary *, gboolean state);
-
-guint32 camel_folder_summary_next_uid (CamelFolderSummary *s);
-char *camel_folder_summary_next_uid_string (CamelFolderSummary *s);
-void camel_folder_summary_set_uid (CamelFolderSummary *s, guint32 uid);
-
-/* 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 *);
-CamelMessageInfo *camel_folder_summary_add_from_message(CamelFolderSummary *, CamelMimeMessage *);
-
-/* Just build raw summary items */
-CamelMessageInfo *camel_folder_summary_info_new(CamelFolderSummary *s);
-CamelMessageInfo *camel_folder_summary_info_new_from_header(CamelFolderSummary *, struct _header_raw *);
-CamelMessageInfo *camel_folder_summary_info_new_from_parser(CamelFolderSummary *, CamelMimeParser *);
-CamelMessageInfo *camel_folder_summary_info_new_from_message(CamelFolderSummary *, CamelMimeMessage *);
-
-void camel_folder_summary_info_ref(CamelFolderSummary *, CamelMessageInfo *);
-void camel_folder_summary_info_free(CamelFolderSummary *, CamelMessageInfo *);
-
-CamelMessageContentInfo *camel_folder_summary_content_info_new(CamelFolderSummary *s);
-void camel_folder_summary_content_info_free(CamelFolderSummary *s, CamelMessageContentInfo *ci);
-
-/* 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);
-void camel_folder_summary_remove_index(CamelFolderSummary *s, int);
-/* 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);
-GPtrArray *camel_folder_summary_array(CamelFolderSummary *s);
-void camel_folder_summary_array_free(CamelFolderSummary *s, GPtrArray *array);
-
-/* summary formatting utils */
-char *camel_folder_summary_format_address(struct _header_raw *h, const char *name);
-char *camel_folder_summary_format_string(struct _header_raw *h, const char *name);
-
-/* 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_time_t(FILE *out, time_t value);
-int camel_folder_summary_decode_time_t(FILE *in, time_t *dest);
-int camel_folder_summary_encode_off_t(FILE *out, off_t value);
-int camel_folder_summary_decode_off_t(FILE *in, off_t *dest);
-int camel_folder_summary_encode_string(FILE *out, const char *str);
-int camel_folder_summary_decode_string(FILE *in, char **);
-
-/* basically like strings, but certain keywords can be compressed and de-cased */
-int camel_folder_summary_encode_token(FILE *, const char *);
-int camel_folder_summary_decode_token(FILE *, char **);
-
-/* message flag operations */
-gboolean camel_flag_get(CamelFlag **list, const char *name);
-gboolean camel_flag_set(CamelFlag **list, const char *name, gboolean state);
-int camel_flag_list_size(CamelFlag **list);
-void camel_flag_list_free(CamelFlag **list);
-
-guint32 camel_system_flag (const char *name);
-gboolean camel_system_flag_get (guint32 flags, const char *name);
-
-/* message tag operations */
-const char *camel_tag_get(CamelTag **list, const char *name);
-gboolean camel_tag_set(CamelTag **list, const char *name, const char *value);
-int camel_tag_list_size(CamelTag **list);
-void camel_tag_list_free(CamelTag **list);
-
-/* message info utils for working with pseudo-messageinfo structures
- NOTE: These cannot be added to a real summary object, but suffice for all
- other external interfaces that use message info's */
-CamelMessageInfo *camel_message_info_new(void);
-void camel_message_info_ref(CamelMessageInfo *info);
-CamelMessageInfo *camel_message_info_new_from_header(struct _header_raw *header);
-void camel_message_info_dup_to(const CamelMessageInfo *from, CamelMessageInfo *to);
-void camel_message_info_free(CamelMessageInfo *mi);
-
-/* accessors */
-#ifdef DOESTRV
-const char *camel_message_info_string(const CamelMessageInfo *mi, int type);
-#define camel_message_info_subject(x) camel_message_info_string((const CamelMessageInfo *)(x), CAMEL_MESSAGE_INFO_SUBJECT)
-#define camel_message_info_from(x) camel_message_info_string((const CamelMessageInfo *)(x), CAMEL_MESSAGE_INFO_FROM)
-#define camel_message_info_to(x) camel_message_info_string((const CamelMessageInfo *)(x), CAMEL_MESSAGE_INFO_TO)
-#define camel_message_info_cc(x) camel_message_info_string((const CamelMessageInfo *)(x), CAMEL_MESSAGE_INFO_CC)
-#define camel_message_info_uid(x) camel_message_info_string((const CamelMessageInfo *)(x), CAMEL_MESSAGE_INFO_UID)
-#define camel_message_info_mlist(x) camel_message_info_string((const CamelMessageInfo *)(x), CAMEL_MESSAGE_INFO_MLIST)
-
-void camel_message_info_set_string(CamelMessageInfo *mi, int type, char *str);
-#define camel_message_info_set_subject(x, s) camel_message_info_set_string(x, CAMEL_MESSAGE_INFO_SUBJECT, s)
-#define camel_message_info_set_from(x, s) camel_message_info_set_string(x, CAMEL_MESSAGE_INFO_FROM, s)
-#define camel_message_info_set_to(x, s) camel_message_info_set_string(x, CAMEL_MESSAGE_INFO_TO, s)
-#define camel_message_info_set_cc(x, s) camel_message_info_set_string(x, CAMEL_MESSAGE_INFO_CC, s)
-#define camel_message_info_set_uid(x, s) camel_message_info_set_string(x, CAMEL_MESSAGE_INFO_UID, s)
-#define camel_message_info_set_mlist(x, s) camel_message_info_set_string(x, CAMEL_MESSAGE_INFO_MLIST, s)
-
-#else
-
-#define camel_message_info_subject(x) (((CamelMessageInfo *)(x))->subject?((CamelMessageInfo *)(x))->subject:"")
-#define camel_message_info_from(x) (((CamelMessageInfo *)(x))->from?((CamelMessageInfo *)(x))->from:"")
-#define camel_message_info_to(x) (((CamelMessageInfo *)(x))->to?((CamelMessageInfo *)(x))->to:"")
-#define camel_message_info_cc(x) (((CamelMessageInfo *)(x))->cc?((CamelMessageInfo *)(x))->cc:"")
-#define camel_message_info_uid(x) (((CamelMessageInfo *)(x))->uid?((CamelMessageInfo *)(x))->uid:"")
-#define camel_message_info_mlist(x) (((CamelMessageInfo *)(x))->mlist?((CamelMessageInfo *)(x))->mlist:"")
-
-#define camel_message_info_set_subject(x, s) (g_free(((CamelMessageInfo *)(x))->subject),((CamelMessageInfo *)(x))->subject = (s))
-#define camel_message_info_set_from(x, s) (g_free(((CamelMessageInfo *)(x))->from),((CamelMessageInfo *)(x))->from = (s))
-#define camel_message_info_set_to(x, s) (g_free(((CamelMessageInfo *)(x))->to),((CamelMessageInfo *)(x))->to = (s))
-#define camel_message_info_set_cc(x, s) (g_free(((CamelMessageInfo *)(x))->cc),((CamelMessageInfo *)(x))->cc = (s))
-#define camel_message_info_set_uid(x, s) (g_free(((CamelMessageInfo *)(x))->uid),((CamelMessageInfo *)(x))->uid = (s))
-#define camel_message_info_set_mlist(x, s) (g_free(((CamelMessageInfo *)(x))->mlist),((CamelMessageInfo *)(x))->mlist = (s))
-#endif
-
-#endif /* ! _CAMEL_FOLDER_SUMMARY_H */
diff --git a/camel/camel-folder-thread.c b/camel/camel-folder-thread.c
deleted file mode 100644
index 5187901016..0000000000
--- a/camel/camel-folder-thread.c
+++ /dev/null
@@ -1,784 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000 Helix Code Inc.
- *
- * Authors: Michael Zucchi <notzed@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
- */
-
-/* TODO: This could probably be made a camel object, but it isn't really required */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <sys/types.h>
-#include <unistd.h>
-#include <errno.h>
-#include <string.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <ctype.h>
-#include <glib.h>
-
-#include "camel-folder-thread.h"
-#include "e-util/e-memory.h"
-
-#define d(x)
-
-#define TIMEIT
-
-#ifdef TIMEIT
-#include <sys/time.h>
-#include <unistd.h>
-#endif
-
-static void
-container_add_child(CamelFolderThreadNode *node, CamelFolderThreadNode *child)
-{
- d(printf("\nAdding child %p to parent %p \n", child, node));
- child->next = node->child;
- node->child = child;
- child->parent = node;
-}
-
-static void
-container_parent_child(CamelFolderThreadNode *parent, CamelFolderThreadNode *child)
-{
- CamelFolderThreadNode *c, *node;
-
- /* are we already the right parent? */
- if (child->parent == parent)
- return;
-
- /* would this create a loop? */
- node = parent->parent;
- while (node) {
- if (node == child)
- return;
- node = node->parent;
- }
-
- /* are we unparented? */
- if (child->parent == NULL) {
- container_add_child(parent, child);
- return;
- }
-
- /* else remove child from its existing parent, and reparent */
- node = child->parent;
- c = (CamelFolderThreadNode *)&node->child;
- d(printf("scanning children:\n"));
- while (c->next) {
- d(printf(" %p\n", c));
- if (c->next==child) {
- d(printf("found node %p\n", child));
- c->next = c->next->next;
- child->parent = NULL;
- container_add_child(parent, child);
- return;
- }
- c = c->next;
- }
-
- printf("DAMN, we shouldn't be here!\n");
-}
-
-static void
-prune_empty(CamelFolderThread *thread, CamelFolderThreadNode **cp)
-{
- CamelFolderThreadNode *child, *next, *c, *lastc;
-
- /* yes, this is intentional */
- lastc = (CamelFolderThreadNode *)cp;
- while (lastc->next) {
- c = lastc->next;
-
- d(printf("checking message %p %p (%08x%08x)\n", c,
- c->message, c->message?c->message->message_id.id.part.hi:0,
- c->message?c->message->message_id.id.part.lo:0));
- if (c->message == NULL) {
- if (c->child == NULL) {
- d(printf("removing empty node\n"));
- lastc->next = c->next;
- e_memchunk_free(thread->node_chunks, c);
- continue;
- }
- if (c->parent || c->child->next==0) {
- d(printf("promoting child\n"));
- lastc->next = c->next; /* remove us */
- child = c->child;
- while (child) {
- next = child->next;
-
- child->parent = c->parent;
- child->next = lastc->next;
- lastc->next = child;
-
- child = next;
- }
- continue;
- }
- }
- prune_empty(thread, &c->child);
- lastc = c;
- }
-}
-
-static void
-hashloop(void *key, void *value, void *data)
-{
- CamelFolderThreadNode *c = value;
- CamelFolderThreadNode *tail = data;
-
- if (c->parent == NULL) {
- c->next = tail->next;
- tail->next = c;
- }
-}
-
-static char *
-get_root_subject(CamelFolderThreadNode *c, int *re)
-{
- char *s, *p;
- CamelFolderThreadNode *scan;
-
- s = NULL;
- *re = FALSE;
- if (c->message)
- s = (char *)camel_message_info_subject(c->message);
- else {
- /* one of the children will always have a message */
- scan = c->child;
- while (scan) {
- if (scan->message) {
- s = (char *)camel_message_info_subject(scan->message);
- break;
- }
- scan = scan->next;
- }
- }
- if (s != NULL) {
- while (*s) {
- while (isspace(*s))
- s++;
- if (s[0] == 0)
- break;
- if ((s[0] == 'r' || s[0]=='R')
- && (s[1] == 'e' || s[1]=='E')) {
- p = s+2;
- while (isdigit(*p) || (ispunct(*p) && (*p != ':')))
- p++;
- if (*p==':') {
- *re = TRUE;
- s = p+1;
- } else
- break;
- } else
- break;
- }
- if (*s)
- return s;
- }
- return NULL;
-}
-
-/* this can be pretty slow, but not used often */
-/* clast cannot be null */
-static void
-remove_node(CamelFolderThreadNode **list, CamelFolderThreadNode *node, CamelFolderThreadNode **clast)
-{
- CamelFolderThreadNode *c;
-
- /* this is intentional, even if it looks funny */
- /* if we have a parent, then we should remove it from the parent list,
- otherwise we remove it from the root list */
- if (node->parent) {
- c = (CamelFolderThreadNode *)&node->parent->child;
- } else {
- c = (CamelFolderThreadNode *)list;
- }
- while (c->next) {
- if (c->next == node) {
- if (*clast == c->next)
- *clast = c;
- c->next = c->next->next;
- return;
- }
- c = c->next;
- }
-
- printf("ERROR: removing node %p failed\n", node);
-}
-
-static void
-group_root_set(CamelFolderThread *thread, CamelFolderThreadNode **cp)
-{
- GHashTable *subject_table = g_hash_table_new(g_str_hash, g_str_equal);
- CamelFolderThreadNode *c, *clast, *scan, *container;
-
- /* gather subject lines */
- d(printf("gathering subject lines\n"));
- clast = (CamelFolderThreadNode *)cp;
- c = clast->next;
- while (c) {
- c->root_subject = get_root_subject(c, &c->re);
- if (c->root_subject) {
- container = g_hash_table_lookup(subject_table, c->root_subject);
- if (container == NULL
- || (container->message == NULL && c->message)
- || (container->re == TRUE && !c->re)) {
- g_hash_table_insert(subject_table, c->root_subject, c);
- }
- }
- c = c->next;
- }
-
- /* merge common subjects? */
- clast = (CamelFolderThreadNode *)cp;
- while (clast->next) {
- c = clast->next;
- d(printf("checking %p %s\n", c, c->root_subject));
- if (c->root_subject
- && (container = g_hash_table_lookup(subject_table, c->root_subject))
- && (container != c)) {
- d(printf(" matching %p %s\n", container, container->root_subject));
- if (c->message == NULL && container->message == NULL) {
- d(printf("merge containers children\n"));
- /* steal the children from c onto container, and unlink c */
- scan = (CamelFolderThreadNode *)&container->child;
- while (scan->next)
- scan = scan->next;
- scan->next = c->child;
- clast->next = c->next;
- e_memchunk_free(thread->node_chunks, c);
- continue;
- } if (c->message == NULL && container->message != NULL) {
- d(printf("container is non-empty parent\n"));
- remove_node(cp, container, &clast);
- container_add_child(c, container);
- } else if (c->message != NULL && container->message == NULL) {
- d(printf("container is empty child\n"));
- clast->next = c->next;
- container_add_child(container, c);
- continue;
- } else if (c->re && !container->re) {
- d(printf("container is re\n"));
- clast->next = c->next;
- container_add_child(container, c);
- continue;
- } else if (!c->re && container->re) {
- d(printf("container is not re\n"));
- remove_node(cp, container, &clast);
- container_add_child(c, container);
- } else if (c->re && container->re) {
- d(printf("subjects are common %p and %p\n", c, container));
-
- /* build a phantom node */
- remove_node(cp, container, &clast);
- remove_node(cp, c, &clast);
-
- scan = e_memchunk_alloc0(thread->node_chunks);
-
- scan->root_subject = c->root_subject;
- scan->re = c->re && container->re;
- scan->next = c->next;
- clast->next = scan;
- container_add_child(scan, c);
- container_add_child(scan, container);
- clast = scan;
- g_hash_table_insert(subject_table, scan->root_subject, scan);
- continue;
- }
- }
- clast = c;
- }
- g_hash_table_destroy(subject_table);
-}
-
-struct _tree_info {
- GHashTable *visited;
-};
-
-static int
-dump_tree_rec(struct _tree_info *info, CamelFolderThreadNode *c, int depth)
-{
- char *p;
- int count=0;
-
- p = alloca(depth*2+1);
- memset(p, ' ', depth*2);
- p[depth*2] = 0;
-
- while (c) {
- if (g_hash_table_lookup(info->visited, c)) {
- printf("WARNING: NODE REVISITED: %p\n", c);
- } else {
- g_hash_table_insert(info->visited, c, c);
- }
- if (c->message) {
- printf("%s %p Subject: %s <%.8s>\n", p, c, camel_message_info_subject(c->message), c->message->message_id.id.hash);
- count += 1;
- } else {
- printf("%s %p <empty>\n", p, c);
- }
- if (c->child)
- count += dump_tree_rec(info, c->child, depth+1);
- c = c->next;
- }
- return count;
-}
-
-int
-camel_folder_threaded_messages_dump(CamelFolderThreadNode *c)
-{
- int count;
- struct _tree_info info;
-
- info.visited = g_hash_table_new(g_direct_hash, g_direct_equal);
- count = dump_tree_rec(&info, c, 0);
- g_hash_table_destroy(info.visited);
- return count;
-}
-
-static int
-sort_node(const void *a, const void *b)
-{
- const CamelFolderThreadNode *a1 = ((CamelFolderThreadNode **)a)[0];
- const CamelFolderThreadNode *b1 = ((CamelFolderThreadNode **)b)[0];
-
- /* if we have no message, it must be a dummy node, which
- also means it must have a child, just use that as the
- sort data (close enough?) */
- if (a1->message == NULL)
- a1 = a1->child;
- if (b1->message == NULL)
- b1 = b1->child;
- if (a1->order == b1->order)
- return 0;
- if (a1->order < b1->order)
- return -1;
- else
- return 1;
-}
-
-static void
-sort_thread(CamelFolderThreadNode **cp)
-{
- CamelFolderThreadNode *c, *head, **carray;
- int size=0;
-
- c = *cp;
- while (c) {
- /* sort the children while we're at it */
- if (c->child)
- sort_thread(&c->child);
- size++;
- c = c->next;
- }
- if (size<2)
- return;
- carray = alloca(size*sizeof(CamelFolderThreadNode *));
- c = *cp;
- size=0;
- while (c) {
- carray[size] = c;
- c = c->next;
- size++;
- }
- qsort(carray, size, sizeof(CamelFolderThreadNode *), sort_node);
- size--;
- head = carray[size];
- head->next = NULL;
- size--;
- do {
- c = carray[size];
- c->next = head;
- head = c;
- size--;
- } while (size>=0);
- *cp = head;
-}
-
-static guint id_hash(void *key)
-{
- CamelSummaryMessageID *id = (CamelSummaryMessageID *)key;
-
- return id->id.part.lo;
-}
-
-static gint id_equal(void *a, void *b)
-{
- return ((CamelSummaryMessageID *)a)->id.id == ((CamelSummaryMessageID *)b)->id.id;
-}
-
-/**
- * camel_folder_thread_messages_new:
- * @folder:
- * @uids: The subset of uid's to thread. If NULL. then thread all
- * uid's in @folder.
- *
- * Thread a (subset) of the messages in a folder. And sort the result
- * in summary order.
- *
- * This function is probably to be removed soon.
- *
- * Return value: A CamelFolderThread contianing a tree of CamelFolderThreadNode's
- * which represent the threaded structure of the messages.
- **/
-CamelFolderThread *
-camel_folder_thread_messages_new(CamelFolder *folder, GPtrArray *uids)
-{
- GHashTable *id_table, *no_id_table;
- int i;
- CamelFolderThreadNode *c, *child, *head;
- CamelFolderThread *thread;
- GHashTable *wanted = NULL;
- GPtrArray *summary;
-
-#ifdef TIMEIT
- struct timeval start, end;
- unsigned long diff;
-
- gettimeofday(&start, NULL);
-#endif
-
- thread = g_malloc(sizeof(*thread));
- thread->tree = NULL;
- thread->node_chunks = e_memchunk_new(32, sizeof(CamelFolderThreadNode));
- thread->folder = folder;
- camel_object_ref((CamelObject *)folder);
-
- /* wanted is the list of what we want, we put it in a hash for quick lookup */
- if (uids) {
- wanted = g_hash_table_new(g_str_hash, g_str_equal);
- for (i=0;i<uids->len;i++)
- g_hash_table_insert(wanted, uids->pdata[i], uids->pdata[i]);
- }
-
- thread->summary = summary = camel_folder_get_summary(folder);
-
- id_table = g_hash_table_new((GHashFunc)id_hash, (GCompareFunc)id_equal);
- no_id_table = g_hash_table_new(NULL, NULL);
- for (i=0;i<summary->len;i++) {
- CamelMessageInfo *mi = summary->pdata[i];
- const char *uid = camel_message_info_uid(mi);
-
- if (wanted && g_hash_table_lookup(wanted, uid) == 0)
- continue;
-
- if (mi->message_id.id.id) {
- c = g_hash_table_lookup(id_table, &mi->message_id);
- /* check for duplicate messages */
- if (c) {
- /* if duplicate, just make out it is a no-id message, but try and insert it
- into the right spot in the tree */
- d(printf("doing: (duplicate message id)\n"));
- c = e_memchunk_alloc0(thread->node_chunks);
- g_hash_table_insert(no_id_table, (void *)mi, c);
- } else {
- d(printf("doing : %08x%08x (%s)\n", mi->message_id.id.part.hi, mi->message_id.id.part.lo, camel_message_info_subject(mi)));
- c = e_memchunk_alloc0(thread->node_chunks);
- g_hash_table_insert(id_table, (void *)&mi->message_id, c);
- }
- } else {
- d(printf("doing : (no message id)\n"));
- c = e_memchunk_alloc0(thread->node_chunks);
- g_hash_table_insert(no_id_table, (void *)mi, c);
- }
-
- c->message = mi;
- c->order = i;
- child = c;
- if (mi->references) {
- int j;
-
- d(printf("references:\n"));
- for (j=0;j<mi->references->size;j++) {
- /* should never be empty, but just incase */
- if (mi->references->references[j].id.id == 0)
- continue;
-
- c = g_hash_table_lookup(id_table, &mi->references->references[j]);
- if (c == NULL) {
- d(printf("not found\n"));
- c = e_memchunk_alloc0(thread->node_chunks);
- g_hash_table_insert(id_table, &mi->references->references[j], c);
- }
- if (c!=child)
- container_parent_child(c, child);
- child = c;
- }
- }
- }
-
- d(printf("\n\n"));
- /* build a list of root messages (no parent) */
- head = NULL;
- g_hash_table_foreach(id_table, hashloop, &head);
- g_hash_table_foreach(no_id_table, hashloop, &head);
-
- g_hash_table_destroy(id_table);
- g_hash_table_destroy(no_id_table);
-
- /* remove empty parent nodes */
- prune_empty(thread, &head);
-
- /* find any siblings which missed out */
- group_root_set(thread, &head);
-
-#if 0
- printf("finished\n");
- i = camel_folder_thread_messages_dump(head);
- printf("%d count, %d items in tree\n", uids->len, i);
-#endif
-
- sort_thread(&head);
-
- /* remove any phantom nodes, this could possibly be put in group_root_set()? */
- c = (CamelFolderThreadNode *)&head;
- while (c && c->next) {
- CamelFolderThreadNode *scan, *newtop;
-
- child = c->next;
- if (child->message == NULL) {
- newtop = child->child;
- /* unlink pseudo node */
- c->next = newtop;
-
- /* link its siblings onto the end of its children */
- scan = (CamelFolderThreadNode *)&newtop->child;
- while (scan->next)
- scan = scan->next;
- scan->next = newtop->next;
- /* and link the now 'real' node into the list */
- newtop->next = child->next;
- c = newtop;
- e_memchunk_free(thread->node_chunks, child);
- } else {
- c = child;
- }
- }
-
- /* this is only debug assertion stuff */
- c = (CamelFolderThreadNode *)&head;
- while (c->next) {
- c = c->next;
- if (c->message == NULL)
- g_warning("threading missed removing a pseudo node: %s\n", c->root_subject);
- }
-
- thread->tree = head;
-
-#ifdef TIMEIT
- gettimeofday(&end, NULL);
- diff = end.tv_sec * 1000 + end.tv_usec/1000;
- diff -= start.tv_sec * 1000 + start.tv_usec/1000;
- printf("Message threading %d messages took %ld.%03ld seconds\n",
- uids->len, diff / 1000, diff % 1000);
-#endif
-
- return thread;
-}
-
-/**
- * camel_folder_thread_messages_new_summary:
- * @summary: Array of CamelMessageInfo's to thread.
- *
- * Thread a list of MessageInfo's. The summary must remain valid for the
- * life of the CamelFolderThread created by this function, and it is upto the
- * caller to ensure this.
- *
- * Return value: A CamelFolderThread contianing a tree of CamelFolderThreadNode's
- * which represent the threaded structure of the messages.
- **/
-CamelFolderThread *
-camel_folder_thread_messages_new_summary(GPtrArray *summary)
-{
- GHashTable *id_table, *no_id_table;
- int i;
- CamelFolderThreadNode *c, *child, *head;
- CamelFolderThread *thread;
-
-#ifdef TIMEIT
- struct timeval start, end;
- unsigned long diff;
-
- gettimeofday(&start, NULL);
-#endif
-
- thread = g_malloc(sizeof(*thread));
- thread->tree = NULL;
- thread->node_chunks = e_memchunk_new(32, sizeof(CamelFolderThreadNode));
- thread->folder = NULL;
- thread->summary = NULL;
-
- id_table = g_hash_table_new((GHashFunc)id_hash, (GCompareFunc)id_equal);
- no_id_table = g_hash_table_new(NULL, NULL);
- for (i=0;i<summary->len;i++) {
- CamelMessageInfo *mi = summary->pdata[i];
-
- if (mi->message_id.id.id) {
- c = g_hash_table_lookup(id_table, &mi->message_id);
- /* check for duplicate messages */
- if (c) {
- /* if duplicate, just make out it is a no-id message, but try and insert it
- into the right spot in the tree */
- d(printf("doing: (duplicate message id)\n"));
- c = e_memchunk_alloc0(thread->node_chunks);
- g_hash_table_insert(no_id_table, (void *)mi, c);
- } else {
- d(printf("doing : %08x%08x (%s)\n", mi->message_id.id.part.hi, mi->message_id.id.part.lo, camel_message_info_subject(mi)));
- c = e_memchunk_alloc0(thread->node_chunks);
- g_hash_table_insert(id_table, (void *)&mi->message_id, c);
- }
- } else {
- d(printf("doing : (no message id)\n"));
- c = e_memchunk_alloc0(thread->node_chunks);
- g_hash_table_insert(no_id_table, (void *)mi, c);
- }
-
- c->message = mi;
- c->order = i;
- child = c;
- if (mi->references) {
- int j;
-
- d(printf("references:\n"));
- for (j=0;j<mi->references->size;j++) {
- /* should never be empty, but just incase */
- if (mi->references->references[j].id.id == 0)
- continue;
-
- c = g_hash_table_lookup(id_table, &mi->references->references[j]);
- if (c == NULL) {
- d(printf("not found\n"));
- c = e_memchunk_alloc0(thread->node_chunks);
- g_hash_table_insert(id_table, &mi->references->references[j], c);
- }
- if (c!=child)
- container_parent_child(c, child);
- child = c;
- }
- }
- }
-
- d(printf("\n\n"));
- /* build a list of root messages (no parent) */
- head = NULL;
- g_hash_table_foreach(id_table, hashloop, &head);
- g_hash_table_foreach(no_id_table, hashloop, &head);
-
- g_hash_table_destroy(id_table);
- g_hash_table_destroy(no_id_table);
-
- /* remove empty parent nodes */
- prune_empty(thread, &head);
-
- /* find any siblings which missed out */
- group_root_set(thread, &head);
-
-#if 0
- printf("finished\n");
- i = camel_folder_thread_messages_dump(head);
- printf("%d count, %d items in tree\n", uids->len, i);
-#endif
-
- sort_thread(&head);
-
- /* remove any phantom nodes, this could possibly be put in group_root_set()? */
- c = (CamelFolderThreadNode *)&head;
- while (c && c->next) {
- CamelFolderThreadNode *scan, *newtop;
-
- child = c->next;
- if (child->message == NULL) {
- newtop = child->child;
- /* unlink pseudo node */
- c->next = newtop;
-
- /* link its siblings onto the end of its children */
- scan = (CamelFolderThreadNode *)&newtop->child;
- while (scan->next)
- scan = scan->next;
- scan->next = newtop->next;
- /* and link the now 'real' node into the list */
- newtop->next = child->next;
- c = newtop;
- e_memchunk_free(thread->node_chunks, child);
- } else {
- c = child;
- }
- }
-
- /* this is only debug assertion stuff */
- c = (CamelFolderThreadNode *)&head;
- while (c->next) {
- c = c->next;
- if (c->message == NULL)
- g_warning("threading missed removing a pseudo node: %s\n", c->root_subject);
- }
-
- thread->tree = head;
-
-#ifdef TIMEIT
- gettimeofday(&end, NULL);
- diff = end.tv_sec * 1000 + end.tv_usec/1000;
- diff -= start.tv_sec * 1000 + start.tv_usec/1000;
- printf("Message threading %d messages took %ld.%03ld seconds\n",
- summary->len, diff / 1000, diff % 1000);
-#endif
-
- return thread;
-}
-
-/**
- * camel_folder_thread_messages_destroy:
- * @thread:
- *
- * Free all memory associated with the thread descriptor @thread.
- **/
-void
-camel_folder_thread_messages_destroy(CamelFolderThread *thread)
-{
- if (thread->folder) {
- camel_folder_free_summary(thread->folder, thread->summary);
- camel_object_unref((CamelObject *)thread->folder);
- }
- e_memchunk_destroy(thread->node_chunks);
- g_free(thread);
-}
-
-#if 0
-/* intended for incremental update. Not implemented yet as, well, its probbaly
- not worth it (memory overhead vs speed, may as well just rethread the whole
- lot?)
-
- But it might be implemented at a later date.
-*/
-void
-camel_folder_thread_messages_add(CamelFolderThread *thread, CamelFolder *folder, GPtrArray *uids)
-{
-
-}
-
-void
-thread_messages_remove(CamelFolderThread *thread, CamelFolder *folder, GPtrArray *uids)
-{
-
-}
-#endif
diff --git a/camel/camel-folder-thread.h b/camel/camel-folder-thread.h
deleted file mode 100644
index d75fc35c54..0000000000
--- a/camel/camel-folder-thread.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (C) 2000 Helix Code Inc.
- *
- * Authors: Michael Zucchi <notzed@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_THREAD_H
-#define _CAMEL_FOLDER_THREAD_H
-
-#include <camel/camel-folder-summary.h>
-#include <camel/camel-folder.h>
-
-typedef struct _CamelFolderThreadNode {
- struct _CamelFolderThreadNode *next,
- *parent,
- *child;
- const CamelMessageInfo *message;
- char *root_subject; /* cached root equivalent subject */
- int re; /* re version of subject? */
- int order;
-} CamelFolderThreadNode;
-
-typedef struct CamelFolderThread {
- struct _CamelFolderThreadNode *tree;
- struct _EMemChunk *node_chunks;
- CamelFolder *folder;
- GPtrArray *summary;
-} CamelFolderThread;
-
-CamelFolderThread *camel_folder_thread_messages_new(CamelFolder *folder, GPtrArray *uids);
-
-/* new improved interface (believe it or not!) */
-CamelFolderThread *camel_folder_thread_messages_new_summary(GPtrArray *summary);
-/*
-void camel_folder_thread_messages_add(CamelFolderThread *threads, CamelFolder *folder, GPtrArray *uids);
-void camel_folder_thread_messages_remove(CamelFolderThread *threads, CamelFolder *folder, GPtrArray *uids);
-*/
-void camel_folder_thread_messages_destroy(CamelFolderThread *threads);
-
-/* debugging function only */
-int camel_folder_threaded_messages_dump(CamelFolderThreadNode *c);
-
-#endif /* !_CAMEL_FOLDER_THREAD_H */
diff --git a/camel/camel-folder.c b/camel/camel-folder.c
deleted file mode 100644
index 310bd084aa..0000000000
--- a/camel/camel-folder.c
+++ /dev/null
@@ -1,1741 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-folder.c: Abstract class for an email folder */
-
-/*
- * Author:
- * Bertrand Guiheneuf <bertrand@helixcode.com>
- *
- * 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <string.h>
-#include <camel/camel-folder.h>
-#include <camel/camel-exception.h>
-#include "camel-store.h"
-#include "camel-mime-message.h"
-#include "string-utils.h"
-#include "e-util/e-memory.h"
-
-#include "camel-private.h"
-
-#define d(x)
-
-static CamelObjectClass *parent_class = NULL;
-
-/* Returns the class for a CamelFolder */
-#define CF_CLASS(so) CAMEL_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-
-static void camel_folder_finalize (CamelObject *object);
-
-static void refresh_info (CamelFolder *folder, CamelException *ex);
-
-static void folder_sync (CamelFolder *folder, gboolean expunge,
- CamelException *ex);
-
-static const gchar *get_name (CamelFolder *folder);
-static const gchar *get_full_name (CamelFolder *folder);
-static CamelStore *get_parent_store (CamelFolder *folder);
-
-static guint32 get_permanent_flags (CamelFolder *folder);
-static guint32 get_message_flags (CamelFolder *folder, const char *uid);
-static void set_message_flags (CamelFolder *folder, const char *uid,
- guint32 flags, guint32 set);
-static gboolean get_message_user_flag (CamelFolder *folder, const char *uid, const char *name);
-static void set_message_user_flag (CamelFolder *folder, const char *uid,
- const char *name, gboolean value);
-static const char *get_message_user_tag(CamelFolder *folder, const char *uid, const char *name);
-static void set_message_user_tag(CamelFolder *folder, const char *uid, const char *name, const char *value);
-
-static gint get_message_count (CamelFolder *folder);
-static gint get_unread_message_count (CamelFolder *folder);
-
-static void expunge (CamelFolder *folder,
- CamelException *ex);
-
-
-static void append_message (CamelFolder *folder, CamelMimeMessage *message,
- const CamelMessageInfo *info, CamelException *ex);
-
-
-static GPtrArray *get_uids (CamelFolder *folder);
-static void free_uids (CamelFolder *folder,
- GPtrArray *array);
-static GPtrArray *get_summary (CamelFolder *folder);
-static void free_summary (CamelFolder *folder,
- GPtrArray *array);
-
-static CamelMimeMessage *get_message (CamelFolder *folder,
- const gchar *uid,
- CamelException *ex);
-
-static CamelMessageInfo *get_message_info (CamelFolder *folder, const char *uid);
-static void free_message_info (CamelFolder *folder, CamelMessageInfo *info);
-static void ref_message_info (CamelFolder *folder, CamelMessageInfo *info);
-
-static GPtrArray *search_by_expression (CamelFolder *folder,
- const char *exp,
- CamelException *ex);
-static void search_free (CamelFolder * folder,
- GPtrArray * result);
-
-static void copy_messages_to (CamelFolder *source,
- GPtrArray *uids,
- CamelFolder *dest,
- CamelException *ex);
-
-static void move_messages_to (CamelFolder *source,
- GPtrArray *uids,
- CamelFolder *dest,
- CamelException *ex);
-
-static void freeze (CamelFolder *folder);
-static void thaw (CamelFolder *folder);
-
-static gboolean folder_changed (CamelObject *object,
- gpointer event_data);
-static gboolean message_changed (CamelObject *object,
- /*const char *uid*/gpointer event_data);
-
-static void
-camel_folder_class_init (CamelFolderClass *camel_folder_class)
-{
- CamelObjectClass *camel_object_class =
- CAMEL_OBJECT_CLASS (camel_folder_class);
-
- parent_class = camel_type_get_global_classfuncs (camel_object_get_type ());
-
- /* virtual method definition */
- camel_folder_class->sync = folder_sync;
- camel_folder_class->refresh_info = refresh_info;
- camel_folder_class->get_name = get_name;
- camel_folder_class->get_full_name = get_full_name;
- camel_folder_class->get_parent_store = get_parent_store;
- camel_folder_class->expunge = expunge;
- camel_folder_class->get_message_count = get_message_count;
- camel_folder_class->get_unread_message_count = get_unread_message_count;
- camel_folder_class->append_message = append_message;
- camel_folder_class->get_permanent_flags = get_permanent_flags;
- camel_folder_class->get_message_flags = get_message_flags;
- camel_folder_class->set_message_flags = set_message_flags;
- camel_folder_class->get_message_user_flag = get_message_user_flag;
- camel_folder_class->set_message_user_flag = set_message_user_flag;
- camel_folder_class->get_message_user_tag = get_message_user_tag;
- camel_folder_class->set_message_user_tag = set_message_user_tag;
- camel_folder_class->get_message = get_message;
- 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->search_free = search_free;
- camel_folder_class->get_message_info = get_message_info;
- camel_folder_class->ref_message_info = ref_message_info;
- camel_folder_class->free_message_info = free_message_info;
- camel_folder_class->copy_messages_to = copy_messages_to;
- camel_folder_class->move_messages_to = move_messages_to;
- camel_folder_class->freeze = freeze;
- camel_folder_class->thaw = thaw;
-
- /* virtual method overload */
- camel_object_class_declare_event (camel_object_class,
- "folder_changed", folder_changed);
- camel_object_class_declare_event (camel_object_class,
- "message_changed", message_changed);
-}
-
-static void
-camel_folder_init (gpointer object, gpointer klass)
-{
- CamelFolder *folder = object;
-
- folder->priv = g_malloc0(sizeof(*folder->priv));
- folder->priv->frozen = 0;
- folder->priv->changed_frozen = camel_folder_change_info_new();
-#ifdef ENABLE_THREADS
- folder->priv->lock = g_mutex_new();
- folder->priv->change_lock = g_mutex_new();
-#endif
-}
-
-static void
-camel_folder_finalize (CamelObject *object)
-{
- CamelFolder *camel_folder = CAMEL_FOLDER (object);
-
- g_free (camel_folder->name);
- g_free (camel_folder->full_name);
-
- if (camel_folder->parent_store)
- camel_object_unref (CAMEL_OBJECT (camel_folder->parent_store));
-
- if (camel_folder->summary)
- camel_object_unref((CamelObject *)camel_folder->summary);
-
- camel_folder_change_info_free(camel_folder->priv->changed_frozen);
-#ifdef ENABLE_THREADS
- g_mutex_free(camel_folder->priv->lock);
- g_mutex_free(camel_folder->priv->change_lock);
-#endif
- g_free(camel_folder->priv);
-}
-
-CamelType
-camel_folder_get_type (void)
-{
- static CamelType camel_folder_type = CAMEL_INVALID_TYPE;
-
- if (camel_folder_type == CAMEL_INVALID_TYPE) {
- camel_folder_type = camel_type_register (CAMEL_OBJECT_TYPE, "CamelFolder",
- sizeof (CamelFolder),
- sizeof (CamelFolderClass),
- (CamelObjectClassInitFunc) camel_folder_class_init,
- NULL,
- (CamelObjectInitFunc) camel_folder_init,
- (CamelObjectFinalizeFunc) camel_folder_finalize );
- }
-
- return camel_folder_type;
-}
-
-
-/**
- * camel_folder_construct:
- * @folder: folder object to construct
- * @parent_store: parent store object of the folder
- * @full_name: full name of the folder
- * @name: short name of the folder
- *
- * Initalizes the folder by setting the parent store and name.
- **/
-void
-camel_folder_construct (CamelFolder *folder, CamelStore *parent_store,
- const char *full_name, const char *name)
-{
- g_return_if_fail (CAMEL_IS_FOLDER (folder));
- g_return_if_fail (CAMEL_IS_STORE (parent_store));
- g_return_if_fail (folder->parent_store == NULL);
- g_return_if_fail (folder->name == NULL);
-
- folder->parent_store = parent_store;
- camel_object_ref (CAMEL_OBJECT (parent_store));
-
- folder->name = g_strdup (name);
- folder->full_name = g_strdup (full_name);
-}
-
-
-static void
-folder_sync (CamelFolder *folder, gboolean expunge, CamelException *ex)
-{
- g_warning ("CamelFolder::sync not implemented for `%s'",
- camel_type_to_name (CAMEL_OBJECT_GET_TYPE (folder)));
-}
-
-/**
- * camel_folder_sync:
- * @folder: The folder object
- * @expunge: whether or not to expunge deleted messages
- * @ex: exception object
- *
- * Sync changes made to a folder to its backing store, possibly expunging
- * deleted messages as well.
- **/
-void
-camel_folder_sync (CamelFolder *folder, gboolean expunge, CamelException *ex)
-{
- g_return_if_fail (CAMEL_IS_FOLDER (folder));
-
- CAMEL_FOLDER_LOCK(folder, lock);
-
- CF_CLASS (folder)->sync (folder, expunge, ex);
-
- CAMEL_FOLDER_UNLOCK(folder, lock);
-}
-
-
-static void
-refresh_info (CamelFolder *folder, CamelException *ex)
-{
- /* No op */
-}
-
-/**
- * camel_folder_refresh_info:
- * @folder: The folder object
- * @ex: exception object
- *
- * Updates a folder's summary to be in sync with its backing store.
- **/
-void
-camel_folder_refresh_info (CamelFolder *folder, CamelException *ex)
-{
- g_return_if_fail (CAMEL_IS_FOLDER (folder));
-
- CAMEL_FOLDER_LOCK(folder, lock);
-
- CF_CLASS (folder)->refresh_info (folder, ex);
-
- CAMEL_FOLDER_UNLOCK(folder, lock);
-}
-
-
-static const char *
-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 char *
-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 char *
-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 char *
-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 CamelStore *
-get_parent_store (CamelFolder * folder)
-{
- return folder->parent_store;
-}
-
-/**
- * camel_folder_get_parent_store:
- * @folder: folder to get the parent of
- *
- * Return value: the parent store of the folder.
- **/
-CamelStore *
-camel_folder_get_parent_store (CamelFolder *folder)
-{
- g_return_val_if_fail (CAMEL_IS_FOLDER (folder), NULL);
-
- return CF_CLASS (folder)->get_parent_store (folder);
-}
-
-
-static void
-expunge (CamelFolder *folder, CamelException *ex)
-{
- g_warning ("CamelFolder::expunge not implemented for `%s'",
- camel_type_to_name (CAMEL_OBJECT_GET_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));
-
- CAMEL_FOLDER_LOCK(folder, lock);
-
- CF_CLASS (folder)->expunge (folder, ex);
-
- CAMEL_FOLDER_UNLOCK(folder, lock);
-}
-
-static int
-get_message_count (CamelFolder *folder)
-{
- g_return_val_if_fail(folder->summary != NULL, -1);
-
- return camel_folder_summary_count(folder->summary);
-}
-
-/**
- * camel_folder_get_message_count:
- * @folder: A CamelFolder object
- *
- * Return value: the number of messages in the folder, or -1 if unknown.
- **/
-int
-camel_folder_get_message_count (CamelFolder *folder)
-{
- int ret;
-
- g_return_val_if_fail (CAMEL_IS_FOLDER (folder), -1);
-
- ret = CF_CLASS (folder)->get_message_count (folder);
-
- return ret;
-}
-
-static int
-get_unread_message_count(CamelFolder *folder)
-{
- int i, count, unread=0;
-
- g_return_val_if_fail(folder->summary != NULL, -1);
-
- count = camel_folder_summary_count(folder->summary);
- for (i=0; i<count; i++) {
- CamelMessageInfo *info = camel_folder_summary_index(folder->summary, i);
-
- if (info && !(info->flags & CAMEL_MESSAGE_SEEN))
- unread++;
-
- camel_folder_summary_info_free(folder->summary, info);
- }
-
- return unread;
-}
-
-/**
- * camel_folder_unread_get_message_count:
- * @folder: A CamelFolder object
- *
- * Return value: the number of unread messages in the folder, or -1 if unknown.
- **/
-int
-camel_folder_get_unread_message_count (CamelFolder *folder)
-{
- int ret;
-
- g_return_val_if_fail (CAMEL_IS_FOLDER (folder), -1);
-
- ret = CF_CLASS (folder)->get_unread_message_count (folder);
-
- return ret;
-}
-
-static void
-append_message (CamelFolder *folder, CamelMimeMessage *message,
- const CamelMessageInfo *info, CamelException *ex)
-{
- g_warning ("CamelFolder::append_message not implemented for `%s'",
- camel_type_to_name (CAMEL_OBJECT_GET_TYPE (folder)));
- return;
-
-}
-
-/**
- * camel_folder_append_message: add a message to a folder
- * @folder: folder object to add the message to
- * @message: message object
- * @info: message info with additional flags/etc to set on
- * new message, or %NULL
- * @ex: exception object
- *
- * Add a message to a folder. Only the flag and tag data from @info
- * is used. If @info is %NULL, no flags or tags will be set.
- **/
-void
-camel_folder_append_message (CamelFolder *folder, CamelMimeMessage *message,
- const CamelMessageInfo *info, CamelException *ex)
-{
- g_return_if_fail (CAMEL_IS_FOLDER (folder));
-
- CAMEL_FOLDER_LOCK(folder, lock);
-
- CF_CLASS (folder)->append_message (folder, message, info, ex);
-
- CAMEL_FOLDER_UNLOCK(folder, lock);
-}
-
-
-static guint32
-get_permanent_flags (CamelFolder *folder)
-{
- return folder->permanent_flags;
-}
-
-/**
- * camel_folder_get_permanent_flags:
- * @folder: a CamelFolder
- *
- * Return value: the set of CamelMessageFlags that can be permanently
- * stored on a message between sessions. If it includes %CAMEL_FLAG_USER,
- * then user-defined flags will be remembered.
- **/
-guint32
-camel_folder_get_permanent_flags (CamelFolder *folder)
-{
- g_return_val_if_fail (CAMEL_IS_FOLDER (folder), 0);
-
- return CF_CLASS (folder)->get_permanent_flags (folder);
-}
-
-static guint32
-get_message_flags(CamelFolder *folder, const char *uid)
-{
- CamelMessageInfo *info;
- guint32 flags;
-
- g_return_val_if_fail(folder->summary != NULL, 0);
-
- info = camel_folder_summary_uid(folder->summary, uid);
- g_return_val_if_fail(info != NULL, 0);
-
- flags = info->flags;
- camel_folder_summary_info_free(folder->summary, info);
-
- return flags;
-}
-
-/**
- * camel_folder_get_message_flags:
- * @folder: a CamelFolder
- * @uid: the UID of a message in @folder
- *
- * Return value: the CamelMessageFlags that are set on the indicated
- * message.
- **/
-guint32
-camel_folder_get_message_flags (CamelFolder *folder, const char *uid)
-{
- guint32 ret;
-
- g_return_val_if_fail (CAMEL_IS_FOLDER (folder), 0);
-
- ret = CF_CLASS (folder)->get_message_flags (folder, uid);
-
- return ret;
-}
-
-static void
-set_message_flags(CamelFolder *folder, const char *uid, guint32 flags, guint32 set)
-{
- CamelMessageInfo *info;
- guint32 new;
-
- g_return_if_fail(folder->summary != NULL);
-
- info = camel_folder_summary_uid(folder->summary, uid);
- g_return_if_fail(info != NULL);
-
- new = (info->flags & ~flags) | (set & flags);
- if (new == info->flags) {
- camel_folder_summary_info_free(folder->summary, info);
- return;
- }
-
- info->flags = new | CAMEL_MESSAGE_FOLDER_FLAGGED;
- camel_folder_summary_touch(folder->summary);
- camel_folder_summary_info_free(folder->summary, info);
-
- camel_object_trigger_event(CAMEL_OBJECT(folder), "message_changed", (char *) uid);
-}
-
-/**
- * camel_folder_set_message_flags:
- * @folder: a CamelFolder
- * @uid: the UID of a message in @folder
- * @flags: a set of CamelMessageFlag values to set
- * @set: the mask of values in @flags to use.
- *
- * Sets those flags specified by @set to the values specified by @flags
- * on the indicated message. (This may or may not persist after the
- * folder or store is closed. See camel_folder_get_permanent_flags().)
- **/
-void
-camel_folder_set_message_flags (CamelFolder *folder, const char *uid,
- guint32 flags, guint32 set)
-{
- g_return_if_fail (CAMEL_IS_FOLDER (folder));
-
- CF_CLASS (folder)->set_message_flags (folder, uid, flags, set);
-}
-
-
-static gboolean
-get_message_user_flag(CamelFolder *folder, const char *uid, const char *name)
-{
- CamelMessageInfo *info;
- gboolean ret;
-
- g_return_val_if_fail(folder->summary != NULL, FALSE);
-
- info = camel_folder_summary_uid(folder->summary, uid);
- g_return_val_if_fail(info != NULL, FALSE);
-
- ret = camel_flag_get(&info->user_flags, name);
- camel_folder_summary_info_free(folder->summary, info);
-
- return ret;
-}
-
-/**
- * camel_folder_get_message_user_flag:
- * @folder: a CamelFolder
- * @uid: the UID of a message in @folder
- * @name: the name of a user flag
- *
- * Return value: whether or not the given user flag is set on the message.
- **/
-gboolean
-camel_folder_get_message_user_flag (CamelFolder *folder, const char *uid,
- const char *name)
-{
- gboolean ret;
-
- g_return_val_if_fail (CAMEL_IS_FOLDER (folder), 0);
-
- ret = CF_CLASS (folder)->get_message_user_flag (folder, uid, name);
-
- return ret;
-}
-
-static void
-set_message_user_flag(CamelFolder *folder, const char *uid, const char *name, gboolean value)
-{
- CamelMessageInfo *info;
-
- g_return_if_fail(folder->summary != NULL);
-
- info = camel_folder_summary_uid(folder->summary, uid);
- g_return_if_fail(info != NULL);
-
- if (camel_flag_set(&info->user_flags, name, value)) {
- info->flags |= CAMEL_MESSAGE_FOLDER_FLAGGED;
- camel_folder_summary_touch(folder->summary);
- camel_object_trigger_event(CAMEL_OBJECT(folder), "message_changed", (char *) uid);
- }
- camel_folder_summary_info_free(folder->summary, info);
-}
-
-/**
- * camel_folder_set_message_user_flag:
- * @folder: a CamelFolder
- * @uid: the UID of a message in @folder
- * @name: the name of the user flag to set
- * @value: the value to set it to
- *
- * Sets the user flag specified by @name to the value specified by @value
- * on the indicated message. (This may or may not persist after the
- * folder or store is closed. See camel_folder_get_permanent_flags().)
- **/
-void
-camel_folder_set_message_user_flag (CamelFolder *folder, const char *uid,
- const char *name, gboolean value)
-{
- g_return_if_fail (CAMEL_IS_FOLDER (folder));
-
- CF_CLASS (folder)->set_message_user_flag (folder, uid, name, value);
-}
-
-static const char *
-get_message_user_tag(CamelFolder *folder, const char *uid, const char *name)
-{
- CamelMessageInfo *info;
- const char *ret;
-
- g_return_val_if_fail(folder->summary != NULL, NULL);
-
- info = camel_folder_summary_uid(folder->summary, uid);
- g_return_val_if_fail(info != NULL, FALSE);
-
-#warning "Need to duplicate tag string"
-
- ret = camel_tag_get(&info->user_tags, name);
- camel_folder_summary_info_free(folder->summary, info);
-
- return ret;
-}
-
-/**
- * camel_folder_get_message_user_tag:
- * @folder: a CamelFolder
- * @uid: the UID of a message in @folder
- * @name: the name of a user tag
- *
- * Return value: Returns the value of the user tag.
- **/
-const char *
-camel_folder_get_message_user_tag (CamelFolder *folder, const char *uid, const char *name)
-{
- const char *ret;
-
- g_return_val_if_fail (CAMEL_IS_FOLDER (folder), 0);
-
-#warning "get_message_user_tag() needs to copy the tag contents"
- ret = CF_CLASS (folder)->get_message_user_tag (folder, uid, name);
-
- return ret;
-}
-
-static void
-set_message_user_tag(CamelFolder *folder, const char *uid, const char *name, const char *value)
-{
- CamelMessageInfo *info;
-
- g_return_if_fail(folder->summary != NULL);
-
- info = camel_folder_summary_uid(folder->summary, uid);
- g_return_if_fail(info != NULL);
-
- if (camel_tag_set(&info->user_tags, name, value)) {
- info->flags |= CAMEL_MESSAGE_FOLDER_FLAGGED;
- camel_folder_summary_touch(folder->summary);
- camel_object_trigger_event(CAMEL_OBJECT(folder), "message_changed", (char *) uid);
- }
- camel_folder_summary_info_free(folder->summary, info);
-}
-
-/**
- * camel_folder_set_message_user_tag:
- * @folder: a CamelFolder
- * @uid: the UID of a message in @folder
- * @name: the name of the user tag to set
- * @value: the value to set it to
- *
- * Sets the user tag specified by @name to the value specified by @value
- * on the indicated message. (This may or may not persist after the
- * folder or store is closed. See camel_folder_get_permanent_flags().)
- **/
-void
-camel_folder_set_message_user_tag (CamelFolder *folder, const char *uid, const char *name, const char *value)
-{
- g_return_if_fail (CAMEL_IS_FOLDER (folder));
-
- CF_CLASS (folder)->set_message_user_tag (folder, uid, name, value);
-}
-
-static CamelMessageInfo *
-get_message_info (CamelFolder *folder, const char *uid)
-{
- g_return_val_if_fail(folder->summary != NULL, NULL);
-
- return camel_folder_summary_uid(folder->summary, uid);
-}
-
-/**
- * camel_folder_get_message_info:
- * @folder: a CamelFolder
- * @uid: the uid of a message
- *
- * Retrieve the CamelMessageInfo for the specified @uid. This return
- * must be freed using free_message_info().
- *
- * Return value: the summary information for the indicated message, or NULL
- * if the uid does not exist.
- **/
-CamelMessageInfo *
-camel_folder_get_message_info (CamelFolder *folder, const char *uid)
-{
- CamelMessageInfo *ret;
-
- g_return_val_if_fail (CAMEL_IS_FOLDER (folder), NULL);
- g_return_val_if_fail (uid != NULL, NULL);
-
- ret = CF_CLASS (folder)->get_message_info (folder, uid);
-
- return ret;
-}
-
-static void
-free_message_info (CamelFolder *folder, CamelMessageInfo *info)
-{
- g_return_if_fail(folder->summary != NULL);
-
- camel_folder_summary_info_free(folder->summary, info);
-}
-
-/**
- * camel_folder_free_message_info:
- * @folder:
- * @info:
- *
- * Free (unref) a CamelMessageInfo, previously obtained with get_message_info().
- **/
-void
-camel_folder_free_message_info(CamelFolder *folder, CamelMessageInfo *info)
-{
- g_return_if_fail(CAMEL_IS_FOLDER (folder));
- g_return_if_fail(info != NULL);
-
- CF_CLASS (folder)->free_message_info(folder, info);
-}
-
-static void
-ref_message_info (CamelFolder *folder, CamelMessageInfo *info)
-{
- g_return_if_fail(folder->summary != NULL);
-
- camel_folder_summary_info_ref(folder->summary, info);
-}
-
-/**
- * camel_folder_ref_message_info:
- * @folder:
- * @info:
- *
- * Ref a CamelMessageInfo, previously obtained with get_message_info().
- **/
-void
-camel_folder_ref_message_info(CamelFolder *folder, CamelMessageInfo *info)
-{
- g_return_if_fail(CAMEL_IS_FOLDER (folder));
- g_return_if_fail(info != NULL);
-
- CF_CLASS (folder)->ref_message_info(folder, info);
-}
-
-/* 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 CamelMimeMessage *
-get_message (CamelFolder *folder, const gchar *uid, CamelException *ex)
-{
- g_warning ("CamelFolder::get_message not implemented for `%s'",
- camel_type_to_name (CAMEL_OBJECT_GET_TYPE (folder)));
- return NULL;
-}
-
-/**
- * camel_folder_get_message:
- * @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 (CamelFolder *folder, const gchar *uid, CamelException *ex)
-{
- CamelMimeMessage *ret;
-
- g_return_val_if_fail (CAMEL_IS_FOLDER (folder), NULL);
-
- CAMEL_FOLDER_LOCK(folder, lock);
-
- ret = CF_CLASS (folder)->get_message (folder, uid, ex);
-
- CAMEL_FOLDER_UNLOCK(folder, lock);
-
- return ret;
-}
-
-static GPtrArray *
-get_uids(CamelFolder *folder)
-{
- GPtrArray *array;
- int i, count;
-
- array = g_ptr_array_new();
-
- g_return_val_if_fail(folder->summary != NULL, array);
-
- count = camel_folder_summary_count(folder->summary);
- g_ptr_array_set_size(array, count);
- for (i=0; i<count; i++) {
- CamelMessageInfo *info = camel_folder_summary_index(folder->summary, i);
-
- if (info) {
- array->pdata[i] = g_strdup(camel_message_info_uid(info));
- camel_folder_summary_info_free(folder->summary, info);
- } else {
- array->pdata[i] = g_strdup("xx unknown uid xx");
- }
- }
-
- return array;
-}
-
-/**
- * camel_folder_get_uids:
- * @folder: folder object
- *
- * 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)
-{
- GPtrArray *ret;
-
- g_return_val_if_fail (CAMEL_IS_FOLDER (folder), NULL);
-
- ret = CF_CLASS (folder)->get_uids (folder);
-
- return ret;
-}
-
-static void
-free_uids (CamelFolder *folder, GPtrArray *array)
-{
- int i;
-
- 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));
-
- CF_CLASS (folder)->free_uids (folder, array);
-}
-
-static GPtrArray *
-get_summary(CamelFolder *folder)
-{
- g_assert(folder->summary != NULL);
-
- return camel_folder_summary_array(folder->summary);
-}
-
-/**
- * camel_folder_get_summary:
- * @folder: a folder object
- *
- * 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)
-{
- GPtrArray *ret;
-
- g_return_val_if_fail (CAMEL_IS_FOLDER (folder), NULL);
-
- ret = CF_CLASS (folder)->get_summary (folder);
-
- return ret;
-}
-
-static void
-free_summary(CamelFolder *folder, GPtrArray *summary)
-{
- g_assert(folder->summary != NULL);
-
- camel_folder_summary_array_free(folder->summary, summary);
-}
-
-/**
- * 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));
-
- 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 GPtrArray *
-search_by_expression (CamelFolder *folder, const char *expression,
- CamelException *ex)
-{
- g_warning ("CamelFolder::search_by_expression not implemented for "
- "`%s'", camel_type_to_name (CAMEL_OBJECT_GET_TYPE (folder)));
- return NULL;
-}
-
-/**
- * camel_folder_search_by_expression:
- * @folder: Folder object
- * @expression: a search expression
- * @ex: a CamelException
- *
- * Searches the folder for messages matching the given search expression.
- *
- * Return value: a list of uids of matching messages. The caller must
- * free the list and each of the elements when it is done.
- **/
-GPtrArray *
-camel_folder_search_by_expression (CamelFolder *folder, const char *expression,
- CamelException *ex)
-{
- GPtrArray *ret;
-
- g_return_val_if_fail (CAMEL_IS_FOLDER (folder), NULL);
- g_return_val_if_fail (folder->has_search_capability, NULL);
-
- /* NOTE: that it is upto the callee to lock */
-
- ret = CF_CLASS (folder)->search_by_expression (folder, expression, ex);
-
- return ret;
-}
-
-static void
-search_free (CamelFolder *folder, GPtrArray *result)
-{
- int i;
-
- for (i = 0; i < result->len; i++)
- g_free (g_ptr_array_index (result, i));
- g_ptr_array_free (result, TRUE);
-}
-
-/**
- * camel_folder_search_free:
- * @folder:
- * @result:
- *
- * Free the result of a search.
- **/
-void
-camel_folder_search_free (CamelFolder *folder, GPtrArray *result)
-{
- g_return_if_fail (CAMEL_IS_FOLDER (folder));
- g_return_if_fail (folder->has_search_capability);
-
- /* NOTE: upto the callee to lock */
- CF_CLASS (folder)->search_free (folder, result);
-}
-
-
-static void
-copy_message_to (CamelFolder *source, const char *uid, CamelFolder *dest, CamelException *ex)
-{
- CamelMimeMessage *msg;
- CamelMessageInfo *info = NULL;
-
- /* Default implementation. */
-
- /* we alredy have the lock, dont deadlock */
- msg = CF_CLASS (source)->get_message (source, uid, ex);
- if (!msg)
- return;
-
- if (source->has_summary_capability)
- info = CF_CLASS (source)->get_message_info (source, uid);
- else
- info = camel_message_info_new_from_header (((CamelMimePart *)msg)->headers);
-
- /* we don't want to retain the deleted flag */
- if (info && info->flags & CAMEL_MESSAGE_DELETED)
- info->flags = info->flags & ~CAMEL_MESSAGE_DELETED;
-
- camel_folder_append_message (dest, msg, info, ex);
- camel_object_unref (CAMEL_OBJECT (msg));
- if (info) {
- if (source->has_summary_capability)
- CF_CLASS (source)->free_message_info (source, info);
- else
- camel_message_info_free (info);
- }
-}
-
-static void
-copy_messages_to (CamelFolder *source, GPtrArray *uids, CamelFolder *dest, CamelException *ex)
-{
- int i;
-
- for (i = 0; i < uids->len && !camel_exception_is_set (ex); i++)
- copy_message_to (source, uids->pdata[i], dest, ex);
-}
-
-/**
- * camel_folder_copy_messages_to:
- * @source: source folder
- * @uids: message UIDs in @source
- * @dest: destination folder
- * @ex: a CamelException
- *
- * This copies messages from one folder to another. If the @source and
- * @dest folders have the same parent_store, this may be more efficient
- * than a camel_folder_append_message().
- **/
-void
-camel_folder_copy_messages_to (CamelFolder *source, GPtrArray *uids,
- CamelFolder *dest, CamelException *ex)
-{
- g_return_if_fail (CAMEL_IS_FOLDER (source));
- g_return_if_fail (CAMEL_IS_FOLDER (dest));
- g_return_if_fail (uids != NULL);
-
- CAMEL_FOLDER_LOCK(source, lock);
-
- if (source->parent_store == dest->parent_store)
- CF_CLASS (source)->copy_messages_to (source, uids, dest, ex);
- else
- copy_messages_to (source, uids, dest, ex);
-
- CAMEL_FOLDER_UNLOCK(source, lock);
-}
-
-
-static void
-move_message_to (CamelFolder *source, const char *uid,
- CamelFolder *dest, CamelException *ex)
-{
- CamelMimeMessage *msg;
- CamelMessageInfo *info = NULL;
-
- /* Default implementation. */
-
- msg = CF_CLASS (source)->get_message (source, uid, ex);
- if (!msg)
- return;
-
- if (source->has_summary_capability)
- info = CF_CLASS (source)->get_message_info (source, uid);
- else
- info = camel_message_info_new_from_header (((CamelMimePart *)msg)->headers);
-
- /* we don't want to retain the deleted flag */
- if (info && info->flags & CAMEL_MESSAGE_DELETED)
- info->flags = info->flags & ~CAMEL_MESSAGE_DELETED;
-
- camel_folder_append_message (dest, msg, info, ex);
- camel_object_unref (CAMEL_OBJECT (msg));
- if (!camel_exception_is_set (ex))
- CF_CLASS (source)->set_message_flags (source, uid, CAMEL_MESSAGE_DELETED,
- CAMEL_MESSAGE_DELETED);
-
- if (info) {
- if (source->has_summary_capability)
- CF_CLASS (source)->free_message_info (source, info);
- else
- camel_message_info_free (info);
- }
-}
-
-static void
-move_messages_to (CamelFolder *source, GPtrArray *uids, CamelFolder *dest, CamelException *ex)
-{
- int i;
-
- for (i = 0; i < uids->len && !camel_exception_is_set (ex); i++)
- move_message_to (source, uids->pdata[i], dest, ex);
-}
-
-/**
- * camel_folder_move_messages_to:
- * @source: source folder
- * @uids: message UIDs in @source
- * @dest: destination folder
- * @ex: a CamelException
- *
- * This moves a message from one folder to another. If the @source and
- * @dest folders have the same parent_store, this may be more efficient
- * than a camel_folder_append_message() followed by
- * camel_folder_delete_message().
- **/
-void
-camel_folder_move_messages_to (CamelFolder *source, GPtrArray *uids,
- CamelFolder *dest, CamelException *ex)
-{
- g_return_if_fail (CAMEL_IS_FOLDER (source));
- g_return_if_fail (CAMEL_IS_FOLDER (dest));
- g_return_if_fail (uids != NULL);
-
- if (source == dest) {
- /* source and destination folders are the same, nothing to do. */
- return;
- }
-
- CAMEL_FOLDER_LOCK(source, lock);
-
- if (source->parent_store == dest->parent_store)
- CF_CLASS (source)->move_messages_to (source, uids, dest, ex);
- else
- move_messages_to (source, uids, dest, ex);
-
- CAMEL_FOLDER_UNLOCK(source, lock);
-}
-
-static void
-freeze (CamelFolder *folder)
-{
- CAMEL_FOLDER_LOCK(folder, change_lock);
-
- folder->priv->frozen++;
-
- d(printf ("freeze(%p) = %d\n", folder, folder->priv->frozen));
- CAMEL_FOLDER_UNLOCK(folder, change_lock);
-}
-
-/**
- * camel_folder_freeze:
- * @folder: a folder
- *
- * Freezes the folder so that a series of operation can be performed
- * without "message_changed" and "folder_changed" signals being emitted.
- * When the folder is later thawed with camel_folder_thaw(), the
- * suppressed signals will be emitted.
- **/
-void
-camel_folder_freeze (CamelFolder * folder)
-{
- g_return_if_fail (CAMEL_IS_FOLDER (folder));
-
- CF_CLASS (folder)->freeze (folder);
-}
-
-static void
-thaw (CamelFolder * folder)
-{
- int i;
- CamelFolderChangeInfo *info;
-
- CAMEL_FOLDER_LOCK(folder, change_lock);
-
- folder->priv->frozen--;
-
- d(printf ("thaw(%p) = %d\n", folder, folder->priv->frozen));
-
- if (folder->priv->frozen == 0) {
- /* If we have more or less messages, do a folder changed, otherwise just
- do a message changed for each one.
- TODO: message_changed is now probably irrelevant and not required */
- info = folder->priv->changed_frozen;
- if (info->uid_added->len > 0 || info->uid_removed->len > 0 || info->uid_changed->len > 10) {
- camel_object_trigger_event(CAMEL_OBJECT(folder), "folder_changed", info);
- } else if (info->uid_changed->len > 0) {
- for (i=0;i<info->uid_changed->len;i++) {
- camel_object_trigger_event(CAMEL_OBJECT(folder), "message_changed", info->uid_changed->pdata[i]);
- }
- }
- camel_folder_change_info_clear(info);
- }
-
- CAMEL_FOLDER_UNLOCK(folder, change_lock);
-}
-
-/**
- * camel_folder_thaw:
- * @folder: a folder
- *
- * Thaws the folder and emits any pending folder_changed or
- * message_changed signals.
- **/
-void
-camel_folder_thaw (CamelFolder *folder)
-{
- g_return_if_fail (CAMEL_IS_FOLDER (folder));
- g_return_if_fail (folder->priv->frozen != 0);
-
- CF_CLASS (folder)->thaw (folder);
-}
-
-
-/* Event hooks that block emission when frozen */
-static gboolean
-folder_changed (CamelObject *obj, gpointer event_data)
-{
- CamelFolder *folder = CAMEL_FOLDER (obj);
- CamelFolderChangeInfo *changed = event_data;
- gboolean ret = TRUE;
-
- d(printf ("folder_changed(%p, %p), frozen=%d\n", obj, event_data, folder->priv->frozen));
-
- if (folder->priv->frozen) {
- CAMEL_FOLDER_LOCK(folder, change_lock);
-
- if (changed != NULL)
- camel_folder_change_info_cat(folder->priv->changed_frozen, changed);
- else
- g_warning("Class %s is passing NULL to folder_changed event",
- camel_type_to_name (CAMEL_OBJECT_GET_TYPE (folder)));
- ret = FALSE;
-
- CAMEL_FOLDER_UNLOCK(folder, change_lock);
- }
-
- return ret;
-}
-
-static gboolean
-message_changed (CamelObject *obj, /*const char *uid*/gpointer event_data)
-{
- CamelFolder *folder = CAMEL_FOLDER (obj);
- gboolean ret = TRUE;
-
- d(printf ("message_changed(%p, %p), frozen=%d\n", folder, event_data, folder->priv->frozen));
-
- if (folder->priv->frozen) {
- CAMEL_FOLDER_LOCK(folder, change_lock);
-
- camel_folder_change_info_change_uid(folder->priv->changed_frozen, (char *)event_data);
- ret = FALSE;
-
- CAMEL_FOLDER_UNLOCK(folder, change_lock);
- }
-
- return ret;
-}
-
-
-/**
- * camel_folder_free_nop:
- * @folder: a folder
- * @array: an array of uids or CamelMessageInfo
- *
- * "Frees" the provided array by doing nothing. Used by CamelFolder
- * subclasses as an implementation for free_uids, or free_summary when
- * the returned array is "static" information and should not be freed.
- **/
-void
-camel_folder_free_nop (CamelFolder *folder, GPtrArray *array)
-{
- ;
-}
-
-/**
- * camel_folder_free_shallow:
- * @folder: a folder
- * @array: an array of uids or CamelMessageInfo
- *
- * Frees the provided array but not its contents. Used by CamelFolder
- * subclasses as an implementation for free_uids or free_summary when
- * the returned array needs to be freed but its contents come from
- * "static" information.
- **/
-void
-camel_folder_free_shallow (CamelFolder *folder, GPtrArray *array)
-{
- g_ptr_array_free (array, TRUE);
-}
-
-/**
- * camel_folder_free_deep:
- * @folder: a folder
- * @array: an array of uids
- *
- * Frees the provided array and its contents. Used by CamelFolder
- * subclasses as an implementation for free_uids when the provided
- * information was created explicitly by the corresponding get_ call.
- **/
-void
-camel_folder_free_deep (CamelFolder *folder, GPtrArray *array)
-{
- int i;
-
- for (i = 0; i < array->len; i++)
- g_free (array->pdata[i]);
- g_ptr_array_free (array, TRUE);
-}
-
-struct _CamelFolderChangeInfoPrivate {
- GHashTable *uid_stored; /* what we have stored, which array they're in */
- GHashTable *uid_source; /* used to create unique lists */
- struct _EMemPool *uid_pool; /* pool used to store copies of uid strings */
-};
-
-/**
- * camel_folder_change_info_new:
- * @void:
- *
- * Create a new folder change info structure.
- *
- * Change info structures are not MT-SAFE and must be
- * locked for exclusive access externally.
- *
- * Return value:
- **/
-CamelFolderChangeInfo *
-camel_folder_change_info_new(void)
-{
- CamelFolderChangeInfo *info;
-
- info = g_malloc(sizeof(*info));
- info->uid_added = g_ptr_array_new();
- info->uid_removed = g_ptr_array_new();
- info->uid_changed = g_ptr_array_new();
- info->priv = g_malloc0(sizeof(*info->priv));
- info->priv->uid_stored = g_hash_table_new(g_str_hash, g_str_equal);
- info->priv->uid_source = NULL;
- info->priv->uid_pool = e_mempool_new(512, 256, E_MEMPOOL_ALIGN_BYTE);
-
- return info;
-}
-
-/**
- * camel_folder_change_info_add_source:
- * @info:
- * @uid:
- *
- * Add a source uid for generating a changeset.
- **/
-void
-camel_folder_change_info_add_source(CamelFolderChangeInfo *info, const char *uid)
-{
- struct _CamelFolderChangeInfoPrivate *p = info->priv;
-
- if (p->uid_source == NULL)
- p->uid_source = g_hash_table_new(g_str_hash, g_str_equal);
-
- if (g_hash_table_lookup(p->uid_source, uid) == NULL)
- g_hash_table_insert(p->uid_source, e_mempool_strdup(p->uid_pool, uid), (void *)1);
-}
-
-/**
- * camel_folder_change_info_add_source_list:
- * @info:
- * @list:
- *
- * Add a list of source uid's for generating a changeset.
- **/
-void
-camel_folder_change_info_add_source_list(CamelFolderChangeInfo *info, const GPtrArray *list)
-{
- int i;
- struct _CamelFolderChangeInfoPrivate *p = info->priv;
-
- if (p->uid_source == NULL)
- p->uid_source = g_hash_table_new(g_str_hash, g_str_equal);
-
- for (i=0;i<list->len;i++) {
- char *uid = list->pdata[i];
-
- if (g_hash_table_lookup(p->uid_source, uid) == NULL)
- g_hash_table_insert(p->uid_source, e_mempool_strdup(p->uid_pool, uid), (void *)1);
- }
-}
-
-/**
- * camel_folder_change_info_add_update:
- * @info:
- * @uid:
- *
- * Add a uid from the updated list, used to generate a changeset diff.
- **/
-void
-camel_folder_change_info_add_update(CamelFolderChangeInfo *info, const char *uid)
-{
- char *key;
- int value;
- struct _CamelFolderChangeInfoPrivate *p = info->priv;
-
- if (p->uid_source == NULL) {
- camel_folder_change_info_add_uid(info, uid);
- return;
- }
-
- if (g_hash_table_lookup_extended(p->uid_source, uid, (void **)&key, (void **)&value)) {
- g_hash_table_remove(p->uid_source, key);
- } else {
- camel_folder_change_info_add_uid(info, uid);
- }
-}
-
-/**
- * camel_folder_change_info_add_update_list:
- * @info:
- * @list:
- *
- * Add a list of uid's from the updated list.
- **/
-void
-camel_folder_change_info_add_update_list(CamelFolderChangeInfo *info, const GPtrArray *list)
-{
- int i;
-
- for (i=0;i<list->len;i++)
- camel_folder_change_info_add_update(info, list->pdata[i]);
-}
-
-static void
-change_info_remove(char *key, void *value, CamelFolderChangeInfo *info)
-{
- struct _CamelFolderChangeInfoPrivate *p = info->priv;
- GPtrArray *olduids;
- char *olduid;
-
- if (g_hash_table_lookup_extended(p->uid_stored, key, (void **)&olduid, (void **)&olduids)) {
- /* if it was added/changed them removed, then remove it */
- if (olduids != info->uid_removed) {
- g_ptr_array_remove_fast(olduids, olduid);
- g_ptr_array_add(info->uid_removed, olduid);
- g_hash_table_insert(p->uid_stored, olduid, info->uid_removed);
- }
- return;
- }
-
-
- /* we dont need to copy this, as they've already been copied into our pool */
- g_ptr_array_add(info->uid_removed, key);
- g_hash_table_insert(p->uid_stored, key, info->uid_removed);
-}
-
-/**
- * camel_folder_change_info_build_diff:
- * @info:
- *
- * Compare the source uid set to the updated uid set and generate the differences
- * into the added and removed lists.
- **/
-void
-camel_folder_change_info_build_diff(CamelFolderChangeInfo *info)
-{
- struct _CamelFolderChangeInfoPrivate *p = info->priv;
-
- if (p->uid_source) {
- g_hash_table_foreach(p->uid_source, (GHFunc)change_info_remove, info);
- g_hash_table_destroy(p->uid_source);
- p->uid_source = NULL;
- }
-}
-
-static void
-change_info_cat(CamelFolderChangeInfo *info, GPtrArray *source, void (*add)(CamelFolderChangeInfo *info, const char *uid))
-{
- int i;
-
- for (i=0;i<source->len;i++)
- add(info, source->pdata[i]);
-}
-
-/**
- * camel_folder_change_info_cat:
- * @info:
- * @source:
- *
- * Concatenate one change info onto antoher. Can be used to copy
- * them too.
- **/
-void
-camel_folder_change_info_cat(CamelFolderChangeInfo *info, CamelFolderChangeInfo *source)
-{
- change_info_cat(info, source->uid_added, camel_folder_change_info_add_uid);
- change_info_cat(info, source->uid_removed, camel_folder_change_info_remove_uid);
- change_info_cat(info, source->uid_changed, camel_folder_change_info_change_uid);
-}
-
-/**
- * camel_folder_change_info_add_uid:
- * @info:
- * @uid:
- *
- * Add a new uid to the changeinfo.
- **/
-void
-camel_folder_change_info_add_uid(CamelFolderChangeInfo *info, const char *uid)
-{
- struct _CamelFolderChangeInfoPrivate *p = info->priv;
- GPtrArray *olduids;
- char *olduid;
-
- if (g_hash_table_lookup_extended(p->uid_stored, uid, (void **)&olduid, (void **)&olduids)) {
- /* if it was removed then added, promote it to a changed */
- /* if it was changed then added, leave as changed */
- if (olduids == info->uid_removed) {
- g_ptr_array_remove_fast(olduids, olduid);
- g_ptr_array_add(info->uid_changed, olduid);
- g_hash_table_insert(p->uid_stored, olduid, info->uid_changed);
- }
- return;
- }
-
- olduid = e_mempool_strdup(p->uid_pool, uid);
- g_ptr_array_add(info->uid_added, olduid);
- g_hash_table_insert(p->uid_stored, olduid, info->uid_added);
-}
-
-/**
- * camel_folder_change_info_remove_uid:
- * @info:
- * @uid:
- *
- * Add a uid to the removed uid list.
- **/
-void
-camel_folder_change_info_remove_uid(CamelFolderChangeInfo *info, const char *uid)
-{
- struct _CamelFolderChangeInfoPrivate *p = info->priv;
- GPtrArray *olduids;
- char *olduid;
-
- if (g_hash_table_lookup_extended(p->uid_stored, uid, (void **)&olduid, (void **)&olduids)) {
- /* if it was added/changed them removed, then remove it */
- if (olduids != info->uid_removed) {
- g_ptr_array_remove_fast(olduids, olduid);
- g_ptr_array_add(info->uid_removed, olduid);
- g_hash_table_insert(p->uid_stored, olduid, info->uid_removed);
- }
- return;
- }
-
- olduid = e_mempool_strdup(p->uid_pool, uid);
- g_ptr_array_add(info->uid_removed, olduid);
- g_hash_table_insert(p->uid_stored, olduid, info->uid_removed);
-}
-
-/**
- * camel_folder_change_info_change_uid:
- * @info:
- * @uid:
- *
- * Add a uid to the changed uid list.
- **/
-void
-camel_folder_change_info_change_uid(CamelFolderChangeInfo *info, const char *uid)
-{
- struct _CamelFolderChangeInfoPrivate *p = info->priv;
- GPtrArray *olduids;
- char *olduid;
-
- if (g_hash_table_lookup_extended(p->uid_stored, uid, (void **)&olduid, (void **)&olduids)) {
- /* if we have it already, leave it as that */
- return;
- }
-
- olduid = e_mempool_strdup(p->uid_pool, uid);
- g_ptr_array_add(info->uid_changed, olduid);
- g_hash_table_insert(p->uid_stored, olduid, info->uid_changed);
-}
-
-/**
- * camel_folder_change_info_changed:
- * @info:
- *
- * Return true if the changeset contains any changes.
- *
- * Return Value:
- **/
-gboolean
-camel_folder_change_info_changed(CamelFolderChangeInfo *info)
-{
- return (info->uid_added->len || info->uid_removed->len || info->uid_changed->len);
-}
-
-/**
- * camel_folder_change_info_clear:
- * @info:
- *
- * Empty out the change info; called after changes have been processed.
- **/
-void
-camel_folder_change_info_clear(CamelFolderChangeInfo *info)
-{
- struct _CamelFolderChangeInfoPrivate *p = info->priv;
-
- g_ptr_array_set_size(info->uid_added, 0);
- g_ptr_array_set_size(info->uid_removed, 0);
- g_ptr_array_set_size(info->uid_changed, 0);
- if (p->uid_source) {
- g_hash_table_destroy(p->uid_source);
- p->uid_source = NULL;
- }
- g_hash_table_destroy(p->uid_stored);
- p->uid_stored = g_hash_table_new(g_str_hash, g_str_equal);
- e_mempool_flush(p->uid_pool, TRUE);
-}
-
-/**
- * camel_folder_change_info_free:
- * @info:
- *
- * Free memory associated with the folder change info lists.
- **/
-void
-camel_folder_change_info_free(CamelFolderChangeInfo *info)
-{
- struct _CamelFolderChangeInfoPrivate *p = info->priv;
-
- if (p->uid_source)
- g_hash_table_destroy(p->uid_source);
-
- g_hash_table_destroy(p->uid_stored);
- e_mempool_destroy(p->uid_pool);
- g_free(p);
-
- g_ptr_array_free(info->uid_added, TRUE);
- g_ptr_array_free(info->uid_removed, TRUE);
- g_ptr_array_free(info->uid_changed, TRUE);
- g_free(info);
-}
-
-
-
diff --git a/camel/camel-folder.h b/camel/camel-folder.h
deleted file mode 100644
index 1baf0206e1..0000000000
--- a/camel/camel-folder.h
+++ /dev/null
@@ -1,308 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * camel-folder.h: Abstract class for an email folder
- *
- * Authors: Bertrand Guiheneuf <bertrand@helixcode.com>
- * Michael Zucchi <notzed@helixcode.com>
- *
- * 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 <glib.h>
-#include <camel/camel-object.h>
-#include <camel/camel-folder-summary.h>
-
-#define CAMEL_FOLDER_TYPE (camel_folder_get_type ())
-#define CAMEL_FOLDER(obj) (CAMEL_CHECK_CAST((obj), CAMEL_FOLDER_TYPE, CamelFolder))
-#define CAMEL_FOLDER_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_FOLDER_TYPE, CamelFolderClass))
-#define CAMEL_IS_FOLDER(o) (CAMEL_CHECK_TYPE((o), CAMEL_FOLDER_TYPE))
-
-typedef struct _CamelFolderChangeInfo CamelFolderChangeInfo;
-
-struct _CamelFolderChangeInfo {
- GPtrArray *uid_added;
- GPtrArray *uid_removed;
- GPtrArray *uid_changed;
-
- struct _CamelFolderChangeInfoPrivate *priv;
-};
-
-struct _CamelFolder
-{
- CamelObject parent_object;
-
- struct _CamelFolderPrivate *priv;
-
- char *name;
- char *full_name;
- CamelStore *parent_store;
- CamelFolderSummary *summary;
-
- guint32 permanent_flags;
- gboolean has_summary_capability:1;
- gboolean has_search_capability:1;
-
-};
-
-typedef struct {
- CamelObjectClass parent_class;
-
- /* Virtual methods */
- void (*refresh_info) (CamelFolder *folder, CamelException *ex);
-
- void (*sync) (CamelFolder *folder, gboolean expunge,
- CamelException *ex);
-
- const char * (*get_name) (CamelFolder *folder);
- const char * (*get_full_name) (CamelFolder *folder);
-
- CamelStore * (*get_parent_store) (CamelFolder *folder);
-
- void (*expunge) (CamelFolder *folder,
- CamelException *ex);
-
- int (*get_message_count) (CamelFolder *folder);
-
- int (*get_unread_message_count) (CamelFolder *folder);
-
- void (*append_message) (CamelFolder *folder,
- CamelMimeMessage *message,
- const CamelMessageInfo *info,
- CamelException *ex);
-
- guint32 (*get_permanent_flags) (CamelFolder *folder);
- guint32 (*get_message_flags) (CamelFolder *folder,
- const char *uid);
- void (*set_message_flags) (CamelFolder *folder,
- const char *uid,
- guint32 flags, guint32 set);
-
- gboolean (*get_message_user_flag) (CamelFolder *folder,
- const char *uid,
- const char *name);
- void (*set_message_user_flag) (CamelFolder *folder,
- const char *uid,
- const char *name,
- gboolean value);
-
- const char * (*get_message_user_tag) (CamelFolder *folder,
- const char *uid,
- const char *name);
- void (*set_message_user_tag) (CamelFolder *folder,
- const char *uid,
- const char *name,
- const char *value);
-
- CamelMimeMessage * (*get_message) (CamelFolder *folder,
- const char *uid,
- CamelException *ex);
-
- GPtrArray * (*get_uids) (CamelFolder *folder);
- void (*free_uids) (CamelFolder *folder,
- GPtrArray *array);
-
- GPtrArray * (*get_summary) (CamelFolder *folder);
- void (*free_summary) (CamelFolder *folder,
- GPtrArray *summary);
-
- gboolean (*has_search_capability) (CamelFolder *folder);
-
- GPtrArray * (*search_by_expression) (CamelFolder *folder,
- const char *expression,
- CamelException *ex);
-
- void (*search_free) (CamelFolder *folder, GPtrArray *result);
-
- CamelMessageInfo * (*get_message_info) (CamelFolder *, const char *uid);
- void (*ref_message_info) (CamelFolder *, CamelMessageInfo *);
- void (*free_message_info) (CamelFolder *, CamelMessageInfo *);
-
- void (*copy_messages_to) (CamelFolder *source,
- GPtrArray *uids,
- CamelFolder *destination,
- CamelException *ex);
-
- void (*move_messages_to) (CamelFolder *source,
- GPtrArray *uids,
- CamelFolder *destination,
- CamelException *ex);
-
- void (*freeze) (CamelFolder *folder);
- void (*thaw) (CamelFolder *folder);
-} CamelFolderClass;
-
-/* Standard Camel function */
-CamelType camel_folder_get_type (void);
-
-
-/* public methods */
-void camel_folder_construct (CamelFolder *folder,
- CamelStore *parent_store,
- const char *full_name,
- const char *name);
-
-void camel_folder_refresh_info (CamelFolder * folder,
- CamelException * ex);
-void camel_folder_sync (CamelFolder *folder,
- gboolean expunge,
- CamelException *ex);
-
-CamelStore * camel_folder_get_parent_store (CamelFolder *folder);
-
-
-/* delete operations */
-void camel_folder_expunge (CamelFolder *folder,
- CamelException *ex);
-
-
-/* folder name operations */
-const char * camel_folder_get_name (CamelFolder *folder);
-const char * camel_folder_get_full_name (CamelFolder *folder);
-
-
-/* various properties accessors */
-guint32 camel_folder_get_permanent_flags (CamelFolder *folder);
-
-guint32 camel_folder_get_message_flags (CamelFolder *folder,
- const char *uid);
-
-void camel_folder_set_message_flags (CamelFolder *folder,
- const char *uid,
- guint32 flags,
- guint32 set);
-
-gboolean camel_folder_get_message_user_flag (CamelFolder *folder,
- const char *uid,
- const char *name);
-
-void camel_folder_set_message_user_flag (CamelFolder *folder,
- const char *uid,
- const char *name,
- gboolean value);
-const char * camel_folder_get_message_user_tag (CamelFolder *folder,
- const char *uid,
- const char *name);
-
-void camel_folder_set_message_user_tag (CamelFolder *folder,
- const char *uid,
- const char *name,
- const char *value);
-
-
-
-/* message manipulation */
-void camel_folder_append_message (CamelFolder *folder,
- CamelMimeMessage *message,
- const CamelMessageInfo *info,
- CamelException *ex);
-
-
-/* summary related operations */
-gboolean camel_folder_has_summary_capability (CamelFolder *folder);
-
-
-int camel_folder_get_message_count (CamelFolder *folder);
-
-int camel_folder_get_unread_message_count (CamelFolder *folder);
-
-GPtrArray * camel_folder_get_summary (CamelFolder *folder);
-void camel_folder_free_summary (CamelFolder *folder,
- GPtrArray *array);
-
-/* uid based access operations */
-CamelMimeMessage * camel_folder_get_message (CamelFolder *folder,
- const char *uid,
- CamelException *ex);
-#define camel_folder_delete_message(folder, uid) \
- camel_folder_set_message_flags (folder, uid, CAMEL_MESSAGE_DELETED, CAMEL_MESSAGE_DELETED)
-
-GPtrArray * camel_folder_get_uids (CamelFolder *folder);
-void camel_folder_free_uids (CamelFolder *folder,
- GPtrArray *array);
-
-/* search api */
-gboolean camel_folder_has_search_capability (CamelFolder *folder);
-GPtrArray * camel_folder_search_by_expression (CamelFolder *folder,
- const char *expression,
- CamelException *ex);
-void camel_folder_search_free (CamelFolder *folder, GPtrArray *);
-
-/* summary info */
-CamelMessageInfo *camel_folder_get_message_info (CamelFolder *folder, const char *uid);
-void camel_folder_free_message_info (CamelFolder *folder, CamelMessageInfo *info);
-void camel_folder_ref_message_info (CamelFolder *folder, CamelMessageInfo *info);
-
-void camel_folder_copy_messages_to (CamelFolder *source,
- GPtrArray *uids,
- CamelFolder *dest,
- CamelException *ex);
-
-void camel_folder_move_messages_to (CamelFolder *source,
- GPtrArray *uids,
- CamelFolder *dest,
- CamelException *ex);
-
-/* stop/restart getting events */
-void camel_folder_freeze (CamelFolder *folder);
-void camel_folder_thaw (CamelFolder *folder);
-
-#if 0
-/* lock/unlock at the thread level, NOTE: only used internally */
-void camel_folder_lock (CamelFolder *folder);
-void camel_folder_unlock (CamelFolder *folder);
-#endif
-
-/* For use by subclasses (for free_{uids,summary,subfolder_names}) */
-void camel_folder_free_nop (CamelFolder *folder, GPtrArray *array);
-void camel_folder_free_shallow (CamelFolder *folder, GPtrArray *array);
-void camel_folder_free_deep (CamelFolder *folder, GPtrArray *array);
-
-/* update functions for change info */
-CamelFolderChangeInfo * camel_folder_change_info_new (void);
-void camel_folder_change_info_clear (CamelFolderChangeInfo *info);
-void camel_folder_change_info_free (CamelFolderChangeInfo *info);
-gboolean camel_folder_change_info_changed (CamelFolderChangeInfo *info);
-
-/* for building diff's automatically */
-void camel_folder_change_info_add_source (CamelFolderChangeInfo *info, const char *uid);
-void camel_folder_change_info_add_source_list(CamelFolderChangeInfo *info, const GPtrArray *list);
-void camel_folder_change_info_add_update (CamelFolderChangeInfo *info, const char *uid);
-void camel_folder_change_info_add_update_list(CamelFolderChangeInfo *info, const GPtrArray *list);
-void camel_folder_change_info_build_diff (CamelFolderChangeInfo *info);
-
-/* for manipulating diff's directly */
-void camel_folder_change_info_cat (CamelFolderChangeInfo *info, CamelFolderChangeInfo *s);
-void camel_folder_change_info_add_uid (CamelFolderChangeInfo *info, const char *uid);
-void camel_folder_change_info_remove_uid (CamelFolderChangeInfo *info, const char *uid);
-void camel_folder_change_info_change_uid (CamelFolderChangeInfo *info, 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 902178c303..0000000000
--- a/camel/camel-internet-address.c
+++ /dev/null
@@ -1,509 +0,0 @@
-/*
- * Copyright (C) 2000 Helix Code Inc.
- *
- * Authors: Michael Zucchi <notzed@helixcode.com>
- *
- * 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 <stdio.h>
-#include <string.h>
-
-#include "camel-mime-utils.h"
-#include "camel-internet-address.h"
-
-#define d(x)
-
-static int internet_decode (CamelAddress *, const char *raw);
-static char * internet_encode (CamelAddress *);
-static int internet_unformat (CamelAddress *, const char *raw);
-static char * internet_format (CamelAddress *);
-static int internet_cat (CamelAddress *dest, const CamelAddress *source);
-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;
-};
-
-static void
-camel_internet_address_class_init(CamelInternetAddressClass *klass)
-{
- CamelAddressClass *address = (CamelAddressClass *) klass;
-
- camel_internet_address_parent = CAMEL_ADDRESS_CLASS(camel_type_get_global_classfuncs(camel_address_get_type()));
-
- address->decode = internet_decode;
- address->encode = internet_encode;
- address->unformat = internet_unformat;
- address->format = internet_format;
- address->remove = internet_remove;
- address->cat = internet_cat;
-}
-
-static void
-camel_internet_address_init(CamelInternetAddress *obj)
-{
-}
-
-CamelType
-camel_internet_address_get_type(void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register(camel_address_get_type(), "CamelInternetAddress",
- sizeof (CamelInternetAddress),
- sizeof (CamelInternetAddressClass),
- (CamelObjectClassInitFunc) camel_internet_address_class_init,
- NULL,
- (CamelObjectInitFunc) camel_internet_address_init,
- NULL);
- }
-
- return type;
-}
-
-static int
-internet_decode (CamelAddress *a, const char *raw)
-{
- struct _header_address *ha, *n;
- int count = a->addresses->len;
-
- /* 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, it's an error, infact */
- g = g->next;
- }
- }
- n = n->next;
- }
- header_address_list_clear(&ha);
- }
-
- return a->addresses->len - count;
-}
-
-static char *
-internet_encode (CamelAddress *a)
-{
- int i;
- GString *out;
- char *ret;
- int len = 6; /* "From: ", assume longer of the address headers */
-
- if (a->addresses->len == 0)
- return NULL;
-
- out = g_string_new("");
-
- for (i = 0;i < a->addresses->len; i++) {
- struct _address *addr = g_ptr_array_index(a->addresses, i);
- char *enc;
-
- if (i != 0)
- g_string_append(out, ", ");
-
- enc = camel_internet_address_encode_address(&len, addr->name, addr->address);
- g_string_sprintfa(out, "%s", enc);
- g_free(enc);
- }
-
- ret = out->str;
- g_string_free(out, FALSE);
-
- return ret;
-}
-
-static int
-internet_unformat(CamelAddress *a, const char *raw)
-{
- char *buffer, *p, *name, *addr;
- int c;
- int count = a->addresses->len;
-
- if (raw == NULL)
- return 0;
-
- d(printf("unformatting address: %s\n", raw));
-
- /* we copy, so we can modify as we go */
- buffer = g_strdup(raw);
-
- /* this can be simpler than decode, since there are much fewer rules */
- p = buffer;
- name = NULL;
- addr = p;
- do {
- c = (unsigned char)*p++;
- switch (c) {
- /* removes quotes, they should only be around the total name anyway */
- case '"':
- p[-1] = ' ';
- while (*p)
- if (*p == '"') {
- *p++ = ' ';
- break;
- } else {
- p++;
- }
- break;
- case '<':
- if (name == NULL)
- name = addr;
- addr = p;
- addr[-1] = 0;
- while (*p && *p != '>')
- p++;
- if (*p == 0)
- break;
- p++;
- /* falls through */
- case ',':
- p[-1] = 0;
- /* falls through */
- case 0:
- if (name)
- name = g_strstrip(name);
- addr = g_strstrip(addr);
- if (addr[0]) {
- d(printf("found address: '%s' <%s>\n", name, addr));
- camel_internet_address_add((CamelInternetAddress *)a, name, addr);
- }
- name = NULL;
- addr = p;
- break;
- }
- } while (c);
-
- g_free(buffer);
-
- return a->addresses->len - count;
-}
-
-static char *
-internet_format (CamelAddress *a)
-{
- int i;
- GString *out;
- char *ret;
-
- if (a->addresses->len == 0)
- return NULL;
-
- out = g_string_new("");
-
- for (i = 0;i < a->addresses->len; i++) {
- struct _address *addr = g_ptr_array_index(a->addresses, i);
- char *enc;
-
- if (i != 0)
- g_string_append(out, ", ");
-
- enc = camel_internet_address_format_address(addr->name, addr->address);
- g_string_sprintfa(out, "%s", enc);
- g_free(enc);
- }
-
- ret = out->str;
- g_string_free(out, FALSE);
-
- return ret;
-}
-
-static int internet_cat (CamelAddress *dest, const CamelAddress *source)
-{
- int i;
-
- g_assert(CAMEL_IS_INTERNET_ADDRESS(source));
-
- for (i=0;i<source->addresses->len;i++) {
- struct _address *addr = g_ptr_array_index(source->addresses, i);
- camel_internet_address_add((CamelInternetAddress *)dest, addr->name, addr->address);
- }
-
- return i;
-}
-
-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(camel_object_new(camel_internet_address_get_type()));
- return new;
-}
-
-/**
- * camel_internet_address_add:
- * @a: internet address object
- * @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_assert(CAMEL_IS_INTERNET_ADDRESS(a));
-
- 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: internet address object
- * @index: address's array 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_assert(CAMEL_IS_INTERNET_ADDRESS(a));
-
- if (index < 0 || 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_assert(CAMEL_IS_INTERNET_ADDRESS(a));
-
- len = ((CamelAddress *)a)->addresses->len;
- for (i=0;i<len;i++) {
- addr = g_ptr_array_index( ((CamelAddress *)a)->addresses, 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_assert(CAMEL_IS_INTERNET_ADDRESS(a));
-
- len = ((CamelAddress *)a)->addresses->len;
- for (i=0;i<len;i++) {
- addr = g_ptr_array_index( ((CamelAddress *)a)->addresses, i );
- if (!strcmp(addr->address, address)) {
- if (namep)
- *namep = addr->name;
- return i;
- }
- }
- return -1;
-}
-
-/**
- * camel_internet_address_encode_address:
- * @len: The encoded length so far, of this line
- * @name:
- * @addr:
- *
- * Encode a single address ready for internet usage. Header folding
- * as per rfc 822 is also performed, based on the length in len.
- *
- * Return value: The encoded address.
- **/
-char *
-camel_internet_address_encode_address(int *inlen, const char *real, const char *addr)
-{
- char *name = header_encode_phrase(real);
- char *ret = NULL, *addra = NULL;
- int len = *inlen;
- GString *out = g_string_new("");
-
- g_assert(addr);
-
- if (name && name[0]) {
- if (strlen(name) + len > CAMEL_FOLD_SIZE) {
- char *folded = header_fold(name, len);
- char *last;
- g_string_append(out, folded);
- g_free(folded);
- last = strrchr(out->str, '\n');
- if (last)
- len = last-(out->str+out->len);
- else
- len = out->len;
- } else {
- g_string_append(out, name);
- len += strlen(name);
- }
- addr = addra = g_strdup_printf(" <%s>", addr);
- }
-
- /* NOTE: Strictly speaking, we could and should split the
- * internal address up if we need to, on atom or specials
- * boundaries - however, to aid interoperability with mailers
- * that will probably not handle this case, we will just move
- * the whole address to its own line */
- if (strlen(addr) + len > CAMEL_FOLD_SIZE) {
- g_string_append(out, "\n\t");
- g_string_append(out, addr);
- len = strlen(addr)+1;
- } else {
- g_string_append(out, addr);
- len += strlen(addr);
- }
-
- *inlen = len;
-#if 0
- if (name && name[0])
- ret = g_strdup_printf("%s <%s>", name, addr);
- else
- ret = g_strdup_printf("%s", addr);
-#endif
- g_free(name);
- g_free(addra);
-
- ret = out->str;
- g_string_free(out, FALSE);
-
- return ret;
-}
-
-/**
- * camel_internet_address_format_address:
- * @name: A name, quotes may be stripped from it.
- * @addr: Assumes a valid rfc822 email address.
- *
- * Function to format a single address, suitable for display.
- *
- * Return value:
- **/
-char *
-camel_internet_address_format_address(const char *name, const char *addr)
-{
- char *ret = NULL;
-
- g_assert(addr);
-
- if (name && name[0]) {
- const char *p = name;
- char *o, c;
-
- while ((c = *p++)) {
- if (c == '\"' || c == ',') {
- o = ret = g_malloc(strlen(name)+3+strlen(addr)+3 + 1);
- p = name;
- *o++ = '\"';
- while ((c = *p++))
- if (c != '\"')
- *o++ = c;
- *o++ = '\"';
- sprintf(o, " <%s>", addr);
- d(printf("encoded '%s' => '%s'\n", name, ret));
- return ret;
- }
- }
- ret = g_strdup_printf("%s <%s>", name, addr);
- } else
- ret = g_strdup(addr);
-
- return ret;
-}
diff --git a/camel/camel-internet-address.h b/camel/camel-internet-address.h
deleted file mode 100644
index 7afd74fad9..0000000000
--- a/camel/camel-internet-address.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (C) 2000 Helix Code Inc.
- *
- * Authors: Michael Zucchi <notzed@helixcode.com>
- *
- * 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 <camel/camel-address.h>
-
-#define CAMEL_INTERNET_ADDRESS(obj) CAMEL_CHECK_CAST (obj, camel_internet_address_get_type (), CamelInternetAddress)
-#define CAMEL_INTERNET_ADDRESS_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_internet_address_get_type (), CamelInternetAddressClass)
-#define CAMEL_IS_INTERNET_ADDRESS(obj) CAMEL_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 **);
-
-/* utility functions, for network/display formatting */
-char * camel_internet_address_encode_address(int *len, const char *name, const char *addr);
-char * camel_internet_address_format_address(const char *real, const char *addr);
-
-#endif /* ! _CAMEL_INTERNET_ADDRESS_H */
diff --git a/camel/camel-lock.c b/camel/camel-lock.c
deleted file mode 100644
index c14accdd0e..0000000000
--- a/camel/camel-lock.c
+++ /dev/null
@@ -1,407 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Author: Michael Zucchi <notzed@helixcode.com>
- *
- * Copyright (C) 1999 Helix Code (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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <sys/stat.h>
-#include <unistd.h>
-#include <errno.h>
-#ifdef HAVE_ALLOCA_H
-#include <alloca.h>
-#endif
-#include <time.h>
-
-#ifdef USE_DOT
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#endif
-
-#ifdef USE_FCNTL
-#include <unistd.h>
-#include <fcntl.h>
-#endif
-
-#ifdef USE_FLOCK
-#include <sys/file.h>
-#endif
-
-#include "camel-lock.h"
-
-/* dunno where this fucking thing is got from */
-#define _(x) (x)
-
-#define d(x) /*(printf("%s(%d): ", __FILE__, __LINE__),(x))*/
-
-/**
- * camel_lock_dot:
- * @path:
- * @ex:
- *
- * Create an exclusive lock using .lock semantics.
- * All locks are equivalent to write locks (exclusive).
- *
- * Return value: -1 on error, sets @ex appropriately.
- **/
-int
-camel_lock_dot(const char *path, CamelException *ex)
-{
-#ifdef USE_DOT
- char *locktmp, *lock;
- int retry = 0;
- int fdtmp;
- struct stat st;
-
- /* TODO: Is there a reliable way to refresh the lock, if we're still busy with it?
- Does it matter? We will normally also use fcntl too ... */
-
- /* use alloca, save cleaning up afterwards */
- lock = alloca(strlen(path) + strlen(".lock") + 1);
- sprintf(lock, "%s.lock", path);
- locktmp = alloca(strlen(path) + strlen("XXXXXX") + 1);
-
-#ifndef HAVE_MKSTEMP
- sprintf(locktmp, "%sXXXXXX", path);
- if (mktemp(locktmp) == NULL) {
- /* well, this is really only a programatic error */
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM, _("Could not create lock file for %s: %s"), path, strerror(errno));
- return -1;
- }
-#endif
-
- while (retry < CAMEL_LOCK_DOT_RETRY) {
-
- d(printf("trying to lock '%s', attempt %d\n", lock, retry));
-
- if (retry > 0)
- sleep(CAMEL_LOCK_DOT_DELAY);
-
-#ifdef HAVE_MKSTEMP
- sprintf(locktmp, "%sXXXXXX", path);
- fdtmp = mkstemp(locktmp);
-#else
- fdtmp = open(locktmp, O_RDWR|O_CREAT|O_EXCL, 0600);
-#endif
- if (fdtmp == -1) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM, _("Could not create lock file for %s: %s"), path, strerror(errno));
- return -1;
- }
- close(fdtmp);
-
- /* apparently return code from link can be unreliable for nfs (see link(2)), so we ignore it */
- link(locktmp, lock);
-
- /* but we check stat instead (again, see link(2)) */
- if (stat(locktmp, &st) == -1) {
- d(printf("Out lock file %s vanished!?\n", locktmp));
-
- /* well that was unexpected, try cleanup/retry */
- unlink(locktmp);
- unlink(lock);
- } else {
- d(printf("tmp lock created, link count is %d\n", st.st_nlink));
-
- unlink(locktmp);
-
- /* if we had 2 links, we have created the .lock, return ok, otherwise we need to keep trying */
- if (st.st_nlink == 2)
- return 0;
- }
-
- /* check for stale lock, kill it */
- if (stat(lock, &st) == 0) {
- time_t now = time(0);
- (printf("There is an existing lock %ld seconds old\n", now-st.st_ctime));
- if (st.st_ctime < now - CAMEL_LOCK_DOT_STALE) {
- d(printf("Removing it now\n"));
- unlink(lock);
- }
- }
-
- retry++;
- }
-
- d(printf("failed to get lock after %d retries\n", retry));
-
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM, _("Timed out trying to get lock file on %s. Try again later."), path);
- return -1;
-#else /* ! USE_DOT */
- return 0;
-#endif
-}
-
-/**
- * camel_unlock_dot:
- * @path:
- *
- * Attempt to unlock a .lock lock.
- **/
-void
-camel_unlock_dot(const char *path)
-{
-#ifdef USE_DOT
- char *lock;
-
- lock = alloca(strlen(path) + strlen(".lock") + 1);
- sprintf(lock, "%s.lock", path);
- d(printf("unlocking %s\n", lock));
- (void)unlink(lock);
-#endif
-}
-
-/**
- * camel_lock_fcntl:
- * @fd:
- * @type:
- * @ex:
- *
- * Create a lock using fcntl(2).
- *
- * @type is CAMEL_LOCK_WRITE or CAMEL_LOCK_READ,
- * to create exclusive or shared read locks
- *
- * Return value: -1 on error.
- **/
-int
-camel_lock_fcntl(int fd, CamelLockType type, CamelException *ex)
-{
-#ifdef USE_FCNTL
- struct flock lock;
-
- d(printf("fcntl locking %d\n", fd));
-
- memset(&lock, 0, sizeof(lock));
- lock.l_type = type==CAMEL_LOCK_READ?F_RDLCK:F_WRLCK;
- if (fcntl(fd, F_SETLK, &lock) == -1) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM, _("Failed to get lock using fcntl(2): %s"), strerror(errno));
- return -1;
- }
-#endif
- return 0;
-}
-
-/**
- * camel_unlock_fcntl:
- * @fd:
- *
- * Unlock an fcntl lock.
- **/
-void
-camel_unlock_fcntl(int fd)
-{
-#ifdef USE_FCNTL
- struct flock lock;
-
- d(printf("fcntl unlocking %d\n", fd));
-
- memset(&lock, 0, sizeof(lock));
- lock.l_type = F_UNLCK;
- fcntl(fd, F_SETLK, &lock);
-#endif
-}
-
-/**
- * camel_lock_flock:
- * @fd:
- * @type:
- * @ex:
- *
- * Create a lock using flock(2).
- *
- * @type is CAMEL_LOCK_WRITE or CAMEL_LOCK_READ,
- * to create exclusive or shared read locks
- *
- * Return value: -1 on error.
- **/
-int
-camel_lock_flock(int fd, CamelLockType type, CamelException *ex)
-{
-#ifdef USE_FLOCK
- int op;
-
- d(printf("flock locking %d\n", fd));
-
- if (type == CAMEL_LOCK_READ)
- op = LOCK_SH|LOCK_NB;
- else
- op = LOCK_EX|LOCK_NB;
-
- if (flock(fd, op) == -1) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM, _("Failed to get lock using flock(2): %s"), strerror(errno));
- return -1;
- }
-#endif
- return 0;
-}
-
-/**
- * camel_unlock_flock:
- * @fd:
- *
- * Unlock an flock lock.
- **/
-void
-camel_unlock_flock(int fd)
-{
-#ifdef USE_FLOCK
- d(printf("flock unlocking %d\n", fd));
-
- (void)flock(fd, LOCK_UN);
-#endif
-}
-
-/**
- * camel_lock_folder:
- * @path: Path to the file to lock (used for .locking only).
- * @fd: Open file descriptor of the right type to lock.
- * @type: Type of lock, CAMEL_LOCK_READ or CAMEL_LOCK_WRITE.
- * @ex:
- *
- * Attempt to lock a folder, multiple attempts will be made using all
- * locking strategies available.
- *
- * Return value: -1 on error, @ex will describe the locking system that failed.
- **/
-int
-camel_lock_folder(const char *path, int fd, CamelLockType type, CamelException *ex)
-{
- int retry = 0;
-
- while (retry < CAMEL_LOCK_RETRY) {
- if (retry > 0)
- sleep(CAMEL_LOCK_DELAY);
-
- camel_exception_clear(ex);
-
- if (camel_lock_fcntl(fd, type, ex) == 0) {
- if (camel_lock_flock(fd, type, ex) == 0) {
- if (camel_lock_dot(path, ex) == 0)
- return 0;
- camel_unlock_flock(fd);
- }
- camel_unlock_fcntl(fd);
- }
- retry++;
- }
-
- return -1;
-}
-
-/**
- * camel_unlock_folder:
- * @path: Filename of folder.
- * @fd: Open descrptor on which locks were placed.
- *
- * Free a lock on a folder.
- **/
-void
-camel_unlock_folder(const char *path, int fd)
-{
- camel_unlock_dot(path);
- camel_unlock_flock(fd);
- camel_unlock_fcntl(fd);
-}
-
-#if 0
-int main(int argc, char **argv)
-{
- CamelException *ex;
- int fd1, fd2;
-
- ex = camel_exception_new();
-
-#if 0
- if (camel_lock_dot("mylock", ex) == 0) {
- if (camel_lock_dot("mylock", ex) == 0) {
- printf("Got lock twice?\n");
- } else {
- printf("failed to get lock 2: %s\n", camel_exception_get_description(ex));
- }
- camel_unlock_dot("mylock");
- } else {
- printf("failed to get lock 1: %s\n", camel_exception_get_description(ex));
- }
-
- camel_exception_clear(ex);
-#endif
-
- fd1 = open("mylock", O_RDWR);
- fd2 = open("mylock", O_RDWR);
-
- if (camel_lock_fcntl(fd1, CAMEL_LOCK_WRITE, ex) == 0) {
- printf("got fcntl write lock once\n");
- sleep(5);
- if (camel_lock_fcntl(fd2, CAMEL_LOCK_WRITE, ex) == 0) {
- printf("got fcntl write lock twice!\n");
- } else {
- printf("failed to get write lock: %s\n", camel_exception_get_description(ex));
- }
-
- camel_exception_clear(ex);
-
- if (camel_lock_fcntl(fd2, CAMEL_LOCK_READ, ex) == 0) {
- printf("got fcntl read lock as well?\n");
- camel_unlock_fcntl(fd2);
- } else {
- printf("failed to get read lock: %s\n", camel_exception_get_description(ex));
- }
-
- camel_exception_clear(ex);
- camel_unlock_fcntl(fd1);
- } else {
- printf("failed to get write lock at all: %s\n", camel_exception_get_description(ex));
- }
-
- if (camel_lock_fcntl(fd1, CAMEL_LOCK_READ, ex) == 0) {
- printf("got fcntl read lock once\n");
- sleep(5);
- if (camel_lock_fcntl(fd2, CAMEL_LOCK_WRITE, ex) == 0) {
- printf("got fcntl write lock too?!\n");
- } else {
- printf("failed to get write lock: %s\n", camel_exception_get_description(ex));
- }
-
- camel_exception_clear(ex);
-
- if (camel_lock_fcntl(fd2, CAMEL_LOCK_READ, ex) == 0) {
- printf("got fcntl read lock twice\n");
- camel_unlock_fcntl(fd2);
- } else {
- printf("failed to get read lock: %s\n", camel_exception_get_description(ex));
- }
-
- camel_exception_clear(ex);
- camel_unlock_fcntl(fd1);
- }
-
- close(fd1);
- close(fd2);
-
- return 0;
-}
-#endif
diff --git a/camel/camel-lock.h b/camel/camel-lock.h
deleted file mode 100644
index 37da6ea135..0000000000
--- a/camel/camel-lock.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Author: Michael Zucchi <notzed@helixcode.com>
- *
- * Copyright (C) 1999 Helix Code (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_LOCK_H
-#define _CAMEL_LOCK_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include <camel/camel-exception.h>
-
-/* for .lock locking, retry, delay and stale counts */
-#define CAMEL_LOCK_DOT_RETRY (5) /* number of times to retry lock */
-#define CAMEL_LOCK_DOT_DELAY (2) /* delay between locking retries */
-#define CAMEL_LOCK_DOT_STALE (60) /* seconds before a lock becomes stale */
-
-/* for locking folders, retry/interretry delay */
-#define CAMEL_LOCK_RETRY (5) /* number of times to retry lock */
-#define CAMEL_LOCK_DELAY (2) /* delay between locking retries */
-
-typedef enum {
- CAMEL_LOCK_READ,
- CAMEL_LOCK_WRITE,
-} CamelLockType;
-
-/* specific locking strategies */
-int camel_lock_dot(const char *path, CamelException *ex);
-int camel_lock_fcntl(int fd, CamelLockType type, CamelException *ex);
-int camel_lock_flock(int fd, CamelLockType type, CamelException *ex);
-
-void camel_unlock_dot(const char *path);
-void camel_unlock_fcntl(int fd);
-void camel_unlock_flock(int fd);
-
-/* lock a folder in a standard way */
-int camel_lock_folder(const char *path, int fd, CamelLockType type, CamelException *ex);
-void camel_unlock_folder(const char *path, int fd);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* !_CAMEL_LOCK_H */
diff --git a/camel/camel-medium.c b/camel/camel-medium.c
deleted file mode 100644
index a54e5ab721..0000000000
--- a/camel/camel-medium.c
+++ /dev/null
@@ -1,271 +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 <bertrand@helixcode.com>
- * Michael Zucchi <notzed@helixcode.com>
- *
- * 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdio.h>
-#include <ctype.h>
-#include "camel-medium.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 (CAMEL_OBJECT_GET_CLASS(so))
-
-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
-camel_medium_class_init (CamelMediumClass *camel_medium_class)
-{
- /*
- * CamelDataWrapperClass *camel_data_wrapper_class =
- * CAMEL_DATA_WRAPPER_CLASS (camel_medium_class);
- */
-
- parent_class = CAMEL_DATA_WRAPPER_CLASS (camel_type_get_global_classfuncs (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;
-}
-
-static void
-camel_medium_init (gpointer object, gpointer klass)
-{
- CamelMedium *camel_medium = CAMEL_MEDIUM (object);
-
- camel_medium->content = NULL;
-}
-
-static void
-camel_medium_finalize (CamelObject *object)
-{
- CamelMedium *medium = CAMEL_MEDIUM (object);
-
- if (medium->content)
- camel_object_unref (CAMEL_OBJECT (medium->content));
-}
-
-
-CamelType
-camel_medium_get_type (void)
-{
- static CamelType camel_medium_type = CAMEL_INVALID_TYPE;
-
- if (camel_medium_type == CAMEL_INVALID_TYPE) {
- camel_medium_type = camel_type_register (CAMEL_DATA_WRAPPER_TYPE, "medium",
- sizeof (CamelMedium),
- sizeof (CamelMediumClass),
- (CamelObjectClassInitFunc) camel_medium_class_init,
- NULL,
- (CamelObjectInitFunc) camel_medium_init,
- (CamelObjectFinalizeFunc) camel_medium_finalize);
- }
-
- return camel_medium_type;
-}
-
-static void
-add_header (CamelMedium *medium, const gchar *header_name,
- const void *header_value)
-{
- g_warning("No %s::add_header implemented, adding %s", camel_type_to_name(CAMEL_OBJECT_GET_TYPE(medium)), 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 char *header_name, const void *header_value)
-{
- g_warning("No %s::set_header implemented, setting %s", camel_type_to_name(CAMEL_OBJECT_GET_TYPE(medium)), 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. Setting a %NULL header can be used to remove
- * the header also.
- **/
-void
-camel_medium_set_header (CamelMedium *medium, const char *header_name, const void *header_value)
-{
- g_return_if_fail (CAMEL_IS_MEDIUM (medium));
- g_return_if_fail (header_name != NULL);
-
- if (header_value == NULL)
- CM_CLASS(medium)->remove_header(medium, header_name);
- else
- CM_CLASS(medium)->set_header(medium, header_name, header_value);
-}
-
-static void
-remove_header(CamelMedium *medium, const char *header_name)
-{
- g_warning("No %s::remove_header implemented, removing %s", camel_type_to_name(CAMEL_OBJECT_GET_TYPE(medium)), 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 char *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 char *header_name)
-{
- g_warning("No %s::get_header implemented, getting %s", camel_type_to_name(CAMEL_OBJECT_GET_TYPE(medium)), 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 char *header_name)
-{
- g_return_val_if_fail (CAMEL_IS_MEDIUM (medium), NULL);
- g_return_val_if_fail (header_name != NULL, NULL);
-
-#ifndef NO_WARNINGS
-#warning No way to get multi-valued headers?
-#endif
-
- 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)
- camel_object_unref (CAMEL_OBJECT (medium->content));
- camel_object_ref (CAMEL_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 9ce548ba1d..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 <bertrand@helixcode.com>
- * Michael Zucchi <notzed@helixcode.com>
- *
- * 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 <camel/camel-data-wrapper.h>
-
-#define CAMEL_MEDIUM_TYPE (camel_medium_get_type ())
-#define CAMEL_MEDIUM(obj) (CAMEL_CHECK_CAST((obj), CAMEL_MEDIUM_TYPE, CamelMedium))
-#define CAMEL_MEDIUM_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_MEDIUM_TYPE, CamelMediumClass))
-#define CAMEL_IS_MEDIUM(o) (CAMEL_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 Camel function */
-CamelType 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 17e667c5ae..0000000000
--- a/camel/camel-mime-filter-basic.c
+++ /dev/null
@@ -1,222 +0,0 @@
-/*
- * Copyright (C) 2000 Helix Code Inc.
- *
- * Authors: Michael Zucchi <notzed@helixcode.com>
- *
- * 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 reset(CamelMimeFilter *mf);
-static void complete(CamelMimeFilter *mf, char *in, size_t len,
- size_t prespace, char **out,
- size_t *outlen, size_t *outprespace);
-static void filter(CamelMimeFilter *mf, char *in, size_t len,
- size_t prespace, char **out,
- size_t *outlen, size_t *outprespace);
-
-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;
-
-static void
-camel_mime_filter_basic_class_init (CamelMimeFilterBasicClass *klass)
-{
- CamelMimeFilterClass *filter_class = (CamelMimeFilterClass *) klass;
-
- camel_mime_filter_basic_parent = CAMEL_MIME_FILTER_CLASS(camel_type_get_global_classfuncs (camel_mime_filter_get_type ()));
-
- filter_class->reset = reset;
- filter_class->filter = filter;
- filter_class->complete = complete;
-}
-
-static void
-camel_mime_filter_basic_init (CamelMimeFilterBasic *obj)
-{
- obj->state = 0;
- obj->save = 0;
-}
-
-
-CamelType
-camel_mime_filter_basic_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (camel_mime_filter_get_type (), "CamelMimeFilterBasic",
- sizeof (CamelMimeFilterBasic),
- sizeof (CamelMimeFilterBasicClass),
- (CamelObjectClassInitFunc) camel_mime_filter_basic_class_init,
- NULL,
- (CamelObjectInitFunc) camel_mime_filter_basic_init,
- NULL);
- }
-
- return type;
-}
-
-/* should this 'flush' outstanding state/data bytes? */
-static void
-reset(CamelMimeFilter *mf)
-{
- CamelMimeFilterBasic *f = (CamelMimeFilterBasic *)mf;
-
- switch(f->type) {
- case CAMEL_MIME_FILTER_BASIC_QP_ENC:
- f->state = -1;
- break;
- default:
- 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+6, FALSE);
- newlen = base64_encode_close(in, len, TRUE, mf->outbuf, &f->state, &f->save);
- g_assert(newlen <= len*2+6);
- break;
- case CAMEL_MIME_FILTER_BASIC_QP_ENC:
- /* *4 is definetly more than needed ... */
- camel_mime_filter_set_size(mf, len*4+4, FALSE);
- newlen = quoted_encode_close(in, len, mf->outbuf, &f->state, &f->save);
- g_assert(newlen <= len*4+4);
- 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);
- g_assert(newlen <= len);
- 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);
- g_assert(newlen <= len);
- 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+6, FALSE);
- newlen = base64_encode_step(in, len, TRUE, mf->outbuf, &f->state, &f->save);
- g_assert(newlen <= len*2+6);
- break;
- case CAMEL_MIME_FILTER_BASIC_QP_ENC:
- /* *4 is overly conservative, but will do */
- camel_mime_filter_set_size(mf, len*4+4, FALSE);
- newlen = quoted_encode_step(in, len, mf->outbuf, &f->state, &f->save);
- g_assert(newlen <= len*4+4);
- 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);
- g_assert(newlen <= len);
- 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);
- g_assert(newlen <= len);
- 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;
-}
-
-/**
- * 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 ( camel_object_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;
- }
- camel_mime_filter_reset((CamelMimeFilter *)new);
- return new;
-}
-
diff --git a/camel/camel-mime-filter-basic.h b/camel/camel-mime-filter-basic.h
deleted file mode 100644
index f11b7da479..0000000000
--- a/camel/camel-mime-filter-basic.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (C) 2000 Helix Code Inc.
- *
- * Authors: Michael Zucchi <notzed@helixcode.com>
- *
- * 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 <camel/camel-mime-filter.h>
-
-#define CAMEL_MIME_FILTER_BASIC(obj) CAMEL_CHECK_CAST (obj, camel_mime_filter_basic_get_type (), CamelMimeFilterBasic)
-#define CAMEL_MIME_FILTER_BASIC_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_mime_filter_basic_get_type (), CamelMimeFilterBasicClass)
-#define CAMEL_IS_MIME_FILTER_BASIC(obj) CAMEL_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-bestenc.c b/camel/camel-mime-filter-bestenc.c
deleted file mode 100644
index 0c42c5c399..0000000000
--- a/camel/camel-mime-filter-bestenc.c
+++ /dev/null
@@ -1,289 +0,0 @@
-/*
- * Copyright (C) 2000 Helix Code Inc.
- *
- * Authors: Michael Zucchi <notzed@helixcode.com>
- *
- * 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 <string.h>
-
-#include "camel-mime-filter-bestenc.h"
-
-static void camel_mime_filter_bestenc_class_init (CamelMimeFilterBestencClass *klass);
-static void camel_mime_filter_bestenc_init (CamelMimeFilter *obj);
-
-static CamelMimeFilterClass *camel_mime_filter_bestenc_parent;
-
-CamelType
-camel_mime_filter_bestenc_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (camel_mime_filter_get_type (), "CamelMimeFilterBestenc",
- sizeof (CamelMimeFilterBestenc),
- sizeof (CamelMimeFilterBestencClass),
- (CamelObjectClassInitFunc) camel_mime_filter_bestenc_class_init,
- NULL,
- (CamelObjectInitFunc) camel_mime_filter_bestenc_init,
- NULL);
- }
-
- return type;
-}
-
-static void
-reset(CamelMimeFilter *mf)
-{
- CamelMimeFilterBestenc *f = (CamelMimeFilterBestenc *)mf;
-
- f->count0 = 0;
- f->count8 = 0;
- f->countline = 0;
- f->total = 0;
- f->lastc = ~0;
- f->crlfnoorder = FALSE;
- f->fromcount = 0;
- f->hadfrom = FALSE;
- f->startofline = TRUE;
-
- camel_charset_init(&f->charset);
-}
-
-static void
-filter(CamelMimeFilter *mf, char *in, size_t len, size_t prespace, char **out, size_t *outlen, size_t *outprespace)
-{
- CamelMimeFilterBestenc *f = (CamelMimeFilterBestenc *)mf;
- register unsigned char *p, *pend;
-
- if (len == 0)
- goto donothing;
-
- if (f->flags & CAMEL_BESTENC_GET_ENCODING) {
- register unsigned int /* hopefully reg's are assinged in the order they appear? */
- c,
- lastc=f->lastc,
- countline=f->countline,
- count0=f->count0,
- count8 = f->count8;
-
- /* Check ^From lines first call, or have the start of a new line waiting? */
- if ((f->flags & CAMEL_BESTENC_NO_FROM) && !f->hadfrom
- && (f->fromcount > 0 || f->startofline)) {
- if (f->fromcount + len >=5) {
- memcpy(&f->fromsave[f->fromcount], in, 5-f->fromcount);
- f->hadfrom = strncmp(f->fromsave, "From ", 5) == 0;
- f->fromcount = 0;
- } else {
- memcpy(&f->fromsave[f->fromcount], in, len);
- f->fromcount += len;
- }
- }
-
- f->startofline = FALSE;
-
- /* See rfc2045 section 2 for definitions of 7bit/8bit/binary */
- p = in;
- pend = p + len;
- while (p<pend) {
- c = *p++;
- /* check for 8 bit characters */
- if (c & 0x80)
- count8++;
-
- /* check for nul's */
- if (c == 0)
- count0++;
-
- /* check for wild '\r's in a unix format stream */
- if (c == '\r' && (f->flags & CAMEL_BESTENC_LF_IS_CRLF)) {
- f->crlfnoorder = TRUE;
- }
-
- /* check for end of line */
- if (c == '\n') {
- /* check for wild '\n's in canonical format stream */
- if (lastc == '\r' || (f->flags & CAMEL_BESTENC_LF_IS_CRLF)) {
- if (countline > f->maxline)
- f->maxline = countline;
- countline = 0;
-
- /* Check for "^From " lines */
- if ((f->flags & CAMEL_BESTENC_NO_FROM) && !f->hadfrom) {
- if (pend-p >= 5) {
- f->hadfrom = strncmp(p, "From ", 5) == 0;
- } else if (pend-p == 0) {
- f->startofline = TRUE;
- } else {
- f->fromcount = pend-p;
- memcpy(f->fromsave, p, pend-p);
- }
- }
- } else {
- f->crlfnoorder = TRUE;
- }
- } else {
- countline++;
- }
- lastc = c;
- }
- f->count8 = count8;
- f->count0 = count0;
- f->countline = countline;
- f->lastc = lastc;
- }
-
- f->total += len;
-
- if (f->flags & CAMEL_BESTENC_GET_CHARSET)
- camel_charset_step(&f->charset, in, len);
-
-donothing:
- *out = in;
- *outlen = len;
- *outprespace = prespace;
-}
-
-static void
-complete(CamelMimeFilter *mf, char *in, size_t len, size_t prespace, char **out, size_t *outlen, size_t *outprespace)
-{
- CamelMimeFilterBestenc *f = (CamelMimeFilterBestenc *)mf;
-
- filter(mf, in, len, prespace, out, outlen, outprespace);
-
- if (f->countline > f->maxline)
- f->maxline = f->countline;
- f->countline = 0;
-}
-
-static void
-camel_mime_filter_bestenc_class_init (CamelMimeFilterBestencClass *klass)
-{
- CamelMimeFilterClass *filter_class = (CamelMimeFilterClass *) klass;
-
- camel_mime_filter_bestenc_parent = (CamelMimeFilterClass *)(camel_type_get_global_classfuncs (camel_mime_filter_get_type ()));
-
- filter_class->reset = reset;
- filter_class->filter = filter;
- filter_class->complete = complete;
-}
-
-static void
-camel_mime_filter_bestenc_init (CamelMimeFilter *f)
-{
- reset(f);
-}
-
-/**
- * camel_mime_filter_bestenc_new:
- * @flags: A bitmask of data required.
- *
- * Create a new CamelMimeFilterBestenc object.
- *
- * Return value:
- **/
-CamelMimeFilterBestenc *
-camel_mime_filter_bestenc_new (unsigned int flags)
-{
- CamelMimeFilterBestenc *new = (CamelMimeFilterBestenc *)camel_object_new(camel_mime_filter_bestenc_get_type());
- new->flags = flags;
- return new;
-}
-
-/**
- * camel_mime_filter_bestenc_get_best_encoding:
- * @f:
- * @required: maximum level of output encoding allowed.
- *
- * Return the best encoding, given specific constraints, that can be used to
- * encode a stream of bytes.
- *
- * Return value:
- **/
-CamelMimePartEncodingType
-camel_mime_filter_bestenc_get_best_encoding(CamelMimeFilterBestenc *f, CamelBestencEncoding required)
-{
- CamelMimePartEncodingType bestenc;
-
-#if 0
- printf("count0 = %d, count8 = %d, total = %d\n", f->count0, f->count8, f->total);
- printf("maxline = %d, crlfnoorder = %s\n", f->maxline, f->crlfnoorder?"TRUE":"FALSE");
- printf(" %d%% require encoding?\n", (f->count0+f->count8)*100 / f->total);
-#endif
-
- /* if we're not allowed to have From lines and we had one, use an encoding
- that will never let it show. Unfortunately only base64 can at present,
- although qp could be modified to allow it too */
- if ((f->flags & CAMEL_BESTENC_NO_FROM) && f->hadfrom)
- return CAMEL_MIME_PART_ENCODING_BASE64;
-
- /* if we need to encode, see how we do it */
- if (required == CAMEL_BESTENC_BINARY)
- bestenc = CAMEL_MIME_PART_ENCODING_BINARY;
- else if (f->count8 + f->count0 >= (f->total*17/100))
- bestenc = CAMEL_MIME_PART_ENCODING_BASE64;
- else
- bestenc = CAMEL_MIME_PART_ENCODING_QUOTEDPRINTABLE;
-
- /* if we have nocrlf order, or long lines, we need to encode always */
- if (f->crlfnoorder || f->maxline >= 998)
- return bestenc;
-
- /* if we have no 8 bit chars or nul's, we can just use 7 bit */
- if (f->count8 + f->count0 == 0)
- return CAMEL_MIME_PART_ENCODING_7BIT;
-
- /* otherwise, we see if we can use 8 bit, or not */
- switch(required) {
- case CAMEL_BESTENC_7BIT:
- return bestenc;
- case CAMEL_BESTENC_8BIT:
- case CAMEL_BESTENC_BINARY:
- if (f->count0 == 0)
- return CAMEL_MIME_PART_ENCODING_8BIT;
- else
- return bestenc;
- }
-
- return CAMEL_MIME_PART_ENCODING_DEFAULT;
-}
-
-/**
- * camel_mime_filter_bestenc_get_best_charset:
- * @f:
- *
- * Gets the best charset that can be used to contain this content.
- *
- * Return value:
- **/
-const char *
-camel_mime_filter_bestenc_get_best_charset(CamelMimeFilterBestenc *f)
-{
- return camel_charset_best_name(&f->charset);
-}
-
-/**
- * camel_mime_filter_bestenc_set_flags:
- * @f:
- * @flags:
- *
- * Set the flags for subsequent operations.
- **/
-void
-camel_mime_filter_bestenc_set_flags(CamelMimeFilterBestenc *f, unsigned int flags)
-{
- f->flags = flags;
-}
diff --git a/camel/camel-mime-filter-bestenc.h b/camel/camel-mime-filter-bestenc.h
deleted file mode 100644
index de8caec191..0000000000
--- a/camel/camel-mime-filter-bestenc.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (C) 2000 Helix Code Inc.
- *
- * Authors: Michael Zucchi <notzed@helixcode.com>
- *
- * 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_BESTENC_H
-#define _CAMEL_MIME_FILTER_BESTENC_H
-
-#include <camel/camel-mime-filter.h>
-#include <camel/camel-mime-part.h>
-#include <camel/camel-charset-map.h>
-
-#define CAMEL_MIME_FILTER_BESTENC(obj) CAMEL_CHECK_CAST (obj, camel_mime_filter_bestenc_get_type (), CamelMimeFilterBestenc)
-#define CAMEL_MIME_FILTER_BESTENC_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_mime_filter_bestenc_get_type (), CamelMimeFilterBestencClass)
-#define CAMEL_IS_MIME_FILTER_BESTENC(obj) CAMEL_CHECK_TYPE (obj, camel_mime_filter_bestenc_get_type ())
-
-typedef struct _CamelMimeFilterBestencClass CamelMimeFilterBestencClass;
-
-enum _CamelBestencRequired {
- CAMEL_BESTENC_GET_ENCODING = 1<<0,
- CAMEL_BESTENC_GET_CHARSET = 1<<1,
-
- /* do we treat 'lf' as if it were crlf? */
- CAMEL_BESTENC_LF_IS_CRLF = 1<<8,
- /* do we not allow "From " to appear at the start of a line in any part? */
- CAMEL_BESTENC_NO_FROM = 1<<9,
-};
-typedef enum _CamelBestencRequired CamelBestencRequired;
-
-enum _CamelBestencEncoding {
- CAMEL_BESTENC_7BIT,
- CAMEL_BESTENC_8BIT,
- CAMEL_BESTENC_BINARY,
-};
-typedef enum _CamelBestencEncoding CamelBestencEncoding;
-
-struct _CamelMimeFilterBestenc {
- CamelMimeFilter parent;
-
- unsigned int flags; /* our creation flags, see above */
-
- unsigned int count0; /* count of NUL characters */
- unsigned int count8; /* count of 8 bit characters */
- unsigned int total; /* total characters read */
-
- unsigned int lastc; /* the last character read */
- int crlfnoorder; /* if crlf's occured where they shouldn't have */
-
- int startofline; /* are we at the start of a new line? */
-
- int fromcount;
- char fromsave[6]; /* save a few characters if we found an \nF near the end of the buffer */
- int hadfrom; /* did we encounter a "\nFrom " in the data? */
-
- unsigned int countline; /* current count of characters on a given line */
- unsigned int maxline; /* max length of any line */
-
- CamelCharset charset; /* used to determine the best charset to use */
-};
-
-struct _CamelMimeFilterBestencClass {
- CamelMimeFilterClass parent_class;
-};
-
-guint camel_mime_filter_bestenc_get_type (void);
-CamelMimeFilterBestenc *camel_mime_filter_bestenc_new (unsigned int flags);
-
-
-CamelMimePartEncodingType camel_mime_filter_bestenc_get_best_encoding(CamelMimeFilterBestenc *f, CamelBestencEncoding required);
-const char * camel_mime_filter_bestenc_get_best_charset(CamelMimeFilterBestenc *f);
-void camel_mime_filter_bestenc_set_flags(CamelMimeFilterBestenc *f, unsigned int flags);
-
-#endif /* ! _CAMEL_MIME_FILTER_BESTENC_H */
diff --git a/camel/camel-mime-filter-charset.c b/camel/camel-mime-filter-charset.c
deleted file mode 100644
index 6c1f668713..0000000000
--- a/camel/camel-mime-filter-charset.c
+++ /dev/null
@@ -1,243 +0,0 @@
-/*
- * Copyright (C) 2000 Helix Code Inc.
- *
- * Authors: Michael Zucchi <notzed@helixcode.com>
- *
- * 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 <iconv.h>
-
-#include <string.h>
-#include <errno.h>
-
-#include "camel-mime-filter-charset.h"
-
-#define d(x)
-
-static void camel_mime_filter_charset_class_init (CamelMimeFilterCharsetClass *klass);
-static void camel_mime_filter_charset_init (CamelMimeFilterCharset *obj);
-static void camel_mime_filter_charset_finalize (CamelObject *o);
-
-static CamelMimeFilterClass *camel_mime_filter_charset_parent;
-
-CamelType
-camel_mime_filter_charset_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (camel_mime_filter_get_type (), "CamelMimeFilterCharset",
- sizeof (CamelMimeFilterCharset),
- sizeof (CamelMimeFilterCharsetClass),
- (CamelObjectClassInitFunc) camel_mime_filter_charset_class_init,
- NULL,
- (CamelObjectInitFunc) camel_mime_filter_charset_init,
- (CamelObjectFinalizeFunc) camel_mime_filter_charset_finalize);
- }
-
- return type;
-}
-
-static void
-camel_mime_filter_charset_finalize(CamelObject *o)
-{
- CamelMimeFilterCharset *f = (CamelMimeFilterCharset *)o;
-
- g_free(f->from);
- g_free(f->to);
- if (f->ic != (iconv_t)-1) {
- iconv_close(f->ic);
- f->ic = (iconv_t) -1;
- }
-}
-
-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 != (iconv_t) -1) {
- buffer = buf;
- 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;
- const char *inbuf;
- char *outbuf;
- int inlen, outlen;
-
- if (f->ic == (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+16, FALSE);
- inbuf = in;
- inlen = len;
- outbuf = mf->outbuf;
- outlen = mf->outsize;
-
- /* temporary fix to find another bug somewhere */
- d(memset(outbuf, 0, outlen));
-
- if (inlen>0) {
- converted = 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 = iconv(f->ic, NULL, 0, &outbuf, &outlen);
- if (converted == -1) {
- g_warning("Conversion failed to complete: %s", strerror(errno));
- }
-
- /* debugging assertion - check for NUL's in output */
- d({
- int i;
-
- for (i=0;i<(mf->outsize - outlen);i++) {
- g_assert(mf->outbuf[i]);
- }
- });
-
- *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;
- const char *inbuf;
- char *outbuf;
- int inlen, outlen;
-
- if (f->ic == (iconv_t) -1) {
- goto donothing;
- }
-
- /* FIXME: there's probably a safer way to size this ...? */
- camel_mime_filter_set_size(mf, len*5+16, FALSE);
- inbuf = in;
- inlen = len;
- outbuf = mf->outbuf;
- outlen = mf->outsize;
- converted = 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)
-{
- CamelMimeFilterClass *filter_class = (CamelMimeFilterClass *) klass;
-
- camel_mime_filter_charset_parent = CAMEL_MIME_FILTER_CLASS (camel_type_get_global_classfuncs (camel_mime_filter_get_type ()));
-
- filter_class->reset = reset;
- filter_class->filter = filter;
- filter_class->complete = complete;
-}
-
-static void
-camel_mime_filter_charset_init (CamelMimeFilterCharset *obj)
-{
- obj->ic = (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 ( camel_object_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 ( camel_object_new (camel_mime_filter_charset_get_type ()));
-
- new->ic = iconv_open(to_charset, from_charset);
- if (new->ic == (iconv_t) -1) {
- g_warning("Cannot create charset conversion from %s to %s: %s", from_charset, to_charset, strerror(errno));
- camel_object_unref((CamelObject *)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 ba1586ca7a..0000000000
--- a/camel/camel-mime-filter-charset.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (C) 2000 Helix Code Inc.
- *
- * Authors: Michael Zucchi <notzed@helixcode.com>
- *
- * 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 <camel/camel-mime-filter.h>
-#include <unicode.h>
-
-#define CAMEL_MIME_FILTER_CHARSET(obj) CAMEL_CHECK_CAST (obj, camel_mime_filter_charset_get_type (), CamelMimeFilterCharset)
-#define CAMEL_MIME_FILTER_CHARSET_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_mime_filter_charset_get_type (), CamelMimeFilterCharsetClass)
-#define CAMEL_IS_MIME_FILTER_CHARSET(obj) CAMEL_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-crlf.c b/camel/camel-mime-filter-crlf.c
deleted file mode 100644
index b6ae095810..0000000000
--- a/camel/camel-mime-filter-crlf.c
+++ /dev/null
@@ -1,150 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000 Helix Code, Inc.
- *
- * Authors: Dan Winship <danw@helixcode.com>
- * Jeffrey Stedfast <fejj@helixcode.com>
- *
- * 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-crlf.h"
-
-static void filter (CamelMimeFilter *f, char *in, size_t len, size_t prespace,
- char **out, size_t *outlen, size_t *outprespace);
-static void complete (CamelMimeFilter *f, char *in, size_t len,
- size_t prespace, char **out, size_t *outlen,
- size_t *outprespace);
-static void reset (CamelMimeFilter *f);
-
-
-static void
-camel_mime_filter_crlf_class_init (CamelMimeFilterCRLFClass *klass)
-{
- CamelMimeFilterClass *mime_filter_class =
- (CamelMimeFilterClass *) klass;
-
- mime_filter_class->filter = filter;
- mime_filter_class->complete = complete;
- mime_filter_class->reset = reset;
-}
-
-CamelType
-camel_mime_filter_crlf_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (camel_mime_filter_get_type(), "CamelMimeFilterCRLF",
- sizeof (CamelMimeFilterCRLF),
- sizeof (CamelMimeFilterCRLFClass),
- (CamelObjectClassInitFunc) camel_mime_filter_crlf_class_init,
- NULL,
- NULL,
- NULL);
- }
-
- return type;
-}
-
-static void
-filter (CamelMimeFilter *f, char *in, size_t len, size_t prespace,
- char **out, size_t *outlen, size_t *outprespace)
-{
- CamelMimeFilterCRLF *crlf = (CamelMimeFilterCRLF *)f;
- gboolean do_dots;
- char *p, *q;
-
- do_dots = crlf->mode == CAMEL_MIME_FILTER_CRLF_MODE_CRLF_DOTS;
-
- if (crlf->direction == CAMEL_MIME_FILTER_CRLF_ENCODE) {
- camel_mime_filter_set_size (f, 3 * len, FALSE);
-
- p = in;
- q = f->outbuf;
- while (p < in + len) {
- if (*p == '\n')
- *q++ = '\r';
- else
- if (do_dots && *p == '.' && (p == in || *(p - 1) == '\n'))
- *q++ = '.';
- *q++ = *p++;
- }
- } else {
- camel_mime_filter_set_size (f, len, FALSE);
-
- p = in;
- q = f->outbuf;
- while (p < in + len) {
- if (*p == '\r') {
- crlf->saw_cr = TRUE;
- } else {
- if (crlf->saw_cr) {
- if (*p != '\n')
- *q++ = '\r';
- crlf->saw_cr = FALSE;
- }
- *q++ = *p;
- }
-
- if (do_dots) {
- if (*p == '.' && (p == in || *(p - 1) == '\n')) {
- crlf->saw_dot = TRUE;
- } else {
- if (crlf->saw_dot) {
- if (*p == '.')
- p++;
- crlf->saw_dot = FALSE;
- }
- *q++ = *p;
- }
- }
-
- p++;
- }
- }
-
- *out = f->outbuf;
- *outlen = q - f->outbuf;
- *outprespace = f->outpre;
-}
-
-static void
-complete (CamelMimeFilter *f, char *in, size_t len, size_t prespace,
- char **out, size_t *outlen, size_t *outprespace)
-{
- if (len)
- filter (f, in, len, prespace, out, outlen, outprespace);
-}
-
-static void
-reset (CamelMimeFilter *f)
-{
- CamelMimeFilterCRLF *crlf = (CamelMimeFilterCRLF *)f;
-
- crlf->saw_cr = FALSE;
-}
-
-CamelMimeFilter *
-camel_mime_filter_crlf_new (CamelMimeFilterCRLFDirection direction, CamelMimeFilterCRLFMode mode)
-{
- CamelMimeFilterCRLF *crlf = CAMEL_MIME_FILTER_CRLF(camel_object_new (CAMEL_MIME_FILTER_CRLF_TYPE));
-
- crlf->direction = direction;
- crlf->mode = mode;
- crlf->saw_cr = FALSE;
-
- return (CamelMimeFilter *)crlf;
-}
diff --git a/camel/camel-mime-filter-crlf.h b/camel/camel-mime-filter-crlf.h
deleted file mode 100644
index 6ba109d154..0000000000
--- a/camel/camel-mime-filter-crlf.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000 Helix Code Inc.
- *
- * Authors: Dan Winship <danw@helixcode.com>
- * Jeffrey Stedfast <fejj@helixcode.com>
- *
- * 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_CRLF_H
-#define _CAMEL_MIME_FILTER_CRLF_H
-
-#include <camel/camel-mime-filter.h>
-
-#define CAMEL_MIME_FILTER_CRLF_TYPE (camel_mime_filter_crlf_get_type ())
-#define CAMEL_MIME_FILTER_CRLF(obj) CAMEL_CHECK_CAST (obj, CAMEL_MIME_FILTER_CRLF_TYPE, CamelMimeFilterCRLF)
-#define CAMEL_MIME_FILTER_CRLF_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, CAMEL_MIME_FILTER_CRLF_TYPE, CamelMimeFilterCRLFClass)
-#define CAMEL_IS_MIME_FILTER_CRLF(obj) CAMEL_CHECK_TYPE (obj, CAMEL_MIME_FILTER_CRLF_TYPE)
-
-typedef struct _CamelMimeFilterCRLFClass CamelMimeFilterCRLFClass;
-
-typedef enum {
- CAMEL_MIME_FILTER_CRLF_ENCODE,
- CAMEL_MIME_FILTER_CRLF_DECODE
-} CamelMimeFilterCRLFDirection;
-
-typedef enum {
- CAMEL_MIME_FILTER_CRLF_MODE_CRLF_DOTS,
- CAMEL_MIME_FILTER_CRLF_MODE_CRLF_ONLY,
-} CamelMimeFilterCRLFMode;
-
-struct _CamelMimeFilterCRLF {
- CamelMimeFilter parent;
-
- CamelMimeFilterCRLFDirection direction;
- CamelMimeFilterCRLFMode mode;
- gboolean saw_cr;
- gboolean saw_dot;
-};
-
-struct _CamelMimeFilterCRLFClass {
- CamelMimeFilterClass parent_class;
-};
-
-CamelType camel_mime_filter_crlf_get_type (void);
-
-CamelMimeFilter *camel_mime_filter_crlf_new (CamelMimeFilterCRLFDirection direction, CamelMimeFilterCRLFMode mode);
-
-#endif /* ! _CAMEL_MIME_FILTER_CRLF_H */
diff --git a/camel/camel-mime-filter-from.c b/camel/camel-mime-filter-from.c
deleted file mode 100644
index 2678294f03..0000000000
--- a/camel/camel-mime-filter-from.c
+++ /dev/null
@@ -1,221 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000 Helix Code Inc.
- *
- * Authors: Michael Zucchi <notzed@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 <string.h>
-#include "camel-mime-filter-from.h"
-
-#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 CamelMimeFilterClass *camel_mime_filter_from_parent;
-
-CamelType
-camel_mime_filter_from_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (camel_mime_filter_get_type (), "CamelMimeFilterFrom",
- sizeof (CamelMimeFilterFrom),
- sizeof (CamelMimeFilterFromClass),
- (CamelObjectClassInitFunc) camel_mime_filter_from_class_init,
- NULL,
- (CamelObjectInitFunc) camel_mime_filter_from_init,
- NULL);
- }
-
- 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<inend) {
- register int c = -1;
-
- if (midline)
- while (inptr < inend && (c = *inptr++) != '\n')
- ;
-
- if (c == '\n' || !midline) {
- left = inend-inptr;
- if (left > 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)
-{
- CamelMimeFilterClass *filter_class = (CamelMimeFilterClass *) klass;
-
- camel_mime_filter_from_parent = CAMEL_MIME_FILTER_CLASS (camel_type_get_global_classfuncs (camel_mime_filter_get_type ()));
-
- filter_class->filter = filter;
- filter_class->complete = complete;
-}
-
-static void
-camel_mime_filter_from_init (CamelMimeFilterFrom *obj)
-{
- struct _CamelMimeFilterFromPrivate *p;
-
- p = _PRIVATE(obj) = g_malloc0(sizeof(*p));
- obj->midline = FALSE;
-}
-
-/**
- * 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 ( camel_object_new (camel_mime_filter_from_get_type ()));
- return new;
-}
-
-#if 0
-
-#include <stdio.h>
-
-int main(int argc, char **argv)
-{
- CamelMimeFilterFrom *f;
- char *buffer;
- int len, prespace;
-
- g_tk_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 730f92f5e4..0000000000
--- a/camel/camel-mime-filter-from.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (C) 2000 Helix Code Inc.
- *
- * Authors: Michael Zucchi <notzed@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_FILTER_FROM_H
-#define _CAMEL_MIME_FILTER_FROM_H
-
-#include <camel/camel-mime-filter.h>
-
-#define CAMEL_MIME_FILTER_FROM(obj) CAMEL_CHECK_CAST (obj, camel_mime_filter_from_get_type (), CamelMimeFilterFrom)
-#define CAMEL_MIME_FILTER_FROM_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_mime_filter_from_get_type (), CamelMimeFilterFromClass)
-#define CAMEL_IS_MIME_FILTER_FROM(obj) CAMEL_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-html.c b/camel/camel-mime-filter-html.c
deleted file mode 100644
index 06d0ef252b..0000000000
--- a/camel/camel-mime-filter-html.c
+++ /dev/null
@@ -1,322 +0,0 @@
-/*
- * Copyright (C) 2001 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@helixcode.com>
- *
- * 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-html.h"
-
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdlib.h>
-
-#include "xmlmemory.h"
-#include "HTMLparser.h"
-#include "HTMLtree.h"
-
-#define d(x)
-
-static void camel_mime_filter_html_class_init (CamelMimeFilterHTMLClass *klass);
-static void camel_mime_filter_html_init (CamelObject *o);
-static void camel_mime_filter_html_finalize (CamelObject *o);
-
-static CamelMimeFilterClass *camel_mime_filter_html_parent;
-
-struct _CamelMimeFilterHTMLPrivate {
- htmlParserCtxtPtr ctxt;
-};
-
-/* ********************************************************************** */
-
-/* HTML parser */
-
-#define ARRAY_LEN(x) (sizeof(x)/sizeof((x)[0]))
-
-static struct {
- char *element;
- char *remap;
-} map_start[] = {
- { "p", "\n\n" },
- { "br", "\n" },
- { "h1", "\n" }, { "h2", "\n" }, { "h3", "\n" }, { "h4", "\n" }, { "h5", "\n" }, { "h6", "\n" },
-};
-
-
-static struct {
- char *element;
- char *remap;
-} map_end[] = {
- { "h1", "\n" }, { "h2", "\n" }, { "h3", "\n" }, { "h4", "\n" }, { "h5", "\n" }, { "h6", "\n" },
-};
-
-static void
-characters(void *ctx, const xmlChar *ch, int len)
-{
- CamelMimeFilter *mf = ctx;
-
- memcpy(mf->outptr, ch, len);
- mf->outptr+= len;
-}
-
-#if 0
-/* we probably dont want to index comments */
-static void
-comment(void *ctx, const xmlChar *value)
-{
- CamelMimeFilter *mf = ctx;
-
- mf->outptr += sprintf(mf->outptr, " %s \n", value);
-}
-#endif
-
-/* we map element starts to stuff sometimes, so we can properly break up
- words and lines.
- This is very dumb, and needs to be smarter: e.g.
- <b>F</b>\nooBar should -> "FooBar"
-*/
-static void
-startElement(void *ctx, const xmlChar *name, const xmlChar **atts)
-{
- int i;
- CamelMimeFilter *mf = ctx;
-
- /* we grab all "content" from "meta" tags, and dump it in the output,
- it might be useful for searching with. This should probably be pickier */
- if (!strcasecmp(name, "meta")) {
- if (atts) {
- for (i=0;atts[i];i+=2) {
- if (!strcmp(atts[i], "content"))
- mf->outptr += sprintf(mf->outptr, " %s \n", atts[i+1]);
- }
- }
- return;
- }
-
- /* FIXME: use a hashtable */
- for (i=0;i<ARRAY_LEN(map_start);i++) {
- if (!strcasecmp(map_start[i].element, name)) {
- characters(ctx, map_start[i].remap, strlen(map_start[i].remap));
- break;
- }
- }
-}
-
-static void
-endElement(void *ctx, const xmlChar *name)
-{
- int i;
-
- /* FIXME: use a hashtable */
- for (i=0;i<ARRAY_LEN(map_end);i++) {
- if (!strcasecmp(map_end[i].element, name)) {
- characters(ctx, map_end[i].remap, strlen(map_end[i].remap));
- break;
- }
- }
-}
-
-/* dum de dum, well we can print out some crap for now */
-static void
-warning(void *ctx, const char *msg, ...)
-{
- va_list args;
-
- va_start(args, msg);
- fprintf(stdout, "SAX.warning: ");
- vfprintf(stdout, msg, args);
- va_end(args);
-}
-
-static void
-error(void *ctx, const char *msg, ...)
-{
- va_list args;
-
- va_start(args, msg);
- fprintf(stdout, "SAX.error: ");
- vfprintf(stdout, msg, args);
- va_end(args);
-}
-
-static void
-fatalError(void *ctx, const char *msg, ...)
-{
- va_list args;
-
- va_start(args, msg);
- fprintf(stdout, "SAX.fatalError: ");
- vfprintf(stdout, msg, args);
- va_end(args);
-}
-
-static xmlSAXHandler indexSAXHandler = {
- NULL, /* internalSubset */
- NULL, /*isStandalone,*/
- NULL, /*hasInternalSubset,*/
- NULL, /*hasExternalSubset,*/
- NULL, /*resolveEntity,*/
- NULL, /*getEntity,*/
- NULL, /*entityDecl,*/
- NULL, /*notationDecl,*/
- NULL, /*attributeDecl,*/
- NULL, /*elementDecl,*/
- NULL, /*unparsedEntityDecl,*/
- NULL, /*setDocumentLocator,*/
- NULL, /*startDocument,*/
- NULL, /*endDocument,*/
- startElement,
- endElement,
- NULL, /*reference,*/
- characters,
- NULL, /*ignorableWhitespace,*/
- NULL, /*processingInstruction,*/
- NULL, /*comment,*/
- warning,
- error,
- fatalError,
- NULL, /*getParameterEntity,*/
-};
-
-
-/* ********************************************************************** */
-
-
-CamelType
-camel_mime_filter_html_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (camel_mime_filter_get_type (), "CamelMimeFilterHTML",
- sizeof (CamelMimeFilterHTML),
- sizeof (CamelMimeFilterHTMLClass),
- (CamelObjectClassInitFunc) camel_mime_filter_html_class_init,
- NULL,
- (CamelObjectInitFunc) camel_mime_filter_html_init,
- (CamelObjectFinalizeFunc) camel_mime_filter_html_finalize);
- }
-
- return type;
-}
-
-static void
-camel_mime_filter_html_finalize(CamelObject *o)
-{
- CamelMimeFilterHTML *f = (CamelMimeFilterHTML *)o;
-
- if (f->priv->ctxt)
- htmlFreeParserCtxt(f->priv->ctxt);
-}
-
-static void
-camel_mime_filter_html_init (CamelObject *o)
-{
- CamelMimeFilterHTML *f = (CamelMimeFilterHTML *)o;
-
- f->priv = g_malloc0(sizeof(*f->priv));
-}
-
-static void
-complete(CamelMimeFilter *mf, char *in, size_t len, size_t prespace, char **out, size_t *outlenptr, size_t *outprespace)
-{
- CamelMimeFilterHTML *f = (CamelMimeFilterHTML *)mf;
-
- camel_mime_filter_set_size(mf, len*2+256, FALSE);
- mf->outptr = mf->outbuf;
-
- d(printf("converting html end:\n%.*s\n", (int)len, in));
-
- if (f->priv->ctxt == NULL) {
- f->priv->ctxt = htmlCreatePushParserCtxt(&indexSAXHandler, f, in, len, "", 0);
- len = 0;
- }
-
- htmlParseChunk(f->priv->ctxt, in, len, 1);
-
- *out = mf->outbuf;
- *outlenptr = mf->outptr - mf->outbuf;
- *outprespace = mf->outbuf - mf->outreal;
-
- d(printf("converted html end:\n%.*s\n", (int)*outlenptr, *out));
-}
-
-static void
-filter(CamelMimeFilter *mf, char *in, size_t len, size_t prespace, char **out, size_t *outlenptr, size_t *outprespace)
-{
- CamelMimeFilterHTML *f = (CamelMimeFilterHTML *)mf;
-
- camel_mime_filter_set_size(mf, len*2+16, FALSE);
- mf->outptr = mf->outbuf;
-
- d(printf("converting html:\n%.*s\n", (int)len, in));
-
- if (f->priv->ctxt == NULL)
- f->priv->ctxt = htmlCreatePushParserCtxt(&indexSAXHandler, f, in, len, "", 0);
- else
- htmlParseChunk(f->priv->ctxt, in, len, 0);
-
- *out = mf->outbuf;
- *outlenptr = mf->outptr - mf->outbuf;
- *outprespace = mf->outbuf - mf->outreal;
-
- d(printf("converted html:\n%.*s\n", (int)*outlenptr, *out));
-}
-
-static void
-reset(CamelMimeFilter *mf)
-{
- CamelMimeFilterHTML *f = (CamelMimeFilterHTML *)mf;
-
- if (f->priv->ctxt != NULL) {
- htmlFreeParserCtxt(f->priv->ctxt);
- f->priv->ctxt = NULL;
- }
-}
-
-static void
-camel_mime_filter_html_class_init (CamelMimeFilterHTMLClass *klass)
-{
- CamelMimeFilterClass *filter_class = (CamelMimeFilterClass *) klass;
-
- camel_mime_filter_html_parent = CAMEL_MIME_FILTER_CLASS (camel_type_get_global_classfuncs (camel_mime_filter_get_type ()));
-
- filter_class->reset = reset;
- filter_class->filter = filter;
- filter_class->complete = complete;
-}
-
-/**
- * camel_mime_filter_html_new:
- *
- * Create a new CamelMimeFilterHTML object.
- *
- * Return value: A new CamelMimeFilterHTML widget.
- **/
-CamelMimeFilterHTML *
-camel_mime_filter_html_new (void)
-{
- CamelMimeFilterHTML *new = CAMEL_MIME_FILTER_HTML ( camel_object_new (camel_mime_filter_html_get_type ()));
- return new;
-}
-
diff --git a/camel/camel-mime-filter-html.h b/camel/camel-mime-filter-html.h
deleted file mode 100644
index 3bac437f63..0000000000
--- a/camel/camel-mime-filter-html.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (C) 2001 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@helixcode.com>
- *
- * 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_HTML_H
-#define _CAMEL_MIME_FILTER_HTML_H
-
-#include <camel/camel-mime-filter.h>
-
-#define CAMEL_MIME_FILTER_HTML(obj) CAMEL_CHECK_CAST (obj, camel_mime_filter_html_get_type (), CamelMimeFilterHTML)
-#define CAMEL_MIME_FILTER_HTML_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_mime_filter_html_get_type (), CamelMimeFilterHTMLClass)
-#define CAMEL_IS_MIME_FILTER_HTML(obj) CAMEL_CHECK_TYPE (obj, camel_mime_filter_html_get_type ())
-
-typedef struct _CamelMimeFilterHTMLClass CamelMimeFilterHTMLClass;
-typedef struct _CamelMimeFilterHTML CamelMimeFilterHTML;
-
-struct _CamelMimeFilterHTML {
- CamelMimeFilter parent;
-
- struct _CamelMimeFilterHTMLPrivate *priv;
-};
-
-struct _CamelMimeFilterHTMLClass {
- CamelMimeFilterClass parent_class;
-};
-
-guint camel_mime_filter_html_get_type (void);
-CamelMimeFilterHTML *camel_mime_filter_html_new (void);
-
-#endif /* ! _CAMEL_MIME_FILTER_HTML_H */
diff --git a/camel/camel-mime-filter-index.c b/camel/camel-mime-filter-index.c
deleted file mode 100644
index 46e0f3f5e8..0000000000
--- a/camel/camel-mime-filter-index.c
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * Copyright (C) 2000 Helix Code Inc.
- *
- * Authors: Michael Zucchi <notzed@helixcode.com>
- *
- * 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_finalize (CamelObject *o);
-
-static CamelMimeFilterClass *camel_mime_filter_index_parent;
-
-CamelType
-camel_mime_filter_index_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (camel_mime_filter_get_type (), "CamelMimeFilterIndex",
- sizeof (CamelMimeFilterIndex),
- sizeof (CamelMimeFilterIndexClass),
- (CamelObjectClassInitFunc) camel_mime_filter_index_class_init,
- NULL,
- NULL,
- (CamelObjectFinalizeFunc) camel_mime_filter_index_finalize);
- }
-
- return type;
-}
-
-static void
-camel_mime_filter_index_finalize(CamelObject *o)
-{
- CamelMimeFilterIndex *f = (CamelMimeFilterIndex *)o;
-
- g_free(f->name);
- f->index = NULL; /* ibex's need refcounting? */
-}
-
-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)
-{
- CamelMimeFilterClass *filter_class = (CamelMimeFilterClass *) klass;
-
- camel_mime_filter_index_parent = CAMEL_MIME_FILTER_CLASS (camel_type_get_global_classfuncs (camel_mime_filter_get_type ()));
-
- /*filter_class->reset = reset;*/
- filter_class->filter = filter;
- filter_class->complete = complete;
-}
-
-/**
- * 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 ( camel_object_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 e7733bd4ca..0000000000
--- a/camel/camel-mime-filter-index.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (C) 2000 Helix Code Inc.
- *
- * Authors: Michael Zucchi <notzed@helixcode.com>
- *
- * 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 <camel/camel-mime-filter.h>
-#include <libibex/ibex.h>
-
-#define CAMEL_MIME_FILTER_INDEX(obj) CAMEL_CHECK_CAST (obj, camel_mime_filter_index_get_type (), CamelMimeFilterIndex)
-#define CAMEL_MIME_FILTER_INDEX_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_mime_filter_index_get_type (), CamelMimeFilterIndexClass)
-#define CAMEL_IS_MIME_FILTER_INDEX(obj) CAMEL_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-linewrap.c b/camel/camel-mime-filter-linewrap.c
deleted file mode 100644
index ea06566688..0000000000
--- a/camel/camel-mime-filter-linewrap.c
+++ /dev/null
@@ -1,140 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000 Helix Code, Inc.
- *
- * Authors: Jeffrey Stedfast <fejj@helixcode.com>
- *
- * 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 <ctype.h>
-#include "camel-mime-filter-linewrap.h"
-
-static void filter (CamelMimeFilter *f, char *in, size_t len, size_t prespace,
- char **out, size_t *outlen, size_t *outprespace);
-static void complete (CamelMimeFilter *f, char *in, size_t len,
- size_t prespace, char **out, size_t *outlen,
- size_t *outprespace);
-static void reset (CamelMimeFilter *f);
-
-
-static void
-camel_mime_filter_linewrap_class_init (CamelMimeFilterLinewrapClass *klass)
-{
- CamelMimeFilterClass *mime_filter_class =
- (CamelMimeFilterClass *) klass;
-
- mime_filter_class->filter = filter;
- mime_filter_class->complete = complete;
- mime_filter_class->reset = reset;
-}
-
-CamelType
-camel_mime_filter_linewrap_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (camel_mime_filter_get_type(), "CamelMimeFilterLinewrap",
- sizeof (CamelMimeFilterLinewrap),
- sizeof (CamelMimeFilterLinewrapClass),
- (CamelObjectClassInitFunc) camel_mime_filter_linewrap_class_init,
- NULL,
- NULL,
- NULL);
- }
-
- return type;
-}
-
-static void
-filter (CamelMimeFilter *f, char *in, size_t len, size_t prespace,
- char **out, size_t *outlen, size_t *outprespace)
-{
- CamelMimeFilterLinewrap *linewrap = (CamelMimeFilterLinewrap *)f;
- char *inend, *last, *p, *q;
- int nchars = linewrap->nchars;
-
- /* we'll be adding chars here so we need a bigger buffer */
- camel_mime_filter_set_size (f, 3 * len, FALSE);
-
- p = in;
- q = f->outbuf;
- inend = in + len;
-
- while (p < inend) {
- if (*p == '\n') {
- last = q;
- *q++ = *p++;
- nchars = 0;
- } else if (isspace (*p)) {
- last = q;
-
- if (nchars >= linewrap->wrap_len) {
- *q++ = '\n';
- p++;
- nchars = 0;
- } else {
- *q++ = *p++;
- }
- } else {
- *q++ = *p++;
- nchars++;
- }
-
- /* line is getting way too long, we must force a wrap here */
- if (nchars >= (linewrap->max_len - 1) && *p != '\n') {
- *q++ = '\n';
- *q++ = linewrap->indent;
- nchars = 0;
- }
- }
-
- linewrap->nchars = nchars;
-
- *out = f->outbuf;
- *outlen = q - f->outbuf;
- *outprespace = f->outpre;
-}
-
-static void
-complete (CamelMimeFilter *f, char *in, size_t len, size_t prespace,
- char **out, size_t *outlen, size_t *outprespace)
-{
- if (len)
- filter (f, in, len, prespace, out, outlen, outprespace);
-}
-
-static void
-reset (CamelMimeFilter *f)
-{
- CamelMimeFilterLinewrap *linewrap = (CamelMimeFilterLinewrap *)f;
-
- linewrap->nchars = 0;
-}
-
-CamelMimeFilter *
-camel_mime_filter_linewrap_new (guint preferred_len, guint max_len, char indent_char)
-{
- CamelMimeFilterLinewrap *linewrap =
- CAMEL_MIME_FILTER_LINEWRAP (camel_object_new (CAMEL_MIME_FILTER_LINEWRAP_TYPE));
-
- linewrap->indent = indent_char;
- linewrap->wrap_len = preferred_len;
- linewrap->max_len = max_len;
- linewrap->nchars = 0;
-
- return (CamelMimeFilter *) linewrap;
-}
diff --git a/camel/camel-mime-filter-linewrap.h b/camel/camel-mime-filter-linewrap.h
deleted file mode 100644
index 189b80d014..0000000000
--- a/camel/camel-mime-filter-linewrap.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000 Helix Code Inc.
- *
- * Authors: Jeffrey Stedfast <fejj@helixcode.com>
- *
- * 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_LINEWRAP_H
-#define _CAMEL_MIME_FILTER_LINEWRAP_H
-
-#include <camel/camel-mime-filter.h>
-
-#define CAMEL_MIME_FILTER_LINEWRAP_TYPE (camel_mime_filter_linewrap_get_type ())
-#define CAMEL_MIME_FILTER_LINEWRAP(obj) CAMEL_CHECK_CAST (obj, CAMEL_MIME_FILTER_LINEWRAP_TYPE, CamelMimeFilterLinewrap)
-#define CAMEL_MIME_FILTER_LINEWRAP_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, CAMEL_MIME_FILTER_LINEWRAP_TYPE, CamelMimeFilterLinewrapClass)
-#define CAMEL_IS_MIME_FILTER_LINEWRAP(obj) CAMEL_CHECK_TYPE (obj, CAMEL_MIME_FILTER_LINEWRAP_TYPE)
-
-typedef struct _CamelMimeFilterLinewrapClass CamelMimeFilterLinewrapClass;
-
-struct _CamelMimeFilterLinewrap {
- CamelMimeFilter parent;
-
- guint wrap_len;
- guint max_len;
- char indent;
- int nchars;
-};
-
-struct _CamelMimeFilterLinewrapClass {
- CamelMimeFilterClass parent_class;
-};
-
-CamelType camel_mime_filter_linewrap_get_type (void);
-
-CamelMimeFilter *camel_mime_filter_linewrap_new (guint preferred_len, guint max_len, char indent_char);
-
-#endif /* ! _CAMEL_MIME_FILTER_LINEWRAP_H */
diff --git a/camel/camel-mime-filter-save.c b/camel/camel-mime-filter-save.c
deleted file mode 100644
index e1761994ed..0000000000
--- a/camel/camel-mime-filter-save.c
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Copyright (C) 2000 Helix Code Inc.
- *
- * Authors: Michael Zucchi <notzed@helixcode.com>
- *
- * 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 <sys/types.h>
-#include <unistd.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-
-#include <string.h>
-#include <errno.h>
-
-#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 void camel_mime_filter_save_finalize (CamelObject *o);
-
-static CamelMimeFilterClass *camel_mime_filter_save_parent;
-
-CamelType
-camel_mime_filter_save_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (camel_mime_filter_get_type (), "CamelMimeFilterSave",
- sizeof (CamelMimeFilterSave),
- sizeof (CamelMimeFilterSaveClass),
- (CamelObjectClassInitFunc) camel_mime_filter_save_class_init,
- NULL,
- (CamelObjectInitFunc) camel_mime_filter_save_init,
- (CamelObjectFinalizeFunc) camel_mime_filter_save_finalize);
- }
-
- return type;
-}
-
-static void
-camel_mime_filter_save_finalize(CamelObject *o)
-{
- CamelMimeFilterSave *f = (CamelMimeFilterSave *)o;
-
- g_free(f->filename);
- if (f->fd != -1) {
- /* FIXME: what do we do with failed writes???? */
- close(f->fd);
- }
-}
-
-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:"<descriptor>", strerror(errno));
- }
- }
- *out = in;
- *outlen = len;
- *outprespace = prespace;
-}
-
-static void
-camel_mime_filter_save_class_init (CamelMimeFilterSaveClass *klass)
-{
- CamelMimeFilterClass *filter_class = (CamelMimeFilterClass *) klass;
-
- camel_mime_filter_save_parent = CAMEL_MIME_FILTER_CLASS (camel_type_get_global_classfuncs (camel_mime_filter_get_type ()));
-
- filter_class->reset = reset;
- filter_class->filter = filter;
-}
-
-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 ( camel_object_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 {
- camel_object_unref((CamelObject *)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 1cc05aed14..0000000000
--- a/camel/camel-mime-filter-save.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2000 Helix Code Inc.
- *
- * Authors: Michael Zucchi <notzed@helixcode.com>
- *
- * 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 <camel/camel-mime-filter.h>
-
-#define CAMEL_MIME_FILTER_SAVE(obj) CAMEL_CHECK_CAST (obj, camel_mime_filter_save_get_type (), CamelMimeFilterSave)
-#define CAMEL_MIME_FILTER_SAVE_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_mime_filter_save_get_type (), CamelMimeFilterSaveClass)
-#define CAMEL_IS_MIME_FILTER_SAVE(obj) CAMEL_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.c b/camel/camel-mime-filter.c
deleted file mode 100644
index aac01bb79c..0000000000
--- a/camel/camel-mime-filter.c
+++ /dev/null
@@ -1,256 +0,0 @@
-/*
- * Copyright (C) 2000 Helix Code Inc.
- *
- * Authors: Michael Zucchi <notzed@helixcode.com>
- *
- * 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 <string.h>
-#include "camel-mime-filter.h"
-
-/*#define MALLOC_CHECK */ /* for some malloc checking, requires mcheck enabled */
-
-/* only suitable for glibc */
-#ifdef MALLOC_CHECK
-#include <mcheck.h>
-#endif
-
-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 *)(CAMEL_OBJECT_GET_CLASS(o)))
-
-static CamelObjectClass *camel_mime_filter_parent;
-
-static void complete (CamelMimeFilter *mf, char *in, size_t len,
- size_t prespace, char **out, size_t *outlen,
- size_t *outprespace);
-
-static void
-camel_mime_filter_class_init (CamelMimeFilterClass *klass)
-{
- camel_mime_filter_parent = camel_type_get_global_classfuncs (camel_object_get_type ());
-
- klass->complete = complete;
-}
-
-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));
-}
-
-static void
-camel_mime_filter_finalize(CamelObject *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);
-}
-
-CamelType
-camel_mime_filter_get_type (void)
-{
- static CamelType camel_mime_filter_type = CAMEL_INVALID_TYPE;
-
- if (camel_mime_filter_type == CAMEL_INVALID_TYPE) {
- camel_mime_filter_type = camel_type_register (CAMEL_OBJECT_TYPE, "CamelMimeFilter",
- sizeof (CamelMimeFilter),
- sizeof (CamelMimeFilterClass),
- (CamelObjectClassInitFunc) camel_mime_filter_class_init,
- NULL,
- (CamelObjectInitFunc) camel_mime_filter_init,
- (CamelObjectFinalizeFunc) camel_mime_filter_finalize);
- }
-
- return camel_mime_filter_type;
-}
-
-static void
-complete(CamelMimeFilter *mf, char *in, size_t len, size_t prespace, char **out, size_t *outlen, size_t *outprespace)
-{
- /* default - do nothing */
-}
-
-/**
- * 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 ( camel_object_new (camel_mime_filter_get_type ()));
- return new;
-}
-
-#ifdef MALLOC_CHECK
-static void
-checkmem(void *p)
-{
- if (p) {
- int status = mprobe(p);
-
- switch (status) {
- case MCHECK_HEAD:
- printf("Memory underrun at %p\n", p);
- abort();
- case MCHECK_TAIL:
- printf("Memory overrun at %p\n", p);
- abort();
- case MCHECK_FREE:
- printf("Double free %p\n", p);
- abort();
- }
- }
-}
-#endif
-
-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;
-
-#ifdef MALLOC_CHECK
- checkmem(f->outreal);
- checkmem(f->backbuf);
-#endif
- /*
- 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;
- }
-
-#ifdef MALLOC_CHECK
- checkmem(f->outreal);
- checkmem(f->backbuf);
-#endif
-
- /* 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);
-
-#ifdef MALLOC_CHECK
- checkmem(f->outreal);
- checkmem(f->backbuf);
-#endif
-
-}
-
-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, const 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 dd30b0449c..0000000000
--- a/camel/camel-mime-filter.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (C) 2000 Helix Code Inc.
- *
- * Authors: Michael Zucchi <notzed@helixcode.com>
- *
- * 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 <sys/types.h>
-#include <camel/camel-object.h>
-
-#define CAMEL_MIME_FILTER_TYPE (camel_mime_filter_get_type ())
-#define CAMEL_MIME_FILTER(obj) CAMEL_CHECK_CAST (obj, camel_mime_filter_get_type (), CamelMimeFilter)
-#define CAMEL_MIME_FILTER_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_mime_filter_get_type (), CamelMimeFilterClass)
-#define CAMEL_IS_MIME_FILTER(obj) CAMEL_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);
-};
-
-CamelType 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, const 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 1977c3419b..0000000000
--- a/camel/camel-mime-message.c
+++ /dev/null
@@ -1,827 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; fill-column: 160 -*- */
-/* camel-mime-message.c : class for a mime_message */
-
-/*
- * Authors: Bertrand Guiheneuf <bertrand@helixcode.com>
- * Michael Zucchi <notzed@helixcode.com>
- * Jeffrey Stedfast <fejj@helixcode.com>
- *
- * 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <ctype.h>
-#include <stdio.h>
-#include <string.h>
-
-#include "e-util/e-url.h"
-
-#include "camel-mime-message.h"
-#include "camel-multipart.h"
-#include "camel-stream-mem.h"
-#include "string-utils.h"
-#include "hash-table-utils.h"
-
-#include "camel-stream-filter.h"
-#include "camel-stream-null.h"
-#include "camel-mime-filter-charset.h"
-#include "camel-mime-filter-bestenc.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,
- HEADER_MESSAGE_ID
-} CamelHeaderType;
-
-static char *header_names[] = {
- /* dont include HEADER_UNKNOWN string */
- "From", "Reply-To", "Subject", "To", "Cc", "Bcc", "Date", "Message-Id", NULL
-};
-
-static GHashTable *header_name_table;
-
-static CamelMimePartClass *parent_class=NULL;
-
-static char *recipient_names[] = {
- "To", "Cc", "Bcc", NULL
-};
-
-static int write_to_stream (CamelDataWrapper *data_wrapper, CamelStream *stream);
-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 *);
-static void unref_recipient (gpointer key, gpointer value, gpointer user_data);
-
-/* Returns the class for a CamelMimeMessage */
-#define CMM_CLASS(so) CAMEL_MIME_MESSAGE_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-#define CDW_CLASS(so) CAMEL_DATA_WRAPPER_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-#define CMD_CLASS(so) CAMEL_MEDIUM_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-
-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);
- CamelMediumClass *camel_medium_class = CAMEL_MEDIUM_CLASS (camel_mime_message_class);
- int i;
-
- parent_class = CAMEL_MIME_PART_CLASS(camel_type_get_global_classfuncs (camel_mime_part_get_type ()));
-
- header_name_table = g_hash_table_new (g_strcase_hash, g_strcase_equal);
- for (i=0;header_names[i];i++)
- g_hash_table_insert (header_name_table, header_names[i], (gpointer)i+1);
-
- /* 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;
-}
-
-
-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->subject = NULL;
- mime_message->reply_to = NULL;
- mime_message->from = NULL;
- mime_message->date = CAMEL_MESSAGE_DATE_CURRENT;
- mime_message->date_offset = 0;
- mime_message->date_received = CAMEL_MESSAGE_DATE_CURRENT;
- mime_message->date_received_offset = 0;
- mime_message->message_id = NULL;
-}
-
-static void
-camel_mime_message_finalize (CamelObject *object)
-{
- CamelMimeMessage *message = CAMEL_MIME_MESSAGE (object);
-
- g_free(message->subject);
-
- g_free(message->message_id);
-
- if (message->reply_to)
- camel_object_unref((CamelObject *)message->reply_to);
-
- if (message->from)
- camel_object_unref((CamelObject *)message->from);
-
- g_hash_table_foreach(message->recipients, unref_recipient, NULL);
- g_hash_table_destroy(message->recipients);
-}
-
-
-CamelType
-camel_mime_message_get_type (void)
-{
- static CamelType camel_mime_message_type = CAMEL_INVALID_TYPE;
-
- if (camel_mime_message_type == CAMEL_INVALID_TYPE) {
- camel_mime_message_type = camel_type_register (camel_mime_part_get_type(), "CamelMimeMessage",
- sizeof (CamelMimeMessage),
- sizeof (CamelMimeMessageClass),
- (CamelObjectClassInitFunc) camel_mime_message_class_init,
- NULL,
- (CamelObjectInitFunc) camel_mime_message_init,
- (CamelObjectFinalizeFunc) camel_mime_message_finalize);
- }
-
- return camel_mime_message_type;
-}
-
-static void unref_recipient (gpointer key, gpointer value, gpointer user_data)
-{
- camel_object_unref (CAMEL_OBJECT (value));
-}
-
-CamelMimeMessage *
-camel_mime_message_new (void)
-{
- CamelMimeMessage *mime_message;
- mime_message = CAMEL_MIME_MESSAGE(camel_object_new (CAMEL_MIME_MESSAGE_TYPE));
-
- return mime_message;
-}
-
-/* **** Date: */
-
-void
-camel_mime_message_set_date(CamelMimeMessage *message, time_t date, int offset)
-{
- char *datestr;
-
- g_assert(message);
- if (date == CAMEL_MESSAGE_DATE_CURRENT) {
- struct tm *local;
- int tz;
-
- date = time(0);
- local = localtime(&date);
-#if defined(HAVE_TIMEZONE)
- tz = timezone;
-#elif defined(HAVE_TM_GMTOFF)
- tz = local->tm_gmtoff;
-#endif
- offset = -(((tz/60/60) * 100) + (tz/60 % 60));
- if (local->tm_isdst>0)
- offset += 100;
- }
- message->date = date;
- message->date_offset = offset;
-
- datestr = header_format_date(date, offset);
- CAMEL_MEDIUM_CLASS(parent_class)->set_header((CamelMedium *)message, "Date", datestr);
- g_free(datestr);
-}
-
-time_t
-camel_mime_message_get_date(CamelMimeMessage *msg, int *offset)
-{
- if (offset)
- *offset = msg->date_offset;
-
- return msg->date;
-}
-
-time_t
-camel_mime_message_get_date_received(CamelMimeMessage *msg, int *offset)
-{
- if (msg->date_received == CAMEL_MESSAGE_DATE_CURRENT) {
- const char *received;
-
- received = camel_medium_get_header((CamelMedium *)msg, "received");
- if (received)
- received = strrchr(received, ';');
- if (received)
- msg->date_received = header_decode_date(received + 1, &msg->date_received_offset);
- }
-
- if (offset)
- *offset = msg->date_received_offset;
-
- return msg->date_received;
-}
-
-/* **** Message-Id: */
-
-void
-camel_mime_message_set_message_id (CamelMimeMessage *mime_message, const char *message_id)
-{
- char *id;
-
- g_assert (mime_message);
-
- g_free (mime_message->message_id);
-
- if (message_id) {
- id = g_strstrip (g_strdup (message_id));
- } else {
- id = header_msgid_generate ();
- }
-
- mime_message->message_id = id;
- id = g_strdup_printf ("<%s>", mime_message->message_id);
- CAMEL_MEDIUM_CLASS (parent_class)->set_header (CAMEL_MEDIUM (mime_message), "Message-Id", id);
- g_free (id);
-}
-
-const char *
-camel_mime_message_get_message_id (CamelMimeMessage *mime_message)
-{
- g_assert (mime_message);
-
- return mime_message->message_id;
-}
-
-/* **** Reply-To: */
-
-void
-camel_mime_message_set_reply_to (CamelMimeMessage *msg, const CamelInternetAddress *reply_to)
-{
- char *addr;
-
- g_assert(msg);
-
- if (msg->reply_to) {
- camel_object_unref((CamelObject *)msg->reply_to);
- msg->reply_to = NULL;
- }
-
- if (reply_to == NULL) {
- CAMEL_MEDIUM_CLASS(parent_class)->remove_header(CAMEL_MEDIUM(msg), "Reply-To");
- return;
- }
-
- msg->reply_to = (CamelInternetAddress *)camel_address_new_clone((CamelAddress *)reply_to);
- addr = camel_address_encode((CamelAddress *)msg->reply_to);
- CAMEL_MEDIUM_CLASS(parent_class)->set_header(CAMEL_MEDIUM(msg), "Reply-To", addr);
- g_free(addr);
-}
-
-const CamelInternetAddress *
-camel_mime_message_get_reply_to(CamelMimeMessage *mime_message)
-{
- g_assert (mime_message);
-
- /* TODO: ref for threading? */
-
- return mime_message->reply_to;
-}
-
-/* **** Subject: */
-
-void
-camel_mime_message_set_subject(CamelMimeMessage *mime_message, const char *subject)
-{
- char *text;
-
- g_assert(mime_message);
-
- g_free(mime_message->subject);
- mime_message->subject = g_strstrip (g_strdup (subject));
- text = header_encode_string((unsigned char *)mime_message->subject);
- CAMEL_MEDIUM_CLASS(parent_class)->set_header(CAMEL_MEDIUM (mime_message), "Subject", text);
- g_free (text);
-}
-
-const char *
-camel_mime_message_get_subject(CamelMimeMessage *mime_message)
-{
- g_assert(mime_message);
-
- return mime_message->subject;
-}
-
-/* *** From: */
-
-/* Thought: Since get_from/set_from are so rarely called, it is probably not useful
- to cache the from (and reply_to) addresses as InternetAddresses internally, we
- could just get it from the headers and reprocess every time. */
-void
-camel_mime_message_set_from(CamelMimeMessage *msg, const CamelInternetAddress *from)
-{
- char *addr;
-
- g_assert(msg);
-
- if (msg->from) {
- camel_object_unref((CamelObject *)msg->from);
- msg->from = NULL;
- }
-
- if (from == NULL || camel_address_length((CamelAddress *)from) == 0) {
- CAMEL_MEDIUM_CLASS(parent_class)->remove_header(CAMEL_MEDIUM(msg), "From");
- return;
- }
-
- msg->from = (CamelInternetAddress *)camel_address_new_clone((CamelAddress *)from);
- addr = camel_address_encode((CamelAddress *)msg->from);
- CAMEL_MEDIUM_CLASS (parent_class)->set_header(CAMEL_MEDIUM(msg), "From", addr);
- g_free(addr);
-}
-
-const CamelInternetAddress *
-camel_mime_message_get_from(CamelMimeMessage *mime_message)
-{
- g_assert (mime_message);
-
- /* TODO: we should really ref this for multi-threading to work */
-
- return mime_message->from;
-}
-
-/* **** To: Cc: Bcc: */
-
-void
-camel_mime_message_set_recipients(CamelMimeMessage *mime_message, const char *type, const CamelInternetAddress *r)
-{
- char *text;
- CamelInternetAddress *addr;
-
- g_assert(mime_message);
-
- addr = g_hash_table_lookup(mime_message->recipients, type);
- if (addr == NULL) {
- g_warning("trying to set a non-valid receipient type: %s", type);
- return;
- }
-
- if (r == NULL || camel_address_length((CamelAddress *)r) == 0) {
- camel_address_remove((CamelAddress *)addr, -1);
- CAMEL_MEDIUM_CLASS(parent_class)->remove_header(CAMEL_MEDIUM(mime_message), type);
- return;
- }
-
- /* note this does copy, and not append (cat) */
- camel_address_copy((CamelAddress *)addr, (const CamelAddress *)r);
-
- /* and sync our headers */
- text = camel_address_encode(CAMEL_ADDRESS(addr));
- CAMEL_MEDIUM_CLASS(parent_class)->set_header(CAMEL_MEDIUM(mime_message), type, text);
- g_free(text);
-}
-
-void
-camel_mime_message_set_source(CamelMimeMessage *mime_message, const char *src)
-{
- char *shrouded_src;
- g_assert (mime_message);
-
- shrouded_src = e_url_shroud (src);
- camel_medium_add_header (CAMEL_MEDIUM (mime_message), "X-Evolution-Source", shrouded_src);
- g_free (shrouded_src);
-}
-
-const char *
-camel_mime_message_get_source(CamelMimeMessage *mime_message)
-{
- const char *src;
- g_assert(mime_message);
- src = camel_medium_get_header (CAMEL_MEDIUM (mime_message), "X-Evolution-Source");
- if (src) {
- while (*src && isspace ((gint) *src))
- ++src;
- }
- return src;
-}
-
-const CamelInternetAddress *
-camel_mime_message_get_recipients(CamelMimeMessage *mime_message, const char *type)
-{
- g_assert(mime_message);
-
- return g_hash_table_lookup(mime_message->recipients, type);
-}
-
-/* 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: /* these 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 EOM, got: %d", camel_mime_parser_state(mp));
- camel_mime_parser_unstep(mp);
- return -1;
- }
-
- d(printf("mime_message::construct_from_parser() leaving\n"));
-#ifndef NO_WARNINGS
-#warning "return a real error code"
-#endif
- 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) {
- /* FIXME: should we just abort? Should we make one up? */
- g_warning("No from set for message");
- camel_medium_set_header((CamelMedium *)mm, "From", "");
- }
- if (!camel_medium_get_header((CamelMedium *)mm, "Date"))
- camel_mime_message_set_date(mm, CAMEL_MESSAGE_DATE_CURRENT, 0);
-
- if (mm->subject == NULL)
- camel_mime_message_set_subject(mm, "No Subject");
-
- if (mm->message_id == NULL)
- camel_mime_message_set_message_id (mm, NULL);
-
- /* FIXME: "To" header needs to be set explicitly as well ... */
-
- if (!camel_medium_get_header ((CamelMedium *)mm, "Mime-Version"))
- camel_medium_set_header((CamelMedium *)mm, "Mime-Version", "1.0");
-
- return CAMEL_DATA_WRAPPER_CLASS (parent_class)->write_to_stream (data_wrapper, stream);
-}
-
-/* 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:
- if (message->from)
- camel_object_unref((CamelObject *)message->from);
- message->from = camel_internet_address_new();
- camel_address_decode((CamelAddress *)message->from, header_value);
- break;
- case HEADER_REPLY_TO:
- if (message->reply_to)
- camel_object_unref((CamelObject *)message->reply_to);
- message->reply_to = camel_internet_address_new();
- camel_address_decode((CamelAddress *)message->reply_to, header_value);
- break;
- case HEADER_SUBJECT:
- g_free(message->subject);
- message->subject = g_strstrip(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(CAMEL_ADDRESS (addr), header_value);
- else
- camel_address_remove(CAMEL_ADDRESS (addr), -1);
- break;
- case HEADER_DATE:
- if (header_value) {
- message->date = header_decode_date(header_value, &message->date_offset);
- } else {
- message->date = CAMEL_MESSAGE_DATE_CURRENT;
- message->date_offset = 0;
- }
- break;
- case HEADER_MESSAGE_ID:
- g_free (message->message_id);
- if (header_value)
- message->message_id = header_msgid_decode (header_value);
- else
- message->message_id = NULL;
- 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);
-}
-
-typedef gboolean (*CamelPartFunc)(CamelMimeMessage *, CamelMimePart *, void *data);
-
-static gboolean
-message_foreach_part_rec(CamelMimeMessage *msg, CamelMimePart *part, CamelPartFunc callback, void *data)
-{
- CamelDataWrapper *containee;
- int parts, i;
- int go = TRUE;
-
- if (callback(msg, part, data) == FALSE)
- return FALSE;
-
- containee = camel_medium_get_content_object(CAMEL_MEDIUM(part));
-
- if (containee == NULL)
- return go;
-
- /* using the object types is more accurate than using the mime/types */
- if (CAMEL_IS_MULTIPART(containee)) {
- parts = camel_multipart_get_number(CAMEL_MULTIPART(containee));
- for (i=0;go && i<parts;i++) {
- CamelMimePart *part = camel_multipart_get_part(CAMEL_MULTIPART(containee), i);
-
- go = message_foreach_part_rec(msg, part, callback, data);
- }
- } else if (CAMEL_IS_MIME_MESSAGE(containee)) {
- go = message_foreach_part_rec(msg, (CamelMimePart *)containee, callback, data);
- }
-
- return go;
-}
-
-/* dont make this public yet, it might need some more thinking ... */
-/* MPZ */
-static void
-camel_mime_message_foreach_part(CamelMimeMessage *msg, CamelPartFunc callback, void *data)
-{
- message_foreach_part_rec(msg, (CamelMimePart *)msg, callback, data);
-}
-
-static gboolean
-check_8bit(CamelMimeMessage *msg, CamelMimePart *part, void *data)
-{
- int *has8bit = data;
-
- /* check this part, and stop as soon as we are done */
- *has8bit = camel_mime_part_get_encoding(part) == CAMEL_MIME_PART_ENCODING_8BIT;
- return !(*has8bit);
-}
-
-gboolean
-camel_mime_message_has_8bit_parts(CamelMimeMessage *msg)
-{
- int has8bit = FALSE;
-
- camel_mime_message_foreach_part(msg, check_8bit, &has8bit);
-
- return has8bit;
-}
-
-/* finds the best charset and transfer encoding for a given part */
-static CamelMimePartEncodingType
-find_best_encoding(CamelMimePart *part, CamelBestencRequired required, CamelBestencEncoding enctype, char **charsetp)
-{
- const char *charsetin = NULL;
- char *charset = NULL;
- CamelStream *null;
- CamelStreamFilter *filter;
- CamelMimeFilterCharset *charenc = NULL;
- CamelMimeFilterBestenc *bestenc;
- int idb, idc = -1;
- gboolean istext;
- unsigned int flags, callerflags;
- CamelMimePartEncodingType encoding;
- CamelDataWrapper *content;
-
- /* we use all these weird stream things so we can do it with streams, and
- not have to read the whole lot into memory - although i have a feeling
- it would make things a fair bit simpler to do so ... */
-
- d(printf("starting to check part\n"));
-
- content = camel_medium_get_content_object((CamelMedium *)part);
- if (content == NULL) {
- /* charset might not be right here, but it'll get the right stuff
- if it is ever set */
- *charsetp = NULL;
- return CAMEL_MIME_PART_ENCODING_DEFAULT;
- }
-
- istext = header_content_type_is(part->content_type, "text", "*");
- if (istext) {
- flags = CAMEL_BESTENC_GET_CHARSET|CAMEL_BESTENC_GET_ENCODING;
- } else {
- flags = CAMEL_BESTENC_GET_ENCODING;
- }
-
- /* when building the message, any encoded parts are translated already */
- flags |= CAMEL_BESTENC_LF_IS_CRLF;
- /* and get any flags the caller passed in */
- callerflags = (required & CAMEL_BESTENC_NO_FROM);
- flags |= callerflags;
-
- /* first a null stream, so any filtering is thrown away; we only want the sideeffects */
- null = (CamelStream *)camel_stream_null_new();
- filter = camel_stream_filter_new_with_stream(null);
-
- /* if we're not looking for the best charset, then use the one we have */
- if (istext && (required & CAMEL_BESTENC_GET_CHARSET) == 0
- && (charsetin = header_content_type_param(part->content_type, "charset"))) {
- /* if libunicode doesn't support it, we dont really have utf8 anyway, so
- we dont need a converter */
- charenc = camel_mime_filter_charset_new_convert("UTF-8", charsetin);
- if (charenc != NULL)
- idc = camel_stream_filter_add(filter, (CamelMimeFilter *)charenc);
- charsetin = NULL;
- }
-
- bestenc = camel_mime_filter_bestenc_new(flags);
- idb = camel_stream_filter_add(filter, (CamelMimeFilter *)bestenc);
- d(printf("writing to checking stream\n"));
- camel_data_wrapper_write_to_stream(content, (CamelStream *)filter);
- camel_stream_filter_remove(filter, idb);
- if (idc != -1) {
- camel_stream_filter_remove(filter, idc);
- camel_object_unref((CamelObject *)charenc);
- charenc = NULL;
- }
-
- if (istext)
- charsetin = camel_mime_filter_bestenc_get_best_charset(bestenc);
-
- d(printf("charsetin = %s\n", charsetin));
-
- /* if we have US-ASCII, or we're not doing text, we dont need to bother with the rest */
- if (charsetin != NULL && (required & CAMEL_BESTENC_GET_CHARSET) != 0) {
- charset = g_strdup(charsetin);
-
- d(printf("have charset, trying conversion/etc\n"));
-
- /* now the 'bestenc' can has told us what the best encoding is, we can use that to create
- a charset conversion filter as well, and then re-add the bestenc to filter the
- result to find the best encoding to use as well */
-
- charenc = camel_mime_filter_charset_new_convert("UTF-8", charset);
-
- /* eek, libunicode doesn't undertand this charset anyway, then the 'utf8' we
- thought we had is really the native format, in which case, we just treat
- it as binary data (and take the result we have so far) */
-
- if (charenc != NULL) {
-
- /* otherwise, try another pass, converting to the real charset */
-
- camel_mime_filter_reset((CamelMimeFilter *)bestenc);
- camel_mime_filter_bestenc_set_flags(bestenc, CAMEL_BESTENC_GET_ENCODING|CAMEL_BESTENC_LF_IS_CRLF|callerflags);
-
- camel_stream_filter_add(filter, (CamelMimeFilter *)charenc);
- camel_stream_filter_add(filter, (CamelMimeFilter *)bestenc);
-
- /* and write it to the new stream */
- camel_data_wrapper_write_to_stream(content, (CamelStream *)filter);
-
- camel_object_unref((CamelObject *)charenc);
- }
- }
-
- encoding = camel_mime_filter_bestenc_get_best_encoding(bestenc, enctype);
-
- camel_object_unref((CamelObject *)filter);
- camel_object_unref((CamelObject *)bestenc);
- camel_object_unref((CamelObject *)null);
-
- d(printf("done, best encoding = %d\n", encoding));
-
- if (charsetp)
- *charsetp = charset;
- else
- g_free(charset);
-
- return encoding;
-}
-
-struct _enc_data {
- CamelBestencRequired required;
- CamelBestencEncoding enctype;
-};
-
-static gboolean
-best_encoding(CamelMimeMessage *msg, CamelMimePart *part, void *datap)
-{
- struct _enc_data *data = datap;
- char *charset;
- CamelMimePartEncodingType encoding;
-
- /* we only care about actual content objects */
- if (!CAMEL_IS_MULTIPART(part) && !CAMEL_IS_MIME_MESSAGE(part)) {
-
- encoding = find_best_encoding(part, data->required, data->enctype, &charset);
- /* we always set the encoding, if we got this far. GET_CHARSET implies
- also GET_ENCODING */
- camel_mime_part_set_encoding(part, encoding);
-
- if ((data->required & CAMEL_BESTENC_GET_CHARSET) != 0) {
- if (header_content_type_is(part->content_type, "text", "*")) {
- char *newct;
-
- /* FIXME: ick, the part content_type interface needs fixing bigtime */
- header_content_type_set_param(part->content_type, "charset", charset?charset:"us-ascii");
- newct = header_content_type_format(part->content_type);
- if (newct) {
- d(printf("Setting content-type to %s\n", newct));
-
- camel_mime_part_set_content_type(part, newct);
- g_free(newct);
- }
- }
- }
- }
-
- return TRUE;
-}
-
-void
-camel_mime_message_set_best_encoding(CamelMimeMessage *msg, CamelBestencRequired required, CamelBestencEncoding enctype)
-{
- struct _enc_data data;
-
- if ((required & (CAMEL_BESTENC_GET_ENCODING|CAMEL_BESTENC_GET_CHARSET)) == 0)
- return;
-
- data.required = required;
- data.enctype = enctype;
-
- camel_mime_message_foreach_part(msg, best_encoding, &data);
-}
-
-void
-camel_mime_message_encode_8bit_parts (CamelMimeMessage *mime_message)
-{
- camel_mime_message_set_best_encoding(mime_message, CAMEL_BESTENC_GET_ENCODING, CAMEL_BESTENC_7BIT);
-}
-
diff --git a/camel/camel-mime-message.h b/camel/camel-mime-message.h
deleted file mode 100644
index 47c390a5a5..0000000000
--- a/camel/camel-mime-message.h
+++ /dev/null
@@ -1,134 +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 <bertrand@helixcode.com>
- * Michael Zucchi <notzed@helixcode.com>
- *
- * 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 <camel/camel-mime-part.h>
-#include <camel/camel-mime-utils.h>
-#include <camel/camel-internet-address.h>
-#include <camel/camel-mime-filter-bestenc.h>
-
-#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) (CAMEL_CHECK_CAST((obj), CAMEL_MIME_MESSAGE_TYPE, CamelMimeMessage))
-#define CAMEL_MIME_MESSAGE_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_MIME_MESSAGE_TYPE, CamelMimeMessageClass))
-#define CAMEL_IS_MIME_MESSAGE(o) (CAMEL_CHECK_TYPE((o), CAMEL_MIME_MESSAGE_TYPE))
-
-
-/* specify local time */
-#define CAMEL_MESSAGE_DATE_CURRENT (~0)
-
-struct _CamelMimeMessage
-{
- CamelMimePart parent_object;
-
- /* header fields */
- time_t date;
- int date_offset; /* GMT offset */
-
- /* cached internal copy */
- time_t date_received;
- int date_received_offset; /* GMT offset */
-
- char *subject;
-
- char *message_id;
-
- CamelInternetAddress *reply_to;
- CamelInternetAddress *from;
-
- GHashTable *recipients; /* hash table of CamelInternetAddress's */
-};
-
-typedef struct {
- CamelMimePartClass parent_class;
-
- /* Virtual methods */
-
-} CamelMimeMessageClass;
-
-
-
-/* Standard Camel function */
-CamelType 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);
-time_t camel_mime_message_get_date (CamelMimeMessage *mime_message,
- int *offset);
-time_t camel_mime_message_get_date_received (CamelMimeMessage *mime_message,
- int *offset);
-void camel_mime_message_set_message_id (CamelMimeMessage *mime_message,
- const char *message_id);
-const char *camel_mime_message_get_message_id (CamelMimeMessage *mime_message);
-void camel_mime_message_set_reply_to (CamelMimeMessage *mime_message,
- const CamelInternetAddress *reply_to);
-const CamelInternetAddress *camel_mime_message_get_reply_to (CamelMimeMessage *mime_message);
-
-void camel_mime_message_set_subject (CamelMimeMessage *mime_message,
- const char *subject);
-const char *camel_mime_message_get_subject (CamelMimeMessage *mime_message);
-void camel_mime_message_set_from (CamelMimeMessage *mime_message,
- const CamelInternetAddress *from);
-const CamelInternetAddress *camel_mime_message_get_from (CamelMimeMessage *mime_message);
-
-const CamelInternetAddress *camel_mime_message_get_recipients (CamelMimeMessage *mime_message,
- const char *type);
-void camel_mime_message_set_recipients (CamelMimeMessage *mime_message,
- const char *type,
- const CamelInternetAddress *r);
-
-void camel_mime_message_set_source (CamelMimeMessage *mime_message,
- const char *identity);
-const char *camel_mime_message_get_source (CamelMimeMessage *mime_message);
-
-
-/* utility functions */
-gboolean camel_mime_message_has_8bit_parts (CamelMimeMessage *mime_message);
-void camel_mime_message_set_best_encoding (CamelMimeMessage *msg,
- CamelBestencRequired required,
- CamelBestencEncoding enctype);
-void camel_mime_message_encode_8bit_parts (CamelMimeMessage *mime_message);
-
-#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 d08beffca7..0000000000
--- a/camel/camel-mime-parser.c
+++ /dev/null
@@ -1,1955 +0,0 @@
-/*
- * Copyright (C) 2000 Helix Code Inc.
- *
- * Authors: Michael Zucchi <notzed@helixcode.com>
- *
- * 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 */
-
-/* Do not change this code without asking me (Michael Zucchi) first
-
- There is almost always a reason something was done a certain way.
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-
-#include <string.h>
-
-#include <stdio.h>
-#include <errno.h>
-
-#include <unicode.h>
-
-#include <regex.h>
-#include <ctype.h>
-
-#include <glib.h>
-#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) */
-
- unsigned int midline:1; /* are we mid-line interrupted? */
- unsigned int scan_from:1; /* do we care about From lines? */
- unsigned int scan_pre_from:1; /* do we return pre-from data? */
-
- 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 */
-
- /* 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;
-
- /* I dont use GString's casue you can't efficiently append a buffer to them */
- GByteArray *pretext; /* for multipart types, save the pre-boundary data here */
- GByteArray *posttext; /* for multipart types, save the post-boundary data here */
- int prestage; /* used to determine if it is a pre-boundary or post-boundary data segment */
-
- GByteArray *from_line; /* the from line */
-
- char *boundary; /* for multipart/ * boundaries, including leading -- and trailing -- for the final part */
- int boundarylen; /* actual length of boundary, including leading -- if there is one */
- int boundarylenfinal; /* length of boundary, including trailing -- if there is one */
- int atleast; /* the biggest boundary from here to the parent */
-};
-
-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, GByteArray *save);
-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);
-static int folder_read(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);
-
-#if d(!)0
-static char *states[] = {
- "HSCAN_INITIAL",
- "HSCAN_PRE_FROM", /* pre-from data */
- "HSCAN_FROM", /* got 'From' line */
- "HSCAN_HEADER", /* toplevel header */
- "HSCAN_BODY", /* scanning body of message */
- "HSCAN_MULTIPART", /* got multipart header */
- "HSCAN_MESSAGE", /* rfc822/news message */
-
- "HSCAN_PART", /* part of a multipart */
-
- "HSCAN_EOF", /* end of file */
- "HSCAN_PRE_FROM_END",
- "HSCAN_FROM_END",
- "HSCAN_HEAER_END",
- "HSCAN_BODY_END",
- "HSCAN_MULTIPART_END",
- "HSCAN_MESSAGE_END",
-};
-#endif
-
-static CamelObjectClass *camel_mime_parser_parent;
-
-static void
-camel_mime_parser_class_init (CamelMimeParserClass *klass)
-{
- camel_mime_parser_parent = camel_type_get_global_classfuncs (camel_object_get_type ());
-}
-
-static void
-camel_mime_parser_init (CamelMimeParser *obj)
-{
- struct _header_scan_state *s;
-
- s = folder_scan_init();
- _PRIVATE(obj) = s;
-}
-
-static void
-camel_mime_parser_finalise(CamelObject *o)
-{
- struct _header_scan_state *s = _PRIVATE(o);
-#ifdef PURIFY
- purify_watch_remove_all();
-#endif
- folder_scan_close(s);
-}
-
-CamelType
-camel_mime_parser_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (camel_object_get_type (), "CamelMimeParser",
- sizeof (CamelMimeParser),
- sizeof (CamelMimeParserClass),
- (CamelObjectClassInitFunc) camel_mime_parser_class_init,
- NULL,
- (CamelObjectInitFunc) camel_mime_parser_init,
- (CamelObjectFinalizeFunc) camel_mime_parser_finalise);
- }
-
- return type;
-}
-
-/**
- * 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 ( camel_object_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;
- camel_object_ref((CamelObject *)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) {
- camel_object_unref((CamelObject *)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;
-}
-
-static const char *
-byte_array_to_string(GByteArray *array)
-{
- if (array == NULL)
- return NULL;
-
- if (array->len == 0 || array->data[array->len-1] != '\0')
- g_byte_array_append(array, "", 1);
-
- return array->data;
-}
-
-/**
- * camel_mime_parser_preface:
- * @m:
- *
- * Retrieve the preface text for the current multipart.
- * Can only be used when the state is HSCAN_MULTIPART_END.
- *
- * Return value: The preface text, or NULL if there wasn't any.
- **/
-const char *
-camel_mime_parser_preface(CamelMimeParser *m)
-{
- struct _header_scan_state *s = _PRIVATE(m);
-
- if (s->parts)
- return byte_array_to_string(s->parts->pretext);
-
- return NULL;
-}
-
-/**
- * camel_mime_parser_postface:
- * @m:
- *
- * Retrieve the postface text for the current multipart.
- * Only returns valid data when the current state if
- * HSCAN_MULTIPART_END.
- *
- * Return value: The postface text, or NULL if there wasn't any.
- **/
-const char *
-camel_mime_parser_postface(CamelMimeParser *m)
-{
- struct _header_scan_state *s = _PRIVATE(m);
-
- if (s->parts)
- return byte_array_to_string(s->parts->posttext);
-
- return NULL;
-}
-
-/**
- * camel_mime_parser_from_line:
- * @m:
- *
- * Get the last scanned "From " line, from a recently scanned from.
- * This should only be called in the HSCAN_FROM state. The
- * from line will include the closing \n found (if there was one).
- *
- * The return value will remain valid while in the HSCAN_FROM
- * state, or any deeper state.
- *
- * Return value: The From line, or NULL if called out of context.
- **/
-const char *
-camel_mime_parser_from_line(CamelMimeParser *m)
-{
- struct _header_scan_state *s = _PRIVATE(m);
-
- if (s->parts)
- return byte_array_to_string(s->parts->from_line);
-
- 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.
- *
- * This may also be preceeded by an optional
- * HSCAN_PRE_FROM state which contains the scanned data
- * found before the From line is encountered. See also
- * scan_pre_from().
- **/
-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_scan_pre_from:
- * @:
- * @scan_pre_from: #TRUE if we want to get pre-from data.
- *
- * Tell the scanner whether we want to know abou the pre-from
- * data during a scan. If we do, then we may get an additional
- * state HSCAN_PRE_FROM which returns the specified data.
- **/
-void
-camel_mime_parser_scan_pre_from(CamelMimeParser *m, int scan_pre_from)
-{
- struct _header_scan_state *s = _PRIVATE(m);
- s->scan_pre_from = scan_pre_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 it's 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_read:
- * @m:
- * @databuffer:
- * @len:
- *
- * Read at most @len bytes from the internal mime parser buffer.
- *
- * Returns the address of the internal buffer in @databuffer,
- * and the length of useful data.
- *
- * @len may be specified as INT_MAX, in which case you will
- * get the full remainder of the buffer at each call.
- *
- * Note that no parsing of the data read through this function
- * occurs, so no state changes occur, but the seek position
- * is updated appropriately.
- *
- * Return value: The number of bytes available, or -1 on error.
- **/
-int
-camel_mime_parser_read(CamelMimeParser *m, const char **databuffer, int len)
-{
- struct _header_scan_state *s = _PRIVATE(m);
- int there;
-
- if (len == 0)
- return 0;
-
- d(printf("parser::read() reading %d bytes\n", len));
-
- there = MIN(s->inend - s->inptr, len);
- d(printf("parser::read() there = %d bytes\n", there));
- if (there > 0) {
- *databuffer = s->inptr;
- s->inptr += there;
- return there;
- }
-
- if (folder_read(s) == -1)
- return -1;
-
- there = MIN(s->inend - s->inptr, len);
- d(printf("parser::read() had to re-read, now there = %d bytes\n", there));
-
- *databuffer = s->inptr;
- s->inptr += there;
-
- return there;
-}
-
-/**
- * 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->inptr<s->inend-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)
-{
- if (s->parts && s->parts->atleast > h->boundarylenfinal)
- h->atleast = s->parts->atleast;
- else
- h->atleast = MAX(h->boundarylenfinal, 1);
-
- 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);
- if (h->pretext)
- g_byte_array_free(h->pretext, TRUE);
- if (h->posttext)
- g_byte_array_free(h->posttext, TRUE);
- if (h->from_line)
- g_byte_array_free(h->from_line, TRUE);
- g_free(h);
- } else {
- g_warning("Header stack underflow!\n");
- }
-}
-
-static int
-folder_scan_skip_line(struct _header_scan_state *s, GByteArray *save)
-{
- 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 (inptr<inend
- && (c = *inptr++)!='\n')
- ;
-
- if (save)
- g_byte_array_append(save, s->inptr, inptr-s->inptr);
-
- s->inptr = 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; /* 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", s->atleast, 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->boundarylenfinal <= len) {
- int extra = part->boundarylenfinal - part->boundarylen;
-
- /* check the extra stuff on an final boundary, normally -- for mime parts */
- if (extra>0) {
- *lastone = memcmp(&boundary[part->boundarylen],
- &part->boundary[part->boundarylen],
- extra) == 0;
- } else {
- *lastone = TRUE;
- }
- h(printf("checking lastone = %s\n", *lastone?"TRUE":"FALSE"));
- } 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;
-
- 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
- remove trailing \r chars (\n's assumed already removed)
- 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 > 0) { \
- 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; \
- } \
- if (start[headerlen-1] == '\r') \
- headerlen--; \
- 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, newatleast;
- char *start = NULL;
- int len;
- 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
-
- if (s->parts)
- newatleast = s->parts->atleast;
- else
- newatleast = 1;
- *lastone = FALSE;
-
- do {
- s->atleast = newatleast;
-
- h(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+1;
-
- while (inptr<inend) {
- if (!s->midline) {
- if (folder_boundary_check(s, inptr, lastone)) {
- if ((s->outptr>s->outbuf))
- goto header_truncated; /* may not actually be truncated */
-
- goto header_done;
- }
- }
-
- start = inptr;
-
- /* goto next line/sentinal */
- while ((*inptr++)!='\n')
- ;
-
- g_assert(inptr<=s->inend+1);
-
- /* check for sentinal or real end of line */
- if (inptr > inend) {
- h(printf("not at end of line yet, going further\n"));
- /* didn't find end of line within our allowed area */
- inptr = inend;
- s->midline = TRUE;
- header_append(s, start, inptr);
- } else {
- h(printf("got line part: '%.*s'\n", inptr-1-start, start));
- /* got a line, strip and add it, process it */
- s->midline = FALSE;
- header_append(s, start, inptr-1);
-
- /* check for end of headers */
- if (s->outbuf == s->outptr)
- goto header_done;
-
- /* check for continuation/compress headers, we have atleast 1 char here to work with */
- if (inptr[0] == ' ' || inptr[0] == '\t') {
- h(printf("continuation\n"));
- /* TODO: this wont catch multiple space continuation across a read boundary, but
- that is assumed rare, and not fatal anyway */
- do
- inptr++;
- while (*inptr == ' ' || *inptr == '\t');
- inptr--;
- *inptr = ' ';
- } else {
- /* otherwise, complete header, add it */
- s->outptr[0] = 0;
-
- h(printf("header '%.20s' at %d\n", s->outbuf, s->header_start));
-
- header_raw_append_parse(&h->headers, s->outbuf, s->header_start);
- s->outptr = s->outbuf;
- s->header_start = -1;
- }
- }
- }
- s->inptr = inptr;
- }
- h(printf("end of file? read %d bytes\n", len));
- newatleast = 1;
- } while (s->atleast > 1);
-
- if ((s->outptr > s->outbuf) || s->inend > s->inptr) {
- start = s->inptr;
- inptr = s->inend;
- if (inptr > start) {
- if (inptr[-1] == '\n')
- inptr--;
- }
- goto header_truncated;
- }
-
- s->atleast = atleast;
-
- return h;
-
-header_truncated:
- header_append(s, start, inptr);
-
- s->outptr[0] = 0;
- if (s->outbuf == s->outptr)
- goto header_done;
-
- header_raw_append_parse(&h->headers, s->outbuf, s->header_start);
-
- s->outptr = s->outbuf;
-header_done:
- 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, newatleast;
- register char *inptr;
- char *inend;
- char *start;
- int len;
- struct _header_scan_stack *part;
- int onboundary = FALSE;
-
- c(printf("scanning content\n"));
-
- part = s->parts;
- if (part)
- newatleast = part->atleast;
- else
- newatleast = 1;
- *lastone = FALSE;
-
- c(printf("atleast = %d\n", s->atleast));
-
- do {
- s->atleast = newatleast;
-
- 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+1;
- start = inptr;
-
- c(printf("inptr = %p, inend = %p\n", inptr, inend));
-
- while (inptr<inend) {
- if (!s->midline
- && (part = folder_boundary_check(s, inptr, lastone))) {
- onboundary = TRUE;
-
- /* since we truncate the boundary data, we need at least 1 char here spare,
- to remain in the same state */
- if ( (inptr-start) > 1)
- goto content;
-
- /* otherwise, jump to the state of the boundary we actually found */
- goto normal_exit;
- }
-
- /* goto the next line */
- while ((*inptr++)!='\n')
- ;
-
- /* check the sentinal, if we went past the atleast limit, and reset it to there */
- if (inptr > inend) {
- s->midline = TRUE;
- inptr = inend;
- } else {
- s->midline = FALSE;
- }
- }
-
- c(printf("ran out of input, dumping what i have (%d) bytes midline = %s\n",
- inptr-start, s->midline?"TRUE":"FALSE"));
- goto content;
- }
- newatleast = 1;
- } while (s->atleast > 1);
-
- c(printf("length read = %d\n", len));
-
- if (s->inend > s->inptr) {
- start = s->inptr;
- inptr = s->inend;
- goto content;
- }
-
- *length = 0;
- s->atleast = atleast;
- return NULL;
-
-content:
- part = s->parts;
-normal_exit:
- s->atleast = atleast;
- s->inptr = inptr;
-
- *data = start;
- /* if we hit a boundary, we should not include the closing \n */
- if (onboundary && (inptr-start)>0)
- *length = inptr-start-1;
- else
- *length = inptr-start;
-
- /*printf("got %scontent: '%.*s'\n", 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) {
- camel_object_unref((CamelObject *)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->scan_pre_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) {
- camel_object_unref((CamelObject *)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)
- camel_object_unref((CamelObject *)s->stream);
- s->stream = stream;
- camel_object_ref((CamelObject *)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 ", states[hb->savestate], hb->boundary);
- if (hb->content_type) {
- printf("(%s/%s)", hb->content_type->type, hb->content_type->subtype);
- } else {
- printf("(default)");
- }
- printf("\n");
- hb = hb->parent;
- }
- printf("\n");
- });
-
- switch (s->state) {
-
-#ifdef USE_FROM
- case HSCAN_INITIAL:
- if (s->scan_from) {
- h = g_malloc0(sizeof(*h));
- h->boundary = g_strdup("From ");
- h->boundarylen = strlen(h->boundary);
- h->boundarylenfinal = h->boundarylen;
- h->from_line = g_byte_array_new();
- folder_push_part(s, h);
- s->state = HSCAN_PRE_FROM;
- } else {
- s->start_of_from = -1;
- goto scan_header;
- }
-
- case HSCAN_PRE_FROM:
-
- h = s->parts;
- do {
- hb = folder_scan_content(s, &state, databuffer, datalength);
- if (s->scan_pre_from && *datalength > 0) {
- d(printf("got pre-from content %d bytes\n", *datalength));
- return;
- }
- } 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->from_line);
- h->savestate = HSCAN_INITIAL;
- s->state = HSCAN_FROM;
- } else {
- folder_pull_part(s);
- s->state = HSCAN_EOF;
- }
- return;
-#else
- case HSCAN_INITIAL:
- case HSCAN_PRE_FROM:
-#endif /* !USE_FROM */
-
- scan_header:
- 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->boundarylenfinal = h->boundarylen+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, "news")
- /*|| !strcasecmp(ct->subtype, "partial")*/) {
- type = HSCAN_MESSAGE;
- }
- }
- } else {
- /* make the default type for multipart/digest be message/rfc822 */
- if ((s->parts
- && header_content_type_is(s->parts->content_type, "multipart", "digest"))) {
- ct = header_content_type_decode("message/rfc822");
- type = HSCAN_MESSAGE;
- d(printf("parent was multipart/digest, autoupgrading to message/rfc822?\n"));
- /* maybe we should do this too?
- header_raw_append_parse(&h->headers, "Content-Type: message/rfc822", -1);*/
- }
- }
- 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);
-
- d(printf ("\n\nOriginal content: '"));
- d(fwrite(*databuffer, sizeof(char), *datalength, stdout));
- d(printf("'\n"));
-
- if (*datalength > 0) {
- while (f) {
- camel_mime_filter_filter(f->filter, *databuffer, *datalength, presize,
- databuffer, datalength, &presize);
- d(printf ("Filtered content (%s): '",
- camel_type_to_name(((CamelObject *)f->filter)->s.type)));
- d(fwrite(*databuffer, sizeof(char), *datalength, stdout));
- d(printf("'\n"));
- f = f->next;
- }
- return;
- }
- } while (hb == h && *datalength > 0);
-
- /* check for any filter completion data */
- while (f) {
- camel_mime_filter_complete(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) {
- /* instead of a new state, we'll just store it locally and provide
- an accessor function */
- d(printf("Multipart %s Content %p: '%.*s'\n",
- h->prestage>0?"post":"pre", h, *datalength, *databuffer));
- if (h->prestage > 0) {
- if (h->posttext == NULL)
- h->posttext = g_byte_array_new();
- g_byte_array_append(h->posttext, *databuffer, *datalength);
- } else {
- if (h->pretext == NULL)
- h->pretext = g_byte_array_new();
- g_byte_array_append(h->pretext, *databuffer, *datalength);
- }
- }
- } while (hb==h && *datalength>0);
- h->prestage++;
- if (*datalength==0 && hb==h) {
- d(printf("got boundary: %s\n", hb->boundary));
- folder_scan_skip_line(s, NULL);
- 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:
- case HSCAN_PRE_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;
- default:
- /* FIXME: not sure if this is entirely right */
- }
-}
-
-#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;i<argc;i++) {
- const char *encoding = NULL, *charset = NULL;
- char *attachname;
-
- name = argv[i];
- printf("opening: %s", name);
-
- fd = open(name, O_RDONLY);
- if (fd==-1) {
- perror("Cannot open mailbox");
- exit(1);
- }
- s = folder_scan_init();
- folder_scan_init_with_fd(s, fd);
- s->scan_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")) {
-#if 0
- folder_push_filter_charset(s, "UTF-8", charset);
-#endif
- } else {
- charset = NULL;
- }
- } else {
- charset = NULL;
- }
-
- encoding = header_raw_find(&s->parts->headers, "Content-transfer-encoding", 0);
- 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++);
-#if 0
- folder_push_filter_save(s, attachname);
-#endif
- g_free(attachname);
-#if 0
- folder_push_filter_mime(s, 0);
-#endif
- }
- if (encoding && !strncasecmp(encoding, " quoted-printable", 17)) {
- printf("adding quoted-printable filter\n");
- attachname = g_strdup_printf("attach.%d.%d", i, attach++);
-#if 0
- folder_push_filter_save(s, attachname);
-#endif
- g_free(attachname);
-#if 0
- folder_push_filter_mime(s, 1);
-#endif
- }
-
- break;
- case HSCAN_BODY:
- printf("got body %d '%.*s'\n", len, len, data);
- break;
- case HSCAN_BODY_END:
- printf("end body %d '%.*s'\n", len, len, data);
- if (encoding && !strncasecmp(encoding, " base64", 7)) {
- printf("removing filters\n");
-#if 0
- folder_filter_pull(s);
- folder_filter_pull(s);
-#endif
- }
- if (encoding && !strncasecmp(encoding, " quoted-printable", 17)) {
- printf("removing filters\n");
-#if 0
- folder_filter_pull(s);
- folder_filter_pull(s);
-#endif
- }
- if (charset) {
-#if 0
- folder_filter_pull(s);
-#endif
- 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 cef51696df..0000000000
--- a/camel/camel-mime-parser.h
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Copyright (C) 2000 Helix Code Inc.
- *
- * Authors: Michael Zucchi <notzed@helixcode.com>
- *
- * 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 <camel/camel-object.h>
-
-#include <camel/camel-mime-utils.h>
-#include <camel/camel-mime-filter.h>
-#include <camel/camel-stream.h>
-
-#define CAMEL_MIME_PARSER(obj) CAMEL_CHECK_CAST (obj, camel_mime_parser_get_type (), CamelMimeParser)
-#define CAMEL_MIME_PARSER_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_mime_parser_get_type (), CamelMimeParserClass)
-#define CAMEL_IS_MIME_PARSER(obj) CAMEL_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_PRE_FROM, /* data before a 'From' line */
- 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_PRE_FROM_END, /* pre from end */
- 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);
-/* Do we want to know about the pre-from data? */
-void camel_mime_parser_scan_pre_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 *);
-
-/* read through the parser */
-int camel_mime_parser_read(CamelMimeParser *m, const char **databuffer, int len);
-
-/* 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 *);
-
-/* get multipart pre/postface */
-const char *camel_mime_parser_preface(CamelMimeParser *m);
-const char *camel_mime_parser_postface(CamelMimeParser *m);
-
-/* return the from line content */
-const char *camel_mime_parser_from_line(CamelMimeParser *m);
-
-/* 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 ad9c54f663..0000000000
--- a/camel/camel-mime-part-utils.c
+++ /dev/null
@@ -1,247 +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 <bertrand@helixcode.com>
- * Michael Zucchi <notzed@helixcode.com>
- *
- * 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <string.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"
-#include "camel-mime-filter-crlf.h"
-
-#define d(x) /*(printf("%s(%d): ", __FILE__, __LINE__),(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 = 0, end;
- CamelMimeFilter *fdec = NULL, *fcrlf = NULL, *fch = NULL;
- struct _header_content_type *ct;
- int decid=-1, crlfid=-1, chrid=-1;
- CamelStream *source;
- CamelSeekableStream *seekable_source = NULL;
- 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) {
- camel_object_ref((CamelObject *)source);
- if (CAMEL_IS_SEEKABLE_STREAM (source)) {
- seekable_source = CAMEL_SEEKABLE_STREAM (source);
- }
- }
-
- /* 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, we also need to do CRLF->LF and may 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 (fdec) {
- d(printf("Adding CRLF conversion filter\n"));
- fcrlf = (CamelMimeFilter *)camel_mime_filter_crlf_new(CAMEL_MIME_FILTER_CRLF_DECODE,
- CAMEL_MIME_FILTER_CRLF_MODE_CRLF_ONLY);
- crlfid = camel_mime_parser_filter_add(mp, fcrlf);
- }
-
- 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 (seekable_source /* !cache */) {
- start = camel_mime_parser_tell(mp) + seekable_source->bound_start;
- }
- while ( camel_mime_parser_step(mp, &buf, &len) != HSCAN_BODY_END ) {
- d(printf("appending o/p data: %d: %.*s\n", len, len, buf));
- if (buffer) {
- if (buffer->len > 20480 && seekable_source) {
- /* 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);
- camel_object_unref ((CamelObject *)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 (fcrlf) {
- camel_mime_filter_reset(fcrlf);
- camel_stream_filter_add(filter, fcrlf);
- }
- if (fch) {
- camel_mime_filter_reset(fch);
- camel_stream_filter_add(filter, fch);
- }
- camel_data_wrapper_construct_from_stream (dw, (CamelStream *)filter);
- camel_object_unref ((CamelObject *)filter);
- } else {
- camel_data_wrapper_construct_from_stream (dw, sub);
- }
- camel_object_unref ((CamelObject *)sub);
- }
-
- camel_mime_parser_filter_remove(mp, decid);
- camel_mime_parser_filter_remove(mp, crlfid);
- camel_mime_parser_filter_remove(mp, chrid);
-
- if (fdec)
- camel_object_unref((CamelObject *)fdec);
- if (fcrlf)
- camel_object_unref((CamelObject *)fcrlf);
- if (fch)
- camel_object_unref((CamelObject *)fch);
- if (source)
- camel_object_unref((CamelObject *)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;
-
-#ifndef NO_WARNINGS
-#warning This should use a camel-mime-multipart
-#endif
- 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);
- camel_object_unref ((CamelObject *)bodypart);
- }
-
- /* these are only return valid data in the MULTIPART_END state */
- camel_multipart_set_preface((CamelMultipart *)content, camel_mime_parser_preface(mp));
- camel_multipart_set_postface((CamelMultipart *)content, camel_mime_parser_postface(mp));
-
- d(printf("Created multi-part\n"));
- break; }
- default:
- g_warning("Invalid state encountered???: %d", camel_mime_parser_state(mp));
- }
- if (content) {
-#ifndef NO_WARNINGS
-#warning there just has got to be a better way ... to transfer the mime-type to the datawrapper
-#endif
- /* 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);
- camel_object_unref ((CamelObject *)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 <bertrand@helixcode.com>
- *
- * 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 <camel/camel-mime-part.h>
-
-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 c8720b2fea..0000000000
--- a/camel/camel-mime-part.c
+++ /dev/null
@@ -1,748 +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 <bertrand@helixcode.com>
- * Michael Zucchi <notzed@helixcode.com>
- *
- * 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <string.h>
-#include <stdio.h>
-#include <ctype.h>
-#include "hash-table-utils.h"
-#include "camel-mime-parser.h"
-#include "camel-stream-mem.h"
-#include "camel-stream-filter.h"
-#include "camel-mime-filter-basic.h"
-#include "camel-mime-filter-crlf.h"
-#include "camel-mime-filter-charset.h"
-#include "camel-mime-part.h"
-#include "camel-mime-part-utils.h"
-#include "camel-exception.h"
-#include "string-utils.h"
-
-#define d(x) /*(printf("%s(%d): ", __FILE__, __LINE__),(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 GHashTable *header_formatted_table;
-
-static CamelMediumClass *parent_class=NULL;
-
-/* Returns the class for a CamelMimePart */
-#define CMP_CLASS(so) CAMEL_MIME_PART_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-#define CDW_CLASS(so) CAMEL_DATA_WRAPPER_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-#define CMD_CLASS(so) CAMEL_MEDIUM_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-
-/* 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);
-
- header_formatted_table = g_hash_table_new(g_strcase_hash, g_strcase_equal);
- g_hash_table_insert(header_formatted_table, "Content-Type", (void *)1);
- g_hash_table_insert(header_formatted_table, "Content-Disposition", (void *)1);
- g_hash_table_insert(header_formatted_table, "To", (void *)1);
- g_hash_table_insert(header_formatted_table, "From", (void *)1);
- g_hash_table_insert(header_formatted_table, "Cc", (void *)1);
- g_hash_table_insert(header_formatted_table, "Bcc", (void *)1);
- g_hash_table_insert(header_formatted_table, "Message-ID", (void *)1);
-}
-
-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);
-
- parent_class = CAMEL_MEDIUM_CLASS (camel_type_get_global_classfuncs (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;
-}
-
-static void
-camel_mime_part_init (gpointer object, gpointer klass)
-{
- CamelMimePart *camel_mime_part = CAMEL_MIME_PART (object);
-
- camel_mime_part->content_type = header_content_type_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;
-}
-
-
-static void
-camel_mime_part_finalize (CamelObject *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)
- header_content_type_unref (mime_part->content_type);
-
- header_raw_clear(&mime_part->headers);
-}
-
-
-
-CamelType
-camel_mime_part_get_type (void)
-{
- static CamelType camel_mime_part_type = CAMEL_INVALID_TYPE;
-
- if (camel_mime_part_type == CAMEL_INVALID_TYPE) {
- camel_mime_part_type = camel_type_register (CAMEL_MEDIUM_TYPE, "CamelMimePart",
- sizeof (CamelMimePart),
- sizeof (CamelMimePartClass),
- (CamelObjectClassInitFunc) camel_mime_part_class_init,
- NULL,
- (CamelObjectInitFunc) camel_mime_part_init,
- (CamelObjectFinalizeFunc) camel_mime_part_finalize);
- }
-
- return camel_mime_part_type;
-}
-
-
-/* **** */
-
-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 */
-
- 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 = g_strstrip (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:
- if (mime_part->content_type)
- header_content_type_unref (mime_part->content_type);
- mime_part->content_type = header_content_type_decode (header_value);
- break;
- default:
- return FALSE;
- }
- return TRUE;
-}
-
-static void
-set_header (CamelMedium *medium, const char *header_name, const void *header_value)
-{
- CamelMimePart *part = CAMEL_MIME_PART (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 = CAMEL_MIME_PART (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 */
-
- /* 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)
-{
- char *text = header_encode_string (description);
-
- camel_medium_set_header (CAMEL_MEDIUM (mime_part),
- "Content-Description", text);
- g_free (text);
-}
-
-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-Disposition", 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, const 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) {
- const gchar *name = header_param (mime_part->disposition->params, "filename");
- if (name)
- return name;
- }
-
- return header_content_type_param (mime_part->content_type, "name");
-}
-
-
-/* **** 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);
-}
-
-CamelContentType *
-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);
- CamelContentType *object_content_type;
-
- parent_class->set_content_object (medium, content);
-
- object_content_type = camel_data_wrapper_get_mime_type_field (content);
- if (mime_part->content_type != object_content_type) {
- char *txt;
-
- txt = header_content_type_format (object_content_type);
- camel_medium_set_header (CAMEL_MEDIUM (mime_part), "Content-Type", txt);
- g_free(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 */
-#ifndef NO_WARNINGS
-#warning content-languages should be stored as a header
-#endif
-
- if (mp->headers) {
- struct _header_raw *h = mp->headers;
- char *val;
-
- /* fold/write the headers. But dont fold headers that are already formatted
- (e.g. ones with parameter-lists, that we know about, and have created) */
- while (h) {
- val = h->value;
- if (val == NULL) {
- g_warning("h->value is NULL here for %s", h->name);
- count = 0;
- } else if (g_hash_table_lookup(header_formatted_table, h->name) == NULL) {
- val = header_fold(val, strlen(h->name));
- count = camel_stream_printf(stream, "%s%s%s\n", h->name, isspace(val[0]) ? ":" : ": ", val);
- g_free(val);
- } else {
- count = camel_stream_printf(stream, "%s%s%s\n", h->name, isspace(val[0]) ? ":" : ": ", val);
- }
- 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;
- CamelMimeFilter *charenc = NULL;
- const char *charset;
-
- 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 (header_content_type_is(mp->content_type, "text", "*")) {
- charset = header_content_type_param(mp->content_type, "charset");
- if (!(charset == NULL || !strcasecmp(charset, "us-ascii") || !strcasecmp(charset, "utf-8"))) {
- charenc = (CamelMimeFilter *)camel_mime_filter_charset_new_convert("utf-8", charset);
- }
- }
-
- if (filter || charenc) {
- filter_stream = camel_stream_filter_new_with_stream(stream);
-
- /* if we have a character encoder, add that always */
- if (charenc) {
- camel_stream_filter_add(filter_stream, charenc);
- camel_object_unref((CamelObject *)charenc);
- }
-
- /* we only re-do crlf on encoded blocks */
- if (filter && header_content_type_is(mp->content_type, "text", "*")) {
- CamelMimeFilter *crlf = camel_mime_filter_crlf_new(CAMEL_MIME_FILTER_CRLF_ENCODE,
- CAMEL_MIME_FILTER_CRLF_MODE_CRLF_ONLY);
-
- camel_stream_filter_add(filter_stream, crlf);
- camel_object_unref((CamelObject *)crlf);
-
- }
-
- if (filter) {
- camel_stream_filter_add(filter_stream, filter);
- camel_object_unref((CamelObject *)filter);
- }
-
- stream = (CamelStream *)filter_stream;
- }
-
-#endif
- count = camel_data_wrapper_write_to_stream(content, stream);
- if (filter_stream) {
- camel_stream_flush((CamelStream *)filter_stream);
- camel_object_unref((CamelObject *)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_MESSAGE:
- /* set the default type of a message always */
- if (dw->content_type)
- header_content_type_unref (dw->content_type);
- dw->content_type = header_content_type_decode ("message/rfc822");
- case HSCAN_HEADER:
- 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"));
-#ifndef NO_WARNINGS
-#warning "Need to work out how to detect a (fatally) bad parse in the parser"
-#endif
- 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);
- }
- camel_object_unref((CamelObject *)mp);
- return ret;
-}
-
-/* this must be kept in sync with the header */
-static const char *encodings[] = {
- "",
- "7bit",
- "8bit",
- "base64",
- "quoted-printable",
- "binary"
-};
-
-const char *
-camel_mime_part_encoding_to_string (CamelMimePartEncodingType encoding)
-{
- if (encoding >= sizeof(encodings)/sizeof(encodings[0]))
- encoding = 0;
-
- return encodings[encoding];
-}
-
-/* FIXME I am not sure this is the correct way to do this. */
-CamelMimePartEncodingType
-camel_mime_part_encoding_from_string (const gchar *string)
-{
- int i;
-
- if (string != NULL) {
- for (i=0;i<sizeof(encodings)/sizeof(encodings[0]);i++)
- if (!strcasecmp(string, encodings[i]))
- return i;
- }
-
- 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 *)camel_object_new (CAMEL_MIME_PART_TYPE);
-}
-
-/**
- * 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);
- camel_object_unref (CAMEL_OBJECT (stream));
- camel_medium_set_content_object (medium, dw);
- camel_object_unref (CAMEL_OBJECT (dw));
- } else {
- if (medium->content)
- camel_object_unref (CAMEL_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 75f7bff6db..0000000000
--- a/camel/camel-mime-part.h
+++ /dev/null
@@ -1,130 +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 <bertrand@helixcode.com>
- * Michael Zucchi <notzed@helixcode.com>
- *
- * 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 <camel/camel-medium.h>
-#include <camel/camel-mime-utils.h>
-#include <camel/camel-mime-parser.h>
-
-#define CAMEL_MIME_PART_TYPE (camel_mime_part_get_type ())
-#define CAMEL_MIME_PART(obj) (CAMEL_CHECK_CAST((obj), CAMEL_MIME_PART_TYPE, CamelMimePart))
-#define CAMEL_MIME_PART_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_MIME_PART_TYPE, CamelMimePartClass))
-#define CAMEL_IS_MIME_PART(o) (CAMEL_CHECK_TYPE((o), CAMEL_MIME_PART_TYPE))
-
-/* note, if you change this, make sure you change the 'encodings' array in camel-mime-part.c */
-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_ENCODING_BINARY,
- 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;
-
- CamelContentType *content_type;
-
- struct _header_raw *headers; /* mime headers */
-};
-
-typedef struct _CamelMimePartClass {
- CamelMediumClass parent_class;
-
- /* Virtual methods */
- int (*construct_from_parser) (CamelMimePart *, CamelMimeParser *);
-} CamelMimePartClass;
-
-/* Standard Camel function */
-CamelType 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, const 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);
-CamelContentType *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 510323312c..0000000000
--- a/camel/camel-mime-utils.c
+++ /dev/null
@@ -1,3617 +0,0 @@
-/*
- * Copyright (C) 2000 Helix Code Inc.
- *
- * Authors: Michael Zucchi <notzed@helixcode.com>
- * Jeffrey Stedfast <fejj@helixcode.com>
- *
- * 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.
- */
-
-/* dont touch this file without my permission - Michael */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/param.h> /* for MAXHOSTNAMELEN */
-#include <fcntl.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#ifndef MAXHOSTNAMELEN
-#define MAXHOSTNAMELEN 1024
-#endif
-
-#include <unicode.h>
-#include <iconv.h>
-
-#include <time.h>
-
-#include <ctype.h>
-#include <errno.h>
-#include <regex.h>
-
-#include <glib.h>
-
-#include "camel-mime-utils.h"
-#include "camel-charset-map.h"
-
-#ifdef ENABLE_THREADS
-#include <pthread.h>
-#endif
-
-#ifndef CLEAN_DATE
-#include "broken-date-parser.h"
-#endif
-
-#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)
-
-#define CAMEL_UUDECODE_CHAR(c) (((c) - ' ') & 077)
-
-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 short camel_mime_special_table[256] = {
- 5, 5, 5, 5, 5, 5, 5, 5, 5,231, 7, 5, 5, 39, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 242,448, 76,192,192,192,192,192, 76, 76,448,448, 76,448, 72,324,
- 448,448,448,448,448,448,448,448,448,448, 76, 76, 76, 4, 76, 68,
- 76,448,448,448,448,448,448,448,448,448,448,448,448,448,448,448,
- 448,448,448,448,448,448,448,448,448,448,448,108,236,108,192, 64,
- 192,448,448,448,448,448,448,448,448,448,448,448,448,448,448,448,
- 448,448,448,448,448,448,448,448,448,448,448,192,192,192,192, 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 -DCLEAN_DATE -o buildtable -I.. `glib-config --cflags --libs` -lunicode -DBUILD_TABLE camel-mime-utils.c camel-charset-map.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_QPSAFE = 1<<6,
- IS_ESAFE = 1<<7, /* encoded word safe */
- IS_PSAFE = 1<<8, /* encoded word in phrase safe */
-};
-
-#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)) == 0)
-#define is_qpsafe(x) ((camel_mime_special_table[(unsigned char)(x)] & IS_QPSAFE) != 0)
-#define is_especial(x) ((camel_mime_special_table[(unsigned char)(x)] & IS_ESPECIAL) != 0)
-#define is_psafe(x) ((camel_mime_special_table[(unsigned char)(x)] & IS_PSAFE) != 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 */
-#define CHARS_ESPECIAL "()<>@,;:\"/[]?.=_" /* list of characters that must be encoded.
- encoded word in text specials: rfc 2047 5(1)*/
-#define CHARS_PSPECIAL "!*+-/" /* list of additional characters that can be left unencoded.
- encoded word in phrase specials: rfc 2047 5(3) */
-
-static void
-header_remove_bits(unsigned short bit, unsigned char *vals)
-{
- int i;
-
- for (i=0;vals[i];i++)
- camel_mime_special_table[vals[i]] &= ~ bit;
-}
-
-static void
-header_init_bits(unsigned short bit, unsigned short bitcopy, int remove, unsigned char *vals)
-{
- int i;
- int len = strlen(vals);
-
- if (!remove) {
- for (i=0;i<len;i++) {
- camel_mime_special_table[vals[i]] |= bit;
- }
- if (bitcopy) {
- for (i=0;i<256;i++) {
- if (camel_mime_special_table[i] & bitcopy)
- camel_mime_special_table[i] |= bit;
- }
- }
- } else {
- for (i=0;i<256;i++)
- camel_mime_special_table[i] |= bit;
- for (i=0;i<len;i++) {
- camel_mime_special_table[vals[i]] &= ~bit;
- }
- if (bitcopy) {
- for (i=0;i<256;i++) {
- if (camel_mime_special_table[i] & bitcopy)
- camel_mime_special_table[i] &= ~bit;
- }
- }
- }
-}
-
-static void
-header_decode_init(void)
-{
- int i;
-
- for (i=0;i<256;i++) {
- camel_mime_special_table[i] = 0;
- if (i<32)
- camel_mime_special_table[i] |= IS_CTRL;
- if ((i>=33 && i<=60) || (i>=62 && i<=126) || i==32 || i==9)
- camel_mime_special_table[i] |= (IS_QPSAFE|IS_ESAFE);
- if ((i>='0' && i<='9') || (i>='a' && i<='z') || (i>='A' && i<= 'Z'))
- camel_mime_special_table[i] |= IS_PSAFE;
- }
- camel_mime_special_table[127] |= IS_CTRL;
- camel_mime_special_table[' '] |= IS_SPACE;
- header_init_bits(IS_LWSP, 0, 0, CHARS_LWSP);
- header_init_bits(IS_TSPECIAL, IS_CTRL, 0, CHARS_TSPECIAL);
- header_init_bits(IS_SPECIAL, 0, 0, CHARS_SPECIAL);
- header_init_bits(IS_DSPECIAL, 0, FALSE, CHARS_DSPECIAL);
- header_remove_bits(IS_ESAFE, CHARS_ESPECIAL);
- header_init_bits(IS_PSAFE, 0, 0, CHARS_PSPECIAL);
-}
-
-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 short 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, gboolean break_lines, unsigned char *out, int *state, int *save)
-{
- int c1, c2;
- unsigned char *outptr = out;
-
- if (inlen>0)
- outptr += base64_encode_step(in, inlen, break_lines, outptr, state, save);
-
- c1 = ((unsigned char *)save)[1];
- c2 = ((unsigned char *)save)[2];
-
- d(printf("mode = %d\nc1 = %c\nc2 = %c\n",
- (int)((char *)save)[0],
- (int)((char *)save)[1],
- (int)((char *)save)[2]));
-
- switch (((char *)save)[0]) {
- case 2:
- outptr[2] = base64_alphabet[ ( (c2 &0x0f) << 2 ) ];
- g_assert(outptr[2] != 0);
- 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;
- }
- if (break_lines)
- *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, gboolean break_lines, 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 = ((unsigned char *)save)[1]; goto skip1;
- case 2: c1 = ((unsigned char *)save)[1];
- c2 = ((unsigned char *)save)[2]; goto skip2;
- }
-
- /* yes, we jump into the loop, no i'm not going to change it, it's 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 (break_lines && (++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;
-}
-
-
-/**
- * base64_decode_step: decode a chunk of base64 encoded data
- * @in: input stream
- * @len: max length of data to decode
- * @out: output stream
- * @state: holds the number of bits that are stored in @save
- * @save: leftover bits that have not yet been decoded
- *
- * Decodes a chunk of base64 encoded data
- **/
-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<inend) {
- c = camel_mime_base64_rank[*inptr++];
- if (c != 0xff) {
- v = (v<<6) | c;
- i++;
- if (i==4) {
- *outptr++ = v>>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;
-}
-
-char *
-base64_encode_simple (const char *data, int len)
-{
- unsigned char *out;
- int state = 0, outlen;
- unsigned int save = 0;
-
- out = g_malloc (len * 4 / 3 + 5);
- outlen = base64_encode_close ((unsigned char *)data, len, FALSE,
- out, &state, &save);
- out[outlen] = '\0';
- return (char *)out;
-}
-
-int
-base64_decode_simple (char *data, int len)
-{
- int state = 0;
- unsigned int save = 0;
-
- return base64_decode_step ((unsigned char *)data, len,
- (unsigned char *)data, &state, &save);
-}
-
-
-/**
- * uudecode_step: uudecode a chunk of data
- * @in: input stream
- * @len: max length of data to decode ( normally strlen(in) ??)
- * @out: output stream
- * @state: holds the number of bits that are stored in @save
- * @save: leftover bits that have not yet been decoded
- * @uulen: holds the value of the length-char which is used to calculate
- * how many more chars need to be decoded for that 'line'
- *
- * uudecodes a chunk of data. Assumes the "begin <mode> <file name>" line
- * has been stripped off.
- **/
-int
-uudecode_step (unsigned char *in, int len, unsigned char *out, int *state, guint32 *save, char *uulen)
-{
- register unsigned char *inptr, *outptr;
- unsigned char *inend, ch;
- register guint32 saved;
- gboolean last_was_eoln;
- int i;
-
- if (*uulen <= 0)
- last_was_eoln = TRUE;
- else
- last_was_eoln = FALSE;
-
- inend = in + len;
- outptr = out;
- saved = *save;
- i = *state;
- inptr = in;
- while (inptr < inend && *inptr) {
- if (*inptr == '\n' || last_was_eoln) {
- if (last_was_eoln) {
- *uulen = CAMEL_UUDECODE_CHAR (*inptr);
- last_was_eoln = FALSE;
- } else {
- last_was_eoln = TRUE;
- }
-
- inptr++;
- continue;
- }
-
- ch = *inptr++;
-
- if (*uulen > 0) {
- /* save the byte */
- saved = (saved << 8) | ch;
- i++;
- if (i == 4) {
- /* convert 4 uuencoded bytes to 3 normal bytes */
- unsigned char b0, b1, b2, b3;
-
- b0 = saved >> 24;
- b1 = saved >> 16 & 0xff;
- b2 = saved >> 8 & 0xff;
- b3 = saved & 0xff;
-
- if (*uulen >= 3) {
- *outptr++ = CAMEL_UUDECODE_CHAR (b0) << 2 | CAMEL_UUDECODE_CHAR (b1) >> 4;
- *outptr++ = CAMEL_UUDECODE_CHAR (b1) << 4 | CAMEL_UUDECODE_CHAR (b2) >> 2;
- *outptr++ = CAMEL_UUDECODE_CHAR (b2) << 6 | CAMEL_UUDECODE_CHAR (b3);
- } else {
- if (*uulen >= 1) {
- *outptr++ = CAMEL_UUDECODE_CHAR (b0) << 2 | CAMEL_UUDECODE_CHAR (b1) >> 4;
- }
- if (*uulen >= 2) {
- *outptr++ = CAMEL_UUDECODE_CHAR (b1) << 4 | CAMEL_UUDECODE_CHAR (b2) >> 2;
- }
- }
-
- i = 0;
- saved = 0;
- *uulen -= 3;
- }
- } else {
- break;
- }
- }
-
- *save = saved;
- *state = i;
-
- return outptr - out;
-}
-
-/* complete qp encoding */
-int
-quoted_encode_close(unsigned char *in, int len, unsigned char *out, int *state, int *save)
-{
- register unsigned char *outptr = out;
- int last;
-
- if (len>0)
- outptr += quoted_encode_step(in, len, outptr, state, save);
-
- last = *state;
- if (last != -1) {
- /* space/tab must be encoded if it's the last character on
- the line */
- if (is_qpsafe(last) && last!=' ' && last!=9) {
- *outptr++ = last;
- } else {
- *outptr++ = '=';
- *outptr++ = tohex[(last>>4) & 0xf];
- *outptr++ = tohex[last & 0xf];
- }
- }
-
- *save = 0;
- *state = -1;
-
- return outptr-out;
-}
-
-/* perform qp encoding, initialise state to -1 and save to 0 on first invocation */
-int
-quoted_encode_step (unsigned char *in, int len, unsigned char *out, int *statep, int *save)
-{
- register guchar *inptr, *outptr, *inend;
- guchar c;
- register int sofar = *save; /* keeps track of how many chars on a line */
- register int last = *statep; /* keeps track if last char to end was a space cr etc */
-
- inptr = in;
- inend = in + len;
- outptr = out;
- while (inptr < inend) {
- c = *inptr++;
- if (c == '\r') {
- if (last != -1) {
- *outptr++ = '=';
- *outptr++ = tohex[(last >> 4) & 0xf];
- *outptr++ = tohex[last & 0xf];
- sofar += 3;
- }
- last = c;
- } else if (c == '\n') {
- if (last != -1 && last != '\r') {
- *outptr++ = '=';
- *outptr++ = tohex[(last >> 4) & 0xf];
- *outptr++ = tohex[last & 0xf];
- }
- *outptr++ = '\n';
- sofar = 0;
- last = -1;
- } else {
- if (last != -1) {
- if (is_qpsafe(last)) {
- *outptr++ = last;
- sofar++;
- } else {
- *outptr++ = '=';
- *outptr++ = tohex[(last >> 4) & 0xf];
- *outptr++ = tohex[last & 0xf];
- sofar += 3;
- }
- }
-
- if (is_qpsafe(c)) {
- if (sofar > 74) {
- *outptr++ = '=';
- *outptr++ = '\n';
- sofar = 0;
- }
-
- /* delay output of space char */
- if (c==' ' || c=='\t') {
- last = c;
- } else {
- *outptr++ = c;
- sofar++;
- last = -1;
- }
- } else {
- if (sofar > 72) {
- *outptr++ = '=';
- *outptr++ = '\n';
- sofar = 3;
- } else
- sofar += 3;
-
- *outptr++ = '=';
- *outptr++ = tohex[(c >> 4) & 0xf];
- *outptr++ = tohex[c & 0xf];
- last = -1;
- }
- }
- }
- *save = sofar;
- *statep = last;
-
- 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<inend) {
- switch (state) {
- case 0:
- while (inptr<inend) {
- c = *inptr++;
- if (c=='=') {
- state = 1;
- break;
- }
-#ifdef CANONICALISE_EOL
- /*else if (c=='\r') {
- state = 3;
- } else if (c=='\n') {
- *outptr++ = '\r';
- *outptr++ = c;
- } */
-#endif
- else {
- *outptr++ = c;
- }
- }
- break;
- case 1:
- c = *inptr++;
- if (c=='\n') {
- /* soft break ... unix end of line */
- state = 0;
- } else {
- save = c;
- state = 2;
- }
- break;
- case 2:
- c = *inptr++;
- if (isxdigit(c) && isxdigit(save)) {
- c = toupper(c);
- save = toupper(save);
- *outptr++ = (((save>='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 (mainly by allowing 0x20 <> _)
-*/
-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<inend) {
- c = *inptr++;
- if (c=='=') {
- /* silently ignore truncated data? */
- if (inend-in>=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 */
-/* safemask is the mask to apply to the camel_mime_special_table to determine what
- characters can safely be included without encoding */
-static int
-quoted_encode(const unsigned char *in, int len, unsigned char *out, unsigned short safemask)
-{
- register const unsigned char *inptr, *inend;
- unsigned char *outptr;
- unsigned char c;
-
- inptr = in;
- inend = in + len;
- outptr = out;
- while (inptr < inend) {
- c = *inptr++;
- if (c==' ') {
- *outptr++ = '_';
- } else if (camel_mime_special_table[c] & safemask) {
- *outptr++ = c;
- } else {
- *outptr++ = '=';
- *outptr++ = tohex[(c >> 4) & 0xf];
- *outptr++ = tohex[c & 0xf];
- }
- }
-
- d(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 =='(' && *inptr != '\0')) {
- while (is_lwsp(*inptr) && inptr != '\0') {
- d2(printf("(%c)", *inptr));
- inptr++;
- }
- d2(printf("\n"));
-
- /* check for comments */
- if (*inptr == '(') {
- int depth = 1;
- inptr++;
- while (depth && (c=*inptr) && *inptr != '\0') {
- 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 *inbuf;
- char *encname;
- int tmplen;
- int ret;
- char *decword = NULL;
- char *decoded = NULL;
- char *outbase = NULL;
- char *outbuf;
- int inlen, outlen;
- iconv_t ic;
-
- d(printf("rfc2047: decoding '%.*s'\n", len, in));
-
- /* quick check to see if this could possibly be a real encoded word */
- if (len < 8 || !(in[0] == '=' && in[1] == '?' && in[len-1] == '=' && in[len-2] == '?')) {
- d(printf("invalid\n"));
- return NULL;
- }
-
- /* skip past the charset to the encoding type */
- inptr = memchr (inptr, '?', inend-inptr);
- if (inptr != NULL && inptr < inend + 2 && inptr[2] == '?') {
- d(printf("found ?, encoding is '%c'\n", inptr[0]));
- inptr++;
- tmplen = inend-inptr-2;
- decword = alloca(tmplen); /* this will always be more-than-enough room */
- switch(toupper(inptr[0])) {
- case 'Q':
- inlen = quoted_decode(inptr+2, tmplen, decword);
- break;
- case 'B': {
- int state=0;
- unsigned int save=0;
- inlen = base64_decode_step((char *)inptr+2, tmplen, decword, &state, &save);
- /* if state != 0 then error? */
- break;
- }
- default:
- /* uhhh, unknown encoding type - probably an invalid encoded word string */
- return NULL;
- }
- d(printf("The encoded length = %d\n", inlen));
- if (inlen>0) {
- /* 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+16;
- outbase = alloca(outlen);
- outbuf = outbase;
-
- /* TODO: Should this cache iconv converters? */
- ic = iconv_open("UTF-8", encname);
- if (ic != (iconv_t)-1) {
- ret = iconv(ic, &inbuf, &inlen, &outbuf, &outlen);
- if (ret>=0) {
- iconv(ic, NULL, 0, &outbuf, &outlen);
- *outbuf = 0;
- decoded = g_strdup(outbase);
- }
- iconv_close(ic);
- } 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);
-}
-
-/* ok, a lot of mailers are BROKEN, and send iso-latin1 encoded
- headers, when they should just be sticking to US-ASCII
- according to the rfc's. Anyway, since the conversion to utf-8
- is trivial, just do it here without iconv */
-static GString *
-append_latin1(GString *out, const char *in, int len)
-{
- unsigned int c;
-
- while (len) {
- c = (unsigned int)*in++;
- len--;
- if (c & 0x80) {
- out = g_string_append_c(out, 0xc0 | ((c>>6) & 0x3)); /* 110000xx */
- out = g_string_append_c(out, 0x80 | (c&0x3f)); /* 10xxxxxx */
- } else {
- out = g_string_append_c(out, c);
- }
- }
- return out;
-}
-
-/* decodes a simple text, rfc822 */
-static char *
-header_decode_text (const char *in, int inlen)
-{
- GString *out;
- char *inptr, *inend, *start, *word_start;
- char *decoded;
- gboolean wasdword = FALSE;
- gboolean wasspace = FALSE;
-
- out = g_string_new ("");
- start = inptr = (char *) in;
- inend = inptr + inlen;
-
- word_start = NULL;
- while (inptr && inptr < inend) {
- unsigned char c = *inptr++;
-
- if (is_lwsp (c) && !wasspace) {
- char *word, *dword;
-
- if (word_start)
- word = word_start;
- else
- word = start;
-
- dword = rfc2047_decode_word (word, inptr - word - 1);
-
- if (dword) {
- if (!wasdword && word_start)
- g_string_append_len (out, start, word_start - start);
-
- g_string_append (out, dword);
- g_free (dword);
- wasdword = TRUE;
- } else {
- out = append_latin1 (out, start, inptr - start - 1);
- wasdword = FALSE;
- }
-
- start = inptr - 1;
- word_start = NULL;
- wasspace = TRUE;
- } else if (!is_lwsp (c)) {
- wasspace = FALSE;
- if (!word_start)
- word_start = inptr - 1;
- }
- }
-
- if (inptr - start) {
- char *word, *dword;
-
- if (word_start)
- word = word_start;
- else
- word = start;
-
- dword = rfc2047_decode_word (word, inptr - word);
-
- if (dword) {
- if (!wasdword && word_start)
- g_string_append_len (out, start, word_start - start);
-
- g_string_append (out, dword);
- g_free (dword);
- } else {
- out = append_latin1 (out, start, inptr - start);
- }
- }
-
- decoded = out->str;
- g_string_free (out, FALSE);
-
- return decoded;
-}
-
-#if 0 /* This is broken */
-
-/* so in what way is it broken? */
-
-/* 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));
- g_free (decword);
- } else {
- out = append_latin1(out, inptr, encend-inptr+2);
- }
- inptr = encend+2;
- }
- out = append_latin1(out, inptr, inend-inptr);
-
- encstart = out->str;
- g_string_free(out, FALSE);
-
- return encstart;
-}
-#endif
-
-char *
-header_decode_string(const char *in)
-{
- if (in == NULL)
- return NULL;
- return header_decode_text(in, strlen(in));
-}
-
-/* how long a sequence of pre-encoded words should be less than, to attempt to
- fit into a properly folded word. Only a guide. */
-#define CAMEL_FOLD_PREENCODED (24)
-
-/* FIXME: needs a way to cache iconv opens for different charsets? */
-static void
-rfc2047_encode_word(GString *outstring, const char *in, int len, const char *type, unsigned short safemask)
-{
- iconv_t ic = (iconv_t *)-1;
- char *buffer, *out, *ascii;
- size_t inlen, outlen, enclen, bufflen;
- char *inptr, *p;
- int first = 1;
-
- d(printf("Converting [%d] '%.*s' to %s\n", len, len, in, type));
-
- /* convert utf8->encoding */
- bufflen = len*6+16;
- buffer = alloca(bufflen);
- inlen = len;
- inptr = (char *) in;
-
- ascii = alloca(bufflen);
-
- if (strcasecmp(type, "UTF-8") != 0)
- ic = iconv_open(type, "UTF-8");
-
- while (inlen) {
- int convlen, i, proclen;
-
- /* break up words into smaller bits, what we really want is encoded + overhead < 75,
- but we'll just guess what that means in terms of input chars, and assume its good enough */
-
- out = buffer;
- outlen = bufflen;
-
- if (ic == (iconv_t) -1) {
- /* native encoding case, the easy one (?) */
- /* we work out how much we can convert, and still be in length */
- /* proclen will be the result of input characters that we can convert, to the nearest
- (approximated) valid utf8 char */
- convlen = 0;
- proclen = 0;
- p = inptr;
- i = 0;
- while (p < (in+len) && convlen < (75 - strlen("=?utf-8?q??="))) {
- unsigned char c = *p++;
-
- if (c >= 0xc0)
- proclen = i;
- i++;
- if (c < 0x80)
- proclen = i;
- if (camel_mime_special_table[c] & safemask)
- convlen += 1;
- else
- convlen += 3;
- }
- /* well, we probably have broken utf8, just copy it anyway what the heck */
- if (proclen == 0) {
- w(g_warning("Appear to have truncated utf8 sequence"));
- proclen = inlen;
- }
- memcpy(out, inptr, proclen);
- inptr += proclen;
- inlen -= proclen;
- out += proclen;
- } else {
- /* well we could do similar, but we can't (without undue effort), we'll just break it up into
- hopefully-small-enough chunks, and leave it at that */
- convlen = MIN(inlen, CAMEL_FOLD_PREENCODED);
- p = inptr;
- if (iconv(ic, &inptr, &convlen, &out, &outlen) == -1) {
- w(g_warning("Conversion problem: conversion truncated: %s", strerror(errno)));
- /* blah, we include it anyway, better than infinite loop ... */
- inptr = p + convlen;
- } else {
- /* make sure we flush out any shift state */
- iconv(ic, NULL, 0, &out, &outlen);
- }
- inlen -= (inptr - p);
- }
-
- enclen = out-buffer;
-
- /* create token */
- out = ascii;
- if (first)
- first = 0;
- else
- *out++ = ' ';
- out += sprintf(out, "=?%s?Q?", type);
- out += quoted_encode(buffer, enclen, out, safemask);
- sprintf(out, "?=");
-
- d(printf("converted part = %s\n", ascii));
-
- g_string_append(outstring, ascii);
- }
-
- if (ic == (iconv_t) -1) {
- iconv_close(ic);
- }
-}
-
-
-/* TODO: Should this worry about quotes?? */
-char *
-header_encode_string (const unsigned char *in)
-{
- const unsigned char *inptr = in, *start, *word;
- gboolean last_was_encoded = FALSE;
- gboolean last_was_space = FALSE;
- int encoding;
- GString *out;
- 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 */
- out = g_string_new ("");
- inptr = in;
- encoding = 0;
- word = NULL;
- 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;
- }
-
- if (unicode_isspace (c) && !last_was_space) {
- /* we've reached the end of a 'word' */
- if (word && !(last_was_encoded && encoding)) {
- g_string_append_len (out, start, word - start);
- start = word;
- }
-
- switch (encoding) {
- case 0:
- out = g_string_append_len (out, word, inptr - start);
- last_was_encoded = FALSE;
- break;
- case 1:
- if (last_was_encoded)
- g_string_append_c (out, ' ');
-
- rfc2047_encode_word (out, start, inptr - start, "ISO-8859-1", IS_ESAFE);
- last_was_encoded = TRUE;
- break;
- case 2:
- if (last_was_encoded)
- g_string_append_c (out, ' ');
-
- rfc2047_encode_word (out, start, inptr - start,
- camel_charset_best (start, inptr - start), IS_ESAFE);
- last_was_encoded = TRUE;
- break;
- }
-
- last_was_space = TRUE;
- start = inptr;
- word = NULL;
- encoding = 0;
- } else if (c > 127 && c < 256) {
- encoding = MAX (encoding, 1);
- last_was_space = FALSE;
- } else if (c >= 256) {
- encoding = MAX (encoding, 2);
- last_was_space = FALSE;
- } else if (!unicode_isspace (c)) {
- last_was_space = FALSE;
- }
-
- if (!unicode_isspace (c) && !word)
- word = inptr;
-
- inptr = newinptr;
- }
-
- if (inptr - start) {
- if (word && !(last_was_encoded && encoding)) {
- g_string_append_len (out, start, word - start);
- start = word;
- }
-
- switch (encoding) {
- case 0:
- out = g_string_append_len (out, start, inptr - start);
- break;
- case 1:
- if (last_was_encoded)
- g_string_append_c (out, ' ');
-
- rfc2047_encode_word (out, start, inptr - start, "ISO-8859-1", IS_ESAFE);
- break;
- case 2:
- if (last_was_encoded)
- g_string_append_c (out, ' ');
-
- rfc2047_encode_word (out, start, inptr - start,
- camel_charset_best (start, inptr - start - 1), IS_ESAFE);
- break;
- }
- }
-
- outstr = out->str;
- g_string_free (out, FALSE);
-
- return outstr;
-}
-
-/* apply quoted-string rules to a string */
-static void
-quote_word(GString *out, gboolean do_quotes, const char *start, int len)
-{
- int i, c;
-
- /* TODO: What about folding on long lines? */
- if (do_quotes)
- g_string_append_c(out, '"');
- for (i=0;i<len;i++) {
- c = *start++;
- if (c == '\"' || c=='\\' || c=='\r')
- g_string_append_c(out, '\\');
- g_string_append_c(out, c);
- }
- if (do_quotes)
- g_string_append_c(out, '"');
-}
-
-/* incrementing possibility for the word type */
-enum _phrase_word_t {
- WORD_ATOM,
- WORD_QSTRING,
- WORD_2047
-};
-
-struct _phrase_word {
- const unsigned char *start, *end;
- enum _phrase_word_t type;
- int encoding;
-};
-
-/* split the input into words
- with info about each word
- merge common word types
- clean up
-*/
-
-static GList *
-header_encode_phrase_get_words (const unsigned char *in)
-{
- const unsigned char *inptr = in, *start, *last;
- struct _phrase_word *word;
- enum _phrase_word_t type;
- int encoding, count = 0;
- GList *words = NULL;
-
- /* break the input into words */
- type = WORD_ATOM;
- last = inptr;
- start = inptr;
- encoding = 0;
- 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 (count > 0) {
- word = g_new0 (struct _phrase_word, 1);
- word->start = start;
- word->end = last;
- word->type = type;
- word->encoding = encoding;
- words = g_list_append (words, word);
- count = 0;
- }
-
- start = inptr;
- type = WORD_ATOM;
- encoding = 0;
- } else {
- count++;
- if (c < 128) {
- if (!is_atom (c))
- type = MAX (type, WORD_QSTRING);
- } else if (c > 127 && c < 256) {
- type = WORD_2047;
- encoding = MAX (encoding, 1);
- } else if (c >= 256) {
- type = WORD_2047;
- encoding = MAX (encoding, 2);
- }
- }
-
- last = inptr;
- }
-
- if (count > 0) {
- word = g_new0 (struct _phrase_word, 1);
- word->start = start;
- word->end = last;
- word->type = type;
- word->encoding = encoding;
- words = g_list_append (words, word);
- }
-
- return words;
-}
-
-static void
-header_encode_phrase_merge_words (GList **wordsp)
-{
- GList *wordl, *nextl, *words = *wordsp;
- struct _phrase_word *word, *next;
-
- /* scan the list, checking for words of similar types that can be merged */
- wordl = words;
- while (wordl) {
- word = wordl->data;
- /* leave atoms as atoms (unless they're surrounded by quoted words??) */
- if (word->type != WORD_ATOM) {
- nextl = g_list_next (wordl);
- while (nextl) {
- next = nextl->data;
- /* merge nodes of the same type AND we are not creating too long a string */
- if (word->type == next->type) {
- if (next->end - word->start < CAMEL_FOLD_PREENCODED) {
- word->end = next->end;
- words = g_list_remove_link (words, nextl);
- g_free (next);
- nextl = g_list_next (wordl);
- } else {
- /* if it is going to be too long, make sure we include the
- separating whitespace */
- word->end = next->start;
- break;
- }
- } else {
- break;
- }
- }
- }
- wordl = g_list_next (wordl);
- }
-
- *wordsp = words;
-}
-
-/* encodes a phrase sequence (different quoting/encoding rules to strings) */
-char *
-header_encode_phrase (const unsigned char *in)
-{
- struct _phrase_word *word = NULL, *last_word = NULL;
- GList *words, *wordl;
- GString *out;
- char *outstr;
-
- if (in == NULL)
- return NULL;
-
- words = header_encode_phrase_get_words (in);
- if (!words)
- return NULL;
-
- header_encode_phrase_merge_words (&words);
-
- out = g_string_new ("");
-
- /* output words now with spaces between them */
- wordl = words;
- while (wordl) {
- const char *start;
- int len;
-
- word = wordl->data;
-
- /* append correct number of spaces between words */
- if (last_word && !(last_word->type == WORD_2047 && word->type == WORD_2047)) {
- /* one or both of the words are not encoded so we write the spaces out untouched */
- len = word->start - last_word->end;
- out = g_string_append_len (out, last_word->end, len);
- }
-
- switch (word->type) {
- case WORD_ATOM:
- out = g_string_append_len (out, word->start, word->end - word->start);
- break;
- case WORD_QSTRING:
- quote_word (out, TRUE, word->start, word->end - word->start);
- break;
- case WORD_2047:
- if (last_word && last_word->type == WORD_2047) {
- /* include the whitespace chars between these 2 words in the
- resulting rfc2047 encoded word. */
- len = word->end - last_word->end;
- start = last_word->end;
-
- /* encoded words need to be separated by linear whitespace */
- g_string_append_c (out, ' ');
- } else {
- len = word->end - word->start;
- start = word->start;
- }
-
- if (word->encoding == 1)
- rfc2047_encode_word (out, start, len, "ISO-8859-1", IS_PSAFE);
- else
- rfc2047_encode_word (out, start, len,
- camel_charset_best (start, len), IS_PSAFE);
- break;
- }
-
- g_free (last_word);
- wordl = g_list_next (wordl);
-
- last_word = word;
- }
-
- /* and we no longer need the list */
- g_free (word);
- g_list_free (words);
-
- 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);
-}
-
-/*
- <"> * ( <any char except <"> \, cr / \ <any char> ) <">
-*/
-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 || (ct->type == NULL && ct->subtype == 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;
- const char *comment = 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, *last;
-
- /* perform internationalised decoding, and append */
- text = header_decode_string(pre);
- name = g_string_append(name, text);
- last = pre;
- g_free(text);
-
- pre = header_decode_word(&inptr);
- if (pre) {
- int l = strlen(last);
- int p = strlen(pre);
- /* dont append ' ' between sucsessive encoded words */
- if ((l>6 && last[l-2] == '?' && last[l-1] == '=')
- && (p>6 && pre[0] == '=' && pre[1] == '?')) {
- /* dont append ' ' */
- } else {
- name = g_string_append_c(name, ' ');
- }
- }
- g_free(last);
- }
- 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);
- }
- comment = inptr;
- header_decode_lwsp(&inptr);
- }
- g_free(pre);
-
- /* now at '@' domain part */
- if (*inptr == '@') {
- char *dom;
-
- inptr++;
- addr = g_string_append_c(addr, '@');
- comment = inptr;
- 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 && comment != NULL && inptr>comment) { /* check for comment after address */
- char *text, *tmp;
- const char *comstart, *comend;
-
- /* this is a bit messy, we go from the last known position, because
- decode_domain/etc skip over any comments on the way */
- /* FIXME: This wont detect comments inside the domain itself,
- but nobody seems to use that feature anyway ... */
-
- d(printf("checking for comment from '%s'\n", comment));
-
- comstart = strchr(comment, '(');
- if (comstart) {
- comstart++;
- header_decode_lwsp(&inptr);
- comend = inptr-1;
- while (comend > comstart && comend[0] != ')')
- comend--;
-
- if (comend > comstart) {
- d(printf(" looking at subset '%.*s'\n", comend-comstart, comstart));
- tmp = g_strndup(comstart, comend-comstart);
- 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;
-}
-
-static char *
-header_msgid_decode_internal(const char **in)
-{
- const char *inptr = *in;
- char *msgid = NULL;
-
- d(printf("decoding Message-ID: '%s'\n", *in));
-
- 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));
- }
- *in = inptr;
-
- return msgid;
-}
-
-char *
-header_msgid_decode(const char *in)
-{
- if (in == NULL)
- return NULL;
-
- return header_msgid_decode_internal(&in);
-}
-
-void
-header_references_list_append_asis(struct _header_references **list, char *ref)
-{
- struct _header_references *w = (struct _header_references *)list, *n;
- while (w->next)
- w = w->next;
- n = g_malloc(sizeof(*n));
- n->id = ref;
- n->next = 0;
- w->next = n;
-}
-
-int
-header_references_list_size(struct _header_references **list)
-{
- int count = 0;
- struct _header_references *w = *list;
- while (w) {
- count++;
- w = w->next;
- }
- return count;
-}
-
-void
-header_references_list_clear(struct _header_references **list)
-{
- struct _header_references *w = *list, *n;
- while (w) {
- n = w->next;
- g_free(w->id);
- g_free(w);
- w = n;
- }
- *list = NULL;
-}
-
-/* generate a list of references, from most recent up */
-struct _header_references *
-header_references_decode(const char *in)
-{
- const char *inptr = in;
- struct _header_references *head = NULL, *node;
- char *id, *word;
-
- if (in == NULL || in[0] == '\0')
- return NULL;
-
- while (*inptr) {
- header_decode_lwsp(&inptr);
- if (*inptr == '<') {
- id = header_msgid_decode_internal(&inptr);
- if (id) {
- node = g_malloc(sizeof(*node));
- node->next = head;
- head = node;
- node->id = id;
- }
- } else {
- word = header_decode_word(&inptr);
- if (word)
- g_free (word);
- else if (*inptr != '\0')
- inptr++; /* Stupid mailer tricks */
- }
- }
-
- return head;
-}
-
-struct _header_references *
-header_references_dup(const struct _header_references *list)
-{
- struct _header_references *new = NULL, *tmp;
-
- while (list) {
- tmp = g_new(struct _header_references, 1);
- tmp->next = new;
- tmp->id = g_strdup(list->id);
- new = tmp;
- list = list->next;
- }
- return new;
-}
-
-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));
-
- 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_decode_param_list(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, &param, &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;
-}
-
-struct _header_param *
-header_param_list_decode(const char *in)
-{
- if (in == NULL)
- return NULL;
-
- return header_decode_param_list(&in);
-}
-
-void
-header_param_list_format_append(GString *out, struct _header_param *p)
-{
- int len = out->len;
- char *ch;
-
- while (p) {
- int here = out->len;
- if (len+strlen(p->name)+strlen(p->value)>60) {
- out = g_string_append(out, ";\n\t");
- len = 0;
- } else
- out = g_string_append (out, "; ");
-
- g_string_sprintfa(out, "%s=", p->name);
-
- for (ch = p->value; *ch; ch++) {
- if (is_tspecial (*ch) || is_lwsp (*ch))
- break;
- }
- if (!*ch)
- g_string_append(out, p->value);
- else
- quote_word(out, TRUE, p->value, strlen(p->value));
-
- len += (out->len - here);
- p = p->next;
- }
-}
-
-char *
-header_param_list_format(struct _header_param *p)
-{
- GString *out = g_string_new("");
- char *ret;
-
- header_param_list_format_append(out, p);
- ret = out->str;
- g_string_free(out, FALSE);
- return ret;
-}
-
-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_decode_param_list(&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("<NULL>\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_type_simple(struct _header_content_type *ct)
-{
- return g_strdup_printf("%s/%s", ct->type, ct->subtype);
-}
-
-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_decode_param_list(&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, it's only for display */
- if (day) {
- d(printf ("got day: %s\n", day));
- g_free (day);
- header_decode_lwsp (&inptr);
- if (*inptr == ',') {
- inptr++;
- } else {
-#ifndef CLEAN_DATE
- char *newdate;
-
- w(g_warning("day not followed by ',' it's probably a broken mail client, so we'll ignore its date entirely"));
- w(printf ("Giving it one last chance...\n"));
- newdate = parse_broken_date (in);
- if (newdate) {
- w(printf ("Got: %s\n", newdate));
- t = header_decode_date (newdate, saveoffset);
- g_free (newdate);
- return t;
- }
-#endif
- if (saveoffset)
- *saveoffset = 0;
- return 0;
- }
- }
- }
- tm.tm_mday = header_decode_int(&inptr);
- monthname = decode_token(&inptr);
- if (monthname) {
- for (i=0;i<sizeof(tz_months)/sizeof(tz_months[0]);i++) {
- if (!strcasecmp(tz_months[i], monthname)) {
- tm.tm_mon = i;
- break;
- }
- }
- g_free(monthname);
- }
- year = header_decode_int(&inptr);
- if (year < 69 || (year >= 100 && year < 1900)) {
- tm.tm_year = 100 + year;
- } else if (year < 100) {
- tm.tm_year = year;
- } else {
- tm.tm_year = year - 1900;
- }
- /* get the time ... yurck */
- tm.tm_hour = header_decode_int(&inptr);
- header_decode_lwsp(&inptr);
- if (*inptr == ':')
- inptr++;
- tm.tm_min = header_decode_int(&inptr);
- header_decode_lwsp(&inptr);
- if (*inptr == ':')
- inptr++;
- tm.tm_sec = header_decode_int(&inptr);
- header_decode_lwsp(&inptr);
- if (*inptr == '+'
- || *inptr == '-') {
- offset = (*inptr++)=='-'?-1:1;
- offset = offset * header_decode_int(&inptr);
- d(printf("abs signed offset = %d\n", offset));
- } else if (isdigit(*inptr)) {
- offset = header_decode_int(&inptr);
- d(printf("abs offset = %d\n", offset));
- } else {
- char *tz = decode_token(&inptr);
-
- if (tz) {
- for (i=0;i<sizeof(tz_offsets)/sizeof(tz_offsets[0]);i++) {
- if (!strcasecmp(tz_offsets[i].name, tz)) {
- offset = tz_offsets[i].offset;
- break;
- }
- }
- g_free(tz);
- }
- /* some broken mailers seem to put in things like GMT+1030 instead of just +1030 */
- header_decode_lwsp(&inptr);
- if (*inptr == '+' || *inptr == '-') {
- int sign = (*inptr++)=='-'?-1:1;
- offset = offset + (header_decode_int(&inptr)*sign);
- }
- d(printf("named offset = %d\n", offset));
- }
-
- t = mktime(&tm);
-#if defined(HAVE_TIMEZONE)
- t -= timezone;
-#elif defined(HAVE_TM_GMTOFF)
- t += tm.tm_gmtoff;
-#else
-#error Neither HAVE_TIMEZONE nor HAVE_TM_GMTOFF defined. Rerun autoheader, autoconf, etc.
-#endif
-
- /* t is now GMT of the time we want, but not offset by the timezone ... */
-
- d(printf(" gmt normalized? = %s\n", ctime(&t)));
-
- /* this should convert the time to the GMT equiv time */
- t -= ( (offset/100) * 60*60) + (offset % 100)*60;
-
- d(printf(" gmt normalized for timezone? = %s\n", ctime(&t)));
-
- d({
- char *tmp;
- tmp = header_format_date(t, offset);
- printf(" encoded again: %s\n", tmp);
- g_free(tmp);
- });
-
- if (saveoffset)
- *saveoffset = offset;
-
- return t;
-}
-
-/* extra rfc checks */
-#define CHECKS
-
-#ifdef CHECKS
-static void
-check_header(struct _header_raw *h)
-{
- unsigned char *p;
-
- p = h->value;
- 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==':')
- in++;
- fieldlen = in-header-1;
- while (is_lwsp(*in))
- in++;
- if (fieldlen == 0 || header[fieldlen] != ':') {
- printf("Invalid header line: '%s'\n", header);
- return;
- }
- 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;
-}
-
-char *
-header_msgid_generate (void)
-{
- char host[MAXHOSTNAMELEN];
-#ifdef ENABLE_THREADS
- static pthread_mutex_t count_lock = PTHREAD_MUTEX_INITIALIZER;
-#define COUNT_LOCK() pthread_mutex_lock (&count_lock)
-#define COUNT_UNLOCK() pthread_mutex_unlock (&count_lock)
-#else
-#define COUNT_LOCK()
-#define COUNT_UNLOCK()
-#endif /* ENABLE_THREADS */
- static gint count = 0;
- gint hrv;
- char *ret;
-
- hrv = gethostname (host, sizeof (host));
-
- COUNT_LOCK ();
- ret = g_strdup_printf ("%d.%d.%d.camel@%s", (gint) time (NULL), getpid (), count++,
- (hrv == 0 && host && *host) ? host : "unknown.host");
- COUNT_UNLOCK ();
-
- return ret;
-}
-
-
-static struct {
- char *name;
- char *pattern;
-} mail_list_magic[] = {
- { "Sender", " *owner-([^@]+)" },
- { "Return-Path", " *owner-([^@]+)" },
- { "X-BeenThere", " *([^@]+)" },
- { "Delivered-To", " *mailing list ([^@]+)" },
- { "X-Mailing-List", " *([^@]+)" },
- { "X-Loop", " *([^@]+)" },
- { "List-Id", " *([^<]+)" },
-};
-
-char *
-header_raw_check_mailing_list(struct _header_raw **list)
-{
- const char *v;
- regex_t pattern;
- regmatch_t match[2];
- int i, errcode;
-
- for (i = 0; i < sizeof (mail_list_magic) / sizeof (mail_list_magic[0]); i++) {
- if ((errcode = regcomp (&pattern, mail_list_magic[i].pattern, REG_EXTENDED|REG_ICASE)) != 0) {
- char *errstr;
- size_t len;
-
- len = regerror (errcode, &pattern, NULL, 0);
- errstr = g_malloc0 (len + 1);
- regerror (errcode, &pattern, errstr, len);
-
- g_warning ("Internal error, compiling regex failed: %s: %s",
- mail_list_magic[i].pattern, errstr);
- g_free (errstr);
-
- continue;
- }
-
- v = header_raw_find(list, mail_list_magic[i].name, NULL);
- if (v != NULL && regexec(&pattern, v, 2, match, 0) == 0 && match[1].rm_so != -1) {
- regfree(&pattern);
- return g_strndup(v+match[1].rm_so, match[1].rm_eo-match[1].rm_so);
- }
- regfree(&pattern);
- }
-
- return 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;
-}
-
-/* if encode is true, then the result is suitable for mailing, otherwise
- the result is suitable for display only (and may not even be re-parsable) */
-static void
-header_address_list_encode_append(GString *out, int encode, struct _header_address *a)
-{
- char *text;
-
- while (a) {
- switch (a->type) {
- case HEADER_ADDRESS_NAME:
- if (encode)
- text = header_encode_phrase (a->name);
- else
- text = a->name;
- if (text && *text)
- g_string_sprintfa(out, "%s <%s>", text, a->v.addr);
- else
- g_string_append(out, a->v.addr);
- if (encode)
- g_free(text);
- break;
- case HEADER_ADDRESS_GROUP:
- if (encode)
- text = header_encode_phrase(a->name);
- else
- text = a->name;
- g_string_sprintfa(out, "%s: ", text);
- header_address_list_encode_append(out, encode, a->v.members);
- g_string_sprintfa(out, ";");
- if (encode)
- g_free(text);
- break;
- default:
- g_warning("Invalid address type");
- break;
- }
- a = a->next;
- if (a)
- g_string_append(out, ", ");
- }
-}
-
-char *
-header_address_list_encode(struct _header_address *a)
-{
- GString *out;
- char *ret;
-
- if (a == NULL)
- return NULL;
-
- out = g_string_new("");
-
- header_address_list_encode_append(out, TRUE, a);
- ret = out->str;
- g_string_free(out, FALSE);
- return ret;
-}
-
-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_encode_append(out, FALSE, a);
- ret = out->str;
- g_string_free(out, FALSE);
- return ret;
-}
-
-#if 0
-static const char *
-header_fold_next_space (const char *in)
-{
- register const char *inptr = in;
- gboolean escaped = FALSE;
-
- if (is_lwsp (*inptr))
- return inptr;
-
- do {
- if (*inptr == '\\') {
- escaped = TRUE;
- } else if (*inptr == '"' && !escaped) {
- /* find the end of this quoted section */
- for (inptr++; *inptr; inptr++) {
- if (*inptr == '"' && *(inptr-1) != '\\')
- break;
- }
- } else {
- escaped = FALSE;
- }
-
- inptr++;
- } while (*inptr && !is_lwsp (*inptr));
-
- if (*inptr)
- return inptr;
- else
- return NULL;
-}
-
-/* I wonder if this might be better for folding headers? */
-char *
-header_fold (const char *in, int headerlen, gboolean force)
-{
- const char *inptr = in, *space, *p, *n;
- gboolean needunfold = FALSE;
- int len, outlen, i;
- GString *out;
- char *ret;
-
- if (in == NULL)
- return NULL;
-
- /* first, check to see if we even need to fold */
- len = headerlen + 2;
- p = in;
- while (*p) {
- n = strchr (p, '\n');
- if (n == NULL)
- n = p + strlen (p);
- else
- needunfold = TRUE;
-
- len += n - p;
-
- if (len >= CAMEL_FOLD_SIZE)
- break;
- len = 0;
- p = n + 1;
- }
-
- if (len < CAMEL_FOLD_SIZE)
- return g_strdup (in);
-
- /* we need to fold, so first unfold (if we need to), then process */
- if (needunfold)
- inptr = in = header_unfold (in);
-
- out = g_string_new ("");
- outlen = headerlen + 2;
- while (*inptr) {
- if (force)
- space = strchr (inptr, ' ');
- else
- space = header_fold_next_space (inptr);
-
- if (space) {
- len = space - inptr + 1;
- } else {
- len = strlen (inptr);
- }
-
- d(printf ("next word '%.*s'\n", len, inptr));
-
- if (outlen + len > CAMEL_FOLD_SIZE) {
- d(printf("outlen = %d wordlen = %d\n", outlen, len));
- /* strip trailing space */
- if (out->len > 0 && out->str[out->len-1] == ' ')
- g_string_truncate (out, out->len-1);
- g_string_append (out, "\n\t");
- outlen = 1;
-
- if (force) {
- /* check for very long words, just cut them up */
- while (outlen + len > CAMEL_FOLD_SIZE) {
- for (i = 0; i < CAMEL_FOLD_SIZE - outlen; i++)
- g_string_append_c (out, inptr[i]);
- inptr += CAMEL_FOLD_SIZE - outlen;
- len -= CAMEL_FOLD_SIZE - outlen;
- g_string_append (out, "\n\t");
- outlen = 1;
- }
- }
- }
-
- outlen += len;
-
- for (i = 0; i < len; i++)
- g_string_append_c (out, inptr[i]);
-
- inptr += len;
- }
-
- ret = out->str;
- g_string_free (out, FALSE);
-
- if (needunfold)
- g_free ((char *)in);
-
- return ret;
-}
-#endif
-
-
-/* simple header folding */
-/* will work even if the header is already folded */
-char *
-header_fold(const char *in, int headerlen)
-{
- int len, outlen, i;
- const char *inptr = in, *space, *p, *n;
- GString *out;
- char *ret;
- int needunfold = FALSE;
-
- if (in == NULL)
- return NULL;
-
- /* first, check to see if we even need to fold */
- len = headerlen + 2;
- p = in;
- while (*p) {
- n = strchr(p, '\n');
- if (n == NULL) {
- len += strlen (p);
- break;
- }
-
- needunfold = TRUE;
- len += n-p;
-
- if (len >= CAMEL_FOLD_SIZE)
- break;
- len = 0;
- p = n + 1;
- }
- if (len < CAMEL_FOLD_SIZE)
- return g_strdup(in);
-
- /* we need to fold, so first unfold (if we need to), then process */
- if (needunfold)
- inptr = in = header_unfold(in);
-
- out = g_string_new("");
- outlen = headerlen+2;
- while (*inptr) {
- space = strchr(inptr, ' ');
- if (space) {
- len = space-inptr+1;
- } else {
- len = strlen(inptr);
- }
- d(printf("next word '%.*s'\n", len, inptr));
- if (outlen + len > CAMEL_FOLD_SIZE) {
- d(printf("outlen = %d wordlen = %d\n", outlen, len));
- /* strip trailing space */
- if (out->len > 0 && out->str[out->len-1] == ' ')
- g_string_truncate(out, out->len-1);
- g_string_append(out, "\n\t");
- outlen = 1;
- /* check for very long words, just cut them up */
- while (outlen+len > CAMEL_FOLD_SIZE) {
- for (i=0;i<CAMEL_FOLD_SIZE-outlen;i++)
- g_string_append_c(out, inptr[i]);
- inptr += CAMEL_FOLD_SIZE-outlen;
- len -= CAMEL_FOLD_SIZE-outlen;
- g_string_append(out, "\n\t");
- outlen = 1;
- }
- }
- outlen += len;
- for (i=0;i<len;i++) {
- g_string_append_c(out, inptr[i]);
- }
- inptr += len;
- }
- ret = out->str;
- g_string_free(out, FALSE);
-
- if (needunfold)
- g_free((char *)in);
-
- return ret;
-}
-
-char *
-header_unfold(const char *in)
-{
- char *out = g_malloc(strlen(in)+1);
- const char *inptr = in;
- char c, *o = out;
-
- o = out;
- while ((c = *inptr++)) {
- if (c == '\n') {
- if (is_lwsp(*inptr)) {
- do {
- inptr++;
- } while (is_lwsp(*inptr));
- *o++ = ' ';
- } else {
- *o++ = c;
- }
- } else {
- *o++ = c;
- }
- }
- *o = 0;
-
- return out;
-}
-
-#ifdef BUILD_TABLE
-
-/* for debugging tests */
-/* should also have some regression tests somewhere */
-
-void test_phrase(const char *in)
-{
- printf("'%s' -> '%s'\n", in, header_encode_phrase(in));
-}
-
-void test_fold(const char *in)
-{
- printf("'%s'\n ->\n '%s'\n", in, header_fold(in));
-}
-
-void run_test(void)
-{
- char *to = "gnome hacker dudes: license-discuss@opensource.org,
- \"Richard M. Stallman\" <rms@gnu.org>,
- Barry Chester <barry_che@antdiv.gov.au>,
- Michael Zucchi <zucchi.michael(this (is a nested) comment)@zedzone.mmc.com.au>,
- Miguel de Icaza <miguel@gnome.org>;,
- zucchi@zedzone.mmc.com.au, \"Foo bar\" <zed@zedzone>,
- <frob@frobzone>";
-
-#if 0
- header_to_decode(to);
-
- header_mime_decode("1.0", 0, 0);
- header_mime_decode("1.3 (produced by metasend V1.0)", 0, 0);
- header_mime_decode("(produced by metasend V1.0) 5.2", 0, 0);
- header_mime_decode("7(produced by metasend 1.0) . (produced by helix/send/1.0) 9 . 5", 0, 0);
- header_mime_decode("3.", 0, 0);
- header_mime_decode(".", 0, 0);
- header_mime_decode(".5", 0, 0);
- header_mime_decode("c.d", 0, 0);
- header_mime_decode("", 0, 0);
-
- header_msgid_decode(" <\"L3x2i1.0.Nm5.Xd-Wu\"@lists.redhat.com>");
- header_msgid_decode("<200001180446.PAA02065@beaker.htb.com.au>");
-#endif
-
- test_fold("Header: This is a long header that should be folded properly at the right place, or so i hope. I should probably set the fold value to something lower for testing");
- test_fold("Header: nowletstryfoldingsomethingthatistoolongtofold,iwonderwhatitshoulddointsteadtofoldit?hmm,iguessicanjusttruncateitatsomepointortrytorefoldthepreviousstuff(yuck)tofit");
- test_phrase("Michael Zucchi (NotZed)");
- test_phrase("Zucchi, ( \\ NotZed \\ ) Michael");
- {
- int ic;
- char *outbuf, *inbuf, buffer[256];
- int inlen, outlen;
-
- outlen = 256;
- inbuf = "Dra¾en Kaèar";
- inlen = strlen(inbuf);
- outbuf = buffer;
- ic = iconv_open("UTF-8", "ISO-8859-1");
- iconv(ic, &inbuf, &inlen, &outbuf, &outlen);
- test_phrase(buffer);
-
- outlen = 256;
- inbuf = "This is an encoded phrase Tomasz K³oczko";
- inlen = strlen(inbuf);
- outbuf = buffer;
- ic = iconv_open("UTF-8", "ISO-8859-2");
- iconv(ic, &inbuf, &inlen, &outbuf, &outlen);
- test_phrase(buffer);
-
- }
-
- {
- char *str = "Blah blah\n\t = ? =? ?= This is a TEST For quoted-printable-encoding-encoding-of
- long lines, and lines that end in spaces
- and line sthat end in tabs
- And lines that just end.";
-
- char encoded[256];
- int state=-1,save=0;
- int len;
-
- len = quoted_encode_step(str, strlen(str), encoded, &state, &save);
- len += quoted_encode_close("", 0, encoded+len, &state, &save);
- printf("encoded = '%.*s'\n", len, encoded);
- }
-}
-
-#endif /* BUILD_TABLE */
diff --git a/camel/camel-mime-utils.h b/camel/camel-mime-utils.h
deleted file mode 100644
index 7805c27456..0000000000
--- a/camel/camel-mime-utils.h
+++ /dev/null
@@ -1,197 +0,0 @@
-/*
- * Copyright (C) 2000 Helix Code Inc.
- *
- * Authors: Michael Zucchi <notzed@helixcode.com>
- * Jeffrey Stedfast <fejj@helixcode.com>
- *
- * 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 <time.h>
-#include <glib.h>
-
-/* maximum size of a line from header_fold() */
-#define CAMEL_FOLD_SIZE (77)
-
-/* a list of references for this message */
-struct _header_references {
- struct _header_references *next;
- char *id;
-};
-
-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);
-/* for mailing */
-char *header_address_list_encode(struct _header_address *a);
-/* for display */
-char *header_address_list_format(struct _header_address *a);
-
-/* structured header prameters */
-struct _header_param *header_param_list_decode(const char *in);
-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_format_append(GString *out, struct _header_param *p);
-char *header_param_list_format(struct _header_param *p);
-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);
-char *header_content_type_simple(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_fold(struct _header_raw **list);
-void header_raw_clear(struct _header_raw **list);
-
-char *header_raw_check_mailing_list(struct _header_raw **list);
-
-/* fold a header */
-char *header_fold(const char *in, int headerlen);
-char *header_unfold(const char *in);
-
-/* 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);
-
-/* encode a phrase, like the real name of an address */
-char *header_encode_phrase(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);
-
-/* generate msg id */
-char *header_msgid_generate (void);
-
-/* decode a References header */
-struct _header_references *header_references_decode(const char *in);
-void header_references_list_clear(struct _header_references **list);
-void header_references_list_append_asis(struct _header_references **list, char *ref);
-int header_references_list_size(struct _header_references **list);
-struct _header_references *header_references_dup(const struct _header_references *list);
-
-/* 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, gboolean break_lines, unsigned char *out, int *state, int *save);
-int base64_encode_close(unsigned char *in, int inlen, gboolean break_lines, unsigned char *out, int *state, int *save);
-
-int uudecode_step (unsigned char *in, int len, unsigned char *out, int *state, guint32 *save, char *uulen);
-
-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);
-
-char *base64_encode_simple (const char *data, int len);
-int base64_decode_simple (char *data, int len);
-
-#endif /* ! _CAMEL_MIME_UTILS_H */
diff --git a/camel/camel-movemail.c b/camel/camel-movemail.c
deleted file mode 100644
index 4e1d67563d..0000000000
--- a/camel/camel-movemail.c
+++ /dev/null
@@ -1,598 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-movemail.c: mbox copying function */
-
-/*
- * Author:
- * Dan Winship <danw@helixcode.com>
- *
- * 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <sys/stat.h>
-#include <sys/uio.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <time.h>
-#include <unistd.h>
-#include <string.h>
-#include <signal.h>
-#ifdef HAVE_ALLOCA_H
-#include <alloca.h>
-#endif
-
-#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)
-
-#ifdef MOVEMAIL_PATH
-#include <sys/wait.h>
-
-static void movemail_external (const char *source, const char *dest,
- CamelException *ex);
-#endif
-
-/* these could probably be exposed as a utility? (but only mbox needs it) */
-#if 0
-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);
-#endif
-
-/**
- * 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).
- **/
-void
-camel_movemail (const char *source, const char *dest, CamelException *ex)
-{
- gboolean locked;
- 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) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not check mail file "
- "%s: %s"), source,
- g_strerror (errno));
- }
- return;
- }
- if (st.st_size == 0)
- return;
-
- /* 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) {
- g_free (locktmpfile);
-#ifdef MOVEMAIL_PATH
- if (errno == EACCES) {
- /* movemail_external will fail if the dest file
- * already exists, so if it does, return now,
- * let the fetch code process the mail that's
- * already there, and then the user can try again.
- */
- if (stat (dest, &st) == 0)
- return;
-
- movemail_external (source, dest, ex);
- return;
- }
-#endif
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not create lock file "
- "for %s: %s"), source,
- g_strerror (errno));
- return;
- }
- close (tmpfd);
-
- 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));
- unlink (locktmpfile);
- g_free (locktmpfile);
- return;
- }
-
- 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);
- unlink (locktmpfile);
- g_free (locktmpfile);
- return;
- }
-
- 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);
- return;
- }
-
- /* OK. We have the file locked now. */
-
- /* FIXME: Set a timer to keep the file locked. */
-
- 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));
- 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));
- 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 (!camel_exception_is_set (ex)) {
- 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));
- }
- } else
- close (dfd);
- close (sfd);
-
- /* Clean up lock files. */
- unlink (lockfile);
- g_free (lockfile);
- unlink (locktmpfile);
- g_free (locktmpfile);
-}
-
-#ifdef MOVEMAIL_PATH
-static void
-movemail_external (const char *source, const char *dest, CamelException *ex)
-{
- sigset_t mask, omask;
- pid_t pid;
- int fd[2], len = 0, nread, status;
- char buf[BUFSIZ], *output = NULL;
-
- /* Block SIGCHLD so the app can't mess us up. */
- sigemptyset (&mask);
- sigaddset (&mask, SIGCHLD);
- sigprocmask (SIG_BLOCK, &mask, &omask);
-
- if (pipe (fd) == -1) {
- sigprocmask (SIG_SETMASK, &omask, NULL);
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not create pipe: %s"),
- g_strerror (errno));
- return;
- }
-
- pid = fork ();
- switch (pid) {
- case -1:
- close (fd[0]);
- close (fd[1]);
- sigprocmask (SIG_SETMASK, &omask, NULL);
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not fork: %s"),
- g_strerror (errno));
- return;
-
- case 0:
- /* Child */
- close (fd[0]);
- close (STDIN_FILENO);
- dup2 (fd[1], STDOUT_FILENO);
- dup2 (fd[1], STDERR_FILENO);
-
- execl (MOVEMAIL_PATH, MOVEMAIL_PATH, source, dest, NULL);
- _exit (255);
- break;
-
- default:
- break;
- }
-
- /* Parent */
- close (fd[1]);
-
- /* Read movemail's output. */
- while ((nread = read (fd[0], buf, sizeof (buf))) > 0) {
- output = g_realloc (output, len + nread + 1);
- memcpy (output + len, buf, nread);
- len += nread;
- output[len] = '\0';
- }
- close (fd[0]);
-
- /* Now get the exit status. */
- while (waitpid (pid, &status, 0) == -1 && errno == EINTR)
- ;
- sigprocmask (SIG_SETMASK, &omask, NULL);
-
- if (!WIFEXITED (status) || WEXITSTATUS (status) != 0) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Movemail program failed: %s"),
- output ? output : _("(Unknown error)"));
- }
- g_free (output);
-}
-#endif
-
-
-#if 0
-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;
-}
-#endif
-
-#define PRE_SIZE (32)
-
-#if 0
-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));
- }
- }
-
- camel_object_unref((CamelObject *)mp);
- camel_object_unref((CamelObject *)ffrom);
-
- return ret;
-
-fail:
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Error copying "
- "mail temp file: %s"),
- g_strerror (errno));
-
-
- camel_object_unref((CamelObject *)mp);
- camel_object_unref((CamelObject *)ffrom);
-
- return -1;
-}
-#endif
-
diff --git a/camel/camel-movemail.h b/camel/camel-movemail.h
deleted file mode 100644
index 8b73435a43..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 <danw@helixcode.com>
- *
- * 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 <camel/camel-exception.h>
-
-void 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 79a0c24208..0000000000
--- a/camel/camel-multipart.c
+++ /dev/null
@@ -1,522 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-multipart.c : Abstract class for a multipart */
-
-#ifndef NO_WARNINGS
-#warning This should be a mostly abstract class, but it is not!
-#endif
-
-/*
- *
- * Author :
- * Bertrand Guiheneuf <bertrand@helixcode.com>
- *
- * 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <string.h> /* strlen() */
-#include <unistd.h> /* for getpid */
-#include <time.h> /* for time */
-
-#include "camel-stream-mem.h"
-#include "camel-multipart.h"
-#include "camel-mime-part.h"
-#include "camel-exception.h"
-#include "md5-utils.h"
-
-#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 unref_part (gpointer data, gpointer user_data);
-
-static CamelDataWrapperClass *parent_class = NULL;
-
-
-
-/* Returns the class for a CamelMultipart */
-#define CMP_CLASS(so) CAMEL_MULTIPART_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-
-/* Returns the class for a CamelDataWrapper */
-#define CDW_CLASS(so) CAMEL_DATA_WRAPPER_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-
-
-static void
-camel_multipart_class_init (CamelMultipartClass *camel_multipart_class)
-{
- CamelDataWrapperClass *camel_data_wrapper_class =
- CAMEL_DATA_WRAPPER_CLASS (camel_multipart_class);
-
- parent_class = CAMEL_DATA_WRAPPER_CLASS (camel_type_get_global_classfuncs (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;
-}
-
-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;
-}
-
-static void
-camel_multipart_finalize (CamelObject *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);
-}
-
-
-CamelType
-camel_multipart_get_type (void)
-{
- static CamelType camel_multipart_type = CAMEL_INVALID_TYPE;
-
- if (camel_multipart_type == CAMEL_INVALID_TYPE) {
- camel_multipart_type = camel_type_register (camel_data_wrapper_get_type (), "CamelMultipart",
- sizeof (CamelMultipart),
- sizeof (CamelMultipartClass),
- (CamelObjectClassInitFunc) camel_multipart_class_init,
- NULL,
- (CamelObjectInitFunc) camel_multipart_init,
- (CamelObjectFinalizeFunc) camel_multipart_finalize);
- }
-
- return camel_multipart_type;
-}
-
-static void
-unref_part (gpointer data, gpointer user_data)
-{
- CamelObject *part = CAMEL_OBJECT (data);
-
- camel_object_unref (part);
-}
-
-/**
- * camel_multipart_new:
- *
- * Create a new CamelMultipart object.
- *
- * Return value: a new CamelMultipart
- **/
-CamelMultipart *
-camel_multipart_new (void)
-{
- CamelMultipart *multipart;
-
- multipart = (CamelMultipart *)camel_object_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);
- camel_object_ref (CAMEL_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);
- camel_object_ref (CAMEL_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);
- camel_object_unref (CAMEL_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)
- camel_object_unref (CAMEL_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 camel_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, FALSE, p, &state, &save);
- *p = '\0';
-
- boundary = bbuf;
- }
-
- header_content_type_set_param (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 header_content_type_param (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;
-}
-
-/**
- * camel_multipart_set_preface:
- * @multipart:
- * @preface:
- *
- * Set the preface text for this multipart. Will be written out infront
- * of the multipart. This text should only include US-ASCII strings, and
- * be relatively short, and will be ignored by any MIME mail client.
- **/
-void
-camel_multipart_set_preface(CamelMultipart *multipart, const char *preface)
-{
- if (multipart->preface != preface) {
- g_free(multipart->preface);
- if (preface)
- multipart->preface = g_strdup(preface);
- else
- multipart->preface = NULL;
- }
-}
-
-/**
- * camel_multipart_set_postface:
- * @multipart:
- * @postface:
- *
- * Set the postfix text for this multipart. Will be written out after
- * the last boundary of the multipart, and ignored by any MIME mail
- * client.
- *
- * Generally postface texts should not be sent with multipart messages.
- **/
-void
-camel_multipart_set_postface(CamelMultipart *multipart, const char *postface)
-{
- if (multipart->postface != postface) {
- g_free(multipart->postface);
- if (postface)
- multipart->postface = g_strdup(postface);
- else
- multipart->postface = NULL;
- }
-}
diff --git a/camel/camel-multipart.h b/camel/camel-multipart.h
deleted file mode 100644
index 3058b8f2e0..0000000000
--- a/camel/camel-multipart.h
+++ /dev/null
@@ -1,105 +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 <bertrand@helixcode.com>
- *
- * 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 <camel/camel-data-wrapper.h>
-
-#define CAMEL_MULTIPART_TYPE (camel_multipart_get_type ())
-#define CAMEL_MULTIPART(obj) (CAMEL_CHECK_CAST((obj), CAMEL_MULTIPART_TYPE, CamelMultipart))
-#define CAMEL_MULTIPART_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_MULTIPART_TYPE, CamelMultipartClass))
-#define CAMEL_IS_MULTIPART(o) (CAMEL_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 Camel function */
-CamelType 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);
-
-void camel_multipart_set_preface (CamelMultipart *multipart, const char *preface);
-void camel_multipart_set_postface (CamelMultipart *multipart, const char *postface);
-
-#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 ebd35b80c7..0000000000
--- a/camel/camel-news-address.c
+++ /dev/null
@@ -1,65 +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 CamelAddressClass *camel_news_address_parent;
-
-static void
-camel_news_address_class_init (CamelNewsAddressClass *klass)
-{
- camel_news_address_parent = CAMEL_ADDRESS_CLASS (camel_type_get_global_classfuncs (camel_address_get_type ()));
-}
-
-
-CamelType
-camel_news_address_get_type (void)
-{
- static guint type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (camel_address_get_type (), "CamelNewsAddress",
- sizeof (CamelNewsAddress),
- sizeof (CamelNewsAddressClass),
- (CamelObjectClassInitFunc) camel_news_address_class_init,
- NULL,
- NULL,
- NULL);
- }
-
- return type;
-}
-
-/**
- * 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 ( camel_object_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 b1c7856675..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 <camel/camel-address.h>
-
-#define CAMEL_NEWS_ADDRESS(obj) CAMEL_CHECK_CAST (obj, camel_news_address_get_type (), CamelNewsAddress)
-#define CAMEL_NEWS_ADDRESS_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_news_address_get_type (), CamelNewsAddressClass)
-#define CAMEL_IS_NEWS_ADDRESS(obj) CAMEL_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 bdb17fa177..0000000000
--- a/camel/camel-object.c
+++ /dev/null
@@ -1,984 +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 <danw@helixcode.com>
- *
- * 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <string.h>
-#include "camel-object.h"
-
-/* I just mashed the keyboard for these... */
-#define CAMEL_OBJECT_MAGIC_VALUE 0x77A344EF
-#define CAMEL_OBJECT_CLASS_MAGIC_VALUE 0xEE26A990
-#define CAMEL_OBJECT_FINALIZED_VALUE 0x84AC3656
-#define CAMEL_OBJECT_CLASS_FINALIZED_VALUE 0x7621ABCD
-
-#define DEFAULT_PREALLOCS 8
-
-#define BAST_CASTARD 1 /* Define to return NULL when casts fail */
-
-#define NULL_PREP_VALUE ((gpointer)make_global_classfuncs) /* See camel_object_class_declare_event */
-
-/* ** Quickie type system ************************************************* */
-
-typedef struct _CamelTypeInfo
-{
- CamelType self;
- CamelType parent;
- const gchar *name;
-
- size_t instance_size;
- GMemChunk *instance_chunk;
- CamelObjectInitFunc instance_init;
- CamelObjectFinalizeFunc instance_finalize;
- GList *free_instances;
-
- size_t classfuncs_size;
- CamelObjectClassInitFunc class_init;
- CamelObjectClassFinalizeFunc class_finalize;
- CamelObjectClass *global_classfuncs;
-}
-CamelTypeInfo;
-
-typedef struct _CamelHookPair
-{
- CamelObjectEventHookFunc func;
- gpointer user_data;
-}
-CamelHookPair;
-
-/* ************************************************************************ */
-
-static void camel_type_lock_up (void);
-static void camel_type_lock_down (void);
-
-static void obj_init (CamelObject * obj);
-static void obj_finalize (CamelObject * obj);
-static void obj_class_init (CamelObjectClass * class);
-static void obj_class_finalize (CamelObjectClass * class);
-
-static gboolean shared_is_of_type (CamelObjectShared * sh, CamelType ctype,
- gboolean is_obj);
-static void make_global_classfuncs (CamelTypeInfo * type_info);
-
-/* ************************************************************************ */
-
-G_LOCK_DEFINE_STATIC (type_system);
-G_LOCK_DEFINE_STATIC (type_system_level);
-static GPrivate *type_system_locklevel = NULL;
-
-G_LOCK_DEFINE_STATIC (refcount);
-
-static gboolean type_system_initialized = FALSE;
-static GHashTable *ctype_to_typeinfo = NULL;
-static const CamelType camel_object_type = 1;
-static CamelType cur_max_type = CAMEL_INVALID_TYPE;
-
-/* ************************************************************************ */
-
-#define LOCK_VAL (GPOINTER_TO_INT (g_private_get (type_system_locklevel)))
-#define LOCK_SET( val ) g_private_set (type_system_locklevel, GINT_TO_POINTER (val))
-
-static void
-camel_type_lock_up (void)
-{
- G_LOCK (type_system_level);
-
- if (type_system_locklevel == NULL)
- type_system_locklevel = g_private_new (GINT_TO_POINTER (0));
-
- if (LOCK_VAL == 0) {
- G_UNLOCK (type_system_level);
- G_LOCK (type_system);
- G_LOCK (type_system_level);
- }
-
- LOCK_SET (LOCK_VAL + 1);
-
- G_UNLOCK (type_system_level);
-}
-
-static void
-camel_type_lock_down (void)
-{
- G_LOCK (type_system_level);
-
- if (type_system_locklevel == NULL) {
- g_warning
- ("camel_type_lock_down: lock down before a lock up?");
- type_system_locklevel = g_private_new (GINT_TO_POINTER (0));
- G_UNLOCK (type_system_level);
- return;
- }
-
- LOCK_SET (LOCK_VAL - 1);
-
- if (LOCK_VAL == 0)
- G_UNLOCK (type_system);
-
- G_UNLOCK (type_system_level);
-}
-
-void
-camel_type_init (void)
-{
- CamelTypeInfo *obj_info;
-
- camel_type_lock_up ();
-
- if (type_system_initialized) {
- g_warning
- ("camel_type_init: type system already initialized.");
- camel_type_lock_down ();
- return;
- }
-
- type_system_initialized = TRUE;
- ctype_to_typeinfo = g_hash_table_new (g_direct_hash, g_direct_equal);
-
- obj_info = g_new (CamelTypeInfo, 1);
- obj_info->self = camel_object_type;
- obj_info->parent = CAMEL_INVALID_TYPE;
- obj_info->name = "CamelObject";
-
- obj_info->instance_size = sizeof (CamelObject);
- obj_info->instance_chunk =
- g_mem_chunk_create (CamelObject, DEFAULT_PREALLOCS,
- G_ALLOC_ONLY);
- obj_info->instance_init = obj_init;
- obj_info->instance_finalize = obj_finalize;
- obj_info->free_instances = NULL;
-
- obj_info->classfuncs_size = sizeof (CamelObjectClass);
- obj_info->class_init = obj_class_init;
- obj_info->class_finalize = obj_class_finalize;
-
- g_hash_table_insert (ctype_to_typeinfo,
- GINT_TO_POINTER (CAMEL_INVALID_TYPE), NULL);
- g_hash_table_insert (ctype_to_typeinfo,
- GINT_TO_POINTER (camel_object_type), obj_info);
-
- /* Sigh. Ugly */
- make_global_classfuncs (obj_info);
-
- cur_max_type = camel_object_type;
-
- camel_type_lock_down ();
-}
-
-CamelType
-camel_type_register (CamelType parent, const gchar * name,
- size_t instance_size, size_t classfuncs_size,
- CamelObjectClassInitFunc class_init,
- CamelObjectClassFinalizeFunc class_finalize,
- CamelObjectInitFunc instance_init,
- CamelObjectFinalizeFunc instance_finalize)
-{
- CamelTypeInfo *parent_info;
- CamelTypeInfo *obj_info;
- gchar *chunkname;
-
- g_return_val_if_fail (parent != CAMEL_INVALID_TYPE,
- CAMEL_INVALID_TYPE);
- g_return_val_if_fail (name, CAMEL_INVALID_TYPE);
- g_return_val_if_fail (instance_size, CAMEL_INVALID_TYPE);
- g_return_val_if_fail (classfuncs_size, CAMEL_INVALID_TYPE);
-
- camel_type_lock_up ();
-
- if (type_system_initialized == FALSE) {
- G_UNLOCK (type_system);
- camel_type_init ();
- G_LOCK (type_system);
- }
-
- parent_info =
- g_hash_table_lookup (ctype_to_typeinfo,
- GINT_TO_POINTER (parent));
-
- if (parent_info == NULL) {
- g_warning
- ("camel_type_register: no such parent type %d of class `%s'",
- parent, name);
- camel_type_lock_down ();
- return CAMEL_INVALID_TYPE;
- }
-
- if (parent_info->instance_size > instance_size) {
- g_warning
- ("camel_type_register: instance of class `%s' would be smaller than parent `%s'",
- name, parent_info->name);
- camel_type_lock_down ();
- return CAMEL_INVALID_TYPE;
- }
-
- if (parent_info->classfuncs_size > classfuncs_size) {
- g_warning
- ("camel_type_register: classfuncs of class `%s' would be smaller than parent `%s'",
- name, parent_info->name);
- camel_type_lock_down ();
- return CAMEL_INVALID_TYPE;
- }
-
- cur_max_type++;
-
- obj_info = g_new (CamelTypeInfo, 1);
- obj_info->self = cur_max_type;
- obj_info->parent = parent;
- obj_info->name = name;
-
- obj_info->instance_size = instance_size;
- chunkname =
- g_strdup_printf ("chunk for instances of Camel type `%s'",
- name);
- obj_info->instance_chunk =
- g_mem_chunk_new (chunkname, instance_size,
- instance_size * DEFAULT_PREALLOCS,
- G_ALLOC_ONLY);
- g_free (chunkname);
- obj_info->instance_init = instance_init;
- obj_info->instance_finalize = instance_finalize;
- obj_info->free_instances = NULL;
-
- obj_info->classfuncs_size = classfuncs_size;
- obj_info->class_init = class_init;
- obj_info->class_finalize = class_finalize;
-
- g_hash_table_insert (ctype_to_typeinfo,
- GINT_TO_POINTER (obj_info->self), obj_info);
-
- /* Sigh. Ugly. */
- make_global_classfuncs (obj_info);
-
- camel_type_lock_down ();
- return obj_info->self;
-}
-
-CamelObjectClass *
-camel_type_get_global_classfuncs (CamelType type)
-{
- CamelTypeInfo *type_info;
-
- g_return_val_if_fail (type != CAMEL_INVALID_TYPE, NULL);
-
- camel_type_lock_up ();
- type_info =
- g_hash_table_lookup (ctype_to_typeinfo,
- GINT_TO_POINTER (type));
- camel_type_lock_down ();
-
- g_return_val_if_fail (type_info != NULL, NULL);
-
- return type_info->global_classfuncs;
-}
-
-const gchar *
-camel_type_to_name (CamelType type)
-{
- CamelTypeInfo *type_info;
-
- g_return_val_if_fail (type != CAMEL_INVALID_TYPE,
- "(the invalid type)");
-
- camel_type_lock_up ();
- type_info =
- g_hash_table_lookup (ctype_to_typeinfo,
- GINT_TO_POINTER (type));
- camel_type_lock_down ();
-
- g_return_val_if_fail (type_info != NULL,
- "(a bad type parameter was specified)");
-
- return type_info->name;
-}
-
-/* ** The CamelObject ***************************************************** */
-
-static void
-obj_init (CamelObject * obj)
-{
- obj->s.magic = CAMEL_OBJECT_MAGIC_VALUE;
- obj->ref_count = 1;
- obj->event_to_hooklist = NULL;
- obj->in_event = 0;
-}
-
-static void
-obj_finalize (CamelObject * obj)
-{
- g_return_if_fail (obj->s.magic == CAMEL_OBJECT_MAGIC_VALUE);
- g_return_if_fail (obj->ref_count == 0);
- g_return_if_fail (obj->in_event == 0);
-
- obj->s.magic = CAMEL_OBJECT_FINALIZED_VALUE;
-
- if (obj->event_to_hooklist) {
- g_hash_table_foreach (obj->event_to_hooklist, (GHFunc) g_free,
- NULL);
- g_hash_table_destroy (obj->event_to_hooklist);
- obj->event_to_hooklist = NULL;
- }
-}
-
-static void
-obj_class_init (CamelObjectClass * class)
-{
- class->s.magic = CAMEL_OBJECT_CLASS_MAGIC_VALUE;
-
- camel_object_class_declare_event (class, "finalize", NULL);
-}
-
-static void
-obj_class_finalize (CamelObjectClass * class)
-{
- g_return_if_fail (class->s.magic == CAMEL_OBJECT_CLASS_MAGIC_VALUE);
-
- class->s.magic = CAMEL_OBJECT_CLASS_FINALIZED_VALUE;
-
- if (class->event_to_preplist) {
- g_hash_table_foreach (class->event_to_preplist,
- (GHFunc) g_free, NULL);
- g_hash_table_destroy (class->event_to_preplist);
- class->event_to_preplist = NULL;
- }
-}
-
-CamelType
-camel_object_get_type (void)
-{
- if (type_system_initialized == FALSE)
- camel_type_init ();
-
- return camel_object_type;
-}
-
-CamelObject *
-camel_object_new (CamelType type)
-{
- CamelTypeInfo *type_info;
- GSList *parents = NULL;
- GSList *head = NULL;
- CamelObject *instance;
-
- g_return_val_if_fail (type != CAMEL_INVALID_TYPE, NULL);
-
- /* Look up the type */
-
- camel_type_lock_up ();
-
- type_info =
- g_hash_table_lookup (ctype_to_typeinfo,
- GINT_TO_POINTER (type));
-
- if (type_info == NULL) {
- g_warning
- ("camel_object_new: trying to create object of invalid type %d",
- type);
- camel_type_lock_down ();
- return NULL;
- }
-
- /* Grab an instance out of the freed ones if possible, alloc otherwise */
-
- if (type_info->free_instances) {
- GList *first;
-
- first = g_list_first (type_info->free_instances);
- instance = first->data;
- type_info->free_instances =
- g_list_remove_link (type_info->free_instances, first);
- g_list_free_1 (first);
- } else {
- instance = g_mem_chunk_alloc0 (type_info->instance_chunk);
- }
-
- /* Init the instance and classfuncs a bit */
-
- instance->s.type = type;
- instance->classfuncs = type_info->global_classfuncs;
-
- /* Loop through the parents in simplest -> most complex order, initing the class and instance.
-
- * When parent = CAMEL_INVALID_TYPE and we're at the end of the line, _lookup returns NULL
- * because we inserted it as corresponding to CAMEL_INVALID_TYPE. Clever, eh?
- */
-
- while (type_info) {
- parents = g_slist_prepend (parents, type_info);
- type_info =
- g_hash_table_lookup (ctype_to_typeinfo,
- GINT_TO_POINTER (type_info->
- parent));
- }
-
- head = parents;
-
- for (; parents && parents->data; parents = parents->next) {
- CamelTypeInfo *thisinfo;
-
- thisinfo = parents->data;
- if (thisinfo->instance_init)
- (thisinfo->instance_init) (instance);
- }
-
- g_slist_free (head);
-
- camel_type_lock_down ();
- return instance;
-}
-
-void
-camel_object_ref (CamelObject * obj)
-{
- g_return_if_fail (CAMEL_IS_OBJECT (obj));
-
- G_LOCK (refcount);
- obj->ref_count++;
- G_UNLOCK (refcount);
-}
-
-void
-camel_object_unref (CamelObject * obj)
-{
- CamelTypeInfo *type_info;
- CamelTypeInfo *iter;
- GSList *parents = NULL;
- GSList *head = NULL;
-
- g_return_if_fail (CAMEL_IS_OBJECT (obj));
-
- G_LOCK (refcount);
- obj->ref_count--;
-
- if (obj->ref_count > 0) {
- G_UNLOCK (refcount);
- return;
- }
-
- G_UNLOCK (refcount);
-
- /* Oh no! We want to emit a "finalized" event, but that function refs the object
- * because it's not supposed to get finalized in an event, but it is being finalized
- * right now, and AAUGH AAUGH AUGH AUGH!
- *
- * So we don't call camel_object_trigger_event. We do it ourselves. We even know
- * that CamelObject doesn't provide a prep for the finalized event, so we plunge
- * right in and call our hooks.
- *
- * And there was much rejoicing.
- */
-
-#define hooklist parents /*cough */
-
- if (obj->event_to_hooklist) {
- CamelHookPair *pair;
-
- hooklist =
- g_hash_table_lookup (obj->event_to_hooklist,
- "finalize");
-
- while (hooklist && hooklist->data) {
- pair = hooklist->data;
- (pair->func) (obj, NULL, pair->user_data);
- hooklist = hooklist->next;
- }
- }
-
- hooklist = NULL; /* Don't mess with this line */
-
-#undef hooklist
-
- /* Destroy it! hahaha! */
-
- camel_type_lock_up ();
-
- type_info =
- g_hash_table_lookup (ctype_to_typeinfo,
- GINT_TO_POINTER (obj->s.type));
-
- if (type_info == NULL) {
- g_warning
- ("camel_object_unref: seemingly valid object has a bad type %d",
- obj->s.type);
- camel_type_lock_down ();
- return;
- }
-
- /* Loop through the parents in most complex -> simplest order, finalizing the class
- * and instance.
- *
- * When parent = CAMEL_INVALID_TYPE and we're at the end of the line, _lookup returns NULL
- * because we inserted it as corresponding to CAMEL_INVALID_TYPE. Clever, eh?
- *
- * Use iter to preserve type_info for free_{instance,classfunc}s
- */
-
- iter = type_info;
-
- while (iter) {
- parents = g_slist_prepend (parents, iter);
- iter =
- g_hash_table_lookup (ctype_to_typeinfo,
- GINT_TO_POINTER (iter->parent));
- }
-
- parents = g_slist_reverse (parents);
- head = parents;
-
- for (; parents && parents->data; parents = parents->next) {
- CamelTypeInfo *thisinfo;
-
- thisinfo = parents->data;
- if (thisinfo->instance_finalize)
- (thisinfo->instance_finalize) (obj);
- }
-
- g_slist_free (head);
-
- /* A little bit of cleaning up.
-
- * Don't erase the type, so we can peek at it if a finalized object
- * is check_cast'ed somewhere.
- */
-
- memset (obj, 0, type_info->instance_size);
- obj->s.type = type_info->self;
- obj->s.magic = CAMEL_OBJECT_FINALIZED_VALUE;
-
- /* Tuck away the pointer for use in a new object */
-
- type_info->free_instances =
- g_list_prepend (type_info->free_instances, obj);
-
- camel_type_lock_down ();
-}
-
-gboolean
-camel_object_is_of_type (CamelObject * obj, CamelType ctype)
-{
- return shared_is_of_type ((CamelObjectShared *) obj, ctype, TRUE);
-}
-
-gboolean
-camel_object_class_is_of_type (CamelObjectClass * class, CamelType ctype)
-{
- return shared_is_of_type ((CamelObjectShared *) class, ctype, FALSE);
-}
-
-#ifdef BAST_CASTARD
-#define ERRVAL NULL
-#else
-#define ERRVAL obj
-#endif
-
-CamelObject *
-camel_object_check_cast (CamelObject * obj, CamelType ctype)
-{
- if (shared_is_of_type ((CamelObjectShared *) obj, ctype, TRUE))
- return obj;
- return ERRVAL;
-}
-
-CamelObjectClass *
-camel_object_class_check_cast (CamelObjectClass * class, CamelType ctype)
-{
- if (shared_is_of_type ((CamelObjectShared *) class, ctype, FALSE))
- return class;
- return ERRVAL;
-}
-
-#undef ERRVAL
-
-gchar *
-camel_object_describe (CamelObject * obj)
-{
- if (obj == NULL)
- return g_strdup ("a NULL pointer");
-
- if (obj->s.magic == CAMEL_OBJECT_MAGIC_VALUE) {
- return g_strdup_printf ("an instance of `%s' at %p",
- camel_type_to_name (obj->s.type),
- obj);
- } else if (obj->s.magic == CAMEL_OBJECT_FINALIZED_VALUE) {
- return g_strdup_printf ("a finalized instance of `%s' at %p",
- camel_type_to_name (obj->s.type),
- obj);
- } else if (obj->s.magic == CAMEL_OBJECT_CLASS_MAGIC_VALUE) {
- return g_strdup_printf ("the classfuncs of `%s' at %p",
- camel_type_to_name (obj->s.type),
- obj);
- } else if (obj->s.magic == CAMEL_OBJECT_CLASS_FINALIZED_VALUE) {
- return
- g_strdup_printf
- ("the finalized classfuncs of `%s' at %p",
- camel_type_to_name (obj->s.type), obj);
- }
-
- return g_strdup ("not a CamelObject");
-}
-
-/* This is likely to be called in the class_init callback,
- * and the type will likely be somewhat uninitialized.
- * Is this a problem? We'll see....
- */
-void
-camel_object_class_declare_event (CamelObjectClass * class,
- const gchar * name,
- CamelObjectEventPrepFunc prep)
-{
- g_return_if_fail (CAMEL_IS_OBJECT_CLASS (class));
- g_return_if_fail (name);
-
- if (class->event_to_preplist == NULL)
- class->event_to_preplist =
- g_hash_table_new (g_str_hash, g_str_equal);
- else if (g_hash_table_lookup (class->event_to_preplist, name) != NULL) {
- g_warning
- ("camel_object_class_declare_event: event `%s' already declared for `%s'",
- name, camel_type_to_name (class->s.type));
- return;
- }
-
- /* AIEEEEEEEEEEEEEEEEEEEEEE
-
- * I feel so naughty. Since it's valid to declare an event and not
- * provide a hook, it should be valid to insert a NULL value into
- * the table. However, then our lookup in trigger_event would be
- * ambiguous, not telling us whether the event is undefined or whether
- * it merely has no hook.
- *
- * So we create an 'NULL prep' value that != NULL... specifically, it
- * equals the address of one of our static functions , because that
- * can't possibly be your hook.
- *
- * Just don't forget to check for the 'evil value' and it'll work,
- * I promise.
- */
-
- if (prep == NULL)
- prep = NULL_PREP_VALUE;
-
- g_hash_table_insert (class->event_to_preplist, g_strdup (name), prep);
-}
-
-void
-camel_object_hook_event (CamelObject * obj, const gchar * name,
- CamelObjectEventHookFunc hook, gpointer user_data)
-{
- GSList *hooklist;
- CamelHookPair *pair;
- gpointer old_name, old_hooklist;
-
- g_return_if_fail (CAMEL_IS_OBJECT (obj));
- g_return_if_fail (name);
- g_return_if_fail (hook);
-
- if (obj->event_to_hooklist == NULL)
- obj->event_to_hooklist =
- g_hash_table_new (g_str_hash, g_str_equal);
-
- pair = g_new (CamelHookPair, 1);
- pair->func = hook;
- pair->user_data = user_data;
-
- if (g_hash_table_lookup_extended (obj->event_to_hooklist, name,
- &old_name, &old_hooklist)) {
- hooklist = g_slist_prepend (old_hooklist, pair);
- g_hash_table_insert (obj->event_to_hooklist, old_name,
- hooklist);
- } else {
- hooklist = g_slist_prepend (NULL, pair);
- g_hash_table_insert (obj->event_to_hooklist, g_strdup (name),
- hooklist);
- }
-}
-
-void
-camel_object_unhook_event (CamelObject * obj, const gchar * name,
- CamelObjectEventHookFunc hook, gpointer user_data)
-{
- GSList *hooklist;
- GSList *head;
-
- g_return_if_fail (CAMEL_IS_OBJECT (obj));
- g_return_if_fail (name);
- g_return_if_fail (hook);
-
- if (obj->event_to_hooklist == NULL) {
- g_warning
- ("camel_object_unhook_event: trying to unhook `%s' from an instance "
- "of `%s' with no hooks attached", name,
- camel_type_to_name (obj->s.type));
- return;
- }
-
- hooklist = g_hash_table_lookup (obj->event_to_hooklist, name);
-
- if (hooklist == NULL) {
- g_warning
- ("camel_object_unhook_event: trying to unhook `%s' from an instance "
- "of `%s' with no hooks attached to that event.",
- name, camel_type_to_name (obj->s.type));
- return;
- }
-
- head = hooklist;
-
- while (hooklist) {
- CamelHookPair *pair = (CamelHookPair *) hooklist->data;
-
- if (pair->func == hook && pair->user_data == user_data) {
- g_free (hooklist->data);
- head = g_slist_remove_link (head, hooklist);
- g_slist_free_1 (hooklist);
- g_hash_table_insert (obj->event_to_hooklist, (char *) name,
- head);
- return;
- }
-
- hooklist = hooklist->next;
- }
-
- g_warning
- ("camel_object_unhook_event: cannot find hook/data pair %p/%p in an "
- "instance of `%s' attached to `%s'", hook, user_data,
- camel_type_to_name (obj->s.type), name);
-}
-
-void
-camel_object_trigger_event (CamelObject * obj, const gchar * name,
- gpointer event_data)
-{
- GSList *hooklist;
- CamelHookPair *pair;
- CamelObjectEventPrepFunc prep;
-
- g_return_if_fail (CAMEL_IS_OBJECT (obj));
- g_return_if_fail (name);
-
- if (obj->in_event) {
- g_warning
- ("camel_object_trigger_event: trying to trigger `%s' in class "
- "`%s' while already triggering another event", name,
- camel_type_to_name (obj->s.type));
- return;
- }
-
- if (obj->classfuncs->event_to_preplist == NULL) {
- g_warning
- ("camel_object_trigger_event: trying to trigger `%s' in class "
- "`%s' with no defined events.", name,
- camel_type_to_name (obj->s.type));
- return;
- }
-
- prep = g_hash_table_lookup (obj->classfuncs->event_to_preplist, name);
-
- if (prep == NULL) {
- g_warning
- ("camel_object_trigger_event: trying to trigger undefined "
- "event `%s' in class `%s'.", name,
- camel_type_to_name (obj->s.type));
- return;
- }
-
- /* Ref so that it can't get destroyed in the event, which would
- * be Bad. And it's a valid ref anyway...
- */
-
- camel_object_ref (obj);
- obj->in_event = 1;
-
- if ((prep != NULL_PREP_VALUE && !prep (obj, event_data))
- || obj->event_to_hooklist == NULL) {
- obj->in_event = 0;
- camel_object_unref (obj);
- return;
- }
-
- hooklist = g_hash_table_lookup (obj->event_to_hooklist, name);
-
- while (hooklist && hooklist->data) {
- pair = hooklist->data;
- (pair->func) (obj, event_data, pair->user_data);
- hooklist = hooklist->next;
- }
-
- obj->in_event = 0;
- camel_object_unref (obj);
-}
-
-/* ** Static helpers ****************************************************** */
-
-static gboolean
-shared_is_of_type (CamelObjectShared * sh, CamelType ctype, gboolean is_obj)
-{
- CamelTypeInfo *type_info;
- gchar *targtype;
-
- if (is_obj)
- targtype = "instance";
- else
- targtype = "classdata";
-
- if (ctype == CAMEL_INVALID_TYPE) {
- g_warning
- ("shared_is_of_type: trying to cast to CAMEL_INVALID_TYPE");
- return FALSE;
- }
-
- if (sh == NULL) {
- g_warning
- ("shared_is_of_type: trying to cast NULL to %s of `%s'",
- targtype, camel_type_to_name (ctype));
- return FALSE;
- }
-
- if (sh->magic == CAMEL_OBJECT_FINALIZED_VALUE) {
- g_warning
- ("shared_is_of_type: trying to cast finalized instance "
- "of `%s' into %s of `%s'",
- camel_type_to_name (sh->type), targtype,
- camel_type_to_name (ctype));
- return FALSE;
- }
-
- if (sh->magic == CAMEL_OBJECT_CLASS_FINALIZED_VALUE) {
- g_warning
- ("shared_is_of_type: trying to cast finalized classdata "
- "of `%s' into %s of `%s'",
- camel_type_to_name (sh->type), targtype,
- camel_type_to_name (ctype));
- return FALSE;
- }
-
- if (is_obj) {
- if (sh->magic == CAMEL_OBJECT_CLASS_MAGIC_VALUE) {
- g_warning
- ("shared_is_of_type: trying to cast classdata "
- "of `%s' into instance of `%s'",
- camel_type_to_name (sh->type),
- camel_type_to_name (ctype));
- return FALSE;
- }
-
- if (sh->magic != CAMEL_OBJECT_MAGIC_VALUE) {
- g_warning
- ("shared_is_of_type: trying to cast junk data "
- "into instance of `%s'",
- camel_type_to_name (ctype));
- return FALSE;
- }
- } else {
- if (sh->magic == CAMEL_OBJECT_MAGIC_VALUE) {
- g_warning
- ("shared_is_of_type: trying to cast instance "
- "of `%s' into classdata of `%s'",
- camel_type_to_name (sh->type),
- camel_type_to_name (ctype));
- return FALSE;
- }
-
- if (sh->magic != CAMEL_OBJECT_CLASS_MAGIC_VALUE) {
- g_warning
- ("shared_is_of_type: trying to cast junk data "
- "into classdata of `%s'",
- camel_type_to_name (ctype));
- return FALSE;
- }
- }
-
- camel_type_lock_up ();
-
- type_info =
- g_hash_table_lookup (ctype_to_typeinfo,
- GINT_TO_POINTER (sh->type));
-
- if (type_info == NULL) {
- g_warning ("shared_is_of_type: seemingly valid %s has "
- "bad type %d.", targtype, sh->type);
- camel_type_lock_down ();
- return FALSE;
- }
-
- while (type_info) {
- if (type_info->self == ctype) {
- camel_type_lock_down ();
- return TRUE;
- }
-
- type_info =
- g_hash_table_lookup (ctype_to_typeinfo,
- GINT_TO_POINTER (type_info->
- parent));
- }
-
- /* this isn't an error, e.g. CAMEL_IS_FOLDER(folder), its upto the
- caller to handle the false case */
- /*g_warning
- ("shared_is_of_type: %s of `%s' (@%p) is not also %s of `%s'",
- targtype, camel_type_to_name (sh->type), sh, targtype,
- camel_type_to_name (ctype));*/
-
- camel_type_lock_down ();
- return FALSE;
-}
-
-static void
-make_global_classfuncs (CamelTypeInfo * type_info)
-{
- CamelObjectClass *funcs;
- GSList *parents;
- GSList *head;
-
- g_assert (type_info);
-
- funcs = g_malloc0 (type_info->classfuncs_size);
- funcs->s.type = type_info->self;
-
- type_info->global_classfuncs = funcs;
-
- parents = NULL;
- while (type_info) {
- parents = g_slist_prepend (parents, type_info);
- type_info =
- g_hash_table_lookup (ctype_to_typeinfo,
- GINT_TO_POINTER (type_info->
- parent));
- }
-
- head = parents;
-
- for (; parents && parents->data; parents = parents->next) {
- CamelTypeInfo *thisinfo;
-
- thisinfo = parents->data;
- if (thisinfo->class_init)
- (thisinfo->class_init) (funcs);
- }
-
- g_slist_free (head);
-}
diff --git a/camel/camel-object.h b/camel/camel-object.h
deleted file mode 100644
index ad76b0add9..0000000000
--- a/camel/camel-object.h
+++ /dev/null
@@ -1,146 +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 <danw@helixcode.com>
- *
- * 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 <stdlib.h> /* size_t */
-#include <glib.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <camel/camel-types.h>
-
-#ifdef G_DISABLE_CHECKS
-#define CAMEL_CHECK_CAST( obj, ctype, ptype ) ((ptype *) obj)
-#define CAMEL_CHECK_CLASS_CAST( class, ctype, ptype ) ((ptype *) class)
-#define CAMEL_CHECK_TYPE( obj, ctype ) (TRUE)
-#define CAMEL_CHECK_CLASS_TYPE( class, ctype ) (TRUE)
-#else
-#define CAMEL_CHECK_CAST( obj, ctype, ptype ) ((ptype *) camel_object_check_cast( (CamelObject *)(obj), (CamelType)(ctype) ))
-#define CAMEL_CHECK_CLASS_CAST( class, ctype, ptype ) ((ptype *) camel_object_class_check_cast( (CamelObjectClass *)(class), (CamelType)(ctype) ))
-#define CAMEL_CHECK_TYPE( obj, ctype ) (camel_object_is_of_type( (CamelObject *)(obj), (CamelType)(ctype) ))
-#define CAMEL_CHECK_CLASS_TYPE( class, ctype ) (camel_object_class_is_of_type( (CamelObjectClass *)(class), (CamelType)(ctype) ))
-#endif
-
-#define CAMEL_INVALID_TYPE ((CamelType)0)
-
-#define CAMEL_OBJECT_TYPE (camel_object_get_type ())
-
-#define CAMEL_OBJECT(obj) (CAMEL_CHECK_CAST((obj), CAMEL_OBJECT_TYPE, CamelObject))
-#define CAMEL_OBJECT_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_OBJECT_TYPE, CamelObjectClass))
-#define CAMEL_IS_OBJECT(o) (CAMEL_CHECK_TYPE((o), CAMEL_OBJECT_TYPE))
-#define CAMEL_IS_OBJECT_CLASS(k) (CAMEL_CHECK_CLASS_TYPE((k), CAMEL_OBJECT_TYPE))
-
-#define CAMEL_OBJECT_GET_CLASS(o) ((CamelObjectClass *)(CAMEL_OBJECT(o))->classfuncs)
-#define CAMEL_OBJECT_GET_TYPE(o) ((CamelType)(CAMEL_OBJECT(o))->s.type)
-
-typedef guint32 CamelType;
-
-typedef struct _CamelObjectShared
-{
- guint32 magic;
- CamelType type;
-}
-CamelObjectShared;
-
-typedef struct _CamelObjectClass
-{
- CamelObjectShared s;
-
- GHashTable *event_to_preplist;
-}
-CamelObjectClass;
-
-typedef struct _CamelObject
-{
- CamelObjectShared s;
- guint32 ref_count:31;
- guint32 in_event:1;
- CamelObjectClass *classfuncs;
- GHashTable *event_to_hooklist;
-}
-CamelObject;
-
-typedef void (*CamelObjectClassInitFunc) (CamelObjectClass *);
-typedef void (*CamelObjectClassFinalizeFunc) (CamelObjectClass *);
-typedef void (*CamelObjectInitFunc) (CamelObject *);
-typedef void (*CamelObjectFinalizeFunc) (CamelObject *);
-
-typedef gboolean (*CamelObjectEventPrepFunc) (CamelObject *,
- gpointer);
-typedef void (*CamelObjectEventHookFunc) (CamelObject *, gpointer,
- gpointer);
-
-/* The type system .... it's pretty simple..... */
-
-void camel_type_init (void);
-CamelType camel_type_register (CamelType parent, const gchar * name,
- size_t instance_size,
- size_t classfuncs_size,
- CamelObjectClassInitFunc class_init,
- CamelObjectClassFinalizeFunc
- class_finalize,
- CamelObjectInitFunc instance_init,
- CamelObjectFinalizeFunc
- instance_finalize);
-CamelObjectClass *camel_type_get_global_classfuncs (CamelType type);
-const gchar *camel_type_to_name (CamelType type);
-
-CamelType camel_object_get_type (void);
-CamelObject *camel_object_new (CamelType type);
-void camel_object_ref (CamelObject * obj);
-void camel_object_unref (CamelObject * obj);
-CamelObject *camel_object_check_cast (CamelObject * obj,
- CamelType ctype);
-CamelObjectClass *camel_object_class_check_cast (CamelObjectClass *
- class,
- CamelType ctype);
-gboolean camel_object_is_of_type (CamelObject * obj, CamelType ctype);
-gboolean camel_object_class_is_of_type (CamelObjectClass * class,
- CamelType ctype);
-gchar *camel_object_describe (CamelObject * obj);
-void camel_object_class_declare_event (CamelObjectClass * class,
- const gchar * name,
- CamelObjectEventPrepFunc prep);
-void camel_object_hook_event (CamelObject * obj, const gchar * name,
- CamelObjectEventHookFunc hook,
- gpointer user_data);
-void camel_object_unhook_event (CamelObject * obj, const gchar * name,
- CamelObjectEventHookFunc hook,
- gpointer user_data);
-void camel_object_trigger_event (CamelObject * obj,
- const gchar * name,
- gpointer event_data);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_OBJECT_H */
diff --git a/camel/camel-operation.c b/camel/camel-operation.c
deleted file mode 100644
index 4433fa5d1a..0000000000
--- a/camel/camel-operation.c
+++ /dev/null
@@ -1,663 +0,0 @@
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdio.h>
-#ifdef ENABLE_THREADS
-#include <pthread.h>
-#endif
-
-#include <sys/time.h>
-#include <unistd.h>
-
-#include <glib.h>
-#include "camel-operation.h"
-#include "e-util/e-msgport.h"
-
-#define d(x)
-
-/* ********************************************************************** */
-
-struct _status_stack {
- guint32 flags;
- char *msg;
- int pc; /* last pc reported */
- unsigned int stamp; /* last stamp reported */
-};
-
-struct _CamelOperation {
- pthread_t id; /* id of running thread */
- guint32 flags; /* cancelled ? */
- int blocked; /* cancellation blocked depth */
- int refcount;
-
- CamelOperationStatusFunc status;
- void *status_data;
- unsigned int status_update;
-
- /* stack of status messages (struct _status_stack *) */
- GSList *status_stack;
- struct _status_stack *lastreport;
-
-#ifdef ENABLE_THREADS
- EMsgPort *cancel_port;
- int cancel_fd;
- pthread_mutex_t lock;
-#endif
-};
-
-#define CAMEL_OPERATION_CANCELLED (1<<0)
-#define CAMEL_OPERATION_TRANSIENT (1<<1)
-
-#ifdef ENABLE_THREADS
-#define CAMEL_OPERATION_LOCK(cc) pthread_mutex_lock(&cc->lock)
-#define CAMEL_OPERATION_UNLOCK(cc) pthread_mutex_unlock(&cc->lock)
-#define CAMEL_ACTIVE_LOCK() pthread_mutex_lock(&operation_active_lock)
-#define CAMEL_ACTIVE_UNLOCK() pthread_mutex_unlock(&operation_active_lock)
-static pthread_mutex_t operation_active_lock = PTHREAD_MUTEX_INITIALIZER;
-#else
-#define CAMEL_OPERATION_LOCK(cc)
-#define CAMEL_OPERATION_UNLOCK(cc)
-#define CAMEL_ACTIVE_LOCK()
-#define CAMEL_ACTIVE_UNLOCK()
-#endif
-
-static GHashTable *operation_active;
-
-typedef struct _CamelOperationMsg {
- EMsg msg;
-} CamelOperationMsg ;
-
-/**
- * camel_operation_new:
- * @status: Callback for receiving status messages.
- * @status_data: User data.
- *
- * Create a new camel operation handle. Camel operation handles can
- * be used in a multithreaded application (or a single operation
- * handle can be used in a non threaded appliation) to cancel running
- * operations and to obtain notification messages of the internal
- * status of messages.
- *
- * Return value: A new operation handle.
- **/
-CamelOperation *camel_operation_new(CamelOperationStatusFunc status, void *status_data)
-{
- CamelOperation *cc;
-
- cc = g_malloc0(sizeof(*cc));
-
- cc->flags = 0;
- cc->blocked = 0;
- cc->refcount = 1;
- cc->status = status;
- cc->status_data = status_data;
-#ifdef ENABLE_THREADS
- cc->id = ~0;
- cc->cancel_port = e_msgport_new();
- cc->cancel_fd = e_msgport_fd(cc->cancel_port);
- pthread_mutex_init(&cc->lock, NULL);
-#endif
-
- return cc;
-}
-
-/**
- * camel_operation_reset:
- * @cc:
- *
- * Resets an operation cancel state and message.
- **/
-void camel_operation_reset(CamelOperation *cc)
-{
- GSList *n;
-
-#ifdef ENABLE_THREADS
- CamelOperationMsg *msg;
-
- while ((msg = (CamelOperationMsg *)e_msgport_get(cc->cancel_port)))
- g_free(msg);
-#endif
-
- n = cc->status_stack;
- while (n) {
- g_free(n->data);
- n = n->next;
- }
- g_slist_free(cc->status_stack);
- cc->status_stack = NULL;
-
- cc->flags = 0;
- cc->blocked = 0;
-}
-
-/**
- * camel_operation_ref:
- * @cc:
- *
- * Add a reference to the CamelOperation @cc.
- **/
-void camel_operation_ref(CamelOperation *cc)
-{
- CAMEL_OPERATION_LOCK(cc);
- cc->refcount++;
- CAMEL_OPERATION_UNLOCK(cc);
-}
-
-/**
- * camel_operation_unref:
- * @cc:
- *
- * Unref and potentially free @cc.
- **/
-void camel_operation_unref(CamelOperation *cc)
-{
- GSList *n;
-#ifdef ENABLE_THREADS
- CamelOperationMsg *msg;
-
- if (cc->refcount == 1) {
- while ((msg = (CamelOperationMsg *)e_msgport_get(cc->cancel_port)))
- g_free(msg);
-
- e_msgport_destroy(cc->cancel_port);
-#endif
- n = cc->status_stack;
- while (n) {
- g_warning("Camel operation status stack non empty: %s", (char *)n->data);
- g_free(n->data);
- n = n->next;
- }
- g_slist_free(cc->status_stack);
-
- g_free(cc);
- } else {
- CAMEL_OPERATION_LOCK(cc);
- cc->refcount--;
- CAMEL_OPERATION_UNLOCK(cc);
- }
-}
-
-/**
- * camel_operation_cancel_block:
- * @cc:
- *
- * Block cancellation for this operation. If @cc is NULL, then the
- * current thread is blocked.
- **/
-void camel_operation_cancel_block(CamelOperation *cc)
-{
- CAMEL_ACTIVE_LOCK();
- if (operation_active == NULL)
- operation_active = g_hash_table_new(NULL, NULL);
-
- if (cc == NULL)
- cc = g_hash_table_lookup(operation_active, (void *)pthread_self());
- CAMEL_ACTIVE_UNLOCK();
-
- if (cc) {
- CAMEL_OPERATION_LOCK(cc);
- cc->blocked++;
- CAMEL_OPERATION_UNLOCK(cc);
- }
-}
-
-/**
- * camel_operation_cancel_unblock:
- * @cc:
- *
- * Unblock cancellation, when the unblock count reaches the block
- * count, then this operation can be cancelled. If @cc is NULL, then
- * the current thread is unblocked.
- **/
-void camel_operation_cancel_unblock(CamelOperation *cc)
-{
- CAMEL_ACTIVE_LOCK();
- if (operation_active == NULL)
- operation_active = g_hash_table_new(NULL, NULL);
-
- if (cc == NULL)
- cc = g_hash_table_lookup(operation_active, (void *)pthread_self());
- CAMEL_ACTIVE_UNLOCK();
-
- if (cc) {
- CAMEL_OPERATION_LOCK(cc);
- cc->blocked--;
- CAMEL_OPERATION_UNLOCK(cc);
- }
-}
-
-static void
-cancel_thread(void *key, CamelOperation *cc, void *data)
-{
- if (cc)
- camel_operation_cancel(cc);
-}
-
-/**
- * camel_operation_cancel:
- * @cc:
- *
- * Cancel a given operation. If @cc is NULL then all outstanding
- * operations are cancelled.
- **/
-void camel_operation_cancel(CamelOperation *cc)
-{
- CamelOperationMsg *msg;
-
- if (cc == NULL) {
- if (operation_active) {
- CAMEL_ACTIVE_LOCK();
- g_hash_table_foreach(operation_active, (GHFunc)cancel_thread, NULL);
- CAMEL_ACTIVE_UNLOCK();
- }
- } else if ((cc->flags & CAMEL_OPERATION_CANCELLED) == 0) {
- d(printf("cancelling thread %d\n", cc->id));
-
- CAMEL_OPERATION_LOCK(cc);
- msg = g_malloc0(sizeof(*msg));
- e_msgport_put(cc->cancel_port, (EMsg *)msg);
- cc->flags |= CAMEL_OPERATION_CANCELLED;
- CAMEL_OPERATION_UNLOCK(cc);
- }
-}
-
-/**
- * camel_operation_register:
- * @cc:
- *
- * Register a thread or the main thread for cancellation through @cc.
- * If @cc is NULL, then a new cancellation is created for this thread,
- * but may only be cancelled from the same thread.
- *
- * All calls to operation_register() should be matched with calls to
- * operation_unregister(), or resources will be lost.
- **/
-void camel_operation_register(CamelOperation *cc)
-{
- pthread_t id = pthread_self();
-
- CAMEL_ACTIVE_LOCK();
-
- if (operation_active == NULL)
- operation_active = g_hash_table_new(NULL, NULL);
-
- if (cc == NULL) {
- cc = g_hash_table_lookup(operation_active, (void *)id);
- if (cc == NULL) {
- cc = camel_operation_new(NULL, NULL);
- }
- }
-
- cc->id = id;
- g_hash_table_insert(operation_active, (void *)id, cc);
-
- d(printf("registering thread %ld for cancellation\n", id));
-
- CAMEL_ACTIVE_UNLOCK();
-
- camel_operation_ref(cc);
-}
-
-/**
- * camel_operation_unregister:
- * @cc:
- *
- * Unregister a given operation from being cancelled. If @cc is NULL,
- * then the current thread is used.
- **/
-void camel_operation_unregister(CamelOperation *cc)
-{
- CAMEL_ACTIVE_LOCK();
-
- if (operation_active == NULL)
- operation_active = g_hash_table_new(NULL, NULL);
-
- if (cc == NULL) {
- cc = g_hash_table_lookup(operation_active, (void *)pthread_self());
- if (cc == NULL) {
- g_warning("Trying to unregister a thread that was never registered for cancellation");
- }
- }
-
- if (cc)
- g_hash_table_remove(operation_active, (void *)cc->id);
-
- CAMEL_ACTIVE_UNLOCK();
-
- d({if (cc) printf("unregistering thread %d for cancellation\n", cc->id);});
-
- if (cc)
- camel_operation_unref(cc);
-}
-
-/**
- * camel_operation_cancel_check:
- * @cc:
- *
- * Check if cancellation has been applied to @cc. If @cc is NULL,
- * then the CamelOperation registered for the current thread is used.
- *
- * Return value: TRUE if the operation has been cancelled.
- **/
-gboolean camel_operation_cancel_check(CamelOperation *cc)
-{
- CamelOperationMsg *msg;
-
- d(printf("checking for cancel in thread %d\n", pthread_self()));
-
- if (cc == NULL) {
- if (operation_active) {
- CAMEL_ACTIVE_LOCK();
- cc = g_hash_table_lookup(operation_active, (void *)pthread_self());
- CAMEL_ACTIVE_UNLOCK();
- }
- if (cc == NULL)
- return FALSE;
- }
-
- if (cc->blocked > 0) {
- d(printf("ahah! cancellation is blocked\n"));
- return FALSE;
- }
-
- if (cc->flags & CAMEL_OPERATION_CANCELLED) {
- d(printf("previously cancelled\n"));
- return TRUE;
- }
-
- msg = (CamelOperationMsg *)e_msgport_get(cc->cancel_port);
- if (msg) {
- d(printf("Got cancellation message\n"));
- CAMEL_OPERATION_LOCK(cc);
- cc->flags |= CAMEL_OPERATION_CANCELLED;
- CAMEL_OPERATION_UNLOCK(cc);
- return TRUE;
- }
- return FALSE;
-}
-
-/**
- * camel_operation_cancel_fd:
- * @cc:
- *
- * Retrieve a file descriptor that can be waited on (select, or poll)
- * for read, to asynchronously detect cancellation.
- *
- * Return value: The fd, or -1 if cancellation is not available
- * (blocked, or has not been registered for this thread).
- **/
-int camel_operation_cancel_fd(CamelOperation *cc)
-{
- if (cc == NULL) {
- if (operation_active) {
- CAMEL_ACTIVE_LOCK();
- cc = g_hash_table_lookup(operation_active, (void *)pthread_self());
- CAMEL_ACTIVE_UNLOCK();
- }
- if (cc == NULL)
- return -1;
- }
- if (cc->blocked)
- return -1;
-
- return cc->cancel_fd;
-}
-
-/**
- * camel_operation_start:
- * @cc:
- * @what:
- * @:
- *
- * Report the start of an operation. All start operations should have
- * similar end operations.
- **/
-void camel_operation_start(CamelOperation *cc, char *what, ...)
-{
- va_list ap;
- char *msg;
- struct _status_stack *s;
-
- if (operation_active == NULL)
- return;
-
- if (cc == NULL) {
- CAMEL_ACTIVE_LOCK();
- cc = g_hash_table_lookup(operation_active, (void *)pthread_self());
- CAMEL_ACTIVE_UNLOCK();
- if (cc == NULL)
- return;
- }
-
- if (cc->status == NULL)
- return;
-
- va_start(ap, what);
- msg = g_strdup_vprintf(what, ap);
- va_end(ap);
- cc->status(cc, msg, CAMEL_OPERATION_START, cc->status_data);
- cc->status_update = 0;
- s = g_malloc0(sizeof(*s));
- s->msg = msg;
- s->flags = 0;
- cc->lastreport = s;
- cc->status_stack = g_slist_prepend(cc->status_stack, s);
- d(printf("start '%s'\n", msg, pc));
-}
-
-/**
- * camel_operation_start_transient:
- * @cc:
- * @what:
- * @:
- *
- * Start a transient event. We only update this to the display if it
- * takes very long to process, and if we do, we then go back to the
- * previous state when finished.
- **/
-void camel_operation_start_transient(CamelOperation *cc, char *what, ...)
-{
- va_list ap;
- char *msg;
- struct _status_stack *s;
-
- if (operation_active == NULL)
- return;
-
- if (cc == NULL) {
- CAMEL_ACTIVE_LOCK();
- cc = g_hash_table_lookup(operation_active, (void *)pthread_self());
- CAMEL_ACTIVE_UNLOCK();
- if (cc == NULL)
- return;
- }
-
- if (cc->status == NULL)
- return;
-
- va_start(ap, what);
- msg = g_strdup_vprintf(what, ap);
- va_end(ap);
- /* we dont report it yet */
- /*cc->status(cc, msg, CAMEL_OPERATION_START, cc->status_data);*/
- cc->status_update = 0;
- s = g_malloc0(sizeof(*s));
- s->msg = msg;
- s->flags = CAMEL_OPERATION_TRANSIENT;
- s->stamp = stamp();
- cc->status_stack = g_slist_prepend(cc->status_stack, s);
- d(printf("start '%s'\n", msg, pc));
-}
-
-static unsigned int stamp(void)
-{
- struct timeval tv;
-
- gettimeofday(&tv, NULL);
- /* update 4 times/second */
- return (tv.tv_sec * 4) + tv.tv_usec / (1000000/4);
-}
-
-/**
- * camel_operation_progress:
- * @cc: Operation to report to.
- * @pc: Percent complete, 0 to 100.
- *
- * Report progress on the current operation. If @cc is NULL, then the
- * currently registered operation is used. @pc reports the current
- * percentage of completion, which should be in the range of 0 to 100.
- *
- * If the total percentage is not know, then use
- * camel_operation_progress_count().
- **/
-void camel_operation_progress(CamelOperation *cc, int pc)
-{
- unsigned int now;
- struct _status_stack *s;
-
- if (operation_active == NULL)
- return;
-
- if (cc == NULL) {
- CAMEL_ACTIVE_LOCK();
- cc = g_hash_table_lookup(operation_active, (void *)pthread_self());
- CAMEL_ACTIVE_UNLOCK();
- if (cc == NULL)
- return;
- }
-
- if (cc->status == NULL)
- return;
-
- if (cc->status_stack == NULL)
- return;
-
- s = cc->status_stack->data;
- s->pc = pc;
-
- now = stamp();
- if (cc->status_update != now) {
- if (s->flags & CAMEL_OPERATION_TRANSIENT) {
- if (s->stamp/16 < now/16) {
- s->stamp = now;
- cc->status(cc, s->msg, pc, cc->status_data);
- cc->status_update = now;
- cc->lastreport = s;
- }
- } else {
- cc->status(cc, s->msg, pc, cc->status_data);
- d(printf("progress '%s' %d %%\n", s->msg, pc));
- s->stamp = cc->status_update = now;
- cc->lastreport = s;
- }
- }
-}
-
-void camel_operation_progress_count(CamelOperation *cc, int sofar)
-{
- unsigned int now;
- struct _status_stack *s;
-
- if (operation_active == NULL)
- return;
-
- if (cc == NULL) {
- CAMEL_ACTIVE_LOCK();
- cc = g_hash_table_lookup(operation_active, (void *)pthread_self());
- CAMEL_ACTIVE_UNLOCK();
- if (cc == NULL)
- return;
- }
-
- if (cc->status == NULL)
- return;
-
- if (cc->status_stack == NULL)
- return;
-
- /* FIXME: generate some meaningful pc value */
- s = cc->status_stack->data;
- s->pc = sofar;
- now = stamp();
- if (cc->status_update != now) {
- if (s->flags & CAMEL_OPERATION_TRANSIENT) {
- if (s->stamp/16 < now/16) {
- s->stamp = now;
- cc->status(cc, s->msg, sofar, cc->status_data);
- cc->status_update = now;
- cc->lastreport = s;
- }
- } else {
- cc->status(cc, s->msg, sofar, cc->status_data);
- d(printf("progress '%s' %d done\n", msg, sofar));
- s->stamp = cc->status_update = now;
- cc->lastreport = s;
- }
- }
-}
-
-/**
- * camel_operation_end:
- * @cc:
- * @what: Format string.
- * @:
- *
- * Report the end of an operation. If @cc is NULL, then the currently
- * registered operation is notified.
- **/
-void camel_operation_end(CamelOperation *cc)
-{
- struct _status_stack *s, *p;
- unsigned int now;
-
- if (operation_active == NULL)
- return;
-
- if (cc == NULL) {
- CAMEL_ACTIVE_LOCK();
- cc = g_hash_table_lookup(operation_active, (void *)pthread_self());
- CAMEL_ACTIVE_UNLOCK();
- if (cc == NULL)
- return;
- }
-
- if (cc->status == NULL)
- return;
-
- if (cc->status_stack == NULL)
- return;
-
- /* so what we do here is this. If the operation that just
- * ended was transient, see if we have any other transient
- * messages that haven't been updated yet above us, otherwise,
- * re-update as a non-transient at the last reported pc */
- now = stamp();
- s = cc->status_stack->data;
- if (s->flags & CAMEL_OPERATION_TRANSIENT) {
- if (cc->lastreport == s) {
- GSList *l = cc->status_stack->next;
- while (l) {
- p = l->data;
- if (p->flags & CAMEL_OPERATION_TRANSIENT) {
- if (p->stamp/16 < now/16) {
- cc->status(cc, p->msg, p->pc, cc->status_data);
- cc->lastreport = p;
- break;
- }
- } else {
- cc->status(cc, p->msg, p->pc, cc->status_data);
- cc->lastreport = p;
- break;
- }
- l = l->next;
- }
- }
- } else {
- cc->status(cc, s->msg, CAMEL_OPERATION_END, cc->status_data);
- cc->lastreport = s;
- }
- g_free(s->msg);
- g_free(s);
- cc->status_stack = g_slist_remove_link(cc->status_stack, cc->status_stack);
-}
diff --git a/camel/camel-operation.h b/camel/camel-operation.h
deleted file mode 100644
index 8bf5cfa2dc..0000000000
--- a/camel/camel-operation.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Authors: Michael Zucchi <NotZed@Ximian.com>
- *
- * Copyright 2001 Ximian, Inc. (http://www.ximian.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_OPERATION_H
-#define CAMEL_OPERATION_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-/* cancellation helper stuff, not yet finalised */
-
-typedef struct _CamelOperation CamelOperation;
-
-typedef void (*CamelOperationStatusFunc)(struct _CamelOperation *op, const char *what, int pc, void *data);
-
-enum _camel_operation_status_t {
- CAMEL_OPERATION_START = -1,
- CAMEL_OPERATION_END = -2,
-};
-
-/* main thread functions */
-CamelOperation *camel_operation_new(CamelOperationStatusFunc status, void *status_data);
-void camel_operation_ref(CamelOperation *cc);
-void camel_operation_unref(CamelOperation *cc);
-void camel_operation_reset(CamelOperation *cc);
-void camel_operation_cancel(CamelOperation *cc);
-/* subthread functions */
-void camel_operation_register(CamelOperation *cc);
-void camel_operation_unregister(CamelOperation *cc);
-/* called internally by camel, for the current thread */
-void camel_operation_cancel_block(CamelOperation *cc);
-void camel_operation_cancel_unblock(CamelOperation *cc);
-int camel_operation_cancel_check(CamelOperation *cc);
-int camel_operation_cancel_fd(CamelOperation *cc);
-
-void camel_operation_start(CamelOperation *cc, char *what, ...);
-void camel_operation_start_transient(CamelOperation *cc, char *what, ...);
-void camel_operation_progress(CamelOperation *cc, int pc);
-void camel_operation_progress_count(CamelOperation *cc, int sofar);
-void camel_operation_end(CamelOperation *cc);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_OPERATION_H */
diff --git a/camel/camel-pgp-context.c b/camel/camel-pgp-context.c
deleted file mode 100644
index d5c6b9dde9..0000000000
--- a/camel/camel-pgp-context.c
+++ /dev/null
@@ -1,1325 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2001 Ximian, Inc. (www.ximian.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.
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "camel-pgp-context.h"
-
-#include "camel-stream-fs.h"
-#include "camel-stream-mem.h"
-
-#include <gtk/gtk.h> /* for _() macro */
-
-#include <gal/widgets/e-unicode.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <errno.h>
-#include <fcntl.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <dirent.h>
-
-#include <signal.h>
-#include <sys/ioctl.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <termios.h>
-#include <unistd.h>
-#include <signal.h>
-
-#define d(x)
-
-struct _CamelPgpContextPrivate {
- CamelPgpType type;
- char *path;
-};
-
-static int pgp_sign (CamelCipherContext *ctx, const char *userid, CamelCipherHash hash,
- CamelStream *istream, CamelStream *ostream, CamelException *ex);
-static int pgp_clearsign (CamelCipherContext *context, const char *userid, CamelCipherHash hash,
- CamelStream *istream, CamelStream *ostream, CamelException *ex);
-static CamelCipherValidity *pgp_verify (CamelCipherContext *context, CamelStream *istream,
- CamelStream *sigstream, CamelException *ex);
-static int pgp_encrypt (CamelCipherContext *context, gboolean sign, const char *userid,
- GPtrArray *recipients, CamelStream *istream, CamelStream *ostream,
- CamelException *ex);
-static int pgp_decrypt (CamelCipherContext *context, CamelStream *istream, CamelStream *ostream,
- CamelException *ex);
-
-static CamelCipherContextClass *parent_class;
-
-static void
-camel_pgp_context_init (CamelPgpContext *context)
-{
- context->priv = g_new0 (struct _CamelPgpContextPrivate, 1);
-}
-
-static void
-camel_pgp_context_finalise (CamelObject *o)
-{
- CamelPgpContext *context = (CamelPgpContext *)o;
-
- g_free (context->priv->path);
-
- g_free (context->priv);
-}
-
-static void
-camel_pgp_context_class_init (CamelPgpContextClass *camel_pgp_context_class)
-{
- CamelCipherContextClass *camel_cipher_context_class =
- CAMEL_CIPHER_CONTEXT_CLASS (camel_pgp_context_class);
-
- parent_class = CAMEL_CIPHER_CONTEXT_CLASS (camel_type_get_global_classfuncs (camel_cipher_context_get_type ()));
-
- camel_cipher_context_class->sign = pgp_sign;
- camel_cipher_context_class->clearsign = pgp_clearsign;
- camel_cipher_context_class->verify = pgp_verify;
- camel_cipher_context_class->encrypt = pgp_encrypt;
- camel_cipher_context_class->decrypt = pgp_decrypt;
-}
-
-CamelType
-camel_pgp_context_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (camel_cipher_context_get_type (),
- "CamelPgpContext",
- sizeof (CamelPgpContext),
- sizeof (CamelPgpContextClass),
- (CamelObjectClassInitFunc) camel_pgp_context_class_init,
- NULL,
- (CamelObjectInitFunc) camel_pgp_context_init,
- (CamelObjectFinalizeFunc) camel_pgp_context_finalise);
- }
-
- return type;
-}
-
-
-/**
- * camel_pgp_context_new:
- * @session: CamelSession
- * @type: One of CAMEL_PGP_TYPE_PGP2, PGP5, GPG, or PGP6
- * @path: path to PGP binary
- *
- * This creates a new CamelPgpContext object which is used to sign,
- * verify, encrypt and decrypt streams.
- *
- * Return value: the new CamelPgpContext
- **/
-CamelPgpContext *
-camel_pgp_context_new (CamelSession *session, CamelPgpType type, const char *path)
-{
- CamelPgpContext *context;
-
- g_return_val_if_fail (session != NULL, NULL);
- g_return_val_if_fail (type != CAMEL_PGP_TYPE_NONE, NULL);
- g_return_val_if_fail (path != NULL, NULL);
-
- context = CAMEL_PGP_CONTEXT (camel_object_new (CAMEL_PGP_CONTEXT_TYPE));
-
- camel_cipher_context_construct (CAMEL_CIPHER_CONTEXT (context), session);
-
- context->priv->type = type;
- context->priv->path = g_strdup (path);
-
- return context;
-}
-
-
-
-static const gchar *
-pgp_get_type_as_string (CamelPgpType type)
-{
- switch (type) {
- case CAMEL_PGP_TYPE_PGP2:
- return "PGP2.x";
- case CAMEL_PGP_TYPE_PGP5:
- return "PGP5";
- case CAMEL_PGP_TYPE_PGP6:
- return "PGP6";
- case CAMEL_PGP_TYPE_GPG:
- return "GnuPG";
- default:
- g_assert_not_reached ();
- return NULL;
- }
-}
-
-static gchar *
-pgp_get_passphrase (CamelSession *session, CamelPgpType pgp_type, char *userid)
-{
- gchar *passphrase, *prompt;
- const char *type;
-
- type = pgp_get_type_as_string (pgp_type);
-
- if (userid)
- prompt = g_strdup_printf (_("Please enter your %s passphrase for %s"),
- type, userid);
- else
- prompt = g_strdup_printf (_("Please enter your %s passphrase"),
- type);
-
- /* Use the userid as a key if possible, else be generic and use the type */
- passphrase = camel_session_query_authenticator (session, CAMEL_AUTHENTICATOR_ASK,
- prompt, TRUE, NULL, userid ? userid : (char *) type,
- NULL);
- g_free (prompt);
-
- return passphrase;
-}
-
-static void
-pgp_forget_passphrase (CamelSession *session, CamelPgpType pgp_type, char *userid)
-{
- const char *type = NULL;
-
- if (!userid)
- type = pgp_get_type_as_string (pgp_type);
-
- camel_session_query_authenticator (session, CAMEL_AUTHENTICATOR_TELL,
- NULL, FALSE, NULL, userid ? userid : (char *) type,
- NULL);
-}
-
-static int
-cleanup_child (pid_t child)
-{
- int status;
- pid_t wait_result;
- sigset_t mask, omask;
-
- /* PGP5 closes fds before exiting, meaning this might be called
- * too early. So wait a bit for the result.
- */
- sigemptyset (&mask);
- sigaddset (&mask, SIGALRM);
- sigprocmask (SIG_BLOCK, &mask, &omask);
- alarm (1);
- wait_result = waitpid (child, &status, 0);
- alarm (0);
- sigprocmask (SIG_SETMASK, &omask, NULL);
-
- if (wait_result == -1 && errno == EINTR) {
- /* The child is hanging: send a friendly reminder. */
- kill (child, SIGTERM);
- sleep (1);
- wait_result = waitpid (child, &status, WNOHANG);
- if (wait_result == 0) {
- /* Still hanging; use brute force. */
- kill (child, SIGKILL);
- sleep (1);
- wait_result = waitpid (child, &status, WNOHANG);
- }
- }
-
- if (wait_result != -1 && WIFEXITED (status))
- return WEXITSTATUS (status);
- else
- return -1;
-}
-
-static void
-cleanup_before_exec (int fd)
-{
- int maxfd, i;
-
- maxfd = sysconf (_SC_OPEN_MAX);
- if (maxfd < 0)
- return;
-
- /* Loop over all fds. */
- for (i = 0; i < maxfd; i++) {
- if ((STDIN_FILENO != i) &&
- (STDOUT_FILENO != i) &&
- (STDERR_FILENO != i) &&
- (fd != i))
- close (i);
- }
-}
-
-static int
-crypto_exec_with_passwd (const char *path, char *argv[], const char *input, int inlen,
- int passwd_fds[], const char *passphrase,
- char **output, int *outlen, char **diagnostics)
-{
- fd_set fdset, write_fdset;
- int ip_fds[2], op_fds[2], diag_fds[2];
- int select_result, read_len, write_len;
- size_t tmp_len;
- pid_t child;
- char *buf, *diag_buf;
- const char *passwd_next, *input_next;
- size_t size, alloc_size, diag_size, diag_alloc_size;
- gboolean eof_seen, diag_eof_seen, passwd_eof_seen, input_eof_seen;
- size_t passwd_remaining, passwd_incr, input_remaining, input_incr;
- struct timeval timeout;
-
-
- if ((pipe (ip_fds) < 0 ) ||
- (pipe (op_fds) < 0 ) ||
- (pipe (diag_fds) < 0 )) {
- *diagnostics = g_strdup_printf ("Couldn't create pipe to %s: "
- "%s", path,
- g_strerror (errno));
- return 0;
- }
-
- if (!(child = fork ())) {
- /* In child */
-
- if ((dup2 (ip_fds[0], STDIN_FILENO) < 0 ) ||
- (dup2 (op_fds[1], STDOUT_FILENO) < 0 ) ||
- (dup2 (diag_fds[1], STDERR_FILENO) < 0 )) {
- _exit (255);
- }
-
- /* Dissociate from evolution-mail's controlling
- * terminal so that pgp/gpg won't be able to read from
- * it: PGP 2 will fall back to asking for the password
- * on /dev/tty if the passed-in password is incorrect.
- * This will make that fail rather than hanging.
- */
- setsid ();
-
- /* Close excess fds */
- cleanup_before_exec (passwd_fds[0]);
-
- execvp (path, argv);
- fprintf (stderr, "Could not execute %s: %s\n", argv[0],
- g_strerror (errno));
- _exit (255);
- } else if (child < 0) {
- *diagnostics = g_strdup_printf ("Cannot fork %s: %s",
- argv[0], g_strerror (errno));
- return 0;
- }
-
- /* Parent */
- close (ip_fds[0]);
- close (op_fds[1]);
- close (diag_fds[1]);
- close (passwd_fds[0]);
-
- timeout.tv_sec = 10; /* timeout in seconds */
- timeout.tv_usec = 0;
-
- size = diag_size = 0;
- alloc_size = 4096;
- diag_alloc_size = 1024;
- eof_seen = diag_eof_seen = FALSE;
-
- buf = g_malloc (alloc_size);
- diag_buf = g_malloc (diag_alloc_size);
-
- passwd_next = passphrase;
- passwd_remaining = passphrase ? strlen (passphrase) : 0;
- passwd_incr = fpathconf (passwd_fds[1], _PC_PIPE_BUF);
- /* Use a reasonable default value on error. */
- if (passwd_incr <= 0)
- passwd_incr = 1024;
- passwd_eof_seen = FALSE;
-
- input_next = input;
- input_remaining = inlen;
- input_incr = fpathconf (ip_fds[1], _PC_PIPE_BUF);
- if (input_incr <= 0)
- input_incr = 1024;
- input_eof_seen = FALSE;
-
- while (!(eof_seen && diag_eof_seen)) {
- FD_ZERO (&fdset);
- if (!eof_seen)
- FD_SET (op_fds[0], &fdset);
- if (!diag_eof_seen)
- FD_SET (diag_fds[0], &fdset);
-
- FD_ZERO (&write_fdset);
- if (!passwd_eof_seen)
- FD_SET (passwd_fds[1], &write_fdset);
- if (!input_eof_seen)
- FD_SET (ip_fds[1], &write_fdset);
-
- select_result = select (FD_SETSIZE, &fdset, &write_fdset,
- NULL, &timeout);
- if (select_result < 0) {
- if (errno == EINTR)
- continue;
- break;
- }
- if (select_result == 0) {
- /* timeout */
- break;
- }
-
- if (FD_ISSET (op_fds[0], &fdset)) {
- /* More output is available. */
-
- if (size + 4096 > alloc_size) {
- alloc_size += 4096;
- buf = g_realloc (buf , alloc_size);
- }
- read_len = read (op_fds[0], &buf[size],
- alloc_size - size - 1);
- if (read_len < 0) {
- if (errno == EINTR)
- continue;
- break;
- }
- if (read_len == 0)
- eof_seen = TRUE;
- size += read_len;
- }
-
- if (FD_ISSET(diag_fds[0], &fdset) ) {
- /* More stderr is available. */
-
- if (diag_size + 1024 > diag_alloc_size) {
- diag_alloc_size += 1024;
- diag_buf = g_realloc (diag_buf,
- diag_alloc_size);
- }
-
- read_len = read (diag_fds[0], &diag_buf[diag_size],
- diag_alloc_size - diag_size - 1);
- if (read_len < 0) {
- if (errno == EINTR)
- continue;
- break;
- }
- if (read_len == 0)
- diag_eof_seen = TRUE;
- diag_size += read_len;
- }
-
- if (FD_ISSET(passwd_fds[1], &write_fdset)) {
- /* Ready for more password input. */
-
- tmp_len = passwd_incr;
- if (tmp_len > passwd_remaining)
- tmp_len = passwd_remaining;
- write_len = write (passwd_fds[1], passwd_next,
- tmp_len);
- if (write_len < 0) {
- if (errno == EINTR)
- continue;
- break;
- }
- passwd_next += write_len;
- passwd_remaining -= write_len;
- if (passwd_remaining == 0) {
- close (passwd_fds[1]);
- passwd_eof_seen = TRUE;
- }
- }
-
- if (FD_ISSET(ip_fds[1], &write_fdset)) {
- /* Ready for more ciphertext input. */
-
- tmp_len = input_incr;
- if (tmp_len > input_remaining)
- tmp_len = input_remaining;
- write_len = write (ip_fds[1], input_next, tmp_len);
- if (write_len < 0) {
- if (errno == EINTR)
- continue;
- break;
- }
- input_next += write_len;
- input_remaining -= write_len;
- if (input_remaining == 0 ) {
- close (ip_fds[1]);
- input_eof_seen = TRUE;
- }
- }
- }
-
- buf[size] = 0;
- diag_buf[diag_size] = 0;
- close (op_fds[0]);
- close (diag_fds[0]);
-
- *output = buf;
- if (outlen)
- *outlen = size;
- *diagnostics = diag_buf;
-
- return cleanup_child (child);
-}
-
-
-/*----------------------------------------------------------------------*
- * Public crypto functions
- *----------------------------------------------------------------------*/
-
-static int
-pgp_sign (CamelCipherContext *ctx, const char *userid, CamelCipherHash hash,
- CamelStream *istream, CamelStream *ostream, CamelException *ex)
-{
- CamelPgpContext *context = CAMEL_PGP_CONTEXT (ctx);
- GByteArray *plaintext;
- CamelStream *stream;
- char *argv[20];
- char *ciphertext = NULL;
- char *diagnostics = NULL;
- char *passphrase = NULL;
- char *hash_str = NULL;
- int passwd_fds[2];
- char passwd_fd[32];
- int retval, i;
-
- /* get the plaintext in a form we can use */
- plaintext = g_byte_array_new ();
- stream = camel_stream_mem_new ();
- camel_stream_mem_set_byte_array (CAMEL_STREAM_MEM (stream), plaintext);
- camel_stream_write_to_stream (istream, stream);
- camel_object_unref (CAMEL_OBJECT (stream));
-
- if (!plaintext->len) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("No plaintext to sign."));
- goto exception;
- }
-
- passphrase = pgp_get_passphrase (ctx->session, context->priv->type, (char *) userid);
- if (!passphrase) {
- camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
- _("No password provided."));
- goto exception;
- }
-
- if (pipe (passwd_fds) < 0) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Couldn't create pipe to GPG/PGP: %s"),
- g_strerror (errno));
- goto exception;
- }
-
- switch (hash) {
- case CAMEL_CIPHER_HASH_DEFAULT:
- hash_str = NULL;
- break;
- case CAMEL_CIPHER_HASH_MD5:
- hash_str = "MD5";
- break;
- case CAMEL_CIPHER_HASH_SHA1:
- hash_str = "SHA1";
- break;
- default:
- g_assert_not_reached ();
- break;
- }
-
- i = 0;
- switch (context->priv->type) {
- case CAMEL_PGP_TYPE_GPG:
- argv[i++] = "gpg";
-
- argv[i++] = "--sign";
- argv[i++] = "-b";
- if (hash_str) {
- argv[i++] = "--digest-algo";
- argv[i++] = hash_str;
- }
-
- if (userid) {
- argv[i++] = "-u";
- argv[i++] = (char *) userid;
- }
-
- argv[i++] = "--verbose";
- argv[i++] = "--yes";
- argv[i++] = "--batch";
-
- argv[i++] = "--armor";
-
- argv[i++] = "--output";
- argv[i++] = "-"; /* output to stdout */
-
- argv[i++] = "--passphrase-fd";
- sprintf (passwd_fd, "%d", passwd_fds[0]);
- argv[i++] = passwd_fd;
- break;
- case CAMEL_PGP_TYPE_PGP5:
- /* FIXME: respect hash */
- argv[i++] = "pgps";
-
- if (userid) {
- argv[i++] = "-u";
- argv[i++] = (char *) userid;
- }
-
- argv[i++] = "-b";
- argv[i++] = "-f";
- argv[i++] = "-z";
- argv[i++] = "-a";
- argv[i++] = "-o";
- argv[i++] = "-"; /* output to stdout */
-
- sprintf (passwd_fd, "PGPPASSFD=%d", passwd_fds[0]);
- putenv (passwd_fd);
- break;
- case CAMEL_PGP_TYPE_PGP2:
- case CAMEL_PGP_TYPE_PGP6:
- /* FIXME: respect hash */
- argv[i++] = "pgp";
-
- if (userid) {
- argv[i++] = "-u";
- argv[i++] = (char *) userid;
- }
-
- argv[i++] = "-f";
- argv[i++] = "-a";
- argv[i++] = "-o";
- argv[i++] = "-";
-
- argv[i++] = "-sb"; /* create a detached signature */
- sprintf (passwd_fd, "PGPPASSFD=%d", passwd_fds[0]);
- putenv (passwd_fd);
- break;
- default:
- g_assert_not_reached ();
- break;
- }
-
- argv[i++] = NULL;
-
- retval = crypto_exec_with_passwd (context->priv->path, argv,
- plaintext->data, plaintext->len,
- passwd_fds, passphrase,
- &ciphertext, NULL,
- &diagnostics);
-
- g_byte_array_free (plaintext, TRUE);
- g_free (passphrase);
-
- if (retval != 0 || !*ciphertext) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- "%s", diagnostics);
- g_free (diagnostics);
- g_free (ciphertext);
- pgp_forget_passphrase (ctx->session, context->priv->type, (char *) userid);
-
- return -1;
- }
-
- g_free (diagnostics);
-
- camel_stream_write (ostream, ciphertext, strlen (ciphertext));
- g_free (ciphertext);
-
- return 0;
-
- exception:
-
- g_byte_array_free (plaintext, TRUE);
-
- if (passphrase) {
- pgp_forget_passphrase (ctx->session, context->priv->type, (char *) userid);
- g_free (passphrase);
- }
-
- return -1;
-}
-
-
-static int
-pgp_clearsign (CamelCipherContext *ctx, const char *userid, CamelCipherHash hash,
- CamelStream *istream, CamelStream *ostream, CamelException *ex)
-{
- CamelPgpContext *context = CAMEL_PGP_CONTEXT (ctx);
- GByteArray *plaintext;
- CamelStream *stream;
- char *argv[15];
- char *ciphertext = NULL;
- char *diagnostics = NULL;
- char *passphrase = NULL;
- char *hash_str = NULL;
- int passwd_fds[2];
- char passwd_fd[32];
- int retval, i;
-
- /* get the plaintext in a form we can use */
- plaintext = g_byte_array_new ();
- stream = camel_stream_mem_new ();
- camel_stream_mem_set_byte_array (CAMEL_STREAM_MEM (stream), plaintext);
- camel_stream_write_to_stream (istream, stream);
- camel_object_unref (CAMEL_OBJECT (stream));
-
- if (!plaintext->len) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("No plaintext to clearsign."));
- goto exception;
- }
-
- passphrase = pgp_get_passphrase (ctx->session, context->priv->type, (char *) userid);
- if (!passphrase) {
- camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
- _("No password provided."));
- goto exception;
- }
-
- if (pipe (passwd_fds) < 0) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Couldn't create pipe to GPG/PGP: %s"),
- g_strerror (errno));
- goto exception;
- }
-
- switch (hash) {
- case CAMEL_CIPHER_HASH_DEFAULT:
- hash_str = NULL;
- break;
- case CAMEL_CIPHER_HASH_MD5:
- hash_str = "MD5";
- break;
- case CAMEL_CIPHER_HASH_SHA1:
- hash_str = "SHA1";
- break;
- default:
- g_assert_not_reached ();
- break;
- }
-
- i = 0;
- switch (context->priv->type) {
- case CAMEL_PGP_TYPE_GPG:
- argv[i++] = "gpg";
-
- argv[i++] = "--clearsign";
-
- if (hash_str) {
- argv[i++] = "--digest-algo";
- argv[i++] = hash_str;
- }
-
- if (userid) {
- argv[i++] = "-u";
- argv[i++] = (char *) userid;
- }
-
- argv[i++] = "--verbose";
- argv[i++] = "--yes";
- argv[i++] = "--batch";
-
- argv[i++] = "--armor";
-
- argv[i++] = "--output";
- argv[i++] = "-"; /* output to stdout */
-
- argv[i++] = "--passphrase-fd";
- sprintf (passwd_fd, "%d", passwd_fds[0]);
- argv[i++] = passwd_fd;
- break;
- case CAMEL_PGP_TYPE_PGP5:
- /* FIXME: modify to respect hash */
- argv[i++] = "pgps";
-
- if (userid) {
- argv[i++] = "-u";
- argv[i++] = (char *) userid;
- }
-
- argv[i++] = "-f";
- argv[i++] = "-z";
- argv[i++] = "-a";
- argv[i++] = "-o";
- argv[i++] = "-"; /* output to stdout */
-
- sprintf (passwd_fd, "PGPPASSFD=%d", passwd_fds[0]);
- putenv (passwd_fd);
- break;
- case CAMEL_PGP_TYPE_PGP2:
- case CAMEL_PGP_TYPE_PGP6:
- /* FIXME: modify to respect hash */
- argv[i++] = "pgp";
-
- if (userid) {
- argv[i++] = "-u";
- argv[i++] = (char *) userid;
- }
-
- argv[i++] = "-f";
- argv[i++] = "-a";
- argv[i++] = "-o";
- argv[i++] = "-";
-
- argv[i++] = "-st";
- sprintf (passwd_fd, "PGPPASSFD=%d", passwd_fds[0]);
- putenv (passwd_fd);
- break;
- default:
- g_assert_not_reached ();
- break;
- }
-
- argv[i++] = NULL;
-
- retval = crypto_exec_with_passwd (context->priv->path, argv,
- plaintext->data, plaintext->len,
- passwd_fds, passphrase,
- &ciphertext, NULL,
- &diagnostics);
-
- g_byte_array_free (plaintext, TRUE);
- g_free (passphrase);
-
- if (retval != 0 || !*ciphertext) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- "%s", diagnostics);
- g_free (diagnostics);
- g_free (ciphertext);
- pgp_forget_passphrase (ctx->session, context->priv->type, (char *) userid);
- }
-
- g_free (diagnostics);
-
- camel_stream_write (ostream, ciphertext, strlen (ciphertext));
- g_free (ciphertext);
-
- return 0;
-
- exception:
-
- g_byte_array_free (plaintext, TRUE);
-
- if (passphrase) {
- pgp_forget_passphrase (ctx->session, context->priv->type, (char *) userid);
- g_free (passphrase);
- }
-
- return -1;
-}
-
-
-static char *
-swrite (CamelStream *istream)
-{
- CamelStream *ostream;
- char *template;
- int fd;
-
- template = g_strdup ("/tmp/evolution-pgp.XXXXXX");
- fd = mkstemp (template);
- if (fd == -1) {
- g_free (template);
- return NULL;
- }
-
- ostream = camel_stream_fs_new_with_fd (fd);
- camel_stream_write_to_stream (istream, ostream);
- camel_object_unref (CAMEL_OBJECT (ostream));
-
- return template;
-}
-
-
-static CamelCipherValidity *
-pgp_verify (CamelCipherContext *ctx, CamelStream *istream,
- CamelStream *sigstream, CamelException *ex)
-{
- CamelPgpContext *context = CAMEL_PGP_CONTEXT (ctx);
- CamelCipherValidity *valid = NULL;
- GByteArray *plaintext;
- CamelStream *stream;
- char *argv[20];
- char *cleartext = NULL;
- char *diagnostics = NULL;
- int passwd_fds[2];
- char *sigfile = NULL;
- int retval, i, clearlen;
-
- /* get the plaintext in a form we can use */
- plaintext = g_byte_array_new ();
- stream = camel_stream_mem_new ();
- camel_stream_mem_set_byte_array (CAMEL_STREAM_MEM (stream), plaintext);
- camel_stream_write_to_stream (istream, stream);
- camel_object_unref (CAMEL_OBJECT (stream));
-
- if (!plaintext->len) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("No plaintext to verify."));
- goto exception;
- }
-
- if (pipe (passwd_fds) < 0) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Couldn't create pipe to GPG/PGP: %s"),
- g_strerror (errno));
- goto exception;
- }
-
- if (sigstream != NULL) {
- /* We are going to verify a detached signature so save
- the signature to a temp file. */
- sigfile = swrite (sigstream);
- if (!sigfile) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Couldn't create temp file: %s"),
- g_strerror (errno));
- goto exception;
- }
- }
-
- i = 0;
- switch (context->priv->type) {
- case CAMEL_PGP_TYPE_GPG:
- argv[i++] = "gpg";
-
- argv[i++] = "--verify";
-
- argv[i++] = "--no-tty";
- /*argv[i++] = "--verbose";*/
- /*argv[i++] = "--yes";*/
- /*argv[i++] = "--batch";*/
-
- if (sigstream != NULL)
- argv[i++] = sigfile;
-
- argv[i++] = "-";
- break;
- case CAMEL_PGP_TYPE_PGP5:
- argv[i++] = "pgpv";
-
- argv[i++] = "-z";
-
- if (sigstream != NULL)
- argv[i++] = sigfile;
-
- argv[i++] = "-f";
-
- break;
- case CAMEL_PGP_TYPE_PGP2:
- case CAMEL_PGP_TYPE_PGP6:
- argv[i++] = "pgp";
-
- if (sigstream != NULL)
- argv[i++] = sigfile;
-
- argv[i++] = "-f";
-
- break;
- default:
- g_assert_not_reached ();
- break;
- }
-
- argv[i++] = NULL;
-
- clearlen = 0;
- retval = crypto_exec_with_passwd (context->priv->path, argv,
- plaintext->data, plaintext->len,
- passwd_fds, NULL,
- &cleartext, &clearlen,
- &diagnostics);
-
- g_byte_array_free (plaintext, TRUE);
-
- /* cleanup */
- if (sigfile) {
- unlink (sigfile);
- g_free (sigfile);
- }
-
- valid = camel_cipher_validity_new ();
-
- if (retval != 0) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- "%s", diagnostics);
-
- camel_cipher_validity_set_valid (valid, FALSE);
- } else {
- camel_cipher_validity_set_valid (valid, TRUE);
- }
-
- if (diagnostics) {
- char *desc;
-
- desc = e_utf8_from_locale_string (diagnostics);
- camel_cipher_validity_set_description (valid, desc);
- g_free (desc);
- }
-
- g_free (diagnostics);
- g_free (cleartext);
-
- return valid;
-
- exception:
-
- g_byte_array_free (plaintext, TRUE);
-
- return NULL;
-}
-
-
-static int
-pgp_encrypt (CamelCipherContext *ctx, gboolean sign, const char *userid, GPtrArray *recipients,
- CamelStream *istream, CamelStream *ostream, CamelException *ex)
-{
- CamelPgpContext *context = CAMEL_PGP_CONTEXT (ctx);
- GPtrArray *recipient_list = NULL;
- GByteArray *plaintext;
- CamelStream *stream;
- GPtrArray *argv;
- int retval, r;
- char *ciphertext = NULL;
- char *diagnostics = NULL;
- int passwd_fds[2];
- char passwd_fd[32];
- char *passphrase = NULL;
-
- /* get the plaintext in a form we can use */
- plaintext = g_byte_array_new ();
- stream = camel_stream_mem_new ();
- camel_stream_mem_set_byte_array (CAMEL_STREAM_MEM (stream), plaintext);
- camel_stream_write_to_stream (istream, stream);
- camel_object_unref (CAMEL_OBJECT (stream));
-
- if (!plaintext->len) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("No plaintext to encrypt."));
- goto exception;
- }
-
- if (sign) {
- /* we only need a passphrase if we intend on signing */
- passphrase = pgp_get_passphrase (ctx->session, context->priv->type,
- (char *) userid);
- if (!passphrase) {
- camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
- _("No password provided."));
- goto exception;
- }
- }
-
- if (pipe (passwd_fds) < 0) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Couldn't create pipe to GPG/PGP: %s"),
- g_strerror (errno));
-
- goto exception;
- }
-
- /* check to make sure we have recipients */
- if (recipients->len == 0) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("No recipients specified"));
-
- goto exception;
- }
-
- argv = g_ptr_array_new ();
- recipient_list = g_ptr_array_new ();
-
- switch (context->priv->type) {
- case CAMEL_PGP_TYPE_GPG:
- for (r = 0; r < recipients->len; r++) {
- char *buf, *recipient;
-
- recipient = recipients->pdata[r];
- buf = g_strdup_printf ("-r %s", recipient);
- g_ptr_array_add (recipient_list, buf);
- }
-
- g_ptr_array_add (argv, "gpg");
-
- g_ptr_array_add (argv, "--verbose");
- g_ptr_array_add (argv, "--yes");
- g_ptr_array_add (argv, "--batch");
-
- g_ptr_array_add (argv, "--armor");
-
- for (r = 0; r < recipient_list->len; r++)
- g_ptr_array_add (argv, recipient_list->pdata[r]);
-
- g_ptr_array_add (argv, "--output");
- g_ptr_array_add (argv, "-"); /* output to stdout */
-
- g_ptr_array_add (argv, "--encrypt");
-
- if (sign) {
- g_ptr_array_add (argv, "--sign");
-
- g_ptr_array_add (argv, "-u");
- g_ptr_array_add (argv, (char *) userid);
-
- g_ptr_array_add (argv, "--passphrase-fd");
- sprintf (passwd_fd, "%d", passwd_fds[0]);
- g_ptr_array_add (argv, passwd_fd);
- }
- break;
- case CAMEL_PGP_TYPE_PGP5:
- for (r = 0; r < recipients->len; r++) {
- char *buf, *recipient;
-
- recipient = recipients->pdata[r];
- buf = g_strdup_printf ("-r %s", recipient);
- g_ptr_array_add (recipient_list, buf);
- }
-
- g_ptr_array_add (argv, "pgpe");
-
- for (r = 0; r < recipient_list->len; r++)
- g_ptr_array_add (argv, recipient_list->pdata[r]);
-
- g_ptr_array_add (argv, "-f");
- g_ptr_array_add (argv, "-z");
- g_ptr_array_add (argv, "-a");
- g_ptr_array_add (argv, "-o");
- g_ptr_array_add (argv, "-"); /* output to stdout */
-
- if (sign) {
- g_ptr_array_add (argv, "-s");
-
- g_ptr_array_add (argv, "-u");
- g_ptr_array_add (argv, (gchar *) userid);
-
- sprintf (passwd_fd, "PGPPASSFD=%d", passwd_fds[0]);
- putenv (passwd_fd);
- }
- break;
- case CAMEL_PGP_TYPE_PGP2:
- case CAMEL_PGP_TYPE_PGP6:
- for (r = 0; r < recipients->len; r++) {
- char *buf, *recipient;
-
- recipient = recipients->pdata[r];
- buf = g_strdup (recipient);
- g_ptr_array_add (recipient_list, buf);
- }
-
- g_ptr_array_add (argv, "pgp");
- g_ptr_array_add (argv, "-f");
- g_ptr_array_add (argv, "-e");
- g_ptr_array_add (argv, "-a");
- g_ptr_array_add (argv, "-o");
- g_ptr_array_add (argv, "-");
-
- for (r = 0; r < recipient_list->len; r++)
- g_ptr_array_add (argv, recipient_list->pdata[r]);
-
- if (sign) {
- g_ptr_array_add (argv, "-s");
-
- g_ptr_array_add (argv, "-u");
- g_ptr_array_add (argv, (gchar *) userid);
-
- sprintf (passwd_fd, "PGPPASSFD=%d", passwd_fds[0]);
- putenv (passwd_fd);
- }
- break;
- default:
- g_assert_not_reached ();
- break;
- }
-
- g_ptr_array_add (argv, NULL);
-
- retval = crypto_exec_with_passwd (context->priv->path,
- (char **) argv->pdata,
- plaintext->data, plaintext->len,
- passwd_fds, passphrase,
- &ciphertext, NULL,
- &diagnostics);
-
- g_byte_array_free (plaintext, TRUE);
-
- /* free the temp recipient list */
- if (recipient_list) {
- for (r = 0; r < recipient_list->len; r++)
- g_free (recipient_list->pdata[r]);
- g_ptr_array_free (recipient_list, TRUE);
- }
-
- g_free (passphrase);
- g_ptr_array_free (argv, TRUE);
-
- if (retval != 0 || !*ciphertext) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- "%s", diagnostics);
- g_free (diagnostics);
- g_free (ciphertext);
- if (sign)
- pgp_forget_passphrase (ctx->session, context->priv->type,
- (char *) userid);
-
- return -1;
- }
-
- g_free (diagnostics);
-
- camel_stream_write (ostream, ciphertext, strlen (ciphertext));
- g_free (ciphertext);
-
- return 0;
-
- exception:
-
- g_byte_array_free (plaintext, TRUE);
-
- if (sign) {
- g_free (passphrase);
- pgp_forget_passphrase (ctx->session, context->priv->type, (char *) userid);
- }
-
- return -1;
-}
-
-
-static int
-pgp_decrypt (CamelCipherContext *ctx, CamelStream *istream,
- CamelStream *ostream, CamelException *ex)
-{
- CamelPgpContext *context = CAMEL_PGP_CONTEXT (ctx);
- GByteArray *ciphertext;
- CamelStream *stream;
- char *argv[15];
- char *plaintext = NULL;
- int plainlen;
- char *diagnostics = NULL;
- char *passphrase = NULL;
- int passwd_fds[2];
- char passwd_fd[32];
- int retval, i;
-
- ctx = CAMEL_CIPHER_CONTEXT (context);
-
- /* get the ciphertext in a form we can use */
- ciphertext = g_byte_array_new ();
- stream = camel_stream_mem_new ();
- camel_stream_mem_set_byte_array (CAMEL_STREAM_MEM (stream), ciphertext);
- camel_stream_write_to_stream (istream, stream);
- camel_object_unref (CAMEL_OBJECT (stream));
-
- if (!ciphertext->len) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("No ciphertext to decrypt."));
-
- goto exception;
- }
-
- passphrase = pgp_get_passphrase (ctx->session, context->priv->type, NULL);
- if (!passphrase) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("No password provided."));
-
- goto exception;
- }
-
- if (pipe (passwd_fds) < 0) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Couldn't create pipe to GPG/PGP: %s"),
- g_strerror (errno));
-
- goto exception;
- }
-
- i = 0;
- switch (context->priv->type) {
- case CAMEL_PGP_TYPE_GPG:
- argv[i++] = "gpg";
- argv[i++] = "--verbose";
- argv[i++] = "--yes";
- argv[i++] = "--batch";
-
- argv[i++] = "--output";
- argv[i++] = "-"; /* output to stdout */
-
- argv[i++] = "--decrypt";
-
- argv[i++] = "--passphrase-fd";
- sprintf (passwd_fd, "%d", passwd_fds[0]);
- argv[i++] = passwd_fd;
- break;
- case CAMEL_PGP_TYPE_PGP5:
- argv[i++] = "pgpv";
- argv[i++] = "-f";
- argv[i++] = "+batchmode=1";
-
- sprintf (passwd_fd, "PGPPASSFD=%d", passwd_fds[0]);
- putenv (passwd_fd);
- break;
- case CAMEL_PGP_TYPE_PGP2:
- case CAMEL_PGP_TYPE_PGP6:
- argv[i++] = "pgp";
- argv[i++] = "-f";
-
- sprintf (passwd_fd, "PGPPASSFD=%d", passwd_fds[0]);
- putenv (passwd_fd);
- break;
- default:
- g_assert_not_reached ();
- break;
- }
-
- argv[i++] = NULL;
-
- retval = crypto_exec_with_passwd (context->priv->path, argv,
- ciphertext->data, ciphertext->len,
- passwd_fds, passphrase,
- &plaintext, &plainlen,
- &diagnostics);
-
- g_byte_array_free (ciphertext, TRUE);
- g_free (passphrase);
-
- if (retval != 0 || !*plaintext) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- "%s", diagnostics);
- g_free (plaintext);
- g_free (diagnostics);
-
- pgp_forget_passphrase (ctx->session, context->priv->type, NULL);
-
- return -1;
- }
-
- g_free (diagnostics);
-
- camel_stream_write (ostream, plaintext, plainlen);
- g_free (plaintext);
-
- return 0;
-
- exception:
-
- g_byte_array_free (ciphertext, TRUE);
-
- if (passphrase) {
- pgp_forget_passphrase (ctx->session, context->priv->type, NULL);
- g_free (passphrase);
- }
-
- return -1;
-}
diff --git a/camel/camel-pgp-context.h b/camel/camel-pgp-context.h
deleted file mode 100644
index 0f4f705d64..0000000000
--- a/camel/camel-pgp-context.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2001 Ximian, Inc. (www.ximian.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.
- *
- */
-
-#ifndef CAMEL_PGP_CONTEXT_H
-#define CAMEL_PGP_CONTEXT_H
-
-#include <camel/camel-session.h>
-#include <camel/camel-stream.h>
-#include <camel/camel-exception.h>
-#include <camel/camel-cipher-context.h>
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#define CAMEL_PGP_CONTEXT_TYPE (camel_pgp_context_get_type ())
-#define CAMEL_PGP_CONTEXT(obj) (CAMEL_CHECK_CAST((obj), CAMEL_PGP_CONTEXT_TYPE, CamelPgpContext))
-#define CAMEL_PGP_CONTEXT_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_PGP_CONTEXT_TYPE, CamelPgpContextClass))
-#define CAMEL_IS_PGP_CONTEXT(o) (CAMEL_CHECK_TYPE((o), CAMEL_PGP_CONTEXT_TYPE))
-
-typedef enum {
- CAMEL_PGP_TYPE_NONE,
- CAMEL_PGP_TYPE_PGP2,
- CAMEL_PGP_TYPE_PGP5,
- CAMEL_PGP_TYPE_PGP6,
- CAMEL_PGP_TYPE_GPG
-} CamelPgpType;
-
-typedef struct _CamelPgpContext {
- CamelCipherContext parent_object;
-
- struct _CamelPgpContextPrivate *priv;
-
-} CamelPgpContext;
-
-typedef struct _CamelPgpContextClass {
- CamelCipherContextClass parent_class;
-
-} CamelPgpContextClass;
-
-CamelType camel_pgp_context_get_type (void);
-
-CamelPgpContext *camel_pgp_context_new (CamelSession *session, CamelPgpType type, const char *path);
-
-/* PGP routines */
-#define camel_pgp_sign(c, u, h, i, o, e) camel_cipher_sign (CAMEL_CIPHER_CONTEXT (c), u, h, i, o, e)
-
-#define camel_pgp_clearsign(c, u, h, i, o, e) camel_cipher_clearsign (CAMEL_CIPHER_CONTEXT (c), u, h, i, o, e)
-
-#define camel_pgp_verify(c, i, s, e) camel_cipher_verify (CAMEL_CIPHER_CONTEXT (c), i, s, e)
-
-#define camel_pgp_encrypt(c, s, u, r, i, o, e) camel_cipher_encrypt (CAMEL_CIPHER_CONTEXT (c), s, u, r, i, o, e)
-
-#define camel_pgp_decrypt(c, i, o, e) camel_cipher_decrypt (CAMEL_CIPHER_CONTEXT (c), i, o, e)
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_PGP_CONTEXT_H */
diff --git a/camel/camel-pgp-mime.c b/camel/camel-pgp-mime.c
deleted file mode 100644
index a9eef4e7cc..0000000000
--- a/camel/camel-pgp-mime.c
+++ /dev/null
@@ -1,514 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2001 Ximian, Inc. (www.ximian.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.
- *
- */
-
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "camel-pgp-mime.h"
-#include "camel-mime-filter-from.h"
-#include "camel-mime-filter-crlf.h"
-#include "camel-stream-filter.h"
-#include "camel-stream-mem.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#define d(x) x
-
-/** rfc2015 stuff (aka PGP/MIME) *******************************/
-
-gboolean
-camel_pgp_mime_is_rfc2015_signed (CamelMimePart *mime_part)
-{
- CamelDataWrapper *wrapper;
- CamelMultipart *mp;
- CamelMimePart *part;
- CamelContentType *type;
- const gchar *param, *micalg;
- int nparts;
-
- /* check that we have a multipart/signed */
- type = camel_mime_part_get_content_type (mime_part);
- if (!header_content_type_is (type, "multipart", "signed"))
- return FALSE;
-
- /* check that we have a protocol param with the value: "application/pgp-signed" */
- param = header_content_type_param (type, "protocol");
- if (!param || g_strcasecmp (param, "application/pgp-signature"))
- return FALSE;
-
- /* check that we have a micalg parameter */
- micalg = header_content_type_param (type, "micalg");
- if (!micalg)
- return FALSE;
-
- /* check that we have exactly 2 subparts */
- wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part));
- mp = CAMEL_MULTIPART (wrapper);
- nparts = camel_multipart_get_number (mp);
- if (nparts != 2)
- return FALSE;
-
- /* The first part may be of any type except for
- * application/pgp-signature - check it. */
- part = camel_multipart_get_part (mp, 0);
- type = camel_mime_part_get_content_type (part);
- if (header_content_type_is (type, "application", "pgp-signature"))
- return FALSE;
-
- /* The second part should be application/pgp-signature. */
- part = camel_multipart_get_part (mp, 1);
- type = camel_mime_part_get_content_type (part);
- if (!header_content_type_is (type, "application", "pgp-signature"))
- return FALSE;
-
- return TRUE;
-}
-
-gboolean
-camel_pgp_mime_is_rfc2015_encrypted (CamelMimePart *mime_part)
-{
- CamelDataWrapper *wrapper;
- CamelMultipart *mp;
- CamelMimePart *part;
- CamelContentType *type;
- const gchar *param;
- int nparts;
-
- /* check that we have a multipart/encrypted */
- type = camel_mime_part_get_content_type (mime_part);
- if (!header_content_type_is (type, "multipart", "encrypted"))
- return FALSE;
-
- /* check that we have a protocol param with the value: "application/pgp-encrypted" */
- param = header_content_type_param (type, "protocol");
- if (!param || g_strcasecmp (param, "application/pgp-encrypted"))
- return FALSE;
-
- /* check that we have at least 2 subparts */
- wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part));
- mp = CAMEL_MULTIPART (wrapper);
- nparts = camel_multipart_get_number (mp);
- if (nparts < 2)
- return FALSE;
-
- /* The first part should be application/pgp-encrypted */
- part = camel_multipart_get_part (mp, 0);
- type = camel_mime_part_get_content_type (part);
- if (!header_content_type_is (type, "application", "pgp-encrypted"))
- return FALSE;
-
- /* The second part should be application/octet-stream - this
- is the one we care most about */
- part = camel_multipart_get_part (mp, 1);
- type = camel_mime_part_get_content_type (part);
- if (!header_content_type_is (type, "application", "octet-stream"))
- return FALSE;
-
- return TRUE;
-}
-
-
-static void
-pgp_mime_part_sign_restore_part (CamelMimePart *mime_part, GSList *encodings)
-{
- CamelDataWrapper *wrapper;
-
- wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part));
- if (!wrapper)
- return;
-
- if (CAMEL_IS_MULTIPART (wrapper)) {
- int parts, i;
-
- parts = camel_multipart_get_number (CAMEL_MULTIPART (wrapper));
- for (i = 0; i < parts; i++) {
- CamelMimePart *part = camel_multipart_get_part (CAMEL_MULTIPART (wrapper), i);
-
- pgp_mime_part_sign_restore_part (part, encodings);
- encodings = encodings->next;
- }
- } else {
- CamelMimePartEncodingType encoding;
-
- encoding = GPOINTER_TO_INT (encodings->data);
-
- camel_mime_part_set_encoding (mime_part, encoding);
- }
-}
-
-static void
-pgp_mime_part_sign_prepare_part (CamelMimePart *mime_part, GSList **encodings)
-{
- CamelDataWrapper *wrapper;
- int parts, i;
-
- wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part));
- if (!wrapper)
- return;
-
- if (CAMEL_IS_MULTIPART (wrapper)) {
- parts = camel_multipart_get_number (CAMEL_MULTIPART (wrapper));
- for (i = 0; i < parts; i++) {
- CamelMimePart *part = camel_multipart_get_part (CAMEL_MULTIPART (wrapper), i);
-
- pgp_mime_part_sign_prepare_part (part, encodings);
- }
- } else {
- CamelMimePartEncodingType encoding;
-
- encoding = camel_mime_part_get_encoding (mime_part);
-
- /* FIXME: find the best encoding for this part and use that instead?? */
- /* the encoding should really be QP or Base64 */
- if (encoding != CAMEL_MIME_PART_ENCODING_BASE64)
- camel_mime_part_set_encoding (mime_part, CAMEL_MIME_PART_ENCODING_QUOTEDPRINTABLE);
-
- *encodings = g_slist_append (*encodings, GINT_TO_POINTER (encoding));
- }
-}
-
-
-/**
- * camel_pgp_mime_part_sign:
- * @context: PGP Context
- * @mime_part: a MIME part that will be replaced by a pgp signed part
- * @userid: userid to sign with
- * @hash: one of CAMEL_PGP_HASH_TYPE_MD5 or CAMEL_PGP_HASH_TYPE_SHA1
- * @ex: exception which will be set if there are any errors.
- *
- * Constructs a PGP/MIME multipart in compliance with rfc2015 and
- * replaces @part with the generated multipart/signed. On failure,
- * @ex will be set and #part will remain untouched.
- **/
-void
-camel_pgp_mime_part_sign (CamelPgpContext *context, CamelMimePart **mime_part, const char *userid,
- CamelCipherHash hash, CamelException *ex)
-{
- CamelMimePart *part, *signed_part;
- CamelMultipart *multipart;
- CamelContentType *mime_type;
- CamelStreamFilter *filtered_stream;
- CamelMimeFilter *crlf_filter, *from_filter;
- CamelStream *stream, *sigstream;
- gchar *hash_type = NULL;
- GSList *encodings = NULL;
-
- g_return_if_fail (*mime_part != NULL);
- g_return_if_fail (CAMEL_IS_MIME_PART (*mime_part));
- g_return_if_fail (userid != NULL);
-
- part = *mime_part;
-
- /* Prepare all the parts for signing... */
- pgp_mime_part_sign_prepare_part (part, &encodings);
-
- /* get the cleartext */
- stream = camel_stream_mem_new ();
- crlf_filter = camel_mime_filter_crlf_new (CAMEL_MIME_FILTER_CRLF_ENCODE,
- CAMEL_MIME_FILTER_CRLF_MODE_CRLF_ONLY);
- from_filter = CAMEL_MIME_FILTER (camel_mime_filter_from_new ());
- filtered_stream = camel_stream_filter_new_with_stream (stream);
- camel_stream_filter_add (filtered_stream, CAMEL_MIME_FILTER (crlf_filter));
- camel_object_unref (CAMEL_OBJECT (crlf_filter));
- camel_stream_filter_add (filtered_stream, CAMEL_MIME_FILTER (from_filter));
- camel_object_unref (CAMEL_OBJECT (from_filter));
- camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (part), CAMEL_STREAM (filtered_stream));
- camel_object_unref (CAMEL_OBJECT (filtered_stream));
-
- /* reset the stream */
- camel_stream_reset (stream);
-
- /* construct the signature stream */
- sigstream = camel_stream_mem_new ();
-
- /* get the signature */
- if (camel_pgp_sign (context, userid, hash, stream, sigstream, ex) == -1) {
- camel_object_unref (CAMEL_OBJECT (stream));
- camel_object_unref (CAMEL_OBJECT (sigstream));
-
- /* restore the original encoding */
- pgp_mime_part_sign_restore_part (part, encodings);
- g_slist_free (encodings);
- return;
- }
-
- camel_object_unref (CAMEL_OBJECT (stream));
- camel_stream_reset (sigstream);
-
- /* we don't need these anymore... */
- g_slist_free (encodings);
-
- /* construct the pgp-signature mime part */
- signed_part = camel_mime_part_new ();
- camel_mime_part_set_content (signed_part, CAMEL_STREAM_MEM (sigstream)->buffer->data,
- CAMEL_STREAM_MEM (sigstream)->buffer->len,
- "application/pgp-signature");
- camel_object_unref (CAMEL_OBJECT (sigstream));
-
- /* construct the container multipart/signed */
- switch (hash) {
- case CAMEL_CIPHER_HASH_MD5:
- hash_type = "pgp-md5";
- break;
- case CAMEL_CIPHER_HASH_SHA1:
- hash_type = "pgp-sha1";
- break;
- default:
- /* set a reasonable default */
- hash = CAMEL_CIPHER_HASH_SHA1;
- hash_type = "pgp-sha1";
- break;
- }
-
- multipart = camel_multipart_new ();
-
- mime_type = header_content_type_new ("multipart", "signed");
- header_content_type_set_param (mime_type, "micalg", hash_type);
- header_content_type_set_param (mime_type, "protocol", "application/pgp-signature");
- camel_data_wrapper_set_mime_type_field (CAMEL_DATA_WRAPPER (multipart), mime_type);
- header_content_type_unref (mime_type);
-
- camel_multipart_set_boundary (multipart, NULL);
-
- /* add the parts to the multipart */
- camel_multipart_add_part (multipart, part);
- camel_object_unref (CAMEL_OBJECT (part));
- camel_multipart_add_part (multipart, signed_part);
- camel_object_unref (CAMEL_OBJECT (signed_part));
-
- /* replace the input part with the output part */
- *mime_part = camel_mime_part_new ();
- camel_medium_set_content_object (CAMEL_MEDIUM (*mime_part),
- CAMEL_DATA_WRAPPER (multipart));
- camel_object_unref (CAMEL_OBJECT (multipart));
-}
-
-
-/**
- * camel_pgp_mime_part_verify:
- * @context: PGP Context
- * @mime_part: a multipart/signed MIME Part
- * @ex: exception
- *
- * Returns a CamelCipherValidity on success or NULL on fail.
- **/
-CamelCipherValidity *
-camel_pgp_mime_part_verify (CamelPgpContext *context, CamelMimePart *mime_part, CamelException *ex)
-{
- CamelDataWrapper *wrapper;
- CamelMultipart *multipart;
- CamelMimePart *part, *sigpart;
- CamelStreamFilter *filtered_stream;
- CamelMimeFilter *crlf_filter, *from_filter;
- CamelStream *stream, *sigstream;
- CamelCipherValidity *valid;
-
- g_return_val_if_fail (mime_part != NULL, NULL);
- g_return_val_if_fail (CAMEL_IS_MIME_PART (mime_part), NULL);
-
- if (!camel_pgp_mime_is_rfc2015_signed (mime_part))
- return NULL;
-
- wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part));
- multipart = CAMEL_MULTIPART (wrapper);
-
- /* get the plain part */
- part = camel_multipart_get_part (multipart, 0);
- stream = camel_stream_mem_new ();
- crlf_filter = camel_mime_filter_crlf_new (CAMEL_MIME_FILTER_CRLF_ENCODE,
- CAMEL_MIME_FILTER_CRLF_MODE_CRLF_ONLY);
- from_filter = CAMEL_MIME_FILTER (camel_mime_filter_from_new ());
- filtered_stream = camel_stream_filter_new_with_stream (stream);
- camel_stream_filter_add (filtered_stream, CAMEL_MIME_FILTER (crlf_filter));
- camel_object_unref (CAMEL_OBJECT (crlf_filter));
- camel_stream_filter_add (filtered_stream, CAMEL_MIME_FILTER (from_filter));
- camel_object_unref (CAMEL_OBJECT (from_filter));
- camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (part), CAMEL_STREAM (filtered_stream));
- camel_object_unref (CAMEL_OBJECT (filtered_stream));
- camel_stream_reset (stream);
-
- /* get the signed part */
- sigpart = camel_multipart_get_part (multipart, 1);
- sigstream = camel_stream_mem_new ();
- camel_data_wrapper_write_to_stream (camel_medium_get_content_object (CAMEL_MEDIUM (sigpart)),
- sigstream);
- camel_stream_reset (sigstream);
-
- /* verify */
- valid = camel_pgp_verify (context, stream, sigstream, ex);
-
- camel_object_unref (CAMEL_OBJECT (sigstream));
- camel_object_unref (CAMEL_OBJECT (stream));
-
- return valid;
-}
-
-
-/**
- * camel_pgp_mime_part_encrypt:
- * @context: PGP Context
- * @mime_part: a MIME part that will be replaced by a pgp encrypted part
- * @recipients: list of recipient PGP Key IDs
- * @ex: exception which will be set if there are any errors.
- *
- * Constructs a PGP/MIME multipart in compliance with rfc2015 and
- * replaces #mime_part with the generated multipart/signed. On failure,
- * #ex will be set and #part will remain untouched.
- **/
-void
-camel_pgp_mime_part_encrypt (CamelPgpContext *context, CamelMimePart **mime_part,
- GPtrArray *recipients, CamelException *ex)
-{
- CamelMultipart *multipart;
- CamelMimePart *part, *version_part, *encrypted_part;
- CamelContentType *mime_type;
- CamelStreamFilter *filtered_stream;
- CamelMimeFilter *crlf_filter;
- CamelStream *stream, *ciphertext;
-
- g_return_if_fail (*mime_part != NULL);
- g_return_if_fail (CAMEL_IS_MIME_PART (*mime_part));
- g_return_if_fail (recipients != NULL);
-
- part = *mime_part;
-
- /* get the contents */
- stream = camel_stream_mem_new ();
- crlf_filter = camel_mime_filter_crlf_new (CAMEL_MIME_FILTER_CRLF_ENCODE,
- CAMEL_MIME_FILTER_CRLF_MODE_CRLF_ONLY);
- filtered_stream = camel_stream_filter_new_with_stream (stream);
- camel_stream_filter_add (filtered_stream, CAMEL_MIME_FILTER (crlf_filter));
- camel_object_unref (CAMEL_OBJECT (crlf_filter));
- camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (part), CAMEL_STREAM (filtered_stream));
- camel_object_unref (CAMEL_OBJECT (filtered_stream));
- camel_stream_reset (stream);
-
- /* pgp encrypt */
- ciphertext = camel_stream_mem_new ();
- if (camel_pgp_encrypt (context, FALSE, NULL, recipients, stream, ciphertext, ex) == -1) {
- camel_object_unref (CAMEL_OBJECT (stream));
- camel_object_unref (CAMEL_OBJECT (ciphertext));
- return;
- }
-
- camel_object_unref (CAMEL_OBJECT (stream));
- camel_stream_reset (ciphertext);
-
- /* construct the version part */
- version_part = camel_mime_part_new ();
- camel_mime_part_set_encoding (version_part, CAMEL_MIME_PART_ENCODING_7BIT);
- camel_mime_part_set_content (version_part, "Version: 1", strlen ("Version: 1"),
- "application/pgp-encrypted");
-
- /* construct the pgp-encrypted mime part */
- encrypted_part = camel_mime_part_new ();
- camel_mime_part_set_content (encrypted_part, CAMEL_STREAM_MEM (ciphertext)->buffer->data,
- CAMEL_STREAM_MEM (ciphertext)->buffer->len,
- "application/octet-stream");
- camel_object_unref (CAMEL_OBJECT (ciphertext));
- camel_mime_part_set_encoding (encrypted_part, CAMEL_MIME_PART_ENCODING_7BIT);
-
- /* construct the container multipart/encrypted */
- multipart = camel_multipart_new ();
-
- mime_type = header_content_type_new ("multipart", "encrypted");
- header_content_type_set_param (mime_type, "protocol", "application/pgp-encrypted");
- camel_data_wrapper_set_mime_type_field (CAMEL_DATA_WRAPPER (multipart), mime_type);
- header_content_type_unref (mime_type);
-
- camel_multipart_set_boundary (multipart, NULL);
-
- /* add the parts to the multipart */
- camel_multipart_add_part (multipart, version_part);
- camel_object_unref (CAMEL_OBJECT (version_part));
- camel_multipart_add_part (multipart, encrypted_part);
- camel_object_unref (CAMEL_OBJECT (encrypted_part));
-
- /* replace the input part with the output part */
- camel_object_unref (CAMEL_OBJECT (*mime_part));
- *mime_part = camel_mime_part_new ();
- camel_medium_set_content_object (CAMEL_MEDIUM (*mime_part),
- CAMEL_DATA_WRAPPER (multipart));
- camel_object_unref (CAMEL_OBJECT (multipart));
-}
-
-
-/**
- * camel_pgp_mime_part_decrypt:
- * @context: PGP Context
- * @mime_part: a multipart/encrypted MIME Part
- * @ex: exception
- *
- * Returns the decrypted MIME Part on success or NULL on fail.
- **/
-CamelMimePart *
-camel_pgp_mime_part_decrypt (CamelPgpContext *context, CamelMimePart *mime_part, CamelException *ex)
-{
- CamelDataWrapper *wrapper;
- CamelMultipart *multipart;
- CamelMimePart *encrypted_part, *part;
- CamelContentType *mime_type;
- CamelStream *stream, *ciphertext;
-
- g_return_val_if_fail (mime_part != NULL, NULL);
- g_return_val_if_fail (CAMEL_IS_MIME_PART (mime_part), NULL);
-
- /* make sure the mime part is a multipart/encrypted */
- if (!camel_pgp_mime_is_rfc2015_encrypted (mime_part))
- return NULL;
-
- wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part));
- multipart = CAMEL_MULTIPART (wrapper);
-
- /* get the encrypted part (second part) */
- encrypted_part = camel_multipart_get_part (multipart, 1 /* second part starting at 0 */);
- mime_type = camel_mime_part_get_content_type (encrypted_part);
- if (!header_content_type_is (mime_type, "application", "octet-stream"))
- return NULL;
-
- /* get the ciphertext */
- ciphertext = camel_stream_mem_new ();
- camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (encrypted_part), ciphertext);
- camel_stream_reset (ciphertext);
-
- /* get the cleartext */
- stream = camel_stream_mem_new ();
- if (camel_pgp_decrypt (context, ciphertext, stream, ex) == -1) {
- camel_object_unref (CAMEL_OBJECT (ciphertext));
- camel_object_unref (CAMEL_OBJECT (stream));
- return NULL;
- }
-
- camel_object_unref (CAMEL_OBJECT (ciphertext));
- camel_stream_reset (stream);
-
- /* construct the new decrypted mime part from the stream */
- part = camel_mime_part_new ();
- camel_data_wrapper_construct_from_stream (CAMEL_DATA_WRAPPER (part), stream);
- camel_object_unref (CAMEL_OBJECT (stream));
-
- return part;
-}
diff --git a/camel/camel-pgp-mime.h b/camel/camel-pgp-mime.h
deleted file mode 100644
index e9c15e3489..0000000000
--- a/camel/camel-pgp-mime.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2001 Ximain, Inc. (www.ximian.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.
- *
- */
-
-
-#ifndef CAMEL_PGP_MIME_H
-#define CAMEL_PGP_MIME_H
-
-#include <glib.h>
-#include <camel/camel-multipart.h>
-#include <camel/camel-mime-part.h>
-#include <camel/camel-pgp-context.h>
-#include <camel/camel-exception.h>
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-gboolean camel_pgp_mime_is_rfc2015_signed (CamelMimePart *part);
-gboolean camel_pgp_mime_is_rfc2015_encrypted (CamelMimePart *part);
-
-void camel_pgp_mime_part_sign (CamelPgpContext *context,
- CamelMimePart **mime_part,
- const char *userid,
- CamelCipherHash hash,
- CamelException *ex);
-
-CamelCipherValidity *camel_pgp_mime_part_verify (CamelPgpContext *context,
- CamelMimePart *mime_part,
- CamelException *ex);
-
-void camel_pgp_mime_part_encrypt (CamelPgpContext *context,
- CamelMimePart **mime_part,
- GPtrArray *recipients,
- CamelException *ex);
-
-CamelMimePart *camel_pgp_mime_part_decrypt (CamelPgpContext *context,
- CamelMimePart *mime_part,
- CamelException *ex);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* ! CAMEL_PGP_MIME_H */
diff --git a/camel/camel-private.h b/camel/camel-private.h
deleted file mode 100644
index 0a84d99a55..0000000000
--- a/camel/camel-private.h
+++ /dev/null
@@ -1,181 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- * camel-private.h: Private info for class implementers.
- *
- * Authors: Michael Zucchi <notzed@helixcode.com>
- *
- * 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_PRIVATE_H
-#define CAMEL_PRIVATE_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-/* need a way to configure and save this data, if this header is to
- be installed. For now, dont install it */
-
-#include "config.h"
-
-#ifdef ENABLE_THREADS
-#include <pthread.h>
-#include <e-util/e-msgport.h>
-#endif
-
-struct _CamelFolderPrivate {
-#ifdef ENABLE_THREADS
- GMutex *lock;
- GMutex *change_lock;
-#endif
-
- /* must require the 'change_lock' to access this */
- int frozen;
- struct _CamelFolderChangeInfo *changed_frozen; /* queues changed events */
-};
-
-#ifdef ENABLE_THREADS
-#define CAMEL_FOLDER_LOCK(f, l) (g_mutex_lock(((CamelFolder *)f)->priv->l))
-#define CAMEL_FOLDER_UNLOCK(f, l) (g_mutex_unlock(((CamelFolder *)f)->priv->l))
-#else
-#define CAMEL_FOLDER_LOCK(f, l)
-#define CAMEL_FOLDER_UNLOCK(f, l)
-#endif
-
-struct _CamelStorePrivate {
-#ifdef ENABLE_THREADS
- GMutex *folder_lock; /* for locking folder operations */
- GMutex *cache_lock; /* for locking access to the cache */
-#endif
-};
-
-#ifdef ENABLE_THREADS
-#define CAMEL_STORE_LOCK(f, l) (g_mutex_lock(((CamelStore *)f)->priv->l))
-#define CAMEL_STORE_UNLOCK(f, l) (g_mutex_unlock(((CamelStore *)f)->priv->l))
-#else
-#define CAMEL_STORE_LOCK(f, l)
-#define CAMEL_STORE_UNLOCK(f, l)
-#endif
-
-struct _CamelServicePrivate {
-#ifdef ENABLE_THREADS
- EMutex *connect_lock; /* for locking connection operations */
-#endif
-};
-
-#ifdef ENABLE_THREADS
-#define CAMEL_SERVICE_LOCK(f, l) (e_mutex_lock(((CamelService *)f)->priv->l))
-#define CAMEL_SERVICE_UNLOCK(f, l) (e_mutex_unlock(((CamelService *)f)->priv->l))
-#else
-#define CAMEL_SERVICE_LOCK(f, l)
-#define CAMEL_SERVICE_UNLOCK(f, l)
-#endif
-
-struct _CamelSessionPrivate {
-#ifdef ENABLE_THREADS
- GMutex *lock; /* for locking everything basically */
-#endif
-};
-
-#ifdef ENABLE_THREADS
-#define CAMEL_SESSION_LOCK(f, l) (g_mutex_lock(((CamelSession *)f)->priv->l))
-#define CAMEL_SESSION_UNLOCK(f, l) (g_mutex_unlock(((CamelSession *)f)->priv->l))
-#else
-#define CAMEL_SESSION_LOCK(f, l)
-#define CAMEL_SESSION_UNLOCK(f, l)
-#endif
-
-
-struct _CamelRemoteStorePrivate {
-#ifdef ENABLE_THREADS
- EMutex *stream_lock; /* for locking stream operations */
-#endif
-};
-
-#ifdef ENABLE_THREADS
-#define CAMEL_REMOTE_STORE_LOCK(f, l) (e_mutex_lock(((CamelRemoteStore *)f)->priv->l))
-#define CAMEL_REMOTE_STORE_UNLOCK(f, l) (e_mutex_unlock(((CamelRemoteStore *)f)->priv->l))
-#else
-#define CAMEL_REMOTE_STORE_LOCK(f, l)
-#define CAMEL_REMOTE_STORE_UNLOCK(f, l)
-#endif
-
-/* most of this stuff really is private, but the lock can be used by subordinate classes */
-struct _CamelFolderSummaryPrivate {
- GHashTable *filter_charset; /* CamelMimeFilterCharset's indexed by source charset */
-
- struct _CamelMimeFilterIndex *filter_index;
- struct _CamelMimeFilterBasic *filter_64;
- struct _CamelMimeFilterBasic *filter_qp;
- struct _CamelMimeFilterSave *filter_save;
- struct _CamelMimeFilterHTML *filter_html;
-
- struct ibex *index;
-
-#ifdef ENABLE_THREADS
- GMutex *summary_lock; /* for the summary hashtable/array */
- GMutex *io_lock; /* load/save lock, for access to saved_count, etc */
- GMutex *filter_lock; /* for accessing any of the filtering/indexing stuff, since we share them */
- GMutex *alloc_lock; /* for setting up and using allocators */
- GMutex *ref_lock; /* for reffing/unreffing messageinfo's ALWAYS obtain before summary_lock */
-#endif
-};
-
-#ifdef ENABLE_THREADS
-#define CAMEL_SUMMARY_LOCK(f, l) (g_mutex_lock(((CamelFolderSummary *)f)->priv->l))
-#define CAMEL_SUMMARY_UNLOCK(f, l) (g_mutex_unlock(((CamelFolderSummary *)f)->priv->l))
-#else
-#define CAMEL_SUMMARY_LOCK(f, l)
-#define CAMEL_SUMMARY_UNLOCK(f, l)
-#endif
-
-struct _CamelVeeStorePrivate {
-};
-
-#ifdef ENABLE_THREADS
-#define CAMEL_VEE_STORE_LOCK(f, l) (e_mutex_lock(((CamelVeeStore *)f)->priv->l))
-#define CAMEL_VEE_STORE_UNLOCK(f, l) (e_mutex_unlock(((CamelVeeStore *)f)->priv->l))
-#else
-#define CAMEL_VEE_STORE_LOCK(f, l)
-#define CAMEL_VEE_STORE_UNLOCK(f, l)
-#endif
-
-struct _CamelVeeFolderPrivate {
- GList *folders; /* lock using subfolder_lock before changing/accessing */
-
-#ifdef ENABLE_THREADS
- GMutex *summary_lock; /* for locking vfolder summary */
- GMutex *subfolder_lock; /* for locking the subfolder list */
-#endif
-};
-
-#ifdef ENABLE_THREADS
-#define CAMEL_VEE_FOLDER_LOCK(f, l) (g_mutex_lock(((CamelVeeFolder *)f)->priv->l))
-#define CAMEL_VEE_FOLDER_UNLOCK(f, l) (g_mutex_unlock(((CamelVeeFolder *)f)->priv->l))
-#else
-#define CAMEL_VEE_FOLDER_LOCK(f, l)
-#define CAMEL_VEE_FOLDER_UNLOCK(f, l)
-#endif
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_H */
-
diff --git a/camel/camel-provider.c b/camel/camel-provider.c
deleted file mode 100644
index ba1dfd5b48..0000000000
--- a/camel/camel-provider.c
+++ /dev/null
@@ -1,155 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-provider.c: provider framework */
-
-/*
- *
- * Authors:
- * Bertrand Guiheneuf <bertrand@helixcode.com>
- * Dan Winship <danw@helixcode.com>
- * Jeffrey Stedfast <fejj@helixcode.com>
- *
- * 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 ? */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <dirent.h>
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-
-#include <gmodule.h>
-
-#include "camel-provider.h"
-#include "camel-exception.h"
-#include "hash-table-utils.h"
-
-/**
- * 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];
-
- 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))) {
- FILE *fp;
-
- p = strchr (d->d_name, '.');
- if (!p || strcmp (p, ".urls") != 0)
- continue;
-
- name = g_strdup_printf ("%s/%s", CAMEL_PROVIDERDIR, d->d_name);
- fp = fopen (name, "r");
- if (!fp) {
- 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), fp))) {
- buf[sizeof (buf) - 1] = '\0';
- p = strchr (buf, '\n');
- if (p)
- *p = '\0';
-
- if (*buf)
- g_hash_table_insert (providers, g_strdup (buf), g_strdup (name));
- }
-
- g_free (name);
- fclose (fp);
- }
-
- 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 "
- "code 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 e8bad9618d..0000000000
--- a/camel/camel-provider.h
+++ /dev/null
@@ -1,161 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-provider.h : provider definition */
-
-/*
- *
- * Authors:
- * Bertrand Guiheneuf <bertrand@helixcode.com>
- * Jeffrey Stedfast <fejj@helixcode.com>
- *
- * 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 <camel/camel-types.h>
-#include <camel/camel-object.h>
-
-#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];
-
-/* _IS_SOURCE means the user can get mail from there.
- * _IS_STORAGE means the user can read mail from there.
- */
-#define CAMEL_PROVIDER_IS_REMOTE (1 << 0)
-#define CAMEL_PROVIDER_IS_SOURCE (1 << 1)
-#define CAMEL_PROVIDER_IS_STORAGE (1 << 2)
-#define CAMEL_PROVIDER_SUPPORTS_SSL (1 << 3)
-
-
-/* Flags for url_flags. "ALLOW" means the config dialog will let
- * the user configure it. "NEED" implies "ALLOW" but means the user
- * must configure it. Service code can assume that any url part
- * for which it has set the NEED flag will be set when the service
- * is created.
- */
-#define CAMEL_URL_PART_USER (1 << 0)
-#define CAMEL_URL_PART_AUTH (1 << 1)
-#define CAMEL_URL_PART_PASSWORD (1 << 2)
-#define CAMEL_URL_PART_HOST (1 << 3)
-#define CAMEL_URL_PART_PORT (1 << 4)
-#define CAMEL_URL_PART_PATH (1 << 5)
-
-#define CAMEL_URL_PART_NEED 6
-
-/* Use these macros to test a provider's url_flags */
-#define CAMEL_PROVIDER_ALLOWS(prov, flags) (prov->url_flags & (flags | (flags << CAMEL_URL_PART_NEED)))
-#define CAMEL_PROVIDER_NEEDS(prov, flags) (prov->url_flags & (flags << CAMEL_URL_PART_NEED))
-
-/* Providers use these macros to actually define their url_flags */
-#define CAMEL_URL_ALLOW_USER (CAMEL_URL_PART_USER)
-#define CAMEL_URL_ALLOW_AUTH (CAMEL_URL_PART_AUTH)
-#define CAMEL_URL_ALLOW_PASSWORD (CAMEL_URL_PART_PASSWORD)
-#define CAMEL_URL_ALLOW_HOST (CAMEL_URL_PART_HOST)
-#define CAMEL_URL_ALLOW_PORT (CAMEL_URL_PART_PORT)
-#define CAMEL_URL_ALLOW_PATH (CAMEL_URL_PART_PATH)
-
-#define CAMEL_URL_NEED_USER (CAMEL_URL_PART_USER << CAMEL_URL_PART_NEED)
-#define CAMEL_URL_NEED_AUTH (CAMEL_URL_PART_AUTH << CAMEL_URL_PART_NEED)
-#define CAMEL_URL_NEED_PASSWORD (CAMEL_URL_PART_PASSWORD << CAMEL_URL_PART_NEED)
-#define CAMEL_URL_NEED_HOST (CAMEL_URL_PART_HOST << CAMEL_URL_PART_NEED)
-#define CAMEL_URL_NEED_PORT (CAMEL_URL_PART_PORT << CAMEL_URL_PART_NEED)
-#define CAMEL_URL_NEED_PATH (CAMEL_URL_PART_PATH << CAMEL_URL_PART_NEED)
-
-#define CAMEL_URL_PATH_IS_ABSOLUTE (1 << 12)
-
-
-/* Generic extra config stuff */
-typedef enum {
- CAMEL_PROVIDER_CONF_END,
- CAMEL_PROVIDER_CONF_SECTION_START,
- CAMEL_PROVIDER_CONF_SECTION_END,
- CAMEL_PROVIDER_CONF_CHECKBOX,
- CAMEL_PROVIDER_CONF_CHECKSPIN,
- CAMEL_PROVIDER_CONF_ENTRY,
-} CamelProviderConfType;
-
-typedef struct {
- CamelProviderConfType type;
- char *name, *depname;
- char *text, *value;
-} CamelProviderConfEntry;
-
-
-
-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;
-
- /* Flags describing the provider, flags describing its URLs */
- int flags, url_flags;
-
- /* Extra configuration information */
- CamelProviderConfEntry *extra_conf;
-
- CamelType object_types [CAMEL_NUM_PROVIDER_TYPES];
-
- /* GList of CamelServiceAuthTypes the provider supports */
- GList *authtypes;
-
- GHashTable *service_cache;
-
-} 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-remote-store.c b/camel/camel-remote-store.c
deleted file mode 100644
index a0f142e889..0000000000
--- a/camel/camel-remote-store.c
+++ /dev/null
@@ -1,562 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-remote-store.c : class for an remote store */
-
-/*
- * Authors: Peter Williams <peterw@helixcode.com>
- * based on camel-imap-provider.c
- *
- * Copyright 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 Street #330, Boston, MA 02111-1307, USA.
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <errno.h>
-
-#include "camel-remote-store.h"
-#include "camel-folder.h"
-#include "camel-exception.h"
-#include "camel-session.h"
-#include "camel-stream.h"
-#include "camel-stream-buffer.h"
-#include "camel-tcp-stream.h"
-#include "camel-tcp-stream-raw.h"
-#if HAVE_NSS
-#include "camel-tcp-stream-ssl.h"
-#endif
-
-#include "camel-url.h"
-#include "string-utils.h"
-
-#include "camel-private.h"
-#include "camel-operation.h"
-
-#define d(x) x
-#if d(!)0
-extern gboolean camel_verbose_debug;
-#endif
-
-#define CSRVC(obj) (CAMEL_SERVICE_CLASS (CAMEL_OBJECT_GET_CLASS (obj)))
-#define CSTRC(obj) (CAMEL_STORE_CLASS (CAMEL_OBJECT_GET_CLASS (obj)))
-#define CRSC(obj) (CAMEL_REMOTE_STORE_CLASS (CAMEL_OBJECT_GET_CLASS (obj)))
-
-static CamelStoreClass *store_class = NULL;
-
-static void remote_construct (CamelService *service, CamelSession *session,
- CamelProvider *provider, CamelURL *url,
- CamelException *ex);
-static gboolean remote_connect (CamelService *service, CamelException *ex);
-static gboolean remote_disconnect (CamelService *service, gboolean clean, CamelException *ex);
-static GList *remote_query_auth_types(CamelService *service, CamelException *ex);
-static char *remote_get_name (CamelService *service, gboolean brief);
-static gint remote_send_string (CamelRemoteStore *store, CamelException *ex,
- char *fmt, va_list ap);
-static gint remote_send_stream (CamelRemoteStore *store, CamelStream *stream,
- CamelException *ex);
-static gint remote_recv_line (CamelRemoteStore *store, char **dest,
- CamelException *ex);
-
-static void
-camel_remote_store_class_init (CamelRemoteStoreClass *camel_remote_store_class)
-{
- /* virtual method overload */
- CamelServiceClass *camel_service_class =
- CAMEL_SERVICE_CLASS (camel_remote_store_class);
-
- store_class = CAMEL_STORE_CLASS (camel_type_get_global_classfuncs (camel_store_get_type ()));
-
- /* virtual method overload */
- camel_service_class->construct = remote_construct;
- camel_service_class->connect = remote_connect;
- camel_service_class->disconnect = remote_disconnect;
- camel_service_class->query_auth_types = remote_query_auth_types;
- camel_service_class->get_name = remote_get_name;
-
- camel_remote_store_class->send_string = remote_send_string;
- camel_remote_store_class->send_stream = remote_send_stream;
- camel_remote_store_class->recv_line = remote_recv_line;
- camel_remote_store_class->keepalive = NULL;
-}
-
-static void
-camel_remote_store_init (CamelObject *object)
-{
- CamelRemoteStore *remote_store = CAMEL_REMOTE_STORE (object);
-
- remote_store->istream = NULL;
- remote_store->ostream = NULL;
- remote_store->timeout_id = 0;
-
- remote_store->priv = g_malloc0(sizeof(*remote_store->priv));
-#ifdef ENABLE_THREADS
- remote_store->priv->stream_lock = e_mutex_new(E_MUTEX_REC);
-#endif
-}
-
-static void
-camel_remote_store_finalise(CamelObject *object)
-{
- CamelRemoteStore *remote_store = CAMEL_REMOTE_STORE (object);
-
-#ifdef ENABLE_THREADS
- e_mutex_destroy(remote_store->priv->stream_lock);
-#endif
- g_free(remote_store->priv);
-}
-
-
-CamelType
-camel_remote_store_get_type (void)
-{
- static CamelType camel_remote_store_type = CAMEL_INVALID_TYPE;
-
- if (camel_remote_store_type == CAMEL_INVALID_TYPE) {
- camel_remote_store_type =
- camel_type_register (CAMEL_STORE_TYPE, "CamelRemoteStore",
- sizeof (CamelRemoteStore),
- sizeof (CamelRemoteStoreClass),
- (CamelObjectClassInitFunc) camel_remote_store_class_init,
- NULL,
- (CamelObjectInitFunc) camel_remote_store_init,
- (CamelObjectFinalizeFunc) camel_remote_store_finalise);
- }
-
- return camel_remote_store_type;
-}
-
-static void
-remote_construct (CamelService *service, CamelSession *session,
- CamelProvider *provider, CamelURL *url,
- CamelException *ex)
-{
- CamelRemoteStore *remote_store = CAMEL_REMOTE_STORE (service);
-
- CAMEL_SERVICE_CLASS (store_class)->construct (service, session, provider, url, ex);
-
- if (camel_url_get_param (url, "use_ssl"))
- remote_store->use_ssl = TRUE;
-}
-
-
-/* Auth stuff... for now, nothing, but might eventually add SSH tunneling
- */
-
-static GList *
-remote_query_auth_types (CamelService *service, CamelException *ex)
-{
- return NULL;
-}
-
-GList *
-camel_remote_store_authtype_list (void)
-{
- return NULL;
-}
-
-
-static char *
-remote_get_name (CamelService *service, gboolean brief)
-{
- if (brief)
- return g_strdup_printf (_("%s server %s"),
- service->provider->name,
- service->url->host);
- else {
- return g_strdup_printf (_("%s service for %s on %s"),
- service->provider->name,
- service->url->user,
- service->url->host);
- }
-}
-
-static gboolean
-timeout_cb (gpointer data)
-{
- CamelRemoteStore *store = CAMEL_REMOTE_STORE(data);
-
- CRSC (data)->keepalive(store);
-
- return TRUE;
-}
-
-static gboolean
-remote_connect (CamelService *service, CamelException *ex)
-{
- CamelRemoteStore *store = CAMEL_REMOTE_STORE (service);
- CamelStream *tcp_stream;
- struct hostent *h;
- gint ret, port;
-
- h = camel_service_gethost (service, ex);
- if (!h)
- return FALSE;
-
- if (service->url->port)
- port = service->url->port;
- else if (store->use_ssl)
- port = store->default_ssl_port;
- else
- port = store->default_port;
-
-#ifdef HAVE_NSS
- if (store->use_ssl)
- tcp_stream = camel_tcp_stream_ssl_new (service, service->url->host);
- else
- tcp_stream = camel_tcp_stream_raw_new ();
-#else
- tcp_stream = camel_tcp_stream_raw_new ();
-#endif /* HAVE_NSS */
-
- ret = camel_tcp_stream_connect (CAMEL_TCP_STREAM (tcp_stream), h, port);
- camel_free_host(h);
- if (ret == -1) {
- if (errno == EINTR)
- camel_exception_set (ex, CAMEL_EXCEPTION_USER_CANCEL,
- _("Connection cancelled"));
- else
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
- _("Could not connect to %s (port %d): %s"),
- service->url->host ? service->url->host : _("(unknown host)"),
- port, g_strerror (errno));
- return FALSE;
- }
-
- /* parent class connect initialization */
- if (CAMEL_SERVICE_CLASS (store_class)->connect (service, ex) == FALSE)
- return FALSE;
-
- store->ostream = tcp_stream;
- store->istream = camel_stream_buffer_new (tcp_stream, CAMEL_STREAM_BUFFER_READ);
-
- /* Okay, good enough for us */
- CAMEL_SERVICE (store)->connected = TRUE;
-
- /* Add a timeout so that we can hopefully prevent getting disconnected */
- /* (Only if the implementation supports it) */
- if (CRSC (store)->keepalive) {
- CamelSession *session = camel_service_get_session (CAMEL_SERVICE (store));
-
- store->timeout_id = camel_session_register_timeout (session, 10 * 60 * 1000,
- timeout_cb,
- store);
- }
-
- return TRUE;
-}
-
-static gboolean
-remote_disconnect (CamelService *service, gboolean clean, CamelException *ex)
-{
- CamelRemoteStore *store = CAMEL_REMOTE_STORE (service);
-
- if (store->timeout_id) {
- camel_session_remove_timeout (camel_service_get_session (CAMEL_SERVICE (store)),
- store->timeout_id);
- store->timeout_id = 0;
- }
-
- if (!CAMEL_SERVICE_CLASS (store_class)->disconnect (service, clean, ex))
- return FALSE;
-
- if (store->istream) {
- camel_object_unref (CAMEL_OBJECT (store->istream));
- store->istream = NULL;
- }
-
- if (store->ostream) {
- camel_object_unref (CAMEL_OBJECT (store->ostream));
- store->ostream = NULL;
- }
-
- return TRUE;
-}
-
-static gint
-remote_send_string (CamelRemoteStore *store, CamelException *ex, char *fmt, va_list ap)
-{
- gchar *cmdbuf;
-
- /* Check for connectedness. Failed (or cancelled) operations will
- * close the connection. */
- if (!camel_remote_store_connected (store, ex))
- return -1;
-
- /* create the command */
- cmdbuf = g_strdup_vprintf (fmt, ap);
-
-#if d(!)0
- if (camel_verbose_debug) {
- if (strncmp (cmdbuf, "PASS ", 5) == 0)
- fprintf (stderr, "sending : PASS xxxx\n");
- else if (strstr (cmdbuf, "LOGIN \""))
- fprintf (stderr, "sending : ---- LOGIN \"xxxx\" \"xxxx\"\n");
- else
- fprintf (stderr, "sending : %s", cmdbuf);
- }
-#endif
-
- if (camel_stream_printf (store->ostream, "%s", cmdbuf) == -1) {
- if (errno == EINTR)
- camel_exception_set(ex, CAMEL_EXCEPTION_USER_CANCEL, _("Operation cancelled"));
- else
- camel_exception_set(ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE, strerror(errno));
- g_free (cmdbuf);
-
- camel_service_disconnect (CAMEL_SERVICE (store), FALSE, NULL);
- return -1;
- }
- g_free (cmdbuf);
-
- return 0;
-}
-
-/* FIXME: All of these functions need an api overhaul, they're not like
- any other functions, anywhere in the world ... */
-
-/**
- * camel_remote_store_send_string: Writes a string to the server
- * @store: a CamelRemoteStore
- * @ex: a CamelException
- * @fmt: the printf-style format to use for creating the string to send
- * @...: the arguments to the printf string @fmt
- * Return value: 0 on success, nonzero on error
- *
- * Formats the string and sends it to the server.
- **/
-
-gint
-camel_remote_store_send_string (CamelRemoteStore *store, CamelException *ex,
- char *fmt, ...)
-{
- va_list ap;
- gint ret;
-
- g_return_val_if_fail (CAMEL_IS_REMOTE_STORE (store), -1);
- g_return_val_if_fail (fmt, -1);
-
- va_start (ap, fmt);
- CAMEL_REMOTE_STORE_LOCK(store, stream_lock);
- ret = CRSC (store)->send_string (store, ex, fmt, ap);
- CAMEL_REMOTE_STORE_UNLOCK(store, stream_lock);
- va_end (ap);
-
- return ret;
-}
-
-static gint
-remote_send_stream (CamelRemoteStore *store, CamelStream *stream, CamelException *ex)
-{
- int ret;
-
- /* Check for connectedness. Failed (or cancelled) operations will
- * close the connection. */
-
- if (!camel_remote_store_connected (store, ex))
- return -1;
-
- d(fprintf (stderr, "(sending stream)\n"));
-
- ret = camel_stream_write_to_stream (stream, store->ostream);
- if (ret == -1) {
- if (errno == EINTR)
- camel_exception_set(ex, CAMEL_EXCEPTION_USER_CANCEL, _("Operation cancelled"));
- else
- camel_exception_set(ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE, strerror(errno));
-
- camel_service_disconnect (CAMEL_SERVICE (store), FALSE, NULL);
- }
-
- return ret;
-}
-
-/**
- * camel_remote_store_send_stream: Writes a CamelStream to the server
- * @store: a CamelRemoteStore
- * @stream: the stream to write
- * @ex: a CamelException
- * Return value: 0 on success, nonzero on error
- *
- * Sends the stream to the server.
- **/
-
-gint
-camel_remote_store_send_stream (CamelRemoteStore *store, CamelStream *stream, CamelException *ex)
-{
- int ret;
-
- g_return_val_if_fail (CAMEL_IS_REMOTE_STORE (store), -1);
- g_return_val_if_fail (CAMEL_IS_STREAM (stream), -1);
-
- CAMEL_REMOTE_STORE_LOCK(store, stream_lock);
-
- ret = CRSC (store)->send_stream (store, stream, ex);
-
- CAMEL_REMOTE_STORE_UNLOCK(store, stream_lock);
-
- return ret;
-}
-
-static int
-remote_recv_line (CamelRemoteStore *store, char **dest, CamelException *ex)
-{
- CamelStreamBuffer *stream;
- GByteArray *bytes;
- gchar buf[1024], *ret;
- gboolean exception = FALSE;
- gint nread;
-
- *dest = NULL;
-
- /* Check for connectedness. Failed (or cancelled) operations will
- * close the connection. We can't expect a read to have any
- * meaning if we reconnect, so always set an exception.
- */
-
- if (!camel_remote_store_connected (store, ex)) {
- camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_NOT_CONNECTED,
- g_strerror (errno));
- return -1;
- }
- stream = CAMEL_STREAM_BUFFER (store->istream);
-
- bytes = g_byte_array_new ();
-
- do {
- nread = camel_stream_buffer_gets (stream, buf, sizeof (buf));
- if (nread > 0)
- g_byte_array_append (bytes, buf, nread);
- } while (nread == sizeof (buf) - 1);
-
- if (nread == -1) {
- exception = TRUE;
- if (errno == EINTR)
- camel_exception_set(ex, CAMEL_EXCEPTION_USER_CANCEL, _("Operation cancelled"));
- else
- camel_exception_set(ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE, strerror(errno));
- } else if (bytes->len == 0) {
- exception = TRUE;
- camel_exception_set(ex, CAMEL_EXCEPTION_SERVICE_NOT_CONNECTED,
- _("Server unexpectedly disconnected"));
- }
- if (camel_exception_is_set (ex) || exception) {
- g_byte_array_free(bytes, TRUE);
- camel_service_disconnect (CAMEL_SERVICE (store), FALSE, NULL);
- return -1;
- }
-
- g_byte_array_append (bytes, "", 1);
- ret = bytes->data;
- nread = bytes->len - 1;
- g_byte_array_free (bytes, FALSE);
-
- /* strip off the CRLF sequence */
- while (nread > 0 && ret[nread] != '\r')
- ret[nread--] = '\0';
- ret[nread] = '\0';
-
- *dest = ret;
-
-#if d(!)0
- if (camel_verbose_debug)
- fprintf (stderr, "received: %s\n", *dest);
-#endif
-
- return nread;
-}
-
-/**
- * camel_remote_store_recv_line: Reads a line from the server
- * @store: a CamelRemoteStore
- * @dest: a pointer that will be set to the location of a buffer
- * holding the server's response
- * @ex: a CamelException
- * Return value: -1 on error, otherwise the length read.
- *
- * Reads a line from the server (terminated by \n or \r\n).
- **/
-
-gint
-camel_remote_store_recv_line (CamelRemoteStore *store, char **dest,
- CamelException *ex)
-{
- int ret;
-
- g_return_val_if_fail (CAMEL_IS_REMOTE_STORE (store), -1);
- g_return_val_if_fail (dest, -1);
-
- CAMEL_REMOTE_STORE_LOCK(store, stream_lock);
-
- ret = CRSC (store)->recv_line (store, dest, ex);
-
- CAMEL_REMOTE_STORE_UNLOCK(store, stream_lock);
-
- return ret;
-}
-
-static void
-refresh_folder_info (gpointer key, gpointer value, gpointer data)
-{
- CamelFolder *folder = CAMEL_FOLDER (value);
-
- camel_folder_refresh_info (folder, (CamelException *) data);
-}
-
-/**
- * camel_remote_store_refresh_folders: Refresh the folders that I
- * contain
- * @store: a CamelRemoteStore
- * @ex: a CamelException
- *
- * Refreshes the folders listed in the folders hashtable.
- **/
-void
-camel_remote_store_refresh_folders (CamelRemoteStore *store, CamelException *ex)
-{
- CAMEL_STORE_LOCK(store, cache_lock);
-
- g_hash_table_foreach (CAMEL_STORE (store)->folders, refresh_folder_info, ex);
-
- CAMEL_STORE_UNLOCK(store, cache_lock);
-}
-
-/**
- * camel_remote_store_connected:
- * @store: a CamelRemoteStore
- * @ex: a CamelException
- *
- * Ensure that the remote store is connected.
- *
- * Return value: Whether or not it is connected
- **/
-gboolean
-camel_remote_store_connected (CamelRemoteStore *store, CamelException *ex)
-{
- if (store->istream == NULL)
- return camel_service_connect (CAMEL_SERVICE (store), ex);
- return TRUE;
-}
diff --git a/camel/camel-remote-store.h b/camel/camel-remote-store.h
deleted file mode 100644
index ab22c0e86b..0000000000
--- a/camel/camel-remote-store.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-remote-store.h : class for a remote store */
-
-/*
- * Authors: Peter Williams <peterw@helixcode.com>
- *
- * 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_REMOTE_STORE_H
-#define CAMEL_REMOTE_STORE_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include <camel/camel-store.h>
-
-#define CAMEL_REMOTE_STORE_TYPE (camel_remote_store_get_type ())
-#define CAMEL_REMOTE_STORE(obj) (CAMEL_CHECK_CAST((obj), CAMEL_REMOTE_STORE_TYPE, CamelRemoteStore))
-#define CAMEL_REMOTE_STORE_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_REMOTE_STORE_TYPE, CamelRemoteStoreClass))
-#define CAMEL_IS_REMOTE_STORE(o) (CAMEL_CHECK_TYPE((o), CAMEL_REMOTE_STORE_TYPE))
-
-typedef struct {
- CamelStore parent_object;
- struct _CamelRemoteStorePrivate *priv;
-
- CamelStream *istream, *ostream;
- guint timeout_id, default_port, default_ssl_port;
- gboolean use_ssl;
-} CamelRemoteStore;
-
-
-typedef struct {
- CamelStoreClass parent_class;
-
- gint (*send_string) (CamelRemoteStore *store, CamelException *ex,
- char *fmt, va_list ap);
- gint (*send_stream) (CamelRemoteStore *store, CamelStream *stream,
- CamelException *ex);
- gint (*recv_line) (CamelRemoteStore *store, char **dest,
- CamelException *ex);
- void (*keepalive) (CamelRemoteStore *store);
-} CamelRemoteStoreClass;
-
-
-/* Standard Camel function */
-CamelType camel_remote_store_get_type (void);
-
-/* FIXME: All of these i/o functions need an api overhaul, they're not like
- any other functions, anywhere in the world ... */
-
-/* Extra public functions */
-GList *camel_remote_store_authtype_list (void);
-
-gint camel_remote_store_send_string (CamelRemoteStore *store, CamelException *ex,
- char *fmt, ...);
-gint camel_remote_store_send_stream (CamelRemoteStore *store, CamelStream *stream,
- CamelException *ex);
-gint camel_remote_store_recv_line (CamelRemoteStore *store, char **dest,
- CamelException *ex);
-void camel_remote_store_refresh_folders (CamelRemoteStore *store,
- CamelException *ex);
-gboolean camel_remote_store_connected (CamelRemoteStore *store, CamelException *ex);
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_REMOTE_STORE_H */
diff --git a/camel/camel-sasl-anonymous.c b/camel/camel-sasl-anonymous.c
deleted file mode 100644
index 5b97fb4edf..0000000000
--- a/camel/camel-sasl-anonymous.c
+++ /dev/null
@@ -1,150 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2001 Ximian, Inc. (www.ximian.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.
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <string.h>
-#include "camel-sasl-anonymous.h"
-#include "camel-internet-address.h"
-#include <string.h>
-
-CamelServiceAuthType camel_sasl_anonymous_authtype = {
- N_("Anonymous"),
-
- N_("This option will connect to the server using an anonymous login."),
-
- "ANONYMOUS",
- FALSE
-};
-
-static CamelSaslClass *parent_class = NULL;
-
-/* Returns the class for a CamelSaslAnonymous */
-#define CSA_CLASS(so) CAMEL_SASL_ANONYMOUS_CLASS (CAMEL_OBJECT_GET_CLASS (so))
-
-static GByteArray *anon_challenge (CamelSasl *sasl, GByteArray *token, CamelException *ex);
-
-static void
-camel_sasl_anonymous_class_init (CamelSaslAnonymousClass *camel_sasl_anonymous_class)
-{
- CamelSaslClass *camel_sasl_class = CAMEL_SASL_CLASS (camel_sasl_anonymous_class);
-
- parent_class = CAMEL_SASL_CLASS (camel_type_get_global_classfuncs (camel_sasl_get_type ()));
-
- /* virtual method overload */
- camel_sasl_class->challenge = anon_challenge;
-}
-
-static void
-camel_sasl_anonymous_finalize (CamelObject *object)
-{
- CamelSaslAnonymous *sasl = CAMEL_SASL_ANONYMOUS (object);
-
- g_free (sasl->trace_info);
-}
-
-
-CamelType
-camel_sasl_anonymous_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (camel_sasl_get_type (),
- "CamelSaslAnonymous",
- sizeof (CamelSaslAnonymous),
- sizeof (CamelSaslAnonymousClass),
- (CamelObjectClassInitFunc) camel_sasl_anonymous_class_init,
- NULL,
- NULL,
- (CamelObjectFinalizeFunc) camel_sasl_anonymous_finalize);
- }
-
- return type;
-}
-
-CamelSasl *
-camel_sasl_anonymous_new (CamelSaslAnonTraceType type, const char *trace_info)
-{
- CamelSaslAnonymous *sasl_anon;
-
- if (!trace_info && type != CAMEL_SASL_ANON_TRACE_EMPTY) return NULL;
-
- sasl_anon = CAMEL_SASL_ANONYMOUS (camel_object_new (camel_sasl_anonymous_get_type ()));
- sasl_anon->trace_info = g_strdup (trace_info);
- sasl_anon->type = type;
-
- return CAMEL_SASL (sasl_anon);
-}
-
-static GByteArray *
-anon_challenge (CamelSasl *sasl, GByteArray *token, CamelException *ex)
-{
- CamelSaslAnonymous *sasl_anon = CAMEL_SASL_ANONYMOUS (sasl);
- CamelInternetAddress *cia;
- GByteArray *ret = NULL;
-
- if (token) {
- camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
- _("Authentication failed."));
- return NULL;
- }
-
- switch (sasl_anon->type) {
- case CAMEL_SASL_ANON_TRACE_EMAIL:
- cia = camel_internet_address_new ();
- if (camel_internet_address_add (cia, NULL, sasl_anon->trace_info) != 1) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
- _("Invalid email address trace information:\n%s"),
- sasl_anon->trace_info);
- camel_object_unref (CAMEL_OBJECT (cia));
- return NULL;
- }
- camel_object_unref (CAMEL_OBJECT (cia));
- ret = g_byte_array_new ();
- g_byte_array_append (ret, sasl_anon->trace_info, strlen (sasl_anon->trace_info));
- break;
- case CAMEL_SASL_ANON_TRACE_OPAQUE:
- if (strchr (sasl_anon->trace_info, '@')) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
- _("Invalid opaque trace information:\n%s"),
- sasl_anon->trace_info);
- return NULL;
- }
- ret = g_byte_array_new ();
- g_byte_array_append (ret, sasl_anon->trace_info, strlen (sasl_anon->trace_info));
- break;
- case CAMEL_SASL_ANON_TRACE_EMPTY:
- ret = g_byte_array_new ();
- break;
- default:
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
- _("Invalid trace information:\n%s"),
- sasl_anon->trace_info);
- return NULL;
- }
-
- sasl->authenticated = TRUE;
- return ret;
-}
diff --git a/camel/camel-sasl-anonymous.h b/camel/camel-sasl-anonymous.h
deleted file mode 100644
index 267f338f87..0000000000
--- a/camel/camel-sasl-anonymous.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2001 Ximian, Inc. (www.ximian.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.
- *
- */
-
-#ifndef CAMEL_SASL_ANONYMOUS_H
-#define CAMEL_SASL_ANONYMOUS_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include <camel/camel-sasl.h>
-
-#define CAMEL_SASL_ANONYMOUS_TYPE (camel_sasl_anonymous_get_type ())
-#define CAMEL_SASL_ANONYMOUS(obj) (CAMEL_CHECK_CAST((obj), CAMEL_SASL_ANONYMOUS_TYPE, CamelSaslAnonymous))
-#define CAMEL_SASL_ANONYMOUS_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_SASL_ANONYMOUS_TYPE, CamelSaslAnonymousClass))
-#define CAMEL_IS_SASL_ANONYMOUS(o) (CAMEL_CHECK_TYPE((o), CAMEL_SASL_ANONYMOUS_TYPE))
-
-typedef enum {
- CAMEL_SASL_ANON_TRACE_EMAIL,
- CAMEL_SASL_ANON_TRACE_OPAQUE,
- CAMEL_SASL_ANON_TRACE_EMPTY
-} CamelSaslAnonTraceType;
-
-typedef struct _CamelSaslAnonymous {
- CamelSasl parent_object;
-
- char *trace_info;
- CamelSaslAnonTraceType type;
-} CamelSaslAnonymous;
-
-
-typedef struct _CamelSaslAnonymousClass {
- CamelSaslClass parent_class;
-
-} CamelSaslAnonymousClass;
-
-
-/* Standard Camel function */
-CamelType camel_sasl_anonymous_get_type (void);
-
-/* public methods */
-CamelSasl *camel_sasl_anonymous_new (CamelSaslAnonTraceType type, const char *trace_info);
-
-extern CamelServiceAuthType camel_sasl_anonymous_authtype;
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_SASL_ANONYMOUS_H */
diff --git a/camel/camel-sasl-cram-md5.c b/camel/camel-sasl-cram-md5.c
deleted file mode 100644
index 3d3bae36e1..0000000000
--- a/camel/camel-sasl-cram-md5.c
+++ /dev/null
@@ -1,142 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2001 Ximian, Inc. (www.ximian.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.
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdio.h>
-#include <string.h>
-#include "camel-sasl-cram-md5.h"
-#include "camel-mime-utils.h"
-#include "camel-service.h"
-#include <e-util/md5-utils.h>
-
-CamelServiceAuthType camel_sasl_cram_md5_authtype = {
- N_("CRAM-MD5"),
-
- N_("This option will connect to the server using a "
- "secure CRAM-MD5 password, if the server supports it."),
-
- "CRAM-MD5",
- TRUE
-};
-
-static CamelSaslClass *parent_class = NULL;
-
-/* Returns the class for a CamelSaslCramMd5 */
-#define CSCM_CLASS(so) CAMEL_SASL_CRAM_MD5_CLASS (CAMEL_OBJECT_GET_CLASS (so))
-
-static GByteArray *cram_md5_challenge (CamelSasl *sasl, GByteArray *token, CamelException *ex);
-
-static void
-camel_sasl_cram_md5_class_init (CamelSaslCramMd5Class *camel_sasl_cram_md5_class)
-{
- CamelSaslClass *camel_sasl_class = CAMEL_SASL_CLASS (camel_sasl_cram_md5_class);
-
- parent_class = CAMEL_SASL_CLASS (camel_type_get_global_classfuncs (camel_sasl_get_type ()));
-
- /* virtual method overload */
- camel_sasl_class->challenge = cram_md5_challenge;
-}
-
-CamelType
-camel_sasl_cram_md5_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (camel_sasl_get_type (),
- "CamelSaslCramMd5",
- sizeof (CamelSaslCramMd5),
- sizeof (CamelSaslCramMd5Class),
- (CamelObjectClassInitFunc) camel_sasl_cram_md5_class_init,
- NULL,
- NULL,
- NULL);
- }
-
- return type;
-}
-
-/* CRAM-MD5 algorithm:
- * MD5 ((passwd XOR opad), MD5 ((passwd XOR ipad), timestamp))
- */
-
-static GByteArray *
-cram_md5_challenge (CamelSasl *sasl, GByteArray *token, CamelException *ex)
-{
- char *passwd;
- guchar digest[16], md5asc[33], *s, *p;
- GByteArray *ret = NULL;
- guchar ipad[64];
- guchar opad[64];
- MD5Context ctx;
- int i, pw_len;
-
- /* Need to wait for the server */
- if (!token)
- return NULL;
-
- g_return_val_if_fail (sasl->service->url->passwd != NULL, NULL);
-
- memset (ipad, 0, sizeof (ipad));
- memset (opad, 0, sizeof (opad));
-
- passwd = sasl->service->url->passwd;
- pw_len = strlen (passwd);
- if (pw_len <= 64) {
- memcpy (ipad, passwd, pw_len);
- memcpy (opad, passwd, pw_len);
- } else {
- md5_get_digest (passwd, pw_len, ipad);
- memcpy (opad, ipad, 16);
- }
-
- for (i = 0; i < 64; i++) {
- ipad[i] ^= 0x36;
- opad[i] ^= 0x5c;
- }
-
- md5_init (&ctx);
- md5_update (&ctx, ipad, 64);
- md5_update (&ctx, token->data, token->len);
- md5_final (&ctx, digest);
-
- md5_init (&ctx);
- md5_update (&ctx, opad, 64);
- md5_update (&ctx, digest, 16);
- md5_final (&ctx, digest);
-
- /* lowercase hexify that bad-boy... */
- for (s = digest, p = md5asc; p < md5asc + 32; s++, p += 2)
- sprintf (p, "%.2x", *s);
-
- ret = g_byte_array_new ();
- g_byte_array_append (ret, sasl->service->url->user, strlen (sasl->service->url->user));
- g_byte_array_append (ret, " ", 1);
- g_byte_array_append (ret, md5asc, 32);
-
- sasl->authenticated = TRUE;
-
- return ret;
-}
diff --git a/camel/camel-sasl-cram-md5.h b/camel/camel-sasl-cram-md5.h
deleted file mode 100644
index 801dc4a4bb..0000000000
--- a/camel/camel-sasl-cram-md5.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2001 Ximian, Inc. (www.ximian.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.
- *
- */
-
-#ifndef CAMEL_SASL_CRAM_MD5_H
-#define CAMEL_SASL_CRAM_MD5_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include <camel/camel-sasl.h>
-
-#define CAMEL_SASL_CRAM_MD5_TYPE (camel_sasl_cram_md5_get_type ())
-#define CAMEL_SASL_CRAM_MD5(obj) (CAMEL_CHECK_CAST((obj), CAMEL_SASL_CRAM_MD5_TYPE, CamelSaslCramMd5))
-#define CAMEL_SASL_CRAM_MD5_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_SASL_CRAM_MD5_TYPE, CamelSaslCramMd5Class))
-#define CAMEL_IS_SASL_CRAM_MD5(o) (CAMEL_CHECK_TYPE((o), CAMEL_SASL_CRAM_MD5_TYPE))
-
-typedef struct _CamelSaslCramMd5 {
- CamelSasl parent_object;
-
-} CamelSaslCramMd5;
-
-
-typedef struct _CamelSaslCramMd5Class {
- CamelSaslClass parent_class;
-
-} CamelSaslCramMd5Class;
-
-
-/* Standard Camel function */
-CamelType camel_sasl_cram_md5_get_type (void);
-
-extern CamelServiceAuthType camel_sasl_cram_md5_authtype;
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_SASL_CRAM_MD5_H */
diff --git a/camel/camel-sasl-digest-md5.c b/camel/camel-sasl-digest-md5.c
deleted file mode 100644
index 51b2026abc..0000000000
--- a/camel/camel-sasl-digest-md5.c
+++ /dev/null
@@ -1,895 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2001 Ximian, Inc. (www.ximian.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.
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <unistd.h>
-#include <iconv.h>
-#include "camel-sasl-digest-md5.h"
-#include "camel-mime-utils.h"
-#include "camel-charset-map.h"
-#include <e-util/md5-utils.h>
-
-
-#define d(x)
-
-#define PARANOID(x) x
-
-CamelServiceAuthType camel_sasl_digest_md5_authtype = {
- N_("DIGEST-MD5"),
-
- N_("This option will connect to the server using a "
- "secure DIGEST-MD5 password, if the server supports it."),
-
- "DIGEST-MD5",
- TRUE
-};
-
-static CamelSaslClass *parent_class = NULL;
-
-/* Returns the class for a CamelSaslDigestMd5 */
-#define CSCM_CLASS(so) CAMEL_SASL_DIGEST_MD5_CLASS (CAMEL_OBJECT_GET_CLASS (so))
-
-static GByteArray *digest_md5_challenge (CamelSasl *sasl, GByteArray *token, CamelException *ex);
-
-enum {
- STATE_AUTH,
- STATE_FINAL
-};
-
-typedef struct {
- char *name;
- guint type;
-} DataType;
-
-enum {
- DIGEST_REALM,
- DIGEST_NONCE,
- DIGEST_QOP,
- DIGEST_STALE,
- DIGEST_MAXBUF,
- DIGEST_CHARSET,
- DIGEST_ALGORITHM,
- DIGEST_CIPHER,
- DIGEST_UNKNOWN
-};
-
-static DataType digest_args[] = {
- { "realm", DIGEST_REALM },
- { "nonce", DIGEST_NONCE },
- { "qop", DIGEST_QOP },
- { "stale", DIGEST_STALE },
- { "maxbuf", DIGEST_MAXBUF },
- { "charset", DIGEST_CHARSET },
- { "algorithm", DIGEST_ALGORITHM },
- { "cipher", DIGEST_CIPHER },
- { NULL, DIGEST_UNKNOWN }
-};
-
-#define QOP_AUTH (1<<0)
-#define QOP_AUTH_INT (1<<1)
-#define QOP_AUTH_CONF (1<<2)
-#define QOP_INVALID (1<<3)
-
-static DataType qop_types[] = {
- { "auth", QOP_AUTH },
- { "auth-int", QOP_AUTH_INT },
- { "auth-conf", QOP_AUTH_CONF },
- { NULL, QOP_INVALID }
-};
-
-#define CIPHER_DES (1<<0)
-#define CIPHER_3DES (1<<1)
-#define CIPHER_RC4 (1<<2)
-#define CIPHER_RC4_40 (1<<3)
-#define CIPHER_RC4_56 (1<<4)
-#define CIPHER_INVALID (1<<5)
-
-static DataType cipher_types[] = {
- { "des", CIPHER_DES },
- { "3des", CIPHER_3DES },
- { "rc4", CIPHER_RC4 },
- { "rc4-40", CIPHER_RC4_40 },
- { "rc4-56", CIPHER_RC4_56 },
- { NULL, CIPHER_INVALID }
-};
-
-struct _param {
- char *name;
- char *value;
-};
-
-struct _DigestChallenge {
- GPtrArray *realms;
- char *nonce;
- guint qop;
- gboolean stale;
- gint32 maxbuf;
- char *charset;
- char *algorithm;
- guint cipher;
- GList *params;
-};
-
-struct _DigestURI {
- char *type;
- char *host;
- char *name;
-};
-
-struct _DigestResponse {
- char *username;
- char *realm;
- char *nonce;
- char *cnonce;
- char nc[9];
- guint qop;
- struct _DigestURI *uri;
- char resp[33];
- guint32 maxbuf;
- char *charset;
- guint cipher;
- char *authzid;
- char *param;
-};
-
-struct _CamelSaslDigestMd5Private {
- struct _DigestChallenge *challenge;
- struct _DigestResponse *response;
- int state;
-};
-
-static void
-camel_sasl_digest_md5_class_init (CamelSaslDigestMd5Class *camel_sasl_digest_md5_class)
-{
- CamelSaslClass *camel_sasl_class = CAMEL_SASL_CLASS (camel_sasl_digest_md5_class);
-
- parent_class = CAMEL_SASL_CLASS (camel_type_get_global_classfuncs (camel_sasl_get_type ()));
-
- /* virtual method overload */
- camel_sasl_class->challenge = digest_md5_challenge;
-}
-
-static void
-camel_sasl_digest_md5_init (gpointer object, gpointer klass)
-{
- CamelSaslDigestMd5 *sasl_digest = CAMEL_SASL_DIGEST_MD5 (object);
-
- sasl_digest->priv = g_new0 (struct _CamelSaslDigestMd5Private, 1);
-}
-
-static void
-camel_sasl_digest_md5_finalize (CamelObject *object)
-{
- CamelSaslDigestMd5 *sasl = CAMEL_SASL_DIGEST_MD5 (object);
- struct _DigestChallenge *c = sasl->priv->challenge;
- struct _DigestResponse *r = sasl->priv->response;
- GList *p;
- int i;
-
- for (i = 0; i < c->realms->len; i++)
- g_free (c->realms->pdata[i]);
- g_ptr_array_free (c->realms, TRUE);
- g_free (c->nonce);
- g_free (c->charset);
- g_free (c->algorithm);
- for (p = c->params; p; p = p->next) {
- struct _param *param = p->data;
-
- g_free (param->name);
- g_free (param->value);
- g_free (param);
- }
- g_list_free (c->params);
- g_free (c);
-
- g_free (r->username);
- g_free (r->realm);
- g_free (r->nonce);
- g_free (r->cnonce);
- if (r->uri) {
- g_free (r->uri->type);
- g_free (r->uri->host);
- g_free (r->uri->name);
- }
- g_free (r->charset);
- g_free (r->authzid);
- g_free (r->param);
- g_free (r);
-
- g_free (sasl->priv);
-}
-
-
-CamelType
-camel_sasl_digest_md5_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (camel_sasl_get_type (),
- "CamelSaslDigestMd5",
- sizeof (CamelSaslDigestMd5),
- sizeof (CamelSaslDigestMd5Class),
- (CamelObjectClassInitFunc) camel_sasl_digest_md5_class_init,
- NULL,
- (CamelObjectInitFunc) camel_sasl_digest_md5_init,
- (CamelObjectFinalizeFunc) camel_sasl_digest_md5_finalize);
- }
-
- return type;
-}
-
-static void
-decode_lwsp (const char **in)
-{
- const char *inptr = *in;
-
- while (isspace (*inptr))
- inptr++;
-
- *in = inptr;
-}
-
-static char *
-decode_quoted_string (const char **in)
-{
- const char *inptr = *in;
- char *out = NULL, *outptr;
- int outlen;
- int c;
-
- 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 *
-decode_token (const char **in)
-{
- const char *inptr = *in;
- const char *start;
-
- decode_lwsp (&inptr);
- start = inptr;
-
- while (*inptr && *inptr != '=' && *inptr != ',')
- inptr++;
-
- if (inptr > start) {
- *in = inptr;
- return g_strndup (start, inptr - start);
- } else {
- return NULL;
- }
-}
-
-static char *
-decode_value (const char **in)
-{
- const char *inptr = *in;
-
- decode_lwsp (&inptr);
- if (*inptr == '"') {
- d(printf ("decoding quoted string token\n"));
- return decode_quoted_string (in);
- } else {
- d(printf ("decoding string token\n"));
- return decode_token (in);
- }
-}
-
-static GList *
-parse_param_list (const char *tokens)
-{
- GList *params = NULL;
- struct _param *param;
- const char *ptr;
-
- for (ptr = tokens; ptr && *ptr; ) {
- param = g_new0 (struct _param, 1);
- param->name = decode_token (&ptr);
- if (*ptr == '=') {
- ptr++;
- param->value = decode_value (&ptr);
- }
-
- params = g_list_prepend (params, param);
-
- if (*ptr == ',')
- ptr++;
- }
-
- return params;
-}
-
-static guint
-decode_data_type (DataType *dtype, const char *name)
-{
- int i;
-
- for (i = 0; dtype[i].name; i++) {
- if (!g_strcasecmp (dtype[i].name, name))
- break;
- }
-
- return dtype[i].type;
-}
-
-#define get_digest_arg(name) decode_data_type (digest_args, name)
-#define decode_qop(name) decode_data_type (qop_types, name)
-#define decode_cipher(name) decode_data_type (cipher_types, name)
-
-static const char *
-type_to_string (DataType *dtype, guint type)
-{
- int i;
-
- for (i = 0; dtype[i].name; i++) {
- if (dtype[i].type == type)
- break;
- }
-
- return dtype[i].name;
-}
-
-#define qop_to_string(type) type_to_string (qop_types, type)
-#define cipher_to_string(type) type_to_string (cipher_types, type)
-
-static void
-digest_abort (gboolean *have_type, gboolean *abort)
-{
- if (*have_type)
- *abort = TRUE;
- *have_type = TRUE;
-}
-
-static struct _DigestChallenge *
-parse_server_challenge (const char *tokens, gboolean *abort)
-{
- struct _DigestChallenge *challenge = NULL;
- GList *params, *p;
- const char *ptr;
-#ifdef PARANOID
- gboolean got_algorithm = FALSE;
- gboolean got_stale = FALSE;
- gboolean got_maxbuf = FALSE;
- gboolean got_charset = FALSE;
-#endif /* PARANOID */
-
- params = parse_param_list (tokens);
- if (!params) {
- *abort = TRUE;
- return NULL;
- }
-
- *abort = FALSE;
-
- challenge = g_new0 (struct _DigestChallenge, 1);
- challenge->realms = g_ptr_array_new ();
- challenge->maxbuf = 65536;
-
- for (p = params; p; p = p->next) {
- struct _param *param = p->data;
- int type;
-
- type = get_digest_arg (param->name);
- switch (type) {
- case DIGEST_REALM:
- for (ptr = param->value; ptr && *ptr; ) {
- char *token;
-
- token = decode_token (&ptr);
- if (token)
- g_ptr_array_add (challenge->realms, token);
-
- if (*ptr == ',')
- ptr++;
- }
- g_free (param->value);
- g_free (param->name);
- g_free (param);
- break;
- case DIGEST_NONCE:
- g_free (challenge->nonce);
- challenge->nonce = param->value;
- g_free (param->name);
- g_free (param);
- break;
- case DIGEST_QOP:
- for (ptr = param->value; ptr && *ptr; ) {
- char *token;
-
- token = decode_token (&ptr);
- if (token)
- challenge->qop |= decode_qop (token);
-
- if (*ptr == ',')
- ptr++;
- }
-
- if (challenge->qop & QOP_INVALID)
- challenge->qop = QOP_INVALID;
- g_free (param->value);
- g_free (param->name);
- g_free (param);
- break;
- case DIGEST_STALE:
- PARANOID (digest_abort (&got_stale, abort));
- if (!g_strcasecmp (param->value, "true"))
- challenge->stale = TRUE;
- else
- challenge->stale = FALSE;
- g_free (param->value);
- g_free (param->name);
- g_free (param);
- break;
- case DIGEST_MAXBUF:
- PARANOID (digest_abort (&got_maxbuf, abort));
- challenge->maxbuf = atoi (param->value);
- g_free (param->value);
- g_free (param->name);
- g_free (param);
- break;
- case DIGEST_CHARSET:
- PARANOID (digest_abort (&got_charset, abort));
- g_free (challenge->charset);
- if (param->value && *param->value)
- challenge->charset = param->value;
- else
- challenge->charset = NULL;
- g_free (param->name);
- g_free (param);
- break;
- case DIGEST_ALGORITHM:
- PARANOID (digest_abort (&got_algorithm, abort));
- g_free (challenge->algorithm);
- challenge->algorithm = param->value;
- g_free (param->name);
- g_free (param);
- break;
- case DIGEST_CIPHER:
- for (ptr = param->value; ptr && *ptr; ) {
- char *token;
-
- token = decode_token (&ptr);
- if (token)
- challenge->cipher |= decode_cipher (token);
-
- if (*ptr == ',')
- ptr++;
- }
- if (challenge->cipher & CIPHER_INVALID)
- challenge->cipher = CIPHER_INVALID;
- g_free (param->value);
- g_free (param->name);
- g_free (param);
- break;
- default:
- challenge->params = g_list_prepend (challenge->params, param);
- break;
- }
- }
-
- g_list_free (params);
-
- return challenge;
-}
-
-static void
-digest_hex (guchar *digest, guchar hex[33])
-{
- guchar *s, *p;
-
- /* lowercase hexify that bad-boy... */
- for (s = digest, p = hex; p < hex + 32; s++, p += 2)
- sprintf (p, "%.2x", *s);
-}
-
-static char *
-digest_uri_to_string (struct _DigestURI *uri)
-{
- if (uri->name)
- return g_strdup_printf ("%s/%s/%s", uri->type, uri->host, uri->name);
- else
- return g_strdup_printf ("%s/%s", uri->type, uri->host);
-}
-
-static void
-compute_response (struct _DigestResponse *resp, const char *passwd, gboolean client, guchar out[33])
-{
- guchar hex_a1[33], hex_a2[33];
- guchar digest[16];
- MD5Context ctx;
- char *buf;
-
- /* compute A1 */
- md5_init (&ctx);
- md5_update (&ctx, resp->username, strlen (resp->username));
- md5_update (&ctx, ":", 1);
- md5_update (&ctx, resp->realm, strlen (resp->realm));
- md5_update (&ctx, ":", 1);
- md5_update (&ctx, passwd, strlen (passwd));
- md5_final (&ctx, digest);
-
- md5_init (&ctx);
- md5_update (&ctx, digest, 16);
- md5_update (&ctx, ":", 1);
- md5_update (&ctx, resp->nonce, strlen (resp->nonce));
- md5_update (&ctx, ":", 1);
- md5_update (&ctx, resp->cnonce, strlen (resp->cnonce));
- if (resp->authzid) {
- md5_update (&ctx, ":", 1);
- md5_update (&ctx, resp->authzid, strlen (resp->authzid));
- }
-
- /* hexify A1 */
- md5_final (&ctx, digest);
- digest_hex (digest, hex_a1);
-
- /* compute A2 */
- md5_init (&ctx);
- if (client) {
- /* we are calculating the client response */
- md5_update (&ctx, "AUTHENTICATE:", strlen ("AUTHENTICATE:"));
- } else {
- /* we are calculating the server rspauth */
- md5_update (&ctx, ":", 1);
- }
-
- buf = digest_uri_to_string (resp->uri);
- md5_update (&ctx, buf, strlen (buf));
- g_free (buf);
-
- if (resp->qop == QOP_AUTH_INT || resp->qop == QOP_AUTH_CONF)
- md5_update (&ctx, ":00000000000000000000000000000000", 33);
-
- /* now hexify A2 */
- md5_final (&ctx, digest);
- digest_hex (digest, hex_a2);
-
- /* compute KD */
- md5_init (&ctx);
- md5_update (&ctx, hex_a1, 32);
- md5_update (&ctx, ":", 1);
- md5_update (&ctx, resp->nonce, strlen (resp->nonce));
- md5_update (&ctx, ":", 1);
- md5_update (&ctx, resp->nc, 8);
- md5_update (&ctx, ":", 1);
- md5_update (&ctx, resp->cnonce, strlen (resp->cnonce));
- md5_update (&ctx, ":", 1);
- md5_update (&ctx, qop_to_string (resp->qop), strlen (qop_to_string (resp->qop)));
- md5_update (&ctx, ":", 1);
- md5_update (&ctx, hex_a2, 32);
- md5_final (&ctx, digest);
-
- digest_hex (digest, out);
-}
-
-static struct _DigestResponse *
-generate_response (struct _DigestChallenge *challenge, struct hostent *host,
- const char *protocol, const char *user, const char *passwd)
-{
- struct _DigestResponse *resp;
- struct _DigestURI *uri;
- char *bgen, digest[16];
-
- resp = g_new0 (struct _DigestResponse, 1);
- resp->username = g_strdup (user);
- /* FIXME: we should use the preferred realm */
- if (challenge->realms && challenge->realms->len > 0)
- resp->realm = g_strdup (challenge->realms->pdata[0]);
- else
- resp->realm = g_strdup ("");
-
- resp->nonce = g_strdup (challenge->nonce);
-
- /* generate the cnonce */
- bgen = g_strdup_printf ("%p:%lu:%lu", resp,
- (unsigned long) getpid (),
- (unsigned long) time (0));
- md5_get_digest (bgen, strlen (bgen), digest);
- g_free (bgen);
- /* take our recommended 64 bits of entropy */
- resp->cnonce = base64_encode_simple (digest, 8);
-
- /* we don't support re-auth so the nonce count is always 1 */
- strcpy (resp->nc, "00000001");
-
- /* choose the QOP */
- /* FIXME: choose - probably choose "auth" ??? */
- resp->qop = QOP_AUTH;
-
- /* create the URI */
- uri = g_new0 (struct _DigestURI, 1);
- uri->type = g_strdup (protocol);
- uri->host = g_strdup (host->h_name);
- uri->name = NULL;
- resp->uri = uri;
-
- /* charsets... yay */
- if (challenge->charset) {
- /* I believe that this is only ever allowed to be
- * UTF-8. We strdup the charset specified by the
- * challenge anyway, just in case it's not UTF-8.
- */
- resp->charset = g_strdup (challenge->charset);
- }
-
- resp->cipher = CIPHER_INVALID;
- if (resp->qop == QOP_AUTH_CONF) {
- /* FIXME: choose a cipher? */
- resp->cipher = CIPHER_INVALID;
- }
-
- /* we don't really care about this... */
- resp->authzid = NULL;
-
- compute_response (resp, passwd, TRUE, resp->resp);
-
- return resp;
-}
-
-static GByteArray *
-digest_response (struct _DigestResponse *resp)
-{
- GByteArray *buffer;
- const char *str;
- char *buf;
-
- buffer = g_byte_array_new ();
- g_byte_array_append (buffer, "username=\"", 10);
- if (resp->charset) {
- /* Encode the username using the requested charset */
- char *charset, *username, *outbuf;
- size_t len, outlen;
- const char *buf;
- iconv_t cd;
-
- charset = camel_charset_locale_name ();
- if (!charset)
- charset = g_strdup ("iso-8859-1");
-
- cd = iconv_open (resp->charset, charset);
- g_free (charset);
-
- len = strlen (resp->username);
- outlen = 2 * len; /* plenty of space */
-
- outbuf = username = g_malloc0 (outlen + 1);
- buf = resp->username;
- if (cd == (iconv_t) -1 || iconv (cd, &buf, &len, &outbuf, &outlen) == -1) {
- /* We can't convert to UTF-8 - pretend we never got a charset param? */
- g_free (resp->charset);
- resp->charset = NULL;
-
- /* Set the username to the non-UTF-8 version */
- g_free (username);
- username = g_strdup (resp->username);
- }
-
- if (cd != (iconv_t) -1)
- iconv_close (cd);
-
- g_byte_array_append (buffer, username, strlen (username));
- g_free (username);
- } else {
- g_byte_array_append (buffer, resp->username, strlen (resp->username));
- }
-
- g_byte_array_append (buffer, "\",realm=\"", 9);
- g_byte_array_append (buffer, resp->realm, strlen (resp->realm));
-
- g_byte_array_append (buffer, "\",nonce=\"", 9);
- g_byte_array_append (buffer, resp->nonce, strlen (resp->nonce));
-
- g_byte_array_append (buffer, "\",cnonce=\"", 10);
- g_byte_array_append (buffer, resp->cnonce, strlen (resp->cnonce));
-
- g_byte_array_append (buffer, "\",nc=", 5);
- g_byte_array_append (buffer, resp->nc, 8);
-
- g_byte_array_append (buffer, ",qop=\"", 6);
- str = qop_to_string (resp->qop);
- g_byte_array_append (buffer, str, strlen (str));
-
- g_byte_array_append (buffer, "\",digest-uri=\"", 14);
- buf = digest_uri_to_string (resp->uri);
- g_byte_array_append (buffer, buf, strlen (buf));
- g_free (buf);
-
- g_byte_array_append (buffer, "\",response=\"", 12);
- g_byte_array_append (buffer, resp->resp, 32);
- g_byte_array_append (buffer, "\"", 1);
-
- if (resp->maxbuf > 0) {
- g_byte_array_append (buffer, ",maxbuf=", 8);
- buf = g_strdup_printf ("%d", resp->maxbuf);
- g_byte_array_append (buffer, buf, strlen (buf));
- g_free (buf);
- }
-
- if (resp->charset) {
- g_byte_array_append (buffer, ",charset=\"", 10);
- g_byte_array_append (buffer, resp->charset, strlen (resp->charset));
- g_byte_array_append (buffer, "\"", 1);
- }
-
- if (resp->cipher != CIPHER_INVALID) {
- str = cipher_to_string (resp->cipher);
- if (str) {
- g_byte_array_append (buffer, ",cipher=\"", 9);
- g_byte_array_append (buffer, str, strlen (str));
- g_byte_array_append (buffer, "\"", 1);
- }
- }
-
- if (resp->authzid) {
- g_byte_array_append (buffer, ",authzid=\"", 10);
- g_byte_array_append (buffer, resp->authzid, strlen (resp->authzid));
- g_byte_array_append (buffer, "\"", 1);
- }
-
- return buffer;
-}
-
-static GByteArray *
-digest_md5_challenge (CamelSasl *sasl, GByteArray *token, CamelException *ex)
-{
- CamelSaslDigestMd5 *sasl_digest = CAMEL_SASL_DIGEST_MD5 (sasl);
- struct _CamelSaslDigestMd5Private *priv = sasl_digest->priv;
- struct _param *rspauth;
- GByteArray *ret = NULL;
- gboolean abort = FALSE;
- struct hostent *h;
- const char *ptr;
- guchar out[33];
- char *tokens;
-
- /* Need to wait for the server */
- if (!token)
- return NULL;
-
- g_return_val_if_fail (sasl->service->url->passwd != NULL, NULL);
-
- switch (priv->state) {
- case STATE_AUTH:
- if (token->len > 2048) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
- _("Server challenge too long (>2048 octets)\n"));
- return NULL;
- }
-
- tokens = g_strndup (token->data, token->len);
- priv->challenge = parse_server_challenge (tokens, &abort);
- g_free (tokens);
- if (!priv->challenge || abort) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
- _("Server challenge invalid\n"));
- return NULL;
- }
-
- if (priv->challenge->qop == QOP_INVALID) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
- _("Server challenge contained invalid "
- "\"Quality of Protection\" token\n"));
- return NULL;
- }
-
- h = camel_service_gethost (sasl->service, ex);
- priv->response = generate_response (priv->challenge, h, sasl->service_name,
- sasl->service->url->user,
- sasl->service->url->passwd);
- camel_free_host(h);
- ret = digest_response (priv->response);
-
- break;
- case STATE_FINAL:
- if (token->len)
- tokens = g_strndup (token->data, token->len);
- else
- tokens = NULL;
-
- if (!tokens || !*tokens) {
- g_free (tokens);
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
- _("Server response did not contain authorization data\n"));
- return NULL;
- }
-
- rspauth = g_new0 (struct _param, 1);
-
- ptr = tokens;
- rspauth->name = decode_token (&ptr);
- if (*ptr == '=') {
- ptr++;
- rspauth->value = decode_value (&ptr);
- }
- g_free (tokens);
-
- if (!rspauth->value) {
- g_free (rspauth->name);
- g_free (rspauth);
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
- _("Server response contained incomplete authorization data\n"));
- return NULL;
- }
-
- compute_response (priv->response, sasl->service->url->passwd, FALSE, out);
- if (memcmp (out, rspauth->value, 32) != 0) {
- g_free (rspauth->name);
- g_free (rspauth->value);
- g_free (rspauth);
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
- _("Server response does not match\n"));
- sasl->authenticated = TRUE;
-
- return NULL;
- }
-
- g_free (rspauth->name);
- g_free (rspauth->value);
- g_free (rspauth);
-
- ret = g_byte_array_new ();
-
- sasl->authenticated = TRUE;
- default:
- break;
- }
-
- priv->state++;
-
- return ret;
-}
diff --git a/camel/camel-sasl-digest-md5.h b/camel/camel-sasl-digest-md5.h
deleted file mode 100644
index b4ce831936..0000000000
--- a/camel/camel-sasl-digest-md5.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2001 Ximian, Inc. (www.ximian.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.
- *
- */
-
-#ifndef CAMEL_SASL_DIGEST_MD5_H
-#define CAMEL_SASL_DIGEST_MD5_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include <sys/types.h>
-#include <netdb.h>
-#include <camel/camel-sasl.h>
-
-#define CAMEL_SASL_DIGEST_MD5_TYPE (camel_sasl_digest_md5_get_type ())
-#define CAMEL_SASL_DIGEST_MD5(obj) (CAMEL_CHECK_CAST((obj), CAMEL_SASL_DIGEST_MD5_TYPE, CamelSaslDigestMd5))
-#define CAMEL_SASL_DIGEST_MD5_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_SASL_DIGEST_MD5_TYPE, CamelSaslDigestMd5Class))
-#define CAMEL_IS_SASL_DIGEST_MD5(o) (CAMEL_CHECK_TYPE((o), CAMEL_SASL_DIGEST_MD5_TYPE))
-
-typedef struct _CamelSaslDigestMd5 {
- CamelSasl parent_object;
- struct _CamelSaslDigestMd5Private *priv;
-
-} CamelSaslDigestMd5;
-
-
-typedef struct _CamelSaslDigestMd5Class {
- CamelSaslClass parent_class;
-
-} CamelSaslDigestMd5Class;
-
-
-/* Standard Camel function */
-CamelType camel_sasl_digest_md5_get_type (void);
-
-extern CamelServiceAuthType camel_sasl_digest_md5_authtype;
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_SASL_DIGEST_MD5_H */
diff --git a/camel/camel-sasl-kerberos4.c b/camel/camel-sasl-kerberos4.c
deleted file mode 100644
index 1698ffe870..0000000000
--- a/camel/camel-sasl-kerberos4.c
+++ /dev/null
@@ -1,223 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2001 Ximian, Inc. (www.ximian.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.
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#ifdef HAVE_KRB4
-
-#include <krb.h>
-/* MIT krb4 des.h #defines _. Sigh. We don't need it. #undef it here
- * so we get the gettexty _ definition later.
- */
-#undef _
-
-#include <string.h>
-#include "camel-sasl-kerberos4.h"
-#include "camel-service.h"
-
-CamelServiceAuthType camel_sasl_kerberos4_authtype = {
- N_("Kerberos 4"),
-
- N_("This option will connect to the server using "
- "Kerberos 4 authentication."),
-
- "KERBEROS_V4",
- FALSE
-};
-
-#define KERBEROS_V4_PROTECTION_NONE 1
-#define KERBEROS_V4_PROTECTION_INTEGRITY 2
-#define KERBEROS_V4_PROTECTION_PRIVACY 4
-
-static CamelSaslClass *parent_class = NULL;
-
-/* Returns the class for a CamelSaslKerberos4 */
-#define CSK4_CLASS(so) CAMEL_SASL_KERBEROS4_CLASS (CAMEL_OBJECT_GET_CLASS (so))
-
-static GByteArray *krb4_challenge (CamelSasl *sasl, GByteArray *token, CamelException *ex);
-
-struct _CamelSaslKerberos4Private {
- int state;
-
- guint32 nonce_n;
- guint32 nonce_h;
-
- des_cblock session;
- des_key_schedule schedule;
-};
-
-static void
-camel_sasl_kerberos4_class_init (CamelSaslKerberos4Class *camel_sasl_kerberos4_class)
-{
- CamelSaslClass *camel_sasl_class = CAMEL_SASL_CLASS (camel_sasl_kerberos4_class);
-
- parent_class = CAMEL_SASL_CLASS (camel_type_get_global_classfuncs (camel_sasl_get_type ()));
-
- /* virtual method overload */
- camel_sasl_class->challenge = krb4_challenge;
-}
-
-static void
-camel_sasl_kerberos4_init (gpointer object, gpointer klass)
-{
- CamelSaslKerberos4 *sasl_krb4 = CAMEL_SASL_KERBEROS4 (object);
-
- sasl_krb4->priv = g_new0 (struct _CamelSaslKerberos4Private, 1);
-}
-
-static void
-camel_sasl_kerberos4_finalize (CamelObject *object)
-{
- CamelSaslKerberos4 *sasl = CAMEL_SASL_KERBEROS4 (object);
-
- if (sasl->priv) {
- memset (sasl->priv, 0, sizeof (sasl->priv));
- g_free (sasl->priv);
- }
-}
-
-
-CamelType
-camel_sasl_kerberos4_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (camel_sasl_get_type (),
- "CamelSaslKerberos4",
- sizeof (CamelSaslKerberos4),
- sizeof (CamelSaslKerberos4Class),
- (CamelObjectClassInitFunc) camel_sasl_kerberos4_class_init,
- NULL,
- (CamelObjectInitFunc) camel_sasl_kerberos4_init,
- (CamelObjectFinalizeFunc) camel_sasl_kerberos4_finalize);
- }
-
- return type;
-}
-
-static GByteArray *
-krb4_challenge (CamelSasl *sasl, GByteArray *token, CamelException *ex)
-{
- struct _CamelSaslKerberos4Private *priv = CAMEL_SASL_KERBEROS4 (sasl)->priv;
- GByteArray *ret = NULL;
- char *inst, *realm, *username;
- struct hostent *h;
- int status, len;
- KTEXT_ST authenticator;
- CREDENTIALS credentials;
- guint32 plus1;
-
- /* Need to wait for the server */
- if (!token)
- return NULL;
-
- switch (priv->state) {
- case 0:
- if (token->len != 4)
- goto lose;
-
- memcpy (&priv->nonce_n, token->data, 4);
- priv->nonce_h = ntohl (priv->nonce_n);
-
- /* Our response is an authenticator including that number. */
- h = camel_service_gethost (sasl->service, ex);
- inst = g_strndup (h->h_name, strcspn (h->h_name, "."));
- g_strdown (inst);
- realm = g_strdup (krb_realmofhost (h->h_name));
- camel_free_host(h);
- status = krb_mk_req (&authenticator, sasl->service_name, inst, realm, priv->nonce_h);
- if (status == KSUCCESS) {
- status = krb_get_cred (sasl->service_name, inst, realm, &credentials);
- memcpy (priv->session, credentials.session, sizeof (priv->session));
- memset (&credentials, 0, sizeof (credentials));
- }
- g_free (inst);
- g_free (realm);
-
- if (status != KSUCCESS) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
- _("Could not get Kerberos ticket:\n%s"),
- krb_err_txt[status]);
- goto lose;
- }
- des_key_sched (&priv->session, priv->schedule);
-
- ret = g_byte_array_new ();
- g_byte_array_append (ret, (const guint8 *)authenticator.dat, authenticator.length);
- break;
-
- case 1:
- if (token->len != 8)
- goto lose;
-
- /* This one is encrypted. */
- des_ecb_encrypt ((des_cblock *)token->data, (des_cblock *)token->data, priv->schedule, 0);
-
- /* Check that the returned value is the original nonce plus one. */
- memcpy (&plus1, token->data, 4);
- if (ntohl (plus1) != priv->nonce_h + 1)
- goto lose;
-
- /* "the fifth octet contain[s] a bit-mask specifying the
- * protection mechanisms supported by the server"
- */
- if (!(token->data[4] & KERBEROS_V4_PROTECTION_NONE)) {
- g_warning ("Server does not support `no protection' :-(");
- goto lose;
- }
-
- username = sasl->service->url->user;
- len = strlen (username) + 9;
- len += 8 - len % 8;
- ret = g_byte_array_new ();
- g_byte_array_set_size (ret, len);
- memset (ret->data, 0, len);
- memcpy (ret->data, &priv->nonce_n, 4);
- ret->data[4] = KERBEROS_V4_PROTECTION_NONE;
- ret->data[5] = ret->data[6] = ret->data[7] = 0;
- strcpy (ret->data + 8, username);
-
- des_pcbc_encrypt ((void *)ret->data, (void *)ret->data, len,
- priv->schedule, &priv->session, 1);
- memset (&priv->session, 0, sizeof (priv->session));
-
- sasl->authenticated = TRUE;
- break;
- }
-
- priv->state++;
- return ret;
-
- lose:
- memset (&priv->session, 0, sizeof (priv->session));
-
- if (!camel_exception_is_set (ex)) {
- camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
- _("Bad authentication response from server."));
- }
- return NULL;
-}
-
-#endif /* HAVE_KRB4 */
diff --git a/camel/camel-sasl-kerberos4.h b/camel/camel-sasl-kerberos4.h
deleted file mode 100644
index d4bef9a876..0000000000
--- a/camel/camel-sasl-kerberos4.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2001 Ximian, Inc. (www.ximian.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.
- *
- */
-
-#ifndef CAMEL_SASL_KERBEROS4_H
-#define CAMEL_SASL_KERBEROS4_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include <sys/types.h>
-#include <netdb.h>
-#include <camel/camel-sasl.h>
-
-#define CAMEL_SASL_KERBEROS4_TYPE (camel_sasl_kerberos4_get_type ())
-#define CAMEL_SASL_KERBEROS4(obj) (CAMEL_CHECK_CAST((obj), CAMEL_SASL_KERBEROS4_TYPE, CamelSaslKerberos4))
-#define CAMEL_SASL_KERBEROS4_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_SASL_KERBEROS4_TYPE, CamelSaslKerberos4Class))
-#define CAMEL_IS_SASL_KERBEROS4(o) (CAMEL_CHECK_TYPE((o), CAMEL_SASL_KERBEROS4_TYPE))
-
-typedef struct _CamelSaslKerberos4 {
- CamelSasl parent_object;
- struct _CamelSaslKerberos4Private *priv;
-
-} CamelSaslKerberos4;
-
-
-typedef struct _CamelSaslKerberos4Class {
- CamelSaslClass parent_class;
-
-} CamelSaslKerberos4Class;
-
-
-/* Standard Camel function */
-CamelType camel_sasl_kerberos4_get_type (void);
-
-extern CamelServiceAuthType camel_sasl_kerberos4_authtype;
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_SASL_KERBEROS4_H */
diff --git a/camel/camel-sasl-login.c b/camel/camel-sasl-login.c
deleted file mode 100644
index 833578bc1d..0000000000
--- a/camel/camel-sasl-login.c
+++ /dev/null
@@ -1,134 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2001 Ximian, Inc. (www.ximian.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.
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <string.h>
-#include "camel-sasl-login.h"
-#include "camel-service.h"
-
-CamelServiceAuthType camel_sasl_login_authtype = {
- N_("NT Login"),
-
- N_("This option will connect to the server using a "
- "simple password."),
-
- "LOGIN",
- TRUE
-};
-
-enum {
- LOGIN_USER,
- LOGIN_PASSWD
-};
-
-static CamelSaslClass *parent_class = NULL;
-
-/* Returns the class for a CamelSaslLogin */
-#define CSP_CLASS(so) CAMEL_SASL_LOGIN_CLASS (CAMEL_OBJECT_GET_CLASS (so))
-
-static GByteArray *login_challenge (CamelSasl *sasl, GByteArray *token, CamelException *ex);
-
-struct _CamelSaslLoginPrivate {
- int state;
-};
-
-static void
-camel_sasl_login_class_init (CamelSaslLoginClass *camel_sasl_login_class)
-{
- CamelSaslClass *camel_sasl_class = CAMEL_SASL_CLASS (camel_sasl_login_class);
-
- parent_class = CAMEL_SASL_CLASS (camel_type_get_global_classfuncs (camel_sasl_get_type ()));
-
- /* virtual method overload */
- camel_sasl_class->challenge = login_challenge;
-}
-
-static void
-camel_sasl_login_init (gpointer object, gpointer klass)
-{
- CamelSaslLogin *sasl_login = CAMEL_SASL_LOGIN (object);
-
- sasl_login->priv = g_new0 (struct _CamelSaslLoginPrivate, 1);
-}
-
-static void
-camel_sasl_login_finalize (CamelObject *object)
-{
- CamelSaslLogin *sasl = CAMEL_SASL_LOGIN (object);
-
- g_free (sasl->priv);
-}
-
-
-CamelType
-camel_sasl_login_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (camel_sasl_get_type (),
- "CamelSaslLogin",
- sizeof (CamelSaslLogin),
- sizeof (CamelSaslLoginClass),
- (CamelObjectClassInitFunc) camel_sasl_login_class_init,
- NULL,
- (CamelObjectInitFunc) camel_sasl_login_init,
- (CamelObjectFinalizeFunc) camel_sasl_login_finalize);
- }
-
- return type;
-}
-
-static GByteArray *
-login_challenge (CamelSasl *sasl, GByteArray *token, CamelException *ex)
-{
- struct _CamelSaslLoginPrivate *priv = CAMEL_SASL_LOGIN (sasl)->priv;
- GByteArray *buf = NULL;
- CamelURL *url = sasl->service->url;
-
- g_return_val_if_fail (url->passwd != NULL, NULL);
-
- switch (priv->state) {
- case LOGIN_USER:
- buf = g_byte_array_new ();
- g_byte_array_append (buf, url->user, strlen (url->user));
- break;
- case LOGIN_PASSWD:
- buf = g_byte_array_new ();
- g_byte_array_append (buf, url->passwd, strlen (url->passwd));
-
- sasl->authenticated = TRUE;
- break;
- default:
- if (!camel_exception_is_set (ex)) {
- camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
- _("Unknown authentication state."));
- }
- }
-
- priv->state++;
-
- return buf;
-}
diff --git a/camel/camel-sasl-login.h b/camel/camel-sasl-login.h
deleted file mode 100644
index 7dacaf82e4..0000000000
--- a/camel/camel-sasl-login.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2001 Ximian, Inc. (www.ximian.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.
- *
- */
-
-#ifndef CAMEL_SASL_LOGIN_H
-#define CAMEL_SASL_LOGIN_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include <camel/camel-sasl.h>
-
-#define CAMEL_SASL_LOGIN_TYPE (camel_sasl_login_get_type ())
-#define CAMEL_SASL_LOGIN(obj) (CAMEL_CHECK_CAST((obj), CAMEL_SASL_LOGIN_TYPE, CamelSaslLogin))
-#define CAMEL_SASL_LOGIN_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_SASL_LOGIN_TYPE, CamelSaslLoginClass))
-#define CAMEL_IS_SASL_LOGIN(o) (CAMEL_CHECK_TYPE((o), CAMEL_SASL_LOGIN_TYPE))
-
-typedef struct _CamelSaslLogin {
- CamelSasl parent_object;
-
- struct _CamelSaslLoginPrivate *priv;
-
-} CamelSaslLogin;
-
-
-typedef struct _CamelSaslLoginClass {
- CamelSaslClass parent_class;
-
-} CamelSaslLoginClass;
-
-
-/* Standard Camel function */
-CamelType camel_sasl_login_get_type (void);
-
-extern CamelServiceAuthType camel_sasl_login_authtype;
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_SASL_LOGIN_H */
diff --git a/camel/camel-sasl-plain.c b/camel/camel-sasl-plain.c
deleted file mode 100644
index aea5199b68..0000000000
--- a/camel/camel-sasl-plain.c
+++ /dev/null
@@ -1,104 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2001 Ximian, Inc. (www.ximian.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.
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <string.h>
-#include "camel-sasl-plain.h"
-#include "camel-service.h"
-
-CamelServiceAuthType camel_sasl_plain_authtype = {
- N_("Password"),
-
- N_("This option will connect to the server using a "
- "simple password."),
-
- "PLAIN",
- TRUE
-};
-
-static CamelSaslClass *parent_class = NULL;
-
-/* Returns the class for a CamelSaslPlain */
-#define CSP_CLASS(so) CAMEL_SASL_PLAIN_CLASS (CAMEL_OBJECT_GET_CLASS (so))
-
-static GByteArray *plain_challenge (CamelSasl *sasl, GByteArray *token, CamelException *ex);
-
-static void
-camel_sasl_plain_class_init (CamelSaslPlainClass *camel_sasl_plain_class)
-{
- CamelSaslClass *camel_sasl_class = CAMEL_SASL_CLASS (camel_sasl_plain_class);
-
- parent_class = CAMEL_SASL_CLASS (camel_type_get_global_classfuncs (camel_sasl_get_type ()));
-
- /* virtual method overload */
- camel_sasl_class->challenge = plain_challenge;
-}
-
-CamelType
-camel_sasl_plain_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (camel_sasl_get_type (),
- "CamelSaslPlain",
- sizeof (CamelSaslPlain),
- sizeof (CamelSaslPlainClass),
- (CamelObjectClassInitFunc) camel_sasl_plain_class_init,
- NULL,
- NULL,
- NULL);
- }
-
- return type;
-}
-
-static GByteArray *
-plain_challenge (CamelSasl *sasl, GByteArray *token, CamelException *ex)
-{
- GByteArray *buf = NULL;
- CamelURL *url = sasl->service->url;
-
-#if 0
- if (token) {
- camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
- _("Authentication failed."));
- return NULL;
- }
-#endif
-
- g_return_val_if_fail (url->passwd != NULL, NULL);
-
- /* FIXME: make sure these are "UTF8-SAFE" */
- buf = g_byte_array_new ();
- g_byte_array_append (buf, "", 1);
- g_byte_array_append (buf, url->user, strlen (url->user));
- g_byte_array_append (buf, "", 1);
- g_byte_array_append (buf, url->passwd, strlen (url->passwd));
-
- sasl->authenticated = TRUE;
-
- return buf;
-}
diff --git a/camel/camel-sasl-plain.h b/camel/camel-sasl-plain.h
deleted file mode 100644
index 1e93ae5c7a..0000000000
--- a/camel/camel-sasl-plain.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2001 Ximian, Inc. (www.ximian.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.
- *
- */
-
-#ifndef CAMEL_SASL_PLAIN_H
-#define CAMEL_SASL_PLAIN_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include <camel/camel-sasl.h>
-
-#define CAMEL_SASL_PLAIN_TYPE (camel_sasl_plain_get_type ())
-#define CAMEL_SASL_PLAIN(obj) (CAMEL_CHECK_CAST((obj), CAMEL_SASL_PLAIN_TYPE, CamelSaslPlain))
-#define CAMEL_SASL_PLAIN_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_SASL_PLAIN_TYPE, CamelSaslPlainClass))
-#define CAMEL_IS_SASL_PLAIN(o) (CAMEL_CHECK_TYPE((o), CAMEL_SASL_PLAIN_TYPE))
-
-typedef struct _CamelSaslPlain {
- CamelSasl parent_object;
-
-} CamelSaslPlain;
-
-
-typedef struct _CamelSaslPlainClass {
- CamelSaslClass parent_class;
-
-} CamelSaslPlainClass;
-
-
-/* Standard Camel function */
-CamelType camel_sasl_plain_get_type (void);
-
-extern CamelServiceAuthType camel_sasl_plain_authtype;
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_SASL_PLAIN_H */
diff --git a/camel/camel-sasl.c b/camel/camel-sasl.c
deleted file mode 100644
index 4d27b37b75..0000000000
--- a/camel/camel-sasl.c
+++ /dev/null
@@ -1,256 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2001 Ximian, Inc. (www.ximian.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.
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <string.h>
-#include "camel-sasl.h"
-#include "camel-mime-utils.h"
-#include "camel-service.h"
-
-#include "camel-sasl-cram-md5.h"
-#include "camel-sasl-digest-md5.h"
-#include "camel-sasl-kerberos4.h"
-#include "camel-sasl-login.h"
-#include "camel-sasl-plain.h"
-
-static CamelObjectClass *parent_class = NULL;
-
-/* Returns the class for a CamelSasl */
-#define CS_CLASS(so) CAMEL_SASL_CLASS (CAMEL_OBJECT_GET_CLASS (so))
-
-static GByteArray *sasl_challenge (CamelSasl *sasl, GByteArray *token, CamelException *ex);
-
-static void
-camel_sasl_class_init (CamelSaslClass *camel_sasl_class)
-{
- parent_class = camel_type_get_global_classfuncs (CAMEL_OBJECT_TYPE);
-
- /* virtual method definition */
- camel_sasl_class->challenge = sasl_challenge;
-}
-
-static void
-camel_sasl_finalize (CamelSasl *sasl)
-{
- g_free (sasl->service_name);
- camel_object_unref (CAMEL_OBJECT (sasl->service));
-}
-
-CamelType
-camel_sasl_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (CAMEL_OBJECT_TYPE,
- "CamelSasl",
- sizeof (CamelSasl),
- sizeof (CamelSaslClass),
- (CamelObjectClassInitFunc) camel_sasl_class_init,
- NULL,
- NULL,
- (CamelObjectFinalizeFunc) camel_sasl_finalize);
- }
-
- return type;
-}
-
-
-static GByteArray *
-sasl_challenge (CamelSasl *sasl, GByteArray *token, CamelException *ex)
-{
- g_warning ("sasl_challenge: Using default implementation!");
- return NULL;
-}
-
-/**
- * camel_sasl_challenge:
- * @sasl: a SASL object
- * @token: a token, or %NULL
- * @ex: exception
- *
- * If @token is %NULL, generate the initial SASL message to send to
- * the server. (This will be %NULL if the client doesn't initiate the
- * exchange.) Otherwise, @token is a challenge from the server, and
- * the return value is the response.
- *
- * Return value: The SASL response or %NULL. If an error occurred, @ex
- * will also be set.
- **/
-GByteArray *
-camel_sasl_challenge (CamelSasl *sasl, GByteArray *token, CamelException *ex)
-{
- g_return_val_if_fail (CAMEL_IS_SASL (sasl), NULL);
-
- return CS_CLASS (sasl)->challenge (sasl, token, ex);
-}
-
-/**
- * camel_sasl_challenge_base64:
- * @sasl: a SASL object
- * @token: a base64-encoded token
- * @ex: exception
- *
- * As with camel_sasl_challenge(), but the challenge @token and the
- * response are both base64-encoded.
- *
- * Return value: As with camel_sasl_challenge(), but base64-encoded.
- **/
-char *
-camel_sasl_challenge_base64 (CamelSasl *sasl, const char *token, CamelException *ex)
-{
- GByteArray *token_binary, *ret_binary;
- char *ret;
- int len;
-
- g_return_val_if_fail (CAMEL_IS_SASL (sasl), NULL);
-
- if (token) {
- token_binary = g_byte_array_new ();
- len = strlen (token);
- g_byte_array_append (token_binary, token, len);
- token_binary->len = base64_decode_simple (token_binary->data, len);
- } else
- token_binary = NULL;
-
- ret_binary = camel_sasl_challenge (sasl, token_binary, ex);
- if (token_binary)
- g_byte_array_free (token_binary, TRUE);
- if (!ret_binary)
- return NULL;
-
- ret = base64_encode_simple (ret_binary->data, ret_binary->len);
- g_byte_array_free (ret_binary, TRUE);
-
- return ret;
-}
-
-/**
- * camel_sasl_authenticated:
- * @sasl: a SASL object
- *
- * Return value: whether or not @sasl has successfully authenticated
- * the user. This will be %TRUE after it returns the last needed response.
- * The caller must still pass that information on to the server and verify
- * that it has accepted it.
- **/
-gboolean
-camel_sasl_authenticated (CamelSasl *sasl)
-{
- return sasl->authenticated;
-}
-
-
-/**
- * camel_sasl_new:
- * @service_name: the SASL service name
- * @mechanism: the SASL mechanism
- * @service: the CamelService that will be using this SASL
- *
- * Return value: a new CamelSasl for the given @service_name,
- * @mechanism, and @service, or %NULL if the mechanism is not
- * supported.
- **/
-CamelSasl *
-camel_sasl_new (const char *service_name, const char *mechanism, CamelService *service)
-{
- CamelSasl *sasl;
-
- g_return_val_if_fail (service_name != NULL, NULL);
- g_return_val_if_fail (mechanism != NULL, NULL);
- g_return_val_if_fail (CAMEL_IS_SERVICE (service), NULL);
-
- /* We don't do ANONYMOUS here, because it's a little bit weird. */
-
- if (!strcmp (mechanism, "CRAM-MD5"))
- sasl = (CamelSasl *)camel_object_new (CAMEL_SASL_CRAM_MD5_TYPE);
- else if (!strcmp (mechanism, "DIGEST-MD5"))
- sasl = (CamelSasl *)camel_object_new (CAMEL_SASL_DIGEST_MD5_TYPE);
-#ifdef HAVE_KRB4
- else if (!strcmp (mechanism, "KERBEROS_V4"))
- sasl = (CamelSasl *)camel_object_new (CAMEL_SASL_KERBEROS4_TYPE);
-#endif
- else if (!strcmp (mechanism, "PLAIN"))
- sasl = (CamelSasl *)camel_object_new (CAMEL_SASL_PLAIN_TYPE);
- else if (!strcmp (mechanism, "LOGIN"))
- sasl = (CamelSasl *)camel_object_new (CAMEL_SASL_LOGIN_TYPE);
- else
- return NULL;
-
- sasl->service_name = g_strdup (service_name);
- sasl->service = service;
- camel_object_ref (CAMEL_OBJECT (service));
-
- return sasl;
-}
-
-/**
- * camel_sasl_authtype_list:
- * @include_plain: whether or not to include the PLAIN mechanism
- *
- * Return value: a GList of SASL-supported authtypes. The caller must
- * free the list, but not the contents.
- **/
-GList *
-camel_sasl_authtype_list (gboolean include_plain)
-{
- GList *types = NULL;
-
- types = g_list_prepend (types, &camel_sasl_cram_md5_authtype);
- types = g_list_prepend (types, &camel_sasl_digest_md5_authtype);
-#ifdef HAVE_KRB4
- types = g_list_prepend (types, &camel_sasl_kerberos4_authtype);
-#endif
- if (include_plain)
- types = g_list_prepend (types, &camel_sasl_plain_authtype);
-
- return types;
-}
-
-/**
- * camel_sasl_authtype:
- * @mechanism: the SASL mechanism to get an authtype for
- *
- * Return value: a CamelServiceAuthType for the given mechanism, if
- * it is supported.
- **/
-CamelServiceAuthType *
-camel_sasl_authtype (const char *mechanism)
-{
- if (!strcmp (mechanism, "CRAM-MD5"))
- return &camel_sasl_cram_md5_authtype;
- else if (!strcmp (mechanism, "DIGEST-MD5"))
- return &camel_sasl_digest_md5_authtype;
-#ifdef HAVE_KRB4
- else if (!strcmp (mechanism, "KERBEROS_V4"))
- return &camel_sasl_kerberos4_authtype;
-#endif
- else if (!strcmp (mechanism, "PLAIN"))
- return &camel_sasl_plain_authtype;
- else if (!strcmp (mechanism, "LOGIN"))
- return &camel_sasl_login_authtype;
- else
- return NULL;
-}
diff --git a/camel/camel-sasl.h b/camel/camel-sasl.h
deleted file mode 100644
index 55f2fb9e7c..0000000000
--- a/camel/camel-sasl.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2001 Ximian, Inc. (www.ximian.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.
- *
- */
-
-#ifndef CAMEL_SASL_H
-#define CAMEL_SASL_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include <glib.h>
-#include <camel/camel-object.h>
-#include <camel/camel-exception.h>
-#include <camel/camel-service.h>
-
-#define CAMEL_SASL_TYPE (camel_sasl_get_type ())
-#define CAMEL_SASL(obj) (CAMEL_CHECK_CAST((obj), CAMEL_SASL_TYPE, CamelSasl))
-#define CAMEL_SASL_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_SASL_TYPE, CamelSaslClass))
-#define CAMEL_IS_SASL(o) (CAMEL_CHECK_TYPE((o), CAMEL_SASL_TYPE))
-
-typedef struct _CamelSasl {
- CamelObject parent_object;
-
- char *service_name;
- CamelService *service;
- gboolean authenticated;
-} CamelSasl;
-
-
-typedef struct _CamelSaslClass {
- CamelObjectClass parent_class;
-
- GByteArray * (*challenge) (CamelSasl *sasl, GByteArray *token, CamelException *ex);
-
-} CamelSaslClass;
-
-
-/* Standard Camel function */
-CamelType camel_sasl_get_type (void);
-
-/* public methods */
-GByteArray *camel_sasl_challenge (CamelSasl *sasl, GByteArray *token, CamelException *ex);
-char *camel_sasl_challenge_base64 (CamelSasl *sasl, const char *token, CamelException *ex);
-
-gboolean camel_sasl_authenticated (CamelSasl *sasl);
-
-/* utility functions */
-CamelSasl *camel_sasl_new (const char *service_name, const char *mechanism, CamelService *service);
-
-GList *camel_sasl_authtype_list (gboolean include_plain);
-CamelServiceAuthType *camel_sasl_authtype (const char *mechanism);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_SASL_H */
diff --git a/camel/camel-search-private.c b/camel/camel-search-private.c
deleted file mode 100644
index de374c6127..0000000000
--- a/camel/camel-search-private.c
+++ /dev/null
@@ -1,471 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@helixcode.com>
- * Michael Zucchi <NotZed@Ximian.com>
- *
- * Copyright 2000 Helix Code, Inc. (www.helixcode.com)
- * Copyright 2001 Ximian Inc. (www.ximian.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.
- *
- */
-
-/* (from glibc headers:
- POSIX says that <sys/types.h> must be included (by the caller) before <regex.h>. */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <sys/types.h>
-#include <regex.h>
-#include <string.h>
-#include <ctype.h>
-#include <stdio.h>
-
-#include "camel-exception.h"
-#include "camel-mime-message.h"
-#include "camel-multipart.h"
-#include "camel-stream-mem.h"
-#include "e-util/e-sexp.h"
-#include <unicode.h>
-
-#include "camel-search-private.h"
-
-#define d(x)
-
-/* builds the regex into pattern */
-/* taken from camel-folder-search, with added isregex & exception parameter */
-/* Basically, we build a new regex, either based on subset regex's, or substrings,
- that can be executed once over the whoel body, to match anything suitable.
- This is more efficient than multiple searches, and probably most (naive) strstr
- implementations, over long content.
-
- A small issue is that case-insenstivity wont work entirely correct for utf8 strings. */
-int
-camel_search_build_match_regex (regex_t *pattern, camel_search_flags_t type, int argc,
- struct _ESExpResult **argv, CamelException *ex)
-{
- GString *match = g_string_new("");
- int c, i, count=0, err;
- char *word;
- int flags;
-
- /* build a regex pattern we can use to match the words, we OR them together */
- if (argc>1)
- g_string_append_c(match, '(');
- for (i=0;i<argc;i++) {
- if (argv[i]->type == ESEXP_RES_STRING) {
- if (count > 0)
- g_string_append_c(match, '|');
-
- word = argv[i]->value.string;
- if (type & CAMEL_SEARCH_MATCH_REGEX) {
- /* no need to escape because this should already be a valid regex */
- g_string_append(match, word);
- } else {
- /* escape any special chars (not sure if this list is complete) */
- if (type & CAMEL_SEARCH_MATCH_START)
- g_string_append_c(match, '^');
- while ((c = *word++)) {
- if (strchr("*\\.()[]^$+", c) != NULL) {
- g_string_append_c(match, '\\');
- }
- g_string_append_c(match, c);
- }
- if (type & CAMEL_SEARCH_MATCH_END)
- g_string_append_c(match, '^');
- }
- count++;
- } else {
- g_warning("Invalid type passed to body-contains match function");
- }
- }
- if (argc>1)
- g_string_append_c(match, ')');
- flags = REG_EXTENDED|REG_NOSUB;
- if (type & CAMEL_SEARCH_MATCH_ICASE)
- flags |= REG_ICASE;
- err = regcomp(pattern, match->str, flags);
- if (err != 0) {
- /* regerror gets called twice to get the full error string
- length to do proper posix error reporting */
- int len = regerror(err, pattern, 0, 0);
- char *buffer = g_malloc0(len + 1);
-
- regerror(err, pattern, buffer, len);
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Regular expression compilation failed: %s: %s"),
- match->str, buffer);
-
- regfree(pattern);
- }
- d(printf("Built regex: '%s'\n", match->str));
- g_string_free(match, TRUE);
- return err;
-}
-
-static unsigned char soundex_table[256] = {
- 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, 49, 50, 51, 0, 49, 50, 0, 0, 50, 50, 52, 53, 53, 0,
- 49, 50, 54, 50, 51, 0, 49, 0, 50, 0, 50, 0, 0, 0, 0, 0,
- 0, 0, 49, 50, 51, 0, 49, 50, 0, 0, 50, 50, 52, 53, 53, 0,
- 49, 50, 54, 50, 51, 0, 49, 0, 50, 0, 50, 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, 0, 0, 0, 0, 0,
-};
-
-static void
-soundexify (const gchar *sound, gchar code[5])
-{
- guchar *c, last = '\0';
- gint n;
-
- for (c = (guchar *) sound; *c && !isalpha (*c); c++);
- code[0] = toupper (*c);
- memset (code + 1, '0', 3);
- for (n = 1; *c && n < 5; c++) {
- guchar ch = soundex_table[*c];
-
- if (ch && ch != last) {
- code[n++] = ch;
- last = ch;
- }
- }
- code[4] = '\0';
-}
-
-static gboolean
-header_soundex(const char *header, const char *match)
-{
- char mcode[5], hcode[5];
- const char *p;
- char c;
- GString *word;
- int truth = FALSE;
-
- soundexify(match, mcode);
-
- /* split the header into words, and soundexify and compare each one */
- /* FIXME: Should this convert to utf8, and split based on that, and what not?
- soundex only makes sense for us-ascii though ... */
-
- word = g_string_new("");
- p = header;
- do {
- c = *p++;
- if (c == 0 || isspace(c)) {
- if (word->len > 0) {
- soundexify(word->str, hcode);
- if (strcmp(hcode, mcode) == 0)
- truth = TRUE;
- }
- g_string_truncate(word, 0);
- } else if (isalpha(c))
- g_string_append_c(word, c);
- } while (c && !truth);
- g_string_free(word, TRUE);
-
- return truth;
-}
-
-#if 0
-/* Why do it this way when the unicode lib already has a function to do this? */
-static unicode_char_t
-utf8_get (const char **inp)
-{
- guint32 c, v = 0, s, shift;
- const unsigned char *p = *inp;
-
- if (p == NULL)
- return 0;
-
- s = *p++;
- if ((s & 0x80) == 0) { /* 7 bit char */
- v = s;
- } else if (s>0xf7) { /* invalid char, we can only have upto 4 bits encoded */
- p = NULL;
- } else if (s>=0xc0) { /* valid start char */
- shift = 0;
- do {
- c = *p++;
- if ((c & 0xc0) == 0x80) {
- v = (v<<6) | (c&0x3f);
- shift += 5;
- } else {
- *inp = NULL;
- return 0;
- }
- s <<= 1;
- } while ((s & 0x80) != 0);
- v |= s << shift;
- } else { /* invalid start char, internal char */
- p = NULL;
- }
-
- *inp = p;
- return v;
-}
-#endif
-
-static unicode_char_t
-utf8_get (const char **inp)
-{
- const unsigned char *p = *inp;
- unicode_char_t c;
-
- g_return_val_if_fail (p != NULL, 0);
-
- p = unicode_get_utf8 (p, &c);
- *inp = p;
-
- return c;
-}
-
-static const char *
-camel_ustrstrcase (const char *haystack, const char *needle)
-{
- unicode_char_t *nuni, *puni;
- unicode_char_t u;
- const char *p;
-
- g_return_val_if_fail (haystack != NULL, NULL);
- g_return_val_if_fail (needle != NULL, NULL);
-
- if (strlen(needle) == 0)
- return haystack;
- if (strlen(haystack) == 0)
- return NULL;
-
- puni = nuni = alloca (sizeof (unicode_char_t) * strlen (needle));
-
- p = needle;
- while ((u = utf8_get (&p)))
- *puni++ = unicode_tolower (u);
-
- /* NULL means there was illegal utf-8 sequence */
- if (!p)
- return NULL;
-
- p = haystack;
- while ((u = utf8_get (&p))) {
- unicode_char_t c;
-
- c = unicode_tolower (u);
- /* We have valid stripped char */
- if (c == nuni[0]) {
- const gchar *q = p;
- gint npos = 1;
-
- while (nuni + npos < puni) {
- u = utf8_get (&q);
- if (!q || !u)
- return NULL;
-
- c = unicode_tolower (u);
- if (c != nuni[npos])
- break;
-
- npos++;
- }
-
- if (nuni + npos == puni)
- return p;
- }
- }
-
- return NULL;
-}
-
-#define CAMEL_SEARCH_COMPARE(x, y, z) G_STMT_START { \
- if ((x) == (z)) { \
- if ((y) == (z)) \
- return 0; \
- else \
- return -1; \
- } else if ((y) == (z)) \
- return 1; \
-} G_STMT_END
-
-static int
-camel_ustrcasecmp (const char *s1, const char *s2)
-{
- unicode_char_t u1, u2 = 0;
-
- CAMEL_SEARCH_COMPARE (s1, s2, NULL);
-
- u1 = utf8_get (&s1);
- u2 = utf8_get (&s2);
- while (u1 && u2) {
- u1 = unicode_tolower (u1);
- u2 = unicode_tolower (u2);
- if (u1 < u2)
- return -1;
- else if (u1 > u2)
- return 1;
-
- u1 = utf8_get (&s1);
- u2 = utf8_get (&s2);
- }
-
- /* end of one of the strings ? */
- CAMEL_SEARCH_COMPARE (u1, u2, 0);
-
- /* if we have invalid utf8 sequence ? */
- CAMEL_SEARCH_COMPARE (s1, s2, NULL);
-
- return 0;
-}
-
-static int
-camel_ustrncasecmp (const char *s1, const char *s2, size_t len)
-{
- unicode_char_t u1, u2 = 0;
-
- CAMEL_SEARCH_COMPARE (s1, s2, NULL);
-
- u1 = utf8_get (&s1);
- u2 = utf8_get (&s2);
- while (len > 0 && u1 && u2) {
- u1 = unicode_tolower (u1);
- u2 = unicode_tolower (u2);
- if (u1 < u2)
- return -1;
- else if (u1 > u2)
- return 1;
-
- len--;
- u1 = utf8_get (&s1);
- u2 = utf8_get (&s2);
- }
-
- if (len == 0)
- return 0;
-
- /* end of one of the strings ? */
- CAMEL_SEARCH_COMPARE (u1, u2, 0);
-
- /* if we have invalid utf8 sequence ? */
- CAMEL_SEARCH_COMPARE (s1, s2, NULL);
-
- return 0;
-}
-
-
-/* searhces for match inside value, if match is mixed case, hten use case-sensitive,
- else insensitive */
-gboolean
-camel_search_header_match (const char *value, const char *match, camel_search_match_t how)
-{
- const char *p;
- int vlen, mlen;
-
- while (*value && isspace (*value))
- value++;
-
- if (how == CAMEL_SEARCH_MATCH_SOUNDEX)
- return header_soundex (value, match);
-
- vlen = strlen (value);
- mlen = strlen (match);
- if (vlen < mlen)
- return FALSE;
-
- /* from dan the man, if we have mixed case, perform a case-sensitive match,
- otherwise not */
- p = match;
- while (*p) {
- if (isupper(*p)) {
- switch(how) {
- case CAMEL_SEARCH_MATCH_EXACT:
- return strcmp(value, match) == 0;
- case CAMEL_SEARCH_MATCH_CONTAINS:
- return strstr(value, match) != NULL;
- case CAMEL_SEARCH_MATCH_STARTS:
- return strncmp (value, match, mlen) == 0;
- case CAMEL_SEARCH_MATCH_ENDS:
- return strcmp (value + vlen - mlen, match) == 0;
- default:
- break;
- }
- return FALSE;
- }
- p++;
- }
- switch(how) {
- case CAMEL_SEARCH_MATCH_EXACT:
- return camel_ustrcasecmp(value, match) == 0;
- case CAMEL_SEARCH_MATCH_CONTAINS:
- return camel_ustrstrcase(value, match) != NULL;
- case CAMEL_SEARCH_MATCH_STARTS:
- return camel_ustrncasecmp (value, match, mlen) == 0;
- case CAMEL_SEARCH_MATCH_ENDS:
- return camel_ustrcasecmp (value + vlen - mlen, match) == 0;
- default:
- break;
- }
-
- return FALSE;
-}
-
-/* performs a 'slow' content-based match */
-/* there is also an identical copy of this in camel-filter-search.c */
-gboolean
-camel_search_message_body_contains(CamelDataWrapper *object, regex_t *pattern)
-{
- CamelDataWrapper *containee;
- int truth = FALSE;
- int parts, i;
-
- containee = camel_medium_get_content_object(CAMEL_MEDIUM(object));
-
- if (containee == NULL)
- return FALSE;
-
- /* TODO: I find it odd that get_part and get_content_object do not
- add a reference, probably need fixing for multithreading */
-
- /* using the object types is more accurate than using the mime/types */
- if (CAMEL_IS_MULTIPART(containee)) {
- parts = camel_multipart_get_number(CAMEL_MULTIPART(containee));
- for (i=0;i<parts && truth==FALSE;i++) {
- CamelDataWrapper *part = (CamelDataWrapper *)camel_multipart_get_part(CAMEL_MULTIPART(containee), i);
- if (part)
- truth = camel_search_message_body_contains(part, pattern);
- }
- } else if (CAMEL_IS_MIME_MESSAGE(containee)) {
- /* for messages we only look at its contents */
- truth = camel_search_message_body_contains((CamelDataWrapper *)containee, pattern);
- } else if (header_content_type_is(CAMEL_DATA_WRAPPER(containee)->mime_type, "text", "*")) {
- /* for all other text parts, we look inside, otherwise we dont care */
- CamelStreamMem *mem = (CamelStreamMem *)camel_stream_mem_new();
-
- camel_data_wrapper_write_to_stream(containee, (CamelStream *)mem);
- camel_stream_write((CamelStream *)mem, "", 1);
- truth = regexec(pattern, mem->buffer->data, 0, NULL, 0) == 0;
- camel_object_unref((CamelObject *)mem);
- }
- return truth;
-}
-
diff --git a/camel/camel-search-private.h b/camel/camel-search-private.h
deleted file mode 100644
index aff881f32f..0000000000
--- a/camel/camel-search-private.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (C) 2001 Ximian Inc.
- *
- * Authors: Michael Zucchi <notzed@helixcode.com>
- *
- * 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_SEARCH_PRIVATE_H
-#define _CAMEL_SEARCH_PRIVATE_H
-
-typedef enum {
- CAMEL_SEARCH_MATCH_START = 1<<0,
- CAMEL_SEARCH_MATCH_END = 1<<1,
- CAMEL_SEARCH_MATCH_REGEX = 1<<2, /* disables the first 2 */
- CAMEL_SEARCH_MATCH_ICASE = 1<<3,
-} camel_search_flags_t;
-
-typedef enum {
- CAMEL_SEARCH_MATCH_EXACT,
- CAMEL_SEARCH_MATCH_CONTAINS,
- CAMEL_SEARCH_MATCH_STARTS,
- CAMEL_SEARCH_MATCH_ENDS,
- CAMEL_SEARCH_MATCH_SOUNDEX,
-} camel_search_match_t;
-
-/* builds a regex that represents a string search */
-int camel_search_build_match_regex(regex_t *pattern, camel_search_flags_t type, int argc, struct _ESExpResult **argv, CamelException *ex);
-gboolean camel_search_message_body_contains(CamelDataWrapper *object, regex_t *pattern);
-
-gboolean camel_search_header_match(const char *value, const char *match, camel_search_match_t how);
-gboolean camel_search_header_soundex(const char *header, const char *match);
-
-#endif /* ! _CAMEL_SEARCH_PRIVATE_H */
diff --git a/camel/camel-seekable-stream.c b/camel/camel-seekable-stream.c
deleted file mode 100644
index 45a6a6edf4..0000000000
--- a/camel/camel-seekable-stream.c
+++ /dev/null
@@ -1,203 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author:
- * Bertrand Guiheneuf <bertrand@helixcode.com>
- *
- * 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "camel-seekable-stream.h"
-
-static CamelStreamClass *parent_class = NULL;
-
-/* Returns the class for a CamelSeekableStream */
-#define CSS_CLASS(so) CAMEL_SEEKABLE_STREAM_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-
-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 = CAMEL_STREAM_CLASS( camel_type_get_global_classfuncs( CAMEL_STREAM_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;
-}
-
-CamelType
-camel_seekable_stream_get_type (void)
-{
- static CamelType camel_seekable_stream_type = CAMEL_INVALID_TYPE;
-
- if (camel_seekable_stream_type == CAMEL_INVALID_TYPE) {
- camel_seekable_stream_type = camel_type_register( CAMEL_STREAM_TYPE,
- "CamelSeekableStream",
- sizeof( CamelSeekableStream ),
- sizeof( CamelSeekableStreamClass ),
- (CamelObjectClassInitFunc) camel_seekable_stream_class_init,
- NULL,
- (CamelObjectInitFunc) camel_seekable_stream_init,
- NULL );
- }
-
- 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 3c0eb24a5c..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 <bertrand@helixcode.com>
- *
- * 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 <sys/types.h>
-#include <unistd.h>
-#include <camel/camel-stream.h>
-
-#define CAMEL_SEEKABLE_STREAM_TYPE (camel_seekable_stream_get_type ())
-#define CAMEL_SEEKABLE_STREAM(obj) (CAMEL_CHECK_CAST((obj), CAMEL_SEEKABLE_STREAM_TYPE, CamelSeekableStream))
-#define CAMEL_SEEKABLE_STREAM_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_SEEKABLE_STREAM_TYPE, CamelSeekableStreamClass))
-#define CAMEL_IS_SEEKABLE_STREAM(o) (CAMEL_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 Camel function */
-CamelType 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 d2990b6b80..0000000000
--- a/camel/camel-seekable-substream.c
+++ /dev/null
@@ -1,304 +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 <bertrand@helixcode.com>
- * Michael Zucchi <notzed@helixcode.com>
- *
- * 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "camel-seekable-substream.h"
-
-static CamelSeekableStreamClass *parent_class = NULL;
-
-/* Returns the class for a CamelSeekableSubStream */
-#define CSS_CLASS(so) CAMEL_SEEKABLE_SUBSTREAM_CLASS (CAMEL_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
-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);
-
- parent_class = CAMEL_SEEKABLE_STREAM_CLASS (camel_type_get_global_classfuncs (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;
-
-}
-
-static void
-camel_seekable_substream_finalize (CamelObject *object)
-{
- CamelSeekableSubstream *seekable_substream =
- CAMEL_SEEKABLE_SUBSTREAM (object);
-
- if (seekable_substream->parent_stream)
- camel_object_unref (CAMEL_OBJECT (seekable_substream->parent_stream));
-}
-
-
-CamelType
-camel_seekable_substream_get_type (void)
-{
- static CamelType camel_seekable_substream_type = CAMEL_INVALID_TYPE;
-
- if (camel_seekable_substream_type == CAMEL_INVALID_TYPE) {
- camel_seekable_substream_type = camel_type_register (camel_seekable_stream_get_type (), "CamelSeekableSubstream",
- sizeof (CamelSeekableSubstream),
- sizeof (CamelSeekableSubstreamClass),
- (CamelObjectClassInitFunc) camel_seekable_substream_class_init,
- NULL,
- NULL,
- (CamelObjectFinalizeFunc) camel_seekable_substream_finalize);
- }
-
- return camel_seekable_substream_type;
-}
-
-/**
- * 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 = CAMEL_SEEKABLE_SUBSTREAM (camel_object_new (camel_seekable_substream_get_type ()));
-
- /* Initialize it. */
- seekable_substream->parent_stream = parent_stream;
- camel_object_ref (CAMEL_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 - it's 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)
-{
- 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 written. */
- 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_write((CamelStream *)parent, buffer, n);
-
- /* ignore <0 - it's an error, let the caller deal */
- if (v > 0)
- seekable_stream->position += v;
-
- return v;
-
-}
-
-static int
-stream_flush (CamelStream *stream)
-{
- CamelSeekableSubstream *sus = (CamelSeekableSubstream *)stream;
-
- return camel_stream_flush(CAMEL_STREAM(sus->parent_stream));
-}
-
-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:
- if (seekable_stream->bound_end == CAMEL_STREAM_UNBOUND) {
- real_offset = camel_seekable_stream_seek(seekable_substream->parent_stream,
- offset,
- CAMEL_STREAM_END);
- if (real_offset != -1) {
- if (real_offset<seekable_stream->bound_start)
- real_offset = seekable_stream->bound_start;
- seekable_stream->position = real_offset;
- }
- return real_offset;
- }
- real_offset = seekable_stream->bound_end + offset;
- break;
- }
-
- if (seekable_stream->bound_end != CAMEL_STREAM_UNBOUND)
- real_offset = MIN (real_offset, seekable_stream->bound_end);
-
- if (real_offset<seekable_stream->bound_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 6ac5588a42..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 <bertrand@helixcode.com>
- *
- * 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 <camel/camel-seekable-stream.h>
-
-#define CAMEL_SEEKABLE_SUBSTREAM_TYPE (camel_seekable_substream_get_type ())
-#define CAMEL_SEEKABLE_SUBSTREAM(obj) (CAMEL_CHECK_CAST((obj), CAMEL_SEEKABLE_SUBSTREAM_TYPE, CamelSeekableSubstream))
-#define CAMEL_SEEKABLE_SUBSTREAM_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_SEEKABLE_SUBSTREAM_TYPE, CamelSeekableSubstreamClass))
-#define CAMEL_IS_SEEKABLE_SUBSTREAM(o) (CAMEL_CHECK_TYPE((o), CAMEL_SEEKABLE_SUBSTREAM_TYPE))
-
-struct _CamelSeekableSubstream
-{
- CamelSeekableStream parent_object;
-
- /* --**-- Private fields --**-- */
- CamelSeekableStream *parent_stream;
-};
-
-typedef struct {
- CamelSeekableStreamClass parent_class;
-
-} CamelSeekableSubstreamClass;
-
-/* Standard Camel function */
-CamelType 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 8c37b0e79d..0000000000
--- a/camel/camel-service.c
+++ /dev/null
@@ -1,630 +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 <bertrand@helixcode.com>
- *
- * 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <ctype.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-
-#ifdef ENABLE_THREADS
-#include <pthread.h>
-#include "e-util/e-msgport.h"
-#endif
-
-#include "camel-service.h"
-#include "camel-session.h"
-#include "camel-exception.h"
-#include "camel-operation.h"
-#include "camel-private.h"
-
-#define d(x)
-
-static CamelObjectClass *parent_class = NULL;
-
-/* Returns the class for a CamelService */
-#define CSERV_CLASS(so) CAMEL_SERVICE_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-
-static void construct (CamelService *service, CamelSession *session,
- CamelProvider *provider, CamelURL *url,
- CamelException *ex);
-static gboolean service_connect(CamelService *service, CamelException *ex);
-static gboolean service_disconnect(CamelService *service, gboolean clean,
- CamelException *ex);
-/*static gboolean is_connected (CamelService *service);*/
-static GList * query_auth_types (CamelService *service, CamelException *ex);
-static char * get_name (CamelService *service, gboolean brief);
-static char * get_path (CamelService *service);
-
-
-static void
-camel_service_class_init (CamelServiceClass *camel_service_class)
-{
- parent_class = camel_type_get_global_classfuncs (CAMEL_OBJECT_TYPE);
-
- /* virtual method definition */
- camel_service_class->construct = construct;
- camel_service_class->connect = service_connect;
- camel_service_class->disconnect = service_disconnect;
- camel_service_class->query_auth_types = query_auth_types;
- camel_service_class->get_name = get_name;
- camel_service_class->get_path = get_path;
-}
-
-static void
-camel_service_init (void *o, void *k)
-{
- CamelService *service = o;
-
- service->priv = g_malloc0(sizeof(*service->priv));
-#ifdef ENABLE_THREADS
- service->priv->connect_lock = e_mutex_new(E_MUTEX_REC);
-#endif
-}
-
-static void
-camel_service_finalize (CamelObject *object)
-{
- CamelService *camel_service = CAMEL_SERVICE (object);
-
- if (camel_service->connected) {
- CamelException ex;
-
- /*g_warning ("camel_service_finalize: finalizing while still connected!");*/
- camel_exception_init (&ex);
- CSERV_CLASS (camel_service)->disconnect (camel_service, FALSE, &ex);
- if (camel_exception_is_set (&ex)) {
- g_warning ("camel_service_finalize: silent disconnect failure: %s",
- camel_exception_get_description(&ex));
- }
- camel_exception_clear (&ex);
- }
-
- if (camel_service->url)
- camel_url_free (camel_service->url);
- if (camel_service->session)
- camel_object_unref (CAMEL_OBJECT (camel_service->session));
-
-#ifdef ENABLE_THREADS
- e_mutex_destroy(camel_service->priv->connect_lock);
-#endif
- g_free(camel_service->priv);
-}
-
-
-
-CamelType
-camel_service_get_type (void)
-{
- static CamelType camel_service_type = CAMEL_INVALID_TYPE;
-
- if (camel_service_type == CAMEL_INVALID_TYPE) {
- camel_service_type =
- camel_type_register (CAMEL_OBJECT_TYPE, "CamelService",
- sizeof (CamelService),
- sizeof (CamelServiceClass),
- (CamelObjectClassInitFunc) camel_service_class_init,
- NULL,
- (CamelObjectInitFunc) camel_service_init,
- camel_service_finalize );
- }
-
- return camel_service_type;
-}
-
-
-static void
-construct (CamelService *service, CamelSession *session,
- CamelProvider *provider, CamelURL *url, CamelException *ex)
-{
- char *url_string;
-
- if (CAMEL_PROVIDER_NEEDS (provider, CAMEL_URL_PART_USER) &&
- (url->user == NULL || url->user[0] == '\0')) {
- url_string = camel_url_to_string (url, CAMEL_URL_HIDE_PASSWORD);
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_URL_INVALID,
- _("URL '%s' needs a username component"),
- url_string);
- g_free (url_string);
- return;
- } else if (CAMEL_PROVIDER_NEEDS (provider, CAMEL_URL_PART_HOST) &&
- (url->host == NULL || url->host[0] == '\0')) {
- url_string = camel_url_to_string (url, CAMEL_URL_HIDE_PASSWORD);
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_URL_INVALID,
- _("URL '%s' needs a host component"),
- url_string);
- g_free (url_string);
- return;
- } else if (CAMEL_PROVIDER_NEEDS (provider, CAMEL_URL_PART_PATH) &&
- (url->path == NULL || url->path[0] == '\0')) {
- url_string = camel_url_to_string (url, CAMEL_URL_HIDE_PASSWORD);
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_URL_INVALID,
- _("URL '%s' needs a path component"),
- url_string);
- g_free (url_string);
- return;
- }
-
- service->provider = provider;
- service->url = url;
- service->session = session;
- camel_object_ref (CAMEL_OBJECT (session));
-
- service->connected = FALSE;
-}
-
-/**
- * camel_service_construct:
- * @service: the CamelService
- * @session: the session for the service
- * @provider: the service's provider
- * @url: the default URL for the service (may be NULL)
- * @ex: a CamelException
- *
- * Constructs a CamelService initialized with the given parameters.
- **/
-void
-camel_service_construct (CamelService *service, CamelSession *session,
- CamelProvider *provider, CamelURL *url,
- CamelException *ex)
-{
- g_return_if_fail (CAMEL_IS_SERVICE (service));
- g_return_if_fail (CAMEL_IS_SESSION (session));
-
- CSERV_CLASS (service)->construct (service, session, provider, url, ex);
-}
-
-
-static gboolean
-service_connect (CamelService *service, CamelException *ex)
-{
- /* Things like the CamelMboxStore can validly
- * not define a connect function.
- */
- return TRUE;
-}
-
-/**
- * camel_service_connect:
- * @service: CamelService object
- * @ex: a CamelException
- *
- * Connect to the service using the parameters it was initialized
- * with.
- *
- * Return value: whether or not the connection succeeded
- **/
-
-gboolean
-camel_service_connect (CamelService *service, CamelException *ex)
-{
- gboolean ret = FALSE;
-
- g_return_val_if_fail (CAMEL_IS_SERVICE (service), FALSE);
- g_return_val_if_fail (service->session != NULL, FALSE);
- g_return_val_if_fail (service->url != NULL, FALSE);
-
- CAMEL_SERVICE_LOCK(service, connect_lock);
-
- if (service->connected) {
- /* But we're still connected, so no exception
- * and return true.
- */
- g_warning ("camel_service_connect: trying to connect to an already connected service");
- ret = TRUE;
- } else if (CSERV_CLASS (service)->connect (service, ex)) {
- service->connected = TRUE;
- ret = TRUE;
- }
-
- CAMEL_SERVICE_UNLOCK(service, connect_lock);
-
- return ret;
-}
-
-static gboolean
-service_disconnect (CamelService *service, gboolean clean, CamelException *ex)
-{
- /*service->connect_level--;*/
-
- /* We let people get away with not having a disconnect
- * function -- CamelMboxStore, for example.
- */
-
- return TRUE;
-}
-
-/**
- * camel_service_disconnect:
- * @service: CamelService object
- * @clean: whether or not to try to disconnect cleanly.
- * @ex: a CamelException
- *
- * Disconnect from the service. If @clean is %FALSE, it should not
- * try to do any synchronizing or other cleanup of the connection.
- *
- * Return value: whether or not the disconnection succeeded without
- * errors. (Consult @ex if %FALSE.)
- **/
-gboolean
-camel_service_disconnect (CamelService *service, gboolean clean,
- CamelException *ex)
-{
- gboolean res = TRUE;
-
- CAMEL_SERVICE_LOCK(service, connect_lock);
-
- if (service->connected) {
- res = CSERV_CLASS (service)->disconnect (service, clean, ex);
- service->connected = FALSE;
- }
-
- CAMEL_SERVICE_UNLOCK(service, connect_lock);
-
- return res;
-}
-
-/**
- * camel_service_get_url:
- * @service: a 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);
-}
-
-
-static char *
-get_name (CamelService *service, gboolean brief)
-{
- g_warning ("CamelService::get_name not implemented for `%s'",
- camel_type_to_name (CAMEL_OBJECT_GET_TYPE (service)));
- return g_strdup ("???");
-}
-
-/**
- * camel_service_get_name:
- * @service: the service
- * @brief: whether or not to use a briefer form
- *
- * This gets the name of the service in a "friendly" (suitable for
- * humans) form. If @brief is %TRUE, this should be a brief description
- * such as for use in the folder tree. If @brief is %FALSE, it should
- * be a more complete and mostly unambiguous description.
- *
- * Return value: the description, which the caller must free.
- **/
-char *
-camel_service_get_name (CamelService *service, gboolean brief)
-{
- g_return_val_if_fail (CAMEL_IS_SERVICE (service), NULL);
- g_return_val_if_fail (service->url, NULL);
-
- return CSERV_CLASS (service)->get_name (service, brief);
-}
-
-
-static char *
-get_path (CamelService *service)
-{
- GString *gpath;
- char *path;
- CamelURL *url = service->url;
- CamelProvider *prov = service->provider;
-
- /* A sort of ad-hoc default implementation that works for our
- * current set of services.
- */
-
- gpath = g_string_new (service->provider->protocol);
- if (CAMEL_PROVIDER_ALLOWS (prov, CAMEL_URL_PART_USER)) {
- if (CAMEL_PROVIDER_ALLOWS (prov, CAMEL_URL_PART_HOST)) {
- g_string_sprintfa (gpath, "/%s@%s",
- url->user ? url->user : "",
- url->host ? url->host : "");
-
- if (url->port)
- g_string_sprintfa (gpath, ":%d", url->port);
- } else {
- g_string_sprintfa (gpath, "/%s%s",
- url->user ? url->user : "",
- CAMEL_PROVIDER_NEEDS (prov, CAMEL_URL_PART_USER) ? "" : "@");
- }
- } else if (CAMEL_PROVIDER_ALLOWS (prov, CAMEL_URL_PART_HOST)) {
- g_string_sprintfa (gpath, "/%s%s",
- CAMEL_PROVIDER_NEEDS (prov, CAMEL_URL_PART_HOST) ? "" : "@",
- url->host ? url->host : "");
-
- if (url->port)
- g_string_sprintfa (gpath, ":%d", url->port);
- }
- if (CAMEL_PROVIDER_NEEDS (prov, CAMEL_URL_PART_PATH)) {
- g_string_sprintfa (gpath, "%s%s",
- *url->path == '/' ? "" : "/",
- url->path);
- }
-
- path = gpath->str;
- g_string_free (gpath, FALSE);
- return path;
-}
-
-/**
- * camel_service_get_path:
- * @service: the service
- *
- * This gets a valid UNIX relative path describing the service, which
- * is guaranteed to be different from the path returned for any
- * different service. This path MUST start with the name of the
- * provider, followed by a "/", but after that, it is up to the
- * provider.
- *
- * Return value: the path, which the caller must free.
- **/
-char *
-camel_service_get_path (CamelService *service)
-{
- g_return_val_if_fail (CAMEL_IS_SERVICE (service), NULL);
- g_return_val_if_fail (service->url, NULL);
-
- return CSERV_CLASS (service)->get_path (service);
-}
-
-
-/**
- * camel_service_get_session:
- * @service: a service
- *
- * Returns the CamelSession associated with the service.
- *
- * Return value: the session
- **/
-CamelSession *
-camel_service_get_session (CamelService *service)
-{
- return service->session;
-}
-
-/**
- * camel_service_get_provider:
- * @service: a service
- *
- * Returns the CamelProvider associated with the service.
- *
- * Return value: the provider
- **/
-CamelProvider *
-camel_service_get_provider (CamelService *service)
-{
- return service->provider;
-}
-
-static GList *
-query_auth_types (CamelService *service, CamelException *ex)
-{
- return NULL;
-}
-
-/**
- * camel_service_query_auth_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.
- *
- * Return value: a list of CamelServiceAuthType records. The caller
- * must free the list with g_list_free() when it is done with it.
- **/
-GList *
-camel_service_query_auth_types (CamelService *service, CamelException *ex)
-{
- GList *ret;
-
- /* note that we get the connect lock here, which means the callee
- must not call the connect functions itself */
- CAMEL_SERVICE_LOCK(service, connect_lock);
- ret = CSERV_CLASS (service)->query_auth_types (service, ex);
- CAMEL_SERVICE_UNLOCK(service, connect_lock);
-
- return ret;
-}
-
-/* URL utility routines */
-
-/**
- * camel_service_gethost:
- * @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)
-{
- char *hostname;
- struct hostent *h;
-
- if (service->url->host)
- hostname = service->url->host;
- else
- hostname = "localhost";
-
- return camel_get_host_byname(hostname, ex);
-}
-
-#ifdef offsetof
-#define STRUCT_OFFSET(type, field) ((gint) offsetof (type, field))
-#else
-#define STRUCT_OFFSET(type, field) ((gint) ((gchar*) &((type *) 0)->field))
-#endif
-
-struct _lookup_msg {
-#ifdef ENABLE_THREADS
- EMsg msg;
-#endif
- const char *name;
- int result;
- int herr;
- struct hostent hostbuf;
-#ifndef GETHOSTBYNAME_R_FIVE_ARGS
- struct hostent *hp;
-#endif
- int hostbuflen;
- char *hostbufmem;
-};
-
-static void *
-get_host(void *data)
-{
- struct _lookup_msg *info = data;
-
-#ifdef GETHOSTBYNAME_R_FIVE_ARGS
- while (gethostbyname_r(info->name, &info->hostbuf, info->hostbufmem, info->hostbuflen, &info->herr) && info->herr == ERANGE) {
-#else
- while ((info->result = gethostbyname_r(info->name, &info->hostbuf, info->hostbufmem, info->hostbuflen, &info->hp, &info->herr)) == ERANGE) {
-#endif
- d(printf("gethostbyname fialed?\n"));
-#ifdef ENABLE_THREADS
- pthread_testcancel();
-#endif
- info->hostbuflen *= 2;
- info->hostbufmem = g_realloc(info->hostbufmem, info->hostbuflen);
- }
-
- d(printf("gethostbyname ok?\n"));
-
-#ifdef ENABLE_THREADS
- e_msgport_reply((EMsg *)info);
-#endif
- return NULL;
-}
-
-struct hostent *camel_get_host_byname(const char *name, CamelException *ex)
-{
-#ifdef ENABLE_THREADS
- int fdmax, fd, cancel_fd;
-#endif
- struct _lookup_msg *msg;
-
- g_return_val_if_fail(name != NULL, NULL);
-
- if (camel_operation_cancel_check(NULL)) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_USER_CANCEL, _("Cancelled"));
- return NULL;
- }
-
- camel_operation_start(NULL, _("Resolving: %s"), name);
-
- msg = g_malloc0(sizeof(*msg));
- msg->hostbuflen = 1024;
- msg->hostbufmem = g_malloc(msg->hostbuflen);
- msg->name = name;
-
-#ifdef ENABLE_THREADS
- cancel_fd = camel_operation_cancel_fd(NULL);
- if (cancel_fd == -1) {
-#endif
- get_host(msg);
-#ifdef ENABLE_THREADS
- } else {
- EMsgPort *reply_port;
- pthread_t id;
- fd_set rdset;
-
- reply_port = msg->msg.reply_port = e_msgport_new();
- fd = e_msgport_fd(msg->msg.reply_port);
- if (pthread_create(&id, NULL, get_host, msg) == 0) {
- FD_ZERO(&rdset);
- FD_SET(cancel_fd, &rdset);
- FD_SET(fd, &rdset);
- fdmax = MAX(fd, cancel_fd) + 1;
- d(printf("waiting for name return/cancellation in main process\n"));
- if (select(fdmax, &rdset, NULL, 0, NULL) == -1) {
- camel_exception_setv(ex, 1, _("Failure in name lookup: %s"), strerror(errno));
- d(printf("Cancelling lookup thread\n"));
- pthread_cancel(id);
- } else if (FD_ISSET(cancel_fd, &rdset)) {
- d(printf("Cancelling lookup thread\n"));
- camel_exception_setv(ex, CAMEL_EXCEPTION_USER_CANCEL, _("Cancelled"));
- pthread_cancel(id);
- } else {
- struct _lookup_msg *reply = (struct _lookup_msg *)e_msgport_get(reply_port);
-
- g_assert(reply == msg);
- }
- d(printf("waiting for child to exit\n"));
- pthread_join(id, NULL);
- d(printf("child done\n"));
- }
- e_msgport_destroy(reply_port);
- }
-#endif
-
- camel_operation_end(NULL);
-
- if (msg->herr) {
- if (!camel_exception_is_set(ex)) {
- if (msg->herr == HOST_NOT_FOUND || msg->herr == NO_DATA)
- camel_exception_setv(ex, 1, _("Host lookup failed: %s: host not found"), name);
- else
- camel_exception_setv(ex, 1, _("Host lookup failed: %s: unknown reason"), name);
- }
- g_free(msg->hostbufmem);
- g_free(msg);
- return NULL;
- } else {
- return &msg->hostbuf;
- }
-}
-
-void camel_free_host(struct hostent *h)
-{
- struct _lookup_msg *msg;
-
- g_return_if_fail(h != NULL);
-
- /* yeah this looks ugly but it is safe. we passed out a reference to inside our structure, this maps it
- to the base structure, so we can free everything right without having to keep track of it separately */
- msg = (struct _lookup_msg *)(((char *)h) - STRUCT_OFFSET(struct _lookup_msg, hostbuf));
-
- g_free(msg->hostbufmem);
- g_free(msg);
-}
diff --git a/camel/camel-service.h b/camel/camel-service.h
deleted file mode 100644
index 64574123d5..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 <bertrand@helixcode.com>
- *
- * 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 <netdb.h>
-#include <camel/camel-object.h>
-#include <camel/camel-url.h>
-#include <camel/camel-provider.h>
-
-#define CAMEL_SERVICE_TYPE (camel_service_get_type ())
-#define CAMEL_SERVICE(obj) (CAMEL_CHECK_CAST((obj), CAMEL_SERVICE_TYPE, CamelService))
-#define CAMEL_SERVICE_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_SERVICE_TYPE, CamelServiceClass))
-#define CAMEL_IS_SERVICE(o) (CAMEL_CHECK_TYPE((o), CAMEL_SERVICE_TYPE))
-
-
-struct _CamelService {
- CamelObject parent_object;
- struct _CamelServicePrivate *priv;
-
- CamelSession *session;
- CamelProvider *provider;
- gboolean connected;
- CamelURL *url;
-};
-
-
-typedef struct {
- CamelObjectClass parent_class;
-
- void (*construct) (CamelService *service,
- CamelSession *session,
- CamelProvider *provider,
- CamelURL *url,
- CamelException *ex);
-
- gboolean (*connect) (CamelService *service,
- CamelException *ex);
- gboolean (*disconnect) (CamelService *service,
- gboolean clean,
- CamelException *ex);
-
- GList * (*query_auth_types) (CamelService *service,
- CamelException *ex);
-
- char * (*get_name) (CamelService *service,
- gboolean brief);
- char * (*get_path) (CamelService *service);
-
-} CamelServiceClass;
-
-
-/* query_auth_types returns a GList of these */
-typedef struct {
- char *name; /* user-friendly name */
- char *description;
- char *authproto;
-
- gboolean need_password; /* needs a password to authenticate */
-} CamelServiceAuthType;
-
-
-/* public methods */
-void camel_service_construct (CamelService *service,
- CamelSession *session,
- CamelProvider *provider,
- CamelURL *url,
- CamelException *ex);
-gboolean camel_service_connect (CamelService *service,
- CamelException *ex);
-gboolean camel_service_disconnect (CamelService *service,
- gboolean clean,
- CamelException *ex);
-char * camel_service_get_url (CamelService *service);
-char * camel_service_get_name (CamelService *service,
- gboolean brief);
-char * camel_service_get_path (CamelService *service);
-CamelSession * camel_service_get_session (CamelService *service);
-CamelProvider * camel_service_get_provider (CamelService *service);
-GList * camel_service_query_auth_types (CamelService *service,
- CamelException *ex);
-
-/* convenience functions */
-struct hostent * camel_service_gethost (CamelService *service,
- CamelException *ex);
-
-/* cancellable dns lookup */
-struct hostent * camel_get_host_byname (const char *name, CamelException *ex);
-void camel_free_host (struct hostent *h);
-
-/* Standard Camel function */
-CamelType 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 6550dd9ee1..0000000000
--- a/camel/camel-session.c
+++ /dev/null
@@ -1,564 +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 <bertrand@helixcode.com>
- * Dan Winship <danw@helixcode.com>
- * Jeffrey Stedfast <fejj@helixcode.com>
- *
- * 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#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"
-#include <gal/util/e-util.h>
-#include "camel-vee-store.h"
-
-#include "camel-private.h"
-
-#define d(x)
-
-static CamelObjectClass *parent_class;
-
-/* The vfolder provider is always avilable */
-static CamelProvider vee_provider = {
- "vfolder",
- N_("Virtual folder email provider"),
-
- N_("For reading mail as a query of another set of folders"),
-
- "vfolder",
-
- 0, /* flags */
-
- 0, /* url_flags */
-
- /* ... */
-};
-
-static void
-camel_session_init (CamelSession *session)
-{
- session->modules = camel_provider_init ();
- session->providers = g_hash_table_new (g_strcase_hash, g_strcase_equal);
- session->priv = g_malloc0(sizeof(*session->priv));
-#ifdef ENABLE_THREADS
- session->priv->lock = g_mutex_new();
-#endif
-}
-
-static gboolean
-camel_session_destroy_provider (gpointer key, gpointer value, gpointer user_data)
-{
- CamelProvider *prov = (CamelProvider *)value;
-
- g_hash_table_destroy (prov->service_cache);
-
- return TRUE;
-}
-
-static void
-camel_session_finalise (CamelObject *o)
-{
- CamelSession *session = (CamelSession *)o;
-
- g_free(session->storage_path);
- g_hash_table_foreach_remove (session->providers,
- camel_session_destroy_provider, NULL);
- g_hash_table_destroy (session->providers);
-
-#ifdef ENABLE_THREADS
- g_mutex_free(session->priv->lock);
-#endif
-
- g_free(session->priv);
-}
-
-static void
-camel_session_class_init (CamelSessionClass *camel_session_class)
-{
- parent_class = camel_type_get_global_classfuncs (camel_object_get_type ());
-}
-
-CamelType
-camel_session_get_type (void)
-{
- static CamelType camel_session_type = CAMEL_INVALID_TYPE;
-
- if (camel_session_type == CAMEL_INVALID_TYPE) {
- camel_session_type = camel_type_register (camel_object_get_type (), "CamelSession",
- sizeof (CamelSession),
- sizeof (CamelSessionClass),
- (CamelObjectClassInitFunc) camel_session_class_init,
- NULL,
- (CamelObjectInitFunc) camel_session_init,
- (CamelObjectFinalizeFunc) camel_session_finalise);
- }
-
- return camel_session_type;
-}
-
-/**
- * camel_session_new:
- * @storage_path: Path to a directory Camel can use for persistent storage.
- * (This directory must already exist.)
- * @authenticator: A callback for discussing authentication information
- * @registrar: A callback for registering timeout callbacks
- * @remove: A callback for removing timeout callbacks
- *
- * This creates a new CamelSession object, which represents global state
- * for the Camel library, and contains callbacks that can be used to
- * interact with the main application.
- *
- * Return value: the new CamelSession
- **/
-CamelSession *
-camel_session_new (const char *storage_path,
- CamelAuthCallback authenticator,
- CamelTimeoutRegisterCallback registrar,
- CamelTimeoutRemoveCallback remover)
-{
- CamelSession *session = CAMEL_SESSION (camel_object_new (CAMEL_SESSION_TYPE));
-
- session->storage_path = g_strdup (storage_path);
- session->authenticator = authenticator;
- session->registrar = registrar;
- session->remover = remover;
-
- vee_provider.object_types[CAMEL_PROVIDER_STORE] = camel_vee_store_get_type();
- vee_provider.service_cache = g_hash_table_new(camel_url_hash, camel_url_equal);
- camel_session_register_provider(session, &vee_provider);
-
- 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.
- *
- * Assumes the session lock has already been obtained,
- * which is the case for automatically loaded provider modules.
- **/
-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);
-
- CAMEL_SESSION_LOCK(session, lock);
-
- if (load)
- g_hash_table_foreach (session->modules, ensure_loaded, session);
-
- list = NULL;
- g_hash_table_foreach (session->providers, add_to_list, &list);
-
- CAMEL_SESSION_UNLOCK(session, lock);
-
- return list;
-}
-
-static CamelProvider *
-get_provider_locked (CamelSession *session, const char *protocol,
- CamelException *ex)
-{
- CamelProvider *provider;
-
- provider = g_hash_table_lookup (session->providers, protocol);
- if (!provider) {
- /* See if there's one we can load. */
- char *path;
-
- path = g_hash_table_lookup (session->modules, protocol);
- if (path) {
- camel_provider_load (session, path, ex);
- if (camel_exception_is_set (ex))
- return NULL;
- }
- provider = g_hash_table_lookup (session->providers, protocol);
- }
-
- if (!provider) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_URL_INVALID,
- _("No provider available for protocol `%s'"),
- protocol);
- }
-
- return provider;
-}
-
-/**
- * camel_session_get_provider:
- * @session: the session
- * @url_string: the URL for the service whose provider you want
- * @ex: a CamelException
- *
- * This returns the CamelProvider that would be used to handle
- * @url_string, loading it in from disk if necessary.
- *
- * Return value: the provider, or %NULL, in which case @ex will be set.
- **/
-CamelProvider *
-camel_session_get_provider (CamelSession *session, const char *url_string,
- CamelException *ex)
-{
- CamelProvider *provider;
- char *protocol;
-
- protocol = g_strndup (url_string, strcspn (url_string, ":"));
- CAMEL_SESSION_LOCK(session, lock);
- provider = get_provider_locked (session, protocol, ex);
- CAMEL_SESSION_UNLOCK(session, lock);
- g_free (protocol);
-
- return provider;
-}
-
-
-static void
-service_cache_remove (CamelService *service, gpointer event_data, gpointer user_data)
-{
- CamelProvider *provider;
- CamelSession *session = CAMEL_SESSION (user_data);
-
- g_return_if_fail (CAMEL_IS_SESSION (session));
- g_return_if_fail (service != NULL);
- g_return_if_fail (service->url != NULL);
-
- CAMEL_SESSION_LOCK(session, lock);
-
- provider = g_hash_table_lookup (session->providers, service->url->protocol);
- g_hash_table_remove (provider->service_cache, service->url);
-
- CAMEL_SESSION_UNLOCK(session, lock);
-}
-
-/**
- * camel_session_get_service:
- * @session: the CamelSession
- * @url_string: a Camel URL describing the service to get
- * @type: the provider type (%CAMEL_PROVIDER_STORE or
- * %CAMEL_PROVIDER_TRANSPORT) to get, since some URLs may be able
- * to specify either type.
- * @ex: a CamelException
- *
- * This resolves a CamelURL into a CamelService, including loading the
- * provider library for that service if it has not already been loaded.
- *
- * Services are cached, and asking for "the same" @url_string multiple
- * times will return the same CamelService (with its reference count
- * incremented by one each time). What constitutes "the same" URL
- * depends in part on the provider.
- *
- * Return value: the requested CamelService, or %NULL
- **/
-CamelService *
-camel_session_get_service (CamelSession *session, const char *url_string,
- CamelProviderType type, CamelException *ex)
-{
- CamelURL *url;
- CamelProvider *provider;
- CamelService *service;
-
- url = camel_url_new (url_string, ex);
- if (!url)
- return NULL;
-
- /* We need to look up the provider so we can then lookup
- the service in the provider's cache */
- CAMEL_SESSION_LOCK(session, lock);
- provider = get_provider_locked (session, url->protocol, ex);
- if (provider && !provider->object_types[type]) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_URL_INVALID,
- _("No provider available for protocol `%s'"),
- url->protocol);
- provider = NULL;
- }
- if (!provider) {
- camel_url_free (url);
- CAMEL_SESSION_UNLOCK(session, lock);
- return NULL;
- }
-
- /* Now look up the service in the provider's cache */
- service = g_hash_table_lookup (provider->service_cache, url);
- if (service != NULL) {
- camel_url_free (url);
- camel_object_ref (CAMEL_OBJECT (service));
- CAMEL_SESSION_UNLOCK(session, lock);
- return service;
- }
-
- service = (CamelService *)camel_object_new (provider->object_types[type]);
- camel_service_construct (service, session, provider, url, ex);
- if (camel_exception_is_set (ex)) {
- camel_object_unref (CAMEL_OBJECT (service));
- service = NULL;
- } else {
- g_hash_table_insert (provider->service_cache, url, service);
- camel_object_hook_event (CAMEL_OBJECT (service), "finalize", (CamelObjectEventHookFunc) service_cache_remove, session);
- }
- CAMEL_SESSION_UNLOCK(session, lock);
-
- return service;
-}
-
-/**
- * camel_session_get_service_connected:
- * @session: the CamelSession
- * @url_string: a Camel URL describing the service to get
- * @type: the provider type
- * @ex: a CamelException
- *
- * This works like camel_session_get_service(), but also ensures that
- * the returned service will have been successfully connected (via
- * camel_service_connect().)
- *
- * Return value: the requested CamelService, or %NULL
- **/
-CamelService *
-camel_session_get_service_connected (CamelSession *session,
- const char *url_string,
- CamelProviderType type,
- CamelException *ex)
-{
- CamelService *svc;
-
- svc = camel_session_get_service (session, url_string, type, ex);
- if (svc == NULL)
- return NULL;
-
- if (svc->connected == FALSE) {
- if (camel_service_connect (svc, ex) == FALSE) {
- camel_object_unref (CAMEL_OBJECT (svc));
- return NULL;
- }
- }
-
- return svc;
-}
-
-/**
- * camel_session_get_storage_path:
- * @session: session object
- * @service: a CamelService
- * @ex: a CamelException
- *
- * This returns the path to a directory which the service can use for
- * its own purposes. Data stored there will remain between Evolution
- * sessions. No code outside of that service should ever touch the
- * files in this directory. If the directory does not exist, it will
- * be created.
- *
- * Return value: the path (which the caller must free), or %NULL if
- * an error occurs.
- **/
-char *
-camel_session_get_storage_path (CamelSession *session, CamelService *service,
- CamelException *ex)
-{
- char *path, *p;
-
- p = camel_service_get_path (service);
- path = g_strdup_printf ("%s/%s", session->storage_path, p);
- g_free (p);
-
- if (access (path, F_OK) == 0)
- return path;
-
- if (e_mkdir_hier (path, S_IRWXU) == -1) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not create directory %s:\n%s"),
- path, g_strerror (errno));
- g_free (path);
- return NULL;
- }
-
- return path;
-}
-
-/**
- * camel_session_query_authenticator: query the session authenticator
- * @session: session object
- * @mode: %CAMEL_AUTHENTICATOR_ASK, %CAMEL_AUTHENTICATOR_TELL or CAMEL_AUTHENTICATOR_ACCEPT
- * @data: prompt to query user with, or data to cache
- * @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 discuss authentication
- * information with the application.
- *
- * @service and @item together uniquely identify the piece of data the
- * caller is concerned with.
- *
- * If @mode is %CAMEL_AUTHENTICATOR_ASK, then @data is a question to
- * ask the user (if the application doesn't already have the answer
- * cached). 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 returned when
- * it is done with it.
- *
- * If @mode is %CAMEL_AUTHENTICATOR_TELL, then @data is information
- * that the application should cache, or %NULL if it should stop
- * caching anything about that datum (eg, because the data is a
- * password that turned out to be incorrect).
- *
- * If @mode is %CAMEL_AUTHENTICATOR_ACCEPT, then @data is a YES/NO
- * question to ask the user (if the application doesn't already have
- * the answer cached). Return GINT_TO_POINTER(TRUE) on accept, or
- * GINT_TO_POINTER(FALSE) to decline.
- *
- * Return value: the authentication information or %NULL.
- **/
-gpointer
-camel_session_query_authenticator (CamelSession *session,
- CamelAuthCallbackMode mode,
- char *prompt, gboolean secret,
- CamelService *service, char *item,
- CamelException *ex)
-{
- return session->authenticator (mode, prompt, secret,
- service, item, ex);
-}
-
-
-/**
- * camel_session_register_timeout: Register a timeout to be called
- * periodically.
- *
- * @session: the CamelSession
- * @interval: the number of milliseconds interval between calls
- * @callback: the function to call
- * @user_data: extra data to be passed to the callback
- *
- * This function will use the registrar callback provided upon
- * camel_session_new to register the timeout. The callback will
- * be called every @interval milliseconds until it returns @FALSE.
- * It will be passed one argument, @user_data.
- *
- * Returns a nonzero handle that can be used with
- * camel_session_remove_timeout on success, and 0 on failure to
- * register the timeout.
- **/
-guint
-camel_session_register_timeout (CamelSession *session,
- guint32 interval,
- CamelTimeoutCallback callback,
- gpointer user_data)
-{
- g_return_val_if_fail (CAMEL_IS_SESSION (session), FALSE);
-
- return session->registrar (interval, callback, user_data);
-}
-
-/**
- * camel_session_remove_timeout: Remove a previously registered
- * timeout.
- *
- * @session: the CamelSession
- * @handle: a value returned from camel_session_register_timeout
- *
- * This function will use the remover callback provided upon
- * camel_session_new to remove the timeout.
- *
- * Returns TRUE on success and FALSE on failure.
- **/
-gboolean
-camel_session_remove_timeout (CamelSession *session, guint handle)
-{
- return session->remover (handle);
-}
diff --git a/camel/camel-session.h b/camel/camel-session.h
deleted file mode 100644
index c73fa853ce..0000000000
--- a/camel/camel-session.h
+++ /dev/null
@@ -1,140 +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 <bertrand@helixcode.com>
- *
- * 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 <camel/camel-object.h>
-#include <camel/camel-provider.h>
-
-#define CAMEL_SESSION_TYPE (camel_session_get_type ())
-#define CAMEL_SESSION(obj) (CAMEL_CHECK_CAST((obj), CAMEL_SESSION_TYPE, CamelSession))
-#define CAMEL_SESSION_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_SESSION_TYPE, CamelSessionClass))
-#define CAMEL_IS_SESSION(o) (CAMEL_CHECK_TYPE((o), CAMEL_SESSION_TYPE))
-
-
-typedef enum {
- CAMEL_AUTHENTICATOR_ASK,
- CAMEL_AUTHENTICATOR_TELL,
- CAMEL_AUTHENTICATOR_ACCEPT
-} CamelAuthCallbackMode;
-
-typedef gpointer (*CamelAuthCallback) (CamelAuthCallbackMode mode,
- char *data, gboolean secret,
- CamelService *service, char *item,
- CamelException *ex);
-
-typedef gboolean (*CamelTimeoutCallback) (gpointer data);
-typedef guint (*CamelTimeoutRegisterCallback) (guint32 interval,
- CamelTimeoutCallback cb,
- gpointer camel_data);
-typedef gboolean (*CamelTimeoutRemoveCallback) (guint id);
-
-struct _CamelSession
-{
- CamelObject parent_object;
- struct _CamelSessionPrivate *priv;
-
- char *storage_path;
- CamelAuthCallback authenticator;
- CamelTimeoutRegisterCallback registrar;
- CamelTimeoutRemoveCallback remover;
-
- GHashTable *providers, *modules;
-};
-
-typedef struct {
- CamelObjectClass parent_class;
-
-} CamelSessionClass;
-
-
-/* public methods */
-
-/* Standard Camel function */
-CamelType camel_session_get_type (void);
-
-
-CamelSession * camel_session_new (const char *storage_path,
- CamelAuthCallback authenticator,
- CamelTimeoutRegisterCallback registrar,
- CamelTimeoutRemoveCallback remover);
-
-void camel_session_register_provider (CamelSession *session,
- CamelProvider *provider);
-GList * camel_session_list_providers (CamelSession *session,
- gboolean load);
-
-CamelProvider * camel_session_get_provider (CamelSession *session,
- const char *url_string,
- CamelException *ex);
-
-CamelService * camel_session_get_service (CamelSession *session,
- const char *url_string,
- CamelProviderType type,
- CamelException *ex);
-CamelService * camel_session_get_service_connected (CamelSession *session,
- const char *url_string,
- CamelProviderType type,
- CamelException *ex);
-
-#define camel_session_get_store(session, url_string, ex) \
- ((CamelStore *) camel_session_get_service_connected (session, url_string, CAMEL_PROVIDER_STORE, ex))
-#define camel_session_get_transport(session, url_string, ex) \
- ((CamelTransport *) camel_session_get_service_connected (session, url_string, CAMEL_PROVIDER_TRANSPORT, ex))
-
-char * camel_session_get_storage_path (CamelSession *session,
- CamelService *service,
- CamelException *ex);
-
-gpointer camel_session_query_authenticator (CamelSession *session,
- CamelAuthCallbackMode mode,
- char *prompt,
- gboolean secret,
- CamelService *service,
- char *item,
- CamelException *ex);
-
-guint camel_session_register_timeout (CamelSession *session,
- guint32 interval,
- CamelTimeoutCallback callback,
- gpointer user_data);
-
-gboolean camel_session_remove_timeout (CamelSession *session,
- guint handle);
-
-#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 e01509e029..0000000000
--- a/camel/camel-store.c
+++ /dev/null
@@ -1,779 +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 <bertrand@helixcode.com>
- * Dan Winship <danw@helixcode.com>
- *
- * 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <string.h>
-
-#include "camel-session.h"
-#include "camel-store.h"
-#include "camel-folder.h"
-#include "camel-vtrash-folder.h"
-#include "camel-exception.h"
-#include "camel-private.h"
-
-static CamelServiceClass *parent_class = NULL;
-
-/* Returns the class for a CamelStore */
-#define CS_CLASS(so) CAMEL_STORE_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-
-static CamelFolder *get_folder (CamelStore *store, const char *folder_name,
- guint32 flags, CamelException *ex);
-static CamelFolder *get_inbox (CamelStore *store, CamelException *ex);
-
-static void init_trash (CamelStore *store);
-static CamelFolder *get_trash (CamelStore *store, CamelException *ex);
-
-static CamelFolderInfo *create_folder (CamelStore *store,
- const char *parent_name,
- const char *folder_name,
- CamelException *ex);
-static void delete_folder (CamelStore *store, const char *folder_name,
- CamelException *ex);
-static void rename_folder (CamelStore *store, const char *old_name,
- const char *new_name, CamelException *ex);
-
-static void store_sync (CamelStore *store, CamelException *ex);
-static CamelFolderInfo *get_folder_info (CamelStore *store, const char *top,
- gboolean fast, gboolean recursive,
- gboolean subscribed_only,
- CamelException *ex);
-static void free_folder_info (CamelStore *store, CamelFolderInfo *tree);
-
-static gboolean folder_subscribed (CamelStore *store, const char *folder_name);
-static void subscribe_folder (CamelStore *store, const char *folder_name, CamelException *ex);
-static void unsubscribe_folder (CamelStore *store, const char *folder_name, CamelException *ex);
-
-static void
-camel_store_class_init (CamelStoreClass *camel_store_class)
-{
- CamelObjectClass *camel_object_class =
- CAMEL_OBJECT_CLASS (camel_store_class);
-
- parent_class = CAMEL_SERVICE_CLASS (camel_type_get_global_classfuncs (camel_service_get_type ()));
-
- /* virtual method definition */
- camel_store_class->hash_folder_name = g_str_hash;
- camel_store_class->compare_folder_name = g_str_equal;
- camel_store_class->get_folder = get_folder;
- camel_store_class->get_inbox = get_inbox;
- camel_store_class->init_trash = init_trash;
- camel_store_class->get_trash = get_trash;
- camel_store_class->create_folder = create_folder;
- camel_store_class->delete_folder = delete_folder;
- camel_store_class->rename_folder = rename_folder;
- camel_store_class->sync = store_sync;
- camel_store_class->get_folder_info = get_folder_info;
- camel_store_class->free_folder_info = free_folder_info;
- camel_store_class->folder_subscribed = folder_subscribed;
- camel_store_class->subscribe_folder = subscribe_folder;
- camel_store_class->unsubscribe_folder = unsubscribe_folder;
-
- /* virtual method overload */
- camel_object_class_declare_event (camel_object_class,
- "folder_created", NULL);
- camel_object_class_declare_event (camel_object_class,
- "folder_deleted", NULL);
-}
-
-static void
-camel_store_init (void *o)
-{
- CamelStore *store = o;
- CamelStoreClass *store_class = (CamelStoreClass *)CAMEL_OBJECT_GET_CLASS (o);
-
- if (store_class->hash_folder_name) {
- store->folders = g_hash_table_new (store_class->hash_folder_name,
- store_class->compare_folder_name);
- } else
- store->folders = NULL;
-
- store->flags = 0;
-
- store->priv = g_malloc0 (sizeof (*store->priv));
-#ifdef ENABLE_THREADS
- store->priv->folder_lock = g_mutex_new();
- store->priv->cache_lock = g_mutex_new();
-#endif
-}
-
-static void
-camel_store_finalize (CamelObject *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);
- }
-
-#ifdef ENABLE_THREADS
- g_mutex_free (store->priv->folder_lock);
- g_mutex_free (store->priv->cache_lock);
-#endif
- g_free (store->priv);
-}
-
-
-CamelType
-camel_store_get_type (void)
-{
- static CamelType camel_store_type = CAMEL_INVALID_TYPE;
-
- if (camel_store_type == CAMEL_INVALID_TYPE) {
- camel_store_type = camel_type_register (CAMEL_SERVICE_TYPE, "CamelStore",
- sizeof (CamelStore),
- sizeof (CamelStoreClass),
- (CamelObjectClassInitFunc) camel_store_class_init,
- NULL,
- (CamelObjectInitFunc) camel_store_init,
- (CamelObjectFinalizeFunc) camel_store_finalize );
- }
-
- return camel_store_type;
-}
-
-
-static gboolean
-folder_matches (gpointer key, gpointer value, gpointer user_data)
-{
- if (value == user_data) {
- g_free (key);
- return TRUE;
- } else
- return FALSE;
-}
-
-static void
-folder_finalize (CamelObject *folder, gpointer event_data, gpointer user_data)
-{
- CamelStore *store = CAMEL_STORE (user_data);
-
- if (store->folders) {
- CAMEL_STORE_LOCK(store, cache_lock);
- g_hash_table_foreach_remove (store->folders, folder_matches, folder);
- CAMEL_STORE_UNLOCK(store, cache_lock);
- }
-}
-
-static CamelFolder *
-get_folder (CamelStore *store, const char *folder_name, guint32 flags, CamelException *ex)
-{
- g_warning ("CamelStore::get_folder not implemented for `%s'",
- camel_type_to_name(CAMEL_OBJECT_GET_TYPE(store)));
- return NULL;
-}
-
-/**
- * camel_store_get_folder: Return the folder corresponding to a path.
- * @store: a CamelStore
- * @folder_name: name of the folder to get
- * @flags: folder flags (create, save body index, etc)
- * @ex: a CamelException
- *
- * Return value: the folder corresponding to the path @folder_name.
- **/
-CamelFolder *
-camel_store_get_folder (CamelStore *store, const char *folder_name, guint32 flags, CamelException *ex)
-{
- CamelFolder *folder = NULL;
-
- CAMEL_STORE_LOCK(store, folder_lock);
-
- if (store->folders) {
- /* Try cache first. */
- CAMEL_STORE_LOCK(store, cache_lock);
- folder = g_hash_table_lookup (store->folders, folder_name);
- if (folder)
- camel_object_ref (CAMEL_OBJECT (folder));
- CAMEL_STORE_UNLOCK(store, cache_lock);
- }
-
- if (!folder) {
- folder = CS_CLASS (store)->get_folder (store, folder_name, flags, ex);
- if (folder) {
- /* Add the folder to the vTrash folder if this store implements it */
- if (store->vtrash)
- camel_vee_folder_add_folder (CAMEL_VEE_FOLDER (store->vtrash), folder);
-
- if (store->folders) {
- CAMEL_STORE_LOCK(store, cache_lock);
-
- g_hash_table_insert (store->folders, g_strdup (folder_name), folder);
-
- camel_object_hook_event (CAMEL_OBJECT (folder), "finalize", folder_finalize, store);
- CAMEL_STORE_UNLOCK(store, cache_lock);
- }
- }
- }
-
- CAMEL_STORE_UNLOCK(store, folder_lock);
- return folder;
-}
-
-
-static CamelFolderInfo *
-create_folder (CamelStore *store, const char *parent_name,
- const char *folder_name, CamelException *ex)
-{
- g_warning ("CamelStore::create_folder not implemented for `%s'",
- camel_type_to_name (CAMEL_OBJECT_GET_TYPE (store)));
- return NULL;
-}
-
-/**
- * camel_store_create_folder:
- * @store: a CamelStore
- * @parent_name: name of the new folder's parent, or %NULL
- * @folder_name: name of the folder to create
- * @ex: a CamelException
- *
- * Creates a new folder as a child of an existing folder.
- * @parent_name can be %NULL to create a new top-level folder.
- *
- * Return value: info about the created folder, which the caller must
- * free with camel_store_free_folder_info().
- **/
-CamelFolderInfo *
-camel_store_create_folder (CamelStore *store, const char *parent_name,
- const char *folder_name, CamelException *ex)
-{
- CamelFolderInfo *fi;
-
- CAMEL_STORE_LOCK(store, folder_lock);
- fi = CS_CLASS (store)->create_folder (store, parent_name, folder_name, ex);
- CAMEL_STORE_UNLOCK(store, folder_lock);
-
- return fi;
-}
-
-
-static void
-delete_folder (CamelStore *store, const char *folder_name, CamelException *ex)
-{
- g_warning ("CamelStore::delete_folder not implemented for `%s'",
- camel_type_to_name (CAMEL_OBJECT_GET_TYPE (store)));
-}
-
-/**
- * camel_store_delete_folder: Delete the folder corresponding to a path.
- * @store: a CamelStore
- * @folder_name: name of the folder to delete
- * @ex: a CamelException
- *
- * Deletes the named folder. The folder must be empty.
- **/
-void
-camel_store_delete_folder (CamelStore *store, const char *folder_name, CamelException *ex)
-{
- CAMEL_STORE_LOCK(store, folder_lock);
- CS_CLASS (store)->delete_folder (store, folder_name, ex);
- CAMEL_STORE_UNLOCK(store, folder_lock);
-}
-
-
-static void
-rename_folder (CamelStore *store, const char *old_name,
- const char *new_name, CamelException *ex)
-{
- g_warning ("CamelStore::rename_folder not implemented for `%s'",
- camel_type_to_name (CAMEL_OBJECT_GET_TYPE (store)));
-}
-
-/**
- * camel_store_rename_folder:
- * @store: a CamelStore
- * @old_name: the current name of the folder
- * @new_name: the new name of the folder
- * @ex: a CamelException
- *
- * Rename a named folder to a new name.
- **/
-void
-camel_store_rename_folder (CamelStore *store, const char *old_name, const char *new_name, CamelException *ex)
-{
- CAMEL_STORE_LOCK(store, folder_lock);
- CS_CLASS (store)->rename_folder (store, old_name, new_name, ex);
- CAMEL_STORE_UNLOCK(store, folder_lock);
-}
-
-
-static CamelFolder *
-get_inbox (CamelStore *store, CamelException *ex)
-{
- /* Default: assume the inbox's name is "inbox"
- * and open with default flags.
- */
- return CS_CLASS (store)->get_folder (store, "inbox", 0, ex);
-}
-
-/**
- * camel_store_get_inbox:
- * @store: a CamelStore
- * @ex: a CamelException
- *
- * Return value: the folder in the store into which new mail is
- * delivered, or %NULL if no such folder exists.
- **/
-CamelFolder *
-camel_store_get_inbox (CamelStore *store, CamelException *ex)
-{
- CamelFolder *folder;
-
- CAMEL_STORE_LOCK(store, folder_lock);
- folder = CS_CLASS (store)->get_inbox (store, ex);
- CAMEL_STORE_UNLOCK(store, folder_lock);
-
- return folder;
-}
-
-
-static void
-trash_add_folder (gpointer key, gpointer value, gpointer data)
-{
- CamelFolder *folder = CAMEL_FOLDER (value);
- CamelStore *store = CAMEL_STORE (data);
-
- camel_vee_folder_add_folder (CAMEL_VEE_FOLDER (store->vtrash), folder);
-}
-
-static void
-trash_finalize (CamelObject *trash, gpointer event_data, gpointer user_data)
-{
- CamelStore *store = CAMEL_STORE (user_data);
-
- store->vtrash = NULL;
-}
-
-static void
-init_trash (CamelStore *store)
-{
- store->vtrash = camel_vtrash_folder_new (store, _("Trash"));
-
- if (store->vtrash) {
- /* attach to the finalise event of the vtrash */
- camel_object_hook_event (CAMEL_OBJECT (store->vtrash), "finalize",
- trash_finalize, store);
-
- /* add all the pre-opened folders to the vtrash */
- if (store->folders) {
- CAMEL_STORE_LOCK(store, cache_lock);
- g_hash_table_foreach (store->folders, trash_add_folder, store);
- CAMEL_STORE_UNLOCK(store, cache_lock);
- }
- }
-}
-
-
-static CamelFolder *
-get_trash (CamelStore *store, CamelException *ex)
-{
- if (store->vtrash) {
- camel_object_ref (CAMEL_OBJECT (store->vtrash));
- return store->vtrash;
- } else {
- CS_CLASS (store)->init_trash (store);
- if (store->vtrash) {
- /* We don't ref here because we don't want the
- store to own a ref on the trash folder */
- /*camel_object_ref (CAMEL_OBJECT (store->vtrash));*/
- return store->vtrash;
- } else {
- g_warning ("This store does not support vTrash.");
- return NULL;
- }
- }
-}
-
-/**
- * camel_store_get_trash:
- * @store: a CamelStore
- * @ex: a CamelException
- *
- * Return value: the folder in the store into which trash is
- * delivered, or %NULL if no such folder exists.
- **/
-CamelFolder *
-camel_store_get_trash (CamelStore *store, CamelException *ex)
-{
- CamelFolder *folder;
-
- CAMEL_STORE_LOCK(store, folder_lock);
- folder = CS_CLASS (store)->get_trash (store, ex);
- CAMEL_STORE_UNLOCK(store, folder_lock);
-
- return folder;
-}
-
-
-static void
-sync_folder (gpointer key, gpointer folder, gpointer ex)
-{
- if (!camel_exception_is_set (ex))
- camel_folder_sync (folder, FALSE, ex);
-}
-
-static void
-store_sync (CamelStore *store, CamelException *ex)
-{
- if (store->folders) {
- CAMEL_STORE_LOCK(store, cache_lock);
- g_hash_table_foreach (store->folders, sync_folder, ex);
- CAMEL_STORE_UNLOCK(store, cache_lock);
- }
-}
-
-/**
- * camel_store_sync:
- * @store: a CamelStore
- * @ex: a CamelException
- *
- * Syncs any changes that have been made to the store object and its
- * folders with the real store.
- **/
-void
-camel_store_sync (CamelStore *store, CamelException *ex)
-{
- g_return_if_fail (CAMEL_IS_STORE (store));
-
- CS_CLASS (store)->sync (store, ex);
-}
-
-
-static CamelFolderInfo *
-get_folder_info (CamelStore *store, const char *top,
- gboolean fast, gboolean recursive,
- gboolean subscribed_only,
- CamelException *ex)
-{
- g_warning ("CamelStore::get_folder_info not implemented for `%s'",
- camel_type_to_name (CAMEL_OBJECT_GET_TYPE (store)));
- return NULL;
-}
-
-/**
- * camel_store_get_folder_info:
- * @store: a CamelStore
- * @top: the name of the folder to start from
- * @fast: whether or not to do a "fast" scan.
- * @recursive: whether to include information for subfolders
- * @ex: a CamelException
- *
- * This fetches information about the folder structure of @store,
- * starting with @top, and returns a tree of CamelFolderInfo
- * structures. If @fast is %TRUE, the message_count or
- * unread_message_count fields of some or all of the structures may be
- * set to -1, if the store cannot determine that information quickly.
- * If @recursive is %TRUE, the returned tree will include all levels of
- * hierarchy below @top. If it is %FALSE, it will only include the
- * immediate subfolders of @top.
- *
- * Return value: a CamelFolderInfo tree, which must be freed with
- * camel_store_free_folder_info.
- **/
-CamelFolderInfo *
-camel_store_get_folder_info (CamelStore *store, const char *top,
- gboolean fast, gboolean recursive,
- gboolean subscribed_only,
- CamelException *ex)
-{
- CamelFolderInfo *ret;
-
- g_return_val_if_fail (CAMEL_IS_STORE (store), NULL);
-
- CAMEL_STORE_LOCK(store, folder_lock);
-
- ret = CS_CLASS (store)->get_folder_info (store, top, fast, recursive, subscribed_only, ex);
-
- CAMEL_STORE_UNLOCK(store, folder_lock);
-
- return ret;
-}
-
-
-static void
-free_folder_info (CamelStore *store, CamelFolderInfo *fi)
-{
- g_warning ("CamelStore::free_folder_info not implemented for `%s'",
- camel_type_to_name (CAMEL_OBJECT_GET_TYPE (store)));
-}
-
-/**
- * camel_store_free_folder_info:
- * @store: a CamelStore
- * @tree: the tree returned by camel_store_get_folder_info()
- *
- * Frees the data returned by camel_store_get_folder_info().
- **/
-void
-camel_store_free_folder_info (CamelStore *store, CamelFolderInfo *fi)
-{
- g_return_if_fail (CAMEL_IS_STORE (store));
-
- CS_CLASS (store)->free_folder_info (store, fi);
-}
-
-/**
- * camel_store_free_folder_info_full:
- * @store: a CamelStore
- * @tree: the tree returned by camel_store_get_folder_info()
- *
- * An implementation for CamelStore::free_folder_info. Frees all
- * of the data.
- **/
-void
-camel_store_free_folder_info_full (CamelStore *store, CamelFolderInfo *fi)
-{
- camel_folder_info_free (fi);
-}
-
-/**
- * camel_store_free_folder_info_nop:
- * @store: a CamelStore
- * @tree: the tree returned by camel_store_get_folder_info()
- *
- * An implementation for CamelStore::free_folder_info. Does nothing.
- **/
-void
-camel_store_free_folder_info_nop (CamelStore *store, CamelFolderInfo *fi)
-{
- ;
-}
-
-
-/**
- * camel_folder_info_free:
- * @fi: the CamelFolderInfo
- *
- * Frees @fi.
- **/
-void
-camel_folder_info_free (CamelFolderInfo *fi)
-{
- if (fi) {
- camel_folder_info_free (fi->sibling);
- camel_folder_info_free (fi->child);
- g_free (fi->name);
- g_free (fi->full_name);
- g_free (fi->url);
- g_free (fi);
- }
-}
-
-
-/**
- * camel_folder_info_build:
- * @folders: an array of CamelFolderInfo
- * @namespace: an ignorable prefix on the folder names
- * @separator: the hieararchy separator character
- * @short_names: %TRUE if the (short) name of a folder is the part after
- * the last @separator in the full name. %FALSE if it is the full name.
- *
- * This takes an array of folders and attaches them together according
- * to the hierarchy described by their full_names and @separator. If
- * @namespace is non-%NULL, then it will be ignored as a full_name
- * prefix, for purposes of comparison. If necessary,
- * camel_folder_info_build will create additional CamelFolderInfo with
- * %NULL urls to fill in gaps in the tree. The value of @short_names
- * is used in constructing the names of these intermediate folders.
- *
- * Return value: the top level of the tree of linked folder info.
- **/
-CamelFolderInfo *
-camel_folder_info_build (GPtrArray *folders, const char *namespace,
- char separator, gboolean short_names)
-{
- CamelFolderInfo *fi, *pfi, *top = NULL;
- GHashTable *hash;
- char *name, *p, *pname;
- int i, nlen;
-
- if (!namespace)
- namespace = "";
- nlen = strlen (namespace);
-
- /* Hash the folders. */
- hash = g_hash_table_new (g_str_hash, g_str_equal);
- for (i = 0; i < folders->len; i++) {
- fi = folders->pdata[i];
- if (!strncmp (namespace, fi->full_name, nlen))
- name = fi->full_name + nlen;
- else
- name = fi->full_name;
- if (*name == separator)
- name++;
- g_hash_table_insert (hash, name, fi);
- }
-
- /* Now find parents. */
- for (i = 0; i < folders->len; i++) {
- fi = folders->pdata[i];
- if (!strncmp (namespace, fi->full_name, nlen))
- name = fi->full_name + nlen;
- else
- name = fi->full_name;
- if (*name == separator)
- name++;
- p = strrchr (name, separator);
- if (p) {
- pname = g_strndup (name, p - name);
- pfi = g_hash_table_lookup (hash, pname);
- if (pfi) {
- g_free (pname);
- } else {
- pfi = g_new0 (CamelFolderInfo, 1);
- pfi->full_name = pname;
- if (short_names) {
- pfi->name = strrchr (pname, separator);
- if (pfi->name)
- pfi->name = g_strdup (pfi->name + 1);
- else
- pfi->name = g_strdup (pname);
- } else
- pfi->name = g_strdup (pname);
- g_hash_table_insert (hash, pname, pfi);
- g_ptr_array_add (folders, pfi);
- }
- fi->sibling = pfi->child;
- fi->parent = pfi;
- pfi->child = fi;
- } else if (!top)
- top = fi;
- }
- g_hash_table_destroy (hash);
-
- /* Link together the top-level folders */
- for (i = 0; i < folders->len; i++) {
- fi = folders->pdata[i];
- if (fi->parent || fi == top)
- continue;
- if (top)
- fi->sibling = top;
- top = fi;
- }
-
- return top;
-}
-
-gboolean
-camel_store_supports_subscriptions (CamelStore *store)
-{
- return (store->flags & CAMEL_STORE_SUBSCRIPTIONS);
-}
-
-
-static gboolean
-folder_subscribed (CamelStore *store, const char *folder_name)
-{
- g_warning ("CamelStore::folder_subscribed not implemented for `%s'",
- camel_type_to_name (CAMEL_OBJECT_GET_TYPE (store)));
- return FALSE;
-}
-
-/**
- * camel_store_folder_subscribed: Tell whether or not a folder has been subscribed to.
- * @store: a CamelStore
- * @folder_name: the folder on which we're querying subscribed status.
- * Return value: TRUE if folder is subscribed, FALSE if not.
- **/
-gboolean
-camel_store_folder_subscribed (CamelStore *store,
- const char *folder_name)
-{
- gboolean ret;
-
- g_return_val_if_fail (CAMEL_IS_STORE (store), FALSE);
- g_return_val_if_fail (store->flags & CAMEL_STORE_SUBSCRIPTIONS, FALSE);
-
- CAMEL_STORE_LOCK(store, folder_lock);
-
- ret = CS_CLASS (store)->folder_subscribed (store, folder_name);
-
- CAMEL_STORE_UNLOCK(store, folder_lock);
-
- return ret;
-}
-
-static void
-subscribe_folder (CamelStore *store, const char *folder_name, CamelException *ex)
-{
- g_warning ("CamelStore::subscribe_folder not implemented for `%s'",
- camel_type_to_name (CAMEL_OBJECT_GET_TYPE (store)));
-}
-
-/**
- * camel_store_subscribe_folder: marks a folder as subscribed.
- * @store: a CamelStore
- * @folder_name: the folder to subscribe to.
- **/
-void
-camel_store_subscribe_folder (CamelStore *store,
- const char *folder_name,
- CamelException *ex)
-{
- g_return_if_fail (CAMEL_IS_STORE (store));
- g_return_if_fail (store->flags & CAMEL_STORE_SUBSCRIPTIONS);
-
- CAMEL_STORE_LOCK(store, folder_lock);
-
- CS_CLASS (store)->subscribe_folder (store, folder_name, ex);
-
- CAMEL_STORE_UNLOCK(store, folder_lock);
-}
-
-static void
-unsubscribe_folder (CamelStore *store, const char *folder_name, CamelException *ex)
-{
- g_warning ("CamelStore::unsubscribe_folder not implemented for `%s'",
- camel_type_to_name (CAMEL_OBJECT_GET_TYPE (store)));
-}
-
-
-/**
- * camel_store_unsubscribe_folder: marks a folder as unsubscribed.
- * @store: a CamelStore
- * @folder_name: the folder to unsubscribe from.
- **/
-void
-camel_store_unsubscribe_folder (CamelStore *store,
- const char *folder_name,
- CamelException *ex)
-{
- g_return_if_fail (CAMEL_IS_STORE (store));
- g_return_if_fail (store->flags & CAMEL_STORE_SUBSCRIPTIONS);
-
- CAMEL_STORE_LOCK(store, folder_lock);
-
- CS_CLASS (store)->unsubscribe_folder (store, folder_name, ex);
-
- CAMEL_STORE_UNLOCK(store, folder_lock);
-}
diff --git a/camel/camel-store.h b/camel/camel-store.h
deleted file mode 100644
index 493720b24f..0000000000
--- a/camel/camel-store.h
+++ /dev/null
@@ -1,191 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-store.h : Abstract class for an email store */
-
-/*
- *
- * Authors: Bertrand Guiheneuf <bertrand@helixcode.com>
- *
- * 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 <camel/camel-object.h>
-#include <camel/camel-service.h>
-
-
-typedef struct _CamelFolderInfo {
- struct _CamelFolderInfo *parent, *sibling, *child;
- char *url, *full_name, *name;
- int unread_message_count;
-} CamelFolderInfo;
-
-
-#define CAMEL_STORE_TYPE (camel_store_get_type ())
-#define CAMEL_STORE(obj) (CAMEL_CHECK_CAST((obj), CAMEL_STORE_TYPE, CamelStore))
-#define CAMEL_STORE_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_STORE_TYPE, CamelStoreClass))
-#define CAMEL_IS_STORE(o) (CAMEL_CHECK_TYPE((o), CAMEL_STORE_TYPE))
-
-
-/* Flags for store flags */
-#define CAMEL_STORE_SUBSCRIPTIONS (1 << 0)
-
-struct _CamelStore
-{
- CamelService parent_object;
- struct _CamelStorePrivate *priv;
-
- CamelFolder *vtrash;
-
- /* should have cache_lock when accessing this (priv->cache_lock) */
- GHashTable *folders;
-
- int flags;
-};
-
-
-/* open mode for folder */
-#define CAMEL_STORE_FOLDER_CREATE (1<<0)
-#define CAMEL_STORE_FOLDER_BODY_INDEX (1<<1)
-#define CAMEL_STORE_FOLDER_PRIVATE (1<<2) /* a private folder, that shouldn't show up in unmatched/folder info's, etc */
-
-typedef struct {
- CamelServiceClass parent_class;
-
- GHashFunc hash_folder_name;
- GCompareFunc compare_folder_name;
-
- CamelFolder * (*get_folder) (CamelStore *store,
- const char *folder_name,
- guint32 flags,
- CamelException *ex);
- CamelFolder * (*get_inbox) (CamelStore *store,
- CamelException *ex);
-
- void (*init_trash) (CamelStore *store);
- CamelFolder * (*get_trash) (CamelStore *store,
- CamelException *ex);
-
- CamelFolderInfo *(*create_folder) (CamelStore *store,
- const char *parent_name,
- const char *folder_name,
- CamelException *ex);
- void (*delete_folder) (CamelStore *store,
- const char *folder_name,
- CamelException *ex);
- void (*rename_folder) (CamelStore *store,
- const char *old_name,
- const char *new_name,
- CamelException *ex);
-
- void (*sync) (CamelStore *store,
- CamelException *ex);
-
- /* this should take flags instead, so its more futureproof */
- CamelFolderInfo *(*get_folder_info) (CamelStore *store,
- const char *top,
- gboolean fast,
- gboolean recursive,
- gboolean subscribed_only,
- CamelException *ex);
- void (*free_folder_info) (CamelStore *store,
- CamelFolderInfo *fi);
-
- gboolean (*folder_subscribed) (CamelStore *store,
- const char *folder_name);
- void (*subscribe_folder) (CamelStore *store,
- const char *folder_name,
- CamelException *ex);
- void (*unsubscribe_folder) (CamelStore *store,
- const char *folder_name,
- CamelException *ex);
-} CamelStoreClass;
-
-
-/* Standard Camel function */
-CamelType camel_store_get_type (void);
-
-/* public methods */
-CamelFolder * camel_store_get_folder (CamelStore *store,
- const char *folder_name,
- guint32 flags,
- CamelException *ex);
-CamelFolder * camel_store_get_inbox (CamelStore *store,
- CamelException *ex);
-CamelFolder * camel_store_get_trash (CamelStore *store,
- CamelException *ex);
-
-CamelFolderInfo *camel_store_create_folder (CamelStore *store,
- const char *parent_name,
- const char *folder_name,
- CamelException *ex);
-void camel_store_delete_folder (CamelStore *store,
- const char *folder_name,
- CamelException *ex);
-void camel_store_rename_folder (CamelStore *store,
- const char *old_name,
- const char *new_name,
- CamelException *ex);
-
-void camel_store_sync (CamelStore *store,
- CamelException *ex);
-
-CamelFolderInfo *camel_store_get_folder_info (CamelStore *store,
- const char *top,
- gboolean fast,
- gboolean recursive,
- gboolean subscribed_only,
- CamelException *ex);
-void camel_store_free_folder_info (CamelStore *store,
- CamelFolderInfo *fi);
-
-void camel_store_free_folder_info_full (CamelStore *store,
- CamelFolderInfo *fi);
-void camel_store_free_folder_info_nop (CamelStore *store,
- CamelFolderInfo *fi);
-
-void camel_folder_info_free (CamelFolderInfo *fi);
-CamelFolderInfo *camel_folder_info_build (GPtrArray *folders,
- const char *namespace,
- char separator,
- gboolean short_names);
-
-gboolean camel_store_supports_subscriptions (CamelStore *store);
-
-gboolean camel_store_folder_subscribed (CamelStore *store,
- const char *folder_name);
-void camel_store_subscribe_folder (CamelStore *store,
- const char *folder_name,
- CamelException *ex);
-void camel_store_unsubscribe_folder (CamelStore *store,
- const char *folder_name,
- 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 f0857d49e4..0000000000
--- a/camel/camel-stream-buffer.c
+++ /dev/null
@@ -1,456 +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 <notzed@helixcode.com>
- *
- * 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <errno.h>
-#include "camel-stream-buffer.h"
-
-static CamelStreamClass *parent_class = NULL;
-
-enum {
- BUF_USER = 1<<0, /* user-supplied buffer, do not free */
-};
-
-#define BUF_SIZE 1024
-
-static ssize_t stream_read (CamelStream *stream, char *buffer, size_t n);
-static ssize_t stream_write (CamelStream *stream, const char *buffer, size_t n);
-static int stream_flush (CamelStream *stream);
-static int stream_close (CamelStream *stream);
-static gboolean stream_eos (CamelStream *stream);
-
-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);
-
- parent_class = CAMEL_STREAM_CLASS (camel_type_get_global_classfuncs (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;
-}
-
-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);
-}
-
-static void
-camel_stream_buffer_finalize (CamelObject *object)
-{
- CamelStreamBuffer *sbf = CAMEL_STREAM_BUFFER (object);
-
- if (!(sbf->flags & BUF_USER)) {
- g_free(sbf->buf);
- }
- if (sbf->stream)
- camel_object_unref(CAMEL_OBJECT(sbf->stream));
-
- g_free(sbf->linebuf);
-}
-
-
-CamelType
-camel_stream_buffer_get_type (void)
-{
- static CamelType camel_stream_buffer_type = CAMEL_INVALID_TYPE;
-
- if (camel_stream_buffer_type == CAMEL_INVALID_TYPE) {
- camel_stream_buffer_type = camel_type_register (camel_stream_get_type (), "CamelStreamBuffer",
- sizeof (CamelStreamBuffer),
- sizeof (CamelStreamBufferClass),
- (CamelObjectClassInitFunc) camel_stream_buffer_class_init,
- NULL,
- (CamelObjectInitFunc) camel_stream_buffer_init,
- (CamelObjectFinalizeFunc) camel_stream_buffer_finalize);
- }
-
- return camel_stream_buffer_type;
-}
-
-
-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)
- camel_object_unref(CAMEL_OBJECT(sbf->stream));
- sbf->stream = s;
- camel_object_ref(CAMEL_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 = CAMEL_STREAM_BUFFER (camel_object_new (camel_stream_buffer_get_type ()));
- CAMEL_STREAM_BUFFER_CLASS (CAMEL_OBJECT_GET_CLASS(sbf))->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 = CAMEL_STREAM_BUFFER (camel_object_new (camel_stream_buffer_get_type ()));
- CAMEL_STREAM_BUFFER_CLASS (CAMEL_OBJECT_GET_CLASS(sbf))->init_vbuf (sbf, stream, mode, buf, size);
-
- return CAMEL_STREAM (sbf);
-}
-
-static ssize_t
-stream_read (CamelStream *stream, char *buffer, size_t n)
-{
- CamelStreamBuffer *sbf = CAMEL_STREAM_BUFFER (stream);
- ssize_t bytes_read = 1;
- ssize_t 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) {
- size_t bytes_used = bytes_read > n ? n : bytes_read;
- sbf->ptr = sbf->buf;
- sbf->end = sbf->buf+bytes_read;
- memcpy(bptr, sbf->ptr, bytes_used);
- sbf->ptr += bytes_used;
- bptr += bytes_used;
- n -= bytes_used;
- }
- }
- } else {
- memcpy(bptr, sbf->ptr, n);
- sbf->ptr += n;
- bptr += n;
- n = 0;
- }
- }
-
- return (ssize_t)(bptr - buffer);
-}
-
-static ssize_t
-stream_write (CamelStream *stream, const char *buffer, size_t n)
-{
- CamelStreamBuffer *sbf = CAMEL_STREAM_BUFFER (stream);
- const char *bptr = buffer;
- ssize_t bytes_written = 1;
- ssize_t bytes_left;
- ssize_t 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_left<n) {
- memcpy(sbf->ptr, 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-1 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 (inptr<inend && outptr<outend) {
- c = *inptr++;
- *outptr++ = c;
- if (c == '\n') {
- *outptr = 0;
- sbf->ptr = 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;
- *outptr = 0;
-
- return (int)(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 81ab1a072e..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 <notzed@helixcode.com>
- *
- * 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 <stdio.h>
-#include <camel/camel-seekable-stream.h>
-
-#define CAMEL_STREAM_BUFFER_TYPE (camel_stream_buffer_get_type ())
-#define CAMEL_STREAM_BUFFER(obj) (CAMEL_CHECK_CAST((obj), CAMEL_STREAM_BUFFER_TYPE, CamelStreamBuffer))
-#define CAMEL_STREAM_BUFFER_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_STREAM_BUFFER_TYPE, CamelStreamBufferClass))
-#define CAMEL_IS_STREAM_BUFFER(o) (CAMEL_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 Camel function */
-CamelType 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 3956f24346..0000000000
--- a/camel/camel-stream-filter.c
+++ /dev/null
@@ -1,382 +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 <notzed@helixcode.com>
- *
- * 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 <string.h>
-#include "camel-stream-filter.h"
-
-#define d(x)
-/*#include <stdio.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 ssize_t do_read (CamelStream *stream, char *buffer, size_t n);
-static ssize_t do_write (CamelStream *stream, const char *buffer, size_t 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;
-
-static void
-camel_stream_filter_class_init (CamelStreamFilterClass *klass)
-{
- CamelStreamClass *camel_stream_class = (CamelStreamClass *) klass;
-
- camel_stream_filter_parent = CAMEL_STREAM_CLASS (camel_type_get_global_classfuncs (camel_stream_get_type ()));
-
- camel_stream_class->read = do_read;
- camel_stream_class->write = do_write;
- camel_stream_class->flush = do_flush;
- camel_stream_class->close = do_close;
- camel_stream_class->eos = do_eos;
- camel_stream_class->reset = do_reset;
-
-}
-
-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;
-}
-
-static void
-camel_stream_filter_finalize(CamelObject *o)
-{
- CamelStreamFilter *filter = (CamelStreamFilter *)o;
- struct _CamelStreamFilterPrivate *p = _PRIVATE(filter);
- struct _filter *fn, *f;
-
- f = p->filters;
- while (f) {
- fn = f->next;
- camel_object_unref((CamelObject *)f->filter);
- g_free(f);
- f = fn;
- }
- g_free(p->realbuffer);
- g_free(p);
- camel_object_unref((CamelObject *)filter->source);
-}
-
-CamelType
-camel_stream_filter_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (CAMEL_STREAM_TYPE, "CamelStreamFilter",
- sizeof (CamelStreamFilter),
- sizeof (CamelStreamFilterClass),
- (CamelObjectClassInitFunc) camel_stream_filter_class_init,
- NULL,
- (CamelObjectInitFunc) camel_stream_filter_init,
- (CamelObjectFinalizeFunc) camel_stream_filter_finalize);
- }
-
- return type;
-}
-
-/**
- * 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 ( camel_object_new (camel_stream_filter_get_type ()));
-
- new->source = stream;
- camel_object_ref ((CamelObject *)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;
- camel_object_ref((CamelObject *)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;
- camel_object_unref((CamelObject *)fn->filter);
- g_free(fn);
- }
- f = f->next;
- }
-}
-
-static ssize_t
-do_read (CamelStream *stream, char *buffer, size_t n)
-{
- CamelStreamFilter *filter = (CamelStreamFilter *)stream;
- struct _CamelStreamFilterPrivate *p = _PRIVATE(filter);
- ssize_t 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;
-
- d(printf ("\n\nOriginal content: '"));
- d(fwrite(p->filtered, sizeof(char), p->filteredlen, stdout));
- d(printf("'\n"));
-
- while (f) {
- camel_mime_filter_filter(f->filter, p->filtered, p->filteredlen, presize,
- &p->filtered, &p->filteredlen, &presize);
-
- d(printf ("Filtered content (%s): '",
- camel_type_to_name(((CamelObject *)f->filter)->s.type)));
- d(fwrite(p->filtered, sizeof(char), p->filteredlen, stdout));
- d(printf("'\n"));
-
- f = f->next;
- }
- }
- }
-
- size = MIN(n, p->filteredlen);
- memcpy(buffer, p->filtered, size);
- p->filteredlen -= size;
- p->filtered += size;
-
- return size;
-}
-
-/* Note: Since the caller expects to write out as much as they asked us to
- write (for 'success'), we return what they asked us to write (for 'success')
- rather than the true number of written bytes */
-static ssize_t
-do_write (CamelStream *stream, const char *buf, size_t n)
-{
- CamelStreamFilter *filter = (CamelStreamFilter *)stream;
- struct _CamelStreamFilterPrivate *p = _PRIVATE(filter);
- struct _filter *f;
- int presize;
- char *buffer = (char *)buf;
- size_t len = n;
-
- p->last_was_read = FALSE;
-
- d(printf ("\n\nWriting: Original content: '"));
- d(fwrite(buffer, sizeof(char), len, stdout));
- d(printf("'\n"));
-
- f = p->filters;
- presize = 0;
- while (f) {
- camel_mime_filter_filter(f->filter, buffer, len, presize, &buffer, &len, &presize);
-
- d(printf ("Filtered content (%s): '",
- camel_type_to_name(((CamelObject *)f->filter)->s.type)));
- d(fwrite(buffer, sizeof(char), len, stdout));
- d(printf("'\n"));
-
- f = f->next;
- }
-
- if (camel_stream_write(filter->source, buffer, len) != len)
- return -1;
-
- return 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;
-
- d(printf ("\n\nFlushing: Original content: '"));
- d(fwrite(buffer, sizeof(char), len, stdout));
- d(printf("'\n"));
-
- while (f) {
- camel_mime_filter_complete(f->filter, buffer, len, presize, &buffer, &len, &presize);
-
- d(printf ("Filtered content (%s): '",
- camel_type_to_name(((CamelObject *)f->filter)->s.type)));
- d(fwrite(buffer, sizeof(char), len, stdout));
- d(printf("'\n"));
-
- 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 b3906eef31..0000000000
--- a/camel/camel-stream-filter.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (C) 2000 Helix Code Inc.
- *
- * Authors: Michael Zucchi <notzed@helixcode.com>
- *
- * 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 <camel/camel-stream.h>
-#include <camel/camel-mime-filter.h>
-
-#define CAMEL_STREAM_FILTER(obj) CAMEL_CHECK_CAST (obj, camel_stream_filter_get_type (), CamelStreamFilter)
-#define CAMEL_STREAM_FILTER_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_stream_filter_get_type (), CamelStreamFilterClass)
-#define CAMEL_IS_STREAM_FILTER(obj) CAMEL_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 7ecafd88ff..0000000000
--- a/camel/camel-stream-fs.c
+++ /dev/null
@@ -1,374 +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 <bertrand@helixcode.com>
- * Michael Zucchi <notzed@helixcode.com>
- *
- * 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <string.h>
-
-#include "camel-operation.h"
-#include "camel-stream-fs.h"
-#include "camel-session.h"
-
-static CamelSeekableStreamClass *parent_class = NULL;
-
-/* Returns the class for a CamelStreamFS */
-#define CSFS_CLASS(so) CAMEL_STREAM_FS_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-
-static ssize_t stream_read (CamelStream *stream, char *buffer, size_t n);
-static ssize_t stream_write (CamelStream *stream, const char *buffer, size_t 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
-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);
-
- parent_class = CAMEL_SEEKABLE_STREAM_CLASS (camel_type_get_global_classfuncs (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;
-}
-
-static void
-camel_stream_fs_init (gpointer object, gpointer klass)
-{
- CamelStreamFs *stream = CAMEL_STREAM_FS (object);
-
- stream->fd = -1;
- ((CamelSeekableStream *)stream)->bound_end = CAMEL_STREAM_UNBOUND;
-}
-
-static void
-camel_stream_fs_finalize (CamelObject *object)
-{
- CamelStreamFs *stream_fs = CAMEL_STREAM_FS (object);
-
- if (stream_fs->fd != -1)
- close (stream_fs->fd);
-}
-
-
-CamelType
-camel_stream_fs_get_type (void)
-{
- static CamelType camel_stream_fs_type = CAMEL_INVALID_TYPE;
-
- if (camel_stream_fs_type == CAMEL_INVALID_TYPE) {
- camel_stream_fs_type = camel_type_register (camel_seekable_stream_get_type (), "CamelStreamFs",
- sizeof (CamelStreamFs),
- sizeof (CamelStreamFsClass),
- (CamelObjectClassInitFunc) camel_stream_fs_class_init,
- NULL,
- (CamelObjectInitFunc) camel_stream_fs_init,
- (CamelObjectFinalizeFunc) camel_stream_fs_finalize);
- }
-
- return camel_stream_fs_type;
-}
-
-/**
- * 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;
-
- if (fd == -1)
- return NULL;
-
- stream_fs = CAMEL_STREAM_FS (camel_object_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 ssize_t
-stream_read (CamelStream *stream, char *buffer, size_t n)
-{
- CamelStreamFs *stream_fs = CAMEL_STREAM_FS (stream);
- CamelSeekableStream *seekable = CAMEL_SEEKABLE_STREAM (stream);
- ssize_t nread;
- int cancel_fd;
-
- if (camel_operation_cancel_check(NULL)) {
- errno = EINTR;
- return -1;
- }
-
- if (seekable->bound_end != CAMEL_STREAM_UNBOUND)
- n = MIN (seekable->bound_end - seekable->position, n);
-
- cancel_fd = camel_operation_cancel_fd(NULL);
- if (cancel_fd == -1) {
- do {
- nread = read (stream_fs->fd, buffer, n);
- } while (nread == -1 && errno == EINTR);
- } else {
- fd_set rdset;
- int flags, fdmax;
-
- flags = fcntl(stream_fs->fd, F_GETFL);
- fcntl(stream_fs->fd, F_SETFL, flags | O_NONBLOCK);
- FD_ZERO(&rdset);
- FD_SET(stream_fs->fd, &rdset);
- FD_SET(cancel_fd, &rdset);
- fdmax = MAX(stream_fs->fd, cancel_fd)+1;
- select(fdmax, &rdset, 0, 0, NULL);
- if (FD_ISSET(cancel_fd, &rdset)) {
- fcntl(stream_fs->fd, F_SETFL, flags);
- errno = EINTR;
- return -1;
- }
- nread = read(stream_fs->fd, buffer, n);
- fcntl(stream_fs->fd, F_SETFL, flags);
- }
-
- if (nread > 0)
- seekable->position += nread;
- else if (nread == 0)
- stream->eos = TRUE;
-
- return nread;
-}
-
-static ssize_t
-stream_write (CamelStream *stream, const char *buffer, size_t n)
-{
- CamelStreamFs *stream_fs = CAMEL_STREAM_FS (stream);
- CamelSeekableStream *seekable = CAMEL_SEEKABLE_STREAM (stream);
- ssize_t v, written = 0;
- int cancel_fd;
-
- if (camel_operation_cancel_check(NULL)) {
- errno = EINTR;
- return -1;
- }
-
- if (seekable->bound_end != CAMEL_STREAM_UNBOUND)
- n = MIN (seekable->bound_end - seekable->position, n);
-
- cancel_fd = camel_operation_cancel_fd(NULL);
- if (cancel_fd == -1) {
- do {
- v = write (stream_fs->fd, buffer+written, n-written);
- if (v > 0)
- written += v;
- } while (v == -1 && errno == EINTR);
- } else {
- fd_set rdset, wrset;
- int flags, fdmax;
-
- flags = fcntl(stream_fs->fd, F_GETFL);
- fcntl(stream_fs->fd, F_SETFL, flags | O_NONBLOCK);
- fdmax = MAX(stream_fs->fd, cancel_fd)+1;
- do {
- FD_ZERO(&rdset);
- FD_ZERO(&wrset);
- FD_SET(stream_fs->fd, &wrset);
- FD_SET(cancel_fd, &rdset);
- select(fdmax, &rdset, &wrset, 0, NULL);
- if (FD_ISSET(cancel_fd, &rdset)) {
- fcntl(stream_fs->fd, F_SETFL, flags);
- errno = EINTR;
- return -1;
- }
- v = write(stream_fs->fd, buffer+written, n-written);
- if (v>0)
- written += v;
- } while (v != -1 && written < n);
- fcntl(stream_fs->fd, F_SETFL, flags);
- }
-
- 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)
-{
- if (close (((CamelStreamFs *)stream)->fd) == -1)
- return -1;
-
- ((CamelStreamFs *)stream)->fd = -1;
- return 0;
-}
-
-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) {
- if (real<stream->bound_start)
- real = stream->bound_start;
- 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 4393b0e3eb..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 <bertrand@helixcode.com>
- *
- * 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 }*/
-
-/* for open flags */
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-
-#include <camel/camel-seekable-stream.h>
-
-#define CAMEL_STREAM_FS_TYPE (camel_stream_fs_get_type ())
-#define CAMEL_STREAM_FS(obj) (CAMEL_CHECK_CAST((obj), CAMEL_STREAM_FS_TYPE, CamelStreamFs))
-#define CAMEL_STREAM_FS_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_STREAM_FS_TYPE, CamelStreamFsClass))
-#define CAMEL_IS_STREAM_FS(o) (CAMEL_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 Camel function */
-CamelType 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 afaeca9b0e..0000000000
--- a/camel/camel-stream-mem.c
+++ /dev/null
@@ -1,251 +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 <bertrand@helixcode.com>
- * Michael Zucchi <notzed@helixcode.com>
- *
- * 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <errno.h>
-
-#include "camel-stream-mem.h"
-
-static CamelSeekableStreamClass *parent_class = NULL;
-
-/* Returns the class for a CamelStreamMem */
-#define CSM_CLASS(so) CAMEL_STREAM_MEM_CLASS(CAMEL_OBJECT_GET_CLASS(so))
-
-static ssize_t stream_read (CamelStream *stream, char *buffer, size_t n);
-static ssize_t stream_write (CamelStream *stream, const char *buffer, size_t n);
-static gboolean stream_eos (CamelStream *stream);
-static off_t stream_seek (CamelSeekableStream *stream, off_t offset,
- CamelStreamSeekPolicy policy);
-
-static void camel_stream_mem_finalize (CamelObject *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);
-
- parent_class = CAMEL_SEEKABLE_STREAM_CLASS( camel_type_get_global_classfuncs( CAMEL_SEEKABLE_STREAM_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;
-}
-
-static void
-camel_stream_mem_init (CamelObject *object)
-{
- CamelStreamMem *stream_mem = CAMEL_STREAM_MEM (object);
-
- stream_mem->owner = FALSE;
- stream_mem->buffer = 0;
-}
-
-CamelType
-camel_stream_mem_get_type (void)
-{
- static CamelType camel_stream_mem_type = CAMEL_INVALID_TYPE;
-
- if (camel_stream_mem_type == CAMEL_INVALID_TYPE) {
- camel_stream_mem_type = camel_type_register( CAMEL_SEEKABLE_STREAM_TYPE,
- "CamelStreamMem",
- sizeof( CamelStreamMem ),
- sizeof( CamelStreamMemClass ),
- (CamelObjectClassInitFunc) camel_stream_mem_class_init,
- NULL,
- (CamelObjectInitFunc) camel_stream_mem_init,
- (CamelObjectFinalizeFunc) camel_stream_mem_finalize );
- }
-
- 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 = CAMEL_STREAM_MEM( camel_object_new (CAMEL_STREAM_MEM_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);
- s->owner = TRUE;
-}
-
-static void
-camel_stream_mem_finalize (CamelObject *object)
-{
- CamelStreamMem *stream_mem = CAMEL_STREAM_MEM (object);
-
- if (stream_mem->buffer && stream_mem->owner)
- g_byte_array_free (stream_mem->buffer, TRUE);
-
- /* Will be called automagically in the Camel Type System!
- * Wheeee!
- * G_TK_OBJECT_CLASS (parent_class)->finalize (object);
- */
-}
-
-static ssize_t
-stream_read (CamelStream *stream, char *buffer, size_t n)
-{
- CamelStreamMem *camel_stream_mem = CAMEL_STREAM_MEM (stream);
- CamelSeekableStream *seekable = CAMEL_SEEKABLE_STREAM (stream);
- ssize_t nread;
-
- if (seekable->bound_end != CAMEL_STREAM_UNBOUND)
- n = MIN(seekable->bound_end - seekable->position, n);
-
- nread = MIN (n, camel_stream_mem->buffer->len - seekable->position);
- if (nread > 0) {
- memcpy (buffer, camel_stream_mem->buffer->data + seekable->position, nread);
- seekable->position += nread;
- } else
- nread = 0;
-
- return nread;
-}
-
-static ssize_t
-stream_write (CamelStream *stream, const char *buffer, size_t n)
-{
- CamelStreamMem *stream_mem = CAMEL_STREAM_MEM (stream);
- CamelSeekableStream *seekable = CAMEL_SEEKABLE_STREAM (stream);
- ssize_t nwrite = n;
-
- if (seekable->bound_end != CAMEL_STREAM_UNBOUND)
- nwrite = MIN(seekable->bound_end - seekable->position, n);
-
-#ifndef NO_WARNINGS
-#warning "g_byte_arrays use g_malloc and so are totally unsuitable for this object"
-#endif
- if (seekable->position == stream_mem->buffer->len) {
- g_byte_array_append(stream_mem->buffer, (const guint8 *)buffer, nwrite);
- } else {
- g_byte_array_set_size(stream_mem->buffer, nwrite + stream_mem->buffer->len);
- memcpy(stream_mem->buffer->data + seekable->position, buffer, nwrite);
- }
- seekable->position += nwrite;
-
- return nwrite;
-}
-
-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;
- default:
- position = 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 5ac13750f4..0000000000
--- a/camel/camel-stream-mem.h
+++ /dev/null
@@ -1,75 +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 <bertrand@helixcode.com>
- * Michael Zucchi <notzed@helixcode.com>
- *
- * 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 <sys/types.h>
-#include <camel/camel-seekable-stream.h>
-
-#define CAMEL_STREAM_MEM_TYPE (camel_stream_mem_get_type ())
-#define CAMEL_STREAM_MEM(obj) (CAMEL_CHECK_CAST((obj), CAMEL_STREAM_MEM_TYPE, CamelStreamMem))
-#define CAMEL_STREAM_MEM_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_STREAM_MEM_TYPE, CamelStreamMemClass))
-#define CAMEL_IS_STREAM_MEM(o) (CAMEL_CHECK_TYPE((o), CAMEL_STREAM_MEM_TYPE))
-
-typedef struct _CamelStreamMemClass CamelStreamMemClass;
-
-struct _CamelStreamMem {
- CamelSeekableStream parent_object;
-
- gboolean owner; /* do we own the buffer? */
- GByteArray *buffer;
-};
-
-struct _CamelStreamMemClass {
- CamelSeekableStreamClass parent_class;
-
- /* Virtual methods */
-};
-
-/* Standard Camel function */
-CamelType 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-null.c b/camel/camel-stream-null.c
deleted file mode 100644
index 1738c326cc..0000000000
--- a/camel/camel-stream-null.c
+++ /dev/null
@@ -1,93 +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:
- * Michael Zucchi <notzed@helixcode.com>
- *
- * 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "camel-stream-null.h"
-
-static CamelObjectClass *parent_class = NULL;
-
-/* Returns the class for a CamelStream */
-#define CS_CLASS(so) CAMEL_STREAM_NULL_CLASS(CAMEL_OBJECT_GET_CLASS(so))
-
-/* dummy implementations, for a NULL stream */
-static ssize_t stream_read (CamelStream *stream, char *buffer, size_t n) { return 0; }
-static ssize_t stream_write (CamelStream *stream, const char *buffer, size_t n) { return n; }
-static int stream_close (CamelStream *stream) { return 0; }
-static int stream_flush (CamelStream *stream) { return 0; }
-static gboolean stream_eos (CamelStream *stream) { return TRUE; }
-static int stream_reset (CamelStream *stream) { return 0; }
-
-static void
-camel_stream_null_class_init (CamelStreamClass *camel_stream_null_class)
-{
- CamelStreamClass *camel_stream_class = (CamelStreamClass *)camel_stream_null_class;
-
- parent_class = camel_type_get_global_classfuncs( CAMEL_OBJECT_TYPE );
-
- /* virtual method definition */
- camel_stream_class->read = stream_read;
- camel_stream_class->write = stream_write;
- camel_stream_class->close = stream_close;
- camel_stream_class->flush = stream_flush;
- camel_stream_class->eos = stream_eos;
- camel_stream_class->reset = stream_reset;
-}
-
-CamelType
-camel_stream_null_get_type (void)
-{
- static CamelType camel_stream_null_type = CAMEL_INVALID_TYPE;
-
- if (camel_stream_null_type == CAMEL_INVALID_TYPE) {
- camel_stream_null_type = camel_type_register( camel_stream_get_type(),
- "CamelStreamNull",
- sizeof( CamelStreamNull ),
- sizeof( CamelStreamNullClass ),
- (CamelObjectClassInitFunc) camel_stream_null_class_init,
- NULL,
- NULL,
- NULL );
- }
-
- return camel_stream_null_type;
-}
-
-/**
- * camel_stream_fs_new_with_fd:
- * @fd: a file descriptor
- *
- * Returns a NULL stream. A null stream is always at eof, and
- * always returns success for all reads and writes.
- *
- * Return value: the stream
- **/
-CamelStreamNull *
-camel_stream_null_new(void)
-{
- return (CamelStreamNull *)camel_object_new(camel_stream_null_get_type ());
-}
diff --git a/camel/camel-stream-null.h b/camel/camel-stream-null.h
deleted file mode 100644
index 70978c5d61..0000000000
--- a/camel/camel-stream-null.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (C) 2000 Helix Code Inc.
- *
- * Authors: Michael Zucchi <notzed@helixcode.com>
- *
- * 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_NULL_H
-#define _CAMEL_STREAM_NULL_H
-
-#include <camel/camel-stream.h>
-
-#define CAMEL_STREAM_NULL(obj) CAMEL_CHECK_CAST (obj, camel_stream_null_get_type (), CamelStreamNull)
-#define CAMEL_STREAM_NULL_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_stream_null_get_type (), CamelStreamNullClass)
-#define CAMEL_IS_STREAM_NULL(obj) CAMEL_CHECK_TYPE (obj, camel_stream_null_get_type ())
-
-typedef struct _CamelStreamNullClass CamelStreamNullClass;
-
-struct _CamelStreamNull {
- CamelStream parent;
-};
-
-struct _CamelStreamNullClass {
- CamelStreamClass parent_class;
-};
-
-guint camel_stream_null_get_type (void);
-
-CamelStreamNull *camel_stream_null_new (void);
-
-#endif /* ! _CAMEL_STREAM_NULL_H */
diff --git a/camel/camel-stream.c b/camel/camel-stream.c
deleted file mode 100644
index a883905e8d..0000000000
--- a/camel/camel-stream.c
+++ /dev/null
@@ -1,275 +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 <bertrand@helixcode.com>
- *
- * 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <string.h>
-#include "camel-stream.h"
-
-static CamelObjectClass *parent_class = NULL;
-
-/* Returns the class for a CamelStream */
-#define CS_CLASS(so) CAMEL_STREAM_CLASS(CAMEL_OBJECT_GET_CLASS(so))
-
-/* default implementations, do very little */
-static ssize_t stream_read (CamelStream *stream, char *buffer, size_t n) { return 0; }
-static ssize_t stream_write (CamelStream *stream, const char *buffer, size_t n) { return n; }
-static int stream_close (CamelStream *stream) { return 0; }
-static int stream_flush (CamelStream *stream) { return 0; }
-static gboolean stream_eos (CamelStream *stream) { return stream->eos; }
-static int stream_reset (CamelStream *stream) { return 0; }
-
-static void
-camel_stream_class_init (CamelStreamClass *camel_stream_class)
-{
- parent_class = camel_type_get_global_classfuncs( CAMEL_OBJECT_TYPE );
-
- /* virtual method definition */
- camel_stream_class->read = stream_read;
- camel_stream_class->write = stream_write;
- camel_stream_class->close = stream_close;
- camel_stream_class->flush = stream_flush;
- camel_stream_class->eos = stream_eos;
- camel_stream_class->reset = stream_reset;
-}
-
-CamelType
-camel_stream_get_type (void)
-{
- static CamelType camel_stream_type = CAMEL_INVALID_TYPE;
-
- if (camel_stream_type == CAMEL_INVALID_TYPE) {
- camel_stream_type = camel_type_register( CAMEL_OBJECT_TYPE,
- "CamelStream",
- sizeof( CamelStream ),
- sizeof( CamelStreamClass ),
- (CamelObjectClassInitFunc) camel_stream_class_init,
- NULL,
- NULL,
- NULL );
- }
-
- 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.
- **/
-ssize_t
-camel_stream_read (CamelStream *stream, char *buffer, size_t 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.
- **/
-ssize_t
-camel_stream_write (CamelStream *stream, const char *buffer, size_t 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);
-}
-
-/**
- * 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);
-}
-
-/**
- * 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);
-}
-
-/**
- * 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.
- **/
-ssize_t
-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.
- **/
-ssize_t
-camel_stream_printf (CamelStream *stream, const char *fmt, ... )
-{
- va_list args;
- char *string;
- ssize_t 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.
- **/
-ssize_t
-camel_stream_write_to_stream (CamelStream *stream, CamelStream *output_stream)
-{
- char tmp_buf[4096];
- ssize_t total = 0;
- ssize_t nb_read;
- ssize_t 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) {
- ssize_t 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 6a2517b0bb..0000000000
--- a/camel/camel-stream.h
+++ /dev/null
@@ -1,91 +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 <bertrand@helixcode.com>
- *
- * 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 <stdarg.h>
-#include <unistd.h>
-#include <camel/camel-object.h>
-
-#define CAMEL_STREAM_TYPE (camel_stream_get_type ())
-#define CAMEL_STREAM(obj) (CAMEL_CHECK_CAST((obj), CAMEL_STREAM_TYPE, CamelStream))
-#define CAMEL_STREAM_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_STREAM_TYPE, CamelStreamClass))
-#define CAMEL_IS_STREAM(o) (CAMEL_CHECK_TYPE((o), CAMEL_STREAM_TYPE))
-
-struct _CamelStream
-{
- CamelObject parent_object;
-
- gboolean eos;
-};
-
-typedef struct {
- CamelObjectClass parent_class;
-
- /* Virtual methods */
-
- ssize_t (*read) (CamelStream *stream, char *buffer, size_t n);
- ssize_t (*write) (CamelStream *stream, const char *buffer, size_t n);
- int (*close) (CamelStream *stream);
- int (*flush) (CamelStream *stream);
- gboolean (*eos) (CamelStream *stream);
- int (*reset) (CamelStream *stream);
-
-} CamelStreamClass;
-
-/* Standard Camel function */
-CamelType camel_stream_get_type (void);
-
-/* public methods */
-ssize_t camel_stream_read (CamelStream *stream, char *buffer, size_t n);
-ssize_t camel_stream_write (CamelStream *stream, const char *buffer, size_t 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 */
-ssize_t camel_stream_write_string (CamelStream *stream, const char *string);
-ssize_t camel_stream_printf (CamelStream *stream, const char *fmt, ... ) G_GNUC_PRINTF (2, 3);
-ssize_t 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.
- */
-ssize_t camel_stream_write_to_stream (CamelStream *stream, CamelStream *output_stream);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_STREAM_H */
diff --git a/camel/camel-tcp-stream-openssl.c b/camel/camel-tcp-stream-openssl.c
deleted file mode 100644
index c59705ae8a..0000000000
--- a/camel/camel-tcp-stream-openssl.c
+++ /dev/null
@@ -1,562 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2001 Ximian, Inc. (www.ximian.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.
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#ifdef HAVE_OPENSSL
-#include <openssl/openssl.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include "camel-tcp-stream-openssl.h"
-#include "camel-operation.h"
-
-static CamelTcpStreamClass *parent_class = NULL;
-
-/* Returns the class for a CamelTcpStreamOpenSSL */
-#define CTSR_CLASS(so) CAMEL_TCP_STREAM_OPENSSL_CLASS (CAMEL_OBJECT_GET_CLASS (so))
-
-static ssize_t stream_read (CamelStream *stream, char *buffer, size_t n);
-static ssize_t stream_write (CamelStream *stream, const char *buffer, size_t n);
-static int stream_flush (CamelStream *stream);
-static int stream_close (CamelStream *stream);
-
-static int stream_connect (CamelTcpStream *stream, struct hostent *host, int port);
-static int stream_getsockopt (CamelTcpStream *stream, CamelSockOptData *data);
-static int stream_setsockopt (CamelTcpStream *stream, const CamelSockOptData *data);
-static gpointer stream_get_socket (CamelTcpStream *stream);
-
-struct _CamelTcpStreamOpenSSLPrivate {
- int sockfd;
- SSL *ssl;
-
- CamelService *service;
- char *expected_host;
-};
-
-static void
-camel_tcp_stream_openssl_class_init (CamelTcpStreamOpenSSLClass *camel_tcp_stream_openssl_class)
-{
- CamelTcpStreamClass *camel_tcp_stream_class =
- CAMEL_TCP_STREAM_CLASS (camel_tcp_stream_openssl_class);
- CamelStreamClass *camel_stream_class =
- CAMEL_STREAM_CLASS (camel_tcp_stream_openssl_class);
-
- parent_class = CAMEL_TCP_STREAM_CLASS (camel_type_get_global_classfuncs (camel_tcp_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_tcp_stream_class->connect = stream_connect;
- camel_tcp_stream_class->getsockopt = stream_getsockopt;
- camel_tcp_stream_class->setsockopt = stream_setsockopt;
- camel_tcp_stream_class->get_socket = stream_get_socket;
-}
-
-static void
-camel_tcp_stream_openssl_init (gpointer object, gpointer klass)
-{
- CamelTcpStreamOpenSSL *stream = CAMEL_TCP_STREAM_OPENSSL (object);
-
- stream->priv = g_new0 (struct _CamelTcpStreamOpenSSLPrivate, 1);
- stream->priv->sockfd = -1;
-}
-
-static void
-camel_tcp_stream_openssl_finalize (CamelObject *object)
-{
- CamelTcpStreamOpenSSL *stream = CAMEL_TCP_STREAM_OPENSSL (object);
-
- if (stream->priv->ssl) {
- SSL_shutdown (stream->priv->ssl);
-
- if (stream->priv->ssl->ctx)
- SSL_CTX_free (stream->priv->ssl->ctx);
-
- SSL_free (stream->priv->ssl);
- }
-
- if (stream->priv->sockfd != -1)
- close (stream->priv->sockfd);
-
- g_free (stream->priv->expected_host);
-
- g_free (stream->priv);
-}
-
-
-CamelType
-camel_tcp_stream_openssl_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (camel_tcp_stream_get_type (),
- "CamelTcpStreamOpenSSL",
- sizeof (CamelTcpStreamOpenSSL),
- sizeof (CamelTcpStreamOpenSSLClass),
- (CamelObjectClassInitFunc) camel_tcp_stream_openssl_class_init,
- NULL,
- (CamelObjectInitFunc) camel_tcp_stream_openssl_init,
- (CamelObjectFinalizeFunc) camel_tcp_stream_openssl_finalize);
- }
-
- return type;
-}
-
-
-/**
- * camel_tcp_stream_openssl_new:
- * @service: camel service
- * @expected_host: host that the stream is expecting to connect with.
- *
- * Since the SSL certificate authenticator may need to prompt the
- * user, a CamelService is needed. @expected_host is needed as a
- * protection against an MITM attack.
- *
- * Return value: a tcp stream
- **/
-CamelStream *
-camel_tcp_stream_openssl_new (CamelService *service, const char *expected_host)
-{
- CamelTcpStreamOpenSSL *stream;
-
- stream = CAMEL_TCP_STREAM_OPENSSL (camel_object_new (camel_tcp_stream_openssl_get_type ()));
-
- stream->priv->service = service;
- stream->priv->expected_host = g_strdup (expected_host);
-
- return CAMEL_STREAM (stream);
-}
-
-static ssize_t
-stream_read (CamelStream *stream, char *buffer, size_t n)
-{
- CamelTcpStreamOpenSSL *tcp_stream_openssl = CAMEL_TCP_STREAM_OPENSSL (stream);
- ssize_t nread;
- int cancel_fd;
-
- if (camel_operation_cancel_check (NULL)) {
- errno = EINTR;
- return -1;
- }
-
- cancel_fd = camel_operation_cancel_fd (NULL);
- if (cancel_fd == -1) {
- do {
- nread = SSL_read (tcp_stream_openssl->priv->ssl, buffer, n);
- } while (nread == -1 && errno == EINTR);
- } else {
- int flags, fdmax;
- fd_set rdset;
-
- flags = fcntl (tcp_stream_openssl->priv->sockfd, F_GETFL);
- fcntl (tcp_stream_openssl->priv->sockfd, F_SETFL, flags | O_NONBLOCK);
-
- FD_ZERO (&rdset);
- FD_SET (tcp_stream_openssl->priv->sockfd, &rdset);
- FD_SET (cancel_fd, &rdset);
- fdmax = MAX (tcp_stream_openssl->priv->sockfd, cancel_fd) + 1;
-
- select (fdmax, &rdset, 0, 0, NULL);
- if (FD_ISSET (cancel_fd, &rdset)) {
- fcntl (tcp_stream_openssl->priv->sockfd, F_SETFL, flags);
- errno = EINTR;
- return -1;
- }
-
- nread = SSL_read (tcp_stream_openssl->priv->ssl, buffer, n);
- fcntl (tcp_stream_openssl->priv->sockfd, F_SETFL, flags);
- }
-
- return nread;
-}
-
-static ssize_t
-stream_write (CamelStream *stream, const char *buffer, size_t n)
-{
- CamelTcpStreamOpenSSL *tcp_stream_openssl = CAMEL_TCP_STREAM_OPENSSL (stream);
- ssize_t w, written = 0;
- int cancel_fd;
-
- if (camel_operation_cancel_check (NULL)) {
- errno = EINTR;
- return -1;
- }
-
- cancel_fd = camel_operation_cancel_fd (NULL);
- if (cancel_fd == -1) {
- do {
- written = SSL_write (tcp_stream_openssl->priv->ssl, buffer, n);
- } while (written == -1 && errno == EINTR);
- } else {
- fd_set rdset, wrset;
- int flags, fdmax;
-
- flags = fcntl (tcp_stream_openssl->priv->sockfd, F_GETFL);
- fcntl (tcp_stream_openssl->priv->sockfd, F_SETFL, flags | O_NONBLOCK);
-
- fdmax = MAX (tcp_stream_openssl->priv->sockfd, cancel_fd) + 1;
- do {
- FD_ZERO (&rdset);
- FD_ZERO (&wrset);
- FD_SET (tcp_stream_openssl->priv->sockfd, &wrset);
- FD_SET (cancel_fd, &rdset);
-
- select (fdmax, &rdset, &wrset, 0, NULL);
- if (FD_ISSET (cancel_fd, &rdset)) {
- fcntl (tcp_stream_openssl->priv->sockfd, F_SETFL, flags);
- errno = EINTR;
- return -1;
- }
-
- w = SSL_write (tcp_stream_openssl->priv->ssl, buffer + written, n - written);
- if (w > 0)
- written += w;
- } while (w != -1 && written < n);
-
- fcntl (tcp_stream_openssl->priv->sockfd, F_SETFL, flags);
- }
-
- return written;
-}
-
-static int
-stream_flush (CamelStream *stream)
-{
- return fsync (((CamelTcpStreamOpenSSL *)stream)->priv->sockfd);
-}
-
-
-static void
-close_ssl_connection (SSL *ssl)
-{
- if (ssl) {
- SSL_shutdown (ssl);
-
- if (ssl->ctx)
- SSL_CTX_free (ssl->ctx);
-
- SSL_free (ssl);
- }
-}
-
-static int
-stream_close (CamelStream *stream)
-{
- close_ssl_connection (((CamelTcpStreamOpenSSL *)stream)->priv->ssl);
- ((CamelTcpStreamOpenSSL *)stream)->priv->ssl = NULL;
-
- if (close (((CamelTcpStreamOpenSSL *)stream)->priv->sockfd) == -1)
- return -1;
-
- ((CamelTcpStreamOpenSSL *)stream)->priv->sockfd = -1;
- return 0;
-}
-
-/* this is a 'cancellable' connect, cancellable from camel_operation_cancel etc */
-/* returns -1 & errno == EINTR if the connection was cancelled */
-static int
-socket_connect (struct hostent *h, int port)
-{
- struct sockaddr_in sin;
- int fd;
- int ret;
- socklen_t len;
- struct timeval tv;
- int cancel_fd;
-
- /* see if we're cancelled yet */
- if (camel_operation_cancel_check (NULL)) {
- errno = EINTR;
- return -1;
- }
-
- /* setup connect, we do it using a nonblocking socket so we can poll it */
- sin.sin_port = htons (port);
- sin.sin_family = h->h_addrtype;
- memcpy (&sin.sin_addr, h->h_addr, sizeof (sin.sin_addr));
-
- fd = socket (h->h_addrtype, SOCK_STREAM, 0);
-
- cancel_fd = camel_operation_cancel_fd (NULL);
- if (cancel_fd == -1) {
- ret = connect (fd, (struct sockaddr *)&sin, sizeof (sin));
- if (ret == -1) {
- close (fd);
- return -1;
- }
-
- return fd;
- } else {
- fd_set rdset, wrset;
- int flags, fdmax;
-
- flags = fcntl (fd, F_GETFL);
- fcntl (fd, F_SETFL, flags | O_NONBLOCK);
-
- ret = connect (fd, (struct sockaddr *)&sin, sizeof (sin));
- if (ret == 0) {
- fcntl (fd, F_SETFL, flags);
- return fd;
- }
-
- if (errno != EINPROGRESS) {
- close (fd);
- return -1;
- }
-
- FD_ZERO (&rdset);
- FD_ZERO (&wrset);
- FD_SET (fd, &wrset);
- FD_SET (cancel_fd, &rdset);
- fdmax = MAX (fd, cancel_fd) + 1;
- tv.tv_usec = 0;
- tv.tv_sec = 60 * 4;
-
- if (select (fdmax, &rdset, &wrset, 0, &tv) == 0) {
- close (fd);
- errno = ETIMEDOUT;
- return -1;
- }
-
- if (cancel_fd != -1 && FD_ISSET (cancel_fd, &rdset)) {
- close (fd);
- errno = EINTR;
- return -1;
- } else {
- len = sizeof (int);
-
- if (getsockopt (fd, SOL_SOCKET, SO_ERROR, &ret, &len) == -1) {
- close (fd);
- return -1;
- }
-
- if (ret != 0) {
- close (fd);
- errno = ret;
- return -1;
- }
- }
-
- fcntl (fd, F_SETFL, flags);
- }
-
- return fd;
-}
-
-static int
-ssl_verify (int ok, X509_STORE_CTX *ctx)
-{
- char *str, buf[256];
- X509 *cert;
- int err;
-
- cert = X509_STORE_CTX_get_current_cert (ctx);
- err = X509_STORE_CTX_get_error (ctx);
-
- str = X509_NAME_oneline (X509_get_subject_name (cert), buf, 256);
- if (str) {
- if (ok)
- d(fprintf (stderr, "CamelTcpStreamSSL: depth=%d %s\n", ctx->error_depth, buf));
- else
- d(fprintf (stderr, "CamelTcpStreamSSL: depth=%d error=%d %s\n",
- ctx->error_depth, err, buf));
- }
-
- if (!ok) {
- switch (err) {
- case X509_V_ERR_CERT_NOT_YET_VALID:
- case X509_V_ERR_CERT_HAS_EXPIRED:
- case X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT:
- /* FIXME: get user's response */
- ok = 1;
- }
- }
-
- return ok;
-}
-
-static SSL *
-open_ssl_connection (CamelService *service, int sockfd)
-{
- SSL_CTX *ssl_ctx = NULL;
- SSL *ssl = NULL;
- int n;
-
- /* SSLv23_client_method will negotiate with SSL v2, v3, or TLS v1 */
- ssl_ctx = SSL_CTX_new (SSLv23_client_method ());
- SSL_CTX_set_verify (ssl_ctx, SSL_VERIFY_PEER, &ssl_verify);
- ssl = SSL_new (ssl_ctx);
- SSL_set_fd (ssl, sockfd);
-
- n = SSL_connect (ssl);
- if (n != 1) {
- SSL_shutdown (ssl);
-
- if (ssl->ctx)
- SSL_CTX_free (ssl->ctx);
-
- SSL_free (ssl);
- ssl = NULL;
- }
-
- return ssl;
-}
-
-static int
-stream_connect (CamelTcpStream *stream, struct hostent *host, int port)
-{
- CamelTcpStreamOpenSSL *openssl = CAMEL_TCP_STREAM_OPENSSL (stream);
- SSL *ssl;
- int fd;
-
- g_return_val_if_fail (host != NULL, -1);
-
- fd = socket_connect (host, port);
- if (fd == -1)
- return -1;
-
- ssl = open_ssl_connection (stream->priv->service, sockfd);
- if (!ssl)
- return -1;
-
- openssl->priv->sockfd = fd;
- openssl->priv->ssl = ssl;
-
- return 0;
-}
-
-
-static int
-get_sockopt_level (const CamelSockOptData *data)
-{
- switch (data->option) {
- case CAMEL_SOCKOPT_MAXSEGMENT:
- case CAMEL_SOCKOPT_NODELAY:
- return IPPROTO_TCP;
- default:
- return SOL_SOCKET;
- }
-}
-
-static int
-get_sockopt_optname (const CamelSockOptData *data)
-{
- switch (data->option) {
- case CAMEL_SOCKOPT_MAXSEGMENT:
- return TCP_MAXSEG;
- case CAMEL_SOCKOPT_NODELAY:
- return TCP_NODELAY;
- case CAMEL_SOCKOPT_BROADCAST:
- return SO_BROADCAST;
- case CAMEL_SOCKOPT_KEEPALIVE:
- return SO_KEEPALIVE;
- case CAMEL_SOCKOPT_LINGER:
- return SO_LINGER;
- case CAMEL_SOCKOPT_RECVBUFFERSIZE:
- return SO_RCVBUF;
- case CAMEL_SOCKOPT_SENDBUFFERSIZE:
- return SO_SNDBUF;
- case CAMEL_SOCKOPT_REUSEADDR:
- return SO_REUSEADDR;
- case CAMEL_SOCKOPT_IPTYPEOFSERVICE:
- return SO_TYPE;
- default:
- return -1;
- }
-}
-
-static int
-stream_getsockopt (CamelTcpStream *stream, CamelSockOptData *data)
-{
- int optname, optlen;
-
- if ((optname = get_sockopt_optname (data)) == -1)
- return -1;
-
- if (data->option == CAMEL_SOCKOPT_NONBLOCKING) {
- int flags;
-
- flags = fcntl (((CamelTcpStreamOpenSSL *)stream)->priv->sockfd, F_GETFL);
- if (flags == -1)
- return -1;
-
- data->value.non_blocking = flags & O_NONBLOCK;
-
- return 0;
- }
-
- return getsockopt (((CamelTcpStreamOpenSSL *)stream)->priv->sockfd,
- get_sockopt_level (data),
- optname,
- (void *) &data->value,
- &optlen);
-}
-
-static int
-stream_setsockopt (CamelTcpStream *stream, const CamelSockOptData *data)
-{
- int optname;
-
- if ((optname = get_sockopt_optname (data)) == -1)
- return -1;
-
- if (data->option == CAMEL_SOCKOPT_NONBLOCKING) {
- int flags, set;
-
- flags = fcntl (((CamelTcpStreamOpenSSL *)stream)->priv->sockfd, F_GETFL);
- if (flags == -1)
- return -1;
-
- set = data->value.non_blocking ? 1 : 0;
- flags = (flags & ~O_NONBLOCK) | (set & O_NONBLOCK);
-
- if (fcntl (((CamelTcpStreamOpenSSL *)stream)->priv->sockfd, F_SETFL, flags) == -1)
- return -1;
-
- return 0;
- }
-
- return setsockopt (((CamelTcpStreamOpenSSL *)stream)->priv->sockfd,
- get_sockopt_level (data),
- optname,
- (void *) &data->value,
- sizeof (data->value));
-}
-
-static gpointer
-stream_get_socket (CamelTcpStream *stream)
-{
- return GINT_TO_POINTER (CAMEL_TCP_STREAM_OPENSSL (stream)->priv->sockfd);
-}
-
-#endif /* HAVE_OPENSSL */
diff --git a/camel/camel-tcp-stream-openssl.h b/camel/camel-tcp-stream-openssl.h
deleted file mode 100644
index 0103332c3f..0000000000
--- a/camel/camel-tcp-stream-openssl.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2001 Ximian, Inc. (www.ximian.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.
- *
- */
-
-
-#ifndef CAMEL_TCP_STREAM_OPENSSL_H
-#define CAMEL_TCP_STREAM_OPENSSL_H
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <camel/camel-tcp-stream.h>
-
-#define CAMEL_TCP_STREAM_OPENSSL_TYPE (camel_tcp_stream_openssl_get_type ())
-#define CAMEL_TCP_STREAM_OPENSSL(obj) (CAMEL_CHECK_CAST((obj), CAMEL_TCP_STREAM_OPENSSL_TYPE, CamelTcpStreamOpenSSL))
-#define CAMEL_TCP_STREAM_OPENSSL_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_TCP_STREAM_OPENSSL_TYPE, CamelTcpStreamOpenSSLClass))
-#define CAMEL_IS_TCP_STREAM_OPENSSL(o) (CAMEL_CHECK_TYPE((o), CAMEL_TCP_STREAM_OPENSSL_TYPE))
-
-struct _CamelTcpStreamOpenSSL
-{
- CamelTcpStream parent_object;
-
- struct _CamelTcpStreamOpenSSLPrivate *priv;
-};
-
-typedef struct {
- CamelTcpStreamClass parent_class;
-
- /* virtual functions */
-
-} CamelTcpStreamOpenSSLClass;
-
-/* Standard Camel function */
-CamelType camel_tcp_stream_openssl_get_type (void);
-
-/* public methods */
-CamelStream *camel_tcp_stream_openssl_new (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_TCP_STREAM_OPENSSL_H */
diff --git a/camel/camel-tcp-stream-raw.c b/camel/camel-tcp-stream-raw.c
deleted file mode 100644
index 8e74f7c433..0000000000
--- a/camel/camel-tcp-stream-raw.c
+++ /dev/null
@@ -1,445 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2001 Ximian, Inc. (www.ximian.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.
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include "camel-tcp-stream-raw.h"
-#include "camel-operation.h"
-
-static CamelTcpStreamClass *parent_class = NULL;
-
-/* Returns the class for a CamelTcpStreamRaw */
-#define CTSR_CLASS(so) CAMEL_TCP_STREAM_RAW_CLASS (CAMEL_OBJECT_GET_CLASS (so))
-
-static ssize_t stream_read (CamelStream *stream, char *buffer, size_t n);
-static ssize_t stream_write (CamelStream *stream, const char *buffer, size_t n);
-static int stream_flush (CamelStream *stream);
-static int stream_close (CamelStream *stream);
-
-static int stream_connect (CamelTcpStream *stream, struct hostent *host, int port);
-static int stream_getsockopt (CamelTcpStream *stream, CamelSockOptData *data);
-static int stream_setsockopt (CamelTcpStream *stream, const CamelSockOptData *data);
-static gpointer stream_get_socket (CamelTcpStream *stream);
-
-static void
-camel_tcp_stream_raw_class_init (CamelTcpStreamRawClass *camel_tcp_stream_raw_class)
-{
- CamelTcpStreamClass *camel_tcp_stream_class =
- CAMEL_TCP_STREAM_CLASS (camel_tcp_stream_raw_class);
- CamelStreamClass *camel_stream_class =
- CAMEL_STREAM_CLASS (camel_tcp_stream_raw_class);
-
- parent_class = CAMEL_TCP_STREAM_CLASS (camel_type_get_global_classfuncs (camel_tcp_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_tcp_stream_class->connect = stream_connect;
- camel_tcp_stream_class->getsockopt = stream_getsockopt;
- camel_tcp_stream_class->setsockopt = stream_setsockopt;
- camel_tcp_stream_class->get_socket = stream_get_socket;
-}
-
-static void
-camel_tcp_stream_raw_init (gpointer object, gpointer klass)
-{
- CamelTcpStreamRaw *stream = CAMEL_TCP_STREAM_RAW (object);
-
- stream->sockfd = -1;
-}
-
-static void
-camel_tcp_stream_raw_finalize (CamelObject *object)
-{
- CamelTcpStreamRaw *stream = CAMEL_TCP_STREAM_RAW (object);
-
- if (stream->sockfd != -1)
- close (stream->sockfd);
-}
-
-
-CamelType
-camel_tcp_stream_raw_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (camel_tcp_stream_get_type (),
- "CamelTcpStreamRaw",
- sizeof (CamelTcpStreamRaw),
- sizeof (CamelTcpStreamRawClass),
- (CamelObjectClassInitFunc) camel_tcp_stream_raw_class_init,
- NULL,
- (CamelObjectInitFunc) camel_tcp_stream_raw_init,
- (CamelObjectFinalizeFunc) camel_tcp_stream_raw_finalize);
- }
-
- return type;
-}
-
-
-/**
- * camel_tcp_stream_raw_new:
- *
- * Return value: a tcp stream
- **/
-CamelStream *
-camel_tcp_stream_raw_new ()
-{
- CamelTcpStreamRaw *stream;
-
- stream = CAMEL_TCP_STREAM_RAW (camel_object_new (camel_tcp_stream_raw_get_type ()));
-
- return CAMEL_STREAM (stream);
-}
-
-static ssize_t
-stream_read (CamelStream *stream, char *buffer, size_t n)
-{
- CamelTcpStreamRaw *tcp_stream_raw = CAMEL_TCP_STREAM_RAW (stream);
- ssize_t nread;
- int cancel_fd;
-
- if (camel_operation_cancel_check (NULL)) {
- errno = EINTR;
- return -1;
- }
-
- cancel_fd = camel_operation_cancel_fd (NULL);
- if (cancel_fd == -1) {
- do {
- nread = read (tcp_stream_raw->sockfd, buffer, n);
- } while (nread == -1 && errno == EINTR);
- } else {
- int flags, fdmax;
- fd_set rdset;
-
- flags = fcntl (tcp_stream_raw->sockfd, F_GETFL);
- fcntl (tcp_stream_raw->sockfd, F_SETFL, flags | O_NONBLOCK);
-
- FD_ZERO (&rdset);
- FD_SET (tcp_stream_raw->sockfd, &rdset);
- FD_SET (cancel_fd, &rdset);
- fdmax = MAX (tcp_stream_raw->sockfd, cancel_fd) + 1;
-
- select (fdmax, &rdset, 0, 0, NULL);
- if (FD_ISSET (cancel_fd, &rdset)) {
- fcntl (tcp_stream_raw->sockfd, F_SETFL, flags);
- errno = EINTR;
- return -1;
- }
-
- nread = read (tcp_stream_raw->sockfd, buffer, n);
- fcntl (tcp_stream_raw->sockfd, F_SETFL, flags);
- }
-
- return nread;
-}
-
-static ssize_t
-stream_write (CamelStream *stream, const char *buffer, size_t n)
-{
- CamelTcpStreamRaw *tcp_stream_raw = CAMEL_TCP_STREAM_RAW (stream);
- ssize_t w, written = 0;
- int cancel_fd;
-
- if (camel_operation_cancel_check (NULL)) {
- errno = EINTR;
- return -1;
- }
-
- cancel_fd = camel_operation_cancel_fd (NULL);
- if (cancel_fd == -1) {
- do {
- written = write (tcp_stream_raw->sockfd, buffer, n);
- } while (written == -1 && errno == EINTR);
- } else {
- fd_set rdset, wrset;
- int flags, fdmax;
-
- flags = fcntl (tcp_stream_raw->sockfd, F_GETFL);
- fcntl (tcp_stream_raw->sockfd, F_SETFL, flags | O_NONBLOCK);
-
- fdmax = MAX (tcp_stream_raw->sockfd, cancel_fd) + 1;
- do {
- FD_ZERO (&rdset);
- FD_ZERO (&wrset);
- FD_SET (tcp_stream_raw->sockfd, &wrset);
- FD_SET (cancel_fd, &rdset);
-
- select (fdmax, &rdset, &wrset, 0, NULL);
- if (FD_ISSET (cancel_fd, &rdset)) {
- fcntl (tcp_stream_raw->sockfd, F_SETFL, flags);
- errno = EINTR;
- return -1;
- }
-
- w = write (tcp_stream_raw->sockfd, buffer + written, n - written);
- if (w > 0)
- written += w;
- } while (w != -1 && written < n);
-
- fcntl (tcp_stream_raw->sockfd, F_SETFL, flags);
- }
-
- return written;
-}
-
-static int
-stream_flush (CamelStream *stream)
-{
- return fsync (((CamelTcpStreamRaw *)stream)->sockfd);
-}
-
-static int
-stream_close (CamelStream *stream)
-{
- if (close (((CamelTcpStreamRaw *)stream)->sockfd) == -1)
- return -1;
-
- ((CamelTcpStreamRaw *)stream)->sockfd = -1;
- return 0;
-}
-
-/* this is a 'cancellable' connect, cancellable from camel_operation_cancel etc */
-/* returns -1 & errno == EINTR if the connection was cancelled */
-static int
-socket_connect (struct hostent *h, int port)
-{
- struct sockaddr_in sin;
- int fd;
- int ret;
- socklen_t len;
- struct timeval tv;
- int cancel_fd;
-
- /* see if we're cancelled yet */
- if (camel_operation_cancel_check (NULL)) {
- errno = EINTR;
- return -1;
- }
-
- /* setup connect, we do it using a nonblocking socket so we can poll it */
- sin.sin_port = htons (port);
- sin.sin_family = h->h_addrtype;
- memcpy (&sin.sin_addr, h->h_addr, sizeof (sin.sin_addr));
-
- fd = socket (h->h_addrtype, SOCK_STREAM, 0);
-
- cancel_fd = camel_operation_cancel_fd (NULL);
- if (cancel_fd == -1) {
- ret = connect (fd, (struct sockaddr *)&sin, sizeof (sin));
- if (ret == -1) {
- close (fd);
- return -1;
- }
-
- return fd;
- } else {
- fd_set rdset, wrset;
- int flags, fdmax;
-
- flags = fcntl (fd, F_GETFL);
- fcntl (fd, F_SETFL, flags | O_NONBLOCK);
-
- ret = connect (fd, (struct sockaddr *)&sin, sizeof (sin));
- if (ret == 0) {
- fcntl (fd, F_SETFL, flags);
- return fd;
- }
-
- if (errno != EINPROGRESS) {
- close (fd);
- return -1;
- }
-
- FD_ZERO (&rdset);
- FD_ZERO (&wrset);
- FD_SET (fd, &wrset);
- FD_SET (cancel_fd, &rdset);
- fdmax = MAX (fd, cancel_fd) + 1;
- tv.tv_usec = 0;
- tv.tv_sec = 60 * 4;
-
- if (select (fdmax, &rdset, &wrset, 0, &tv) == 0) {
- close (fd);
- errno = ETIMEDOUT;
- return -1;
- }
-
- if (cancel_fd != -1 && FD_ISSET (cancel_fd, &rdset)) {
- close (fd);
- errno = EINTR;
- return -1;
- } else {
- len = sizeof (int);
-
- if (getsockopt (fd, SOL_SOCKET, SO_ERROR, &ret, &len) == -1) {
- close (fd);
- return -1;
- }
-
- if (ret != 0) {
- close (fd);
- errno = ret;
- return -1;
- }
- }
-
- fcntl (fd, F_SETFL, flags);
- }
-
- return fd;
-}
-
-static int
-stream_connect (CamelTcpStream *stream, struct hostent *host, int port)
-{
- CamelTcpStreamRaw *raw = CAMEL_TCP_STREAM_RAW (stream);
- int fd;
-
- g_return_val_if_fail (host != NULL, -1);
-
- fd = socket_connect (host, port);
- if (fd == -1)
- return -1;
-
- raw->sockfd = fd;
-
- return 0;
-}
-
-
-static int
-get_sockopt_level (const CamelSockOptData *data)
-{
- switch (data->option) {
- case CAMEL_SOCKOPT_MAXSEGMENT:
- case CAMEL_SOCKOPT_NODELAY:
- return IPPROTO_TCP;
- default:
- return SOL_SOCKET;
- }
-}
-
-static int
-get_sockopt_optname (const CamelSockOptData *data)
-{
- switch (data->option) {
- case CAMEL_SOCKOPT_MAXSEGMENT:
- return TCP_MAXSEG;
- case CAMEL_SOCKOPT_NODELAY:
- return TCP_NODELAY;
- case CAMEL_SOCKOPT_BROADCAST:
- return SO_BROADCAST;
- case CAMEL_SOCKOPT_KEEPALIVE:
- return SO_KEEPALIVE;
- case CAMEL_SOCKOPT_LINGER:
- return SO_LINGER;
- case CAMEL_SOCKOPT_RECVBUFFERSIZE:
- return SO_RCVBUF;
- case CAMEL_SOCKOPT_SENDBUFFERSIZE:
- return SO_SNDBUF;
- case CAMEL_SOCKOPT_REUSEADDR:
- return SO_REUSEADDR;
- case CAMEL_SOCKOPT_IPTYPEOFSERVICE:
- return SO_TYPE;
- default:
- return -1;
- }
-}
-
-static int
-stream_getsockopt (CamelTcpStream *stream, CamelSockOptData *data)
-{
- int optname, optlen;
-
- if ((optname = get_sockopt_optname (data)) == -1)
- return -1;
-
- if (data->option == CAMEL_SOCKOPT_NONBLOCKING) {
- int flags;
-
- flags = fcntl (((CamelTcpStreamRaw *)stream)->sockfd, F_GETFL);
- if (flags == -1)
- return -1;
-
- data->value.non_blocking = flags & O_NONBLOCK;
-
- return 0;
- }
-
- return getsockopt (((CamelTcpStreamRaw *)stream)->sockfd,
- get_sockopt_level (data),
- optname,
- (void *) &data->value,
- &optlen);
-}
-
-static int
-stream_setsockopt (CamelTcpStream *stream, const CamelSockOptData *data)
-{
- int optname;
-
- if ((optname = get_sockopt_optname (data)) == -1)
- return -1;
-
- if (data->option == CAMEL_SOCKOPT_NONBLOCKING) {
- int flags, set;
-
- flags = fcntl (((CamelTcpStreamRaw *)stream)->sockfd, F_GETFL);
- if (flags == -1)
- return -1;
-
- set = data->value.non_blocking ? 1 : 0;
- flags = (flags & ~O_NONBLOCK) | (set & O_NONBLOCK);
-
- if (fcntl (((CamelTcpStreamRaw *)stream)->sockfd, F_SETFL, flags) == -1)
- return -1;
-
- return 0;
- }
-
- return setsockopt (((CamelTcpStreamRaw *)stream)->sockfd,
- get_sockopt_level (data),
- optname,
- (void *) &data->value,
- sizeof (data->value));
-}
-
-static gpointer
-stream_get_socket (CamelTcpStream *stream)
-{
- return GINT_TO_POINTER (CAMEL_TCP_STREAM_RAW (stream)->sockfd);
-}
diff --git a/camel/camel-tcp-stream-raw.h b/camel/camel-tcp-stream-raw.h
deleted file mode 100644
index 41304efde7..0000000000
--- a/camel/camel-tcp-stream-raw.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2001 Ximian, Inc. (www.ximian.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.
- *
- */
-
-
-#ifndef CAMEL_TCP_STREAM_RAW_H
-#define CAMEL_TCP_STREAM_RAW_H
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <camel/camel-tcp-stream.h>
-
-#define CAMEL_TCP_STREAM_RAW_TYPE (camel_tcp_stream_raw_get_type ())
-#define CAMEL_TCP_STREAM_RAW(obj) (CAMEL_CHECK_CAST((obj), CAMEL_TCP_STREAM_RAW_TYPE, CamelTcpStreamRaw))
-#define CAMEL_TCP_STREAM_RAW_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_TCP_STREAM_RAW_TYPE, CamelTcpStreamRawClass))
-#define CAMEL_IS_TCP_STREAM_RAW(o) (CAMEL_CHECK_TYPE((o), CAMEL_TCP_STREAM_RAW_TYPE))
-
-struct _CamelTcpStreamRaw
-{
- CamelTcpStream parent_object;
-
- int sockfd;
-};
-
-typedef struct {
- CamelTcpStreamClass parent_class;
-
- /* virtual functions */
-
-} CamelTcpStreamRawClass;
-
-/* Standard Camel function */
-CamelType camel_tcp_stream_raw_get_type (void);
-
-/* public methods */
-CamelStream *camel_tcp_stream_raw_new (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_TCP_STREAM_RAW_H */
diff --git a/camel/camel-tcp-stream-ssl.c b/camel/camel-tcp-stream-ssl.c
deleted file mode 100644
index 7e521b0a4d..0000000000
--- a/camel/camel-tcp-stream-ssl.c
+++ /dev/null
@@ -1,454 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2001 Ximian, Inc. (www.ximian.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.
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#ifdef HAVE_NSS
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <string.h>
-
-#include <nspr.h>
-#include <prio.h>
-#include <prerror.h>
-#include <prerr.h>
-#include "nss.h" /* Don't use <> here or it will include the system nss.h instead */
-#include <ssl.h>
-
-#include "camel-tcp-stream-ssl.h"
-#include "camel-session.h"
-
-static CamelTcpStreamClass *parent_class = NULL;
-
-/* Returns the class for a CamelTcpStreamSSL */
-#define CTSS_CLASS(so) CAMEL_TCP_STREAM_SSL_CLASS (CAMEL_OBJECT_GET_CLASS (so))
-
-static ssize_t stream_read (CamelStream *stream, char *buffer, size_t n);
-static ssize_t stream_write (CamelStream *stream, const char *buffer, size_t n);
-static int stream_flush (CamelStream *stream);
-static int stream_close (CamelStream *stream);
-
-static int stream_connect (CamelTcpStream *stream, struct hostent *host, int port);
-static int stream_getsockopt (CamelTcpStream *stream, CamelSockOptData *data);
-static int stream_setsockopt (CamelTcpStream *stream, const CamelSockOptData *data);
-static gpointer stream_get_socket (CamelTcpStream *stream);
-
-struct _CamelTcpStreamSSLPrivate {
- PRFileDesc *sockfd;
-
- CamelService *service;
- char *expected_host;
-};
-
-static void
-camel_tcp_stream_ssl_class_init (CamelTcpStreamSSLClass *camel_tcp_stream_ssl_class)
-{
- CamelTcpStreamClass *camel_tcp_stream_class =
- CAMEL_TCP_STREAM_CLASS (camel_tcp_stream_ssl_class);
- CamelStreamClass *camel_stream_class =
- CAMEL_STREAM_CLASS (camel_tcp_stream_ssl_class);
-
- parent_class = CAMEL_TCP_STREAM_CLASS (camel_type_get_global_classfuncs (camel_tcp_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_tcp_stream_class->connect = stream_connect;
- camel_tcp_stream_class->getsockopt = stream_getsockopt;
- camel_tcp_stream_class->setsockopt = stream_setsockopt;
- camel_tcp_stream_class->get_socket = stream_get_socket;
-}
-
-static void
-camel_tcp_stream_ssl_init (gpointer object, gpointer klass)
-{
- CamelTcpStreamSSL *stream = CAMEL_TCP_STREAM_SSL (object);
-
- stream->priv = g_new0 (struct _CamelTcpStreamSSLPrivate, 1);
-}
-
-static void
-camel_tcp_stream_ssl_finalize (CamelObject *object)
-{
- CamelTcpStreamSSL *stream = CAMEL_TCP_STREAM_SSL (object);
-
- if (stream->priv->sockfd != NULL)
- PR_Close (stream->priv->sockfd);
-
- g_free (stream->priv->expected_host);
-
- g_free (stream->priv);
-}
-
-
-CamelType
-camel_tcp_stream_ssl_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (camel_tcp_stream_get_type (),
- "CamelTcpStreamSSL",
- sizeof (CamelTcpStreamSSL),
- sizeof (CamelTcpStreamSSLClass),
- (CamelObjectClassInitFunc) camel_tcp_stream_ssl_class_init,
- NULL,
- (CamelObjectInitFunc) camel_tcp_stream_ssl_init,
- (CamelObjectFinalizeFunc) camel_tcp_stream_ssl_finalize);
- }
-
- return type;
-}
-
-/**
- * camel_tcp_stream_ssl_new:
- * @service: camel service
- * @expected_host: host that the stream is expected to connect with.
- *
- * Since the SSL certificate authenticator may need to prompt the
- * user, a CamelService is needed. @expected_host is needed as a
- * protection against an MITM attack.
- *
- * Return value: a tcp stream
- **/
-CamelStream *
-camel_tcp_stream_ssl_new (CamelService *service, const char *expected_host)
-{
- CamelTcpStreamSSL *stream;
-
- stream = CAMEL_TCP_STREAM_SSL (camel_object_new (camel_tcp_stream_ssl_get_type ()));
-
- stream->priv->service = service;
- stream->priv->expected_host = g_strdup (expected_host);
-
- return CAMEL_STREAM (stream);
-}
-
-static void
-set_errno (int code)
-{
- /* FIXME: this should handle more. */
- switch (code) {
- case PR_IO_TIMEOUT_ERROR:
- errno = EAGAIN;
- break;
- case PR_IO_ERROR:
- errno = EIO;
- break;
- default:
- /* what to set by default?? */
- errno = EINTR;
- }
-}
-
-static ssize_t
-stream_read (CamelStream *stream, char *buffer, size_t n)
-{
- CamelTcpStreamSSL *tcp_stream_ssl = CAMEL_TCP_STREAM_SSL (stream);
- ssize_t nread;
-
- do {
- nread = PR_Read (tcp_stream_ssl->priv->sockfd, buffer, n);
- } while (nread == -1 && PR_GetError () == PR_PENDING_INTERRUPT_ERROR);
-
- if (nread == -1)
- set_errno (PR_GetError ());
-
- return nread;
-}
-
-static ssize_t
-stream_write (CamelStream *stream, const char *buffer, size_t n)
-{
- CamelTcpStreamSSL *tcp_stream_ssl = CAMEL_TCP_STREAM_SSL (stream);
- ssize_t written = 0;
-
- do {
- written = PR_Write (tcp_stream_ssl->priv->sockfd, buffer, n);
- } while (written == -1 && PR_GetError () == PR_PENDING_INTERRUPT_ERROR);
-
- if (written == -1)
- set_errno (PR_GetError ());
-
- return written;
-}
-
-static int
-stream_flush (CamelStream *stream)
-{
- return PR_Sync (((CamelTcpStreamSSL *)stream)->priv->sockfd);
-}
-
-static int
-stream_close (CamelStream *stream)
-{
- if (PR_Close (((CamelTcpStreamSSL *)stream)->priv->sockfd) == PR_FAILURE)
- return -1;
-
- ((CamelTcpStreamSSL *)stream)->priv->sockfd = NULL;
-
- return 0;
-}
-
-#if 0
-/* Since this is default implementation, let NSS handle it. */
-static SECStatus
-ssl_get_client_auth (void *data, PRFileDesc *sockfd,
- struct CERTDistNamesStr *caNames,
- struct CERTCertificateStr **pRetCert,
- struct SECKEYPrivateKeyStr **pRetKey)
-{
- SECStatus status = SECFailure;
- SECKEYPrivateKey *privkey;
- CERTCertificate *cert;
- void *proto_win;
-
- proto_win = SSL_RevealPinArg (sockfd);
-
- if ((char *)data) {
- cert = PK11_FindCertFromNickname ((char *)data, proto_win);
- if (cert) {
- privKey = PK11_FindKeyByAnyCert (cert, proto_win);
- if (privkey) {
- status = SECSuccess;
- } else {
- CERT_DestroyCertificate (cert);
- }
- }
- } else {
- /* no nickname given, automatically find the right cert */
- CERTCertNicknames *names;
- int i;
-
- names = CERT_GetCertNicknames (CERT_GetDefaultCertDB (),
- SEC_CERT_NICKNAMES_USER,
- proto_win);
-
- if (names != NULL) {
- for (i = 0; i < names->numnicknames; i++) {
-
- cert = PK11_FindCertFromNickname (names->nicknames[i],
- proto_win);
- if (!cert)
- continue;
-
- /* Only check unexpired certs */
- if (CERT_CheckCertValidTimes (cert, PR_Now (), PR_FALSE) != secCertTimeValid) {
- CERT_DestroyCertificate (cert);
- continue;
- }
-
- status = NSS_CmpCertChainWCANames (cert, caNames);
- if (status == SECSuccess) {
- privkey = PK11_FindKeyByAnyCert (cert, proto_win);
- if (privkey)
- break;
-
- status = SECFailure;
- break;
- }
-
- CERT_FreeNicknames (names);
- }
- }
- }
-
- if (status == SECSuccess) {
- *pRetCert = cert;
- *pRetKey = privkey;
- }
-
- return status;
-}
-#endif
-
-#if 0
-/* Since this is the default NSS implementation, no need for us to use this. */
-static SECStatus
-ssl_auth_cert (void *data, PRFileDesc *sockfd, PRBool checksig, PRBool is_server)
-{
- CERTCertificate *cert;
- SECStatus status;
- void *pinarg;
- char *host;
-
- cert = SSL_PeerCertificate (sockfd);
- pinarg = SSL_RevealPinArg (sockfd);
- status = CERT_VerifyCertNow ((CERTCertDBHandle *)data, cert,
- checksig, certUsageSSLClient, pinarg);
-
- if (status != SECSuccess)
- return SECFailure;
-
- /* Certificate is OK. Since this is the client side of an SSL
- * connection, we need to verify that the name field in the cert
- * matches the desired hostname. This is our defense against
- * man-in-the-middle attacks.
- */
-
- /* SSL_RevealURL returns a hostname, not a URL. */
- host = SSL_RevealURL (sockfd);
-
- if (host && *host) {
- status = CERT_VerifyCertName (cert, host);
- } else {
- PR_SetError (SSL_ERROR_BAD_CERT_DOMAIN, 0);
- status = SECFailure;
- }
-
- if (host)
- PR_Free (hostName);
-
- return secStatus;
-}
-#endif
-
-static SECStatus
-ssl_bad_cert (void *data, PRFileDesc *sockfd)
-{
- CERTCertificate *cert;
- CamelService *service;
- char *prompt, *cert_str;
- gpointer accept;
-
- g_return_val_if_fail (data != NULL, SECFailure);
- g_return_val_if_fail (CAMEL_IS_SERVICE (data), SECFailure);
-
- service = CAMEL_SERVICE (data);
-
- cert = SSL_PeerCertificate (sockfd);
-
- cert_str = g_strdup_printf (_("EMail: %s\n"
- "Common Name: %s\n"
- "Organization Unit: %s\n"
- "Organization: %s\n"
- "Locality: %s\n"
- "State: %s\n"
- "Country: %s"),
- cert->emailAddr ? cert->emailAddr : "",
- CERT_GetCommonName (&cert->issuer) ? CERT_GetCommonName (&cert->issuer) : "",
- CERT_GetOrgUnitName (&cert->issuer) ? CERT_GetOrgUnitName (&cert->issuer) : "",
- CERT_GetOrgName (&cert->issuer) ? CERT_GetOrgName (&cert->issuer) : "",
- CERT_GetLocalityName (&cert->issuer) ? CERT_GetLocalityName (&cert->issuer) : "",
- CERT_GetStateName (&cert->issuer) ? CERT_GetStateName (&cert->issuer) : "",
- CERT_GetCountryName (&cert->issuer) ? CERT_GetCountryName (&cert->issuer) : "");
-
- /* construct our user prompt */
- prompt = g_strdup_printf (_("Bad certificate from %s:\n\n%s\n\nDo you wish to accept anyway?"),
- service->url->host, cert_str);
- g_free (cert_str);
-
- /* query the user to find out if we want to accept this certificate */
- accept = camel_session_query_authenticator (service->session, CAMEL_AUTHENTICATOR_ACCEPT,
- prompt, FALSE, service, NULL, NULL);
-
- g_free (prompt);
-
- if (GPOINTER_TO_INT (accept))
- return SECSuccess;
-
- return SECFailure;
-}
-
-static int
-stream_connect (CamelTcpStream *stream, struct hostent *host, int port)
-{
- CamelTcpStreamSSL *ssl = CAMEL_TCP_STREAM_SSL (stream);
- PRIntervalTime timeout = PR_INTERVAL_MIN;
- PRNetAddr netaddr;
- PRFileDesc *fd, *ssl_fd;
-
- g_return_val_if_fail (host != NULL, -1);
-
- memset ((void *) &netaddr, 0, sizeof (PRNetAddr));
- memcpy (&netaddr.inet.ip, host->h_addr, sizeof (netaddr.inet.ip));
-
- if (PR_InitializeNetAddr (PR_IpAddrNull, port, &netaddr) == PR_FAILURE)
- return -1;
-
- fd = PR_OpenTCPSocket (host->h_addrtype);
- ssl_fd = SSL_ImportFD (NULL, fd);
-
- SSL_SetURL (ssl_fd, ssl->priv->expected_host);
-
- if (ssl_fd == NULL || PR_Connect (ssl_fd, &netaddr, timeout) == PR_FAILURE) {
- if (ssl_fd != NULL)
- PR_Close (ssl_fd);
-
- return -1;
- }
-
- /*SSL_GetClientAuthDataHook (sslSocket, ssl_get_client_auth, (void *)certNickname);*/
- /*SSL_AuthCertificateHook (ssl_fd, ssl_auth_cert, (void *) CERT_GetDefaultCertDB ());*/
- SSL_BadCertHook (ssl_fd, ssl_bad_cert, ssl->priv->service);
-
- ssl->priv->sockfd = ssl_fd;
-
- return 0;
-}
-
-
-static int
-stream_getsockopt (CamelTcpStream *stream, CamelSockOptData *data)
-{
- PRSocketOptionData sodata;
-
- memset ((void *) &sodata, 0, sizeof (sodata));
- memcpy ((void *) &sodata, (void *) data, sizeof (CamelSockOptData));
-
- if (PR_GetSocketOption (((CamelTcpStreamSSL *)stream)->priv->sockfd, &sodata) == PR_FAILURE)
- return -1;
-
- memcpy ((void *) data, (void *) &sodata, sizeof (CamelSockOptData));
-
- return 0;
-}
-
-static int
-stream_setsockopt (CamelTcpStream *stream, const CamelSockOptData *data)
-{
- PRSocketOptionData sodata;
-
- memset ((void *) &sodata, 0, sizeof (sodata));
- memcpy ((void *) &sodata, (void *) data, sizeof (CamelSockOptData));
-
- if (PR_SetSocketOption (((CamelTcpStreamSSL *)stream)->priv->sockfd, &sodata) == PR_FAILURE)
- return -1;
-
- return 0;
-}
-
-static gpointer
-stream_get_socket (CamelTcpStream *stream)
-{
- return (gpointer) CAMEL_TCP_STREAM_SSL (stream)->priv->sockfd;
-}
-
-#endif /* HAVE_NSS */
diff --git a/camel/camel-tcp-stream-ssl.h b/camel/camel-tcp-stream-ssl.h
deleted file mode 100644
index af68fe9644..0000000000
--- a/camel/camel-tcp-stream-ssl.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2001 Ximian, Inc. (www.ximian.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.
- *
- */
-
-
-#ifndef CAMEL_TCP_STREAM_SSL_H
-#define CAMEL_TCP_STREAM_SSL_H
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <camel/camel-tcp-stream.h>
-#include <camel/camel-service.h>
-
-#define CAMEL_TCP_STREAM_SSL_TYPE (camel_tcp_stream_ssl_get_type ())
-#define CAMEL_TCP_STREAM_SSL(obj) (CAMEL_CHECK_CAST((obj), CAMEL_TCP_STREAM_SSL_TYPE, CamelTcpStreamSSL))
-#define CAMEL_TCP_STREAM_SSL_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_TCP_STREAM_SSL_TYPE, CamelTcpStreamSSLClass))
-#define CAMEL_IS_TCP_STREAM_SSL(o) (CAMEL_CHECK_TYPE((o), CAMEL_TCP_STREAM_SSL_TYPE))
-
-struct _CamelTcpStreamSSL {
- CamelTcpStream parent_object;
-
- struct _CamelTcpStreamSSLPrivate *priv;
-};
-
-typedef struct {
- CamelTcpStreamClass parent_class;
-
- /* virtual functions */
-
-} CamelTcpStreamSSLClass;
-
-/* Standard Camel function */
-CamelType camel_tcp_stream_ssl_get_type (void);
-
-/* public methods */
-CamelStream *camel_tcp_stream_ssl_new (CamelService *service, const char *expected_host);
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_TCP_STREAM_SSL_H */
diff --git a/camel/camel-tcp-stream.c b/camel/camel-tcp-stream.c
deleted file mode 100644
index c00ca7e39d..0000000000
--- a/camel/camel-tcp-stream.c
+++ /dev/null
@@ -1,180 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2001 Ximian, Inc. (www.ximian.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.
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "camel-tcp-stream.h"
-
-static CamelStreamClass *parent_class = NULL;
-
-/* Returns the class for a CamelTcpStream */
-#define CTS_CLASS(so) CAMEL_TCP_STREAM_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-
-static int tcp_connect (CamelTcpStream *stream, struct hostent *host, int port);
-static int tcp_getsockopt (CamelTcpStream *stream, CamelSockOptData *data);
-static int tcp_setsockopt (CamelTcpStream *stream, const CamelSockOptData *data);
-static gpointer tcp_get_socket (CamelTcpStream *stream);
-
-static void
-camel_tcp_stream_class_init (CamelTcpStreamClass *camel_tcp_stream_class)
-{
- CamelStreamClass *camel_stream_class =
- CAMEL_STREAM_CLASS (camel_tcp_stream_class);
-
- parent_class = CAMEL_STREAM_CLASS (camel_type_get_global_classfuncs (CAMEL_STREAM_TYPE));
-
- /* tcp stream methods */
- camel_tcp_stream_class->connect = tcp_connect;
- camel_tcp_stream_class->getsockopt = tcp_getsockopt;
- camel_tcp_stream_class->setsockopt = tcp_setsockopt;
- camel_tcp_stream_class->get_socket = tcp_get_socket;
-}
-
-static void
-camel_tcp_stream_init (void *o)
-{
- ;
-}
-
-CamelType
-camel_tcp_stream_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (CAMEL_STREAM_TYPE,
- "CamelTcpStream",
- sizeof (CamelTcpStream),
- sizeof (CamelTcpStreamClass),
- (CamelObjectClassInitFunc) camel_tcp_stream_class_init,
- NULL,
- (CamelObjectInitFunc) camel_tcp_stream_init,
- NULL);
- }
-
- return type;
-}
-
-
-static int
-tcp_connect (CamelTcpStream *stream, struct hostent *host, int port)
-{
- g_warning ("CamelTcpStream::connect called on default implementation\n");
- return -1;
-}
-
-/**
- * camel_tcp_stream_connect:
- * @stream: a CamelTcpStream object.
- * @host: a hostent value
- * @port: port
- *
- * Create a socket and connect based upon the data provided.
- *
- * Return value: zero on success or -1 on fail.
- **/
-int
-camel_tcp_stream_connect (CamelTcpStream *stream, struct hostent *host, int port)
-{
- g_return_val_if_fail (CAMEL_IS_TCP_STREAM (stream), -1);
-
- return CTS_CLASS (stream)->connect (stream, host, port);
-}
-
-
-static int
-tcp_getsockopt (CamelTcpStream *stream, CamelSockOptData *data)
-{
- g_warning ("CamelTcpStream::getsockopt called on default implementation\n");
- return -1;
-}
-
-
-/**
- * camel_tcp_stream_getsockopt:
- * @stream: tcp stream object
- * @data: socket option data
- *
- * Get the socket options set on the stream and populate #data.
- *
- * Return value: zero on success or -1 on fail.
- **/
-int
-camel_tcp_stream_getsockopt (CamelTcpStream *stream, CamelSockOptData *data)
-{
- g_return_val_if_fail (CAMEL_IS_TCP_STREAM (stream), -1);
-
- return CTS_CLASS (stream)->getsockopt (stream, data);
-}
-
-
-static int
-tcp_setsockopt (CamelTcpStream *stream, const CamelSockOptData *data)
-{
- g_warning ("CamelTcpStream::setsockopt called on default implementation\n");
- return -1;
-}
-
-
-/**
- * camel_tcp_stream_setsockopt:
- * @stream: tcp stream object
- * @data: socket option data
- *
- * Set the socket options contained in #data on the stream.
- *
- * Return value: zero on success or -1 on fail.
- **/
-int
-camel_tcp_stream_setsockopt (CamelTcpStream *stream, const CamelSockOptData *data)
-{
- g_return_val_if_fail (CAMEL_IS_TCP_STREAM (stream), -1);
-
- return CTS_CLASS (stream)->setsockopt (stream, data);
-}
-
-
-static gpointer
-tcp_get_socket (CamelTcpStream *stream)
-{
- g_warning ("CamelTcpStream::get_socket called on default implementation\n");
- return NULL;
-}
-
-
-/**
- * camel_tcp_stream_get_socket:
- * @stream: tcp stream object
- *
- * Get the stream's socket.
- *
- * Return value: the stream's socket on success or NULL on failure.
- **/
-gpointer
-camel_tcp_stream_get_socket (CamelTcpStream *stream)
-{
- g_return_val_if_fail (CAMEL_IS_TCP_STREAM (stream), NULL);
-
- return CTS_CLASS (stream)->get_socket (stream);
-}
diff --git a/camel/camel-tcp-stream.h b/camel/camel-tcp-stream.h
deleted file mode 100644
index 8d2d4130ed..0000000000
--- a/camel/camel-tcp-stream.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2001 Ximian, Inc. (www.ximian.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.
- *
- */
-
-
-#ifndef CAMEL_TCP_STREAM_H
-#define CAMEL_TCP_STREAM_H
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <netinet/tcp.h>
-#include <netdb.h>
-#include <unistd.h>
-
-#include <camel/camel-stream.h>
-
-#define CAMEL_TCP_STREAM_TYPE (camel_tcp_stream_get_type ())
-#define CAMEL_TCP_STREAM(obj) (CAMEL_CHECK_CAST((obj), CAMEL_TCP_STREAM_TYPE, CamelTcpStream))
-#define CAMEL_TCP_STREAM_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_TCP_STREAM_TYPE, CamelTcpStreamClass))
-#define CAMEL_IS_TCP_STREAM(o) (CAMEL_CHECK_TYPE((o), CAMEL_TCP_STREAM_TYPE))
-
-typedef enum {
- CAMEL_SOCKOPT_NONBLOCKING, /* nonblocking io */
- CAMEL_SOCKOPT_LINGER, /* linger on close if data present */
- CAMEL_SOCKOPT_REUSEADDR, /* allow local address reuse */
- CAMEL_SOCKOPT_KEEPALIVE, /* keep connections alive */
- CAMEL_SOCKOPT_RECVBUFFERSIZE, /* receive buffer size */
- CAMEL_SOCKOPT_SENDBUFFERSIZE, /* send buffer size */
-
- CAMEL_SOCKOPT_IPTIMETOLIVE, /* time to live */
- CAMEL_SOCKOPT_IPTYPEOFSERVICE, /* type of service and precedence */
-
- CAMEL_SOCKOPT_ADDMEMBER, /* add an IP group membership */
- CAMEL_SOCKOPT_DROPMEMBER, /* drop an IP group membership */
- CAMEL_SOCKOPT_MCASTINTERFACE, /* multicast interface address */
- CAMEL_SOCKOPT_MCASTTIMETOLIVE, /* multicast timetolive */
- CAMEL_SOCKOPT_MCASTLOOPBACK, /* multicast loopback */
-
- CAMEL_SOCKOPT_NODELAY, /* don't delay send to coalesce packets */
- CAMEL_SOCKOPT_MAXSEGMENT, /* maximum segment size */
- CAMEL_SOCKOPT_BROADCAST, /* enable broadcast */
- CAMEL_SOCKOPT_LAST
-} CamelSockOpt;
-
-typedef struct linger CamelLinger;
-
-typedef struct _CamelSockOptData {
- CamelSockOpt option;
- union {
- guint ip_ttl; /* IP time to live */
- guint mcast_ttl; /* IP multicast time to live */
- guint tos; /* IP type of service and precedence */
- gboolean non_blocking; /* Non-blocking (network) I/O */
- gboolean reuse_addr; /* Allow local address reuse */
- gboolean keep_alive; /* Keep connections alive */
- gboolean mcast_loopback; /* IP multicast loopback */
- gboolean no_delay; /* Don't delay send to coalesce packets */
- gboolean broadcast; /* Enable broadcast */
- size_t max_segment; /* Maximum segment size */
- size_t recv_buffer_size; /* Receive buffer size */
- size_t send_buffer_size; /* Send buffer size */
- CamelLinger linger; /* Time to linger on close if data present */
- } value;
-} CamelSockOptData;
-
-struct _CamelTcpStream
-{
- CamelStream parent_object;
-
-};
-
-typedef struct {
- CamelStreamClass parent_class;
-
- /* Virtual methods */
- int (*connect) (CamelTcpStream *stream, struct hostent *host, int port);
- int (*getsockopt) (CamelTcpStream *stream, CamelSockOptData *data);
- int (*setsockopt) (CamelTcpStream *stream, const CamelSockOptData *data);
-
- gpointer (*get_socket) (CamelTcpStream *stream);
-} CamelTcpStreamClass;
-
-/* Standard Camel function */
-CamelType camel_tcp_stream_get_type (void);
-
-/* public methods */
-int camel_tcp_stream_connect (CamelTcpStream *stream, struct hostent *host, int port);
-int camel_tcp_stream_getsockopt (CamelTcpStream *stream, CamelSockOptData *data);
-int camel_tcp_stream_setsockopt (CamelTcpStream *stream, const CamelSockOptData *data);
-
-gpointer camel_tcp_stream_get_socket (CamelTcpStream *stream);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_TCP_STREAM_H */
diff --git a/camel/camel-transport.c b/camel/camel-transport.c
deleted file mode 100644
index 5219ac4288..0000000000
--- a/camel/camel-transport.c
+++ /dev/null
@@ -1,108 +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 <danw@helixcode.com>
- *
- * 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "camel-transport.h"
-#include "camel-exception.h"
-
-/* Returns the class for a CamelTransport */
-#define CT_CLASS(so) CAMEL_TRANSPORT_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-
-CamelType
-camel_transport_get_type (void)
-{
- static CamelType camel_transport_type = CAMEL_INVALID_TYPE;
-
- if (camel_transport_type == CAMEL_INVALID_TYPE) {
- camel_transport_type = camel_type_register (CAMEL_SERVICE_TYPE, "CamelTransport",
- sizeof (CamelTransport),
- sizeof (CamelTransportClass),
- NULL,
- NULL,
- NULL,
- NULL);
- }
-
- 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 aeab3ba489..0000000000
--- a/camel/camel-transport.h
+++ /dev/null
@@ -1,88 +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 <danw@helixcode.com>
- *
- * 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 <glib.h>
-#include <camel/camel-service.h>
-
-#define CAMEL_TRANSPORT_TYPE (camel_transport_get_type ())
-#define CAMEL_TRANSPORT(obj) (CAMEL_CHECK_CAST((obj), CAMEL_TRANSPORT_TYPE, CamelTransport))
-#define CAMEL_TRANSPORT_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_TRANSPORT_TYPE, CamelTransportClass))
-#define CAMEL_IS_TRANSPORT(o) (CAMEL_CHECK_TYPE((o), CAMEL_TRANSPORT_TYPE))
-
-
-struct _CamelTransport
-{
- CamelService parent_object;
-
- gboolean supports_8bit;
-};
-
-
-
-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);
-
-/* FIXME: This should use a camel-address */
-gboolean camel_transport_send_to (CamelTransport *transport,
- CamelMedium *message,
- GList *recipients,
- CamelException *ex);
-
-/* Standard Camel function */
-CamelType 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 727c0a266c..0000000000
--- a/camel/camel-types.h
+++ /dev/null
@@ -1,77 +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 _header_content_type CamelContentType;
-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 _CamelMessageContentInfo CamelMessageContentInfo;
-typedef struct _CamelMessageInfo CamelMessageInfo;
-typedef struct _CamelMimeFilter CamelMimeFilter;
-typedef struct _CamelMimeFilterBasic CamelMimeFilterBasic;
-typedef struct _CamelMimeFilterBestenc CamelMimeFilterBestenc;
-typedef struct _CamelMimeFilterCharset CamelMimeFilterCharset;
-typedef struct _CamelMimeFilterIndex CamelMimeFilterIndex;
-typedef struct _CamelMimeFilterLinewrap CamelMimeFilterLinewrap;
-typedef struct _CamelMimeFilterSave CamelMimeFilterSave;
-typedef struct _CamelMimeFilterCRLF CamelMimeFilterCRLF;
-typedef struct _CamelMimeMessage CamelMimeMessage;
-typedef struct _CamelMimeParser CamelMimeParser;
-typedef struct _CamelMimePart CamelMimePart;
-typedef struct _CamelMultipart CamelMultipart;
-typedef struct _CamelNewsAddress CamelNewsAddress;
-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 _CamelStreamNull CamelStreamNull;
-typedef struct _CamelStreamBuffer CamelStreamBuffer;
-typedef struct _CamelStreamDataWrapper CamelStreamDataWrapper;
-typedef struct _CamelStreamFilter CamelStreamFilter;
-typedef struct _CamelStreamFs CamelStreamFs;
-typedef struct _CamelStreamMem CamelStreamMem;
-typedef struct _CamelTcpStream CamelTcpStream;
-typedef struct _CamelTcpStreamRaw CamelTcpStreamRaw;
-typedef struct _CamelTcpStreamSSL CamelTcpStreamSSL;
-typedef struct _CamelTcpStreamOpenSSL CamelTcpStreamOpenSSL;
-typedef struct _CamelTransport CamelTransport;
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_TYPES_H */
diff --git a/camel/camel-uid-cache.c b/camel/camel-uid-cache.c
deleted file mode 100644
index fcea86f608..0000000000
--- a/camel/camel-uid-cache.c
+++ /dev/null
@@ -1,192 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-uid-cache.c: UID caching code. */
-
-/*
- * Authors:
- * Dan Winship <danw@helixcode.com>
- *
- * 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <errno.h>
-#include <fcntl.h>
-#include <string.h>
-#include <sys/stat.h>
-#include <unistd.h>
-
-#include "camel-uid-cache.h"
-
-static void free_uid (gpointer key, gpointer value, gpointer data);
-static void maybe_write_uid (gpointer key, gpointer value, gpointer data);
-
-/**
- * camel_uid_cache_new:
- * @filename: path to load the cache from
- *
- * Creates a new UID cache, initialized from @filename. If @filename
- * doesn't already exist, the UID cache will be empty. Otherwise, if
- * it does exist but can't be read, the function will return %NULL.
- *
- * Return value: a new UID cache, or %NULL
- **/
-CamelUIDCache *
-camel_uid_cache_new (const char *filename)
-{
- CamelUIDCache *cache;
- struct stat st;
- char *buf, **uids;
- int fd, i;
-
- fd = open (filename, O_RDWR | O_CREAT, 0700);
- if (fd == -1)
- return NULL;
-
- if (fstat (fd, &st) != 0) {
- close (fd);
- return NULL;
- }
- buf = g_malloc (st.st_size + 1);
-
- if (read (fd, buf, st.st_size) == -1) {
- close (fd);
- g_free (buf);
- return NULL;
- }
- buf[st.st_size] = '\0';
-
- cache = g_new (CamelUIDCache, 1);
- cache->fd = fd;
- cache->level = 1;
- cache->uids = g_hash_table_new (g_str_hash, g_str_equal);
-
- uids = g_strsplit (buf, "\n", 0);
- g_free (buf);
- for (i = 0; uids[i]; i++) {
- g_hash_table_insert (cache->uids, uids[i],
- GINT_TO_POINTER (cache->level));
- }
- g_free (uids);
-
- return cache;
-}
-
-/**
- * camel_uid_cache_save:
- * @cache: a CamelUIDCache
- *
- * Attempts to save @cache back to disk.
- *
- * Return value: success or failure
- **/
-gboolean
-camel_uid_cache_save (CamelUIDCache *cache)
-{
- if (lseek (cache->fd, 0, SEEK_SET) != 0)
- return FALSE;
- g_hash_table_foreach (cache->uids, maybe_write_uid, cache);
- return ftruncate (cache->fd, lseek (cache->fd, 0, SEEK_CUR)) == 0;
-}
-
-static void
-maybe_write_uid (gpointer key, gpointer value, gpointer data)
-{
- CamelUIDCache *cache = data;
-
- if (GPOINTER_TO_INT (value) == cache->level) {
- write (cache->fd, key, strlen (key));
- write (cache->fd, "\n", 1);
- }
-}
-
-/**
- * camel_uid_cache_destroy:
- * @cache: a CamelUIDCache
- *
- * Destroys @cache and frees its data.
- **/
-void
-camel_uid_cache_destroy (CamelUIDCache *cache)
-{
- g_hash_table_foreach (cache->uids, free_uid, NULL);
- g_hash_table_destroy (cache->uids);
- close (cache->fd);
- g_free (cache);
-}
-
-static void
-free_uid (gpointer key, gpointer value, gpointer data)
-{
- g_free (key);
-}
-
-/**
- * camel_uid_cache_get_new_uids:
- * @cache: a CamelUIDCache
- * @uids: an array of UIDs
- *
- * Returns an array of UIDs from @uids that are not in @cache, and
- * removes UIDs from @cache that aren't in @uids.
- *
- * Return value: an array of new UIDs, which must be freed with
- * camel_uid_cache_free_uids().
- **/
-GPtrArray *
-camel_uid_cache_get_new_uids (CamelUIDCache *cache, GPtrArray *uids)
-{
- GPtrArray *new_uids;
- gpointer old_uid, old_level;
- char *uid;
- int i;
-
- new_uids = g_ptr_array_new ();
- cache->level++;
-
- for (i = 0; i < uids->len; i++) {
- uid = uids->pdata[i];
- if (g_hash_table_lookup_extended (cache->uids, uid,
- &old_uid, &old_level)) {
- g_hash_table_remove (cache->uids, uid);
- g_free (old_uid);
- } else
- g_ptr_array_add (new_uids, g_strdup (uid));
- g_hash_table_insert (cache->uids, g_strdup (uid),
- GINT_TO_POINTER (cache->level));
- }
-
- return new_uids;
-}
-
-/**
- * camel_uid_cache_free_uids:
- * @uids: an array returned from camel_uid_cache_get_new_uids()
- *
- * Frees the array of UIDs.
- **/
-void
-camel_uid_cache_free_uids (GPtrArray *uids)
-{
- int i;
-
- for (i = 0; i < uids->len; i++)
- g_free (uids->pdata[i]);
- g_ptr_array_free (uids, TRUE);
-}
diff --git a/camel/camel-uid-cache.h b/camel/camel-uid-cache.h
deleted file mode 100644
index 57a75ab16a..0000000000
--- a/camel/camel-uid-cache.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-uid-cache.h: UID caching code. */
-
-/*
- * Authors:
- * Bertrand Guiheneuf <bertrand@helixcode.com>
- *
- * 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_UID_CACHE_H
-#define CAMEL_UID_CACHE_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <stdio.h>
-#include <glib.h>
-
-typedef struct {
- int fd, level;
- GHashTable *uids;
-} CamelUIDCache;
-
-CamelUIDCache *camel_uid_cache_new (const char *filename);
-gboolean camel_uid_cache_save (CamelUIDCache *cache);
-void camel_uid_cache_destroy (CamelUIDCache *cache);
-
-GPtrArray *camel_uid_cache_get_new_uids (CamelUIDCache *cache,
- GPtrArray *uids);
-void camel_uid_cache_free_uids (GPtrArray *uids);
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-#endif /* CAMEL_UID_CACHE_H */
diff --git a/camel/camel-url.c b/camel/camel-url.c
deleted file mode 100644
index aa4c0e2c4f..0000000000
--- a/camel/camel-url.c
+++ /dev/null
@@ -1,553 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-url.c : utility functions to parse URLs */
-
-/*
- * Authors:
- * Dan Winship <danw@ximian.com>
- * Tiago Antào <tiagoantao@bigfoot.com>
- * Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 1999-2001 Ximian, Inc. (http://www.ximian.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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <ctype.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "camel-url.h"
-#include "camel-exception.h"
-#include "camel-mime-utils.h"
-#include "camel-object.h"
-
-static void copy_param (GQuark key_id, gpointer data, gpointer user_data);
-static void output_param (GQuark key_id, gpointer data, gpointer user_data);
-
-/**
- * camel_url_new_with_base:
- * @base: a base URL
- * @url_string: the URL
- *
- * Parses @url_string relative to @base.
- *
- * Return value: a parsed CamelURL.
- **/
-CamelURL *
-camel_url_new_with_base (CamelURL *base, const char *url_string)
-{
- CamelURL *url;
- const char *end, *hash, *colon, *semi, *at, *slash, *question;
- const char *p;
-
- url = g_new0 (CamelURL, 1);
-
- /* See RFC1808 for details. IF YOU CHANGE ANYTHING IN THIS
- * FUNCTION, RUN tests/misc/url AFTERWARDS.
- */
-
- /* Find fragment. */
- end = hash = strchr (url_string, '#');
- if (hash && hash[1]) {
- url->fragment = g_strdup (hash + 1);
- camel_url_decode (url->fragment);
- } else
- end = url_string + strlen (url_string);
-
- /* Find protocol: initial [a-z+.-]* substring until ":" */
- p = url_string;
- while (p < end && (isalnum ((unsigned char)*p) ||
- *p == '.' || *p == '+' || *p == '-'))
- p++;
-
- if (p > url_string && *p == ':') {
- url->protocol = g_strndup (url_string, p - url_string);
- g_strdown (url->protocol);
- url_string = p + 1;
- }
-
- if (!*url_string && !base)
- return url;
-
- /* Check for authority */
- if (strncmp (url_string, "//", 2) == 0) {
- url_string += 2;
-
- slash = url_string + strcspn (url_string, "/#");
- at = strchr (url_string, '@');
- if (at && 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 &&
- !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. */
- colon = strchr (url_string, ':');
- if (colon && colon < slash) {
- url->host = g_strndup (url_string, colon - url_string);
- url->port = strtoul (colon + 1, NULL, 10);
- } else {
- url->host = g_strndup (url_string, slash - url_string);
- camel_url_decode (url->host);
- url->port = 0;
- }
-
- url_string = slash;
- }
-
- /* Find query */
- question = memchr (url_string, '?', end - url_string);
- if (question) {
- if (question[1]) {
- url->query = g_strndup (question + 1,
- end - (question + 1));
- camel_url_decode (url->query);
- }
- end = question;
- }
-
- /* Find parameters */
- semi = memchr (url_string, ';', end - url_string);
- if (semi) {
- if (semi[1]) {
- const char *cur, *p, *eq;
- char *name, *value;
-
- for (cur = semi + 1; cur < end; cur = p + 1) {
- p = memchr (cur, ';', end - cur);
- if (!p)
- p = end;
- eq = memchr (cur, '=', p - cur);
- if (eq) {
- name = g_strndup (cur, eq - cur);
- value = g_strndup (eq + 1, p - (eq + 1));
- camel_url_decode (value);
- } else {
- name = g_strndup (cur, p - cur);
- value = g_strdup ("");
- }
- camel_url_decode (name);
- g_datalist_set_data_full (&url->params, name,
- value, g_free);
- g_free (name);
- }
- }
- end = semi;
- }
-
- if (end != url_string) {
- url->path = g_strndup (url_string, end - url_string);
- camel_url_decode (url->path);
- }
-
- /* Apply base URL. Again, this is spelled out in RFC 1808. */
- if (base && !url->protocol && url->host)
- url->protocol = g_strdup (base->protocol);
- else if (base && !url->protocol) {
- if (!url->user && !url->authmech && !url->passwd &&
- !url->host && !url->port && !url->path &&
- !url->params && !url->query && !url->fragment)
- url->fragment = g_strdup (base->fragment);
-
- url->protocol = g_strdup (base->protocol);
- url->user = g_strdup (base->user);
- url->authmech = g_strdup (base->authmech);
- url->passwd = g_strdup (base->passwd);
- url->host = g_strdup (base->host);
- url->port = base->port;
-
- if (!url->path) {
- url->path = g_strdup (base->path);
- if (!url->params) {
- g_datalist_foreach (&base->params, copy_param,
- &url->params);
- if (!url->query)
- url->query = g_strdup (base->query);
- }
- } else if (*url->path != '/') {
- char *newpath, *last, *p, *q;
-
- last = strrchr (base->path, '/');
- if (last) {
- newpath = g_strdup_printf ("%.*s/%s",
- last - base->path,
- base->path,
- url->path);
- } else
- newpath = g_strdup_printf ("/%s", url->path);
-
- /* Remove "./" where "." is a complete segment. */
- for (p = newpath + 1; *p; ) {
- if (*(p - 1) == '/' &&
- *p == '.' && *(p + 1) == '/')
- memmove (p, p + 2, strlen (p + 2) + 1);
- else
- p++;
- }
- /* Remove "." at end. */
- if (p > newpath + 2 &&
- *(p - 1) == '.' && *(p - 2) == '/')
- *(p - 1) = '\0';
- /* Remove "<segment>/../" where <segment> != ".." */
- for (p = newpath + 1; *p; ) {
- if (!strncmp (p, "../", 3)) {
- p += 3;
- continue;
- }
- q = strchr (p + 1, '/');
- if (!q)
- break;
- if (strncmp (q, "/../", 4) != 0) {
- p = q + 1;
- continue;
- }
- memmove (p, q + 4, strlen (q + 4) + 1);
- p = newpath + 1;
- }
- /* Remove "<segment>/.." at end */
- q = strrchr (newpath, '/');
- if (q && !strcmp (q, "/..")) {
- p = q - 1;
- while (p > newpath && *p != '/')
- p--;
- if (strncmp (p, "/../", 4) != 0)
- *(p + 1) = 0;
- }
- g_free (url->path);
- url->path = newpath;
- }
- }
-
- return url;
-}
-
-static void
-copy_param (GQuark key_id, gpointer data, gpointer user_data)
-{
- GData **copy = user_data;
-
- g_datalist_id_set_data_full (copy, key_id, g_strdup (data), g_free);
-}
-
-/**
- * camel_url_new:
- * @url_string: a URL
- * @ex: a CamelException
- *
- * Parses an absolute URL.
- *
- * Return value: a CamelURL, or %NULL.
- **/
-CamelURL *
-camel_url_new (const char *url_string, CamelException *ex)
-{
- CamelURL *url = camel_url_new_with_base (NULL, url_string);
-
- if (!url->protocol) {
- camel_url_free (url);
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_URL_INVALID,
- _("Could not parse URL `%s'"),
- url_string);
- return NULL;
- }
- return url;
-}
-
-/**
- * camel_url_to_string:
- * @url: a CamelURL
- * @flags: additional translation options.
- *
- * Return value: a string representing @url, which the caller must free.
- **/
-char *
-camel_url_to_string (CamelURL *url, guint32 flags)
-{
- GString *str;
- char *enc, *return_result;
-
- /* IF YOU CHANGE ANYTHING IN THIS FUNCTION, RUN
- * tests/misc/url AFTERWARD.
- */
-
- str = g_string_sized_new (20);
-
- if (url->protocol)
- g_string_sprintfa (str, "%s:", url->protocol);
- if (url->host) {
- g_string_append (str, "//");
- if (url->user) {
- enc = camel_url_encode (url->user, TRUE, ":;@/");
- g_string_append (str, enc);
- g_free (enc);
- }
- if (url->authmech && *url->authmech) {
- enc = camel_url_encode (url->authmech, TRUE, ":@/");
- g_string_sprintfa (str, ";auth=%s", enc);
- g_free (enc);
- }
- if (url->passwd && !(flags & CAMEL_URL_HIDE_PASSWORD)) {
- enc = camel_url_encode (url->passwd, TRUE, "@/");
- g_string_sprintfa (str, ":%s", enc);
- g_free (enc);
- }
- if (url->host) {
- enc = camel_url_encode (url->host, TRUE, ":/");
- g_string_sprintfa (str, "%s%s", url->user ? "@" : "", enc);
- g_free (enc);
- }
- if (url->port)
- g_string_sprintfa (str, ":%d", url->port);
- if (!url->path && (url->params || url->query || url->fragment))
- g_string_append_c (str, '/');
- }
-
- if (url->path) {
- enc = camel_url_encode (url->path, FALSE, ";?#");
- g_string_sprintfa (str, "%s", enc);
- g_free (enc);
- }
- if (url->params && !(flags & CAMEL_URL_HIDE_PARAMS))
- g_datalist_foreach (&url->params, output_param, str);
- if (url->query) {
- enc = camel_url_encode (url->query, FALSE, "#");
- g_string_sprintfa (str, "?%s", enc);
- g_free (enc);
- }
- if (url->fragment) {
- enc = camel_url_encode (url->fragment, FALSE, NULL);
- g_string_sprintfa (str, "#%s", enc);
- g_free (enc);
- }
-
- return_result = str->str;
- g_string_free (str, FALSE);
- return return_result;
-}
-
-static void
-output_param (GQuark key_id, gpointer data, gpointer user_data)
-{
- GString *str = user_data;
- char *enc;
-
- enc = camel_url_encode (g_quark_to_string (key_id), FALSE, "?#");
- g_string_sprintfa (str, ";%s", enc);
- g_free (enc);
- if (*(char *)data) {
- enc = camel_url_encode (data, FALSE, "?#");
- g_string_sprintfa (str, "=%s", enc);
- g_free (enc);
- }
-}
-
-/**
- * camel_url_free:
- * @url: a CamelURL
- *
- * Frees @url
- **/
-void
-camel_url_free (CamelURL *url)
-{
- g_return_if_fail (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_datalist_clear (&url->params);
- g_free (url->query);
- g_free (url->fragment);
-
- g_free (url);
-}
-
-
-#define DEFINE_CAMEL_URL_SET(part) \
-void \
-camel_url_set_##part (CamelURL *url, const char *part) \
-{ \
- g_free (url->part); \
- url->part = g_strdup (part); \
-}
-
-DEFINE_CAMEL_URL_SET (protocol)
-DEFINE_CAMEL_URL_SET (user)
-DEFINE_CAMEL_URL_SET (authmech)
-DEFINE_CAMEL_URL_SET (passwd)
-DEFINE_CAMEL_URL_SET (host)
-DEFINE_CAMEL_URL_SET (path)
-DEFINE_CAMEL_URL_SET (query)
-DEFINE_CAMEL_URL_SET (fragment)
-
-void
-camel_url_set_port (CamelURL *url, int port)
-{
- url->port = port;
-}
-
-void
-camel_url_set_param (CamelURL *url, const char *name, const char *value)
-{
- g_datalist_set_data (&url->params, name, value ? g_strdup (value) : NULL);
-}
-
-const char *
-camel_url_get_param (CamelURL *url, const char *name)
-{
- return g_datalist_get_data (&url->params, name);
-}
-
-
-/**
- * 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';
-}
-
-guint
-camel_url_hash (const void *v)
-{
- const CamelURL *u = v;
- guint hash = 0;
-
-#define ADD_HASH(s) if (s) hash ^= g_str_hash (s);
-
- ADD_HASH (u->protocol);
- ADD_HASH (u->user);
- ADD_HASH (u->authmech);
- ADD_HASH (u->host);
- ADD_HASH (u->path);
- ADD_HASH (u->query);
- hash ^= u->port;
-
- return hash;
-}
-
-static int
-check_equal (char *s1, char *s2)
-{
- if (s1 == NULL) {
- if (s2 == NULL)
- return TRUE;
- else
- return FALSE;
- }
-
- if (s2 == NULL)
- return FALSE;
-
- return strcmp (s1, s2) == 0;
-}
-
-int
-camel_url_equal(const void *v, const void *v2)
-{
- const CamelURL *u1 = v, *u2 = v2;
-
- return check_equal(u1->protocol, u2->protocol)
- && check_equal(u1->user, u2->user)
- && check_equal(u1->authmech, u2->authmech)
- && check_equal(u1->host, u2->host)
- && check_equal(u1->path, u2->path)
- && check_equal(u1->query, u2->query)
- && u1->port == u2->port;
-}
diff --git a/camel/camel-url.h b/camel/camel-url.h
deleted file mode 100644
index 9465da06a1..0000000000
--- a/camel/camel-url.h
+++ /dev/null
@@ -1,87 +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 <bertrand@helixcode.com>
- * Dan Winship <danw@helixcode.com>
- *
- * 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 <glib.h>
-#include <camel/camel-types.h>
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-typedef struct {
- char *protocol;
- char *user;
- char *authmech;
- char *passwd;
- char *host;
- int port;
- char *path;
- GData *params;
- char *query;
- char *fragment;
-} CamelURL;
-
-#define CAMEL_URL_HIDE_PASSWORD (1 << 0)
-#define CAMEL_URL_HIDE_PARAMS (1 << 1)
-#define CAMEL_URL_HIDE_AUTH (1 << 2)
-
-CamelURL *camel_url_new_with_base (CamelURL *base, const char *url_string);
-CamelURL *camel_url_new (const char *url_string, CamelException *ex);
-char *camel_url_to_string (CamelURL *url, guint32 flags);
-void camel_url_free (CamelURL *url);
-
-char *camel_url_encode (char *part, gboolean escape_unsafe, char *escape_extra);
-void camel_url_decode (char *part);
-
-/* for editing url's */
-void camel_url_set_protocol (CamelURL *url, const char *protocol);
-void camel_url_set_user (CamelURL *url, const char *user);
-void camel_url_set_authmech (CamelURL *url, const char *authmech);
-void camel_url_set_passwd (CamelURL *url, const char *passwd);
-void camel_url_set_host (CamelURL *url, const char *host);
-void camel_url_set_port (CamelURL *url, int port);
-void camel_url_set_path (CamelURL *url, const char *path);
-void camel_url_set_param (CamelURL *url, const char *name, const char *value);
-void camel_url_set_query (CamelURL *url, const char *query);
-void camel_url_set_fragment (CamelURL *url, const char *fragment);
-
-const char *camel_url_get_param (CamelURL *url, const char *name);
-
-/* for putting url's into hash tables */
-guint camel_url_hash (const void *v);
-int camel_url_equal(const void *v, const void *v2);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-#endif /* URL_UTIL_H */
diff --git a/camel/camel-vee-folder.c b/camel/camel-vee-folder.c
deleted file mode 100644
index 13b15c3b30..0000000000
--- a/camel/camel-vee-folder.c
+++ /dev/null
@@ -1,1052 +0,0 @@
-/*
- * Copyright (C) 2000 Helix Code Inc.
- *
- * Authors: Michael Zucchi <notzed@helixcode.com>
- * Jeffrey Stedfast <fejj@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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <string.h>
-
-#include "camel-exception.h"
-#include "camel-vee-folder.h"
-#include "camel-store.h"
-#include "camel-folder-summary.h"
-#include "camel-mime-message.h"
-#include "camel-folder-search.h"
-
-#include "camel-vee-store.h" /* for open flags */
-#include "camel-private.h"
-
-#include "e-util/md5-utils.h"
-
-#ifdef DOESTRV
-#include "e-util/e-memory.h"
-#endif
-
-#define d(x)
-
-#define _PRIVATE(o) (((CamelVeeFolder *)(o))->priv)
-
-static void vee_sync (CamelFolder *folder, gboolean expunge, CamelException *ex);
-static void vee_expunge (CamelFolder *folder, CamelException *ex);
-
-static CamelMimeMessage *vee_get_message (CamelFolder *folder, const gchar *uid, CamelException *ex);
-static void vee_move_messages_to(CamelFolder *source, GPtrArray *uids, CamelFolder *dest, CamelException *ex);
-
-static GPtrArray *vee_search_by_expression(CamelFolder *folder, const char *expression, CamelException *ex);
-
-static void vee_set_message_flags (CamelFolder *folder, const char *uid, guint32 flags, guint32 set);
-static void vee_set_message_user_flag (CamelFolder *folder, const char *uid, const char *name, gboolean value);
-
-static void camel_vee_folder_class_init (CamelVeeFolderClass *klass);
-static void camel_vee_folder_init (CamelVeeFolder *obj);
-static void camel_vee_folder_finalise (CamelObject *obj);
-
-static int vee_folder_build_folder(CamelVeeFolder *vf, CamelFolder *source, CamelException *ex);
-static void vee_folder_remove_folder(CamelVeeFolder *vf, CamelFolder *source);
-
-static void message_changed(CamelFolder *f, const char *uid, CamelVeeFolder *vf);
-static void folder_changed(CamelFolder *sub, CamelFolderChangeInfo *changes, CamelVeeFolder *vf);
-
-static CamelFolderClass *camel_vee_folder_parent;
-
-/* a vfolder for unmatched messages */
-/* use folder_unmatched->summary_lock for access to unmatched_uids or appropriate internals, for consistency */
-static CamelVeeFolder *folder_unmatched;
-static GHashTable *unmatched_uids; /* a refcount of uid's that are matched by any rules */
-#ifdef ENABLE_THREADS
-#include <pthread.h>
-static pthread_mutex_t unmatched_lock = PTHREAD_MUTEX_INITIALIZER;
-/* only used to initialise folder_unmatched */
-#define UNMATCHED_LOCK() pthread_mutex_lock(&unmatched_lock)
-#define UNMATCHED_UNLOCK() pthread_mutex_unlock(&unmatched_lock)
-#else
-#define UNMATCHED_LOCK()
-#define UNMATCHED_UNLOCK()
-#endif
-
-CamelType
-camel_vee_folder_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (camel_folder_get_type (), "CamelVeeFolder",
- sizeof (CamelVeeFolder),
- sizeof (CamelVeeFolderClass),
- (CamelObjectClassInitFunc) camel_vee_folder_class_init,
- NULL,
- (CamelObjectInitFunc) camel_vee_folder_init,
- (CamelObjectFinalizeFunc) camel_vee_folder_finalise);
- }
-
- return type;
-}
-
-static void
-camel_vee_folder_class_init (CamelVeeFolderClass *klass)
-{
- CamelFolderClass *folder_class = (CamelFolderClass *) klass;
-
- camel_vee_folder_parent = CAMEL_FOLDER_CLASS(camel_type_get_global_classfuncs (camel_folder_get_type ()));
-
- folder_class->sync = vee_sync;
- folder_class->expunge = vee_expunge;
-
- folder_class->get_message = vee_get_message;
- folder_class->move_messages_to = vee_move_messages_to;
-
- folder_class->search_by_expression = vee_search_by_expression;
-
- folder_class->set_message_flags = vee_set_message_flags;
- folder_class->set_message_user_flag = vee_set_message_user_flag;
-}
-
-static void
-camel_vee_folder_init (CamelVeeFolder *obj)
-{
- struct _CamelVeeFolderPrivate *p;
- CamelFolder *folder = (CamelFolder *)obj;
-
- p = _PRIVATE(obj) = g_malloc0(sizeof(*p));
-
- 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;
-
- obj->changes = camel_folder_change_info_new();
- obj->search = camel_folder_search_new();
-
-#ifdef ENABLE_THREADS
- p->summary_lock = g_mutex_new();
- p->subfolder_lock = g_mutex_new();
-#endif
-
-}
-
-static void
-camel_vee_folder_finalise (CamelObject *obj)
-{
- CamelVeeFolder *vf = (CamelVeeFolder *)obj;
- struct _CamelVeeFolderPrivate *p = _PRIVATE(vf);
- GList *node;
-
- /* FIXME: check leaks */
- node = p->folders;
- while (node) {
- CamelFolder *f = node->data;
- if (vf != folder_unmatched) {
- camel_object_unhook_event((CamelObject *)f, "folder_changed", (CamelObjectEventHookFunc) folder_changed, vf);
- camel_object_unhook_event((CamelObject *)f, "message_changed", (CamelObjectEventHookFunc) message_changed, vf);
- /* this updates the vfolder */
- if ((vf->flags & CAMEL_STORE_FOLDER_PRIVATE) == 0)
- camel_vee_folder_remove_folder(vf, f);
- }
- camel_object_unref((CamelObject *)f);
- node = g_list_next(node);
- }
-
- g_free(vf->expression);
- g_free(vf->vname);
-
- camel_folder_change_info_free(vf->changes);
- camel_object_unref((CamelObject *)vf->search);
- camel_object_unref((CamelObject *)((CamelFolder *)vf)->summary);
-
-#ifdef ENABLE_THREADS
- g_mutex_free(p->summary_lock);
- g_mutex_free(p->subfolder_lock);
-#endif
- g_free(p);
-}
-
-static void
-vee_folder_construct (CamelVeeFolder *vf, CamelStore *parent_store, const char *name, guint32 flags)
-{
- CamelFolder *folder = (CamelFolder *)vf;
- char *tmp;
-
- vf->flags = flags;
-
- tmp = strchr(name, '?');
- if (tmp) {
- vf->vname = g_strndup(name, tmp-name);
- vf->expression = g_strdup(tmp+1);
- } else {
- vf->vname = g_strdup(name);
- }
-
- tmp = strrchr(vf->vname, '/');
- if (tmp)
- tmp++;
- else
- tmp = vf->vname;
- camel_folder_construct(folder, parent_store, vf->vname, tmp);
-
- /* should CamelVeeMessageInfo be subclassable ..? */
- folder->summary = camel_folder_summary_new();
- folder->summary->message_info_size = sizeof(CamelVeeMessageInfo);
-}
-
-void
-camel_vee_folder_construct(CamelVeeFolder *vf, CamelStore *parent_store, const char *name, guint32 flags)
-{
- UNMATCHED_LOCK();
-
- /* setup unmatched folder if we haven't yet */
- if (folder_unmatched == NULL) {
- unmatched_uids = g_hash_table_new (g_str_hash, g_str_equal);
- folder_unmatched = (CamelVeeFolder *)camel_object_new (camel_vee_folder_get_type ());
- printf("created foldeer unmatched %p\n", folder_unmatched);
-
- vee_folder_construct (folder_unmatched, parent_store, "UNMATCHED", CAMEL_STORE_FOLDER_PRIVATE);
- }
-
- UNMATCHED_UNLOCK();
-
- vee_folder_construct (vf, parent_store, name, flags);
-}
-
-/**
- * camel_vee_folder_new:
- * @parent_store: the parent CamelVeeStore
- * @name: the vfolder name
- * @ex: a CamelException
- *
- * Create a new CamelVeeFolder object.
- *
- * Return value: A new CamelVeeFolder widget.
- **/
-CamelFolder *
-camel_vee_folder_new(CamelStore *parent_store, const char *name, guint32 flags)
-{
- CamelVeeFolder *vf;
- char *path, *query;
-
- UNMATCHED_LOCK();
-
- /* setup unmatched folder if we haven't yet */
- if (folder_unmatched == NULL) {
- unmatched_uids = g_hash_table_new(g_str_hash, g_str_equal);
- folder_unmatched = vf = (CamelVeeFolder *)camel_object_new(camel_vee_folder_get_type());
- printf("created foldeer unmatched %p\n", folder_unmatched);
- vee_folder_construct (vf, parent_store, "UNMATCHED", CAMEL_STORE_FOLDER_PRIVATE);
- }
-
- UNMATCHED_UNLOCK();
-
- path = alloca(strlen(name)+1);
- strcpy(path, name);
- query = strchr(path, '?');
- if (query)
- *query++ = 0;
-
- if (strcmp(path, "UNMATCHED") == 0) {
- camel_object_ref((CamelObject *)folder_unmatched);
- printf("returning unmatched %p, count = %d\n", folder_unmatched, camel_folder_get_message_count((CamelFolder *)folder_unmatched));
- return (CamelFolder *)folder_unmatched;
- }
-
- vf = (CamelVeeFolder *)camel_object_new(camel_vee_folder_get_type());
- vee_folder_construct(vf, parent_store, name, flags);
-
- printf("returning folder %s %p, count = %d\n", name, vf, camel_folder_get_message_count((CamelFolder *)vf));
-
- return (CamelFolder *)vf;
-}
-
-void
-camel_vee_folder_set_expression(CamelVeeFolder *vf, const char *query)
-{
- struct _CamelVeeFolderPrivate *p = _PRIVATE(vf);
- GList *node;
-
- CAMEL_VEE_FOLDER_LOCK(vf, subfolder_lock);
-
- node = p->folders;
- while (node) {
- CamelFolder *f = node->data;
-
- if (vee_folder_build_folder(vf, f, NULL) == -1)
- break;
-
- node = node->next;
- }
-
- CAMEL_VEE_FOLDER_UNLOCK(vf, subfolder_lock);
-}
-
-/**
- * camel_vee_folder_add_folder:
- * @vf: Virtual Folder object
- * @sub: source CamelFolder to add to @vf
- *
- * Adds @sub as a source folder to @vf.
- **/
-void
-camel_vee_folder_add_folder(CamelVeeFolder *vf, CamelFolder *sub)
-{
- struct _CamelVeeFolderPrivate *p = _PRIVATE(vf), *up = _PRIVATE(folder_unmatched);
-
- if (vf == (CamelVeeFolder *)sub) {
- g_warning("Adding a virtual folder to itself as source, ignored");
- return;
- }
-
- CAMEL_VEE_FOLDER_LOCK(vf, subfolder_lock);
-
- /* for normal vfolders we want only unique ones, for unmatched we want them all recorded */
- if (g_list_find(p->folders, sub) == NULL) {
- camel_object_ref((CamelObject *)sub);
- p->folders = g_list_append(p->folders, sub);
- }
- if ((vf->flags & CAMEL_STORE_FOLDER_PRIVATE) == 0) {
- camel_object_ref((CamelObject *)sub);
- up->folders = g_list_append(up->folders, sub);
- }
-
- CAMEL_VEE_FOLDER_UNLOCK(vf, subfolder_lock);
-
- d(printf("camel_vee_folder_add_folde(%p, %p)\n", vf, sub));
-
- camel_object_hook_event((CamelObject *)sub, "folder_changed", (CamelObjectEventHookFunc)folder_changed, vf);
- camel_object_hook_event((CamelObject *)sub, "message_changed", (CamelObjectEventHookFunc)message_changed, vf);
-
- vee_folder_build_folder(vf, sub, NULL);
-}
-
-/**
- * camel_vee_folder_remove_folder:
- * @vf: Virtual Folder object
- * @sub: source CamelFolder to remove from @vf
- *
- * Removed the source folder, @sub, from the virtual folder, @vf.
- **/
-void
-camel_vee_folder_remove_folder(CamelVeeFolder *vf, CamelFolder *sub)
-{
- struct _CamelVeeFolderPrivate *p = _PRIVATE(vf), *up = _PRIVATE(folder_unmatched);
-
- CAMEL_VEE_FOLDER_LOCK(vf, subfolder_lock);
- if (g_list_find(p->folders, sub) == NULL) {
- CAMEL_VEE_FOLDER_UNLOCK(vf, subfolder_lock);
- return;
- }
-
- p->folders = g_list_remove(p->folders, sub);
- if ((vf->flags & CAMEL_STORE_FOLDER_PRIVATE) == 0 && g_list_find(p->folders, sub) != NULL) {
- up->folders = g_list_remove(up->folders, sub);
- camel_object_unref((CamelObject *)sub);
- }
-
- CAMEL_VEE_FOLDER_UNLOCK(vf, subfolder_lock);
-
- vee_folder_remove_folder(vf, sub);
-
- camel_object_unref((CamelObject *)sub);
-}
-
-/**
- * camel_vee_folder_hash_folder:
- * @folder:
- * @:
- *
- * Create a hash string representing the folder name, which should be
- * unique, and remain static for a given folder.
- **/
-void
-camel_vee_folder_hash_folder(CamelFolder *folder, char buffer[8])
-{
- MD5Context ctx;
- unsigned char digest[16];
- unsigned int state = 0, save = 0;
- char *tmp;
- int i;
-
- md5_init(&ctx);
- tmp = camel_service_get_url((CamelService *)folder->parent_store);
- md5_update(&ctx, tmp, strlen(tmp));
- g_free(tmp);
- md5_update(&ctx, folder->full_name, strlen(folder->full_name));
- md5_final(&ctx, digest);
- base64_encode_close(digest, 6, FALSE, buffer, &state, &save);
-
- for (i=0;i<8;i++) {
- if (buffer[i] == '+')
- buffer[i] = '.';
- if (buffer[i] == '/')
- buffer[i] = '_';
- }
-}
-
-static void
-vee_sync(CamelFolder *folder, gboolean expunge, CamelException *ex)
-{
- CamelVeeFolder *vf = (CamelVeeFolder *)folder;
- struct _CamelVeeFolderPrivate *p = _PRIVATE(vf);
- GList *node;
-
- CAMEL_VEE_FOLDER_LOCK(vf, subfolder_lock);
-
- node = p->folders;
- while (node) {
- CamelFolder *f = node->data;
-
- camel_folder_sync(f, expunge, ex);
- if (camel_exception_is_set(ex))
- break;
-
- if (vee_folder_build_folder(vf, f, ex) == -1)
- break;
-
- node = node->next;
- }
-
- CAMEL_VEE_FOLDER_UNLOCK(vf, subfolder_lock);
-}
-
-static void
-vee_expunge (CamelFolder *folder, CamelException *ex)
-{
- ((CamelFolderClass *)((CamelObject *)folder)->classfuncs)->sync(folder, TRUE, ex);
-}
-
-static CamelMimeMessage *
-vee_get_message(CamelFolder *folder, const char *uid, CamelException *ex)
-{
- CamelVeeMessageInfo *mi;
- CamelMimeMessage *msg = NULL;
-
- mi = (CamelVeeMessageInfo *)camel_folder_summary_uid(folder->summary, uid);
- if (mi) {
- msg = camel_folder_get_message(mi->folder, camel_message_info_uid(mi)+8, ex);
- camel_folder_summary_info_free(folder->summary, (CamelMessageInfo *)mi);
- } else {
- camel_exception_setv(ex, CAMEL_EXCEPTION_FOLDER_INVALID_UID,
- _("No such message %s in %s"), uid,
- folder->name);
- }
-
- return msg;
-}
-
-static GPtrArray *
-vee_search_by_expression(CamelFolder *folder, const char *expression, CamelException *ex)
-{
- GList *node;
- GPtrArray *matches, *result = g_ptr_array_new ();
- char *expr;
- CamelVeeFolder *vf = (CamelVeeFolder *)folder;
- struct _CamelVeeFolderPrivate *p = _PRIVATE(vf);
- GHashTable *searched = g_hash_table_new(NULL, NULL);
-
- CAMEL_VEE_FOLDER_LOCK(vf, subfolder_lock);
-
- expr = g_strdup_printf("(and %s %s)", vf->expression, expression);
- node = p->folders;
- while (node) {
- CamelFolder *f = node->data;
- int i;
- char hash[8];
-
- /* make sure we only search each folder once - for unmatched folder to work right */
- if (g_hash_table_lookup(searched, f) == NULL) {
- camel_vee_folder_hash_folder(f, hash);
- matches = camel_folder_search_by_expression(f, expression, ex);
- for (i = 0; i < matches->len; i++) {
- char *uid = matches->pdata[i];
- g_ptr_array_add(result, g_strdup_printf("%.8s%s", hash, uid));
- }
- camel_folder_search_free(f, matches);
- g_hash_table_insert(searched, f, f);
- }
- node = g_list_next(node);
- }
-
- CAMEL_VEE_FOLDER_UNLOCK(vf, subfolder_lock);
-
- g_hash_table_destroy(searched);
-
- return result;
-}
-
-static void
-vee_set_message_flags(CamelFolder *folder, const char *uid, guint32 flags, guint32 set)
-{
- CamelVeeMessageInfo *mi;
-
- mi = (CamelVeeMessageInfo *)camel_folder_summary_uid(folder->summary, uid);
- if (mi) {
- ((CamelFolderClass *)camel_vee_folder_parent)->set_message_flags(folder, uid, flags, set);
- camel_folder_set_message_flags(mi->folder, camel_message_info_uid(mi) + 8, flags, set);
- camel_folder_summary_info_free(folder->summary, (CamelMessageInfo *)mi);
- }
-}
-
-static void
-vee_set_message_user_flag(CamelFolder *folder, const char *uid, const char *name, gboolean value)
-{
- CamelVeeMessageInfo *mi;
-
- mi = (CamelVeeMessageInfo *)camel_folder_summary_uid(folder->summary, uid);
- if (mi) {
- ((CamelFolderClass *)camel_vee_folder_parent)->set_message_user_flag(folder, uid, name, value);
- camel_folder_set_message_user_flag(mi->folder, camel_message_info_uid(mi) + 8, name, value);
- camel_folder_summary_info_free(folder->summary, (CamelMessageInfo *)mi);
- }
-}
-
-static void
-vee_move_messages_to (CamelFolder *folder, GPtrArray *uids, CamelFolder *dest, CamelException *ex)
-{
- CamelVeeMessageInfo *mi;
- int i;
-
- for (i = 0; i < uids->len && !camel_exception_is_set (ex); i++) {
- mi = (CamelVeeMessageInfo *) camel_folder_summary_uid (folder->summary, uids->pdata[i]);
- if (mi) {
- /* noop if it we're moving from the same vfolder (uh, which should't happen but who knows) */
- if (folder != mi->folder) {
- GPtrArray *uids;
-
- uids = g_ptr_array_new ();
- g_ptr_array_add (uids, (char *) (camel_message_info_uid (mi) + 8));
- camel_folder_move_messages_to (mi->folder, uids, dest, ex);
- g_ptr_array_free (uids, TRUE);
- }
- camel_folder_summary_info_free (folder->summary, (CamelMessageInfo *)mi);
- } else {
- camel_exception_setv (ex, CAMEL_EXCEPTION_FOLDER_INVALID_UID,
- _("No such message: %s"), uids->pdata[i]);
- }
- }
-}
-
-/* ********************************************************************** *
- utility functions */
-
-/* must be called with summary_lock held */
-static CamelVeeMessageInfo *
-vee_folder_add_info(CamelVeeFolder *vf, CamelFolder *f, CamelMessageInfo *info, const char hash[8])
-{
- CamelVeeMessageInfo *mi;
- char *uid;
- CamelFolder *folder = (CamelFolder *)vf;
- CamelMessageInfo *dinfo;
-
- uid = g_strdup_printf("%.8s%s", hash, camel_message_info_uid(info));
- dinfo = camel_folder_summary_uid(folder->summary, uid);
- if (dinfo) {
- (printf("w:clash, we already have '%s' in summary\n", uid));
- g_free(uid);
- camel_folder_summary_info_free(folder->summary, dinfo);
- return NULL;
- }
-
- d(printf("adding uid %s to %s\n", uid, vf->vname));
-
- mi = (CamelVeeMessageInfo *)camel_folder_summary_info_new(folder->summary);
- camel_message_info_dup_to(info, (CamelMessageInfo *)mi);
-#ifdef DOESTRV
- mi->info.strings = e_strv_set_ref_free(mi->info.strings, CAMEL_MESSAGE_INFO_UID, uid);
- mi->info.strings = e_strv_pack(mi->info.strings);
-#else
- g_free(mi->info.uid);
- mi->info.uid = uid;
-#endif
- mi->folder = f;
- camel_folder_summary_add(folder->summary, (CamelMessageInfo *)mi);
-
- return mi;
-}
-
-/* must be called with summary_lock held */
-static CamelVeeMessageInfo *
-vee_folder_add_uid(CamelVeeFolder *vf, CamelFolder *f, const char *inuid, const char hash[8])
-{
- CamelMessageInfo *info;
- CamelVeeMessageInfo *mi = NULL;
-
- info = camel_folder_get_message_info(f, inuid);
- if (info) {
- mi = vee_folder_add_info(vf, f, info, hash);
- camel_folder_free_message_info(f, info);
- }
- return mi;
-}
-
-static void
-vee_folder_remove_folder(CamelVeeFolder *vf, CamelFolder *source)
-{
- int i, count, n, still;
- char *oldkey;
- CamelFolder *folder = (CamelFolder *)vf;
- char hash[8];
- struct _CamelVeeFolderPrivate *p = _PRIVATE(vf);
- CamelFolderChangeInfo *vf_changes = NULL, *unmatched_changes = NULL;
-
- if (vf == folder_unmatched)
- return;
-
- /* check if this folder is still to be part of unmatched */
- if ((vf->flags & CAMEL_STORE_FOLDER_PRIVATE) == 0) {
- CAMEL_VEE_FOLDER_LOCK(folder_unmatched, subfolder_lock);
- still = g_list_find(p->folders, source) != NULL;
- CAMEL_VEE_FOLDER_UNLOCK(folder_unmatched, subfolder_lock);
- camel_vee_folder_hash_folder(source, hash);
- } else {
- still = FALSE;
- }
-
- CAMEL_VEE_FOLDER_LOCK(vf, summary_lock);
- CAMEL_VEE_FOLDER_LOCK(folder_unmatched, summary_lock);
-
- count = camel_folder_summary_count(folder->summary);
- for (i=0;i<count;i++) {
- CamelVeeMessageInfo *mi = (CamelVeeMessageInfo *)camel_folder_summary_index(folder->summary, i);
- if (mi) {
- if (mi->folder == source) {
- const char *uid = camel_message_info_uid(mi);
-
- camel_folder_change_info_remove_uid(vf->changes, uid);
- camel_folder_summary_remove_index(folder->summary, i);
- i--;
- if ((vf->flags & CAMEL_STORE_FOLDER_PRIVATE) == 0) {
- if (still) {
- if (g_hash_table_lookup_extended(unmatched_uids, uid, (void **)&oldkey, (void **)&n)) {
- if (n == 1) {
- g_hash_table_remove(unmatched_uids, oldkey);
- if (vee_folder_add_uid(folder_unmatched, source, oldkey+8, hash))
- camel_folder_change_info_add_uid(folder_unmatched->changes, oldkey);
- g_free(oldkey);
- } else {
- g_hash_table_insert(unmatched_uids, oldkey, (void *)(n-1));
- }
- }
- } else {
- if (g_hash_table_lookup_extended(unmatched_uids, camel_message_info_uid(mi), (void **)&oldkey, (void **)&n)) {
- g_hash_table_remove(unmatched_uids, oldkey);
- g_free(oldkey);
- }
- camel_folder_summary_remove_uid(((CamelFolder *)folder_unmatched)->summary, uid);
- }
- }
- }
- camel_folder_summary_info_free(folder->summary, (CamelMessageInfo *)mi);
- }
- }
-
- if (camel_folder_change_info_changed(folder_unmatched->changes)) {
- unmatched_changes = folder_unmatched->changes;
- folder_unmatched->changes = camel_folder_change_info_new();
- }
-
- if (camel_folder_change_info_changed(vf->changes)) {
- vf_changes = vf->changes;
- vf->changes = camel_folder_change_info_new();
- }
-
- CAMEL_VEE_FOLDER_UNLOCK(folder_unmatched, summary_lock);
- CAMEL_VEE_FOLDER_UNLOCK(vf, summary_lock);
-
- if (unmatched_changes) {
- camel_object_trigger_event((CamelObject *)folder_unmatched, "folder_changed", unmatched_changes);
- camel_folder_change_info_free(unmatched_changes);
- }
-
- if (vf_changes) {
- camel_object_trigger_event((CamelObject *)vf, "folder_changed", vf_changes);
- camel_folder_change_info_free(vf_changes);
- }
-}
-
-struct _update_data {
- CamelFolder *source;
- CamelVeeFolder *vf;
- char hash[8];
-};
-
-static void
-unmatched_check_uid(char *uidin, void *value, struct _update_data *u)
-{
- char *uid;
- int n;
-
- uid = alloca(strlen(uidin)+9);
- sprintf(uid, "%.8s%s", u->hash, uidin);
- n = (int)g_hash_table_lookup(unmatched_uids, uid);
- if (n == 0) {
- if (vee_folder_add_uid(folder_unmatched, u->source, uidin, u->hash))
- camel_folder_change_info_add_uid(folder_unmatched->changes, uid);
- } else {
- CamelVeeMessageInfo *mi = (CamelVeeMessageInfo *)camel_folder_summary_uid(((CamelFolder *)folder_unmatched)->summary, uid);
- if (mi) {
- camel_folder_summary_remove(((CamelFolder *)folder_unmatched)->summary, (CamelMessageInfo *)mi);
- camel_folder_change_info_remove_uid(folder_unmatched->changes, uid);
- camel_folder_summary_info_free(((CamelFolder *)folder_unmatched)->summary, (CamelMessageInfo *)mi);
- }
- }
-}
-
-static void
-folder_added_uid(char *uidin, void *value, struct _update_data *u)
-{
- CamelVeeMessageInfo *mi;
- char *oldkey;
- int n;
-
- if ( (mi = vee_folder_add_uid(u->vf, u->source, uidin, u->hash)) ) {
- camel_folder_change_info_add_uid(u->vf->changes, camel_message_info_uid(mi));
-
- if (g_hash_table_lookup_extended(unmatched_uids, camel_message_info_uid(mi), (void **)&oldkey, (void **)&n)) {
- g_hash_table_insert(unmatched_uids, oldkey, (void *)(n+1));
- } else {
- g_hash_table_insert(unmatched_uids, g_strdup(camel_message_info_uid(mi)), (void *)1);
- }
- }
-}
-
-/* build query contents for a single folder */
-static int
-vee_folder_build_folder(CamelVeeFolder *vf, CamelFolder *source, CamelException *ex)
-{
- GPtrArray *match, *all;
- GHashTable *allhash, *matchhash;
- CamelFolder *f = source;
- CamelFolder *folder = (CamelFolder *)vf;
- int i, n, count;
- struct _update_data u;
- CamelFolderChangeInfo *vf_changes = NULL, *unmatched_changes = NULL;
-
- if (vf == folder_unmatched)
- return 0;
-
- match = camel_folder_search_by_expression(f, vf->expression, ex);
- if (match == NULL)
- return -1;
-
- u.source = source;
- u.vf = vf;
- camel_vee_folder_hash_folder(source, u.hash);
-
- CAMEL_VEE_FOLDER_LOCK(vf, summary_lock);
-
- /* we build 2 hash tables, one for all uid's not matched, the other for all matched uid's,
- we just ref the real memory */
- matchhash = g_hash_table_new(g_str_hash, g_str_equal);
- for (i=0;i<match->len;i++)
- g_hash_table_insert(matchhash, match->pdata[i], (void *)1);
-
- allhash = g_hash_table_new(g_str_hash, g_str_equal);
- all = camel_folder_get_uids(f);
- for (i=0;i<all->len;i++)
- if (g_hash_table_lookup(matchhash, all->pdata[i]) == NULL)
- g_hash_table_insert(allhash, all->pdata[i], (void *)1);
-
- CAMEL_VEE_FOLDER_LOCK(folder_unmatched, summary_lock);
-
- /* scan, looking for "old" uid's to be removed */
- count = camel_folder_summary_count(folder->summary);
- for (i=0;i<count;i++) {
- CamelVeeMessageInfo *mi = (CamelVeeMessageInfo *)camel_folder_summary_index(folder->summary, i);
-
- if (mi) {
- if (mi->folder == source) {
- char *uid = (char *)camel_message_info_uid(mi), *oldkey;
-
- if (g_hash_table_lookup(matchhash, uid+8) == NULL) {
- camel_folder_summary_remove_index(folder->summary, i);
- camel_folder_change_info_remove_uid(vf->changes, camel_message_info_uid(mi));
- i--;
- if (g_hash_table_lookup_extended(unmatched_uids, uid, (void **)&oldkey, (void **)&n)) {
- if (n == 1) {
- g_hash_table_remove(unmatched_uids, oldkey);
- g_free(oldkey);
- } else {
- g_hash_table_insert(unmatched_uids, oldkey, (void *)(n-1));
- }
- }
- } else {
- g_hash_table_remove(matchhash, uid+8);
- }
- }
- camel_folder_summary_info_free(folder->summary, (CamelMessageInfo *)mi);
- }
- }
-
- /* now matchhash contains any new uid's, add them, etc */
- g_hash_table_foreach(matchhash, (GHFunc)folder_added_uid, &u);
-
- /* scan unmatched, remove any that have vanished, etc */
- count = camel_folder_summary_count(((CamelFolder *)folder_unmatched)->summary);
- for (i=0;i<count;i++) {
- CamelVeeMessageInfo *mi = (CamelVeeMessageInfo *)camel_folder_summary_index(((CamelFolder *)folder_unmatched)->summary, i);
-
- if (mi) {
- if (mi->folder == source) {
- char *uid = (char *)camel_message_info_uid(mi);
-
- if (g_hash_table_lookup(allhash, uid+8) == NULL) {
- /* no longer exists at all, just remove it entirely */
- camel_folder_summary_remove_index(((CamelFolder *)folder_unmatched)->summary, i);
- camel_folder_change_info_remove_uid(folder_unmatched->changes, camel_message_info_uid(mi));
- i--;
- } else {
- g_hash_table_remove(allhash, uid+8);
- }
- }
- camel_folder_summary_info_free(((CamelFolder *)folder_unmatched)->summary, (CamelMessageInfo *)mi);
- }
- }
-
- /* now allhash contains all potentially new uid's for the unmatched folder, process */
- g_hash_table_foreach(allhash, (GHFunc)unmatched_check_uid, &u);
-
- /* copy any changes so we can raise them outside the lock */
- if (camel_folder_change_info_changed(folder_unmatched->changes)) {
- unmatched_changes = folder_unmatched->changes;
- folder_unmatched->changes = camel_folder_change_info_new();
- }
-
- if (camel_folder_change_info_changed(vf->changes)) {
- vf_changes = vf->changes;
- vf->changes = camel_folder_change_info_new();
- }
-
- CAMEL_VEE_FOLDER_UNLOCK(folder_unmatched, summary_lock);
- CAMEL_VEE_FOLDER_UNLOCK(vf, summary_lock);
-
- g_hash_table_destroy(matchhash);
- g_hash_table_destroy(allhash);
- camel_folder_search_free(f, match);
- camel_folder_free_uids(f, all);
-
- if (unmatched_changes) {
- camel_object_trigger_event((CamelObject *)folder_unmatched, "folder_changed", unmatched_changes);
- camel_folder_change_info_free(unmatched_changes);
- }
-
- if (vf_changes) {
- camel_object_trigger_event((CamelObject *)vf, "folder_changed", vf_changes);
- camel_folder_change_info_free(vf_changes);
- }
-
- return 0;
-}
-
-/*
-
- (match-folder "folder1" "folder2")
-
- */
-
-
-/* must be called with summary_lock held */
-static void
-vee_folder_change_match(CamelVeeFolder *vf, CamelVeeMessageInfo *vinfo, const CamelMessageInfo *info)
-{
- CamelFlag *flag;
- CamelTag *tag;
-
- d(printf("changing match %s\n", camel_message_info_uid(vinfo)));
-
- vinfo->info.flags = info->flags;
- camel_flag_list_free(&vinfo->info.user_flags);
- flag = info->user_flags;
- while (flag) {
- camel_flag_set(&vinfo->info.user_flags, flag->name, TRUE);
- flag = flag->next;
- }
- camel_tag_list_free(&vinfo->info.user_tags);
- tag = info->user_tags;
- while (tag) {
- camel_tag_set(&vinfo->info.user_tags, tag->name, tag->value);
- tag = tag->next;
- }
- camel_folder_change_info_change_uid(vf->changes, camel_message_info_uid(vinfo));
-}
-
-static void
-folder_changed(CamelFolder *sub, CamelFolderChangeInfo *changes, CamelVeeFolder *vf)
-{
- CamelFolder *folder = (CamelFolder *)vf;
- char *vuid, hash[8];
- CamelVeeMessageInfo *vinfo;
- int i;
- CamelMessageInfo *info;
- char *oldkey;
- int n;
- CamelFolderChangeInfo *vf_changes = NULL, *unmatched_changes = NULL;
-
- camel_vee_folder_hash_folder(sub, hash);
-
- /* if not auto-updating, only propagate changed/removed events, not added items */
- if ((vf->flags & CAMEL_STORE_VEE_FOLDER_AUTO) == 0) {
- CAMEL_VEE_FOLDER_LOCK(vf, summary_lock);
- CAMEL_VEE_FOLDER_LOCK(folder_unmatched, summary_lock);
-
- for (i=0;i<changes->uid_changed->len;i++) {
- info = camel_folder_get_message_info(sub, changes->uid_changed->pdata[i]);
- vuid = g_strdup_printf("%.8s%s", hash, (char *)changes->uid_changed->pdata[i]);
- vinfo = (CamelVeeMessageInfo *)camel_folder_summary_uid(folder->summary, vuid);
- if (vinfo && info)
- vee_folder_change_match(vf, vinfo, info);
- g_free(vuid);
- if (info)
- camel_folder_free_message_info(sub, info);
- if (vinfo)
- camel_folder_summary_info_free(folder->summary, (CamelMessageInfo *)vinfo);
- }
-
- for (i=0;i<changes->uid_removed->len;i++) {
- vuid = g_strdup_printf("%.8s%s", hash, (char *)changes->uid_removed->pdata[i]);
- vinfo = (CamelVeeMessageInfo *)camel_folder_summary_uid(folder->summary, vuid);
- if (vinfo) {
- camel_folder_change_info_remove_uid(vf->changes, vuid);
- camel_folder_summary_remove(folder->summary, (CamelMessageInfo *)vinfo);
- camel_folder_summary_info_free(folder->summary, (CamelMessageInfo *)vinfo);
-
- if ((vf->flags & CAMEL_STORE_FOLDER_PRIVATE) == 0) {
- if (g_hash_table_lookup_extended(unmatched_uids, vuid, (void **)&oldkey, (void **)&n)) {
- g_hash_table_remove(unmatched_uids, oldkey);
- g_free(oldkey);
- }
- camel_folder_summary_remove_uid(((CamelFolder *)folder_unmatched)->summary, vuid);
- }
-
- }
- g_free(vuid);
- }
-
- if (camel_folder_change_info_changed(folder_unmatched->changes)) {
- unmatched_changes = folder_unmatched->changes;
- folder_unmatched->changes = camel_folder_change_info_new();
- }
-
- if (camel_folder_change_info_changed(vf->changes)) {
- vf_changes = vf->changes;
- vf->changes = camel_folder_change_info_new();
- }
-
- CAMEL_VEE_FOLDER_UNLOCK(folder_unmatched, summary_lock);
- CAMEL_VEE_FOLDER_UNLOCK(vf, summary_lock);
-
- if (unmatched_changes) {
- camel_object_trigger_event((CamelObject *)folder_unmatched, "folder_changed", unmatched_changes);
- camel_folder_change_info_free(unmatched_changes);
- }
-
- if (vf_changes) {
- camel_object_trigger_event((CamelObject *)vf, "folder_changed", vf_changes);
- camel_folder_change_info_free(vf_changes);
- }
-
- return;
- }
-
- /* if we are autoupdating, then do the magic */
- /* FIXME: This should be optimised to be incremental, but its just too much work right now to validate it */
- vee_folder_build_folder(vf, sub, NULL);
-
-#if 0
- /* assume its faster to search a long list in whole, than by part */
- if (changes && (changes->uid_added->len + changes->uid_changed->len) < 500) {
- gboolean match;
-
- /* FIXME: We dont search body contents with this search, so, it isn't as
- useful as it might be.
- We shold probably just perform a whole search if we need to, i.e. there
- are added items. Changed items we are unlikely to want to remove immediately
- anyway, although I guess it might be useful.
- Removed items can always just be removed.
- */
-
- /* see if added ones now match us */
- for (i=0;i<changes->uid_added->len;i++) {
- info = camel_folder_get_message_info(sub, changes->uid_added->pdata[i]);
- if (info) {
- camel_folder_search_set_folder(vf->search, sub);
- match = camel_folder_search_match_expression(vf->search, vf->expression, info, NULL);
- if (match)
- vinfo = vee_folder_add_change(vf, sub, info);
- camel_folder_free_message_info(sub, info);
- }
- }
-
- /* check if changed ones still match */
- for (i=0;i<changes->uid_changed->len;i++) {
- info = camel_folder_get_message_info(sub, changes->uid_changed->pdata[i]);
- vuid = g_strdup_printf("%p:%s", sub, (char *)changes->uid_changed->pdata[i]);
- vinfo = (CamelVeeMessageInfo *)camel_folder_summary_uid(folder->summary, vuid);
- if (info) {
- camel_folder_search_set_folder(vf->search, sub);
- match = camel_folder_search_match_expression(vf->search, vf->expression, info, NULL);
- if (vinfo) {
- if (!match)
- vfolder_remove_match(vf, vinfo);
- else
- vfolder_change_match(vf, vinfo, info);
- } else if (match)
- vee_folder_add_change(vf, sub, info);
- camel_folder_free_message_info(sub, info);
- } else if (vinfo)
- vfolder_remove_match(vf, vinfo);
-
- if (vinfo)
- camel_folder_summary_info_free(folder->summary, (CamelMessageInfo *)vinfo);
-
- g_free(vuid);
- }
-
- /* mirror removes directly, if they used to match */
- for (i=0;i<changes->uid_removed->len;i++) {
- vuid = g_strdup_printf("%p:%s", sub, (char *)changes->uid_removed->pdata[i]);
- vinfo = (CamelVeeMessageInfo *)camel_folder_summary_uid(folder->summary, vuid);
- if (vinfo) {
- vfolder_remove_match(vf, vinfo);
- camel_folder_summary_info_free(folder->summary, (CamelMessageInfo *)vinfo);
- }
- g_free(vuid);
- }
- } else {
- vee_folder_build_folder(vf, sub, NULL);
- }
-#endif
-}
-
-/* track flag changes in the summary, we just promote it to a folder_changed event */
-static void
-message_changed(CamelFolder *f, const char *uid, CamelVeeFolder *vf)
-{
- CamelFolderChangeInfo *changes;
-
- changes = camel_folder_change_info_new();
- camel_folder_change_info_change_uid(changes, uid);
- folder_changed(f, changes, vf);
- camel_folder_change_info_free(changes);
-}
diff --git a/camel/camel-vee-folder.h b/camel/camel-vee-folder.h
deleted file mode 100644
index 650a53ec14..0000000000
--- a/camel/camel-vee-folder.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (C) 2000 Helix Code Inc.
- *
- * Authors: Michael Zucchi <notzed@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_VEE_FOLDER_H
-#define _CAMEL_VEE_FOLDER_H
-
-#include <glib.h>
-#include <camel/camel-folder.h>
-
-#define CAMEL_VEE_FOLDER(obj) CAMEL_CHECK_CAST (obj, camel_vee_folder_get_type (), CamelVeeFolder)
-#define CAMEL_VEE_FOLDER_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_vee_folder_get_type (), CamelVeeFolderClass)
-#define CAMEL_IS_VEE_FOLDER(obj) CAMEL_CHECK_TYPE (obj, camel_vee_folder_get_type ())
-
-typedef struct _CamelVeeFolder CamelVeeFolder;
-typedef struct _CamelVeeFolderClass CamelVeeFolderClass;
-
-/* our message info includes the parent folder */
-typedef struct _CamelVeeMessageInfo {
- CamelMessageInfo info;
- CamelFolder *folder;
-} CamelVeeMessageInfo;
-
-struct _CamelVeeFolder {
- CamelFolder parent;
-
- struct _CamelVeeFolderPrivate *priv;
-
- char *expression; /* query expression */
- char *vname; /* local name */
-
- guint32 flags; /* folder open flags */
-
- CamelFolderChangeInfo *changes;
- CamelFolderSearch *search;
-};
-
-struct _CamelVeeFolderClass {
- CamelFolderClass parent_class;
-};
-
-guint camel_vee_folder_get_type (void);
-CamelFolder *camel_vee_folder_new (CamelStore *parent_store, const char *name, guint32 flags);
-void camel_vee_folder_construct (CamelVeeFolder *vf, CamelStore *parent_store, const char *name, guint32 flags);
-
-void camel_vee_folder_add_folder (CamelVeeFolder *vf, CamelFolder *sub);
-void camel_vee_folder_remove_folder (CamelVeeFolder *vf, CamelFolder *sub);
-void camel_vee_folder_set_expression (CamelVeeFolder *vf, const char *expr);
-
-void camel_vee_folder_hash_folder (CamelFolder *folder, char buffer[8]);
-
-#endif /* ! _CAMEL_VEE_FOLDER_H */
diff --git a/camel/camel-vee-store.c b/camel/camel-vee-store.c
deleted file mode 100644
index 5a9d79d8b2..0000000000
--- a/camel/camel-vee-store.c
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Copyright (C) 2000 Helix Code Inc.
- *
- * Authors: Michael Zucchi <notzed@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-vee-store.h"
-#include "camel-vee-folder.h"
-
-#include <string.h>
-
-static CamelFolder *vee_get_folder (CamelStore *store, const char *folder_name, guint32 flags, CamelException *ex);
-static void vee_init_trash (CamelStore *store);
-static CamelFolder *vee_get_trash (CamelStore *store, CamelException *ex);
-
-struct _CamelVeeStorePrivate {
- CamelFolderInfo *folder_info;
-};
-
-#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 (CamelObject *obj);
-
-static CamelStoreClass *camel_vee_store_parent;
-
-CamelType
-camel_vee_store_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (camel_store_get_type (), "CamelVeeStore",
- sizeof (CamelVeeStore),
- sizeof (CamelVeeStoreClass),
- (CamelObjectClassInitFunc) camel_vee_store_class_init,
- NULL,
- (CamelObjectInitFunc) camel_vee_store_init,
- (CamelObjectFinalizeFunc) camel_vee_store_finalise);
- }
-
- return type;
-}
-
-static void
-camel_vee_store_class_init (CamelVeeStoreClass *klass)
-{
- CamelStoreClass *store_class = (CamelStoreClass *) klass;
-
- camel_vee_store_parent = CAMEL_STORE_CLASS(camel_type_get_global_classfuncs (camel_store_get_type ()));
-
- /* virtual method overload */
- store_class->get_folder = vee_get_folder;
- store_class->init_trash = vee_init_trash;
- store_class->get_trash = vee_get_trash;
-}
-
-static void
-camel_vee_store_init (CamelVeeStore *obj)
-{
- struct _CamelVeeStorePrivate *p;
-
- p = _PRIVATE(obj) = g_malloc0(sizeof(*p));
-}
-
-static void
-camel_vee_store_finalise (CamelObject *obj)
-{
- CamelVeeStore *vs = (CamelVeeStore *)obj;
-
- g_free(vs->priv);
-}
-
-/**
- * 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(camel_object_new(camel_vee_store_get_type ()));
- return new;
-}
-
-static CamelFolder *
-vee_get_folder (CamelStore *store, const char *folder_name, guint32 flags, CamelException *ex)
-{
- CamelFolderInfo *fi;
- CamelVeeFolder *vf;
- char *name;
-
- vf = (CamelVeeFolder *)camel_vee_folder_new(store, folder_name, flags);
- if ((vf->flags & CAMEL_STORE_FOLDER_PRIVATE) == 0) {
- fi = g_malloc0(sizeof(*fi));
- fi->full_name = g_strdup(vf->vname);
- name = strrchr(vf->vname, '/');
- if (name == NULL)
- name = vf->vname;
- fi->name = g_strdup(name);
- fi->url = g_strdup_printf("vfolder:%s", vf->vname);
- fi->unread_message_count = -1;
-
- camel_object_trigger_event(CAMEL_OBJECT(store), "folder_created", fi);
- camel_folder_info_free(fi);
- }
-
- return (CamelFolder *)vf;
-}
-
-static void
-vee_init_trash (CamelStore *store)
-{
- /* no-op */
- ;
-}
-
-static CamelFolder *
-vee_get_trash (CamelStore *store, CamelException *ex)
-{
- return NULL;
-}
diff --git a/camel/camel-vee-store.h b/camel/camel-vee-store.h
deleted file mode 100644
index c6249a05dc..0000000000
--- a/camel/camel-vee-store.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (C) 2000 Helix Code Inc.
- *
- * Authors: Michael Zucchi <notzed@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_VEE_STORE_H
-#define _CAMEL_VEE_STORE_H
-
-#include <glib.h>
-#include <camel/camel-store.h>
-
-#define CAMEL_VEE_STORE(obj) CAMEL_CHECK_CAST (obj, camel_vee_store_get_type (), CamelVeeStore)
-#define CAMEL_VEE_STORE_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_vee_store_get_type (), CamelVeeStoreClass)
-#define CAMEL_IS_VEE_STORE(obj) CAMEL_CHECK_TYPE (obj, camel_vee_store_get_type ())
-
-typedef struct _CamelVeeStore CamelVeeStore;
-typedef struct _CamelVeeStoreClass CamelVeeStoreClass;
-
-/* open mode for folder, vee folder auto-update */
-#define CAMEL_STORE_VEE_FOLDER_AUTO (1<<16)
-
-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/camel-vtrash-folder.c b/camel/camel-vtrash-folder.c
deleted file mode 100644
index ed8e9f0765..0000000000
--- a/camel/camel-vtrash-folder.c
+++ /dev/null
@@ -1,142 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2001 Ximian, Inc. (www.ximian.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 <config.h>
-
-#include "camel-exception.h"
-#include "camel-vtrash-folder.h"
-#include "camel-store.h"
-#include "camel-vee-store.h"
-#include "camel-mime-message.h"
-
-#include <string.h>
-
-static CamelVeeFolderClass *camel_vtrash_folder_parent;
-
-static void vtrash_append_message (CamelFolder *folder, CamelMimeMessage *message,
- const CamelMessageInfo *info, CamelException *ex);
-static void vtrash_copy_messages_to (CamelFolder *folder, GPtrArray *uids, CamelFolder *dest, CamelException *ex);
-static void vtrash_move_messages_to (CamelFolder *folder, GPtrArray *uids, CamelFolder *dest, CamelException *ex);
-
-static void
-camel_vtrash_folder_class_init (CamelVTrashFolderClass *klass)
-{
- CamelFolderClass *folder_class = (CamelFolderClass *) klass;
-
- camel_vtrash_folder_parent =
- CAMEL_VEE_FOLDER_CLASS (camel_type_get_global_classfuncs (camel_folder_get_type ()));
-
- folder_class->append_message = vtrash_append_message;
- folder_class->copy_messages_to = vtrash_copy_messages_to;
- folder_class->move_messages_to = vtrash_move_messages_to;
-}
-
-CamelType
-camel_vtrash_folder_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register (camel_vee_folder_get_type (),
- "CamelVTrashFolder",
- sizeof (CamelVTrashFolder),
- sizeof (CamelVTrashFolderClass),
- (CamelObjectClassInitFunc) camel_vtrash_folder_class_init,
- NULL,
- NULL,
- NULL);
- }
-
- return type;
-}
-
-/**
- * camel_vee_folder_new:
- * @parent_store: the parent CamelVeeStore
- * @name: the vfolder name
- * @ex: a CamelException
- *
- * Create a new CamelVeeFolder object.
- *
- * Return value: A new CamelVeeFolder widget.
- **/
-CamelFolder *
-camel_vtrash_folder_new (CamelStore *parent_store, const char *name)
-{
- CamelFolder *vtrash;
- char *vtrash_name;
- guint32 flags;
-
- vtrash = (CamelFolder *)camel_object_new (camel_vtrash_folder_get_type ());
- vtrash_name = g_strdup_printf ("%s?(match-all (system-flag \"Deleted\"))", name);
- flags = CAMEL_STORE_FOLDER_PRIVATE | CAMEL_STORE_FOLDER_CREATE | CAMEL_STORE_VEE_FOLDER_AUTO;
-
- camel_vee_folder_construct (CAMEL_VEE_FOLDER (vtrash), parent_store, vtrash_name, flags);
-
- return vtrash;
-}
-
-static void
-vtrash_append_message (CamelFolder *folder, CamelMimeMessage *message, const CamelMessageInfo *info, CamelException *ex)
-{
- /* no-op */
-}
-
-static void
-vtrash_copy_messages_to (CamelFolder *source, GPtrArray *uids, CamelFolder *dest, CamelException *ex)
-{
- /* don't allow the user to copy to or from the vtrash folder */
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("You cannot copy messages from this trash folder."));
-}
-
-static void
-vtrash_move_messages_to (CamelFolder *source, GPtrArray *uids, CamelFolder *dest, CamelException *ex)
-{
- CamelVeeMessageInfo *mi;
- int i;
-
- for (i = 0; i < uids->len; i++) {
- mi = (CamelVeeMessageInfo *)camel_folder_get_message_info(source, uids->pdata[i]);
- if (mi == NULL) {
- g_warning("Cannot find uid %s in source folder during move_to", (char *)uids->pdata[i]);
- continue;
- }
-
- if (dest == mi->folder) {
- /* Just undelete the original message */
- CAMEL_FOLDER_CLASS (dest)->set_message_flags (dest, uids->pdata[i], CAMEL_MESSAGE_DELETED, 0);
- } else {
- /* This means that the user is trying to move the message
- from the vTrash to a folder other than the original. */
- GPtrArray *tuids;
-
- tuids = g_ptr_array_new ();
- g_ptr_array_add (tuids, uids->pdata[i]);
- /*CAMEL_FOLDER_CLASS (mi->folder)->move_messages_to (mi->folder, tuids, dest, ex);*/
- camel_folder_move_messages_to(mi->folder, tuids, dest, ex);
- g_ptr_array_free (tuids, TRUE);
- }
-
- camel_folder_free_message_info(source, (CamelMessageInfo *)mi);
- }
-}
diff --git a/camel/camel-vtrash-folder.h b/camel/camel-vtrash-folder.h
deleted file mode 100644
index 7f5dd1b79e..0000000000
--- a/camel/camel-vtrash-folder.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2001 Ximian, Inc. (www.ximian.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.
- *
- */
-
-
-#ifndef _CAMEL_VTRASH_FOLDER_H
-#define _CAMEL_VTRASH_FOLDER_H
-
-#include <camel/camel-folder.h>
-#include <camel/camel-vee-folder.h>
-
-#define CAMEL_VTRASH_FOLDER(obj) CAMEL_CHECK_CAST (obj, camel_vtrash_folder_get_type (), CamelVTrashFolder)
-#define CAMEL_VTRASH_FOLDER_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_vtrash_folder_get_type (), CamelVTrashFolderClass)
-#define CAMEL_IS_VTRASH_FOLDER(obj) CAMEL_CHECK_TYPE (obj, camel_vtrash_folder_get_type ())
-
-typedef struct _CamelVTrashFolder CamelVTrashFolder;
-typedef struct _CamelVTrashFolderClass CamelVTrashFolderClass;
-
-struct _CamelVTrashFolder {
- CamelVeeFolder parent;
-
-};
-
-struct _CamelVTrashFolderClass {
- CamelVeeFolderClass parent_class;
-
-};
-
-CamelType camel_vtrash_folder_get_type (void);
-
-CamelFolder *camel_vtrash_folder_new (CamelStore *parent_store, const char *name);
-
-#endif /* ! _CAMEL_VTRASH_FOLDER_H */
diff --git a/camel/camel.c b/camel/camel.c
deleted file mode 100644
index 6228c7227c..0000000000
--- a/camel/camel.c
+++ /dev/null
@@ -1,87 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- *
- * Author :
- * Bertrand Guiheneuf <bertrand@helixcode.com>
- *
- * 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <unicode.h>
-#ifdef HAVE_NSS
-#include <nspr.h>
-#include <prthread.h>
-#include "nss.h" /* Don't use <> here or it will include the system nss.h instead */
-#include <ssl.h>
-#endif /* HAVE_NSS */
-
-#include "camel.h"
-
-gboolean camel_verbose_debug = FALSE;
-
-gint
-camel_init (const char *certdb_dir, gboolean nss_init)
-{
-#ifdef ENABLE_THREADS
-#ifdef G_THREADS_ENABLED
- /*g_thread_init (NULL);*/
-#else /* G_THREADS_ENABLED */
- g_warning ("Threads are not supported by your version of glib");
-#endif /* G_THREADS_ENABLED */
-#endif /* ENABLE_THREADS */
-
- if (getenv ("CAMEL_VERBOSE_DEBUG"))
- camel_verbose_debug = TRUE;
-
- unicode_init ();
-
-#ifdef HAVE_NSS
- if (nss_init) {
- PR_Init (PR_SYSTEM_THREAD, PR_PRIORITY_NORMAL, 10);
-
- if (NSS_Init (certdb_dir) == SECFailure) {
- g_warning ("Failed to initialize NSS");
- return -1;
- }
-
- NSS_SetDomesticPolicy ();
- }
-
- SSL_OptionSetDefault (SSL_ENABLE_SSL2, PR_TRUE);
- SSL_OptionSetDefault (SSL_ENABLE_SSL3, PR_TRUE);
- SSL_OptionSetDefault (SSL_ENABLE_TLS, PR_TRUE);
- SSL_OptionSetDefault (SSL_V2_COMPATIBLE_HELLO, PR_TRUE /* maybe? */);
-#endif /* HAVE_NSS */
-
- return 0;
-}
-
-void
-camel_shutdown (void)
-{
-#ifdef HAVE_NSS
- NSS_Shutdown ();
-
- PR_Cleanup ();
-#endif /* HAVE_NSS */
-}
diff --git a/camel/camel.h b/camel/camel.h
deleted file mode 100644
index cede192e66..0000000000
--- a/camel/camel.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- *
- * Author :
- * Bertrand Guiheneuf <bertrand@helixcode.com>
- *
- * 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 <camel/camel-data-wrapper.h>
-#include <camel/camel-exception.h>
-#include <camel/camel-folder.h>
-#include <camel/camel-medium.h>
-#include <camel/camel-mime-filter-basic.h>
-#include <camel/camel-mime-filter-charset.h>
-#include <camel/camel-mime-filter-index.h>
-#include <camel/camel-mime-filter-save.h>
-#include <camel/camel-mime-filter-crlf.h>
-#include <camel/camel-mime-filter.h>
-#include <camel/camel-mime-message.h>
-#include <camel/camel-mime-parser.h>
-#include <camel/camel-mime-part-utils.h>
-#include <camel/camel-mime-part.h>
-#include <camel/camel-mime-utils.h>
-#include <camel/camel-movemail.h>
-#include <camel/camel-multipart.h>
-#include <camel/camel-pgp-context.h>
-#include <camel/camel-pgp-mime.h>
-#include <camel/camel-provider.h>
-#include <camel/camel-seekable-stream.h>
-#include <camel/camel-seekable-substream.h>
-#include <camel/camel-service.h>
-#include <camel/camel-session.h>
-#include <camel/camel-store.h>
-#include <camel/camel-stream-buffer.h>
-#include <camel/camel-stream-filter.h>
-#include <camel/camel-stream-fs.h>
-#include <camel/camel-stream-mem.h>
-#include <camel/camel-stream.h>
-#include <camel/camel-tcp-stream-raw.h>
-#include <camel/camel-tcp-stream-ssl.h>
-#include <camel/camel-tcp-stream.h>
-#include <camel/camel-transport.h>
-#include <camel/camel-uid-cache.h>
-#include <camel/camel-url.h>
-#include <camel/gstring-util.h>
-#include <camel/hash-table-utils.h>
-#include <camel/string-utils.h>
-
-gint camel_init (const char *certdb_dir, gboolean nss_init);
-
-void camel_shutdown (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_H */
diff --git a/camel/devel-docs/camel_data_wrapper.dia b/camel/devel-docs/camel_data_wrapper.dia
deleted file mode 100644
index 301563d1ee..0000000000
--- a/camel/devel-docs/camel_data_wrapper.dia
+++ /dev/null
Binary files differ
diff --git a/camel/devel-docs/camel_parser_states.dia b/camel/devel-docs/camel_parser_states.dia
deleted file mode 100644
index 556a5b1c49..0000000000
--- a/camel/devel-docs/camel_parser_states.dia
+++ /dev/null
Binary files differ
diff --git a/camel/devel-docs/camel_stream.dia b/camel/devel-docs/camel_stream.dia
deleted file mode 100644
index d91d1bb153..0000000000
--- a/camel/devel-docs/camel_stream.dia
+++ /dev/null
Binary files differ
diff --git a/camel/gstring-util.c b/camel/gstring-util.c
deleted file mode 100644
index 82dde51236..0000000000
--- a/camel/gstring-util.c
+++ /dev/null
@@ -1,217 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* gstring-util : utilities for gstring object */
-
-/*
- *
- * Author :
- * Bertrand Guiheneuf <bertrand@helixcode.com>
- *
- * 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <string.h>
-#include "gstring-util.h"
-
-/**
- * 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 <bertrand@helixcode.com>
- *
- * 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 <glib.h>
-
-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 ca4323d638..0000000000
--- a/camel/hash-table-utils.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* generic utilities for hash tables */
-
-/*
- *
- * Author :
- * Bertrand Guiheneuf <bertrand@helixcode.com>
- *
- * 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 <ctype.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 79c4cef72d..0000000000
--- a/camel/hash-table-utils.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* generic utilities for hash tables */
-
-/*
- *
- * Author :
- * Bertrand Guiheneuf <bertrand@helixcode.com>
- *
- * 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 }*/
-
-#include <glib.h>
-
-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/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/Makefile.am b/camel/providers/Makefile.am
deleted file mode 100644
index 5fd7c83e50..0000000000
--- a/camel/providers/Makefile.am
+++ /dev/null
@@ -1,11 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-if ENABLE_NNTP
-NNTP_DIR=nntp
-endif
-
-# SUBDIRS = mbox pop3 sendmail smtp vee
-SUBDIRS = pop3 sendmail smtp imap $(NNTP_DIR) local
-
-# these ones are deprecated, and will no longer be maintained
-# mbox mh maildir vee \ No newline at end of file
diff --git a/camel/providers/cache/.cvsignore b/camel/providers/cache/.cvsignore
deleted file mode 100644
index 3fa8afaa38..0000000000
--- a/camel/providers/cache/.cvsignore
+++ /dev/null
@@ -1,11 +0,0 @@
-.deps
-Makefile
-Makefile.in
-.libs
-.deps
-*.lo
-*.la
-*.bb
-*.bbg
-*.da
-*.gcov
diff --git a/camel/providers/cache/Makefile.am b/camel/providers/cache/Makefile.am
deleted file mode 100644
index 7f9f6a9df5..0000000000
--- a/camel/providers/cache/Makefile.am
+++ /dev/null
@@ -1,35 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-SUBDIRS =
-
-libcamelcacheincludedir = $(includedir)/camel
-
-providerdir = $(pkglibdir)/camel-providers/$(VERSION)
-
-provider_LTLIBRARIES = libcamelcache.la
-provider_DATA = libcamelcache.urls
-
-INCLUDES = \
- -I.. \
- -I$(srcdir)/.. \
- -I$(srcdir)/../../.. \
- -I$(includedir) \
- -I$(top_srcdir)/intl \
- $(GTK_INCLUDEDIR) \
- -I$(top_srcdir)/camel \
- -DG_LOG_DOMAIN=\"camel-cache-provider\"
-
-libcamelcache_la_SOURCES = \
- camel-cache-folder.c \
- camel-cache-provider.c \
- camel-cache-store.c \
- camel-cache-map.c
-
-libcamelcacheinclude_HEADERS = \
- camel-cache-folder.h \
- camel-cache-store.h
-
-
-libcamelcache_la_LDFLAGS = -version-info 0:0:0
-
-EXTRA_DIST = libcamelcache.urls
diff --git a/camel/providers/cache/camel-cache-folder.c b/camel/providers/cache/camel-cache-folder.c
deleted file mode 100644
index c4379f8135..0000000000
--- a/camel/providers/cache/camel-cache-folder.c
+++ /dev/null
@@ -1,810 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-cache-folder.c : class for a cache folder */
-
-/*
- * Authors:
- * Dan Winship <danw@helixcode.com>
- *
- * 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
- */
-
-
-/*
- * Notes on the cache provider:
- *
- * We require that the remote folder have persistent UIDs, and nothing
- * else. We require that the local store folder have persistent UIDs
- * and summary capability.
- *
- * If the remote folder does not have summary capability, we will need
- * to sync any new messages over to the local folder when the folder
- * is opened or when it changes. If the remote folder does have
- * summary capability, we can be more relaxed about doing this.
- *
- * If the remote folder has search capability, we will use it, at
- * least when the folder isn't synced. Otherwise if the local folder
- * has search capability, we will use that (but it will require
- * syncing the remote folder locally to use). Otherwise the cache
- * folder won't have search capability.
- *
- * CamelCacheFolder UIDs are remote UIDs, because we need to be able
- * to return a complete list of them at get_uids time, and the
- * messages might not all be present in the local folder, and we can't
- * predict what UIDs will be assigned to them when they are cached
- * there. We keep hash tables mapping remote to local UIDs and vice
- * versa, and a map file to cache this information between sessions.
- * The maps must always be 100% accurate.
- *
- * The messages in the local folder may not be in the same order as
- * the messages in the remote folder.
- *
- *
- * Many operations on the local folder are done with a NULL
- * CamelException, because having them fail only results in efficiency
- * problems, not actual permanent failures. (Eg, get_message will
- * try to append the message to the local folder, but doesn't check
- * for failure, because it already has the message to pass back to the
- * user.)
- */
-
-#include "camel-cache-folder.h"
-#include "camel-cache-store.h"
-#include <camel/camel-exception.h>
-#include <camel/camel-medium.h>
-
-#define CF_CLASS(so) CAMEL_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-static CamelFolderClass *folder_class = NULL;
-
-static void init (CamelFolder *folder, CamelStore *parent_store,
- CamelFolder *parent_folder, const gchar *name,
- gchar *separator, gboolean path_begins_with_sep,
- CamelException *ex);
-
-static void refresh_info (CamelFolder *folder, CamelException *ex);
-
-static void cache_sync (CamelFolder *folder, gboolean expunge,
- CamelException *ex);
-
-static void expunge (CamelFolder *folder, CamelException *ex);
-
-static gint get_message_count (CamelFolder *folder);
-
-static void append_message (CamelFolder *folder, CamelMimeMessage *message,
- const CamelMessageInfo *info, CamelException *ex);
-
-static guint32 get_message_flags (CamelFolder *folder, const char *uid);
-static void set_message_flags (CamelFolder *folder, const char *uid,
- guint32 flags, guint32 set);
-static gboolean get_message_user_flag (CamelFolder *folder, const char *uid,
- const char *name);
-static void set_message_user_flag (CamelFolder *folder, const char *uid,
- const char *name, gboolean value);
-static const char *get_message_user_tag (CamelFolder *folder, const char *uid,
- const char *name);
-static void set_message_user_tag (CamelFolder *folder, const char *uid,
- const char *name, const char *value);
-
-static CamelMimeMessage *get_message (CamelFolder *folder,
- const gchar *uid,
- CamelException *ex);
-
-static GPtrArray *get_uids (CamelFolder *folder);
-static GPtrArray *get_summary (CamelFolder *folder);
-static GPtrArray *get_subfolder_names (CamelFolder *folder);
-static void free_subfolder_names (CamelFolder *folder, GPtrArray *subfolders);
-
-static GPtrArray *search_by_expression (CamelFolder *folder,
- const char *expression,
- CamelException *ex);
-
-static const CamelMessageInfo *get_message_info (CamelFolder *folder,
- const char *uid);
-
-static void copy_message_to (CamelFolder *source, const char *uid,
- CamelFolder *destination, CamelException *ex);
-
-static void move_message_to (CamelFolder *source, const char *uid,
- CamelFolder *destination, CamelException *ex);
-
-static void finalize (CamelObject *object);
-
-static void
-camel_cache_folder_class_init (CamelCacheFolderClass *camel_cache_folder_class)
-{
- CamelFolderClass *camel_folder_class =
- CAMEL_FOLDER_CLASS (camel_cache_folder_class);
-
- folder_class = CAMEL_FOLDER_CLASS (camel_type_get_global_classfuncs (camel_folder_get_type ()));
-
- /* virtual method overload */
- camel_folder_class->init = init;
- camel_folder_class->refresh_info = refresh_info;
- camel_folder_class->sync = cache_sync;
- 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_message_flags = get_message_flags;
- camel_folder_class->set_message_flags = set_message_flags;
- camel_folder_class->get_message_user_flag = get_message_user_flag;
- camel_folder_class->set_message_user_flag = set_message_user_flag;
- camel_folder_class->get_message_user_tag = get_message_user_tag;
- camel_folder_class->set_message_user_tag = set_message_user_tag;
- camel_folder_class->get_message = get_message;
- camel_folder_class->get_uids = get_uids;
- camel_folder_class->free_uids = camel_folder_free_nop;
- camel_folder_class->get_summary = get_summary;
- camel_folder_class->free_summary = camel_folder_free_nop;
- camel_folder_class->get_subfolder_names = get_subfolder_names;
- camel_folder_class->free_subfolder_names = free_subfolder_names;
- camel_folder_class->search_by_expression = search_by_expression;
- camel_folder_class->get_message_info = get_message_info;
- camel_folder_class->copy_message_to = copy_message_to;
- camel_folder_class->move_message_to = move_message_to;
-}
-
-CamelType
-camel_cache_folder_get_type (void)
-{
- static CamelType camel_cache_folder_type = CAMEL_INVALID_TYPE;
-
- if (camel_cache_folder_type == CAMEL_INVALID_TYPE) {
- camel_cache_folder_type = camel_type_register (
- CAMEL_FOLDER_TYPE, "CamelCacheFolder",
- sizeof (CamelCacheFolder),
- sizeof (CamelCacheFolderClass),
- (CamelObjectClassInitFunc) camel_cache_folder_class_init,
- NULL,
- NULL,
- (CamelObjectFinalizeFunc) finalize);
- }
-
- return camel_cache_folder_type;
-}
-
-
-static void
-cache_free_summary (CamelCacheFolder *cache_folder)
-{
- if (cache_folder->remote_summary) {
- camel_folder_free_summary (cache_folder->remote,
- cache_folder->summary);
- } else {
- int i;
-
- for (i = 0; i < cache_folder->summary->len; i++) {
- camel_message_info_free (
- cache_folder->summary->pdata[i]);
- }
- g_ptr_array_free (cache_folder->summary, TRUE);
- g_hash_table_destroy (cache_folder->summary_uids);
- }
-}
-
-static void
-finalize (CamelObject *object)
-{
- CamelCacheFolder *cache_folder = CAMEL_CACHE_FOLDER (object);
-
- if (cache_folder->uids) {
- camel_folder_free_uids (cache_folder->remote,
- cache_folder->uids);
- }
- if (cache_folder->summary)
- cache_free_summary (cache_folder);
-
- if (cache_folder->uidmap)
- camel_cache_map_destroy (cache_folder->uidmap);
-
- camel_object_unref (CAMEL_OBJECT (cache_folder->local));
- camel_object_unref (CAMEL_OBJECT (cache_folder->remote));
-
- g_free (cache_folder->mapfile);
-}
-
-
-static void
-update (CamelCacheFolder *cache_folder, CamelException *ex)
-{
- if (cache_folder->uids) {
- camel_folder_free_uids (cache_folder->remote,
- cache_folder->uids);
- }
- cache_folder->uids = camel_folder_get_uids (cache_folder->remote);
-
- if (cache_folder->summary)
- cache_free_summary (cache_folder);
-
- if (cache_folder->remote_summary) {
- cache_folder->summary =
- camel_folder_get_summary (cache_folder->remote);
- } else {
- CamelMessageInfo *mi;
- GPtrArray *lsummary;
- const char *ruid;
- int i;
-
- if (!cache_folder->is_synced) {
- camel_cache_folder_sync (cache_folder, ex);
- if (camel_exception_is_set (ex))
- return;
- }
-
- cache_folder->summary = g_ptr_array_new ();
- cache_folder->summary_uids = g_hash_table_new (g_str_hash,
- g_str_equal);
-
- lsummary = camel_folder_get_summary (cache_folder->local);
-
- /* For each local message, duplicate its info, replace
- * the uid with the remote one, and add it to the
- * uid->info cache.
- */
- for (i = 0; i < lsummary->len; i++) {
- mi = lsummary->pdata[i];
- ruid = camel_cache_map_get_remote (cache_folder->uidmap, mi->uid);
- if (!ruid) {
- /* Stale message. Delete it from cache. */
- camel_folder_delete_message (
- cache_folder->local, mi->uid);
- continue;
- }
-
- mi = g_new (CamelMessageInfo, 1);
- camel_message_info_dup_to (lsummary->pdata[i], mi);
- g_free (mi->uid);
- mi->uid = g_strdup (ruid);
- g_hash_table_insert (cache_folder->summary_uids,
- mi->uid, mi);
- }
- camel_folder_free_summary (cache_folder->local, lsummary);
-
- /* Now build the summary array in remote UID order. */
- for (i = 0; i < cache_folder->uids->len; i++) {
- mi = g_hash_table_lookup (cache_folder->summary_uids,
- cache_folder->uids->pdata[i]);
- g_ptr_array_add (cache_folder->summary, mi);
- }
- }
-
-}
-
-static void
-init (CamelFolder *folder, CamelStore *parent_store,
- CamelFolder *parent_folder, const gchar *name, gchar *separator,
- gboolean path_begins_with_sep, CamelException *ex)
-{
- CamelCacheFolder *cache_folder = (CamelCacheFolder *)folder;
- char *path;
-
- CF_CLASS (folder)->init (folder, parent_store, parent_folder,
- name, separator, path_begins_with_sep, ex);
- if (camel_exception_is_set (ex))
- return;
-
- folder->permanent_flags =
- camel_folder_get_permanent_flags (cache_folder->local);
- folder->can_hold_folders = cache_folder->remote->can_hold_folders;
- folder->can_hold_messages = cache_folder->remote->can_hold_messages;
- folder->has_summary_capability = TRUE;
- folder->has_search_capability =
- camel_folder_has_search_capability (cache_folder->local) ||
- camel_folder_has_search_capability (cache_folder->remote);
-
- cache_folder->remote_summary =
- camel_folder_has_summary_capability (cache_folder->remote);
-
- /* Load UIDs, summary, etc. */
- path = CAMEL_SERVICE (cache_folder->local->parent_store)->url->path;
- cache_folder->mapfile = g_strdup_printf ("%s/%s.map", path, name);
- cache_folder->uidmap = camel_cache_map_new ();
- camel_cache_map_read (cache_folder->uidmap, cache_folder->mapfile, ex);
- if (camel_exception_is_set (ex))
- return;
- update (cache_folder, ex);
-
- return;
-}
-
-/* If the remote folder changes, cache the new messages if necessary,
- * update the summary, and propagate the signal.
- */
-static void
-remote_folder_changed (CamelObject *remote_folder, gpointer type,
- gpointer user_data)
-{
- CamelCacheFolder *cache_folder = user_data;
-
- update (cache_folder, NULL);
- camel_object_trigger_event (CAMEL_OBJECT (cache_folder),
- "folder_changed", type);
-}
-
-/* If the local folder changes, it's because we just cached a message
- * or expunged messages. Look for new messages and update the UID maps.
- */
-static void
-local_folder_changed (CamelObject *local, gpointer type, gpointer data)
-{
- CamelFolder *local_folder = CAMEL_FOLDER (local);
- CamelCacheFolder *cache_folder = data;
- CamelMimeMessage *msg;
- GPtrArray *new_luids;
- char *luid;
- const char *ruid;
- int i;
-
- /* Get the updated list of local UIDs. For any that we didn't
- * already know about, figure out the corresponding remote
- * UID.
- */
- new_luids = camel_folder_get_uids (local_folder);
- for (i = 0; i < new_luids->len; i++) {
- luid = new_luids->pdata[i];
- if (!camel_cache_map_get_remote (cache_folder->uidmap, luid)) {
- msg = camel_folder_get_message (local_folder,
- luid, NULL);
- if (!msg)
- continue; /* Hrmph. */
- ruid = camel_medium_get_header (CAMEL_MEDIUM (msg),
- "X-Evolution-Remote-UID");
- if (!ruid) {
- /* How'd that get here? */
- camel_folder_delete_message (local_folder,
- luid);
- continue;
- }
-
- camel_cache_map_update (cache_folder->uidmap,
- luid, ruid);
- }
- }
- camel_folder_free_uids (local_folder, new_luids);
-
- /* FIXME: the uidmaps contain bad data now. */
-}
-
-/* DONE */
-static void
-refresh_info (CamelFolder *folder, CamelException *ex)
-{
- CamelCacheFolder *cache_folder = (CamelCacheFolder *)folder;
-
- camel_folder_refresh_info (cache_folder->remote, ex);
-}
-
-/* DONE */
-static void
-cache_sync (CamelFolder *folder, gboolean expunge, CamelException *ex)
-{
- CamelCacheFolder *cache_folder = (CamelCacheFolder *)folder;
-
- camel_folder_sync (cache_folder->remote, expunge, ex);
- if (!camel_exception_is_set (ex)) {
- camel_folder_sync (cache_folder->local, expunge, NULL);
- camel_cache_map_write (cache_folder->uidmap,
- cache_folder->mapfile, ex);
- }
-}
-
-/* DONE */
-static void
-expunge (CamelFolder *folder, CamelException *ex)
-{
- CamelCacheFolder *cache_folder = (CamelCacheFolder *)folder;
-
- camel_folder_expunge (cache_folder->remote, ex);
- if (!camel_exception_is_set (ex))
- camel_folder_expunge (cache_folder->local, NULL);
-}
-
-/* DONE */
-static gint
-get_message_count (CamelFolder *folder)
-{
- CamelCacheFolder *cache_folder = (CamelCacheFolder *)folder;
-
- return cache_folder->summary->len;
-}
-
-/* DONE */
-static void
-append_message (CamelFolder *folder, CamelMimeMessage *message,
- const CamelMessageInfo *info, CamelException *ex)
-{
- CamelCacheFolder *cache_folder = (CamelCacheFolder *)folder;
-
- /* We'd like to cache this locally as well, but we have no
- * 100% reliable way to determine the UID assigned to the
- * remote message, so we can't.
- */
- camel_folder_append_message (cache_folder->remote, message, info, ex);
-}
-
-/* DONE */
-static guint32
-get_message_flags (CamelFolder *folder, const char *uid)
-{
- const CamelMessageInfo *mi;
-
- mi = get_message_info (folder, uid);
- g_return_val_if_fail (mi != NULL, 0);
- return mi->flags;
-}
-
-/* DONE */
-static void
-set_message_flags (CamelFolder *folder, const char *uid,
- guint32 flags, guint32 set)
-{
- CamelCacheFolder *cache_folder = (CamelCacheFolder *)folder;
- const char *luid;
-
- luid = camel_cache_map_get_local (cache_folder->uidmap, uid);
- if (luid) {
- camel_folder_set_message_flags (cache_folder->local, luid,
- flags, set);
- }
- camel_folder_set_message_flags (cache_folder->remote, uid, flags, set);
-}
-
-/* DONE */
-static gboolean
-get_message_user_flag (CamelFolder *folder, const char *uid, const char *name)
-{
- const CamelMessageInfo *mi;
-
- mi = get_message_info (folder, uid);
- g_return_val_if_fail (mi != NULL, 0);
- return camel_flag_get ((CamelFlag **)&mi->user_flags, name);
-}
-
-/* DONE */
-static void
-set_message_user_flag (CamelFolder *folder, const char *uid,
- const char *name, gboolean value)
-{
- CamelCacheFolder *cache_folder = (CamelCacheFolder *)folder;
- const char *luid;
-
- luid = camel_cache_map_get_local (cache_folder->uidmap, uid);
- if (luid) {
- camel_folder_set_message_user_flag (cache_folder->local, luid,
- name, value);
- }
- camel_folder_set_message_user_flag (cache_folder->remote, uid,
- name, value);
-}
-
-
-/* DONE */
-static const char *
-get_message_user_tag (CamelFolder *folder, const char *uid, const char *name)
-{
- const CamelMessageInfo *mi;
-
- mi = get_message_info (folder, uid);
- g_return_val_if_fail (mi != NULL, NULL);
- return camel_tag_get ((CamelTag **)&mi->user_tags, name);
-}
-
-/* DONE */
-static void
-set_message_user_tag (CamelFolder *folder, const char *uid,
- const char *name, const char *value)
-{
- CamelCacheFolder *cache_folder = (CamelCacheFolder *)folder;
- const char *luid;
-
- luid = camel_cache_map_get_local (cache_folder->uidmap, uid);
- if (luid) {
- camel_folder_set_message_user_tag (cache_folder->local, luid,
- name, value);
- }
- camel_folder_set_message_user_tag (cache_folder->remote, uid,
- name, value);
-}
-
-
-/* DONE */
-static CamelMimeMessage *
-get_message (CamelFolder *folder, const gchar *uid, CamelException *ex)
-{
- CamelCacheFolder *cache_folder = (CamelCacheFolder *)folder;
- CamelMimeMessage *msg;
- const CamelMessageInfo *info;
- const char *luid;
-
- /* Check if we have it cached first. */
- luid = camel_cache_map_get_local (cache_folder->uidmap, uid);
- if (luid) {
- msg = camel_folder_get_message (cache_folder->local,
- luid, NULL);
- if (msg)
- return msg;
-
- /* Hm... Oh well. Update the map and try for real. */
- camel_cache_map_remove (cache_folder->uidmap, NULL, uid);
- }
-
- /* OK. It's not cached. Get the remote message. */
- msg = camel_folder_get_message (cache_folder->remote, uid, ex);
- if (!msg)
- return NULL;
- info = camel_folder_get_message_info (cache_folder->remote, uid);
-
- /* Add a header giving the remote UID and append it to the
- * local folder. (This should eventually invoke
- * local_folder_changed(), which will take care of updating
- * the uidmaps.)
- */
- camel_medium_add_header (CAMEL_MEDIUM (msg), "X-Evolution-Remote-UID",
- uid);
- camel_folder_append_message (cache_folder->local, msg, info, NULL);
-
- return msg;
-}
-
-/* DONE */
-static GPtrArray *
-get_uids (CamelFolder *folder)
-{
- CamelCacheFolder *cache_folder = (CamelCacheFolder *)folder;
-
- return cache_folder->uids;
-}
-
-/* DONE */
-static GPtrArray *
-get_summary (CamelFolder *folder)
-{
- CamelCacheFolder *cache_folder = (CamelCacheFolder *)folder;
-
- return cache_folder->summary;
-}
-
-/* DONE */
-static GPtrArray *
-get_subfolder_names (CamelFolder *folder)
-{
- CamelCacheFolder *cache_folder = (CamelCacheFolder *)folder;
-
- return camel_folder_get_subfolder_names (cache_folder->remote);
-}
-
-/* DONE */
-static void
-free_subfolder_names (CamelFolder *folder, GPtrArray *subfolders)
-{
- CamelCacheFolder *cache_folder = (CamelCacheFolder *)folder;
-
- camel_folder_free_subfolder_names (cache_folder->remote, subfolders);
-}
-
-/* DONE */
-static GPtrArray *
-search_by_expression (CamelFolder *folder, const char *expression,
- CamelException *ex)
-{
- CamelCacheFolder *cache_folder = (CamelCacheFolder *)folder;
-
- /* Search on the remote folder if we're not synced. */
- if (!cache_folder->is_synced &&
- camel_folder_has_search_capability (cache_folder->remote)) {
- return camel_folder_search_by_expression (cache_folder->remote,
- expression, ex);
- } else {
- GPtrArray *matches;
- const char *ruid;
- int i;
-
- if (!cache_folder->is_synced)
- camel_cache_folder_sync (cache_folder, ex);
- if (camel_exception_is_set (ex))
- return NULL;
- matches = search_by_expression (cache_folder->local,
- expression, ex);
- if (camel_exception_is_set (ex))
- return NULL;
-
- /* Convert local uids to remote. */
- for (i = 0; i < matches->len; i++) {
- ruid = camel_cache_map_get_remote (cache_folder->uidmap,
- matches->pdata[i]);
- g_free (matches->pdata[i]);
- matches->pdata[i] = g_strdup (ruid);
- }
-
- return matches;
- }
-}
-
-/* DONE */
-static const CamelMessageInfo *
-get_message_info (CamelFolder *folder, const char *uid)
-{
- CamelCacheFolder *cache_folder = (CamelCacheFolder *)folder;
-
- if (cache_folder->remote_summary) {
- return camel_folder_get_message_info (cache_folder->remote,
- uid);
- } else
- return g_hash_table_lookup (cache_folder->summary_uids, uid);
-}
-
-/* DONE */
-static void
-copy_message_to (CamelFolder *source, const char *uid,
- CamelFolder *destination, CamelException *ex)
-{
- CamelCacheFolder *source_cache_folder = (CamelCacheFolder *)source;
- CamelCacheFolder *dest_cache_folder = (CamelCacheFolder *)destination;
-
- /* If we are here, we know that the folders have the same parent
- * store, which implies their remote and local folders have the
- * same parent store as well.
- */
-
- if (CF_CLASS (source_cache_folder->remote)->copy_message_to !=
- folder_class->copy_message_to) {
- /* The remote store has a non-default copy method, so
- * use it to avoid unnecessary network traffic.
- */
- CF_CLASS (source_cache_folder->remote)->copy_message_to (
- source_cache_folder->remote, uid,
- dest_cache_folder->remote, ex);
- } else {
- /* The remote store uses the default copy method,
- * meaning if we proxy the copy_message_to over to it,
- * it will suck the message over the network. We may
- * already have a local copy, and if we don't, we want
- * to, and if we're going to have the message in
- * memory, then we should get it into the destination
- * cache too. So do this by hand.
- */
- CamelMimeMessage *msg;
- const CamelMessageInfo *info;
-
- msg = get_message (source, uid, ex);
- if (camel_exception_is_set (ex))
- return;
- info = camel_folder_get_message_info (source, uid);
-
- camel_medium_remove_header (CAMEL_MEDIUM (msg),
- "X-Evolution-Remote-UID");
- append_message (destination, msg, info, ex);
- }
-}
-
-/* DONE */
-static void
-move_message_to (CamelFolder *source, const char *uid,
- CamelFolder *destination, CamelException *ex)
-{
- CamelCacheFolder *source_cache_folder = (CamelCacheFolder *)source;
- CamelCacheFolder *dest_cache_folder = (CamelCacheFolder *)destination;
-
- /* See comments in copy_message_to. */
-
- if (CF_CLASS (source_cache_folder)->move_message_to !=
- folder_class->move_message_to) {
- CF_CLASS (source_cache_folder)->move_message_to (
- source_cache_folder->remote, uid,
- dest_cache_folder->remote, ex);
- } else {
- CamelMimeMessage *msg;
- const CamelMessageInfo *info;
-
- msg = get_message (source, uid, ex);
- if (camel_exception_is_set (ex))
- return;
- info = camel_folder_get_message_info (source, uid);
-
- camel_medium_remove_header (CAMEL_MEDIUM (msg),
- "X-Evolution-Remote-UID");
- append_message (destination, msg, info, ex);
- if (!camel_exception_is_set (ex))
- camel_folder_delete_message (source, uid);
- }
-}
-
-
-CamelFolder *
-camel_cache_folder_new (CamelStore *store, CamelFolder *parent,
- CamelFolder *remote, CamelFolder *local,
- CamelException *ex)
-{
- CamelCacheFolder *cache_folder;
- CamelFolder *folder;
-
- cache_folder = CAMEL_CACHE_FOLDER (camel_object_new (CAMEL_CACHE_FOLDER_TYPE));
- folder = (CamelFolder *)cache_folder;
-
- cache_folder->local = local;
- camel_object_ref (CAMEL_OBJECT (local));
- camel_object_hook_event (CAMEL_OBJECT (local), "folder_changed",
- local_folder_changed, cache_folder);
-
- cache_folder->remote = remote;
- camel_object_ref (CAMEL_OBJECT (remote));
- camel_object_hook_event (CAMEL_OBJECT (remote), "folder_changed",
- remote_folder_changed, cache_folder);
-
- /* XXX */
-
- return folder;
-}
-
-void
-camel_cache_folder_sync (CamelCacheFolder *cache_folder, CamelException *ex)
-{
- CamelMimeMessage *msg;
- const char *ruid, *luid;
- int lsize, i;
- const CamelMessageInfo *info;
-
- lsize = camel_folder_get_message_count (cache_folder->local);
-
- camel_folder_freeze (cache_folder->local);
- for (i = 0; i < cache_folder->uids->len; i++) {
- ruid = cache_folder->uids->pdata[i];
- luid = camel_cache_map_get_local (cache_folder->uidmap, ruid);
-
- /* Don't re-copy messages we already have. */
- if (luid &&
- camel_folder_get_message_info (cache_folder->local, luid))
- continue;
-
- msg = camel_folder_get_message (cache_folder->remote,
- ruid, ex);
- if (camel_exception_is_set (ex))
- return;
- info = camel_folder_get_message_info (cache_folder->remote,
- ruid);
-
- camel_medium_add_header (CAMEL_MEDIUM (msg),
- "X-Evolution-Remote-UID", ruid);
- camel_folder_append_message (cache_folder->local, msg,
- info, ex);
- if (camel_exception_is_set (ex))
- return;
- }
- camel_folder_thaw (cache_folder->local);
-}
-
-static void
-get_mappings (CamelCacheFolder *cache_folder, int first, CamelException *ex)
-{
- GPtrArray *uids;
- CamelMimeMessage *msg;
- const char *ruid;
- int i;
-
- uids = camel_folder_get_uids (cache_folder->local);
- for (i = first; i < uids->len; i++) {
- msg = camel_folder_get_message (cache_folder->local,
- uids->pdata[i], ex);
- if (!msg)
- break;
- ruid = camel_medium_get_header (CAMEL_MEDIUM (msg),
- "X-Evolution-Remote-UID");
-
- camel_cache_map_add (cache_folder->uidmap,
- uids->pdata[i], ruid);
- }
- camel_folder_free_uids (cache_folder->local, uids);
-}
diff --git a/camel/providers/cache/camel-cache-folder.h b/camel/providers/cache/camel-cache-folder.h
deleted file mode 100644
index 2495f133b3..0000000000
--- a/camel/providers/cache/camel-cache-folder.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-cache-folder.h: Class for a cache folder */
-
-/*
- * Author:
- * Dan Winship <danw@helixcode.com>
- *
- * 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_CACHE_FOLDER_H
-#define CAMEL_CACHE_FOLDER_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include <camel/camel-folder.h>
-#include "camel-cache-map.h"
-
-#define CAMEL_CACHE_FOLDER_TYPE (camel_cache_folder_get_type ())
-#define CAMEL_CACHE_FOLDER(obj) (CAMEL_CHECK_CAST((obj), CAMEL_CACHE_FOLDER_TYPE, CamelCacheFolder))
-#define CAMEL_CACHE_FOLDER_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_CACHE_FOLDER_TYPE, CamelCacheFolderClass))
-#define CAMEL_IS_CACHE_FOLDER(o) (CAMEL_CHECK_TYPE((o), CAMEL_CACHE_FOLDER_TYPE))
-
-
-typedef struct {
- CamelFolder parent_object;
-
- /* Remote and local folders */
- CamelFolder *remote, *local;
-
- /* Remote UIDs, in order, summary, and uid->info map if
- * summary is from local info.
- */
- GPtrArray *uids, *summary;
- GHashTable *summary_uids;
-
- /* UID map */
- CamelCacheMap *uidmap;
- char *mapfile;
-
- /* Is the summary remote? Is the folder known to be synced? */
- gboolean remote_summary, is_synced;
-
-} CamelCacheFolder;
-
-
-
-typedef struct {
- CamelFolderClass parent_class;
-
- /* Virtual methods */
-
-} CamelCacheFolderClass;
-
-
-CamelFolder *camel_cache_folder_new (CamelStore *store, CamelFolder *parent,
- CamelFolder *remote, CamelFolder *local,
- CamelException *ex);
-
-void camel_cache_folder_sync (CamelCacheFolder *cache_folder,
- CamelException *ex);
-
-/* Standard Camel function */
-CamelType camel_cache_folder_get_type (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_CACHE_FOLDER_H */
diff --git a/camel/providers/cache/camel-cache-map.c b/camel/providers/cache/camel-cache-map.c
deleted file mode 100644
index a826dfe157..0000000000
--- a/camel/providers/cache/camel-cache-map.c
+++ /dev/null
@@ -1,259 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-cache-map.c : functions for a local<->remote uid map */
-
-/*
- * Authors:
- * Dan Winship <danw@helixcode.com>
- *
- * 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <errno.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <string.h>
-#include <sys/stat.h>
-#include <unistd.h>
-
-#include "camel-cache-map.h"
-#include <camel/camel-exception.h>
-
-/**
- * camel_cache_map_new:
- *
- * Return value: a new CamelCacheMap
- **/
-CamelCacheMap *
-camel_cache_map_new (void)
-{
- CamelCacheMap *map = g_new (CamelCacheMap, 1);
-
- map->l2r = g_hash_table_new (g_str_hash, g_str_equal);
- map->r2l = g_hash_table_new (g_str_hash, g_str_equal);
-
- return map;
-}
-
-static void
-free_mapping (gpointer key, gpointer value, gpointer data)
-{
- g_free (key);
- g_free (data);
-}
-
-/**
- * camel_cache_map_destroy:
- * @map: a CamelCacheMap
- *
- * Frees @map and all of the data stored in it.
- **/
-void
-camel_cache_map_destroy (CamelCacheMap *map)
-{
- g_hash_table_foreach (map->l2r, free_mapping, NULL);
- g_hash_table_destroy (map->l2r);
- g_hash_table_destroy (map->r2l);
- g_free (map);
-}
-
-/**
- * camel_cache_map_add:
- * @map: a CamelCacheMap
- * @luid: the local uid
- * @ruid: the remote uid
- *
- * Adds a mapping between @luid and @ruid. If either already exists
- * in the map, this may leak memory and result in incorrect map entries.
- * Use camel_cache_map_update() in that case instead.
- **/
-void
-camel_cache_map_add (CamelCacheMap *map, const char *luid, const char *ruid)
-{
- char *map_luid = g_strdup (luid);
- char *map_ruid = g_strdup (ruid);
-
- g_hash_table_insert (map->l2r, map_luid, map_ruid);
- g_hash_table_insert (map->r2l, map_ruid, map_luid);
-}
-
-/**
- * camel_cache_map_remove:
- * @map: a CamelCacheMap
- * @luid: the local uid
- * @ruid: the remote uid
- *
- * Removes the mapping between @luid and @ruid. Either (but not both)
- * of the uids can be %NULL if they are not both known.
- **/
-void
-camel_cache_map_remove (CamelCacheMap *map, const char *luid, const char *ruid)
-{
- gpointer map_luid, map_ruid;
-
- if ((luid && g_hash_table_lookup_extended (map->l2r, luid,
- &map_luid, &map_ruid)) ||
- (ruid && g_hash_table_lookup_extended (map->r2l, ruid,
- &map_luid, &map_ruid))) {
- g_hash_table_remove (map->l2r, map_luid);
- g_hash_table_remove (map->r2l, map_ruid);
- g_free (map_luid);
- g_free (map_ruid);
- }
-}
-
-/**
- * camel_cache_map_update:
- * @map: a CamelCacheMap
- * @luid: the local uid
- * @ruid: the remote uid
- *
- * Updates the mappings to associate @luid with @ruid, clearing any
- * previous mappings for both of them.
- **/
-void
-camel_cache_map_update (CamelCacheMap *map, const char *luid, const char *ruid)
-{
- camel_cache_map_remove (map, luid, ruid);
- camel_cache_map_add (map, luid, ruid);
-}
-
-/**
- * camel_cache_map_get_local
- * @map: a CamelCacheMap
- * @ruid: the remote uid
- *
- * Return value: the corresponding local uid, or %NULL
- **/
-const char *
-camel_cache_map_get_local (CamelCacheMap *map, const char *ruid)
-{
- return g_hash_table_lookup (map->r2l, ruid);
-}
-
-/**
- * camel_cache_map_get_remote
- * @map: a CamelCacheMap
- * @luid: the local uid
- *
- * Return value: the corresponding remote uid, or %NULL
- **/
-const char *
-camel_cache_map_get_remote (CamelCacheMap *map, const char *luid)
-{
- return g_hash_table_lookup (map->l2r, luid);
-}
-
-
-
-static void
-write_mapping (gpointer key, gpointer value, gpointer user_data)
-{
- int fd = *(int *)user_data;
-
- /* FIXME: We assume the local UID has no ':'s in it. */
- write (fd, key, strlen (key));
- write (fd, ":", 1);
- write (fd, value, strlen (value));
- write (fd, "\n", 1);
-}
-
-/**
- * camel_cache_map_write:
- * @map: a CamelCacheMap
- * @file: the filename to write the map to
- * @ex: a CamelException
- *
- * Writes @map out to @file, setting @ex if something goes wrong.
- **/
-void
-camel_cache_map_write (CamelCacheMap *map, const char *file,
- CamelException *ex)
-{
- int fd;
- char *tmpfile;
-
- tmpfile = g_strdup_printf ("%s~", file);
- fd = open (tmpfile, O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR);
- if (fd == -1) {
- g_free (tmpfile);
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not create cache map file: %s"),
- g_strerror (errno));
- return;
- }
-
- g_hash_table_foreach (map->l2r, write_mapping, &fd);
-
- if (close (fd) == -1 ||
- rename (tmpfile, file) == -1) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not save cache map file: %s"),
- g_strerror (errno));
- unlink (tmpfile);
- }
- g_free (tmpfile);
-}
-
-/**
- * camel_cache_map_read:
- * @map: a CamelCacheMap
- * @file: the filename to read the map from
- * @ex: a CamelException
- *
- * Reads @map from @file, setting @ex if something goes wrong. @map
- * should be a freshly-created CamelCacheMap.
- **/
-void
-camel_cache_map_read (CamelCacheMap *map, const char *file, CamelException *ex)
-{
- FILE *f;
- char buf[1024], *p, *q;
-
- /* FIXME: lazy implementation. We could make this work with
- * lines longer than 1024 chars. :)
- */
-
- f = fopen (file, "r");
- if (!f) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not open cache map file: %s"),
- g_strerror (errno));
- return;
- }
-
- while (fgets (buf, sizeof (buf), f)) {
- p = strchr (buf, ':');
- if (p)
- q = strchr (buf, '\n');
- if (!p || !q) {
- camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Bad cache file."));
- return;
- }
- *p++ = *q = '\0';
-
- /* Local uid at buf, remote at p. */
- camel_cache_map_add (map, buf, p);
- }
-
- fclose (f);
-}
diff --git a/camel/providers/cache/camel-cache-map.h b/camel/providers/cache/camel-cache-map.h
deleted file mode 100644
index a15c9afe1a..0000000000
--- a/camel/providers/cache/camel-cache-map.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-cache-map.h: functions for dealing with UID maps */
-
-/*
- * Author:
- * Dan Winship <danw@helixcode.com>
- *
- * 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_CACHE_MAP_H
-#define CAMEL_CACHE_MAP_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include <glib.h>
-#include <camel/camel-types.h>
-
-typedef struct {
- GHashTable *l2r, *r2l;
-} CamelCacheMap;
-
-CamelCacheMap *camel_cache_map_new (void);
-void camel_cache_map_destroy (CamelCacheMap *map);
-
-void camel_cache_map_add (CamelCacheMap *map, const char *luid,
- const char *ruid);
-void camel_cache_map_remove (CamelCacheMap *map, const char *luid,
- const char *ruid);
-void camel_cache_map_update (CamelCacheMap *map, const char *luid,
- const char *ruid);
-
-const char *camel_cache_map_get_local (CamelCacheMap *map, const char *ruid);
-const char *camel_cache_map_get_remote (CamelCacheMap *map, const char *luid);
-
-void camel_cache_map_write (CamelCacheMap *map, const char *file,
- CamelException *ex);
-void camel_cache_map_read (CamelCacheMap *map, const char *file,
- CamelException *ex);
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_CACHE_MAP_H */
diff --git a/camel/providers/cache/camel-cache-provider.c b/camel/providers/cache/camel-cache-provider.c
deleted file mode 100644
index ac2f329d7c..0000000000
--- a/camel/providers/cache/camel-cache-provider.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-cache-provider.c: cache provider registration code */
-
-/*
- * Authors :
- * Dan Winship <danw@helixcode.com>
- *
- * 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "camel-cache-store.h"
-#include "camel-provider.h"
-#include "camel-session.h"
-
-static CamelProvider cache_provider = {
- "cache",
- "Cache",
-
- "For caching remote mail into a local store.",
-
- "cache",
-
- 0,
-
- { 0, 0 }
-};
-
-void
-camel_provider_module_init (CamelSession *session)
-{
- cache_provider.object_types[CAMEL_PROVIDER_STORE] =
- camel_cache_store_get_type();
-
- camel_session_register_provider (session, &cache_provider);
-}
diff --git a/camel/providers/cache/camel-cache-store.c b/camel/providers/cache/camel-cache-store.c
deleted file mode 100644
index ae076e47d2..0000000000
--- a/camel/providers/cache/camel-cache-store.c
+++ /dev/null
@@ -1,299 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-cache-store.c : class for a cache store */
-
-/*
- * Authors:
- * Dan Winship <danw@helixcode.com>
- *
- * 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <errno.h>
-
-#include "camel-cache-store.h"
-#include "camel-cache-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"
-
-static CamelServiceClass *service_class = NULL;
-#define CS_CLASS(so) CAMEL_STORE_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-
-static void finalize (CamelObject *object);
-
-static gboolean cache_connect (CamelService *service, CamelException *ex);
-static gboolean cache_disconnect (CamelService *service, CamelException *ex);
-static char *get_path (CamelService *service);
-static char *get_name (CamelService *service, gboolean brief);
-
-static CamelFolder *get_folder (CamelStore *store, const char *folder_name,
- gboolean create, CamelException *ex);
-static void delete_folder (CamelStore *store, const char *folder_name,
- CamelException *ex);
-static void rename_folder (CamelStore *store, const char *old_name,
- const char *new_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 void
-camel_cache_store_class_init (CamelCacheStoreClass *camel_cache_store_class)
-{
- CamelServiceClass *camel_service_class =
- CAMEL_SERVICE_CLASS (camel_cache_store_class);
- CamelStoreClass *camel_store_class =
- CAMEL_STORE_CLASS (camel_cache_store_class);
-
- service_class = CAMEL_SERVICE_CLASS (camel_type_get_global_classfuncs (camel_service_get_type ()));
-
- /* virtual method overload */
- camel_service_class->connect = cache_connect;
- camel_service_class->disconnect = cache_disconnect;
- camel_service_class->get_path = get_path;
- camel_service_class->get_name = get_name;
-
- camel_store_class->get_folder = get_folder;
- camel_store_class->delete_folder = delete_folder;
- camel_store_class->rename_folder = rename_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;
-}
-
-
-CamelType
-camel_cache_store_get_type (void)
-{
- static CamelType camel_cache_store_type = CAMEL_INVALID_TYPE;
-
- if (camel_cache_store_type == CAMEL_INVALID_TYPE) {
- camel_cache_store_type = camel_type_register (
- CAMEL_STORE_TYPE, "CamelCacheStore",
- sizeof (CamelCacheStore),
- sizeof (CamelCacheStoreClass),
- (CamelObjectClassInitFunc) camel_cache_store_class_init,
- NULL,
- NULL,
- (CamelObjectFinalizeFunc) finalize);
- }
-
- return camel_cache_store_type;
-}
-
-static void
-finalize (CamelObject *object)
-{
- CamelCacheStore *cache_store = CAMEL_CACHE_STORE (object);
-
- camel_object_unref (CAMEL_OBJECT (cache_store->local));
- camel_object_unref (CAMEL_OBJECT (cache_store->remote));
- g_free (cache_store->local_base);
-}
-
-
-static gboolean
-cache_connect (CamelService *service, CamelException *ex)
-{
- CamelCacheStore *cache_store = CAMEL_CACHE_STORE (service);
-
- return camel_service_connect (CAMEL_SERVICE (cache_store->remote), ex) &&
- camel_service_connect (CAMEL_SERVICE (cache_store->local), ex);
-}
-
-static gboolean
-cache_disconnect (CamelService *service, CamelException *ex)
-{
- CamelCacheStore *cache_store = CAMEL_CACHE_STORE (service);
-
- return camel_service_disconnect (CAMEL_SERVICE (cache_store->local), ex) &&
- camel_service_disconnect (CAMEL_SERVICE (cache_store->remote), ex);
-}
-
-static char *
-get_path (CamelService *service)
-{
- CamelCacheStore *cache_store = CAMEL_CACHE_STORE (service);
- char *path, *subpath;
-
- subpath = camel_service_get_path (CAMEL_SERVICE (cache_store->remote));
- path = g_strdup_printf ("cache/%s", subpath);
- g_free (subpath);
- return path;
-}
-
-static char *
-get_name (CamelService *service, gboolean brief)
-{
- CamelCacheStore *cache_store = CAMEL_CACHE_STORE (service);
-
- return camel_service_get_name (CAMEL_SERVICE (cache_store->remote),
- brief);
-}
-
-static CamelFolder *
-get_folder (CamelStore *store, const char *folder_name,
- gboolean create, CamelException *ex)
-{
- CamelCacheStore *cache_store = CAMEL_CACHE_STORE (store);
- CamelFolder *parent, *rf, *lf;
-
- rf = camel_store_get_folder (cache_store->remote, folder_name,
- create, ex);
- if (!rf)
- return NULL;
-
- lf = camel_store_get_folder (cache_store->local, folder_name,
- TRUE, ex);
- if (!lf) {
- camel_object_unref (CAMEL_OBJECT (rf));
- camel_exception_setv (ex, camel_exception_get_id (ex),
- _("Could not create cache folder:\n%s"),
- camel_exception_get_description (ex));
- return NULL;
- }
-
- return camel_cache_folder_new (store, parent, rf, lf, ex);
-}
-
-/* XXX these two need to be better about failure recovery. */
-static void
-delete_folder (CamelStore *store, const char *folder_name,
- CamelException *ex)
-{
- CamelCacheStore *cache_store = CAMEL_CACHE_STORE (store);
-
- camel_store_delete_folder (cache_store->remote, folder_name, ex);
- if (camel_exception_is_set (ex))
- return;
- camel_store_delete_folder (cache_store->local, folder_name, NULL);
-}
-
-static void
-rename_folder (CamelStore *store, const char *old_name,
- const char *new_name, CamelException *ex)
-{
- CamelCacheStore *cache_store = CAMEL_CACHE_STORE (store);
-
- camel_store_rename_folder (cache_store->remote, old_name,
- new_name, ex);
- if (camel_exception_is_set (ex))
- return;
- camel_store_rename_folder (cache_store->local, old_name,
- new_name, NULL);
-}
-
-static char *
-get_folder_name (CamelStore *store, const char *folder_name,
- CamelException *ex)
-{
- CamelCacheStore *cache_store = CAMEL_CACHE_STORE (store);
-
- return CS_CLASS (cache_store->remote)->get_folder_name (
- cache_store->remote, folder_name, ex);
-}
-
-static char *
-get_root_folder_name (CamelStore *store, CamelException *ex)
-{
- CamelCacheStore *cache_store = CAMEL_CACHE_STORE (store);
-
- return CS_CLASS (cache_store->remote)->get_root_folder_name (
- cache_store->remote, ex);
-}
-
-static char *
-get_default_folder_name (CamelStore *store, CamelException *ex)
-{
- CamelCacheStore *cache_store = CAMEL_CACHE_STORE (store);
-
- return CS_CLASS (cache_store->remote)->get_default_folder_name (
- cache_store->remote, ex);
-}
-
-
-/**
- * camel_cache_store_new:
- * @remote: a remote store
- * @ex: a CamelException
- *
- * Return value: a CamelCacheStore for the given remote store.
- **/
-CamelStore *
-camel_cache_store_new (CamelStore *remote, CamelException *ex)
-{
- CamelCacheStore *cache_store;
- CamelService *remote_service = (CamelService *)remote;
- CamelSession *session;
- char *url_string;
- CamelURL *url;
-
- session = camel_service_get_session (remote_service);
-
- url_string = camel_service_get_url (remote_service);
- url = camel_url_new (url_string, ex);
- g_free (url_string);
-
- if (!url)
- return NULL;
-
- cache_store = (CamelCacheStore *)
- camel_service_new (CAMEL_CACHE_STORE_TYPE, session,
- camel_service_get_provider (remote_service),
- url, ex);
- if (camel_exception_is_set (ex)) {
- camel_url_free (url);
- return NULL;
- }
-
- cache_store->remote = remote;
- camel_object_ref (CAMEL_OBJECT (remote));
-
- cache_store->local_base = camel_session_get_storage_path (
- session, (CamelService *)cache_store, ex);
- if (camel_exception_is_set (ex)) {
- camel_object_unref (CAMEL_OBJECT (cache_store));
- return NULL;
- }
-
- url_string = g_strdup_printf ("mbox:%s", cache_store->local_base);
- cache_store->local = camel_session_get_store (session, url_string, ex);
- g_free (url_string);
- if (camel_exception_is_set (ex)) {
- camel_object_unref (CAMEL_OBJECT (cache_store));
- return NULL;
- }
-
- return (CamelStore *)cache_store;
-}
diff --git a/camel/providers/cache/camel-cache-store.h b/camel/providers/cache/camel-cache-store.h
deleted file mode 100644
index 97fae62a51..0000000000
--- a/camel/providers/cache/camel-cache-store.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-cache-store.h: class for a cache store */
-
-/*
- * Authors:
- * Dan Winship <danw@helixcode.com>
- *
- * 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_CACHE_STORE_H
-#define CAMEL_CACHE_STORE_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include <camel/camel-store.h>
-
-#define CAMEL_CACHE_STORE_TYPE (camel_cache_store_get_type ())
-#define CAMEL_CACHE_STORE(obj) (CAMEL_CHECK_CAST((obj), CAMEL_CACHE_STORE_TYPE, CamelCacheStore))
-#define CAMEL_CACHE_STORE_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_CACHE_STORE_TYPE, CamelCacheStoreClass))
-#define CAMEL_IS_CACHE_STORE(o) (CAMEL_CHECK_TYPE((o), CAMEL_CACHE_STORE_TYPE))
-
-typedef struct {
- CamelStore parent_object;
-
- char *local_base;
- CamelStore *remote, *local;
-
-} CamelCacheStore;
-
-
-typedef struct {
- CamelStoreClass parent_class;
-
-} CamelCacheStoreClass;
-
-
-/* support functions */
-CamelStore *camel_cache_store_new (CamelStore *remote, CamelException *ex);
-
-/* Standard Camel function */
-CamelType camel_cache_store_get_type (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_CACHE_STORE_H */
-
-
diff --git a/camel/providers/cache/libcamelcache.urls b/camel/providers/cache/libcamelcache.urls
deleted file mode 100644
index 06cf65390f..0000000000
--- a/camel/providers/cache/libcamelcache.urls
+++ /dev/null
@@ -1 +0,0 @@
-cache
diff --git a/camel/providers/imap/.cvsignore b/camel/providers/imap/.cvsignore
deleted file mode 100644
index 3fa8afaa38..0000000000
--- a/camel/providers/imap/.cvsignore
+++ /dev/null
@@ -1,11 +0,0 @@
-.deps
-Makefile
-Makefile.in
-.libs
-.deps
-*.lo
-*.la
-*.bb
-*.bbg
-*.da
-*.gcov
diff --git a/camel/providers/imap/Makefile.am b/camel/providers/imap/Makefile.am
deleted file mode 100644
index 545c404174..0000000000
--- a/camel/providers/imap/Makefile.am
+++ /dev/null
@@ -1,50 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-libcamelimapincludedir = $(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) \
- $(GNOME_INCLUDEDIR) \
- $(GTK_INCLUDEDIR) \
- -DG_LOG_DOMAIN=\"camel-imap-provider\"
-
-libcamelimap_la_SOURCES = \
- camel-imap-command.c \
- camel-imap-folder.c \
- camel-imap-message-cache.c \
- camel-imap-provider.c \
- camel-imap-search.c \
- camel-imap-store.c \
- camel-imap-summary.c \
- camel-imap-utils.c \
- camel-imap-wrapper.c
-
-libcamelimapinclude_HEADERS = \
- camel-imap-command.h \
- camel-imap-folder.h \
- camel-imap-message-cache.h \
- camel-imap-search.h \
- camel-imap-store.h \
- camel-imap-summary.h \
- camel-imap-types.h \
- camel-imap-utils.h \
- camel-imap-wrapper.h
-
-libcamelimap_la_LDFLAGS = -version-info 0:0:0
-
-noinst_HEADERS = \
- camel-imap-private.h
-
-EXTRA_DIST = libcamelimap.urls
diff --git a/camel/providers/imap/camel-imap-command.c b/camel/providers/imap/camel-imap-command.c
deleted file mode 100644
index 36f88917a8..0000000000
--- a/camel/providers/imap/camel-imap-command.c
+++ /dev/null
@@ -1,599 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-imap-command.c: IMAP command sending/parsing routines */
-
-/*
- * Authors:
- * Dan Winship <danw@helixcode.com>
- * Jeffrey Stedfast <fejj@helixcode.com>
- *
- * Copyright 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 Street #330, Boston, MA 02111-1307, USA.
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdarg.h>
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-
-#include "camel-imap-command.h"
-#include "camel-imap-utils.h"
-#include "camel-imap-folder.h"
-#include "camel-imap-store.h"
-#include <camel/camel-exception.h>
-
-static char *imap_read_untagged (CamelImapStore *store, char *line,
- CamelException *ex);
-static CamelImapResponse *imap_read_response (CamelImapStore *store,
- CamelException *ex);
-static char *imap_command_strdup_vprintf (CamelImapStore *store,
- const char *fmt, va_list ap);
-
-/**
- * camel_imap_command: Send a command to a IMAP server and get a response
- * @store: the IMAP store
- * @folder: The folder to perform the operation in (or %NULL if not
- * relevant).
- * @ex: a CamelException
- * @fmt: an sort of printf-style format string, followed by arguments
- *
- * This function makes sure that @folder (if non-%NULL) is the
- * currently-selected folder on @store and then sends the IMAP command
- * specified by @fmt and the following arguments. It then reads the
- * server's response(s) and parses the final result.
- *
- * As a special case, if @fmt is %NULL, it will just select @folder
- * and return the response from doing so.
- *
- * @fmt can include the following %-escapes ONLY:
- * %s, %d, %%: as with printf
- * %S: an IMAP "string" (quoted string or literal)
- *
- * %S strings will be passed as literals if the server supports LITERAL+
- * and quoted strings otherwise. (%S does not support strings that
- * contain newlines.)
- *
- * This function assumes you have an exclusive lock on the command
- * channel/stream.
- *
- * Return value: %NULL if an error occurred (in which case @ex will
- * be set). Otherwise, a CamelImapResponse describing the server's
- * response, which the caller must free with camel_imap_response_free().
- **/
-CamelImapResponse *
-camel_imap_command (CamelImapStore *store, CamelFolder *folder,
- CamelException *ex, const char *fmt, ...)
-{
- gchar *cmdbuf;
- va_list ap;
-
- /* Check for current folder */
- if (folder && (!fmt || folder != store->current_folder)) {
- CamelImapResponse *response;
-
- if (store->current_folder) {
- camel_object_unref (CAMEL_OBJECT (store->current_folder));
- store->current_folder = NULL;
- }
- response = camel_imap_command (store, NULL, ex, "SELECT %S",
- folder->full_name);
- if (!response)
- return NULL;
- store->current_folder = folder;
- camel_object_ref (CAMEL_OBJECT (folder));
-
- camel_imap_folder_selected (folder, response, ex);
- if (!fmt)
- return response;
-
- camel_imap_response_free (response);
- }
-
- /* Send the command */
- va_start (ap, fmt);
- cmdbuf = imap_command_strdup_vprintf (store, fmt, ap);
- va_end (ap);
-
- camel_remote_store_send_string (CAMEL_REMOTE_STORE (store), ex,
- "A%.5d %s\r\n", store->command++,
- cmdbuf);
- g_free (cmdbuf);
- if (camel_exception_is_set (ex))
- return NULL;
-
- /* Read the response. */
- return imap_read_response (store, ex);
-}
-
-/**
- * camel_imap_command_continuation: Send more command data to the IMAP server
- * @store: the IMAP store
- * @ex: a CamelException
- * @cmdbuf: buffer containing the response/request data
- *
- * This method is for sending continuing responses to the IMAP server
- * after camel_imap_command returns a CAMEL_IMAP_PLUS response.
- *
- * This function assumes you have an exclusive lock on the remote stream.
- *
- * Return value: as for camel_imap_command()
- **/
-CamelImapResponse *
-camel_imap_command_continuation (CamelImapStore *store, CamelException *ex,
- const char *cmdbuf)
-{
- if (camel_remote_store_send_string (CAMEL_REMOTE_STORE (store), ex,
- "%s\r\n", cmdbuf) < 0)
- return NULL;
-
- return imap_read_response (store, ex);
-}
-
-/* Read the response to an IMAP command. */
-static CamelImapResponse *
-imap_read_response (CamelImapStore *store, CamelException *ex)
-{
- CamelImapResponse *response;
- char *respbuf, *retcode;
-
- /* Read first line */
- if (camel_remote_store_recv_line (CAMEL_REMOTE_STORE (store),
- &respbuf, ex) < 0)
- return NULL;
-
- response = g_new0 (CamelImapResponse, 1);
- response->folder = store->current_folder;
- if (response->folder)
- camel_object_ref (CAMEL_OBJECT (response->folder));
- response->untagged = g_ptr_array_new ();
-
- /* Check for untagged data */
- while (!strncmp (respbuf, "* ", 2)) {
- /* Read the rest of the response if it is multi-line. */
- respbuf = imap_read_untagged (store, respbuf, ex);
- if (camel_exception_is_set (ex))
- break;
-
- if (!g_strncasecmp (respbuf, "* BYE", 5)) {
- /* Connection was lost, no more data to fetch */
- store->connected = FALSE;
- g_free (respbuf);
- respbuf = NULL;
- break;
- }
-
- g_ptr_array_add (response->untagged, respbuf);
- if (camel_remote_store_recv_line (
- CAMEL_REMOTE_STORE (store), &respbuf, ex) < 0)
- break;
- }
-
- if (!respbuf || camel_exception_is_set (ex)) {
- camel_imap_response_free (response);
- return NULL;
- }
-
- response->status = respbuf;
-
- /* Check for OK or continuation response. */
- if (!strncmp (respbuf, "+ ", 2))
- return response;
- retcode = imap_next_word (respbuf);
- if (!strncmp (retcode, "OK", 2))
- return response;
-
- /* We should never get BAD, or anything else but +, OK, or NO
- * for that matter.
- */
- if (strncmp (retcode, "NO", 2) != 0) {
- g_warning ("Unexpected response from IMAP server: %s",
- respbuf);
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
- _("Unexpected response from IMAP "
- "server: %s"), respbuf);
- camel_imap_response_free (response);
- return NULL;
- }
-
- retcode = imap_next_word (retcode);
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
- _("IMAP command failed: %s"),
- retcode ? retcode : _("Unknown error"));
- camel_imap_response_free (response);
- return NULL;
-}
-
-/* Given a line that is the start of an untagged response, read and
- * return the complete response, which may include an arbitrary number
- * of literals.
- */
-static char *
-imap_read_untagged (CamelImapStore *store, char *line, CamelException *ex)
-{
- int fulllen, length, ldigits, nread, i;
- GPtrArray *data;
- GString *str;
- char *end, *p, *s, *d;
-
- p = strrchr (line, '{');
- if (!p)
- return line;
-
- data = g_ptr_array_new ();
- fulllen = 0;
-
- while (1) {
- str = g_string_new (line);
- g_free (line);
- fulllen += str->len;
- g_ptr_array_add (data, str);
-
- p = strrchr (str->str, '{');
- if (!p)
- break;
-
- length = strtoul (p + 1, &end, 10);
- if (*end != '}' || *(end + 1) || end == p + 1)
- break;
- ldigits = end - (p + 1);
-
- /* Read the literal */
- str = g_string_sized_new (length + 2);
- str->str[0] = '\n';
- nread = camel_stream_read (CAMEL_REMOTE_STORE (store)->istream,
- str->str + 1, length);
- if (nread == -1) {
- if (errno == EINTR)
- camel_exception_set(ex, CAMEL_EXCEPTION_USER_CANCEL, _("Operation cancelled"));
- else
- camel_exception_set(ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE, strerror(errno));
- camel_service_disconnect (CAMEL_SERVICE (store), FALSE, NULL);
- goto lose;
- }
- if (nread < length) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
- _("Server response ended too soon."));
- camel_service_disconnect (CAMEL_SERVICE (store),
- FALSE, NULL);
- goto lose;
- }
- str->str[length + 1] = '\0';
-
- /* Fix up the literal, turning CRLFs into LF. Also, if
- * we find any embedded NULs, strip them. This is
- * dubious, but:
- * - The IMAP grammar says you can't have NULs here
- * anyway, so this will not affect our behavior
- * against any completely correct server.
- * - WU-imapd 12.264 (at least) will cheerily pass
- * NULs along if they are embedded in the message
- * - The only cause of embedded NULs we've seen is an
- * Evolution base64-encoder bug that sometimes
- * inserts a NUL into the last line when it
- * shouldn't.
- */
-
- s = d = str->str + 1;
- end = str->str + 1 + length;
- while (s < end) {
- while (s < end && *s == '\0') {
- s++;
- length--;
- }
- if (*s == '\r' && *(s + 1) == '\n') {
- s++;
- length--;
- }
- *d++ = *s++;
- }
- *d = '\0';
- str->len = length + 1;
-
- /* p points to the "{" in the line that starts the
- * literal. The length of the CR-less response must be
- * less than or equal to the length of the response
- * with CRs, therefore overwriting the old value with
- * the new value cannot cause an overrun. However, we
- * don't want it to be shorter either, because then the
- * GString's length would be off...
- */
- sprintf (p, "{%0*d}", ldigits, length);
-
- fulllen += str->len;
- g_ptr_array_add (data, str);
-
- /* Read the next line. */
- if (camel_remote_store_recv_line (CAMEL_REMOTE_STORE (store),
- &line, ex) < 0)
- goto lose;
- }
-
- /* Now reassemble the data. */
- p = line = g_malloc (fulllen + 1);
- for (i = 0; i < data->len; i++) {
- str = data->pdata[i];
- memcpy (p, str->str, str->len);
- p += str->len;
- g_string_free (str, TRUE);
- }
- *p = '\0';
- g_ptr_array_free (data, TRUE);
- return line;
-
- lose:
- for (i = 0; i < data->len; i++)
- g_string_free (data->pdata[i], TRUE);
- g_ptr_array_free (data, TRUE);
- return NULL;
-}
-
-
-/**
- * camel_imap_response_free:
- * @response: a CamelImapResponse:
- *
- * Frees all of the data in @response and processes any untagged
- * EXPUNGE and EXISTS responses in it.
- **/
-void
-camel_imap_response_free (CamelImapResponse *response)
-{
- int i, number, exists = 0;
- GArray *expunged = NULL;
- char *resp, *p;
-
- if (!response)
- return;
-
- for (i = 0; i < response->untagged->len; i++) {
- resp = response->untagged->pdata[i];
-
- if (response->folder) {
- /* Check if it's something we need to handle. */
- number = strtoul (resp + 2, &p, 10);
- if (!g_strcasecmp (p, " EXISTS")) {
- exists = number;
- } else if (!g_strcasecmp (p, " EXPUNGE")) {
- if (!expunged) {
- expunged = g_array_new (FALSE, FALSE,
- sizeof (int));
- }
- g_array_append_val (expunged, number);
- }
- }
- g_free (resp);
- }
-
- g_ptr_array_free (response->untagged, TRUE);
- g_free (response->status);
-
- if (response->folder) {
- if (exists > 0 || expunged) {
- /* Update the summary */
- camel_imap_folder_changed (response->folder,
- exists, expunged, NULL);
- if (expunged)
- g_array_free (expunged, TRUE);
- }
-
- camel_object_unref (CAMEL_OBJECT (response->folder));
- }
-
- g_free (response);
-}
-
-/**
- * camel_imap_response_free:
- * @response: a CamelImapResponse:
- *
- * Frees all of the data in @response without processing any untagged
- * responses.
- **/
-void
-camel_imap_response_free_without_processing (CamelImapResponse *response)
-{
- if (response->folder) {
- camel_object_unref (CAMEL_OBJECT (response->folder));
- response->folder = NULL;
- }
- camel_imap_response_free (response);
-}
-
-/**
- * camel_imap_response_extract:
- * @response: the response data returned from camel_imap_command
- * @type: the response type to extract
- * @ex: a CamelException
- *
- * This checks that @response contains a single untagged response of
- * type @type and returns just that response data. If @response
- * doesn't contain the right information, the function will set @ex and
- * return %NULL. Either way, @response will be freed.
- *
- * Return value: the desired response string, which the caller must free.
- **/
-char *
-camel_imap_response_extract (CamelImapResponse *response, const char *type,
- CamelException *ex)
-{
- int len = strlen (type), i;
- char *resp;
-
- for (i = 0; i < response->untagged->len; i++) {
- resp = response->untagged->pdata[i];
- /* Skip "* ", and initial sequence number, if present */
- strtoul (resp + 2, &resp, 10);
- if (*resp == ' ')
- resp = imap_next_word (resp);
-
- if (!g_strncasecmp (resp, type, len))
- break;
- }
-
- if (i < response->untagged->len) {
- resp = response->untagged->pdata[i];
- g_ptr_array_remove_index (response->untagged, i);
- } else {
- resp = NULL;
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
- _("IMAP server response did not contain "
- "%s information"), type);
- }
-
- camel_imap_response_free (response);
- return resp;
-}
-
-/**
- * camel_imap_response_extract_continuation:
- * @response: the response data returned from camel_imap_command
- * @ex: a CamelException
- *
- * This checks that @response contains a continuation response, and
- * returns just that data. If @response doesn't contain a continuation
- * response, the function will set @ex and return %NULL. Either way,
- * @response will be freed.
- *
- * Return value: the desired response string, which the caller must free.
- **/
-char *
-camel_imap_response_extract_continuation (CamelImapResponse *response,
- CamelException *ex)
-{
- char *status;
-
- if (response->status && !strncmp (response->status, "+ ", 2)) {
- status = response->status;
- response->status = NULL;
- camel_imap_response_free (response);
- return status;
- }
-
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
- _("Unexpected OK response from IMAP server: %s"),
- response->status);
- camel_imap_response_free (response);
- return NULL;
-}
-
-
-static char *
-imap_command_strdup_vprintf (CamelImapStore *store, const char *fmt,
- va_list ap)
-{
- GPtrArray *args;
- const char *p, *start;
- char *out, *op, *string;
- int num, len, i;
-
- args = g_ptr_array_new ();
-
- /* Determine the length of the data */
- len = strlen (fmt);
- p = start = fmt;
- while (*p) {
- p = strchr (start, '%');
- if (!p)
- break;
-
- switch (*++p) {
- case 'd':
- num = va_arg (ap, int);
- g_ptr_array_add (args, GINT_TO_POINTER (num));
- start = p + 1;
- len += 10;
- break;
-
- case 's':
- string = va_arg (ap, char *);
- g_ptr_array_add (args, string);
- start = p + 1;
- len += strlen (string);
- break;
-
- case 'S':
- string = va_arg (ap, char *);
- g_ptr_array_add (args, string);
- if (store->capabilities & IMAP_CAPABILITY_LITERALPLUS)
- len += strlen (string) + 15;
- else
- len += strlen (string) * 2;
- start = p + 1;
- break;
-
- case '%':
- start = p;
- break;
-
- default:
- g_warning ("camel-imap-command is not printf. I don't "
- "know what '%%%c' means.", *p);
- start = *p ? p + 1 : p;
- break;
- }
- }
-
- /* Now write out the string */
- op = out = g_malloc (len + 1);
- p = start = fmt;
- i = 0;
- while (*p) {
- p = strchr (start, '%');
- if (!p) {
- strcpy (op, start);
- break;
- } else {
- strncpy (op, start, p - start);
- op += p - start;
- }
-
- switch (*++p) {
- case 'd':
- num = GPOINTER_TO_INT (args->pdata[i++]);
- op += sprintf (op, "%d", num);
- break;
-
- case 's':
- string = args->pdata[i++];
- op += sprintf (op, "%s", string);
- break;
-
- case 'S':
- string = args->pdata[i++];
- if (store->capabilities & IMAP_CAPABILITY_LITERALPLUS) {
- op += sprintf (op, "{%d+}\r\n%s",
- strlen (string), string);
- } else {
- char *quoted = imap_quote_string (string);
- op += sprintf (op, "%s", quoted);
- g_free (quoted);
- }
- break;
-
- default:
- *op++ = '%';
- *op++ = *p;
- }
-
- start = *p ? p + 1 : p;
- }
-
- return out;
-}
diff --git a/camel/providers/imap/camel-imap-command.h b/camel/providers/imap/camel-imap-command.h
deleted file mode 100644
index 5b841525fa..0000000000
--- a/camel/providers/imap/camel-imap-command.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-imap-command.h: IMAP command sending/parsing routines */
-
-/*
- * Authors:
- * Dan Winship <danw@helixcode.com>
- * Jeffrey Stedfast <fejj@helixcode.com>
- *
- * 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_COMMAND_H
-#define CAMEL_IMAP_COMMAND_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include <glib.h>
-#include "camel-imap-types.h"
-
-struct _CamelImapResponse {
- CamelFolder *folder;
- GPtrArray *untagged;
- char *status;
-};
-
-CamelImapResponse *camel_imap_command (CamelImapStore *store,
- CamelFolder *folder,
- CamelException *ex,
- const char *fmt, ...);
-CamelImapResponse *camel_imap_command_continuation (CamelImapStore *store,
- CamelException *ex,
- const char *cmdbuf);
-
-void camel_imap_response_free (CamelImapResponse *response);
-void camel_imap_response_free_without_processing(CamelImapResponse *response);
-char *camel_imap_response_extract (CamelImapResponse *response,
- const char *type,
- CamelException *ex);
-char *camel_imap_response_extract_continuation (CamelImapResponse *response,
- CamelException *ex);
-
-#endif /* CAMEL_IMAP_COMMAND_H */
diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c
deleted file mode 100644
index f30c731e0c..0000000000
--- a/camel/providers/imap/camel-imap-folder.c
+++ /dev/null
@@ -1,1345 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-imap-folder.c: class for an imap folder */
-
-/*
- * Authors: Jeffrey Stedfast <fejj@helixcode.com>
- *
- * 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdlib.h>
-#include <sys/types.h>
-#include <dirent.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <errno.h>
-#include <string.h>
-#include <fcntl.h>
-#include <ctype.h>
-
-#include <gal/util/e-util.h>
-
-#include "camel-imap-folder.h"
-#include "camel-imap-command.h"
-#include "camel-imap-message-cache.h"
-#include "camel-imap-search.h"
-#include "camel-imap-store.h"
-#include "camel-imap-summary.h"
-#include "camel-imap-utils.h"
-#include "camel-imap-wrapper.h"
-#include "string-utils.h"
-#include "camel-session.h"
-#include "camel-stream.h"
-#include "camel-stream-mem.h"
-#include "camel-stream-buffer.h"
-#include "camel-data-wrapper.h"
-#include "camel-mime-message.h"
-#include "camel-stream-filter.h"
-#include "camel-mime-filter-from.h"
-#include "camel-mime-filter-crlf.h"
-#include "camel-exception.h"
-#include "camel-mime-utils.h"
-#include "camel-imap-private.h"
-#include "camel-multipart.h"
-#include "camel-operation.h"
-
-#define d(x) x
-
-#define CF_CLASS(o) (CAMEL_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS(o)))
-
-static CamelFolderClass *parent_class = NULL;
-
-static void imap_finalize (CamelObject *object);
-static void imap_rescan (CamelFolder *folder, int exists, CamelException *ex);
-static void imap_refresh_info (CamelFolder *folder, CamelException *ex);
-static void imap_sync (CamelFolder *folder, gboolean expunge, CamelException *ex);
-static const char *imap_get_full_name (CamelFolder *folder);
-static void imap_expunge (CamelFolder *folder, CamelException *ex);
-
-/* message manipulation */
-static CamelMimeMessage *imap_get_message (CamelFolder *folder, const gchar *uid,
- CamelException *ex);
-static void imap_append_message (CamelFolder *folder, CamelMimeMessage *message,
- const CamelMessageInfo *info, CamelException *ex);
-static void imap_copy_messages_to (CamelFolder *source, GPtrArray *uids,
- CamelFolder *destination, CamelException *ex);
-static void imap_move_messages_to (CamelFolder *source, GPtrArray *uids,
- CamelFolder *destination, CamelException *ex);
-
-/* searching */
-static GPtrArray *imap_search_by_expression (CamelFolder *folder, const char *expression, CamelException *ex);
-static void imap_search_free (CamelFolder *folder, GPtrArray *uids);
-
-GData *parse_fetch_response (CamelImapFolder *imap_folder, char *msg_att);
-
-static void
-camel_imap_folder_class_init (CamelImapFolderClass *camel_imap_folder_class)
-{
- CamelFolderClass *camel_folder_class = CAMEL_FOLDER_CLASS (camel_imap_folder_class);
-
- parent_class = CAMEL_FOLDER_CLASS(camel_type_get_global_classfuncs (camel_folder_get_type ()));
-
- /* virtual method definition */
-
- /* virtual method overload */
- camel_folder_class->refresh_info = imap_refresh_info;
- camel_folder_class->sync = imap_sync;
- camel_folder_class->expunge = imap_expunge;
- camel_folder_class->get_full_name = imap_get_full_name;
-
- camel_folder_class->get_message = imap_get_message;
- camel_folder_class->append_message = imap_append_message;
- camel_folder_class->copy_messages_to = imap_copy_messages_to;
- camel_folder_class->move_messages_to = imap_move_messages_to;
-
- camel_folder_class->search_by_expression = imap_search_by_expression;
- camel_folder_class->search_free = imap_search_free;
-}
-
-static void
-camel_imap_folder_init (gpointer object, gpointer klass)
-{
- CamelImapFolder *imap_folder = CAMEL_IMAP_FOLDER (object);
- CamelFolder *folder = CAMEL_FOLDER (object);
-
- folder->has_summary_capability = TRUE;
- folder->has_search_capability = TRUE;
-
- imap_folder->priv = g_malloc0(sizeof(*imap_folder->priv));
-#ifdef ENABLE_THREADS
- imap_folder->priv->search_lock = e_mutex_new(E_MUTEX_SIMPLE);
- imap_folder->priv->cache_lock = e_mutex_new(E_MUTEX_REC);
-#endif
-}
-
-CamelType
-camel_imap_folder_get_type (void)
-{
- static CamelType camel_imap_folder_type = CAMEL_INVALID_TYPE;
-
- if (camel_imap_folder_type == CAMEL_INVALID_TYPE) {
- camel_imap_folder_type =
- camel_type_register (CAMEL_FOLDER_TYPE, "CamelImapFolder",
- sizeof (CamelImapFolder),
- sizeof (CamelImapFolderClass),
- (CamelObjectClassInitFunc) camel_imap_folder_class_init,
- NULL,
- (CamelObjectInitFunc) camel_imap_folder_init,
- (CamelObjectFinalizeFunc) imap_finalize);
- }
-
- return camel_imap_folder_type;
-}
-
-CamelFolder *
-camel_imap_folder_new (CamelStore *parent, const char *folder_name,
- const char *short_name, const char *folder_dir,
- CamelException *ex)
-{
- CamelImapStore *imap_store = CAMEL_IMAP_STORE (parent);
- CamelFolder *folder = CAMEL_FOLDER (camel_object_new (camel_imap_folder_get_type ()));
- CamelImapFolder *imap_folder = CAMEL_IMAP_FOLDER (folder);
- CamelImapResponse *response;
- char *summary_file;
-
- camel_folder_construct (folder, parent, folder_name, short_name);
-
- summary_file = g_strdup_printf ("%s/summary", folder_dir);
- folder->summary = camel_imap_summary_new (summary_file);
- g_free (summary_file);
- if (!folder->summary) {
- camel_object_unref (CAMEL_OBJECT (folder));
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not load summary for %s"),
- folder_name);
- return NULL;
- }
-
- imap_folder->cache = camel_imap_message_cache_new (folder_dir, folder->summary, ex);
- if (!imap_folder->cache) {
- camel_object_unref (CAMEL_OBJECT (folder));
- return NULL;
- }
-
- if (camel_imap_store_check_online (imap_store, NULL)) {
- CAMEL_IMAP_STORE_LOCK (imap_store, command_lock);
- response = camel_imap_command (imap_store, folder, ex, NULL);
- CAMEL_IMAP_STORE_UNLOCK (imap_store, command_lock);
-
- if (!response) {
- camel_object_unref (CAMEL_OBJECT (folder));
- return NULL;
- }
- camel_imap_response_free (response);
- }
-
- return folder;
-}
-
-/* Called with the store's command_lock locked */
-void
-camel_imap_folder_selected (CamelFolder *folder, CamelImapResponse *response,
- CamelException *ex)
-{
- CamelImapFolder *imap_folder = CAMEL_IMAP_FOLDER (folder);
- CamelImapSummary *imap_summary = CAMEL_IMAP_SUMMARY (folder->summary);
- unsigned long exists = 0, validity = 0, val, uid;
- CamelMessageInfo *info;
- GData *fetch_data;
- int i, count;
- char *resp;
-
- count = camel_folder_summary_count (folder->summary);
-
- for (i = 0; i < response->untagged->len; i++) {
- resp = response->untagged->pdata[i] + 2;
- if (!g_strncasecmp (resp, "FLAGS ", 6) &&
- !folder->permanent_flags) {
- resp += 6;
- folder->permanent_flags = imap_parse_flag_list (&resp);
- } else if (!g_strncasecmp (resp, "OK [PERMANENTFLAGS ", 19)) {
- resp += 19;
- folder->permanent_flags = imap_parse_flag_list (&resp);
- } else if (!g_strncasecmp (resp, "OK [UIDVALIDITY ", 16)) {
- validity = strtoul (resp + 16, NULL, 10);
- } else if (isdigit ((unsigned char)*resp)) {
- unsigned long num = strtoul (resp, &resp, 10);
-
- if (!g_strncasecmp (resp, " EXISTS", 7)) {
- exists = num;
- /* Remove from the response so nothing
- * else tries to interpret it.
- */
- g_free (response->untagged->pdata[i]);
- g_ptr_array_remove_index (response->untagged, i--);
- }
- }
- }
-
- if (!imap_summary->validity)
- imap_summary->validity = validity;
- else if (validity != imap_summary->validity) {
- imap_summary->validity = validity;
- camel_folder_summary_clear (folder->summary);
- camel_imap_message_cache_clear (imap_folder->cache);
- camel_imap_folder_changed (folder, exists, NULL, ex);
- return;
- }
-
- /* If we've lost messages, we have to rescan everything */
- if (exists < count) {
- imap_rescan (folder, exists, ex);
- return;
- }
-
- if (count != 0) {
- /* Similarly, if the UID of the highest message we
- * know about has changed, then that indicates that
- * messages have been both added and removed, so we
- * have to rescan to find the removed ones. (We pass
- * NULL for the folder since we know that this folder
- * is selected, and we don't want camel_imap_command
- * to worry about it.)
- */
- response = camel_imap_command (CAMEL_IMAP_STORE (folder->parent_store),
- NULL, ex, "FETCH %d UID", count);
- if (!response)
- return;
- uid = 0;
- for (i = 0; i < response->untagged->len; i++) {
- resp = response->untagged->pdata[i];
- val = strtoul (resp + 2, &resp, 10);
- if (val == 0)
- continue;
- if (!g_strcasecmp (resp, " EXISTS")) {
- /* Another one?? */
- exists = val;
- continue;
- }
- if (uid != 0 || val != count || g_strncasecmp (resp, " FETCH (", 8) != 0)
- continue;
-
- fetch_data = parse_fetch_response (imap_folder, resp + 7);
- uid = strtoul (g_datalist_get_data (&fetch_data, "UID"), NULL, 10);
- g_datalist_clear (&fetch_data);
- }
- camel_imap_response_free_without_processing (response);
-
- info = camel_folder_summary_index (folder->summary, count - 1);
- val = strtoul (camel_message_info_uid (info), NULL, 10);
- camel_folder_summary_info_free (folder->summary, info);
- if (uid == 0 || uid != val) {
- imap_rescan (folder, exists, ex);
- return;
- }
- }
-
- /* OK. So now we know that no messages have been expunged. Whew.
- * Now see if messages have been added.
- */
- if (exists > count)
- camel_imap_folder_changed (folder, exists, NULL, ex);
-
- /* And we're done. */
-}
-
-static void
-imap_finalize (CamelObject *object)
-{
- CamelImapFolder *imap_folder = CAMEL_IMAP_FOLDER (object);
-
- if (imap_folder->search)
- camel_object_unref (CAMEL_OBJECT (imap_folder->search));
- if (imap_folder->cache)
- camel_object_unref (CAMEL_OBJECT (imap_folder->cache));
-
-#ifdef ENABLE_THREADS
- e_mutex_destroy(imap_folder->priv->search_lock);
- e_mutex_destroy(imap_folder->priv->cache_lock);
-#endif
- g_free(imap_folder->priv);
-}
-
-static void
-imap_refresh_info (CamelFolder *folder, CamelException *ex)
-{
- if (!camel_imap_store_check_online (CAMEL_IMAP_STORE (folder->parent_store), NULL))
- return;
-
- CAMEL_IMAP_STORE_LOCK (folder->parent_store, command_lock);
- imap_rescan (folder, camel_folder_summary_count (folder->summary), ex);
- CAMEL_IMAP_STORE_UNLOCK (folder->parent_store, command_lock);
-}
-
-/* Called with the store's command_lock locked */
-static void
-imap_rescan (CamelFolder *folder, int exists, CamelException *ex)
-{
- CamelImapFolder *imap_folder = CAMEL_IMAP_FOLDER (folder);
- CamelImapStore *store = CAMEL_IMAP_STORE (folder->parent_store);
- CamelImapResponse *response;
- struct {
- char *uid;
- guint32 flags;
- } *new = NULL;
- char *resp;
- int i, j, seq, summary_len;
- CamelMessageInfo *info;
- CamelImapMessageInfo *iinfo;
- GArray *removed;
- GData *fetch_data;
-
- camel_operation_start(NULL, _("Scanning IMAP folder"));
-
- /* Get UIDs and flags of all messages. */
- if (exists > 0) {
- response = camel_imap_command (store, folder, ex,
- "FETCH 1:%d (UID FLAGS)",
- exists);
- if (!response)
- return;
-
- new = g_malloc0 (exists * sizeof (*new));
- for (i = 0; i < response->untagged->len; i++) {
- resp = response->untagged->pdata[i];
-
- seq = strtoul (resp + 2, &resp, 10);
- if (g_strncasecmp (resp, " FETCH (", 8) != 0)
- continue;
-
- fetch_data = parse_fetch_response (imap_folder, resp + 7);
- new[seq - 1].uid = g_strdup (g_datalist_get_data (&fetch_data, "UID"));
- new[seq - 1].flags = GPOINTER_TO_UINT (g_datalist_get_data (&fetch_data, "FLAGS"));
- g_datalist_clear (&fetch_data);
- g_ptr_array_remove_index_fast (response->untagged, i--);
- }
- camel_imap_response_free_without_processing (response);
- }
-
- /* If we find a UID in the summary that doesn't correspond to
- * the UID in the folder, that it means the message was
- * deleted on the server, so we remove it from the summary.
- */
- removed = g_array_new (FALSE, FALSE, sizeof (int));
- summary_len = camel_folder_summary_count (folder->summary);
- for (i = 0; i < summary_len && i < exists; i++) {
- int pc = (i*100)/MIN(summary_len, exists);
-
- camel_operation_progress(NULL, pc);
-
- /* Shouldn't happen, but... */
- if (!new[i].uid)
- continue;
-
- info = camel_folder_summary_index (folder->summary, i);
- iinfo = (CamelImapMessageInfo *)info;
-
- if (strcmp (camel_message_info_uid (info), new[i].uid) != 0) {
- seq = i + 1;
- g_array_append_val (removed, seq);
- i--;
- summary_len--;
- continue;
- }
-
- /* Update summary flags */
- if (new[i].flags != iinfo->server_flags) {
- guint32 server_set, server_cleared;
-
- server_set = new[i].flags & ~iinfo->server_flags;
- server_cleared = iinfo->server_flags & ~new[i].flags;
-
- info->flags = (info->flags | server_set) & ~server_cleared;
- iinfo->server_flags = new[i].flags;
-
- camel_object_trigger_event (CAMEL_OBJECT (folder),
- "message_changed",
- g_strdup (new[i].uid));
- }
-
- camel_folder_summary_info_free(folder->summary, info);
-
- g_free (new[i].uid);
- }
-
- /* Remove any leftover cached summary messages. */
- for (j = i + 1; j < summary_len; j++) {
- seq = j - removed->len;
- g_array_append_val (removed, seq);
- }
-
- /* Free remaining memory. */
- while (i < exists)
- g_free (new[i++].uid);
- g_free (new);
-
- /* And finally update the summary. */
- camel_imap_folder_changed (folder, exists, removed, ex);
- g_array_free (removed, TRUE);
-
- camel_operation_end(NULL);
-}
-
-/* Find all messages in @folder with flags matching @flags and @mask.
- * If no messages match, returns %NULL. Otherwise, returns an array of
- * CamelMessageInfo and sets *@set to a message set corresponding the
- * UIDs of the matched messages. The caller must free the infos, the
- * array, and the set string.
- */
-static GPtrArray *
-get_matching (CamelFolder *folder, guint32 flags, guint32 mask, char **set)
-{
- GPtrArray *matches;
- CamelMessageInfo *info;
- int i, max, range;
- GString *gset;
-
- matches = g_ptr_array_new ();
- gset = g_string_new ("");
- max = camel_folder_summary_count (folder->summary);
- range = -1;
- for (i = 0; i < max; i++) {
- info = camel_folder_summary_index (folder->summary, i);
- if (!info)
- continue;
- if ((info->flags & mask) != flags) {
- camel_folder_summary_info_free (folder->summary, info);
- if (range != -1) {
- if (range != i - 1) {
- info = matches->pdata[matches->len - 1];
- g_string_sprintfa (gset, ":%s", camel_message_info_uid (info));
- }
- range = -1;
- }
- continue;
- }
-
- g_ptr_array_add (matches, info);
- if (range != -1)
- continue;
- range = i;
- if (gset->len)
- g_string_append_c (gset, ',');
- g_string_sprintfa (gset, "%s", camel_message_info_uid (info));
- }
- if (range != -1 && range != max - 1) {
- info = matches->pdata[matches->len - 1];
- g_string_sprintfa (gset, ":%s", camel_message_info_uid (info));
- }
-
- if (matches->len) {
- *set = gset->str;
- g_string_free (gset, FALSE);
- return matches;
- } else {
- g_string_free (gset, TRUE);
- g_ptr_array_free (matches, TRUE);
- return NULL;
- }
-}
-
-static void
-imap_sync (CamelFolder *folder, gboolean expunge, CamelException *ex)
-{
- CamelImapStore *store = CAMEL_IMAP_STORE (folder->parent_store);
- CamelImapResponse *response = NULL;
- CamelMessageInfo *info;
- GPtrArray *matches;
- char *set, *flaglist;
- int i, j, max;
-
- if (!camel_imap_store_check_online (store, NULL))
- return;
-
- max = camel_folder_summary_count (folder->summary);
-
- /* If we're expunging then we don't need to be precise about the
- * flags of deleted messages. Just add \Deleted to anything that
- * should have it.
- */
- if (expunge && (matches = get_matching (folder, CAMEL_MESSAGE_DELETED,
- CAMEL_MESSAGE_DELETED, &set))) {
- for (i = 0; i < matches->len; i++) {
- info = matches->pdata[i];
- info->flags &= ~CAMEL_MESSAGE_FOLDER_FLAGGED;
- camel_folder_summary_info_free (folder->summary, info);
- }
- g_ptr_array_free (matches, TRUE);
- camel_folder_summary_touch (folder->summary);
-
- CAMEL_IMAP_STORE_LOCK (store, command_lock);
- response = camel_imap_command (store, folder, ex,
- "UID STORE %s +FLAGS.SILENT \\Deleted",
- set);
- CAMEL_IMAP_STORE_UNLOCK (store, command_lock);
- g_free (set);
- if (response)
- camel_imap_response_free (response);
- if (camel_exception_is_set (ex))
- return;
- }
-
- /* OK, now, find a message with changed flags, find all of the
- * other messages like it, sync them as a group, mark them as
- * updated, and continue.
- */
- for (i = 0; i < max; i++) {
- info = camel_folder_summary_index (folder->summary, i);
- if (!info)
- continue;
- if (!(info->flags & CAMEL_MESSAGE_FOLDER_FLAGGED)) {
- camel_folder_summary_info_free (folder->summary, info);
- continue;
- }
-
- flaglist = imap_create_flag_list (info->flags);
- matches = get_matching (folder, info->flags & (CAMEL_IMAP_SERVER_FLAGS | CAMEL_MESSAGE_FOLDER_FLAGGED),
- CAMEL_IMAP_SERVER_FLAGS | CAMEL_MESSAGE_FOLDER_FLAGGED, &set);
- camel_folder_summary_info_free (folder->summary, info);
-
- CAMEL_IMAP_STORE_LOCK (store, command_lock);
- response = camel_imap_command (store, folder, ex,
- "UID STORE %s FLAGS.SILENT %s",
- set, flaglist);
- CAMEL_IMAP_STORE_UNLOCK (store, command_lock);
- g_free (set);
- g_free (flaglist);
- if (response)
- camel_imap_response_free (response);
- if (!camel_exception_is_set (ex)) {
- for (j = 0; j < matches->len; j++) {
- info = matches->pdata[j];
- info->flags &= ~CAMEL_MESSAGE_FOLDER_FLAGGED;
- ((CamelImapMessageInfo*)info)->server_flags =
- info->flags & CAMEL_IMAP_SERVER_FLAGS;
- }
- camel_folder_summary_touch (folder->summary);
- }
- for (j = 0; j < matches->len; j++) {
- info = matches->pdata[j];
- camel_folder_summary_info_free (folder->summary, info);
- }
- g_ptr_array_free (matches, TRUE);
-
- if (camel_exception_is_set (ex))
- return;
- }
-
- if (expunge) {
- CAMEL_IMAP_STORE_LOCK(store, command_lock);
- response = camel_imap_command (store, folder, ex, "EXPUNGE");
- CAMEL_IMAP_STORE_UNLOCK(store, command_lock);
- camel_imap_response_free (response);
- }
-
- if (!response) {
- /* We didn't sync or expunge anything... Do a noop so
- * the server gets a chance to tell us any news it has.
- */
- CAMEL_IMAP_STORE_LOCK(store, command_lock);
- response = camel_imap_command (store, folder, ex, "NOOP");
- CAMEL_IMAP_STORE_UNLOCK(store, command_lock);
- camel_imap_response_free (response);
- }
-
- camel_folder_summary_save (folder->summary);
-
- camel_operation_end(NULL);
-}
-
-static void
-imap_expunge (CamelFolder *folder, CamelException *ex)
-{
- if (!camel_imap_store_check_online (CAMEL_IMAP_STORE (folder->parent_store), ex))
- return;
-
- imap_sync (folder, TRUE, ex);
-}
-
-static const char *
-imap_get_full_name (CamelFolder *folder)
-{
- CamelImapStore *store = CAMEL_IMAP_STORE (folder->parent_store);
- char *name;
- int len;
-
- name = folder->full_name;
- if (store->namespace && *store->namespace) {
- len = strlen (store->namespace);
- if (!strncmp (store->namespace, folder->full_name, len) &&
- strlen (folder->full_name) > len)
- name += len;
- if (*name == store->dir_sep)
- name++;
- }
- return name;
-}
-
-static void
-imap_append_message (CamelFolder *folder, CamelMimeMessage *message,
- const CamelMessageInfo *info, CamelException *ex)
-{
- CamelImapStore *store = CAMEL_IMAP_STORE (folder->parent_store);
- CamelImapResponse *response;
- CamelStream *memstream;
- CamelMimeFilter *crlf_filter;
- CamelStreamFilter *streamfilter;
- GByteArray *ba;
- char *flagstr, *result;
-
- if (!camel_imap_store_check_online (store, ex))
- return;
-
- /* create flag string param */
- if (info && info->flags)
- flagstr = imap_create_flag_list (info->flags);
- else
- flagstr = NULL;
-
- /* FIXME: We could avoid this if we knew how big the message was. */
- memstream = camel_stream_mem_new ();
- ba = g_byte_array_new ();
- camel_stream_mem_set_byte_array (CAMEL_STREAM_MEM (memstream), ba);
-
- streamfilter = camel_stream_filter_new_with_stream (memstream);
- crlf_filter = camel_mime_filter_crlf_new (
- CAMEL_MIME_FILTER_CRLF_ENCODE,
- CAMEL_MIME_FILTER_CRLF_MODE_CRLF_ONLY);
- camel_stream_filter_add (streamfilter, crlf_filter);
- camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (message),
- CAMEL_STREAM (streamfilter));
- camel_object_unref (CAMEL_OBJECT (streamfilter));
- camel_object_unref (CAMEL_OBJECT (crlf_filter));
- camel_object_unref (CAMEL_OBJECT (memstream));
-
- CAMEL_IMAP_STORE_LOCK(store, command_lock);
- response = camel_imap_command (store, NULL, ex, "APPEND %S%s%s {%d}",
- folder->full_name, flagstr ? " " : "",
- flagstr ? flagstr : "", ba->len);
- g_free (flagstr);
-
- if (!response) {
- g_byte_array_free (ba, TRUE);
- CAMEL_IMAP_STORE_UNLOCK(store, command_lock);
- return;
- }
- result = camel_imap_response_extract_continuation (response, ex);
- if (!result) {
- g_byte_array_free (ba, TRUE);
- CAMEL_IMAP_STORE_UNLOCK(store, command_lock);
- return;
- }
- g_free (result);
-
- /* send the rest of our data - the mime message */
- g_byte_array_append (ba, "\0", 3);
- response = camel_imap_command_continuation (store, ex, ba->data);
- g_byte_array_free (ba, TRUE);
- CAMEL_IMAP_STORE_UNLOCK(store, command_lock);
- if (!response)
- return;
- camel_imap_response_free (response);
-}
-
-static char *
-get_uid_set (GPtrArray *uids)
-{
- /* Note: the only thing that might be good to do here is to
- not use atoi() and use strtoul() or something */
- int i, last_uid, this_uid;
- gboolean range = FALSE;
- GString *gset;
- char *set;
-
- gset = g_string_new (uids->pdata[0]);
- last_uid = atoi (uids->pdata[0]);
- for (i = 1; i < uids->len; i++) {
- this_uid = atoi (uids->pdata[i]);
- if (this_uid != last_uid + 1) {
- if (range) {
- g_string_sprintfa (gset, ":%d", last_uid);
- range = FALSE;
- }
-
- g_string_sprintfa (gset, ",%d", this_uid);
- } else {
- range = TRUE;
- }
-
- last_uid = this_uid;
- }
-
- if (range)
- g_string_sprintfa (gset, ":%d", this_uid);
-
- set = gset->str;
- g_string_free (gset, FALSE);
-
- return set;
-}
-
-static void
-imap_copy_messages_to (CamelFolder *source, GPtrArray *uids,
- CamelFolder *destination, CamelException *ex)
-{
- CamelImapStore *store = CAMEL_IMAP_STORE (source->parent_store);
- CamelImapResponse *response;
- char *set;
-
- if (!camel_imap_store_check_online (store, ex))
- return;
-
- /* Sync message flags if needed. */
- imap_sync (source, FALSE, ex);
- if (camel_exception_is_set (ex))
- return;
-
- /* Now copy the messages */
- CAMEL_IMAP_STORE_LOCK(store, command_lock);
- set = get_uid_set (uids);
- response = camel_imap_command (store, source, ex, "UID COPY %s %S",
- set, destination->full_name);
-
- camel_imap_response_free (response);
- g_free (set);
- CAMEL_IMAP_STORE_UNLOCK(store, command_lock);
-
- if (camel_exception_is_set (ex))
- return;
-
- /* Force the destination folder to notice its new messages. */
- response = camel_imap_command (store, destination, NULL, "NOOP");
- camel_imap_response_free (response);
-}
-
-static void
-imap_move_messages_to (CamelFolder *source, GPtrArray *uids,
- CamelFolder *destination, CamelException *ex)
-{
- int i;
-
- imap_copy_messages_to (source, uids, destination, ex);
- if (camel_exception_is_set (ex))
- return;
-
- for (i = 0; i < uids->len; i++)
- camel_folder_delete_message (source, uids->pdata[i]);
-}
-
-static GPtrArray *
-imap_search_by_expression (CamelFolder *folder, const char *expression, CamelException *ex)
-{
- CamelImapFolder *imap_folder = CAMEL_IMAP_FOLDER (folder);
- GPtrArray *matches, *summary;
-
- if (!camel_imap_store_check_online (CAMEL_IMAP_STORE (folder->parent_store), ex))
- return NULL;
-
- /* we could get around this by creating a new search object each time,
- but i doubt its worth it since any long operation would lock the
- command channel too */
- CAMEL_IMAP_FOLDER_LOCK(folder, search_lock);
-
- if (!imap_folder->search)
- imap_folder->search = camel_imap_search_new ();
-
- camel_folder_search_set_folder (imap_folder->search, folder);
- summary = camel_folder_get_summary(folder);
- camel_folder_search_set_summary(imap_folder->search, summary);
- matches = camel_folder_search_execute_expression (imap_folder->search, expression, ex);
-
- CAMEL_IMAP_FOLDER_UNLOCK(folder, search_lock);
-
- camel_folder_free_summary(folder, summary);
-
- return matches;
-}
-
-static void
-imap_search_free (CamelFolder *folder, GPtrArray *uids)
-{
- CamelImapFolder *imap_folder = CAMEL_IMAP_FOLDER (folder);
-
- g_return_if_fail (imap_folder->search);
-
- CAMEL_IMAP_FOLDER_LOCK(folder, search_lock);
-
- camel_folder_search_free_result (imap_folder->search, uids);
-
- CAMEL_IMAP_FOLDER_UNLOCK(folder, search_lock);
-}
-
-static CamelMimeMessage *get_message (CamelImapFolder *imap_folder,
- const char *uid,
- const char *part_specifier,
- CamelMessageContentInfo *ci,
- CamelException *ex);
-
-/* Fetch the contents of the MIME part indicated by @ci, which is part
- * of message @uid in @folder.
- */
-static CamelDataWrapper *
-get_content (CamelImapFolder *imap_folder, const char *uid,
- const char *part_spec, CamelMimePart *part,
- CamelMessageContentInfo *ci, CamelException *ex)
-{
- CamelDataWrapper *content;
- CamelStream *stream;
- char *child_spec;
-
- /* There are three cases: multipart, message/rfc822, and "other" */
-
- if (header_content_type_is (ci->type, "multipart", "*")) {
- CamelMultipart *body_mp;
- int speclen, num;
-
- body_mp = camel_multipart_new ();
- camel_data_wrapper_set_mime_type_field (
- CAMEL_DATA_WRAPPER (body_mp), ci->type);
- camel_multipart_set_boundary (body_mp, NULL);
-
- speclen = strlen (part_spec);
- child_spec = g_malloc (speclen + 15);
- memcpy (child_spec, part_spec, speclen);
- if (speclen > 0)
- child_spec[speclen++] = '.';
-
- ci = ci->childs;
- num = 1;
- while (ci) {
- sprintf (child_spec + speclen, "%d.MIME", num++);
- stream = camel_imap_folder_fetch_data (imap_folder, uid, child_spec, FALSE, ex);
- if (stream) {
- part = camel_mime_part_new ();
- camel_data_wrapper_construct_from_stream (CAMEL_DATA_WRAPPER (part), stream);
- camel_object_unref (CAMEL_OBJECT (stream));
- *(strchr (child_spec + speclen, '.')) = '\0';
- content = get_content (imap_folder, uid, child_spec, part, ci, ex);
- }
- if (!stream || !content) {
- g_free (child_spec);
- camel_object_unref (CAMEL_OBJECT (body_mp));
- return NULL;
- }
-
- camel_medium_set_content_object (CAMEL_MEDIUM (part), content);
- camel_object_unref (CAMEL_OBJECT (content));
- camel_multipart_add_part (body_mp, part);
- camel_object_unref (CAMEL_OBJECT (part));
-
- ci = ci->next;
- }
- g_free (child_spec);
-
- return (CamelDataWrapper *)body_mp;
- } else if (header_content_type_is (ci->type, "message", "rfc822")) {
- return (CamelDataWrapper *)
- get_message (imap_folder, uid, part_spec, ci->childs, ex);
- } else {
- if (!ci->parent || header_content_type_is (ci->parent->type, "message", "rfc822"))
- child_spec = g_strdup_printf ("%s%s1", part_spec, *part_spec ? "." : "");
- else
- child_spec = g_strdup (part_spec);
-
- content = camel_imap_wrapper_new (imap_folder, ci->type, uid, child_spec, part);
- g_free (child_spec);
- return content;
- }
-}
-
-static CamelMimeMessage *
-get_message (CamelImapFolder *imap_folder, const char *uid,
- const char *part_spec, CamelMessageContentInfo *ci,
- CamelException *ex)
-{
- CamelImapStore *store = CAMEL_IMAP_STORE (CAMEL_FOLDER (imap_folder)->parent_store);
- CamelDataWrapper *content;
- CamelMimeMessage *msg;
- CamelStream *stream;
- char *section_text;
-
- section_text = g_strdup_printf ("%s%s%s", part_spec, *part_spec ? "." : "",
- store->server_level >= IMAP_LEVEL_IMAP4REV1 ? "HEADER" : "0");
- stream = camel_imap_folder_fetch_data (imap_folder, uid, section_text, FALSE, ex);
- g_free (section_text);
- if (!stream)
- return NULL;
-
- msg = camel_mime_message_new ();
- camel_data_wrapper_construct_from_stream (CAMEL_DATA_WRAPPER (msg), stream);
- camel_object_unref (CAMEL_OBJECT (stream));
-
- content = get_content (imap_folder, uid, part_spec, CAMEL_MIME_PART (msg), ci, ex);
- if (!content) {
- camel_object_unref (CAMEL_OBJECT (msg));
- return NULL;
- }
-
- camel_medium_set_content_object (CAMEL_MEDIUM (msg), content);
- camel_object_unref (CAMEL_OBJECT (content));
-
- return msg;
-}
-
-/* FIXME: I pulled this number out of my butt. */
-#define IMAP_SMALL_BODY_SIZE 5120
-
-static CamelMimeMessage *
-imap_get_message (CamelFolder *folder, const char *uid, CamelException *ex)
-{
- CamelImapFolder *imap_folder = CAMEL_IMAP_FOLDER (folder);
- CamelImapStore *store = CAMEL_IMAP_STORE (folder->parent_store);
- CamelMessageInfo *mi;
- CamelMimeMessage *msg;
- CamelStream *stream;
-
- mi = camel_folder_summary_uid (folder->summary, uid);
- g_return_val_if_fail (mi != NULL, NULL);
-
- /* If the message is small, or the server doesn't support
- * IMAP4rev1, fetch it in one piece.
- */
- if (mi->size < IMAP_SMALL_BODY_SIZE ||
- store->server_level < IMAP_LEVEL_IMAP4REV1) {
- camel_folder_summary_info_free (folder->summary, mi);
- stream = camel_imap_folder_fetch_data (imap_folder, uid, "", FALSE, ex);
- if (!stream)
- return NULL;
- msg = camel_mime_message_new ();
- camel_data_wrapper_construct_from_stream (CAMEL_DATA_WRAPPER (msg), stream);
- camel_object_unref (CAMEL_OBJECT (stream));
- return msg;
- }
-
- /* For larger messages, fetch the structure and build a message
- * with offline parts. (We check mi->content->type rather than
- * mi->content because camel_folder_summary_info_new always creates
- * an empty content struct.)
- */
- if (!mi->content->type) {
- CamelImapResponse *response;
- GData *fetch_data;
- char *body, *found_uid;
- int i;
-
- if (!camel_imap_store_check_online (store, NULL)) {
- camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
- _("This message is not currently available"));
- return NULL;
- }
-
- CAMEL_IMAP_STORE_LOCK (store, command_lock);
- response = camel_imap_command (store, folder, ex,
- "UID FETCH %s BODY", uid);
- CAMEL_IMAP_STORE_UNLOCK (store, command_lock);
- if (!response) {
- camel_folder_summary_info_free (folder->summary, mi);
- return NULL;
- }
-
- for (i = 0, body = NULL; i < response->untagged->len; i++) {
- fetch_data = parse_fetch_response (imap_folder, response->untagged->pdata[i]);
- found_uid = g_datalist_get_data (&fetch_data, "UID");
- body = g_datalist_get_data (&fetch_data, "BODY");
- if (found_uid && body && !strcmp (found_uid, uid))
- break;
- g_datalist_clear (&fetch_data);
- body = NULL;
- }
-
- if (body)
- imap_parse_body (&body, folder, mi->content);
- g_datalist_clear (&fetch_data);
- camel_imap_response_free (response);
-
- if (!mi->content->type) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
- _("Could not find message body in FETCH response."));
- camel_folder_summary_info_free (folder->summary, mi);
- return NULL;
- }
- }
-
- msg = get_message (imap_folder, uid, "", mi->content, ex);
- camel_folder_summary_info_free (folder->summary, mi);
-
- return msg;
-}
-
-static const char *
-imap_protocol_get_summary_specifier (CamelImapStore *store)
-{
- if (store->server_level >= IMAP_LEVEL_IMAP4REV1)
- return "UID FLAGS RFC822.SIZE BODY.PEEK[HEADER]";
- else
- return "UID FLAGS RFC822.SIZE BODY.PEEK[0]";
-}
-
-static void
-imap_update_summary (CamelFolder *folder,
- CamelFolderChangeInfo *changes,
- CamelException *ex)
-{
- CamelImapFolder *imap_folder = CAMEL_IMAP_FOLDER (folder);
- CamelImapStore *store = CAMEL_IMAP_STORE (folder->parent_store);
- CamelImapResponse *response;
- GPtrArray *headers, *messages;
- const char *summary_specifier;
- char *p;
- int i, seq, first, exists = 0;
- CamelMimeMessage *msg;
- CamelMessageInfo *mi;
- GData *fetch_data;
-
- first = camel_folder_summary_count (folder->summary) + 1;
- summary_specifier = imap_protocol_get_summary_specifier (store);
-
- /* We already have the command lock */
- response = camel_imap_command (store, folder, ex, "FETCH %d:* (%s)",
- first, summary_specifier);
- if (!response)
- return;
-
- messages = g_ptr_array_new ();
- headers = response->untagged;
- for (i = 0; i < headers->len; i++) {
- p = headers->pdata[i];
- if (*p++ != '*' || *p++ != ' ')
- continue;
- seq = strtoul (p, &p, 10);
- if (!g_strcasecmp (p, " EXISTS")) {
- exists = seq;
- continue;
- }
- if (!seq || seq < first)
- continue;
- if (g_strncasecmp (p, " FETCH (", 8) != 0)
- continue;
- p += 7;
-
- if (seq - first >= messages->len)
- g_ptr_array_set_size (messages, seq - first + 1);
- mi = messages->pdata[seq - first];
- fetch_data = parse_fetch_response (imap_folder, p);
-
- if (!mi) {
- CamelStream *stream;
-
- if (!g_datalist_get_data (&fetch_data, "BODY_PART_DATA")) {
- g_datalist_clear (&fetch_data);
- p = headers->pdata[i];
- g_ptr_array_remove_index (headers, i--);
- g_ptr_array_add (headers, p);
- continue;
- }
-
- msg = camel_mime_message_new ();
- stream = g_datalist_get_data (&fetch_data, "BODY_PART_STREAM");
- camel_data_wrapper_construct_from_stream (CAMEL_DATA_WRAPPER (msg), stream);
- mi = camel_folder_summary_info_new_from_message (folder->summary, msg);
- camel_object_unref (CAMEL_OBJECT (msg));
-
- messages->pdata[seq - first] = mi;
- }
-
- if (g_datalist_get_data (&fetch_data, "UID"))
- camel_message_info_set_uid (mi, g_strdup (g_datalist_get_data (&fetch_data, "UID")));
- if (g_datalist_get_data (&fetch_data, "FLAGS")) {
- guint32 flags = GPOINTER_TO_INT (g_datalist_get_data (&fetch_data, "FLAGS"));
-
- ((CamelImapMessageInfo *)mi)->server_flags = flags;
- /* "or" them in with the existing flags that may
- * have been set by summary_info_new_from_message.
- */
- mi->flags |= flags;
- }
- if (g_datalist_get_data (&fetch_data, "RFC822.SIZE"))
- mi->size = GPOINTER_TO_INT (g_datalist_get_data (&fetch_data, "RFC822.SIZE"));
-
- g_datalist_clear (&fetch_data);
- }
- camel_imap_response_free_without_processing (response);
-
- for (i = 0; i < messages->len; i++) {
- mi = messages->pdata[i];
- if (!mi) {
- g_warning ("No information for message %d", i + first);
- continue;
- }
- camel_folder_summary_add (folder->summary, mi);
- camel_folder_change_info_add_uid (changes, camel_message_info_uid (mi));
- }
- g_ptr_array_free (messages, TRUE);
-
- /* Did more mail arrive while we were doing this? */
- if (exists && exists > camel_folder_summary_count (folder->summary))
- imap_update_summary (folder, changes, ex);
-}
-
-/* Called with the store's command_lock locked */
-void
-camel_imap_folder_changed (CamelFolder *folder, int exists,
- GArray *expunged, CamelException *ex)
-{
- CamelImapFolder *imap_folder = CAMEL_IMAP_FOLDER (folder);
- CamelFolderChangeInfo *changes;
- CamelMessageInfo *info;
- int len;
-
- changes = camel_folder_change_info_new ();
- if (expunged) {
- int i, id;
-
- for (i = 0; i < expunged->len; i++) {
- id = g_array_index (expunged, int, i);
- info = camel_folder_summary_index (folder->summary, id - 1);
- camel_folder_change_info_remove_uid (changes, camel_message_info_uid (info));
- /* It's safe to not lock around this. */
- camel_imap_message_cache_remove (imap_folder->cache, camel_message_info_uid (info));
- camel_folder_summary_remove (folder->summary, info);
- camel_folder_summary_info_free(folder->summary, info);
- }
- }
-
- len = camel_folder_summary_count (folder->summary);
- if (exists > len)
- imap_update_summary (folder, changes, ex);
-
- if (camel_folder_change_info_changed (changes)) {
- camel_object_trigger_event (CAMEL_OBJECT (folder),
- "folder_changed", changes);
- }
- camel_folder_change_info_free (changes);
-}
-
-
-CamelStream *
-camel_imap_folder_fetch_data (CamelImapFolder *imap_folder, const char *uid,
- const char *section_text, gboolean cache_only,
- CamelException *ex)
-{
- CamelFolder *folder = CAMEL_FOLDER (imap_folder);
- CamelImapStore *store = CAMEL_IMAP_STORE (folder->parent_store);
- CamelImapResponse *response;
- CamelStream *stream;
- GData *fetch_data;
- char *found_uid;
- int i;
-
- CAMEL_IMAP_FOLDER_LOCK (imap_folder, cache_lock);
- stream = camel_imap_message_cache_get (imap_folder->cache, uid, section_text);
- if (stream || cache_only) {
- CAMEL_IMAP_FOLDER_UNLOCK (imap_folder, cache_lock);
- return stream;
- }
-
- if (!camel_imap_store_check_online (store, NULL)) {
- camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
- _("This message is not currently available"));
- return NULL;
- }
-
- CAMEL_IMAP_STORE_LOCK (store, command_lock);
- if (store->server_level < IMAP_LEVEL_IMAP4REV1 && !*section_text) {
- response = camel_imap_command (store, folder, ex,
- "UID FETCH %s RFC822.PEEK",
- uid);
- } else {
- response = camel_imap_command (store, folder, ex,
- "UID FETCH %s BODY.PEEK[%s]",
- uid, section_text);
- }
- CAMEL_IMAP_STORE_UNLOCK (store, command_lock);
- if (!response) {
- CAMEL_IMAP_FOLDER_UNLOCK (imap_folder, cache_lock);
- return NULL;
- }
-
- for (i = 0; i < response->untagged->len; i++) {
- fetch_data = parse_fetch_response (imap_folder, response->untagged->pdata[i]);
- found_uid = g_datalist_get_data (&fetch_data, "UID");
- stream = g_datalist_get_data (&fetch_data, "BODY_PART_STREAM");
- if (found_uid && stream && !strcmp (uid, found_uid))
- break;
-
- g_datalist_clear (&fetch_data);
- stream = NULL;
- }
- camel_imap_response_free (response);
- CAMEL_IMAP_FOLDER_UNLOCK (imap_folder, cache_lock);
- if (!stream) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
- _("Could not find message body in FETCH "
- "response."));
- } else
- camel_object_ref (CAMEL_OBJECT (stream));
-
- g_datalist_clear (&fetch_data);
-
- return stream;
-}
-
-GData *
-parse_fetch_response (CamelImapFolder *imap_folder, char *response)
-{
- GData *data = NULL;
- char *start, *part_spec = NULL, *body = NULL, *uid = NULL;
- int body_len = 0;
-
- if (*response != '(') {
- long seq;
-
- if (*response != '*' || *(response + 1) != ' ')
- return NULL;
- seq = strtol (response + 2, &response, 10);
- if (seq == 0)
- return NULL;
- if (g_strncasecmp (response, " FETCH (", 8) != 0)
- return NULL;
- response += 7;
- }
-
- do {
- /* Skip the initial '(' or the ' ' between elements */
- response++;
-
- if (!g_strncasecmp (response, "FLAGS ", 6)) {
- guint32 flags;
-
- response += 6;
- /* FIXME user flags */
- flags = imap_parse_flag_list (&response);
-
- g_datalist_set_data (&data, "FLAGS", GUINT_TO_POINTER (flags));
- } else if (!g_strncasecmp (response, "RFC822.SIZE ", 12)) {
- unsigned long size;
-
- response += 12;
- size = strtoul (response, &response, 10);
- g_datalist_set_data (&data, "RFC822.SIZE", GUINT_TO_POINTER (size));
- } else if (!g_strncasecmp (response, "BODY[", 5) ||
- !g_strncasecmp (response, "RFC822 ", 7)) {
- char *p;
-
- if (*response == 'B') {
- response += 5;
- p = strchr (response, ']');
- if (!p || *(p + 1) != ' ')
- break;
- part_spec = g_strndup (response, p - response);
- response = p + 2;
- } else {
- part_spec = g_strdup ("");
- response += 7;
- }
-
- body = imap_parse_nstring (&response, &body_len);
- if (!response) {
- g_free (part_spec);
- break;
- }
-
- if (!body)
- body = g_strdup ("");
- g_datalist_set_data_full (&data, "BODY_PART_SPEC", part_spec, g_free);
- g_datalist_set_data_full (&data, "BODY_PART_DATA", body, g_free);
- g_datalist_set_data (&data, "BODY_PART_LEN", GINT_TO_POINTER (body_len));
- } else if (!g_strncasecmp (response, "BODY ", 5) ||
- !g_strncasecmp (response, "BODYSTRUCTURE ", 14)) {
- response = strchr (response, ' ') + 1;
- start = response;
- imap_skip_list (&response);
- g_datalist_set_data_full (&data, "BODY", g_strndup (start, response - start), g_free);
- } else if (!g_strncasecmp (response, "UID ", 4)) {
- int len;
-
- len = strcspn (response + 4, " )");
- uid = g_strndup (response + 4, len);
- g_datalist_set_data_full (&data, "UID", uid, g_free);
- response += 4 + len;
- } else {
- g_warning ("Unexpected FETCH response from server: "
- "(%s", response);
- break;
- }
- } while (response && *response != ')');
-
- if (!response || *response != ')') {
- g_datalist_clear (&data);
- return NULL;
- }
-
- if (uid && body) {
- CamelStream *stream;
-
- CAMEL_IMAP_FOLDER_LOCK (imap_folder, cache_lock);
- stream = camel_imap_message_cache_insert (imap_folder->cache,
- uid, part_spec,
- body, body_len);
- CAMEL_IMAP_FOLDER_UNLOCK (imap_folder, cache_lock);
- g_datalist_set_data_full (&data, "BODY_PART_STREAM", stream,
- (GDestroyNotify)camel_object_unref);
- }
-
- return data;
-}
-
diff --git a/camel/providers/imap/camel-imap-folder.h b/camel/providers/imap/camel-imap-folder.h
deleted file mode 100644
index 6d969bf752..0000000000
--- a/camel/providers/imap/camel-imap-folder.h
+++ /dev/null
@@ -1,90 +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 <fejj@helixcode.com>
- *
- * 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 "camel-imap-types.h"
-#include "camel-folder.h"
-#include <camel/camel-folder-search.h>
-
-#define CAMEL_IMAP_FOLDER_TYPE (camel_imap_folder_get_type ())
-#define CAMEL_IMAP_FOLDER(obj) (CAMEL_CHECK_CAST((obj), CAMEL_IMAP_FOLDER_TYPE, CamelImapFolder))
-#define CAMEL_IMAP_FOLDER_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_IMAP_FOLDER_TYPE, CamelImapFolderClass))
-#define CAMEL_IS_IMAP_FOLDER(o) (CAMEL_CHECK_TYPE((o), CAMEL_IMAP_FOLDER_TYPE))
-
-struct _CamelImapFolder {
- CamelFolder parent_object;
-
- struct _CamelImapFolderPrivate *priv;
-
- CamelFolderSearch *search;
- CamelImapMessageCache *cache;
-};
-
-
-typedef struct {
- CamelFolderClass parent_class;
-
- /* Virtual methods */
-
-} CamelImapFolderClass;
-
-
-/* public methods */
-CamelFolder *camel_imap_folder_new (CamelStore *parent,
- const char *folder_name,
- const char *short_name,
- const char *folder_dir,
- CamelException *ex);
-
-void camel_imap_folder_selected (CamelFolder *folder,
- CamelImapResponse *response,
- CamelException *ex);
-
-void camel_imap_folder_changed (CamelFolder *folder, int exists,
- GArray *expunged, CamelException *ex);
-
-CamelStream *camel_imap_folder_fetch_data (CamelImapFolder *imap_folder,
- const char *uid,
- const char *section_text,
- gboolean cache_only,
- CamelException *ex);
-
-/* Standard Camel function */
-CamelType camel_imap_folder_get_type (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_IMAP_FOLDER_H */
diff --git a/camel/providers/imap/camel-imap-message-cache.c b/camel/providers/imap/camel-imap-message-cache.c
deleted file mode 100644
index cd96409515..0000000000
--- a/camel/providers/imap/camel-imap-message-cache.c
+++ /dev/null
@@ -1,293 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-imap-message-cache.c: Class for an IMAP message cache */
-
-/*
- * Author:
- * Dan Winship <danw@ximian.com>
- *
- * Copyright (C) 2001 Ximian, Inc. (www.ximian.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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <ctype.h>
-#include <dirent.h>
-#include <errno.h>
-#include <string.h>
-
-#include "camel-imap-message-cache.h"
-#include "camel-exception.h"
-#include "camel-stream-fs.h"
-
-static void finalize (CamelImapMessageCache *cache);
-static void stream_finalize (CamelObject *stream, gpointer event_data, gpointer user_data);
-
-
-CamelType
-camel_imap_message_cache_get_type (void)
-{
- static CamelType camel_imap_message_cache_type = CAMEL_INVALID_TYPE;
-
- if (camel_imap_message_cache_type == CAMEL_INVALID_TYPE) {
- camel_imap_message_cache_type = camel_type_register (
- CAMEL_OBJECT_TYPE, "CamelImapMessageCache",
- sizeof (CamelImapMessageCache),
- sizeof (CamelImapMessageCacheClass),
- NULL,
- NULL,
- NULL,
- (CamelObjectFinalizeFunc) finalize);
- }
-
- return camel_imap_message_cache_type;
-}
-
-static void
-free_part (gpointer key, gpointer value, gpointer data)
-{
- if (value) {
- if (strchr (key, '.')) {
- camel_object_unhook_event (value, "finalize",
- stream_finalize, data);
- camel_object_unref (value);
- } else
- g_ptr_array_free (value, TRUE);
- }
- g_free (key);
-}
-
-static void
-finalize (CamelImapMessageCache *cache)
-{
- if (cache->path)
- g_free (cache->path);
- if (cache->parts) {
- g_hash_table_foreach (cache->parts, free_part, cache);
- g_hash_table_destroy (cache->parts);
- }
- if (cache->cached)
- g_hash_table_destroy (cache->cached);
-}
-
-static void
-cache_put (CamelImapMessageCache *cache, const char *uid, const char *key,
- CamelStream *stream)
-{
- char *hash_key;
- GPtrArray *subparts;
- gpointer old_key, old_value;
-
- hash_key = g_strdup (key);
- subparts = g_hash_table_lookup (cache->parts, uid);
- if (!subparts) {
- subparts = g_ptr_array_new ();
- g_hash_table_insert (cache->parts, g_strdup (uid), subparts);
- } else if (g_hash_table_lookup_extended (cache->parts, hash_key,
- &old_key, &old_value))
- g_ptr_array_remove (subparts, old_key);
-
- g_ptr_array_add (subparts, hash_key);
- g_hash_table_insert (cache->parts, hash_key, stream);
- g_hash_table_insert (cache->cached, stream, hash_key);
-
- if (stream) {
- camel_object_hook_event (CAMEL_OBJECT (stream), "finalize",
- stream_finalize, cache);
- }
-}
-
-CamelImapMessageCache *
-camel_imap_message_cache_new (const char *path, CamelFolderSummary *summary,
- CamelException *ex)
-{
- CamelImapMessageCache *cache;
- DIR *dir;
- struct dirent *d;
- char *uid, *p;
- GPtrArray *deletes;
- CamelMessageInfo *info;
-
- dir = opendir (path);
- if (!dir) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not open cache directory: %s"),
- g_strerror (errno));
- return NULL;
- }
-
- cache = (CamelImapMessageCache *)camel_object_new (CAMEL_IMAP_MESSAGE_CACHE_TYPE);
- cache->path = g_strdup (path);
-
- cache->parts = g_hash_table_new (g_str_hash, g_str_equal);
- cache->cached = g_hash_table_new (NULL, NULL);
- deletes = g_ptr_array_new ();
- while ((d = readdir (dir))) {
- if (!isdigit (d->d_name[0]))
- continue;
-
- p = strchr (d->d_name, '.');
- if (p)
- uid = g_strndup (d->d_name, p - d->d_name);
- else
- uid = g_strdup (d->d_name);
-
- info = camel_folder_summary_uid (summary, uid);
- if (info) {
- camel_folder_summary_info_free (summary, info);
- cache_put (cache, uid, d->d_name, NULL);
- } else
- g_ptr_array_add (deletes, g_strdup_printf ("%s/%s", cache->path, d->d_name));
- g_free (uid);
- }
- closedir (dir);
-
- while (deletes->len) {
- unlink (deletes->pdata[0]);
- g_free (deletes->pdata[0]);
- g_ptr_array_remove_index_fast (deletes, 0);
- }
- g_ptr_array_free (deletes, TRUE);
-
- if (camel_exception_is_set (ex)) {
- camel_object_unref (CAMEL_OBJECT (cache));
- return NULL;
- }
-
- return cache;
-}
-
-
-static void
-stream_finalize (CamelObject *stream, gpointer event_data, gpointer user_data)
-{
- CamelImapMessageCache *cache = user_data;
- char *key;
-
- key = g_hash_table_lookup (cache->cached, stream);
- if (!key)
- return;
- g_hash_table_remove (cache->cached, stream);
- g_hash_table_insert (cache->parts, key, NULL);
-}
-
-CamelStream *
-camel_imap_message_cache_insert (CamelImapMessageCache *cache, const char *uid,
- const char *part_spec, const char *data,
- int len)
-{
- char *path, *key;
- int fd, status;
- CamelStream *stream;
-
- path = g_strdup_printf ("%s/%s.%s", cache->path, uid, part_spec);
- key = strrchr (path, '/') + 1;
- stream = g_hash_table_lookup (cache->parts, key);
- if (stream)
- camel_object_unref (CAMEL_OBJECT (stream));
-
- fd = open (path, O_RDWR | O_CREAT | O_TRUNC, 0600);
- if (fd == -1) {
- g_free (path);
- return NULL;
- }
-
- stream = camel_stream_fs_new_with_fd (fd);
- status = camel_stream_write (stream, data, len);
- camel_stream_reset (stream);
-
- if (status == -1) {
- unlink (path);
- g_free (path);
- camel_object_unref (CAMEL_OBJECT (stream));
- return NULL;
- }
-
- cache_put (cache, uid, key, stream);
- g_free (path);
-
- return stream;
-}
-
-CamelStream *
-camel_imap_message_cache_get (CamelImapMessageCache *cache, const char *uid,
- const char *part_spec)
-{
- CamelStream *stream;
- char *path, *key;
-
- path = g_strdup_printf ("%s/%s.%s", cache->path, uid, part_spec);
- key = strrchr (path, '/');
- stream = g_hash_table_lookup (cache->parts, key);
- if (stream) {
- camel_object_ref (CAMEL_OBJECT (stream));
- return stream;
- }
-
- stream = camel_stream_fs_new_with_name (path, O_RDONLY, 0);
- if (stream)
- cache_put (cache, uid, key, stream);
- g_free (path);
-
- return stream;
-}
-
-void
-camel_imap_message_cache_remove (CamelImapMessageCache *cache, const char *uid)
-{
- GPtrArray *subparts;
- char *key, *path;
- CamelObject *stream;
- int i;
-
- subparts = g_hash_table_lookup (cache->parts, uid);
- if (!subparts)
- return;
- for (i = 0; i < subparts->len; i++) {
- key = subparts->pdata[i];
- path = g_strdup_printf ("%s/%s", cache->path, key);
- unlink (path);
- g_free (path);
- stream = g_hash_table_lookup (cache->parts, key);
- if (stream) {
- camel_object_unhook_event (stream, "finalize",
- stream_finalize, cache);
- camel_object_unref (stream);
- g_hash_table_remove (cache->cached, stream);
- }
- g_hash_table_remove (cache->parts, key);
- g_free (key);
- }
- g_hash_table_remove (cache->parts, uid);
- g_ptr_array_free (subparts, TRUE);
-}
-
-static gboolean
-clear_part (gpointer key, gpointer value, gpointer data)
-{
- if (!strchr (key, '.'))
- camel_imap_message_cache_remove (data, key);
- return TRUE;
-}
-
-void
-camel_imap_message_cache_clear (CamelImapMessageCache *cache)
-{
- g_hash_table_foreach_remove (cache->parts, clear_part, cache);
-}
diff --git a/camel/providers/imap/camel-imap-message-cache.h b/camel/providers/imap/camel-imap-message-cache.h
deleted file mode 100644
index 66e3adbaaa..0000000000
--- a/camel/providers/imap/camel-imap-message-cache.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-imap-message-cache.h: Class for an IMAP message cache */
-
-/*
- * Author:
- * Dan Winship <danw@ximian.com>
- *
- * Copyright (C) 2001 Ximian, Inc. (www.ximian.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_MESSAGE_CACHE_H
-#define CAMEL_IMAP_MESSAGE_CACHE_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include "camel-imap-types.h"
-#include "camel-folder.h"
-#include <camel/camel-folder-search.h>
-
-#define CAMEL_IMAP_MESSAGE_CACHE_TYPE (camel_imap_message_cache_get_type ())
-#define CAMEL_IMAP_MESSAGE_CACHE(obj) (CAMEL_CHECK_CAST((obj), CAMEL_IMAP_MESSAGE_CACHE_TYPE, CamelImapFolder))
-#define CAMEL_IMAP_MESSAGE_CACHE_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_IMAP_MESSAGE_CACHE_TYPE, CamelImapFolderClass))
-#define CAMEL_IS_IMAP_MESSAGE_CACHE(o) (CAMEL_CHECK_TYPE((o), CAMEL_IMAP_MESSAGE_CACHE_TYPE))
-
-struct _CamelImapMessageCache {
- CamelObject parent_object;
-
- char *path;
- GHashTable *parts, *cached;
-};
-
-
-typedef struct {
- CamelFolderClass parent_class;
-
- /* Virtual methods */
-
-} CamelImapMessageCacheClass;
-
-
-/* public methods */
-CamelImapMessageCache *camel_imap_message_cache_new (const char *path,
- CamelFolderSummary *summ,
- CamelException *ex);
-
-CamelStream *camel_imap_message_cache_insert (CamelImapMessageCache *cache,
- const char *uid,
- const char *part_spec,
- const char *data,
- int len);
-CamelStream *camel_imap_message_cache_get (CamelImapMessageCache *cache,
- const char *uid,
- const char *part_spec);
-void camel_imap_message_cache_remove (CamelImapMessageCache *cache,
- const char *uid);
-
-void camel_imap_message_cache_clear (CamelImapMessageCache *cache);
-
-/* Standard Camel function */
-CamelType camel_imap_message_cache_get_type (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_IMAP_MESSAGE_CACHE_H */
diff --git a/camel/providers/imap/camel-imap-private.h b/camel/providers/imap/camel-imap-private.h
deleted file mode 100644
index 811efc5576..0000000000
--- a/camel/providers/imap/camel-imap-private.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- * camel-imap-private.h: Private info for imap.
- *
- * Authors: Michael Zucchi <notzed@helixcode.com>
- *
- * 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_IMAP_PRIVATE_H
-#define CAMEL_IMAP_PRIVATE_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-/* need a way to configure and save this data, if this header is to
- be installed. For now, dont install it */
-
-#include "config.h"
-
-#ifdef ENABLE_THREADS
-#include "e-util/e-msgport.h"
-#endif
-
-struct _CamelImapStorePrivate {
-#ifdef ENABLE_THREADS
- EMutex *command_lock; /* for locking the command stream for a complete operation */
-#endif
-};
-
-#ifdef ENABLE_THREADS
-#define CAMEL_IMAP_STORE_LOCK(f, l) (e_mutex_lock(((CamelImapStore *)f)->priv->l))
-#define CAMEL_IMAP_STORE_UNLOCK(f, l) (e_mutex_unlock(((CamelImapStore *)f)->priv->l))
-#else
-#define CAMEL_IMAP_STORE_LOCK(f, l)
-#define CAMEL_IMAP_STORE_UNLOCK(f, l)
-#endif
-
-struct _CamelImapFolderPrivate {
-#ifdef ENABLE_THREADS
- EMutex *search_lock; /* for locking the search object */
- EMutex *cache_lock; /* for locking the cache object */
-#endif
-};
-
-#ifdef ENABLE_THREADS
-#define CAMEL_IMAP_FOLDER_LOCK(f, l) (e_mutex_lock(((CamelImapFolder *)f)->priv->l))
-#define CAMEL_IMAP_FOLDER_UNLOCK(f, l) (e_mutex_unlock(((CamelImapFolder *)f)->priv->l))
-#else
-#define CAMEL_IMAP_FOLDER_LOCK(f, l)
-#define CAMEL_IMAP_FOLDER_UNLOCK(f, l)
-#endif
-
-struct _CamelImapWrapperPrivate {
-#ifdef ENABLE_THREADS
- GMutex *lock;
-#endif
-};
-
-#ifdef ENABLE_THREADS
-#define CAMEL_IMAP_WRAPPER_LOCK(f, l) (g_mutex_lock(((CamelImapWrapper *)f)->priv->l))
-#define CAMEL_IMAP_WRAPPER_UNLOCK(f, l) (g_mutex_unlock(((CamelImapWrapper *)f)->priv->l))
-#else
-#define CAMEL_IMAP_WRAPPER_LOCK(f, l)
-#define CAMEL_IMAP_WRAPPER_UNLOCK(f, l)
-#endif
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_IMAP_PRIVATE_H */
-
diff --git a/camel/providers/imap/camel-imap-provider.c b/camel/providers/imap/camel-imap-provider.c
deleted file mode 100644
index 19e72dba5a..0000000000
--- a/camel/providers/imap/camel-imap-provider.c
+++ /dev/null
@@ -1,149 +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 <fejj@helixcode.com>
- *
- * Copyright 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 Street #330, Boston, MA 02111-1307, USA.
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <string.h>
-#include "camel-imap-store.h"
-#include "camel-provider.h"
-#include "camel-session.h"
-#include "camel-url.h"
-#include "camel-sasl.h"
-
-static void add_hash (guint *hash, char *s);
-static guint imap_url_hash (gconstpointer key);
-static gint check_equal (char *s1, char *s2);
-static gint imap_url_equal (gconstpointer a, gconstpointer b);
-
-CamelProviderConfEntry imap_conf_entries[] = {
- { CAMEL_PROVIDER_CONF_SECTION_START, "mailcheck", NULL,
- N_("Checking for new mail") },
- { CAMEL_PROVIDER_CONF_CHECKBOX, "check_all", NULL,
- N_("Check for new messages in all folders"), "1" },
- { CAMEL_PROVIDER_CONF_SECTION_END },
- { CAMEL_PROVIDER_CONF_SECTION_START, "folders", NULL,
- N_("Folders") },
- { CAMEL_PROVIDER_CONF_CHECKBOX, "use_lsub", NULL,
- N_("Show only subscribed folders"), "1" },
- { CAMEL_PROVIDER_CONF_CHECKBOX, "override_namespace", NULL,
- N_("Override server-supplied folder namespace"), "0" },
- { CAMEL_PROVIDER_CONF_ENTRY, "namespace", "override_namespace",
- N_("Namespace") },
- { CAMEL_PROVIDER_CONF_SECTION_END },
- { CAMEL_PROVIDER_CONF_CHECKBOX, "filter", "UNIMPLEMENTED",
- N_("Apply filters to new messages in INBOX on this server"), "0" },
- { CAMEL_PROVIDER_CONF_END }
-};
-
-static CamelProvider imap_provider = {
- "imap",
- N_("IMAPv4"),
-
- N_("For reading and storing mail on IMAP servers."),
-
- "mail",
-
- CAMEL_PROVIDER_IS_REMOTE | CAMEL_PROVIDER_IS_SOURCE |
- CAMEL_PROVIDER_IS_STORAGE | CAMEL_PROVIDER_SUPPORTS_SSL,
-
- CAMEL_URL_NEED_USER | CAMEL_URL_NEED_HOST | CAMEL_URL_ALLOW_AUTH,
-
- imap_conf_entries,
-
- /* ... */
-};
-
-CamelServiceAuthType camel_imap_password_authtype = {
- N_("Password"),
-
- N_("This option will connect to the IMAP server using a "
- "plaintext password."),
-
- "",
- TRUE
-};
-
-void
-camel_provider_module_init (CamelSession *session)
-{
- imap_provider.object_types[CAMEL_PROVIDER_STORE] =
- camel_imap_store_get_type ();
- imap_provider.service_cache = g_hash_table_new (imap_url_hash, imap_url_equal);
- imap_provider.authtypes = g_list_concat (camel_remote_store_authtype_list (),
- camel_sasl_authtype_list (FALSE));
- imap_provider.authtypes = g_list_prepend (imap_provider.authtypes,
- &camel_imap_password_authtype);
-
- camel_session_register_provider (session, &imap_provider);
-}
-
-static void
-add_hash (guint *hash, char *s)
-{
- if (s)
- *hash ^= g_str_hash(s);
-}
-
-static guint
-imap_url_hash (gconstpointer key)
-{
- const CamelURL *u = (CamelURL *)key;
- guint hash = 0;
-
- add_hash (&hash, u->user);
- add_hash (&hash, u->authmech);
- add_hash (&hash, u->host);
- hash ^= u->port;
-
- return hash;
-}
-
-static gint
-check_equal (char *s1, char *s2)
-{
- if (s1 == NULL) {
- if (s2 == NULL)
- return TRUE;
- else
- return FALSE;
- }
-
- if (s2 == NULL)
- return FALSE;
-
- return strcmp (s1, s2) == 0;
-}
-
-static gint
-imap_url_equal (gconstpointer a, gconstpointer b)
-{
- const CamelURL *u1 = a, *u2 = b;
-
- return check_equal (u1->user, u2->user)
- && check_equal (u1->authmech, u2->authmech)
- && check_equal (u1->host, u2->host)
- && u1->port == u2->port;
-}
diff --git a/camel/providers/imap/camel-imap-search.c b/camel/providers/imap/camel-imap-search.c
deleted file mode 100644
index 4b913b10c2..0000000000
--- a/camel/providers/imap/camel-imap-search.c
+++ /dev/null
@@ -1,152 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-imap-search.c: IMAP folder search */
-
-/*
- * Authors:
- * Dan Winship <danw@helixcode.com>
- *
- * Copyright 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 Street #330, Boston, MA 02111-1307, USA.
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <string.h>
-
-#include "camel-imap-command.h"
-#include "camel-imap-folder.h"
-#include "camel-imap-store.h"
-#include "camel-imap-search.h"
-#include "camel-imap-private.h"
-
-static ESExpResult *
-imap_body_contains (struct _ESExp *f, int argc, struct _ESExpResult **argv,
- CamelFolderSearch *s);
-
-static void
-camel_imap_search_class_init (CamelImapSearchClass *camel_imap_search_class)
-{
- /* virtual method overload */
- CamelFolderSearchClass *camel_folder_search_class =
- CAMEL_FOLDER_SEARCH_CLASS (camel_imap_search_class);
-
- /* virtual method overload */
- camel_folder_search_class->body_contains = imap_body_contains;
-}
-
-CamelType
-camel_imap_search_get_type (void)
-{
- static CamelType camel_imap_search_type = CAMEL_INVALID_TYPE;
-
- if (camel_imap_search_type == CAMEL_INVALID_TYPE) {
- camel_imap_search_type = camel_type_register (
- CAMEL_FOLDER_SEARCH_TYPE, "CamelImapSearch",
- sizeof (CamelImapSearch),
- sizeof (CamelImapSearchClass),
- (CamelObjectClassInitFunc) camel_imap_search_class_init,
- NULL, NULL, NULL);
- }
-
- return camel_imap_search_type;
-}
-
-static ESExpResult *
-imap_body_contains (struct _ESExp *f, int argc, struct _ESExpResult **argv,
- CamelFolderSearch *s)
-{
- CamelImapStore *store = CAMEL_IMAP_STORE (s->folder->parent_store);
- char *value = argv[0]->value.string;
- CamelImapResponse *response;
- char *result, *p, *lasts = NULL, *real_uid;
- const char *uid = "";
- ESExpResult *r;
- CamelMessageInfo *info;
- GHashTable *uid_hash = NULL;
-
- CAMEL_IMAP_STORE_LOCK(store, command_lock);
-
- if (s->current) {
- uid = camel_message_info_uid (s->current);
- r = e_sexp_result_new(f, ESEXP_RES_BOOL);
- r->value.bool = FALSE;
- response = camel_imap_command (store, s->folder, NULL,
- "UID SEARCH UID %s BODY \"%s\"",
- uid, value);
- } else {
- r = e_sexp_result_new(f, ESEXP_RES_ARRAY_PTR);
- r->value.ptrarray = g_ptr_array_new ();
- response = camel_imap_command (store, s->folder, NULL,
- "UID SEARCH BODY \"%s\"",
- value);
- }
-
- CAMEL_IMAP_STORE_UNLOCK(store, command_lock);
-
- if (!response)
- return r;
- result = camel_imap_response_extract (response, "SEARCH", NULL);
- if (!result)
- return r;
-
- p = result + sizeof ("* SEARCH");
- for (p = strtok_r (p, " ", &lasts); p; p = strtok_r (NULL, " ", &lasts)) {
- if (s->current) {
- if (!strcmp (uid, p)) {
- r->value.bool = TRUE;
- break;
- }
- } else {
- /* if we need to setup a hash of summary items, this way we get
- access to the summary memory which is locked for the duration of
- the search, and wont vanish on us */
- if (uid_hash == NULL) {
- int i;
-
- uid_hash = g_hash_table_new(g_str_hash, g_str_equal);
- for (i=0;i<s->summary->len;i++) {
- info = s->summary->pdata[i];
- g_hash_table_insert(uid_hash, (char *)camel_message_info_uid(info), info);
- }
- }
- if (g_hash_table_lookup_extended(uid_hash, p, (void *)&real_uid, (void *)&info))
- g_ptr_array_add (r->value.ptrarray, real_uid);
- }
- }
-
- /* we could probably cache this globally, but its probably not worth it */
- if (uid_hash)
- g_hash_table_destroy(uid_hash);
-
- return r;
-}
-
-/**
- * camel_imap_search_new:
- *
- * Return value: A new CamelImapSearch widget.
- **/
-CamelFolderSearch *
-camel_imap_search_new (void)
-{
- CamelFolderSearch *new = CAMEL_FOLDER_SEARCH (camel_object_new (camel_imap_search_get_type ()));
-
- camel_folder_search_construct (new);
- return new;
-}
diff --git a/camel/providers/imap/camel-imap-search.h b/camel/providers/imap/camel-imap-search.h
deleted file mode 100644
index 97fd6cd6c4..0000000000
--- a/camel/providers/imap/camel-imap-search.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-imap-search.h: IMAP folder search */
-
-/*
- * Authors:
- * Dan Winship <danw@helixcode.com>
- *
- * Copyright 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 Street #330, Boston, MA 02111-1307, USA.
- *
- */
-
-#ifndef _CAMEL_IMAP_SEARCH_H
-#define _CAMEL_IMAP_SEARCH_H
-
-#include <camel/camel-folder-search.h>
-
-#define CAMEL_IMAP_SEARCH_TYPE (camel_imap_search_get_type ())
-#define CAMEL_IMAP_SEARCH(obj) CAMEL_CHECK_CAST (obj, camel_imap_search_get_type (), CamelImapSearch)
-#define CAMEL_IMAP_SEARCH_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_imap_search_get_type (), CamelImapSearchClass)
-#define CAMEL_IS_IMAP_SEARCH(obj) CAMEL_CHECK_TYPE (obj, camel_imap_search_get_type ())
-
-typedef struct _CamelImapSearchClass CamelImapSearchClass;
-
-struct _CamelImapSearch {
- CamelFolderSearch parent;
-
-};
-
-struct _CamelImapSearchClass {
- CamelFolderSearchClass parent_class;
-
-};
-
-guint camel_imap_search_get_type (void);
-CamelFolderSearch *camel_imap_search_new (void);
-
-#endif /* ! _CAMEL_IMAP_SEARCH_H */
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c
deleted file mode 100644
index 214b9fe18b..0000000000
--- a/camel/providers/imap/camel-imap-store.c
+++ /dev/null
@@ -1,1388 +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 <fejj@helixcode.com>
- *
- * Copyright 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 Street #330, Boston, MA 02111-1307, USA.
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <errno.h>
-
-#include <gal/util/e-util.h>
-#include "e-util/e-path.h"
-
-#include "camel-imap-store.h"
-#include "camel-imap-folder.h"
-#include "camel-imap-utils.h"
-#include "camel-imap-command.h"
-#include "camel-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"
-#include "camel-sasl.h"
-#include "string-utils.h"
-
-#include "camel-imap-private.h"
-#include "camel-private.h"
-
-#define d(x) x
-
-/* Specified in RFC 2060 */
-#define IMAP_PORT 143
-
-static CamelRemoteStoreClass *remote_store_class = NULL;
-
-static void construct (CamelService *service, CamelSession *session,
- CamelProvider *provider, CamelURL *url,
- CamelException *ex);
-static gboolean imap_connect (CamelService *service, CamelException *ex);
-static gboolean imap_disconnect (CamelService *service, gboolean clean, CamelException *ex);
-static GList *query_auth_types (CamelService *service, CamelException *ex);
-static guint hash_folder_name (gconstpointer key);
-static gint compare_folder_name (gconstpointer a, gconstpointer b);
-static CamelFolder *get_folder (CamelStore *store, const char *folder_name, guint32 flags, CamelException *ex);
-static CamelFolderInfo *create_folder (CamelStore *store, const char *parent_name, const char *folder_name, CamelException *ex);
-static CamelFolderInfo *get_folder_info (CamelStore *store, const char *top,
- gboolean fast, gboolean recursive,
- gboolean subscribed_only,
- CamelException *ex);
-static gboolean folder_subscribed (CamelStore *store, const char *folder_name);
-static void subscribe_folder (CamelStore *store, const char *folder_name,
- CamelException *ex);
-static void unsubscribe_folder (CamelStore *store, const char *folder_name,
- CamelException *ex);
-static void imap_keepalive (CamelRemoteStore *store);
-
-static gboolean imap_store_setup_online (CamelImapStore *store,
- CamelException *ex);
-static gboolean imap_store_setup_offline (CamelImapStore *store,
- CamelException *ex);
-
-
-static void
-camel_imap_store_class_init (CamelImapStoreClass *camel_imap_store_class)
-{
- /* virtual method overload */
- CamelServiceClass *camel_service_class =
- CAMEL_SERVICE_CLASS (camel_imap_store_class);
- CamelStoreClass *camel_store_class =
- CAMEL_STORE_CLASS (camel_imap_store_class);
- CamelRemoteStoreClass *camel_remote_store_class =
- CAMEL_REMOTE_STORE_CLASS (camel_imap_store_class);
-
- remote_store_class = CAMEL_REMOTE_STORE_CLASS(camel_type_get_global_classfuncs
- (camel_remote_store_get_type ()));
-
- /* virtual method overload */
- camel_service_class->construct = construct;
- camel_service_class->query_auth_types = query_auth_types;
- camel_service_class->connect = imap_connect;
- camel_service_class->disconnect = imap_disconnect;
-
- camel_store_class->hash_folder_name = hash_folder_name;
- camel_store_class->compare_folder_name = compare_folder_name;
- camel_store_class->get_folder = get_folder;
- camel_store_class->create_folder = create_folder;
- camel_store_class->get_folder_info = get_folder_info;
- camel_store_class->free_folder_info = camel_store_free_folder_info_full;
-
- camel_store_class->folder_subscribed = folder_subscribed;
- camel_store_class->subscribe_folder = subscribe_folder;
- camel_store_class->unsubscribe_folder = unsubscribe_folder;
-
- camel_remote_store_class->keepalive = imap_keepalive;
-}
-
-static gboolean
-free_key (gpointer key, gpointer value, gpointer user_data)
-{
- g_free (key);
- return TRUE;
-}
-
-static void
-camel_imap_store_finalize (CamelObject *object)
-{
- CamelImapStore *imap_store = CAMEL_IMAP_STORE (object);
-
- if (imap_store->subscribed_folders) {
- g_hash_table_foreach_remove (imap_store->subscribed_folders,
- free_key, NULL);
- g_hash_table_destroy (imap_store->subscribed_folders);
- }
- if (imap_store->authtypes) {
- g_hash_table_foreach_remove (imap_store->authtypes,
- free_key, NULL);
- g_hash_table_destroy (imap_store->authtypes);
- }
- if (imap_store->namespace)
- g_free (imap_store->namespace);
- if (imap_store->current_folder)
- camel_object_unref (CAMEL_OBJECT (imap_store->current_folder));
-#ifdef ENABLE_THREADS
- e_mutex_destroy(imap_store->priv->command_lock);
-#endif
- g_free(imap_store->priv);
-}
-
-static void
-camel_imap_store_init (gpointer object, gpointer klass)
-{
- CamelRemoteStore *remote_store = CAMEL_REMOTE_STORE (object);
- CamelImapStore *imap_store = CAMEL_IMAP_STORE (object);
-
- remote_store->default_port = 143;
- remote_store->default_ssl_port = 993;
-
- imap_store->dir_sep = '\0';
- imap_store->current_folder = NULL;
-
- imap_store->connected = FALSE;
- imap_store->subscribed_folders = NULL;
-
- imap_store->priv = g_malloc0 (sizeof (*imap_store->priv));
-#ifdef ENABLE_THREADS
- imap_store->priv->command_lock = e_mutex_new(E_MUTEX_REC);
-#endif
-}
-
-CamelType
-camel_imap_store_get_type (void)
-{
- static CamelType camel_imap_store_type = CAMEL_INVALID_TYPE;
-
- if (camel_imap_store_type == CAMEL_INVALID_TYPE) {
- camel_imap_store_type =
- camel_type_register (CAMEL_REMOTE_STORE_TYPE, "CamelImapStore",
- sizeof (CamelImapStore),
- sizeof (CamelImapStoreClass),
- (CamelObjectClassInitFunc) camel_imap_store_class_init,
- NULL,
- (CamelObjectInitFunc) camel_imap_store_init,
- (CamelObjectFinalizeFunc) camel_imap_store_finalize);
- }
-
- return camel_imap_store_type;
-}
-
-static void
-construct (CamelService *service, CamelSession *session,
- CamelProvider *provider, CamelURL *url,
- CamelException *ex)
-{
- CamelImapStore *imap_store = CAMEL_IMAP_STORE (service);
- CamelStore *store = CAMEL_STORE (service);
-
- CAMEL_SERVICE_CLASS (remote_store_class)->construct (service, session, provider, url, ex);
- if (camel_exception_is_set (ex))
- return;
-
- imap_store->storage_path = camel_session_get_storage_path (session, service, ex);
- if (camel_exception_is_set (ex))
- return;
-
- imap_store->base_url = camel_url_to_string (service->url, (CAMEL_URL_HIDE_PASSWORD |
- CAMEL_URL_HIDE_PARAMS |
- CAMEL_URL_HIDE_AUTH));
-
- imap_store->parameters = 0;
- if (camel_url_get_param (url, "use_lsub"))
- store->flags |= CAMEL_STORE_SUBSCRIPTIONS;
- if (camel_url_get_param (url, "namespace")) {
- imap_store->parameters |= IMAP_PARAM_OVERRIDE_NAMESPACE;
- imap_store->namespace = g_strdup (camel_url_get_param (url, "namespace"));
- }
- if (camel_url_get_param (url, "check_all"))
- imap_store->parameters |= IMAP_PARAM_CHECK_ALL;
- if (camel_url_get_param (url, "filter"))
- imap_store->parameters |= IMAP_PARAM_FILTER_INBOX;
-}
-
-static struct {
- const char *name;
- guint32 flag;
-} capabilities[] = {
- { "IMAP4", IMAP_CAPABILITY_IMAP4 },
- { "IMAP4REV1", IMAP_CAPABILITY_IMAP4REV1 },
- { "STATUS", IMAP_CAPABILITY_STATUS },
- { "NAMESPACE", IMAP_CAPABILITY_NAMESPACE },
- { "UIDPLUS", IMAP_CAPABILITY_UIDPLUS },
- { "LITERAL+", IMAP_CAPABILITY_LITERALPLUS },
- { NULL, 0 }
-};
-
-/* we have remote-store:connect_lock by now */
-static gboolean
-connect_to_server (CamelService *service, CamelException *ex)
-{
- CamelImapStore *store = CAMEL_IMAP_STORE (service);
- CamelImapResponse *response;
- char *result, *buf, *capa, *lasts;
- int i;
-
- if (!CAMEL_SERVICE_CLASS (remote_store_class)->connect (service, ex))
- return FALSE;
-
- store->command = 0;
-
- /* Read the greeting, if any. FIXME: deal with PREAUTH */
- if (camel_remote_store_recv_line (CAMEL_REMOTE_STORE (service),
- &buf, ex) < 0) {
- return FALSE;
- }
- g_free (buf);
- store->connected = TRUE;
-
- /* Find out the IMAP capabilities */
- store->capabilities = 0;
- store->authtypes = g_hash_table_new (g_str_hash, g_str_equal);
- response = camel_imap_command (store, NULL, ex, "CAPABILITY");
- if (!response)
- return FALSE;
- result = camel_imap_response_extract (response, "CAPABILITY ", ex);
- if (!result)
- return FALSE;
-
- /* Skip over "* CAPABILITY ". */
- capa = result + 13;
- for (capa = strtok_r (capa, " ", &lasts); capa;
- capa = strtok_r (NULL, " ", &lasts)) {
- if (!strncmp (capa, "AUTH=", 5)) {
- g_hash_table_insert (store->authtypes,
- g_strdup (capa + 5),
- GINT_TO_POINTER (1));
- continue;
- }
- for (i = 0; capabilities[i].name; i++) {
- if (g_strcasecmp (capa, capabilities[i].name) == 0) {
- store->capabilities |= capabilities[i].flag;
- break;
- }
- }
- }
- g_free (result);
-
- if (store->capabilities & IMAP_CAPABILITY_IMAP4REV1) {
- store->server_level = IMAP_LEVEL_IMAP4REV1;
- store->capabilities |= IMAP_CAPABILITY_STATUS;
- } else if (store->capabilities & IMAP_CAPABILITY_IMAP4)
- store->server_level = IMAP_LEVEL_IMAP4;
- else
- store->server_level = IMAP_LEVEL_UNKNOWN;
-
- return TRUE;
-}
-
-extern CamelServiceAuthType camel_imap_password_authtype;
-
-static GList *
-query_auth_types (CamelService *service, CamelException *ex)
-{
- CamelImapStore *store = CAMEL_IMAP_STORE (service);
- CamelServiceAuthType *authtype;
- GList *types, *sasl_types, *t, *next;
-
- if (!connect_to_server (service, ex))
- return NULL;
-
- types = CAMEL_SERVICE_CLASS (remote_store_class)->query_auth_types (service, ex);
- if (camel_exception_is_set (ex))
- return types;
-
- sasl_types = camel_sasl_authtype_list (FALSE);
- for (t = sasl_types; t; t = next) {
- authtype = t->data;
- next = t->next;
-
- if (!g_hash_table_lookup (store->authtypes, authtype->authproto)) {
- sasl_types = g_list_remove_link (sasl_types, t);
- g_list_free_1 (t);
- }
- }
- types = g_list_concat (types, sasl_types);
-
- return g_list_prepend (types, &camel_imap_password_authtype);
-}
-
-/* call refresh folder directly, bypassing the folder lock */
-static void
-refresh_folder_info (gpointer key, gpointer value, gpointer data)
-{
- CamelFolder *folder = CAMEL_FOLDER (value);
-
- CAMEL_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS(folder))->refresh_info(folder, data);
-}
-
-/* This is a little 'hack' to avoid the deadlock conditions that would otherwise
- ensue when calling camel_folder_refresh_info from inside a lock */
-/* NB: on second thougts this is probably not entirely safe, but it'll do for now */
-/* the alternative is to:
- make the camel folder->lock recursive (which should probably be done)
- or remove it from camel_folder_refresh_info, and use another locking mechanism */
-static void
-imap_store_refresh_folders (CamelRemoteStore *store, CamelException *ex)
-{
- CAMEL_STORE_LOCK(store, cache_lock);
-
- g_hash_table_foreach (CAMEL_STORE (store)->folders, refresh_folder_info, ex);
-
- CAMEL_STORE_UNLOCK(store, cache_lock);
-}
-
-static gboolean
-try_auth (CamelImapStore *store, const char *mech, CamelException *ex)
-{
- CamelSasl *sasl;
- CamelImapResponse *response;
- char *resp;
- char *sasl_resp;
-
- sasl = camel_sasl_new ("imap", mech, CAMEL_SERVICE (store));
-
- sasl_resp = camel_sasl_challenge_base64 (sasl, NULL, ex);
-
- CAMEL_IMAP_STORE_LOCK (store, command_lock);
- response = camel_imap_command (store, NULL, ex, "AUTHENTICATE %s%s%s",
- mech, sasl_resp ? " " : "",
- sasl_resp ? sasl_resp : "");
- if (!response)
- goto lose;
-
- while (!camel_sasl_authenticated (sasl)) {
- resp = camel_imap_response_extract_continuation (response, ex);
- if (!resp)
- goto lose;
-
- sasl_resp = camel_sasl_challenge_base64 (sasl, resp + 2, ex);
- g_free (resp);
- if (camel_exception_is_set (ex))
- goto break_and_lose;
-
- response = camel_imap_command_continuation (store, ex, sasl_resp);
- g_free (sasl_resp);
- if (!response)
- goto lose;
- }
-
- resp = camel_imap_response_extract_continuation (response, NULL);
- if (resp) {
- /* Oops. SASL claims we're done, but the IMAP server
- * doesn't think so...
- */
- g_free (resp);
- goto lose;
- }
-
- camel_object_unref (CAMEL_OBJECT (sasl));
-
- CAMEL_IMAP_STORE_UNLOCK (store, command_lock);
- return TRUE;
-
- break_and_lose:
- /* Get the server out of "waiting for continuation data" mode. */
- response = camel_imap_command_continuation (store, NULL, "*");
- if (response)
- camel_imap_response_free (response);
-
- lose:
- if (!camel_exception_is_set (ex)) {
- camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
- _("Bad authentication response from server."));
- }
-
- camel_object_unref (CAMEL_OBJECT (sasl));
-
- CAMEL_IMAP_STORE_UNLOCK (store, command_lock);
-
- return FALSE;
-}
-
-static gboolean
-imap_auth_loop (CamelService *service, CamelException *ex)
-{
- CamelImapStore *store = CAMEL_IMAP_STORE (service);
- CamelSession *session = camel_service_get_session (service);
- CamelServiceAuthType *authtype = NULL;
- CamelImapResponse *response;
- char *errbuf = NULL;
- gboolean authenticated = FALSE;
-
- if (service->url->authmech) {
- if (!g_hash_table_lookup (store->authtypes, service->url->authmech)) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
- _("IMAP server %s does not support requested "
- "authentication type %s"),
- service->url->host,
- service->url->authmech);
- return FALSE;
- }
-
- authtype = camel_sasl_authtype (service->url->authmech);
- if (!authtype) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
- _("No support for authentication type %s"),
- service->url->authmech);
- return FALSE;
- }
-
- if (!authtype->need_password) {
- authenticated = try_auth (store, authtype->authproto, ex);
- if (!authenticated)
- return FALSE;
- }
- }
-
- while (!authenticated) {
- if (errbuf) {
- /* We need to un-cache the password before prompting again */
- camel_session_query_authenticator (
- session, CAMEL_AUTHENTICATOR_TELL, NULL,
- TRUE, service, "password", ex);
- g_free (service->url->passwd);
- service->url->passwd = NULL;
- }
-
- if (!service->url->passwd) {
- char *prompt;
-
- prompt = g_strdup_printf (_("%sPlease enter the IMAP "
- "password for %s@%s"),
- errbuf ? errbuf : "",
- service->url->user,
- service->url->host);
- service->url->passwd =
- camel_session_query_authenticator (
- session, CAMEL_AUTHENTICATOR_ASK,
- prompt, TRUE, service, "password", ex);
- g_free (prompt);
- g_free (errbuf);
- errbuf = NULL;
-
- if (!service->url->passwd) {
- camel_exception_set (ex, CAMEL_EXCEPTION_USER_CANCEL,
- _("You didn't enter a password."));
- return FALSE;
- }
- }
-
- if (!store->connected) {
- /* Some servers (eg, courier) will disconnect on
- * a bad password. So reconnect here.
- */
- if (!connect_to_server (service, ex))
- return FALSE;
- }
-
- if (authtype)
- authenticated = try_auth (store, authtype->authproto, ex);
- else {
- CAMEL_IMAP_STORE_LOCK (store, command_lock);
- response = camel_imap_command (store, NULL, ex,
- "LOGIN %S %S",
- service->url->user,
- service->url->passwd);
- CAMEL_IMAP_STORE_UNLOCK (store, command_lock);
- if (response) {
- camel_imap_response_free (response);
- authenticated = TRUE;
- }
- }
- if (!authenticated) {
- errbuf = g_strdup_printf (_("Unable to authenticate "
- "to IMAP server.\n%s\n\n"),
- camel_exception_get_description (ex));
- camel_exception_clear (ex);
- }
- }
-
- return TRUE;
-}
-
-static gboolean
-imap_connect (CamelService *service, CamelException *ex)
-{
- CamelImapStore *store = CAMEL_IMAP_STORE (service);
-
- if (camel_imap_store_check_online (store, NULL)) {
- if (!connect_to_server (service, ex))
- return FALSE;
- if (!imap_auth_loop (service, ex)) {
- camel_service_disconnect (service, TRUE, NULL);
- return FALSE;
- }
- if (!imap_store_setup_online (store, ex)) {
- camel_service_disconnect (service, TRUE, NULL);
- return FALSE;
- }
- } else
- imap_store_setup_offline (store, ex);
-
- imap_store_refresh_folders (CAMEL_REMOTE_STORE (store), ex);
- return !camel_exception_is_set (ex);
-}
-
-#define IMAP_STOREINFO_VERSION 1
-
-static gboolean
-imap_store_setup_online (CamelImapStore *store, CamelException *ex)
-{
- CamelImapResponse *response;
- int i, flags, len;
- char *result, *name, *path;
- FILE *storeinfo;
-
- path = g_strdup_printf ("%s/storeinfo", store->storage_path);
- storeinfo = fopen (path, "w");
- if (!storeinfo)
- g_warning ("Could not open storeinfo %s", path);
- g_free (path);
-
- /* Write header and capabilities */
- camel_folder_summary_encode_uint32 (storeinfo, IMAP_STOREINFO_VERSION);
- camel_folder_summary_encode_uint32 (storeinfo, store->capabilities);
-
- /* Get namespace and hierarchy separator */
- if ((store->capabilities & IMAP_CAPABILITY_NAMESPACE) &&
- !(store->parameters & IMAP_PARAM_OVERRIDE_NAMESPACE)) {
- CAMEL_IMAP_STORE_LOCK (store, command_lock);
- response = camel_imap_command (store, NULL, ex, "NAMESPACE");
- CAMEL_IMAP_STORE_UNLOCK (store, command_lock);
- if (!response)
- return FALSE;
-
- result = camel_imap_response_extract (response, "NAMESPACE", ex);
- if (!result)
- return FALSE;
-
- name = e_strstrcase (result, "NAMESPACE ((");
- if (name) {
- char *sep;
-
- name += 12;
- store->namespace = imap_parse_string (&name, &len);
- if (name && *name++ == ' ') {
- sep = imap_parse_string (&name, &len);
- if (sep) {
- store->dir_sep = *sep;
- g_free (sep);
- }
- }
- }
- g_free (result);
- }
- if (!store->namespace)
- store->namespace = g_strdup ("");
-
- if (!store->dir_sep) {
- CAMEL_IMAP_STORE_LOCK (store, command_lock);
- if (store->server_level >= IMAP_LEVEL_IMAP4REV1) {
- /* This idiom means "tell me the hierarchy separator
- * for the given path, even if that path doesn't exist.
- */
- response = camel_imap_command (store, NULL, ex,
- "LIST %S \"\"",
- store->namespace);
- } else {
- /* Plain IMAP4 doesn't have that idiom, so we fall back
- * to "tell me about this folder", which will fail if
- * the folder doesn't exist (eg, if namespace is "").
- */
- response = camel_imap_command (store, NULL, ex,
- "LIST \"\" %S",
- store->namespace);
- }
- CAMEL_IMAP_STORE_UNLOCK(store, command_lock);
-
- if (!response)
- return FALSE;
-
- result = camel_imap_response_extract (response, "LIST", NULL);
- if (result) {
- imap_parse_list_response (result, NULL, &store->dir_sep, NULL);
- g_free (result);
- }
- if (!store->dir_sep)
- store->dir_sep = '/'; /* Guess */
- }
-
- /* Write namespace/separator out */
- camel_folder_summary_encode_string (storeinfo, store->namespace);
- camel_folder_summary_encode_uint32 (storeinfo, store->dir_sep);
-
- if (CAMEL_STORE (store)->flags & CAMEL_STORE_SUBSCRIPTIONS) {
- /* Get subscribed folders */
- CAMEL_IMAP_STORE_LOCK (store, command_lock);
- response = camel_imap_command (store, NULL, ex, "LSUB \"\" \"*\"");
- CAMEL_IMAP_STORE_UNLOCK (store, command_lock);
- if (!response)
- return FALSE;
- store->subscribed_folders = g_hash_table_new (g_str_hash, g_str_equal);
- for (i = 0; i < response->untagged->len; i++) {
- result = response->untagged->pdata[i];
- if (!imap_parse_list_response (result, &flags, NULL, &name))
- continue;
- if (flags & (IMAP_LIST_FLAG_MARKED | IMAP_LIST_FLAG_UNMARKED))
- store->useful_lsub = TRUE;
- if (flags & IMAP_LIST_FLAG_NOSELECT) {
- g_free (name);
- continue;
- }
- g_hash_table_insert (store->subscribed_folders, name,
- GINT_TO_POINTER (1));
- camel_folder_summary_encode_string (storeinfo, result);
- }
- camel_imap_response_free (response);
- }
-
- fclose (storeinfo);
- return TRUE;
-}
-
-static gboolean
-imap_store_setup_offline (CamelImapStore *store, CamelException *ex)
-{
- char *buf, *name, *path;
- FILE *storeinfo;
- guint32 tmp;
-
- path = g_strdup_printf ("%s/storeinfo", store->storage_path);
- storeinfo = fopen (path, "r");
- g_free (path);
- tmp = 0;
- if (storeinfo)
- camel_folder_summary_decode_uint32 (storeinfo, &tmp);
- if (tmp != IMAP_STOREINFO_VERSION) {
- /* This must set ex and return FALSE if we're here... */
- return camel_imap_store_check_online (store, ex);
- }
-
- camel_folder_summary_decode_uint32 (storeinfo, &store->capabilities);
- camel_folder_summary_decode_string (storeinfo, &store->namespace);
- camel_folder_summary_decode_uint32 (storeinfo, &tmp);
- store->dir_sep = tmp;
-
- /* Get subscribed folders */
- store->subscribed_folders = g_hash_table_new (g_str_hash, g_str_equal);
- while (camel_folder_summary_decode_string (storeinfo, &buf) == 0) {
- if (!imap_parse_list_response (buf, NULL, NULL, &name)) {
- g_free (buf);
- continue;
- }
- g_hash_table_insert (store->subscribed_folders, name,
- GINT_TO_POINTER (1));
- g_free (buf);
- }
-
- fclose (storeinfo);
- return TRUE;
-}
-
-
-
-static gboolean
-imap_disconnect (CamelService *service, gboolean clean, CamelException *ex)
-{
- CamelImapStore *store = CAMEL_IMAP_STORE (service);
- CamelImapResponse *response;
-
- if (store->connected && clean) {
- /* send the logout command */
-
- /* NB: this lock probably isn't required */
- CAMEL_IMAP_STORE_LOCK(store, command_lock);
- response = camel_imap_command (store, NULL, ex, "LOGOUT");
- CAMEL_IMAP_STORE_UNLOCK(store, command_lock);
- camel_imap_response_free (response);
- }
- store->connected = FALSE;
- if (store->current_folder) {
- camel_object_unref (CAMEL_OBJECT (store->current_folder));
- store->current_folder = NULL;
- }
-
- if (store->subscribed_folders) {
- g_hash_table_foreach_remove (store->subscribed_folders,
- free_key, NULL);
- g_hash_table_destroy (store->subscribed_folders);
- store->subscribed_folders = NULL;
- }
-
- if (store->authtypes) {
- g_hash_table_foreach_remove (store->authtypes,
- free_key, NULL);
- g_hash_table_destroy (store->authtypes);
- store->authtypes = NULL;
- }
-
- if (store->namespace && !(store->parameters & IMAP_PARAM_OVERRIDE_NAMESPACE)) {
- g_free (store->namespace);
- store->namespace = NULL;
- }
-
- return CAMEL_SERVICE_CLASS (remote_store_class)->disconnect (service, clean, ex);
-}
-
-/* NOTE: Must have imap_store::command_lock before calling this */
-static gboolean
-imap_folder_exists (CamelImapStore *store, const char *folder_name,
- gboolean *selectable, char **short_name,
- CamelException *ex)
-{
- CamelImapResponse *response;
- char *result, sep;
- int flags;
-
- if (!g_strcasecmp (folder_name, "INBOX")) {
- if (selectable)
- *selectable = TRUE;
- if (short_name)
- *short_name = g_strdup ("INBOX");
- return TRUE;
- }
-
- response = camel_imap_command (store, NULL, ex, "LIST \"\" %S",
- folder_name);
- if (!response)
- return FALSE;
- result = camel_imap_response_extract (response, "LIST", ex);
- if (!result)
- return FALSE;
-
- if (!imap_parse_list_response (result, &flags, &sep, NULL))
- return FALSE;
-
- if (selectable)
- *selectable = !(flags & IMAP_LIST_FLAG_NOSELECT);
- if (short_name) {
- *short_name = strrchr (folder_name, sep);
- if (*short_name)
- *short_name = g_strdup (*short_name + 1);
- else
- *short_name = g_strdup (folder_name);
- }
-
- return TRUE;
-}
-
-/* NOTE: Must have imap_store::command_lock before calling this */
-static gboolean
-imap_create (CamelImapStore *store, const char *folder_name,
- CamelException *ex)
-{
- CamelImapResponse *response;
-
- response = camel_imap_command (store, NULL, ex, "CREATE %S",
- folder_name);
- camel_imap_response_free (response);
-
- return !camel_exception_is_set (ex);
-}
-
-static guint
-hash_folder_name (gconstpointer key)
-{
- if (g_strcasecmp (key, "INBOX") == 0)
- return g_str_hash ("INBOX");
- else
- return g_str_hash (key);
-}
-
-static gint
-compare_folder_name (gconstpointer a, gconstpointer b)
-{
- gconstpointer aname = a, bname = b;
-
- if (g_strcasecmp (a, "INBOX") == 0)
- aname = "INBOX";
- if (g_strcasecmp (b, "INBOX") == 0)
- bname = "INBOX";
- return g_str_equal (aname, bname);
-}
-
-static CamelFolder *
-get_folder (CamelStore *store, const char *folder_name, guint32 flags,
- CamelException *ex)
-{
- CamelImapStore *imap_store = CAMEL_IMAP_STORE (store);
- CamelFolder *new_folder = NULL;
- char *short_name, *folder_dir;
- gboolean selectable;
-
- if (camel_imap_store_check_online (imap_store, NULL)) {
- if (!camel_remote_store_connected (CAMEL_REMOTE_STORE (store), ex))
- return NULL;
-
- /* lock around the whole lot to check/create atomically */
- CAMEL_IMAP_STORE_LOCK(imap_store, command_lock);
- if (!imap_folder_exists (imap_store, folder_name,
- &selectable, &short_name, ex) &&
- ((flags & CAMEL_STORE_FOLDER_CREATE) == 0
- || (!imap_create (imap_store, folder_name, ex))
- || (!imap_folder_exists (imap_store, folder_name,
- &selectable, &short_name, ex)))) {
- CAMEL_IMAP_STORE_UNLOCK(imap_store, command_lock);
- return NULL;
- }
- CAMEL_IMAP_STORE_UNLOCK(imap_store, command_lock);
- } else {
- selectable = g_hash_table_lookup (imap_store->subscribed_folders, folder_name) != NULL;
- short_name = strrchr (folder_name, imap_store->dir_sep);
- if (short_name)
- short_name = g_strdup (short_name + 1);
- else
- short_name = g_strdup (folder_name);
- }
-
- if (!selectable) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_STORE_NO_FOLDER,
- _("%s is not a selectable folder"),
- folder_name);
- g_free (short_name);
- return NULL;
- }
-
- folder_dir = e_path_to_physical (imap_store->storage_path,
- folder_name);
- if (e_mkdir_hier (folder_dir, S_IRWXU) == 0) {
- new_folder = camel_imap_folder_new (store, folder_name,
- short_name, folder_dir,
- ex);
- } else {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not create directory %s: %s"),
- folder_dir, g_strerror (errno));
- }
- g_free (folder_dir);
- g_free (short_name);
-
- if (camel_exception_is_set (ex))
- return NULL;
-
- return new_folder;
-}
-
-static char *
-imap_concat (CamelImapStore *imap_store, const char *prefix, const char *suffix)
-{
- int len;
-
- len = strlen (prefix);
- if (len == 0 || prefix[len - 1] == imap_store->dir_sep)
- return g_strdup_printf ("%s%s", prefix, suffix);
- else
- return g_strdup_printf ("%s%c%s", prefix, imap_store->dir_sep, suffix);
-}
-
-static CamelFolderInfo *
-create_folder (CamelStore *store, const char *parent_name,
- const char *folder_name, CamelException *ex)
-{
- CamelImapStore *imap_store = CAMEL_IMAP_STORE (store);
- CamelFolderInfo *fi;
- char *full_name;
-
- if (!camel_imap_store_check_online (imap_store, ex))
- return NULL;
- if (!parent_name)
- parent_name = imap_store->namespace;
- full_name = imap_concat (imap_store, parent_name, folder_name);
-
- imap_create (imap_store, full_name, ex);
- if (camel_exception_is_set (ex)) {
- g_free (full_name);
- return NULL;
- }
-
- fi = get_folder_info (store, full_name, FALSE, FALSE, FALSE, ex);
- g_free (full_name);
-
- return fi;
-}
-
-static CamelFolderInfo *
-parse_list_response_as_folder_info (CamelImapStore *imap_store,
- const char *response)
-{
- CamelFolderInfo *fi;
- int flags;
- char sep, *dir, *name = NULL;
-
- if (!imap_parse_list_response (response, &flags, &sep, &dir))
- return NULL;
-
- if (sep) {
- name = strrchr (dir, sep);
- if (name && !*++name) {
- g_free (dir);
- return NULL;
- }
- }
-
- fi = g_new0 (CamelFolderInfo, 1);
- fi->full_name = dir;
- if (sep && name)
- fi->name = g_strdup (name);
- else
- fi->name = g_strdup (dir);
- if (!(flags & IMAP_LIST_FLAG_NOSELECT)) {
- CamelURL *url;
-
- url = camel_url_new (imap_store->base_url, NULL);
- g_free (url->path);
- url->path = g_strdup_printf ("/%s", dir);
- fi->url = camel_url_to_string (url, 0);
- camel_url_free (url);
- }
- if (!(flags & IMAP_LIST_FLAG_UNMARKED))
- fi->unread_message_count = -1;
-
- return fi;
-}
-
-static void
-copy_folder_name (gpointer name, gpointer key, gpointer array)
-{
- g_ptr_array_add (array, name);
-}
-
-static void
-get_subscribed_folders_by_hand (CamelImapStore *imap_store, const char *top,
- GPtrArray *folders, CamelException *ex)
-{
- GPtrArray *names;
- CamelImapResponse *response;
- CamelFolderInfo *fi;
- char *result;
- int i, toplen = strlen (top);
-
- names = g_ptr_array_new ();
- g_hash_table_foreach (imap_store->subscribed_folders,
- copy_folder_name, names);
-
- for (i = 0; i < names->len; i++) {
- CAMEL_IMAP_STORE_LOCK (imap_store, command_lock);
- response = camel_imap_command (imap_store, NULL, ex,
- "LIST \"\" %S",
- names->pdata[i]);
- CAMEL_IMAP_STORE_UNLOCK (imap_store, command_lock);
-
- if (!response) {
- g_ptr_array_free (names, TRUE);
- return;
- }
- result = camel_imap_response_extract (response, "LIST", NULL);
- if (!result) {
- g_hash_table_remove (imap_store->subscribed_folders,
- names->pdata[i]);
- g_free (names->pdata[i]);
- g_ptr_array_remove_index_fast (names, i--);
- continue;
- }
-
- fi = parse_list_response_as_folder_info (imap_store, result);
- if (!fi)
- continue;
-
- if (strncmp (top, fi->full_name, toplen) != 0) {
- camel_folder_info_free (fi);
- continue;
- }
-
- g_ptr_array_add (folders, fi);
- }
- g_ptr_array_free (names, TRUE);
-}
-
-static void
-get_folders_online (CamelImapStore *imap_store, const char *pattern,
- GPtrArray *folders, gboolean lsub, CamelException *ex)
-{
- CamelImapResponse *response;
- CamelFolderInfo *fi;
- char *list;
- int i;
-
- if (!camel_remote_store_connected (CAMEL_REMOTE_STORE (imap_store), ex))
- return;
-
- CAMEL_IMAP_STORE_LOCK (imap_store, command_lock);
- response = camel_imap_command (imap_store, NULL, ex,
- "%s \"\" %S", lsub ? "LSUB" : "LIST",
- pattern);
- CAMEL_IMAP_STORE_UNLOCK (imap_store, command_lock);
- if (!response)
- return;
-
- for (i = 0; i < response->untagged->len; i++) {
- list = response->untagged->pdata[i];
- fi = parse_list_response_as_folder_info (imap_store, list);
- if (fi)
- g_ptr_array_add (folders, fi);
- }
- camel_imap_response_free (response);
-}
-
-static void
-get_unread_online (CamelImapStore *imap_store, CamelFolderInfo *fi)
-{
- CamelImapResponse *response;
- char *status, *p;
-
- CAMEL_IMAP_STORE_LOCK (imap_store, command_lock);
- response = camel_imap_command (imap_store, NULL, NULL,
- "STATUS %S (UNSEEN)", fi->full_name);
- CAMEL_IMAP_STORE_UNLOCK (imap_store, command_lock);
- if (!response)
- return;
- status = camel_imap_response_extract (response, "STATUS", NULL);
- if (!status)
- return;
-
- p = e_strstrcase (status, "UNSEEN");
- if (p)
- fi->unread_message_count = strtoul (p + 6, NULL, 10);
- g_free (status);
-}
-
-static void
-add_folder (gpointer key, gpointer value, gpointer data)
-{
- g_ptr_array_add (data, key);
-}
-
-static void
-get_folders_offline (CamelImapStore *imap_store, GPtrArray *folders,
- CamelException *ex)
-{
- CamelFolderInfo *fi;
- CamelURL *url;
- int i;
-
- i = folders->len;
- g_hash_table_foreach (imap_store->subscribed_folders,
- add_folder, folders);
-
- url = camel_url_new (imap_store->base_url, NULL);
-
- while (i < folders->len) {
- fi = g_new0 (CamelFolderInfo, 1);
- fi->full_name = g_strdup (folders->pdata[i]);
- fi->name = strchr (fi->full_name, imap_store->dir_sep);
- if (fi->name)
- fi->name = g_strdup (fi->name + 1);
- else
- fi->name = g_strdup (fi->full_name);
-
- g_free (url->path);
- url->path = g_strdup_printf ("/%s", fi->full_name);
- fi->url = camel_url_to_string (url, 0);
-
- fi->unread_message_count = -1;
- folders->pdata[i++] = fi;
- }
-
- camel_url_free (url);
-}
-
-static void
-get_unread_offline (CamelImapStore *imap_store, CamelFolderInfo *fi)
-{
- /* FIXME */
-}
-
-static CamelFolderInfo *
-get_folder_info (CamelStore *store, const char *top, gboolean fast,
- gboolean recursive, gboolean subscribed_only,
- CamelException *ex)
-{
- CamelImapStore *imap_store = CAMEL_IMAP_STORE (store);
- gboolean need_inbox = FALSE, online;
- GPtrArray *folders;
- const char *name;
- char *pattern;
- CamelFolderInfo *fi;
- int i;
-
- if (!subscribed_only || !recursive || top) {
- if (!camel_imap_store_check_online (imap_store, ex))
- return NULL;
- online = TRUE;
- } else
- online = camel_imap_store_check_online (imap_store, NULL);
-
- if (!camel_remote_store_connected (CAMEL_REMOTE_STORE (store), ex))
- return NULL;
-
- name = top;
- if (!name) {
- need_inbox = TRUE;
- name = imap_store->namespace;
- }
-
- folders = g_ptr_array_new ();
-
- if (online) {
- /* Get top-level */
- get_folders_online (imap_store, name, folders, FALSE, ex);
- if (camel_exception_is_set (ex))
- return NULL;
- if (folders->len) {
- fi = folders->pdata[0];
- if (!fi->url) {
- camel_folder_info_free (fi);
- g_ptr_array_remove_index (folders, 0);
- }
- }
-
- /* If we want to look at only subscribed folders AND
- * check if any of them have new mail, AND the server
- * doesn't return Marked/UnMarked with LSUB, then
- * use get_subscribed_folders_by_hand. In all other
- * cases, use a single LIST or LSUB command.
- */
- if (subscribed_only && !imap_store->useful_lsub &&
- (imap_store->parameters & IMAP_PARAM_CHECK_ALL)) {
- get_subscribed_folders_by_hand (imap_store, name,
- folders, ex);
- } else {
- pattern = imap_concat (imap_store, name,
- recursive ? "*" : "%");
- get_folders_online (imap_store, pattern, folders,
- subscribed_only, ex);
- g_free (pattern);
- }
- } else
- get_folders_offline (imap_store, folders, ex);
-
- if (camel_exception_is_set (ex)) {
- for (i = 0; i < folders->len; i++)
- camel_folder_info_free (folders->pdata[i]);
- g_ptr_array_free (folders, TRUE);
- return NULL;
- }
-
- /* Add INBOX, if necessary */
- if (need_inbox) {
- for (i = 0; i < folders->len; i++) {
- fi = folders->pdata[i];
- if (!g_strcasecmp (fi->full_name, "INBOX")) {
- need_inbox = FALSE;
- break;
- }
- }
- }
-
- if (need_inbox) {
- CamelURL *url;
- char *uri;
-
- url = camel_url_new (imap_store->base_url, NULL);
- g_free (url->path);
- url->path = g_strdup ("/INBOX");
- uri = camel_url_to_string (url, 0);
- camel_url_free (url);
-
- fi = g_new0 (CamelFolderInfo, 1);
- fi->full_name = g_strdup ("INBOX");
- fi->name = g_strdup ("INBOX");
- fi->url = uri;
- fi->unread_message_count = -1;
-
- g_ptr_array_add (folders, fi);
- }
-
- if (!fast) {
- /* Get unread counts. Sync flag changes to the server
- * first so it has the same ideas about read/unread as
- * we do.
- */
- camel_store_sync (store, NULL);
- for (i = 0; i < folders->len; i++) {
- fi = folders->pdata[i];
-
- /* Don't check if it doesn't contain messages
- * or if it was \UnMarked.
- */
- if (!fi->url || fi->unread_message_count != -1)
- continue;
- /* Don't check if it's not INBOX and we're only
- * checking INBOX.
- */
- if ((!(imap_store->parameters & IMAP_PARAM_CHECK_ALL))
- && (g_strcasecmp (fi->name, "INBOX") != 0))
- continue;
-
- /* UW will give cached data for the currently
- * selected folder. Grr. Well, I guess this
- * also potentially saves us one IMAP command.
- */
- if (imap_store->current_folder &&
- !strcmp (imap_store->current_folder->full_name,
- fi->full_name)) {
- fi->unread_message_count = camel_folder_get_unread_message_count (imap_store->current_folder);
- continue;
- }
-
- if (online)
- get_unread_online (imap_store, fi);
- else
- get_unread_offline (imap_store, fi);
- }
- }
-
- /* And assemble. */
- fi = camel_folder_info_build (folders, name, imap_store->dir_sep, TRUE);
- g_ptr_array_free (folders, TRUE);
- return fi;
-}
-
-static gboolean
-folder_subscribed (CamelStore *store, const char *folder_name)
-{
- CamelImapStore *imap_store = CAMEL_IMAP_STORE (store);
-
- g_return_val_if_fail (imap_store->subscribed_folders != NULL, FALSE);
-
- return g_hash_table_lookup (imap_store->subscribed_folders,
- folder_name) != NULL;
-}
-
-static void
-subscribe_folder (CamelStore *store, const char *folder_name,
- CamelException *ex)
-{
- CamelImapStore *imap_store = CAMEL_IMAP_STORE (store);
- CamelImapResponse *response;
-
- if (!camel_imap_store_check_online (imap_store, ex))
- return;
- if (!camel_remote_store_connected (CAMEL_REMOTE_STORE (store), ex))
- return;
-
- CAMEL_IMAP_STORE_LOCK(imap_store, command_lock);
- response = camel_imap_command (imap_store, NULL, ex,
- "SUBSCRIBE %S", folder_name);
- CAMEL_IMAP_STORE_UNLOCK(imap_store, command_lock);
- if (response) {
- CamelFolderInfo *fi;
- char *name;
-
- g_hash_table_insert (imap_store->subscribed_folders,
- g_strdup (folder_name),
- GUINT_TO_POINTER (1));
-
- name = strrchr (folder_name, imap_store->dir_sep);
- if (name)
- name++;
-
- fi = g_new0 (CamelFolderInfo, 1);
- fi->full_name = g_strdup (folder_name);
- fi->name = g_strdup (name);
- fi->url = g_strdup_printf ("%s/%s", imap_store->base_url, folder_name);
- fi->unread_message_count = -1;
-
- camel_object_trigger_event (CAMEL_OBJECT (store),
- "folder_created", fi);
-
- camel_folder_info_free (fi);
- }
- camel_imap_response_free (response);
-}
-
-static void
-unsubscribe_folder (CamelStore *store, const char *folder_name,
- CamelException *ex)
-{
- CamelImapStore *imap_store = CAMEL_IMAP_STORE (store);
- CamelImapResponse *response;
- gpointer key, value;
-
- if (!camel_imap_store_check_online (imap_store, ex))
- return;
- if (!camel_remote_store_connected (CAMEL_REMOTE_STORE (store), ex))
- return;
-
- CAMEL_IMAP_STORE_LOCK(imap_store, command_lock);
- response = camel_imap_command (imap_store, NULL, ex,
- "UNSUBSCRIBE %S", folder_name);
- CAMEL_IMAP_STORE_UNLOCK(imap_store, command_lock);
- if (response) {
- CamelFolderInfo *fi;
- char *name;
-
- g_hash_table_lookup_extended (imap_store->subscribed_folders,
- folder_name, &key, &value);
- g_hash_table_remove (imap_store->subscribed_folders,
- folder_name);
- g_free (key);
-
- name = strrchr (folder_name, imap_store->dir_sep);
- if (name)
- name++;
-
- fi = g_new0 (CamelFolderInfo, 1);
- fi->full_name = g_strdup (folder_name);
- fi->name = g_strdup (name);
- fi->url = g_strdup_printf ("%s/%s", imap_store->base_url, folder_name);
- fi->unread_message_count = -1;
-
- camel_object_trigger_event (CAMEL_OBJECT (store),
- "folder_deleted", fi);
-
- camel_folder_info_free (fi);
- }
- camel_imap_response_free (response);
-}
-
-static void
-imap_keepalive (CamelRemoteStore *store)
-{
- CamelImapStore *imap_store = CAMEL_IMAP_STORE (store);
- CamelImapResponse *response;
-
- CAMEL_IMAP_STORE_LOCK(imap_store, command_lock);
- response = camel_imap_command (imap_store, NULL, NULL, "NOOP");
- CAMEL_IMAP_STORE_UNLOCK(imap_store, command_lock);
- camel_imap_response_free (response);
-}
-
-gboolean
-camel_imap_store_check_online (CamelImapStore *store, CamelException *ex)
-{
- /* Hack */
- if (getenv ("CAMEL_OFFLINE")) {
- camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
- _("You must be working online to "
- "complete this operation"));
- return FALSE;
- }
-
- return TRUE;
-}
diff --git a/camel/providers/imap/camel-imap-store.h b/camel/providers/imap/camel-imap-store.h
deleted file mode 100644
index fb4be047c2..0000000000
--- a/camel/providers/imap/camel-imap-store.h
+++ /dev/null
@@ -1,96 +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 <fejj@helixcode.com>
- *
- * 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 "camel-imap-types.h"
-#include "camel-remote-store.h"
-
-#define CAMEL_IMAP_STORE_TYPE (camel_imap_store_get_type ())
-#define CAMEL_IMAP_STORE(obj) (CAMEL_CHECK_CAST((obj), CAMEL_IMAP_STORE_TYPE, CamelImapStore))
-#define CAMEL_IMAP_STORE_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_IMAP_STORE_TYPE, CamelImapStoreClass))
-#define CAMEL_IS_IMAP_STORE(o) (CAMEL_CHECK_TYPE((o), CAMEL_IMAP_STORE_TYPE))
-
-typedef enum {
- IMAP_LEVEL_UNKNOWN,
- IMAP_LEVEL_IMAP4,
- IMAP_LEVEL_IMAP4REV1
-} CamelImapServerLevel;
-
-#define IMAP_CAPABILITY_IMAP4 (1 << 0)
-#define IMAP_CAPABILITY_IMAP4REV1 (1 << 1)
-#define IMAP_CAPABILITY_STATUS (1 << 2)
-#define IMAP_CAPABILITY_NAMESPACE (1 << 3)
-#define IMAP_CAPABILITY_UIDPLUS (1 << 4)
-#define IMAP_CAPABILITY_LITERALPLUS (1 << 5)
-
-#define IMAP_PARAM_OVERRIDE_NAMESPACE (1 << 0)
-#define IMAP_PARAM_CHECK_ALL (1 << 1)
-#define IMAP_PARAM_FILTER_INBOX (1 << 2)
-
-struct _CamelImapStore {
- CamelRemoteStore parent_object;
- struct _CamelImapStorePrivate *priv;
-
- CamelFolder *current_folder;
-
- guint32 command;
-
- CamelImapServerLevel server_level;
- guint32 capabilities, parameters;
- GHashTable *authtypes;
-
- char *namespace, dir_sep, *storage_path, *base_url;
-
- gboolean connected;
-
- GHashTable *subscribed_folders;
- gboolean useful_lsub;
-};
-
-
-typedef struct {
- CamelRemoteStoreClass parent_class;
-
-} CamelImapStoreClass;
-
-
-/* Standard Camel function */
-CamelType camel_imap_store_get_type (void);
-
-gboolean camel_imap_store_check_online (CamelImapStore *store, CamelException *ex);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_IMAP_STORE_H */
diff --git a/camel/providers/imap/camel-imap-summary.c b/camel/providers/imap/camel-imap-summary.c
deleted file mode 100644
index ca7a2ab737..0000000000
--- a/camel/providers/imap/camel-imap-summary.c
+++ /dev/null
@@ -1,200 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000 Helix Code Inc.
- *
- * Authors:
- * Michael Zucchi <notzed@helixcode.com>
- * Dan Winship <danw@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 <sys/stat.h>
-#include <sys/uio.h>
-#include <unistd.h>
-#include <errno.h>
-#include <string.h>
-#include <stdlib.h>
-
-#include "camel-imap-summary.h"
-#include <camel/camel-mime-message.h>
-
-#define CAMEL_IMAP_SUMMARY_VERSION (0x300)
-
-static int summary_header_load (CamelFolderSummary *, FILE *);
-static int summary_header_save (CamelFolderSummary *, FILE *);
-
-static CamelMessageInfo *message_info_load (CamelFolderSummary *s, FILE *in);
-static int message_info_save (CamelFolderSummary *s, FILE *out,
- CamelMessageInfo *info);
-static CamelMessageContentInfo *content_info_load (CamelFolderSummary *s, FILE *in);
-static int content_info_save (CamelFolderSummary *s, FILE *out,
- CamelMessageContentInfo *info);
-
-static void camel_imap_summary_class_init (CamelImapSummaryClass *klass);
-static void camel_imap_summary_init (CamelImapSummary *obj);
-
-static CamelFolderSummaryClass *camel_imap_summary_parent;
-
-CamelType
-camel_imap_summary_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register(
- camel_folder_summary_get_type(), "CamelImapSummary",
- sizeof (CamelImapSummary),
- sizeof (CamelImapSummaryClass),
- (CamelObjectClassInitFunc) camel_imap_summary_class_init,
- NULL,
- (CamelObjectInitFunc) camel_imap_summary_init,
- NULL);
- }
-
- return type;
-}
-
-static void
-camel_imap_summary_class_init (CamelImapSummaryClass *klass)
-{
- CamelFolderSummaryClass *cfs_class = (CamelFolderSummaryClass *) klass;
-
- camel_imap_summary_parent = CAMEL_FOLDER_SUMMARY_CLASS (camel_type_get_global_classfuncs (camel_folder_summary_get_type()));
-
- cfs_class->summary_header_load = summary_header_load;
- cfs_class->summary_header_save = summary_header_save;
- cfs_class->message_info_load = message_info_load;
- cfs_class->message_info_save = message_info_save;
- cfs_class->content_info_load = content_info_load;
- cfs_class->content_info_save = content_info_save;
-}
-
-static void
-camel_imap_summary_init (CamelImapSummary *obj)
-{
- CamelFolderSummary *s = (CamelFolderSummary *)obj;
-
- /* subclasses need to set the right instance data sizes */
- s->message_info_size = sizeof(CamelImapMessageInfo);
- s->content_info_size = sizeof(CamelImapMessageContentInfo);
-
- /* and a unique file version */
- s->version += CAMEL_IMAP_SUMMARY_VERSION;
-}
-
-/**
- * camel_imap_summary_new:
- * @filename: the file to store the summary in.
- *
- * This will create a new CamelImapSummary object and read in the
- * summary data from disk, if it exists.
- *
- * Return value: A new CamelImapSummary object.
- **/
-CamelFolderSummary *
-camel_imap_summary_new (const char *filename)
-{
- CamelFolderSummary *summary = CAMEL_FOLDER_SUMMARY (
- camel_object_new (camel_imap_summary_get_type ()));
- CamelImapSummary *imap_summary = (CamelImapSummary *)summary;
-
- camel_folder_summary_set_build_content (summary, TRUE);
- camel_folder_summary_set_filename (summary, filename);
-
- if (camel_folder_summary_load (summary) == -1) {
- camel_folder_summary_clear (summary);
- camel_folder_summary_touch (summary);
- }
-
- return summary;
-}
-
-
-static int
-summary_header_load (CamelFolderSummary *s, FILE *in)
-{
- CamelImapSummary *ims = CAMEL_IMAP_SUMMARY (s);
-
- if (camel_imap_summary_parent->summary_header_load (s, in) == -1)
- return -1;
-
- return camel_folder_summary_decode_uint32 (in, &ims->validity);
-}
-
-static int
-summary_header_save (CamelFolderSummary *s, FILE *out)
-{
- CamelImapSummary *ims = CAMEL_IMAP_SUMMARY(s);
-
- if (camel_imap_summary_parent->summary_header_save (s, out) == -1)
- return -1;
-
- return camel_folder_summary_encode_uint32 (out, ims->validity);
-}
-
-
-static CamelMessageInfo *
-message_info_load (CamelFolderSummary *s, FILE *in)
-{
- CamelMessageInfo *info;
- CamelImapMessageInfo *iinfo;
-
- info = camel_imap_summary_parent->message_info_load (s, in);
- if (info) {
- iinfo = (CamelImapMessageInfo *)info;
-
- if (camel_folder_summary_decode_uint32 (in, &iinfo->server_flags) == -1)
- goto error;
- }
-
- return info;
-error:
- camel_folder_summary_info_free (s, info);
- return NULL;
-}
-
-static int
-message_info_save (CamelFolderSummary *s, FILE *out, CamelMessageInfo *info)
-{
- CamelImapMessageInfo *iinfo = (CamelImapMessageInfo *)info;
-
- if (camel_imap_summary_parent->message_info_save (s, out, info) == -1)
- return -1;
-
- return camel_folder_summary_encode_uint32 (out, iinfo->server_flags);
-}
-
-
-static CamelMessageContentInfo *
-content_info_load (CamelFolderSummary *s, FILE *in)
-{
- if (fgetc (in))
- return camel_imap_summary_parent->content_info_load (s, in);
- else
- return camel_folder_summary_content_info_new (s);
-}
-
-static int
-content_info_save (CamelFolderSummary *s, FILE *out,
- CamelMessageContentInfo *info)
-{
- if (info->type) {
- fputc (1, out);
- return camel_imap_summary_parent->content_info_save (s, out, info);
- } else
- return fputc (0, out);
-}
diff --git a/camel/providers/imap/camel-imap-summary.h b/camel/providers/imap/camel-imap-summary.h
deleted file mode 100644
index e3e51c5b7d..0000000000
--- a/camel/providers/imap/camel-imap-summary.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (C) 2000 Helix Code Inc.
- *
- * Authors:
- * Michael Zucchi <notzed@helixcode.com>
- * Dan Winship <danw@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_SUMMARY_H
-#define _CAMEL_IMAP_SUMMARY_H
-
-#include "camel-imap-types.h"
-#include <camel/camel-folder-summary.h>
-#include <camel/camel-exception.h>
-
-#define CAMEL_IMAP_SUMMARY(obj) CAMEL_CHECK_CAST (obj, camel_imap_summary_get_type (), CamelImapSummary)
-#define CAMEL_IMAP_SUMMARY_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_imap_summary_get_type (), CamelImapSummaryClass)
-#define CAMEL_IS_IMAP_SUMMARY(obj) CAMEL_CHECK_TYPE (obj, camel_imap_summary_get_type ())
-
-#define CAMEL_IMAP_SERVER_FLAGS (CAMEL_MESSAGE_ANSWERED | \
- CAMEL_MESSAGE_DELETED | \
- CAMEL_MESSAGE_DRAFT | \
- CAMEL_MESSAGE_FLAGGED | \
- CAMEL_MESSAGE_SEEN)
-
-typedef struct _CamelImapSummaryClass CamelImapSummaryClass;
-
-typedef struct _CamelImapMessageContentInfo {
- CamelMessageContentInfo info;
-
-} CamelImapMessageContentInfo;
-
-typedef struct _CamelImapMessageInfo {
- CamelMessageInfo info;
-
- guint32 server_flags;
-} CamelImapMessageInfo;
-
-struct _CamelImapSummary {
- CamelFolderSummary parent;
-
- guint32 validity;
-};
-
-struct _CamelImapSummaryClass {
- CamelFolderSummaryClass parent_class;
-
-};
-
-guint camel_imap_summary_get_type (void);
-CamelFolderSummary *camel_imap_summary_new (const char *filename);
-
-#endif /* ! _CAMEL_IMAP_SUMMARY_H */
-
diff --git a/camel/providers/imap/camel-imap-types.h b/camel/providers/imap/camel-imap-types.h
deleted file mode 100644
index e5d2d18dc1..0000000000
--- a/camel/providers/imap/camel-imap-types.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-imap-types.h: IMAP types */
-
-/*
- * Copyright (C) 2001 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_TYPES_H
-#define CAMEL_IMAP_TYPES_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include "camel-types.h"
-
-typedef struct _CamelImapFolder CamelImapFolder;
-typedef struct _CamelImapMessageCache CamelImapMessageCache;
-typedef struct _CamelImapResponse CamelImapResponse;
-typedef struct _CamelImapSearch CamelImapSearch;
-typedef struct _CamelImapStore CamelImapStore;
-typedef struct _CamelImapSummary CamelImapSummary;
-
-#endif /* CAMEL_IMAP_TYPES_H */
diff --git a/camel/providers/imap/camel-imap-utils.c b/camel/providers/imap/camel-imap-utils.c
deleted file mode 100644
index acbfe46b23..0000000000
--- a/camel/providers/imap/camel-imap-utils.c
+++ /dev/null
@@ -1,568 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@helixcode.com>
- *
- * Copyright 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 Street #330, Boston, MA 02111-1307, USA.
- *
- */
-
-#include <ctype.h>
-#include <stdio.h>
-#include <string.h>
-#include <time.h>
-
-#include "camel-imap-utils.h"
-#include "camel-imap-summary.h"
-#include "camel-folder.h"
-
-#define d(x) x
-
-char *
-imap_next_word (const char *buf)
-{
- char *word;
-
- /* skip over current word */
- for (word = (char *)buf; *word && *word != ' '; word++);
-
- /* skip over white space */
- for ( ; *word && *word == ' '; word++);
-
- return word;
-}
-
-/**
- * imap_parse_list_response:
- * @buf: the LIST or LSUB response
- * @flags: a pointer to a variable to store the flags in, or %NULL
- * @sep: a pointer to a variable to store the hierarchy separator in, or %NULL
- * @folder: a pointer to a variable to store the folder name in, or %NULL
- *
- * Parses a LIST or LSUB response and returns the desired parts of it.
- * If @folder is non-%NULL, its value must be freed by the caller.
- *
- * Return value: whether or not the response was successfully parsed.
- **/
-gboolean
-imap_parse_list_response (const char *buf, int *flags, char *sep, char **folder)
-{
- char *word;
- int len;
-
- if (*buf != '*')
- return FALSE;
-
- word = imap_next_word (buf);
- if (g_strncasecmp (word, "LIST", 4) && g_strncasecmp (word, "LSUB", 4))
- return FALSE;
-
- /* get the flags */
- word = imap_next_word (word);
- if (*word != '(')
- return FALSE;
-
- if (flags)
- *flags = 0;
-
- word++;
- while (*word != ')') {
- len = strcspn (word, " )");
- if (flags) {
- if (!g_strncasecmp (word, "\\Noinferiors", len))
- *flags |= IMAP_LIST_FLAG_NOINFERIORS;
- else if (!g_strncasecmp (word, "\\Noselect", len))
- *flags |= IMAP_LIST_FLAG_NOSELECT;
- else if (!g_strncasecmp (word, "\\Marked", len))
- *flags |= IMAP_LIST_FLAG_MARKED;
- else if (!g_strncasecmp (word, "\\Unmarked", len))
- *flags |= IMAP_LIST_FLAG_UNMARKED;
- }
-
- word += len;
- while (*word == ' ')
- word++;
- }
-
- /* get the directory separator */
- word = imap_next_word (word);
- if (!strncmp (word, "NIL", 3)) {
- if (sep)
- *sep = '\0';
- } else if (*word++ == '"') {
- if (*word == '\\')
- word++;
- if (sep)
- *sep = *word;
- word++;
- if (*word++ != '"')
- return FALSE;
- } else
- return FALSE;
-
- if (folder) {
- /* get the folder name */
- word = imap_next_word (word);
- *folder = imap_parse_astring (&word, &len);
- return *folder != NULL;
- }
-
- return TRUE;
-}
-
-char *
-imap_create_flag_list (guint32 flags)
-{
- GString *gstr;
- char *flag_list;
-
- gstr = g_string_new ("(");
-
- if (flags & CAMEL_MESSAGE_ANSWERED)
- g_string_append (gstr, "\\Answered ");
- if (flags & CAMEL_MESSAGE_DELETED)
- g_string_append (gstr, "\\Deleted ");
- if (flags & CAMEL_MESSAGE_DRAFT)
- g_string_append (gstr, "\\Draft ");
- if (flags & CAMEL_MESSAGE_FLAGGED)
- g_string_append (gstr, "\\Flagged ");
- if (flags & CAMEL_MESSAGE_SEEN)
- g_string_append (gstr, "\\Seen ");
-
- if (gstr->str[gstr->len - 1] == ' ')
- gstr->str[gstr->len - 1] = ')';
- else
- g_string_append_c (gstr, ')');
-
- flag_list = gstr->str;
- g_string_free (gstr, FALSE);
- return flag_list;
-}
-
-guint32
-imap_parse_flag_list (char **flag_list_p)
-{
- char *flag_list = *flag_list_p;
- guint32 flags = 0;
- int len;
-
- if (*flag_list++ != '(') {
- *flag_list_p = NULL;
- return 0;
- }
-
- while (*flag_list && *flag_list != ')') {
- len = strcspn (flag_list, " )");
- if (!g_strncasecmp (flag_list, "\\Answered", len))
- flags |= CAMEL_MESSAGE_ANSWERED;
- else if (!g_strncasecmp (flag_list, "\\Deleted", len))
- flags |= CAMEL_MESSAGE_DELETED;
- else if (!g_strncasecmp (flag_list, "\\Draft", len))
- flags |= CAMEL_MESSAGE_DRAFT;
- else if (!g_strncasecmp (flag_list, "\\Flagged", len))
- flags |= CAMEL_MESSAGE_FLAGGED;
- else if (!g_strncasecmp (flag_list, "\\Seen", len))
- flags |= CAMEL_MESSAGE_SEEN;
-
- flag_list += len;
- if (*flag_list == ' ')
- flag_list++;
- }
-
- if (*flag_list++ != ')') {
- *flag_list_p = NULL;
- return 0;
- }
-
- *flag_list_p = flag_list;
- return flags;
-}
-
-static char imap_atom_specials[128] = {
- 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,
- 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 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, 1, 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, 1, 0, 0, 0, 0,
-};
-#define imap_is_atom_char(ch) (isprint (ch) && !imap_atom_specials[ch])
-
-/**
- * imap_parse_string_generic:
- * @str_p: a pointer to a string
- * @len: a pointer to an int to return the length in
- * @type: type of string (#IMAP_STRING, #IMAP_ASTRING, or #IMAP_NSTRING)
- * to parse.
- *
- * This parses an IMAP "string" (quoted string or literal), "nstring"
- * (NIL or string), or "astring" (atom or string) starting at *@str_p.
- * On success, *@str_p will point to the first character after the end
- * of the string, and *@len will contain the length of the returned
- * string. On failure, *@str_p will be set to %NULL.
- *
- * This assumes that the string is in the form returned by
- * camel_imap_command(): that line breaks are indicated by LF rather
- * than CRLF.
- *
- * Return value: the parsed string, or %NULL if a NIL or no string
- * was parsed. (In the former case, *@str_p will be %NULL; in the
- * latter, it will point to the character after the NIL.)
- **/
-char *
-imap_parse_string_generic (char **str_p, int *len, int type)
-{
- char *str = *str_p;
- char *out;
-
- if (!str)
- return NULL;
- else if (*str == '"') {
- char *p;
- int size;
-
- str++;
- size = strcspn (str, "\"") + 1;
- p = out = g_malloc (size);
-
- while (*str && *str != '"') {
- if (*str == '\\')
- str++;
- *p++ = *str++;
- if (p - out == size) {
- out = g_realloc (out, size * 2);
- p = out + size;
- size *= 2;
- }
- }
- if (*str != '"') {
- *str_p = NULL;
- g_free (out);
- return NULL;
- }
- *p = '\0';
- *str_p = str + 1;
- *len = strlen (out);
- return out;
- } else if (*str == '{') {
- *len = strtoul (str + 1, (char **)&str, 10);
- if (*str++ != '}' || *str++ != '\n' || strlen (str) < *len) {
- *str_p = NULL;
- return NULL;
- }
-
- out = g_strndup (str, *len);
- *str_p = str + *len;
- return out;
- } else if (type == IMAP_NSTRING && !g_strncasecmp (str, "nil", 3)) {
- *str_p += 3;
- *len = 0;
- return NULL;
- } else if (type == IMAP_ASTRING &&
- imap_is_atom_char ((unsigned char)*str)) {
- while (imap_is_atom_char ((unsigned char)*str))
- str++;
-
- *len = str - *str_p;
- str = g_strndup (*str_p, *len);
- *str_p += *len;
- return str;
- } else {
- *str_p = NULL;
- return NULL;
- }
-}
-
-static inline void
-skip_char (char **str_p, char ch)
-{
- if (*str_p && **str_p == ch)
- *str_p = *str_p + 1;
- else
- *str_p = NULL;
-}
-
-/* Skip atom, string, or number */
-static void
-skip_asn (char **str_p)
-{
- char *str = *str_p;
-
- if (!str)
- return;
- else if (*str == '"') {
- while (*++str && *str != '"') {
- if (*str == '\\') {
- str++;
- if (!*str)
- break;
- }
- }
- if (*str == '"')
- *str_p = str + 1;
- else
- *str_p = NULL;
- } else if (*str == '{') {
- unsigned long len;
-
- len = strtoul (str + 1, &str, 10);
- if (*str != '}' || *(str + 1) != '\n' ||
- strlen (str + 2) < len) {
- *str_p = NULL;
- return;
- }
- *str_p = str + 2 + len;
- } else {
- /* We assume the string is well-formed and don't
- * bother making sure it's a valid atom.
- */
- while (*str && *str != ')' && *str != ' ')
- str++;
- *str_p = str;
- }
-}
-
-void
-imap_skip_list (char **str_p)
-{
- skip_char (str_p, '(');
- while (*str_p && **str_p != ')') {
- if (**str_p == '(')
- imap_skip_list (str_p);
- else
- skip_asn (str_p);
- if (*str_p && **str_p == ' ')
- skip_char (str_p, ' ');
- }
- skip_char (str_p, ')');
-}
-
-static void
-parse_params (char **parms_p, CamelContentType *type)
-{
- char *parms = *parms_p, *name, *value;
- int len;
-
- if (!g_strncasecmp (parms, "nil", 3)) {
- *parms_p += 3;
- return;
- }
-
- if (*parms++ != '(') {
- *parms_p = NULL;
- return;
- }
-
- while (parms && *parms != ')') {
- name = imap_parse_nstring (&parms, &len);
- skip_char (&parms, ' ');
- value = imap_parse_nstring (&parms, &len);
-
- if (name && value)
- header_content_type_set_param (type, name, value);
- g_free (name);
- g_free (value);
-
- if (parms && *parms == ' ')
- parms++;
- }
-
- if (!parms || *parms++ != ')') {
- *parms_p = NULL;
- return;
- }
- *parms_p = parms;
-}
-
-/**
- * imap_parse_body:
- * @body_p: pointer to the start of an IMAP "body"
- * @folder: an imap folder
- * @ci: a CamelMessageContentInfo to fill in
- *
- * This filles in @ci with data from *@body_p. On success *@body_p
- * will point to the character after the body. On failure, it will be
- * set to %NULL and @ci will be unchanged.
- **/
-void
-imap_parse_body (char **body_p, CamelFolder *folder,
- CamelMessageContentInfo *ci)
-{
- char *body = *body_p;
- CamelMessageContentInfo *child;
- CamelContentType *type;
- int len;
-
- if (*body++ != '(') {
- *body_p = NULL;
- return;
- }
-
- if (*body == '(') {
- /* multipart */
- GPtrArray *children;
- char *subtype;
- int i;
-
- /* Parse the child body parts */
- children = g_ptr_array_new ();
- i = 0;
- while (body && *body == '(') {
- child = camel_folder_summary_content_info_new (folder->summary);
- g_ptr_array_add (children, child);
- imap_parse_body (&body, folder, child);
- if (!body)
- break;
- child->parent = ci;
- }
- skip_char (&body, ' ');
-
- /* Parse the multipart subtype */
- subtype = imap_parse_string (&body, &len);
-
- /* If there is a parse error, abort. */
- if (!body) {
- for (i = 0; i < children->len; i++) {
- child = children->pdata[i];
- camel_folder_summary_content_info_free (folder->summary, child);
- }
- g_ptr_array_free (children, TRUE);
- *body_p = NULL;
- return;
- }
-
- g_strdown (subtype);
- ci->type = header_content_type_new ("multipart", subtype);
- g_free (subtype);
-
- /* Chain the children. */
- ci->childs = children->pdata[0];
- ci->size = 0;
- for (i = 0; i < children->len - 1; i++) {
- child = children->pdata[i];
- child->next = children->pdata[i + 1];
- ci->size += child->size;
- }
- g_ptr_array_free (children, TRUE);
- } else {
- /* single part */
- char *main_type, *subtype;
- char *id, *description, *encoding;
- guint32 size;
-
- main_type = imap_parse_string (&body, &len);
- skip_char (&body, ' ');
- subtype = imap_parse_string (&body, &len);
- skip_char (&body, ' ');
- if (!body) {
- g_free (main_type);
- g_free (subtype);
- *body_p = NULL;
- return;
- }
- g_strdown (main_type);
- g_strdown (subtype);
- type = header_content_type_new (main_type, subtype);
- g_free (main_type);
- g_free (subtype);
- parse_params (&body, type);
- skip_char (&body, ' ');
-
- id = imap_parse_nstring (&body, &len);
- skip_char (&body, ' ');
- description = imap_parse_nstring (&body, &len);
- skip_char (&body, ' ');
- encoding = imap_parse_string (&body, &len);
- skip_char (&body, ' ');
- if (body)
- size = strtoul (body, &body, 10);
-
- child = NULL;
- if (header_content_type_is (type, "message", "rfc822")) {
- skip_char (&body, ' ');
- imap_skip_list (&body); /* envelope */
- skip_char (&body, ' ');
- child = camel_folder_summary_content_info_new (folder->summary);
- imap_parse_body (&body, folder, child);
- if (!body)
- camel_folder_summary_content_info_free (folder->summary, child);
- skip_char (&body, ' ');
- if (body)
- strtoul (body, &body, 10);
- } else if (header_content_type_is (type, "text", "*")) {
- if (body)
- strtoul (body, &body, 10);
- }
-
- if (body) {
- ci->type = type;
- ci->id = id;
- ci->description = description;
- ci->encoding = encoding;
- ci->size = size;
- ci->childs = child;
- } else {
- header_content_type_unref (type);
- g_free (id);
- g_free (description);
- g_free (encoding);
- }
- }
-
- if (!body || *body++ != ')') {
- *body_p = NULL;
- return;
- }
-
- *body_p = body;
-}
-
-/**
- * imap_quote_string:
- * @str: the string to quote, which must not contain CR or LF
- *
- * Return value: an IMAP "quoted" corresponding to the string, which
- * the caller must free.
- **/
-char *
-imap_quote_string (const char *str)
-{
- const char *p;
- char *quoted, *q;
- int len;
-
- len = strlen (str);
- p = str;
- while ((p = strpbrk (p, "\"\\"))) {
- len++;
- p++;
- }
-
- quoted = q = g_malloc (len + 3);
- *q++ = '"';
- while ((p = strpbrk (str, "\"\\"))) {
- memcpy (q, str, p - str);
- q += p - str;
- *q++ = '\\';
- *q++ = *p++;
- str = p;
- }
- sprintf (q, "%s\"", str);
-
- return quoted;
-}
diff --git a/camel/providers/imap/camel-imap-utils.h b/camel/providers/imap/camel-imap-utils.h
deleted file mode 100644
index 77bc51f9bc..0000000000
--- a/camel/providers/imap/camel-imap-utils.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@helixcode.com>
- *
- * Copyright 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 Street #330, Boston, MA 02111-1307, USA.
- *
- */
-
-#ifndef CAMEL_IMAP_UTILS_H
-#define CAMEL_IMAP_UTILS_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include "camel-folder-summary.h"
-
-char *imap_next_word (const char *buf);
-
-#define IMAP_LIST_FLAG_NOINFERIORS (1 << 0)
-#define IMAP_LIST_FLAG_NOSELECT (1 << 1)
-#define IMAP_LIST_FLAG_MARKED (1 << 2)
-#define IMAP_LIST_FLAG_UNMARKED (1 << 3)
-gboolean imap_parse_list_response (const char *buf, int *flags, char *sep, char **folder);
-
-char *imap_create_flag_list (guint32 flags);
-guint32 imap_parse_flag_list (char **flag_list);
-
-enum { IMAP_STRING, IMAP_NSTRING, IMAP_ASTRING };
-char *imap_parse_string_generic (char **str_p, int *len, int type);
-#define imap_parse_string(str_p, len_p) \
- imap_parse_string_generic (str_p, len_p, IMAP_STRING)
-#define imap_parse_nstring(str_p, len_p) \
- imap_parse_string_generic (str_p, len_p, IMAP_NSTRING)
-#define imap_parse_astring(str_p, len_p) \
- imap_parse_string_generic (str_p, len_p, IMAP_ASTRING)
-
-void imap_parse_body (char **body_p, CamelFolder *folder,
- CamelMessageContentInfo *ci);
-
-char *imap_quote_string (const char *str);
-
-void imap_skip_list (char **str_p);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_IMAP_UTILS_H */
diff --git a/camel/providers/imap/camel-imap-wrapper.c b/camel/providers/imap/camel-imap-wrapper.c
deleted file mode 100644
index 20ad0c730a..0000000000
--- a/camel/providers/imap/camel-imap-wrapper.c
+++ /dev/null
@@ -1,220 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; -*- */
-/* camel-imap-wrapper.c: data wrapper for offline IMAP data */
-
-/*
- * Author: Dan Winship <danw@helixcode.com>
- *
- * 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <errno.h>
-#include <string.h>
-
-#include "camel-imap-folder.h"
-#include "camel-imap-wrapper.h"
-#include "camel-imap-private.h"
-#include "camel-exception.h"
-#include "camel-stream-filter.h"
-#include "camel-mime-filter-basic.h"
-#include "camel-mime-filter-crlf.h"
-#include "camel-mime-filter-charset.h"
-#include "camel-mime-part.h"
-
-static CamelDataWrapperClass *parent_class = NULL;
-
-/* Returns the class for a CamelDataWrapper */
-#define CDW_CLASS(so) CAMEL_DATA_WRAPPER_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-
-static int write_to_stream (CamelDataWrapper *imap_wrapper, CamelStream *stream);
-
-static void
-camel_imap_wrapper_class_init (CamelImapWrapperClass *camel_imap_wrapper_class)
-{
- CamelDataWrapperClass *camel_data_wrapper_class =
- CAMEL_DATA_WRAPPER_CLASS (camel_imap_wrapper_class);
-
- parent_class = CAMEL_DATA_WRAPPER_CLASS (camel_type_get_global_classfuncs (camel_data_wrapper_get_type ()));
-
- /* virtual method override */
- camel_data_wrapper_class->write_to_stream = write_to_stream;
-}
-
-static void
-camel_imap_wrapper_finalize (CamelObject *object)
-{
- CamelImapWrapper *imap_wrapper = CAMEL_IMAP_WRAPPER (object);
-
- if (imap_wrapper->folder)
- camel_object_unref (CAMEL_OBJECT (imap_wrapper->folder));
- if (imap_wrapper->uid)
- g_free (imap_wrapper->uid);
- if (imap_wrapper->part)
- g_free (imap_wrapper->part_spec);
-
-#ifdef ENABLE_THREADS
- g_mutex_free (imap_wrapper->priv->lock);
-#endif
- g_free (imap_wrapper->priv);
-}
-
-static void
-camel_imap_wrapper_init (gpointer object, gpointer klass)
-{
- CamelImapWrapper *imap_wrapper = CAMEL_IMAP_WRAPPER (object);
-
- imap_wrapper->priv = g_new0 (struct _CamelImapWrapperPrivate, 1);
-#ifdef ENABLE_THREADS
- imap_wrapper->priv->lock = g_mutex_new ();
-#endif
-}
-
-CamelType
-camel_imap_wrapper_get_type (void)
-{
- static CamelType camel_imap_wrapper_type = CAMEL_INVALID_TYPE;
-
- if (camel_imap_wrapper_type == CAMEL_INVALID_TYPE) {
- camel_imap_wrapper_type = camel_type_register (
- CAMEL_DATA_WRAPPER_TYPE, "CamelImapWrapper",
- sizeof (CamelImapWrapper),
- sizeof (CamelImapWrapperClass),
- (CamelObjectClassInitFunc) camel_imap_wrapper_class_init,
- NULL,
- (CamelObjectInitFunc) camel_imap_wrapper_init,
- (CamelObjectFinalizeFunc) camel_imap_wrapper_finalize);
- }
-
- return camel_imap_wrapper_type;
-}
-
-
-static void
-imap_wrapper_hydrate (CamelImapWrapper *imap_wrapper, CamelStream *stream)
-{
- CamelDataWrapper *data_wrapper = CAMEL_DATA_WRAPPER (imap_wrapper);
- CamelStreamFilter *filterstream;
- CamelMimeFilter *filter;
- CamelContentType *ct;
-
- filterstream = camel_stream_filter_new_with_stream (stream);
-
- if (camel_mime_part_get_encoding (imap_wrapper->part) ==
- CAMEL_MIME_PART_ENCODING_BASE64) {
- filter = (CamelMimeFilter *)camel_mime_filter_basic_new_type (CAMEL_MIME_FILTER_BASIC_BASE64_DEC);
- camel_stream_filter_add (filterstream, filter);
- } else if (camel_mime_part_get_encoding (imap_wrapper->part) ==
- CAMEL_MIME_PART_ENCODING_QUOTEDPRINTABLE) {
- filter = (CamelMimeFilter *)camel_mime_filter_basic_new_type (CAMEL_MIME_FILTER_BASIC_QP_DEC);
- camel_stream_filter_add (filterstream, filter);
- } else
- filter = NULL;
-
- ct = camel_mime_part_get_content_type (imap_wrapper->part);
- if (header_content_type_is (ct, "text", "*")) {
- const char *charset;
-
- /* If we just did B64/QP, need to also do CRLF->LF */
- if (filter) {
- filter = camel_mime_filter_crlf_new (CAMEL_MIME_FILTER_CRLF_DECODE,
- CAMEL_MIME_FILTER_CRLF_MODE_CRLF_ONLY);
- camel_stream_filter_add (filterstream, filter);
- }
-
- charset = header_content_type_param (ct, "charset");
- if (charset && !(strcasecmp (charset, "us-ascii") == 0
- || strcasecmp (charset, "utf-8") == 0)) {
- filter = (CamelMimeFilter *)camel_mime_filter_charset_new_convert (charset, "UTF-8");
- if (filter)
- camel_stream_filter_add (filterstream, filter);
- }
- }
-
- data_wrapper->stream = CAMEL_STREAM (filterstream);
- data_wrapper->offline = FALSE;
-
- camel_object_unref (CAMEL_OBJECT (imap_wrapper->folder));
- imap_wrapper->folder = NULL;
- g_free (imap_wrapper->uid);
- imap_wrapper->uid = NULL;
- g_free (imap_wrapper->part_spec);
- imap_wrapper->part = NULL;
-}
-
-
-static int
-write_to_stream (CamelDataWrapper *data_wrapper, CamelStream *stream)
-{
- CamelImapWrapper *imap_wrapper = CAMEL_IMAP_WRAPPER (data_wrapper);
-
- CAMEL_IMAP_WRAPPER_LOCK (imap_wrapper, lock);
- if (data_wrapper->offline) {
- CamelStream *datastream;
-
- datastream = camel_imap_folder_fetch_data (
- imap_wrapper->folder, imap_wrapper->uid,
- imap_wrapper->part_spec, FALSE, NULL);
- if (!datastream) {
- CAMEL_IMAP_WRAPPER_UNLOCK (imap_wrapper, lock);
- errno = ENETUNREACH;
- return -1;
- }
-
- imap_wrapper_hydrate (imap_wrapper, datastream);
- camel_object_unref (CAMEL_OBJECT (datastream));
- }
- CAMEL_IMAP_WRAPPER_UNLOCK (imap_wrapper, lock);
-
- return parent_class->write_to_stream (data_wrapper, stream);
-}
-
-
-CamelDataWrapper *
-camel_imap_wrapper_new (CamelImapFolder *imap_folder, CamelContentType *type,
- const char *uid, const char *part_spec,
- CamelMimePart *part)
-{
- CamelImapWrapper *imap_wrapper;
- CamelStream *stream;
-
- imap_wrapper = (CamelImapWrapper *)camel_object_new(camel_imap_wrapper_get_type());
-
- camel_data_wrapper_set_mime_type_field (CAMEL_DATA_WRAPPER (imap_wrapper), type);
- ((CamelDataWrapper *)imap_wrapper)->offline = TRUE;
-
- imap_wrapper->folder = imap_folder;
- camel_object_ref (CAMEL_OBJECT (imap_folder));
- imap_wrapper->uid = g_strdup (uid);
- imap_wrapper->part_spec = g_strdup (part_spec);
-
- /* Don't ref this, it's our parent. */
- imap_wrapper->part = part;
-
- /* Try the cache. */
- stream = camel_imap_folder_fetch_data (imap_folder, uid, part_spec,
- TRUE, NULL);
- if (stream) {
- imap_wrapper_hydrate (imap_wrapper, stream);
- camel_object_unref (CAMEL_OBJECT (stream));
- }
-
- return (CamelDataWrapper *)imap_wrapper;
-}
diff --git a/camel/providers/imap/camel-imap-wrapper.h b/camel/providers/imap/camel-imap-wrapper.h
deleted file mode 100644
index 38bfd62fe2..0000000000
--- a/camel/providers/imap/camel-imap-wrapper.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-imap-wrapper.h: data wrapper for offline IMAP data */
-
-/*
- * 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_IMAP_WRAPPER_H
-#define CAMEL_IMAP_WRAPPER_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include <camel/camel-data-wrapper.h>
-#include "camel-imap-types.h"
-
-#define CAMEL_IMAP_WRAPPER_TYPE (camel_imap_wrapper_get_type ())
-#define CAMEL_IMAP_WRAPPER(obj) (CAMEL_CHECK_CAST((obj), CAMEL_IMAP_WRAPPER_TYPE, CamelImapWrapper))
-#define CAMEL_IMAP_WRAPPER_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_IMAP_WRAPPER_TYPE, CamelImapWrapperClass))
-#define CAMEL_IS_IMAP_WRAPPER(o) (CAMEL_CHECK_TYPE((o), CAMEL_IMAP_WRAPPER_TYPE))
-
-typedef struct
-{
- CamelDataWrapper parent_object;
-
- struct _CamelImapWrapperPrivate *priv;
-
- CamelImapFolder *folder;
- char *uid, *part_spec;
- CamelMimePart *part;
-} CamelImapWrapper;
-
-typedef struct {
- CamelDataWrapperClass parent_class;
-
-} CamelImapWrapperClass;
-
-/* Standard Camel function */
-CamelType camel_imap_wrapper_get_type (void);
-
-/* Constructor */
-CamelDataWrapper *camel_imap_wrapper_new (CamelImapFolder *imap_folder,
- CamelContentType *type,
- const char *uid,
- const char *part_spec,
- CamelMimePart *part);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_DATA_WRAPPER_H */
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/local/.cvsignore b/camel/providers/local/.cvsignore
deleted file mode 100644
index 3fa8afaa38..0000000000
--- a/camel/providers/local/.cvsignore
+++ /dev/null
@@ -1,11 +0,0 @@
-.deps
-Makefile
-Makefile.in
-.libs
-.deps
-*.lo
-*.la
-*.bb
-*.bbg
-*.da
-*.gcov
diff --git a/camel/providers/local/Makefile.am b/camel/providers/local/Makefile.am
deleted file mode 100644
index 9130f62f81..0000000000
--- a/camel/providers/local/Makefile.am
+++ /dev/null
@@ -1,58 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-libcamellocalincludedir = $(includedir)/camel
-
-providerdir = $(pkglibdir)/camel-providers/$(VERSION)
-
-provider_LTLIBRARIES = libcamellocal.la
-provider_DATA = libcamellocal.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) \
- $(GNOME_INCLUDEDIR) \
- $(GTK_INCLUDEDIR) \
- -DG_LOG_DOMAIN=\"camel-local-provider\"
-
-libcamellocal_la_SOURCES = \
- camel-local-folder.c \
- camel-local-store.c \
- camel-local-summary.c \
- camel-local-provider.c \
- camel-mh-folder.c \
- camel-mh-store.c \
- camel-mh-summary.c \
- camel-mbox-folder.c \
- camel-mbox-store.c \
- camel-mbox-summary.c \
- camel-maildir-folder.c \
- camel-maildir-store.c \
- camel-maildir-summary.c
-
-libcamellocalinclude_HEADERS = \
- camel-local-folder.h \
- camel-local-store.h \
- camel-local-summary.h \
- camel-mh-folder.h \
- camel-mh-store.h \
- camel-mh-summary.h \
- camel-mbox-folder.h \
- camel-mbox-store.h \
- camel-mbox-summary.h \
- camel-maildir-folder.h \
- camel-maildir-store.h \
- camel-maildir-summary.h
-
-noinst_HEADERS = \
- camel-local-private.h
-
-libcamellocal_la_LDFLAGS = -version-info 0:0:0
-
-libcamellocal_la_LIBADD = $(top_builddir)/e-util/libeutil.la $(top_builddir)/libibex/libibex.la $(UNICODE_LIBS)
-
-EXTRA_DIST = libcamellocal.urls
diff --git a/camel/providers/local/camel-local-folder.c b/camel/providers/local/camel-local-folder.c
deleted file mode 100644
index 205606fc90..0000000000
--- a/camel/providers/local/camel-local-folder.c
+++ /dev/null
@@ -1,351 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; fill-column: 160 -*-
- *
- * Authors: Michael Zucchi <notzed@helixcode.com>
- *
- * 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdlib.h>
-#include <sys/types.h>
-#include <dirent.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <errno.h>
-#include <string.h>
-#include <fcntl.h>
-
-#include "camel-local-folder.h"
-#include "camel-local-store.h"
-#include "string-utils.h"
-#include "camel-stream-fs.h"
-#include "camel-local-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"
-
-#include "camel-local-private.h"
-
-#define d(x) /*(printf("%s(%d): ", __FILE__, __LINE__),(x))*/
-
-static CamelFolderClass *parent_class = NULL;
-
-/* Returns the class for a CamelLocalFolder */
-#define CLOCALF_CLASS(so) CAMEL_LOCAL_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-#define CF_CLASS(so) CAMEL_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-#define CLOCALS_CLASS(so) CAMEL_STORE_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-
-static int local_lock(CamelLocalFolder *lf, CamelLockType type, CamelException *ex);
-static void local_unlock(CamelLocalFolder *lf);
-
-static void local_sync(CamelFolder *folder, gboolean expunge, CamelException *ex);
-static void local_expunge(CamelFolder *folder, CamelException *ex);
-
-static GPtrArray *local_search_by_expression(CamelFolder *folder, const char *expression, CamelException *ex);
-static void local_search_free(CamelFolder *folder, GPtrArray * result);
-
-static void local_finalize(CamelObject * object);
-
-static void
-camel_local_folder_class_init(CamelLocalFolderClass * camel_local_folder_class)
-{
- CamelFolderClass *camel_folder_class = CAMEL_FOLDER_CLASS(camel_local_folder_class);
-
- parent_class = CAMEL_FOLDER_CLASS(camel_type_get_global_classfuncs(camel_folder_get_type()));
-
- /* virtual method definition */
-
- /* virtual method overload */
- camel_folder_class->sync = local_sync;
- camel_folder_class->expunge = local_expunge;
-
- camel_folder_class->search_by_expression = local_search_by_expression;
- camel_folder_class->search_free = local_search_free;
-
- camel_local_folder_class->lock = local_lock;
- camel_local_folder_class->unlock = local_unlock;
-}
-
-static void
-local_init(gpointer object, gpointer klass)
-{
- CamelFolder *folder = object;
- CamelLocalFolder *local_folder = object;
-
- 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;
-
- folder->summary = NULL;
- local_folder->search = NULL;
-
- local_folder->priv = g_malloc0(sizeof(*local_folder->priv));
-#ifdef ENABLE_THREADS
- local_folder->priv->search_lock = g_mutex_new();
-#endif
-}
-
-static void
-local_finalize(CamelObject * object)
-{
- CamelLocalFolder *local_folder = CAMEL_LOCAL_FOLDER(object);
- CamelFolder *folder = (CamelFolder *)object;
-
- if (folder->summary) {
- camel_local_summary_sync((CamelLocalSummary *)folder->summary, FALSE, local_folder->changes, NULL);
- camel_object_unref((CamelObject *)folder->summary);
- folder->summary = NULL;
- }
-
- if (local_folder->search) {
- camel_object_unref((CamelObject *)local_folder->search);
- }
-
- /* must free index after summary, since it isn't refcounted */
- if (local_folder->index)
- ibex_close(local_folder->index);
-
- while (local_folder->locked> 0)
- camel_local_folder_unlock(local_folder);
-
- g_free(local_folder->base_path);
- g_free(local_folder->folder_path);
- g_free(local_folder->summary_path);
- g_free(local_folder->index_path);
-
- camel_folder_change_info_free(local_folder->changes);
-
-#ifdef ENABLE_THREADS
- g_mutex_free(local_folder->priv->search_lock);
-#endif
- g_free(local_folder->priv);
-}
-
-CamelType camel_local_folder_get_type(void)
-{
- static CamelType camel_local_folder_type = CAMEL_INVALID_TYPE;
-
- if (camel_local_folder_type == CAMEL_INVALID_TYPE) {
- camel_local_folder_type = camel_type_register(CAMEL_FOLDER_TYPE, "CamelLocalFolder",
- sizeof(CamelLocalFolder),
- sizeof(CamelLocalFolderClass),
- (CamelObjectClassInitFunc) camel_local_folder_class_init,
- NULL,
- (CamelObjectInitFunc) local_init,
- (CamelObjectFinalizeFunc) local_finalize);
- }
-
- return camel_local_folder_type;
-}
-
-CamelLocalFolder *
-camel_local_folder_construct(CamelLocalFolder *lf, CamelStore *parent_store, const char *full_name, guint32 flags, CamelException *ex)
-{
- CamelFolderInfo *fi;
- CamelFolder *folder;
- const char *root_dir_path, *name;
- struct stat st;
- int forceindex;
-
- folder = (CamelFolder *)lf;
-
- name = strrchr(full_name, '/');
- if (name)
- name++;
- else
- name = full_name;
-
- camel_folder_construct(folder, parent_store, full_name, name);
-
- root_dir_path = camel_local_store_get_toplevel_dir(CAMEL_LOCAL_STORE(folder->parent_store));
-
- lf->base_path = g_strdup(root_dir_path);
- lf->folder_path = g_strdup_printf("%s/%s", root_dir_path, full_name);
- lf->summary_path = g_strdup_printf("%s/%s.ev-summary", root_dir_path, full_name);
- lf->index_path = g_strdup_printf("%s/%s.ibex", root_dir_path, full_name);
-
- lf->changes = camel_folder_change_info_new();
-
- /* if we have no index file, force it */
- forceindex = stat(lf->index_path, &st) == -1;
- if (flags & CAMEL_STORE_FOLDER_BODY_INDEX) {
-
- lf->index = ibex_open(lf->index_path, O_CREAT | O_RDWR, 0600);
- if (lf->index == NULL) {
- /* yes, this isn't fatal at all */
- g_warning("Could not open/create index file: %s: indexing not performed", strerror(errno));
- forceindex = FALSE;
- /* record that we dont have an index afterall */
- flags &= ~CAMEL_STORE_FOLDER_BODY_INDEX;
- }
- } else {
- /* if we do have an index file, remove it */
- if (forceindex == FALSE) {
- unlink(lf->index_path);
- }
- forceindex = FALSE;
- }
-
- lf->flags = flags;
-
- folder->summary = (CamelFolderSummary *)CLOCALF_CLASS(lf)->create_summary(lf->summary_path, lf->folder_path, lf->index);
- if (camel_local_summary_load((CamelLocalSummary *)folder->summary, forceindex, ex) == -1) {
- camel_object_unref (CAMEL_OBJECT (folder));
- return NULL;
- }
-
- fi = g_new0 (CamelFolderInfo, 1);
- fi->full_name = g_strdup (full_name);
- fi->name = g_strdup (name);
- fi->url = g_strdup (lf->folder_path);
- fi->unread_message_count = -1;
-
- camel_object_trigger_event (CAMEL_OBJECT (parent_store),
- "folder_deleted", fi);
-
- camel_folder_info_free (fi);
-
- return lf;
-}
-
-/* lock the folder, may be called repeatedly (with matching unlock calls),
- with type the same or less than the first call */
-int camel_local_folder_lock(CamelLocalFolder *lf, CamelLockType type, CamelException *ex)
-{
- if (lf->locked > 0) {
- /* lets be anal here - its important the code knows what its doing */
- g_assert(lf->locktype == type || lf->locktype == CAMEL_LOCK_WRITE);
- } else {
- if (CLOCALF_CLASS(lf)->lock(lf, type, ex) == -1)
- return -1;
- lf->locktype = type;
- }
-
- lf->locked++;
-
- return 0;
-}
-
-/* unlock folder */
-int camel_local_folder_unlock(CamelLocalFolder *lf)
-{
- g_assert(lf->locked>0);
- lf->locked--;
- if (lf->locked == 0)
- CLOCALF_CLASS(lf)->unlock(lf);
-
- return 0;
-}
-
-static int
-local_lock(CamelLocalFolder *lf, CamelLockType type, CamelException *ex)
-{
- return 0;
-}
-
-static void
-local_unlock(CamelLocalFolder *lf)
-{
- /* nothing */
-}
-
-static void
-local_sync(CamelFolder *folder, gboolean expunge, CamelException *ex)
-{
- CamelLocalFolder *lf = CAMEL_LOCAL_FOLDER(folder);
-
- d(printf("local sync, expunge=%s\n", expunge?"true":"false"));
-
- if (camel_local_folder_lock(lf, CAMEL_LOCK_WRITE, ex) == -1)
- return;
-
- /* if sync fails, we'll pass it up on exit through ex */
- camel_local_summary_sync((CamelLocalSummary *)folder->summary, expunge, lf->changes, ex);
- camel_local_folder_unlock(lf);
-
- if (camel_folder_change_info_changed(lf->changes)) {
- camel_object_trigger_event(CAMEL_OBJECT(folder), "folder_changed", lf->changes);
- camel_folder_change_info_clear(lf->changes);
- }
-
- /* force save of metadata */
- if (lf->index)
- ibex_save(lf->index);
- if (folder->summary)
- camel_folder_summary_save(folder->summary);
-}
-
-static void
-local_expunge(CamelFolder *folder, CamelException *ex)
-{
- d(printf("expunge\n"));
-
- /* Just do a sync with expunge, serves the same purpose */
- /* call the callback directly, to avoid locking problems */
- CAMEL_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS(folder))->sync(folder, TRUE, ex);
-}
-
-static GPtrArray *
-local_search_by_expression(CamelFolder *folder, const char *expression, CamelException *ex)
-{
- CamelLocalFolder *local_folder = CAMEL_LOCAL_FOLDER(folder);
- GPtrArray *summary, *matches;
-
- /* NOTE: could get away without the search lock by creating a new
- search object each time */
-
- CAMEL_LOCAL_FOLDER_LOCK(folder, search_lock);
-
- if (local_folder->search == NULL)
- local_folder->search = camel_folder_search_new();
-
- camel_folder_search_set_folder(local_folder->search, folder);
- camel_folder_search_set_body_index(local_folder->search, local_folder->index);
- summary = camel_folder_get_summary(folder);
- camel_folder_search_set_summary(local_folder->search, summary);
-
- matches = camel_folder_search_execute_expression(local_folder->search, expression, ex);
-
- CAMEL_LOCAL_FOLDER_UNLOCK(folder, search_lock);
-
- camel_folder_free_summary(folder, summary);
-
- return matches;
-}
-
-static void
-local_search_free(CamelFolder *folder, GPtrArray * result)
-{
- CamelLocalFolder *local_folder = CAMEL_LOCAL_FOLDER(folder);
-
- /* we need to lock this free because of the way search_free_result works */
- /* FIXME: put the lock inside search_free_result */
- CAMEL_LOCAL_FOLDER_LOCK(folder, search_lock);
-
- camel_folder_search_free_result(local_folder->search, result);
-
- CAMEL_LOCAL_FOLDER_UNLOCK(folder, search_lock);
-}
diff --git a/camel/providers/local/camel-local-folder.h b/camel/providers/local/camel-local-folder.h
deleted file mode 100644
index 7c975c8f7a..0000000000
--- a/camel/providers/local/camel-local-folder.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Author: Michael Zucchi <notzed@helixcode.com>
- *
- * Copyright (C) 1999 Helix Code (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_LOCAL_FOLDER_H
-#define CAMEL_LOCAL_FOLDER_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include <camel/camel-folder.h>
-#include <camel/camel-folder-search.h>
-#include <libibex/ibex.h>
-#include "camel-local-summary.h"
-#include "camel-lock.h"
-
-/* #include "camel-store.h" */
-
-#define CAMEL_LOCAL_FOLDER_TYPE (camel_local_folder_get_type ())
-#define CAMEL_LOCAL_FOLDER(obj) (CAMEL_CHECK_CAST((obj), CAMEL_LOCAL_FOLDER_TYPE, CamelLocalFolder))
-#define CAMEL_LOCAL_FOLDER_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_LOCAL_FOLDER_TYPE, CamelLocalFolderClass))
-#define CAMEL_IS_LOCAL_FOLDER(o) (CAMEL_CHECK_TYPE((o), CAMEL_LOCAL_FOLDER_TYPE))
-
-typedef struct {
- CamelFolder parent_object;
- struct _CamelLocalFolderPrivate *priv;
-
- guint32 flags; /* open mode flags */
-
- int locked; /* lock counter */
- CamelLockType locktype; /* what type of lock we have */
-
- char *base_path; /* base path of the local folder */
- char *folder_path; /* the path to the folder itself */
- char *summary_path; /* where the summary lives */
- char *index_path; /* where the index file lives */
-
- ibex *index; /* index for this folder */
- CamelFolderSearch *search; /* used to run searches, we just use the real thing (tm) */
- CamelFolderChangeInfo *changes; /* used to store changes to the folder during processing */
-} CamelLocalFolder;
-
-typedef struct {
- CamelFolderClass parent_class;
-
- /* Virtual methods */
-
- /* summary factory, only used at init */
- CamelLocalSummary *(*create_summary)(const char *path, const char *folder, ibex *index);
-
- /* Lock the folder for my operations */
- int (*lock)(CamelLocalFolder *, CamelLockType type, CamelException *ex);
-
- /* Unlock the folder for my operations */
- void (*unlock)(CamelLocalFolder *);
-} CamelLocalFolderClass;
-
-
-/* public methods */
-/* flags are taken from CAMEL_STORE_FOLDER_* flags */
-CamelLocalFolder *camel_local_folder_construct(CamelLocalFolder *lf, CamelStore *parent_store,
- const char *full_name, guint32 flags, CamelException *ex);
-
-/* Standard Camel function */
-CamelType camel_local_folder_get_type(void);
-
-/* Lock the folder for internal use. May be called repeatedly */
-/* UNIMPLEMENTED */
-int camel_local_folder_lock(CamelLocalFolder *lf, CamelLockType type, CamelException *ex);
-int camel_local_folder_unlock(CamelLocalFolder *lf);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_LOCAL_FOLDER_H */
diff --git a/camel/providers/local/camel-local-private.h b/camel/providers/local/camel-local-private.h
deleted file mode 100644
index 1d1a89ea27..0000000000
--- a/camel/providers/local/camel-local-private.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- * camel-local-private.h: Private info for local provider.
- *
- * Authors: Michael Zucchi <notzed@helixcode.com>
- *
- * 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_PRIVATE_H
-#define CAMEL_PRIVATE_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-/* need a way to configure and save this data, if this header is to
- be installed. For now, dont install it */
-
-#include "config.h"
-
-#ifdef ENABLE_THREADS
-#include <pthread.h>
-#endif
-
-struct _CamelLocalFolderPrivate {
-#ifdef ENABLE_THREADS
- GMutex *search_lock; /* for locking the search object */
-#endif
-};
-
-#ifdef ENABLE_THREADS
-#define CAMEL_LOCAL_FOLDER_LOCK(f, l) (g_mutex_lock(((CamelLocalFolder *)f)->priv->l))
-#define CAMEL_LOCAL_FOLDER_UNLOCK(f, l) (g_mutex_unlock(((CamelLocalFolder *)f)->priv->l))
-#else
-#define CAMEL_LOCAL_FOLDER_LOCK(f, l)
-#define CAMEL_LOCAL_FOLDER_UNLOCK(f, l)
-#endif
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_H */
-
diff --git a/camel/providers/local/camel-local-provider.c b/camel/providers/local/camel-local-provider.c
deleted file mode 100644
index a63ff84eb0..0000000000
--- a/camel/providers/local/camel-local-provider.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Authors: Michael Zucchi <notzed@helixcode.com>
- *
- * 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdio.h>
-
-#include "camel-provider.h"
-#include "camel-session.h"
-#include "camel-url.h"
-
-#include "camel-mh-store.h"
-#include "camel-mbox-store.h"
-#include "camel-maildir-store.h"
-
-static CamelProvider mh_provider = {
- "mh",
- N_("MH-format mail directories"),
- N_("For storing local mail in MH-like mail directories"),
- "mail",
- CAMEL_PROVIDER_IS_STORAGE,
- CAMEL_URL_NEED_PATH | CAMEL_URL_PATH_IS_ABSOLUTE,
- /* ... */
-};
-
-static CamelProvider mbox_provider = {
- "mbox",
- N_("Standard Unix mailbox file"),
- N_("For storing local mail in standard mbox format"),
- "mail",
- CAMEL_PROVIDER_IS_SOURCE | CAMEL_PROVIDER_IS_STORAGE,
- CAMEL_URL_NEED_PATH | CAMEL_URL_PATH_IS_ABSOLUTE,
- /* ... */
-};
-
-static CamelProvider maildir_provider = {
- "maildir",
- N_("Qmail maildir-format mail files"),
- N_("For storing local mail in qmail maildir directories"),
- "mail",
- CAMEL_PROVIDER_IS_SOURCE | CAMEL_PROVIDER_IS_STORAGE,
- CAMEL_URL_NEED_PATH | CAMEL_URL_PATH_IS_ABSOLUTE,
- /* ... */
-};
-
-void camel_provider_module_init(CamelSession * session)
-{
- mh_provider.object_types[CAMEL_PROVIDER_STORE] = camel_mh_store_get_type();
- mh_provider.service_cache = g_hash_table_new(camel_url_hash, camel_url_equal);
- camel_session_register_provider(session, &mh_provider);
-
- mbox_provider.object_types[CAMEL_PROVIDER_STORE] = camel_mbox_store_get_type();
- mbox_provider.service_cache = g_hash_table_new(camel_url_hash, camel_url_equal);
- camel_session_register_provider(session, &mbox_provider);
-
- maildir_provider.object_types[CAMEL_PROVIDER_STORE] = camel_maildir_store_get_type();
- maildir_provider.service_cache = g_hash_table_new(camel_url_hash, camel_url_equal);
- camel_session_register_provider(session, &maildir_provider);
-}
diff --git a/camel/providers/local/camel-local-store.c b/camel/providers/local/camel-local-store.c
deleted file mode 100644
index d0ce48ce98..0000000000
--- a/camel/providers/local/camel-local-store.c
+++ /dev/null
@@ -1,312 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Authors: Michael Zucchi <notzed@helixcode.com>
- *
- * 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <sys/stat.h>
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-#include <stdio.h>
-
-#include "camel-local-store.h"
-#include "camel-exception.h"
-#include "camel-url.h"
-
-#define d(x)
-
-/* Returns the class for a CamelLocalStore */
-#define CLOCALS_CLASS(so) CAMEL_LOCAL_STORE_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-#define CF_CLASS(so) CAMEL_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-
-static void construct (CamelService *service, CamelSession *session, CamelProvider *provider, CamelURL *url, CamelException *ex);
-static CamelFolder *get_folder(CamelStore * store, const char *folder_name, guint32 flags, CamelException * ex);
-static char *get_name(CamelService *service, gboolean brief);
-static CamelFolder *get_inbox (CamelStore *store, CamelException *ex);
-static void rename_folder(CamelStore *store, const char *old_name, const char *new_name, CamelException *ex);
-static CamelFolderInfo *get_folder_info (CamelStore *store, const char *top,
- gboolean fast, gboolean recursive,
- gboolean subscribed_only,
- CamelException *ex);
-static void delete_folder(CamelStore *store, const char *folder_name, CamelException *ex);
-static void rename_folder(CamelStore *store, const char *old, const char *new, CamelException *ex);
-
-static CamelStoreClass *parent_class = NULL;
-
-static void
-camel_local_store_class_init (CamelLocalStoreClass *camel_local_store_class)
-{
- CamelStoreClass *camel_store_class = CAMEL_STORE_CLASS (camel_local_store_class);
- CamelServiceClass *camel_service_class = CAMEL_SERVICE_CLASS (camel_local_store_class);
-
- parent_class = CAMEL_STORE_CLASS (camel_type_get_global_classfuncs (camel_store_get_type ()));
-
- /* virtual method overload */
- camel_service_class->construct = construct;
- camel_service_class->get_name = get_name;
- camel_store_class->get_folder = get_folder;
- camel_store_class->get_inbox = get_inbox;
- camel_store_class->get_folder_info = get_folder_info;
- camel_store_class->free_folder_info = camel_store_free_folder_info_full;
-
- camel_store_class->delete_folder = delete_folder;
- camel_store_class->rename_folder = rename_folder;
-}
-
-CamelType
-camel_local_store_get_type (void)
-{
- static CamelType camel_local_store_type = CAMEL_INVALID_TYPE;
-
- if (camel_local_store_type == CAMEL_INVALID_TYPE) {
- camel_local_store_type = camel_type_register (CAMEL_STORE_TYPE, "CamelLocalStore",
- sizeof (CamelLocalStore),
- sizeof (CamelLocalStoreClass),
- (CamelObjectClassInitFunc) camel_local_store_class_init,
- NULL,
- NULL,
- NULL);
- }
-
- return camel_local_store_type;
-}
-
-static void
-construct (CamelService *service, CamelSession *session, CamelProvider *provider, CamelURL *url, CamelException *ex)
-{
- int len;
-
- CAMEL_SERVICE_CLASS (parent_class)->construct (service, session, provider, url, ex);
- if (camel_exception_is_set (ex))
- return;
-
- len = strlen (service->url->path);
- if (service->url->path[len - 1] != '/') {
- service->url->path = g_realloc (service->url->path, len + 2);
- strcpy (service->url->path + len, "/");
- }
-}
-
-const char *
-camel_local_store_get_toplevel_dir (CamelLocalStore *store)
-{
- CamelURL *url = CAMEL_SERVICE (store)->url;
-
- g_assert (url != NULL);
- return url->path;
-}
-
-static CamelFolder *
-get_folder(CamelStore * store, const char *folder_name, guint32 flags, CamelException * ex)
-{
- struct stat st;
- char *path = ((CamelService *)store)->url->path;
- char *sub, *slash;
-
- if (path[0] != '/') {
- camel_exception_setv(ex, CAMEL_EXCEPTION_STORE_NO_FOLDER,
- _("Store root %s is not an absolute path"), path);
- return NULL;
- }
-
- if (stat(path, &st) == 0) {
- if (!S_ISDIR(st.st_mode)) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_STORE_NO_FOLDER,
- _("Store root %s is not a regular directory"), path);
- }
- return NULL;
- }
-
- if (errno != ENOENT
- || (flags & CAMEL_STORE_FOLDER_CREATE) == 0) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_STORE_NO_FOLDER,
- _("Cannot get folder: %s: %s"), path, strerror(errno));
- return NULL;
- }
-
- /* need to create the dir heirarchy */
- sub = alloca(strlen(path)+1);
- strcpy(sub, path);
- slash = sub;
- do {
- slash = strchr(slash+1, '/');
- if (slash)
- *slash = 0;
- if (stat(sub, &st) == -1) {
- if (errno != ENOENT
- || mkdir(sub, 0700) == -1) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_STORE_NO_FOLDER,
- _("Cannot get folder: %s: %s"), path, strerror(errno));
- return NULL;
- }
- }
- if (slash)
- *slash = '/';
- } while (slash);
-
- return NULL;
-}
-
-static CamelFolder *
-get_inbox(CamelStore *store, CamelException *ex)
-{
- camel_exception_set(ex, CAMEL_EXCEPTION_STORE_NO_FOLDER,
- _("Local stores do not have an inbox"));
- return NULL;
-}
-
-static char *
-get_name (CamelService *service, gboolean brief)
-{
- if (brief)
- return g_strdup (service->url->path);
- else
- return g_strdup_printf (_("Local mail file %s"), service->url->path);
-}
-
-static CamelFolderInfo *
-get_folder_info (CamelStore *store, const char *top,
- gboolean fast, gboolean recursive,
- gboolean subscribed_only,
- CamelException *ex)
-{
- /* FIXME: This is broken, but it corresponds to what was
- * there before.
- */
- return NULL;
-}
-
-static int xrename(const char *oldp, const char *newp, const char *prefix, const char *suffix, int missingok, CamelException *ex)
-{
- struct stat st;
- char *old = g_strconcat(prefix, oldp, suffix, 0);
- char *new = g_strconcat(prefix, newp, suffix, 0);
- int ret = -1;
- int err = 0;
-
- d(printf("renaming %s%s to %s%s\n", oldp, suffix, newp, suffix));
-
- if (stat(old, &st) == -1) {
- if (missingok && errno == ENOENT) {
- ret = 0;
- } else {
- err = errno;
- ret = -1;
- }
- } else if (S_ISDIR(st.st_mode)) { /* use rename for dirs */
- if (rename(old, new) == 0
- || stat(new, &st) == 0) {
- ret = 0;
- } else {
- err = errno;
- ret = -1;
- }
- } else if (link(old, new) == 0 /* and link for files */
- || (stat(new, &st) == 0 && st.st_nlink == 2)) {
- if (unlink(old) == 0) {
- ret = 0;
- } else {
- err = errno;
- unlink(new);
- ret = -1;
- }
- } else {
- err = errno;
- ret = -1;
- }
-
- if (ret == -1) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not rename folder %s to %s: %s"),
- old, new, strerror(err));
- }
-
- g_free(old);
- g_free(new);
- return ret;
-}
-
-/* default implementation, rename all */
-static void
-rename_folder(CamelStore *store, const char *old, const char *new, CamelException *ex)
-{
- char *path = CAMEL_SERVICE (store)->url->path;
-
- /* try to rollback failures, has obvious races */
- if (xrename(old, new, path, ".ibex", TRUE, ex)) {
- return;
- }
- if (xrename(old, new, path, ".ev-summary", TRUE, ex)) {
- xrename(new, old, path, ".ibex", TRUE, ex);
- return;
- }
- if (xrename(old, new, path, "", FALSE, ex)) {
- xrename(new, old, path, ".ev-summary", TRUE, ex);
- xrename(new, old, path, ".ibex", TRUE, ex);
- }
-}
-
-/* default implementation, only delete metadata */
-static void
-delete_folder(CamelStore *store, const char *folder_name, CamelException *ex)
-{
- CamelFolderInfo *fi;
- char *name;
- char *str;
-
- /* remove metadata only */
- name = g_strdup_printf("%s%s", CAMEL_SERVICE(store)->url->path, folder_name);
- str = g_strdup_printf("%s.ev-summary", name);
- if (unlink(str) == -1 && errno != ENOENT) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not delete folder summary file `%s': %s"),
- str, strerror(errno));
- g_free(str);
- g_free (name);
- return;
- }
- g_free(str);
- str = g_strdup_printf("%s.ibex", name);
- if (unlink(str) == -1 && errno != ENOENT) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not delete folder index file `%s': %s"),
- str, strerror(errno));
- g_free(str);
- g_free (name);
- return;
- }
- g_free(str);
- g_free(name);
-
- fi = g_new0 (CamelFolderInfo, 1);
- fi->full_name = g_strdup (folder_name);
- fi->name = g_strdup (g_basename (folder_name));
- fi->url = g_strdup_printf ("%s%s", CAMEL_SERVICE(store)->url->path, folder_name);
- fi->unread_message_count = -1;
-
- camel_object_trigger_event (CAMEL_OBJECT (store),
- "folder_deleted", fi);
-
- camel_folder_info_free (fi);
-}
diff --git a/camel/providers/local/camel-local-store.h b/camel/providers/local/camel-local-store.h
deleted file mode 100644
index 9335b73eaa..0000000000
--- a/camel/providers/local/camel-local-store.h
+++ /dev/null
@@ -1,68 +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. <bertrand@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_LOCAL_STORE_H
-#define CAMEL_LOCAL_STORE_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include "camel-store.h"
-
-#define CAMEL_LOCAL_STORE_TYPE (camel_local_store_get_type ())
-#define CAMEL_LOCAL_STORE(obj) (CAMEL_CHECK_CAST((obj), CAMEL_LOCAL_STORE_TYPE, CamelLocalStore))
-#define CAMEL_LOCAL_STORE_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_LOCAL_STORE_TYPE, CamelLocalStoreClass))
-#define CAMEL_IS_LOCAL_STORE(o) (CAMEL_CHECK_TYPE((o), CAMEL_LOCAL_STORE_TYPE))
-
-
-typedef struct {
- CamelStore parent_object;
-
-} CamelLocalStore;
-
-
-
-typedef struct {
- CamelStoreClass parent_class;
-
-} CamelLocalStoreClass;
-
-
-/* public methods */
-
-/* Standard Camel function */
-CamelType camel_local_store_get_type (void);
-
-const gchar *camel_local_store_get_toplevel_dir (CamelLocalStore *store);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_LOCAL_STORE_H */
-
-
diff --git a/camel/providers/local/camel-local-summary.c b/camel/providers/local/camel-local-summary.c
deleted file mode 100644
index 8f785afe15..0000000000
--- a/camel/providers/local/camel-local-summary.c
+++ /dev/null
@@ -1,560 +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 <notzed@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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <ctype.h>
-#include <sys/stat.h>
-#include <sys/uio.h>
-#include <unistd.h>
-#include <errno.h>
-#include <string.h>
-#include <stdlib.h>
-
-#include "camel-local-summary.h"
-#include <camel/camel-mime-message.h>
-
-#define io(x)
-#define d(x) /*(printf("%s(%d): ", __FILE__, __LINE__),(x))*/
-
-#define CAMEL_LOCAL_SUMMARY_VERSION (0x200)
-
-struct _CamelLocalSummaryPrivate {
-};
-
-#define _PRIVATE(o) (((CamelLocalSummary *)(o))->priv)
-
-static CamelMessageInfo * message_info_new (CamelFolderSummary *, struct _header_raw *);
-
-static int local_summary_decode_x_evolution(CamelLocalSummary *cls, const char *xev, CamelMessageInfo *mi);
-static char *local_summary_encode_x_evolution(CamelLocalSummary *cls, const CamelMessageInfo *mi);
-
-static int local_summary_load(CamelLocalSummary *cls, int forceindex, CamelException *ex);
-static int local_summary_check(CamelLocalSummary *cls, CamelFolderChangeInfo *changeinfo, CamelException *ex);
-static int local_summary_sync(CamelLocalSummary *cls, gboolean expunge, CamelFolderChangeInfo *changeinfo, CamelException *ex);
-static CamelMessageInfo *local_summary_add(CamelLocalSummary *cls, CamelMimeMessage *msg, const CamelMessageInfo *info, CamelFolderChangeInfo *, CamelException *ex);
-
-static void camel_local_summary_class_init (CamelLocalSummaryClass *klass);
-static void camel_local_summary_init (CamelLocalSummary *obj);
-static void camel_local_summary_finalise (CamelObject *obj);
-static CamelFolderSummaryClass *camel_local_summary_parent;
-
-CamelType
-camel_local_summary_get_type(void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register(camel_folder_summary_get_type(), "CamelLocalSummary",
- sizeof (CamelLocalSummary),
- sizeof (CamelLocalSummaryClass),
- (CamelObjectClassInitFunc) camel_local_summary_class_init,
- NULL,
- (CamelObjectInitFunc) camel_local_summary_init,
- (CamelObjectFinalizeFunc) camel_local_summary_finalise);
- }
-
- return type;
-}
-
-static void
-camel_local_summary_class_init(CamelLocalSummaryClass *klass)
-{
- CamelFolderSummaryClass *sklass = (CamelFolderSummaryClass *) klass;
-
- camel_local_summary_parent = CAMEL_FOLDER_SUMMARY_CLASS(camel_type_get_global_classfuncs(camel_folder_summary_get_type()));
-
- sklass->message_info_new = message_info_new;
-
- klass->load = local_summary_load;
- klass->check = local_summary_check;
- klass->sync = local_summary_sync;
- klass->add = local_summary_add;
-
- klass->encode_x_evolution = local_summary_encode_x_evolution;
- klass->decode_x_evolution = local_summary_decode_x_evolution;
-}
-
-static void
-camel_local_summary_init(CamelLocalSummary *obj)
-{
- struct _CamelLocalSummaryPrivate *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(CamelMessageInfo);
- s->content_info_size = sizeof(CamelMessageContentInfo);
-
- /* and a unique file version */
- s->version += CAMEL_LOCAL_SUMMARY_VERSION;
-}
-
-static void
-camel_local_summary_finalise(CamelObject *obj)
-{
- CamelLocalSummary *mbs = CAMEL_LOCAL_SUMMARY(obj);
-
- g_free(mbs->folder_path);
-}
-
-void
-camel_local_summary_construct(CamelLocalSummary *new, const char *filename, const char *local_name, ibex *index)
-{
- camel_folder_summary_set_build_content(CAMEL_FOLDER_SUMMARY(new), FALSE);
- camel_folder_summary_set_filename(CAMEL_FOLDER_SUMMARY(new), filename);
- new->folder_path = g_strdup(local_name);
- new->index = index;
-}
-
-static int
-local_summary_load(CamelLocalSummary *cls, int forceindex, CamelException *ex)
-{
- return camel_folder_summary_load((CamelFolderSummary *)cls);
-}
-
-/* load/check the summary */
-int
-camel_local_summary_load(CamelLocalSummary *cls, int forceindex, CamelException *ex)
-{
- struct stat st;
- CamelFolderSummary *s = (CamelFolderSummary *)cls;
-
- d(printf("Loading summary ...\n"));
-
- if (forceindex
- || stat(s->summary_path, &st) == -1
- || ((CamelLocalSummaryClass *)(CAMEL_OBJECT_GET_CLASS(cls)))->load(cls, forceindex, ex) == -1) {
- camel_folder_summary_clear((CamelFolderSummary *)cls);
- }
-
- if (camel_local_summary_check(cls, NULL, ex) == 0) {
- if (camel_folder_summary_save(s) == -1)
- g_warning("Could not save summary for %s: %s", cls->folder_path, strerror(errno));
- if (cls->index && ibex_save(cls->index) == -1)
- g_warning("Could not sync index for %s: %s", cls->folder_path, strerror(errno));
-
- return 0;
- }
- return -1;
-}
-
-char *
-camel_local_summary_encode_x_evolution(CamelLocalSummary *cls, const CamelMessageInfo *info)
-{
- return ((CamelLocalSummaryClass *)(CAMEL_OBJECT_GET_CLASS(cls)))->encode_x_evolution(cls, info);
-}
-
-int
-camel_local_summary_decode_x_evolution(CamelLocalSummary *cls, const char *xev, CamelMessageInfo *info)
-{
- return ((CamelLocalSummaryClass *)(CAMEL_OBJECT_GET_CLASS(cls)))->decode_x_evolution(cls, xev, info);
-}
-
-/*#define DOSTATS*/
-#ifdef DOSTATS
-struct _stat_info {
- int mitotal;
- int micount;
- int citotal;
- int cicount;
- int msgid;
- int msgcount;
-};
-
-static void
-do_stat_ci(CamelLocalSummary *cls, struct _stat_info *info, CamelMessageContentInfo *ci)
-{
- info->cicount++;
- info->citotal += ((CamelFolderSummary *)cls)->content_info_size /*+ 4 memchunks are 1/4 byte overhead per mi */;
- if (ci->id)
- info->citotal += strlen(ci->id) + 4;
- if (ci->description)
- info->citotal += strlen(ci->description) + 4;
- if (ci->encoding)
- info->citotal += strlen(ci->encoding) + 4;
- if (ci->type) {
- struct _header_content_type *ct = ci->type;
- struct _header_param *param;
-
- info->citotal += sizeof(*ct) + 4;
- if (ct->type)
- info->citotal += strlen(ct->type) + 4;
- if (ct->subtype)
- info->citotal += strlen(ct->subtype) + 4;
- param = ct->params;
- while (param) {
- info->citotal += sizeof(*param) + 4;
- if (param->name)
- info->citotal += strlen(param->name)+4;
- if (param->value)
- info->citotal += strlen(param->value)+4;
- param = param->next;
- }
- }
- ci = ci->childs;
- while (ci) {
- do_stat_ci(cls, info, ci);
- ci = ci->next;
- }
-}
-
-static void
-do_stat_mi(CamelLocalSummary *cls, struct _stat_info *info, CamelMessageInfo *mi)
-{
- info->micount++;
- info->mitotal += ((CamelFolderSummary *)cls)->content_info_size /*+ 4*/;
-
- if (mi->subject)
- info->mitotal += strlen(mi->subject) + 4;
- if (mi->to)
- info->mitotal += strlen(mi->to) + 4;
- if (mi->from)
- info->mitotal += strlen(mi->from) + 4;
- if (mi->cc)
- info->mitotal += strlen(mi->cc) + 4;
- if (mi->uid)
- info->mitotal += strlen(mi->uid) + 4;
-
- if (mi->references) {
- info->mitotal += (mi->references->size-1) * sizeof(CamelSummaryMessageID) + sizeof(CamelSummaryReferences) + 4;
- info->msgid += (mi->references->size) * sizeof(CamelSummaryMessageID);
- info->msgcount += mi->references->size;
- }
-
- /* dont have any user flags yet */
-
- if (mi->content) {
- do_stat_ci(cls, info, mi->content);
- }
-}
-
-#endif
-
-int
-camel_local_summary_check(CamelLocalSummary *cls, CamelFolderChangeInfo *changeinfo, CamelException *ex)
-{
- int ret;
-
- ret = ((CamelLocalSummaryClass *)(CAMEL_OBJECT_GET_CLASS(cls)))->check(cls, changeinfo, ex);
-
-#ifdef DOSTATS
- if (ret != -1) {
- int i;
- CamelFolderSummary *s = (CamelFolderSummary *)cls;
- struct _stat_info stats = { 0 };
-
- for (i=0;i<camel_folder_summary_count(s);i++) {
- CamelMessageInfo *info = camel_folder_summary_index(s, i);
- do_stat_mi(cls, &stats, info);
- camel_folder_summary_info_free(s, info);
- }
-
- printf("\nMemory used by summary:\n\n");
- printf("Total of %d messages\n", camel_folder_summary_count(s));
- printf("Total: %d bytes (ave %f)\n", stats.citotal + stats.mitotal,
- (double)(stats.citotal+stats.mitotal)/(double)camel_folder_summary_count(s));
- printf("Message Info: %d (ave %f)\n", stats.mitotal, (double)stats.mitotal/(double)stats.micount);
- printf("Content Info; %d (ave %f) count %d\n", stats.citotal, (double)stats.citotal/(double)stats.cicount, stats.cicount);
- printf("message id's: %d (ave %f) count %d\n", stats.msgid, (double)stats.msgid/(double)stats.msgcount, stats.msgcount);
- }
-#endif
- return ret;
-}
-
-int
-camel_local_summary_sync(CamelLocalSummary *cls, gboolean expunge, CamelFolderChangeInfo *changeinfo, CamelException *ex)
-{
- return ((CamelLocalSummaryClass *)(CAMEL_OBJECT_GET_CLASS(cls)))->sync(cls, expunge, changeinfo, ex);
-}
-
-CamelMessageInfo *
-camel_local_summary_add(CamelLocalSummary *cls, CamelMimeMessage *msg, const CamelMessageInfo *info, CamelFolderChangeInfo *ci, CamelException *ex)
-{
- return ((CamelLocalSummaryClass *)(CAMEL_OBJECT_GET_CLASS(cls)))->add(cls, msg, info, ci, ex);
-}
-
-/**
- * camel_local_summary_write_headers:
- * @fd:
- * @header:
- * @xevline:
- *
- * Write a bunch of headers to the file @fd. IF xevline is non NULL, then
- * an X-Evolution header line is created at the end of all of the headers.
- * The headers written are termianted with a blank line.
- *
- * Return value: -1 on error, otherwise the number of bytes written.
- **/
-int
-camel_local_summary_write_headers(int fd, struct _header_raw *header, char *xevline)
-{
- int outlen = 0, len;
- int newfd;
- FILE *out;
-
- /* dum de dum, maybe the whole sync function should just use stdio for output */
- newfd = dup(fd);
- if (newfd == -1)
- return -1;
-
- out = fdopen(newfd, "w");
- if (out == NULL) {
- close(newfd);
- errno = EINVAL;
- return -1;
- }
-
- while (header) {
- if (strcmp(header->name, "X-Evolution")) {
- len = fprintf(out, "%s:%s\n", header->name, header->value);
- if (len == -1) {
- fclose(out);
- return -1;
- }
- outlen += len;
- }
- header = header->next;
- }
-
- if (xevline) {
- len = fprintf(out, "X-Evolution: %s\n\n", xevline);
- if (len == -1) {
- fclose(out);
- return -1;
- }
- outlen += len;
- }
-
- if (fclose(out) == -1)
- return -1;
-
- return outlen;
-}
-
-static int
-local_summary_check(CamelLocalSummary *cls, CamelFolderChangeInfo *changeinfo, CamelException *ex)
-{
- /* FIXME: sync index here ? */
- return 0;
-}
-
-static int
-local_summary_sync(CamelLocalSummary *cls, gboolean expunge, CamelFolderChangeInfo *changeinfo, CamelException *ex)
-{
- return 0;
-}
-
-static CamelMessageInfo *
-local_summary_add(CamelLocalSummary *cls, CamelMimeMessage *msg, const CamelMessageInfo *info, CamelFolderChangeInfo *ci, CamelException *ex)
-{
- CamelMessageInfo *mi;
- char *xev;
-
- d(printf("Adding message to summary\n"));
-
- mi = camel_folder_summary_add_from_message((CamelFolderSummary *)cls, msg);
- if (mi) {
- d(printf("Added, uid = %s\n", mi->uid));
- if (info) {
- CamelTag *tag = info->user_tags;
- CamelFlag *flag = info->user_flags;
-
- while (flag) {
- camel_flag_set(&mi->user_flags, flag->name, TRUE);
- flag = flag->next;
- }
-
- while (tag) {
- camel_tag_set(&mi->user_tags, tag->name, tag->value);
- tag = tag->next;
- }
-
- mi->flags = mi->flags | (info->flags & 0xffff);
- }
- mi->flags &= ~(CAMEL_MESSAGE_FOLDER_NOXEV|CAMEL_MESSAGE_FOLDER_FLAGGED);
- xev = camel_local_summary_encode_x_evolution(cls, mi);
- camel_medium_set_header((CamelMedium *)msg, "X-Evolution", xev);
- g_free(xev);
- camel_folder_change_info_add_uid(ci, camel_message_info_uid(mi));
- } else {
- d(printf("Failed!\n"));
- camel_exception_set(ex, 1, _("Unable to add message to summary: unknown reason"));
- }
- return mi;
-}
-
-static char *
-local_summary_encode_x_evolution(CamelLocalSummary *cls, const CamelMessageInfo *mi)
-{
- GString *out = g_string_new("");
- struct _header_param *params = NULL;
- GString *val = g_string_new("");
- CamelFlag *flag = mi->user_flags;
- CamelTag *tag = mi->user_tags;
- char *ret;
- const char *p, *uidstr;
- guint32 uid;
-
- /* FIXME: work out what to do with uid's that aren't stored here? */
- /* FIXME: perhaps make that a mbox folder only issue?? */
- p = uidstr = camel_message_info_uid(mi);
- while (*p && isdigit(*p))
- p++;
- if (*p == 0 && sscanf(uidstr, "%u", &uid) == 1) {
- g_string_sprintf(out, "%08x-%04x", uid, mi->flags & 0xffff);
- } else {
- g_string_sprintf(out, "%s-%04x", uidstr, mi->flags & 0xffff);
- }
-
- if (flag || tag) {
- val = g_string_new("");
-
- if (flag) {
- while (flag) {
- g_string_append(val, flag->name);
- if (flag->next)
- g_string_append_c(val, ',');
- flag = flag->next;
- }
- header_set_param(&params, "flags", val->str);
- g_string_truncate(val, 0);
- }
- if (tag) {
- while (tag) {
- g_string_append(val, tag->name);
- g_string_append_c(val, '=');
- g_string_append(val, tag->value);
- if (tag->next)
- g_string_append_c(val, ',');
- tag = tag->next;
- }
- header_set_param(&params, "tags", val->str);
- }
- g_string_free(val, TRUE);
- header_param_list_format_append(out, params);
- header_param_list_free(params);
- }
- ret = out->str;
- g_string_free(out, FALSE);
- return ret;
-}
-
-static int
-local_summary_decode_x_evolution(CamelLocalSummary *cls, const char *xev, CamelMessageInfo *mi)
-{
- struct _header_param *params, *scan;
- guint32 uid, flags;
- char *header;
- int i;
-
- /* check for uid/flags */
- header = header_token_decode(xev);
- if (header && strlen(header) == strlen("00000000-0000")
- && sscanf(header, "%08x-%04x", &uid, &flags) == 2) {
- char uidstr[20];
- if (mi) {
- sprintf(uidstr, "%u", uid);
- camel_message_info_set_uid(mi, g_strdup(uidstr));
- mi->flags = flags;
- }
- } else {
- g_free(header);
- return -1;
- }
- g_free(header);
-
- if (mi == NULL)
- return 0;
-
- /* check for additional data */
- header = strchr(xev, ';');
- if (header) {
- params = header_param_list_decode(header+1);
- scan = params;
- while (scan) {
- if (!strcasecmp(scan->name, "flags")) {
- char **flagv = g_strsplit(scan->value, ",", 1000);
-
- for (i=0;flagv[i];i++) {
- camel_flag_set(&mi->user_flags, flagv[i], TRUE);
- }
- g_strfreev(flagv);
- } else if (!strcasecmp(scan->name, "tags")) {
- char **tagv = g_strsplit(scan->value, ",", 10000);
- char *val;
-
- for (i=0;tagv[i];i++) {
- val = strchr(tagv[i], '=');
- if (val) {
- *val++ = 0;
- camel_tag_set(&mi->user_tags, tagv[i], val);
- val[-1]='=';
- }
- }
- g_strfreev(tagv);
- }
- scan = scan->next;
- }
- header_param_list_free(params);
- }
- return 0;
-}
-
-static CamelMessageInfo *
-message_info_new(CamelFolderSummary *s, struct _header_raw *h)
-{
- CamelMessageInfo *mi;
- CamelLocalSummary *cls = (CamelLocalSummary *)s;
-
- mi = ((CamelFolderSummaryClass *)camel_local_summary_parent)->message_info_new(s, h);
- if (mi) {
- const char *xev;
- int doindex = FALSE;
-
- xev = header_raw_find(&h, "X-Evolution", NULL);
- if (xev==NULL || camel_local_summary_decode_x_evolution(cls, xev, mi) == -1) {
- /* to indicate it has no xev header */
- mi->flags |= CAMEL_MESSAGE_FOLDER_FLAGGED | CAMEL_MESSAGE_FOLDER_NOXEV;
- camel_message_info_set_uid(mi, camel_folder_summary_next_uid_string(s));
-
- /* shortcut, no need to look it up in the index library */
- doindex = TRUE;
- }
-
- if (cls->index
- && (doindex
- || cls->index_force
- || !ibex_contains_name(cls->index, (char *)camel_message_info_uid(mi)))) {
- d(printf("Am indexing message %s\n", camel_message_info_uid(mi)));
- camel_folder_summary_set_index(s, cls->index);
- } else {
- d(printf("Not indexing message %s\n", camel_message_info_uid(mi)));
- camel_folder_summary_set_index(s, NULL);
- }
- }
-
- return mi;
-}
diff --git a/camel/providers/local/camel-local-summary.h b/camel/providers/local/camel-local-summary.h
deleted file mode 100644
index 332175b451..0000000000
--- a/camel/providers/local/camel-local-summary.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (C) 2000 Helix Code Inc.
- *
- * Authors: Michael Zucchi <notzed@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_LOCAL_SUMMARY_H
-#define _CAMEL_LOCAL_SUMMARY_H
-
-#include <camel/camel-folder-summary.h>
-#include <camel/camel-folder.h>
-#include <camel/camel-exception.h>
-#include <libibex/ibex.h>
-
-#define CAMEL_LOCAL_SUMMARY(obj) CAMEL_CHECK_CAST (obj, camel_local_summary_get_type (), CamelLocalSummary)
-#define CAMEL_LOCAL_SUMMARY_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_local_summary_get_type (), CamelLocalSummaryClass)
-#define CAMEL_IS_LOCAL_SUMMARY(obj) CAMEL_CHECK_TYPE (obj, camel_local_summary_get_type ())
-
-typedef struct _CamelLocalSummary CamelLocalSummary;
-typedef struct _CamelLocalSummaryClass CamelLocalSummaryClass;
-
-/* extra summary flags */
-enum {
- CAMEL_MESSAGE_FOLDER_NOXEV = 1<<17,
- CAMEL_MESSAGE_FOLDER_XEVCHANGE = 1<<18,
-};
-
-struct _CamelLocalSummary {
- CamelFolderSummary parent;
-
- struct _CamelLocalSummaryPrivate *priv;
-
- char *folder_path; /* name of matching folder */
-
- ibex *index;
- int index_force; /* do we force index during creation? */
-};
-
-struct _CamelLocalSummaryClass {
- CamelFolderSummaryClass parent_class;
-
- int (*load)(CamelLocalSummary *cls, int forceindex, CamelException *ex);
- int (*check)(CamelLocalSummary *cls, CamelFolderChangeInfo *changeinfo, CamelException *ex);
- int (*sync)(CamelLocalSummary *cls, gboolean expunge, CamelFolderChangeInfo *changeinfo, CamelException *ex);
- CamelMessageInfo *(*add)(CamelLocalSummary *cls, CamelMimeMessage *msg, const CamelMessageInfo *info, CamelFolderChangeInfo *, CamelException *ex);
-
- char *(*encode_x_evolution)(CamelLocalSummary *cls, const CamelMessageInfo *info);
- int (*decode_x_evolution)(CamelLocalSummary *cls, const char *xev, CamelMessageInfo *info);
-};
-
-guint camel_local_summary_get_type (void);
-void camel_local_summary_construct (CamelLocalSummary *new, const char *filename, const char *local_name, ibex *index);
-
-/* load/check the summary */
-int camel_local_summary_load(CamelLocalSummary *cls, int forceindex, CamelException *ex);
-/* check for new/removed messages */
-int camel_local_summary_check(CamelLocalSummary *cls, CamelFolderChangeInfo *, CamelException *ex);
-/* perform a folder sync or expunge, if needed */
-int camel_local_summary_sync(CamelLocalSummary *cls, gboolean expunge, CamelFolderChangeInfo *, CamelException *ex);
-/* add a new message to the summary */
-CamelMessageInfo *camel_local_summary_add(CamelLocalSummary *cls, CamelMimeMessage *msg, const CamelMessageInfo *info, CamelFolderChangeInfo *, CamelException *ex);
-
-/* generate an X-Evolution header line */
-char *camel_local_summary_encode_x_evolution(CamelLocalSummary *cls, const CamelMessageInfo *info);
-int camel_local_summary_decode_x_evolution(CamelLocalSummary *cls, const char *xev, CamelMessageInfo *info);
-
-/* utility functions - write headers to a file with optional X-Evolution header */
-int camel_local_summary_write_headers(int fd, struct _header_raw *header, char *xevline);
-
-#endif /* ! _CAMEL_LOCAL_SUMMARY_H */
-
diff --git a/camel/providers/local/camel-maildir-folder.c b/camel/providers/local/camel-maildir-folder.c
deleted file mode 100644
index 198e4ebc00..0000000000
--- a/camel/providers/local/camel-maildir-folder.c
+++ /dev/null
@@ -1,229 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; fill-column: 160 -*-
- *
- * Authors: Michael Zucchi <notzed@helixcode.com>
- *
- * 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdlib.h>
-#include <sys/types.h>
-#include <dirent.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <errno.h>
-#include <string.h>
-#include <fcntl.h>
-
-#include "camel-maildir-folder.h"
-#include "camel-maildir-store.h"
-#include "string-utils.h"
-#include "camel-stream-fs.h"
-#include "camel-maildir-summary.h"
-#include "camel-data-wrapper.h"
-#include "camel-mime-message.h"
-#include "camel-exception.h"
-
-#define d(x) /*(printf("%s(%d): ", __FILE__, __LINE__),(x))*/
-
-static CamelLocalFolderClass *parent_class = NULL;
-
-/* Returns the class for a CamelMaildirFolder */
-#define CMAILDIRF_CLASS(so) CAMEL_MAILDIR_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-#define CF_CLASS(so) CAMEL_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-#define CMAILDIRS_CLASS(so) CAMEL_STORE_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-
-static CamelLocalSummary *maildir_create_summary(const char *path, const char *folder, ibex *index);
-
-static void maildir_append_message(CamelFolder * folder, CamelMimeMessage * message, const CamelMessageInfo *info, CamelException * ex);
-static CamelMimeMessage *maildir_get_message(CamelFolder * folder, const gchar * uid, CamelException * ex);
-
-static void maildir_finalize(CamelObject * object);
-
-static void camel_maildir_folder_class_init(CamelObjectClass * camel_maildir_folder_class)
-{
- CamelFolderClass *camel_folder_class = CAMEL_FOLDER_CLASS(camel_maildir_folder_class);
- CamelLocalFolderClass *lclass = (CamelLocalFolderClass *)camel_maildir_folder_class;
-
- parent_class = CAMEL_LOCAL_FOLDER_CLASS (camel_type_get_global_classfuncs(camel_local_folder_get_type()));
-
- /* virtual method definition */
-
- /* virtual method overload */
- camel_folder_class->append_message = maildir_append_message;
- camel_folder_class->get_message = maildir_get_message;
-
- lclass->create_summary = maildir_create_summary;
-}
-
-static void maildir_init(gpointer object, gpointer klass)
-{
- /*CamelFolder *folder = object;
- CamelMaildirFolder *maildir_folder = object;*/
-}
-
-static void maildir_finalize(CamelObject * object)
-{
- /*CamelMaildirFolder *maildir_folder = CAMEL_MAILDIR_FOLDER(object);*/
-}
-
-CamelType camel_maildir_folder_get_type(void)
-{
- static CamelType camel_maildir_folder_type = CAMEL_INVALID_TYPE;
-
- if (camel_maildir_folder_type == CAMEL_INVALID_TYPE) {
- camel_maildir_folder_type = camel_type_register(CAMEL_LOCAL_FOLDER_TYPE, "CamelMaildirFolder",
- sizeof(CamelMaildirFolder),
- sizeof(CamelMaildirFolderClass),
- (CamelObjectClassInitFunc) camel_maildir_folder_class_init,
- NULL,
- (CamelObjectInitFunc) maildir_init,
- (CamelObjectFinalizeFunc) maildir_finalize);
- }
-
- return camel_maildir_folder_type;
-}
-
-CamelFolder *
-camel_maildir_folder_new(CamelStore *parent_store, const char *full_name, guint32 flags, CamelException *ex)
-{
- CamelFolder *folder;
-
- d(printf("Creating maildir folder: %s\n", full_name));
-
- folder = (CamelFolder *)camel_object_new(CAMEL_MAILDIR_FOLDER_TYPE);
- folder = (CamelFolder *)camel_local_folder_construct((CamelLocalFolder *)folder,
- parent_store, full_name, flags, ex);
-
- return folder;
-}
-
-static CamelLocalSummary *maildir_create_summary(const char *path, const char *folder, ibex *index)
-{
- return (CamelLocalSummary *)camel_maildir_summary_new(path, folder, index);
-}
-
-static void maildir_append_message(CamelFolder * folder, CamelMimeMessage * message, const CamelMessageInfo *info, CamelException * ex)
-{
- CamelMaildirFolder *maildir_folder = (CamelMaildirFolder *)folder;
- CamelLocalFolder *lf = (CamelLocalFolder *)folder;
- CamelStream *output_stream;
- CamelMessageInfo *mi;
- CamelMaildirMessageInfo *mdi;
- char *name, *dest;
-
- d(printf("Appending message\n"));
-
- /* add it to the summary/assign the uid, etc */
- mi = camel_local_summary_add((CamelLocalSummary *)folder->summary, message, info, lf->changes, ex);
- if (camel_exception_is_set(ex)) {
- return;
- }
-
- mdi = (CamelMaildirMessageInfo *)mi;
-
- d(printf("Appending message: uid is %s filename is %s\n", camel_message_info_uid(mi), mdi->filename));
-
- /* write it out to tmp, use the uid we got from the summary */
- name = g_strdup_printf("%s/tmp/%s", lf->folder_path, camel_message_info_uid(mi));
- output_stream = camel_stream_fs_new_with_name(name, O_WRONLY|O_CREAT, 0600);
- if (output_stream == NULL) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Cannot append message to maildir folder: %s: %s"), name, g_strerror(errno));
- g_free(name);
- return;
- }
-
- if (camel_data_wrapper_write_to_stream((CamelDataWrapper *)message, output_stream) == -1
- || camel_stream_close(output_stream) == -1) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Cannot append message to maildir folder: %s: %s"), name, g_strerror(errno));
- camel_object_unref((CamelObject *)output_stream);
- unlink(name);
- g_free(name);
- return;
- }
-
- /* now move from tmp to cur (bypass new, does it matter?) */
- dest = g_strdup_printf("%s/cur/%s", lf->folder_path, camel_maildir_info_filename(mdi));
- if (rename(name, dest) == 1) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Cannot append message to maildir folder: %s: %s"), name, g_strerror(errno));
- camel_object_unref((CamelObject *)output_stream);
- unlink(name);
- g_free(name);
- g_free(dest);
- return;
- }
-
- g_free(dest);
- g_free(name);
-
- camel_object_trigger_event((CamelObject *)folder, "folder_changed", ((CamelLocalFolder *)maildir_folder)->changes);
- camel_folder_change_info_clear(((CamelLocalFolder *)maildir_folder)->changes);
-}
-
-static CamelMimeMessage *maildir_get_message(CamelFolder * folder, const gchar * uid, CamelException * ex)
-{
- CamelLocalFolder *lf = (CamelLocalFolder *)folder;
- CamelStream *message_stream = NULL;
- CamelMimeMessage *message = NULL;
- CamelMessageInfo *info;
- char *name;
- CamelMaildirMessageInfo *mdi;
-
- d(printf("getting message: %s\n", uid));
-
- /* get the message summary info */
- if ((info = camel_folder_summary_uid(folder->summary, uid)) == NULL) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_FOLDER_INVALID_UID, _("Cannot get message: %s\n %s"), uid, _("No such message"));
- return NULL;
- }
-
- mdi = (CamelMaildirMessageInfo *)info;
-
- /* what do we do if the message flags (and :info data) changes? filename mismatch - need to recheck I guess */
- name = g_strdup_printf("%s/cur/%s", lf->folder_path, camel_maildir_info_filename(mdi));
-
- camel_folder_summary_info_free(folder->summary, info);
-
- if ((message_stream = camel_stream_fs_new_with_name(name, O_RDONLY, 0)) == NULL) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_FOLDER_INVALID_UID, _("Cannot get message: %s\n %s"),
- name, g_strerror(errno));
- g_free(name);
- return NULL;
- }
-
- message = camel_mime_message_new();
- if (camel_data_wrapper_construct_from_stream((CamelDataWrapper *)message, message_stream) == -1) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_FOLDER_INVALID_UID, _("Cannot get message: %s\n %s"),
- name, _("Invalid message contents"));
- g_free(name);
- camel_object_unref((CamelObject *)message_stream);
- camel_object_unref((CamelObject *)message);
- return NULL;
-
- }
- camel_object_unref((CamelObject *)message_stream);
- g_free(name);
-
- return message;
-}
diff --git a/camel/providers/local/camel-maildir-folder.h b/camel/providers/local/camel-maildir-folder.h
deleted file mode 100644
index 5076e2f73c..0000000000
--- a/camel/providers/local/camel-maildir-folder.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Authors:
- * Michael Zucchi <notzed@helixcode.com>
- *
- * 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
- */
-
-#ifndef CAMEL_MAILDIR_FOLDER_H
-#define CAMEL_MAILDIR_FOLDER_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus } */
-#include "camel-local-folder.h"
-
-#define CAMEL_MAILDIR_FOLDER_TYPE (camel_maildir_folder_get_type ())
-#define CAMEL_MAILDIR_FOLDER(obj) (CAMEL_CHECK_CAST((obj), CAMEL_MAILDIR_FOLDER_TYPE, CamelMaildirFolder))
-#define CAMEL_MAILDIR_FOLDER_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_MAILDIR_FOLDER_TYPE, CamelMaildirFolderClass))
-#define CAMEL_IS_MAILDIR_FOLDER(o) (CAMEL_CHECK_TYPE((o), CAMEL_MAILDIR_FOLDER_TYPE))
-
-typedef struct {
- CamelLocalFolder parent_object;
-
-} CamelMaildirFolder;
-
-typedef struct {
- CamelLocalFolderClass parent_class;
-
- /* Virtual methods */
-
-} CamelMaildirFolderClass;
-
-/* public methods */
-CamelFolder *camel_maildir_folder_new(CamelStore *parent_store, const char *full_name, guint32 flags, CamelException *ex);
-
-/* Standard Camel function */
-CamelType camel_maildir_folder_get_type(void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-#endif /* CAMEL_MAILDIR_FOLDER_H */
diff --git a/camel/providers/local/camel-maildir-store.c b/camel/providers/local/camel-maildir-store.c
deleted file mode 100644
index 8fa4454485..0000000000
--- a/camel/providers/local/camel-maildir-store.c
+++ /dev/null
@@ -1,200 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Copyright (C) 2000 Helix Code, Inc.
- *
- * Authors: Michael Zucchi <notzed@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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <sys/stat.h>
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <dirent.h>
-
-#include "camel-maildir-store.h"
-#include "camel-maildir-folder.h"
-#include "camel-exception.h"
-#include "camel-url.h"
-
-static CamelLocalStoreClass *parent_class = NULL;
-
-/* Returns the class for a CamelMaildirStore */
-#define CMAILDIRS_CLASS(so) CAMEL_MAILDIR_STORE_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-#define CF_CLASS(so) CAMEL_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-#define CMAILDIRF_CLASS(so) CAMEL_MAILDIR_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-
-static CamelFolder *get_folder(CamelStore * store, const char *folder_name, guint32 flags, CamelException * ex);
-static void delete_folder(CamelStore * store, const char *folder_name, CamelException * ex);
-
-static void camel_maildir_store_class_init(CamelObjectClass * camel_maildir_store_class)
-{
- CamelStoreClass *camel_store_class = CAMEL_STORE_CLASS(camel_maildir_store_class);
- /*CamelServiceClass *camel_service_class = CAMEL_SERVICE_CLASS(camel_maildir_store_class);*/
-
- parent_class = (CamelLocalStoreClass *)camel_type_get_global_classfuncs(camel_local_store_get_type());
-
- /* virtual method overload, use defaults for most */
- camel_store_class->get_folder = get_folder;
- camel_store_class->delete_folder = delete_folder;
-}
-
-CamelType camel_maildir_store_get_type(void)
-{
- static CamelType camel_maildir_store_type = CAMEL_INVALID_TYPE;
-
- if (camel_maildir_store_type == CAMEL_INVALID_TYPE) {
- camel_maildir_store_type = camel_type_register(CAMEL_LOCAL_STORE_TYPE, "CamelMaildirStore",
- sizeof(CamelMaildirStore),
- sizeof(CamelMaildirStoreClass),
- (CamelObjectClassInitFunc) camel_maildir_store_class_init,
- NULL,
- NULL,
- NULL);
- }
-
- return camel_maildir_store_type;
-}
-
-static CamelFolder *get_folder(CamelStore * store, const char *folder_name, guint32 flags, CamelException * ex)
-{
- char *name, *tmp, *cur, *new;
- struct stat st;
- CamelFolder *folder = NULL;
-
- (void) ((CamelStoreClass *)parent_class)->get_folder(store, folder_name, flags, ex);
- if (camel_exception_is_set(ex))
- return NULL;
-
- name = g_strdup_printf("%s%s", CAMEL_SERVICE(store)->url->path, folder_name);
- tmp = g_strdup_printf("%s/tmp", name);
- cur = g_strdup_printf("%s/cur", name);
- new = g_strdup_printf("%s/new", name);
-
- if (stat(name, &st) == -1) {
- if (errno != ENOENT) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not open folder `%s':\n%s"),
- folder_name, strerror(errno));
- } else if ((flags & CAMEL_STORE_FOLDER_CREATE) == 0) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_STORE_NO_FOLDER,
- _("Folder `%s' does not exist."), folder_name);
- } else {
- if (mkdir(name, 0700) != 0
- || mkdir(tmp, 0700) != 0
- || mkdir(cur, 0700) != 0
- || mkdir(new, 0700) != 0) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not create folder `%s':\n%s"),
- folder_name, strerror(errno));
- rmdir(tmp);
- rmdir(cur);
- rmdir(new);
- rmdir(name);
- } else {
- folder = camel_maildir_folder_new(store, folder_name, flags, ex);
- }
- }
- } else if (!S_ISDIR(st.st_mode)
- || stat(tmp, &st) != 0 || !S_ISDIR(st.st_mode)
- || stat(cur, &st) != 0 || !S_ISDIR(st.st_mode)
- || stat(new, &st) != 0 || !S_ISDIR(st.st_mode)) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_STORE_NO_FOLDER,
- _("`%s' is not a maildir directory."), name);
- } else {
- folder = camel_maildir_folder_new(store, folder_name, flags, ex);
- }
-
- g_free(name);
- g_free(tmp);
- g_free(cur);
- g_free(new);
-
- return folder;
-}
-
-static void delete_folder(CamelStore * store, const char *folder_name, CamelException * ex)
-{
- char *name, *tmp, *cur, *new;
- struct stat st;
-
- name = g_strdup_printf("%s%s", CAMEL_SERVICE(store)->url->path, folder_name);
-
- tmp = g_strdup_printf("%s/tmp", name);
- cur = g_strdup_printf("%s/cur", name);
- new = g_strdup_printf("%s/new", name);
-
- if (stat(name, &st) == -1 || !S_ISDIR(st.st_mode)
- || stat(tmp, &st) == -1 || !S_ISDIR(st.st_mode)
- || stat(cur, &st) == -1 || !S_ISDIR(st.st_mode)
- || stat(new, &st) == -1 || !S_ISDIR(st.st_mode)) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not delete folder `%s': %s"),
- folder_name, errno?strerror(errno):_("not a maildir directory"));
- } else {
- int err = 0;
-
- /* remove subdirs first - will fail if not empty */
- if (rmdir(cur) == -1 || rmdir(new) == -1) {
- err = errno;
- } else {
- DIR *dir;
- struct dirent *d;
-
- /* for tmp (only), its contents is irrelevant */
- dir = opendir(tmp);
- if (dir) {
- while ( (d=readdir(dir)) ) {
- char *name = d->d_name, *file;
-
- if (!strcmp(name, ".") || !strcmp(name, ".."))
- continue;
- file = g_strdup_printf("%s/%s", tmp, name);
- unlink(file);
- g_free(file);
- }
- closedir(dir);
- }
- if (rmdir(tmp) == -1 || rmdir(name) == -1)
- err = errno;
- }
-
- if (err != 0) {
- /* easier just to mkdir all (and let them fail), than remember what we got to */
- mkdir(name, 0700);
- mkdir(cur, 0700);
- mkdir(new, 0700);
- mkdir(tmp, 0700);
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not delete folder `%s': %s"),
- folder_name, strerror(err));
- } else {
- /* and remove metadata */
- ((CamelStoreClass *)parent_class)->delete_folder(store, folder_name, ex);
- }
- }
-
- g_free(name);
- g_free(tmp);
- g_free(cur);
- g_free(new);
-}
diff --git a/camel/providers/local/camel-maildir-store.h b/camel/providers/local/camel-maildir-store.h
deleted file mode 100644
index 27b6a6e590..0000000000
--- a/camel/providers/local/camel-maildir-store.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Copyright (C) 2000 Helix Code, Inc.
- *
- * Authors: Michael Zucchi <notzed@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_MAILDIR_STORE_H
-#define CAMEL_MAILDIR_STORE_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus } */
-
-#include "camel-local-store.h"
-
-#define CAMEL_MAILDIR_STORE_TYPE (camel_maildir_store_get_type ())
-#define CAMEL_MAILDIR_STORE(obj) (CAMEL_CHECK_CAST((obj), CAMEL_MAILDIR_STORE_TYPE, CamelMaildirStore))
-#define CAMEL_MAILDIR_STORE_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_MAILDIR_STORE_TYPE, CamelMaildirStoreClass))
-#define CAMEL_IS_MAILDIR_STORE(o) (CAMEL_CHECK_TYPE((o), CAMEL_MAILDIR_STORE_TYPE))
-
-typedef struct {
- CamelLocalStore parent_object;
-
-} CamelMaildirStore;
-
-typedef struct {
- CamelLocalStoreClass parent_class;
-
-} CamelMaildirStoreClass;
-
-/* public methods */
-
-/* Standard Camel function */
-CamelType camel_maildir_store_get_type(void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-#endif /* CAMEL_MAILDIR_STORE_H */
diff --git a/camel/providers/local/camel-maildir-summary.c b/camel/providers/local/camel-maildir-summary.c
deleted file mode 100644
index e2ce0f4e97..0000000000
--- a/camel/providers/local/camel-maildir-summary.c
+++ /dev/null
@@ -1,758 +0,0 @@
-/*
- * Copyright (C) 2000 Helix Code Inc.
- *
- * Authors: Not Zed <notzed@lostzed.mmc.com.au>
- *
- * 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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <sys/stat.h>
-#include <sys/uio.h>
-#include <unistd.h>
-#include <errno.h>
-#include <string.h>
-#include <stdlib.h>
-
-#include <sys/types.h>
-#include <dirent.h>
-
-#include <ctype.h>
-
-#include "camel-maildir-summary.h"
-#include <camel/camel-mime-message.h>
-
-#include "camel-private.h"
-#include "e-util/e-memory.h"
-
-#define d(x) /*(printf("%s(%d): ", __FILE__, __LINE__),(x))*/
-
-#define CAMEL_MAILDIR_SUMMARY_VERSION (0x2000)
-
-static CamelMessageInfo *message_info_load(CamelFolderSummary *s, FILE *in);
-static CamelMessageInfo *message_info_new(CamelFolderSummary *, struct _header_raw *);
-static void message_info_free(CamelFolderSummary *, CamelMessageInfo *mi);
-
-static int maildir_summary_load(CamelLocalSummary *cls, int forceindex, CamelException *ex);
-static int maildir_summary_check(CamelLocalSummary *cls, CamelFolderChangeInfo *changeinfo, CamelException *ex);
-static int maildir_summary_sync(CamelLocalSummary *cls, gboolean expunge, CamelFolderChangeInfo *changeinfo, CamelException *ex);
-static CamelMessageInfo *maildir_summary_add(CamelLocalSummary *cls, CamelMimeMessage *msg, const CamelMessageInfo *info, CamelFolderChangeInfo *, CamelException *ex);
-
-static char *maildir_summary_next_uid_string(CamelFolderSummary *s);
-static int maildir_summary_decode_x_evolution(CamelLocalSummary *cls, const char *xev, CamelMessageInfo *mi);
-static char *maildir_summary_encode_x_evolution(CamelLocalSummary *cls, const CamelMessageInfo *mi);
-
-static void camel_maildir_summary_class_init (CamelMaildirSummaryClass *class);
-static void camel_maildir_summary_init (CamelMaildirSummary *gspaper);
-static void camel_maildir_summary_finalise (CamelObject *obj);
-
-#define _PRIVATE(x) (((CamelMaildirSummary *)(x))->priv)
-
-struct _CamelMaildirSummaryPrivate {
- char *current_file;
- char *hostname;
-
- GHashTable *load_map;
-};
-
-static CamelLocalSummaryClass *parent_class;
-
-CamelType
-camel_maildir_summary_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register(camel_local_summary_get_type (), "CamelMaildirSummary",
- sizeof(CamelMaildirSummary),
- sizeof(CamelMaildirSummaryClass),
- (CamelObjectClassInitFunc)camel_maildir_summary_class_init,
- NULL,
- (CamelObjectInitFunc)camel_maildir_summary_init,
- (CamelObjectFinalizeFunc)camel_maildir_summary_finalise);
- }
-
- return type;
-}
-
-static void
-camel_maildir_summary_class_init (CamelMaildirSummaryClass *class)
-{
- CamelFolderSummaryClass *sklass = (CamelFolderSummaryClass *) class;
- CamelLocalSummaryClass *lklass = (CamelLocalSummaryClass *)class;
-
- parent_class = (CamelLocalSummaryClass *)camel_type_get_global_classfuncs(camel_local_summary_get_type ());
-
- /* override methods */
- sklass->message_info_load = message_info_load;
- sklass->message_info_new = message_info_new;
- sklass->message_info_free = message_info_free;
- sklass->next_uid_string = maildir_summary_next_uid_string;
-
- lklass->load = maildir_summary_load;
- lklass->check = maildir_summary_check;
- lklass->sync = maildir_summary_sync;
- lklass->add = maildir_summary_add;
- lklass->encode_x_evolution = maildir_summary_encode_x_evolution;
- lklass->decode_x_evolution = maildir_summary_decode_x_evolution;
-}
-
-static void
-camel_maildir_summary_init (CamelMaildirSummary *o)
-{
- struct _CamelFolderSummary *s = (CamelFolderSummary *) o;
- char hostname[256];
-
- o->priv = g_malloc0(sizeof(*o->priv));
- /* set unique file version */
- s->version += CAMEL_MAILDIR_SUMMARY_VERSION;
-
- s->message_info_size = sizeof(CamelMaildirMessageInfo);
- s->content_info_size = sizeof(CamelMaildirMessageContentInfo);
-
-#ifdef DOESTRV
- s->message_info_strings = CAMEL_MAILDIR_INFO_LAST;
-#endif
-
- if (gethostname(hostname, 256) == 0) {
- o->priv->hostname = g_strdup(hostname);
- } else {
- o->priv->hostname = g_strdup("localhost");
- }
-}
-
-static void
-camel_maildir_summary_finalise(CamelObject *obj)
-{
- CamelMaildirSummary *o = (CamelMaildirSummary *)obj;
-
- g_free(o->priv->hostname);
- g_free(o->priv);
-}
-
-/**
- * camel_maildir_summary_new:
- *
- * Create a new CamelMaildirSummary object.
- *
- * Return value: A new #CamelMaildirSummary object.
- **/
-CamelMaildirSummary *camel_maildir_summary_new (const char *filename, const char *maildirdir, ibex *index)
-{
- CamelMaildirSummary *o = (CamelMaildirSummary *)camel_object_new(camel_maildir_summary_get_type ());
-
- camel_local_summary_construct((CamelLocalSummary *)o, filename, maildirdir, index);
- return o;
-}
-
-/* the 'standard' maildir flags. should be defined in sorted order. */
-static struct {
- char flag;
- guint32 flagbit;
-} flagbits[] = {
- { 'F', CAMEL_MESSAGE_FLAGGED },
- { 'R', CAMEL_MESSAGE_ANSWERED },
- { 'S', CAMEL_MESSAGE_SEEN },
- { 'T', CAMEL_MESSAGE_DELETED },
-};
-
-/* convert the uid + flags into a unique:info maildir format */
-char *camel_maildir_summary_info_to_name(const CamelMessageInfo *info)
-{
- char *p, *buf;
- int i;
- const char *uid;
-
- uid = camel_message_info_uid(info);
- buf = alloca(strlen(uid) + strlen(":2,") + (sizeof(flagbits)/sizeof(flagbits[0])) + 1);
- p = buf + sprintf(buf, "%s:2,", uid);
- for (i=0;i<sizeof(flagbits)/sizeof(flagbits[0]);i++) {
- if (info->flags & flagbits[i].flagbit)
- *p++ = flagbits[i].flag;
- }
- *p = 0;
-
- return g_strdup(buf);
-}
-
-/* returns 0 if the info matches (or there was none), otherwise we changed it */
-int camel_maildir_summary_name_to_info(CamelMessageInfo *info, const char *name)
-{
- char *p, c;
- guint32 set = 0; /* what we set */
- /*guint32 all = 0;*/ /* all flags */
- int i;
-
- p = strstr(name, ":2,");
- if (p) {
- p+=3;
- while ((c = *p++)) {
- /* we could assume that the flags are in order, but its just as easy not to require */
- for (i=0;i<sizeof(flagbits)/sizeof(flagbits[0]);i++) {
- if (flagbits[i].flag == c && (info->flags & flagbits[i].flagbit) == 0) {
- set |= flagbits[i].flagbit;
- }
- /*all |= flagbits[i].flagbit;*/
- }
- }
-
- /* changed? */
- /*if ((info->flags & all) != set) {*/
- if ((info->flags & set) != set) {
- /* ok, they did change, only add the new flags ('merge flags'?) */
- /*info->flags &= all; if we wanted to set only the new flags, which we probably dont */
- info->flags |= set;
- return 1;
- }
- }
-
- return 0;
-}
-
-/* for maildir, x-evolution isn't used, so dont try and get anything out of it */
-static int maildir_summary_decode_x_evolution(CamelLocalSummary *cls, const char *xev, CamelMessageInfo *mi)
-{
- return -1;
-}
-
-static char *maildir_summary_encode_x_evolution(CamelLocalSummary *cls, const CamelMessageInfo *mi)
-{
- return NULL;
-}
-
-/* FIXME:
- both 'new' and 'add' will try and set the filename, this is not ideal ...
-*/
-static CamelMessageInfo *maildir_summary_add(CamelLocalSummary *cls, CamelMimeMessage *msg, const CamelMessageInfo *info, CamelFolderChangeInfo *changes, CamelException *ex)
-{
- CamelMessageInfo *mi;
-
- mi = ((CamelLocalSummaryClass *) parent_class)->add(cls, msg, info, changes, ex);
- if (mi) {
- if (info) {
- camel_maildir_info_set_filename(mi, camel_maildir_summary_info_to_name(mi));
- d(printf("Setting filename to %s\n", camel_maildir_info_filename(mi)));
- }
- }
-
- return mi;
-}
-
-static CamelMessageInfo *message_info_new(CamelFolderSummary * s, struct _header_raw *h)
-{
- CamelMessageInfo *mi;
- CamelMaildirSummary *mds = (CamelMaildirSummary *)s;
- CamelMaildirMessageInfo *mdi;
- const char *uid;
-
- mi = ((CamelFolderSummaryClass *) parent_class)->message_info_new(s, h);
- /* assign the uid and new filename */
- if (mi) {
- mdi = (CamelMaildirMessageInfo *)mi;
-
- uid = camel_message_info_uid(mi);
- if (uid==NULL || uid[0] == 0)
- camel_message_info_set_uid(mi, camel_folder_summary_next_uid_string(s));
-
- /* with maildir we know the real received date, from the filename */
- mi->date_received = strtoul(camel_message_info_uid(mi), NULL, 10);
-
- if (mds->priv->current_file) {
-#if 0
- char *p1, *p2, *p3;
- unsigned long uid;
-#endif
- /* if setting from a file, grab the flags from it */
- camel_maildir_info_set_filename(mi, g_strdup(mds->priv->current_file));
- camel_maildir_summary_name_to_info(mi, mds->priv->current_file);
-
-#if 0
- /* Actually, I dont think all this effort is worth it at all ... */
-
- /* also, see if we can extract the next-id from tne name, and safe-if-fy ourselves against collisions */
- /* we check for something.something_number.something */
- p1 = strchr(mdi->filename, '.');
- if (p1) {
- p2 = strchr(p1+1, '.');
- p3 = strchr(p1+1, '_');
- if (p2 && p3 && p3<p2) {
- uid = strtoul(p3+1, &p1, 10);
- if (p1 == p2 && uid>0)
- camel_folder_summary_set_uid(s, uid);
- }
- }
-#endif
- } else {
- /* if creating a file, set its name from the flags we have */
- camel_maildir_info_set_filename(mdi, camel_maildir_summary_info_to_name(mi));
- d(printf("Setting filename to %s\n", camel_maildir_info_filename(mi)));
- }
- }
-
- return mi;
-}
-
-
-static void message_info_free(CamelFolderSummary *s, CamelMessageInfo *mi)
-{
-#ifndef DOESTRV
- CamelMaildirMessageInfo *mdi = (CamelMaildirMessageInfo *)mi;
-
- g_free(mdi->filename);
-#endif
- ((CamelFolderSummaryClass *) parent_class)->message_info_free(s, mi);
-}
-
-
-static char *maildir_summary_next_uid_string(CamelFolderSummary *s)
-{
- CamelMaildirSummary *mds = (CamelMaildirSummary *)s;
-
- d(printf("next uid string called?\n"));
-
- /* if we have a current file, then use that to get the uid */
- if (mds->priv->current_file) {
- char *cln;
-
- cln = strchr(mds->priv->current_file, ':');
- if (cln)
- return g_strndup(mds->priv->current_file, cln-mds->priv->current_file);
- else
- return g_strdup(mds->priv->current_file);
- } else {
- /* the first would probably work, but just to be safe, check for collisions */
-#if 0
- return g_strdup_printf("%ld.%d_%u.%s", time(0), getpid(), camel_folder_summary_next_uid(s), mds->priv->hostname);
-#else
- CamelLocalSummary *cls = (CamelLocalSummary *)s;
- char *name = NULL, *uid = NULL;
- struct stat st;
- int retry = 0;
- guint32 nextuid = camel_folder_summary_next_uid(s);
-
- /* we use time.pid_count.hostname */
- do {
- if (retry > 0) {
- g_free(name);
- g_free(uid);
- sleep(2);
- }
- uid = g_strdup_printf("%ld.%d_%u.%s", time(0), getpid(), nextuid, mds->priv->hostname);
- name = g_strdup_printf("%s/tmp/%s", cls->folder_path, uid);
- retry++;
- } while (stat(name, &st) == 0 && retry<3);
-
- /* I dont know what we're supposed to do if it fails to find a unique name?? */
-
- g_free(name);
- return uid;
-#endif
- }
-}
-
-static CamelMessageInfo *
-message_info_load(CamelFolderSummary *s, FILE *in)
-{
- CamelMessageInfo *mi;
- CamelMaildirSummary *mds = (CamelMaildirSummary *)s;
-
- mi = ((CamelFolderSummaryClass *) parent_class)->message_info_load(s, in);
- if (mi) {
- char *name;
-
- if (mds->priv->load_map
- && (name = g_hash_table_lookup(mds->priv->load_map, camel_message_info_uid(mi)))) {
- d(printf("Setting filename of %s to %s\n", camel_message_info_uid(mi), name));
- camel_maildir_info_set_filename(mi, g_strdup(name));
- camel_maildir_summary_name_to_info(mi, name);
- }
- }
-
- return mi;
-}
-
-static int maildir_summary_load(CamelLocalSummary *cls, int forceindex, CamelException *ex)
-{
- char *cur;
- DIR *dir;
- struct dirent *d;
- CamelMaildirSummary *mds = (CamelMaildirSummary *)cls;
- char *uid;
- EMemPool *pool;
- int ret;
-
- cur = g_strdup_printf("%s/cur", cls->folder_path);
-
- d(printf("pre-loading uid <> filename map\n"));
-
- dir = opendir(cur);
- if (dir == NULL) {
- camel_exception_setv(ex, 1, _("Cannot open maildir directory path: %s: %s"), cls->folder_path, strerror(errno));
- g_free(cur);
- return -1;
- }
-
- mds->priv->load_map = g_hash_table_new(g_str_hash, g_str_equal);
- pool = e_mempool_new(1024, 512, E_MEMPOOL_ALIGN_BYTE);
-
- while ( (d = readdir(dir)) ) {
- if (d->d_name[0] == '.')
- continue;
-
- /* map the filename -> uid */
- uid = strchr(d->d_name, ':');
- if (uid) {
- int len = uid-d->d_name;
- uid = e_mempool_alloc(pool, len+1);
- memcpy(uid, d->d_name, len);
- uid[len] = 0;
- g_hash_table_insert(mds->priv->load_map, uid, e_mempool_strdup(pool, d->d_name));
- } else {
- uid = e_mempool_strdup(pool, d->d_name);
- g_hash_table_insert(mds->priv->load_map, uid, uid);
- }
- }
- closedir(dir);
- g_free(cur);
-
- ret = ((CamelLocalSummaryClass *) parent_class)->load(cls, forceindex, ex);
-
- g_hash_table_destroy(mds->priv->load_map);
- mds->priv->load_map = NULL;
- e_mempool_destroy(pool);
-
- return ret;
-}
-
-static int camel_maildir_summary_add(CamelLocalSummary *cls, const char *name, int forceindex)
-{
- CamelMaildirSummary *maildirs = (CamelMaildirSummary *)cls;
- char *filename = g_strdup_printf("%s/cur/%s", cls->folder_path, name);
- int fd;
- CamelMimeParser *mp;
-
- d(printf("summarising: %s\n", name));
-
- fd = open(filename, O_RDONLY);
- if (fd == -1) {
- g_warning("Cannot summarise/index: %s: %s", filename, strerror(errno));
- g_free(filename);
- return -1;
- }
- mp = camel_mime_parser_new();
- camel_mime_parser_scan_from(mp, FALSE);
- camel_mime_parser_init_with_fd(mp, fd);
- if (cls->index && (forceindex || !ibex_contains_name(cls->index, (char *)name))) {
- d(printf("forcing indexing of message content\n"));
- camel_folder_summary_set_index((CamelFolderSummary *)maildirs, cls->index);
- } else {
- camel_folder_summary_set_index((CamelFolderSummary *)maildirs, NULL);
- }
- maildirs->priv->current_file = (char *)name;
- camel_folder_summary_add_from_parser((CamelFolderSummary *)maildirs, mp);
- camel_object_unref((CamelObject *)mp);
- maildirs->priv->current_file = NULL;
- camel_folder_summary_set_index((CamelFolderSummary *)maildirs, NULL);
- g_free(filename);
- return 0;
-}
-
-static void
-remove_summary(char *key, CamelMessageInfo *info, CamelLocalSummary *cls)
-{
- d(printf("removing message %s from summary\n", key));
- if (cls->index)
- ibex_unindex(cls->index, (char *)camel_message_info_uid(info));
- camel_folder_summary_remove((CamelFolderSummary *)cls, info);
- camel_folder_summary_info_free((CamelFolderSummary *)cls, info);
-}
-
-static int
-sort_receive_cmp(const void *ap, const void *bp)
-{
- const CamelMessageInfo
- *a = *((CamelMessageInfo **)ap),
- *b = *((CamelMessageInfo **)bp);
-
- if (a->date_received < b->date_received)
- return -1;
- else if (a->date_received > b->date_received)
- return 1;
-
- return 0;
-}
-
-static int
-maildir_summary_check(CamelLocalSummary *cls, CamelFolderChangeInfo *changes, CamelException *ex)
-{
- DIR *dir;
- struct dirent *d;
- char *p;
- CamelMessageInfo *info;
- CamelMaildirMessageInfo *mdi;
- CamelFolderSummary *s = (CamelFolderSummary *)cls;
- GHashTable *left;
- int i, count;
- int forceindex;
- char *new, *cur;
- char *uid;
-
- new = g_strdup_printf("%s/new", cls->folder_path);
- cur = g_strdup_printf("%s/cur", cls->folder_path);
-
- /* FIXME: Handle changeinfo */
-
- d(printf("checking summary ...\n"));
-
- /* scan the directory, check for mail files not in the index, or index entries that
- no longer exist */
- dir = opendir(cur);
- if (dir == NULL) {
- camel_exception_setv(ex, 1, _("Cannot open maildir directory path: %s: %s"), cls->folder_path, strerror(errno));
- g_free(cur);
- g_free(new);
- return -1;
- }
-
- /* keeps track of all uid's that have not been processed */
- left = g_hash_table_new(g_str_hash, g_str_equal);
- count = camel_folder_summary_count((CamelFolderSummary *)cls);
- forceindex = count == 0;
- for (i=0;i<count;i++) {
- info = camel_folder_summary_index((CamelFolderSummary *)cls, i);
- if (info) {
- g_hash_table_insert(left, (char *)camel_message_info_uid(info), info);
- }
- }
-
- while ( (d = readdir(dir)) ) {
- /* FIXME: also run stat to check for regular file */
- p = d->d_name;
- if (p[0] == '.')
- continue;
-
- /* map the filename -> uid */
- uid = strchr(d->d_name, ':');
- if (uid)
- uid = g_strndup(d->d_name, uid-d->d_name);
- else
- uid = g_strdup(d->d_name);
-
- info = camel_folder_summary_uid((CamelFolderSummary *)cls, uid);
- if (info == NULL || (cls->index && (!ibex_contains_name(cls->index, uid)))) {
- /* need to add this file to the summary */
- if (info != NULL) {
- CamelMessageInfo *old = g_hash_table_lookup(left, camel_message_info_uid(info));
- if (old) {
- g_hash_table_remove(left, uid);
- camel_folder_summary_info_free((CamelFolderSummary *)cls, old);
- }
- camel_folder_summary_remove((CamelFolderSummary *)cls, info);
- camel_folder_summary_info_free((CamelFolderSummary *)cls, info);
- }
- camel_maildir_summary_add(cls, d->d_name, forceindex);
- } else {
- const char *filename;
- CamelMessageInfo *old;
-
- old = g_hash_table_lookup(left, camel_message_info_uid(info));
- if (old) {
- camel_folder_summary_info_free((CamelFolderSummary *)cls, old);
- g_hash_table_remove(left, camel_message_info_uid(info));
- }
-
- mdi = (CamelMaildirMessageInfo *)info;
- filename = camel_maildir_info_filename(mdi);
- /* TODO: only store the extension in the mdi->filename struct, not the whole lot */
- if (filename == NULL || strcmp(filename, d->d_name) != 0) {
-#ifdef DOESTRV
-#warning "cannot modify the estrv after its been setup, for mt-safe code"
- d(printf("filename changed: %s to %s\n", filename, d->d_name));
-
- /* need to update the summary hash string reference since it might (will) change */
- CAMEL_SUMMARY_LOCK(s, summary_lock);
- g_hash_table_remove(s->messages_uid, uid);
- info->strings = e_strv_set_ref(info->strings, CAMEL_MAILDIR_INFO_FILENAME, d->d_name);
- /* we need to re-pack as well */
- info->strings = e_strv_pack(info->strings);
- g_hash_table_insert(s->messages_uid, (char *)camel_message_info_uid(info), info);
- CAMEL_SUMMARY_UNLOCK(s, summary_lock);
-#else
- g_free(mdi->filename);
- mdi->filename = g_strdup(d->d_name);
-#endif
- }
- camel_folder_summary_info_free((CamelFolderSummary *)cls, info);
- }
- g_free(uid);
- }
- closedir(dir);
- g_hash_table_foreach(left, (GHFunc)remove_summary, cls);
- g_hash_table_destroy(left);
-
- /* now, scan new for new messages, and copy them to cur, and so forth */
- dir = opendir(new);
- if (dir != NULL) {
- while ( (d = readdir(dir)) ) {
- char *name, *newname, *destname, *destfilename;
- char *src, *dest;
-
- name = d->d_name;
- if (name[0] == '.')
- continue;
-
- /* already in summary? shouldn't happen, but just incase ... */
- if ((info = camel_folder_summary_uid((CamelFolderSummary *)cls, name))) {
- camel_folder_summary_info_free((CamelFolderSummary *)cls, info);
- newname = destname = camel_folder_summary_next_uid_string(s);
- } else {
- newname = NULL;
- destname = name;
- }
-
- /* copy this to the destination folder, use 'standard' semantics for maildir info field */
- src = g_strdup_printf("%s/%s", new, name);
- destfilename = g_strdup_printf("%s:2,", destname);
- dest = g_strdup_printf("%s/%s", cur, destfilename);
-
- /* FIXME: This should probably use link/unlink */
-
- if (rename(src, dest) == 0) {
- camel_maildir_summary_add(cls, destfilename, forceindex);
- if (changes)
- camel_folder_change_info_add_uid(changes, destname);
- } else {
- /* else? we should probably care about failures, but wont */
- g_warning("Failed to move new maildir message %s to cur %s", src, dest);
- }
-
- /* c strings are painful to work with ... */
- g_free(destfilename);
- g_free(newname);
- g_free(src);
- g_free(dest);
- }
- }
- closedir(dir);
-
- g_free(new);
- g_free(cur);
-
- /* sort the summary based on receive time, since the directory order is not useful */
- CAMEL_SUMMARY_LOCK(s, summary_lock);
- qsort(s->messages->pdata, s->messages->len, sizeof(CamelMessageInfo *), sort_receive_cmp);
- CAMEL_SUMMARY_UNLOCK(s, summary_lock);
-
- /* FIXME: move this up a class? */
-
- /* force a save of the index, just to make sure */
- /* note this could be expensive so possibly shouldn't be here
- as such */
- if (cls->index) {
- ibex_save(cls->index);
- }
-
- return 0;
-}
-
-/* sync the summary with the ondisk files. */
-static int
-maildir_summary_sync(CamelLocalSummary *cls, gboolean expunge, CamelFolderChangeInfo *changes, CamelException *ex)
-{
- int count, i;
- CamelMessageInfo *info;
- CamelMaildirMessageInfo *mdi;
-#ifdef DOESTRV
- CamelFolderSummary *s = (CamelFolderSummary *)cls;
-#endif
- char *name;
- struct stat st;
-
- d(printf("summary_sync(expunge=%s)\n", expunge?"true":"false"));
-
- if (camel_local_summary_check(cls, changes, ex) == -1)
- return -1;
-
- if (cls->index) {
- ibex_save(cls->index);
- }
-
- count = camel_folder_summary_count((CamelFolderSummary *)cls);
- for (i=count-1;i>=0;i--) {
- info = camel_folder_summary_index((CamelFolderSummary *)cls, i);
- mdi = (CamelMaildirMessageInfo *)info;
- if (info && (info->flags & CAMEL_MESSAGE_DELETED) && expunge) {
- name = g_strdup_printf("%s/cur/%s", cls->folder_path, camel_maildir_info_filename(mdi));
- d(printf("deleting %s\n", name));
- if (unlink(name) == 0 || errno==ENOENT) {
-
- /* FIXME: put this in folder_summary::remove()? */
- if (cls->index)
- ibex_unindex(cls->index, (char *)camel_message_info_uid(info));
-
- camel_folder_change_info_remove_uid(changes, camel_message_info_uid(info));
- camel_folder_summary_remove((CamelFolderSummary *)cls, info);
- }
- g_free(name);
- } else if (info && (info->flags & CAMEL_MESSAGE_FOLDER_FLAGGED)) {
- char *newname = camel_maildir_summary_info_to_name(info);
- char *dest;
-
- /* do we care about additional metainfo stored inside the message? */
- /* probably should all go in the filename? */
-
- /* have our flags/ i.e. name changed? */
- if (strcmp(newname, camel_maildir_info_filename(mdi))) {
- name = g_strdup_printf("%s/cur/%s", cls->folder_path, camel_maildir_info_filename(mdi));
- dest = g_strdup_printf("%s/cur/%s", cls->folder_path, newname);
- rename(name, dest);
- if (stat(dest, &st) == -1) {
- /* we'll assume it didn't work, but dont change anything else */
- g_free(newname);
- } else {
- /* TODO: If this is made mt-safe, then this code could be a problem, since
- the estrv is being modified.
- Sigh, this may mean the maildir name has to be cached another way */
-#ifdef DOESTRV
-#warning "cannot modify the estrv after its been setup, for mt-safe code"
- CAMEL_SUMMARY_LOCK(s, summary_lock);
- /* need to update the summary hash ref */
- g_hash_table_remove(s->messages_uid, camel_message_info_uid(info));
- info->strings = e_strv_set_ref_free(info->strings, CAMEL_MAILDIR_INFO_FILENAME, newname);
- info->strings = e_strv_pack(info->strings);
- g_hash_table_insert(s->messages_uid, (char *)camel_message_info_uid(info), info);
- CAMEL_SUMMARY_UNLOCK(s, summary_lock);
-#else
- g_free(mdi->filename);
- mdi->filename = newname;
-#endif
- }
- g_free(name);
- g_free(dest);
- } else {
- g_free(newname);
- }
-
- /* strip FOLDER_MESSAGE_FLAGED, etc */
- info->flags &= 0xffff;
- }
- camel_folder_summary_info_free((CamelFolderSummary *)cls, info);
- }
- return 0;
-}
-
diff --git a/camel/providers/local/camel-maildir-summary.h b/camel/providers/local/camel-maildir-summary.h
deleted file mode 100644
index 456492b5e5..0000000000
--- a/camel/providers/local/camel-maildir-summary.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (C) 2000 Helix Code Inc.
- *
- * Authors: Not Zed <notzed@lostzed.mmc.com.au>
- *
- * 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_MAILDIR_SUMMARY_H
-#define _CAMEL_MAILDIR_SUMMARY_H
-
-#include "camel-local-summary.h"
-#include <camel/camel-folder.h>
-#include <camel/camel-exception.h>
-#include <libibex/ibex.h>
-
-#define CAMEL_MAILDIR_SUMMARY(obj) CAMEL_CHECK_CAST (obj, camel_maildir_summary_get_type (), CamelMaildirSummary)
-#define CAMEL_MAILDIR_SUMMARY_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_maildir_summary_get_type (), CamelMaildirSummaryClass)
-#define CAMEL_IS_MAILDIR_SUMMARY(obj) CAMEL_CHECK_TYPE (obj, camel_maildir_summary_get_type ())
-
-typedef struct _CamelMaildirSummary CamelMaildirSummary;
-typedef struct _CamelMaildirSummaryClass CamelMaildirSummaryClass;
-
-typedef struct _CamelMaildirMessageContentInfo {
- CamelMessageContentInfo info;
-} CamelMaildirMessageContentInfo;
-
-#ifdef DOESTRV
-enum {
- CAMEL_MAILDIR_INFO_FILENAME = CAMEL_MESSAGE_INFO_LAST,
- CAMEL_MAILDIR_INFO_LAST,
-};
-#endif
-
-typedef struct _CamelMaildirMessageInfo {
- CamelMessageInfo info;
-
-#ifndef DOESTRV
- char *filename; /* maildir has this annoying status shit on the end of the filename, use this to get the real message id */
-#endif
-} CamelMaildirMessageInfo;
-
-struct _CamelMaildirSummary {
- CamelLocalSummary parent;
- struct _CamelMaildirSummaryPrivate *priv;
-};
-
-struct _CamelMaildirSummaryClass {
- CamelLocalSummaryClass parent_class;
-
- /* virtual methods */
-
- /* signals */
-};
-
-CamelType camel_maildir_summary_get_type (void);
-CamelMaildirSummary *camel_maildir_summary_new (const char *filename, const char *maildirdir, ibex *index);
-
-/* convert some info->flags to/from the messageinfo */
-char *camel_maildir_summary_info_to_name(const CamelMessageInfo *info);
-int camel_maildir_summary_name_to_info(CamelMessageInfo *info, const char *name);
-
-#ifdef DOESTRV
-#define camel_maildir_info_filename(x) camel_message_info_string((const CamelMessageInfo *)(x), CAMEL_MAILDIR_INFO_FILENAME)
-#define camel_maildir_info_set_filename(x, s) camel_message_info_set_string((CamelMessageInfo *)(x), CAMEL_MAILDIR_INFO_FILENAME, s)
-#else
-#define camel_maildir_info_filename(x) (((CamelMaildirMessageInfo *)x)->filename)
-#define camel_maildir_info_set_filename(x, s) (g_free(((CamelMaildirMessageInfo *)x)->filename),((CamelMaildirMessageInfo *)x)->filename = s)
-#endif
-
-#endif /* ! _CAMEL_MAILDIR_SUMMARY_H */
-
diff --git a/camel/providers/local/camel-mbox-folder.c b/camel/providers/local/camel-mbox-folder.c
deleted file mode 100644
index 9db90fb40c..0000000000
--- a/camel/providers/local/camel-mbox-folder.c
+++ /dev/null
@@ -1,436 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; fill-column: 160 -*-
- *
- * Authors: Michael Zucchi <notzed@helixcode.com>
- *
- * 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdlib.h>
-#include <sys/types.h>
-#include <dirent.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <errno.h>
-#include <string.h>
-#include <fcntl.h>
-
-#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) /*(printf("%s(%d): ", __FILE__, __LINE__),(x))*/
-
-static CamelLocalFolderClass *parent_class = NULL;
-
-/* Returns the class for a CamelMboxFolder */
-#define CMBOXF_CLASS(so) CAMEL_MBOX_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-#define CF_CLASS(so) CAMEL_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-#define CMBOXS_CLASS(so) CAMEL_STORE_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-
-static int mbox_lock(CamelLocalFolder *lf, CamelLockType type, CamelException *ex);
-static void mbox_unlock(CamelLocalFolder *lf);
-
-static void mbox_set_message_user_flag(CamelFolder *folder, const char *uid, const char *name, gboolean value);
-static void mbox_set_message_user_tag(CamelFolder *folder, const char *uid, const char *name, const char *value);
-
-static void mbox_append_message(CamelFolder *folder, CamelMimeMessage * message, const CamelMessageInfo * info, CamelException *ex);
-static CamelMimeMessage *mbox_get_message(CamelFolder *folder, const gchar * uid, CamelException *ex);
-static CamelLocalSummary *mbox_create_summary(const char *path, const char *folder, ibex *index);
-
-static void mbox_finalise(CamelObject * object);
-
-static void
-camel_mbox_folder_class_init(CamelMboxFolderClass * camel_mbox_folder_class)
-{
- CamelFolderClass *camel_folder_class = CAMEL_FOLDER_CLASS(camel_mbox_folder_class);
- CamelLocalFolderClass *lclass = (CamelLocalFolderClass *)camel_mbox_folder_class;
-
- parent_class = (CamelLocalFolderClass *)camel_type_get_global_classfuncs(camel_local_folder_get_type());
-
- /* virtual method definition */
-
- /* virtual method overload */
- camel_folder_class->append_message = mbox_append_message;
- camel_folder_class->get_message = mbox_get_message;
-
- camel_folder_class->set_message_user_flag = mbox_set_message_user_flag;
- camel_folder_class->set_message_user_tag = mbox_set_message_user_tag;
-
- lclass->create_summary = mbox_create_summary;
- lclass->lock = mbox_lock;
- lclass->unlock = mbox_unlock;
-}
-
-static void
-mbox_init(gpointer object, gpointer klass)
-{
- /*CamelFolder *folder = object;*/
- CamelMboxFolder *mbox_folder = object;
-
- mbox_folder->lockfd = -1;
-}
-
-static void
-mbox_finalise(CamelObject * object)
-{
- CamelMboxFolder *mbox_folder = (CamelMboxFolder *)object;
-
- g_assert(mbox_folder->lockfd == -1);
-}
-
-CamelType camel_mbox_folder_get_type(void)
-{
- static CamelType camel_mbox_folder_type = CAMEL_INVALID_TYPE;
-
- if (camel_mbox_folder_type == CAMEL_INVALID_TYPE) {
- camel_mbox_folder_type = camel_type_register(CAMEL_LOCAL_FOLDER_TYPE, "CamelMboxFolder",
- sizeof(CamelMboxFolder),
- sizeof(CamelMboxFolderClass),
- (CamelObjectClassInitFunc) camel_mbox_folder_class_init,
- NULL,
- (CamelObjectInitFunc) mbox_init,
- (CamelObjectFinalizeFunc) mbox_finalise);
- }
-
- return camel_mbox_folder_type;
-}
-
-CamelFolder *
-camel_mbox_folder_new(CamelStore *parent_store, const char *full_name, guint32 flags, CamelException *ex)
-{
- CamelFolder *folder;
-
- d(printf("Creating mbox folder: %s in %s\n", full_name, camel_local_store_get_toplevel_dir((CamelLocalStore *)parent_store)));
-
- folder = (CamelFolder *)camel_object_new(CAMEL_MBOX_FOLDER_TYPE);
- folder = (CamelFolder *)camel_local_folder_construct((CamelLocalFolder *)folder,
- parent_store, full_name, flags, ex);
-
- return folder;
-}
-
-static CamelLocalSummary *mbox_create_summary(const char *path, const char *folder, ibex *index)
-{
- return (CamelLocalSummary *)camel_mbox_summary_new(path, folder, index);
-}
-
-static int mbox_lock(CamelLocalFolder *lf, CamelLockType type, CamelException *ex)
-{
- CamelMboxFolder *mf = (CamelMboxFolder *)lf;
-
- /* make sure we have matching unlocks for locks, camel-local-folder class should enforce this */
- g_assert(mf->lockfd == -1);
-
- mf->lockfd = open(lf->folder_path, O_RDWR, 0);
- if (mf->lockfd == -1) {
- camel_exception_setv(ex, 1, _("Cannot create folder lock on %s: %s"), lf->folder_path, strerror(errno));
- return -1;
- }
-
- return camel_lock_folder(lf->folder_path, mf->lockfd, type, ex);
-}
-
-static void mbox_unlock(CamelLocalFolder *lf)
-{
- CamelMboxFolder *mf = (CamelMboxFolder *)lf;
-
- g_assert(mf->lockfd != -1);
- camel_unlock_folder(lf->folder_path, mf->lockfd);
- close(mf->lockfd);
- mf->lockfd = -1;
-}
-
-static void
-mbox_append_message(CamelFolder *folder, CamelMimeMessage * message, const CamelMessageInfo * info, CamelException *ex)
-{
- CamelLocalFolder *lf = (CamelLocalFolder *)folder;
- CamelStream *output_stream = NULL, *filter_stream = NULL;
- CamelMimeFilter *filter_from = NULL;
- CamelMboxSummary *mbs = (CamelMboxSummary *)folder->summary;
- CamelMessageInfo *mi;
- char *fromline = NULL;
- int fd;
- struct stat st;
-#if 0
- char *xev;
-#endif
- /* If we can't lock, dont do anything */
- if (camel_local_folder_lock(lf, CAMEL_LOCK_WRITE, ex) == -1)
- return;
-
- d(printf("Appending message\n"));
-
- /* first, check the summary is correct (updates folder_size too) */
- camel_local_summary_check((CamelLocalSummary *)folder->summary, lf->changes, ex);
- if (camel_exception_is_set(ex))
- goto fail;
-
- /* add it to the summary/assign the uid, etc */
- mi = camel_local_summary_add((CamelLocalSummary *)folder->summary, message, info, lf->changes, ex);
- if (camel_exception_is_set(ex))
- goto fail;
-
- d(printf("Appending message: uid is %s\n", camel_message_info_uid(mi)));
-
- output_stream = camel_stream_fs_new_with_name(lf->folder_path, O_WRONLY|O_APPEND, 0600);
- if (output_stream == NULL) {
- camel_exception_setv(ex, 1, _("Cannot open mailbox: %s: %s\n"), lf->folder_path, strerror(errno));
- goto fail;
- }
-
- /* and we need to set the frompos/XEV explicitly */
- ((CamelMboxMessageInfo *)mi)->frompos = mbs->folder_size?mbs->folder_size+1:0;
-#if 0
- xev = camel_local_summary_encode_x_evolution((CamelLocalSummary *)folder->summary, mi);
- if (xev) {
- /* the x-ev header should match the 'current' flags, no problem, so store as much */
- camel_medium_set_header((CamelMedium *)message, "X-Evolution", xev);
- mi->flags &= ~ CAMEL_MESSAGE_FOLDER_NOXEV|CAMEL_MESSAGE_FOLDER_FLAGGED;
- g_free(xev);
- }
-#endif
-
- /* we must write this to the non-filtered stream ... prepend a \n if not at the start of the file */
- fromline = camel_mbox_summary_build_from(((CamelMimePart *)message)->headers);
- if (camel_stream_printf(output_stream, mbs->folder_size==0?"%s":"\n%s", fromline) == -1)
- goto fail_write;
-
- /* 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((CamelDataWrapper *)message, filter_stream) == -1)
- goto fail_write;
-
- if (camel_stream_close(filter_stream) == -1)
- goto fail_write;
-
- /* unlock as soon as we can */
- camel_local_folder_unlock(lf);
-
- /* filter stream ref's the output stream itself, so we need to unref it too */
- camel_object_unref((CamelObject *)filter_from);
- camel_object_unref((CamelObject *)filter_stream);
- camel_object_unref((CamelObject *)output_stream);
- g_free(fromline);
-
- /* now we 'fudge' the summary to tell it its uptodate, because its idea of uptodate has just changed */
- /* the stat really shouldn't fail, we just wrote to it */
- if (stat(lf->folder_path, &st) == 0) {
- mbs->folder_size = st.st_size;
- ((CamelFolderSummary *)mbs)->time = st.st_mtime;
- }
-
- if (camel_folder_change_info_changed(lf->changes)) {
- camel_object_trigger_event((CamelObject *)folder, "folder_changed", lf->changes);
- camel_folder_change_info_clear(lf->changes);
- }
-
- return;
-
-fail_write:
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Cannot append message to mbox file: %s: %s"), lf->folder_path, strerror(errno));
-
- if (filter_stream)
- camel_object_unref(CAMEL_OBJECT(filter_stream));
-
- if (output_stream)
- camel_object_unref(CAMEL_OBJECT(output_stream));
-
- if (filter_from)
- camel_object_unref(CAMEL_OBJECT(filter_from));
-
- g_free(fromline);
-
- /* reset the file to original size */
- fd = open(lf->folder_path, O_WRONLY, 0600);
-
- if (fd != -1) {
- ftruncate(fd, mbs->folder_size);
- close(fd);
- }
-
- /* and tell the summary its uptodate */
- if (stat(lf->folder_path, &st) == 0) {
- mbs->folder_size = st.st_size;
- ((CamelFolderSummary *)mbs)->time = st.st_mtime;
- }
-
-fail:
- /* make sure we unlock the folder - before we start triggering events into appland */
- camel_local_folder_unlock(lf);
-
- /* cascade the changes through, anyway, if there are any outstanding */
- if (camel_folder_change_info_changed(lf->changes)) {
- camel_object_trigger_event((CamelObject *)folder, "folder_changed", lf->changes);
- camel_folder_change_info_clear(lf->changes);
- }
-}
-
-static CamelMimeMessage *
-mbox_get_message(CamelFolder *folder, const gchar * uid, CamelException *ex)
-{
- CamelLocalFolder *lf = (CamelLocalFolder *)folder;
- CamelMimeMessage *message;
- CamelMboxMessageInfo *info;
- CamelMimeParser *parser;
- int fd;
- int retried = FALSE;
-
- d(printf("Getting message %s\n", uid));
-
- /* lock the folder first, burn if we can't */
- if (camel_local_folder_lock(lf, CAMEL_LOCK_READ, ex) == -1)
- return NULL;
-
-retry:
- /* get the message summary info */
- info = (CamelMboxMessageInfo *) camel_folder_summary_uid(folder->summary, uid);
-
- if (info == NULL) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_FOLDER_INVALID_UID,
- _("Cannot get message: %s\n %s"), uid, _("No such message"));
- camel_local_folder_unlock(lf);
- return NULL;
- }
-
- /* no frompos, its an error in the library (and we can't do anything with it */
- g_assert(info->frompos != -1);
-
- /* we use an fd instead of a normal stream here - the reason is subtle, camel_mime_part will cache
- the whole message in memory if the stream is non-seekable (which it is when built from a parser
- with no stream). This means we dont have to lock the mbox for the life of the message, but only
- while it is being created. */
-
- fd = open(lf->folder_path, O_RDONLY);
- if (fd == -1) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_FOLDER_INVALID_UID,
- _("Cannot get message: %s from folder %s\n %s"), uid, lf->folder_path,
- strerror(errno));
- camel_local_folder_unlock(lf);
- camel_folder_summary_info_free(folder->summary, (CamelMessageInfo *)info);
- return NULL;
- }
-
- /* 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_fd(parser, fd);
- camel_mime_parser_scan_from(parser, TRUE);
-
- camel_mime_parser_seek(parser, info->frompos, SEEK_SET);
- if (camel_mime_parser_step(parser, NULL, NULL) != HSCAN_FROM
- || camel_mime_parser_tell_start_from(parser) != info->frompos) {
-
- g_warning("Summary doesn't match the folder contents! eek!\n"
- " expecting offset %ld got %ld, state = %d", (long int)info->frompos,
- (long int)camel_mime_parser_tell_start_from(parser),
- camel_mime_parser_state(parser));
-
- camel_object_unref((CamelObject *)parser);
- camel_folder_summary_info_free(folder->summary, (CamelMessageInfo *)info);
-
- if (!retried) {
- retried = TRUE;
- camel_local_summary_check((CamelLocalSummary *)folder->summary, lf->changes, ex);
- if (!camel_exception_is_set(ex))
- goto retry;
- }
-
- camel_exception_setv(ex, CAMEL_EXCEPTION_FOLDER_INVALID_UID,
- _("Cannot get message: %s from folder %s\n %s"), uid, lf->folder_path,
- _("The folder appears to be irrecoverably corrupted."));
-
- camel_local_folder_unlock(lf);
- return NULL;
- }
-
- camel_folder_summary_info_free(folder->summary, (CamelMessageInfo *)info);
-
- message = camel_mime_message_new();
- if (camel_mime_part_construct_from_parser((CamelMimePart *)message, parser) == -1) {
- g_warning("Construction failed");
- camel_exception_setv(ex, CAMEL_EXCEPTION_FOLDER_INVALID_UID,
- _("Cannot get message: %s from folder %s\n %s"), uid, lf->folder_path,
- _("Message construction failed: Corrupt mailbox?"));
- camel_object_unref((CamelObject *)parser);
- camel_object_unref((CamelObject *)message);
- camel_local_folder_unlock(lf);
- return NULL;
- }
-
- /* and unlock now we're finished with it */
- camel_local_folder_unlock(lf);
-
- camel_object_unref((CamelObject *)parser);
-
- /* use the opportunity to notify of changes (particularly if we had a rebuild) */
- if (camel_folder_change_info_changed(lf->changes)) {
- camel_object_trigger_event((CamelObject *)folder, "folder_changed", lf->changes);
- camel_folder_change_info_clear(lf->changes);
- }
-
- return message;
-}
-
-static void
-mbox_set_message_user_flag(CamelFolder *folder, const char *uid, const char *name, gboolean value)
-{
- CamelMessageInfo *info;
-
- g_return_if_fail(folder->summary != NULL);
-
- info = camel_folder_summary_uid(folder->summary, uid);
- g_return_if_fail(info != NULL);
-
- if (camel_flag_set(&info->user_flags, name, value)) {
- info->flags |= CAMEL_MESSAGE_FOLDER_FLAGGED|CAMEL_MESSAGE_FOLDER_XEVCHANGE;
- camel_folder_summary_touch(folder->summary);
- camel_object_trigger_event(CAMEL_OBJECT(folder), "message_changed", (char *) uid);
- }
- camel_folder_summary_info_free(folder->summary, info);
-}
-
-static void
-mbox_set_message_user_tag(CamelFolder *folder, const char *uid, const char *name, const char *value)
-{
- CamelMessageInfo *info;
-
- g_return_if_fail(folder->summary != NULL);
-
- info = camel_folder_summary_uid(folder->summary, uid);
- g_return_if_fail(info != NULL);
-
- if (camel_tag_set(&info->user_tags, name, value)) {
- info->flags |= CAMEL_MESSAGE_FOLDER_FLAGGED|CAMEL_MESSAGE_FOLDER_XEVCHANGE;
- camel_folder_summary_touch(folder->summary);
- camel_object_trigger_event(CAMEL_OBJECT(folder), "message_changed", (char *) uid);
- }
- camel_folder_summary_info_free(folder->summary, info);
-}
diff --git a/camel/providers/local/camel-mbox-folder.h b/camel/providers/local/camel-mbox-folder.h
deleted file mode 100644
index 688135ff76..0000000000
--- a/camel/providers/local/camel-mbox-folder.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Authors: Michael Zucchi <notzed@helixcode.com>
- *
- * 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 "camel-local-folder.h"
-#include "camel-mbox-summary.h"
-
-#define CAMEL_MBOX_FOLDER_TYPE (camel_mbox_folder_get_type ())
-#define CAMEL_MBOX_FOLDER(obj) (CAMEL_CHECK_CAST((obj), CAMEL_MBOX_FOLDER_TYPE, CamelMboxFolder))
-#define CAMEL_MBOX_FOLDER_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_MBOX_FOLDER_TYPE, CamelMboxFolderClass))
-#define CAMEL_IS_MBOX_FOLDER(o) (CAMEL_CHECK_TYPE((o), CAMEL_MBOX_FOLDER_TYPE))
-
-typedef struct {
- CamelLocalFolder parent_object;
-
- int lockfd; /* for when we have a lock on the folder */
-} CamelMboxFolder;
-
-typedef struct {
- CamelLocalFolderClass parent_class;
-
- /* Virtual methods */
-
-} CamelMboxFolderClass;
-
-/* public methods */
-/* flags are taken from CAMEL_STORE_FOLDER_* flags */
-CamelFolder *camel_mbox_folder_new(CamelStore *parent_store, const char *full_name, guint32 flags, CamelException *ex);
-
-/* Standard Camel function */
-CamelType camel_mbox_folder_get_type(void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_MBOX_FOLDER_H */
diff --git a/camel/providers/local/camel-mbox-store.c b/camel/providers/local/camel-mbox-store.c
deleted file mode 100644
index 712c7fde37..0000000000
--- a/camel/providers/local/camel-mbox-store.c
+++ /dev/null
@@ -1,171 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Authors: Michael Zucchi <notzed@helixcode.com>
- *
- * 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <sys/stat.h>
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-
-#include "camel-mbox-store.h"
-#include "camel-mbox-folder.h"
-#include "camel-exception.h"
-#include "camel-url.h"
-
-static CamelLocalStoreClass *parent_class = NULL;
-
-/* Returns the class for a CamelMboxStore */
-#define CMBOXS_CLASS(so) CAMEL_MBOX_STORE_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-#define CF_CLASS(so) CAMEL_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-#define CMBOXF_CLASS(so) CAMEL_MBOX_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-
-static CamelFolder *get_folder(CamelStore *store, const char *folder_name, guint32 flags, CamelException *ex);
-static void delete_folder(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);
-
- parent_class = (CamelLocalStoreClass *)camel_type_get_global_classfuncs(camel_local_store_get_type());
-
- /* virtual method overload */
- camel_store_class->get_folder = get_folder;
- camel_store_class->delete_folder = delete_folder;
-}
-
-CamelType
-camel_mbox_store_get_type (void)
-{
- static CamelType camel_mbox_store_type = CAMEL_INVALID_TYPE;
-
- if (camel_mbox_store_type == CAMEL_INVALID_TYPE) {
- camel_mbox_store_type = camel_type_register (CAMEL_LOCAL_STORE_TYPE, "CamelMboxStore",
- sizeof (CamelMboxStore),
- sizeof (CamelMboxStoreClass),
- (CamelObjectClassInitFunc) camel_mbox_store_class_init,
- NULL,
- NULL,
- NULL);
- }
-
- return camel_mbox_store_type;
-}
-
-static CamelFolder *
-get_folder(CamelStore *store, const char *folder_name, guint32 flags, CamelException *ex)
-{
- char *name;
- struct stat st;
-
- (void) ((CamelStoreClass *)parent_class)->get_folder(store, folder_name, flags, ex);
- if (camel_exception_is_set(ex))
- return NULL;
-
- name = g_strdup_printf("%s%s", CAMEL_SERVICE(store)->url->path, folder_name);
-
- if (stat(name, &st) == -1) {
- int fd;
-
- if (errno != ENOENT) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not open file `%s':\n%s"),
- name, g_strerror(errno));
- g_free(name);
- return NULL;
- }
- if ((flags & CAMEL_STORE_FOLDER_CREATE) == 0) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_STORE_NO_FOLDER,
- _("Folder `%s' does not exist."),
- folder_name);
- g_free(name);
- return NULL;
- }
-
- fd = open(name, O_WRONLY | O_CREAT | O_APPEND, 0600);
- if (fd == -1) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not create file `%s':\n%s"),
- name, g_strerror(errno));
- g_free(name);
- return NULL;
- }
- g_free(name);
- close(fd);
- } else if (!S_ISREG(st.st_mode)) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_STORE_NO_FOLDER,
- _("`%s' is not a regular file."),
- name);
- g_free(name);
- return NULL;
- } else
- g_free(name);
-
- return camel_mbox_folder_new(store, folder_name, flags, ex);
-}
-
-static void
-delete_folder (CamelStore *store, const char *folder_name, CamelException *ex)
-{
- char *name;
- struct stat st;
-
- name = g_strdup_printf ("%s%s", CAMEL_SERVICE (store)->url->path, folder_name);
- if (stat (name, &st) == -1) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not delete folder `%s':\n%s"),
- folder_name, g_strerror (errno));
- g_free (name);
- return;
- }
-
- if (!S_ISREG (st.st_mode)) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_STORE_NO_FOLDER,
- _("`%s' is not a regular file."), name);
- g_free (name);
- return;
- }
-
- if (st.st_size != 0) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_FOLDER_NON_EMPTY,
- _("Folder `%s' is not empty. Not deleted."),
- folder_name);
- g_free (name);
- return;
- }
-
- if (unlink(name) == -1 && errno != ENOENT) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not delete folder `%s':\n%s"),
- name, g_strerror (errno));
- g_free(name);
- return;
- }
-
- g_free(name);
-
- /* and remove metadata */
- ((CamelStoreClass *)parent_class)->delete_folder(store, folder_name, ex);
-}
diff --git a/camel/providers/local/camel-mbox-store.h b/camel/providers/local/camel-mbox-store.h
deleted file mode 100644
index bc8d5149f5..0000000000
--- a/camel/providers/local/camel-mbox-store.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Authors: Michael Zucchi <notzed@helixcode.com>
- *
- * 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 "camel-local-store.h"
-
-#define CAMEL_MBOX_STORE_TYPE (camel_mbox_store_get_type ())
-#define CAMEL_MBOX_STORE(obj) (CAMEL_CHECK_CAST((obj), CAMEL_MBOX_STORE_TYPE, CamelMboxStore))
-#define CAMEL_MBOX_STORE_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_MBOX_STORE_TYPE, CamelMboxStoreClass))
-#define CAMEL_IS_MBOX_STORE(o) (CAMEL_CHECK_TYPE((o), CAMEL_MBOX_STORE_TYPE))
-
-typedef struct {
- CamelLocalStore parent_object;
-
-} CamelMboxStore;
-
-typedef struct {
- CamelLocalStoreClass parent_class;
-
-} CamelMboxStoreClass;
-
-/* public methods */
-
-/* Standard Camel function */
-CamelType camel_mbox_store_get_type (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_MBOX_STORE_H */
-
-
diff --git a/camel/providers/local/camel-mbox-summary.c b/camel/providers/local/camel-mbox-summary.c
deleted file mode 100644
index 389b1f356c..0000000000
--- a/camel/providers/local/camel-mbox-summary.c
+++ /dev/null
@@ -1,888 +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 <notzed@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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "camel-mbox-summary.h"
-#include "camel/camel-mime-message.h"
-#include "camel/camel-operation.h"
-
-#include <sys/stat.h>
-#include <sys/uio.h>
-#include <unistd.h>
-#include <errno.h>
-#include <string.h>
-#include <stdlib.h>
-
-#include "camel-mbox-summary.h"
-#include "camel/camel-mime-message.h"
-#include "camel/camel-operation.h"
-
-#define io(x)
-#define d(x) /*(printf("%s(%d): ", __FILE__, __LINE__),(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 int mbox_summary_check(CamelLocalSummary *cls, CamelFolderChangeInfo *changeinfo, CamelException *ex);
-static int mbox_summary_sync(CamelLocalSummary *cls, gboolean expunge, CamelFolderChangeInfo *changeinfo, CamelException *ex);
-
-static void camel_mbox_summary_class_init (CamelMboxSummaryClass *klass);
-static void camel_mbox_summary_init (CamelMboxSummary *obj);
-static void camel_mbox_summary_finalise (CamelObject *obj);
-
-static CamelLocalSummaryClass *camel_mbox_summary_parent;
-
-CamelType
-camel_mbox_summary_get_type(void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register(camel_local_summary_get_type(), "CamelMboxSummary",
- sizeof (CamelMboxSummary),
- sizeof (CamelMboxSummaryClass),
- (CamelObjectClassInitFunc) camel_mbox_summary_class_init,
- NULL,
- (CamelObjectInitFunc) camel_mbox_summary_init,
- (CamelObjectFinalizeFunc) camel_mbox_summary_finalise);
- }
-
- return type;
-}
-
-static void
-camel_mbox_summary_class_init(CamelMboxSummaryClass *klass)
-{
- CamelFolderSummaryClass *sklass = (CamelFolderSummaryClass *)klass;
- CamelLocalSummaryClass *lklass = (CamelLocalSummaryClass *)klass;
-
- camel_mbox_summary_parent = (CamelLocalSummaryClass *)camel_type_get_global_classfuncs(camel_local_summary_get_type());
-
- 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;*/
-
- lklass->check = mbox_summary_check;
- lklass->sync = mbox_summary_sync;
-}
-
-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(CamelObject *obj)
-{
- /*CamelMboxSummary *mbs = CAMEL_MBOX_SUMMARY(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 = (CamelMboxSummary *)camel_object_new(camel_mbox_summary_get_type());
-
- camel_local_summary_construct((CamelLocalSummary *)new, filename, mbox_name, index);
- return new;
-}
-
-static int
-summary_header_load(CamelFolderSummary *s, FILE *in)
-{
- CamelMboxSummary *mbs = CAMEL_MBOX_SUMMARY(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 = CAMEL_MBOX_SUMMARY(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 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) {
- CamelMboxMessageInfo *mbi = (CamelMboxMessageInfo *)mi;
-
- mbi->frompos = -1;
- }
-
- return mi;
-}
-
-static CamelMessageInfo *
-message_info_new_from_parser(CamelFolderSummary *s, CamelMimeParser *mp)
-{
- CamelMessageInfo *mi;
-
- 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);
- }
-
- 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;
-
- if (camel_folder_summary_decode_off_t(in, &mbi->frompos) == -1)
- goto error;
- }
-
- return mi;
-error:
- camel_folder_summary_info_free(s, mi);
- return NULL;
-}
-
-static int
-message_info_save(CamelFolderSummary *s, FILE *out, CamelMessageInfo *mi)
-{
- CamelMboxMessageInfo *mbi = (CamelMboxMessageInfo *)mi;
-
- io(printf("saving mbox message info\n"));
-
- if (((CamelFolderSummaryClass *)camel_mbox_summary_parent)->message_info_save(s, out, mi) == -1
- || camel_folder_summary_encode_off_t(out, mbi->frompos) == -1)
- return -1;
-
- return 0;
-}
-
-static int
-summary_rebuild(CamelMboxSummary *mbs, off_t offset, CamelException *ex)
-{
- CamelLocalSummary *cls = (CamelLocalSummary *)mbs;
- CamelFolderSummary *s = (CamelFolderSummary *)mbs;
- CamelMimeParser *mp;
- int fd;
- int ok = 0;
- struct stat st;
- off_t size = 0;
-
- /* FIXME: If there is a failure, it shouldn't clear the summary and restart,
- it should try and merge the summary info's. This is a bit tricky. */
-
- camel_operation_start(NULL, _("Summarising folder"));
-
- fd = open(cls->folder_path, O_RDONLY);
- if (fd == -1) {
- printf("%s failed to open: %s", cls->folder_path, strerror(errno));
- camel_exception_setv(ex, 1, _("Could not open folder: %s: summarising from position %ld: %s"),
- cls->folder_path, offset, strerror(errno));
- camel_operation_end(NULL);
- return -1;
- }
-
- if (fstat(fd, &st) == 0)
- size = st.st_size;
-
- 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, building summary from start");
- camel_mime_parser_drop_step(mp);
- offset = 0;
- camel_mime_parser_seek(mp, offset, SEEK_SET);
- camel_folder_summary_clear(s);
- } else {
- camel_mime_parser_unstep(mp);
- }
- } else {
- d(printf("mime parser state ran out? state is %d\n", camel_mime_parser_state(mp)));
- camel_object_unref(CAMEL_OBJECT(mp));
- /* end of file - no content? no error either */
- camel_operation_end(NULL);
- return 0;
- }
- }
-
- while (camel_mime_parser_step(mp, NULL, NULL) == HSCAN_FROM) {
- CamelMessageInfo *info;
- int pc = (camel_mime_parser_tell(mp)+1) * 100/size;
-
- camel_operation_progress(NULL, pc);
-
- info = camel_folder_summary_add_from_parser(s, mp);
- if (info == NULL) {
- camel_exception_setv(ex, 1, _("Fatal mail parser error near position %ld in folder %s"),
- camel_mime_parser_tell(mp), cls->folder_path);
- ok = -1;
- break;
- }
-
- g_assert(camel_mime_parser_step(mp, NULL, NULL) == HSCAN_FROM_END);
- }
-
- camel_object_unref(CAMEL_OBJECT (mp));
-
- /* update the file size/mtime in the summary */
- if (ok != -1) {
- if (stat(cls->folder_path, &st) == 0) {
- camel_folder_summary_touch(s);
- mbs->folder_size = st.st_size;
- s->time = st.st_mtime;
- }
- }
-
- camel_operation_end(NULL);
-
- return ok;
-}
-
-/* like summary_rebuild, but also do changeinfo stuff (if supplied) */
-static int
-summary_update(CamelLocalSummary *cls, off_t offset, CamelFolderChangeInfo *changeinfo, CamelException *ex)
-{
- int ret, i, count;
- CamelFolderSummary *s = (CamelFolderSummary *)cls;
- CamelMboxSummary *mbs = (CamelMboxSummary *)cls;
-
- d(printf("Calling summary update, from pos %d\n", (int)offset));
-
- if (changeinfo) {
- /* we use the diff function of the change_info to build the update list. */
- for (i = 0; i < camel_folder_summary_count(s); i++) {
- CamelMessageInfo *mi = camel_folder_summary_index(s, i);
-
- camel_folder_change_info_add_source(changeinfo, camel_message_info_uid(mi));
- camel_folder_summary_info_free(s, mi);
- }
- }
-
- /* do the actual work */
- cls->index_force = FALSE;
- ret = summary_rebuild(mbs, offset, ex);
-
- if (changeinfo) {
- count = camel_folder_summary_count(s);
- for (i = 0; i < count; i++) {
- CamelMessageInfo *mi = camel_folder_summary_index(s, i);
- camel_folder_change_info_add_update(changeinfo, camel_message_info_uid(mi));
- camel_folder_summary_info_free(s, mi);
- }
- camel_folder_change_info_build_diff(changeinfo);
- }
-
- return ret;
-}
-
-static int
-mbox_summary_check(CamelLocalSummary *cls, CamelFolderChangeInfo *changes, CamelException *ex)
-{
- CamelMboxSummary *mbs = (CamelMboxSummary *)cls;
- CamelFolderSummary *s = (CamelFolderSummary *)cls;
- struct stat st;
- int ret = 0;
-
- d(printf("Checking summary\n"));
-
- /* check if the summary is up-to-date */
- if (stat(cls->folder_path, &st) == -1) {
- camel_folder_summary_clear(s);
- camel_exception_setv(ex, 1, _("Cannot summarise folder: %s: %s"), cls->folder_path, strerror(errno));
- return -1;
- }
-
- if (st.st_size == 0) {
- /* empty? No need to scan at all */
- d(printf("Empty mbox, clearing summary\n"));
- camel_folder_summary_clear(s);
- ret = 0;
- } else if (s->messages->len == 0) {
- /* if we are empty, then we rebuilt from scratch */
- d(printf("Empty summary, rebuilding from start\n"));
- ret = summary_update(cls, 0, changes, ex);
- } else {
- /* is the summary uptodate? */
- if (st.st_size != mbs->folder_size || st.st_mtime != s->time) {
- if (mbs->folder_size < st.st_size) {
- /* this will automatically rescan from 0 if there is a problem */
- d(printf("folder grew, attempting to rebuild from %d\n", mbs->folder_size));
- ret = summary_update(cls, mbs->folder_size, changes, ex);
- } else {
- d(printf("folder shrank! rebuilding from start\n"));
- camel_folder_summary_clear(s);
- ret = summary_update(cls, 0, changes, ex);
- }
- }
- }
-
- /* FIXME: move upstream? */
-
- if (ret != -1) {
- mbs->folder_size = st.st_size;
- s->time = st.st_mtime;
-#if 0
- /* this failing is not a fatal event */
- if (camel_folder_summary_save(s) == -1)
- g_warning("Could not save summary: %s", strerror(errno));
- if (cls->index)
- ibex_save(cls->index);
-#endif
- }
-
- return ret;
-}
-
-static char *tz_months[] = {
- "Jan", "Feb", "Mar", "Apr", "May", "Jun",
- "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
-};
-
-static char *tz_days[] = {
- "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
-};
-
-/* tries to build a From line, based on message headers */
-char *
-camel_mbox_summary_build_from(struct _header_raw *header)
-{
- GString *out = g_string_new("From ");
- char *ret;
- const char *tmp;
- time_t thetime;
- int offset;
- struct tm tm;
-
- tmp = header_raw_find(&header, "Sender", NULL);
- if (tmp == NULL)
- tmp = header_raw_find(&header, "From", NULL);
- if (tmp != NULL) {
- struct _header_address *addr = header_address_decode(tmp);
-
- tmp = NULL;
- if (addr) {
- if (addr->type == HEADER_ADDRESS_NAME) {
- g_string_append(out, addr->v.addr);
- tmp = "";
- }
- header_address_unref(addr);
- }
- }
- if (tmp == NULL) {
- g_string_append(out, "unknown@nodomain.now.au");
- }
-
- /* try use the received header to get the date */
- tmp = header_raw_find(&header, "Received", NULL);
- if (tmp) {
- tmp = strrchr(tmp, ';');
- if (tmp)
- tmp++;
- }
-
- /* if there isn't one, try the Date field */
- if (tmp == NULL)
- tmp = header_raw_find(&header, "Date", NULL);
-
- thetime = header_decode_date(tmp, &offset);
-
- thetime += ((offset / 100) * (60 * 60)) + (offset % 100) * 60;
-
- /* a pseudo, but still bogus attempt at thread safing the function */
- /*memcpy(&tm, gmtime(&thetime), sizeof(tm));*/
- gmtime_r(&thetime, &tm);
-
- g_string_sprintfa(out, " %s %s %d %02d:%02d:%02d %4d\n",
- tz_days[tm.tm_wday],
- tz_months[tm.tm_mon], tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec, tm.tm_year + 1900);
-
- ret = out->str;
- g_string_free(out, FALSE);
- return ret;
-}
-
-/* perform a full sync */
-static int
-mbox_summary_sync_full(CamelLocalSummary *cls, gboolean expunge, CamelFolderChangeInfo *changeinfo, CamelException *ex)
-{
- CamelMboxSummary *mbs = (CamelMboxSummary *)cls;
- CamelFolderSummary *s = (CamelFolderSummary *)mbs;
- CamelMimeParser *mp = NULL;
- int i, count;
- CamelMboxMessageInfo *info = NULL;
- int fd = -1, fdout = -1;
- char *tmpname = NULL;
- char *buffer, *xevnew = NULL;
- int len;
- const char *fromline;
- int lastdel = FALSE;
-
- d(printf("performing full summary/sync\n"));
-
- camel_operation_start(NULL, _("Synchronising folder"));
-
- fd = open(cls->folder_path, O_RDONLY);
- if (fd == -1) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not open folder to summarise: %s: %s"),
- cls->folder_path, strerror(errno));
- camel_operation_end(NULL);
- return -1;
- }
-
- mp = camel_mime_parser_new();
- camel_mime_parser_scan_from(mp, TRUE);
- camel_mime_parser_scan_pre_from(mp, TRUE);
- camel_mime_parser_init_with_fd(mp, fd);
-
- tmpname = alloca(strlen (cls->folder_path) + 5);
- sprintf(tmpname, "%s.tmp", cls->folder_path);
- d(printf("Writing tmp file to %s\n", tmpname));
- fdout = open(tmpname, O_WRONLY|O_CREAT|O_TRUNC, 0600);
- if (fdout == -1) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Cannot open temporary mailbox: %s"), strerror(errno));
- goto error;
- }
-
- count = camel_folder_summary_count(s);
- for (i = 0; i < count; i++) {
- int pc = (i+1)*100/count;
-
- camel_operation_progress(NULL, pc);
-
- info = (CamelMboxMessageInfo *)camel_folder_summary_index(s, i);
-
- g_assert(info);
-
- d(printf("Looking at message %s\n", info->info.uid));
-
- /* only need to seek past deleted messages, otherwise we should be at the right spot/state already */
- if (lastdel) {
- d(printf("seeking to %d\n", (int)info->frompos));
- camel_mime_parser_seek(mp, info->frompos, SEEK_SET);
- }
-
- if (camel_mime_parser_step(mp, &buffer, &len) != HSCAN_FROM) {
- g_warning("Expected a From line here, didn't get it");
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Summary and folder mismatch, even after a sync"));
- goto error;
- }
-
- if (camel_mime_parser_tell_start_from(mp) != info->frompos) {
- g_warning("Didn't get the next message where I expected (%d) got %d instead",
- (int)info->frompos, (int)camel_mime_parser_tell_start_from(mp));
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Summary and folder mismatch, even after a sync"));
- goto error;
- }
-
- lastdel = FALSE;
- if (expunge && info->info.flags & CAMEL_MESSAGE_DELETED) {
- const char *uid = camel_message_info_uid(info);
-
- d(printf("Deleting %s\n", uid));
-
- if (cls->index)
- ibex_unindex(cls->index, (char *)uid);
-
- /* remove it from the change list */
- camel_folder_change_info_remove_uid(changeinfo, uid);
- camel_folder_summary_remove(s, (CamelMessageInfo *)info);
- camel_folder_summary_info_free(s, (CamelMessageInfo *)info);
- count--;
- i--;
- info = NULL;
- lastdel = TRUE;
- } else {
- /* otherwise, the message is staying, copy its From_ line across */
- if (i>0) {
- write(fdout, "\n", 1);
- }
- info->frompos = lseek(fdout, 0, SEEK_CUR);
- fromline = camel_mime_parser_from_line(mp);
- write(fdout, fromline, strlen(fromline));
- }
-
- if (info && info->info.flags & (CAMEL_MESSAGE_FOLDER_NOXEV | CAMEL_MESSAGE_FOLDER_FLAGGED)) {
- d(printf("Updating header for %s flags = %08x\n", info->info.uid, info->info.flags));
-
- if (camel_mime_parser_step(mp, &buffer, &len) == HSCAN_FROM_END) {
- g_warning("camel_mime_parser_step failed (2)");
- goto error;
- }
-
- xevnew = camel_local_summary_encode_x_evolution(cls, (CamelMessageInfo *)info);
- if (camel_local_summary_write_headers(fdout, camel_mime_parser_headers_raw(mp), xevnew) == -1) {
- d(printf("Error writing to tmp mailbox\n"));
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Error writing to temp mailbox: %s"),
- strerror(errno));
- goto error;
- }
- info->info.flags &= 0xffff;
- g_free(xevnew);
- xevnew = NULL;
- camel_mime_parser_drop_step(mp);
- }
-
- camel_mime_parser_drop_step(mp);
- if (info) {
- d(printf("looking for message content to copy across from %d\n", (int)camel_mime_parser_tell(mp)));
- while (camel_mime_parser_step(mp, &buffer, &len) == HSCAN_PRE_FROM) {
- d(printf("copying mbox contents to tmp: '%.*s'\n", len, buffer));
- if (write(fdout, buffer, len) != len) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Writing to tmp mailbox failed: %s: %s"),
- cls->folder_path, strerror(errno));
- goto error;
- }
- }
- d(printf("we are now at %d, from = %d\n", (int)camel_mime_parser_tell(mp),
- (int)camel_mime_parser_tell_start_from(mp)));
- camel_mime_parser_unstep(mp);
- camel_folder_summary_info_free(s, (CamelMessageInfo *)info);
- info = NULL;
- }
- }
-
- d(printf("Closing folders\n"));
-
- if (close(fd) == -1) {
- g_warning("Cannot close source folder: %s", strerror(errno));
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not close source folder %s: %s"),
- cls->folder_path, strerror(errno));
- fd = -1;
- goto error;
- }
-
- if (close(fdout) == -1) {
- g_warning("Cannot close tmp folder: %s", strerror(errno));
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not close temp folder: %s"),
- strerror(errno));
- fdout = -1;
- goto error;
- }
-
- /* this should probably either use unlink/link/unlink, or recopy over
- the original mailbox, for various locking reasons/etc */
- if (rename(tmpname, cls->folder_path) == -1) {
- g_warning("Cannot rename folder: %s", strerror(errno));
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not rename folder: %s"),
- strerror(errno));
- goto error;
- }
- tmpname = NULL;
-
- camel_object_unref((CamelObject *)mp);
- camel_operation_end(NULL);
-
- return 0;
- error:
- if (fd != -1)
- close(fd);
-
- if (fdout != -1)
- close(fdout);
-
- g_free(xevnew);
-
- if (tmpname)
- unlink(tmpname);
- if (mp)
- camel_object_unref((CamelObject *)mp);
- if (info)
- camel_folder_summary_info_free(s, (CamelMessageInfo *)info);
-
- camel_operation_end(NULL);
-
- return -1;
-}
-
-/* perform a quick sync - only system flags have changed */
-static int
-mbox_summary_sync_quick(CamelLocalSummary *cls, gboolean expunge, CamelFolderChangeInfo *changeinfo, CamelException *ex)
-{
- CamelMboxSummary *mbs = (CamelMboxSummary *)cls;
- CamelFolderSummary *s = (CamelFolderSummary *)mbs;
- CamelMimeParser *mp = NULL;
- int i, count;
- CamelMboxMessageInfo *info = NULL;
- int fd = -1;
- char *xevnew, *xevtmp;
- const char *xev;
- int len;
- off_t lastpos;
-
- d(printf("Performing quick summary sync\n"));
-
- camel_operation_start(NULL, _("Synchronising folder"));
-
- fd = open(cls->folder_path, O_RDWR);
- if (fd == -1) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not open folder to summarise: %s: %s"),
- cls->folder_path, strerror(errno));
-
- camel_operation_end(NULL);
- return -1;
- }
-
- mp = camel_mime_parser_new();
- camel_mime_parser_scan_from(mp, TRUE);
- camel_mime_parser_scan_pre_from(mp, TRUE);
- camel_mime_parser_init_with_fd(mp, fd);
-
- count = camel_folder_summary_count(s);
- for (i = 0; i < count; i++) {
- int xevoffset;
- int pc = (i+1)*100/count;
-
- camel_operation_progress(NULL, pc);
-
- info = (CamelMboxMessageInfo *)camel_folder_summary_index(s, i);
-
- g_assert(info);
-
- d(printf("Checking message %s %08x\n", info->info.uid, info->info.flags));
-
- if ((info->info.flags & CAMEL_MESSAGE_FOLDER_FLAGGED) == 0) {
- camel_folder_summary_info_free(s, (CamelMessageInfo *)info);
- info = NULL;
- continue;
- }
-
- d(printf("Updating message %s\n", info->info.uid));
-
- camel_mime_parser_seek(mp, info->frompos, SEEK_SET);
-
- if (camel_mime_parser_step(mp, 0, 0) != HSCAN_FROM) {
- g_warning("Expected a From line here, didn't get it");
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Summary and folder mismatch, even after a sync"));
- goto error;
- }
-
- if (camel_mime_parser_tell_start_from(mp) != info->frompos) {
- g_warning("Didn't get the next message where I expected (%d) got %d instead",
- (int)info->frompos, (int)camel_mime_parser_tell_start_from(mp));
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Summary and folder mismatch, even after a sync"));
- goto error;
- }
-
- if (camel_mime_parser_step(mp, 0, 0) == HSCAN_FROM_END) {
- g_warning("camel_mime_parser_step failed (2)");
- goto error;
- }
-
- xev = camel_mime_parser_header(mp, "X-Evolution", &xevoffset);
- if (xev == NULL || camel_local_summary_decode_x_evolution(cls, xev, NULL) == -1) {
- g_warning("We're supposed to have a valid x-ev header, but we dont");
- goto error;
- }
- xevnew = camel_local_summary_encode_x_evolution(cls, (CamelMessageInfo *)info);
- /* SIGH: encode_param_list is about the only function which folds headers by itself.
- This should be fixed somehow differently (either parser doesn't fold headers,
- or param_list doesn't, or something */
- xevtmp = header_unfold(xevnew);
- /* the raw header contains a leading ' ', so (dis)count that too */
- if (strlen(xev)-1 != strlen(xevtmp)) {
- g_free(xevnew);
- g_free(xevtmp);
- g_warning("Hmm, the xev headers shouldn't have changed size, but they did");
- goto error;
- }
- g_free(xevtmp);
-
- /* we write out the xevnew string, assuming its been folded identically to the original too! */
-
- lastpos = lseek(fd, 0, SEEK_CUR);
- lseek(fd, xevoffset+strlen("X-Evolution: "), SEEK_SET);
- do {
- len = write(fd, xevnew, strlen(xevnew));
- } while (len == -1 && errno == EINTR);
- lseek(fd, lastpos, SEEK_SET);
- g_free(xevnew);
-
- camel_mime_parser_drop_step(mp);
- camel_mime_parser_drop_step(mp);
-
- info->info.flags &= 0xffff;
- camel_folder_summary_info_free(s, (CamelMessageInfo *)info);
- }
-
- d(printf("Closing folders\n"));
-
- if (close(fd) == -1) {
- g_warning("Cannot close source folder: %s", strerror(errno));
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not close source folder %s: %s"),
- cls->folder_path, strerror(errno));
- fd = -1;
- goto error;
- }
-
- camel_object_unref((CamelObject *)mp);
-
- camel_operation_end(NULL);
-
- return 0;
- error:
- if (fd != -1)
- close(fd);
- if (mp)
- camel_object_unref((CamelObject *)mp);
- if (info)
- camel_folder_summary_info_free(s, (CamelMessageInfo *)info);
-
- camel_operation_end(NULL);
-
- return -1;
-}
-
-static int
-mbox_summary_sync(CamelLocalSummary *cls, gboolean expunge, CamelFolderChangeInfo *changeinfo, CamelException *ex)
-{
- struct stat st;
- CamelMboxSummary *mbs = (CamelMboxSummary *)cls;
- CamelFolderSummary *s = (CamelFolderSummary *)cls;
- int i, count;
- int quick = TRUE, work=FALSE;
- int ret;
-
- /* first, sync ourselves up, just to make sure */
- summary_update(cls, mbs->folder_size, changeinfo, ex);
- if (camel_exception_is_set(ex))
- return -1;
-
- count = camel_folder_summary_count(s);
- if (count == 0)
- return 0;
-
- /* check what work we have to do, if any */
- for (i=0;quick && i<count; i++) {
- CamelMessageInfo *info = camel_folder_summary_index(s, i);
- g_assert(info);
- if ((expunge && (info->flags & CAMEL_MESSAGE_DELETED)) ||
- (info->flags & (CAMEL_MESSAGE_FOLDER_NOXEV|CAMEL_MESSAGE_FOLDER_XEVCHANGE)))
- quick = FALSE;
- else
- work |= (info->flags & CAMEL_MESSAGE_FOLDER_FLAGGED) != 0;
- camel_folder_summary_info_free(s, info);
- }
-
- /* yuck i hate this logic, but its to simplify the 'all ok, update summary' and failover cases */
- ret = -1;
- if (quick) {
- if (work) {
- ret = mbox_summary_sync_quick(cls, expunge, changeinfo, ex);
- if (ret == -1) {
- g_warning("failed a quick-sync, trying a full sync");
- camel_exception_clear(ex);
- }
- } else {
- ret = 0;
- }
- }
-
- if (ret == -1)
- ret = mbox_summary_sync_full(cls, expunge, changeinfo, ex);
- if (ret == -1)
- return -1;
-
- if (stat(cls->folder_path, &st) == -1) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM, _("Unknown error: %s"), strerror(errno));
- return -1;
- }
-
- camel_folder_summary_touch(s);
- s->time = st.st_mtime;
- mbs->folder_size = st.st_size;
- camel_folder_summary_save(s);
-
- return 0;
-}
diff --git a/camel/providers/local/camel-mbox-summary.h b/camel/providers/local/camel-mbox-summary.h
deleted file mode 100644
index e24c2b4cdd..0000000000
--- a/camel/providers/local/camel-mbox-summary.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (C) 2000 Helix Code Inc.
- *
- * Authors: Michael Zucchi <notzed@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_MBOX_SUMMARY_H
-#define _CAMEL_MBOX_SUMMARY_H
-
-#include "camel-local-summary.h"
-
-#define CAMEL_MBOX_SUMMARY(obj) CAMEL_CHECK_CAST (obj, camel_mbox_summary_get_type (), CamelMboxSummary)
-#define CAMEL_MBOX_SUMMARY_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_mbox_summary_get_type (), CamelMboxSummaryClass)
-#define CAMEL_IS_MBOX_SUMMARY(obj) CAMEL_CHECK_TYPE (obj, camel_mbox_summary_get_type ())
-
-typedef struct _CamelMboxSummary CamelMboxSummary;
-typedef struct _CamelMboxSummaryClass CamelMboxSummaryClass;
-
-typedef struct _CamelMboxMessageContentInfo {
- CamelMessageContentInfo info;
-} CamelMboxMessageContentInfo;
-
-typedef struct _CamelMboxMessageInfo {
- CamelMessageInfo info;
-
- off_t frompos;
-} CamelMboxMessageInfo;
-
-struct _CamelMboxSummary {
- CamelLocalSummary parent;
-
- struct _CamelMboxSummaryPrivate *priv;
-
- size_t folder_size; /* size of the mbox file, last sync */
-};
-
-struct _CamelMboxSummaryClass {
- CamelLocalSummaryClass parent_class;
-};
-
-guint camel_mbox_summary_get_type (void);
-CamelMboxSummary *camel_mbox_summary_new (const char *filename, const char *mbox_name, ibex *index);
-
-/* generate a From line from headers */
-char *camel_mbox_summary_build_from(struct _header_raw *header);
-
-#endif /* ! _CAMEL_MBOX_SUMMARY_H */
-
diff --git a/camel/providers/local/camel-mh-folder.c b/camel/providers/local/camel-mh-folder.c
deleted file mode 100644
index cdf636b533..0000000000
--- a/camel/providers/local/camel-mh-folder.c
+++ /dev/null
@@ -1,214 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; fill-column: 160 -*-
- *
- * Authors: Michael Zucchi <notzed@helixcode.com>
- *
- * 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdlib.h>
-#include <sys/types.h>
-#include <dirent.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <errno.h>
-#include <string.h>
-#include <fcntl.h>
-
-#include "camel-mh-folder.h"
-#include "camel-mh-store.h"
-#include "string-utils.h"
-#include "camel-stream-fs.h"
-#include "camel-mh-summary.h"
-#include "camel-data-wrapper.h"
-#include "camel-mime-message.h"
-#include "camel-exception.h"
-
-#define d(x) /*(printf("%s(%d): ", __FILE__, __LINE__),(x))*/
-
-static CamelLocalFolderClass *parent_class = NULL;
-
-/* Returns the class for a CamelMhFolder */
-#define CMHF_CLASS(so) CAMEL_MH_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-#define CF_CLASS(so) CAMEL_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-#define CMHS_CLASS(so) CAMEL_STORE_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-
-static CamelLocalSummary *mh_create_summary(const char *path, const char *folder, ibex *index);
-
-static void mh_append_message(CamelFolder * folder, CamelMimeMessage * message, const CamelMessageInfo *info, CamelException * ex);
-static CamelMimeMessage *mh_get_message(CamelFolder * folder, const gchar * uid, CamelException * ex);
-
-static void mh_finalize(CamelObject * object);
-
-static void camel_mh_folder_class_init(CamelObjectClass * camel_mh_folder_class)
-{
- CamelFolderClass *camel_folder_class = CAMEL_FOLDER_CLASS(camel_mh_folder_class);
- CamelLocalFolderClass *lclass = (CamelLocalFolderClass *)camel_mh_folder_class;
-
- parent_class = CAMEL_LOCAL_FOLDER_CLASS (camel_type_get_global_classfuncs(camel_local_folder_get_type()));
-
- /* virtual method definition */
-
- /* virtual method overload */
- camel_folder_class->append_message = mh_append_message;
- camel_folder_class->get_message = mh_get_message;
-
- lclass->create_summary = mh_create_summary;
-}
-
-static void mh_init(gpointer object, gpointer klass)
-{
- /*CamelFolder *folder = object;
- CamelMhFolder *mh_folder = object;*/
-}
-
-static void mh_finalize(CamelObject * object)
-{
- /*CamelMhFolder *mh_folder = CAMEL_MH_FOLDER(object);*/
-}
-
-CamelType camel_mh_folder_get_type(void)
-{
- static CamelType camel_mh_folder_type = CAMEL_INVALID_TYPE;
-
- if (camel_mh_folder_type == CAMEL_INVALID_TYPE) {
- camel_mh_folder_type = camel_type_register(CAMEL_LOCAL_FOLDER_TYPE, "CamelMhFolder",
- sizeof(CamelMhFolder),
- sizeof(CamelMhFolderClass),
- (CamelObjectClassInitFunc) camel_mh_folder_class_init,
- NULL,
- (CamelObjectInitFunc) mh_init,
- (CamelObjectFinalizeFunc) mh_finalize);
- }
-
- return camel_mh_folder_type;
-}
-
-CamelFolder *
-camel_mh_folder_new(CamelStore *parent_store, const char *full_name, guint32 flags, CamelException *ex)
-{
- CamelFolder *folder;
-
- d(printf("Creating mh folder: %s\n", full_name));
-
- folder = (CamelFolder *)camel_object_new(CAMEL_MH_FOLDER_TYPE);
- folder = (CamelFolder *)camel_local_folder_construct((CamelLocalFolder *)folder,
- parent_store, full_name, flags, ex);
-
- return folder;
-}
-
-static CamelLocalSummary *mh_create_summary(const char *path, const char *folder, ibex *index)
-{
- return (CamelLocalSummary *)camel_mh_summary_new(path, folder, index);
-}
-
-static void mh_append_message(CamelFolder * folder, CamelMimeMessage * message, const CamelMessageInfo *info, CamelException * ex)
-{
- CamelMhFolder *mh_folder = (CamelMhFolder *)folder;
- CamelLocalFolder *lf = (CamelLocalFolder *)folder;
- CamelStream *output_stream;
- CamelMessageInfo *mi;
- char *name;
-
- /* FIXME: probably needs additional locking (although mh doesn't appear do do it) */
-
- d(printf("Appending message\n"));
-
- /* add it to the summary/assign the uid, etc */
- mi = camel_local_summary_add((CamelLocalSummary *)folder->summary, message, info, lf->changes, ex);
- if (camel_exception_is_set(ex)) {
- return;
- }
-
- d(printf("Appending message: uid is %s\n", camel_message_info_uid(mi)));
-
- /* write it out, use the uid we got from the summary */
- name = g_strdup_printf("%s/%s", lf->folder_path, camel_message_info_uid(mi));
- output_stream = camel_stream_fs_new_with_name(name, O_WRONLY|O_CREAT, 0600);
- if (output_stream == NULL) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Cannot append message to mh folder: %s: %s"), name, g_strerror(errno));
- g_free(name);
- return;
- }
-
- if (camel_data_wrapper_write_to_stream((CamelDataWrapper *)message, output_stream) == -1
- || camel_stream_close(output_stream) == -1) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Cannot append message to mh folder: %s: %s"), name, g_strerror(errno));
- camel_object_unref((CamelObject *)output_stream);
- unlink(name);
- g_free(name);
- return;
- }
-
- /* close this? */
- camel_object_unref((CamelObject *)output_stream);
-
- g_free(name);
-
- camel_object_trigger_event((CamelObject *)folder, "folder_changed", ((CamelLocalFolder *)mh_folder)->changes);
- camel_folder_change_info_clear(((CamelLocalFolder *)mh_folder)->changes);
-}
-
-static CamelMimeMessage *mh_get_message(CamelFolder * folder, const gchar * uid, CamelException * ex)
-{
- CamelLocalFolder *lf = (CamelLocalFolder *)folder;
- CamelStream *message_stream = NULL;
- CamelMimeMessage *message = NULL;
- CamelMessageInfo *info;
- char *name;
-
- d(printf("getting message: %s\n", uid));
-
- /* get the message summary info */
- if ((info = camel_folder_summary_uid(folder->summary, uid)) == NULL) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_FOLDER_INVALID_UID, _("Cannot get message: %s\n %s"), uid, _("No such message"));
- return NULL;
- }
-
- /* we only need it to check the message exists */
- camel_folder_summary_info_free(folder->summary, info);
-
- name = g_strdup_printf("%s/%s", lf->folder_path, uid);
- if ((message_stream = camel_stream_fs_new_with_name(name, O_RDONLY, 0)) == NULL) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_FOLDER_INVALID_UID, _("Cannot get message: %s\n %s"),
- name, g_strerror(errno));
- g_free(name);
- return NULL;
- }
-
- message = camel_mime_message_new();
- if (camel_data_wrapper_construct_from_stream((CamelDataWrapper *)message, message_stream) == -1) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_FOLDER_INVALID_UID, _("Cannot get message: %s\n %s"),
- name, _("Invalid message contents"));
- g_free(name);
- camel_object_unref((CamelObject *)message_stream);
- camel_object_unref((CamelObject *)message);
- return NULL;
-
- }
- camel_object_unref((CamelObject *)message_stream);
- g_free(name);
-
- return message;
-}
diff --git a/camel/providers/local/camel-mh-folder.h b/camel/providers/local/camel-mh-folder.h
deleted file mode 100644
index 175aef2946..0000000000
--- a/camel/providers/local/camel-mh-folder.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Authors:
- * Michael Zucchi <notzed@helixcode.com>
- *
- * 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
- */
-
-#ifndef CAMEL_MH_FOLDER_H
-#define CAMEL_MH_FOLDER_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus } */
-#include "camel-local-folder.h"
-
-#define CAMEL_MH_FOLDER_TYPE (camel_mh_folder_get_type ())
-#define CAMEL_MH_FOLDER(obj) (CAMEL_CHECK_CAST((obj), CAMEL_MH_FOLDER_TYPE, CamelMhFolder))
-#define CAMEL_MH_FOLDER_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_MH_FOLDER_TYPE, CamelMhFolderClass))
-#define CAMEL_IS_MH_FOLDER(o) (CAMEL_CHECK_TYPE((o), CAMEL_MH_FOLDER_TYPE))
-
-typedef struct {
- CamelLocalFolder parent_object;
-
-} CamelMhFolder;
-
-typedef struct {
- CamelLocalFolderClass parent_class;
-
- /* Virtual methods */
-
-} CamelMhFolderClass;
-
-/* public methods */
-CamelFolder *camel_mh_folder_new(CamelStore *parent_store, const char *full_name, guint32 flags, CamelException *ex);
-
-/* Standard Camel function */
-CamelType camel_mh_folder_get_type(void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-#endif /* CAMEL_MH_FOLDER_H */
diff --git a/camel/providers/local/camel-mh-store.c b/camel/providers/local/camel-mh-store.c
deleted file mode 100644
index 3edadb5ca1..0000000000
--- a/camel/providers/local/camel-mh-store.c
+++ /dev/null
@@ -1,136 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Copyright (C) 2000 Helix Code, Inc.
- *
- * Authors: Michael Zucchi <notzed@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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <sys/stat.h>
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-
-#include "camel-mh-store.h"
-#include "camel-mh-folder.h"
-#include "camel-exception.h"
-#include "camel-url.h"
-
-static CamelLocalStoreClass *parent_class = NULL;
-
-/* Returns the class for a CamelMhStore */
-#define CMHS_CLASS(so) CAMEL_MH_STORE_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-#define CF_CLASS(so) CAMEL_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-#define CMHF_CLASS(so) CAMEL_MH_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-
-static CamelFolder *get_folder(CamelStore * store, const char *folder_name, guint32 flags, CamelException * ex);
-static void delete_folder(CamelStore * store, const char *folder_name, CamelException * ex);
-
-static void camel_mh_store_class_init(CamelObjectClass * camel_mh_store_class)
-{
- CamelStoreClass *camel_store_class = CAMEL_STORE_CLASS(camel_mh_store_class);
- /*CamelServiceClass *camel_service_class = CAMEL_SERVICE_CLASS(camel_mh_store_class);*/
-
- parent_class = (CamelLocalStoreClass *)camel_type_get_global_classfuncs(camel_local_store_get_type());
-
- /* virtual method overload, use defaults for most */
- camel_store_class->get_folder = get_folder;
- camel_store_class->delete_folder = delete_folder;
-}
-
-CamelType camel_mh_store_get_type(void)
-{
- static CamelType camel_mh_store_type = CAMEL_INVALID_TYPE;
-
- if (camel_mh_store_type == CAMEL_INVALID_TYPE) {
- camel_mh_store_type = camel_type_register(CAMEL_LOCAL_STORE_TYPE, "CamelMhStore",
- sizeof(CamelMhStore),
- sizeof(CamelMhStoreClass),
- (CamelObjectClassInitFunc) camel_mh_store_class_init,
- NULL,
- NULL,
- NULL);
- }
-
- return camel_mh_store_type;
-}
-
-static CamelFolder *get_folder(CamelStore * store, const char *folder_name, guint32 flags, CamelException * ex)
-{
- char *name;
- struct stat st;
-
- (void) ((CamelStoreClass *)parent_class)->get_folder(store, folder_name, flags, ex);
- if (camel_exception_is_set(ex))
- return NULL;
-
- name = g_strdup_printf("%s%s", CAMEL_SERVICE(store)->url->path, folder_name);
-
- if (stat(name, &st) == -1) {
- if (errno != ENOENT) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not open folder `%s':\n%s"),
- folder_name, g_strerror(errno));
- g_free (name);
- return NULL;
- }
- if ((flags & CAMEL_STORE_FOLDER_CREATE) == 0) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_STORE_NO_FOLDER,
- _("Folder `%s' does not exist."), folder_name);
- g_free (name);
- return NULL;
- }
- if (mkdir(name, 0700) != 0) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not create folder `%s':\n%s"),
- folder_name, g_strerror(errno));
- g_free (name);
- return NULL;
- }
- } else if (!S_ISDIR(st.st_mode)) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_STORE_NO_FOLDER,
- _("`%s' is not a directory."), name);
- g_free (name);
- return NULL;
- }
- g_free(name);
-
- return camel_mh_folder_new(store, folder_name, flags, ex);
-}
-
-static void delete_folder(CamelStore * store, const char *folder_name, CamelException * ex)
-{
- char *name;
-
- /* remove folder directory - will fail if not empty */
- name = g_strdup_printf("%s%s", CAMEL_SERVICE(store)->url->path, folder_name);
- if (rmdir(name) == -1) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not delete folder `%s': %s"),
- folder_name, strerror(errno));
- g_free(name);
- return;
- }
- g_free(name);
-
- /* and remove metadata */
- ((CamelStoreClass *)parent_class)->delete_folder(store, folder_name, ex);
-}
diff --git a/camel/providers/local/camel-mh-store.h b/camel/providers/local/camel-mh-store.h
deleted file mode 100644
index f1f8eb9983..0000000000
--- a/camel/providers/local/camel-mh-store.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Copyright (C) 2000 Helix Code, Inc.
- *
- * Authors: Michael Zucchi <notzed@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_MH_STORE_H
-#define CAMEL_MH_STORE_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus } */
-
-#include "camel-local-store.h"
-
-#define CAMEL_MH_STORE_TYPE (camel_mh_store_get_type ())
-#define CAMEL_MH_STORE(obj) (CAMEL_CHECK_CAST((obj), CAMEL_MH_STORE_TYPE, CamelMhStore))
-#define CAMEL_MH_STORE_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_MH_STORE_TYPE, CamelMhStoreClass))
-#define CAMEL_IS_MH_STORE(o) (CAMEL_CHECK_TYPE((o), CAMEL_MH_STORE_TYPE))
-
-typedef struct {
- CamelLocalStore parent_object;
-
-} CamelMhStore;
-
-typedef struct {
- CamelLocalStoreClass parent_class;
-
-} CamelMhStoreClass;
-
-/* public methods */
-
-/* Standard Camel function */
-CamelType camel_mh_store_get_type(void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-#endif /* CAMEL_MH_STORE_H */
diff --git a/camel/providers/local/camel-mh-summary.c b/camel/providers/local/camel-mh-summary.c
deleted file mode 100644
index 3e588be909..0000000000
--- a/camel/providers/local/camel-mh-summary.c
+++ /dev/null
@@ -1,397 +0,0 @@
-/*
- * Copyright (C) 2000 Helix Code Inc.
- *
- * Authors: Not Zed <notzed@lostzed.mmc.com.au>
- *
- * 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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <sys/stat.h>
-#include <sys/uio.h>
-#include <unistd.h>
-#include <errno.h>
-#include <string.h>
-#include <stdlib.h>
-
-#include <sys/types.h>
-#include <dirent.h>
-
-#include <ctype.h>
-
-#include "camel-mh-summary.h"
-#include <camel/camel-mime-message.h>
-
-#define d(x) /*(printf("%s(%d): ", __FILE__, __LINE__),(x))*/
-
-#define CAMEL_MH_SUMMARY_VERSION (0x2000)
-
-static int mh_summary_check(CamelLocalSummary *cls, CamelFolderChangeInfo *changeinfo, CamelException *ex);
-static int mh_summary_sync(CamelLocalSummary *cls, gboolean expunge, CamelFolderChangeInfo *changeinfo, CamelException *ex);
-/*static int mh_summary_add(CamelLocalSummary *cls, CamelMimeMessage *msg, CamelMessageInfo *info, CamelFolderChangeInfo *, CamelException *ex);*/
-
-static char *mh_summary_next_uid_string(CamelFolderSummary *s);
-
-static void camel_mh_summary_class_init (CamelMhSummaryClass *class);
-static void camel_mh_summary_init (CamelMhSummary *gspaper);
-static void camel_mh_summary_finalise (CamelObject *obj);
-
-#define _PRIVATE(x) (((CamelMhSummary *)(x))->priv)
-
-struct _CamelMhSummaryPrivate {
- char *current_uid;
-};
-
-static CamelLocalSummaryClass *parent_class;
-
-CamelType
-camel_mh_summary_get_type (void)
-{
- static CamelType type = CAMEL_INVALID_TYPE;
-
- if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register(camel_local_summary_get_type (), "CamelMhSummary",
- sizeof(CamelMhSummary),
- sizeof(CamelMhSummaryClass),
- (CamelObjectClassInitFunc)camel_mh_summary_class_init,
- NULL,
- (CamelObjectInitFunc)camel_mh_summary_init,
- (CamelObjectFinalizeFunc)camel_mh_summary_finalise);
- }
-
- return type;
-}
-
-static void
-camel_mh_summary_class_init (CamelMhSummaryClass *class)
-{
- CamelFolderSummaryClass *sklass = (CamelFolderSummaryClass *) class;
- CamelLocalSummaryClass *lklass = (CamelLocalSummaryClass *)class;
-
- parent_class = (CamelLocalSummaryClass *)camel_type_get_global_classfuncs(camel_local_summary_get_type ());
-
- /* override methods */
- sklass->next_uid_string = mh_summary_next_uid_string;
-
- lklass->check = mh_summary_check;
- lklass->sync = mh_summary_sync;
- /*lklass->add = mh_summary_add;*/
-}
-
-static void
-camel_mh_summary_init (CamelMhSummary *o)
-{
- struct _CamelFolderSummary *s = (CamelFolderSummary *) o;
-
- o->priv = g_malloc0(sizeof(*o->priv));
- /* set unique file version */
- s->version += CAMEL_MH_SUMMARY_VERSION;
-}
-
-static void
-camel_mh_summary_finalise(CamelObject *obj)
-{
- CamelMhSummary *o = (CamelMhSummary *)obj;
-
- g_free(o->priv);
-}
-
-/**
- * camel_mh_summary_new:
- *
- * Create a new CamelMhSummary object.
- *
- * Return value: A new #CamelMhSummary object.
- **/
-CamelMhSummary *camel_mh_summary_new (const char *filename, const char *mhdir, ibex *index)
-{
- CamelMhSummary *o = (CamelMhSummary *)camel_object_new(camel_mh_summary_get_type ());
-
- camel_local_summary_construct((CamelLocalSummary *)o, filename, mhdir, index);
- return o;
-}
-
-static char *mh_summary_next_uid_string(CamelFolderSummary *s)
-{
- CamelMhSummary *mhs = (CamelMhSummary *)s;
- CamelLocalSummary *cls = (CamelLocalSummary *)s;
- int fd = -1;
- guint32 uid;
- char *name;
-
- /* if we are working to add an existing file, then use current_uid */
- if (mhs->priv->current_uid)
- return g_strdup(mhs->priv->current_uid);
-
- /* else scan for one - and create it too, to make sure */
- do {
- close(fd);
- uid = camel_folder_summary_next_uid(s);
- name = g_strdup_printf("%s/%u", cls->folder_path, uid);
- /* O_EXCL isn't guaranteed, sigh. Oh well, bad luck, mh has problems anyway */
- fd = open(name, O_WRONLY|O_CREAT|O_EXCL, 0600);
- g_free(name);
- } while (fd == -1 && errno == EEXIST);
-
- close(fd);
-
- return g_strdup_printf("%u", uid);
-}
-
-static int camel_mh_summary_add(CamelLocalSummary *cls, const char *name, int forceindex)
-{
- CamelMhSummary *mhs = (CamelMhSummary *)cls;
- char *filename = g_strdup_printf("%s/%s", cls->folder_path, name);
- int fd;
- CamelMimeParser *mp;
-
- d(printf("summarising: %s\n", name));
-
- fd = open(filename, O_RDONLY);
- if (fd == -1) {
- g_warning("Cannot summarise/index: %s: %s", filename, strerror(errno));
- g_free(filename);
- return -1;
- }
- mp = camel_mime_parser_new();
- camel_mime_parser_scan_from(mp, FALSE);
- camel_mime_parser_init_with_fd(mp, fd);
- if (cls->index && (forceindex || !ibex_contains_name(cls->index, (char *)name))) {
- d(printf("forcing indexing of message content\n"));
- camel_folder_summary_set_index((CamelFolderSummary *)mhs, cls->index);
- } else {
- camel_folder_summary_set_index((CamelFolderSummary *)mhs, NULL);
- }
- mhs->priv->current_uid = (char *)name;
- camel_folder_summary_add_from_parser((CamelFolderSummary *)mhs, mp);
- camel_object_unref((CamelObject *)mp);
- mhs->priv->current_uid = NULL;
- camel_folder_summary_set_index((CamelFolderSummary *)mhs, NULL);
- g_free(filename);
- return 0;
-}
-
-static void
-remove_summary(char *key, CamelMessageInfo *info, CamelLocalSummary *cls)
-{
- d(printf("removing message %s from summary\n", key));
- if (cls->index)
- ibex_unindex(cls->index, (char *)camel_message_info_uid(info));
- camel_folder_summary_remove((CamelFolderSummary *)cls, info);
- camel_folder_summary_info_free((CamelFolderSummary *)cls, info);
-}
-
-static int
-mh_summary_check(CamelLocalSummary *cls, CamelFolderChangeInfo *changeinfo, CamelException *ex)
-{
- DIR *dir;
- struct dirent *d;
- char *p, c;
- CamelMessageInfo *info;
- GHashTable *left;
- int i, count;
- int forceindex;
-
- /* FIXME: Handle changeinfo */
-
- d(printf("checking summary ...\n"));
-
- /* scan the directory, check for mail files not in the index, or index entries that
- no longer exist */
- dir = opendir(cls->folder_path);
- if (dir == NULL) {
- camel_exception_setv(ex, 1, _("Cannot open MH directory path: %s: %s"), cls->folder_path, strerror(errno));
- return -1;
- }
-
- /* keeps track of all uid's that have not been processed */
- left = g_hash_table_new(g_str_hash, g_str_equal);
- count = camel_folder_summary_count((CamelFolderSummary *)cls);
- forceindex = count == 0;
- for (i=0;i<count;i++) {
- info = camel_folder_summary_index((CamelFolderSummary *)cls, i);
- if (info) {
- g_hash_table_insert(left, (char *)camel_message_info_uid(info), info);
- }
- }
-
- while ( (d = readdir(dir)) ) {
- /* FIXME: also run stat to check for regular file */
- p = d->d_name;
- while ( (c = *p++) ) {
- if (!isdigit(c))
- break;
- }
- if (c==0) {
- info = camel_folder_summary_uid((CamelFolderSummary *)cls, d->d_name);
- if (info == NULL || (cls->index && (!ibex_contains_name(cls->index, d->d_name)))) {
- /* need to add this file to the summary */
- if (info != NULL) {
- g_hash_table_remove(left, camel_message_info_uid(info));
- camel_folder_summary_remove((CamelFolderSummary *)cls, info);
- camel_folder_summary_info_free((CamelFolderSummary *)cls, info);
- }
- camel_mh_summary_add(cls, d->d_name, forceindex);
- } else {
- const char *uid = camel_message_info_uid(info);
- CamelMessageInfo *old = g_hash_table_lookup(left, uid);
-
- if (old) {
- camel_folder_summary_info_free((CamelFolderSummary *)cls, old);
- g_hash_table_remove(left, uid);
- }
- camel_folder_summary_info_free((CamelFolderSummary *)cls, info);
- }
- }
- }
- closedir(dir);
- g_hash_table_foreach(left, (GHFunc)remove_summary, cls);
- g_hash_table_destroy(left);
-
- /* FIXME: move this up a class */
-
- /* force a save of the index, just to make sure */
- /* note this could be expensive so possibly shouldn't be here
- as such */
- if (cls->index) {
- ibex_save(cls->index);
- }
-
- return 0;
-}
-
-static int
-mh_summary_sync_message(CamelLocalSummary *cls, CamelMessageInfo *info, CamelException *ex)
-{
- CamelMimeParser *mp;
- const char *xev, *buffer;
- int xevoffset;
- int fd, outfd, len, outlen, ret=0;
- char *name, *tmpname, *xevnew;
-
- name = g_strdup_printf("%s/%s", cls->folder_path, camel_message_info_uid(info));
- fd = open(name, O_RDWR);
- if (fd == -1)
- return -1;
-
- mp = camel_mime_parser_new();
- camel_mime_parser_init_with_fd(mp, fd);
- if (camel_mime_parser_step(mp, 0, 0) != HSCAN_EOF) {
- xev = camel_mime_parser_header(mp, "X-Evolution", &xevoffset);
- d(printf("xev = '%s'\n", xev));
- xevnew = camel_local_summary_encode_x_evolution(cls, info);
- if (xev == NULL
- || camel_local_summary_decode_x_evolution(cls, xev, NULL) == -1
- || strlen(xev)-1 != strlen(xevnew)) {
-
- d(printf("camel local summary_decode_xev = %d\n", camel_local_summary_decode_x_evolution(cls, xev, NULL)));
-
- /* need to write a new copy/unlink old */
- tmpname = g_strdup_printf("%s/.tmp.%d.%s", cls->folder_path, getpid(), camel_message_info_uid(info));
- d(printf("old xev was %d %s new xev is %d %s\n", strlen(xev), xev, strlen(xevnew), xevnew));
- d(printf("creating new message %s\n", tmpname));
- outfd = open(tmpname, O_CREAT|O_WRONLY|O_TRUNC, 0600);
- if (outfd != -1) {
- outlen = 0;
- len = camel_local_summary_write_headers(outfd, camel_mime_parser_headers_raw(mp), xevnew);
- if (len != -1) {
- while (outlen != -1 && (len = camel_mime_parser_read(mp, &buffer, 10240)) > 0) {
- d(printf("camel mime parser read, read %d bytes: %.*s\n", len, len, buffer));
- do {
- outlen = write(outfd, buffer, len);
- } while (outlen == -1 && errno == EINTR);
- }
- }
-
- d(printf("len = %d outlen = %d, renaming/finishing\n", len, outlen));
- if (close(outfd) == -1
- || len == -1
- || outlen == -1
- || rename(tmpname, name) == -1) {
- unlink(tmpname);
- ret = -1;
- }
- } else {
- g_warning("sync can't create tmp file: %s", strerror(errno));
- }
- g_free(tmpname);
- } else {
- d(printf("stamping in updated X-EV at %d\n", (int)xevoffset));
- /* else, we can just update the flags field */
- lseek(fd, xevoffset+strlen("X-Evolution: "), SEEK_SET);
- do {
- len = write(fd, xevnew, strlen(xevnew));
- } while (len == -1 && errno == EINTR);
- if (len == -1)
- ret = -1;
- }
-
- g_free(xevnew);
- }
-
- camel_object_unref((CamelObject *)mp);
- g_free(name);
- return ret;
-}
-
-/* sync the summary file with the ondisk files */
-static int
-mh_summary_sync(CamelLocalSummary *cls, gboolean expunge, CamelFolderChangeInfo *changes, CamelException *ex)
-{
- int count, i;
- CamelMessageInfo *info;
- char *name;
- const char *uid;
-
- d(printf("summary_sync(expunge=%s)\n", expunge?"true":"false"));
-
- /* we could probably get away without this ... but why not use it, esp if we're going to
- be doing any significant io already */
- if (camel_local_summary_check(cls, changes, ex) == -1)
- return -1;
-
- count = camel_folder_summary_count((CamelFolderSummary *)cls);
- for (i=count-1;i>=0;i--) {
- info = camel_folder_summary_index((CamelFolderSummary *)cls, i);
- g_assert(info);
- if (expunge && (info->flags & CAMEL_MESSAGE_DELETED)) {
- uid = camel_message_info_uid(info);
- name = g_strdup_printf("%s/%s", cls->folder_path, uid);
- d(printf("deleting %s\n", name));
- if (unlink(name) == 0 || errno==ENOENT) {
-
- /* FIXME: put this in folder_summary::remove()? */
- if (cls->index)
- ibex_unindex(cls->index, (char *)uid);
-
- camel_folder_change_info_remove_uid(changes, uid);
- camel_folder_summary_remove((CamelFolderSummary *)cls, info);
- }
- g_free(name);
- } else if (info->flags & (CAMEL_MESSAGE_FOLDER_NOXEV|CAMEL_MESSAGE_FOLDER_FLAGGED)) {
- if (mh_summary_sync_message(cls, info, ex) != -1) {
- info->flags &= 0xffff;
- } else {
- g_warning("Problem occured when trying to expunge, ignored");
- }
- }
- camel_folder_summary_info_free((CamelFolderSummary *)cls, info);
- }
-
- return 0;
-}
diff --git a/camel/providers/local/camel-mh-summary.h b/camel/providers/local/camel-mh-summary.h
deleted file mode 100644
index 52cc496610..0000000000
--- a/camel/providers/local/camel-mh-summary.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (C) 2000 Helix Code Inc.
- *
- * Authors: Not Zed <notzed@lostzed.mmc.com.au>
- *
- * 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_MH_SUMMARY_H
-#define _CAMEL_MH_SUMMARY_H
-
-#include "camel-local-summary.h"
-#include <camel/camel-folder.h>
-#include <camel/camel-exception.h>
-#include <libibex/ibex.h>
-
-#define CAMEL_MH_SUMMARY(obj) CAMEL_CHECK_CAST (obj, camel_mh_summary_get_type (), CamelMhSummary)
-#define CAMEL_MH_SUMMARY_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_mh_summary_get_type (), CamelMhSummaryClass)
-#define CAMEL_IS_MH_SUMMARY(obj) CAMEL_CHECK_TYPE (obj, camel_mh_summary_get_type ())
-
-typedef struct _CamelMhSummary CamelMhSummary;
-typedef struct _CamelMhSummaryClass CamelMhSummaryClass;
-
-struct _CamelMhSummary {
- CamelLocalSummary parent;
- struct _CamelMhSummaryPrivate *priv;
-};
-
-struct _CamelMhSummaryClass {
- CamelLocalSummaryClass parent_class;
-
- /* virtual methods */
-
- /* signals */
-};
-
-CamelType camel_mh_summary_get_type (void);
-CamelMhSummary *camel_mh_summary_new (const char *filename, const char *mhdir, ibex *index);
-
-#endif /* ! _CAMEL_MH_SUMMARY_H */
-
diff --git a/camel/providers/local/libcamellocal.urls b/camel/providers/local/libcamellocal.urls
deleted file mode 100644
index 35a7049145..0000000000
--- a/camel/providers/local/libcamellocal.urls
+++ /dev/null
@@ -1,3 +0,0 @@
-mh
-mbox
-maildir
diff --git a/camel/providers/nntp/.cvsignore b/camel/providers/nntp/.cvsignore
deleted file mode 100644
index 2fbeab8712..0000000000
--- a/camel/providers/nntp/.cvsignore
+++ /dev/null
@@ -1,12 +0,0 @@
-.deps
-Makefile
-Makefile.in
-.libs
-.deps
-*.lo
-*.la
-test-newsrc
-*.bb
-*.bbg
-*.da
-*.gcov
diff --git a/camel/providers/nntp/Makefile.am b/camel/providers/nntp/Makefile.am
deleted file mode 100644
index 4b686735e3..0000000000
--- a/camel/providers/nntp/Makefile.am
+++ /dev/null
@@ -1,53 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-libcamelnntpincludedir = $(includedir)/camel
-
-providerdir = $(pkglibdir)/camel-providers/$(VERSION)
-
-provider_LTLIBRARIES = libcamelnntp.la
-provider_DATA = libcamelnntp.urls
-
-INCLUDES = -I../.. \
- -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-nntp-provider\"
-
-libcamelnntp_la_SOURCES = \
- camel-nntp-auth.c \
- camel-nntp-folder.c \
- camel-nntp-grouplist.c \
- camel-nntp-newsrc.c \
- camel-nntp-provider.c \
- camel-nntp-store.c \
- camel-nntp-utils.c
-
-libcamelnntpinclude_HEADERS = \
- camel-nntp-auth.h \
- camel-nntp-folder.h \
- camel-nntp-grouplist.h \
- camel-nntp-newsrc.h \
- camel-nntp-resp-codes.h \
- camel-nntp-store.h \
- camel-nntp-types.h \
- camel-nntp-utils.h
-
-libcamelnntp_la_LDFLAGS = -version-info 0:0:0
-
-EXTRA_DIST = libcamelnntp.urls
-
-#noinst_PROGRAMS = test-newsrc
-
-#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)
-
-#test_newsrc_LDADD = libcamelnntp.la $(LDADD)
diff --git a/camel/providers/nntp/camel-nntp-auth.c b/camel/providers/nntp/camel-nntp-auth.c
deleted file mode 100644
index b211f52593..0000000000
--- a/camel/providers/nntp/camel-nntp-auth.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-nntp-auth.c : authentication for nntp */
-
-/*
- *
- * Copyright (C) 2000 Helix Code, Inc. <toshok@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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <string.h>
-#include <camel-nntp-auth.h>
-#include <camel-nntp-store.h>
-#include <camel-nntp-resp-codes.h>
-#include <camel-exception.h>
-#include <camel-session.h>
-
-int
-camel_nntp_auth_authenticate (CamelNNTPStore *store, CamelException *ex)
-{
- CamelService *service = CAMEL_SERVICE (store);
- CamelSession *session = camel_service_get_session (service);
- int resp;
-
- if (!service->url->authmech && !service->url->passwd) {
- gchar *prompt;
-
- prompt = g_strdup_printf (_("Please enter the NNTP password for %s@%s"),
- service->url->user, service->url->host);
- service->url->passwd =
- camel_session_query_authenticator (session,
- CAMEL_AUTHENTICATOR_ASK, prompt,
- TRUE, service, "password", ex);
- g_free (prompt);
-
- if (!service->url->passwd) {
- camel_exception_set (ex, CAMEL_EXCEPTION_USER_CANCEL,
- "You didn\'t enter a password.");
- resp = 666;
- goto done;
- }
- }
-
- /* first send username */
- resp = camel_nntp_command (store, ex, NULL, "AUTHINFO USER %s", service->url->user);
-
- if (resp == NNTP_AUTH_REJECTED) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
- _("Server rejected username"));
- goto done;
-
- }
- else if (resp != NNTP_AUTH_CONTINUE) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
- _("Failed to send username to server"));
- goto done;
- }
-
- /* then send the username if the server asks for it */
- resp = camel_nntp_command (store, ex, NULL, "AUTHINFO PASS %s", service->url->passwd);
-
- if (resp == NNTP_AUTH_REJECTED) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
- _("Server rejected username/password"));
- goto done;
- }
-
- done:
-
- if (service->url->passwd) {
- /* let's be paranoid */
- memset (service->url->passwd, 0, strlen (service->url->passwd));
- g_free (service->url->passwd);
- service->url->passwd = NULL;
- }
- return resp;
-}
diff --git a/camel/providers/nntp/camel-nntp-auth.h b/camel/providers/nntp/camel-nntp-auth.h
deleted file mode 100644
index 2708d9d335..0000000000
--- a/camel/providers/nntp/camel-nntp-auth.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-nntp-auth.h : authentication for nntp */
-
-/*
- *
- * Author : Chris Toshok <toshok@helixcode.com>
- *
- * 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_AUTH_H
-#define CAMEL_NNTP_AUTH_H 1
-
-#include <camel-nntp-store.h>
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-int camel_nntp_auth_authenticate (CamelNNTPStore *store, CamelException *ex);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_NNTP_AUTH_H */
diff --git a/camel/providers/nntp/camel-nntp-folder.c b/camel/providers/nntp/camel-nntp-folder.c
deleted file mode 100644
index 7edc4a98fd..0000000000
--- a/camel/providers/nntp/camel-nntp-folder.c
+++ /dev/null
@@ -1,265 +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 <toshok@helixcode.com>
- *
- * 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 <config.h>
-
-#include <stdlib.h>
-#include <sys/types.h>
-#include <dirent.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <errno.h>
-#include <string.h>
-#include <fcntl.h>
-
-#include "camel-folder-summary.h"
-#include "camel-nntp-resp-codes.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-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 (CAMEL_OBJECT_GET_CLASS(so))
-#define CF_CLASS(so) CAMEL_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-#define CNNTPS_CLASS(so) CAMEL_STORE_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-
-
-static void
-nntp_folder_sync (CamelFolder *folder, gboolean expunge,
- CamelException *ex)
-{
- CamelNNTPStore *store;
-
- camel_folder_summary_save (folder->summary);
-
- store = CAMEL_NNTP_STORE (camel_folder_get_parent_store (folder));
-
- if (store->newsrc)
- camel_nntp_newsrc_write (store->newsrc);
-}
-
-static void
-nntp_folder_set_message_flags (CamelFolder *folder, const char *uid,
- guint32 flags, guint32 set)
-{
- ((CamelFolderClass *)parent_class)->set_message_flags(folder, uid, flags, set);
-
- if (flags & set & CAMEL_MESSAGE_SEEN) {
- int article_num;
- CamelNNTPStore *nntp_store = CAMEL_NNTP_STORE (camel_folder_get_parent_store (folder));
-
- sscanf (uid, "%d", &article_num);
-
- camel_nntp_newsrc_mark_article_read (nntp_store->newsrc,
- folder->name,
- article_num);
- }
-}
-
-static CamelMimeMessage *
-nntp_folder_get_message (CamelFolder *folder, const gchar *uid, CamelException *ex)
-{
- CamelStream *message_stream = NULL;
- CamelMimeMessage *message = NULL;
- CamelStore *parent_store;
- char *buf;
- int buf_len;
- int buf_alloc;
- int status;
- gboolean done;
- char *message_id;
-
- /* get the parent store */
- parent_store = camel_folder_get_parent_store (folder);
-
- message_id = strchr (uid, ',') + 1;
- status = camel_nntp_command (CAMEL_NNTP_STORE( parent_store ), ex, NULL, "ARTICLE %s", message_id);
-
- /* if the message_id was not found, raise an exception and return */
- if (status == NNTP_NO_SUCH_ARTICLE) {
- camel_exception_setv (ex,
- CAMEL_EXCEPTION_FOLDER_INVALID_UID,
- _("Message %s not found."),
- message_id);
- return NULL;
- }
- else if (status != NNTP_ARTICLE_FOLLOWS) {
- /* XXX */
- g_warning ("weird nntp error %d\n", status);
- return NULL;
- }
-
- /* this could probably done fairly easily with an nntp stream that
- returns eof after '.' */
-
- /* 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 = g_malloc(buf_alloc);
- done = FALSE;
-
- buf[0] = 0;
-
- while (!done) {
- int line_length;
- char *line;
-
- if (camel_remote_store_recv_line (CAMEL_REMOTE_STORE (parent_store), &line, ex) < 0) {
- g_warning ("recv_line failed while building message\n");
- break;
- }
-
- /* 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 = g_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 ();
- camel_data_wrapper_construct_from_stream (CAMEL_DATA_WRAPPER(message), message_stream);
-
- camel_object_unref (CAMEL_OBJECT (message_stream));
-
-#if 0
- gtk_signal_connect (CAMEL_OBJECT (message), "message_changed", message_changed, folder);
-#endif
-
- g_free (buf);
-
- return message;
-}
-
-static GPtrArray*
-nntp_folder_search_by_expression (CamelFolder *folder, const char *expression, CamelException *ex)
-{
- g_assert (0);
- return NULL;
-}
-
-static void
-nntp_folder_finalize (CamelObject *object)
-{
- CamelNNTPFolder *nntp_folder = CAMEL_NNTP_FOLDER (object);
-
- g_free (nntp_folder->summary_file_path);
-}
-
-static void
-camel_nntp_folder_class_init (CamelNNTPFolderClass *camel_nntp_folder_class)
-{
- CamelFolderClass *camel_folder_class = CAMEL_FOLDER_CLASS (camel_nntp_folder_class);
-
- parent_class = CAMEL_FOLDER_CLASS (camel_type_get_global_classfuncs (camel_folder_get_type ()));
-
- /* virtual method definition */
-
- /* virtual method overload */
- camel_folder_class->sync = nntp_folder_sync;
- camel_folder_class->set_message_flags = nntp_folder_set_message_flags;
- camel_folder_class->get_message = nntp_folder_get_message;
- camel_folder_class->search_by_expression = nntp_folder_search_by_expression;
-}
-
-CamelType
-camel_nntp_folder_get_type (void)
-{
- static CamelType camel_nntp_folder_type = CAMEL_INVALID_TYPE;
-
- if (camel_nntp_folder_type == CAMEL_INVALID_TYPE) {
- camel_nntp_folder_type = camel_type_register (CAMEL_FOLDER_TYPE, "CamelNNTPFolder",
- sizeof (CamelNNTPFolder),
- sizeof (CamelNNTPFolderClass),
- (CamelObjectClassInitFunc) camel_nntp_folder_class_init,
- NULL,
- (CamelObjectInitFunc) NULL,
- (CamelObjectFinalizeFunc) nntp_folder_finalize);
- }
-
- return camel_nntp_folder_type;
-}
-
-CamelFolder *
-camel_nntp_folder_new (CamelStore *parent, const char *folder_name, CamelException *ex)
-{
- CamelFolder *folder = CAMEL_FOLDER (camel_object_new (CAMEL_NNTP_FOLDER_TYPE));
- CamelNNTPFolder *nntp_folder = CAMEL_NNTP_FOLDER (folder);
- const gchar *root_dir_path;
-
- camel_folder_construct (folder, parent, folder_name, folder_name);
- folder->has_summary_capability = TRUE;
-
- 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);
-
- folder->summary = camel_folder_summary_new ();
- camel_folder_summary_set_filename (folder->summary,
- nntp_folder->summary_file_path);
-
- if (-1 == camel_folder_summary_load (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)) {
- camel_object_unref (CAMEL_OBJECT (folder));
- return NULL;
- }
-
- /* XXX check return value */
- camel_folder_summary_save (folder->summary);
- }
-
- return folder;
-}
diff --git a/camel/providers/nntp/camel-nntp-folder.h b/camel/providers/nntp/camel-nntp-folder.h
deleted file mode 100644
index 190d0bf346..0000000000
--- a/camel/providers/nntp/camel-nntp-folder.h
+++ /dev/null
@@ -1,74 +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 <toshok@helixcode.com>
- *
- * 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 "camel-folder.h"
-
-/* #include "camel-store.h" */
-
-#define CAMEL_NNTP_FOLDER_TYPE (camel_nntp_folder_get_type ())
-#define CAMEL_NNTP_FOLDER(obj) (CAMEL_CHECK_CAST((obj), CAMEL_NNTP_FOLDER_TYPE, CamelNNTPFolder))
-#define CAMEL_NNTP_FOLDER_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_NNTP_FOLDER_TYPE, CamelNNTPFolderClass))
-#define CAMEL_IS_NNTP_FOLDER(o) (CAMEL_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 Camel function */
-CamelType camel_nntp_folder_get_type (void);
-
-CamelFolder *camel_nntp_folder_new (CamelStore *parent, const char *folder_name, CamelException *ex);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_NNTP_FOLDER_H */
diff --git a/camel/providers/nntp/camel-nntp-grouplist.c b/camel/providers/nntp/camel-nntp-grouplist.c
deleted file mode 100644
index 578a6eba66..0000000000
--- a/camel/providers/nntp/camel-nntp-grouplist.c
+++ /dev/null
@@ -1,214 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-nntp-grouplist.c : getting/updating the list of newsgroups on the server. */
-
-/*
- * Author : Chris Toshok <toshok@helixcode.com>
- *
- * 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 <config.h>
-#include <errno.h>
-#include <string.h>
-
-#include "camel-exception.h"
-#include "camel-nntp-grouplist.h"
-#include "camel-nntp-resp-codes.h"
-
-static CamelNNTPGroupList *
-camel_nntp_get_grouplist_from_server (CamelNNTPStore *store, CamelException *ex)
-{
- int status;
- gboolean done = FALSE;
- CamelNNTPGroupList *list;
-
- status = camel_nntp_command (store, ex, NULL,
- "LIST");
-
- if (status != NNTP_LIST_FOLLOWS) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not get group list from server."));
- return NULL;
- }
-
- list = g_new0 (CamelNNTPGroupList, 1);
- list->time = time (NULL);
-
- while (!done) {
- char *line;
-
- if (camel_remote_store_recv_line (CAMEL_REMOTE_STORE (store), &line, ex) < 0)
- return list;
-
- if (*line == '.') {
- done = TRUE;
- }
- else {
- CamelNNTPGroupListEntry *entry = g_new (CamelNNTPGroupListEntry, 1);
- char **split_line = g_strsplit (line, " ", 4);
-
- entry->group_name = g_strdup (split_line[0]);
- entry->high = atoi (split_line[1]);
- entry->low = atoi (split_line[2]);
-
- g_strfreev (split_line);
-
- list->group_list = g_list_append (list->group_list, entry);
- }
- }
-
- return list;
-}
-
-static CamelNNTPGroupList*
-camel_nntp_get_grouplist_from_file (CamelNNTPStore *store, CamelException *ex)
-{
- gchar *root_dir = camel_nntp_store_get_toplevel_dir(CAMEL_NNTP_STORE(store));
- gchar *grouplist_file = g_strdup_printf ("%s/grouplist", root_dir);
- CamelNNTPGroupList *list;
- FILE *fp;
- char buf[300];
- unsigned long time;
-
- g_free (root_dir);
- fp = fopen (grouplist_file, "r");
- g_free (grouplist_file);
-
- if (fp == NULL) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
- _("Unable to load grouplist file for %s: %s"),
- CAMEL_SERVICE(store)->url->host,
- strerror(errno));
- return NULL;
- }
-
- /* read the time */
- if (!fgets (buf, sizeof (buf), fp)) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
- _("Unable to load grouplist file for %s: %s"),
- CAMEL_SERVICE(store)->url->host,
- strerror(errno));
- fclose (fp);
- return NULL;
- }
-
-
- list = g_new0 (CamelNNTPGroupList, 1);
- list->store = store;
- sscanf (buf, "%lu", &time);
- list->time = time;
-
- while (fgets (buf, sizeof (buf), fp)) {
- CamelNNTPGroupListEntry *entry = g_new (CamelNNTPGroupListEntry, 1);
- char **split_line = g_strsplit (buf, " ", 4);
-
- entry->group_name = g_strdup (split_line[0]);
- entry->high = atoi (split_line[1]);
- entry->low = atoi (split_line[2]);
-
- g_strfreev (split_line);
-
- list->group_list = g_list_append (list->group_list, entry);
- }
-
- fclose (fp);
-
- return list;
-}
-
-static void
-save_entry (CamelNNTPGroupListEntry *entry, FILE *fp)
-{
- fprintf (fp, "%s %d %d\n", entry->group_name, entry->low, entry->high);
-}
-
-void
-camel_nntp_grouplist_save (CamelNNTPGroupList *group_list, CamelException *ex)
-{
- FILE *fp;
- gchar *root_dir = camel_nntp_store_get_toplevel_dir(CAMEL_NNTP_STORE(group_list->store));
- gchar *grouplist_file = g_strdup_printf ("%s/grouplist", root_dir);
-
- g_free (root_dir);
- fp = fopen (grouplist_file, "w");
- g_free (grouplist_file);
-
- if (fp == NULL) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
- _("Unable to save grouplist file for %s: %s"),
- CAMEL_SERVICE(group_list->store)->url->host,
- strerror(errno));
- return;
- }
-
- fprintf (fp, "%lu\n", (long)group_list->time);
-
- g_list_foreach (group_list->group_list, (GFunc)save_entry, fp);
-
- fclose (fp);
-}
-
-static void
-free_entry (CamelNNTPGroupListEntry *entry, void *data)
-{
- g_free (entry->group_name);
- g_free (entry);
-}
-
-void
-camel_nntp_grouplist_free (CamelNNTPGroupList *group_list)
-{
- g_return_if_fail (group_list);
-
- g_list_foreach (group_list->group_list, (GFunc)free_entry, NULL);
-
- g_free (group_list);
-}
-
-CamelNNTPGroupList*
-camel_nntp_grouplist_fetch (CamelNNTPStore *store, CamelException *ex)
-{
- CamelNNTPGroupList *list;
-
- list = camel_nntp_get_grouplist_from_file (store, ex);
-
- printf ("camel_nntp_get_grouplist_from_file returned %p\n", list);
-
- if (!list) {
- camel_exception_clear (ex);
-
- list = camel_nntp_get_grouplist_from_server (store, ex);
-
- if (!list) {
- camel_nntp_grouplist_free (list);
- }
- else {
- list->store = store;
- camel_nntp_grouplist_save (list, ex);
- return list;
- }
- }
-
- return list;
-}
-
-gint
-camel_nntp_grouplist_update (CamelNNTPGroupList *group_list, CamelException *ex)
-{
- return 0;
-}
diff --git a/camel/providers/nntp/camel-nntp-grouplist.h b/camel/providers/nntp/camel-nntp-grouplist.h
deleted file mode 100644
index 67c74d5dc2..0000000000
--- a/camel/providers/nntp/camel-nntp-grouplist.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-nntp-grouplist.h : getting/updating the list of newsgroups on the server. */
-
-/*
- * Author : Chris Toshok <toshok@helixcode.com>
- *
- * 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_GROUPLIST_H
-#define CAMEL_NNTP_GROUPLIST_H 1
-
-#include <time.h>
-#include "camel-nntp-store.h"
-
-struct CamelNNTPGroupListEntry {
- char *group_name;
- guint32 low;
- guint32 high;
- guint32 flags;
-};
-
-struct CamelNNTPGroupList {
- CamelNNTPStore *store;
- time_t time;
- GList *group_list;
-};
-
-CamelNNTPGroupList* camel_nntp_grouplist_fetch (CamelNNTPStore *store, CamelException *ex);
-gint camel_nntp_grouplist_update (CamelNNTPGroupList *group_list, CamelException *ex);
-void camel_nntp_grouplist_save (CamelNNTPGroupList *group_list, CamelException *ex);
-void camel_nntp_grouplist_free (CamelNNTPGroupList *group_list);
-
-#endif /* CAMEL_NNTP_GROUPLIST_H */
diff --git a/camel/providers/nntp/camel-nntp-newsrc.c b/camel/providers/nntp/camel-nntp-newsrc.c
deleted file mode 100644
index d0b56222cf..0000000000
--- a/camel/providers/nntp/camel-nntp-newsrc.c
+++ /dev/null
@@ -1,645 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-nntp-newsrc.c - .newsrc parsing/regurgitating code */
-/*
- *
- * Copyright (C) 2000 Helix Code, Inc. <toshok@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 <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <glib.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-#include "camel-nntp-newsrc.h"
-#include <camel/camel-folder-summary.h>
-
-#ifdef ENABLE_THREADS
-#include <pthread.h>
-
-#define NEWSRC_LOCK(f, l) (g_mutex_lock(((CamelNNTPNewsrc *)f)->l))
-#define NEWSRC_UNLOCK(f, l) (g_mutex_unlock(((CamelNNTPNewsrc *)f)->l))
-#else
-#define NEWSRC_LOCK(f, l)
-#define NEWSRC_UNLOCK(f, l)
-#endif
-
-typedef struct {
- guint low;
- guint high;
-} ArticleRange;
-
-typedef struct {
- char *name;
- GArray *ranges;
- gboolean subscribed;
-} NewsrcGroup;
-
-struct CamelNNTPNewsrc {
- gchar *filename;
- GHashTable *groups;
- gboolean dirty;
-#ifdef ENABLE_THREADS
- GMutex *lock;
-#endif
-} ;
-
-
-static NewsrcGroup *
-camel_nntp_newsrc_group_add (CamelNNTPNewsrc *newsrc, const char *group_name, gboolean subscribed)
-{
- NewsrcGroup *new_group = g_malloc(sizeof(NewsrcGroup));
-
- new_group->name = g_strdup(group_name);
- new_group->subscribed = subscribed;
- new_group->ranges = g_array_new (FALSE, FALSE, sizeof (ArticleRange));
-
- g_hash_table_insert (newsrc->groups, new_group->name, new_group);
-
- newsrc->dirty = TRUE;
-
- return new_group;
-}
-
-static int
-camel_nntp_newsrc_group_get_highest_article_read(CamelNNTPNewsrc *newsrc, NewsrcGroup *group)
-{
- if (!group || group->ranges->len == 0)
- return 0;
-
- return g_array_index(group->ranges, ArticleRange, group->ranges->len - 1).high;
-}
-
-static int
-camel_nntp_newsrc_group_get_num_articles_read(CamelNNTPNewsrc *newsrc, NewsrcGroup *group)
-{
- int i;
- int count = 0;
-
- if (group == NULL)
- return 0;
-
- for (i = 0; i < group->ranges->len; i ++)
- count += (g_array_index(group->ranges, ArticleRange, i).high -
- g_array_index(group->ranges, ArticleRange, i).low) + 1;
-
- return count;
-}
-
-
-static void
-camel_nntp_newsrc_group_mark_range_read(CamelNNTPNewsrc *newsrc, NewsrcGroup *group, long low, long high)
-{
- int i;
-
- if (group->ranges->len == 1
- && g_array_index (group->ranges, ArticleRange, 0).low == 0
- && g_array_index (group->ranges, ArticleRange, 0).high == 0) {
- g_array_index (group->ranges, ArticleRange, 0).low = low;
- g_array_index (group->ranges, ArticleRange, 0).high = high;
-
- newsrc->dirty = TRUE;
- }
- else {
- ArticleRange tmp_range;
-
- for (i = 0; i < group->ranges->len; i ++) {
- guint range_low = g_array_index (group->ranges, ArticleRange, i).low;
- guint range_high = g_array_index (group->ranges, ArticleRange, i).high;
-
- /* if it's already part of a range, return immediately. */
- if (low >= range_low &&
- low <= range_high &&
- high >= range_low &&
- high <= range_high) {
- return;
- }
- /* if we have a new lower bound for this range, set it. */
- else if (low <= range_low
- && high >= range_low
- && high <= range_high) {
- g_array_index (group->ranges, ArticleRange, i).low = low;
- newsrc->dirty = TRUE;
- return;
- }
- /* if we have a new upper bound for this range, set it. */
- else if (high >= range_high
- && low >= range_low
- && low <= range_high) {
- g_array_index (group->ranges, ArticleRange, i).high = high;
- newsrc->dirty = TRUE;
- return;
- }
- /* if we would be inserting another range that
- starts one index higher than an existing
- one, make the upper value of the existing
- range the upper value of the new one. */
- else if (low == range_high + 1) {
- g_array_index (group->ranges, ArticleRange, i).high = high;
- newsrc->dirty = TRUE;
- return;
- }
- /* if we would be inserting another range that
- ends one index lower than an existing one,
- group the existing range by setting its low
- to the new low */
- else if (high == range_low - 1) {
- g_array_index (group->ranges, ArticleRange, i).low = low;
- newsrc->dirty = TRUE;
- return;
- }
- /* if the range lies entirely outside another
- range, doesn't coincide with it's
- endpoints, and has lower values, insert it
- into the middle of the list. */
- else if (low < range_low
- && high < range_low) {
- tmp_range.low = low;
- tmp_range.high = high;
-
- group->ranges = g_array_insert_val (group->ranges, i, tmp_range);
- newsrc->dirty = TRUE;
-
- return;
- }
- }
-
- /* if we made it here, the range needs to go at the end */
- tmp_range.low = low;
- tmp_range.high = high;
- group->ranges = g_array_append_val (group->ranges, tmp_range);
- newsrc->dirty = TRUE;
- }
-}
-
-int
-camel_nntp_newsrc_get_highest_article_read (CamelNNTPNewsrc *newsrc, const char *group_name)
-{
- NewsrcGroup *group;
- int ret;
-
- NEWSRC_LOCK(newsrc, lock);
-
- group = g_hash_table_lookup (newsrc->groups, group_name);
- ret = camel_nntp_newsrc_group_get_highest_article_read (newsrc, group);
-
- NEWSRC_UNLOCK(newsrc, lock);
-
- return ret;
-}
-
-int
-camel_nntp_newsrc_get_num_articles_read (CamelNNTPNewsrc *newsrc, const char *group_name)
-{
- NewsrcGroup *group;
- int ret;
-
- NEWSRC_LOCK(newsrc, lock);
-
- group = g_hash_table_lookup (newsrc->groups, group_name);
- ret = camel_nntp_newsrc_group_get_num_articles_read (newsrc, group);
-
- NEWSRC_UNLOCK(newsrc, lock);
-
- return ret;
-}
-
-void
-camel_nntp_newsrc_mark_article_read (CamelNNTPNewsrc *newsrc, const char *group_name, int num)
-{
- NEWSRC_LOCK(newsrc, lock);
- camel_nntp_newsrc_mark_range_read (newsrc, group_name, num, num);
- NEWSRC_UNLOCK(newsrc, lock);
-}
-
-void
-camel_nntp_newsrc_mark_range_read(CamelNNTPNewsrc *newsrc, const char *group_name, long low, long high)
-{
- NewsrcGroup *group;
-
- /* swap them if they're in the wrong order. */
- if (low > high) {
- long tmp;
-
- tmp = high;
- high = low;
- low = tmp;
- }
-
- NEWSRC_LOCK(newsrc, lock);
- group = g_hash_table_lookup (newsrc->groups, group_name);
-
- camel_nntp_newsrc_group_mark_range_read (newsrc, group, low, high);
- NEWSRC_UNLOCK(newsrc, lock);
-}
-
-gboolean
-camel_nntp_newsrc_article_is_read (CamelNNTPNewsrc *newsrc, const char *group_name, long num)
-{
- int i;
- NewsrcGroup *group;
- int ret = FALSE;
-
- NEWSRC_LOCK(newsrc, lock);
- group = g_hash_table_lookup (newsrc->groups, group_name);
-
- for (i = 0; i < group->ranges->len; i++) {
- if (num >= g_array_index (group->ranges, ArticleRange, i).low &&
- num <= g_array_index (group->ranges, ArticleRange, i).high) {
- ret = TRUE;
- break;
- }
- }
-
- NEWSRC_UNLOCK(newsrc, lock);
-
- return FALSE;
-}
-
-gboolean
-camel_nntp_newsrc_group_is_subscribed (CamelNNTPNewsrc *newsrc, const char *group_name)
-{
- NewsrcGroup *group;
- int ret = FALSE;
-
- NEWSRC_LOCK(newsrc, lock);
-
- group = g_hash_table_lookup (newsrc->groups, group_name);
-
- if (group) {
- ret = group->subscribed;
- }
-
- NEWSRC_UNLOCK(newsrc, lock);
-
- return ret;
-}
-
-void
-camel_nntp_newsrc_subscribe_group (CamelNNTPNewsrc *newsrc, const char *group_name)
-{
- NewsrcGroup *group;
-
- NEWSRC_LOCK(newsrc, lock);
-
- group = g_hash_table_lookup (newsrc->groups, group_name);
-
- if (group) {
- if (!group->subscribed)
- newsrc->dirty = TRUE;
- group->subscribed = TRUE;
- }
- else {
- camel_nntp_newsrc_group_add (newsrc, group_name, TRUE);
- }
-
- NEWSRC_UNLOCK(newsrc, lock);
-}
-
-void
-camel_nntp_newsrc_unsubscribe_group (CamelNNTPNewsrc *newsrc, const char *group_name)
-{
- NewsrcGroup *group;
-
- NEWSRC_LOCK(newsrc, lock);
-
- group = g_hash_table_lookup (newsrc->groups, group_name);
- if (group) {
- if (group->subscribed)
- newsrc->dirty = TRUE;
- group->subscribed = FALSE;
- }
- else {
- camel_nntp_newsrc_group_add (newsrc, group_name, FALSE);
- }
-
- NEWSRC_UNLOCK(newsrc, lock);
-}
-
-struct newsrc_ptr_array {
- GPtrArray *ptr_array;
- gboolean subscribed_only;
-};
-
-/* this needs to strdup the grup_name, if the group array is likely to change */
-static void
-get_group_foreach (char *group_name, NewsrcGroup *group, struct newsrc_ptr_array *npa)
-{
- if (group->subscribed || !npa->subscribed_only) {
- g_ptr_array_add (npa->ptr_array, group_name);
- }
-}
-
-GPtrArray *
-camel_nntp_newsrc_get_subscribed_group_names (CamelNNTPNewsrc *newsrc)
-{
- struct newsrc_ptr_array npa;
-
- g_return_val_if_fail (newsrc, NULL);
-
- NEWSRC_LOCK(newsrc, lock);
-
- npa.ptr_array = g_ptr_array_new();
- npa.subscribed_only = TRUE;
-
- g_hash_table_foreach (newsrc->groups,
- (GHFunc)get_group_foreach, &npa);
-
- NEWSRC_UNLOCK(newsrc, lock);
-
- return npa.ptr_array;
-}
-
-GPtrArray *
-camel_nntp_newsrc_get_all_group_names (CamelNNTPNewsrc *newsrc)
-{
- struct newsrc_ptr_array npa;
-
- g_return_val_if_fail (newsrc, NULL);
-
- NEWSRC_LOCK(newsrc, lock);
-
- npa.ptr_array = g_ptr_array_new();
- npa.subscribed_only = FALSE;
-
- g_hash_table_foreach (newsrc->groups,
- (GHFunc)get_group_foreach, &npa);
-
- NEWSRC_UNLOCK(newsrc, lock);
-
- return npa.ptr_array;
-}
-
-void
-camel_nntp_newsrc_free_group_names (CamelNNTPNewsrc *newsrc, GPtrArray *group_names)
-{
- g_ptr_array_free (group_names, TRUE);
-}
-
-struct newsrc_fp {
- CamelNNTPNewsrc *newsrc;
- FILE *fp;
-};
-
-static void
-camel_nntp_newsrc_write_group_line(gpointer key, NewsrcGroup *group, struct newsrc_fp *newsrc_fp)
-{
- CamelNNTPNewsrc *newsrc;
- FILE *fp;
- int i;
-
- fp = newsrc_fp->fp;
- newsrc = newsrc_fp->newsrc;
-
- fprintf (fp, "%s%c", group->name, group->subscribed ? ':' : '!');
-
- if (group->ranges->len == 1
- && g_array_index (group->ranges, ArticleRange, 0).low == 0
- && g_array_index (group->ranges, ArticleRange, 0).high == 0) {
- fprintf (fp, "\n");
-
- return; /* special case since our parsing code will insert this
- bogus range if there were no read articles. The code
- to add a range is smart enough to remove this one if we
- ever mark an article read, but we still need to deal with
- it if that code doesn't get hit. */
- }
-
- fprintf (fp, " ");
-
- for (i = 0; i < group->ranges->len; i ++) {
- char range_buffer[100];
- guint low = g_array_index (group->ranges, ArticleRange, i).low;
- guint high = g_array_index (group->ranges, ArticleRange, i).high;
-
- if (low == high)
- sprintf(range_buffer, "%d", low);
- else if (low == high - 1)
- sprintf(range_buffer, "%d,%d", low, high);
- else
- sprintf(range_buffer, "%d-%d", low, high);
-
- if (i != group->ranges->len - 1)
- strcat(range_buffer, ",");
-
- fprintf (fp, range_buffer);
- }
-
- fprintf (fp, "\n");
-}
-
-void
-camel_nntp_newsrc_write_to_file(CamelNNTPNewsrc *newsrc, FILE *fp)
-{
- struct newsrc_fp newsrc_fp;
-
- g_return_if_fail (newsrc);
-
- newsrc_fp.newsrc = newsrc;
- newsrc_fp.fp = fp;
-
- NEWSRC_LOCK(newsrc, lock);
-
- g_hash_table_foreach (newsrc->groups,
- (GHFunc)camel_nntp_newsrc_write_group_line,
- &newsrc_fp);
-
- NEWSRC_UNLOCK(newsrc, lock);
-}
-
-void
-camel_nntp_newsrc_write(CamelNNTPNewsrc *newsrc)
-{
- FILE *fp;
-
- g_return_if_fail (newsrc);
-
- NEWSRC_LOCK(newsrc, lock);
-
- if (!newsrc->dirty)
- return;
-
- if ((fp = fopen(newsrc->filename, "w")) == NULL) {
- g_warning ("Couldn't open newsrc file '%s'.\n", newsrc->filename);
- NEWSRC_UNLOCK(newsrc, lock);
- return;
- }
-
- newsrc->dirty = FALSE;
- NEWSRC_UNLOCK(newsrc, lock);
-
- camel_nntp_newsrc_write_to_file(newsrc, fp);
-
- fclose(fp);
-}
-
-static void
-camel_nntp_newsrc_parse_line(CamelNNTPNewsrc *newsrc, char *line)
-{
- char *p, *comma, *dash;
- gboolean is_subscribed;
- NewsrcGroup *group;
-
- p = strchr(line, ':');
-
- if (p) {
- is_subscribed = TRUE;
- }
- else {
- p = strchr(line, '!');
- if (p)
- is_subscribed = FALSE;
- else
- return; /* bogus line. */
- }
-
- *p++ = '\0';
-
- group = camel_nntp_newsrc_group_add (newsrc, line, is_subscribed);
-
- do {
- guint high, low;
-
- comma = strchr(p, ',');
-
- if (comma)
- *comma = '\0';
-
- dash = strchr(p, '-');
-
- if (!dash) { /* there wasn't a dash. must be just one number */
- high = low = atol(p);
- }
- else { /* there was a dash. */
- *dash = '\0';
- low = atol(p);
- *dash = '-';
- p = dash + 1;
- high = atol(p);
- }
-
- camel_nntp_newsrc_group_mark_range_read (newsrc, group, low, high);
-
- if (comma) {
- *comma = ',';
- p = comma + 1;
- }
-
- } while(comma);
-}
-
-static char*
-get_line (char *buf, char **p)
-{
- char *l;
- char *line;
-
- g_assert (*p == NULL || **p == '\n' || **p == '\0');
-
- if (*p == NULL) {
- *p = buf;
-
- if (**p == '\0')
- return NULL;
- }
- else {
- if (**p == '\0')
- return NULL;
-
- (*p) ++;
-
- /* if we just incremented to the end of the buffer, return NULL */
- if (**p == '\0')
- return NULL;
- }
-
- l = strchr (*p, '\n');
- if (l) {
- *l = '\0';
- line = g_strdup (*p);
- *l = '\n';
- *p = l;
- }
- else {
- /* we're at the last line (which isn't terminated by a \n, btw) */
- line = g_strdup (*p);
- (*p) += strlen (*p);
- }
-
- return line;
-}
-
-CamelNNTPNewsrc *
-camel_nntp_newsrc_read_for_server (const char *server)
-{
- int fd;
- char buf[1024];
- char *file_contents, *line, *p;
- char *filename;
- CamelNNTPNewsrc *newsrc;
- int newsrc_len;
- int len_read = 0;
- struct stat sb;
-
- filename = g_strdup_printf ("%s/.newsrc-%s", g_get_home_dir(), server);
-
- newsrc = g_new0(CamelNNTPNewsrc, 1);
- newsrc->filename = filename;
- newsrc->groups = g_hash_table_new (g_str_hash, g_str_equal);
-#ifdef ENABLE_THREADS
- newsrc->lock = g_mutex_new();
-#endif
-
- if ((fd = open(filename, O_RDONLY)) == -1) {
- g_warning ("~/.newsrc-%s not present.\n", server);
- return newsrc;
- }
-
- if (fstat (fd, &sb) == -1) {
- g_warning ("failed fstat on ~/.newsrc-%s: %s\n", server, strerror(errno));
- return newsrc;
- }
- newsrc_len = sb.st_size;
-
- file_contents = g_malloc (newsrc_len + 1);
-
- while (len_read < newsrc_len) {
- int c = read (fd, buf, sizeof (buf));
-
- if (c == -1)
- break;
-
- memcpy (&file_contents[len_read], buf, c);
- len_read += c;
- }
- file_contents [len_read] = 0;
-
- p = NULL;
- while ((line = get_line (file_contents, &p))) {
- camel_nntp_newsrc_parse_line(newsrc, line);
- g_free (line);
- }
-
- close (fd);
- g_free (file_contents);
-
- return newsrc;
-}
diff --git a/camel/providers/nntp/camel-nntp-newsrc.h b/camel/providers/nntp/camel-nntp-newsrc.h
deleted file mode 100644
index 652e3edbce..0000000000
--- a/camel/providers/nntp/camel-nntp-newsrc.h
+++ /dev/null
@@ -1,34 +0,0 @@
-
-#ifndef _CAMEL_NNTP_NEWSRC_H_
-#define _CAMEL_NNTP_NEWSRC_H_
-
-#include <stdio.h>
-#include "glib.h"
-
-typedef struct CamelNNTPNewsrc CamelNNTPNewsrc;
-
-int camel_nntp_newsrc_get_highest_article_read (CamelNNTPNewsrc *newsrc, const char *group_name);
-int camel_nntp_newsrc_get_num_articles_read (CamelNNTPNewsrc *newsrc, const char *group_name);
-void camel_nntp_newsrc_mark_article_read (CamelNNTPNewsrc *newsrc,
- const char *group_name, int num);
-void camel_nntp_newsrc_mark_range_read (CamelNNTPNewsrc *newsrc,
- const char *group_name, long low, long high);
-
-gboolean camel_nntp_newsrc_article_is_read (CamelNNTPNewsrc *newsrc,
- const char *group_name, long num);
-
-gboolean camel_nntp_newsrc_group_is_subscribed (CamelNNTPNewsrc *newsrc, const char *group_name);
-void camel_nntp_newsrc_subscribe_group (CamelNNTPNewsrc *newsrc, const char *group_name);
-void camel_nntp_newsrc_unsubscribe_group (CamelNNTPNewsrc *newsrc, const char *group_name);
-
-GPtrArray* camel_nntp_newsrc_get_subscribed_group_names (CamelNNTPNewsrc *newsrc);
-GPtrArray* camel_nntp_newsrc_get_all_group_names (CamelNNTPNewsrc *newsrc);
-void camel_nntp_newsrc_free_group_names (CamelNNTPNewsrc *newsrc, GPtrArray *group_names);
-
-void camel_nntp_newsrc_write_to_file (CamelNNTPNewsrc *newsrc, FILE *fp);
-void camel_nntp_newsrc_write (CamelNNTPNewsrc *newsrc);
-CamelNNTPNewsrc *camel_nntp_newsrc_read_for_server (const char *server);
-
-#endif /* _CAMEL_NNTP_NEWSRC_H_ */
-
-
diff --git a/camel/providers/nntp/camel-nntp-provider.c b/camel/providers/nntp/camel-nntp-provider.c
deleted file mode 100644
index 07857c173c..0000000000
--- a/camel/providers/nntp/camel-nntp-provider.c
+++ /dev/null
@@ -1,112 +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 <toshok@helixcode.com>
- *
- * 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <string.h>
-#include "camel-nntp-store.h"
-#include "camel-provider.h"
-#include "camel-session.h"
-
-static void add_hash (guint *hash, char *s);
-static guint nntp_url_hash (gconstpointer key);
-static gint check_equal (char *s1, char *s2);
-static gint nntp_url_equal (gconstpointer a, gconstpointer b);
-
-static CamelProvider news_provider = {
- "nntp",
- N_("USENET news"),
-
- N_("This is a provider for reading from and posting to"
- "USENET newsgroups."),
-
- "news",
-
- CAMEL_PROVIDER_IS_REMOTE | CAMEL_PROVIDER_IS_STORAGE,
-
- CAMEL_URL_NEED_HOST | CAMEL_URL_ALLOW_USER |
- CAMEL_URL_ALLOW_PASSWORD | CAMEL_URL_ALLOW_AUTH,
-
- /* ... */
-};
-
-void
-camel_provider_module_init (CamelSession *session)
-{
- news_provider.object_types[CAMEL_PROVIDER_STORE] =
- camel_nntp_store_get_type();
-
- news_provider.service_cache = g_hash_table_new (nntp_url_hash, nntp_url_equal);
-
- camel_session_register_provider (session, &news_provider);
-}
-
-static void
-add_hash (guint *hash, char *s)
-{
- if (s)
- *hash ^= g_str_hash(s);
-}
-
-static guint
-nntp_url_hash (gconstpointer key)
-{
- const CamelURL *u = (CamelURL *)key;
- guint hash = 0;
-
- add_hash (&hash, u->user);
- add_hash (&hash, u->host);
- hash ^= u->port;
-
- return hash;
-}
-
-static gint
-check_equal (char *s1, char *s2)
-{
- if (s1 == NULL) {
- if (s2 == NULL)
- return TRUE;
- else
- return FALSE;
- }
-
- if (s2 == NULL)
- return FALSE;
-
- return strcmp (s1, s2) == 0;
-}
-
-static gint
-nntp_url_equal (gconstpointer a, gconstpointer b)
-{
- const CamelURL *u1 = a, *u2 = b;
-
- return check_equal (u1->user, u2->user)
- && check_equal (u1->host, u2->host)
- && u1->port == u2->port;
-}
diff --git a/camel/providers/nntp/camel-nntp-resp-codes.h b/camel/providers/nntp/camel-nntp-resp-codes.h
deleted file mode 100644
index 8b9dc8ff6c..0000000000
--- a/camel/providers/nntp/camel-nntp-resp-codes.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-nntp-resp-codes.h : #defines for all the response codes we care about */
-
-/*
- *
- * Copyright (C) 2000 Helix Code, Inc. <toshok@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_NNTP_RESP_CODES_H
-#define CAMEL_NNTP_RESP_CODES_H 1
-
-#define CAMEL_NNTP_OK(x) ((x) < 400)
-#define CAMEL_NNTP_ERR(x) (!CAMEL_NNTP_OK(x) && (x) < 500)
-#define CAMEL_NNTP_FAIL(x) (!CAMEL_NNTP_OK(x) && !CAMEL_NNTP_ERR(x))
-
-#define NNTP_GREETING_POSTING_OK 200
-#define NNTP_GREETING_NO_POSTING 201
-
-#define NNTP_GROUP_SELECTED 211
-#define NNTP_LIST_FOLLOWS 215
-#define NNTP_ARTICLE_FOLLOWS 220
-#define NNTP_HEAD_FOLLOWS 221
-#define NNTP_DATA_FOLLOWS 224
-#define NNTP_NEW_ARTICLE_LIST_FOLLOWS 230
-#define NNTP_NEW_GROUP_LIST_FOLLOWS 231
-
-#define NNTP_NO_SUCH_GROUP 411
-#define NNTP_NO_SUCH_ARTICLE 430
-
-/* authentication */
-#define NNTP_AUTH_ACCEPTED 281
-#define NNTP_AUTH_CONTINUE 381
-#define NNTP_AUTH_REQUIRED 480
-#define NNTP_AUTH_REJECTED 482
-
-#define NNTP_PROTOCOL_ERROR 666
-
-#endif /* CAMEL_NNTP_RESP_CODES_H */
diff --git a/camel/providers/nntp/camel-nntp-store.c b/camel/providers/nntp/camel-nntp-store.c
deleted file mode 100644
index 009058dcd4..0000000000
--- a/camel/providers/nntp/camel-nntp-store.c
+++ /dev/null
@@ -1,852 +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. <toshok@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 <dirent.h>
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include "libgnome/libgnome.h"
-
-#include "camel-nntp-resp-codes.h"
-#include "camel-folder-summary.h"
-#include "camel-nntp-store.h"
-#include "camel-nntp-grouplist.h"
-#include "camel-nntp-folder.h"
-#include "camel-nntp-auth.h"
-#include "camel-exception.h"
-#include "camel-url.h"
-#include "string-utils.h"
-
-#include <gal/util/e-util.h>
-
-#define NNTP_PORT 119
-
-#define DUMP_EXTENSIONS
-
-/* define if you want the subscribe ui to show folders in tree form */
-/* #define INFO_AS_TREE */
-
-static CamelRemoteStoreClass *remote_store_class = NULL;
-
-static CamelServiceClass *service_class = NULL;
-
-/* Returns the class for a CamelNNTPStore */
-#define CNNTPS_CLASS(so) CAMEL_NNTP_STORE_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-#define CF_CLASS(so) CAMEL_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-#define CNNTPF_CLASS(so) CAMEL_NNTP_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS(so))
-
-static gboolean ensure_news_dir_exists (CamelNNTPStore *store);
-
-static void
-camel_nntp_store_get_extensions (CamelNNTPStore *store, CamelException *ex)
-{
- store->extensions = 0;
-
- if (camel_nntp_command (store, ex, NULL, "LIST EXTENSIONS") == NNTP_LIST_FOLLOWS) {
- gboolean done = FALSE;
- CamelException ex;
-
- camel_exception_init (&ex);
-
- while (!done) {
- char *line;
-
- if (camel_remote_store_recv_line (CAMEL_REMOTE_STORE (store), &line, &ex) < 0)
- break; /* XXX */
-
- if (*line == '.') {
- done = TRUE;
- }
- else {
-#define CHECK_EXT(name,val) if (!strcasecmp (line, (name))) store->extensions |= (val)
-
- CHECK_EXT ("SEARCH", CAMEL_NNTP_EXT_SEARCH);
- CHECK_EXT ("SETGET", CAMEL_NNTP_EXT_SETGET);
- CHECK_EXT ("OVER", CAMEL_NNTP_EXT_OVER);
- CHECK_EXT ("XPATTEXT", CAMEL_NNTP_EXT_XPATTEXT);
- CHECK_EXT ("XACTIVE", CAMEL_NNTP_EXT_XACTIVE);
- CHECK_EXT ("LISTMOTD", CAMEL_NNTP_EXT_LISTMOTD);
- CHECK_EXT ("LISTSUBSCR", CAMEL_NNTP_EXT_LISTSUBSCR);
- CHECK_EXT ("LISTPNAMES", CAMEL_NNTP_EXT_LISTPNAMES);
-
-#undef CHECK_EXT
- }
-
- g_free (line);
- }
- }
-
-#ifdef DUMP_EXTENSIONS
- g_print ("NNTP Extensions:");
-#define DUMP_EXT(name,val) if (store->extensions & (val)) g_print (" %s", name);
- DUMP_EXT ("SEARCH", CAMEL_NNTP_EXT_SEARCH);
- DUMP_EXT ("SETGET", CAMEL_NNTP_EXT_SETGET);
- DUMP_EXT ("OVER", CAMEL_NNTP_EXT_OVER);
- DUMP_EXT ("XPATTEXT", CAMEL_NNTP_EXT_XPATTEXT);
- DUMP_EXT ("XACTIVE", CAMEL_NNTP_EXT_XACTIVE);
- DUMP_EXT ("LISTMOTD", CAMEL_NNTP_EXT_LISTMOTD);
- DUMP_EXT ("LISTSUBSCR", CAMEL_NNTP_EXT_LISTSUBSCR);
- DUMP_EXT ("LISTPNAMES", CAMEL_NNTP_EXT_LISTPNAMES);
- g_print ("\n");
-#undef DUMP_EXT
-#endif
-}
-
-static void
-camel_nntp_store_get_overview_fmt (CamelNNTPStore *store, CamelException *ex)
-{
- int status;
- int i;
- gboolean done = FALSE;
-
- status = camel_nntp_command (store, ex, NULL,
- "LIST OVERVIEW.FMT");
-
- if (status != NNTP_LIST_FOLLOWS) {
- if (store->extensions & CAMEL_NNTP_EXT_OVER) {
- /* if we can't get the overview format, we should
- disable OVER support */
- g_warning ("server reported support of OVER but LIST OVERVIEW.FMT failed."
- " disabling OVER.\n");
- store->extensions &= ~CAMEL_NNTP_EXT_OVER;
- return;
- }
- }
- else {
- if (!(store->extensions & CAMEL_NNTP_EXT_OVER)) {
- g_warning ("server didn't report support of OVER but LIST OVERVIEW.FMT worked."
- " enabling OVER.\n");
- store->extensions |= CAMEL_NNTP_EXT_OVER;
- }
- }
-
- /* start at 1 because the article number is always first */
- store->num_overview_fields = 1;
-
- for (i = 0; i < CAMEL_NNTP_OVER_LAST; i ++) {
- store->overview_field [i].index = -1;
- }
-
- while (!done) {
- char *line;
-
- if (camel_remote_store_recv_line (CAMEL_REMOTE_STORE (store), &line, ex) < 0)
- break; /* XXX */
-
- if (*line == '.') {
- done = TRUE;
- }
- else {
- CamelNNTPOverField *over_field = NULL;
- char *colon = NULL;;
-
- if (!strncasecmp (line, "From:", 5)) {
- over_field = &store->overview_field [ CAMEL_NNTP_OVER_FROM ];
- over_field->index = store->num_overview_fields;
- colon = line + 5;
- }
- else if (!strncasecmp (line, "Subject:", 7)) {
- over_field = &store->overview_field [ CAMEL_NNTP_OVER_SUBJECT ];
- over_field->index = store->num_overview_fields;
- colon = line + 7;
- }
- else if (!strncasecmp (line, "Date:", 5)) {
- over_field = &store->overview_field [ CAMEL_NNTP_OVER_DATE ];
- over_field->index = store->num_overview_fields;
- colon = line + 5;
- }
- else if (!strncasecmp (line, "Message-ID:", 11)) {
- over_field = &store->overview_field [ CAMEL_NNTP_OVER_MESSAGE_ID ];
- over_field->index = store->num_overview_fields;
- colon = line + 11;
- }
- else if (!strncasecmp (line, "References:", 11)) {
- over_field = &store->overview_field [ CAMEL_NNTP_OVER_REFERENCES ];
- over_field->index = store->num_overview_fields;
- colon = line + 11;
- }
- else if (!strncasecmp (line, "Bytes:", 6)) {
- over_field = &store->overview_field [ CAMEL_NNTP_OVER_BYTES ];
- over_field->index = store->num_overview_fields;
- colon = line + 11;
- }
-
- if (colon && !strncmp (colon + 1, "full", 4))
- over_field->full = TRUE;
-
- store->num_overview_fields ++;
- }
-
- g_free (line);
- }
-
- for (i = 0; i < CAMEL_NNTP_OVER_LAST; i ++) {
- if (store->overview_field [i].index == -1) {
- g_warning ("server's OVERVIEW.FMT doesn't support minimum set we require,"
- " disabling OVER support.\n");
- store->extensions &= ~CAMEL_NNTP_EXT_OVER;
- }
- }
-}
-
-static gboolean
-nntp_store_connect (CamelService *service, CamelException *ex)
-{
- char *buf;
- int resp_code;
- CamelNNTPStore *store = CAMEL_NNTP_STORE (service);
-
- if (!ensure_news_dir_exists(store)) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not open directory for news server: %s"),
- strerror (errno));
- return FALSE;
- }
-
- if (CAMEL_SERVICE_CLASS (remote_store_class)->connect (service, ex) == FALSE)
- return FALSE;
-
- /* Read the greeting */
- if (camel_remote_store_recv_line (CAMEL_REMOTE_STORE (service), &buf, ex) < 0) {
- return FALSE;
- }
-
- /* check if posting is allowed. */
- resp_code = atoi (buf);
- if (resp_code == NNTP_GREETING_POSTING_OK) {
- g_print ("posting allowed\n");
- store->posting_allowed = TRUE;
- }
- else if (resp_code == NNTP_GREETING_NO_POSTING) {
- g_print ("no posting allowed\n");
- store->posting_allowed = FALSE;
- }
- else {
- g_warning ("unexpected server greeting code %d, no posting allowed\n", resp_code);
- store->posting_allowed = FALSE;
- }
-
- g_free (buf);
-
- /* get a list of extensions that the server supports */
- camel_nntp_store_get_extensions (store, ex);
-
- /* try to get the overview.fmt */
- camel_nntp_store_get_overview_fmt (store, ex);
-
- return TRUE;
-}
-
-static gboolean
-nntp_store_disconnect (CamelService *service, gboolean clean, CamelException *ex)
-{
- CamelNNTPStore *store = CAMEL_NNTP_STORE (service);
-
- if (clean)
- camel_nntp_command (store, ex, NULL, "QUIT");
-
- if (store->newsrc)
- camel_nntp_newsrc_write (store->newsrc);
-
- if (!service_class->disconnect (service, clean, ex))
- return FALSE;
-
- return TRUE;
-}
-
-static char *
-nntp_store_get_name (CamelService *service, gboolean brief)
-{
- if (brief)
- return g_strdup_printf ("%s", service->url->host);
- else
- return g_strdup_printf (_("USENET News via %s"), service->url->host);
-
-}
-
-static CamelServiceAuthType password_authtype = {
- N_("Password"),
-
- N_("This option will authenticate with the NNTP server using a "
- "plaintext password."),
-
- "",
- TRUE
-};
-
-static GList *
-nntp_store_query_auth_types (CamelService *service, gboolean connect, CamelException *ex)
-{
- GList *prev;
-
- g_warning ("nntp::query_auth_types: not implemented. Defaulting.");
- prev = CAMEL_SERVICE_CLASS (remote_store_class)->query_auth_types (service, ex);
- return g_list_prepend (prev, &password_authtype);
-}
-
-static CamelFolder *
-nntp_store_get_folder (CamelStore *store, const gchar *folder_name,
- guint32 flags, CamelException *ex)
-{
- CamelNNTPStore *nntp_store = CAMEL_NNTP_STORE (store);
-
- printf ("get_folder called on folder_name=%s\n", folder_name);
-
- /* if we haven't already read our .newsrc, read it now */
- if (!nntp_store->newsrc)
- nntp_store->newsrc =
- camel_nntp_newsrc_read_for_server (CAMEL_SERVICE(store)->url->host);
-
- if (!nntp_store->newsrc) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
- _("Unable to open or create .newsrc file for %s: %s"),
- CAMEL_SERVICE(store)->url->host,
- strerror(errno));
- return NULL;
- }
-
- return camel_nntp_folder_new (store, folder_name, ex);
-}
-
-#ifdef INFO_AS_TREE
-static void
-build_folder_info (CamelNNTPStore *nntp_store, CamelFolderInfo **root,
- CamelFolderInfo *parent, CamelNNTPGroupListEntry *entry,
- char *prefix, char *suffix,
- GHashTable *name_to_info)
-{
- CamelURL *url = CAMEL_SERVICE (nntp_store)->url;
- char *dot;
- if ((dot = strchr (suffix, '.'))) {
- /* it's an internal node, figure out the next node in
- the chain */
- CamelFolderInfo *node;
- char *node_name, *node_full_name;
-
- node_name = g_malloc0 (dot - suffix + 1);
- strncpy (node_name, suffix, dot - suffix);
- node_full_name = g_strdup_printf ("%s.%s", prefix, node_name);
-
- node = g_hash_table_lookup (name_to_info, node_full_name);
- if (!node) {
- /* we need to add one */
- node = g_new0 (CamelFolderInfo, 1);
- node->name = g_strdup (node_name);
- node->full_name = g_strdup (node_full_name);
- node->url = NULL;
- node->unread_message_count = -1;
-
- if (parent) {
- if (parent->child) {
- node->sibling = parent->child;
- parent->child = node;
- }
- else {
- parent->child = node;
- }
- }
- else {
- if (*root) {
- *root = node;
- }
- else {
- node->sibling = *root;
- *root = node;
- }
- }
-
- g_hash_table_insert (name_to_info, node_full_name, node);
- }
-
- build_folder_info (nntp_store, root, node, entry, node_full_name, dot + 1, name_to_info);
- }
- else {
- /* it's a leaf node, make the CamelFolderInfo and
- append it to @parent's list of children. */
- CamelFolderInfo *new_group;
-
- new_group = g_new0 (CamelFolderInfo, 1);
- new_group->name = g_strdup (entry->group_name);
- new_group->full_name = g_strdup (entry->group_name);
- new_group->url = g_strdup_printf ("nntp://%s%s%s/%s",
- url->user ? url->user : "",
- url->user ? "@" : "",
- url->host, (char *)entry->group_name);
-
- new_group->unread_message_count = (entry->high - entry->low -
- camel_nntp_newsrc_get_num_articles_read (nntp_store->newsrc, entry->group_name));
-
- if (parent) {
- if (parent->child) {
- new_group->sibling = parent->child;
- parent->child = new_group;
- }
- else {
- parent->child = new_group;
- }
- }
- else {
- if (*root) {
- *root = new_group;
- }
- else {
- new_group->sibling = *root;
- *root = new_group;
- }
- }
- }
-}
-#endif
-
-static CamelFolderInfo *
-build_folder_info_from_grouplist (CamelNNTPStore *nntp_store, const char *top)
-{
- GList *g;
- CamelFolderInfo *groups = NULL;
-#ifdef INFO_AS_TREE
- GHashTable *hash = g_hash_table_new (g_str_hash, g_str_equal);
-#else
- CamelFolderInfo *last = NULL, *fi;
- CamelURL *url = CAMEL_SERVICE (nntp_store)->url;
-#endif
-
- for (g = nntp_store->group_list->group_list; g; g = g_list_next (g)) {
- CamelNNTPGroupListEntry *entry = g->data;
-
- if (!top || !strncmp (top, entry->group_name, strlen (top))) {
-#ifdef INFO_AS_TREE
- build_folder_info (nntp_store, &groups, NULL, entry,
- "", entry->group_name, hash);
-#else
-
- fi = g_new0 (CamelFolderInfo, 1);
- fi->name = g_strdup (entry->group_name);
- fi->full_name = g_strdup (entry->group_name);
- fi->url = g_strdup_printf ("nntp://%s%s%s/%s",
- url->user ? url->user : "",
- url->user ? "@" : "",
- url->host, (char *)entry->group_name);
-
- fi->unread_message_count = (entry->high - entry->low -
- camel_nntp_newsrc_get_num_articles_read (
- nntp_store->newsrc, entry->group_name));
-
- if (last)
- last->sibling = fi;
- else
- groups = fi;
- last = fi;
-#endif
- }
- }
-
- return groups;
-}
-
-static CamelFolderInfo *
-nntp_store_get_folder_info (CamelStore *store, const char *top,
- gboolean fast, gboolean recursive,
- gboolean subscribed_only,
- CamelException *ex)
-{
- CamelURL *url = CAMEL_SERVICE (store)->url;
- CamelNNTPStore *nntp_store = (CamelNNTPStore *)store;
- GPtrArray *names;
- CamelFolderInfo *groups = NULL, *last = NULL, *fi;
- int i;
-
- /* if we haven't already read our .newsrc, read it now */
- if (!nntp_store->newsrc)
- nntp_store->newsrc =
- camel_nntp_newsrc_read_for_server (CAMEL_SERVICE(store)->url->host);
-
- if (!nntp_store->newsrc) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
- _("Unable to open or create .newsrc file for %s: %s"),
- CAMEL_SERVICE(store)->url->host,
- strerror(errno));
- return NULL;
- }
-
- if (!subscribed_only) {
- if (!nntp_store->group_list)
- nntp_store->group_list = camel_nntp_grouplist_fetch (nntp_store, ex);
- if (camel_exception_is_set (ex)) {
- return NULL;
- }
- else {
- fi = build_folder_info_from_grouplist (nntp_store, top);
- return fi;
- }
- }
-
- if (top == NULL) {
- /* return the list of groups */
- names = camel_nntp_newsrc_get_subscribed_group_names (nntp_store->newsrc);
- for (i = 0; i < names->len; i++) {
- fi = g_new0 (CamelFolderInfo, 1);
- fi->name = g_strdup (names->pdata[i]);
- fi->full_name = g_strdup (names->pdata[i]);
- fi->url = g_strdup_printf ("nntp://%s%s%s/%s",
- url->user ? url->user : "",
- url->user ? "@" : "",
- url->host, (char *)names->pdata[i]);
- /* FIXME */
- fi->unread_message_count = -1;
-
- if (last)
- last->sibling = fi;
- else
- groups = fi;
- last = fi;
- }
- camel_nntp_newsrc_free_group_names (nntp_store->newsrc, names);
-
- return groups;
- }
- else {
- /* getting a specific group */
-
- fi = g_new0 (CamelFolderInfo, 1);
- fi->name = g_strdup (top);
- fi->full_name = g_strdup (top);
- fi->url = g_strdup_printf ("nntp://%s/%s", url->host, top);
- /* FIXME */
- fi->unread_message_count = -1;
-
- return fi;
- }
-}
-
-static gboolean
-nntp_store_folder_subscribed (CamelStore *store, const char *folder_name)
-{
- CamelNNTPStore *nntp_store = CAMEL_NNTP_STORE (store);
-
- return camel_nntp_newsrc_group_is_subscribed (nntp_store->newsrc, folder_name);
-}
-
-static void
-nntp_store_subscribe_folder (CamelStore *store, const char *folder_name,
- CamelException *ex)
-{
- CamelNNTPStore *nntp_store = CAMEL_NNTP_STORE (store);
-
- camel_nntp_newsrc_subscribe_group (nntp_store->newsrc, folder_name);
-}
-
-static void
-nntp_store_unsubscribe_folder (CamelStore *store, const char *folder_name,
- CamelException *ex)
-{
- CamelNNTPStore *nntp_store = CAMEL_NNTP_STORE (store);
-
- camel_nntp_newsrc_unsubscribe_group (nntp_store->newsrc, folder_name);
-}
-
-static void
-finalize (CamelObject *object)
-{
- CamelNNTPStore *nntp_store = CAMEL_NNTP_STORE (object);
- if (nntp_store->newsrc)
- camel_nntp_newsrc_write (nntp_store->newsrc);
-}
-
-static void
-camel_nntp_store_class_init (CamelNNTPStoreClass *camel_nntp_store_class)
-{
- CamelStoreClass *camel_store_class = CAMEL_STORE_CLASS (camel_nntp_store_class);
- CamelServiceClass *camel_service_class = CAMEL_SERVICE_CLASS (camel_nntp_store_class);
-
- remote_store_class = CAMEL_REMOTE_STORE_CLASS(camel_type_get_global_classfuncs
- (camel_remote_store_get_type ()));
-
- service_class = CAMEL_SERVICE_CLASS (camel_type_get_global_classfuncs (camel_service_get_type ()));
-
- /* virtual method overload */
- camel_service_class->connect = nntp_store_connect;
- camel_service_class->disconnect = nntp_store_disconnect;
- camel_service_class->query_auth_types = nntp_store_query_auth_types;
- camel_service_class->get_name = nntp_store_get_name;
-
- camel_store_class->get_folder = nntp_store_get_folder;
- camel_store_class->get_folder_info = nntp_store_get_folder_info;
- camel_store_class->free_folder_info = camel_store_free_folder_info_full;
-
- camel_store_class->folder_subscribed = nntp_store_folder_subscribed;
- camel_store_class->subscribe_folder = nntp_store_subscribe_folder;
- camel_store_class->unsubscribe_folder = nntp_store_unsubscribe_folder;
-}
-
-
-
-static void
-camel_nntp_store_init (gpointer object, gpointer klass)
-{
- CamelRemoteStore *remote_store = CAMEL_REMOTE_STORE (object);
- CamelStore *store = CAMEL_STORE (object);
-
- remote_store->default_port = NNTP_PORT;
-
- store->flags = CAMEL_STORE_SUBSCRIPTIONS;
-}
-
-CamelType
-camel_nntp_store_get_type (void)
-{
- static CamelType camel_nntp_store_type = CAMEL_INVALID_TYPE;
-
- if (camel_nntp_store_type == CAMEL_INVALID_TYPE) {
- camel_nntp_store_type = camel_type_register (CAMEL_REMOTE_STORE_TYPE, "CamelNNTPStore",
- sizeof (CamelNNTPStore),
- sizeof (CamelNNTPStoreClass),
- (CamelObjectClassInitFunc) camel_nntp_store_class_init,
- NULL,
- (CamelObjectInitFunc) camel_nntp_store_init,
- (CamelObjectFinalizeFunc) finalize);
- }
-
- return camel_nntp_store_type;
-}
-
-
-/**
- * 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: the response code of the nntp command.
- **/
-static int
-camel_nntp_command_send_recv (CamelNNTPStore *store, CamelException *ex, char **ret, char *cmd)
-{
- char *respbuf;
- int resp_code;
- gboolean again;
-
- do {
- again = FALSE;
-
- /* Send the command */
- if (camel_remote_store_send_string (CAMEL_REMOTE_STORE (store), ex, cmd) < 0) {
- return NNTP_PROTOCOL_ERROR;
- }
-
- /* Read the response */
- if (camel_remote_store_recv_line (CAMEL_REMOTE_STORE (store), &respbuf, ex) < 0) {
- if (ret)
- *ret = g_strdup (g_strerror (errno));
- return NNTP_PROTOCOL_ERROR;
- }
-
- resp_code = atoi (respbuf);
-
- /* this is kind of a gross hack, but since an auth challenge
- can pop up at any time, and we want to shield this from our
- callers, we handle authentication here. */
- if (resp_code == NNTP_AUTH_REQUIRED) {
- resp_code = camel_nntp_auth_authenticate (store, ex);
- if (resp_code != NNTP_AUTH_ACCEPTED) {
- return resp_code;
- }
-
- /* need to resend our command here */
- again = TRUE;
- }
- } while (again);
-
- if (ret) {
- *ret = strchr (respbuf, ' ');
- if (*ret)
- *ret = g_strdup (*ret + 1);
- }
- g_free (respbuf);
-
- return resp_code;
-}
-
-int
-camel_nntp_command (CamelNNTPStore *store, CamelException *ex, char **ret, char *fmt, ...)
-{
- char *cmdbuf;
- va_list ap;
- int resp_code;
- char *real_fmt;
-
- real_fmt = g_strdup_printf ("%s\r\n", fmt);
-
- va_start (ap, fmt);
- cmdbuf = g_strdup_vprintf (real_fmt, ap);
- va_end (ap);
-
- g_free (real_fmt);
-
- resp_code = camel_nntp_command_send_recv (store, ex, ret, cmdbuf);
-
- g_free (cmdbuf);
-
- return resp_code;
-}
-
-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();
-
- if (camel_exception_get_id (ex)) {
- g_free (root_dir);
- camel_exception_free (ex);
- return;
- }
-
- if (camel_nntp_command ( CAMEL_NNTP_STORE (store),
- ex, &ret, "GROUP %s", group_name) == NNTP_GROUP_SELECTED) {
- /* 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 *top_dir;
-
- g_assert(url != NULL);
-
- top_dir = g_strdup_printf( "%s/evolution/news/%s",
- g_get_home_dir (),
- url->host );
-
- return top_dir;
-}
-
-static gboolean
-ensure_news_dir_exists (CamelNNTPStore *store)
-{
- gchar *dir = camel_nntp_store_get_toplevel_dir (store);
-
- if (access (dir, F_OK) == 0) {
- g_free (dir);
- return TRUE;
- }
-
- if (e_mkdir_hier (dir, S_IRWXU) == -1) {
- g_free (dir);
- return FALSE;
- }
-
- return TRUE;
-}
diff --git a/camel/providers/nntp/camel-nntp-store.h b/camel/providers/nntp/camel-nntp-store.h
deleted file mode 100644
index d7836f47ae..0000000000
--- a/camel/providers/nntp/camel-nntp-store.h
+++ /dev/null
@@ -1,113 +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. <toshok@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_NNTP_STORE_H
-#define CAMEL_NNTP_STORE_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include "camel-remote-store.h"
-#include "camel-nntp-newsrc.h"
-#include "camel-nntp-types.h"
-
-#define CAMEL_NNTP_STORE_TYPE (camel_nntp_store_get_type ())
-#define CAMEL_NNTP_STORE(obj) (CAMEL_CHECK_CAST((obj), CAMEL_NNTP_STORE_TYPE, CamelNNTPStore))
-#define CAMEL_NNTP_STORE_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_NNTP_STORE_TYPE, CamelNNTPStoreClass))
-#define CAMEL_IS_NNTP_STORE(o) (CAMEL_CHECK_TYPE((o), CAMEL_NNTP_STORE_TYPE))
-
-
-enum {
- CAMEL_NNTP_OVER_FROM,
- CAMEL_NNTP_OVER_SUBJECT,
- CAMEL_NNTP_OVER_DATE,
- CAMEL_NNTP_OVER_MESSAGE_ID,
- CAMEL_NNTP_OVER_REFERENCES,
- CAMEL_NNTP_OVER_BYTES,
-
- CAMEL_NNTP_OVER_LAST
-};
-
-struct CamelNNTPOverField {
- int index;
- gboolean full; /* full in the OVER sense - the field name
- precedes the ':' in the XOVER list. */
-};
-
-struct CamelNNTPStore {
- CamelRemoteStore parent_object;
-
-#define CAMEL_NNTP_EXT_SEARCH (1<<0)
-#define CAMEL_NNTP_EXT_SETGET (1<<1)
-#define CAMEL_NNTP_EXT_OVER (1<<2)
-#define CAMEL_NNTP_EXT_XPATTEXT (1<<3)
-#define CAMEL_NNTP_EXT_XACTIVE (1<<4)
-#define CAMEL_NNTP_EXT_LISTMOTD (1<<5)
-#define CAMEL_NNTP_EXT_LISTSUBSCR (1<<6)
-#define CAMEL_NNTP_EXT_LISTPNAMES (1<<7)
- guint32 extensions;
-
- gboolean posting_allowed;
-
- int num_overview_fields;
- CamelNNTPOverField overview_field[ CAMEL_NNTP_OVER_LAST ];
-
- CamelNNTPNewsrc *newsrc;
- CamelNNTPGroupList *group_list;
-
-};
-
-struct CamelNNTPStoreClass {
- CamelRemoteStoreClass parent_class;
-
-};
-
-
-/* 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 */
-int camel_nntp_command (CamelNNTPStore *store, CamelException *ex, char **ret, char *fmt, ...);
-
-/* Standard Camel function */
-CamelType camel_nntp_store_get_type (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* CAMEL_NNTP_STORE_H */
-
-
diff --git a/camel/providers/nntp/camel-nntp-types.h b/camel/providers/nntp/camel-nntp-types.h
deleted file mode 100644
index b1d91779b1..0000000000
--- a/camel/providers/nntp/camel-nntp-types.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-nntp-grouplist.h : getting/updating the list of newsgroups on the server. */
-
-/*
- * Author : Chris Toshok <toshok@helixcode.com>
- *
- * 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_TYPES_H
-#define CAMEL_NNTP_TYPES_H 1
-
-typedef struct CamelNNTPGroupList CamelNNTPGroupList;
-typedef struct CamelNNTPGroupListEntry CamelNNTPGroupListEntry;
-typedef struct CamelNNTPOverField CamelNNTPOverField;
-typedef struct CamelNNTPStore CamelNNTPStore;
-typedef struct CamelNNTPStoreClass CamelNNTPStoreClass;
-
-#endif /* CAMEL_NNTP_TYPES_H */
diff --git a/camel/providers/nntp/camel-nntp-utils.c b/camel/providers/nntp/camel-nntp-utils.c
deleted file mode 100644
index 439626d977..0000000000
--- a/camel/providers/nntp/camel-nntp-utils.c
+++ /dev/null
@@ -1,256 +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 <toshok@helixcode.com>
- *
- * 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-resp-codes.h"
-#include "camel-nntp-folder.h"
-#include "camel-nntp-store.h"
-#include "camel-nntp-utils.h"
-#include "camel-stream-mem.h"
-#include "camel-exception.h"
-
-#include "e-util/md5-utils.h"
-
-#include <stdlib.h>
-#include <string.h>
-
-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);
- char digest[16];
-
- status = camel_nntp_command (nntp_store, ex, NULL,
- "XOVER %d-%d",
- first_message,
- last_message);
-
- if (status == NNTP_DATA_FOLLOWS) {
- gboolean done = FALSE;
-
- while (!done) {
- char *line;
-
- if (camel_remote_store_recv_line (CAMEL_REMOTE_STORE (nntp_store), &line, ex) < 0) {
- g_warning ("failed to recv_line while building OVER header list\n");
- break;
- }
-
- if (*line == '.') {
- done = TRUE;
- g_print ("done\n");
- }
- else {
- CamelMessageInfo *new_info = camel_folder_summary_info_new(nntp_folder->summary);
- char **split_line = g_strsplit (line, "\t", 7);
- char *subject, *from, *date, *message_id, *bytes;
- char *uid;
-
- subject = split_line [nntp_store->overview_field [CAMEL_NNTP_OVER_SUBJECT].index];
- from = split_line [nntp_store->overview_field [CAMEL_NNTP_OVER_FROM].index];
- date = split_line [nntp_store->overview_field [CAMEL_NNTP_OVER_DATE].index];
- message_id = split_line [nntp_store->overview_field [CAMEL_NNTP_OVER_MESSAGE_ID].index];
- bytes = split_line [nntp_store->overview_field [CAMEL_NNTP_OVER_BYTES].index];
-
- /* if the overview format flagged this
- field as "full", skip over the
- preceding field name and colon */
- if (nntp_store->overview_field [ CAMEL_NNTP_OVER_SUBJECT ].full)
- subject += strlen ("Subject:");
- if (nntp_store->overview_field [ CAMEL_NNTP_OVER_FROM ].full)
- from += strlen ("From:");
- if (nntp_store->overview_field [ CAMEL_NNTP_OVER_DATE ].full)
- date += strlen ("Date:");
- if (nntp_store->overview_field [ CAMEL_NNTP_OVER_MESSAGE_ID ].full)
- message_id += strlen ("Message-ID:");
- if (nntp_store->overview_field [ CAMEL_NNTP_OVER_BYTES ].full)
- bytes += strlen ("Bytes:");
-
- uid = g_strdup_printf ("%s,%s", split_line[0], message_id);
- camel_message_info_set_subject(new_info, g_strdup(subject));
- camel_message_info_set_from(new_info, g_strdup(from));
- camel_message_info_set_to(new_info, g_strdup(folder->name));
- camel_message_info_set_uid(new_info, uid);
-
- new_info->date_sent = header_decode_date(date, NULL);
-#if 0
- /* XXX do we need to fill in both dates? */
- new_info->headers.date_received = g_strdup(date);
-#endif
- new_info->size = atoi(bytes);
- md5_get_digest(message_id, strlen(message_id), digest);
- memcpy(new_info->message_id.id.hash, digest, sizeof(new_info->message_id.id.hash));
-
- if (camel_nntp_newsrc_article_is_read (nntp_store->newsrc,
- folder->name,
- atoi (split_line[0])))
- new_info->flags |= CAMEL_MESSAGE_SEEN;
-
- camel_folder_summary_add (nntp_folder->summary, new_info);
- g_strfreev (split_line);
- }
- g_free (line);
- }
- }
- else {
- /* XXX */
- g_warning ("weird nntp response for XOVER: %d\n", status);
- }
-}
-
-#if 0
-static GArray*
-get_HEAD_headers(CamelNNTPStore *nntp_store, CamelFolder *folder,
- int first_message, int last_message, CamelException *ex)
-{
- int i;
- int status;
-
- for (i = first_message; i < last_message; i ++) {
- status = camel_nntp_command (nntp_store, ex, NULL,
- "HEAD %d", i);
-
- if (status == NNTP_HEAD_FOLLOWS) {
- gboolean done = FALSE;
- char *buf;
- int buf_len;
- int buf_alloc;
- int h;
- CamelStream *header_stream;
- GArray *header_array;
- CamelStream *nntp_istream;
- CamelMessageInfo *new_info = g_new0(CamelMessageInfo, 1);
-
- buf_alloc = 2048;
- buf_len = 0;
- buf = g_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 = g_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"))
- new_info->from = g_strdup(header->value);
- else if (!g_strcasecmp(header->name, "To"))
- new_info->to = g_strdup(header->value);
- else if (!g_strcasecmp(header->name, "Subject"))
- new_info->subject = g_strdup(header->value);
- else if (!g_strcasecmp(header->name, "Message-ID")) {
- new_info->uid = g_strdup_printf("%d,%s", i, header->value);
- new_info->message_id = g_strdup(header->value);
- }
- else if (!g_strcasecmp(header->name, "Date")) {
- new_info->date_sent = header_decode_date (header->value);
-#if 0
- new_info->date_sent = g_strdup(header->value);
- new_info->date_received = g_strdup(header->value);
-#endif
- }
- }
-
- camel_folder_summary_add (nntp_folder->summary, new_info);
- }
- else if (status == CAMEL_NNTP_FAIL) {
- /* nasty things are afoot */
- g_warning ("failure doing HEAD\n");
- break;
- }
- }
-}
-#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, ex, &ret,
- "GROUP %s", folder->name);
-
- sscanf (ret, "%d %d %d", &nb_message, &first_message, &last_message);
- g_free (ret);
-
- if (status == NNTP_NO_SUCH_GROUP) {
- /* XXX throw invalid group exception */
- camel_exception_setv (ex,
- CAMEL_EXCEPTION_FOLDER_INVALID,
- "group %s not found on server",
- folder->name);
- return;
- }
-
-
- if (nntp_store->extensions & CAMEL_NNTP_EXT_OVER) {
- get_XOVER_headers (nntp_store, folder, first_message, last_message, ex);
- }
- else {
- g_warning ("need to fix get_HEAD_headers\n");
-#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 <toshok@helixcode.com>
- *
- * 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/nntp/test-newsrc.c b/camel/providers/nntp/test-newsrc.c
deleted file mode 100644
index c4b985e565..0000000000
--- a/camel/providers/nntp/test-newsrc.c
+++ /dev/null
@@ -1,10 +0,0 @@
-#include <stdio.h>
-#include <glib.h>
-#include "camel-nntp-newsrc.h"
-
-int
-main(int argc, char *argv[])
-{
- CamelNNTPNewsrc *newsrc = camel_nntp_newsrc_read_for_server (argv[1]);
- camel_nntp_newsrc_write_to_file (newsrc, stdout);
-}
diff --git a/camel/providers/pop3/.cvsignore b/camel/providers/pop3/.cvsignore
deleted file mode 100644
index ddf4c8b28d..0000000000
--- a/camel/providers/pop3/.cvsignore
+++ /dev/null
@@ -1,10 +0,0 @@
-Makefile
-Makefile.in
-.libs
-.deps
-*.lo
-*.la
-*.bb
-*.bbg
-*.da
-*.gcov
diff --git a/camel/providers/pop3/Makefile.am b/camel/providers/pop3/Makefile.am
deleted file mode 100644
index 57fb938d89..0000000000
--- a/camel/providers/pop3/Makefile.am
+++ /dev/null
@@ -1,37 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-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 \
- -I$(top_srcdir)/camel \
- -I$(top_srcdir)/e-util \
- $(GNOME_INCLUDEDIR) \
- $(KRB4_CFLAGS) \
- $(GTK_INCLUDEDIR) \
- -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
-
-libcamelpop3_la_LIBADD = $(top_builddir)/e-util/libeutil.la $(UNICODE_LIBS)
-
-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 96b5471828..0000000000
--- a/camel/providers/pop3/camel-pop3-folder.c
+++ /dev/null
@@ -1,357 +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 <danw@helixcode.com>
- *
- * 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "camel-pop3-folder.h"
-#include "camel-pop3-store.h"
-#include "camel-exception.h"
-#include "camel-stream-mem.h"
-#include "camel-stream-filter.h"
-#include "camel-mime-message.h"
-#include "camel-operation.h"
-
-#include <stdlib.h>
-#include <string.h>
-
-#define CF_CLASS(o) (CAMEL_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS(o)))
-static CamelFolderClass *parent_class;
-
-static void pop3_finalize (CamelObject *object);
-
-static void pop3_refresh_info (CamelFolder *folder, CamelException *ex);
-static void pop3_sync (CamelFolder *folder, gboolean expunge,
- CamelException *ex);
-
-static gint pop3_get_message_count (CamelFolder *folder);
-static GPtrArray *pop3_get_uids (CamelFolder *folder);
-static CamelMimeMessage *pop3_get_message (CamelFolder *folder,
- const char *uid,
- CamelException *ex);
-static void pop3_set_message_flags (CamelFolder *folder, const char *uid,
- guint32 flags, guint32 set);
-
-static GPtrArray *parse_listing (int count, char *data);
-
-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 = CAMEL_FOLDER_CLASS(camel_type_get_global_classfuncs (camel_folder_get_type ()));
-
- /* virtual method overload */
- camel_folder_class->refresh_info = pop3_refresh_info;
- camel_folder_class->sync = pop3_sync;
-
- camel_folder_class->get_message_count = pop3_get_message_count;
- camel_folder_class->get_uids = pop3_get_uids;
- camel_folder_class->free_uids = camel_folder_free_nop;
-
- camel_folder_class->get_message = pop3_get_message;
- camel_folder_class->set_message_flags = pop3_set_message_flags;
-}
-
-static void
-camel_pop3_folder_init (gpointer object)
-{
- CamelFolder *folder = CAMEL_FOLDER (object);
- CamelPop3Folder *pop3_folder = CAMEL_POP3_FOLDER (object);
-
- folder->has_summary_capability = FALSE;
- folder->has_search_capability = FALSE;
-
- pop3_folder->uids = NULL;
- pop3_folder->flags = NULL;
-}
-
-CamelType
-camel_pop3_folder_get_type (void)
-{
- static CamelType camel_pop3_folder_type = CAMEL_INVALID_TYPE;
-
- if (!camel_pop3_folder_type) {
- camel_pop3_folder_type = camel_type_register (CAMEL_FOLDER_TYPE, "CamelPop3Folder",
- sizeof (CamelPop3Folder),
- sizeof (CamelPop3FolderClass),
- (CamelObjectClassInitFunc) camel_pop3_folder_class_init,
- NULL,
- (CamelObjectInitFunc) camel_pop3_folder_init,
- (CamelObjectFinalizeFunc) pop3_finalize);
- }
-
- return camel_pop3_folder_type;
-}
-
-void
-pop3_finalize (CamelObject *object)
-{
- CamelPop3Folder *pop3_folder = CAMEL_POP3_FOLDER (object);
-
- if (pop3_folder->uids)
- camel_folder_free_deep (NULL, pop3_folder->uids);
- if (pop3_folder->flags)
- g_free (pop3_folder->flags);
-}
-
-CamelFolder *
-camel_pop3_folder_new (CamelStore *parent, CamelException *ex)
-{
- CamelFolder *folder;
-
- folder = CAMEL_FOLDER (camel_object_new (CAMEL_POP3_FOLDER_TYPE));
- camel_folder_construct (folder, parent, "inbox", "inbox");
-
- /* mt-ok, since we dont have the folder-lock for new() */
- camel_folder_refresh_info (folder, ex);/* mt-ok */
- if (camel_exception_is_set (ex)) {
- camel_object_unref (CAMEL_OBJECT (folder));
- folder = NULL;
- }
-
- return folder;
-}
-
-static void
-pop3_refresh_info (CamelFolder *folder, CamelException *ex)
-{
- GPtrArray *uids;
- int status, count;
- char *data;
- CamelPop3Folder *pop3_folder = (CamelPop3Folder *) folder;
- CamelPop3Store *pop3_store = CAMEL_POP3_STORE (folder->parent_store);
-
- camel_operation_start(NULL, _("Retrieving POP summary"));
-
- status = camel_pop3_command (pop3_store, &data, ex, "STAT");
- if (status != CAMEL_POP3_OK) {
- camel_operation_end(NULL);
- return;
- }
-
- count = atoi (data);
- g_free (data);
-
- if (pop3_store->supports_uidl != FALSE) {
- status = camel_pop3_command (pop3_store, NULL, ex, "UIDL");
- switch (status) {
- case CAMEL_POP3_ERR:
- pop3_store->supports_uidl = FALSE;
- break;
- case CAMEL_POP3_FAIL:
- camel_operation_end(NULL);
- return;
- }
- }
-
- if (pop3_store->supports_uidl == FALSE) {
- int i;
-
- uids = g_ptr_array_new ();
- g_ptr_array_set_size (uids, count);
-
- for (i = 0; i < count; i++)
- uids->pdata[i] = g_strdup_printf ("%d", i + 1);
- camel_operation_end(NULL);
- } else {
- data = camel_pop3_command_get_additional_data (pop3_store, 0, ex);
- camel_operation_end(NULL);
- if (camel_exception_is_set (ex))
- return;
-
- uids = parse_listing (count, data);
- g_free (data);
-
- if (!uids) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not open folder: "
- "message listing was "
- "incomplete."));
- return;
- }
- }
-
- pop3_folder->uids = uids;
- pop3_folder->flags = g_new0 (guint32, uids->len);
-}
-
-static void
-pop3_sync (CamelFolder *folder, gboolean expunge, CamelException *ex)
-{
- CamelPop3Folder *pop3_folder;
- CamelPop3Store *pop3_store;
- int i, status;
-
- if (!expunge)
- return;
-
- pop3_folder = CAMEL_POP3_FOLDER (folder);
- pop3_store = CAMEL_POP3_STORE (folder->parent_store);
-
- for (i = 0; i < pop3_folder->uids->len; i++) {
- if (pop3_folder->flags[i] & CAMEL_MESSAGE_DELETED) {
- status = camel_pop3_command (pop3_store, NULL, ex,
- "DELE %d", i + 1);
- if (status != CAMEL_POP3_OK)
- return;
- }
- }
-
- camel_pop3_store_expunge (pop3_store, ex);
-}
-
-
-static GPtrArray *
-parse_listing (int count, char *data)
-{
- GPtrArray *ans;
- char *p;
- int index, len;
-
- ans = g_ptr_array_new ();
- g_ptr_array_set_size (ans, count);
-
- p = data;
- while (*p) {
- index = strtoul (p, &p, 10);
- len = strcspn (p, "\n");
- if (index <= count && *p == ' ')
- ans->pdata[index - 1] = g_strndup (p + 1, len - 1);
- p += len;
- if (*p == '\n')
- p++;
- }
-
- for (index = 0; index < count; index++) {
- if (ans->pdata[index] == NULL) {
- g_ptr_array_free (ans, TRUE);
- return NULL;
- }
- }
-
- return ans;
-}
-
-static int
-uid_to_number (CamelPop3Folder *pop3_folder, const char *uid)
-{
- int i;
-
- for (i = 0; i < pop3_folder->uids->len; i++) {
- if (!strcmp (uid, pop3_folder->uids->pdata[i]))
- return i + 1;
- }
-
- return -1;
-}
-
-
-static CamelMimeMessage *
-pop3_get_message (CamelFolder *folder, const char *uid, CamelException *ex)
-{
- int status, num, total;
- char *result, *body;
- CamelStream *msgstream;
- CamelMimeMessage *msg;
-
- num = uid_to_number (CAMEL_POP3_FOLDER (folder), uid);
- if (num == -1) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_FOLDER_INVALID_UID,
- _("No message with uid %s"), uid);
- return NULL;
- }
-
- camel_operation_start_transient(NULL, _("Retrieving POP message %d"), num);
-
- status = camel_pop3_command (CAMEL_POP3_STORE (folder->parent_store),
- &result, ex, "RETR %d", num);
- if (status != CAMEL_POP3_OK) {
- camel_operation_end(NULL);
- return NULL;
- }
-
- /* this should be "nnn octets" ? */
- if (result && sscanf (result, "%d", &total) != 1)
- total = 0;
-
- g_free (result);
- body = camel_pop3_command_get_additional_data (CAMEL_POP3_STORE (folder->parent_store), total, 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));
- camel_operation_end(NULL);
- return NULL;
- }
-
- msgstream = camel_stream_mem_new_with_buffer (body, strlen (body));
- g_free (body);
-
- msg = camel_mime_message_new ();
- camel_data_wrapper_construct_from_stream (CAMEL_DATA_WRAPPER (msg),
- CAMEL_STREAM (msgstream));
-
- camel_object_unref (CAMEL_OBJECT (msgstream));
-
- camel_operation_end(NULL);
-
- return msg;
-}
-
-static void
-pop3_set_message_flags (CamelFolder *folder, const char *uid,
- guint32 flags, guint32 set)
-{
- CamelPop3Folder *pop3_folder = CAMEL_POP3_FOLDER (folder);
- int num;
-
- num = uid_to_number (pop3_folder, uid);
- if (num == -1)
- return;
-
- pop3_folder->flags[num - 1] =
- (pop3_folder->flags[num] & ~flags) | (set & flags);
-}
-
-static gint
-pop3_get_message_count (CamelFolder *folder)
-{
- CamelPop3Folder *pop3_folder = CAMEL_POP3_FOLDER (folder);
-
- return pop3_folder->uids->len;
-}
-
-static GPtrArray *
-pop3_get_uids (CamelFolder *folder)
-{
- CamelPop3Folder *pop3_folder = CAMEL_POP3_FOLDER (folder);
-
- return pop3_folder->uids;
-}
diff --git a/camel/providers/pop3/camel-pop3-folder.h b/camel/providers/pop3/camel-pop3-folder.h
deleted file mode 100644
index 278cd0e8e9..0000000000
--- a/camel/providers/pop3/camel-pop3-folder.h
+++ /dev/null
@@ -1,72 +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 <danw@helixcode.com>
- *
- * 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 "camel-folder.h"
-
-#define CAMEL_POP3_FOLDER_TYPE (camel_pop3_folder_get_type ())
-#define CAMEL_POP3_FOLDER(obj) (CAMEL_CHECK_CAST((obj), CAMEL_POP3_FOLDER_TYPE, CamelPop3Folder))
-#define CAMEL_POP3_FOLDER_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_POP3_FOLDER_TYPE, CamelPop3FolderClass))
-#define CAMEL_IS_POP3_FOLDER(o) (CAMEL_CHECK_TYPE((o), CAMEL_POP3_FOLDER_TYPE))
-
-
-typedef struct {
- CamelFolder parent_object;
-
- GPtrArray *uids;
- guint32 *flags;
-
-} CamelPop3Folder;
-
-
-
-typedef struct {
- CamelFolderClass parent_class;
-
- /* Virtual methods */
-
-} CamelPop3FolderClass;
-
-
-/* public methods */
-CamelFolder *camel_pop3_folder_new (CamelStore *parent, CamelException *ex);
-
-/* Standard Camel function */
-CamelType 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 0931f903ed..0000000000
--- a/camel/providers/pop3/camel-pop3-provider.c
+++ /dev/null
@@ -1,113 +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 <danw@helixcode.com>
- *
- * 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "camel-pop3-store.h"
-#include "camel-provider.h"
-#include "camel-session.h"
-#include "camel-url.h"
-
-CamelProviderConfEntry pop3_conf_entries[] = {
- { CAMEL_PROVIDER_CONF_SECTION_START, NULL, NULL,
- N_("Message storage") },
- { CAMEL_PROVIDER_CONF_CHECKBOX, "keep_on_server", NULL,
- N_("Leave messages on server"), "0" },
- { CAMEL_PROVIDER_CONF_CHECKSPIN, "delete_after", "UNIMPLEMENTED",
- N_("Delete after %s day(s)"), "0:1:7:365" },
- { CAMEL_PROVIDER_CONF_SECTION_END },
- { CAMEL_PROVIDER_CONF_END }
-};
-
-static CamelProvider pop3_provider = {
- "pop",
- N_("POP"),
-
- N_("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 | CAMEL_PROVIDER_IS_SOURCE |
- CAMEL_PROVIDER_SUPPORTS_SSL,
-
- CAMEL_URL_NEED_USER | CAMEL_URL_NEED_HOST | CAMEL_URL_ALLOW_AUTH,
-
- pop3_conf_entries,
-
- /* ... */
-};
-
-CamelServiceAuthType camel_pop3_password_authtype = {
- N_("Password"),
-
- N_("This option will connect to the POP server using a plaintext "
- "password. This is the only option supported by many POP servers."),
-
- "",
- TRUE
-};
-
-CamelServiceAuthType camel_pop3_apop_authtype = {
- "APOP",
-
- N_("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
-CamelServiceAuthType camel_pop3_kpop_authtype = {
- "Kerberos 4 (KPOP)",
-
- N_("This will connect to the POP server and use Kerberos 4 "
- "to authenticate to it."),
-
- "+KPOP",
- FALSE
-};
-#endif
-
-void
-camel_provider_module_init (CamelSession *session)
-{
- pop3_provider.object_types[CAMEL_PROVIDER_STORE] =
- camel_pop3_store_get_type ();
- pop3_provider.service_cache = g_hash_table_new (camel_url_hash, camel_url_equal);
-
-#ifdef HAVE_KRB4
- pop3_provider.authtypes = g_list_prepend (camel_remote_store_authtype_list (), &camel_pop3_kpop_authtype);
-#endif
- pop3_provider.authtypes = g_list_prepend (pop3_provider.authtypes, &camel_pop3_apop_authtype);
- pop3_provider.authtypes = g_list_prepend (pop3_provider.authtypes, &camel_pop3_password_authtype);
-
- 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 c1cb5e1060..0000000000
--- a/camel/providers/pop3/camel-pop3-store.c
+++ /dev/null
@@ -1,648 +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 <danw@helixcode.com>
- *
- * 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <errno.h>
-
-#include "camel-operation.h"
-
-#ifdef HAVE_KRB4
-/* Specified nowhere */
-#define KPOP_PORT 1109
-
-#include <krb.h>
-/* MIT krb4 des.h #defines _. Sigh. We don't need it. */
-#undef _
-
-#ifdef NEED_KRB_SENDAUTH_PROTO
-extern int krb_sendauth(long options, int fd, KTEXT ticket, char *service,
- char *inst, char *realm, unsigned KRB4_32 checksum,
- MSG_DAT *msg_data, CREDENTIALS *cred,
- Key_schedule schedule, struct sockaddr_in *laddr,
- struct sockaddr_in *faddr, char *version);
-#endif
-#endif
-
-#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 "e-util/md5-utils.h"
-
-/* Specified in RFC 1939 */
-#define POP3_PORT 110
-
-static CamelRemoteStoreClass *parent_class = NULL;
-
-static void finalize (CamelObject *object);
-
-static gboolean pop3_connect (CamelService *service, CamelException *ex);
-static gboolean pop3_disconnect (CamelService *service, gboolean clean, CamelException *ex);
-static GList *query_auth_types (CamelService *service, CamelException *ex);
-
-static CamelFolder *get_folder (CamelStore *store, const char *folder_name,
- guint32 flags, CamelException *ex);
-
-static void init_trash (CamelStore *store);
-static CamelFolder *get_trash (CamelStore *store, CamelException *ex);
-
-static int pop3_get_response (CamelPop3Store *store, char **ret, CamelException *ex);
-
-
-static void
-camel_pop3_store_class_init (CamelPop3StoreClass *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);
-
- parent_class = CAMEL_REMOTE_STORE_CLASS(camel_type_get_global_classfuncs
- (camel_remote_store_get_type ()));
-
- /* virtual method overload */
- camel_service_class->query_auth_types = query_auth_types;
- camel_service_class->connect = pop3_connect;
- camel_service_class->disconnect = pop3_disconnect;
-
- camel_store_class->get_folder = get_folder;
- camel_store_class->init_trash = init_trash;
- camel_store_class->get_trash = get_trash;
-}
-
-
-
-static void
-camel_pop3_store_init (gpointer object, gpointer klass)
-{
- CamelRemoteStore *remote_store = CAMEL_REMOTE_STORE (object);
-
- remote_store->default_port = 110;
- /* FIXME: what should this port be?? */
- remote_store->default_ssl_port = 995;
-}
-
-CamelType
-camel_pop3_store_get_type (void)
-{
- static CamelType camel_pop3_store_type = CAMEL_INVALID_TYPE;
-
- if (!camel_pop3_store_type) {
- camel_pop3_store_type = camel_type_register (CAMEL_REMOTE_STORE_TYPE, "CamelPop3Store",
- sizeof (CamelPop3Store),
- sizeof (CamelPop3StoreClass),
- (CamelObjectClassInitFunc) camel_pop3_store_class_init,
- NULL,
- (CamelObjectInitFunc) camel_pop3_store_init,
- finalize);
- }
-
- return camel_pop3_store_type;
-}
-
-static void
-finalize (CamelObject *object)
-{
- CamelPop3Store *pop3_store = CAMEL_POP3_STORE (object);
-
- if (pop3_store->apop_timestamp)
- g_free (pop3_store->apop_timestamp);
-}
-
-static gboolean
-connect_to_server (CamelService *service, CamelException *ex)
-{
- CamelPop3Store *store = CAMEL_POP3_STORE (service);
- char *buf, *apoptime, *apopend;
- int status;
- gboolean result;
-
-#ifdef HAVE_KRB4
- gboolean set_port = FALSE;
-
- kpop = (service->url->authmech &&
- !strcmp (service->url->authmech, "+KPOP"));
-
- if (kpop && service->url->port == 0) {
- set_port = TRUE;
- service->url->port = KPOP_PORT;
- }
-#endif
-
- result = CAMEL_SERVICE_CLASS (parent_class)->connect (service, ex);
-
-#ifdef HAVE_KRB4
- if (set_port)
- service->url->port = 0;
-#endif
-
- if (result == FALSE)
- return FALSE;
-
-#ifdef HAVE_KRB4
- if (kpop) {
- KTEXT_ST ticket_st;
- MSG_DAT msg_data;
- CREDENTIALS cred;
- Key_schedule schedule;
- char *hostname;
- struct hostent *h;
- int fd;
-
- /* Need to copy hostname, because krb_realmofhost will
- * call gethostbyname as well, and gethostbyname uses
- * static storage.
- * This isn't really necessary since gethost() returns a copy anyway,
- * but for simplicity leave the old code here - NZ
- */
- h = camel_service_gethost (service, ex);
- hostname = g_strdup (h->h_name);
- camel_free_host(h);
-
- fd = CAMEL_STREAM_FS (CAMEL_REMOTE_STORE (service)->ostream)->fd;
-
- 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) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
- _("Could not authenticate to "
- "KPOP server: %s"),
- krb_err_txt[status]);
- return FALSE;
- }
-
- if (!service->url->passwd)
- service->url->passwd = g_strdup (service->url->user);
- }
-#endif /* HAVE_KRB4 */
-
- /* Read the greeting, check status */
- status = pop3_get_response (store, &buf, ex);
- if (status != CAMEL_POP3_OK)
- return FALSE;
-
- if (buf) {
- apoptime = strchr (buf, '<');
- apopend = apoptime ? strchr (apoptime, '>') : NULL;
- if (apopend) {
- store->apop_timestamp =
- g_strndup (apoptime, apopend - apoptime + 1);
- memmove (apoptime, apopend + 1, strlen (apopend + 1));
- }
- store->implementation = buf;
- }
-
- /* Check extensions */
- store->login_delay = -1;
- store->supports_top = -1;
- store->supports_uidl = -1;
- store->expires = -1;
-
- status = camel_pop3_command (store, NULL, ex, "CAPA");
- if (status == CAMEL_POP3_OK) {
- char *p;
- int len;
-
- buf = camel_pop3_command_get_additional_data (store, 0, ex);
- if (camel_exception_is_set (ex))
- return FALSE;
-
- p = buf;
- while (*p) {
- len = strcspn (p, "\n");
- if (!strncmp (p, "IMPLEMENTATION ", 15)) {
- g_free (store->implementation);
- store->implementation =
- g_strndup (p + 15, len - 15);
- } else if (len == 3 && !strncmp (p, "TOP", 3))
- store->supports_top = TRUE;
- else if (len == 4 && !strncmp (p, "UIDL", 4))
- store->supports_uidl = TRUE;
- else if (!strncmp (p, "LOGIN-DELAY ", 12))
- store->login_delay = atoi (p + 12);
- else if (!strncmp (p, "EXPIRE NEVER", 12))
- store->expires = FALSE;
- else if (!strncmp (p, "EXPIRE ", 7))
- store->expires = TRUE;
-
- p += len;
- if (*p)
- p++;
- }
-
- g_free (buf);
- }
-
- return TRUE;
-}
-
-extern CamelServiceAuthType camel_pop3_password_authtype;
-extern CamelServiceAuthType camel_pop3_apop_authtype;
-#ifdef HAVE_KRB4
-extern CamelServiceAuthType camel_pop3_kpop_authtype;
-#endif
-
-static GList *
-query_auth_types (CamelService *service, CamelException *ex)
-{
- CamelPop3Store *store = CAMEL_POP3_STORE (service);
- GList *types = NULL;
- gboolean passwd = TRUE, apop = TRUE;
-
- types = CAMEL_SERVICE_CLASS (parent_class)->query_auth_types (service, ex);
- if (camel_exception_is_set (ex))
- return types;
-
- passwd = connect_to_server (service, NULL);
- apop = store->apop_timestamp != NULL;
- if (passwd)
- pop3_disconnect (service, TRUE, NULL);
-
-#ifdef HAVE_KRB4
- service->url->authtype = "+KPOP";
- kpop = connect_to_server (service, NULL);
- service->url->authtype = NULL;
- if (kpop)
- pop3_disconnect (service, TRUE, NULL);
-#endif
-
- if (passwd)
- types = g_list_append (types, &camel_pop3_password_authtype);
- if (apop)
- types = g_list_append (types, &camel_pop3_apop_authtype);
-#ifdef HAVE_KRB4
- if (kpop)
- types = g_list_append (types, &camel_pop3_kpop_authtype);
-#endif
-
- if (!types) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
- _("Could not connect to POP server on "
- "%s."), service->url->host);
- }
- return types;
-}
-
-/**
- * camel_pop3_store_expunge:
- * @store: the store
- * @ex: a CamelException
- *
- * Expunge messages from the store. This will result in the connection
- * being closed, which may cause later commands to fail if they can't
- * reconnect.
- **/
-void
-camel_pop3_store_expunge (CamelPop3Store *store, CamelException *ex)
-{
- camel_pop3_command (store, NULL, ex, "QUIT");
- camel_service_disconnect (CAMEL_SERVICE (store), FALSE, ex);
-}
-
-
-static gboolean
-pop3_try_authenticate (CamelService *service, gboolean kpop,
- const char *errmsg, CamelException *ex)
-{
- CamelPop3Store *store = (CamelPop3Store *)service;
- int status;
- char *msg;
-
- /* 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. So if there's no
- * password stored, query for it.
- */
- if (!service->url->passwd) {
- char *prompt;
-
- prompt = g_strdup_printf (_("%sPlease enter the POP3 password "
- "for %s@%s"), errmsg ? errmsg : "",
- service->url->user,
- service->url->host);
- service->url->passwd = camel_session_query_authenticator (
- camel_service_get_session (service),
- CAMEL_AUTHENTICATOR_ASK, prompt, TRUE,
- service, "password", ex);
- g_free (prompt);
- if (!service->url->passwd)
- return FALSE;
- }
-
- if (!service->url->authmech || kpop) {
- status = camel_pop3_command (store, &msg, ex, "USER %s",
- service->url->user);
- switch (status) {
- case CAMEL_POP3_ERR:
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
- _("Unable to connect to POP "
- "server.\nError sending "
- "username: %s"),
- msg ? msg : _("(Unknown)"));
- g_free (msg);
- /*fallll*/
- case CAMEL_POP3_FAIL:
- return FALSE;
- }
- g_free (msg);
-
- status = camel_pop3_command (store, &msg, ex, "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, ex, "APOP %s %s",
- service->url->user, md5asc);
- } else {
- camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
- _("Unable to connect to POP server.\n"
- "No support for requested "
- "authentication mechanism."));
- return FALSE;
- }
-
- if (status == CAMEL_POP3_ERR) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
- _("Unable to connect to POP server.\n"
- "Error sending password: %s"),
- msg ? msg : _("(Unknown)"));
- }
-
- g_free (msg);
- return status == CAMEL_POP3_ERR;
-}
-
-static gboolean
-pop3_connect (CamelService *service, CamelException *ex)
-{
- char *errbuf = NULL;
- gboolean tryagain, kpop = FALSE;
-
- if (!connect_to_server (service, ex))
- return FALSE;
-
- camel_exception_clear (ex);
- do {
- if (camel_exception_is_set (ex)) {
- errbuf = g_strdup_printf (
- "%s\n\n",
- camel_exception_get_description (ex));
- camel_exception_clear (ex);
-
- /* Uncache the password before prompting again. */
- camel_session_query_authenticator (
- camel_service_get_session (service),
- CAMEL_AUTHENTICATOR_TELL, NULL, TRUE, service,
- "password", ex);
- g_free (service->url->passwd);
- service->url->passwd = NULL;
- }
-
- tryagain = pop3_try_authenticate (service, kpop, errbuf, ex);
- g_free (errbuf);
- errbuf = NULL;
- } while (tryagain);
-
- if (camel_exception_is_set (ex)) {
- camel_service_disconnect (service, TRUE, ex);
- return FALSE;
- }
-
- return TRUE;
-}
-
-static gboolean
-pop3_disconnect (CamelService *service, gboolean clean, CamelException *ex)
-{
- CamelPop3Store *store = CAMEL_POP3_STORE (service);
-
- if (clean)
- camel_pop3_command (store, NULL, ex, "QUIT");
-
- if (!CAMEL_SERVICE_CLASS (parent_class)->disconnect (service, clean, ex))
- return FALSE;
-
- return TRUE;
-}
-
-static CamelFolder *
-get_folder (CamelStore *store, const char *folder_name,
- guint32 flags, CamelException *ex)
-{
- if (g_strcasecmp (folder_name, "inbox") != 0) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_FOLDER_INVALID,
- _("No such folder `%s'."), folder_name);
- return NULL;
- }
- return camel_pop3_folder_new (store, ex);
-}
-
-static void
-init_trash (CamelStore *store)
-{
- /* no-op */
- ;
-}
-
-static CamelFolder *
-get_trash (CamelStore *store, CamelException *ex)
-{
- /* no-op */
- return NULL;
-}
-
-
-/**
- * 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, CamelException *ex, char *fmt, ...)
-{
- char *cmdbuf;
- va_list ap;
-
- va_start (ap, fmt);
- cmdbuf = g_strdup_vprintf (fmt, ap);
- va_end (ap);
-
- /* Send the command */
- if (camel_remote_store_send_string (CAMEL_REMOTE_STORE (store), ex, "%s\r\n", cmdbuf) < 0) {
- g_free (cmdbuf);
- if (ret)
- *ret = NULL;
- return CAMEL_POP3_FAIL;
- }
- g_free (cmdbuf);
-
- return pop3_get_response (store, ret, ex);
-}
-
-static int
-pop3_get_response (CamelPop3Store *store, char **ret, CamelException *ex)
-{
- char *respbuf;
- int status;
-
- if (camel_remote_store_recv_line (CAMEL_REMOTE_STORE (store), &respbuf, ex) < 0) {
- if (ret)
- *ret = NULL;
- 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
- * @total: Total bytes expected (for progress reporting), use 0 for 'unknown'.
- *
- * 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, int total, CamelException *ex)
-{
- GPtrArray *data;
- char *buf, *p;
- int i, len = 0, status = CAMEL_POP3_OK;
- int pc = 0;
-
- data = g_ptr_array_new ();
- while (1) {
- if (camel_remote_store_recv_line (CAMEL_REMOTE_STORE (store), &buf, ex) < 0) {
- status = CAMEL_POP3_FAIL;
- break;
- }
-
- if (!strcmp (buf, "."))
- break;
-
- g_ptr_array_add (data, buf);
- len += strlen (buf) + 1;
-
- if (total) {
- pc = (len+1) * 100 / total;
- camel_operation_progress(NULL, pc);
- } else {
- camel_operation_progress_count(NULL, len);
- }
- }
-
- if (buf)
- g_free (buf);
-
- if (status == CAMEL_POP3_OK) {
- buf = g_malloc0 (len + 1);
-
- for (i = 0, p = buf; i < data->len; i++) {
- char *ptr, *datap;
-
- datap = (char *) data->pdata[i];
- ptr = (*datap == '.') ? datap + 1 : datap;
- len = strlen (ptr);
- memcpy (p, ptr, len);
- p += len;
- *p++ = '\n';
- }
- *p = '\0';
- } else
- buf = NULL;
-
- for (i = 0; i < data->len; 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 078a317a14..0000000000
--- a/camel/providers/pop3/camel-pop3-store.h
+++ /dev/null
@@ -1,79 +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 <danw@helixcode.com>
- *
- * 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 "camel-types.h"
-#include "camel-remote-store.h"
-
-#define CAMEL_POP3_STORE_TYPE (camel_pop3_store_get_type ())
-#define CAMEL_POP3_STORE(obj) (CAMEL_CHECK_CAST((obj), CAMEL_POP3_STORE_TYPE, CamelPop3Store))
-#define CAMEL_POP3_STORE_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_POP3_STORE_TYPE, CamelPop3StoreClass))
-#define CAMEL_IS_POP3_STORE(o) (CAMEL_CHECK_TYPE((o), CAMEL_POP3_STORE_TYPE))
-
-
-typedef struct {
- CamelRemoteStore parent_object;
-
- char *apop_timestamp, *implementation;
- gboolean supports_top, supports_uidl, expires;
- int login_delay;
-
-} CamelPop3Store;
-
-
-
-typedef struct {
- CamelRemoteStoreClass parent_class;
-
-} CamelPop3StoreClass;
-
-
-/* public methods */
-void camel_pop3_store_expunge (CamelPop3Store *store, CamelException *ex);
-
-/* support functions */
-enum { CAMEL_POP3_OK, CAMEL_POP3_ERR, CAMEL_POP3_FAIL };
-int camel_pop3_command (CamelPop3Store *store, char **ret, CamelException *ex, char *fmt, ...);
-char *camel_pop3_command_get_additional_data (CamelPop3Store *store, int total, CamelException *ex);
-
-/* Standard Camel function */
-CamelType 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 097fdedafb..0000000000
--- a/camel/providers/sendmail/.cvsignore
+++ /dev/null
@@ -1,11 +0,0 @@
-Makefile
-Makefile.in
-.deps
-.libs
-*.lo
-*.la
-*.o
-*.bb
-*.bbg
-*.da
-*.gcov
diff --git a/camel/providers/sendmail/Makefile.am b/camel/providers/sendmail/Makefile.am
deleted file mode 100644
index deec529871..0000000000
--- a/camel/providers/sendmail/Makefile.am
+++ /dev/null
@@ -1,31 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-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 \
- -I$(top_srcdir)/camel \
- $(GNOME_INCLUDEDIR) \
- $(GTK_INCLUDEDIR) \
- -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
-
-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 2e9168f772..0000000000
--- a/camel/providers/sendmail/camel-sendmail-provider.c
+++ /dev/null
@@ -1,63 +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 <danw@helixcode.com>
- *
- * 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "camel-provider.h"
-#include "camel-sendmail-transport.h"
-#include "camel-session.h"
-#include "camel-url.h"
-
-static CamelProvider sendmail_provider = {
- "sendmail",
- N_("Sendmail"),
-
- N_("For delivering mail by passing it to the \"sendmail\" program "
- "on the local system."),
-
- "mail",
-
- 0, /* flags */
-
- 0, /* url_flags */
-
- /* ... */
-};
-
-void
-camel_provider_module_init (CamelSession *session)
-{
- sendmail_provider.object_types[CAMEL_PROVIDER_TRANSPORT] =
- camel_sendmail_transport_get_type();
-
- sendmail_provider.service_cache = g_hash_table_new (camel_url_hash, camel_url_equal);
-
- 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 9cd0c1efa1..0000000000
--- a/camel/providers/sendmail/camel-sendmail-transport.c
+++ /dev/null
@@ -1,250 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* camel-sendmail-transport.c: Sendmail-based transport class. */
-
-/*
- *
- * Authors: Dan Winship <danw@helixcode.com>
- *
- * 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <errno.h>
-#include <fcntl.h>
-#include <signal.h>
-#include <sys/wait.h>
-#include <unistd.h>
-#include <string.h>
-
-#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 char *get_name (CamelService *service, gboolean brief);
-
-static gboolean sendmail_can_send (CamelTransport *transport, CamelMedium *message);
-static gboolean sendmail_send (CamelTransport *transport, CamelMedium *message,
- CamelException *ex);
-static gboolean sendmail_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);
- CamelServiceClass *camel_service_class =
- CAMEL_SERVICE_CLASS (camel_sendmail_transport_class);
-
- /* virtual method overload */
- camel_service_class->get_name = get_name;
-
- camel_transport_class->can_send = sendmail_can_send;
- camel_transport_class->send = sendmail_send;
- camel_transport_class->send_to = sendmail_send_to;
-}
-
-CamelType
-camel_sendmail_transport_get_type (void)
-{
- static CamelType camel_sendmail_transport_type = CAMEL_INVALID_TYPE;
-
- if (camel_sendmail_transport_type == CAMEL_INVALID_TYPE) {
- camel_sendmail_transport_type =
- camel_type_register (CAMEL_TRANSPORT_TYPE, "CamelSendmailTransport",
- sizeof (CamelSendmailTransport),
- sizeof (CamelSendmailTransportClass),
- (CamelObjectClassInitFunc) camel_sendmail_transport_class_init,
- NULL,
- (CamelObjectInitFunc) NULL,
- NULL);
- }
-
- return camel_sendmail_transport_type;
-}
-
-
-static gboolean
-sendmail_can_send (CamelTransport *transport, CamelMedium *message)
-{
- return CAMEL_IS_MIME_MESSAGE (message);
-}
-
-
-static gboolean
-sendmail_send_internal (CamelMedium *message, const 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, (char **)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) {
- camel_object_unref (CAMEL_OBJECT (out));
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not send message: %s"),
- strerror(errno));
- return FALSE;
- }
- camel_object_unref (CAMEL_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_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not execute %s: "
- "mail not sent."),
- SENDMAIL_PATH);
- } else {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("sendmail exited with status "
- "%d: mail not sent."),
- WEXITSTATUS (wstat));
- }
- return FALSE;
- }
-
- return TRUE;
-}
-
-static const char *
-get_from (CamelMedium *message, CamelException *ex)
-{
- const CamelInternetAddress *from;
- const char *name, *address;
-
- from = camel_mime_message_get_from (CAMEL_MIME_MESSAGE (message));
- if (!from || !camel_internet_address_get (from, 0, &name, &address)) {
- camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
- _("Could not find 'From' address in message"));
- return NULL;
- }
- return address;
-}
-
-static gboolean
-sendmail_send_to (CamelTransport *transport, CamelMedium *message,
- GList *recipients, CamelException *ex)
-{
- GList *r;
- const char *from, **argv;
- int i, len;
- gboolean status;
-
- from = get_from (message, ex);
- if (!from)
- return FALSE;
-
- len = g_list_length (recipients);
- argv = g_malloc ((len + 6) * sizeof (char *));
- argv[0] = "sendmail";
- argv[1] = "-i";
- argv[2] = "-f";
- argv[3] = from;
- argv[4] = "--";
-
- for (i = 1, r = recipients; i <= len; i++, r = r->next)
- argv[i + 4] = r->data;
- argv[i + 4] = NULL;
-
- status = sendmail_send_internal (message, argv, ex);
- g_free (argv);
- return status;
-}
-
-static gboolean
-sendmail_send (CamelTransport *transport, CamelMedium *message,
- CamelException *ex)
-{
- const char *argv[6] = { "sendmail", "-t", "-i", "-f", NULL, NULL };
-
- argv[4] = get_from (message, ex);
- if (!argv[4])
- return FALSE;
-
- return sendmail_send_internal (message, argv, ex);
-}
-
-static char *
-get_name (CamelService *service, gboolean brief)
-{
- if (brief)
- return g_strdup (_("sendmail"));
- else
- return g_strdup (_("Mail delivery via the sendmail program"));
-}
diff --git a/camel/providers/sendmail/camel-sendmail-transport.h b/camel/providers/sendmail/camel-sendmail-transport.h
deleted file mode 100644
index bb5dca071b..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 <danw@helixcode.com>
- *
- * 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) (CAMEL_CHECK_CAST((obj), CAMEL_SENDMAIL_TRANSPORT_TYPE, CamelSendmailTransport))
-#define CAMEL_SENDMAIL_TRANSPORT_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_SENDMAIL_TRANSPORT_TYPE, CamelSendmailTransportClass))
-#define CAMEL_IS_SENDMAIL_TRANSPORT(o) (CAMEL_CHECK_TYPE((o), CAMEL_SENDMAIL_TRANSPORT_TYPE))
-
-
-typedef struct {
- CamelTransport parent_object;
-
-} CamelSendmailTransport;
-
-
-typedef struct {
- CamelTransportClass parent_class;
-
-} CamelSendmailTransportClass;
-
-
-/* Standard Camel function */
-CamelType 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 b948585108..0000000000
--- a/camel/providers/smtp/.cvsignore
+++ /dev/null
@@ -1,10 +0,0 @@
-.deps
-.libs
-Makefile
-Makefile.in
-*.lo
-*.la
-*.bb
-*.bbg
-*.da
-*.gcov
diff --git a/camel/providers/smtp/Makefile.am b/camel/providers/smtp/Makefile.am
deleted file mode 100644
index 45e1d77f8c..0000000000
--- a/camel/providers/smtp/Makefile.am
+++ /dev/null
@@ -1,36 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-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 \
- -I$(top_srcdir)/camel \
- -I$(top_srcdir)/e-util \
- $(GNOME_INCLUDEDIR) \
- $(GTK_INCLUDEDIR) \
- $(NSPR_CFLAGS) \
- $(NSS_CFLAGS) \
- -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
-
-libcamelsmtp_la_LIBADD = $(top_builddir)/e-util/libeutil.la $(UNICODE_LIBS)
-
-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 3bb47b3429..0000000000
--- a/camel/providers/smtp/camel-smtp-provider.c
+++ /dev/null
@@ -1,65 +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 <fejj@stampede.org>
- *
- * 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "camel-smtp-transport.h"
-#include "camel-provider.h"
-#include "camel-session.h"
-#include "camel-url.h"
-#include "camel-sasl.h"
-
-static CamelProvider smtp_provider = {
- "smtp",
- N_("SMTP"),
-
- N_("For delivering mail by connecting to a remote mailhub "
- "using SMTP.\n"),
-
- "mail",
-
- CAMEL_PROVIDER_IS_REMOTE | CAMEL_PROVIDER_SUPPORTS_SSL,
-
- CAMEL_URL_NEED_HOST | CAMEL_URL_ALLOW_AUTH | CAMEL_URL_ALLOW_USER,
-
- /* ... */
-};
-
-void
-camel_provider_module_init (CamelSession *session)
-{
- smtp_provider.object_types[CAMEL_PROVIDER_TRANSPORT] =
- camel_smtp_transport_get_type ();
- smtp_provider.authtypes = g_list_append (camel_sasl_authtype_list (TRUE),
- camel_sasl_authtype ("LOGIN"));
- smtp_provider.service_cache = g_hash_table_new (camel_url_hash, camel_url_equal);
-
- 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 f2037a83af..0000000000
--- a/camel/providers/smtp/camel-smtp-transport.c
+++ /dev/null
@@ -1,1082 +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 <fejj@helixcode.com>
- *
- * 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <unistd.h>
-#undef MIN
-#undef MAX
-#include "camel-mime-filter-crlf.h"
-#include "camel-mime-filter-linewrap.h"
-#include "camel-stream-filter.h"
-#include "camel-smtp-transport.h"
-#include "camel-mime-message.h"
-#include "camel-multipart.h"
-#include "camel-mime-part.h"
-#include "camel-stream-buffer.h"
-#include "camel-tcp-stream.h"
-#include "camel-tcp-stream-raw.h"
-#ifdef HAVE_NSS
-#include "camel-tcp-stream-ssl.h"
-#include <prnetdb.h>
-#endif
-#include "camel-session.h"
-#include "camel-exception.h"
-#include "camel-sasl.h"
-#include <gal/util/e-util.h>
-
-#define d(x) x
-
-/* Specified in RFC 821 */
-#define SMTP_PORT 25
-
-/* camel smtp transport class prototypes */
-static gboolean smtp_can_send (CamelTransport *transport, CamelMedium *message);
-static gboolean smtp_send (CamelTransport *transport, CamelMedium *message, CamelException *ex);
-static gboolean smtp_send_to (CamelTransport *transport, CamelMedium *message, GList *recipients, CamelException *ex);
-
-/* support prototypes */
-static void smtp_construct (CamelService *service, CamelSession *session,
- CamelProvider *provider, CamelURL *url,
- CamelException *ex);
-static gboolean smtp_connect (CamelService *service, CamelException *ex);
-static gboolean smtp_disconnect (CamelService *service, gboolean clean, CamelException *ex);
-static GHashTable *esmtp_get_authtypes (gchar *buffer);
-static GList *query_auth_types (CamelService *service, CamelException *ex);
-static char *get_name (CamelService *service, gboolean brief);
-
-static gboolean smtp_helo (CamelSmtpTransport *transport, CamelException *ex);
-static gboolean smtp_auth (CamelSmtpTransport *transport, const char *mech, CamelException *ex);
-static gboolean smtp_mail (CamelSmtpTransport *transport, const char *sender,
- gboolean has_8bit_parts, CamelException *ex);
-static gboolean smtp_rcpt (CamelSmtpTransport *transport, const char *recipient, CamelException *ex);
-static gboolean smtp_data (CamelSmtpTransport *transport, CamelMedium *message,
- gboolean has_8bit_parts, CamelException *ex);
-static gboolean smtp_rset (CamelSmtpTransport *transport, CamelException *ex);
-static gboolean smtp_quit (CamelSmtpTransport *transport, CamelException *ex);
-
-/* private data members */
-static CamelTransportClass *parent_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);
-
- parent_class = CAMEL_TRANSPORT_CLASS (camel_type_get_global_classfuncs (camel_transport_get_type ()));
-
- /* virtual method overload */
- camel_service_class->construct = smtp_construct;
- camel_service_class->connect = smtp_connect;
- camel_service_class->disconnect = smtp_disconnect;
- camel_service_class->query_auth_types = query_auth_types;
- camel_service_class->get_name = get_name;
-
- camel_transport_class->can_send = smtp_can_send;
- camel_transport_class->send = smtp_send;
- camel_transport_class->send_to = smtp_send_to;
-}
-
-static void
-camel_smtp_transport_init (gpointer object)
-{
- CamelTransport *transport = CAMEL_TRANSPORT (object);
-
- transport->supports_8bit = FALSE;
-}
-
-CamelType
-camel_smtp_transport_get_type (void)
-{
- static CamelType camel_smtp_transport_type = CAMEL_INVALID_TYPE;
-
- if (camel_smtp_transport_type == CAMEL_INVALID_TYPE) {
- camel_smtp_transport_type =
- camel_type_register (CAMEL_TRANSPORT_TYPE, "CamelSmtpTransport",
- sizeof (CamelSmtpTransport),
- sizeof (CamelSmtpTransportClass),
- (CamelObjectClassInitFunc) camel_smtp_transport_class_init,
- NULL,
- (CamelObjectInitFunc) camel_smtp_transport_init,
- NULL);
- }
-
- return camel_smtp_transport_type;
-}
-
-static void
-smtp_construct (CamelService *service, CamelSession *session,
- CamelProvider *provider, CamelURL *url,
- CamelException *ex)
-{
- CamelSmtpTransport *smtp_transport = CAMEL_SMTP_TRANSPORT (service);
-
- CAMEL_SERVICE_CLASS (parent_class)->construct (service, session, provider, url, ex);
-
- if (camel_url_get_param (url, "use_ssl"))
- smtp_transport->use_ssl = TRUE;
-}
-
-static const char *
-get_smtp_error_string (int error)
-{
- /* SMTP error codes grabbed from rfc821 */
- switch (error) {
- case 0:
- /* looks like a read problem, check errno */
- return g_strerror (errno);
- case 500:
- return _("Syntax error, command unrecognized");
- case 501:
- return _("Syntax error in parameters or arguments");
- case 502:
- return _("Command not implemented");
- case 504:
- return _("Command parameter not implemented");
- case 211:
- return _("System status, or system help reply");
- case 214:
- return _("Help message");
- case 220:
- return _("Service ready");
- case 221:
- return _("Service closing transmission channel");
- case 421:
- return _("Service not available, closing transmission channel");
- case 250:
- return _("Requested mail action okay, completed");
- case 251:
- return _("User not local; will forward to <forward-path>");
- case 450:
- return _("Requested mail action not taken: mailbox unavailable");
- case 550:
- return _("Requested action not taken: mailbox unavailable");
- case 451:
- return _("Requested action aborted: error in processing");
- case 551:
- return _("User not local; please try <forward-path>");
- case 452:
- return _("Requested action not taken: insufficient system storage");
- case 552:
- return _("Requested mail action aborted: exceeded storage allocation");
- case 553:
- return _("Requested action not taken: mailbox name not allowed");
- case 354:
- return _("Start mail input; end with <CRLF>.<CRLF>");
- case 554:
- return _("Transaction failed");
-
- /* AUTH error codes: */
- case 432:
- return _("A password transition is needed");
- case 534:
- return _("Authentication mechanism is too weak");
- case 538:
- return _("Encryption required for requested authentication mechanism");
- case 454:
- return _("Temporary authentication failure");
- case 530:
- return _("Authentication required");
-
- default:
- return _("Unknown");
- }
-}
-
-static gboolean
-connect_to_server (CamelService *service, CamelException *ex)
-{
- CamelSmtpTransport *transport = CAMEL_SMTP_TRANSPORT (service);
- CamelStream *tcp_stream;
- gchar *respbuf = NULL;
- struct hostent *h;
- guint32 addrlen;
- int port, ret;
-
- if (!CAMEL_SERVICE_CLASS (parent_class)->connect (service, ex))
- return FALSE;
-
- h = camel_service_gethost (service, ex);
- if (!h)
- return FALSE;
-
- /* set some smtp transport defaults */
- transport->is_esmtp = FALSE;
- transport->authtypes = NULL;
- CAMEL_TRANSPORT (transport)->supports_8bit = FALSE;
-
- port = service->url->port ? service->url->port : SMTP_PORT;
-
-#ifdef HAVE_NSS
- if (transport->use_ssl) {
- port = service->url->port ? service->url->port : 465;
- tcp_stream = camel_tcp_stream_ssl_new (service, service->url->host);
- } else {
- tcp_stream = camel_tcp_stream_raw_new ();
- }
-#else
- tcp_stream = camel_tcp_stream_raw_new ();
-#endif /* HAVE_NSS */
-
- ret = camel_tcp_stream_connect (CAMEL_TCP_STREAM (tcp_stream), h, port);
- camel_free_host(h);
- if (ret == -1) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
- _("Could not connect to %s (port %d): %s"),
- service->url->host, port,
- g_strerror (errno));
-
- return FALSE;
- }
-
- /* get the localaddr - needed later by smtp_helo */
- addrlen = sizeof (transport->localaddr);
-#ifdef HAVE_NSS
- if (transport->use_ssl) {
- PRFileDesc *sockfd = camel_tcp_stream_get_socket (CAMEL_TCP_STREAM (tcp_stream));
- PRNetAddr addr;
- char hname[1024];
-
- PR_GetSockName (sockfd, &addr);
- memset (hname, 0, sizeof (hname));
- PR_NetAddrToString (&addr, hname, 1023);
-
- inet_aton (hname, (struct in_addr *)&transport->localaddr.sin_addr);
- } else {
- int sockfd = GPOINTER_TO_INT (camel_tcp_stream_get_socket (CAMEL_TCP_STREAM (tcp_stream)));
-
- getsockname (sockfd, (struct sockaddr *)&transport->localaddr, &addrlen);
- }
-#else
- getsockname (CAMEL_TCP_STREAM_RAW (tcp_stream)->sockfd,
- (struct sockaddr *)&transport->localaddr, &addrlen);
-#endif /* HAVE_NSS */
-
- transport->ostream = tcp_stream;
- transport->istream = camel_stream_buffer_new (tcp_stream, CAMEL_STREAM_BUFFER_READ);
-
- /* Read the greeting, note whether the server is ESMTP or not. */
- do {
- /* Check for "220" */
- g_free (respbuf);
- respbuf = camel_stream_buffer_read_line (CAMEL_STREAM_BUFFER (transport->istream));
- if (!respbuf || strncmp (respbuf, "220", 3)) {
- int error;
-
- error = respbuf ? atoi (respbuf) : 0;
- g_free (respbuf);
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Welcome response error: %s: possibly non-fatal"),
- get_smtp_error_string (error));
- return FALSE;
- }
- if (strstr (respbuf, "ESMTP"))
- transport->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) */
- if (!transport->is_esmtp) {
- /* If we did not auto-detect ESMTP, we should still send EHLO */
- transport->is_esmtp = TRUE;
- if (!smtp_helo (transport, NULL)) {
- /* Okay, apprently this server doesn't support ESMTP */
- transport->is_esmtp = FALSE;
- smtp_helo (transport, ex);
- }
- } else {
- /* send EHLO */
- smtp_helo (transport, ex);
- }
-
- return TRUE;
-}
-
-static gboolean
-smtp_connect (CamelService *service, CamelException *ex)
-{
- CamelSmtpTransport *transport = CAMEL_SMTP_TRANSPORT (service);
-
- if (!connect_to_server (service, ex))
- return FALSE;
-
- /* check to see if AUTH is required, if so...then AUTH ourselves */
- if (service->url->authmech) {
- CamelSession *session = camel_service_get_session (service);
- CamelServiceAuthType *authtype;
- gboolean authenticated = FALSE;
- char *errbuf = NULL;
-
- if (!transport->is_esmtp || !g_hash_table_lookup (transport->authtypes, service->url->authmech)) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
- _("SMTP server %s does not support requested "
- "authentication type %s"), service->url->host,
- service->url->authmech);
- camel_service_disconnect (service, TRUE, NULL);
- return FALSE;
- }
-
- authtype = camel_sasl_authtype (service->url->authmech);
- if (!authtype) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
- _("No support for authentication type %s"),
- service->url->authmech);
- camel_service_disconnect (service, TRUE, NULL);
- return FALSE;
- }
-
- if (!authtype->need_password) {
- /* authentication mechanism doesn't need a password,
- so if it fails there's nothing we can do */
- authenticated = smtp_auth (transport, authtype->authproto, ex);
- if (!authenticated) {
- camel_service_disconnect (service, TRUE, NULL);
- return FALSE;
- }
- }
-
- /* keep trying to login until either we succeed or the user cancels */
- while (!authenticated) {
- if (errbuf) {
- /* We need to un-cache the password before prompting again */
- camel_session_query_authenticator (
- session, CAMEL_AUTHENTICATOR_TELL, NULL,
- TRUE, service, "password", ex);
- g_free (service->url->passwd);
- service->url->passwd = NULL;
- }
-
- if (!service->url->passwd) {
- char *prompt;
-
- prompt = g_strdup_printf (_("%sPlease enter the SMTP password for %s@%s"),
- errbuf ? errbuf : "", service->url->user,
- service->url->host);
-
- service->url->passwd =
- camel_session_query_authenticator (
- session, CAMEL_AUTHENTICATOR_ASK,
- prompt, TRUE, service, "password", ex);
-
- g_free (prompt);
- g_free (errbuf);
- errbuf = NULL;
-
- if (!service->url->passwd) {
- camel_exception_set (ex, CAMEL_EXCEPTION_USER_CANCEL,
- _("You didn't enter a password."));
- camel_service_disconnect (service, TRUE, NULL);
- return FALSE;
- }
- }
-
- authenticated = smtp_auth (transport, authtype->authproto, ex);
- if (!authenticated) {
- errbuf = g_strdup_printf (_("Unable to authenticate "
- "to SMTP server.\n%s\n\n"),
- camel_exception_get_description (ex));
- camel_exception_clear (ex);
- }
- }
-
- /* The spec says we have to re-EHLO, but some servers
- * we won't bother to name don't want you to... so ignore
- * errors.
- */
- smtp_helo (transport, NULL);
- }
-
- return TRUE;
-}
-
-static gboolean
-authtypes_free (gpointer key, gpointer value, gpointer data)
-{
- g_free (key);
- g_free (value);
-
- return TRUE;
-}
-
-static gboolean
-smtp_disconnect (CamelService *service, gboolean clean, CamelException *ex)
-{
- CamelSmtpTransport *transport = CAMEL_SMTP_TRANSPORT (service);
-
- /*if (!service->connected)
- * return TRUE;
- */
-
- if (clean) {
- /* send the QUIT command to the SMTP server */
- smtp_quit (transport, ex);
- }
-
- if (!CAMEL_SERVICE_CLASS (parent_class)->disconnect (service, clean, ex))
- return FALSE;
-
- if (transport->authtypes) {
- g_hash_table_foreach_remove (transport->authtypes, authtypes_free, NULL);
- g_hash_table_destroy (transport->authtypes);
- transport->authtypes = NULL;
- }
-
- camel_object_unref (CAMEL_OBJECT (transport->ostream));
- camel_object_unref (CAMEL_OBJECT (transport->istream));
-
- transport->ostream = NULL;
- transport->istream = NULL;
-
- return TRUE;
-}
-
-static GHashTable *
-esmtp_get_authtypes (char *buffer)
-{
- GHashTable *table = NULL;
- gchar *start, *end;
-
- /* advance to the first token */
- for (start = buffer; isspace (*start) || *start == '='; start++);
-
- if (!*start) return NULL;
-
- table = g_hash_table_new (g_str_hash, g_str_equal);
-
- for ( ; *start; ) {
- char *type;
-
- /* advance to the end of the token */
- for (end = start; *end && !isspace (*end); end++);
-
- type = g_strndup (start, end - start);
- g_hash_table_insert (table, g_strdup (type), type);
-
- /* advance to the next token */
- for (start = end; isspace (*start); start++);
- }
-
- return table;
-}
-
-static GList *
-query_auth_types (CamelService *service, CamelException *ex)
-{
- CamelSmtpTransport *transport = CAMEL_SMTP_TRANSPORT (service);
- CamelServiceAuthType *authtype;
- GList *types, *t, *next;
-
- if (!connect_to_server (service, ex))
- return NULL;
-
- types = g_list_copy (service->provider->authtypes);
- for (t = types; t; t = next) {
- authtype = t->data;
- next = t->next;
-
- if (!g_hash_table_lookup (transport->authtypes, authtype->authproto)) {
- types = g_list_remove_link (types, t);
- g_list_free_1 (t);
- }
- }
-
- smtp_disconnect (service, TRUE, NULL);
- return types;
-}
-
-static char *
-get_name (CamelService *service, gboolean brief)
-{
- if (brief)
- return g_strdup_printf (_("SMTP server %s"), service->url->host);
- else {
- return g_strdup_printf (_("SMTP mail delivery via %s"),
- service->url->host);
- }
-}
-
-static gboolean
-smtp_can_send (CamelTransport *transport, CamelMedium *message)
-{
- return CAMEL_IS_MIME_MESSAGE (message);
-}
-
-static gboolean
-smtp_send_to (CamelTransport *transport, CamelMedium *message,
- GList *recipients, CamelException *ex)
-{
- CamelSmtpTransport *smtp_transport = CAMEL_SMTP_TRANSPORT (transport);
- const CamelInternetAddress *cia;
- char *recipient;
- const char *addr;
- gboolean has_8bit_parts;
- GList *r;
-
- cia = camel_mime_message_get_from(CAMEL_MIME_MESSAGE (message));
- if (!cia) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Cannot send message: "
- "sender address not defined."));
- return FALSE;
- }
-
- if (!camel_internet_address_get (cia, 0, NULL, &addr)) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Cannot send message: "
- "sender address not valid."));
- return FALSE;
- }
-
- /* find out if the message has 8bit mime parts */
- has_8bit_parts = camel_mime_message_has_8bit_parts (CAMEL_MIME_MESSAGE (message));
-
- /* rfc1652 (8BITMIME) requires that you notify the ESMTP daemon that
- you'll be sending an 8bit mime message at "MAIL FROM:" time. */
- smtp_mail (smtp_transport, addr, has_8bit_parts, ex);
-
- if (!recipients) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Cannot send message: "
- "no recipients defined."));
- return FALSE;
- }
-
- for (r = recipients; r; r = r->next) {
- recipient = (char *) r->data;
- if (!smtp_rcpt (smtp_transport, recipient, ex)) {
- g_free (recipient);
- return FALSE;
- }
- g_free (recipient);
- }
-
- /* passing in has_8bit_parts saves time as we don't have to
- recurse through the message all over again if the user is
- not sending 8bit mime parts */
- if (!smtp_data (smtp_transport, message, has_8bit_parts, ex))
- return FALSE;
-
- /* reset the service for our next transfer session */
- smtp_rset (smtp_transport, ex);
-
- return TRUE;
-}
-
-static gboolean
-smtp_send (CamelTransport *transport, CamelMedium *message, CamelException *ex)
-{
- const CamelInternetAddress *to, *cc, *bcc;
- GList *recipients = NULL;
- guint index, len;
-
- to = camel_mime_message_get_recipients (CAMEL_MIME_MESSAGE (message), CAMEL_RECIPIENT_TYPE_TO);
- cc = camel_mime_message_get_recipients (CAMEL_MIME_MESSAGE (message), CAMEL_RECIPIENT_TYPE_CC);
- bcc = camel_mime_message_get_recipients (CAMEL_MIME_MESSAGE (message), CAMEL_RECIPIENT_TYPE_BCC);
-
- /* get all of the To addresses into our recipient list */
- len = CAMEL_ADDRESS (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 = CAMEL_ADDRESS (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 = CAMEL_ADDRESS (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 smtp_send_to (transport, message, recipients, ex);
-}
-
-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->is_esmtp) {
- if (host && host->h_name)
- cmdbuf = g_strdup_printf ("EHLO %s\r\n", host->h_name);
- else
- cmdbuf = g_strdup_printf ("EHLO [%s]\r\n", inet_ntoa (transport->localaddr.sin_addr));
- } else {
- if (host && host->h_name)
- cmdbuf = g_strdup_printf ("HELO %s\r\n", host->h_name);
- else
- cmdbuf = g_strdup_printf ("HELO [%s]\r\n", inet_ntoa (transport->localaddr.sin_addr));
- }
-
- d(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));
-
- d(fprintf (stderr, "received: %s\n", respbuf ? respbuf : "(null)"));
-
- if (!respbuf || strncmp (respbuf, "250", 3)) {
- int error;
-
- error = respbuf ? atoi (respbuf) : 0;
- g_free (respbuf);
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("HELO response error: %s: non-fatal"),
- get_smtp_error_string (error));
- return FALSE;
- }
-
- if (e_strstrcase (respbuf, "8BITMIME")) {
- d(fprintf (stderr, "This server supports 8bit MIME\n"));
- CAMEL_TRANSPORT (transport)->supports_8bit = TRUE;
- }
-
- /* Only parse authtypes if we don't already have them */
- if (transport->is_esmtp && strstr (respbuf, "AUTH") && !transport->authtypes) {
- /* parse for supported AUTH types */
- char *auths = strstr (respbuf, "AUTH") + 4;
-
- transport->authtypes = esmtp_get_authtypes (auths);
- }
- } while (*(respbuf+3) == '-'); /* if we got "250-" then loop again */
- g_free (respbuf);
-
- return TRUE;
-}
-
-static gboolean
-smtp_auth (CamelSmtpTransport *transport, const char *mech, CamelException *ex)
-{
- gchar *cmdbuf, *respbuf = NULL, *challenge;
- CamelSasl *sasl;
-
- sasl = camel_sasl_new ("smtp", mech, CAMEL_SERVICE (transport));
- if (!sasl) {
- g_free (respbuf);
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Error creating SASL authentication object."));
- return FALSE;
- }
-
- challenge = camel_sasl_challenge_base64 (sasl, NULL, ex);
- if (challenge) {
- cmdbuf = g_strdup_printf ("AUTH %s %s\r\n", mech, challenge);
- g_free (challenge);
- } else
- cmdbuf = g_strdup_printf ("AUTH %s\r\n", mech);
-
- d(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,
- _("AUTH request timed out: %s"),
- g_strerror (errno));
- goto lose;
- }
- g_free (cmdbuf);
-
- /* get the base64 encoded server challenge which should follow a 334 code */
- respbuf = camel_stream_buffer_read_line (CAMEL_STREAM_BUFFER (transport->istream));
- d(fprintf (stderr, "received: %s\n", respbuf ? respbuf : "(null)"));
- if (!respbuf || strncmp (respbuf, "334", 3)) {
- g_free (respbuf);
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("AUTH request timed out: %s"),
- g_strerror (errno));
- goto lose;
- }
-
- while (!camel_sasl_authenticated (sasl)) {
- if (!respbuf)
- goto lose;
-
- /* eat whtspc */
- for (challenge = respbuf + 4; isspace (*challenge); challenge++);
-
- challenge = camel_sasl_challenge_base64 (sasl, challenge, ex);
- g_free (respbuf);
- if (camel_exception_is_set (ex))
- goto break_and_lose;
-
- /* send our challenge */
- cmdbuf = g_strdup_printf ("%s\r\n", challenge);
- g_free (challenge);
- d(fprintf (stderr, "sending : %s", cmdbuf));
- if (camel_stream_write (transport->ostream, cmdbuf, strlen (cmdbuf)) == -1) {
- g_free (cmdbuf);
- goto lose;
- }
- g_free (cmdbuf);
-
- /* get the server's response */
- respbuf = camel_stream_buffer_read_line (CAMEL_STREAM_BUFFER (transport->istream));
- d(fprintf (stderr, "received: %s\n", respbuf ? respbuf : "(null)"));
- }
-
- /* check that the server says we are authenticated */
- if (!respbuf || strncmp (respbuf, "235", 3)) {
- g_free (respbuf);
- goto lose;
- }
-
- return TRUE;
-
- break_and_lose:
- /* Get the server out of "waiting for continuation data" mode. */
- d(fprintf (stderr, "sending : *\n"));
- camel_stream_write (transport->ostream, "*\r\n", 3);
- respbuf = camel_stream_buffer_read_line (CAMEL_STREAM_BUFFER (transport->istream));
- d(fprintf (stderr, "received: %s\n", respbuf ? respbuf : "(null)"));
-
- lose:
- if (!camel_exception_is_set (ex)) {
- camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
- _("Bad authentication response from server.\n"));
- }
-
- if (sasl)
- camel_object_unref (CAMEL_OBJECT (sasl));
-
- return FALSE;
-}
-
-static gboolean
-smtp_mail (CamelSmtpTransport *transport, const char *sender, gboolean has_8bit_parts, 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 */
- if (CAMEL_TRANSPORT (transport)->supports_8bit && has_8bit_parts)
- cmdbuf = g_strdup_printf ("MAIL FROM: <%s> BODY=8BITMIME\r\n", sender);
- else
- cmdbuf = g_strdup_printf ("MAIL FROM: <%s>\r\n", sender);
-
- d(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));
-
- d(fprintf (stderr, "received: %s\n", respbuf ? respbuf : "(null)"));
-
- if (!respbuf || strncmp (respbuf, "250", 3)) {
- int error;
-
- error = respbuf ? atoi (respbuf) : 0;
- g_free (respbuf);
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("MAIL FROM response error: %s: mail not sent"),
- get_smtp_error_string (error));
- return FALSE;
- }
- } while (*(respbuf+3) == '-'); /* if we got "250-" then loop again */
- g_free (respbuf);
-
- return TRUE;
-}
-
-static gboolean
-smtp_rcpt (CamelSmtpTransport *transport, const char *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);
-
- d(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));
-
- d(fprintf (stderr, "received: %s\n", respbuf ? respbuf : "(null)"));
-
- if (!respbuf || strncmp (respbuf, "250", 3)) {
- int error;
-
- error = respbuf ? atoi (respbuf) : 0;
- g_free (respbuf);
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("RCPT TO response error: %s: mail not sent"),
- get_smtp_error_string (error));
- return FALSE;
- }
- } while (*(respbuf+3) == '-'); /* if we got "250-" then loop again */
- g_free (respbuf);
-
- return TRUE;
-}
-
-static gboolean
-smtp_data (CamelSmtpTransport *transport, CamelMedium *message, gboolean has_8bit_parts, CamelException *ex)
-{
- /* now we can actually send what's important :p */
- gchar *cmdbuf, *respbuf = NULL;
- CamelStreamFilter *filtered_stream;
- CamelMimeFilter *crlffilter;
-
- /* if the message contains 8bit mime parts and the server
- doesn't support it, encode 8bit parts to the best
- encoding. This will also enforce an encoding to keep the lines in limit */
- if (has_8bit_parts && !CAMEL_TRANSPORT (transport)->supports_8bit)
- camel_mime_message_encode_8bit_parts (CAMEL_MIME_MESSAGE (message));
-
- cmdbuf = g_strdup ("DATA\r\n");
-
- d(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));
-
- d(fprintf (stderr, "received: %s\n", respbuf ? respbuf : "(null)"));
-
- 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
- */
- int error;
-
- error = respbuf ? atoi (respbuf) : 0;
- g_free (respbuf);
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("DATA response error: %s: mail not sent"),
- get_smtp_error_string (error));
- return FALSE;
- }
-
- g_free (respbuf);
- respbuf = NULL;
-
- /* setup stream filtering */
- crlffilter = camel_mime_filter_crlf_new (CAMEL_MIME_FILTER_CRLF_ENCODE, CAMEL_MIME_FILTER_CRLF_MODE_CRLF_DOTS);
- filtered_stream = camel_stream_filter_new_with_stream (transport->ostream);
- camel_stream_filter_add (filtered_stream, CAMEL_MIME_FILTER (crlffilter));
-
- 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));
-
- camel_object_unref (CAMEL_OBJECT (filtered_stream));
-
- return FALSE;
- }
-
- camel_stream_flush (CAMEL_STREAM (filtered_stream));
- camel_object_unref (CAMEL_OBJECT (filtered_stream));
-
- /* terminate the message body */
-
- d(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));
-
- d(fprintf (stderr, "received: %s\n", respbuf ? respbuf : "(null)"));
-
- if (!respbuf || strncmp (respbuf, "250", 3)) {
- int error;
-
- error = respbuf ? atoi (respbuf) : 0;
- g_free (respbuf);
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("DATA response error: message termination: "
- "%s: mail not sent"),
- get_smtp_error_string (error));
- return FALSE;
- }
- } 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");
-
- d(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));
-
- d(fprintf (stderr, "received: %s\n", respbuf ? respbuf : "(null)"));
-
- if (!respbuf || strncmp (respbuf, "250", 3)) {
- int error;
-
- error = respbuf ? atoi (respbuf) : 0;
- g_free (respbuf);
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("RSET response error: %s"),
- get_smtp_error_string (error));
- return FALSE;
- }
- } 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");
-
- d(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));
-
- d(fprintf (stderr, "received: %s\n", respbuf ? respbuf : "(null)"));
-
- if (!respbuf || strncmp (respbuf, "221", 3)) {
- int error;
-
- error = respbuf ? atoi (respbuf) : 0;
- g_free (respbuf);
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("QUIT response error: %s: non-fatal"),
- get_smtp_error_string (error));
- return FALSE;
- }
- } 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 4515fe1f07..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 <fejj@stampede.org>
- *
- * 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 <sys/param.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-#include "camel-transport.h"
-
-#define CAMEL_SMTP_TRANSPORT_TYPE (camel_smtp_transport_get_type ())
-#define CAMEL_SMTP_TRANSPORT(obj) (CAMEL_CHECK_CAST((obj), CAMEL_SMTP_TRANSPORT_TYPE, CamelSmtpTransport))
-#define CAMEL_SMTP_TRANSPORT_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_SMTP_TRANSPORT_TYPE, CamelSmtpTransportClass))
-#define CAMEL_IS_SMTP_TRANSPORT(o) (CAMEL_CHECK_TYPE((o), CAMEL_SMTP_TRANSPORT_TYPE))
-
-
-typedef struct {
- CamelTransport parent_object;
-
- CamelStream *istream, *ostream;
-
- gboolean use_ssl, is_esmtp;
-
- struct sockaddr_in localaddr;
-
- GHashTable *authtypes;
-
-} CamelSmtpTransport;
-
-
-
-typedef struct {
- CamelTransportClass parent_class;
-
-} CamelSmtpTransportClass;
-
-
-/* Standard Camel function */
-CamelType 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/string-utils.c b/camel/string-utils.c
deleted file mode 100644
index 4a28b199ef..0000000000
--- a/camel/string-utils.c
+++ /dev/null
@@ -1,209 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* string-util : utilities for gchar* strings */
-
-/*
- *
- * Authors: Bertrand Guiheneuf <bertrand@helixcode.com>
- * Jeffrey Stedfast <fejj@helixcode.com>
- *
- * 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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#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;
-}
-
-void
-string_unquote (gchar *string)
-{
- /* if the string is quoted, unquote it */
-
- g_return_if_fail (string != NULL);
-
- if (*string == '"' && *(string + strlen (string) - 1) == '"') {
- *(string + strlen (string) - 1) = '\0';
- if (*string)
- memmove (string, string+1, strlen (string));
- }
-}
-
-gchar *
-strip (gchar *string, gchar c)
-{
- /* strip all occurances of c from the string */
- gchar *src, *dst;
-
- g_return_val_if_fail (string != NULL, NULL);
-
- for (src = dst = string; *src; src++)
- if (*src != c)
- *dst++ = *src;
- *dst = '\0';
-
- return string;
-}
diff --git a/camel/string-utils.h b/camel/string-utils.h
deleted file mode 100644
index 1556faa1df..0000000000
--- a/camel/string-utils.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* string-util : utilities for normal gchar * strings */
-
-/*
- *
- * Authors: Bertrand Guiheneuf <bertrand@helixcode.com>
- * Jeffrey Stedfast <fejj@helixcode.com>
- *
- * 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 <glib.h>
-
-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);
-
-void string_unquote (gchar *string);
-
-gchar *strip (gchar *string, gchar c);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* STRING_UTIL_H */
diff --git a/camel/tests/.cvsignore b/camel/tests/.cvsignore
deleted file mode 100644
index fd6b811c68..0000000000
--- a/camel/tests/.cvsignore
+++ /dev/null
@@ -1,7 +0,0 @@
-.deps
-Makefile
-Makefile.in
-.libs
-.deps
-*.lo
-*.la
diff --git a/camel/tests/Makefile.am b/camel/tests/Makefile.am
deleted file mode 100644
index 1d24ebd0ac..0000000000
--- a/camel/tests/Makefile.am
+++ /dev/null
@@ -1,3 +0,0 @@
-
-SUBDIRS = lib \
- message folder stream smime misc
diff --git a/camel/tests/README b/camel/tests/README
deleted file mode 100644
index 6815330102..0000000000
--- a/camel/tests/README
+++ /dev/null
@@ -1,44 +0,0 @@
-
-This directory is to contain regression tests that should be run
-before committing anything to camel.
-
-In each subdirectory of tests there is a README containing a
-one-line description of each test file. This README must be kept
-uptodate.
-
-To write a new test: copy an existing one and replace the contents.
-
-See camel-test.h for a number of functions and macros which setup and
-define the test environmet, and help provide meaningful messages when
-something actually fails.
-
-All tests have the following options:
- -v[vvvv]
- verbose. more v's more verbose. 2 v's will give you
- a simple test backtrace of any partially failed tests.
- No v's give you a simple backtrace of any failed tests.
- -q
- quiet. Dont print anything, unless there is a SEGV.
-
-See the other files in lib/* for utility functions that help to
-write the tests (object comparison, creation, etc functions).
-
-Tests may fail and be non-fatal. In this case, you will see "Partial
-success" on the result of each test line. To get more information
-about the test, run the test manually with a -v command line argument.
-The more v's you have the more detail you get (upto about -vvvvv),
-generally use -vv to find out which parts of a partially successful
-test failed, and where.
-
-Note that if writing tests, non-fatal tests (bracketed by a
-camel_test_nonfatal() and camel_test_fatal() pair) should only be
-defined where: 1. The test in question should ideally pass, and 2. The
-code has known limitations currently that stop it passing, but
-otherwise works for nominal input.
-
-To debug tests, set a breakpoint on camel_test_fail, which will be
-called for any failure, even a non-fatal one. Or set it to
-camel_test_break, which will only be called for fatal errors which are
-to print to the screen.
-
- Michael <notzed@helixcode.com>
diff --git a/camel/tests/data/gendoc.pl b/camel/tests/data/gendoc.pl
deleted file mode 100755
index 732f05a4ed..0000000000
--- a/camel/tests/data/gendoc.pl
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/usr/bin/perl
-
-# Generate 'documents' in different encodings, from po files
-
-if ($#ARGV < 0) {
- print "Usage: gendoc.pl pofile pofile ...\n";
- exit 1;
-}
-
-$fmt = "| fmt -u ";
-
-sub read_msgstr()
-{
- my $str = "";
- while (<IN>) {
- if (m/^msgstr \"(.*)\"/) {
- $str = $1;
- if ($str eq "") {
- while (<IN>) {
- if (m/\"(.*)\"/) {
- $str .= $1;
- } else {
- last;
- }
- }
- }
- return $str;
- }
- }
- return "";
-}
-
-$unknown = "x-unknown-1";
-
-foreach $name (@ARGV) {
- if ($name =~ m@([^/]*).po$@) {
- $poname = $1;
-
- open IN,"<$name";
-
- $header = read_msgstr;
- if ($header =~ /Content-Type:.*charset=([-a-zA-Z0-9]*)/i) {
- $charset = $1;
- } else {
- $charset = $unknown++;
- }
-
- print "Building $poname.$charset.txt from $name\n";
-
- open OUT,"$fmt > $poname.$charset.txt";
- while (!eof(IN)) {
- $msg = read_msgstr;
- # de-escape
- $msg =~ s/\\n/\n/gso;
- $msg =~ s/\\t/\t/gso;
- $msg =~ s/\\(.)/$1/gso;
- print OUT $msg." ";
- }
- close OUT;
- close IN;
- } else {
- printf("ignoring $name, probably not intended\n");
- }
-}
-
diff --git a/camel/tests/data/genline.pl b/camel/tests/data/genline.pl
deleted file mode 100755
index 99ff43c882..0000000000
--- a/camel/tests/data/genline.pl
+++ /dev/null
@@ -1,72 +0,0 @@
-#!/usr/bin/perl
-
-# Generate 'documents' in different encodings, from po files
-
-if ($#ARGV < 0) {
- print "Usage: genline.pl pofile pofile ...\n";
- exit 1;
-}
-
-sub read_msgstr()
-{
- my $str = "";
- while (<IN>) {
- if (m/^msgstr \"(.*)\"/) {
- $str = $1;
- if ($str eq "") {
- while (<IN>) {
- if (m/\"(.*)\"/) {
- $str .= $1;
- } else {
- last;
- }
- }
- }
- return $str;
- }
- }
- return "";
-}
-
-$unknown = "x-unknown-1";
-open OUT, ">test-lines.h";
-
-print OUT <<END;
-struct _l {
- char *type;
- char *line;
-} test_lines[] = {
-END
-
-foreach $name (@ARGV) {
- if ($name =~ m@([^/]*).po$@) {
- $poname = $1;
-
- open IN,"<$name";
-
- $header = read_msgstr;
- if ($header =~ /Content-Type:.*charset=([-a-zA-Z0-9]*)/i) {
- $charset = $1;
- } else {
- $charset = $unknown++;
- }
-
- while (!eof(IN)) {
- $msg = read_msgstr;
- if (length($msg) > 60 && length($msg) < 160) {
- print OUT "\t{ \"$charset\", \"$msg\" },\n";
- last;
- }
-# $msg =~ s/\\n/\n/gso;
-# $msg =~ s/\\t/\t/gso;
-# $msg =~ s/\\(.)/$1/gso;
-# print OUT $msg." ";
- }
- close IN;
- } else {
- printf("ignoring $name, probably not intended\n");
- }
-}
-
-print OUT "};\n";
-close OUT;
diff --git a/camel/tests/data/getaddr.pl b/camel/tests/data/getaddr.pl
deleted file mode 100755
index 74a8a81f74..0000000000
--- a/camel/tests/data/getaddr.pl
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/usr/bin/perl
-
-# get addresses out of messages
-
-if ($#ARGV < 0) {
- print "Usage: $0 message(s) mbox(es)\n";
- exit 1;
-}
-
-foreach $name (@ARGV) {
- open IN,"<$name";
- while (<IN>) {
- if (/^From: (.*)/i
- || /^To: (.*)/i
- || /^Cc: (.*)/i) {
- $base = $1;
- while (<IN>) {
- if (/^\s+(.*)/) {
- $base .= " ".$1;
- } else {
- last;
- }
- }
- $uniq{$base} = 1;
- }
- }
- close IN;
-}
-
-foreach $key (sort keys %uniq) {
- print $key."\n";
-}
diff --git a/camel/tests/folder/.cvsignore b/camel/tests/folder/.cvsignore
deleted file mode 100644
index ba98331a6d..0000000000
--- a/camel/tests/folder/.cvsignore
+++ /dev/null
@@ -1,12 +0,0 @@
-.deps
-Makefile
-Makefile.in
-.libs
-.deps
-*.lo
-*.la
-temp-test
-*.bb
-*.bbg
-*.da
-*.gcov
diff --git a/camel/tests/folder/Makefile.am b/camel/tests/folder/Makefile.am
deleted file mode 100644
index f6dd852dd8..0000000000
--- a/camel/tests/folder/Makefile.am
+++ /dev/null
@@ -1,29 +0,0 @@
-
-INCLUDES = -I$(top_srcdir)/intl -I$(top_srcdir) -I$(top_srcdir)/camel \
- -I$(includedir) \
- -I$(top_srcdir)/camel/tests/lib \
- -DG_LOG_DOMAIN=\"evolution-tests\"
-
-LDADD = \
- $(top_builddir)/camel/libcamel.la \
- $(top_builddir)/e-util/libeutil.la \
- $(top_builddir)/libibex/libibex.la \
- $(GNOME_LIBDIR) \
- $(top_builddir)/camel/tests/lib/libcameltest.a \
- $(GNOMEUI_LIBS) $(INTLLIBS) $(EXTRA_GNOME_LIBS)
-
-check_PROGRAMS = \
- test1 test4 test5 \
- test2 test6 test7 \
- test3 \
- test8 \
- test9
-
-TESTS = test1 test4 test5 \
- test2 test6 test7 \
- test3 \
- test8 \
- test9
-
-
-
diff --git a/camel/tests/folder/README b/camel/tests/folder/README
deleted file mode 100644
index 4fed421413..0000000000
--- a/camel/tests/folder/README
+++ /dev/null
@@ -1,11 +0,0 @@
-
-test1 camel store folder operations (local only)
-test2 basic folder operations, local
-test3 folder searching and indexing, local
-test4 camel store folder operations, IMAP
-test5 camel store folder operations, NNTP
-test6 basic folder operations, IMAP
-test7 basic folder operations, NNTP
-
-test8 multithreaded folder torture test, local
-test9 filtering
diff --git a/camel/tests/folder/test1.c b/camel/tests/folder/test1.c
deleted file mode 100644
index e7d1ac0604..0000000000
--- a/camel/tests/folder/test1.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/* store testing */
-
-#include "camel-test.h"
-#include "folders.h"
-
-#include <camel/camel-exception.h>
-#include <camel/camel-service.h>
-#include <camel/camel-session.h>
-#include <camel/camel-store.h>
-
-/* god, who designed this horrid interface */
-static char *auth_callback(CamelAuthCallbackMode mode,
- char *data, gboolean secret,
- CamelService *service, char *item,
- CamelException *ex)
-{
- return NULL;
-}
-
-#define ARRAY_LEN(x) (sizeof(x)/sizeof(x[0]))
-
-static char *local_providers[] = {
- "mbox",
- "mh",
- "maildir"
-};
-
-int main(int argc, char **argv)
-{
- CamelSession *session;
- CamelException *ex;
- int i;
- char *path;
-
- camel_test_init(argc, argv);
-
- ex = camel_exception_new();
-
- /* clear out any camel-test data */
- system("/bin/rm -rf /tmp/camel-test");
-
- session = camel_session_new("/tmp/camel-test", auth_callback, NULL, NULL);
-
- /* todo: cross-check everything with folder_info checks as well */
- /* todo: subscriptions? */
- /* todo: work out how to do imap/pop/nntp tests */
- for (i=0;i<ARRAY_LEN(local_providers);i++) {
- path = g_strdup_printf("%s:///tmp/camel-test/%s", local_providers[i], local_providers[i]);
-
- test_folder_basic(session, path, TRUE);
-
- g_free(path);
- }
-
- camel_object_unref((CamelObject *)session);
- camel_exception_free(ex);
-
- return 0;
-}
diff --git a/camel/tests/folder/test2.c b/camel/tests/folder/test2.c
deleted file mode 100644
index 47e0f44feb..0000000000
--- a/camel/tests/folder/test2.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/* folder testing */
-
-#include "camel-test.h"
-#include "messages.h"
-#include "folders.h"
-
-#include <camel/camel-exception.h>
-#include <camel/camel-service.h>
-#include <camel/camel-session.h>
-#include <camel/camel-store.h>
-
-#include <camel/camel-folder.h>
-#include <camel/camel-folder-summary.h>
-#include <camel/camel-mime-message.h>
-
-/* god, who designed this horrid interface */
-static char *auth_callback(CamelAuthCallbackMode mode,
- char *data, gboolean secret,
- CamelService *service, char *item,
- CamelException *ex)
-{
- return NULL;
-}
-
-
-#define ARRAY_LEN(x) (sizeof(x)/sizeof(x[0]))
-
-static char *stores[] = {
- "mbox:///tmp/camel-test/mbox",
- "mh:///tmp/camel-test/mh",
- "maildir:///tmp/camel-test/maildir"
-};
-
-int main(int argc, char **argv)
-{
- CamelSession *session;
- CamelException *ex;
- int i;
-
- camel_test_init(argc, argv);
-
- /* clear out any camel-test data */
- system("/bin/rm -rf /tmp/camel-test");
-
- ex = camel_exception_new();
-
- session = camel_session_new("/tmp/camel-test", auth_callback, NULL, NULL);
-
- /* we iterate over all stores we want to test, with indexing or indexing turned on or off */
- for (i=0;i<ARRAY_LEN(stores);i++) {
- char *name = stores[i];
-
- test_folder_message_ops(session, name, TRUE);
- }
-
- check_unref(session, 1);
- camel_exception_free(ex);
-
- return 0;
-}
diff --git a/camel/tests/folder/test3.c b/camel/tests/folder/test3.c
deleted file mode 100644
index 99369e5317..0000000000
--- a/camel/tests/folder/test3.c
+++ /dev/null
@@ -1,344 +0,0 @@
-/* folder/index testing */
-
-#include "camel-test.h"
-#include "messages.h"
-#include "folders.h"
-
-#include <camel/camel-exception.h>
-#include <camel/camel-service.h>
-#include <camel/camel-session.h>
-#include <camel/camel-store.h>
-
-#include <camel/camel-folder.h>
-#include <camel/camel-folder-summary.h>
-#include <camel/camel-mime-message.h>
-
-#define ARRAY_LEN(x) (sizeof(x)/sizeof(x[0]))
-
-
-/* god, who designed this horrid interface */
-static char *auth_callback(CamelAuthCallbackMode mode,
- char *data, gboolean secret,
- CamelService *service, char *item,
- CamelException *ex)
-{
- return NULL;
-}
-
-
-static void
-test_folder_search_sub(CamelFolder *folder, const char *expr, int expected)
-{
- CamelException *ex = camel_exception_new();
- GPtrArray *uids;
- GHashTable *hash;
- int i;
-
- uids = camel_folder_search_by_expression(folder, expr, ex);
- check(uids != NULL);
- check_msg(uids->len == expected, "search %s expected %d got %d", expr, expected, uids->len);
- check_msg(!camel_exception_is_set(ex), "%s", camel_exception_get_description(ex));
-
- /* check the uid's are actually unique, too */
- hash = g_hash_table_new(g_str_hash, g_str_equal);
- for (i=0;i<uids->len;i++) {
- check(g_hash_table_lookup(hash, uids->pdata[i]) == NULL);
- g_hash_table_insert(hash, uids->pdata[i], uids->pdata[i]);
- }
- g_hash_table_destroy(hash);
-
- camel_folder_search_free(folder, uids);
-
- camel_exception_free(ex);
-}
-
-static void
-test_folder_search(CamelFolder *folder, const char *expr, int expected)
-{
- char *matchall;
-
-#if 0
- /* FIXME: ??? */
- camel_test_nonfatal("most searches require match-all construct");
- push("Testing search: %s", expr);
- test_folder_search_sub(folder, expr, expected);
- pull();
- camel_test_fatal();
-#endif
-
- matchall = g_strdup_printf("(match-all %s)", expr);
- push("Testing search: %s", matchall);
- test_folder_search_sub(folder, matchall, expected);
- test_free(matchall);
- pull();
-}
-
-static struct {
- int counts[3];
- char *expr;
-} searches[] = {
- { { 1, 1, 0 }, "(header-matches \"subject\" \"Test1 message99 subject\")" },
-
- { { 100, 50, 0 }, "(header-contains \"subject\" \"subject\")" },
- { { 0, 0, 0 }, "(header-contains \"subject\" \"Subject\")" },
-
- { { 100, 50, 0 }, "(body-contains \"content\")" },
- { { 100, 50, 0 }, "(body-contains \"Content\")" },
-
- { { 0, 0, 0 }, "(user-flag \"every7\")" },
- { { 100/13+1, 50/13+1, 0 }, "(user-flag \"every13\")" },
- { { 1, 1, 0 }, "(= \"7tag1\" (user-tag \"every7\"))" },
- { { 100/11+1, 50/11+1, 0 }, "(= \"11tag\" (user-tag \"every11\"))" },
-
- { { 100/13 + 100/17 + 1, 50/13 + 50/17 + 2, 0 }, "(user-flag \"every13\" \"every17\")" },
- { { 100/13 + 100/17 + 1, 50/13 + 50/17 + 2, 0 }, "(or (user-flag \"every13\") (user-flag \"every17\"))" },
- { { 1, 0, 0 }, "(and (user-flag \"every13\") (user-flag \"every17\"))" },
-
- { { 0, 0, 0 }, "(and (header-contains \"subject\" \"Test1\") (header-contains \"subject\" \"Test2\"))" },
- /* we get 11 here as the header-contains is a substring match */
- { { 11, 6, 0 }, "(and (header-contains \"subject\" \"Test1\") (header-contains \"subject\" \"subject\"))" },
- { { 1, 1, 0 }, "(and (header-contains \"subject\" \"Test19\") (header-contains \"subject\" \"subject\"))" },
- { { 0, 0, 0 }, "(and (header-contains \"subject\" \"Test191\") (header-contains \"subject\" \"subject\"))" },
- { { 1, 1, 0 }, "(and (header-contains \"subject\" \"Test1\") (header-contains \"subject\" \"message99\"))" },
-
- { { 22, 11, 0 }, "(or (header-contains \"subject\" \"Test1\") (header-contains \"subject\" \"Test2\"))" },
- { { 2, 1, 0 }, "(or (header-contains \"subject\" \"Test16\") (header-contains \"subject\" \"Test99\"))" },
- { { 1, 1, 0 }, "(or (header-contains \"subject\" \"Test123\") (header-contains \"subject\" \"Test99\"))" },
- { { 100, 50, 0 }, "(or (header-contains \"subject\" \"Test1\") (header-contains \"subject\" \"subject\"))" },
- { { 11, 6, 0 }, "(or (header-contains \"subject\" \"Test1\") (header-contains \"subject\" \"message99\"))" },
-
- /* 72000 is 24*60*100 == half the 'sent date' of the messages */
- { { 100/2, 50/2, 0 }, "(> 72000 (get-sent-date))" },
- { { 100/2-1, 50/2, 0 }, "(< 72000 (get-sent-date))" },
- { { 1, 0, 0 }, "(= 72000 (get-sent-date))" },
- { { 0, 0, 0 }, "(= 72001 (get-sent-date))" },
-
- { { (100/2-1)/17+1, (50/2-1)/17+1, 0 }, "(and (user-flag \"every17\") (< 72000 (get-sent-date)))" },
- { { (100/2-1)/17+1, (50/2-1)/17, 0 }, "(and (user-flag \"every17\") (> 72000 (get-sent-date)))" },
- { { (100/2-1)/13+1, (50/2-1)/13+1, 0 }, "(and (user-flag \"every13\") (< 72000 (get-sent-date)))" },
- { { (100/2-1)/13+1, (50/2-1)/13+1, 0 }, "(and (user-flag \"every13\") (> 72000 (get-sent-date)))" },
-
- { { 100/2+100/2/17, 50/2+50/2/17, 0 }, "(or (user-flag \"every17\") (< 72000 (get-sent-date)))" },
- { { 100/2+100/2/17+1, 50/2+50/2/17+1, 0 }, "(or (user-flag \"every17\") (> 72000 (get-sent-date)))" },
- { { 100/2+100/2/13, 50/2+50/2/13+1, 0 }, "(or (user-flag \"every13\") (< 72000 (get-sent-date)))" },
- { { 100/2+100/2/13+1, 50/2+50/2/13+1, 0 }, "(or (user-flag \"every13\") (> 72000 (get-sent-date)))" },
-};
-
-static void
-run_search(CamelFolder *folder, int m)
-{
- int i, j = 0;
-
- check(m == 50 || m == 100 || m == 0);
-
- /* *shrug* messy, but it'll do */
- if (m==50)
- j = 1;
- else if (m==0)
- j = 2;
-
- push("performing searches, expected %d", m);
- for (i=0;i<ARRAY_LEN(searches);i++) {
- push("running search %d: %s", i, searches[i].expr);
- test_folder_search(folder, searches[i].expr, searches[i].counts[j]);
- pull();
- }
- pull();
-}
-
-
-static char *stores[] = {
- "mbox:///tmp/camel-test/mbox",
- "mh:///tmp/camel-test/mh",
- "maildir:///tmp/camel-test/maildir"
-};
-
-int main(int argc, char **argv)
-{
- CamelSession *session;
- CamelStore *store;
- CamelException *ex;
- CamelFolder *folder;
- CamelMimeMessage *msg;
- int i, j;
- int indexed;
- GPtrArray *uids;
-
- gtk_init(&argc, &argv);
- camel_test_init(argc, argv);
-
- ex = camel_exception_new();
-
- /* clear out any camel-test data */
- system("/bin/rm -rf /tmp/camel-test");
-
- session = camel_session_new("/tmp/camel-test", auth_callback, NULL, NULL);
-
- /* todo: cross-check everything with folder_info checks as well */
- /* todo: work out how to do imap/pop/nntp tests */
-
- /* we iterate over all stores we want to test, with indexing or indexing turned on or off */
- for (i=0;i<ARRAY_LEN(stores);i++) {
- char *name = stores[i];
- for (indexed = 0;indexed<2;indexed++) {
- char *what = g_strdup_printf("folder search: %s (%sindexed)", name, indexed?"":"non-");
- int flags;
-
- camel_test_start(what);
- test_free(what);
-
- push("getting store");
- store = camel_session_get_store(session, stores[i], ex);
- check_msg(!camel_exception_is_set(ex), "getting store: %s", camel_exception_get_description(ex));
- check(store != NULL);
- pull();
-
- push("creating %sindexed folder", indexed?"":"non-");
- if (indexed)
- flags = CAMEL_STORE_FOLDER_CREATE|CAMEL_STORE_FOLDER_BODY_INDEX;
- else
- flags = CAMEL_STORE_FOLDER_CREATE;
- folder = camel_store_get_folder(store, "testbox", flags, ex);
- check_msg(!camel_exception_is_set(ex), "%s", camel_exception_get_description(ex));
- check(folder != NULL);
-
- /* we need an empty folder for this to work */
- test_folder_counts(folder, 0, 0);
- pull();
-
- /* append a bunch of messages with specific content */
- push("appending 100 test messages");
- for (j=0;j<100;j++) {
- char *content, *subject;
-
- push("creating test message");
- msg = test_message_create_simple();
- content = g_strdup_printf("data%d content\n", j);
- test_message_set_content_simple((CamelMimePart *)msg, 0, "text/plain",
- content, strlen(content));
- test_free(content);
- subject = g_strdup_printf("Test%d message%d subject", j, 100-j);
- camel_mime_message_set_subject(msg, subject);
-
- camel_mime_message_set_date(msg, j*60*24, 0);
- pull();
-
- push("appending simple message %d", j);
- camel_folder_append_message(folder, msg, NULL, ex);
- check_msg(!camel_exception_is_set(ex), "%s", camel_exception_get_description(ex));
- pull();
-
- test_free(subject);
-
- check_unref(msg, 1);
- }
- pull();
-
- push("Setting up some flags &c");
- uids = camel_folder_get_uids(folder);
- check(uids->len == 100);
- for (j=0;j<100;j++) {
- char *uid = uids->pdata[j];
-
- if ((j/13)*13 == j) {
- camel_folder_set_message_user_flag(folder, uid, "every13", TRUE);
- }
- if ((j/17)*17 == j) {
- camel_folder_set_message_user_flag(folder, uid, "every17", TRUE);
- }
- if ((j/7)*7 == j) {
- char *tag = g_strdup_printf("7tag%d", j/7);
- camel_folder_set_message_user_tag(folder, uid, "every7", tag);
- test_free(tag);
- }
- if ((j/11)*11 == j) {
- camel_folder_set_message_user_tag(folder, uid, "every11", "11tag");
- }
- }
- camel_folder_free_uids(folder, uids);
- pull();
-
- push("Search before sync");
- run_search(folder, 100);
- pull();
-
- push("syncing folder, searching");
- camel_folder_sync(folder, FALSE, ex);
- run_search(folder, 100);
- pull();
-
- push("syncing wiht expunge, search");
- camel_folder_sync(folder, TRUE, ex);
- run_search(folder, 100);
- pull();
-
- push("deleting every 2nd message");
- uids = camel_folder_get_uids(folder);
- check(uids->len == 100);
- for (j=0;j<uids->len;j+=2) {
- camel_folder_delete_message(folder, uids->pdata[j]);
- }
- camel_folder_free_uids(folder, uids);
- run_search(folder, 100);
-
- push("syncing");
- camel_folder_sync(folder, FALSE, ex);
- check_msg(!camel_exception_is_set(ex), "%s", camel_exception_get_description(ex));
- run_search(folder, 100);
- pull();
-
- push("expunging");
- camel_folder_expunge(folder, ex);
- check_msg(!camel_exception_is_set(ex), "%s", camel_exception_get_description(ex));
- run_search(folder, 50);
- pull();
-
- pull();
-
- push("closing and re-opening folder");
- check_unref(folder, 1);
- folder = camel_store_get_folder(store, "testbox", flags&~(CAMEL_STORE_FOLDER_CREATE), ex);
- check_msg(!camel_exception_is_set(ex), "%s", camel_exception_get_description(ex));
- check(folder != NULL);
-
- push("deleting remaining messages");
- uids = camel_folder_get_uids(folder);
- check(uids->len == 50);
- for (j=0;j<uids->len;j++) {
- camel_folder_delete_message(folder, uids->pdata[j]);
- }
- camel_folder_free_uids(folder, uids);
- run_search(folder, 50);
-
- push("syncing");
- camel_folder_sync(folder, FALSE, ex);
- check_msg(!camel_exception_is_set(ex), "%s", camel_exception_get_description(ex));
- run_search(folder, 50);
- pull();
-
- push("expunging");
- camel_folder_expunge(folder, ex);
- check_msg(!camel_exception_is_set(ex), "%s", camel_exception_get_description(ex));
- run_search(folder, 0);
- pull();
-
- pull();
-
- check_unref(folder, 1);
- pull();
-
- push("deleting test folder, with no messages in it");
- camel_store_delete_folder(store, "testbox", ex);
- check_msg(!camel_exception_is_set(ex), "%s", camel_exception_get_description(ex));
- pull();
-
- check_unref(store, 1);
- camel_test_end();
- }
- }
-
- check_unref(session, 1);
- camel_exception_free(ex);
-
- return 0;
-}
diff --git a/camel/tests/folder/test4.c b/camel/tests/folder/test4.c
deleted file mode 100644
index bae2b7bb0b..0000000000
--- a/camel/tests/folder/test4.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/* store testing, for remote folders */
-
-#include "camel-test.h"
-#include "folders.h"
-
-#include <camel/camel-exception.h>
-#include <camel/camel-service.h>
-#include <camel/camel-session.h>
-#include <camel/camel-store.h>
-
-/* god, who designed this horrid interface */
-static char *auth_callback(CamelAuthCallbackMode mode,
- char *data, gboolean secret,
- CamelService *service, char *item,
- CamelException *ex)
-{
- return NULL;
-}
-
-static int regtimeout()
-{
- return 1;
-}
-
-static int unregtimeout()
-{
- return 1;
-}
-
-
-#define ARRAY_LEN(x) (sizeof(x)/sizeof(x[0]))
-
-static char *remote_providers[] = {
- "IMAP_TEST_URL",
-};
-
-int main(int argc, char **argv)
-{
- CamelSession *session;
- CamelException *ex;
- int i;
- char *path;
-
- camel_test_init(argc, argv);
-
- ex = camel_exception_new();
-
- /* clear out any camel-test data */
- system("/bin/rm -rf /tmp/camel-test");
-
- session = camel_session_new("/tmp/camel-test", auth_callback, regtimeout, unregtimeout);
-
- /* todo: cross-check everything with folder_info checks as well */
- /* todo: subscriptions? */
- for (i=0;i<ARRAY_LEN(remote_providers);i++) {
- path = getenv(remote_providers[i]);
-
- if (path == NULL) {
- printf("Aborted (ignored).\n");
- printf("Set '%s', to re-run test.\n", remote_providers[i]);
- /* tells make check to ignore us in the total count */
- _exit(77);
- }
- camel_test_nonfatal("The IMAP code is just rooted");
- test_folder_basic(session, path, FALSE);
- camel_test_fatal();
- }
-
- camel_object_unref((CamelObject *)session);
- camel_exception_free(ex);
-
- return 0;
-}
diff --git a/camel/tests/folder/test5.c b/camel/tests/folder/test5.c
deleted file mode 100644
index 9e2544d7e5..0000000000
--- a/camel/tests/folder/test5.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/* store testing, for remote folders */
-
-#include "camel-test.h"
-#include "folders.h"
-
-#include <camel/camel-exception.h>
-#include <camel/camel-service.h>
-#include <camel/camel-session.h>
-#include <camel/camel-store.h>
-
-/* god, who designed this horrid interface */
-static char *auth_callback(CamelAuthCallbackMode mode,
- char *data, gboolean secret,
- CamelService *service, char *item,
- CamelException *ex)
-{
- return NULL;
-}
-
-static int regtimeout()
-{
- return 1;
-}
-
-static int unregtimeout()
-{
- return 1;
-}
-
-
-#define ARRAY_LEN(x) (sizeof(x)/sizeof(x[0]))
-
-static char *remote_providers[] = {
- "NNTP_TEST_URL",
-};
-
-int main(int argc, char **argv)
-{
- CamelSession *session;
- CamelException *ex;
- int i;
- char *path;
-
- camel_test_init(argc, argv);
-
- ex = camel_exception_new();
-
- /* clear out any camel-test data */
- system("/bin/rm -rf /tmp/camel-test");
-
- session = camel_session_new("/tmp/camel-test", auth_callback, regtimeout, unregtimeout);
-
- /* todo: cross-check everything with folder_info checks as well */
- /* todo: subscriptions? */
- for (i=0;i<ARRAY_LEN(remote_providers);i++) {
- path = getenv(remote_providers[i]);
-
- if (path == NULL) {
- printf("Aborted (ignored).\n");
- printf("Set '%s', to re-run test.\n", remote_providers[i]);
- /* tells make check to ignore us in the total count */
- _exit(77);
- }
- camel_test_nonfatal("Not sure how many tests apply to NNTP");
- test_folder_basic(session, path, FALSE);
- camel_test_fatal();
- }
-
- camel_object_unref((CamelObject *)session);
- camel_exception_free(ex);
-
- return 0;
-}
diff --git a/camel/tests/folder/test6.c b/camel/tests/folder/test6.c
deleted file mode 100644
index 6f4e387fca..0000000000
--- a/camel/tests/folder/test6.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/* folder testing */
-
-#include "camel-test.h"
-#include "messages.h"
-
-#include <camel/camel-exception.h>
-#include <camel/camel-service.h>
-#include <camel/camel-session.h>
-#include <camel/camel-store.h>
-
-#include <camel/camel-folder.h>
-#include <camel/camel-folder-summary.h>
-#include <camel/camel-mime-message.h>
-
-/* god, who designed this horrid interface */
-static char *auth_callback(CamelAuthCallbackMode mode,
- char *data, gboolean secret,
- CamelService *service, char *item,
- CamelException *ex)
-{
- return NULL;
-}
-
-static int regtimeout()
-{
- return 1;
-}
-
-static int unregtimeout()
-{
- return 1;
-}
-
-#define ARRAY_LEN(x) (sizeof(x)/sizeof(x[0]))
-
-static char *remote_providers[] = {
- "IMAP_TEST_URL",
-};
-
-int main(int argc, char **argv)
-{
- CamelSession *session;
- CamelException *ex;
- int i;
- char *path;
-
- camel_test_init(argc, argv);
-
- /* clear out any camel-test data */
- system("/bin/rm -rf /tmp/camel-test");
-
- ex = camel_exception_new();
-
- session = camel_session_new("/tmp/camel-test", auth_callback, regtimeout, unregtimeout);
-
- for (i=0;i<ARRAY_LEN(remote_providers);i++) {
- path = getenv(remote_providers[i]);
-
- if (path == NULL) {
- printf("Aborted (ignored).\n");
- printf("Set '%s', to re-run test.\n", remote_providers[i]);
- /* tells make check to ignore us in the total count */
- _exit(77);
- }
- /*camel_test_nonfatal("The IMAP code is just rooted");*/
- test_folder_message_ops(session, path, FALSE);
- /*camel_test_fatal();*/
- }
-
- check_unref(session, 1);
- camel_exception_free(ex);
-
- return 0;
-}
diff --git a/camel/tests/folder/test7.c b/camel/tests/folder/test7.c
deleted file mode 100644
index 7acacebbcd..0000000000
--- a/camel/tests/folder/test7.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/* folder testing */
-
-#include "camel-test.h"
-#include "messages.h"
-
-#include <camel/camel-exception.h>
-#include <camel/camel-service.h>
-#include <camel/camel-session.h>
-#include <camel/camel-store.h>
-
-#include <camel/camel-folder.h>
-#include <camel/camel-folder-summary.h>
-#include <camel/camel-mime-message.h>
-
-/* god, who designed this horrid interface */
-static char *auth_callback(CamelAuthCallbackMode mode,
- char *data, gboolean secret,
- CamelService *service, char *item,
- CamelException *ex)
-{
- return NULL;
-}
-
-static int regtimeout()
-{
- return 1;
-}
-
-static int unregtimeout()
-{
- return 1;
-}
-
-#define ARRAY_LEN(x) (sizeof(x)/sizeof(x[0]))
-
-static char *remote_providers[] = {
- "NNTP_TEST_URL",
-};
-
-int main(int argc, char **argv)
-{
- CamelSession *session;
- CamelException *ex;
- int i;
- char *path;
-
- camel_test_init(argc, argv);
-
- /* clear out any camel-test data */
- system("/bin/rm -rf /tmp/camel-test");
-
- ex = camel_exception_new();
-
- session = camel_session_new("/tmp/camel-test", auth_callback, regtimeout, unregtimeout);
-
- for (i=0;i<ARRAY_LEN(remote_providers);i++) {
- path = getenv(remote_providers[i]);
-
- if (path == NULL) {
- printf("Aborted (ignored).\n");
- printf("Set '%s', to re-run test.\n", remote_providers[i]);
- /* tells make check to ignore us in the total count */
- _exit(77);
- }
- camel_test_nonfatal("Dont know how many tests apply to NNTP");
- test_folder_message_ops(session, path, FALSE);
- camel_test_fatal();
- }
-
- check_unref(session, 1);
- camel_exception_free(ex);
-
- return 0;
-}
diff --git a/camel/tests/folder/test8.c b/camel/tests/folder/test8.c
deleted file mode 100644
index 5665f96f2a..0000000000
--- a/camel/tests/folder/test8.c
+++ /dev/null
@@ -1,223 +0,0 @@
-/* threaded folder testing */
-
-#include "camel-test.h"
-#include "folders.h"
-#include "messages.h"
-
-#include <camel/camel-exception.h>
-#include <camel/camel-service.h>
-#include <camel/camel-session.h>
-#include <camel/camel-store.h>
-
-#define MAX_MESSAGES (100)
-#define MAX_THREADS (10)
-
-#define d(x)
-
-#ifndef ENABLE_THREADS
-int main(int argc, char **argv)
-{
- printf("Test %s is only compiled with threads enabled\n", argv[0]);
- return 77;
-}
-#else
-
-#include <pthread.h>
-
-/* god, who designed this horrid interface */
-static char *auth_callback(CamelAuthCallbackMode mode,
- char *data, gboolean secret,
- CamelService *service, char *item,
- CamelException *ex)
-{
- return NULL;
-}
-
-#define ARRAY_LEN(x) (sizeof(x)/sizeof(x[0]))
-
-static char *local_providers[] = {
- "mbox",
- "mh",
- "maildir"
-};
-
-static void
-test_add_message(CamelFolder *folder, int j)
-{
- CamelMimeMessage *msg;
- char *content;
- char *subject;
- CamelException ex;
-
- camel_exception_init(&ex);
-
- push("creating message %d\n", j);
- msg = test_message_create_simple();
- content = g_strdup_printf("Test message %d contents\n\n", j);
- test_message_set_content_simple((CamelMimePart *)msg, 0, "text/plain",
- content, strlen(content));
- test_free(content);
- subject = g_strdup_printf("Test message %d subject", j);
- camel_mime_message_set_subject(msg, subject);
- pull();
-
- push("appending simple message %d", j);
- camel_folder_append_message(folder, msg, NULL, &ex);
- check_msg(!camel_exception_is_set(&ex), "%s", camel_exception_get_description(&ex));
- pull();
-
- check_unref(msg, 1);
-}
-
-struct _threadinfo {
- int id;
- CamelFolder *folder;
-};
-
-static void *
-worker(void *d)
-{
- struct _threadinfo *info = d;
- int i, j, id = info->id;
- char *sub, *content;
- GPtrArray *res;
- CamelException *ex = camel_exception_new();
- CamelMimeMessage *msg;
-
- /* we add a message, search for it, twiddle some flags, delete it */
- /* and flat out */
- for (i=0;i<MAX_MESSAGES;i++) {
- d(printf("Thread %ld message %i\n", pthread_self(), i));
- test_add_message(info->folder, id+i);
-
- sub = g_strdup_printf("(match-all (header-contains \"subject\" \"message %d subject\"))", id+i);
-
- push("searching for message %d\n\tusing: %s", id+i, sub);
- res = camel_folder_search_by_expression(info->folder, sub, ex);
- check_msg(!camel_exception_is_set(ex), "%s", camel_exception_get_description(ex));
- check_msg(res->len == 1, "res->len = %d", res->len);
- pull();
-
- push("getting message '%s'", res->pdata[0]);
- msg = camel_folder_get_message(info->folder, (char *)res->pdata[0], ex);
- check_msg(!camel_exception_is_set(ex), "%s", camel_exception_get_description(ex));
- pull();
-
- push("comparing content");
- content = g_strdup_printf("Test message %d contents\n\n", id+i);
- test_message_compare_content(camel_medium_get_content_object((CamelMedium *)msg), content, strlen(content));
- test_free(content);
- pull();
-
- push("deleting message, cleanup");
- j=(100.0*rand()/(RAND_MAX+1.0));
- if (j<=70) {
- camel_folder_delete_message(info->folder, res->pdata[0]);
- }
-
- camel_folder_search_free(info->folder, res);
- res = NULL;
- test_free(sub);
-
- check_unref(msg, 1);
- pull();
-
- /* about 1-in 100 calls will expunge */
- j=(200.0*rand()/(RAND_MAX+1.0));
- if (j<=2) {
- d(printf("Forcing an expuge\n"));
- push("expunging folder");
- camel_folder_expunge(info->folder, ex);
- check_msg(!camel_exception_is_set(ex), "%s", camel_exception_get_description(ex));
- pull();
- }
- }
-
- camel_exception_free(ex);
-
- return info;
-}
-
-int main(int argc, char **argv)
-{
- CamelSession *session;
- CamelException *ex;
- int i, j, index;
- char *path;
- CamelStore *store;
- pthread_t threads[MAX_THREADS];
- struct _threadinfo *info;
- CamelFolder *folder;
- GPtrArray *uids;
-
- camel_test_init(argc, argv);
-
- ex = camel_exception_new();
-
- /* clear out any camel-test data */
- system("/bin/rm -rf /tmp/camel-test");
-
- session = camel_session_new("/tmp/camel-test", auth_callback, NULL, NULL);
-
- for (j=0;j<ARRAY_LEN(local_providers);j++) {
- for (index=0;index<2;index++) {
- path = g_strdup_printf("method %s %s", local_providers[j], index?"indexed":"nonindexed");
- camel_test_start(path);
- test_free(path);
-
- push("trying %s index %d", local_providers[j], index);
- path = g_strdup_printf("%s:///tmp/camel-test/%s", local_providers[j], local_providers[j]);
- store = camel_session_get_store(session, path, ex);
- check_msg(!camel_exception_is_set(ex), "%s", camel_exception_get_description(ex));
- test_free(path);
-
- if (index == 0)
- folder = camel_store_get_folder(store, "testbox", CAMEL_STORE_FOLDER_CREATE, ex);
- else
- folder = camel_store_get_folder(store, "testbox",
- CAMEL_STORE_FOLDER_CREATE|CAMEL_STORE_FOLDER_BODY_INDEX, ex);
- check_msg(!camel_exception_is_set(ex), "%s", camel_exception_get_description(ex));
-
- for (i=0;i<MAX_THREADS;i++) {
- info = g_malloc(sizeof(*info));
- info->id = i*MAX_MESSAGES;
- info->folder = folder;
- pthread_create(&threads[i], 0, worker, info);
- }
-
- for (i=0;i<MAX_THREADS;i++) {
- pthread_join(threads[i], (void **)&info);
- g_free(info);
- }
- pull();
-
- push("deleting remaining messages");
- uids = camel_folder_get_uids(folder);
- for (i=0;i<uids->len;i++) {
- camel_folder_delete_message(folder, uids->pdata[i]);
- }
- camel_folder_free_uids(folder, uids);
-
- camel_folder_expunge(folder, ex);
- check_msg(!camel_exception_is_set(ex), "%s", camel_exception_get_description(ex));
-
- check_unref(folder, 1);
-
- camel_store_delete_folder(store, "testbox", ex);
- check_msg(!camel_exception_is_set(ex), "%s", camel_exception_get_description(ex));
-
- check_unref(store, 1);
-
- pull();
-
- camel_test_end();
- }
- }
-
- camel_object_unref((CamelObject *)session);
- camel_exception_free(ex);
-
- return 0;
-}
-
-#endif /* ENABLE_THREADS */
diff --git a/camel/tests/folder/test9.c b/camel/tests/folder/test9.c
deleted file mode 100644
index 3b757815b0..0000000000
--- a/camel/tests/folder/test9.c
+++ /dev/null
@@ -1,234 +0,0 @@
-/* folder/index testing */
-
-#include "camel-test.h"
-#include "messages.h"
-#include "folders.h"
-
-#include "camel/camel-exception.h"
-#include "camel/camel-service.h"
-#include "camel/camel-session.h"
-#include "camel/camel-store.h"
-
-#include "camel/camel-folder.h"
-#include "camel/camel-folder-summary.h"
-#include "camel/camel-mime-message.h"
-#include "camel/camel-filter-driver.h"
-#include "camel/camel-stream-fs.h"
-
-#define ARRAY_LEN(x) (sizeof(x)/sizeof(x[0]))
-
-
-/* god, who designed this horrid interface */
-static char *auth_callback(CamelAuthCallbackMode mode,
- char *data, gboolean secret,
- CamelService *service, char *item,
- CamelException *ex)
-{
- return NULL;
-}
-
-struct {
- char *name;
- CamelFolder *folder;
-} mailboxes[] = {
- { "INBOX", NULL },
- { "folder1", NULL },
- { "folder2", NULL },
- { "folder3", NULL },
- { "folder4", NULL },
-};
-
-struct {
- char *name, *match, *action;
-} rules[] = {
- { "empty1", "(match-all (header-contains \"Frobnitz\"))", "(copy-to \"folder1\")" },
- { "empty2", "(header-contains \"Frobnitz\")", "(copy-to \"folder2\")" },
- { "count11", "(and (header-contains \"subject\" \"Test1\") (header-contains \"subject\" \"subject\"))", "(move-to \"folder3\")" },
- { "empty3", "(and (header-contains \"subject\" \"Test1\") (header-contains \"subject\" \"subject\"))", "(move-to \"folder4\")" },
- { "count1", "(body-contains \"data50\")", "(copy-to \"folder1\")" },
- { "stop", "(body-contains \"data2\")", "(stop)" },
- { "notreached1", "(body-contains \"data2\")", "(move-to \"folder2\")" },
- { "count1", "(body-contains \"data3\")", "(move-to \"folder2\")" },
- { "ustrcasecmp", "(header-matches \"Subject\" \"Test0 message100 subject\")", "(copy-to \"folder2\")" },
-};
-
-/* broken match rules */
-struct {
- char *name, *match, *action;
-} brokens[] = {
- { "count1", "(body-contains data50)", "(copy-to \"folder1\")" }, /* non string argument */
- { "count1", "(body-contains-stuff \"data3\")", "(move-to-folder \"folder2\")" }, /* invalid function */
- { "count1", "(or (body-contains \"data3\") (foo))", "(move-to-folder \"folder2\")" }, /* invalid function */
- { "count1", "(or (body-contains \"data3\") (foo)", "(move-to-folder \"folder2\")" }, /* missing ) */
- { "count1", "(and body-contains \"data3\") (foo)", "(move-to-folder \"folder2\")" }, /* missing ( */
- { "count1", "body-contains \"data3\")", "(move-to-folder \"folder2\")" }, /* missing ( */
- { "count1", "body-contains \"data3\"", "(move-to-folder \"folder2\")" }, /* missing ( ) */
- { "count1", "(body-contains \"data3\" ())", "(move-to-folder \"folder2\")" }, /* extra () */
- { "count1", "()", "(move-to-folder \"folder2\")" }, /* invalid () */
- { "count1", "", "(move-to-folder \"folder2\")" }, /* empty */
-};
-
-/* broken action rules */
-struct {
- char *name, *match, *action;
-} brokena[] = {
- { "a", "(body-contains \"data2\")", "(body-contains \"help\")" }, /* rule in action */
- { "a", "(body-contains \"data2\")", "(move-to-folder-name \"folder2\")" }, /* unknown function */
- { "a", "(body-contains \"data2\")", "(or (move-to-folder \"folder2\")" }, /* missing ) */
- { "a", "(body-contains \"data2\")", "(or move-to-folder \"folder2\"))" }, /* missing ( */
- { "a", "(body-contains \"data2\")", "move-to-folder \"folder2\")" }, /* missing ( */
- { "a", "(body-contains \"data2\")", "(move-to-folder \"folder2\" ())" }, /* invalid () */
- { "a", "(body-contains \"data2\")", "()" }, /* invalid () */
- { "a", "(body-contains \"data2\")", "" }, /* empty */
-};
-
-static CamelFolder *get_folder(CamelFilterDriver *d, const char *uri, void *data, CamelException *ex)
-{
- int i;
-
- for (i=0;i<ARRAY_LEN(mailboxes);i++)
- if (!strcmp(mailboxes[i].name, uri)) {
- camel_object_ref((CamelObject *)mailboxes[i].folder);
- return mailboxes[i].folder;
- }
- return NULL;
-}
-
-int main(int argc, char **argv)
-{
- CamelSession *session;
- CamelStore *store;
- CamelException *ex;
- CamelFolder *folder;
- CamelMimeMessage *msg;
- int i, j;
- CamelStream *mbox;
- CamelFilterDriver *driver;
-
- /*gtk_init(&argc, &argv);*/
-
- camel_test_init(argc, argv);
-
- ex = camel_exception_new();
-
- /* clear out any camel-test data */
- system("/bin/rm -rf /tmp/camel-test");
-
- camel_test_start("Simple filtering of mbox");
-
- session = camel_session_new("/tmp/camel-test", auth_callback, NULL, NULL);
-
- /* todo: cross-check everything with folder_info checks as well */
- /* todo: work out how to do imap/pop/nntp tests */
-
- push("getting store");
- store = camel_session_get_store(session, "mbox:///tmp/camel-test/mbox", ex);
- check_msg(!camel_exception_is_set(ex), "getting store: %s", camel_exception_get_description(ex));
- check(store != NULL);
- pull();
-
- push("Creating output folders");
- for (i=0;i<ARRAY_LEN(mailboxes);i++) {
- push("creating %s", mailboxes[i].name);
- mailboxes[i].folder = folder = camel_store_get_folder(store, mailboxes[i].name, CAMEL_STORE_FOLDER_CREATE, ex);
- check_msg(!camel_exception_is_set(ex), "%s", camel_exception_get_description(ex));
- check(folder != NULL);
-
- /* we need an empty folder for this to work */
- test_folder_counts(folder, 0, 0);
- pull();
- }
- pull();
-
- /* append a bunch of messages with specific content */
- push("creating 100 test message mbox");
- mbox = camel_stream_fs_new_with_name("/tmp/camel-test/inbox", O_WRONLY|O_CREAT|O_EXCL, 0600);
- for (j=0;j<100;j++) {
- char *content, *subject;
-
- push("creating test message");
- msg = test_message_create_simple();
- content = g_strdup_printf("data%d content\n", j);
- test_message_set_content_simple((CamelMimePart *)msg, 0, "text/plain",
- content, strlen(content));
- test_free(content);
- subject = g_strdup_printf("Test%d message%d subject", j, 100-j);
- camel_mime_message_set_subject(msg, subject);
-
- camel_mime_message_set_date(msg, j*60*24, 0);
- pull();
-
- camel_stream_printf(mbox, "From \n");
- check(camel_data_wrapper_write_to_stream((CamelDataWrapper *)msg, mbox) != -1);
-#if 0
- push("appending simple message %d", j);
- camel_folder_append_message(folder, msg, NULL, ex);
- check_msg(!camel_exception_is_set(ex), "%s", camel_exception_get_description(ex));
- pull();
-#endif
- test_free(subject);
-
- check_unref(msg, 1);
- }
- check(camel_stream_close(mbox) != -1);
- check_unref(mbox, 1);
- pull();
-
- push("Building filters");
- driver = camel_filter_driver_new(get_folder, NULL);
- for (i=0;i<ARRAY_LEN(rules);i++) {
- camel_filter_driver_add_rule(driver, rules[i].name, rules[i].match, rules[i].action);
- }
- pull();
-
- push("Executing filters");
- camel_filter_driver_set_default_folder(driver, mailboxes[0].folder);
- camel_filter_driver_filter_mbox(driver, "/tmp/camel-test/inbox", ex);
- check_msg(!camel_exception_is_set(ex), "%s", camel_exception_get_description(ex));
-
- /* now need to check the folder counts/etc */
-
- check_unref(driver, 1);
- pull();
-
- /* this tests that invalid rules are caught */
- push("Testing broken match rules");
- for (i=0;i<ARRAY_LEN(brokens);i++) {
- push("rule %s", brokens[i].match);
- driver = camel_filter_driver_new(get_folder, NULL);
- camel_filter_driver_add_rule(driver, brokens[i].name, brokens[i].match, brokens[i].action);
- camel_filter_driver_filter_mbox(driver, "/tmp/camel-test/inbox", ex);
- check(camel_exception_is_set(ex));
- camel_exception_clear(ex);
- check_unref(driver, 1);
- pull();
- }
- pull();
-
- push("Testing broken action rules");
- for (i=0;i<ARRAY_LEN(brokena);i++) {
- push("rule %s", brokena[i].action);
- driver = camel_filter_driver_new(get_folder, NULL);
- camel_filter_driver_add_rule(driver, brokena[i].name, brokena[i].match, brokena[i].action);
- camel_filter_driver_filter_mbox(driver, "/tmp/camel-test/inbox", ex);
- check(camel_exception_is_set(ex));
- camel_exception_clear(ex);
- check_unref(driver, 1);
- pull();
- }
- pull();
-
-
- for (i=0;i<ARRAY_LEN(mailboxes);i++) {
- check_unref(mailboxes[i].folder, 1);
- }
-
- check_unref(store, 1);
-
- check_unref(session, 1);
- camel_exception_free(ex);
-
- camel_test_end();
-
- return 0;
-}
diff --git a/camel/tests/lib/.cvsignore b/camel/tests/lib/.cvsignore
deleted file mode 100644
index ba98331a6d..0000000000
--- a/camel/tests/lib/.cvsignore
+++ /dev/null
@@ -1,12 +0,0 @@
-.deps
-Makefile
-Makefile.in
-.libs
-.deps
-*.lo
-*.la
-temp-test
-*.bb
-*.bbg
-*.da
-*.gcov
diff --git a/camel/tests/lib/Makefile.am b/camel/tests/lib/Makefile.am
deleted file mode 100644
index ea51a2c28a..0000000000
--- a/camel/tests/lib/Makefile.am
+++ /dev/null
@@ -1,13 +0,0 @@
-
-INCLUDES = -I$(includedir)
-
-check_LIBRARIES = libcameltest.a
-
-libcameltest_a_SOURCES = \
- camel-test.c camel-test.h \
- messages.c messages.h \
- addresses.c addresses.h \
- folders.c folders.h \
- streams.c streams.h \
- address-data.h
-
diff --git a/camel/tests/lib/address-data.h b/camel/tests/lib/address-data.h
deleted file mode 100644
index acecac596a..0000000000
--- a/camel/tests/lib/address-data.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/* BE WARY of editing this file with emacs.
- Otherwise it might be smart and try to re-encode everything, which
- you really do not want
-*/
-
-static struct _a {
- int count;
- char *addr;
- char *utf8; /* the utf8 in this table was generated by camel itself. As a result i'm making the assumption it
- was right when it was created. It also depends on the format of ::format(),. which is likely to
- change, to handle other bugs ! */
-} test_address[] = {
- { 1, "\"=?ISO-8859-1?Q?David_Guti=E9rrez_Magallanes?=\" <david@iiia.csic.es>", "David Gutiérrez Magallanes <david@iiia.csic.es>" },
- { 1, "\"=?iso-8859-1?Q?Jos=E9?= Antonio Milke G.\" <gerencia@ovoplus.com>", "José Antonio Milke G. <gerencia@ovoplus.com>" },
- { 1, "\"=?iso-8859-2?Q?Hi-Fi_Internert_market_=3D_1.Virtu=E1ln=ED_Internetov=E9_H?= =?iso-8859-2?Q?i-Fi_Studio?=\" <hifimarket@atlas.cz>", "Hi-Fi Internert market = 1.Virtuální Internetové Hi-Fi Studio <hifimarket@atlas.cz>" },
- { 3, "\"James M. Cape\" <jcape@jcinteractive.com>, =?iso-8859-1?Q?Joaqu=EDn_Cuenca_Abela?= <cuenca@ie2.u-psud.fr>, gnome-hackers@nuclecu.unam.mx", "James M. Cape <jcape@jcinteractive.com>, Joaquín Cuenca Abela <cuenca@ie2.u-psud.fr>, gnome-hackers@nuclecu.unam.mx" },
- { 1, "=?ISO-8859-1?Q?David_Guti=E9rrez_Magallanes?= <david@iiia.csic.es>", "David Gutiérrez Magallanes <david@iiia.csic.es>" },
- { 1, "=?ISO-8859-2?Q?Tomasz_K=B3oczko?= <kloczek@rudy.mif.pg.gda.pl>", "Tomasz KÅ‚oczko <kloczek@rudy.mif.pg.gda.pl>" },
- { 1, "=?ISO-8859-2?Q?Vladim=EDr_Solnick=FD?= <vs@utia.cas.cz>", "Vladimír Solnický <vs@utia.cas.cz>" },
- { 1, "=?iso-8859-1?Q?=22S=F6rensen=2C_Daniel=22?= <dasar@wmdata.com>", "\"Sörensen, Daniel\" <dasar@wmdata.com>" },
- { 1, "=?iso-8859-1?Q?=C1=C2=AAQ=A7=CA?= <dennys@iim.nctu.edu.tw>", "êQ§Ê <dennys@iim.nctu.edu.tw>" },
- { 1, "=?iso-8859-1?Q?=C1=C2=AAQ=A7=CA?= <dennys@news.iim.nctu.edu.tw>", "êQ§Ê <dennys@news.iim.nctu.edu.tw>" },
- { 1, "=?iso-8859-1?Q?=C1kos?= Valentinyi <A.Valentinyi@soton.ac.uk>", "Ãkos Valentinyi <A.Valentinyi@soton.ac.uk>" },
- { 1, "=?iso-8859-1?Q?Joaqu=EDn?= Cuenca Abela <cuenca@ie2.u-psud.fr>", "Joaquín Cuenca Abela <cuenca@ie2.u-psud.fr>" },
- { 2, "=?iso-8859-1?Q?Joaqu=EDn?= Cuenca Abela <cuenca@ie2.u-psud.fr>, gnome-hackers@nuclecu.unam.mx", "Joaquín Cuenca Abela <cuenca@ie2.u-psud.fr>, gnome-hackers@nuclecu.unam.mx" },
- { 1, "=?iso-8859-1?Q?Joaqu=EDn_Cuenca_Abela?= <cuenca@celium.net>", "Joaquín Cuenca Abela <cuenca@celium.net>" },
- { 1, "=?iso-8859-1?Q?Juantom=E1s=20Garc=EDa?= <juantomas@lared.es>", "Juantomás García <juantomas@lared.es>" },
- { 1, "=?iso-8859-1?Q?Kenneth_ll=E9phaane_Christiansen?= <kenneth@ripen.dk>", "Kenneth lléphaane Christiansen <kenneth@ripen.dk>" },
- { 1, "=?iso-8859-1?Q?Kjell_Tage_=D8hman?= <tage@ohman.no>", "Kjell Tage Øhman <tage@ohman.no>" },
- { 1, "=?iso-8859-1?Q?Martin_Norb=E4ck?= <d95mback@dtek.chalmers.se>", "Martin Norbäck <d95mback@dtek.chalmers.se>" },
- { 1, "=?iso-8859-1?Q?P=E5llen?= <pollen@astrakan.hig.se>", "PÃ¥llen <pollen@astrakan.hig.se>" },
- { 1, "=?iso-8859-1?Q?Ville_P=E4tsi?= <drc@gnu.org>", "Ville Pätsi <drc@gnu.org>" },
- { 1, "=?iso-8859-1?q?Joaqu=EDn?= Cuenca Abela <cuenca@celium.net>", "Joaquín Cuenca Abela <cuenca@celium.net>" },
- { 1, "=?iso-8859-2?Q?Dra=BEen_Ka=E8ar?= <dave@srce.hr>", "Dražen KaÄar <dave@srce.hr>" },
- /* yep this is right, this isn't valid so doesn't decode at all */
- { 1, "=?windows-1250?Q? \"Jaka Mo=E8nik\" ?= <jaka.mocnik@kiss.uni-lj.si>", "=?windows-1250?Q? Jaka Mo=E8nik ?= <jaka.mocnik@kiss.uni-lj.si>" },
- { 3, "George <jirka@5z.com>, Juantomas =?ISO-8859-1?Q?Garc=C3=83=C2=ADa?= <juantomas@lared.es>, gnome-hackers@gnome.org", "George <jirka@5z.com>, Juantomas García <juantomas@lared.es>, gnome-hackers@gnome.org" },
- { 7, "Jon Trowbridge <trow@emccta.com>, gnome-1.4-list@gnome.org, gnome-devel-list@gnome.org, gnome-hackers@gnome.org, Dom Lachowicz <cinamod@hotmail.com>, =?iso-8859-1?Q?Joaqu=EDn_Cuenca_Abela?= <cuenca@celium.net>, sam th <sam@uchicago.edu>", "Jon Trowbridge <trow@emccta.com>, gnome-1.4-list@gnome.org, gnome-devel-list@gnome.org, gnome-hackers@gnome.org, Dom Lachowicz <cinamod@hotmail.com>, Joaquín Cuenca Abela <cuenca@celium.net>, sam th <sam@uchicago.edu>" },
- { 6, "Jon Trowbridge <trow@emccta.com>, gnome-1.4-list@gnome.org, gnome-devel-list@gnome.org, gnome-hackers@gnome.org, Dom Lachowicz <cinamod@hotmail.com>, =?iso-8859-1?Q?Joaqu=EDn_Cuenca_Abela?= <cuenca@ie2.u-psud.fr>", "Jon Trowbridge <trow@emccta.com>, gnome-1.4-list@gnome.org, gnome-devel-list@gnome.org, gnome-hackers@gnome.org, Dom Lachowicz <cinamod@hotmail.com>, Joaquín Cuenca Abela <cuenca@ie2.u-psud.fr>" },
- { 1, "Kai =?iso-8859-1?Q?Gro=DFjohann?= <Kai.Grossjohann@CS.Uni-Dortmund.DE>", "Kai Großjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE>" },
- { 1, "Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai =?iso-8859-1?q?Gro=DFjohann?=)", "Kai Großjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE>" },
- { 1, "Rickard =?iso-8859-1?Q?Nordstr=F6m?= <rzi@ebox.tninet.se>", "Rickard Nordström <rzi@ebox.tninet.se>" },
- { 1, "Tomasz =?iso-8859-2?q?K=B3oczko?= <kloczek@rudy.mif.pg.gda.pl>", "Tomasz KÅ‚oczko <kloczek@rudy.mif.pg.gda.pl>" },
- { 1, "VALCKE =?iso-8859-1?Q?C=E9dric?= <cvalcke@freesurf.fr>", "VALCKE Cédric <cvalcke@freesurf.fr>" },
- { 1, "Ville =?iso-8859-1?q?P=E4tsi?= <drc@gnu.org>", "Ville Pätsi <drc@gnu.org>" },
- { 1, "david@iiia.csic.es (=?ISO-8859-1?Q?David_Guti=E9rrez_Magallanes?=)", "David Gutiérrez Magallanes <david@iiia.csic.es>" },
- { 1, "kloczek@rudy.mif.pg.gda.pl (=?ISO-8859-2?Q?Tomasz_K=B3oczko?=)", "Tomasz KÅ‚oczko <kloczek@rudy.mif.pg.gda.pl>" },
- { 1, "lassehp@imv.aau.dk (Lasse =?ISO-8859-1?Q?Hiller=F8e?= Petersen)", "Lasse Hillerøe Petersen <lassehp@imv.aau.dk>" },
- { 1, "ysato@etl.go.jp (Yutaka Sato =?ISO-2022-JP?B?GyRAOjRGI0stGyhK?=)", "Yutaka Sato ä½è—¤è±Š <ysato@etl.go.jp>" },
-};
-
-static struct _l {
- char *type;
- char *line;
-} test_lines[] = {
- /* commented out unsupported charsets - FIXME: camel should somehow handle this, although it can't really of course */
- /*{ "windows-1251", "Åäèí àïëåò íå îòãîâàðÿ íà çàÿâêà çà çàïèñ.\nÄà ãî ïðåìàõíà ëè èëè äà ïî÷àêàì?" },*/
- { "iso-8859-1", "Omple les miniatures de la finestra amb contingut de la pantalla" },
- { "ISO-8859-2", "Správce oken hýbe s okrajem okna\n(AfterStep, Enlightenment, FVWM, IceWM, Sawmill)" },
- { "ISO-8859-1", "Vindueshåndtering flytter dekorationsvindue istedet\n(AfterStep, Enlightenment, FVWM, IceWM, Sawfish)" },
- { "ISO-8859-1", "Vorschaubilder der Fenster mit dem Bildschirminhalt ausfüllen" },
- { "iso-8859-7", "ÅìöÜíéóç åñãáóéþí ðïõ äå öáßíïíôáé óôç ëßóôá ðáñáèýñùí (ÐÁÑÁÊÁÌØÇ-ËÉÓÔÁÐÁÑÁÈÕÑÙÍ)" },
- { "iso-8859-1", "You've chosen to disable the startup hint.\nTo re-enable it, choose \"Startup Hint\"\nin the GNOME Control Centre" },
- { "iso-8859-1", "El aplique de reloj muestra en su panel la fecha y la hora de forma simple \ny ligero " },
- { "iso-8859-1", "Applet ei vasta salvestuskäsule.\nKas peaks ta niisama sulgema, või veel ootama?" },
- { "iso-8859-1", "Lehio kudeatzaileak lehioaren dekorazaioa mugiarazten\n(AfterStep, Enlightenment, FVWM, IceWM, Sawmill)" },
- { "iso-8859-15", "Näytä sovellukset, joiden ikkunoista on näkyvillä vain otsikkopalkki" },
- { "ISO-8859-1", "Afficher les tâches qui ne sont pas dans la liste des fenêtres" },
- { "iso-8859-1", "Níl applet ag tabhair freagra ar iarratas sábháil.\nBain amach an applet nó lean ar fánacht?" },
- { "iso-8859-1", "Amosa-las tarefas agochadas da lista de fiestras (SKIP-WINLIST)" },
- { "iso-8859-2", "Az ablakkezelõ a dekorációt mozgassa az ablak helyett\n(AfterStep, Enlightenment, FVWM, IceWM, SawMill)" },
- { "iso-8859-1", "Riempi la finestra delle anteprime con il contenuto dello schermo" },
- { "euc-jp", "¥¦¥¤¥ó¥É¥¦¥Þ¥Í¡¼¥¸¥ã¤Ï¾þ¤ê¥¦¥¤¥ó¥É¥¦¤òÆ°¤«¤¹\n(AfterStep, Enlightenment, FVWM, IceWM, Sawfish)" },
- { "euc-kr", "â °ü¸®ÀÚ°¡ ²Ù¹Î â ´ë½Å À̵¿\n(AfterStep, Enlightenment, FVWM, IceWM, Sawmill)" },
- { "iso-8859-13", "Priedas neatsakinëja á praðymà iðsisaugoti.\nPaðalinti priedà ar laukti toliau?" },
- { "iso-8859-1", "Window manager verplaatst dekoratie\n(AfterStep, Enlightenment, FVWM, IceWM, Sawmill)" },
- { "iso-8859-1", "Vindushåndtereren flytter dekorasjonsvinduet i stedet\n(AfterStep, Enlightenment, FVWM, IceWM, Sawfish)" },
- { "iso-8859-2", "Przemieszczanie dekoracji zamiast okna\n(AfterStep, Enlightenment, FVWM, IceWM, Sawmill)" },
- { "iso-8859-1", "Este programa é responsável por executar outras aplicações, embeber pequenos applets, a paz no mundo e crashes aleatórios do X." },
- { "iso-8859-1", "Mostrar tarefas que se escondem da lista de janelas (SKIP-WINLIST)" },
- { "koi8-r", "÷ÙÓÏÔÁ ÒÁÂÏÞÅÇÏ ÓÔÏÌÁ × ÐÅÒÅËÌÀÞÁÔÅÌÅ ÓÏ×ÐÁÄÁÅÔ Ó ×ÙÓÏÔÏÊ ÐÁÎÅÌÉ" },
- { "iso-8859-2", "Správca okien presúva okraje okien\n(AfterStep, Enlightenment, FVWM, IceWM, Sawfish)" },
- { "iso-8859-2", "Ka¾i posle, ki se skrivajo pred upravljalnik oken (SKIP-WINLIST)" },
- { "iso-8859-5", "Window ÜÕÝÐÔ×ÕàØ ßÞÜÕàÐ ÔÕÚÞàÐæØÞÝØ ßàÞ×Þà ãÜÕáâÞ âÞÓa\n(AfterStep, Enlightenment, FVWM, IceWM, Sawmill)" },
- { "iso-8859-2", "Window menadzeri pomera dekoracioni prozor umesto toga\n(AfterStep, Enlightenment, FVWM, IceWM, Sawmill)" },
- { "iso-8859-1", "Fönsterhanteraren flyttar dekorationsfönstret istället\n(AfterStep, Enlightenment, FVWM, IceWM, Sawfish)" },
- /*{ "TSCII", "À½¢ì¸¼î-ºð¼¸ò¾¢ø À¡÷ì¸ ÓÊ¡¾ À½¢ì¸¼í¸¨Ç ¸¡Á¢ (À½¢ì¸¼î-ºð¼¸õ-¾Å¢÷)" },*/
- { "iso-8859-9", "Kaydetme isteðine bir uygulak cevap vermiyor .\nUygulaðý sileyim mi , yoksa bekleyeyim mi ?" },
- { "koi8-u", "ðÅÒÅͦÝÅÎÎÑ ÄÅËÏÒÁæ§ ÚÁͦÓÔØ ×¦ËÎÁ\n(AfterStep, Enlightenment, FVWM, IceWM, Sawfish)" },
- { "iso-8859-1", "Cwand on scriftôr est bodjî foû, li scriftôr èt totes\nles apliketes å dvins sont pierdowes. Bodjî ci scriftôr chal?" },
- { "gb2312", "ǨÒƵ½×°Êδ°¿Ú¹ÜÀí³ÌÐò(AfterStep, Enlightenment, FVWM, IceWM, SawMill)" },
- { "big5", "µøµ¡ºÞ²zªÌ¥u²¾°Ê¸Ë¹¢µøµ¡\n(AfterStep, Enlightenment, FVWM, IceWM, Sawmill)" },
-};
diff --git a/camel/tests/lib/addresses.c b/camel/tests/lib/addresses.c
deleted file mode 100644
index a97ac5e4f9..0000000000
--- a/camel/tests/lib/addresses.c
+++ /dev/null
@@ -1,51 +0,0 @@
-
-#include "addresses.h"
-#include "camel-test.h"
-
-void
-test_address_compare(CamelInternetAddress *addr, CamelInternetAddress *addr2)
-{
- const char *r1, *r2, *a1, *a2;
- char *e1, *e2, *f1, *f2;
- int j;
-
- check(camel_address_length(CAMEL_ADDRESS(addr)) == camel_address_length(CAMEL_ADDRESS(addr2)));
- for (j=0;j<camel_address_length(CAMEL_ADDRESS(addr));j++) {
-
- check(camel_internet_address_get(addr, j, &r1, &a1) == TRUE);
- check(camel_internet_address_get(addr2, j, &r2, &a2) == TRUE);
-
- check(string_equal(r1, r2));
- check(strcmp(a1, a2) == 0);
- }
- check(camel_internet_address_get(addr, j, &r1, &a1) == FALSE);
- check(camel_internet_address_get(addr2, j, &r2, &a2) == FALSE);
-
- e1 = camel_address_encode(CAMEL_ADDRESS(addr));
- e2 = camel_address_encode(CAMEL_ADDRESS(addr2));
-
- if (camel_address_length(CAMEL_ADDRESS(addr)) == 0)
- check(e1 == NULL && e2 == NULL);
- else
- check(e1 != NULL && e2 != NULL);
-
- if (e1 != NULL) {
- check_msg(string_equal(e1, e2), "e1 = '%s' e2 = '%s'", e1, e2);
- test_free(e1);
- test_free(e2);
- }
-
- f1 = camel_address_format(CAMEL_ADDRESS(addr));
- f2 = camel_address_format(CAMEL_ADDRESS(addr2));
-
- if (camel_address_length(CAMEL_ADDRESS(addr)) == 0)
- check(f1 == NULL && f2 == NULL);
- else
- check(f1 != NULL && f2 != NULL);
-
- if (f1 != NULL) {
- check_msg(string_equal(f1, f2), "f1 = '%s' f2 = '%s'", f1, f2);
- test_free(f1);
- test_free(f2);
- }
-}
diff --git a/camel/tests/lib/addresses.h b/camel/tests/lib/addresses.h
deleted file mode 100644
index dc35a19f05..0000000000
--- a/camel/tests/lib/addresses.h
+++ /dev/null
@@ -1,5 +0,0 @@
-
-#include <camel/camel-internet-address.h>
-
-/* addresses.c */
-void test_address_compare(CamelInternetAddress *addr, CamelInternetAddress *addr2);
diff --git a/camel/tests/lib/camel-test.c b/camel/tests/lib/camel-test.c
deleted file mode 100644
index a61f949f0a..0000000000
--- a/camel/tests/lib/camel-test.c
+++ /dev/null
@@ -1,350 +0,0 @@
-
-#include "camel-test.h"
-
-#include <stdio.h>
-#include <string.h>
-#include <signal.h>
-
-#ifdef ENABLE_THREADS
-#include <pthread.h>
-#include <unistd.h>
-#endif
-
-#ifdef ENABLE_THREADS
-/* well i dunno, doesn't seem to be in the headers but hte manpage mentions it */
-/* a nonportable checking mutex for glibc, not really needed, just validates
- the test harness really */
-# ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
-static pthread_mutex_t lock = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP;
-# else
-static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
-# endif
-#define CAMEL_TEST_LOCK pthread_mutex_lock(&lock)
-#define CAMEL_TEST_UNLOCK pthread_mutex_unlock(&lock)
-#define CAMEL_TEST_ID (pthread_self())
-#else
-#define CAMEL_TEST_LOCK
-#define CAMEL_TEST_UNLOCK
-#define CAMEL_TEST_ID (0)
-#endif
-
-static int setup;
-static int ok;
-
-struct _stack {
- struct _stack *next;
- int fatal;
- char *what;
-};
-
-/* per-thread state */
-struct _state {
- char *test;
- int nonfatal;
- struct _stack *state;
-};
-
-static GHashTable *info_table;
-
-int camel_test_verbose;
-
-static void
-dump_action(int id, struct _state *s, void *d)
-{
- struct _stack *node;
-
-#ifdef ENABLE_THREADS
- printf("\nThread %d:\n", id);
-#endif
- node = s->state;
- if (node) {
- printf("Current action:\n");
- while (node) {
- printf("\t%s%s\n", node->fatal?"":"[nonfatal]", node->what);
- node = node->next;
- }
- }
- printf("\tTest: %s\n", s->test);
-}
-
-static void die(int sig)
-{
- static int indie = 0;
-
- if (!indie) {
- indie = 1;
- printf("\n\nReceived fatal signal %d\n", sig);
- g_hash_table_foreach(info_table, (GHFunc)dump_action, 0);
-
-#ifdef ENABLE_THREADS
- if (camel_test_verbose > 2) {
- printf("Attach debugger to pid %d to debug\n", getpid());
- sleep(1000);
- }
-#endif
- }
-
- _exit(1);
-}
-
-static struct _state *
-current_state(void)
-{
- struct _state *info;
-
- if (info_table == NULL)
- info_table = g_hash_table_new(0, 0);
-
- info = g_hash_table_lookup(info_table, (void *)CAMEL_TEST_ID);
- if (info == NULL) {
- info = g_malloc0(sizeof(*info));
- g_hash_table_insert(info_table, (void *)CAMEL_TEST_ID, info);
- }
- return info;
-}
-
-
-void camel_test_init(int argc, char **argv)
-{
- void camel_init(void);
- int i;
-
- setup = 1;
-
-#ifndef ENABLE_THREADS
- camel_init();
-#endif
-
- info_table = g_hash_table_new(0, 0);
-
- /* yeah, we do need ot thread init, even though camel isn't compiled with enable threads */
- g_thread_init(NULL);
-
- signal(SIGSEGV, die);
- signal(SIGABRT, die);
-
- /* default, just say what, how well we did, unless fail, then abort */
- camel_test_verbose = 1;
-
- for (i=0;i<argc;i++) {
- if (argv[i][0] == '-') {
- switch (argv[i][1]) {
- case 'v':
- camel_test_verbose = strlen(argv[i]);
- break;
- case 'q':
- camel_test_verbose = 0;
- break;
- }
- }
- }
-}
-
-void camel_test_start(const char *what)
-{
- struct _state *s;
-
- CAMEL_TEST_LOCK;
-
- s = current_state();
-
- if (!setup)
- camel_test_init(0, 0);
-
- ok = 1;
-
- s->test = g_strdup(what);
-
- if (camel_test_verbose > 0) {
- printf("Test: %s ... ", what);
- fflush(stdout);
- }
-
- CAMEL_TEST_UNLOCK;
-}
-
-void camel_test_push(const char *what, ...)
-{
- struct _stack *node;
- va_list ap;
- char *text;
- struct _state *s;
-
- CAMEL_TEST_LOCK;
-
- s = current_state();
-
- va_start(ap, what);
- text = g_strdup_vprintf(what, ap);
- va_end(ap);
-
- if (camel_test_verbose > 3)
- printf("Start step: %s\n", text);
-
- node = g_malloc(sizeof(*node));
- node->what = text;
- node->next = s->state;
- node->fatal = 1;
- s->state = node;
-
- CAMEL_TEST_UNLOCK;
-}
-
-void camel_test_pull(void)
-{
- struct _stack *node;
- struct _state *s;
-
- CAMEL_TEST_LOCK;
-
- s = current_state();
-
- g_assert(s->state);
-
- if (camel_test_verbose > 3)
- printf("Finish step: %s\n", s->state->what);
-
- node = s->state;
- s->state = node->next;
- if (!node->fatal)
- s->nonfatal--;
- g_free(node->what);
- g_free(node);
-
- CAMEL_TEST_UNLOCK;
-}
-
-/* where to set breakpoints */
-void camel_test_break(void);
-
-void camel_test_break(void)
-{
-}
-
-void camel_test_fail(const char *why, ...)
-{
- va_list ap;
-
- va_start(ap, why);
- camel_test_failv(why, ap);
- va_end(ap);
-}
-
-
-void camel_test_failv(const char *why, va_list ap)
-{
- char *text;
- struct _state *s;
-
- CAMEL_TEST_LOCK;
-
- s = current_state();
-
- text = g_strdup_vprintf(why, ap);
-
- if ((s->nonfatal == 0 && camel_test_verbose > 0)
- || (s->nonfatal && camel_test_verbose > 1)) {
- printf("Failed.\n%s\n", text);
- camel_test_break();
- }
-
- g_free(text);
-
- if ((s->nonfatal == 0 && camel_test_verbose > 0)
- || (s->nonfatal && camel_test_verbose > 2)) {
- g_hash_table_foreach(info_table, (GHFunc)dump_action, 0);
- }
-
- if (s->nonfatal == 0) {
- exit(1);
- } else {
- ok=0;
- if (camel_test_verbose > 1) {
- printf("Known problem (ignored):\n");
- dump_action(CAMEL_TEST_ID, s, 0);
- }
- }
-
- CAMEL_TEST_UNLOCK;
-}
-
-void camel_test_nonfatal(const char *what, ...)
-{
- struct _stack *node;
- va_list ap;
- char *text;
- struct _state *s;
-
- CAMEL_TEST_LOCK;
-
- s = current_state();
-
- va_start(ap, what);
- text = g_strdup_vprintf(what, ap);
- va_end(ap);
-
- if (camel_test_verbose > 3)
- printf("Start nonfatal: %s\n", text);
-
- node = g_malloc(sizeof(*node));
- node->what = text;
- node->next = s->state;
- node->fatal = 0;
- s->nonfatal++;
- s->state = node;
-
- CAMEL_TEST_UNLOCK;
-}
-
-void camel_test_fatal(void)
-{
- camel_test_pull();
-}
-
-void camel_test_end(void)
-{
- if (camel_test_verbose > 0) {
- if (ok)
- printf("Ok\n");
- else
- printf("Partial success\n");
- }
-
- fflush(stdout);
-}
-
-
-
-
-/* compare strings, ignore whitespace though */
-int string_equal(const char *a, const char *b)
-{
- const char *ap, *bp;
-
- ap = a;
- bp = b;
-
- while (*ap && *bp) {
- while (*ap == ' ' || *ap == '\n' || *ap == '\t')
- ap++;
- while (*bp == ' ' || *bp == '\n' || *bp == '\t')
- bp++;
-
- a = ap;
- b = bp;
-
- while (*ap && *ap != ' ' && *ap != '\n' && *ap != '\t')
- ap++;
- while (*bp && *bp != ' ' && *bp != '\n' && *bp != '\t')
- bp++;
-
- if (ap - a != bp - a
- && ap - 1 > 0
- && memcmp(a, b, ap-a) != 0) {
- return 0;
- }
- }
-
- return 1;
-}
-
diff --git a/camel/tests/lib/camel-test.h b/camel/tests/lib/camel-test.h
deleted file mode 100644
index 986a943fa3..0000000000
--- a/camel/tests/lib/camel-test.h
+++ /dev/null
@@ -1,68 +0,0 @@
-
-/* some utilities for testing */
-
-#include "config.h"
-
-#include <stdlib.h>
-#include <glib.h>
-
-void camel_test_failv(const char *why, va_list ap);
-
-/* perform a check assertion */
-#define check(x) do {if (!(x)) { camel_test_fail("%s:%d: %s", __FILE__, __LINE__, #x); } } while (0)
-/* check with message */
-#ifdef __GNUC__
-#define check_msg(x, y, z...) do {if (!(x)) { camel_test_fail("%s:%d: %s\n\t" #y, __FILE__, __LINE__, #x, ##z); } } while (0)
-#else
-static void check_msg(int truth, char *fmt, ...)
-{
- /* no gcc, we lose the condition that failed, nm */
- if (!truth) {
- va_list ap;
- va_start(ap, fmt);
- camel_test_failv(fmt, ap);
- va_end(ap);
- }
-}
-#endif
-
-#define check_count(object, expected) do { \
- if (CAMEL_OBJECT(object)->ref_count != expected) { \
- camel_test_fail("%s->ref_count != %s\n\tref_count = %d", #object, #expected, CAMEL_OBJECT(object)->ref_count); \
- } \
-} while (0)
-
-#define check_unref(object, expected) do { \
- check_count(object, expected); \
- camel_object_unref(CAMEL_OBJECT(object)); \
- if (expected == 1) { \
- object = NULL; \
- } \
-} while (0)
-
-#define test_free(mem) (g_free(mem), mem=NULL)
-
-#define push camel_test_push
-#define pull camel_test_pull
-
-void camel_test_init(int argc, char **argv);
-
-/* start/finish a new test */
-void camel_test_start(const char *what);
-void camel_test_end(void);
-
-/* start/finish a new test part */
-void camel_test_push(const char *what, ...);
-void camel_test_pull(void);
-
-/* fail a test, with a reason why */
-void camel_test_fail(const char *why, ...);
-void camel_test_failv(const char *why, va_list ap);
-
-/* Set whether a failed test quits. May be nested, but must be called in nonfatal/fatal pairs */
-void camel_test_nonfatal(const char *why, ...);
-void camel_test_fatal(void);
-
-/* utility functions */
-/* compare strings, ignore whitespace though */
-int string_equal(const char *a, const char *b);
diff --git a/camel/tests/lib/folders.c b/camel/tests/lib/folders.c
deleted file mode 100644
index ba02001bcc..0000000000
--- a/camel/tests/lib/folders.c
+++ /dev/null
@@ -1,526 +0,0 @@
-#include <string.h>
-
-#include "camel-test.h"
-#include "folders.h"
-#include "messages.h"
-
-#include "camel/camel-exception.h"
-
-/* check the total/unread is what we think it should be */
-void
-test_folder_counts(CamelFolder *folder, int total, int unread)
-{
- GPtrArray *s;
- int i, myunread;
- CamelMessageInfo *info;
-
- push("test folder counts %d total %d unread", total, unread);
-
- /* first, use the standard functions */
- check(camel_folder_get_message_count(folder) == total);
- check(camel_folder_get_unread_message_count(folder) == total);
-
- /* next, use the summary */
- s = camel_folder_get_summary(folder);
- check(s != NULL);
- check(s->len == total);
- myunread = s->len;
- for (i=0;i<s->len;i++) {
- info = s->pdata[i];
- if (info->flags & CAMEL_MESSAGE_SEEN)
- myunread--;
- }
- check(unread == myunread);
- camel_folder_free_summary(folder, s);
-
- /* last, use the uid list */
- s = camel_folder_get_uids(folder);
- check(s != NULL);
- check(s->len == total);
- myunread = s->len;
- for (i=0;i<s->len;i++) {
- info = camel_folder_get_message_info(folder, s->pdata[i]);
- if (info->flags & CAMEL_MESSAGE_SEEN)
- myunread--;
- camel_folder_free_message_info(folder, info);
- }
- check(unread == myunread);
- camel_folder_free_uids(folder, s);
-
- pull();
-}
-
-static int
-safe_strcmp(const char *a, const char *b)
-{
- if (a == NULL && b == NULL)
- return 0;
- if (a == NULL)
- return 1;
- if (b == NULL)
- return -1;
- return strcmp(a, b);
-}
-
-void
-test_message_info(CamelMimeMessage *msg, const CamelMessageInfo *info)
-{
- check_msg(safe_strcmp(camel_message_info_subject(info), camel_mime_message_get_subject(msg)) == 0,
- "info->subject = '%s', get_subject() = '%s'", camel_message_info_subject(info), camel_mime_message_get_subject(msg));
-
- /* FIXME: testing from/cc/to, etc is more tricky */
-
- check(info->date_sent == camel_mime_message_get_date(msg, NULL));
-
- /* date received isn't set for messages that haven't been sent anywhere ... */
- /*check(info->date_received == camel_mime_message_get_date_received(msg, NULL));*/
-
- /* so is messageid/references, etc */
-}
-
-/* check a message is present */
-void
-test_folder_message(CamelFolder *folder, const char *uid)
-{
- CamelMimeMessage *msg;
- CamelMessageInfo *info;
- GPtrArray *s;
- int i;
- CamelException *ex = camel_exception_new();
- int found;
-
- push("uid %s is in folder", uid);
-
- /* first try getting info */
- info = camel_folder_get_message_info(folder, uid);
- check(info != NULL);
- check(strcmp(camel_message_info_uid(info), uid) == 0);
- camel_folder_free_message_info(folder, info);
-
- /* then, getting message */
- msg = camel_folder_get_message(folder, uid, ex);
- check_msg(!camel_exception_is_set(ex), "%s", camel_exception_get_description(ex));
- check(msg != NULL);
-
- /* cross check with info */
- test_message_info(msg, info);
-
- camel_object_unref((CamelObject *)msg);
-
- /* see if it is in the summary (only once) */
- s = camel_folder_get_summary(folder);
- check(s != NULL);
- found = 0;
- for (i=0;i<s->len;i++) {
- info = s->pdata[i];
- if (strcmp(camel_message_info_uid(info), uid) == 0)
- found++;
- }
- check(found == 1);
- camel_folder_free_summary(folder, s);
-
- /* check it is in the uid list */
- s = camel_folder_get_uids(folder);
- check(s != NULL);
- found = 0;
- for (i=0;i<s->len;i++) {
- if (strcmp(s->pdata[i], uid) == 0)
- found++;
- }
- check(found == 1);
- camel_folder_free_uids(folder, s);
-
- camel_exception_free(ex);
-
- pull();
-}
-
-/* check message not present */
-void
-test_folder_not_message(CamelFolder *folder, const char *uid)
-{
- CamelMimeMessage *msg;
- CamelMessageInfo *info;
- GPtrArray *s;
- int i;
- CamelException *ex = camel_exception_new();
- int found;
-
- push("uid %s is not in folder", uid);
-
- /* first try getting info */
- info = camel_folder_get_message_info(folder, uid);
- check(info == NULL);
-
- /* then, getting message */
- msg = camel_folder_get_message(folder, uid, ex);
- check(camel_exception_is_set(ex));
- check(msg == NULL);
- camel_exception_clear(ex);
-
- /* see if it is not in the summary (only once) */
- s = camel_folder_get_summary(folder);
- check(s != NULL);
- found = 0;
- for (i=0;i<s->len;i++) {
- info = s->pdata[i];
- if (strcmp(camel_message_info_uid(info), uid) == 0)
- found++;
- }
- check(found == 0);
- camel_folder_free_summary(folder, s);
-
- /* check it is not in the uid list */
- s = camel_folder_get_uids(folder);
- check(s != NULL);
- found = 0;
- for (i=0;i<s->len;i++) {
- if (strcmp(s->pdata[i], uid) == 0)
- found++;
- }
- check(found == 0);
- camel_folder_free_uids(folder, s);
-
- camel_exception_free(ex);
-
- pull();
-}
-
-/* test basic store operations on folders */
-/* TODO: Add subscription stuff */
-void
-test_folder_basic(CamelSession *session, const char *storename, int local)
-{
- CamelStore *store;
- CamelException *ex = camel_exception_new();
- CamelFolder *folder, *root;
- char *what = g_strdup_printf("testing store: %s", storename);
-
- camel_test_start(what);
- test_free(what);
-
- push("getting store");
- store = camel_session_get_store(session, storename, ex);
- check_msg(!camel_exception_is_set(ex), "getting store: %s", camel_exception_get_description(ex));
- check(store != NULL);
- pull();
-
- /* local providers == no root folder */
- push("getting root folder");
- root = camel_store_get_root_folder(store, ex);
- if (local) {
- check(camel_exception_is_set(ex));
- check(root == NULL);
- camel_exception_clear(ex);
- } else {
- check_msg(!camel_exception_is_set(ex), "%s", camel_exception_get_description(ex));
- check(root != NULL);
- check_unref(root, 1);
- }
- pull();
-
- /* same for default folder */
- push("getting default folder");
- root = camel_store_get_root_folder(store, ex);
- if (local) {
- check(camel_exception_is_set(ex));
- check(root == NULL);
- camel_exception_clear(ex);
- } else {
- check_msg(!camel_exception_is_set(ex), "%s", camel_exception_get_description(ex));
- check(root != NULL);
- check_unref(root, 1);
- }
- pull();
-
- push("getting a non-existant folder, no create");
- folder = camel_store_get_folder(store, "unknown", 0, ex);
- check(camel_exception_is_set(ex));
- check(folder == NULL);
- camel_exception_clear(ex);
- pull();
-
- push("getting a non-existant folder, with create");
- folder = camel_store_get_folder(store, "testbox", CAMEL_STORE_FOLDER_CREATE, ex);
- check_msg(!camel_exception_is_set(ex), "%s", camel_exception_get_description(ex));
- check(folder != NULL);
- check_unref(folder, 1);
- pull();
-
- push("getting an existing folder");
- folder = camel_store_get_folder(store, "testbox", 0, ex);
- check_msg(!camel_exception_is_set(ex), "%s", camel_exception_get_description(ex));
- check(folder != NULL);
- check_unref(folder, 1);
- pull();
-
- push("renaming a non-existant folder");
- camel_store_rename_folder(store, "unknown1", "unknown2", ex);
- check(camel_exception_is_set(ex));
- camel_exception_clear(ex);
- pull();
-
- push("renaming an existing folder");
- camel_store_rename_folder(store, "testbox", "testbox2", ex);
- check_msg(!camel_exception_is_set(ex), "%s", camel_exception_get_description(ex));
- pull();
-
- push("opening the old name of a renamed folder");
- folder = camel_store_get_folder(store, "testbox", 0, ex);
- check(camel_exception_is_set(ex));
- check(folder == NULL);
- camel_exception_clear(ex);
- pull();
-
- push("opening the new name of a renamed folder");
- folder = camel_store_get_folder(store, "testbox2", 0, ex);
- check_msg(!camel_exception_is_set(ex), "%s", camel_exception_get_description(ex));
- check(folder != NULL);
- check_unref(folder, 1);
- pull();
-
- push("deleting a non-existant folder");
- camel_store_delete_folder(store, "unknown", ex);
- check(camel_exception_is_set(ex));
- camel_exception_clear(ex);
- pull();
-
- push("deleting an existing folder");
- camel_store_delete_folder(store, "testbox2", ex);
- check_msg(!camel_exception_is_set(ex), "%s", camel_exception_get_description(ex));
- pull();
-
- push("opening a folder that has been deleted");
- folder = camel_store_get_folder(store, "testbox2", 0, ex);
- check(camel_exception_is_set(ex));
- check(folder == NULL);
- camel_exception_clear(ex);
- pull();
-
- check_unref(store, 1);
-
- camel_test_end();
-
- camel_exception_free(ex);
-}
-
-
-/* todo: cross-check everything with folder_info checks as well */
-/* this should probably take a folder instead of a session ... */
-void
-test_folder_message_ops(CamelSession *session, const char *name, int local)
-{
- CamelStore *store;
- CamelException *ex = camel_exception_new();
- CamelFolder *folder;
- CamelMimeMessage *msg;
- int j;
- int indexed, max;
- GPtrArray *uids;
- CamelMessageInfo *info;
-
- max=local?2:1;
-
- for (indexed = 0;indexed<max;indexed++) {
- char *what = g_strdup_printf("folder ops: %s %s", name, local?(indexed?"indexed":"non-indexed"):"");
- int flags;
-
- camel_test_start(what);
- test_free(what);
-
- push("getting store");
- store = camel_session_get_store(session, name, ex);
- check_msg(!camel_exception_is_set(ex), "getting store: %s", camel_exception_get_description(ex));
- check(store != NULL);
- pull();
-
- push("creating %sindexed folder", indexed?"":"non-");
- if (indexed)
- flags = CAMEL_STORE_FOLDER_CREATE|CAMEL_STORE_FOLDER_BODY_INDEX;
- else
- flags = CAMEL_STORE_FOLDER_CREATE;
- folder = camel_store_get_folder(store, "testbox", flags, ex);
- check_msg(!camel_exception_is_set(ex), "%s", camel_exception_get_description(ex));
- check(folder != NULL);
-
- /* verify empty/can't get nonexistant stuff */
- test_folder_counts(folder, 0, 0);
- test_folder_not_message(folder, "0");
- test_folder_not_message(folder, "");
-
- for (j=0;j<10;j++) {
- char *content, *subject;
-
- push("creating test message");
- msg = test_message_create_simple();
- content = g_strdup_printf("Test message %d contents\n\n", j);
- test_message_set_content_simple((CamelMimePart *)msg, 0, "text/plain",
- content, strlen(content));
- test_free(content);
- subject = g_strdup_printf("Test message %d", j);
- camel_mime_message_set_subject(msg, subject);
- pull();
-
- push("appending simple message %d", j);
- camel_folder_append_message(folder, msg, NULL, ex);
- check_msg(!camel_exception_is_set(ex), "%s", camel_exception_get_description(ex));
-
- /* sigh, this shouldn't be required, but the imap code is too dumb to do it itself */
- if (!local) {
- push("forcing a refresh of folder updates");
- camel_folder_refresh_info(folder, ex);
- check_msg(!camel_exception_is_set(ex), "%s", camel_exception_get_description(ex));
- pull();
- }
-
- if (!local)
- camel_test_nonfatal("unread counts dont seem right for imap");
-
- test_folder_counts(folder, j+1, j+1);
-
- if (!local)
- camel_test_fatal();
-
- push("checking it is in the right uid slot & exists");
- uids = camel_folder_get_uids(folder);
- check(uids != NULL);
- check(uids->len == j+1);
- test_folder_message(folder, uids->pdata[j]);
- pull();
-
- push("checking it is the right message (subject): %s", subject);
- info = camel_folder_get_message_info(folder, uids->pdata[j]);
- check_msg(strcmp(camel_message_info_subject(info), subject)==0,
- "info->subject %s", camel_message_info_subject(info));
- camel_folder_free_uids(folder, uids);
- camel_folder_free_message_info(folder, info);
- pull();
-
- test_free(subject);
-
- check_unref(msg, 1);
- pull();
- }
-
- check_unref(folder, 1);
- pull();
-
- push("deleting test folder, with messages in it");
- camel_store_delete_folder(store, "testbox", ex);
- check(camel_exception_is_set(ex));
- camel_exception_clear(ex);
- pull();
-
- push("re-opening folder");
- folder = camel_store_get_folder(store, "testbox", flags, ex);
- check_msg(!camel_exception_is_set(ex), "%s", camel_exception_get_description(ex));
- check(folder != NULL);
-
- /* verify counts */
- test_folder_counts(folder, 10, 10);
-
- /* re-check uid's, after a reload */
- uids = camel_folder_get_uids(folder);
- check(uids != NULL);
- check(uids->len == 10);
- for (j=0;j<10;j++) {
- char *subject = g_strdup_printf("Test message %d", j);
-
- push("verify reload of %s", subject);
- test_folder_message(folder, uids->pdata[j]);
-
- info = camel_folder_get_message_info(folder, uids->pdata[j]);
- check_msg(strcmp(camel_message_info_subject(info), subject)==0,
- "info->subject %s", camel_message_info_subject(info));
- test_free(subject);
- camel_folder_free_message_info(folder, info);
- pull();
- }
-
- push("deleting first message & expunging");
- camel_folder_delete_message(folder, uids->pdata[0]);
- test_folder_counts(folder, 10, 10);
- camel_folder_expunge(folder, ex);
- check_msg(!camel_exception_is_set(ex), "%s", camel_exception_get_description(ex));
- test_folder_not_message(folder, uids->pdata[0]);
- test_folder_counts(folder, 9, 9);
-
- camel_folder_free_uids(folder, uids);
-
- uids = camel_folder_get_uids(folder);
- check(uids != NULL);
- check(uids->len == 9);
- for (j=0;j<9;j++) {
- char *subject = g_strdup_printf("Test message %d", j+1);
-
- push("verify after expunge of %s", subject);
- test_folder_message(folder, uids->pdata[j]);
-
- info = camel_folder_get_message_info(folder, uids->pdata[j]);
- check_msg(strcmp(camel_message_info_subject(info), subject)==0,
- "info->subject %s", camel_message_info_subject(info));
- test_free(subject);
- camel_folder_free_message_info(folder, info);
- pull();
- }
- pull();
-
- push("deleting last message & expunging");
- camel_folder_delete_message(folder, uids->pdata[8]);
- /* sync? */
- test_folder_counts(folder, 9, 9);
- camel_folder_expunge(folder, ex);
- check_msg(!camel_exception_is_set(ex), "%s", camel_exception_get_description(ex));
- test_folder_not_message(folder, uids->pdata[8]);
- test_folder_counts(folder, 8, 8);
-
- camel_folder_free_uids(folder, uids);
-
- uids = camel_folder_get_uids(folder);
- check(uids != NULL);
- check(uids->len == 8);
- for (j=0;j<8;j++) {
- char *subject = g_strdup_printf("Test message %d", j+1);
-
- push("verify after expunge of %s", subject);
- test_folder_message(folder, uids->pdata[j]);
-
- info = camel_folder_get_message_info(folder, uids->pdata[j]);
- check_msg(strcmp(camel_message_info_subject(info), subject)==0,
- "info->subject %s", camel_message_info_subject(info));
- test_free(subject);
- camel_folder_free_message_info(folder, info);
- pull();
- }
- pull();
-
- push("deleting all messages & expunging");
- for (j=0;j<8;j++) {
- camel_folder_delete_message(folder, uids->pdata[j]);
- }
- /* sync? */
- test_folder_counts(folder, 8, 8);
- camel_folder_expunge(folder, ex);
- check_msg(!camel_exception_is_set(ex), "%s", camel_exception_get_description(ex));
- for (j=0;j<8;j++) {
- test_folder_not_message(folder, uids->pdata[j]);
- }
- test_folder_counts(folder, 0, 0);
-
- camel_folder_free_uids(folder, uids);
- pull();
-
- check_unref(folder, 1);
- pull(); /* re-opening folder */
-
- push("deleting test folder, with no messages in it");
- camel_store_delete_folder(store, "testbox", ex);
- check_msg(!camel_exception_is_set(ex), "%s", camel_exception_get_description(ex));
- pull();
-
- check_unref(store, 1);
- camel_test_end();
- }
-
- camel_exception_free(ex);
-}
diff --git a/camel/tests/lib/folders.h b/camel/tests/lib/folders.h
deleted file mode 100644
index 2cb2d97028..0000000000
--- a/camel/tests/lib/folders.h
+++ /dev/null
@@ -1,20 +0,0 @@
-
-#include "camel/camel-session.h"
-#include "camel/camel-store.h"
-
-#include <camel/camel-folder.h>
-#include <camel/camel-folder-summary.h>
-#include <camel/camel-mime-message.h>
-
-/* check the total/unread is what we think it should be, everywhere it can be determined */
-void test_folder_counts(CamelFolder *folder, int total, int unread);
-/* cross-check info/msg */
-void test_message_info(CamelMimeMessage *msg, const CamelMessageInfo *info);
-/* check a message is present everywhere it should be */
-void test_folder_message(CamelFolder *folder, const char *uid);
-/* check message not present everywhere it shouldn't be */
-void test_folder_not_message(CamelFolder *folder, const char *uid);
-/* test basic folder ops on a store */
-void test_folder_basic(CamelSession *session, const char *storename, int local);
-/* test basic message operations on a folder */
-void test_folder_message_ops(CamelSession *session, const char *storename, int local);
diff --git a/camel/tests/lib/messages.c b/camel/tests/lib/messages.c
deleted file mode 100644
index a8c8b30465..0000000000
--- a/camel/tests/lib/messages.c
+++ /dev/null
@@ -1,153 +0,0 @@
-#include <string.h>
-
-#include "messages.h"
-#include "camel-test.h"
-
-#include <camel/camel-mime-message.h>
-#include <camel/camel-stream-fs.h>
-#include <camel/camel-stream-mem.h>
-
-CamelMimeMessage *
-test_message_create_simple(void)
-{
- CamelMimeMessage *msg;
- CamelInternetAddress *addr;
-
- msg = camel_mime_message_new();
-
- addr = camel_internet_address_new();
- camel_internet_address_add(addr, "Michael Zucchi", "zed@nowhere.com");
- camel_mime_message_set_from(msg, addr);
- camel_address_remove((CamelAddress *)addr, -1);
- camel_internet_address_add(addr, "POSTMASTER", "POSTMASTER@somewhere.net");
- camel_mime_message_set_recipients(msg, CAMEL_RECIPIENT_TYPE_TO, addr);
- camel_address_remove((CamelAddress *)addr, -1);
- camel_internet_address_add(addr, "Michael Zucchi", "zed@nowhere.com");
- camel_mime_message_set_recipients(msg, CAMEL_RECIPIENT_TYPE_CC, addr);
-
- check_unref(addr, 1);
-
- camel_mime_message_set_subject(msg, "Simple message subject");
- camel_mime_message_set_date(msg, time(0), 930);
-
- return msg;
-}
-
-static void
-content_finalise(CamelObject *folder, void *crap, void *ba)
-{
- g_byte_array_free(ba, TRUE);
-}
-
-void
-test_message_set_content_simple(CamelMimePart *part, int how, const char *type, const char *text, int len)
-{
- CamelStreamMem *content = NULL;
- CamelDataWrapper *dw;
- static GByteArray *ba;
-
- switch (how) {
- case 0:
- camel_mime_part_set_content(part, text, len, type);
- break;
- case 1:
- content = (CamelStreamMem *)camel_stream_mem_new_with_buffer(text, len);
- break;
- case 2:
- content = (CamelStreamMem *)camel_stream_mem_new();
- camel_stream_mem_set_buffer(content, text, len);
- break;
- case 3:
- ba = g_byte_array_new();
- g_byte_array_append(ba, text, len);
-
- content = (CamelStreamMem *)camel_stream_mem_new_with_byte_array(ba);
- ba = NULL;
- break;
- case 4:
- ba = g_byte_array_new();
- g_byte_array_append(ba, text, len);
-
- content = (CamelStreamMem *)camel_stream_mem_new();
- camel_stream_mem_set_byte_array(content, ba);
-
- camel_object_hook_event((CamelObject *)content, "finalize", content_finalise, ba);
- break;
- }
-
- if (content != 0) {
- dw = camel_data_wrapper_new();
- camel_data_wrapper_set_mime_type (dw, type);
-
- camel_data_wrapper_construct_from_stream(dw, (CamelStream *)content);
- camel_medium_set_content_object((CamelMedium *)part, dw);
-
- check_unref(content, 2);
- check_unref(dw, 2);
- }
-}
-
-int
-test_message_write_file(CamelMimeMessage *msg, const char *name)
-{
- CamelStreamFs *file;
- int ret;
-
- file = (CamelStreamFs *)camel_stream_fs_new_with_name(name, O_CREAT|O_WRONLY, 0600);
- camel_data_wrapper_write_to_stream((CamelDataWrapper *)msg, (CamelStream *)file);
- ret = camel_stream_close((CamelStream *)file);
-
- check(((CamelObject *)file)->ref_count == 1);
- camel_object_unref((CamelObject *)file);
-
- return ret;
-}
-
-CamelMimeMessage *
-test_message_read_file(const char *name)
-{
- CamelStreamFs *file;
- CamelMimeMessage *msg2;
-
- file = (CamelStreamFs *)camel_stream_fs_new_with_name(name, O_RDONLY, 0);
- msg2 = camel_mime_message_new();
-
- camel_data_wrapper_construct_from_stream((CamelDataWrapper *)msg2, (CamelStream *)file);
- /* file's refcount may be > 1 if the message is real big */
- check(CAMEL_OBJECT(file)->ref_count >=1);
-
- return msg2;
-}
-
-int
-test_message_compare_content(CamelDataWrapper *dw, const char *text, int len)
-{
- CamelStreamMem *content;
-
- /* sigh, ok, so i len == 0, dw will probably be 0 too
- camel_mime_part_set_content is weird like that */
- if (dw == 0 && len == 0)
- return 0;
-
- content = (CamelStreamMem *)camel_stream_mem_new();
- camel_data_wrapper_write_to_stream(dw, (CamelStream *)content);
-
- check_msg(content->buffer->len == len, "buffer->len = %d, len = %d", content->buffer->len, len);
- check_msg(memcmp(content->buffer->data, text, content->buffer->len) == 0, "len = %d", len);
-
- check_unref(content, 1);
-
- return 0;
-}
-
-int
-test_message_compare_header(CamelMimeMessage *m1, CamelMimeMessage *m2)
-{
- return 0;
-}
-
-int
-test_message_compare_messages(CamelMimeMessage *m1, CamelMimeMessage *m2)
-{
- return 0;
-}
diff --git a/camel/tests/lib/messages.h b/camel/tests/lib/messages.h
deleted file mode 100644
index 9cb5758826..0000000000
--- a/camel/tests/lib/messages.h
+++ /dev/null
@@ -1,12 +0,0 @@
-
-#include <camel/camel-mime-message.h>
-
-/* how many ways to set the content contents */
-#define SET_CONTENT_WAYS (5)
-
-/* messages.c */
-CamelMimeMessage *test_message_create_simple(void);
-void test_message_set_content_simple(CamelMimePart *part, int how, const char *type, const char *text, int len);
-int test_message_write_file(CamelMimeMessage *msg, const char *name);
-CamelMimeMessage *test_message_read_file(const char *name);
-int test_message_compare_content(CamelDataWrapper *dw, const char *text, int len);
diff --git a/camel/tests/lib/streams.c b/camel/tests/lib/streams.c
deleted file mode 100644
index e4dc006363..0000000000
--- a/camel/tests/lib/streams.c
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- stream tests
-
- todo: do we need a seek test that seeks beyond the eos, writes,
- then reads and checks for 0's in the space?
-*/
-
-#include <string.h>
-
-#include "camel/camel-stream.h"
-#include "camel/camel-seekable-stream.h"
-#include "camel/camel-seekable-substream.h"
-
-#include "streams.h"
-
-#include "camel-test.h"
-
-static char teststring[] = "\xaa\x55\xc0\x0c\xff\x00";
-static char testbuf[10240];
-
-/* pass in an empty read/write stream */
-void
-test_stream_seekable_writepart(CamelSeekableStream *s)
-{
- off_t end;
- int i;
-
- push("seekable stream test, writing ");
-
- check(camel_seekable_stream_tell(s) == 0);
- check(camel_seekable_stream_seek(s, 0, CAMEL_STREAM_SET) == 0);
- check(camel_seekable_stream_tell(s) == 0);
-
- check(camel_stream_write(CAMEL_STREAM(s), "", 0) == 0);
- check(camel_seekable_stream_tell(s) == 0);
- check(camel_stream_write(CAMEL_STREAM(s), "\n", 1) == 1);
- check(camel_seekable_stream_tell(s) == 1);
-
- for (i=0;i<10240;i++) {
- check(camel_stream_write(CAMEL_STREAM(s), teststring, sizeof(teststring)) == sizeof(teststring));
- check(camel_seekable_stream_tell(s) == 1 + (i+1)*sizeof(teststring));
- }
- end = 10240*sizeof(teststring)+1;
-
- check_msg(camel_seekable_stream_seek(s, 0, CAMEL_STREAM_END) == end, "seek =%d end = %d",
- camel_seekable_stream_seek(s, 0, CAMEL_STREAM_END), end);
-
- check(camel_seekable_stream_seek(s, 0, CAMEL_STREAM_END) == end);
- check(camel_seekable_stream_tell(s) == end);
- /* need to read 0 first to set eos */
- check(camel_stream_read(CAMEL_STREAM(s), testbuf, 10240) == 0);
- check(camel_stream_eos(CAMEL_STREAM(s)));
-
- pull();
-}
-
-void
-test_stream_seekable_readpart(CamelSeekableStream *s)
-{
- off_t off, new, end;
- int i, j;
-
- push("seekable stream test, re-reading");
-
- end = 10240*sizeof(teststring)+1;
-
- check(camel_seekable_stream_seek(s, 0, CAMEL_STREAM_SET) == 0);
- check(camel_seekable_stream_tell(s) == 0);
- check(!camel_stream_eos(CAMEL_STREAM(s)));
-
- off = 0;
- for (i=0;i<1024;i++) {
-
- new = i*3;
-
- /* exercise all seek methods */
- switch(i % 3) {
- case 0:
- check(camel_seekable_stream_seek(s, new, CAMEL_STREAM_SET) == new);
- break;
- case 1:
- check(camel_seekable_stream_seek(s, new-off, CAMEL_STREAM_CUR) == new);
- break;
- case 2:
- check(camel_seekable_stream_seek(s, new-end, CAMEL_STREAM_END) == new);
- break;
- }
- check(camel_seekable_stream_tell(s) == new);
-
- check(camel_stream_read(CAMEL_STREAM(s), testbuf, i*3) == i*3);
- for (j=0;j<i*3;j++) {
- int k = new + j;
-
- if (k==0) {
- check(testbuf[j] == '\n');
- } else {
- check(testbuf[j] == teststring[(k-1) % sizeof(teststring)]);
- }
- }
- off = new+i*3;
- }
-
- /* verify end-of-file behaviour */
- check(camel_seekable_stream_seek(s, -1, CAMEL_STREAM_END) == end-1);
- check(camel_seekable_stream_tell(s) == end-1);
-
- check(camel_stream_read(CAMEL_STREAM(s), testbuf, 10240) == 1);
- check(testbuf[0] == teststring[sizeof(teststring)-1]);
-
- check(camel_stream_read(CAMEL_STREAM(s), testbuf, 10240) == 0);
- check(camel_seekable_stream_seek(s, 0, CAMEL_STREAM_CUR) == end);
- check(camel_seekable_stream_tell(s) == end);
- check(camel_stream_eos(CAMEL_STREAM(s)));
-
- pull();
-}
-
-/*
- 0 = write to the substream
- 1 = write to the parent stream at the right spot
-*/
-void
-test_seekable_substream_writepart(CamelStream *s, int type)
-{
- CamelSeekableStream *ss = (CamelSeekableStream *)s;
- CamelSeekableSubstream *sus = (CamelSeekableSubstream *)s;
- CamelSeekableStream *sp = sus->parent_stream;
- int i, len;
- off_t end;
-
- push("writing substream, type %d", type);
-
- if (type == 1) {
- check(camel_seekable_stream_seek(sp, ss->bound_start, CAMEL_STREAM_SET) == ss->bound_start);
- s = (CamelStream *)sp;
- } else {
- check(camel_seekable_stream_tell(ss) == ss->bound_start);
- check(camel_seekable_stream_seek(ss, 0, CAMEL_STREAM_SET) == ss->bound_start);
- }
-
- check(camel_seekable_stream_tell(CAMEL_SEEKABLE_STREAM(s)) == ss->bound_start);
-
- check(camel_stream_write(s, "", 0) == 0);
- check(camel_seekable_stream_tell(CAMEL_SEEKABLE_STREAM(s)) == ss->bound_start);
-
- /* fill up the bounds with writes */
- if (ss->bound_end != CAMEL_STREAM_UNBOUND) {
- for (i=0;i<(ss->bound_end-ss->bound_start)/sizeof(teststring);i++) {
- check(camel_stream_write(s, teststring, sizeof(teststring)) == sizeof(teststring));
- check(camel_seekable_stream_tell(CAMEL_SEEKABLE_STREAM(s)) == ss->bound_start + (i+1)*sizeof(teststring));
- }
- len = (ss->bound_end-ss->bound_start) % sizeof(teststring);
- check(camel_stream_write(s, teststring, len) == len);
- check(camel_seekable_stream_tell(CAMEL_SEEKABLE_STREAM(s)) == ss->bound_end);
- if (type == 0) {
- check(camel_stream_write(s, teststring, sizeof(teststring)) == 0);
- check(camel_stream_eos(s));
- check(camel_seekable_stream_tell(CAMEL_SEEKABLE_STREAM(s)) == ss->bound_end);
- }
- } else {
- /* just 10K */
- for (i=0;i<10240;i++) {
- check(camel_stream_write(CAMEL_STREAM(s), teststring, sizeof(teststring)) == sizeof(teststring));
- check(camel_seekable_stream_tell(CAMEL_SEEKABLE_STREAM(s)) == ss->bound_start + (i+1)*sizeof(teststring));
- }
-
- /* we can't really verify any end length here */
- }
-
- pull();
-}
-
-void
-test_seekable_substream_readpart(CamelStream *s)
-{
- CamelSeekableStream *ss = (CamelSeekableStream *)s;
- CamelSeekableSubstream *sus = (CamelSeekableSubstream *)s;
- CamelSeekableStream *sp = sus->parent_stream;
- int i, len;
- off_t end;
-
- push("reading substream");
-
- check(camel_seekable_stream_seek(ss, 0, CAMEL_STREAM_SET) == ss->bound_start);
- check(camel_seekable_stream_tell(ss) == ss->bound_start);
-
- check(camel_seekable_stream_seek(sp, ss->bound_start, CAMEL_STREAM_SET) == ss->bound_start);
- check(camel_seekable_stream_tell(sp) == ss->bound_start);
-
- /* check writes, cross check with parent stream */
- if (ss->bound_end != CAMEL_STREAM_UNBOUND) {
- for (i=0;i<(ss->bound_end-ss->bound_start)/sizeof(teststring);i++) {
- check(camel_stream_read(s, testbuf, sizeof(teststring)) == sizeof(teststring));
- check(memcmp(testbuf, teststring, sizeof(teststring)) == 0);
- check(camel_seekable_stream_tell(ss) == ss->bound_start + (i+1)*sizeof(teststring));
-
- /* yeah great, the substreams affect the seek ... */
- check(camel_seekable_stream_seek(sp, ss->bound_start + (i)*sizeof(teststring), CAMEL_STREAM_SET) == ss->bound_start + i*sizeof(teststring));
- check(camel_stream_read(CAMEL_STREAM(sp), testbuf, sizeof(teststring)) == sizeof(teststring));
- check(memcmp(testbuf, teststring, sizeof(teststring)) == 0);
- check(camel_seekable_stream_tell(sp) == ss->bound_start + (i+1)*sizeof(teststring));
- }
- len = (ss->bound_end-ss->bound_start) % sizeof(teststring);
- check(camel_stream_read(s, testbuf, len) == len);
- check(memcmp(testbuf, teststring, len) == 0);
-
- check(camel_seekable_stream_seek(sp, ss->bound_end - len, CAMEL_STREAM_SET) == ss->bound_end - len);
- check(camel_stream_read(CAMEL_STREAM(sp), testbuf, len) == len);
- check(memcmp(testbuf, teststring, len) == 0);
-
- check(camel_stream_eos(s));
- check(camel_seekable_stream_tell(ss) == ss->bound_end);
- check(camel_seekable_stream_tell(sp) == ss->bound_end);
- check(camel_stream_read(s, testbuf, 1024) == 0);
- check(camel_seekable_stream_tell(ss) == ss->bound_end);
- check(camel_seekable_stream_tell(sp) == ss->bound_end);
- check(camel_stream_eos(s));
- } else {
- /* just 10K */
- for (i=0;i<10240;i++) {
- check(camel_stream_read(s, testbuf, sizeof(teststring)) == sizeof(teststring));
- check(memcmp(testbuf, teststring, sizeof(teststring)) == 0);
- check(camel_seekable_stream_tell(ss) == ss->bound_start + (i+1)*sizeof(teststring));
-
- check(camel_seekable_stream_seek(sp, ss->bound_start + (i)*sizeof(teststring), CAMEL_STREAM_SET) == ss->bound_start + i*sizeof(teststring));
- check(camel_stream_read(CAMEL_STREAM(sp), testbuf, sizeof(teststring)) == sizeof(teststring));
- check(memcmp(testbuf, teststring, sizeof(teststring)) == 0);
- check(camel_seekable_stream_tell(sp) == ss->bound_start + (i+1)*sizeof(teststring));
- }
-
- /* unbound - we dont know the real length */
-#if 0
- end = 10240*sizeof(teststring)+ss->bound_start;
-
- check(camel_seekable_stream_seek(ss, 0, CAMEL_STREAM_END) == end);
- check(camel_seekable_stream_tell(ss) == end);
- /* need to read 0 first to set eos */
- check(camel_stream_read(s, testbuf, 10240) == 0);
- check(camel_stream_eos(s));
-#endif
- }
-
- pull();
-}
diff --git a/camel/tests/lib/streams.h b/camel/tests/lib/streams.h
deleted file mode 100644
index df52e283d0..0000000000
--- a/camel/tests/lib/streams.h
+++ /dev/null
@@ -1,12 +0,0 @@
-
-#include "camel/camel-seekable-stream.h"
-
-/* call one, then the other on the same stream content */
-void test_stream_seekable_writepart(CamelSeekableStream *s);
-void test_stream_seekable_readpart(CamelSeekableStream *s);
-
-/* same, for substreams, multiple ways of writing */
-#define SEEKABLE_SUBSTREAM_WAYS (2)
-
-void test_seekable_substream_writepart(CamelStream *s, int type);
-void test_seekable_substream_readpart(CamelStream *s);
diff --git a/camel/tests/message/.cvsignore b/camel/tests/message/.cvsignore
deleted file mode 100644
index 4f58c83bd0..0000000000
--- a/camel/tests/message/.cvsignore
+++ /dev/null
@@ -1,15 +0,0 @@
-.deps
-Makefile
-Makefile.in
-.libs
-.deps
-*.lo
-*.la
-test1
-test2
-test3
-*.msg
-*.bb
-*.bbg
-*.da
-*.gcov
diff --git a/camel/tests/message/Makefile.am b/camel/tests/message/Makefile.am
deleted file mode 100644
index aa430fa409..0000000000
--- a/camel/tests/message/Makefile.am
+++ /dev/null
@@ -1,23 +0,0 @@
-
-INCLUDES = -I$(top_srcdir)/intl -I$(top_srcdir) -I$(top_srcdir)/camel \
- -I$(includedir) \
- -I$(top_srcdir)/camel/tests/lib \
- -DG_LOG_DOMAIN=\"evolution-tests\"
-
-LDADD = \
- $(top_builddir)/camel/libcamel.la \
- $(top_builddir)/e-util/libeutil.la \
- $(top_builddir)/libibex/libibex.la \
- $(GNOME_LIBDIR) \
- $(top_builddir)/camel/tests/lib/libcameltest.a \
- $(GNOMEUI_LIBS) $(INTLLIBS) $(EXTRA_GNOME_LIBS)
-
-check_PROGRAMS = \
- test1 \
- test2 \
- test3
-
-TESTS = test1 test2 test3
-
-
-
diff --git a/camel/tests/message/README b/camel/tests/message/README
deleted file mode 100644
index 280344ce9b..0000000000
--- a/camel/tests/message/README
+++ /dev/null
@@ -1,5 +0,0 @@
-
-test1 creating, saving, loading simple messages
-test2 camelinternetaddress tests, internationalised addresses, etc.
-test3 multipart messages
-
diff --git a/camel/tests/message/test1.c b/camel/tests/message/test1.c
deleted file mode 100644
index 3294000550..0000000000
--- a/camel/tests/message/test1.c
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
- test1.c
-
- Create a message, save it.
-
- Retrieve message, compare content.
-
-
- Operations:
- writing/loading from different types of streams
- reading/writing different content
- reading/writing different encodings
- reading/writing different charsets
-
- Just testing streams:
- different stream types
- different file ops
- seek, eof, etc.
-*/
-
-#include "camel-test.h"
-#include "messages.h"
-
-/* for stat */
-#include <sys/stat.h>
-#include <unistd.h>
-
-#include <camel/camel-mime-message.h>
-#include <camel/camel-stream-fs.h>
-#include <camel/camel-stream-mem.h>
-
-struct _text {
- char *text;
- int len;
-};
-
-#define MAX_TEXTS (14)
-struct _text texts[MAX_TEXTS];
-
-static void
-setup(void)
-{
- int i, j;
- char *p;
-
- /* setup various edge and other general cases */
- texts[0].text = "";
- texts[0].len = 0;
- texts[1].text = "";
- texts[1].len = 1;
- texts[2].text = "\n";
- texts[2].len = 1;
- texts[3].text = "A";
- texts[3].len = 1;
- texts[4].text = "This is a test.\n.";
- texts[4].len = strlen(texts[4].text);
- texts[5].text = "This is a test.\n\n.\n";
- texts[5].len = strlen(texts[5].text);
- texts[6].text = g_malloc0(1024);
- texts[6].len = 1024;
- texts[7].text = g_malloc0(102400);
- texts[7].len = 102400;
- texts[8].text = g_malloc(1024);
- memset(texts[8].text, '\n', 1024);
- texts[8].len = 1024;
- texts[9].text = g_malloc(102400);
- memset(texts[9].text, '\n', 102400);
- texts[9].len = 102400;
- texts[10].text = g_malloc(1024);
- memset(texts[10].text, ' ', 1024);
- texts[10].len = 1024;
- texts[11].text = g_malloc(102400);
- memset(texts[11].text, ' ', 102400);
- texts[11].len = 102400;
-
- srand(42);
- p = texts[12].text = g_malloc(1024);
- for (i=0;i<1024;i++) {
- j = rand();
- if (j<RAND_MAX/120)
- *p++ = '\n';
- else
- *p++ = (j % 95) + 32;
- }
- texts[12].len = 1024;
- p = texts[13].text = g_malloc(102400);
- for (i=0;i<102400;i++) {
- j = rand();
- if (j<RAND_MAX/120)
- *p++ = '\n';
- else
- *p++ = (j % 95) + 32;
- }
- texts[13].len = 102400;
-}
-
-static void cleanup(void)
-{
- int i;
-
- for (i=6;i<14;i++) {
- g_free(texts[i].text);
- }
-}
-
-int main(int argc, char **argv)
-{
- CamelMimeMessage *msg, *msg2;
- int i, j;
- char *text;
- int len;
-
- camel_test_init(argc, argv);
-
- setup();
-
- camel_test_start("Simple memory-based content creation");
-
- /* test all ways of setting simple content for a message (i.e. memory based) */
- for (j=0;j<MAX_TEXTS;j++) {
- push("testing text number %d", j);
- text = texts[j].text;
- len = texts[j].len;
- for (i=0;i<SET_CONTENT_WAYS;i++) {
- push("create simple message %d", i);
- msg = test_message_create_simple();
-
- push("set simple content");
- test_message_set_content_simple((CamelMimePart *)msg, i, "text/plain", text, len);
- pull();
-
- push("compare original content");
- test_message_compare_content(camel_medium_get_content_object((CamelMedium *)msg), text, len);
- pull();
-
- push("save message to test1.msg");
- unlink("test1.msg");
- test_message_write_file(msg, "test1.msg");
- check_unref(msg, 1);
- pull();
-
- push("read from test1.msg");
- msg2 = test_message_read_file("test1.msg");
- pull();
-
- push("compare read with original content");
- test_message_compare_content(camel_medium_get_content_object((CamelMedium *)msg2), text, len);
- check_unref(msg2, 1);
- pull();
-
- unlink("test1.msg");
- pull();
- }
- pull();
- }
-
- camel_test_end();
-
- camel_test_start("Different encodings");
- for (j=0;j<MAX_TEXTS;j++) {
- push("testing text number %d", j);
- text = texts[j].text;
- len = texts[j].len;
- for (i=0;i<CAMEL_MIME_PART_NUM_ENCODINGS;i++) {
-
- push("test simple message, encoding %s", camel_mime_part_encoding_to_string(i));
- msg = test_message_create_simple();
-
- push("set simple content");
- test_message_set_content_simple((CamelMimePart *)msg, 0, "text/plain", text, len);
- pull();
-
- camel_mime_part_set_encoding((CamelMimePart *)msg, i);
-
- push("save message to test1.msg");
- unlink("test1.msg");
- test_message_write_file(msg, "test1.msg");
- check_unref(msg, 1);
- pull();
-
- push("read from test1.msg");
- msg2 = test_message_read_file("test1.msg");
- pull();
-
- push("compare read with original content");
- test_message_compare_content(camel_medium_get_content_object((CamelMedium *)msg2), text, len);
- check_unref(msg2, 1);
- pull();
-
- unlink("test1.msg");
- pull();
- }
- pull();
- }
- camel_test_end();
-
- cleanup();
-
- return 0;
-}
diff --git a/camel/tests/message/test2.c b/camel/tests/message/test2.c
deleted file mode 100644
index abeafa9524..0000000000
--- a/camel/tests/message/test2.c
+++ /dev/null
@@ -1,327 +0,0 @@
-#include "camel-test.h"
-#include "messages.h"
-#include "addresses.h"
-
-/* for stat */
-#include <sys/stat.h>
-#include <unistd.h>
-#include <string.h>
-#include <stdio.h>
-
-#include <unicode.h>
-
-#include <camel/camel-internet-address.h>
-#include <camel/camel-address.h>
-
-#include "address-data.h"
-
-static char *convert(const char *in, const char *from, const char *to)
-{
- unicode_iconv_t ic = unicode_iconv_open(to, from);
- char *out, *outp;
- const char *inp;
- int inlen, outlen;
-
- if (ic == (unicode_iconv_t)-1)
- return g_strdup(in);
-
- inlen = strlen(in);
- outlen = inlen*5 + 16;
-
- outp = out = g_malloc(outlen);
- inp = in;
-
- if (unicode_iconv(ic, &inp, &inlen, &outp, &outlen) == -1) {
- test_free(out);
- unicode_iconv_close(ic);
- return g_strdup(in);
- }
-
- if (unicode_iconv(ic, NULL, 0, &outp, &outlen) == -1) {
- test_free(out);
- unicode_iconv_close(ic);
- return g_strdup(in);
- }
-
- unicode_iconv_close(ic);
-
- *outp = 0;
-
-#if 0
- /* lets see if we can convert back again? */
- {
- char *nout, *noutp;
- unicode_iconv_t ic = unicode_iconv_open(from, to);
-
- inp = out;
- inlen = strlen(out);
- outlen = inlen*5 + 16;
- noutp = nout = g_malloc(outlen);
- if (unicode_iconv(ic, &inp, &inlen, &noutp, &outlen) == -1
- || unicode_iconv(ic, NULL, 0, &noutp, &outlen) == -1) {
- g_warning("Cannot convert '%s' \n from %s to %s: %s\n", in, to, from, strerror(errno));
- }
- unicode_iconv_close(ic);
- }
-
- /* and lets see what camel thinks out optimal charset is */
- {
- printf("Camel thinks the best encoding of '%s' is %s, although we converted from %s\n",
- in, camel_charset_best(out, strlen(out)), from);
- }
-#endif
-
- return out;
-}
-
-#define to_utf8(in, type) convert(in, type, "utf-8")
-#define from_utf8(in, type) convert(in, "utf-8", type)
-
-#define ARRAY_LEN(x) (sizeof(x)/sizeof(x[0]))
-
-int main(int argc, char **argv)
-{
- int i;
- CamelInternetAddress *addr, *addr2;
- char *name;
- char *charset;
- const char *real, *where;
- char *enc, *enc2, *format, *format2;
-
- camel_test_init(argc, argv);
-
- camel_test_start("CamelInternetAddress, basics");
-
- addr = camel_internet_address_new();
-
- push("Test blank address");
- check(camel_address_length(CAMEL_ADDRESS(addr)) == 0);
- check(camel_internet_address_get(addr, 0, &real, &where) == FALSE);
- pull();
-
- push("Test blank clone");
- addr2 = CAMEL_INTERNET_ADDRESS(camel_address_new_clone(CAMEL_ADDRESS(addr)));
- test_address_compare(addr, addr2);
- check_unref(addr2, 1);
- pull();
-
- push("Test add 1");
- camel_internet_address_add(addr, "Zed", "nowhere@here.com.au");
- check(camel_address_length(CAMEL_ADDRESS(addr)) == 1);
- check(camel_internet_address_get(addr, 0, &real, &where) == TRUE);
- check_msg(string_equal("Zed", real), "real = '%s'", real);
- check(strcmp(where, "nowhere@here.com.au") == 0);
- pull();
-
- push("Test clone 1");
- addr2 = CAMEL_INTERNET_ADDRESS(camel_address_new_clone(CAMEL_ADDRESS(addr)));
- test_address_compare(addr, addr2);
- check_unref(addr2, 1);
- pull();
-
- push("Test add many");
- for (i=1;i<10;i++) {
- char name[16], a[32];
- sprintf(name, "Zed %d", i);
- sprintf(a, "nowhere@here-%d.com.au", i);
- camel_internet_address_add(addr, name, a);
- check(camel_address_length(CAMEL_ADDRESS(addr)) == i+1);
- check(camel_internet_address_get(addr, i, &real, &where) == TRUE);
- check_msg(string_equal(name, real), "name = '%s' real = '%s'", name, real);
- check(strcmp(where, a) == 0);
- }
- pull();
-
- /* put a few of these in to make it look like its doing something impressive ... :) */
- camel_test_end();
- camel_test_start("CamelInternetAddress, search");
-
- push("Test search");
- camel_test_nonfatal("Address comparisons should ignore whitespace??");
- check(camel_internet_address_find_name(addr, "Zed 1", &where) == 1);
- check(camel_internet_address_find_name(addr, "Zed 9", &where) == 9);
- check(camel_internet_address_find_name(addr, "Zed", &where) == 0);
- check(camel_internet_address_find_name(addr, " Zed", &where) == 0);
- check(camel_internet_address_find_name(addr, "Zed ", &where) == 0);
- check(camel_internet_address_find_name(addr, " Zed ", &where) == 0);
- check(camel_internet_address_find_name(addr, "Zed 20", &where) == -1);
- check(camel_internet_address_find_name(addr, "", &where) == -1);
- /* interface dont handle nulls :) */
- /*check(camel_internet_address_find_name(addr, NULL, &where) == -1);*/
-
- check(camel_internet_address_find_address(addr, "nowhere@here-1.com.au", &where) == 1);
- check(camel_internet_address_find_address(addr, "nowhere@here-1 . com.au", &where) == 1);
- check(camel_internet_address_find_address(addr, "nowhere@here-2 .com.au ", &where) == 2);
- check(camel_internet_address_find_address(addr, " nowhere @here-3.com.au", &where) == 3);
- check(camel_internet_address_find_address(addr, "nowhere@here-20.com.au ", &where) == -1);
- check(camel_internet_address_find_address(addr, "", &where) == -1);
- /*check(camel_internet_address_find_address(addr, NULL, &where) == -1);*/
- camel_test_fatal();
- pull();
-
- camel_test_end();
- camel_test_start("CamelInternetAddress, copy/cat/clone");
-
- push("Test clone many");
- addr2 = CAMEL_INTERNET_ADDRESS(camel_address_new_clone(CAMEL_ADDRESS(addr)));
- test_address_compare(addr, addr2);
- pull();
-
- push("Test remove items");
- camel_address_remove(CAMEL_ADDRESS(addr2), 0);
- check(camel_address_length(CAMEL_ADDRESS(addr2)) == 9);
- camel_address_remove(CAMEL_ADDRESS(addr2), 0);
- check(camel_address_length(CAMEL_ADDRESS(addr2)) == 8);
- camel_address_remove(CAMEL_ADDRESS(addr2), 5);
- check(camel_address_length(CAMEL_ADDRESS(addr2)) == 7);
- camel_address_remove(CAMEL_ADDRESS(addr2), 10);
- check(camel_address_length(CAMEL_ADDRESS(addr2)) == 7);
- camel_address_remove(CAMEL_ADDRESS(addr2), -1);
- check(camel_address_length(CAMEL_ADDRESS(addr2)) == 0);
- check_unref(addr2, 1);
- pull();
-
- push("Testing copy/cat");
- push("clone + cat");
- addr2 = CAMEL_INTERNET_ADDRESS(camel_address_new_clone(CAMEL_ADDRESS(addr)));
- camel_address_cat(CAMEL_ADDRESS(addr2), CAMEL_ADDRESS(addr));
- check(camel_address_length(CAMEL_ADDRESS(addr)) == 10);
- check(camel_address_length(CAMEL_ADDRESS(addr2)) == 20);
- check_unref(addr2, 1);
- pull();
-
- push("cat + cat + copy");
- addr2 = camel_internet_address_new();
- camel_address_cat(CAMEL_ADDRESS(addr2), CAMEL_ADDRESS(addr));
- test_address_compare(addr, addr2);
- camel_address_cat(CAMEL_ADDRESS(addr2), CAMEL_ADDRESS(addr));
- check(camel_address_length(CAMEL_ADDRESS(addr)) == 10);
- check(camel_address_length(CAMEL_ADDRESS(addr2)) == 20);
- camel_address_copy(CAMEL_ADDRESS(addr2), CAMEL_ADDRESS(addr));
- test_address_compare(addr, addr2);
- check_unref(addr2, 1);
- pull();
-
- push("copy");
- addr2 = camel_internet_address_new();
- camel_address_copy(CAMEL_ADDRESS(addr2), CAMEL_ADDRESS(addr));
- test_address_compare(addr, addr2);
- check_unref(addr2, 1);
- pull();
-
- pull();
-
- check_unref(addr, 1);
-
- camel_test_end();
-
- camel_test_start("CamelInternetAddress, I18N");
-
- for (i=0;i<ARRAY_LEN(test_lines);i++) {
- push("Testing text line %d (%s) '%s'", i, test_lines[i].type, test_lines[i].line);
-
- addr = camel_internet_address_new();
-
- /* first, convert to api format (utf-8) */
- charset = test_lines[i].type;
- name = to_utf8(test_lines[i].line, charset);
-
- push("Address setup");
- camel_internet_address_add(addr, name, "nobody@nowhere.com");
- check(camel_internet_address_get(addr, 0, &real, &where) == TRUE);
- check_msg(string_equal(name, real), "name = '%s' real = '%s'", name, real);
- check(strcmp(where, "nobody@nowhere.com") == 0);
- test_free(name);
-
- check(camel_internet_address_get(addr, 1, &real, &where) == FALSE);
- check(camel_address_length(CAMEL_ADDRESS(addr)) == 1);
- pull();
-
- push("Address encode/decode");
- enc = camel_address_encode(CAMEL_ADDRESS(addr));
-
- addr2 = camel_internet_address_new();
- check(camel_address_decode(CAMEL_ADDRESS(addr2), enc) == 1);
- check(camel_address_length(CAMEL_ADDRESS(addr2)) == 1);
-
- enc2 = camel_address_encode(CAMEL_ADDRESS(addr2));
- check_msg(string_equal(enc, enc2), "enc = '%s' enc2 = '%s'", enc, enc2);
- test_free(enc2);
-
- push("Compare addresses");
- test_address_compare(addr, addr2);
- pull();
- check_unref(addr2, 1);
- test_free(enc);
- pull();
-
- /* FIXME: format/unformat arne't guaranteed to be reversible, at least at the moment */
- camel_test_nonfatal("format/unformat not (yet) reversible for all cases");
-
- push("Address format/unformat");
- format = camel_address_format(CAMEL_ADDRESS(addr));
-
- addr2 = camel_internet_address_new();
- check(camel_address_unformat(CAMEL_ADDRESS(addr2), format) == 1);
- check(camel_address_length(CAMEL_ADDRESS(addr2)) == 1);
-
- format2 = camel_address_format(CAMEL_ADDRESS(addr2));
- check_msg(string_equal(format, format2), "format = '%s\n\tformat2 = '%s'", format, format2);
- test_free(format2);
-
- /* currently format/unformat doesn't handle ,'s and other special chars at all */
- if (camel_address_length(CAMEL_ADDRESS(addr2)) == 1) {
- push("Compare addresses");
- test_address_compare(addr, addr2);
- pull();
- }
-
- test_free(format);
- pull();
-
- camel_test_fatal();
-
- check_unref(addr2, 1);
-
- check_unref(addr, 1);
- pull();
-
- }
-
- camel_test_end();
-
- camel_test_start("CamelInternetAddress, I18N decode");
-
- for (i=0;i<ARRAY_LEN(test_address);i++) {
- push("Testing address line %d '%s'", i, test_address[i].addr);
-
- addr = camel_internet_address_new();
- push("checking decoded");
- check(camel_address_decode(CAMEL_ADDRESS(addr), test_address[i].addr) == test_address[i].count);
- format = camel_address_format(CAMEL_ADDRESS(addr));
- check(strcmp(format, test_address[i].utf8) == 0);
- test_free(format);
- pull();
-
- push("Comparing re-encoded output");
- addr2 = CAMEL_INTERNET_ADDRESS(camel_internet_address_new());
- enc = camel_address_encode(CAMEL_ADDRESS(addr));
- check_msg(camel_address_decode(CAMEL_ADDRESS(addr2), enc) == test_address[i].count, "enc = '%s'", enc);
- test_free(enc);
- test_address_compare(addr, addr2);
- check_unref(addr2, 1);
- pull();
-
- check_unref(addr, 1);
-
- pull();
- }
-
- camel_test_end();
-
- /* FIXME: Add test of decoding of broken addresses */
-
- return 0;
-}
-
-
diff --git a/camel/tests/message/test3.c b/camel/tests/message/test3.c
deleted file mode 100644
index 0a9683d146..0000000000
--- a/camel/tests/message/test3.c
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
- Multipart.
-*/
-
-#include "camel-test.h"
-#include "messages.h"
-
-/* for stat */
-#include <sys/stat.h>
-#include <unistd.h>
-#include <string.h>
-
-#include <camel/camel-mime-message.h>
-#include <camel/camel-stream-fs.h>
-#include <camel/camel-stream-mem.h>
-#include "camel/camel-multipart.h"
-
-int main(int argc, char **argv)
-{
- CamelMimeMessage *msg, *msg2, *msg3;
- CamelMultipart *mp, *mp2;
- CamelMimePart *part, *part2, *part3;
-
- camel_test_init(argc, argv);
-
- camel_test_start("multipart message");
-
- push("building message");
- msg = test_message_create_simple();
- mp = camel_multipart_new();
-
- /* Hrm, this should be able to set its own boundary, no? */
- camel_multipart_set_boundary(mp, "_=,.XYZ_Kangaroo_Meat_is_!_ABADF00D");
- check(strcmp(camel_multipart_get_boundary(mp), "_=,.XYZ_Kangaroo_Meat_is_!_ABADF00D") == 0);
-
- camel_medium_set_content_object((CamelMedium *)msg, (CamelDataWrapper *)mp);
- check(camel_multipart_get_number(mp) == 0);
- check(camel_multipart_get_part(mp, 0) == NULL);
- check(camel_multipart_get_part(mp, 1) == NULL);
-
- push("adding/removing parts");
- part = camel_mime_part_new();
- test_message_set_content_simple(part, 0, "text/plain", "content part 1", strlen("content part 1"));
- camel_multipart_add_part(mp, part);
- check(CAMEL_OBJECT(part)->ref_count == 2);
- check(camel_multipart_get_number(mp) == 1);
- check(camel_multipart_get_part(mp, 0) == part);
- check(camel_multipart_get_part(mp, 1) == NULL);
-
- camel_multipart_remove_part(mp, part);
- check(CAMEL_OBJECT(part)->ref_count == 1);
- check(camel_multipart_get_number(mp) == 0);
- check(camel_multipart_get_part(mp, 0) == NULL);
- check(camel_multipart_get_part(mp, 1) == NULL);
-
- camel_multipart_add_part_at(mp, part, 0);
- check(CAMEL_OBJECT(part)->ref_count == 2);
- check(camel_multipart_get_number(mp) == 1);
- check(camel_multipart_get_part(mp, 0) == part);
- check(camel_multipart_get_part(mp, 1) == NULL);
-
- check(camel_multipart_remove_part_at(mp, 1) == NULL);
- check(CAMEL_OBJECT(part)->ref_count == 2);
- check(camel_multipart_get_number(mp) == 1);
- check(camel_multipart_get_part(mp, 0) == part);
- check(camel_multipart_get_part(mp, 1) == NULL);
-
- check(camel_multipart_remove_part_at(mp, 0) == part);
- check(CAMEL_OBJECT(part)->ref_count == 1);
- check(camel_multipart_get_number(mp) == 0);
- check(camel_multipart_get_part(mp, 0) == NULL);
- check(camel_multipart_get_part(mp, 1) == NULL);
-
- camel_multipart_add_part(mp, part);
- check(CAMEL_OBJECT(part)->ref_count == 2);
- check(camel_multipart_get_number(mp) == 1);
- check(camel_multipart_get_part(mp, 0) == part);
- check(camel_multipart_get_part(mp, 1) == NULL);
-
- part2 = camel_mime_part_new();
- test_message_set_content_simple(part2, 0, "text/plain", "content part 2", strlen("content part 2"));
- camel_multipart_add_part(mp, part2);
- check(CAMEL_OBJECT(part2)->ref_count == 2);
- check(camel_multipart_get_number(mp) == 2);
- check(camel_multipart_get_part(mp, 0) == part);
- check(camel_multipart_get_part(mp, 1) == part2);
-
- part3 = camel_mime_part_new();
- test_message_set_content_simple(part3, 0, "text/plain", "content part 3", strlen("content part 3"));
- camel_multipart_add_part_at(mp, part3, 1);
- check(CAMEL_OBJECT(part3)->ref_count == 2);
- check(camel_multipart_get_number(mp) == 3);
- check(camel_multipart_get_part(mp, 0) == part);
- check(camel_multipart_get_part(mp, 1) == part3);
- check(camel_multipart_get_part(mp, 2) == part2);
- pull();
-
- push("save message to test3.msg");
- unlink("test3.msg");
- test_message_write_file(msg, "test3.msg");
- pull();
-
- push("read from test3.msg");
- msg2 = test_message_read_file("test3.msg");
- pull();
-
- push("compre content of multipart");
- mp2 = (CamelMultipart *)camel_medium_get_content_object((CamelMedium *)msg2);
- check(mp2 != NULL);
- check(CAMEL_IS_MULTIPART(mp2));
- check(camel_multipart_get_number(mp2) == 3);
-
- check(strcmp(camel_multipart_get_boundary(mp2), "_=,.XYZ_Kangaroo_Meat_is_!_ABADF00D") == 0);
- check(mp2->preface == NULL || strlen(mp2->preface) == 0);
-
- /* FIXME */
- camel_test_nonfatal("postface may gain a single \\n?");
- check_msg(mp2->postface == NULL || strlen(mp2->postface) == 0, "postface: '%s'", mp2->postface);
- camel_test_fatal();
-
- test_message_compare_content(camel_medium_get_content_object(CAMEL_MEDIUM(camel_multipart_get_part(mp2, 0))),
- "content part 1", strlen("content part 1"));
- test_message_compare_content(camel_medium_get_content_object(CAMEL_MEDIUM(camel_multipart_get_part(mp2, 1))),
- "content part 3", strlen("content part 3"));
- test_message_compare_content(camel_medium_get_content_object(CAMEL_MEDIUM(camel_multipart_get_part(mp2, 2))),
- "content part 2", strlen("content part 2"));
- pull();
-
- push("writing again, & re-reading");
- unlink("test3-2.msg");
- test_message_write_file(msg2, "test3-2.msg");
- msg3 = test_message_read_file("test3-2.msg");
-
- push("comparing again");
- mp2 = (CamelMultipart *)camel_medium_get_content_object((CamelMedium *)msg3);
- check(mp2 != NULL);
- check(CAMEL_IS_MULTIPART(mp2));
- check(camel_multipart_get_number(mp2) == 3);
-
- check(strcmp(camel_multipart_get_boundary(mp2), "_=,.XYZ_Kangaroo_Meat_is_!_ABADF00D") == 0);
- check(mp2->preface == NULL || strlen(mp2->preface) == 0);
-
- /* FIXME */
- camel_test_nonfatal("postface may gain a single \\n?");
- check_msg(mp2->postface == NULL || strlen(mp2->postface) == 0, "postface: '%s'", mp2->postface);
- camel_test_fatal();
-
- test_message_compare_content(camel_medium_get_content_object(CAMEL_MEDIUM(camel_multipart_get_part(mp2, 0))),
- "content part 1", strlen("content part 1"));
- test_message_compare_content(camel_medium_get_content_object(CAMEL_MEDIUM(camel_multipart_get_part(mp2, 1))),
- "content part 3", strlen("content part 3"));
- test_message_compare_content(camel_medium_get_content_object(CAMEL_MEDIUM(camel_multipart_get_part(mp2, 2))),
- "content part 2", strlen("content part 2"));
- pull();
- pull();
-
- check_unref(msg2, 1);
- check_unref(msg3, 1);
-
- push("testing pre/post text");
- camel_multipart_set_preface(mp, "pre-text\nLines.");
- camel_multipart_set_postface(mp, "post-text, no lines.\nOne line.\n");
-
- check(strcmp(mp->preface, "pre-text\nLines.") == 0);
- check(strcmp(mp->postface, "post-text, no lines.\nOne line.\n") == 0);
-
- push("writing /re-reading");
- unlink("test3-3.msg");
- test_message_write_file(msg, "test3-3.msg");
- msg2 = test_message_read_file("test3-3.msg");
-
- mp2 = (CamelMultipart *)camel_medium_get_content_object((CamelMedium *)msg2);
- check(mp2 != NULL);
- check(CAMEL_IS_MULTIPART(mp2));
- check(camel_multipart_get_number(mp2) == 3);
-
- check(strcmp(camel_multipart_get_boundary(mp2), "_=,.XYZ_Kangaroo_Meat_is_!_ABADF00D") == 0);
- check(strcmp(mp2->preface, "pre-text\nLines.") == 0);
- check(strcmp(mp2->postface, "post-text, no lines.\nOne line.\n") == 0);
- test_message_compare_content(camel_medium_get_content_object(CAMEL_MEDIUM(camel_multipart_get_part(mp2, 0))),
- "content part 1", strlen("content part 1"));
- test_message_compare_content(camel_medium_get_content_object(CAMEL_MEDIUM(camel_multipart_get_part(mp2, 1))),
- "content part 3", strlen("content part 3"));
- test_message_compare_content(camel_medium_get_content_object(CAMEL_MEDIUM(camel_multipart_get_part(mp2, 2))),
- "content part 2", strlen("content part 2"));
- pull();
- check_unref(msg2, 1);
- pull();
-
- check_unref(msg, 1);
- check_unref(mp, 1);
- check_unref(part, 1);
- check_unref(part2, 1);
- check_unref(part3, 1);
-
- camel_test_end();
-
- return 0;
-}
diff --git a/camel/tests/misc/.cvsignore b/camel/tests/misc/.cvsignore
deleted file mode 100644
index 3fa8afaa38..0000000000
--- a/camel/tests/misc/.cvsignore
+++ /dev/null
@@ -1,11 +0,0 @@
-.deps
-Makefile
-Makefile.in
-.libs
-.deps
-*.lo
-*.la
-*.bb
-*.bbg
-*.da
-*.gcov
diff --git a/camel/tests/misc/Makefile.am b/camel/tests/misc/Makefile.am
deleted file mode 100644
index 1cbcab8c26..0000000000
--- a/camel/tests/misc/Makefile.am
+++ /dev/null
@@ -1,21 +0,0 @@
-
-INCLUDES = -I$(top_srcdir)/intl -I$(top_srcdir) -I$(top_srcdir)/camel \
- -I$(includedir) \
- -I$(top_srcdir)/camel/tests/lib \
- -DG_LOG_DOMAIN=\"evolution-tests\"
-
-LDADD = \
- $(top_builddir)/camel/libcamel.la \
- $(top_builddir)/e-util/libeutil.la \
- $(top_builddir)/libibex/libibex.la \
- $(GNOME_LIBDIR) \
- $(top_builddir)/camel/tests/lib/libcameltest.a \
- $(GNOMEUI_LIBS) $(INTLLIBS) $(EXTRA_GNOME_LIBS)
-
-check_PROGRAMS = \
- url
-
-TESTS = url
-
-
-
diff --git a/camel/tests/misc/README b/camel/tests/misc/README
deleted file mode 100644
index d972108860..0000000000
--- a/camel/tests/misc/README
+++ /dev/null
@@ -1,3 +0,0 @@
-
-url URL parsing
-
diff --git a/camel/tests/misc/url.c b/camel/tests/misc/url.c
deleted file mode 100644
index cc61ef3cd6..0000000000
--- a/camel/tests/misc/url.c
+++ /dev/null
@@ -1,103 +0,0 @@
-#include <config.h>
-
-#include <ctype.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <camel/camel-url.h>
-
-#include "camel-test.h"
-
-char *base = "http://a/b/c/d;p?q#f";
-
-struct {
- char *url_string, *result;
-} tests[] = {
- { "g:h", "g:h" },
- { "g", "http://a/b/c/g" },
- { "./g", "http://a/b/c/g" },
- { "g/", "http://a/b/c/g/" },
- { "/g", "http://a/g" },
- { "//g", "http://g" },
- { "?y", "http://a/b/c/d;p?y" },
- { "g?y", "http://a/b/c/g?y" },
- { "g?y/./x", "http://a/b/c/g?y/./x" },
- { "#s", "http://a/b/c/d;p?q#s" },
- { "g#s", "http://a/b/c/g#s" },
- { "g#s/./x", "http://a/b/c/g#s/./x" },
- { "g?y#s", "http://a/b/c/g?y#s" },
- { ";x", "http://a/b/c/d;x" },
- { "g;x", "http://a/b/c/g;x" },
- { "g;x?y#s", "http://a/b/c/g;x?y#s" },
- { ".", "http://a/b/c/" },
- { "./", "http://a/b/c/" },
- { "..", "http://a/b/" },
- { "../", "http://a/b/" },
- { "../g", "http://a/b/g" },
- { "../..", "http://a/" },
- { "../../", "http://a/" },
- { "../../g", "http://a/g" },
- { "", "http://a/b/c/d;p?q#f" },
- { "../../../g", "http://a/../g" },
- { "../../../../g", "http://a/../../g" },
- { "/./g", "http://a/./g" },
- { "/../g", "http://a/../g" },
- { "g.", "http://a/b/c/g." },
- { ".g", "http://a/b/c/.g" },
- { "g..", "http://a/b/c/g.." },
- { "..g", "http://a/b/c/..g" },
- { "./../g", "http://a/b/g" },
- { "./g/.", "http://a/b/c/g/" },
- { "g/./h", "http://a/b/c/g/h" },
- { "g/../h", "http://a/b/c/h" },
- { "http:g", "http:g" },
- { "http:", "http:" }
-};
-int num_tests = sizeof (tests) / sizeof (tests[0]);
-
-int
-main (int argc, char **argv)
-{
- CamelURL *base_url, *url;
- char *url_string;
- int i;
-
- camel_test_init (argc, argv);
-
- camel_test_start ("RFC1808 relative URL parsing");
-
- camel_test_push ("base URL parsing");
- base_url = camel_url_new (base);
- if (!base_url)
- camel_test_fail ("Could not parse %s\n", base);
- camel_test_pull ();
-
- camel_test_push ("base URL unparsing");
- url_string = camel_url_to_string (base_url, 0);
- if (strcmp (url_string, base) != 0) {
- camel_test_fail ("URL <%s> unparses to <%s>\n",
- base, url_string);
- }
- camel_test_pull ();
- g_free (url_string);
-
- for (i = 0; i < num_tests; i++) {
- camel_test_push ("<%s> + <%s> = <%s>?", base, tests[i].url_string, tests[i].result);
- url = camel_url_new_with_base (base_url, tests[i].url_string);
- if (!url) {
- camel_test_fail ("could not parse");
- camel_test_pull ();
- continue;
- }
-
- url_string = camel_url_to_string (url, 0);
- if (strcmp (url_string, tests[i].result) != 0)
- camel_test_fail ("got <%s>!", url_string);
- g_free (url_string);
- camel_test_pull ();
- }
-
- camel_test_end ();
-
- return 0;
-}
diff --git a/camel/tests/smime/.cvsignore b/camel/tests/smime/.cvsignore
deleted file mode 100644
index c0feca5888..0000000000
--- a/camel/tests/smime/.cvsignore
+++ /dev/null
@@ -1,5 +0,0 @@
-.deps
-.libs
-Makefile*
-pgp
-pgp-mime
diff --git a/camel/tests/smime/Makefile.am b/camel/tests/smime/Makefile.am
deleted file mode 100644
index 7027729487..0000000000
--- a/camel/tests/smime/Makefile.am
+++ /dev/null
@@ -1,20 +0,0 @@
-
-INCLUDES = -I$(top_srcdir)/intl -I$(top_srcdir) -I$(top_srcdir)/camel \
- -I$(includedir) \
- -I$(top_srcdir)/camel/tests/lib \
- -DG_LOG_DOMAIN=\"evolution-tests\"
-
-LDADD = \
- $(top_builddir)/camel/libcamel.la \
- $(top_builddir)/e-util/libeutil.la \
- $(top_builddir)/libibex/libibex.la \
- $(GNOME_LIBDIR) \
- $(top_builddir)/camel/tests/lib/libcameltest.a \
- $(GNOMEUI_LIBS) $(INTLLIBS) $(EXTRA_GNOME_LIBS) \
- $(BONOBO_GNOME_LIBS)
-
-check_PROGRAMS = \
- pgp \
- pgp-mime
-
-TESTS = pgp pgp-mime
diff --git a/camel/tests/smime/README b/camel/tests/smime/README
deleted file mode 100644
index baad91ba00..0000000000
--- a/camel/tests/smime/README
+++ /dev/null
@@ -1,2 +0,0 @@
-pgp PGP test suite
-
diff --git a/camel/tests/smime/pgp-mime.c b/camel/tests/smime/pgp-mime.c
deleted file mode 100644
index 8564d1bda7..0000000000
--- a/camel/tests/smime/pgp-mime.c
+++ /dev/null
@@ -1,101 +0,0 @@
-#include <config.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <camel/camel-pgp-mime.h>
-#include <camel/camel-stream-mem.h>
-
-#include "camel-test.h"
-
-static char test_msg[] = "Since we need to make sure that\nFrom lines work okay, we should test that"
-"as well as test 8bit chars and other fun stuff? 8bit chars: Dra¾en Kaèar\n\nOkay, I guess that covers"
-"the basics at least...\n";
-
-/* god, who designed this horrid interface */
-static gpointer auth_callback (CamelAuthCallbackMode mode,
- char *data, gboolean secret,
- CamelService *service, char *item,
- CamelException *ex)
-{
- return g_strdup ("PGP/MIME is rfc2015, now go and read it.");
-}
-
-int main (int argc, char **argv)
-{
- CamelSession *session;
- CamelPgpContext *ctx;
- CamelException *ex;
- CamelCipherValidity *valid;
- CamelMimePart *mime_part, *part;
- GPtrArray *recipients;
-
- camel_test_init (argc, argv);
-
- ex = camel_exception_new ();
-
- /* clear out any camel-test data */
- system("/bin/rm -rf /tmp/camel-test");
-
- session = camel_session_new ("/tmp/camel-test",
- auth_callback, NULL, NULL);
-
- ctx = camel_pgp_context_new (session, CAMEL_PGP_TYPE_GPG, "/usr/bin/gpg");
-
- camel_test_start ("Test of PGP/MIME functions");
-
- mime_part = camel_mime_part_new ();
- camel_mime_part_set_content (mime_part, test_msg, strlen (test_msg), "text/plain");
- camel_mime_part_set_description (mime_part, "Test of PGP/MIME multipart/signed stuff");
-
- camel_test_push ("PGP/MIME signing");
- camel_pgp_mime_part_sign (ctx, &mime_part, "pgp-mime@xtorshun.org", CAMEL_CIPHER_HASH_SHA1, ex);
- check_msg (!camel_exception_is_set (ex), "%s", camel_exception_get_description (ex));
- check_msg (camel_pgp_mime_is_rfc2015_signed (mime_part),
- "Huh, the MIME part does not seem to be a valid multipart/signed part");
- camel_test_pull ();
-
- camel_exception_clear (ex);
-
- camel_test_push ("PGP/MIME verify");
- valid = camel_pgp_mime_part_verify (ctx, mime_part, ex);
- check_msg (!camel_exception_is_set (ex), "%s", camel_exception_get_description (ex));
- check_msg (camel_cipher_validity_get_valid (valid), "%s", camel_cipher_validity_get_description (valid));
- camel_cipher_validity_free (valid);
- camel_test_pull ();
-
- camel_object_unref (CAMEL_OBJECT (mime_part));
-
- camel_exception_clear (ex);
-
- mime_part = camel_mime_part_new ();
- camel_mime_part_set_content (mime_part, test_msg, strlen (test_msg), "text/plain");
- camel_mime_part_set_description (mime_part, "Test of PGP/MIME multipart/encrypted stuff");
-
- camel_test_push ("PGP/MIME encrypt");
- recipients = g_ptr_array_new ();
- g_ptr_array_add (recipients, "pgp-mime@xtorshun.org");
- camel_pgp_mime_part_encrypt (ctx, &mime_part, recipients, ex);
- check_msg (!camel_exception_is_set (ex), "%s", camel_exception_get_description (ex));
- check_msg (camel_pgp_mime_is_rfc2015_encrypted (mime_part),
- "Huh, the MIME part does not seem to be a valid multipart/encrypted part");
- g_ptr_array_free (recipients, TRUE);
- camel_test_pull ();
-
- camel_exception_clear (ex);
-
- camel_test_push ("PGP/MIME decrypt");
- part = camel_pgp_mime_part_decrypt (ctx, mime_part, ex);
- check_msg (!camel_exception_is_set (ex), "%s", camel_exception_get_description (ex));
- camel_object_unref (CAMEL_OBJECT (part));
- camel_test_pull ();
-
- camel_object_unref (CAMEL_OBJECT (mime_part));
-
- camel_object_unref (CAMEL_OBJECT (ctx));
- camel_object_unref (CAMEL_OBJECT (session));
-
- camel_test_end ();
-
- return 0;
-}
diff --git a/camel/tests/smime/pgp.c b/camel/tests/smime/pgp.c
deleted file mode 100644
index 30ee7b96dd..0000000000
--- a/camel/tests/smime/pgp.c
+++ /dev/null
@@ -1,110 +0,0 @@
-#include <config.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <camel/camel-pgp-context.h>
-#include <camel/camel-stream-mem.h>
-
-#include "camel-test.h"
-
-/* god, who designed this horrid interface */
-static gpointer auth_callback (CamelAuthCallbackMode mode,
- char *data, gboolean secret,
- CamelService *service, char *item,
- CamelException *ex)
-{
- return g_strdup ("PGP/MIME is rfc2015, now go and read it.");
-}
-
-int main (int argc, char **argv)
-{
- CamelSession *session;
- CamelPgpContext *ctx;
- CamelException *ex;
- CamelCipherValidity *valid;
- CamelStream *stream1, *stream2, *stream3;
- GPtrArray *recipients;
- GByteArray *buf;
- char *before, *after;
-
- camel_test_init (argc, argv);
-
- ex = camel_exception_new ();
-
- /* clear out any camel-test data */
- system("/bin/rm -rf /tmp/camel-test");
-
- session = camel_session_new ("/tmp/camel-test",
- auth_callback, NULL, NULL);
-
- ctx = camel_pgp_context_new (session, CAMEL_PGP_TYPE_GPG, "/usr/bin/gpg");
-
- camel_test_start ("Test of PGP functions");
-
- stream1 = camel_stream_mem_new ();
- camel_stream_write (stream1, "Hello, I am a test stream.", 25);
- camel_stream_reset (stream1);
-
- stream2 = camel_stream_mem_new ();
-
- camel_test_push ("PGP signing");
- camel_pgp_sign (ctx, "pgp-mime@xtorshun.org", CAMEL_CIPHER_HASH_SHA1,
- stream1, stream2, ex);
- check_msg (!camel_exception_is_set (ex), "%s", camel_exception_get_description (ex));
- camel_test_pull ();
-
- camel_exception_clear (ex);
-
- camel_test_push ("PGP verify");
- camel_stream_reset (stream1);
- camel_stream_reset (stream2);
- valid = camel_pgp_verify (ctx, stream1, stream2, ex);
- check_msg (!camel_exception_is_set (ex), "%s", camel_exception_get_description (ex));
- check_msg (camel_cipher_validity_get_valid (valid), "%s", camel_cipher_validity_get_description (valid));
- camel_cipher_validity_free (valid);
- camel_test_pull ();
-
- camel_object_unref (CAMEL_OBJECT (stream1));
- camel_object_unref (CAMEL_OBJECT (stream2));
-
- stream1 = camel_stream_mem_new ();
- stream2 = camel_stream_mem_new ();
- stream3 = camel_stream_mem_new ();
-
- camel_stream_write (stream1, "Hello, I am a test of encryption/decryption.", 44);
- camel_stream_reset (stream1);
-
- camel_exception_clear (ex);
-
- camel_test_push ("PGP encrypt");
- recipients = g_ptr_array_new ();
- g_ptr_array_add (recipients, "pgp-mime@xtorshun.org");
- camel_pgp_encrypt (ctx, FALSE, "pgp-mime@xtorshun.org", recipients,
- stream1, stream2, ex);
- check_msg (!camel_exception_is_set (ex), "%s", camel_exception_get_description (ex));
- g_ptr_array_free (recipients, TRUE);
- camel_test_pull ();
-
- camel_stream_reset (stream2);
- camel_exception_clear (ex);
-
- camel_test_push ("PGP decrypt");
- camel_pgp_decrypt (ctx, stream2, stream3, ex);
- check_msg (!camel_exception_is_set (ex), "%s", camel_exception_get_description (ex));
- buf = CAMEL_STREAM_MEM (stream1)->buffer;
- before = g_strndup (buf->data, buf->len);
- buf = CAMEL_STREAM_MEM (stream3)->buffer;
- after = g_strndup (buf->data, buf->len);
- check_msg (string_equal (before, after), "before = '%s', after = '%s'", before, after);
- g_free (before);
- g_free (after);
- camel_test_pull ();
-
- camel_object_unref (CAMEL_OBJECT (ctx));
- camel_object_unref (CAMEL_OBJECT (session));
-
- camel_test_end ();
-
- return 0;
-}
diff --git a/camel/tests/stream/.cvsignore b/camel/tests/stream/.cvsignore
deleted file mode 100644
index 3fa8afaa38..0000000000
--- a/camel/tests/stream/.cvsignore
+++ /dev/null
@@ -1,11 +0,0 @@
-.deps
-Makefile
-Makefile.in
-.libs
-.deps
-*.lo
-*.la
-*.bb
-*.bbg
-*.da
-*.gcov
diff --git a/camel/tests/stream/Makefile.am b/camel/tests/stream/Makefile.am
deleted file mode 100644
index d16f8aaa55..0000000000
--- a/camel/tests/stream/Makefile.am
+++ /dev/null
@@ -1,21 +0,0 @@
-
-INCLUDES = -I$(top_srcdir)/intl -I$(top_srcdir) -I$(top_srcdir)/camel \
- -I$(includedir) \
- -I$(top_srcdir)/camel/tests/lib \
- -DG_LOG_DOMAIN=\"evolution-tests\"
-
-LDADD = \
- $(top_builddir)/camel/libcamel.la \
- $(top_builddir)/e-util/libeutil.la \
- $(top_builddir)/libibex/libibex.la \
- $(GNOME_LIBDIR) \
- $(top_builddir)/camel/tests/lib/libcameltest.a \
- $(GNOMEUI_LIBS) $(INTLLIBS) $(EXTRA_GNOME_LIBS)
-
-check_PROGRAMS = \
- test1 test2 test3
-
-TESTS = test1 test2 test3
-
-
-
diff --git a/camel/tests/stream/README b/camel/tests/stream/README
deleted file mode 100644
index 8ca6a9602d..0000000000
--- a/camel/tests/stream/README
+++ /dev/null
@@ -1,4 +0,0 @@
-
-test1 camelstreamfs, creating, read/write, eos, refcounting
-test2 camelstreammem, creating, read/write, eos, refcounting
-test3 camelseekablesubstream
diff --git a/camel/tests/stream/test1.c b/camel/tests/stream/test1.c
deleted file mode 100644
index 452d45274f..0000000000
--- a/camel/tests/stream/test1.c
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- test ... camelstreamfs */
-
-#include "camel-test.h"
-#include "streams.h"
-
-#include <errno.h>
-#include <sys/stat.h>
-#include <unistd.h>
-
-#include "camel/camel-stream-fs.h"
-
-int main(int argc, char **argv)
-{
- CamelSeekableStream *ss = NULL;
- int i;
- int fd = -1;
- struct stat st;
- int size;
- char buffer[1024];
-
- camel_test_init(argc, argv);
-
- camel_test_start("CamelStream fs, open, seek, read, write, eos");
- for (i=0;i<2;i++) {
-
- (void)unlink("stream.txt");
-
- push("trying to open a nonexistant stream, method %d", i);
- switch(i) {
- case 0:
- ss = (CamelSeekableStream *)camel_stream_fs_new_with_name("stream.txt", O_RDWR, 0);
- break;
- case 1:
- fd = open("stream.txt", O_RDWR, 0);
- ss = (CamelSeekableStream *)camel_stream_fs_new_with_fd(fd);
- break;
- }
- check(ss == NULL && errno == ENOENT);
- check(stat("stream.txt", &st) == -1 && errno == ENOENT);
- pull();
-
- push("Creating stream using method %d", i);
- switch(i) {
- case 0:
- ss = (CamelSeekableStream *)camel_stream_fs_new_with_name("stream.txt", O_CREAT|O_RDWR|O_TRUNC, 0600);
- fd = ((CamelStreamFs *)ss)->fd;
- break;
- case 1:
- fd = open("stream.txt", O_CREAT|O_RDWR|O_TRUNC, 0600);
- ss = (CamelSeekableStream *)camel_stream_fs_new_with_fd(fd);
- break;
- }
- check(ss != NULL);
- check(stat("stream.txt", &st) == 0 && (st.st_mode&0777) == 0600 && S_ISREG(st.st_mode) && st.st_size == 0);
- pull();
-
- test_stream_seekable_writepart(ss);
- test_stream_seekable_readpart(ss);
-
- push("getting filesize");
- check(stat("stream.txt", &st) == 0 && (st.st_mode&0777) == 0600 && S_ISREG(st.st_mode));
- size = st.st_size;
- pull();
-
- push("checking close closes");
- check_unref(ss, 1);
- check(close(fd) == -1);
- pull();
-
- push("re-opening stream");
- switch(i) {
- case 0:
- ss = (CamelSeekableStream *)camel_stream_fs_new_with_name("stream.txt", O_RDWR, 0);
- fd = ((CamelStreamFs *)ss)->fd;
- break;
- case 1:
- fd = open("stream.txt", O_RDWR, 0);
- ss = (CamelSeekableStream *)camel_stream_fs_new_with_fd(fd);
- break;
- }
- check(ss != NULL);
- check(stat("stream.txt", &st) == 0 && (st.st_mode&0777) == 0600 && S_ISREG(st.st_mode) && st.st_size == size);
-
- test_stream_seekable_readpart(ss);
-
- check_unref(ss, 1);
- check(close(fd) == -1);
- pull();
-
- push("re-opening stream with truncate");
- switch(i) {
- case 0:
- ss = (CamelSeekableStream *)camel_stream_fs_new_with_name("stream.txt", O_RDWR|O_TRUNC, 0);
- fd = ((CamelStreamFs *)ss)->fd;
- break;
- case 1:
- fd = open("stream.txt", O_RDWR|O_TRUNC, 0);
- ss = (CamelSeekableStream *)camel_stream_fs_new_with_fd(fd);
- break;
- }
- check(ss != NULL);
- check(stat("stream.txt", &st) == 0 && (st.st_mode&0777) == 0600 && S_ISREG(st.st_mode) && st.st_size == 0);
-
- /* read has to return 0 before eos is set */
- check(camel_stream_read(CAMEL_STREAM(ss), buffer, 1) == 0);
- check(camel_stream_eos(CAMEL_STREAM(ss)));
-
- check_unref(ss, 1);
- check(close(fd) == -1);
- pull();
-
- (void)unlink("stream.txt");
- }
-
- camel_test_end();
-
- return 0;
-}
diff --git a/camel/tests/stream/test2.c b/camel/tests/stream/test2.c
deleted file mode 100644
index 02ad88e95c..0000000000
--- a/camel/tests/stream/test2.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- test ... camelstreammem */
-
-#include "camel-test.h"
-#include "streams.h"
-
-#include <errno.h>
-#include <sys/stat.h>
-#include <unistd.h>
-
-#include "camel/camel-stream-mem.h"
-
-int main(int argc, char **argv)
-{
- CamelSeekableStream *ss = NULL;
- int i;
- int fd = -1;
- struct stat st;
- int size;
- char buffer[1024];
- GByteArray *ba;
-
- camel_test_init(argc, argv);
-
- camel_test_start("CamelStream mem, create, seek, read, write, eos");
- for (i=0;i<3;i++) {
-
- push("Creating stream using method %d", i);
- switch(i) {
- case 0:
- ss = (CamelSeekableStream *)camel_stream_mem_new();
- break;
- case 1:
- ba = g_byte_array_new();
- ss = (CamelSeekableStream *)camel_stream_mem_new_with_byte_array(ba);
- break;
- case 2:
- ss = (CamelSeekableStream *)camel_stream_mem_new_with_buffer("", 0);
- break;
- }
- check(ss != NULL);
-
- test_stream_seekable_writepart(ss);
- test_stream_seekable_readpart(ss);
-
- check_unref(ss, 1);
- pull();
- }
-
- camel_test_end();
-
- return 0;
-}
diff --git a/camel/tests/stream/test3.c b/camel/tests/stream/test3.c
deleted file mode 100644
index b870a7773e..0000000000
--- a/camel/tests/stream/test3.c
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- test ... camelseekablesubstream */
-
-#include "camel-test.h"
-#include "streams.h"
-
-#include <errno.h>
-#include <sys/stat.h>
-#include <unistd.h>
-
-#include "camel/camel-stream-mem.h"
-#include "camel/camel-stream-fs.h"
-#include "camel/camel-seekable-substream.h"
-
-#define ARRAY_LEN(x) (sizeof(x)/sizeof(x[0]))
-
-struct {
- off_t lower, upper;
-} ranges[] = {
- { 3, 10241 },
- { 0, 1024 },
- { 0, 0 },
- { 0, 1 },
- { 0, 2 },
- { 0, 3 },
- { 0, 7 },
- { 1, 8 },
- { 1, 9 },
- { 10245, 10300 },
- { 0, CAMEL_STREAM_UNBOUND },
-/* { 1, CAMEL_STREAM_UNBOUND },
- { 2, CAMEL_STREAM_UNBOUND },
- { 3, CAMEL_STREAM_UNBOUND }, these take too long to run
- { 7, CAMEL_STREAM_UNBOUND },*/
- { 10245, CAMEL_STREAM_UNBOUND },
-};
-
-int main(int argc, char **argv)
-{
- CamelSeekableStream *ss = NULL;
- int i, j;
- CamelSeekableSubstream *sus, *sus2;
-
- camel_test_init(argc, argv);
-
- camel_test_start("CamelSeekableSubstream, mem backing");
- for (j=0;j<SEEKABLE_SUBSTREAM_WAYS;j++) {
- push("testing writing method %d", j);
- ss = (CamelSeekableStream *)camel_stream_mem_new();
- check(ss != NULL);
- for (i=0;i<ARRAY_LEN(ranges);i++) {
- push("stream subrange %d-%d", ranges[i].lower, ranges[i].upper);
- sus = (CamelSeekableSubstream *)camel_seekable_substream_new_with_seekable_stream_and_bounds(ss, ranges[i].lower, ranges[i].upper);
- check(sus != NULL);
-
- test_seekable_substream_writepart((CamelStream *)sus, j);
- test_seekable_substream_readpart((CamelStream *)sus);
-
- sus2 = (CamelSeekableSubstream *)camel_seekable_substream_new_with_seekable_stream_and_bounds(ss, ranges[i].lower, ranges[i].upper);
- check(sus2 != NULL);
- test_seekable_substream_readpart((CamelStream *)sus2);
-
- check_unref(sus, 1);
- check_unref(sus2, 1);
- pull();
- }
- check_unref(ss, 1);
- pull();
- }
-
- camel_test_end();
-
- (void)unlink("stream.txt");
-
- camel_test_start("CamelSeekableSubstream, file backing");
- for (j=0;j<SEEKABLE_SUBSTREAM_WAYS;j++) {
- push("testing writing method %d", j);
- ss = (CamelSeekableStream *)camel_stream_fs_new_with_name("stream.txt", O_RDWR|O_CREAT|O_TRUNC, 0600);
- check(ss != NULL);
- for (i=0;i<ARRAY_LEN(ranges);i++) {
- push("stream subrange %d-%d", ranges[i].lower, ranges[i].upper);
- sus = (CamelSeekableSubstream *)camel_seekable_substream_new_with_seekable_stream_and_bounds(ss, ranges[i].lower, ranges[i].upper);
- check(sus != NULL);
-
- test_seekable_substream_writepart((CamelStream *)sus, j);
- test_seekable_substream_readpart((CamelStream *)sus);
-
- sus2 = (CamelSeekableSubstream *)camel_seekable_substream_new_with_seekable_stream_and_bounds(ss, ranges[i].lower, ranges[i].upper);
- check(sus2 != NULL);
- test_seekable_substream_readpart((CamelStream *)sus2);
-
- check_unref(sus, 1);
- check_unref(sus2, 1);
- pull();
- }
- check_unref(ss, 1);
- (void)unlink("stream.txt");
- pull();
- }
-
- camel_test_end();
-
- return 0;
-}
diff --git a/cmdline/.cvsignore b/cmdline/.cvsignore
deleted file mode 100644
index b29b403eec..0000000000
--- a/cmdline/.cvsignore
+++ /dev/null
@@ -1,5 +0,0 @@
-Makefile.in
-Makefile
-.deps
-.libs
-compose
diff --git a/cmdline/Makefile.am b/cmdline/Makefile.am
deleted file mode 100644
index 6a888e7468..0000000000
--- a/cmdline/Makefile.am
+++ /dev/null
@@ -1,18 +0,0 @@
-
-man_MANS = compose.1
-
-bin_PROGRAMS = compose
-
-INCLUDES = \
- -I$(top_builddir) \
- $(COMPOSE_CFLAGS) \
- $(INTLLIBS)
-
-compose_LDADD = \
- ../composer/libcomposer.a \
- $(COMPOSE_LIBS)
-
-compose_SOURCES = \
- compose.c \
- ../composer/Composer-stubs.c \
- ../composer/Composer-common.c
diff --git a/cmdline/compose.1 b/cmdline/compose.1
deleted file mode 100644
index 946eb01eaa..0000000000
--- a/cmdline/compose.1
+++ /dev/null
@@ -1,51 +0,0 @@
-.\"
-.\" Evolution's compose command line utility manual page.
-.\" (C) Ximian, Inc. http://www.ximian.com
-.\"
-.\" Author:
-.\" Miguel de Icaza (miguel@kernel.org)
-.\"
-.TH Evolution 1 "Evolution 1.0"
-.SH NAME
-compose \- invokes the Evolution Mail composer tool.
-.SH SYNOPSIS
-.PP
-.B compose
-[\-\-subject SUBJECT] [\-s SUBJECT] [\-\-cc LIST] [\-c LIST] [\-\-bcc
-LIST] [\-b LIST] [\-\-body FNAME] to...
-.SH DESCRIPTION
-The
-.I compose
-program is a command line tool that can be used to invoke the
-Evolution Mail composer directly from the command line, and allows for
-simple configuration trough a number of flags.
-.SH OPTIONS
-The following options are supported
-.TP
-.I \-\-subject SUBJECT, \-s SUBJECT
-Both forms are used to specify the subject to be used in the mail
-message.
-.TP
-.I \-\-cc LIST, \-c LIST
-Both forms are used to specify a comma separated list of addresses to
-CC the message to.
-.TP
-.I \-\-bcc LIST, \-b LIST
-Both forms are used to specify a comma separated list of addresses
-that this message will be blind copied to.
-.TP
-.I \-\-body FNAME
-Loads the filename FNAME as the contents for the Evolution Mail
-composer.
-.SH OTHERS
-If these options are not enough, you might want to look into accessing
-the Evolution Mail Composer directly by using CORBA.
-.SH INTERFACES
-The Evolution Mail Composer supports the
-IDL:GNOME/Evolution/Composer:1.0 interface and is implemented as the
-component OAFIID:GNOME_Evolution_Mail_Composer.
-.SH SEE ALSO
-Evolution-Composer.idl
-.SH BUGS
-If you find bugs in the Evolution groupware suite, please report these
-using the \fIbug-buddy\fP program in the GNOME distribution. \ No newline at end of file
diff --git a/cmdline/compose.c b/cmdline/compose.c
deleted file mode 100644
index 95a39a3dec..0000000000
--- a/cmdline/compose.c
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * compose.c: A commnand line tool to invoke the Evolution mail composer
- *
- * Author:
- * Miguel de Icaza (miguel@ximian.com)
- *
- * (C) 2001 Ximian, Inc.
- */
-#include <config.h>
-#include <gnome.h>
-#include <liboaf/liboaf.h>
-#include <bonobo.h>
-#include "composer/Composer.h"
-
-static char *subject;
-static char *cc;
-static char *bcc;
-static char *body;
-static char *to = "";
-
-const struct poptOption compose_popt_options [] = {
- { "subject", 's', POPT_ARG_STRING,
- &subject, 0, N_("Subject for the mail message"), N_("SUBJECT") },
- { "cc", 'c', POPT_ARG_STRING,
- &cc, 0, N_("List of people that will be Carbo Copied"), N_("CC-LIST") },
- { "bcc", 'b', POPT_ARG_STRING,
- &bcc, 0, N_("List of people to Blind Carbon Copy this mail to"), N_("BCC-LIST") },
- { "body", 0, POPT_ARG_STRING,
- &body, 0, N_("Filename containing the body of the message"), N_("BODY-FILE") },
- { NULL, 0, 0, NULL, 0 }
-};
-
-static void
-error (const char *msg)
-{
- GtkWidget *dialog;
-
- dialog = gnome_message_box_new (
- msg,
- GNOME_MESSAGE_BOX_ERROR,
- GNOME_STOCK_BUTTON_OK,
- NULL);
-
- gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
- exit (1);
- g_assert_not_reached ();
-}
-
-GNOME_Evolution_Composer_RecipientList *
-make_list (char *str)
-{
- GNOME_Evolution_Composer_RecipientList *list;
- char *p;
- int count = 0;
-
- if (str == NULL)
- str = "";
-
- list = GNOME_Evolution_Composer_RecipientList__alloc();
-
- if (*str)
- count = 1;
-
- for (p = str; *p; p++){
- if (*p == ',')
- count++;
- }
- list->_maximum = count;
- list->_length = count;
- list->_buffer = CORBA_sequence_GNOME_Evolution_Composer_Recipient_allocbuf (count);
-
- for (count = 0; (p = strtok (str, ",")) != NULL; count++){
- GNOME_Evolution_Composer_Recipient *x;
-
- x = GNOME_Evolution_Composer_Recipient__alloc ();
-
- list->_buffer [count].name = CORBA_string_dup ("");
- list->_buffer [count].address = CORBA_string_dup (p);
- count++;
- str = NULL;
- }
-
- return list;
-}
-
-gint
-do_launch (void)
-{
- GNOME_Evolution_Composer_RecipientList *to_list, *cc_list, *bcc_list;
- GNOME_Evolution_Composer composer;
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
- composer = bonobo_get_object (
- "OAFIID:GNOME_Evolution_Mail_Composer",
- "GNOME/Evolution/Composer", &ev);
- CORBA_exception_free (&ev);
-
- if (composer == CORBA_OBJECT_NIL)
- error (_("It was not possible to start up the Evolution Mail Composer"));
-
- to_list = make_list (to);
- cc_list = make_list (cc);
- bcc_list = make_list (bcc);
-
- if (subject == NULL)
- subject = "";
-
- GNOME_Evolution_Composer_setHeaders (composer, to_list, cc_list, bcc_list, subject, &ev);
- GNOME_Evolution_Composer_show (composer, &ev);
-
- return FALSE;
-}
-
-int
-main (int argc, char *argv [])
-{
- poptContext ctxt = NULL;
- CORBA_ORB orb;
-
- gnomelib_register_popt_table (oaf_popt_options, _("Oaf options"));
- gnome_init_with_popt_table ("Compose", "1.0", argc, argv,
- compose_popt_options, 0, &ctxt);
-
- orb = oaf_init (argc, argv);
- if (bonobo_init (NULL, NULL, NULL) == FALSE)
- error (_("It was not possible to initialize the Bonobo component system"));
-
- if (ctxt){
- const char **to_args = NULL;
- GString *to_str = g_string_new ("");
- int i;
-
- to_args = poptGetArgs (ctxt);
-
- if (to_args){
- for (i = 0; to_args [i]; i++) {
- if (i > 1)
- g_string_append_c (to_str, ',');
-
- g_string_append (to_str, to_args [i]);
- }
- }
- to = to_str->str;
- }
-
- gtk_idle_add (GTK_SIGNAL_FUNC (do_launch), NULL);
-
- bonobo_main ();
-
- return 0;
-}
diff --git a/composer/.cvsignore b/composer/.cvsignore
deleted file mode 100644
index ec7a9d7288..0000000000
--- a/composer/.cvsignore
+++ /dev/null
@@ -1,20 +0,0 @@
-.deps
-.libs
-evolution-msg-composer
-Makefile
-Makefile.in
-*.lo
-*.la
-Composer-stubs.c
-Composer-skels.c
-Composer-common.c
-Composer.h
-Editor-stubs.c
-Editor-skels.c
-Editor.h
-Editor-common.c
-Evolution-Addressbook-SelectNames-common.c
-Evolution-Addressbook-SelectNames-skels.c
-Evolution-Addressbook-SelectNames-stubs.c
-Evolution-Addressbook-SelectNames.h
-HTMLEditor*.[ch]
diff --git a/composer/ChangeLog b/composer/ChangeLog
deleted file mode 100644
index a2c1cb6ea8..0000000000
--- a/composer/ChangeLog
+++ /dev/null
@@ -1,1554 +0,0 @@
-2001-04-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (build_message): Use the mail-crypto pgp-mime
- wrappers.
- (build_message): s/CAMEL_PGP_HASH_TYPE_SHA1/CAMEL_CIPHER_HASH_SHA1
-
-2001-04-11 Dan Winship <danw@ximian.com>
-
- * e-msg-composer-select-file.c (create_file_selection): Fix
- previous.
-
-2001-04-11 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-select-file.c (create_file_selection): Set the
- default filename to the user's homedir.
-
-2001-04-04 Kjartan Maraas <kmaraas@gnome.org>
-
- * e-msg-composer-attachment.c: Fix headers.
- * e-msg-composer-hdrs.c: Same here.
-
-2001-03-29 Kjartan Maraas <kmaraas@gnome.org>
-
- * e-icon-list.c: Replace #include <gtk/gtk.h>
- * e-msg-composer-attachment-bar.c: Replace #include <gnome.h>
- * e-msg-composer-attachment-bar.h: Remove #include <gnome.h>
- * e-msg-composer-attachment.c: Remove #include <gnome.h>
- * e-msg-composer-attachment.h: Same here.
- * e-msg-composer-hdrs.c: Replace #include <gnome.h> and <bonobo.h>
- * e-msg-composer-hdrs.h: Replace #include <gnome.h>
- * e-msg-composer-file.c: #include <gtk/gtkmain.h>, <gtk/gtksignal.h>
- * e-msg-composer.c: Replace #include <bonobo.h>, <gnome.h>
- * e-msg-composer.h: Replace #include <gnome.h> and <bonobo.h>
- * evolution-composer.c: Replace #include <bonobo.h>
- * listener.c: Same here.
-
-2001-03-28 Dan Winship <danw@ximian.com>
-
- * e-msg-composer.c (save_draft): Use the drafts folder specified
- by the account, if possible. Also, fix the setting of "send_html"
- after saving the draft in case the user plans to keep editting...
-
-2001-03-27 Larry Ewing <lewing@ximian.com>
-
- * e-msg-composer.c (e_msg_composer_set_send_html): set the
- FormatHTML property on the editor to let it know the mode.
- (e_msg_composer_construct): set the property at construct time.
-
-2001-03-26 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-attachment.c (e_msg_composer_attachment_new): Set
- the mime part content-id.
-
-2001-03-19 Radek Doulik <rodo@ximian.com>
-
- * listener.c (reply_indent): set default text color
-
-2001-03-17 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-hdrs.c (e_msg_composer_hdrs_get_reply_to): Make
- sure the reply_to text is non-NULL before trying to pass it off to
- the address parser.
-
-2001-03-13 Dan Winship <danw@ximian.com>
-
- * e-msg-composer-attachment.c (update_mime_type): Use
- gnome_vfs_mime_type_from_name rather than gnome_vfs_mime_info,
- since the entered filename doesn't have to be a real file on disk.
- Deal with it returning NULL too.
- (e_msg_composer_attachment_edit): Select the right item in the
- inline/attachment menu.
-
- * e-msg-composer-hdrs.c: s/Pair/EMsgComposerHdrPair/. Namespace!
-
-2001-03-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.h: Added view_replyto member.
-
- * e-msg-composer.c (e_msg_composer_get_visible_flags): Find out if
- we want to view the Reply-To header.
- (e_msg_composer_set_view_replyto): A new function to set the state
- of the replyto header.
- (menu_view_replyto_cb): Callback for setting the ReplyTo state.
- (set_config): Make static.
- (setup_ui): Setup the ReplyTo bonobo stuff.
- (load_from_property_bag): More defaults for the ReplyTo, yay.
- (load_from_gnome_config): Again...
- (e_msg_composer_get_view_bcc): Implemented.
- (e_msg_composer_get_view_cc): Implemented.
- (e_msg_composer_get_view_from): Implemented.
- (e_msg_composer_get_view_replyto): Implemented.
-
- * e-msg-composer-hdrs.c (e_msg_composer_hdrs_get_reply_to_entry):
- New function, yay.
- (e_msg_composer_hdrs_get_reply_to): Another new function.
- (e_msg_composer_hdrs_set_reply_to): Yet another new function...
- (create_headers): Create the reply-to header.
- (attach_headers): Attach the reply_to.
- (headers_set_visibility): Set the reply_to visibility.
- (e_msg_composer_hdrs_to_message): Set the message's reply-to here
- based on the user-set reply-to header.
-
-2001-03-06 Miguel de Icaza <miguel@ximian.com>
-
- * e-msg-composer.c (set_config): New function. Used to store
- integer values into the configuration engine. Handles the case of
- Bonobo-conf being installed, or falls back to gnome_config.
-
- * e-msg-composer-hdrs.c (add_header): Renamed to be
- header_new_recipient(). Now we take care of the other cases in
- create_headers, which is a lot nicer now.
-
- (create_optionmenu): Removed extra "name" argument which was not
- being used anyways (the only arg passed was From:).
- (init): Removed all the redundant NULL initialization by using
- nice g_new0
-
- (create_headers): New function, much cleaner.
-
- Use of Pair structure everywhere instead of individual widgets to
- keep track of which ones are visible and which ones are not.
-
- * e-msg-composer.c (setup_ui): Handle ViewFrom and ViewBCC
- commands.
- (menu_view_bcc_cb, menu_view_from_cb): New functions that
- implement the features described.
-
- (menu_format_html_cb): Removed unrequired test, as
- e_msg_composer_set_send_html already optimizes the case of the
- state being the same.
- (menu_security_pgp_encrypt_cb): Remove redundant code.
- (menu_security_pgp_sign_cb): ditto.
-
-2001-03-02 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-icon-list.c (icon_new_from_pixbuf): Added a comment reminding
- us that we should probably not force a particular font in the icon
- caption.
-
-2001-02-27 Dan Winship <danw@ximian.com>
-
- * evolution-composer.c (factory_fn): If
- !mail_config_is_configured(), give an error and return NULL.
-
-2001-02-22 Ettore Perazzoli <ettore@ximian.com>
-
- * Makefile.am (INCLUDES): Add `-I$(top_srcdir)/shell'.
-
-2001-02-21 Not Zed <NotZed@Ximian.com>
-
- * e-msg-composer.c (menu_file_save_draft_cb):
- (exit_dialog_cb): Use mail_append_mail to save to drafts instead
- of custom thread handler.
-
-2001-02-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (build_message): Handle exceptions a little
- nicer and pop up a nice GnomeDialog with the error message - also,
- don't return a CamelMimeMessage if it fails to sign/decrypt
- because we want to let the user decide what to do based on the
- error message he/she gets.
-
-2001-02-15 Dan Winship <danw@ximian.com>
-
- * e-msg-composer-hdrs.c (e_msg_composer_hdrs_set_from_account): If
- @account_name is NULL, pick the default account rather than giving
- a g_warning.
-
- * e-msg-composer.c (e_msg_composer_set_headers): Note in the
- doc comment that @from can be NULL if you want the default account
- (since there is code that expects this).
-
-2001-02-13 Jeffrey Stedfast <fejj@ximian.com>
-
- * evolution-composer.c (corba_recipientlist_to_glist): Use the
- camel-internet-address code to format the address rather than
- doing it the broken way.
-
-2001-02-10 Jeffrey Stedfast <fejj@ximian.com>
-
- * evolution-composer.c (impl_Composer_set_headers): Updated. We
- might want to change the corba interface for this to allow setting
- the from-address as well.
-
- * e-msg-composer.c (e_msg_composer_new_with_message): Updated.
- (e_msg_composer_set_headers): Now takes a 'From' argument so that
- we can try to pre-determine the account the user will want to send
- from.
-
-2001-02-11 Gediminas Paulauskas <menesis@delfi.lt>
-
- * e-msg-composer-attachment.glade.h: removed.
- * e-msg-composer-attachment.glade: do not write strings to above.
- * Makefile.am: don't include glade.h in EXTRA_DIST.
-
-2001-02-10 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-attachment-bar.c (attach_to_multipart):
- multipart/* is another mime type we DO NOT want to encode ;-)
-
-2001-02-06 Christopher James Lahey <clahey@ximian.com>
-
- * e-msg-composer-hdrs.c (address_button_clicked_cb, add_header):
- Set the default argument to
- GNOME_Evolution_Addressbook_SelectNames_activateDialog correctly.
-
-2001-01-30 Larry Ewing <lewing@ximian.com>
-
- * e-msg-composer-hdrs.c (create_optionmenu): make sure we convert
- from utf-8 before creating the option menu items.
-
-2001-01-25 Jason Leach <jasonleach@usa.net>
-
- (Moving the flag for has_changed from the Hdrs to the Composer
- itself. Providing public methods to set/unset a composer as
- changed. Adding attachments now flags the composer as changed)
-
- * e-msg-composer.c (e_msg_composer_unset_changed): New function.
- (e_msg_composer_set_changed): New function.
-
- * e-msg-composer.c (hdrs_changed_cb): Callback to the new signal,
- uses the new composer_set_changed.
- (attachment_bar_changed_cb): Add a call to the new
- composer_set_changed.
-
- * e-msg-composer-hdrs.c (class_init): New signal "hdrs_changed" to
- tell the parent composer that any of the headers have changed.
- (addressbook_entry_changed): emit the new signal here.
- (entry_changed): And here.
-
-2001-01-24 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (menu_security_pgp_encrypt_cb): New callback.
- (menu_security_pgp_sign_cb): Another new callback.
- (setup_ui): Added initialization for the PGP sign and encrypt
- bonobo menu items.
- (e_msg_composer_set_pgp_encrypt): Change the Bonobo UI name to
- SecurityPGPEncrypt.
- (e_msg_composer_set_pgp_sign): Change the Bonobo UI name to
- SecurityPGPSign.
-
-2001-01-21 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (build_message): Fixed some memory leaks
- dealing with content-type temp strings. Also implemented code to
- sign and/or encrypt the message if the user has specified that it
- should.
-
-2001-01-20 Jason Leach <jasonleach@usa.net>
-
- (Fix #1222: doing File->New->Mail Message doesn't include .sig)
-
- * evolution-composer.c (init): Get the users account information,
- see if they've specified a sig file, if they do, create a composer
- with that sig.
-
-2001-01-19 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-hdrs.c (create_optionmenu): Use "Full Name
- <address>" for the label in the menu rather than the account
- name. Specify the account name only if it's not the same as the
- address.
-
-2001-01-19 Jason Leach <jasonleach@usa.net>
-
- * e-msg-composer-hdrs.c (create_addressbook_entry): Listen for
- property bag changes to "entry_changed" on here, which means on
- the To, Cc, and Bcc entries.
- (addressbook_entry_changed): New function that gets called when
- "entry_changed" property is changed (to TRUE).
-
-2001-01-18 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer.c (build_message): Updated to reflect changes to
- e_msg_composer_hdrs_get_from().
-
- * e-msg-composer-hdrs.c (set_recipients): Don't do anymore utf8
- conversions, the widget already does this (or should unless there
- is brokenness).
- (e_msg_composer_hdrs_get_from): Return a CamelInternetAddress like
- we should.
- (e_msg_composer_hdrs_to_message): Update to reflect changes made
- the the above function.
-
-2001-01-12 Miguel de Icaza <miguel@gnu.org>
-
- * Makefile.am: Make the composer a standard library, not a libtool
- one. Nobody ever uses it as a shared library and it is not
- installed.
-
-2001-01-17 Jason Leach <jasonleach@usa.net>
-
- (Bug #1192: Set the Composer window title to something useful)
-
- * e-msg-composer.c (e_msg_composer_construct): Connect up the new
- signal here.
- (subject_changed_cb): Set the composer window title to the subject
- as it's changed, or if it goes blank make it the default "Compose
- a message".
-
- * e-msg-composer-hdrs.c (class_init): Create a new signal
- "subject_changed".
- (entry_changed): Emit the signal here when the subject entry is
- changed.
-
-2001-01-17 Iain Holmes <iain@ximian.com>
-
- * e-msg-composer-attachment.c (e_msg_composer_attachment_edit):
- Get the option menu from the XML file.
- (ok_cb): Set the attachment disposition depending on the option
- menu results.
- (option_menu_get_history): Really should have been in GTK at some
- point.
-
- * e-msg-composer-attachment.glade: Add the option menu.
-
-2001-01-17 Michael Meeks <michael@helixcode.com>
-
- * evolution-composer.c (enum_objects): comment out for now
- to ease compat issues.
- (evolution_composer_construct): pass in NULL for the item
- handler enum_objects fn + calm warning.
-
-2001-01-17 JP Rosevear <jpr@ximian.com>
-
- * e-msg-composer.c (e_msg_composer_new_with_message): Use the
- to/cc/bcc addresses insted of just the to.
-
-2001-01-17 Federico Mena Quintero <federico@ximian.com>
-
- * e-icon-list.[ch]: Ximianified email addresses.
-
-2001-01-16 Radek Doulik <rodo@helixcode.com>
-
- * e-msg-composer.c (e_msg_composer_mark_text_orig): publicate
- mark_orig_text
- (set_editor_text): don't call mark_orig_text, let it for reply
-
-2001-01-15 Jason Leach <jasonleach@usa.net>
-
- (Plug leaking the subject string on each message sent)
-
- * e-msg-composer-hdrs.c (e_msg_composer_hdrs_get_subject): Don't
- strdup before returning the subject, it's already been strdup'd
- from the gtk_object_get().
-
-2001-01-13 Jason Leach <jasonleach@usa.net>
-
- (Fix Bug #1083: Composer IDLs not getting installed)
-
- * Makefile.am: add @idl and @idl_DATA vars.
-
-2001-01-12 Jeffrey Stedfast <fejj@ximian.com>
-
- * e-msg-composer-hdrs.c (create_optionmenu): Oops. Make sure to
- attach the item to the menu ;-)
-
-2001-01-12 Jeffrey Stedfast <fejj@helixcode.com>
-
- * e-msg-composer.c (build_message): Call set_from_account which
- means we no longer have to do all the crap involved in formatting
- strings into an internet-address.
- (e_msg_composer_get_preferred_account): New access function.
-
- * e-msg-composer-hdrs.c (add_header): case COMBOBOX has changed to
- OPTIOMENU.
- (create_optionmenu): Update to use an optionmenu of accounts.
- (from_changed): New callback for the From optionmenu.
- (setup_headers): s/COMBOBOX/OPTIONMENU
- (init): Set the account and from_options to NULL.
- (e_msg_composer_hdrs_get_from): Updated.
- (destroy): free the from_options.
- (e_msg_composer_hdrs_set_from_address): Renamed from set_from
- because it no longer takes a string arg but rather an account arg.
-
-2001-01-12 Miguel de Icaza <miguel@ximian.com>
-
- * e-msg-composer-hdrs.c (add_header): Only attach to "changed" if
- the widget is an EEntry. The HEADER_COMBOBOX and the
- HEADER_ADDRBOOK are a ComboBox and a remote Bonobo control
- respectively.
-
- * evolution-composer.c (get_object): Move getObject functionality
- here from e-msg-composer.c
-
-2001-01-11 Miguel de Icaza <miguel@ximian.com>
-
- * e-msg-composer-hdrs.c (create_dropdown_entry): Only set the
- popdown strings if we have anything to popdown.
-
-2001-01-10 Miguel de Icaza <miguel@helixcode.com>
-
- * evolution-composer.c (evolution_composer_construct): Add an
- ItemContainer Bonobo interface to allow client applications to
- locate the Message Composer component.
-
-2001-01-11 Jeffrey Stedfast <fejj@helixcode.com>
-
- * e-msg-composer.c (menu_file_save_draft_cb): New callback to save
- draft. Fixes bug #1045.
-
-2001-01-10 Miguel de Icaza <miguel@helixcode.com>
-
- * e-msg-composer.c: Removed more UNSAFE stuff. Maybe we should
- kill this macro, and have people that want these broken things
- define their own macros.
- (setup_item_container): Add an ItemContainer bonobo interface to
- handle options to the window component.
-
-2001-01-08 Jeffrey Stedfast <fejj@helixcode.com>
-
- * e-msg-composer-hdrs.c (create_dropdown_entry): Updated for new
- config code - this time it works!
-
-2001-01-08 Jeffrey Stedfast <fejj@helixcode.com>
-
- * e-msg-composer-hdrs.c (create_dropdown_entry): Reverted back to
- old config code temporarily until I get the new config code
- working 100%.
-
-2001-01-07 Jeffrey Stedfast <fejj@helixcode.com>
-
- * e-msg-composer-hdrs.c (create_dropdown_entry): Updated to
- reflect changes to the mail-config API.
-
-2001-01-05 Radek Doulik <rodo@helixcode.com>
-
- * listener.c (impl_event): disable indenting for now, it crashes
- editor
-
-2001-01-03 Jeffrey Stedfast <fejj@helixcode.com>
-
- * e-msg-composer.c (do_exit): If the headers have changed, then
- continue with the prompt else just destroy the window.
-
- * e-msg-composer-hdrs.c (init): Initialize has_changed to FALSE.
- (entry_changed): New callback to set the value of has_changed.
- (add_header): Attach the "changed" signal.
-
-2001-01-02 Dan Winship <danw@helixcode.com>
-
- * e-msg-composer-attachment.c (e_msg_composer_attachment_edit):
- * e-msg-composer-attachment-bar.c (update): Use
- header_content_type_simple, not header_content_type_format.
-
- * e-msg-composer-hdrs.c (create_dropdown_entry): Call
- e_utf8_to_gtk_string on the combobox strings.
-
-2000-12-28 Dan Winship <danw@helixcode.com>
-
- * e-msg-composer.c (handle_multipart_alternative,
- handle_multipart, e_msg_composer_new_with_message): Use
- CamelContentType instead of GMimeContentField.
-
- * e-msg-composer-attachment.c (e_msg_composer_attachment_edit):
- * e-msg-composer-attachment-bar.c (update, attach_to_multipart):
- Use CamelContentType, and use the header_content_type_* functions
- rather than operating on the structure by hand.
-
-2000-12-15 Jeffrey Stedfast <fejj@helixcode.com>
-
- * e-msg-composer.c (e_msg_composer_get_pgp_encrypt): New function
- to get whether or not to encrypt the message.
- (e_msg_composer_set_pgp_encrypt): New function to set encryption.
- (e_msg_composer_get_pgp_sign): New function to get whether or not
- to sign the message.
- (e_msg_composer_set_pgp_sign): New function to set pgp_sign.
- (init): Initialize pgp_sign and pgp_encrypt to FALSE.
-
-2000-12-14 Christopher James Lahey <clahey@helixcode.com>
-
- * e-msg-composer-hdrs.c (add_header): Made it so that carriage
- return doesn't insert a newline in the subject entry.
-
-2000-12-12 Jeffrey Stedfast <fejj@helixcode.com>
-
- * e-msg-composer-hdrs.c (set_entry): Don't convert the utf-8
- string to a gtkstring because the widget expects to get a utf-8
- string.
-
-2000-12-12 Dan Winship <danw@helixcode.com>
-
- * Makefile.am (EXTRA_DIST): Add $(IDLS). (From campd.)
-
-2000-12-07 Radek Doulik <rodo@helixcode.com>
-
- * e-msg-composer.c (prepare_engine): added warnings
- (prepare_engine): updated to IDL:GNOME/GtkHTML/Editor/Engine:1.0
-
- * Makefile.am: renamed HTMLEditor* to Editor*, added Editor-common.c:
- $(HTML_EDITOR_GENERATED) rule
-
-2000-12-05 Jeffrey Stedfast <fejj@helixcode.com>
-
- * e-msg-composer.c (add_recipients): Use camel to construct the
- list of recipients rather than just strchr(recips, ',') which is
- very prone to errors.
-
-2000-11-03 Iain Holmes <iain@helixcode.com>
-
- * e-msg-composer-attachment-bar.c (update): Pass NULL
- instead of icon_name to the e_icon_list_append_pixbuf
- function.
- (init) Take the font size into account when setting the
- height of the bar.
-
-2000-11-02 Iain Holmes <iain@helixcode.com>
-
- * e-msg-composer-attachment-bar.c (update): Use the
- pixbuf_for_mime_type function to get the icon.
- (pixbuf_for_mime_type): Functino that searches nautilus/
- and mc/ for icon files.
-
-2000-11-15 Radek Doulik <rodo@helixcode.com>
-
- * e-msg-composer.c (prepare_engine): update namespace
-
- * updates for HTMLEditor API changes
-
- * e-msg-composer.c: added #include <libgnomevfs/gnome-vfs.h>
-
- * e-msg-composer.h: e_msg_composer_guess_mime_type renamed and
- moved mime_guess_type_from_file_name from camel as it uses VFS
-
-2000-11-14 Radek Doulik <rodo@helixcode.com>
-
- * listener.c (reply_indent): rename command to runCommand
-
- * e-msg-composer.c: updated to HTMLEditor API changes
-
- * listener.c: updated to HTMLEditor API changes
-
-2000-11-13 Radek Doulik <rodo@helixcode.com>
-
- * listener.c (reply_indent): extracted function, does reply
- indentation, use updated editor engine api
-
-2000-11-10 Michael Meeks <michael@helixcode.com>
-
- * Makefile.am ($(HTML_EDITOR_GENERATED)): rearrnace
- includes.
-
-2000-11-10 Larry Ewing <lewing@helixcode.com>
-
- * e-msg-composer.c (build_message): set the HTML charset to utf-8
- for all the html message parts.
- (build_message): make sure we set the proper encoding on the html
- part now that it may contain utf-8 characters
-
-2000-11-08 Radek Doulik <rodo@helixcode.com>
-
- * e-msg-composer.c (e_msg_composer_clear_inlined_table): new
- function
- (destroy): use e_msg_composer_clear_inlined_table, destroy
- inlined_images hash table
- (get_signature): added in_html arg, it tells if we should use HTML
- signature
- (set_editor_text): try to use HTML signature
- (e_msg_composer_new_with_sig_file): added send_html arg to be able
- to use HTML signature
-
- * listener.c (resolve_image_url): don't add inlined images to
- attachement bar
-
- * e-msg-composer.c (add_inlined_images): new function, adds
- inlined images to multipart
- (add_inlined_image): helper function, adds one image to multipart
- (build_message): store HTML messages with inlined images to
- multipart/related
-
- * e-msg-composer-attachment-bar.c (add_from_file): removed
- content_id arg
- (e_msg_composer_attachment_bar_attach): likewise
-
- * e-msg-composer-attachment.c (e_msg_composer_attachment_new):
- removed content_id arg
-
-2000-11-06 Not Zed <NotZed@HelixCode.com>
-
- * e-msg-composer-hdrs.c (e_msg_composer_hdrs_to_message): Changed
- for message api changes. Use camel_address_unformat to convert
- the editable->usable.
- (set_recipients): Same. Now we set the recipients as
- camel_internet_address's. Fixed a memleak indirectly.
- (decode_addresses): Removed, no longer needed.
- (create_dropdown_entry): We dont want to use _encode(), we want to
- _format, as we are displaying the result. We can use the static
- function too to avoid the object creation, and the memory leak!
- (set_entry): Convert the args to gtk-safe characters, since the
- entry doesn't understand utf8.
- (set_recipients): And likewise do the reverse when retrieving the
- contents of the widget.
-
-2000-11-06 Larry Ewing <lewing@helixcode.com>
-
- * e-msg-composer.c (build_message): set the content type on the
- plain part of outgoing messages.
- (best_content): a helper function to get the best content type for
- the attachment. This should probably use the helper functions in
- the future.
-
-2000-11-06 Kjartan Maraas <kmaraas@gnome.org>
-
- * e-msg-composer-attachment.c: Added #include <config.h>
- * e-msg-composer-hdrs.c: s/_HAVE_CONFIG_H/HAVE_CONFIG_H for
- working i18n.
-
-2000-11-04 Radek Doulik <rodo@helixcode.com>
-
- * e-msg-composer-attachment.c (e_msg_composer_attachment_new): fix
- test for regular file to !S_ISREG (statbuf.st_mode)
-
- * listener.c (resolve_image_url): use inline images hash table
-
- * e-msg-composer.c (init): create inlined images hash table
- (destroy): destroy it
- (clear_inline_images): helper function, used from
- g_hash_table_foreach_remove to destroy one inline image record
-
- * e-msg-composer.h: added hash table with inlined images url ->
- cid info
-
-2000-11-03 Radek Doulik <rodo@helixcode.com>
-
- * listener.c (impl_event): updated for API changed
- implemented image_url event
- (resolve_image_url): new helper function, attaches image to mail
- and returns new (resolved) url pointing to mime component
-
- * e-msg-composer-attachment.c (e_msg_composer_attachment_new):
- added conponent_id parameter
-
- * e-msg-composer-attachment-bar.c
- (e_msg_composer_attachment_bar_attach): added parameter content_id
- (add_from_file): likewise
-
-2000-11-03 Jeffrey Stedfast <fejj@helixcode.com>
-
- * e-msg-composer-attachment.c (e_msg_composer_attachment_new):
- Don't allow attaching anything but regular files.
-
-2000-11-03 Federico Mena Quintero <federico@helixcode.com>
-
- * Makefile.am: Clean the idl-generated files properly.
-
-2000-11-02 Peter Williams <peterw@helixcode.com>
-
- * e-msg-composer-attachment-bar.c (attach_to_multipart): CamelStreamMem
- steals our byte array; we can't destroy the byte array explicitly, and
- we must unref the stream only when done using the array.
-
-2000-11-01 Jeffrey Stedfast <fejj@helixcode.com>
-
- * e-msg-composer.c (e_msg_composer_new_with_message): Don't create
- the To, Cc, and Bcc lists based only on the address, use both the
- name and address and camel_address_encode() them.
-
-2000-11-01 Jeffrey Stedfast <fejj@helixcode.com>
-
- * e-msg-composer-attachment-bar.c (attach_to_multipart): Fix the
- CTE kludge, calculate the best mime transfer encoding for the mime
- part and use that. Include e-msg-composer-select-file.h
-
-2000-10-31 Radek Doulik <rodo@helixcode.com>
-
- * e-msg-composer.c (prepare_engine): new function, tries prepare
- editor engine
- (mark_orig_text): marks original text in editor
- (set_editor_text): call mark_orig_text
- (create_composer): call prepare_engine
-
- * Makefile.am (IDL_GENERATED): added HTMLEditor generated files to
- IDL_GENERATED
- ($(IDL_GENERATED)): generate also files from HTMLEditor.idl
- (libcomposer_la_SOURCES): added listener.[ch]
-
- * e-msg-composer.h: added editor_engine and editor_listener to
- EMsgComposer
-
- * listener.[ch]: new files, implementation of HTMLEditor::Listener
-
-2000-10-27 Ettore Perazzoli <ettore@helixcode.com>
-
- * Makefile.am ($(IDL_GENERATED)): Get `Composer.idl' from
- `$(srcdir)' so that it builds with builddir != srcdir.
-
-2000-10-27 Jeffrey Stedfast <fejj@helixcode.com>
-
- * e-msg-composer.c (e_msg_composer_new_with_message): Fixed my
- not-quite-right logic so that we don't accidently set the body
- contents using a plain text attachment instead of the actual body
- of the message :-)
-
-2000-10-25 Jeffrey Stedfast <fejj@helixcode.com>
-
- * e-msg-composer.c (e_msg_composer_new_with_message): Populate the
- composer with any attachments.
-
-2000-10-25 Iain Holmes <iain@helixcode.com>
-
- * e-msg-composer-select-file.c (create_file_selection): Set the
- wmclass and wmclass_name for the file selectors so that Sawfish
- doesn't make the dialogs the same size as the parent.
-
-2000-10-25 Dan Winship <danw@helixcode.com>
-
- * evolution-composer.c (init): Attach send/postpone signal
- handlers to the EMsgComposer.
- (evolution_composer_factory_init): Take send/postpone signal
- handlers as arguments.
-
-2000-10-23 Dan Winship <danw@helixcode.com>
-
- * e-msg-composer.c, e-msg-composer-attachment-bar.c: add some
- missing _()s.
-
- * e-msg-composer-address-dialog.*, e-msg-composer-address-entry.*:
- Old cruft. Remove.
-
- * Makefile.am: Update for removed files.
-
- * e-msg-composer-hdrs.c: Remove e-msg-composer-address-entry.h
- include.
-
- * e-msg-composer.c: Remove e-msg-composer-address-dialog.h include
-
-2000-10-23 Ariel Rios <ariel@arcavia.com>
-
- * e-msg-composer-hdrs.c: Include Composer.h
- instead of volution-Addressbook-SelectNames.h
-
-2000-10-22 Dan Winship <danw@helixcode.com>
-
- * .cvsignore: No, don't ignore Evolution-Addressbook-SelectNames*.
- They're not supposed to be there any more.
-
-2000-10-22 Ettore Perazzoli <ettore@helixcode.com>
-
- * e-msg-composer-attachment-bar.c (attach_cb): Removed.
- (add_from_user): Use `e_msg_composer_select_file()' instead of
- doing the file selector widget magic by yourself.
-
-2000-10-20 Jeffrey Stedfast <fejj@helixcode.com>
-
- * .cvsignore: Ignore Evolution-Addressbook-SelectNames*
-
-2000-10-20 Dan Winship <danw@helixcode.com>
-
- * Evolution-Composer.idl: Evolution::Composer interface
-
- * evolution-composer.[ch]: Implementation and factory. So
- entirely not tested.
-
- * Makefile.am (libcomposer_la_SOURCES): Add
- evolution-composer.[ch]
- (IDLS): Update this for Evolution-Composer.idl / Composer.idl
-
- * main.c: Removed. (Old, dead code)
-
-2000-10-19 Ettore Perazzoli <ettore@helixcode.com>
-
- * Makefile.am (glade_data): Add `e-msg-composer-attachment.glade'.
- (glade_messages): New.
- (EXTRA_DIST): Add `$(glade_messages)'.
-
-2000-10-19 Michael Meeks <michael@helixcode.com>
-
- * e-msg-composer.c (create_menubar_file, create_menubar_edit),
- (create_menubar_format, create_menubar_view, create_menubar): kill.
- (create_toolbar): die.
- (setup_ui): impl.
- (e_msg_composer_construct): hook in.
- (menu_format_html_cb): update.
- (menu_view_attachments_activate_cb): ditto.
- (destroy): upd.
- (e_msg_composer_construct): upd.
- (e_msg_composer_set_send_html): upd.
-
-2000-10-16 Iain Holmes <iain@helixcode.com>
-
- * e-msg-composer-hdrs.c (init): Don't need the ID anymore.
-
-2000-10-17 Jeffrey Stedfast <fejj@helixcode.com>
-
- * e-msg-composer.c (e_msg_composer_new_with_message): If the body
- text was NULL, then don't bother turning it into HTML (besides, it
- causes a nasty segfault).
-
-2000-10-15 Dan Winship <danw@helixcode.com>
-
- * Makefile.am: Move CPPFLAGS flags to INCLUDES to avoid bashing
- any CPPFLAGS set at configure time.
-
-2000-10-14 Jeffrey Stedfast <fejj@helixcode.com>
-
- * e-msg-composer-attachment.c (set_entry): If the entry widget is
- NULL, obviously we can't set any text on it.
-
-2000-10-14 Iain Holmes <iain@helixcode.com>
-
- * e-msg-composer-hdrs.c (init): Create a unique-ish id for this set
- of headers, so that only one select-names dialog will be created for
- a given set of headers.
- (address_button_clicked_cb): Pass the unique-ish id to the activate
- dialog command.
-
-2000-10-13 Larry Ewing <lewing@helixcode.com>
-
- * e-msg-composer.c (build_message): stop using format_text,
- gtkhtml handles this now.
- (format_text): function removed.
-
-2000-10-10 Iain Holmes <iain@helixcode.com>
-
- * e-icon-list.c: Allow NULL pixbufs, and load the "broken" image
-
- * e-msg-composer-attachment-bar.c (update): If the image isn't
- found load the default text/plain icon.
-
-2000-10-02 Jeffrey Stedfast <fejj@helixcode.com>
-
- * e-msg-composer.c (build_message): If the body of the message has
- 8-bit chars, set the Content-Transfer-Encoding type to the best
- encoding.
-
-2000-10-02 Dan Winship <danw@helixcode.com>
-
- * e-icon-list.c: fix #include of gnome-canvas-pixbuf.h
-
-2000-10-02 Iain Holmes <iain@helixcode.com>
-
- * e-msg-composer-attachment-bar.c: If the description of an attachment
- is a blank string, revert to displaying the filename.
-
-2000-10-01 Iain Holmes <iain@helixcode.com>
-
- * e-icon-list.c: If you try to add an icon from a file that doesn't
- exist put a "Broken icon" image.
-
- * bad-icon.xpm: Broken icon image.
-
-2000-10-01 Iain Holmes <iain@helixcode.com>
-
- * e-msg-composer-attachment-bar.[ch] (update): If the attachment is
- an image, then make a thumbnail for it.
- Base the attachment bar on e-icon-list instead of gnome-icon-list.
-
- * e-icon-list.[ch]: New files. These are modified versions of
- gnome-icon-list from gnome-libs HEAD that uses gdk-pixbuf instead
- of the evil Imlib.
-
- * e-msg-composer-attachment.[ch]: Add a pixbuf_cache member, to
- save us having to generate a thumbnail for the attachment every
- time the bar changes.
-
- * e-msg-composer.c (e_msg_composer_construct): Add dnd support for
- files. Drag a file to the composer to add it as an attachment.
-
-2000-09-28 Jeffrey Stedfast <fejj@helixcode.com>
-
- * e-msg-composer.c (build_message): Check to see if the body has
- 8bit chars, if so - set the Content-Transfer-Encoding to 8bit.
- Addresses Bugzilla bug #652.
-
-2000-09-25 Dan Winship <danw@helixcode.com>
-
- * e-msg-composer-hdrs.c (setup_headers): fix typo in tooltip.
- * e-msg-composer.c (create_menubar_file): fix accelerator for
- "Save as" to be different from "Save". (Both problems pointed out
- by menthos@menthos.com.)
-
-2000-09-24 Jeffrey Stedfast <fejj@helixcode.com>
-
- * e-msg-composer.c (get_signature): Updated to handle FIFO
- streams.
-
-2000-09-19 Dan Winship <danw@helixcode.com>
-
- * e-msg-composer.c (e_msg_composer_construct): Don't g_error out
- if the html-editor-control fails.
- (create_composer): New internal function to create and construct a
- msg_composer and pop up an error message if it fails.
- (e_msg_composer_new, e_msg_composer_new_with_sig_file,
- e_msg_composer_new_with_message, e_msg_composer_new_from_url): Use
- create_composer, return if it fails, change return type to
- EMsgComposer *.
-
-2000-09-18 Dan Winship <danw@helixcode.com>
-
- * e-msg-composer-attachment.c (get_mime_type): Use
- gnome_vfs_get_file_info.
-
- * e-msg-composer-attachment-bar.c (update): Use gnome_vfs_mime
- functions, not old gnome_mime.
-
-2000-09-18 Christopher James Lahey <clahey@helixcode.com>
-
- * Makefile.am: Added $(EXTRA_GNOME_CFLAGS) and
- $(EXTRA_GNOME_LIBS). Removed unneeded libraries.
-
- * e-msg-composer-address-dialog.c, e-msg-composer-address-entry.c,
- e-msg-composer-attachment.c, e-msg-composer-hdrs.c,
- e-msg-composer.c: Fixed the #include lines to deal properly with
- gal.
-
-2000-09-12 Michael Meeks <michael@helixcode.com>
-
- * e-msg-composer.c: Update for new UI handler.
-
-2000-09-12 Larry Ewing <lewing@helixcode.com>
-
- * e-msg-composer-attachment-bar.c (add_common): add a make sure
- the attachment isn't NULL. A more complete fix coming soon.
-
-2000-09-12 Ettore Perazzoli <ettore@helixcode.com>
-
- * Makefile.am ($(IDL_GENERATED)): Add space after `-I'.
-
-2000-09-05 Ettore Perazzoli <ettore@helixcode.com>
-
- * e-msg-composer.c (create_menubar_format): Accelerate the
- `Format' menu with an `o' instead of an `f' [the `f' is already
- taken by the "File" menu].
-
-2000-09-04 Jeffrey Stedfast <fejj@helixcode.com>
-
- * e-msg-composer.c (e_msg_composer_new_with_sig_file): Applied
- Jesse's patch that sets the composer's sig_file
-
-2000-09-02 Lauris Kaplinski <lauris@helixcode.com>
-
- * e-msg-composer-address-dialog.c: Use e_utf8 wrappers
-
-2000-09-01 Jeffrey Stedfast <fejj@helixcode.com>
-
- * e-msg-composer.c (e_msg_composer_get_sig_file): This needs to
- return a const char * and not a char *, because we're not actually
- allocating memory here.
- (create_menubar_file): Changed "Send" to "Send Now" and added
- "Send Later"
- (menu_file_send_later_cb): New callback that emits the POSTPONE
- signal (equivalent to "Send Later"
-
-2000-08-28 Jeffrey Stedfast <fejj@helixcode.com>
-
- * e-msg-composer.c (e_msg_composer_new_with_message): Always
- request to import the HTML version if at all possible so that we
- maintain formatting and other nifty stuff :-)
-
-2000-08-28 Jeffrey Stedfast <fejj@helixcode.com>
-
- * e-msg-composer-hdrs.c (e_msg_composer_hdrs_to_message): Set the
- "From" address in the CamelMimeMessage. Also updated to use
- get_subject to both make our lives easier and prepare for using UTF8
- (e_msg_composer_hdrs_get_subject): Updated to behave similarly to
- get_from and return allocated memory (it will have to return
- allocated memory once it's converted to use UTF8 anyways)
-
- * e-msg-composer.c (setup_save_draft): Always set
- composer->send_html = TRUE so that formatting is preserved.
-
-2000-08-24 Lauris Kaplinski <lauris@helixcode.com>
-
- * e-msg-composer-address-entry.c: Use e_utf8 wrappers
-
- * e-msg-composer-attachment.c: Use e_utf8 wrappers
-
- * e-msg-composer-hdrs.c: Use e_utf8 wrappers
-
-2000-08-24 Peter Williams <peterw@helixcode.com>
-
- * Makefile.am (INCLUDES): Add builddir/shell so we can
- get Evolution.h
-
-2000-08-12 Michael Meeks <michael@helixcode.com>
-
- * e-msg-composer.c (get_text): get_text not get_txt.
-
-2000-08-11 JP Rosevear <jpr@helixcode.com>
-
- * e-msg-composer.c (e_msg_composer_new_with_message): Use
- new config accessors
-
-2000-08-10 Dan Winship <danw@helixcode.com>
-
- * e-msg-composer.c: Remove unneeded e-setup.h include
-
-2000-08-10 Jeffrey Stedfast <fejj@helixcode.com>
-
- * e-msg-composer.c (exit_dialog_cb): Made async
-
-2000-08-10 Peter Williams <peterw@helixcode.com>
-
- * e-msg-composer.c (do_exit): Temporarily disable draft saving
- while we figure out how to work around Zucchi's new append_message.
-
-2000-08-10 Jeffrey Stedfast <fejj@helixcode.com>
-
- * e-msg-composer-hdrs.c (e_msg_composer_hdrs_get_from): Return the
- text in GtkCombo->entry
-
-2000-08-09 Jeffrey Stedfast <fejj@helixcode.com>
-
- * e-msg-composer-hdrs.c (create_dropdown_entry): Fixed the GList
- identity stuff, should now display all configured identities.
-
-2000-08-09 Christopher James Lahey <clahey@helixcode.com>
-
- * e-msg-composer-address-dialog.c: Fixed some warnings.
-
- * e-msg-composer-hdrs.c: Switched the composer to use an EEntry
- for the subject field.
-
- * e-msg-composer.c: Changed the non scaling objects in this vbox
- to be FALSE, FALSE instead of FALSE, TRUE.
-
-2000-08-09 Jeffrey Stedfast <fejj@helixcode.com>
-
- * e-msg-composer-hdrs.c (add_header): Modified to allow dropdown
- entry-boxes as well (for headers like From:)
- (setup_headers): Modified to use the correct enum type.
- (create_dropdown_entry): New convenience function to add a
- drop-down combo box and fill it in with identities
- (init): Set from_entry to NULL
- (e_msg_composer_hdrs_get_from): New convenience function to get
- the text in the From widget in the composer
- (e_msg_composer_hdrs_set_from): New convenience function to set
- the From header in the composer
-
-2000-08-08 JP Rosevear <jpr@helixcode.com>
-
- * Makefile.am: Fix build by allowing includes for e-table dir
-
-2000-08-07 Jeffrey Stedfast <fejj@helixcode.com>
-
- * e-msg-composer-attachment-bar.c (attach_to_multipart):
- s/strcasecmp/g_strcasecmp
-
- * e-msg-composer.c: s/strncasecmp/g_strncasecmp - this will help
- later with building on different platforms :-)
-
-2000-08-07 Jeffrey Stedfast <fejj@helixcode.com>
-
- * e-msg-composer.c (e_msg_composer_new_with_message): Added code
- to set the body text based on the CamelMimeMessage.
- (set_editor_text): Use lowercase html tags...
-
-2000-08-07 Jeffrey Stedfast <fejj@helixcode.com>
-
- * e-msg-composer.c (do_exit): Prompt the user to save their
- composition in Drafts.
- (set_editor_text): Uhm, use "-- \n" not "--\n" because the space
- is called for in the standard
- (e_msg_composer_new_with_message): New convenience function that
- takes a CamelMimeMessage as an argument. This will be useful when
- we code the ability to resume the editing of a message draft (like
- in the Drafts folder).
-
-2000-08-01 JP Rosevear <jpr@helixcode.com>
-
- * e-msg-composer.h: Constify param
-
- * e-msg-composer.c (get_signature): Constify param
- (set_editor_text): ditto
- (e_msg_composer_new_with_sig_file): ditto
-
-2000-08-01 Peter Williams <peterw@helixcode.com>
-
- * e-msg-composer.c (set_editor_text): sizeof("--\") !=
- strlen("--\n"), breaking the test for the signature prefix.
-
-2000-07-28 JP Rosevear <jpr@helixcode.com>
-
- * e-msg-composer.c (e_msg_composer_new_with_sig_file): New
- function to create composer with sig file set.
- (e_msg_composer_get_sig_file): New function to get sig file
- (e_msg_composer_set_sig_file): New function to set sig file
-
-2000-07-25 Michael Meeks <michael@helixcode.com>
-
- * e-msg-composer.c (get_text): add textual exception printout.
- (set_editor_text): close pre tags & check for pre-existing
- sig separator.
-
-2000-07-25 Peter Williams <peterw@helixcode.com>
-
- * e-msg-composer.c (menu_file_insert_file_cb): Mark this function
- as FIXME because we're waiting for the HTML Editor Control to
- support paste commands. Also some updates for when that happens.
-
-2000-07-24 Dan Winship <danw@helixcode.com>
-
- * e-msg-composer.c: Remove GOAD support.
- (create_editor): Try to give a more helpful error message when
- failing to load the editor control.
-
-2000-07-23 Ettore Perazzoli <ettore@helixcode.com>
-
- * e-msg-composer.c (menu_format_html_cb): New callback for the
- "Send HTML" menu toggle item.
- (create_menubar_format): New.
- (create_menubar): Call it.
- (create_menubar_options): Removed.
- (init): Initialize `send_html' and `attachment_bar_visible' to
- FALSE.
- (get_signature): Add `void' to the declaration. This is C, not
- C++.
- (menu_file_close_cb): Renamed from `exit_cb'.
- (menu_file_send_cb): Renamed from `send_cb'.
- (menu_file_save_as_cb): Renamed from `save_as_cb'.
- (menu_file_save_cb): Renamed from `save_cb'.
- (menu_file_open_cb): Renamed from `open_cb'.
- (menu_file_add_attachment_cb): Renamed from `add_attachment_cb'.
- (menu_file_insert_file_cb): Renamed from `insert_file_cb'.
- (e_msg_composer_set_send_html): New.
- (build_message): Use the `send_html' flag instead of peeking the
- `msg_format' gnome-config value directly.
-
- * e-msg-composer.h: New member `send_html' in `EMsgComposer'.
-
-2000-07-23 Ettore Perazzoli <ettore@helixcode.com>
-
- * e-msg-composer.c: Changed to use BonoboUIHandler stuff directly
- instead of translating from GnomeUIInfo.
- (create_menubar_file): New.
- (create_menubar_edit): New.
- (create_menubar_view): New.
- (create_menubar_options): New.
- (create_menubar): Use these functions to set up the menu bar.
- (create_toolbar): Use BonoboUIHandler directly instead of
- converting from GnomeUIInfo.
- (toolbar_view_attachments_clicked_cb): Removed.
- (address_dialog_cb): Removed.
- (address_dialog_destroy_cb): Removed.
- (address_dialog_apply_cb): Removed.
- (setup_address_dialog): Removed.
-
-2000-07-12 Peter Williams <peterw@helixcode.com>
-
- * e-msg-composer.c: (view_tree) Make the "View Attachments" item
- a toggleitem ... so that it can be toggled...
- (menu_view_attachments_activate_cb): Treat the widget correctly
- and toggle correctly.
-
-2000-07-10 Ettore Perazzoli <ettore@helixcode.com>
-
- * e-msg-composer.c (exit_cb): Use it.
- (delete_event): New, handler for the "delete_event" signal.
-
-2000-07-09 Dan Winship <danw@helixcode.com>
-
- * e-msg-composer.c (set_editor_text): Don't load "" into the
- editor, because it will cause the editor component to g_warning.
-
-2000-07-09 Christopher James Lahey <clahey@helixcode.com>
-
- * e-msg-composer-hdrs.c: Removed the extra frame here.
-
-2000-07-08 Dan Winship <danw@helixcode.com>
-
- * e-msg-composer.c (create_menubar): Create an empty "Edit" menu
- for the editor control to insert itself into.
-
-2000-07-08 Jeffrey Stedfast <fejj@helixcode.com>
-
- * .cvsignore: Ignore dynamically created source files
-
-2000-07-08 Ettore Perazzoli <ettore@helixcode.com>
-
- * e-msg-composer-hdrs.c (set_entry): New.
- (e_msg_composer_hdrs_set_to): Use it.
- (e_msg_composer_hdrs_set_cc): Likewise
- (e_msg_composer_hdrs_set_bcc): Likewise.
- (e_msg_composer_hdrs_get_to): Replace implementation with a
- `g_assert_not_reached()'.
- (e_msg_composer_hdrs_get_cc): Likewise.
- (e_msg_composer_hdrs_get_bcc): Likewise.
-
- * e-msg-composer.c: Get rid of cut/copy/paste/undo as they
- duplicate the editor toolbar and cannot be made to work for all
- the widgets anyway.
-
-2000-07-08 Ettore Perazzoli <ettore@helixcode.com>
-
- * e-msg-composer-hdrs.c: New member `corba_select_names' in
- `EMsgComposerHdrsPrivate'.
- (destroy): If not `CORBA_OBJECT_NIL', release.
- (init): Init to `CORBA_OBJECT_NIL'.
- (setup_corba): New.
- (e_msg_composer_hdrs_new): Call it.
- (add_entry): Create the entries by using the ::SelectNames
- interface.
- (address_button_clicked_cb): Activate the dialog through the
- ::SelectNames interface.
-
-2000-06-29 Jeffrey Stedfast <fejj@helixcode.com>
-
- * e-msg-composer.c: Changed "Exit" to "Close" in the File menu.
- This is a little more intuitive as it does not suggest exiting
- the application, just says "close this window".
-
-2000-06-26 Christopher James Lahey <clahey@helixcode.com>
-
- * Makefile.am: Added e-msg-composer-select-file.h for make
- distcheck.
-
-2000-06-26 Ettore Perazzoli <ettore@helixcode.com>
-
- * e-msg-composer.c
- (load): New.
- (open_cb): Use it.
- (save): New function.
- (save_cb): Implemented by using it.
- (save_as_cb): Likewise.
-
-2000-06-17 Ettore Perazzoli <ettore@helixcode.com>
-
- * e-msg-composer.c (e_msg_composer_construct): I18N the title bar.
-
- * Makefile.am (libcomposerinclude_HEADERS): Removed. Move all the
- `.h' files into `libcomposer_la_SOURCES' so that they get
- distributed, but not installed.
-
- * e-msg-composer.c (open_cb): New; implement the `Open' command.
- (save_as_cb): New; implement the `Save as' command.
- (init): Initialize the `persist_file_interface' and
- `persist_stream_interface' members to NULL.
- (destroy): Release the PersistStream and PersistFile interfaces.
- (e_msg_composer_construct): Query the PersistFile and
- PersistStream interfaces on the control and save them in the
- `persist_file_interface' and `persist_stream_interface' members.
- (get_text): Renamed from `get_editor_text'. Get a
- @persist_stream_interface instead of querying it a the control.
- (build_message): Return NULL if `persist_stream_interface' is nil.
-
- * e-msg-composer.h: New member `persist_file_interface' in
- `EMsgComposer'.
-
- * e-msg-composer-select-file.c: New.
- * e-msg-composer-select-file.h: New.
-
- * e-msg-composer.c (e_msg_composer_construct): Make the `To:'
- entry grab the keyboard focus.
-
- * e-msg-composer-hdrs.c (e_msg_composer_hdrs_get_to_entry): New.
- (e_msg_composer_hdrs_get_cc_entry): New.
- (e_msg_composer_hdrs_get_bcc_entry): New.
- (e_msg_composer_hdrs_get_subject_entry): New.
-
- * e-msg-composer.c (e_msg_composer_construct): Set the scroll
- frame's shadow type to `GTK_SHADOW_IN'.
- (format_text): Initialize `tabbing' to zero to shut down the
- compiler.
-
-2000-06-14 Dan Winship <danw@helixcode.com>
-
- * e-msg-composer-attachment-bar.c (add_from_user): keep the
- GtkFileSelection around between calls so we start up in the same
- directory we ended up in last time around. (Also fixes a big
- memory leak in that the code was already keeping the
- GtkFileSelection around, it just wasn't remembering to reuse it.)
-
- * e-msg-composer.c (format_text): Don't line-wrap lines that start
- with ">".
-
-2000-06-12 Dan Winship <danw@helixcode.com>
-
- * e-msg-composer.c (format_text): If a paragraph starts with TABs,
- indent the whole paragraph to that tab level.
-
-2000-06-12 Ettore Perazzoli <ettore@helixcode.com>
-
- * e-msg-composer.c: Make the `attachment_scroll_frame' an
- `EScrollFrame'.
- (exit_cb): I18N the quit message.
-
- * e-msg-composer.h: `attachment_scrolled_window' renamed to
- `attachment_scroll_frame'.
-
-2000-06-12 Dan Winship <danw@helixcode.com>
-
- * e-msg-composer.c (format_text): Don't break on non-breaking
- spaces, don't keep non-breaking spaces that fall after a line
- wrap, and translate non-breaking spaces to regular ones after
- wrapping.
-
-2000-06-05 Dan Winship <danw@helixcode.com>
-
- * e-msg-composer.c (e_msg_composer_attach): New convenience
- function.
-
- * e-msg-composer-attachment.c: Store a CamelMimePart rather than
- filename/description/mime_type info. Also record whether we were
- told or guessed the MIME type.
- (e_msg_composer_attachment_new_from_mime_part): New constructor.
- (e_msg_composer_attachment_edit): Remove the "browse" button. (If
- the user wants to change the actual file that the attachment is
- based on, he should delete the attachment and create a new one...)
- Remove the "Apply" button, because it's not all that useful. Make
- the MIME type only track the filename if it was guessed rather
- than being provided.
-
- * e-msg-composer-attachment.glade: Remove "browse" and "apply"
- buttons. Make filename editable.
-
- * e-msg-composer-attachment-bar.c (sort): Removed. Send the
- attachments in the order the user attached them in.
- (text_changed): Removed, since we weren't enabling the relevant
- GnomeIconList functionality that would have used this.
- (update): Don't print the size if it's 0.
- (attach_to_multipart, etc): adjust for EMsgComposerAttachment
- changes.
- (attach_to_multipart): Use 7bit encoding for message/ subparts.
- (e_msg_composer_attachment_bar_attach_mime_part): New convenience
- function.
-
-
-2000-06-02 Christopher James Lahey <clahey@helixcode.com>
-
- * e-msg-composer.c: Added the ability to save plain text mail.
-
-2000-05-29 Dan Winship <danw@helixcode.com>
-
- * e-msg-composer.c (get_editor_text): add a "format" argument so
- we can fetch different kinds of text.
- (format_text): New function to do line wrapping on plain text.
- (build_message): Build multipart/alternative messages rather than
- HTML-only ones. Yay. We don't suck (as much) any more!
-
-2000-05-28 Dan Winship <danw@helixcode.com>
-
- * e-msg-composer.c: #include <errno.h>
-
-2000-05-26 Dan Winship <danw@helixcode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * e-msg-composer.c (build_message): Use camel_data_wrapper_new
- instead of camel_simple_data_wrapper_new.
-
-2000-05-17 Dan Winship <danw@helixcode.com>
-
- * e-msg-composer.c (build_message): Use
- camel_simple_data_wrapper_new rather than camel_data_wrapper_new.
-
-2000-05-13 Valek Filippov <frob@df.ru>
-
- * 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 <danw@helixcode.com>
-
- * e-msg-composer.c (get_editor_text): NUL-terminate the data
- extracted from the BonoboStream.
-
-2000-05-10 Dan Winship <danw@helixcode.com>
-
- * e-msg-composer-attachment-bar.c (attach_to_multipart): deal with
- Content-Transfer-Encoding a little bit at least.
-
-2000-05-07 Mathieu Lacage <mathieu@gnu.org>
-
- * e-msg-composer.c (create_editor): remove FIXME and hardcoded
- string. You can write mails with OAF now.
-
-2000-05-07 Dan Winship <danw@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * e-msg-composer-hdrs.c: Turned off focus in the To, Cc, and Bcc
- buttons.
-
-2000-05-02 Matt Loper <matt@helixcode.com>
-
- * Makefile.am: set G_LOG_DOMAIN.
-
-2000-04-28 Dan Winship <danw@helixcode.com>
-
- * e-msg-composer-hdrs.c (set_recipients): Update (minimally) for
- Camel recipient changes.
-
-2000-04-27 Dan Winship <danw@helixcode.com>
-
- * e-msg-composer.c (e_msg_composer_new_from_url): New routine, to
- process mailto URLs.
-
-2000-04-26 Dan Winship <danw@helixcode.com>
-
- * 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 <danw@helixcode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * 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 <rodo@helixcode.com>
-
- * 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 <danw@helixcode.com>
-
- * 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 <danw@helixcode.com>
-
- * 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 <danw@helixcode.com>
-
- * 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 <danw@helixcode.com>
-
- * 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 <danw@helixcode.com>
-
- * e-msg-composer.c (build_message): Change
- camel_mime_message_new_with_session to camel_mime_message_new
-
-2000-03-17 bertrand <bertrand@helixcode.com>
-
- * e-msg-composer.c (create_menubar): Pass the composer as the data
- for the menubar callbacks.
-
-2000-03-12 Matt Loper <matt@helixcode.com>
-
- * Makefile.am: Modified to make the composer into a library, to be
- used by the mail component.
-
-2000-03-07 Ettore Perazzoli <ettore@helixcode.com>
-
- * 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 <ettore@helixcode.com>
-
- * 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 <bertrand@helixcode.com>
-
- * Makefile.am (evolution_msg_composer_LDADD):
- use $(EXTRA_GNOME_LIBS_THREADS) to link with gthread
-
-1999-11-17 Ettore Perazzoli <ettore@gnu.org>
-
- * 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/Composer.idl b/composer/Composer.idl
deleted file mode 100644
index a6cb35c037..0000000000
--- a/composer/Composer.idl
+++ /dev/null
@@ -1,4 +0,0 @@
-/* -*- Mode: IDL; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-#include <Evolution-Addressbook-SelectNames.idl>
-#include <Evolution-Composer.idl>
diff --git a/composer/Evolution-Composer.idl b/composer/Evolution-Composer.idl
deleted file mode 100644
index 3fcda3873e..0000000000
--- a/composer/Evolution-Composer.idl
+++ /dev/null
@@ -1,96 +0,0 @@
-/* -*- Mode: IDL; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Evolution-Composer.idl: Mail composer interfaces for Evolution
- *
- * Author:
- * Dan Winship <danw@helixcode.com>
- *
- * (C) 2000 Helix Code, Inc.
- */
-
-#include <Bonobo.idl>
-
-module GNOME {
-module Evolution {
-
- interface Composer : Bonobo::Unknown {
- struct Recipient {
- string name; /* UTF-8 */
- string address;
- };
- typedef sequence<Recipient> RecipientList;
-
- /**
- * setHeaders:
- * @to: the "To" recipients
- * @cc: the "CC" recipients
- * @bcc: the "Bcc" recipients
- * @subject: the subject of the message
- *
- * Sets the composer headers. Any of @to, @cc, and
- * @bcc may be an empty list, and @subject may be an
- * empty string.
- **/
- void setHeaders (in RecipientList to, in RecipientList cc,
- in RecipientList bcc, in string subject);
-
- /**
- * setBodyText:
- * @body: the body
- *
- * Sets the text in the body of the composer to
- * the given UTF-8 plain text.
- **/
- void setBodyText (in string body);
-
- /**
- * attachMIME:
- * @data: the attachment data
- *
- * This adds an attachment to the composer. @data
- * should be a fully-formed MIME body part.
- **/
- exception CouldNotParse {};
- void attachMIME (in string data)
- raises (CouldNotParse);
-
- /**
- * attachData:
- * @content_type: the Content-Type header
- * @filename: the suggested filename, or ""
- * @description: a description of the data, or ""
- * @show_inline: whether the attachment should be
- * displayed inline or not.
- * @data: the raw attachment data
- *
- * This adds @data as an attachment, using the provided
- * information to generate MIME headers. @content_type
- * may contain just a MIME content type, or it may
- * contain a complete Content-Type header. @filename
- * is a filename for the Content-Disposition header
- * @description (if not "") provides the
- * Content-Description, and @show_inline determines if the
- * Content-Disposition is "inline" or "attachment".
- *
- * If you need to specify headers or values other than
- * what this function can do, you will need to generate
- * all of the MIME headers yourself and use
- * add_attachment ().
- **/
- void attachData (in string content_type,
- in string filename,
- in string description,
- in boolean show_inline,
- in string data);
-
-
- /**
- * show:
- *
- * Shows the composer and lets the user edit things
- * and send the message.
- **/
- void show ();
- };
-};
-};
diff --git a/composer/Makefile.am b/composer/Makefile.am
deleted file mode 100644
index d79e11ae9e..0000000000
--- a/composer/Makefile.am
+++ /dev/null
@@ -1,92 +0,0 @@
-## CORBA stuff
-
-IDLS = \
- Evolution-Composer.idl \
- Composer.idl
-
-IDL_GENERATED = \
- Composer.h \
- Composer-common.c \
- Composer-skels.c \
- Composer-stubs.c
-
-HTML_EDITOR_GENERATED = \
- Editor.h \
- Editor-common.c \
- Editor-skels.c \
- Editor-stubs.c
-
-selectnamesdir = $(top_srcdir)/addressbook/gui/component/select-names
-
-$(IDL_GENERATED): $(IDLS) $(selectnamesdir)/Evolution-Addressbook-SelectNames.idl
- $(ORBIT_IDL) -I $(srcdir) -I $(datadir)/idl `$(GNOME_CONFIG) --cflags idl` \
- -I $(selectnamesdir) $(srcdir)/Composer.idl
-
-Editor-commmon.c: $(GTK_HTML_EDITOR_IDL)
-
-$(HTML_EDITOR_GENERATED): $(GTK_HTML_EDITOR_IDL)
- $(ORBIT_IDL) -I $(srcdir) `$(GNOME_CONFIG) --cflags idl` $(GTK_HTML_EDITOR_IDL)
-
-##
-
-idldir = $(datadir)/idl
-idl_DATA = $(IDLS)
-
-gladedir = $(datadir)/evolution/glade
-
-glade_DATA = \
- e-msg-composer-attachment.glade
-
-libcomposerincludedir = $(includedir)/composer
-
-noinst_LIBRARIES = libcomposer.a
-
-INCLUDES = \
- -I$(top_srcdir) \
- -I$(top_builddir) \
- -I$(top_srcdir)/widgets \
- -I$(top_builddir)/widgets \
- -I$(top_srcdir)/camel \
- -I$(top_builddir)/camel \
- -I$(top_builddir)/addressbook/gui/component/select-names \
- -I$(top_builddir)/shell \
- -I$(top_srcdir)/shell \
- $(EXTRA_GNOME_CFLAGS) \
- $(GNOME_INCLUDEDIR) \
- $(BONOBO_GNOME_CFLAGS) \
- $(GTKHTML_CFLAGS) \
- $(UNICODE_CFLAGS) \
- -DEVOLUTION_DATADIR=\"$(datadir)\" \
- -DE_GLADEDIR=\"$(gladedir)\" \
- -DG_LOG_DOMAIN=\"composer\"
-
-libcomposer_a_SOURCES = \
- $(IDL_GENERATED) \
- $(HTML_EDITOR_GENERATED) \
- e-msg-composer-attachment-bar.c \
- e-msg-composer-attachment-bar.h \
- e-msg-composer-attachment.c \
- e-msg-composer-attachment.h \
- e-msg-composer-hdrs.c \
- e-msg-composer-hdrs.h \
- e-msg-composer-select-file.c \
- e-msg-composer-select-file.h \
- e-msg-composer.c \
- e-msg-composer.h \
- e-icon-list.c \
- e-icon-list.h \
- evolution-composer.c \
- evolution-composer.h \
- listener.c \
- listener.h
-
-EXTRA_DIST = \
- $(glade_DATA) \
- $(IDLS) \
- bad-icon.xpm
-
-BUILT_SOURCES = $(IDL_GENERATED) $(HTML_EDITOR_GENERATED)
-CLEANFILES += $(BUILT_SOURCES)
-
-dist-hook:
- cd $(distdir); rm -f $(BUILT_SOURCES)
diff --git a/composer/bad-icon.xpm b/composer/bad-icon.xpm
deleted file mode 100644
index 0a9cac23cd..0000000000
--- a/composer/bad-icon.xpm
+++ /dev/null
@@ -1,53 +0,0 @@
-/* XPM */
-static char * bad_icon_xpm[] = {
-"48 48 2 1",
-" g None",
-". g #000000",
-"................................................",
-". .",
-". .",
-". .",
-". .",
-". .",
-". .",
-". .",
-". .",
-". . . .",
-". . . .",
-". . . .",
-". . . .",
-". . . .",
-". . . .",
-". . . .",
-". . . .",
-". . . .",
-". . . .",
-". . . .",
-". . . .",
-". . . .",
-". . . .",
-". . . .",
-". .. .",
-". .. .",
-". . . .",
-". . . .",
-". . . .",
-". . . .",
-". . . .",
-". . . .",
-". . . .",
-". . . .",
-". . . .",
-". . . .",
-". . . .",
-". . . .",
-". . . .",
-". . . .",
-". . . .",
-". .",
-". .",
-". .",
-". .",
-". .",
-". .",
-"................................................"};
diff --git a/composer/e-icon-list.c b/composer/e-icon-list.c
deleted file mode 100644
index a5e7ac45cd..0000000000
--- a/composer/e-icon-list.c
+++ /dev/null
@@ -1,2675 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 1998, 1999, 2000 Free Software Foundation
- * All rights reserved.
- *
- * This file is part of the Gnome Library.
- *
- * The Gnome 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.
- *
- * The Gnome 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.
- */
-/*
- @NOTATION@
- */
-
-/*
- * GnomeIconList widget - scrollable icon list
- *
- * Authors:
- * Federico Mena <federico@ximian.com>
- * Miguel de Icaza <miguel@ximian.com>
- *
- * Rewrote from scratch from the code written by Federico Mena
- * <federico@ximian.com> to be based on a GnomeCanvas, and
- * to support banding selection and allow inline icon renaming.
- *
- * Redone somewhat by Elliot to support gdk-pixbuf, and to use GArray instead of
- * GList for item storage.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <string.h>
-#include <stdio.h>
-#include <gtk/gtkmain.h>
-#include <gtk/gtkobject.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtkwidget.h>
-#include <libgnomeui/gnome-icon-item.h>
-#include <libgnomeui/gnome-canvas-rect-ellipse.h>
-#include <gdk-pixbuf/gnome-canvas-pixbuf.h>
-#include "e-icon-list.h"
-
-#include "bad-icon.xpm"
-
-/* Aliases to minimize screen use in my laptop */
-#define EIL(x) E_ICON_LIST(x)
-#define EIL_CLASS(x) E_ICON_LIST_CLASS(x)
-#define IS_EIL(x) E_IS_ICON_LIST(x)
-
-typedef EIconList Eil;
-typedef EIconListClass EilClass;
-
-
-/* default spacings */
-#define DEFAULT_ROW_SPACING 4
-#define DEFAULT_COL_SPACING 2
-#define DEFAULT_TEXT_SPACING 2
-#define DEFAULT_ICON_BORDER 2
-
-/* Autoscroll timeout in milliseconds */
-#define SCROLL_TIMEOUT 30
-
-
-/* Signals */
-enum {
- SELECT_ICON,
- UNSELECT_ICON,
- TEXT_CHANGED,
- LAST_SIGNAL
-};
-
-typedef enum {
- SYNC_INSERT,
- SYNC_REMOVE
-} SyncType;
-
-enum {
- ARG_0,
-};
-
-static guint eil_signals[LAST_SIGNAL] = { 0 };
-
-
-static GnomeCanvasClass *parent_class;
-
-
-/* Icon structure */
-typedef struct {
- /* Icon image and text items */
- GnomeCanvasPixbuf *image;
- GnomeIconTextItem *text;
-
- /* Filename of the icon file. */
- gchar *icon_filename;
-
- /* User data and destroy notify function */
- gpointer data;
- GtkDestroyNotify destroy;
-
- /* ID for the text item's event signal handler */
- guint text_event_id;
-
- /* Whether the icon is selected, and temporary storage for rubberband
- * selections.
- */
- guint selected : 1;
- guint tmp_selected : 1;
-} Icon;
-
-/* A row of icons */
-typedef struct {
- GList *line_icons;
- gint16 y;
- gint16 icon_height, text_height;
-} IconLine;
-
-/* Private data of the EIconList structure */
-struct _EIconListPrivate {
- /* List of icons */
- GArray *icon_list;
-
- /* List of rows of icons */
- GList *lines;
-
- /* Separators used to wrap the text below icons */
- char *separators;
-
- Icon *last_selected_icon;
-
- /* Rubberband rectangle */
- GnomeCanvasItem *sel_rect;
-
- /* Saved event for a pending selection */
- GdkEvent select_pending_event;
-
- /* Max of the height of all the icon rows and window height */
- int total_height;
-
- /* Selection mode */
- GtkSelectionMode selection_mode;
-
- /* A list of integers with the indices of the currently selected icons */
- GList *selection;
-
- /* Number of icons in the list */
- int icons;
-
- /* Freeze count */
- int frozen;
-
- /* Width allocated for icons */
- int icon_width;
-
- /* Spacing values */
- int row_spacing;
- int col_spacing;
- int text_spacing;
- int icon_border;
-
- /* Index and pointer to last selected icon */
- int last_selected_idx;
-
- /* Timeout ID for autoscrolling */
- guint timer_tag;
-
- /* Change the adjustment value by this amount when autoscrolling */
- int value_diff;
-
- /* Mouse position for autoscrolling */
- int event_last_x;
- int event_last_y;
-
- /* Selection start position */
- int sel_start_x;
- int sel_start_y;
-
- /* Modifier state when the selection began */
- guint sel_state;
-
- /* Whether the icon texts are editable */
- guint is_editable : 1;
-
- /* Whether the icon texts need to be copied */
- guint static_text : 1;
-
- /* Whether the icons need to be laid out */
- guint dirty : 1;
-
- /* Whether the user is performing a rubberband selection */
- guint selecting : 1;
-
- /* Whether editing an icon is pending after a button press */
- guint edit_pending : 1;
-
- /* Whether selection is pending after a button press */
- guint select_pending : 1;
-
- /* Whether the icon that is pending selection was selected to begin with */
- guint select_pending_was_selected : 1;
-};
-
-
-static inline int
-icon_line_height (Eil *eil, IconLine *il)
-{
- EIconListPrivate *priv;
-
- priv = eil->_priv;
-
- return il->icon_height + il->text_height + priv->row_spacing + priv->text_spacing;
-}
-
-static void
-icon_get_height (Icon *icon, int *icon_height, int *text_height)
-{
- double d_icon_height;
- gtk_object_get(GTK_OBJECT(icon->image), "height", &d_icon_height, NULL);
- *icon_height = d_icon_height;
- *text_height = icon->text->ti->height;
-}
-
-static int
-eil_get_items_per_line (Eil *eil)
-{
- EIconListPrivate *priv;
- int items_per_line;
-
- priv = eil->_priv;
-
- items_per_line = GTK_WIDGET (eil)->allocation.width / (priv->icon_width + priv->col_spacing);
- if (items_per_line == 0)
- items_per_line = 1;
-
- return items_per_line;
-}
-
-/**
- * e_icon_list_get_items_per_line:
- * @eil: An icon list.
- *
- * Returns the number of icons that fit in a line or row.
- */
-int
-e_icon_list_get_items_per_line (EIconList *eil)
-{
- g_return_val_if_fail (eil != NULL, 1);
- g_return_val_if_fail (IS_EIL (eil), 1);
-
- return eil_get_items_per_line (eil);
-}
-
-static void
-eil_place_icon (Eil *eil, Icon *icon, int x, int y, int icon_height)
-{
- EIconListPrivate *priv;
- int x_offset, y_offset;
- double d_icon_image_height;
- double d_icon_image_width;
- int icon_image_height;
- int icon_image_width;
-
- priv = eil->_priv;
-
- gtk_object_get(GTK_OBJECT(icon->image), "height", &d_icon_image_height, NULL);
- icon_image_height = d_icon_image_height;
- g_assert(icon_image_height != 0);
- if (icon_height > icon_image_height)
- y_offset = (icon_height - icon_image_height) / 2;
- else
- y_offset = 0;
-
- gtk_object_get(GTK_OBJECT(icon->image), "width", &d_icon_image_width, NULL);
- icon_image_width = d_icon_image_width;
- g_assert(icon_image_width != 0);
- if (priv->icon_width > icon_image_width)
- x_offset = (priv->icon_width - icon_image_width) / 2;
- else
- x_offset = 0;
-
- gnome_canvas_item_set (GNOME_CANVAS_ITEM (icon->image),
- "x", (double) (x + x_offset),
- "y", (double) (y + y_offset),
- NULL);
- gnome_icon_text_item_setxy (icon->text,
- x,
- y + icon_height + priv->text_spacing);
-}
-
-static void
-eil_layout_line (Eil *eil, IconLine *il)
-{
- EIconListPrivate *priv;
- GList *l;
- int x;
-
- priv = eil->_priv;
-
- x = 0;
- for (l = il->line_icons; l; l = l->next) {
- Icon *icon = l->data;
-
- eil_place_icon (eil, icon, x, il->y, il->icon_height);
- x += priv->icon_width + priv->col_spacing;
- }
-}
-
-static void
-eil_add_and_layout_line (Eil *eil, GList *line_icons, int y,
- int icon_height, int text_height)
-{
- EIconListPrivate *priv;
- IconLine *il;
-
- priv = eil->_priv;
-
- il = g_new (IconLine, 1);
- il->line_icons = line_icons;
- il->y = y;
- il->icon_height = icon_height;
- il->text_height = text_height;
-
- eil_layout_line (eil, il);
- priv->lines = g_list_append (priv->lines, il);
-}
-
-static void
-eil_relayout_icons_at (Eil *eil, int pos, int y)
-{
- EIconListPrivate *priv;
- int col, row, text_height, icon_height;
- int items_per_line, n;
- GList *line_icons;
-
- priv = eil->_priv;
- items_per_line = eil_get_items_per_line (eil);
-
- col = row = text_height = icon_height = 0;
- line_icons = NULL;
-
- for (n = pos; n < priv->icon_list->len; n++) {
- Icon *icon = g_array_index(priv->icon_list, Icon*, n);
- int ih, th;
-
- if (!(n % items_per_line)) {
- if (line_icons) {
- eil_add_and_layout_line (eil, line_icons, y,
- icon_height, text_height);
- line_icons = NULL;
-
- y += (icon_height + text_height
- + priv->row_spacing + priv->text_spacing);
- }
-
- icon_height = 0;
- text_height = 0;
- }
-
- icon_get_height (icon, &ih, &th);
-
- icon_height = MAX (ih, icon_height);
- text_height = MAX (th, text_height);
-
- line_icons = g_list_append (line_icons, icon);
- }
-
- if (line_icons)
- eil_add_and_layout_line (eil, line_icons, y, icon_height, text_height);
-}
-
-static void
-eil_free_line_info (Eil *eil)
-{
- EIconListPrivate *priv;
- GList *l;
-
- priv = eil->_priv;
-
- for (l = priv->lines; l; l = l->next) {
- IconLine *il = l->data;
-
- g_list_free (il->line_icons);
- g_free (il);
- }
-
- g_list_free (priv->lines);
- priv->lines = NULL;
- priv->total_height = 0;
-}
-
-static void
-eil_free_line_info_from (Eil *eil, int first_line)
-{
- EIconListPrivate *priv;
- GList *l, *ll;
-
- priv = eil->_priv;
- ll = g_list_nth (priv->lines, first_line);
-
- for (l = ll; l; l = l->next) {
- IconLine *il = l->data;
-
- g_list_free (il->line_icons);
- g_free (il);
- }
-
- if (priv->lines) {
- if (ll->prev)
- ll->prev->next = NULL;
- else
- priv->lines = NULL;
- }
-
- g_list_free (ll);
-}
-
-static void
-eil_layout_from_line (Eil *eil, int line)
-{
- EIconListPrivate *priv;
- GList *l;
- int height;
-
- priv = eil->_priv;
-
- eil_free_line_info_from (eil, line);
-
- height = 0;
- for (l = priv->lines; l; l = l->next) {
- IconLine *il = l->data;
-
- height += icon_line_height (eil, il);
- }
-
- eil_relayout_icons_at (eil, line * eil_get_items_per_line (eil), height);
-}
-
-static void
-eil_layout_all_icons (Eil *eil)
-{
- EIconListPrivate *priv;
-
- priv = eil->_priv;
-
- if (!GTK_WIDGET_REALIZED (eil))
- return;
-
- eil_free_line_info (eil);
- eil_relayout_icons_at (eil, 0, 0);
- priv->dirty = FALSE;
-}
-
-static void
-eil_scrollbar_adjust (Eil *eil)
-{
- EIconListPrivate *priv;
- GtkAdjustment *adj;
- GList *l;
- double wx, wy, wx1, wy1, wx2, wy2;
- int height, step_increment;
-
- priv = eil->_priv;
-
- if (!GTK_WIDGET_REALIZED (eil))
- return;
-
- height = 0;
- step_increment = 0;
- for (l = priv->lines; l; l = l->next) {
- IconLine *il = l->data;
-
- height += icon_line_height (eil, il);
-
- if (l == priv->lines)
- step_increment = height;
- }
-
- if (!step_increment)
- step_increment = 10;
-
- priv->total_height = MAX (height, GTK_WIDGET (eil)->allocation.height);
-
- gnome_canvas_c2w (GNOME_CANVAS (eil), 0, 0, &wx1, &wy1);
- gnome_canvas_c2w (GNOME_CANVAS (eil),
- GTK_WIDGET (eil)->allocation.width,
- priv->total_height,
- &wx2, &wy2);
-
- gnome_canvas_set_scroll_region (GNOME_CANVAS (eil),
- wx1, wy1, wx2, wy2);
-
- wx = wy = 0;
- gnome_canvas_window_to_world (GNOME_CANVAS (eil), 0, 0, &wx, &wy);
-
- adj = gtk_layout_get_vadjustment (GTK_LAYOUT (eil));
-
- adj->upper = priv->total_height;
- adj->step_increment = step_increment;
- adj->page_increment = GTK_WIDGET (eil)->allocation.height;
- adj->page_size = GTK_WIDGET (eil)->allocation.height;
-
- if (wy > adj->upper - adj->page_size)
- wy = adj->upper - adj->page_size;
-
- adj->value = wy;
-
- gtk_adjustment_changed (adj);
-}
-
-/* Emits the select_icon or unselect_icon signals as appropriate */
-static void
-emit_select (Eil *eil, int sel, int i, GdkEvent *event)
-{
- gtk_signal_emit (GTK_OBJECT (eil),
- eil_signals[sel ? SELECT_ICON : UNSELECT_ICON],
- i,
- event);
-}
-
-static int
-eil_unselect_all (EIconList *eil, GdkEvent *event, gpointer keep)
-{
- EIconListPrivate *priv;
- Icon *icon;
- int i, idx = 0;
-
- g_return_val_if_fail (eil != NULL, 0);
- g_return_val_if_fail (IS_EIL (eil), 0);
-
- priv = eil->_priv;
-
- for (i = 0; i < priv->icon_list->len; i++) {
- icon = g_array_index(priv->icon_list, Icon*, i);
-
- if (icon == keep)
- idx = i;
- else if (icon->selected)
- emit_select (eil, FALSE, i, event);
- }
-
- return idx;
-}
-
-/**
- * e_icon_list_unselect_all:
- * @eil: An icon list.
- *
- * Returns: the number of icons in the icon list
- */
-int
-e_icon_list_unselect_all (EIconList *eil)
-{
- return eil_unselect_all (eil, NULL, NULL);
-}
-
-static void
-sync_selection (Eil *eil, int pos, SyncType type)
-{
- GList *list;
-
- for (list = eil->_priv->selection; list; list = list->next) {
- if (GPOINTER_TO_INT (list->data) >= pos) {
- int i = GPOINTER_TO_INT (list->data);
-
- switch (type) {
- case SYNC_INSERT:
- list->data = GINT_TO_POINTER (i + 1);
- break;
-
- case SYNC_REMOVE:
- list->data = GINT_TO_POINTER (i - 1);
- break;
-
- default:
- g_assert_not_reached ();
- }
- }
- }
-}
-
-static int
-eil_icon_to_index (Eil *eil, Icon *icon)
-{
- EIconListPrivate *priv;
- int n;
-
- priv = eil->_priv;
-
- for (n = 0; n < priv->icon_list->len; n++)
- if (g_array_index(priv->icon_list, Icon*, n) == icon)
- return n;
-
- g_assert_not_reached ();
- return -1; /* Shut up the compiler */
-}
-
-/* Event handler for icons when we are in SINGLE or BROWSE mode */
-static gint
-selection_one_icon_event (Eil *eil, Icon *icon, int idx, int on_text, GdkEvent *event)
-{
- EIconListPrivate *priv;
- GnomeIconTextItem *text;
- int retval;
-
- priv = eil->_priv;
- retval = FALSE;
-
- /* We use a separate variable and ref the object because it may be
- * destroyed by one of the signal handlers.
- */
- text = icon->text;
- gtk_object_ref (GTK_OBJECT (text));
-
- switch (event->type) {
- case GDK_BUTTON_PRESS:
- priv->edit_pending = FALSE;
- priv->select_pending = FALSE;
-
- /* Ignore wheel mouse clicks for now */
- if (event->button.button > 3)
- break;
-
- if (!icon->selected) {
- eil_unselect_all (eil, NULL, NULL);
- emit_select (eil, TRUE, idx, event);
- } else {
- if (priv->selection_mode == GTK_SELECTION_SINGLE
- && (event->button.state & GDK_CONTROL_MASK))
- emit_select (eil, FALSE, idx, event);
- else if (on_text && priv->is_editable && event->button.button == 1)
- priv->edit_pending = TRUE;
- else
- emit_select (eil, TRUE, idx, event);
- }
-
- retval = TRUE;
- break;
-
- case GDK_2BUTTON_PRESS:
- case GDK_3BUTTON_PRESS:
- /* Ignore wheel mouse clicks for now */
- if (event->button.button > 3)
- break;
-
- emit_select (eil, TRUE, idx, event);
- retval = TRUE;
- break;
-
- case GDK_BUTTON_RELEASE:
- if (priv->edit_pending) {
- gnome_icon_text_item_start_editing (text);
- priv->edit_pending = FALSE;
- }
-
- retval = TRUE;
- break;
-
- default:
- break;
- }
-
- /* If the click was on the text and we actually did something, stop the
- * icon text item's own handler from executing.
- */
- if (on_text && retval)
- gtk_signal_emit_stop_by_name (GTK_OBJECT (text), "event");
-
- gtk_object_unref (GTK_OBJECT (text));
-
- return retval;
-}
-
-/* Handles range selections when clicking on an icon */
-static void
-select_range (Eil *eil, Icon *icon, int idx, GdkEvent *event)
-{
- EIconListPrivate *priv;
- int a, b;
- Icon *i;
-
- priv = eil->_priv;
-
- if (priv->last_selected_idx == -1) {
- priv->last_selected_idx = idx;
- priv->last_selected_icon = icon;
- }
-
- if (idx < priv->last_selected_idx) {
- a = idx;
- b = priv->last_selected_idx;
- } else {
- a = priv->last_selected_idx;
- b = idx;
- }
-
- for (; a <= b; a++) {
- i = g_array_index(priv->icon_list, Icon*, a);
-
- if (!i->selected)
- emit_select (eil, TRUE, a, NULL);
- }
-
- /* Actually notify the client of the event */
- emit_select (eil, TRUE, idx, event);
-}
-
-/* Handles icon selection for MULTIPLE or EXTENDED selection modes */
-static void
-do_select_many (Eil *eil, Icon *icon, int idx, GdkEvent *event, int use_event)
-{
- EIconListPrivate *priv;
- int range, additive;
-
- priv = eil->_priv;
-
- range = (event->button.state & GDK_SHIFT_MASK) != 0;
- additive = (event->button.state & GDK_CONTROL_MASK) != 0;
-
- if (!additive) {
- if (icon->selected)
- eil_unselect_all (eil, NULL, icon);
- else
- eil_unselect_all (eil, NULL, NULL);
- }
-
- if (!range) {
- if (additive)
- emit_select (eil, !icon->selected, idx, use_event ? event : NULL);
- else
- emit_select (eil, TRUE, idx, use_event ? event : NULL);
-
- priv->last_selected_idx = idx;
- priv->last_selected_icon = icon;
- } else
- select_range (eil, icon, idx, use_event ? event : NULL);
-}
-
-/* Event handler for icons when we are in MULTIPLE or EXTENDED mode */
-static gint
-selection_many_icon_event (Eil *eil, Icon *icon, int idx, int on_text, GdkEvent *event)
-{
- EIconListPrivate *priv;
- GnomeIconTextItem *text;
- int retval;
- int additive, range;
- int do_select;
-
- priv = eil->_priv;
- retval = FALSE;
-
- /* We use a separate variable and ref the object because it may be
- * destroyed by one of the signal handlers.
- */
- text = icon->text;
- gtk_object_ref (GTK_OBJECT (text));
-
- range = (event->button.state & GDK_SHIFT_MASK) != 0;
- additive = (event->button.state & GDK_CONTROL_MASK) != 0;
-
- switch (event->type) {
- case GDK_BUTTON_PRESS:
- priv->edit_pending = FALSE;
- priv->select_pending = FALSE;
-
- /* Ignore wheel mouse clicks for now */
- if (event->button.button > 3)
- break;
-
- do_select = TRUE;
-
- if (additive || range) {
- if (additive && !range) {
- priv->select_pending = TRUE;
- priv->select_pending_event = *event;
- priv->select_pending_was_selected = icon->selected;
-
- /* We have to emit this so that the client will
- * know about the click.
- */
- emit_select (eil, TRUE, idx, event);
- do_select = FALSE;
- }
- } else if (icon->selected) {
- priv->select_pending = TRUE;
- priv->select_pending_event = *event;
- priv->select_pending_was_selected = icon->selected;
-
- if (on_text && priv->is_editable && event->button.button == 1)
- priv->edit_pending = TRUE;
-
- emit_select (eil, TRUE, idx, event);
- do_select = FALSE;
- }
-#if 0
- } else if (icon->selected && on_text && priv->is_editable
- && event->button.button == 1) {
- priv->edit_pending = TRUE;
- do_select = FALSE;
- }
-#endif
-
- if (do_select)
- do_select_many (eil, icon, idx, event, TRUE);
-
- retval = TRUE;
- break;
-
- case GDK_2BUTTON_PRESS:
- case GDK_3BUTTON_PRESS:
- /* Ignore wheel mouse clicks for now */
- if (event->button.button > 3)
- break;
-
- emit_select (eil, TRUE, idx, event);
- retval = TRUE;
- break;
-
- case GDK_BUTTON_RELEASE:
- if (priv->select_pending) {
- icon->selected = priv->select_pending_was_selected;
- do_select_many (eil, icon, idx, &priv->select_pending_event, FALSE);
- priv->select_pending = FALSE;
- retval = TRUE;
- }
-
- if (priv->edit_pending) {
- gnome_icon_text_item_start_editing (text);
- priv->edit_pending = FALSE;
- retval = TRUE;
- }
-#if 0
- if (priv->select_pending) {
- icon->selected = priv->select_pending_was_selected;
- do_select_many (eil, icon, idx, &priv->select_pending_event);
- priv->select_pending = FALSE;
- retval = TRUE;
- } else if (priv->edit_pending) {
- gnome_icon_text_item_start_editing (text);
- priv->edit_pending = FALSE;
- retval = TRUE;
- }
-#endif
-
- break;
-
- default:
- break;
- }
-
- /* If the click was on the text and we actually did something, stop the
- * icon text item's own handler from executing.
- */
- if (on_text && retval)
- gtk_signal_emit_stop_by_name (GTK_OBJECT (text), "event");
-
- gtk_object_unref (GTK_OBJECT (text));
-
- return retval;
-}
-
-/* Event handler for icons in the icon list */
-static gint
-icon_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
-{
- Icon *icon;
- Eil *eil;
- EIconListPrivate *priv;
- int idx;
- int on_text;
-
- icon = data;
- eil = EIL (item->canvas);
- priv = eil->_priv;
- idx = eil_icon_to_index (eil, icon);
- on_text = item == GNOME_CANVAS_ITEM (icon->text);
-
- switch (priv->selection_mode) {
- case GTK_SELECTION_SINGLE:
- case GTK_SELECTION_BROWSE:
- return selection_one_icon_event (eil, icon, idx, on_text, event);
-
- case GTK_SELECTION_MULTIPLE:
- case GTK_SELECTION_EXTENDED:
- return selection_many_icon_event (eil, icon, idx, on_text, event);
-
- default:
- g_assert_not_reached ();
- return FALSE; /* Shut up the compiler */
- }
-}
-
-/* Handler for the editing_started signal of an icon text item. We block the
- * event handler so that it will not be called while the text is being edited.
- */
-static void
-editing_started (GnomeIconTextItem *iti, gpointer data)
-{
- Icon *icon;
-
- icon = data;
- gtk_signal_handler_block (GTK_OBJECT (iti), icon->text_event_id);
- eil_unselect_all (EIL (GNOME_CANVAS_ITEM (iti)->canvas), NULL, icon);
-}
-
-/* Handler for the editing_stopped signal of an icon text item. We unblock the
- * event handler so that we can get events from it again.
- */
-static void
-editing_stopped (GnomeIconTextItem *iti, gpointer data)
-{
- Icon *icon;
-
- icon = data;
- gtk_signal_handler_unblock (GTK_OBJECT (iti), icon->text_event_id);
-}
-
-static gboolean
-text_changed (GnomeCanvasItem *item, Icon *icon)
-{
- Eil *eil;
- gboolean accept;
- int idx;
-
- eil = EIL (item->canvas);
- accept = TRUE;
-
- idx = eil_icon_to_index (eil, icon);
- gtk_signal_emit (GTK_OBJECT (eil),
- eil_signals[TEXT_CHANGED],
- idx, gnome_icon_text_item_get_text (icon->text),
- &accept);
-
- return accept;
-}
-
-static void
-height_changed (GnomeCanvasItem *item, Icon *icon)
-{
- Eil *eil;
- EIconListPrivate *priv;
- int n;
-
- eil = EIL (item->canvas);
- priv = eil->_priv;
-
- if (!GTK_WIDGET_REALIZED (eil))
- return;
-
- if (priv->frozen) {
- priv->dirty = TRUE;
- return;
- }
-
- n = eil_icon_to_index (eil, icon);
- eil_layout_from_line (eil, n / eil_get_items_per_line (eil));
- eil_scrollbar_adjust (eil);
-}
-
-static Icon *
-icon_new_from_pixbuf (EIconList *eil, GdkPixbuf *im,
- const char *icon_filename, const char *text)
-{
- EIconListPrivate *priv;
- GnomeCanvas *canvas;
- GnomeCanvasGroup *group;
- Icon *icon;
-
- priv = eil->_priv;
- canvas = GNOME_CANVAS (eil);
- group = GNOME_CANVAS_GROUP (canvas->root);
-
- icon = g_new0 (Icon, 1);
-
- if (icon_filename)
- icon->icon_filename = g_strdup (icon_filename);
- else
- icon->icon_filename = NULL;
-
- if (im == NULL)
- im = gdk_pixbuf_new_from_xpm_data ((const char**) bad_icon_xpm);
- else
- gdk_pixbuf_ref (im);
-
- icon->image = GNOME_CANVAS_PIXBUF (gnome_canvas_item_new (
- group,
- gnome_canvas_pixbuf_get_type (),
- "x", 0.0,
- "y", 0.0,
- "width", (double) gdk_pixbuf_get_width (im),
- "height", (double) gdk_pixbuf_get_height (im),
- "pixbuf", im,
- NULL));
- gdk_pixbuf_unref (im);
-
- icon->text = GNOME_ICON_TEXT_ITEM (gnome_canvas_item_new (
- group,
- gnome_icon_text_item_get_type (),
- NULL));
-
- gnome_canvas_item_set (GNOME_CANVAS_ITEM (icon->text),
- "use_broken_event_handling", FALSE,
- NULL);
-
- /* FIXME: should this use a selectable font?? */
-#warning "Ettore: should we allow this font to be selectable??"
- gnome_icon_text_item_configure (icon->text,
- 0, 0, priv->icon_width,
- "-adobe-helvetica-medium-r-normal-*-*-120-*-*-p-*-iso8859-1",
- text, priv->is_editable, priv->static_text);
-
- gtk_signal_connect (GTK_OBJECT (icon->image), "event",
- GTK_SIGNAL_FUNC (icon_event),
- icon);
- icon->text_event_id = gtk_signal_connect (GTK_OBJECT (icon->text), "event",
- GTK_SIGNAL_FUNC (icon_event),
- icon);
-
- gtk_signal_connect (GTK_OBJECT (icon->text), "editing_started",
- GTK_SIGNAL_FUNC (editing_started),
- icon);
- gtk_signal_connect (GTK_OBJECT (icon->text), "editing_stopped",
- GTK_SIGNAL_FUNC (editing_stopped),
- icon);
-
- gtk_signal_connect (GTK_OBJECT (icon->text), "text_changed",
- GTK_SIGNAL_FUNC (text_changed),
- icon);
- gtk_signal_connect (GTK_OBJECT (icon->text), "height_changed",
- GTK_SIGNAL_FUNC (height_changed),
- icon);
-
- return icon;
-}
-
-static Icon *
-icon_new (Eil *eil, const char *icon_filename, const char *text)
-{
- GdkPixbuf *im;
- Icon *retval;
-
- if (icon_filename) {
- im = gdk_pixbuf_new_from_file (icon_filename);
-
- /* Bad icon image
- Fixme. Need a better graphic. */
- if (im == NULL)
- im = gdk_pixbuf_new_from_xpm_data ((const char**) bad_icon_xpm);
- } else
- im = NULL;
-
- retval = icon_new_from_pixbuf (eil, im, icon_filename, text);
-
- if(im)
- gdk_pixbuf_unref(im);
-
- return retval;
-}
-
-static int
-icon_list_append (Eil *eil, Icon *icon)
-{
- EIconListPrivate *priv;
- int pos;
-
- priv = eil->_priv;
-
- pos = priv->icons++;
- g_array_append_val(priv->icon_list, icon);
-
- switch (priv->selection_mode) {
- case GTK_SELECTION_BROWSE:
- e_icon_list_select_icon (eil, 0);
- break;
-
- default:
- break;
- }
-
- if (!priv->frozen) {
- /* FIXME: this should only layout the last line */
- eil_layout_all_icons (eil);
- eil_scrollbar_adjust (eil);
- } else
- priv->dirty = TRUE;
-
- return priv->icons - 1;
-}
-
-static void
-icon_list_insert (Eil *eil, int pos, Icon *icon)
-{
- EIconListPrivate *priv;
-
- priv = eil->_priv;
-
- if (pos == priv->icons) {
- icon_list_append (eil, icon);
- return;
- }
-
- g_array_insert_val(priv->icon_list, pos, icon);
- priv->icons++;
-
- switch (priv->selection_mode) {
- case GTK_SELECTION_BROWSE:
- e_icon_list_select_icon (eil, 0);
- break;
-
- default:
- break;
- }
-
- if (!priv->frozen) {
- /* FIXME: this should only layout the lines from then one
- * containing the Icon to the end.
- */
- eil_layout_all_icons (eil);
- eil_scrollbar_adjust (eil);
- } else
- priv->dirty = TRUE;
-
- sync_selection (eil, pos, SYNC_INSERT);
-}
-
-/**
- * e_icon_list_insert_pixbuf:
- * @eil: An icon list.
- * @pos: Position at which the new icon should be inserted.
- * @im: Pixbuf image with the icon image.
- * @filename: Filename of the image file.
- * @text: Text to be used for the icon's caption.
- *
- * Inserts an icon in the specified icon list. The icon is created from the
- * specified Imlib image, and it is inserted at the @pos index.
- */
-void
-e_icon_list_insert_pixbuf (EIconList *eil, int pos, GdkPixbuf *im,
- const char *icon_filename, const char *text)
-{
- Icon *icon;
-
- g_return_if_fail (eil != NULL);
- g_return_if_fail (IS_EIL (eil));
-
- icon = icon_new_from_pixbuf (eil, im, icon_filename, text);
- icon_list_insert (eil, pos, icon);
- return;
-}
-
-/**
- * e_icon_list_insert:
- * @eil: An icon list.
- * @pos: Position at which the new icon should be inserted.
- * @icon_filename: Name of the file that holds the icon's image.
- * @text: Text to be used for the icon's caption.
- *
- * Inserts an icon in the specified icon list. The icon's image is loaded
- * from the specified file, and it is inserted at the @pos index.
- */
-void
-e_icon_list_insert (EIconList *eil, int pos, const char *icon_filename, const char *text)
-{
- Icon *icon;
-
- g_return_if_fail (eil != NULL);
- g_return_if_fail (IS_EIL (eil));
-
- icon = icon_new (eil, icon_filename, text);
- icon_list_insert (eil, pos, icon);
- return;
-}
-
-/**
- * e_icon_list_append_pixbuf:
- * @eil: An icon list.
- * @im: Pixbuf image with the icon image.
- * @filename: Filename of the image file.
- * @text: Text to be used for the icon's caption.
- *
- * Appends an icon to the specified icon list. The icon is created from
- * the specified Imlib image.
- */
-int
-e_icon_list_append_pixbuf (EIconList *eil, GdkPixbuf *im,
- const char *icon_filename, const char *text)
-{
- Icon *icon;
-
- g_return_val_if_fail (eil != NULL, -1);
- g_return_val_if_fail (IS_EIL (eil), -1);
-
- icon = icon_new_from_pixbuf (eil, im, icon_filename, text);
- return icon_list_append (eil, icon);
-}
-
-/**
- * e_icon_list_append:
- * @eil: An icon list.
- * @icon_filename: Name of the file that holds the icon's image.
- * @text: Text to be used for the icon's caption.
- *
- * Appends an icon to the specified icon list. The icon's image is loaded from
- * the specified file, and it is inserted at the @pos index.
- */
-int
-e_icon_list_append (EIconList *eil, const char *icon_filename,
- const char *text)
-{
- Icon *icon;
-
- g_return_val_if_fail (eil != NULL, -1);
- g_return_val_if_fail (IS_EIL (eil), -1);
-
- icon = icon_new (eil, icon_filename, text);
- return icon_list_append (eil, icon);
-}
-
-static void
-icon_destroy (Icon *icon)
-{
- if (icon->destroy)
- (* icon->destroy) (icon->data);
-
- g_free (icon->icon_filename);
-
- gtk_object_destroy (GTK_OBJECT (icon->image));
- gtk_object_destroy (GTK_OBJECT (icon->text));
- g_free (icon);
-}
-
-/**
- * e_icon_list_remove:
- * @eil: An icon list.
- * @pos: Index of the icon that should be removed.
- *
- * Removes the icon at index position @pos. If a destroy handler was specified
- * for that icon, it will be called with the appropriate data.
- */
-void
-e_icon_list_remove (EIconList *eil, int pos)
-{
- EIconListPrivate *priv;
- int was_selected;
- Icon *icon;
-
- g_return_if_fail (eil != NULL);
- g_return_if_fail (IS_EIL (eil));
- g_return_if_fail (pos >= 0 && pos < eil->_priv->icons);
-
- priv = eil->_priv;
-
- was_selected = FALSE;
-
- icon = g_array_index(priv->icon_list, Icon*, pos);
-
- if (icon->selected) {
- was_selected = TRUE;
-
- switch (priv->selection_mode) {
- case GTK_SELECTION_SINGLE:
- case GTK_SELECTION_BROWSE:
- case GTK_SELECTION_MULTIPLE:
- case GTK_SELECTION_EXTENDED:
- e_icon_list_unselect_icon (eil, pos);
- break;
-
- default:
- break;
- }
- }
-
- g_array_remove_index(priv->icon_list, pos);
- priv->icons--;
-
- sync_selection (eil, pos, SYNC_REMOVE);
-
- if (was_selected) {
- switch (priv->selection_mode) {
- case GTK_SELECTION_BROWSE:
- if (pos == priv->icons)
- e_icon_list_select_icon (eil, pos - 1);
- else
- e_icon_list_select_icon (eil, pos);
-
- break;
-
- default:
- break;
- }
- }
-
- if (priv->icons >= priv->last_selected_idx)
- priv->last_selected_idx = -1;
-
- if (priv->last_selected_icon == icon)
- priv->last_selected_icon = NULL;
-
- icon_destroy (icon);
-
- if (!priv->frozen) {
- /* FIXME: Optimize, only re-layout from pos to end */
- eil_layout_all_icons (eil);
- eil_scrollbar_adjust (eil);
- } else
- priv->dirty = TRUE;
-}
-
-/**
- * e_icon_list_clear:
- * @eil: An icon list.
- *
- * Clears the contents for the icon list by removing all the icons. If destroy
- * handlers were specified for any of the icons, they will be called with the
- * appropriate data.
- */
-void
-e_icon_list_clear (EIconList *eil)
-{
- EIconListPrivate *priv;
- int i;
-
- g_return_if_fail (eil != NULL);
- g_return_if_fail (IS_EIL (eil));
-
- priv = eil->_priv;
-
- for (i = 0; i < priv->icon_list->len; i++)
- icon_destroy (g_array_index (priv->icon_list, Icon*, i));
-
- eil_free_line_info (eil);
-
- g_list_free (priv->selection);
- priv->selection = NULL;
- g_array_set_size(priv->icon_list, 0);
- priv->icons = 0;
- priv->last_selected_idx = -1;
- priv->last_selected_icon = NULL;
-
- if (!priv->frozen) {
- eil_layout_all_icons (eil);
- eil_scrollbar_adjust (eil);
- } else
- priv->dirty = TRUE;
-}
-
-static void
-eil_destroy (GtkObject *object)
-{
- Eil *eil;
-
- /* remember, destroy can be run multiple times! */
-
- eil = EIL (object);
-
- g_free (eil->_priv->separators);
- eil->_priv->separators = NULL;
-
- eil->_priv->frozen = 1;
- eil->_priv->dirty = TRUE;
- if(eil->_priv->icon_list) {
- e_icon_list_clear (eil);
- g_array_free(eil->_priv->icon_list, TRUE);
- }
- eil->_priv->icon_list = NULL;
-
- if (eil->_priv->timer_tag != 0) {
- gtk_timeout_remove (eil->_priv->timer_tag);
- eil->_priv->timer_tag = 0;
- }
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (*GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-static void
-eil_finalize (GtkObject *object)
-{
- Eil *eil;
-
- eil = EIL (object);
-
- g_free (eil->_priv);
- eil->_priv = NULL;
-
- if (GTK_OBJECT_CLASS (parent_class)->finalize)
- (*GTK_OBJECT_CLASS (parent_class)->finalize) (object);
-}
-
-
-static void
-select_icon (Eil *eil, int pos, GdkEvent *event)
-{
- EIconListPrivate *priv;
- gint i;
- Icon *icon;
-
- priv = eil->_priv;
-
- switch (priv->selection_mode) {
- case GTK_SELECTION_SINGLE:
- case GTK_SELECTION_BROWSE:
- i = 0;
-
- for (i = 0; i < priv->icon_list->len; i++) {
- icon = g_array_index (priv->icon_list, Icon*, i);
-
- if (i != pos && icon->selected)
- emit_select (eil, FALSE, i, event);
- }
-
- emit_select (eil, TRUE, pos, event);
- break;
-
- case GTK_SELECTION_MULTIPLE:
- case GTK_SELECTION_EXTENDED:
- emit_select (eil, TRUE, pos, event);
- break;
-
- default:
- break;
- }
-}
-
-/**
- * e_icon_list_select_icon:
- * @eil: An icon list.
- * @pos: Index of the icon to be selected.
- *
- * Selects the icon at the index specified by @pos.
- */
-void
-e_icon_list_select_icon (EIconList *eil, int pos)
-{
- g_return_if_fail (eil != NULL);
- g_return_if_fail (IS_EIL (eil));
- g_return_if_fail (pos >= 0 && pos < eil->_priv->icons);
-
- select_icon (eil, pos, NULL);
-}
-
-static void
-unselect_icon (Eil *eil, int pos, GdkEvent *event)
-{
- EIconListPrivate *priv;
-
- priv = eil->_priv;
-
- switch (priv->selection_mode) {
- case GTK_SELECTION_SINGLE:
- case GTK_SELECTION_BROWSE:
- case GTK_SELECTION_MULTIPLE:
- case GTK_SELECTION_EXTENDED:
- emit_select (eil, FALSE, pos, event);
- break;
-
- default:
- break;
- }
-}
-
-/**
- * e_icon_list_unselect_icon:
- * @eil: An icon list.
- * @pos: Index of the icon to be unselected.
- *
- * Unselects the icon at the index specified by @pos.
- */
-void
-e_icon_list_unselect_icon (EIconList *eil, int pos)
-{
- g_return_if_fail (eil != NULL);
- g_return_if_fail (IS_EIL (eil));
- g_return_if_fail (pos >= 0 && pos < eil->_priv->icons);
-
- unselect_icon (eil, pos, NULL);
-}
-
-static void
-eil_size_request (GtkWidget *widget, GtkRequisition *requisition)
-{
- requisition->width = 1;
- requisition->height = 1;
-}
-
-static void
-eil_size_allocate (GtkWidget *widget, GtkAllocation *allocation)
-{
- Eil *eil;
- EIconListPrivate *priv;
-
- eil = EIL (widget);
- priv = eil->_priv;
-
- if (GTK_WIDGET_CLASS (parent_class)->size_allocate)
- (* GTK_WIDGET_CLASS (parent_class)->size_allocate) (widget, allocation);
-
- if (priv->frozen)
- return;
-
- eil_layout_all_icons (eil);
-}
-
-static void
-eil_realize (GtkWidget *widget)
-{
- Eil *eil;
- EIconListPrivate *priv;
- GtkStyle *style;
-
- eil = EIL (widget);
- priv = eil->_priv;
-
- priv->frozen++;
-
- if (GTK_WIDGET_CLASS (parent_class)->realize)
- (* GTK_WIDGET_CLASS (parent_class)->realize) (widget);
-
- priv->frozen--;
-
- /* Change the style to use the base color as the background */
-
- style = gtk_style_copy (gtk_widget_get_style (widget));
- style->bg[GTK_STATE_NORMAL] = style->base[GTK_STATE_NORMAL];
- gtk_widget_set_style (widget, style);
-
- gdk_window_set_background (GTK_LAYOUT (eil)->bin_window,
- &widget->style->bg[GTK_STATE_NORMAL]);
-
- if (priv->frozen)
- return;
-
- if (priv->dirty) {
- eil_layout_all_icons (eil);
- eil_scrollbar_adjust (eil);
- }
-}
-
-static void
-real_select_icon (Eil *eil, gint num, GdkEvent *event)
-{
- EIconListPrivate *priv;
- Icon *icon;
-
- g_return_if_fail (eil != NULL);
- g_return_if_fail (IS_EIL (eil));
- g_return_if_fail (num >= 0 && num < eil->_priv->icons);
-
- priv = eil->_priv;
-
- icon = g_array_index (priv->icon_list, Icon*, num);
-
- if (icon->selected)
- return;
-
- icon->selected = TRUE;
- gnome_icon_text_item_select (icon->text, TRUE);
- priv->selection = g_list_append (priv->selection, GINT_TO_POINTER (num));
-}
-
-static void
-real_unselect_icon (Eil *eil, gint num, GdkEvent *event)
-{
- EIconListPrivate *priv;
- Icon *icon;
-
- g_return_if_fail (eil != NULL);
- g_return_if_fail (IS_EIL (eil));
- g_return_if_fail (num >= 0 && num < eil->_priv->icons);
-
- priv = eil->_priv;
-
- icon = g_array_index (priv->icon_list, Icon*, num);
-
- if (!icon->selected)
- return;
-
- icon->selected = FALSE;
- gnome_icon_text_item_select (icon->text, FALSE);
- priv->selection = g_list_remove (priv->selection, GINT_TO_POINTER (num));
-}
-
-/* Saves the selection of the icon list to temporary storage */
-static void
-store_temp_selection (Eil *eil)
-{
- EIconListPrivate *priv;
- int i;
- Icon *icon;
-
- priv = eil->_priv;
-
- for (i = 0; i < priv->icon_list->len; i++) {
- icon = g_array_index(priv->icon_list, Icon*, i);
-
- icon->tmp_selected = icon->selected;
- }
-}
-
-#define gray50_width 2
-#define gray50_height 2
-static const char gray50_bits[] = {
- 0x02, 0x01, };
-
-/* Button press handler for the icon list */
-static gint
-eil_button_press (GtkWidget *widget, GdkEventButton *event)
-{
- Eil *eil;
- EIconListPrivate *priv;
- int only_one;
- GdkBitmap *stipple;
- double tx, ty;
-
- eil = EIL (widget);
- priv = eil->_priv;
-
- /* Invoke the canvas event handler and see if an item picks up the event */
-
- if ((* GTK_WIDGET_CLASS (parent_class)->button_press_event) (widget, event))
- return TRUE;
-
- if (!(event->type == GDK_BUTTON_PRESS
- && event->button == 1
- && priv->selection_mode != GTK_SELECTION_BROWSE))
- return FALSE;
-
- only_one = priv->selection_mode == GTK_SELECTION_SINGLE;
-
- if (only_one || (event->state & (GDK_SHIFT_MASK | GDK_CONTROL_MASK)) == 0)
- eil_unselect_all (eil, NULL, NULL);
-
- if (only_one)
- return TRUE;
-
- if (priv->selecting)
- return FALSE;
-
- gnome_canvas_window_to_world (GNOME_CANVAS (eil), event->x, event->y, &tx, &ty);
- priv->sel_start_x = tx;
- priv->sel_start_y = ty;
- priv->sel_state = event->state;
- priv->selecting = TRUE;
-
- store_temp_selection (eil);
-
- stipple = gdk_bitmap_create_from_data (NULL, gray50_bits, gray50_width, gray50_height);
- priv->sel_rect = gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS (eil)),
- gnome_canvas_rect_get_type (),
- "x1", tx,
- "y1", ty,
- "x2", tx,
- "y2", ty,
- "outline_color", "black",
- "width_pixels", 1,
- "outline_stipple", stipple,
- NULL);
- gdk_bitmap_unref (stipple);
-
- gnome_canvas_item_grab (priv->sel_rect, GDK_POINTER_MOTION_MASK | GDK_BUTTON_RELEASE_MASK,
- NULL, event->time);
-
- return TRUE;
-}
-
-/* Returns whether the specified icon is at least partially inside the specified
- * rectangle.
- */
-static int
-icon_is_in_area (Icon *icon, int x1, int y1, int x2, int y2)
-{
- double ix1, iy1, ix2, iy2;
-
- if (x1 == x2 && y1 == y2)
- return FALSE;
-
- gnome_canvas_item_get_bounds (GNOME_CANVAS_ITEM (icon->image), &ix1, &iy1, &ix2, &iy2);
-
- if (ix1 <= x2 && iy1 <= y2 && ix2 >= x1 && iy2 >= y1)
- return TRUE;
-
- gnome_canvas_item_get_bounds (GNOME_CANVAS_ITEM (icon->text), &ix1, &iy1, &ix2, &iy2);
-
- if (ix1 <= x2 && iy1 <= y2 && ix2 >= x1 && iy2 >= y1)
- return TRUE;
-
- return FALSE;
-}
-
-/* Updates the rubberband selection to the specified point */
-static void
-update_drag_selection (Eil *eil, int x, int y)
-{
- EIconListPrivate *priv;
- int x1, x2, y1, y2;
- int i;
- Icon *icon;
- int additive, invert;
-
- priv = eil->_priv;
-
- /* Update rubberband */
-
- if (priv->sel_start_x < x) {
- x1 = priv->sel_start_x;
- x2 = x;
- } else {
- x1 = x;
- x2 = priv->sel_start_x;
- }
-
- if (priv->sel_start_y < y) {
- y1 = priv->sel_start_y;
- y2 = y;
- } else {
- y1 = y;
- y2 = priv->sel_start_y;
- }
-
- if (x1 < 0)
- x1 = 0;
-
- if (y1 < 0)
- y1 = 0;
-
- if (x2 >= GTK_WIDGET (eil)->allocation.width)
- x2 = GTK_WIDGET (eil)->allocation.width - 1;
-
- if (y2 >= priv->total_height)
- y2 = priv->total_height - 1;
-
- gnome_canvas_item_set (priv->sel_rect,
- "x1", (double) x1,
- "y1", (double) y1,
- "x2", (double) x2,
- "y2", (double) y2,
- NULL);
-
- /* Select or unselect icons as appropriate */
-
- additive = priv->sel_state & GDK_SHIFT_MASK;
- invert = priv->sel_state & GDK_CONTROL_MASK;
-
- for (i = 0; i < priv->icon_list->len; i++) {
- icon = g_array_index(priv->icon_list, Icon*, i);
-
- if (icon_is_in_area (icon, x1, y1, x2, y2)) {
- if (invert) {
- if (icon->selected == icon->tmp_selected)
- emit_select (eil, !icon->selected, i, NULL);
- } else if (additive) {
- if (!icon->selected)
- emit_select (eil, TRUE, i, NULL);
- } else {
- if (!icon->selected)
- emit_select (eil, TRUE, i, NULL);
- }
- } else if (icon->selected != icon->tmp_selected)
- emit_select (eil, icon->tmp_selected, i, NULL);
- }
-}
-
-/* Button release handler for the icon list */
-static gint
-eil_button_release (GtkWidget *widget, GdkEventButton *event)
-{
- Eil *eil;
- EIconListPrivate *priv;
- double x, y;
-
- eil = EIL (widget);
- priv = eil->_priv;
-
- if (!priv->selecting)
- return (* GTK_WIDGET_CLASS (parent_class)->button_release_event) (widget, event);
-
- if (event->button != 1)
- return FALSE;
-
- gnome_canvas_window_to_world (GNOME_CANVAS (eil), event->x, event->y, &x, &y);
- update_drag_selection (eil, x, y);
- gnome_canvas_item_ungrab (priv->sel_rect, event->time);
-
- gtk_object_destroy (GTK_OBJECT (priv->sel_rect));
- priv->sel_rect = NULL;
- priv->selecting = FALSE;
-
- if (priv->timer_tag != 0) {
- gtk_timeout_remove (priv->timer_tag);
- priv->timer_tag = 0;
- }
-
- return TRUE;
-}
-
-/* Autoscroll timeout handler for the icon list */
-static gint
-scroll_timeout (gpointer data)
-{
- Eil *eil;
- EIconListPrivate *priv;
- GtkAdjustment *adj;
- double x, y;
- int value;
-
- eil = data;
- priv = eil->_priv;
-
- GDK_THREADS_ENTER ();
-
- adj = gtk_layout_get_vadjustment (GTK_LAYOUT (eil));
-
- value = adj->value + priv->value_diff;
- if (value > adj->upper - adj->page_size)
- value = adj->upper - adj->page_size;
-
- gtk_adjustment_set_value (adj, value);
-
- gnome_canvas_window_to_world (GNOME_CANVAS (eil),
- priv->event_last_x, priv->event_last_y,
- &x, &y);
- update_drag_selection (eil, x, y);
-
- GDK_THREADS_LEAVE();
-
- return TRUE;
-}
-
-/* Motion event handler for the icon list */
-static gint
-eil_motion_notify (GtkWidget *widget, GdkEventMotion *event)
-{
- Eil *eil;
- EIconListPrivate *priv;
- double x, y;
-
- eil = EIL (widget);
- priv = eil->_priv;
-
- if (!priv->selecting)
- return (* GTK_WIDGET_CLASS (parent_class)->motion_notify_event) (widget, event);
-
- gnome_canvas_window_to_world (GNOME_CANVAS (eil), event->x, event->y, &x, &y);
- update_drag_selection (eil, x, y);
-
- /* If we are out of bounds, schedule a timeout that will do the scrolling */
-
- if (event->y < 0 || event->y > widget->allocation.height) {
- if (priv->timer_tag == 0)
- priv->timer_tag = gtk_timeout_add (SCROLL_TIMEOUT, scroll_timeout, eil);
-
- if (event->y < 0)
- priv->value_diff = event->y;
- else
- priv->value_diff = event->y - widget->allocation.height;
-
- priv->event_last_x = event->x;
- priv->event_last_y = event->y;
-
- /* Make the steppings be relative to the mouse distance from the
- * canvas. Also notice the timeout above is small to give a
- * more smooth movement.
- */
- priv->value_diff /= 5;
- } else if (priv->timer_tag != 0) {
- gtk_timeout_remove (priv->timer_tag);
- priv->timer_tag = 0;
- }
-
- return TRUE;
-}
-
-typedef gboolean (*xGtkSignal_BOOL__INT_POINTER) (GtkObject * object,
- gint arg1,
- gpointer arg2,
- gpointer user_data);
-static void
-xgtk_marshal_BOOL__INT_POINTER (GtkObject *object, GtkSignalFunc func, gpointer func_data,
- GtkArg *args)
-{
- xGtkSignal_BOOL__INT_POINTER rfunc;
- gboolean *return_val;
-
- return_val = GTK_RETLOC_BOOL (args[2]);
- rfunc = (xGtkSignal_BOOL__INT_POINTER) func;
- *return_val = (*rfunc) (object,
- GTK_VALUE_INT (args[0]),
- GTK_VALUE_POINTER (args[1]),
- func_data);
-}
-
-static void
-eil_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
-{
- EIconList *eil;
-
- eil = E_ICON_LIST (object);
-
- switch (arg_id) {
- default:
- break;
- }
-}
-
-static void
-eil_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
-{
- EIconList *eil;
- EIconListPrivate *priv;
-
- eil = E_ICON_LIST (object);
- priv = eil->_priv;
-
- switch (arg_id) {
- default:
- arg->type = GTK_TYPE_INVALID;
- break;
- }
-}
-
-static void
-eil_class_init (EilClass *eil_class)
-{
- GtkObjectClass *object_class;
- GtkWidgetClass *widget_class;
- GtkLayoutClass *layout_class;
- GnomeCanvasClass *canvas_class;
-
- object_class = (GtkObjectClass *) eil_class;
- widget_class = (GtkWidgetClass *) eil_class;
- layout_class = (GtkLayoutClass *) eil_class;
- canvas_class = (GnomeCanvasClass *) eil_class;
-
- parent_class = gtk_type_class (gnome_canvas_get_type ());
-
- eil_signals[SELECT_ICON] =
- gtk_signal_new (
- "select_icon",
- GTK_RUN_FIRST,
- object_class->type,
- GTK_SIGNAL_OFFSET (EIconListClass, select_icon),
- gtk_marshal_NONE__INT_POINTER,
- GTK_TYPE_NONE, 2,
- GTK_TYPE_INT,
- GTK_TYPE_GDK_EVENT);
-
- eil_signals[UNSELECT_ICON] =
- gtk_signal_new (
- "unselect_icon",
- GTK_RUN_FIRST,
- object_class->type,
- GTK_SIGNAL_OFFSET (EIconListClass, unselect_icon),
- gtk_marshal_NONE__INT_POINTER,
- GTK_TYPE_NONE, 2,
- GTK_TYPE_INT,
- GTK_TYPE_GDK_EVENT);
-
- eil_signals[TEXT_CHANGED] =
- gtk_signal_new (
- "text_changed",
- GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (EIconListClass, text_changed),
- xgtk_marshal_BOOL__INT_POINTER,
- GTK_TYPE_BOOL, 2,
- GTK_TYPE_INT,
- GTK_TYPE_POINTER);
-
- gtk_object_class_add_signals (object_class, eil_signals, LAST_SIGNAL);
-
- object_class->destroy = eil_destroy;
- object_class->finalize = eil_finalize;
- object_class->set_arg = eil_set_arg;
- object_class->get_arg = eil_get_arg;
-
- widget_class->size_request = eil_size_request;
- widget_class->size_allocate = eil_size_allocate;
- widget_class->realize = eil_realize;
- widget_class->button_press_event = eil_button_press;
- widget_class->button_release_event = eil_button_release;
- widget_class->motion_notify_event = eil_motion_notify;
-
- eil_class->select_icon = real_select_icon;
- eil_class->unselect_icon = real_unselect_icon;
-}
-
-static void
-eil_init (Eil *eil)
-{
- eil->_priv = g_new0 (EIconListPrivate, 1);
-
- eil->_priv->icon_list = g_array_new(FALSE, FALSE, sizeof(gpointer));
- eil->_priv->row_spacing = DEFAULT_ROW_SPACING;
- eil->_priv->col_spacing = DEFAULT_COL_SPACING;
- eil->_priv->text_spacing = DEFAULT_TEXT_SPACING;
- eil->_priv->icon_border = DEFAULT_ICON_BORDER;
- eil->_priv->separators = g_strdup (" ");
-
- eil->_priv->selection_mode = GTK_SELECTION_SINGLE;
- eil->_priv->dirty = TRUE;
-
- gnome_canvas_set_scroll_region (GNOME_CANVAS (eil), 0.0, 0.0, 1000000.0, 1000000.0);
- gnome_canvas_scroll_to (GNOME_CANVAS (eil), 0, 0);
-}
-
-/**
- * e_icon_list_get_type:
- *
- * Registers the &EIconList class if necessary, and returns the type ID
- * associated to it.
- *
- * Returns: The type ID of the &EIconList class.
- */
-guint
-e_icon_list_get_type (void)
-{
- static guint eil_type = 0;
-
- if (!eil_type) {
- GtkTypeInfo eil_info = {
- "EIconList",
- sizeof (EIconList),
- sizeof (EIconListClass),
- (GtkClassInitFunc) eil_class_init,
- (GtkObjectInitFunc) eil_init,
- NULL,
- NULL,
- NULL
- };
-
- eil_type = gtk_type_unique (gnome_canvas_get_type (),
- &eil_info);
- }
-
- return eil_type;
-}
-
-/**
- * e_icon_list_set_icon_width:
- * @eil: An icon list.
- * @w: New width for the icon columns.
- *
- * Sets the amount of horizontal space allocated to the icons, i.e. the column
- * width of the icon list.
- */
-void
-e_icon_list_set_icon_width (EIconList *eil, int w)
-{
- EIconListPrivate *priv;
-
- g_return_if_fail (eil != NULL);
- g_return_if_fail (IS_EIL (eil));
-
- priv = eil->_priv;
-
- priv->icon_width = w;
-
- if (priv->frozen) {
- priv->dirty = TRUE;
- return;
- }
-
- eil_layout_all_icons (eil);
- eil_scrollbar_adjust (eil);
-}
-
-
-/**
- * e_icon_list_construct:
- * @eil: An icon list.
- * @icon_width: Width for the icon columns.
- * @flags: A combination of %E_ICON_LIST_IS_EDITABLE and %E_ICON_LIST_STATIC_TEXT.
- *
- * Constructor for the icon list, to be used by derived classes.
- **/
-void
-e_icon_list_construct (EIconList *eil, guint icon_width, int flags)
-{
- EIconListPrivate *priv;
-
- g_return_if_fail (eil != NULL);
- g_return_if_fail (IS_EIL (eil));
-
- priv = eil->_priv;
-
- e_icon_list_set_icon_width (eil, icon_width);
- priv->is_editable = (flags & E_ICON_LIST_IS_EDITABLE) != 0;
- priv->static_text = (flags & E_ICON_LIST_STATIC_TEXT) != 0;
-}
-
-
-/**
- * e_icon_list_new: [constructor]
- * @icon_width: Width for the icon columns.
- * @flags: A combination of %E_ICON_LIST_IS_EDITABLE and %E_ICON_LIST_STATIC_TEXT.
- *
- * Creates a new icon list widget. The icon columns are allocated a width of
- * @icon_width pixels. Icon captions will be word-wrapped to this width as
- * well.
- *
- * If @flags has the %E_ICON_LIST_IS_EDITABLE flag set, then the user will be
- * able to edit the text in the icon captions, and the "text_changed" signal
- * will be emitted when an icon's text is changed.
- *
- * If @flags has the %E_ICON_LIST_STATIC_TEXT flags set, then the text
- * for the icon captions will not be copied inside the icon list; it will only
- * store the pointers to the original text strings specified by the application.
- * This is intended to save memory. If this flag is not set, then the text
- * strings will be copied and managed internally.
- *
- * Returns: a newly-created icon list widget
- */
-GtkWidget *
-e_icon_list_new (guint icon_width, int flags)
-{
- Eil *eil;
-
- gtk_widget_push_colormap (gdk_rgb_get_cmap ());
- eil = EIL (gtk_type_new (e_icon_list_get_type ()));
- gtk_widget_pop_colormap ();
-
- e_icon_list_construct (eil, icon_width, flags);
-
- return GTK_WIDGET (eil);
-}
-
-
-/**
- * e_icon_list_freeze:
- * @eil: An icon list.
- *
- * Freezes an icon list so that any changes made to it will not be
- * reflected on the screen until it is thawed with e_icon_list_thaw().
- * It is recommended to freeze the icon list before inserting or deleting
- * many icons, for example, so that the layout process will only be executed
- * once, when the icon list is finally thawed.
- *
- * You can call this function multiple times, but it must be balanced with the
- * same number of calls to e_icon_list_thaw() before the changes will take
- * effect.
- */
-void
-e_icon_list_freeze (EIconList *eil)
-{
- g_return_if_fail (eil != NULL);
- g_return_if_fail (IS_EIL (eil));
-
- eil->_priv->frozen++;
-
- /* We hide the root so that the user will not see any changes while the
- * icon list is doing stuff.
- */
-
- if (eil->_priv->frozen == 1)
- gnome_canvas_item_hide (GNOME_CANVAS (eil)->root);
-}
-
-/**
- * e_icon_list_thaw:
- * @eil: An icon list.
- *
- * Thaws the icon list and performs any pending layout operations. This
- * is to be used in conjunction with e_icon_list_freeze().
- */
-void
-e_icon_list_thaw (EIconList *eil)
-{
- g_return_if_fail (eil != NULL);
- g_return_if_fail (IS_EIL (eil));
- g_return_if_fail (eil->_priv->frozen > 0);
-
- eil->_priv->frozen--;
-
- if (eil->_priv->dirty) {
- eil_layout_all_icons (eil);
- eil_scrollbar_adjust (eil);
- }
-
- if (eil->_priv->frozen == 0)
- gnome_canvas_item_show (GNOME_CANVAS (eil)->root);
-}
-
-/**
- * e_icon_list_set_selection_mode
- * @eil: An icon list.
- * @mode: New selection mode.
- *
- * Sets the selection mode for an icon list. The %GTK_SELECTION_MULTIPLE and
- * %GTK_SELECTION_EXTENDED modes are considered equivalent.
- */
-void
-e_icon_list_set_selection_mode (EIconList *eil, GtkSelectionMode mode)
-{
- g_return_if_fail (eil != NULL);
- g_return_if_fail (IS_EIL (eil));
-
- eil->_priv->selection_mode = mode;
- eil->_priv->last_selected_idx = -1;
- eil->_priv->last_selected_icon = NULL;
-}
-
-/**
- * e_icon_list_set_icon_data_full:
- * @eil: An icon list.
- * @pos: Index of an icon.
- * @data: User data to set on the icon.
- * @destroy: Destroy notification handler for the icon.
- *
- * Associates the @data pointer to the icon at the index specified by @pos. The
- * @destroy argument points to a function that will be called when the icon is
- * destroyed, or NULL if no function is to be called when this happens.
- */
-void
-e_icon_list_set_icon_data_full (EIconList *eil,
- int pos, gpointer data,
- GtkDestroyNotify destroy)
-{
- Icon *icon;
-
- g_return_if_fail (eil != NULL);
- g_return_if_fail (IS_EIL (eil));
- g_return_if_fail (pos >= 0 && pos < eil->_priv->icons);
-
- icon = g_array_index (eil->_priv->icon_list, Icon*, pos);
- icon->data = data;
- icon->destroy = destroy;
-}
-
-/**
- * e_icon_list_get_icon_data:
- * @eil: An icon list.
- * @pos: Index of an icon.
- * @data: User data to set on the icon.
- *
- * Associates the @data pointer to the icon at the index specified by @pos.
- */
-void
-e_icon_list_set_icon_data (EIconList *eil, int pos, gpointer data)
-{
- e_icon_list_set_icon_data_full (eil, pos, data, NULL);
-}
-
-/**
- * e_icon_list_get_icon_data:
- * @eil: An icon list.
- * @pos: Index of an icon.
- *
- * Returns the user data pointer associated to the icon at the index specified
- * by @pos.
- */
-gpointer
-e_icon_list_get_icon_data (EIconList *eil, int pos)
-{
- Icon *icon;
-
- g_return_val_if_fail (eil != NULL, NULL);
- g_return_val_if_fail (IS_EIL (eil), NULL);
- g_return_val_if_fail (pos >= 0 && pos < eil->_priv->icons, NULL);
-
- icon = g_array_index (eil->_priv->icon_list, Icon*, pos);
- return icon->data;
-}
-
-/**
- * e_icon_list_find_icon_from_data:
- * @eil: An icon list.
- * @data: Data pointer associated to an icon.
- *
- * Returns the index of the icon whose user data has been set to @data,
- * or -1 if no icon has this data associated to it.
- */
-int
-e_icon_list_find_icon_from_data (EIconList *eil, gpointer data)
-{
- EIconListPrivate *priv;
- int n;
- Icon *icon;
-
- g_return_val_if_fail (eil != NULL, -1);
- g_return_val_if_fail (IS_EIL (eil), -1);
-
- priv = eil->_priv;
-
- for (n = 0; n < priv->icon_list->len; n++) {
- icon = g_array_index(priv->icon_list, Icon*, n);
- if (icon->data == data)
- return n;
- }
-
- return -1;
-}
-
-/* Sets an integer value in the private structure of the icon list, and updates it */
-static void
-set_value (EIconList *eil, EIconListPrivate *priv, int *dest, int val)
-{
- if (val == *dest)
- return;
-
- *dest = val;
-
- if (!priv->frozen) {
- eil_layout_all_icons (eil);
- eil_scrollbar_adjust (eil);
- } else
- priv->dirty = TRUE;
-}
-
-/**
- * e_icon_list_set_row_spacing:
- * @eil: An icon list.
- * @pixels: Number of pixels for inter-row spacing.
- *
- * Sets the spacing to be used between rows of icons.
- */
-void
-e_icon_list_set_row_spacing (EIconList *eil, int pixels)
-{
- EIconListPrivate *priv;
-
- g_return_if_fail (eil != NULL);
- g_return_if_fail (IS_EIL (eil));
-
- priv = eil->_priv;
- set_value (eil, priv, &priv->row_spacing, pixels);
-}
-
-/**
- * e_icon_list_set_col_spacing:
- * @eil: An icon list.
- * @pixels: Number of pixels for inter-column spacing.
- *
- * Sets the spacing to be used between columns of icons.
- */
-void
-e_icon_list_set_col_spacing (EIconList *eil, int pixels)
-{
- EIconListPrivate *priv;
-
- g_return_if_fail (eil != NULL);
- g_return_if_fail (IS_EIL (eil));
-
- priv = eil->_priv;
- set_value (eil, priv, &priv->col_spacing, pixels);
-}
-
-/**
- * e_icon_list_set_text_spacing:
- * @eil: An icon list.
- * @pixels: Number of pixels between an icon's image and its caption.
- *
- * Sets the spacing to be used between an icon's image and its text caption.
- */
-void
-e_icon_list_set_text_spacing (EIconList *eil, int pixels)
-{
- EIconListPrivate *priv;
-
- g_return_if_fail (eil != NULL);
- g_return_if_fail (IS_EIL (eil));
-
- priv = eil->_priv;
- set_value (eil, priv, &priv->text_spacing, pixels);
-}
-
-/**
- * e_icon_list_set_icon_border:
- * @eil: An icon list.
- * @pixels: Number of border pixels to be used around an icon's image.
- *
- * Sets the width of the border to be displayed around an icon's image. This is
- * currently not implemented.
- */
-void
-e_icon_list_set_icon_border (EIconList *eil, int pixels)
-{
- EIconListPrivate *priv;
-
- g_return_if_fail (eil != NULL);
- g_return_if_fail (IS_EIL (eil));
-
- priv = eil->_priv;
- set_value (eil, priv, &priv->icon_border, pixels);
-}
-
-/**
- * e_icon_list_set_separators:
- * @eil: An icon list.
- * @sep: String with characters to be used as word separators.
- *
- * Sets the characters that can be used as word separators when doing
- * word-wrapping in the icon text captions.
- */
-void
-e_icon_list_set_separators (EIconList *eil, const char *sep)
-{
- EIconListPrivate *priv;
-
- g_return_if_fail (eil != NULL);
- g_return_if_fail (IS_EIL (eil));
- g_return_if_fail (sep != NULL);
-
- priv = eil->_priv;
-
- if (priv->separators)
- g_free (priv->separators);
-
- priv->separators = g_strdup (sep);
-
- if (priv->frozen) {
- priv->dirty = TRUE;
- return;
- }
-
- eil_layout_all_icons (eil);
- eil_scrollbar_adjust (eil);
-}
-
-/**
- * e_icon_list_moveto:
- * @eil: An icon list.
- * @pos: Index of an icon.
- * @yalign: Vertical alignment of the icon.
- *
- * Makes the icon whose index is @pos be visible on the screen. The icon list
- * gets scrolled so that the icon is visible. An alignment of 0.0 represents
- * the top of the visible part of the icon list, and 1.0 represents the bottom.
- * An icon can be centered on the icon list.
- */
-void
-e_icon_list_moveto (EIconList *eil, int pos, double yalign)
-{
- EIconListPrivate *priv;
- GtkAdjustment *adj;
- IconLine *il;
- GList *l;
- int i, y, uh, line;
-
- g_return_if_fail (eil != NULL);
- g_return_if_fail (IS_EIL (eil));
- g_return_if_fail (pos >= 0 && pos < eil->_priv->icons);
- g_return_if_fail (yalign >= 0.0 && yalign <= 1.0);
-
- priv = eil->_priv;
-
- g_return_if_fail (priv->lines != NULL);
-
- line = pos / eil_get_items_per_line (eil);
-
- y = 0;
- for (i = 0, l = priv->lines; l && i < line; l = l->next, i++) {
- il = l->data;
- y += icon_line_height (eil, il);
- }
-
- il = l->data;
-
- uh = GTK_WIDGET (eil)->allocation.height - icon_line_height (eil,il);
- adj = gtk_layout_get_vadjustment (GTK_LAYOUT (eil));
- gtk_adjustment_set_value (adj, y - uh * yalign);
-}
-
-/**
- * e_icon_list_is_visible:
- * @eil: An icon list.
- * @pos: Index of an icon.
- *
- * Returns whether the icon at the index specified by @pos is visible. This
- * will be %GTK_VISIBILITY_NONE if the icon is not visible at all,
- * %GTK_VISIBILITY_PARTIAL if the icon is at least partially shown, and
- * %GTK_VISIBILITY_FULL if the icon is fully visible.
- */
-GtkVisibility
-e_icon_list_icon_is_visible (EIconList *eil, int pos)
-{
- EIconListPrivate *priv;
- GtkAdjustment *adj;
- IconLine *il;
- GList *l;
- int line, y1, y2, i;
-
- g_return_val_if_fail (eil != NULL, GTK_VISIBILITY_NONE);
- g_return_val_if_fail (IS_EIL (eil), GTK_VISIBILITY_NONE);
- g_return_val_if_fail (pos >= 0 && pos < eil->_priv->icons,
- GTK_VISIBILITY_NONE);
-
- priv = eil->_priv;
-
- if (priv->lines == NULL)
- return GTK_VISIBILITY_NONE;
-
- line = pos / eil_get_items_per_line (eil);
- y1 = 0;
- for (i = 0, l = priv->lines; l && i < line; l = l->next, i++) {
- il = l->data;
- y1 += icon_line_height (eil, il);
- }
-
- y2 = y1 + icon_line_height (eil, (IconLine *) l->data);
-
- adj = gtk_layout_get_vadjustment (GTK_LAYOUT (eil));
-
- if (y2 < adj->value)
- return GTK_VISIBILITY_NONE;
-
- if (y1 > adj->value + GTK_WIDGET (eil)->allocation.height)
- return GTK_VISIBILITY_NONE;
-
- if (y2 <= adj->value + GTK_WIDGET (eil)->allocation.height &&
- y1 >= adj->value)
- return GTK_VISIBILITY_FULL;
-
- return GTK_VISIBILITY_PARTIAL;
-}
-
-/**
- * e_icon_list_get_icon_at:
- * @eil: An icon list.
- * @x: X position in the icon list window.
- * @y: Y position in the icon list window.
- *
- * Returns the index of the icon that is under the specified coordinates, which
- * are relative to the icon list's window. If there is no icon in that
- * position, -1 is returned.
- */
-int
-e_icon_list_get_icon_at (EIconList *eil, int x, int y)
-{
- EIconListPrivate *priv;
- double wx, wy;
- double dx, dy;
- int cx, cy;
- int n;
- GnomeCanvasItem *item;
- double dist;
-
- g_return_val_if_fail (eil != NULL, -1);
- g_return_val_if_fail (IS_EIL (eil), -1);
-
- priv = eil->_priv;
-
- dx = x;
- dy = y;
-
- gnome_canvas_window_to_world (GNOME_CANVAS (eil), dx, dy, &wx, &wy);
- gnome_canvas_w2c (GNOME_CANVAS (eil), wx, wy, &cx, &cy);
-
- for (n = 0; n < priv->icon_list->len; n++) {
- Icon *icon = g_array_index(priv->icon_list, Icon*, n);
- GnomeCanvasItem *image = GNOME_CANVAS_ITEM (icon->image);
- GnomeCanvasItem *text = GNOME_CANVAS_ITEM (icon->text);
-
- if (wx >= image->x1 && wx <= image->x2 && wy >= image->y1 && wy <= image->y2) {
- dist = (* GNOME_CANVAS_ITEM_CLASS (GTK_OBJECT (image)->klass)->point) (
- image,
- wx, wy,
- cx, cy,
- &item);
-
- if ((int) (dist * GNOME_CANVAS (eil)->pixels_per_unit + 0.5)
- <= GNOME_CANVAS (eil)->close_enough)
- return n;
- }
-
- if (wx >= text->x1 && wx <= text->x2 && wy >= text->y1 && wy <= text->y2) {
- dist = (* GNOME_CANVAS_ITEM_CLASS (GTK_OBJECT (text)->klass)->point) (
- text,
- wx, wy,
- cx, cy,
- &item);
-
- if ((int) (dist * GNOME_CANVAS (eil)->pixels_per_unit + 0.5)
- <= GNOME_CANVAS (eil)->close_enough)
- return n;
- }
- }
-
- return -1;
-}
-
-
-/**
- * e_icon_list_get_num_icons:
- * @eil: An icon list.
- *
- * Returns the number of icons in the icon list.
- */
-guint
-e_icon_list_get_num_icons (EIconList *eil)
-{
- g_return_val_if_fail (E_IS_ICON_LIST (eil), 0);
-
- return eil->_priv->icons;
-}
-
-
-/**
- * e_icon_list_get_selection:
- * @eil: An icon list.
- *
- * Returns a list of integers with the indices of the currently selected icons.
- */
-GList *
-e_icon_list_get_selection (EIconList *eil)
-{
- g_return_val_if_fail (E_IS_ICON_LIST (eil), NULL);
-
- return eil->_priv->selection;
-}
-
-
-/**
- * e_icon_list_get_selection:
- * @eil: An icon list.
- * @idx: Index of an @icon.
- *
- * Returns the filename of the icon with index @idx.
- */
-gchar *
-e_icon_list_get_icon_filename (EIconList *eil, int idx)
-{
- Icon *icon;
-
- g_return_val_if_fail (eil != NULL, NULL);
- g_return_val_if_fail (IS_EIL (eil), NULL);
- g_return_val_if_fail (idx >= 0 && idx < eil->_priv->icons, NULL);
-
- icon = g_array_index (eil->_priv->icon_list, Icon*, idx);
- return icon->icon_filename;
-}
-
-
-/**
- * e_icon_list_find_icon_from_filename:
- * @eil: An icon list.
- * @filename: Filename of an icon.
- *
- * Returns the index of the icon whose filename is @filename or -1 if
- * there is no icon with this filename.
- */
-int
-e_icon_list_find_icon_from_filename (EIconList *eil,
- const gchar *filename)
-{
- EIconListPrivate *priv;
- int n;
- Icon *icon;
-
- g_return_val_if_fail (eil != NULL, -1);
- g_return_val_if_fail (IS_EIL (eil), -1);
- g_return_val_if_fail (filename != NULL, -1);
-
- priv = eil->_priv;
-
- for (n = 0; n < priv->icon_list->len; n++) {
- icon = g_array_index(priv->icon_list, Icon*, n);
- if (!strcmp (icon->icon_filename, filename))
- return n;
- }
-
- return -1;
-}
-
diff --git a/composer/e-icon-list.h b/composer/e-icon-list.h
deleted file mode 100644
index 7cdaf6e85f..0000000000
--- a/composer/e-icon-list.h
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * Copyright (C) 1998, 1999 Free Software Foundation
- * Copyright (C) 2000 Red Hat, Inc.
- * All rights reserved.
- *
- * This file is part of the Gnome Library.
- *
- * The Gnome 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.
- *
- * The Gnome 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.
- */
-/*
- @NOTATION@
- */
-
-/* GnomeIconList widget - scrollable icon list
- *
- *
- * Authors:
- * Federico Mena <federico@ximian.com>
- * Miguel de Icaza <miguel@ximian.com>
- */
-
-#ifndef _E_ICON_LIST_H_
-#define _E_ICON_LIST_H_
-
-#include <libgnome/gnome-defs.h>
-#include <libgnomeui/gnome-canvas.h>
-#include <gdk-pixbuf/gdk-pixbuf.h>
-
-BEGIN_GNOME_DECLS
-
-#define E_TYPE_ICON_LIST (e_icon_list_get_type ())
-#define E_ICON_LIST(obj) (GTK_CHECK_CAST ((obj), E_TYPE_ICON_LIST, EIconList))
-#define E_ICON_LIST_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_ICON_LIST, EIconListClass))
-#define E_IS_ICON_LIST(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_ICON_LIST))
-#define E_IS_ICON_LIST_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), E_TYPE_ICON_LIST))
-#define E_ICON_LIST_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), E_TYPE_ICON_LIST, EIconListClass))
-
-typedef struct _EIconList EIconList;
-typedef struct _EIconListPrivate EIconListPrivate;
-typedef struct _EIconListClass EIconListClass;
-
-typedef enum {
- E_ICON_LIST_ICONS,
- E_ICON_LIST_TEXT_BELOW,
- E_ICON_LIST_TEXT_RIGHT
-} EIconListMode;
-
-/* This structure has been converted to use public and private parts. To avoid
- * breaking binary compatibility, the slots for private fields have been
- * replaced with padding. Please remove these fields when gnome-libs has
- * reached another major version and it is "fine" to break binary compatibility.
- */
-struct _EIconList {
- GnomeCanvas canvas;
-
- /*< private >*/
- EIconListPrivate * _priv;
-};
-
-struct _EIconListClass {
- GnomeCanvasClass parent_class;
-
- void (*select_icon) (EIconList *gil, gint num, GdkEvent *event);
- void (*unselect_icon) (EIconList *gil, gint num, GdkEvent *event);
- gboolean (*text_changed) (EIconList *gil, gint num, const char *new_text);
-};
-
-enum {
- E_ICON_LIST_IS_EDITABLE = 1 << 0,
- E_ICON_LIST_STATIC_TEXT = 1 << 1
-};
-
-guint e_icon_list_get_type (void) G_GNUC_CONST;
-
-GtkWidget *e_icon_list_new (guint icon_width,
- int flags);
-void e_icon_list_construct (EIconList *gil,
- guint icon_width,
- int flags);
-
-
-/* To avoid excesive recomputes during insertion/deletion */
-void e_icon_list_freeze (EIconList *gil);
-void e_icon_list_thaw (EIconList *gil);
-
-
-void e_icon_list_insert (EIconList *gil,
- int idx,
- const char *icon_filename,
- const char *text);
-void e_icon_list_insert_pixbuf (EIconList *gil,
- int idx,
- GdkPixbuf *im,
- const char *icon_filename,
- const char *text);
-
-int e_icon_list_append (EIconList *gil,
- const char *icon_filename,
- const char *text);
-int e_icon_list_append_pixbuf (EIconList *gil,
- GdkPixbuf *im,
- const char *icon_filename,
- const char *text);
-
-void e_icon_list_clear (EIconList *gil);
-void e_icon_list_remove (EIconList *gil,
- int idx);
-
-guint e_icon_list_get_num_icons (EIconList *gil);
-
-
-/* Managing the selection */
-void e_icon_list_set_selection_mode (EIconList *gil,
- GtkSelectionMode mode);
-void e_icon_list_select_icon (EIconList *gil,
- int idx);
-void e_icon_list_unselect_icon (EIconList *gil,
- int idx);
-int e_icon_list_unselect_all (EIconList *gil);
-GList * e_icon_list_get_selection (EIconList *gil);
-
-/* Setting the spacing values */
-void e_icon_list_set_icon_width (EIconList *gil,
- int w);
-void e_icon_list_set_row_spacing (EIconList *gil,
- int pixels);
-void e_icon_list_set_col_spacing (EIconList *gil,
- int pixels);
-void e_icon_list_set_text_spacing (EIconList *gil,
- int pixels);
-void e_icon_list_set_icon_border (EIconList *gil,
- int pixels);
-void e_icon_list_set_separators (EIconList *gil,
- const char *sep);
-/* Icon filename. */
-gchar * e_icon_list_get_icon_filename (EIconList *gil,
- int idx);
-int e_icon_list_find_icon_from_filename (EIconList *gil,
- const char *filename);
-
-/* Attaching information to the icons */
-void e_icon_list_set_icon_data (EIconList *gil,
- int idx, gpointer data);
-void e_icon_list_set_icon_data_full (EIconList *gil,
- int idx, gpointer data,
- GtkDestroyNotify destroy);
-int e_icon_list_find_icon_from_data (EIconList *gil,
- gpointer data);
-gpointer e_icon_list_get_icon_data (EIconList *gil,
- int idx);
-
-/* Visibility */
-void e_icon_list_moveto (EIconList *gil,
- int idx, double yalign);
-GtkVisibility e_icon_list_icon_is_visible (EIconList *gil,
- int idx);
-
-int e_icon_list_get_icon_at (EIconList *gil,
- int x, int y);
-
-int e_icon_list_get_items_per_line (EIconList *gil);
-
-END_GNOME_DECLS
-
-#endif /* _GNOME_ICON_LIST_H_ */
diff --git a/composer/e-msg-composer-attachment-bar.c b/composer/e-msg-composer-attachment-bar.c
deleted file mode 100644
index 10d711a384..0000000000
--- a/composer/e-msg-composer-attachment-bar.c
+++ /dev/null
@@ -1,808 +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
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <gtk/gtksignal.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-util.h>
-#include <libgnomeui/gnome-app.h>
-#include <libgnomeui/gnome-app-helper.h>
-#include <libgnomeui/gnome-popup-menu.h>
-#include <glade/glade.h>
-#include <libgnomevfs/gnome-vfs-mime-info.h>
-#include <gdk-pixbuf/gdk-pixbuf.h>
-#include <gdk-pixbuf/gdk-pixbuf-loader.h>
-#include <gdk-pixbuf/gnome-canvas-pixbuf.h>
-
-#include "e-msg-composer.h"
-#include "e-msg-composer-select-file.h"
-#include "e-msg-composer-attachment.h"
-#include "e-msg-composer-attachment-bar.h"
-
-#include "e-icon-list.h"
-
-#include "camel/camel-data-wrapper.h"
-#include "camel/camel-stream-fs.h"
-#include "camel/camel-stream-mem.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 EIconListClass *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;
-}
-
-/* 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_common (EMsgComposerAttachmentBar *bar,
- EMsgComposerAttachment *attachment)
-{
- g_return_if_fail (attachment != NULL);
-
- 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++;
-
- update (bar);
-
- gtk_signal_emit (GTK_OBJECT (bar), signals[CHANGED]);
-}
-
-static void
-add_from_mime_part (EMsgComposerAttachmentBar *bar,
- CamelMimePart *part)
-{
- add_common (bar, e_msg_composer_attachment_new_from_mime_part (part));
-}
-
-static void
-add_from_file (EMsgComposerAttachmentBar *bar,
- const gchar *file_name)
-{
- add_common (bar, e_msg_composer_attachment_new (file_name));
-}
-
-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 GdkPixbuf *
-pixbuf_for_mime_type (const char *mime_type)
-{
- const char *icon_name;
- char *filename = NULL;
- GdkPixbuf *pixbuf;
-
- icon_name = gnome_vfs_mime_get_value (mime_type, "icon-filename");
- if (icon_name) {
- if (*icon_name == '/') {
- pixbuf = gdk_pixbuf_new_from_file (icon_name);
- if (pixbuf)
- return pixbuf;
- }
-
- filename = gnome_pixmap_file (icon_name);
- if (!filename) {
- char *fm_icon;
-
- fm_icon = g_strdup_printf ("nautilus/%s", icon_name);
- filename = gnome_pixmap_file (fm_icon);
- if (!filename) {
- fm_icon = g_strdup_printf ("mc/%s", icon_name);
- filename = gnome_pixmap_file (fm_icon);
- }
- g_free (fm_icon);
- }
- }
-
- if (!filename)
- filename = gnome_pixmap_file ("gnome-unknown.png");
-
- pixbuf = gdk_pixbuf_new_from_file (filename);
- g_free (filename);
-
- return pixbuf;
-}
-
-static void
-update (EMsgComposerAttachmentBar *bar)
-{
- EMsgComposerAttachmentBarPrivate *priv;
- EIconList *icon_list;
- GList *p;
-
- priv = bar->priv;
- icon_list = E_ICON_LIST (bar);
-
- e_icon_list_freeze (icon_list);
-
- e_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 *desc;
- gchar *size_string, *label;
- CamelContentType *content_type;
- GdkPixbuf *pixbuf;
- gboolean image;
-
- attachment = p->data;
- content_type = camel_mime_part_get_content_type (attachment->body);
- /* Get the image out of the attachment
- and create a thumbnail for it */
- image = header_content_type_is (content_type, "image", "*");
-
- if (image && attachment->pixbuf_cache == NULL) {
- CamelDataWrapper *wrapper;
- CamelStream *mstream;
- GdkPixbufLoader *loader;
- gboolean error = TRUE;
- char tmp[4096];
- int t;
-
- wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (attachment->body));
- mstream = camel_stream_mem_new ();
-
- camel_data_wrapper_write_to_stream (wrapper, mstream);
-
- camel_stream_reset (mstream);
-
- /* Stream image into pixbuf loader */
- loader = gdk_pixbuf_loader_new ();
- do {
- t = camel_stream_read (mstream, tmp, 4096);
- if (t > 0) {
- error = !gdk_pixbuf_loader_write (loader,
- tmp, t);
- if (error) {
- break;
- }
- } else {
- if (camel_stream_eos (mstream))
- break;
- error = TRUE;
- break;
- }
-
- } while (!camel_stream_eos (mstream));
-
- if (!error) {
- int ratio, width, height;
-
- /* Shrink pixbuf */
- pixbuf = gdk_pixbuf_loader_get_pixbuf (loader);
- width = gdk_pixbuf_get_width (pixbuf);
- height = gdk_pixbuf_get_height (pixbuf);
- if (width >= height) {
- if (width > 48) {
- ratio = width / 48;
- width = 48;
- height = height / ratio;
- }
- } else {
- if (height > 48) {
- ratio = height / 48;
- height = 48;
- width = width / ratio;
- }
- }
-
- attachment->pixbuf_cache = gdk_pixbuf_scale_simple
- (pixbuf,
- width,
- height,
- GDK_INTERP_BILINEAR);
- } else {
- g_warning ("GdkPixbufLoader Error");
- image = FALSE;
- }
-
- /* Destroy everything */
- gdk_pixbuf_loader_close (loader);
- gtk_object_destroy (GTK_OBJECT (loader));
- camel_stream_close (mstream);
- }
-
- desc = camel_mime_part_get_description (attachment->body);
- if (!desc || *desc == '\0')
- desc = camel_mime_part_get_filename (attachment->body);
- if (!desc)
- desc = _("attachment");
-
- if (attachment->size) {
- size_string = size_to_string (attachment->size);
- label = g_strdup_printf ("%s (%s)", desc, size_string);
- g_free (size_string);
- } else
- label = g_strdup (desc);
-
- if (image) {
- e_icon_list_append_pixbuf (icon_list, attachment->pixbuf_cache, NULL, label);
- } else {
- char *mime_type;
-
- mime_type = header_content_type_simple (content_type);
- pixbuf = pixbuf_for_mime_type (mime_type);
- g_free (mime_type);
- e_icon_list_append_pixbuf (icon_list, pixbuf,
- NULL, label);
- if (pixbuf)
- gdk_pixbuf_unref (pixbuf);
- }
-
- g_free (label);
- }
-
- e_icon_list_thaw (icon_list);
-}
-
-static void
-remove_selected (EMsgComposerAttachmentBar *bar)
-{
- EIconList *icon_list;
- EMsgComposerAttachment *attachment;
- GList *attachment_list;
- GList *p;
- gint num;
-
- icon_list = E_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;
- p = e_icon_list_get_selection (icon_list);
- for (; 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)
-{
- EIconList *icon_list;
- EMsgComposerAttachment *attachment;
- GList *selection;
- gint num;
-
- icon_list = E_ICON_LIST (bar);
-
- selection = e_icon_list_get_selection (icon_list);
- num = GPOINTER_TO_INT (selection->data);
- attachment = g_list_nth (bar->priv->attachments, num)->data;
-
- e_msg_composer_attachment_edit (attachment, GTK_WIDGET (bar));
-}
-
-
-/* "Attach" dialog. */
-
-static void
-add_from_user (EMsgComposerAttachmentBar *bar)
-{
- EMsgComposer *composer;
- char *file_name;
-
- composer = E_MSG_COMPOSER (gtk_widget_get_toplevel (GTK_WIDGET (bar)));
-
- file_name = e_msg_composer_select_file (composer, _("Attach a file"));
-
- add_from_file (bar, file_name);
-
- g_free (file_name);
-}
-
-
-/* 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;
- EIconList *icon_list;
- gint icon_number;
-
- bar = E_MSG_COMPOSER_ATTACHMENT_BAR (widget);
- icon_list = E_ICON_LIST (widget);
-
- if (event->button != 3)
- return GTK_WIDGET_CLASS (parent_class)->button_press_event
- (widget, event);
-
- icon_number = e_icon_list_get_icon_at (icon_list,
- event->x, event->y);
-
- if (icon_number >= 0) {
- e_icon_list_select_icon (icon_list, icon_number);
- popup_icon_context_menu (bar, icon_number, event);
- } else {
- popup_context_menu (bar, event);
- }
-
- return TRUE;
-}
-
-
-/* Initialization. */
-
-static void
-class_init (EMsgComposerAttachmentBarClass *class)
-{
- GtkObjectClass *object_class;
- GtkWidgetClass *widget_class;
- EIconListClass *icon_list_class;
-
- object_class = GTK_OBJECT_CLASS (class);
- widget_class = GTK_WIDGET_CLASS (class);
- icon_list_class = E_ICON_LIST_CLASS (class);
-
- parent_class = gtk_type_class (e_icon_list_get_type ());
-
- object_class->destroy = destroy;
-
- widget_class->button_press_event = button_press_event;
-
- /* 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, icon_height;
- GdkFont *font;
-
- 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;
-
- font = GTK_WIDGET (bar)->style->font;
- icon_height = icon_size + ((font->ascent + font->descent) * 2);
- icon_size += 24;
-
- gtk_widget_set_usize (GTK_WIDGET (bar), icon_size * 4, icon_height);
-}
-
-
-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 (e_icon_list_get_type (), &info);
- }
-
- return type;
-}
-
-GtkWidget *
-e_msg_composer_attachment_bar_new (GtkAdjustment *adj)
-{
- EMsgComposerAttachmentBar *new;
- EIconList *icon_list;
-
- gdk_rgb_init ();
- gtk_widget_push_visual (gdk_rgb_get_visual ());
- gtk_widget_push_colormap (gdk_rgb_get_cmap ());
- new = gtk_type_new (e_msg_composer_attachment_bar_get_type ());
- gtk_widget_pop_visual ();
- gtk_widget_pop_colormap ();
-
- icon_list = E_ICON_LIST (new);
-
- e_icon_list_construct (icon_list, ICON_WIDTH, 0);
-
- e_icon_list_set_separators (icon_list, ICON_SEPARATORS);
- e_icon_list_set_row_spacing (icon_list, ICON_ROW_SPACING);
- e_icon_list_set_col_spacing (icon_list, ICON_COL_SPACING);
- e_icon_list_set_icon_border (icon_list, ICON_BORDER);
- e_icon_list_set_text_spacing (icon_list, ICON_TEXT_SPACING);
- e_icon_list_set_selection_mode (icon_list, GTK_SELECTION_MULTIPLE);
-
- return GTK_WIDGET (new);
-}
-
-/* FIXME: is_8bit() and best_encoding() should really be shared
- between e-msg-composer.c and this file. */
-static gboolean
-is_8bit (const guchar *text)
-{
- guchar *c;
-
- for (c = (guchar *) text; *c; c++)
- if (*c > (guchar) 127)
- return TRUE;
-
- return FALSE;
-}
-
-static int
-best_encoding (const guchar *text)
-{
- guchar *ch;
- int count = 0;
- int total;
-
- for (ch = (guchar *) text; *ch; ch++)
- if (*ch > (guchar) 127)
- count++;
-
- total = (int) (ch - text);
-
- if ((float) count <= total * 0.17)
- return CAMEL_MIME_PART_ENCODING_QUOTEDPRINTABLE;
- else
- return CAMEL_MIME_PART_ENCODING_BASE64;
-}
-
-static void
-attach_to_multipart (CamelMultipart *multipart,
- EMsgComposerAttachment *attachment)
-{
- CamelContentType *content_type;
-
- content_type = camel_mime_part_get_content_type (attachment->body);
-
- if (!header_content_type_is (content_type, "multipart", "*")) {
- if (header_content_type_is (content_type, "text", "*")) {
- CamelStream *stream;
- GByteArray *array;
- guchar *text;
-
- array = g_byte_array_new ();
- stream = camel_stream_mem_new_with_byte_array (array);
- camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (attachment->body), stream);
- g_byte_array_append (array, "", 1);
- text = array->data;
-
- if (is_8bit (text))
- camel_mime_part_set_encoding (attachment->body, best_encoding (text));
- else
- camel_mime_part_set_encoding (attachment->body, CAMEL_MIME_PART_ENCODING_7BIT);
-
- camel_object_unref (CAMEL_OBJECT (stream));
- } else if (!header_content_type_is (content_type, "message", "*")) {
- camel_mime_part_set_encoding (attachment->body,
- CAMEL_MIME_PART_ENCODING_BASE64);
- }
- }
-
- camel_multipart_add_part (multipart, attachment->body);
-}
-
-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 (E_IS_MSG_COMPOSER_ATTACHMENT_BAR (bar));
-
- if (file_name == NULL)
- add_from_user (bar);
- else
- add_from_file (bar, file_name);
-}
-
-void
-e_msg_composer_attachment_bar_attach_mime_part (EMsgComposerAttachmentBar *bar,
- CamelMimePart *part)
-{
- g_return_if_fail (E_IS_MSG_COMPOSER_ATTACHMENT_BAR (bar));
-
- add_from_mime_part (bar, part);
-}
diff --git a/composer/e-msg-composer-attachment-bar.h b/composer/e-msg-composer-attachment-bar.h
deleted file mode 100644
index 5c7db51df5..0000000000
--- a/composer/e-msg-composer-attachment-bar.h
+++ /dev/null
@@ -1,75 +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 "e-icon-list.h"
-#include <camel/camel-multipart.h>
-
-#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 {
- EIconList parent;
-
- EMsgComposerAttachmentBarPrivate *priv;
-};
-typedef struct _EMsgComposerAttachmentBar EMsgComposerAttachmentBar;
-
-struct _EMsgComposerAttachmentBarClass {
- EIconListClass 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);
-void e_msg_composer_attachment_bar_attach_mime_part (EMsgComposerAttachmentBar *bar, CamelMimePart *part);
-
-#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 203bd7d59d..0000000000
--- a/composer/e-msg-composer-attachment.c
+++ /dev/null
@@ -1,466 +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 <sys/stat.h>
-
-#include <gtk/gtkoptionmenu.h>
-#include <camel/camel.h>
-#include <gal/widgets/e-unicode.h>
-#include <libgnomevfs/gnome-vfs-mime.h>
-
-#include "e-msg-composer.h"
-#include "e-msg-composer-attachment.h"
-
-
-enum {
- CHANGED,
- LAST_SIGNAL
-};
-static guint signals[LAST_SIGNAL] = { 0 };
-
-static GtkObjectClass *parent_class = NULL;
-
-
-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);
-
- camel_object_unref (CAMEL_OBJECT (attachment->body));
- if (attachment->pixbuf_cache != NULL)
- gdk_pixbuf_unref (attachment->pixbuf_cache);
-}
-
-
-/* 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->body = NULL;
- msg_composer_attachment->size = 0;
- msg_composer_attachment->pixbuf_cache = NULL;
-}
-
-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;
- CamelMimePart *part;
- CamelDataWrapper *wrapper;
- CamelStream *stream;
- struct stat statbuf;
- gchar *mime_type;
- char *content_id;
-
- g_return_val_if_fail (file_name != NULL, NULL);
-
- if (stat (file_name, &statbuf) < 0)
- return NULL;
-
- /* return if it's not a regular file */
- if (!S_ISREG (statbuf.st_mode))
- return NULL;
-
- stream = camel_stream_fs_new_with_name (file_name, O_RDONLY, 0);
- if (!stream)
- return NULL;
- wrapper = camel_data_wrapper_new ();
- camel_data_wrapper_construct_from_stream (wrapper, stream);
- camel_object_unref (CAMEL_OBJECT (stream));
- mime_type = e_msg_composer_guess_mime_type (file_name);
- if (mime_type) {
- camel_data_wrapper_set_mime_type (wrapper, mime_type);
- g_free (mime_type);
- } else
- camel_data_wrapper_set_mime_type (wrapper, "application/octet-stream");
-
- part = camel_mime_part_new ();
- camel_medium_set_content_object (CAMEL_MEDIUM (part), wrapper);
- camel_object_unref (CAMEL_OBJECT (wrapper));
-
- camel_mime_part_set_disposition (part, "attachment");
- if (strchr (file_name, '/'))
- camel_mime_part_set_filename (part, strrchr (file_name, '/') + 1);
- else
- camel_mime_part_set_filename (part, file_name);
-
- /* set the Content-Id */
- content_id = header_msgid_generate ();
- camel_mime_part_set_content_id (part, content_id);
- g_free (content_id);
-
- new = e_msg_composer_attachment_new_from_mime_part (part);
-
- new->size = statbuf.st_size;
- new->guessed_type = TRUE;
-
- return new;
-}
-
-
-/**
- * e_msg_composer_attachment_new_from_mime_part:
- * @part: a CamelMimePart
- *
- * Return value: a new EMsgComposerAttachment based on the mime part
- **/
-EMsgComposerAttachment *
-e_msg_composer_attachment_new_from_mime_part (CamelMimePart *part)
-{
- EMsgComposerAttachment *new;
-
- g_return_val_if_fail (CAMEL_IS_MIME_PART (part), NULL);
-
- new = gtk_type_new (e_msg_composer_attachment_get_type ());
-
- new->editor_gui = NULL;
- new->body = part;
- camel_object_ref (CAMEL_OBJECT (part));
- new->guessed_type = FALSE;
- new->size = 0;
-
- return new;
-}
-
-
-/* The attachment property dialog. */
-
-struct _DialogData {
- GtkWidget *dialog;
- GtkEntry *file_name_entry;
- GtkEntry *description_entry;
- GtkEntry *mime_type_entry;
- GtkOptionMenu *disposition_option;
- EMsgComposerAttachment *attachment;
-};
-typedef struct _DialogData DialogData;
-
-static void
-destroy_dialog_data (DialogData *data)
-{
- g_free (data);
-}
-
-/*
- * fixme: I am converting EVERYTHING to/from UTF-8, although mime types
- * are in ASCII. This is not strictly necessary, but we want to be
- * consistent and possibly check for errors somewhere.
- */
-
-static void
-update_mime_type (DialogData *data)
-{
- const gchar *mime_type;
- gchar *file_name;
-
- if (!data->attachment->guessed_type)
- return;
-
- file_name = e_utf8_gtk_entry_get_text (data->file_name_entry);
- mime_type = gnome_vfs_mime_type_from_name_or_default (file_name, NULL);
- g_free (file_name);
-
- if (mime_type)
- e_utf8_gtk_entry_set_text (data->mime_type_entry, mime_type);
-}
-
-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);
- else
- e_utf8_gtk_entry_set_text (entry, value ? value : "");
-}
-
-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
-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);
-}
-
-/* Why was this never part of GTK? */
-static int
-option_menu_get_history (GtkOptionMenu *menu)
-{
- GtkWidget *active;
-
- g_return_val_if_fail (menu != NULL, -1);
- g_return_val_if_fail (GTK_IS_OPTION_MENU (menu), -1);
-
- if (menu->menu) {
- active = gtk_menu_get_active (GTK_MENU (menu->menu));
-
- if (active)
- return g_list_index (GTK_MENU_SHELL (menu->menu)->children,
- active);
- else
- return -1;
- } else
- return -1;
-}
-
-static void
-ok_cb (GtkWidget *widget,
- gpointer data)
-{
- DialogData *dialog_data;
- EMsgComposerAttachment *attachment;
- gchar *str;
- int option;
-
- dialog_data = (DialogData *) data;
- attachment = dialog_data->attachment;
-
- str = e_utf8_gtk_entry_get_text (dialog_data->file_name_entry);
- camel_mime_part_set_filename (attachment->body, str);
- g_free (str);
-
- str = e_utf8_gtk_entry_get_text (dialog_data->description_entry);
- camel_mime_part_set_description (attachment->body, str);
- g_free (str);
-
- str = e_utf8_gtk_entry_get_text (dialog_data->mime_type_entry);
- camel_mime_part_set_content_type (attachment->body, str);
-
- camel_data_wrapper_set_mime_type (
- camel_medium_get_content_object (CAMEL_MEDIUM (attachment->body)), str);
- g_free (str);
-
- option = option_menu_get_history (dialog_data->disposition_option);
- switch (option) {
- case 0:
- camel_mime_part_set_disposition (attachment->body, "attachment");
- break;
- case 1:
- camel_mime_part_set_disposition (attachment->body, "inline");
- break;
- default:
- /* Hmmmm? */
- break;
- }
-
- changed (attachment);
- close_cb (widget, 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->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"));
- dialog_data->disposition_option = GTK_OPTION_MENU (glade_xml_get_widget
- (editor_gui,
- "disposition_option"));
-
- if (attachment != NULL) {
- CamelContentType *content_type;
- char *type;
- const char *disposition;
-
- set_entry (editor_gui, "file_name_entry",
- camel_mime_part_get_filename (attachment->body));
- set_entry (editor_gui, "description_entry",
- camel_mime_part_get_description (attachment->body));
- content_type = camel_mime_part_get_content_type (attachment->body);
- type = header_content_type_simple (content_type);
- set_entry (editor_gui, "mime_type_entry", type);
- g_free (type);
-
- disposition = camel_mime_part_get_disposition (attachment->body);
- if (disposition && !g_strcasecmp (disposition, "inline"))
- gtk_option_menu_set_history (dialog_data->disposition_option, 1);
- else
- gtk_option_menu_set_history (dialog_data->disposition_option, 0);
- }
-
- connect_widget (editor_gui, "ok_button", "clicked", ok_cb, dialog_data);
- connect_widget (editor_gui, "close_button", "clicked", close_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 4679a0d8e0..0000000000
--- a/composer/e-msg-composer-attachment.glade
+++ /dev/null
@@ -1,332 +0,0 @@
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <name>e-msg-composer-attachment</name>
- <program_name>e-msg-composer-attachment</program_name>
- <directory></directory>
- <source_directory>src</source_directory>
- <pixmaps_directory>pixmaps</pixmaps_directory>
- <language>C</language>
- <gnome_support>True</gnome_support>
- <gettext_support>True</gettext_support>
- <use_widget_names>False</use_widget_names>
- <output_main_file>False</output_main_file>
- <output_support_files>True</output_support_files>
- <output_build_files>True</output_build_files>
- <backup_source_files>True</backup_source_files>
- <main_source_file>interface.c</main_source_file>
- <main_header_file>interface.h</main_header_file>
- <handler_source_file>callbacks.c</handler_source_file>
- <handler_header_file>callbacks.h</handler_header_file>
- <support_source_file>support.c</support_source_file>
- <support_header_file>support.h</support_header_file>
-</project>
-
-<widget>
- <class>GnomeDialog</class>
- <name>dialog</name>
- <cxx_use_heap>True</cxx_use_heap>
- <title>Attachment properties</title>
- <type>GTK_WINDOW_TOPLEVEL</type>
- <position>GTK_WIN_POS_NONE</position>
- <modal>False</modal>
- <allow_shrink>False</allow_shrink>
- <allow_grow>False</allow_grow>
- <auto_shrink>False</auto_shrink>
- <auto_close>False</auto_close>
- <hide_on_close>False</hide_on_close>
-
- <widget>
- <class>GtkVBox</class>
- <child_name>GnomeDialog:vbox</child_name>
- <name>dialog-vbox1</name>
- <cxx_use_heap>True</cxx_use_heap>
- <homogeneous>False</homogeneous>
- <spacing>8</spacing>
- <child>
- <padding>4</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkTable</class>
- <name>table1</name>
- <cxx_use_heap>True</cxx_use_heap>
- <rows>4</rows>
- <columns>2</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>10</row_spacing>
- <column_spacing>5</column_spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkEntry</class>
- <name>description_entry</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox3</name>
- <cxx_use_heap>True</cxx_use_heap>
- <homogeneous>False</homogeneous>
- <spacing>10</spacing>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>True</yexpand>
- <xshrink>True</xshrink>
- <yshrink>True</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkEntry</class>
- <name>file_name_entry</name>
- <width>290</width>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>mime_type_entry</name>
- <cxx_use_heap>True</cxx_use_heap>
- <sensitive>False</sensitive>
- <can_focus>True</can_focus>
- <editable>False</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>2</top_attach>
- <bottom_attach>3</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label3</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>MIME type:</label>
- <justify>GTK_JUSTIFY_LEFT</justify>
- <wrap>False</wrap>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>2</top_attach>
- <bottom_attach>3</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label1</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>Description:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label2</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>File name:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label4</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>Send as:</label>
- <justify>GTK_JUSTIFY_LEFT</justify>
- <wrap>False</wrap>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>3</top_attach>
- <bottom_attach>4</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkOptionMenu</class>
- <name>disposition_option</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <items>Attachment
-Inline attachment
-</items>
- <initial_choice>1</initial_choice>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>3</top_attach>
- <bottom_attach>4</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHButtonBox</class>
- <child_name>GnomeDialog:action_area</child_name>
- <name>dialog-action_area1</name>
- <cxx_use_heap>True</cxx_use_heap>
- <layout_style>GTK_BUTTONBOX_END</layout_style>
- <spacing>8</spacing>
- <child_min_width>85</child_min_width>
- <child_min_height>27</child_min_height>
- <child_ipad_x>7</child_ipad_x>
- <child_ipad_y>0</child_ipad_y>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- <pack>GTK_PACK_END</pack>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>ok_button</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_default>True</can_default>
- <has_default>True</has_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>close_button</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_CLOSE</stock_button>
- </widget>
- </widget>
- </widget>
-</widget>
-
-</GTK-Interface>
diff --git a/composer/e-msg-composer-attachment.h b/composer/e-msg-composer-attachment.h
deleted file mode 100644
index 7be3c9d595..0000000000
--- a/composer/e-msg-composer-attachment.h
+++ /dev/null
@@ -1,74 +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 <gdk-pixbuf/gdk-pixbuf.h>
-#include <glade/glade-xml.h>
-#include <camel/camel-mime-part.h>
-
-#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;
-
- CamelMimePart *body;
- gboolean guessed_type;
- gulong size;
-
- GdkPixbuf *pixbuf_cache;
-};
-
-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);
-EMsgComposerAttachment *e_msg_composer_attachment_new_from_mime_part (CamelMimePart *part);
-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 ca618f5b35..0000000000
--- a/composer/e-msg-composer-hdrs.c
+++ /dev/null
@@ -1,926 +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 <config.h>
-#endif
-
-#include <bonobo/bonobo-control.h>
-#include <bonobo/bonobo-widget.h>
-
-#include <gtk/gtkmenuitem.h>
-#include <gtk/gtkoptionmenu.h>
-#include <gtk/gtktooltips.h>
-#include <libgnomeui/gnome-uidefs.h>
-#include <liboaf/liboaf.h>
-
-#include "Composer.h"
-
-#include <gtk/gtkmenuitem.h>
-#include <gtk/gtkoptionmenu.h>
-#include <gtk/gtktooltips.h>
-
-#include <gal/e-text/e-entry.h>
-#include <gal/widgets/e-unicode.h>
-
-#include <camel/camel.h>
-#include "e-msg-composer-hdrs.h"
-#include "mail/mail-config.h"
-
-
-#define SELECT_NAMES_OAFID "OAFIID:GNOME_Evolution_Addressbook_SelectNames"
-
-/* Indexes in the GtkTable assigned to various items */
-
-#define LINE_FROM 0
-#define LINE_REPLYTO 1
-#define LINE_TO 2
-#define LINE_CC 3
-#define LINE_BCC 4
-#define LINE_SUBJECT 5
-
-typedef struct {
- GtkWidget *label;
- GtkWidget *entry;
-} EMsgComposerHdrPair;
-
-struct _EMsgComposerHdrsPrivate {
- GNOME_Evolution_Addressbook_SelectNames corba_select_names;
-
- /* The tooltips. */
- GtkTooltips *tooltips;
-
- GSList *from_options;
-
- /* Standard headers. */
- EMsgComposerHdrPair from, reply_to, to, cc, bcc, subject;
-};
-
-
-static GtkTableClass *parent_class = NULL;
-
-enum {
- SHOW_ADDRESS_DIALOG,
- SUBJECT_CHANGED,
- HDRS_CHANGED,
- LAST_SIGNAL
-};
-
-static gint signals[LAST_SIGNAL];
-
-
-static gboolean
-setup_corba (EMsgComposerHdrs *hdrs)
-{
- EMsgComposerHdrsPrivate *priv;
- CORBA_Environment ev;
-
- priv = hdrs->priv;
-
- g_assert (priv->corba_select_names == CORBA_OBJECT_NIL);
-
- CORBA_exception_init (&ev);
-
- priv->corba_select_names = oaf_activate_from_id (SELECT_NAMES_OAFID, 0, NULL, &ev);
-
- /* OAF seems to be broken -- it can return a CORBA_OBJECT_NIL without
- raising an exception in `ev'. */
- if (ev._major != CORBA_NO_EXCEPTION || priv->corba_select_names == CORBA_OBJECT_NIL) {
- g_warning ("Cannot activate -- %s", SELECT_NAMES_OAFID);
- CORBA_exception_free (&ev);
- return FALSE;
- }
-
- CORBA_exception_free (&ev);
-
- return TRUE;
-}
-
-typedef struct {
- EMsgComposerHdrs *hdrs;
- char *string;
-} EMsgComposerHdrsAndString;
-
-static void
-e_msg_composer_hdrs_and_string_free(EMsgComposerHdrsAndString *emchas)
-{
- if (emchas->hdrs)
- gtk_object_unref(GTK_OBJECT(emchas->hdrs));
- g_free(emchas->string);
-}
-
-static EMsgComposerHdrsAndString *
-e_msg_composer_hdrs_and_string_create(EMsgComposerHdrs *hdrs, const char *string)
-{
- EMsgComposerHdrsAndString *emchas;
-
- emchas = g_new(EMsgComposerHdrsAndString, 1);
- emchas->hdrs = hdrs;
- emchas->string = g_strdup(string);
- if (emchas->hdrs)
- gtk_object_ref(GTK_OBJECT(emchas->hdrs));
-
- return emchas;
-}
-
-static void
-address_button_clicked_cb (GtkButton *button,
- gpointer data)
-{
- EMsgComposerHdrsAndString *emchas;
- EMsgComposerHdrs *hdrs;
- EMsgComposerHdrsPrivate *priv;
- CORBA_Environment ev;
-
- emchas = data;
- hdrs = emchas->hdrs;
- priv = hdrs->priv;
-
- CORBA_exception_init (&ev);
-
- GNOME_Evolution_Addressbook_SelectNames_activateDialog (
- priv->corba_select_names, emchas->string, &ev);
-
- CORBA_exception_free (&ev);
-}
-
-static void
-from_changed (GtkWidget *item, gpointer data)
-{
- EMsgComposerHdrs *hdrs = E_MSG_COMPOSER_HDRS (data);
-
- hdrs->account = gtk_object_get_data (GTK_OBJECT (item), "account");
-}
-
-static GtkWidget *
-create_from_optionmenu (EMsgComposerHdrs *hdrs)
-{
- GtkWidget *omenu, *menu, *first = NULL;
- const GSList *accounts;
- GtkWidget *item;
- int i = 0, history = 0;
-
- omenu = gtk_option_menu_new ();
- menu = gtk_menu_new ();
-
- accounts = mail_config_get_accounts ();
- while (accounts) {
- const MailConfigAccount *account;
- char *label;
- char *native_label;
-
- account = accounts->data;
-
- /* this should never ever fail */
- if (!account || !account->name || !account->id) {
- g_assert_not_reached ();
- continue;
- }
-
- if (strcmp (account->name, account->id->address))
- label = g_strdup_printf ("%s <%s> (%s)", account->id->name,
- account->id->address, account->name);
- else
- label = g_strdup_printf ("%s <%s>", account->id->name, account->id->address);
-
-
- native_label = e_utf8_to_gtk_string (GTK_WIDGET (menu), label);
- item = gtk_menu_item_new_with_label (native_label);
- g_free (native_label);
- g_free (label);
-
- gtk_object_set_data (GTK_OBJECT (item), "account", account_copy (account));
- gtk_signal_connect (GTK_OBJECT (item), "activate",
- GTK_SIGNAL_FUNC (from_changed), hdrs);
-
- if (account->default_account) {
- first = item;
- history = i;
- }
-
- /* this is so we can later set which one we want */
- hdrs->priv->from_options = g_slist_append (hdrs->priv->from_options, item);
-
- gtk_menu_append (GTK_MENU (menu), item);
- gtk_widget_show (item);
-
- accounts = accounts->next;
- i++;
- }
-
- gtk_option_menu_set_menu (GTK_OPTION_MENU (omenu), menu);
-
- if (first){
- gtk_option_menu_set_history (GTK_OPTION_MENU (omenu), history);
- gtk_signal_emit_by_name (GTK_OBJECT (first), "activate", hdrs);
- }
-
- return omenu;
-}
-
-static void
-addressbook_entry_changed (BonoboListener *listener,
- char *event_name,
- CORBA_any *arg,
- CORBA_Environment *ev,
- gpointer user_data)
-{
- EMsgComposerHdrs *hdrs = E_MSG_COMPOSER_HDRS (user_data);
-
- gtk_signal_emit (GTK_OBJECT (hdrs), signals[HDRS_CHANGED]);
-}
-
-static GtkWidget *
-create_addressbook_entry (EMsgComposerHdrs *hdrs,
- const char *name)
-{
- EMsgComposerHdrsPrivate *priv;
- GNOME_Evolution_Addressbook_SelectNames corba_select_names;
- Bonobo_Control corba_control;
- GtkWidget *control_widget;
- CORBA_Environment ev;
- BonoboControlFrame *cf;
- Bonobo_PropertyBag pb = CORBA_OBJECT_NIL;
-
- priv = hdrs->priv;
- corba_select_names = priv->corba_select_names;
-
- CORBA_exception_init (&ev);
-
- GNOME_Evolution_Addressbook_SelectNames_addSection (
- corba_select_names, name, name, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- CORBA_exception_free (&ev);
- return NULL;
- }
-
- corba_control =
- GNOME_Evolution_Addressbook_SelectNames_getEntryBySection (
- corba_select_names, name, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- CORBA_exception_free (&ev);
- return NULL;
- }
-
- CORBA_exception_free (&ev);
-
- control_widget = bonobo_widget_new_control_from_objref (
- corba_control, CORBA_OBJECT_NIL);
-
- cf = bonobo_widget_get_control_frame (BONOBO_WIDGET (control_widget));
- pb = bonobo_control_frame_get_control_property_bag (cf, NULL);
-
- bonobo_event_source_client_add_listener (
- pb, addressbook_entry_changed,
- "Bonobo/Property:change:entry_changed",
- NULL, hdrs);
-
- return control_widget;
-}
-
-static EMsgComposerHdrPair
-header_new_recipient (EMsgComposerHdrs *hdrs, const gchar *name, const gchar *tip)
-{
- EMsgComposerHdrsPrivate *priv;
- EMsgComposerHdrPair ret;
-
- priv = hdrs->priv;
-
- ret.label = gtk_button_new_with_label (name);
- GTK_OBJECT_UNSET_FLAGS (ret.label, GTK_CAN_FOCUS);
- gtk_signal_connect_full (
- GTK_OBJECT (ret.label), "clicked",
- GTK_SIGNAL_FUNC (address_button_clicked_cb), NULL,
- e_msg_composer_hdrs_and_string_create(hdrs, name),
- (GtkDestroyNotify) e_msg_composer_hdrs_and_string_free,
- FALSE, FALSE);
-
- gtk_tooltips_set_tip (
- hdrs->priv->tooltips, ret.label,
- _("Click here for the address book"),
- NULL);
-
- ret.entry = create_addressbook_entry (hdrs, name);
-
- return ret;
-}
-
-static void
-entry_changed (GtkWidget *entry, EMsgComposerHdrs *hdrs)
-{
- gchar *tmp;
- gchar *subject;
-
- tmp = e_msg_composer_hdrs_get_subject (hdrs);
- subject = e_utf8_to_gtk_string (GTK_WIDGET (entry), tmp);
-
- gtk_signal_emit (GTK_OBJECT (hdrs), signals[SUBJECT_CHANGED], subject);
- g_free (tmp);
-
- gtk_signal_emit (GTK_OBJECT (hdrs), signals[HDRS_CHANGED]);
-}
-
-static void
-create_headers (EMsgComposerHdrs *hdrs)
-{
- EMsgComposerHdrsPrivate *priv = hdrs->priv;
-
- /*
- * From:
- */
- priv->from.label = gtk_label_new (_("From:"));
- priv->from.entry = create_from_optionmenu (hdrs);
-
- /*
- * Reply-To:
- */
- priv->reply_to.label = gtk_label_new (_("Reply-To:"));
- priv->reply_to.entry = e_entry_new ();
- gtk_object_set (GTK_OBJECT (priv->reply_to.entry),
- "editable", TRUE,
- "use_ellipsis", TRUE,
- "allow_newlines", FALSE,
- NULL);
-
- /*
- * Subject:
- */
- priv->subject.label = gtk_label_new (_("Subject:"));
- priv->subject.entry = e_entry_new ();
- gtk_object_set (GTK_OBJECT (priv->subject.entry),
- "editable", TRUE,
- "use_ellipsis", TRUE,
- "allow_newlines", FALSE,
- NULL);
- gtk_signal_connect (GTK_OBJECT (priv->subject.entry), "changed",
- GTK_SIGNAL_FUNC (entry_changed), hdrs);
-
- /*
- * To: CC: and Bcc:
- */
- priv->to = header_new_recipient (
- hdrs, _("To:"),
- _("Enter the recipients of the message"));
-
- priv->cc = header_new_recipient (
- hdrs, _("Cc:"),
- _("Enter the addresses that will receive a carbon copy of the message"));
-
- priv->bcc = header_new_recipient (
- hdrs, _("Bcc:"),
- _("Enter the addresses that will receive a carbon copy of "
- "the message without appearing in the recipient list of "
- "the message."));
-}
-
-static void
-attach_couple (EMsgComposerHdrs *hdrs, EMsgComposerHdrPair *pair, int line)
-{
- int pad;
-
- if (GTK_IS_LABEL (pair->label))
- pad = GNOME_PAD;
- else
- pad = 2;
-
- gtk_table_attach (
- GTK_TABLE (hdrs),
- pair->label, 0, 1,
- line, line + 1,
- GTK_FILL, GTK_FILL, pad, pad);
-
- gtk_table_attach (
- GTK_TABLE (hdrs),
- pair->entry, 1, 2,
- line, line + 1,
- GTK_FILL | GTK_EXPAND, 0, 2, 2);
-}
-
-static void
-attach_headers (EMsgComposerHdrs *hdrs)
-{
- EMsgComposerHdrsPrivate *p = hdrs->priv;
-
- attach_couple (hdrs, &p->from, LINE_FROM);
- attach_couple (hdrs, &p->reply_to, LINE_REPLYTO);
- attach_couple (hdrs, &p->to, LINE_TO);
- attach_couple (hdrs, &p->cc, LINE_CC);
- attach_couple (hdrs, &p->bcc, LINE_BCC);
- attach_couple (hdrs, &p->subject, LINE_SUBJECT);
-}
-
-static void
-set_pair_visibility (EMsgComposerHdrs *h, EMsgComposerHdrPair *pair, gboolean visible)
-{
- if (visible){
- gtk_widget_show (pair->label);
- gtk_widget_show (pair->entry);
- } else {
- gtk_widget_hide (pair->label);
- gtk_widget_hide (pair->entry);
- }
-}
-
-static void
-headers_set_visibility (EMsgComposerHdrs *h, gint visible_flags)
-{
- EMsgComposerHdrsPrivate *p = h->priv;
-
- set_pair_visibility (h, &p->from, visible_flags & E_MSG_COMPOSER_VISIBLE_FROM);
- set_pair_visibility (h, &p->reply_to, visible_flags & E_MSG_COMPOSER_VISIBLE_REPLYTO);
- set_pair_visibility (h, &p->cc, visible_flags & E_MSG_COMPOSER_VISIBLE_CC);
- set_pair_visibility (h, &p->bcc, visible_flags & E_MSG_COMPOSER_VISIBLE_BCC);
- set_pair_visibility (h, &p->subject, visible_flags & E_MSG_COMPOSER_VISIBLE_SUBJECT);
-}
-
-void
-e_msg_composer_set_hdrs_visible (EMsgComposerHdrs *hdrs, gint visible_flags)
-{
- g_return_if_fail (hdrs != NULL);
- g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs));
-
- headers_set_visibility (hdrs, visible_flags);
- gtk_widget_queue_resize (GTK_WIDGET (hdrs));
-}
-
-static void
-setup_headers (EMsgComposerHdrs *hdrs, gint visible_flags)
-{
- create_headers (hdrs);
- attach_headers (hdrs);
-
- /*
- * To: is always visible
- */
- gtk_widget_show (hdrs->priv->to.label);
- gtk_widget_show (hdrs->priv->to.entry);
-
- headers_set_visibility (hdrs, visible_flags);
-}
-
-
-/* GtkObject methods. */
-
-static void
-destroy (GtkObject *object)
-{
- EMsgComposerHdrs *hdrs;
- EMsgComposerHdrsPrivate *priv;
- GSList *l;
-
- hdrs = E_MSG_COMPOSER_HDRS (object);
- priv = hdrs->priv;
-
- if (priv->corba_select_names != CORBA_OBJECT_NIL) {
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
- CORBA_Object_release (priv->corba_select_names, &ev);
- CORBA_exception_free (&ev);
- }
-
- gtk_object_destroy (GTK_OBJECT (priv->tooltips));
-
- l = priv->from_options;
- while (l) {
- MailConfigAccount *account;
- GtkWidget *item = l->data;
-
- account = gtk_object_get_data (GTK_OBJECT (item), "account");
- account_destroy (account);
-
- l = l->next;
- }
- g_slist_free (priv->from_options);
-
- 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);
-
- signals[SUBJECT_CHANGED] =
- gtk_signal_new ("subject_changed",
- GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (EMsgComposerHdrsClass,
- subject_changed),
- gtk_marshal_NONE__STRING,
- GTK_TYPE_NONE,
- 1, GTK_TYPE_STRING);
-
- signals[HDRS_CHANGED] =
- gtk_signal_new ("hdrs_changed",
- GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (EMsgComposerHdrsClass,
- hdrs_changed),
- 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_new0 (EMsgComposerHdrsPrivate, 1);
-
- priv->tooltips = gtk_tooltips_new ();
-
- 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 (gint visible_flags)
-{
- EMsgComposerHdrs *new;
- EMsgComposerHdrsPrivate *priv;
-
- new = gtk_type_new (e_msg_composer_hdrs_get_type ());
- priv = new->priv;
-
- if (! setup_corba (new)) {
- gtk_widget_destroy (GTK_WIDGET (new));
- return NULL;
- }
-
- setup_headers (new, visible_flags);
-
- return GTK_WIDGET (new);
-}
-
-
-static void
-set_recipients (CamelMimeMessage *msg, GtkWidget *entry_widget, const gchar *type)
-{
- CamelInternetAddress *addr;
- char *string;
-
- bonobo_widget_get_property (BONOBO_WIDGET (entry_widget), "text", &string, NULL);
-
- addr = camel_internet_address_new ();
- camel_address_unformat (CAMEL_ADDRESS (addr), string);
-
- /* TODO: In here, we could cross-reference the names with an alias book
- or address book, it should be sufficient for unformat to do the parsing too */
-
- camel_mime_message_set_recipients (msg, type, addr);
-
- camel_object_unref (CAMEL_OBJECT (addr));
- g_free (string);
-}
-
-void
-e_msg_composer_hdrs_to_message (EMsgComposerHdrs *hdrs,
- CamelMimeMessage *msg)
-{
- CamelInternetAddress *addr;
- gchar *subject;
-
- 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));
-
- subject = e_msg_composer_hdrs_get_subject (hdrs);
- camel_mime_message_set_subject (msg, subject);
- g_free (subject);
-
- addr = e_msg_composer_hdrs_get_from (hdrs);
- camel_mime_message_set_from (msg, addr);
- camel_object_unref (CAMEL_OBJECT (addr));
-
- addr = e_msg_composer_hdrs_get_reply_to (hdrs);
- if (addr) {
- camel_mime_message_set_reply_to (msg, addr);
- camel_object_unref (CAMEL_OBJECT (addr));
- }
-
- 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);
-}
-
-
-static void
-set_entry (BonoboWidget *bonobo_widget,
- const GList *list)
-{
- GString *string;
- const GList *p;
-
- string = g_string_new ("");
- for (p = list; p != NULL; p = p->next) {
- if (string->str[0] != '\0')
- g_string_append (string, ", ");
- g_string_append (string, p->data);
- }
-
- bonobo_widget_set_property (BONOBO_WIDGET (bonobo_widget), "text", string->str, NULL);
-
- g_string_free (string, TRUE);
-}
-
-
-/* FIXME: yea, this could be better... but it's doubtful it'll be used much */
-void
-e_msg_composer_hdrs_set_from_account (EMsgComposerHdrs *hdrs,
- const char *account_name)
-{
- GtkOptionMenu *omenu;
- GtkWidget *item;
- GSList *l;
- int i = 0;
-
- g_return_if_fail (hdrs != NULL);
- g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs));
-
- omenu = GTK_OPTION_MENU (hdrs->priv->from.entry);
-
- /* find the item that represents the account and activate it */
- l = hdrs->priv->from_options;
- while (l) {
- MailConfigAccount *account;
- item = l->data;
-
- account = gtk_object_get_data (GTK_OBJECT (item), "account");
- if ((account_name && !strcmp (account_name, account->name)) ||
- (!account_name && account->default_account)) {
- /* set the correct optionlist item */
- gtk_option_menu_set_history (omenu, i);
- gtk_signal_emit_by_name (GTK_OBJECT (item), "activate", hdrs);
-
- return;
- }
-
- l = l->next;
- i++;
- }
-}
-
-void
-e_msg_composer_hdrs_set_reply_to (EMsgComposerHdrs *hdrs,
- const char *reply_to)
-{
- g_return_if_fail (hdrs != NULL);
- g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs));
-
- bonobo_widget_set_property (BONOBO_WIDGET (hdrs->priv->reply_to.entry),
- "text", reply_to, NULL);
-}
-
-void
-e_msg_composer_hdrs_set_to (EMsgComposerHdrs *hdrs,
- const GList *to_list)
-{
- g_return_if_fail (hdrs != NULL);
- g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs));
-
- set_entry (BONOBO_WIDGET (hdrs->priv->to.entry), to_list);
-}
-
-void
-e_msg_composer_hdrs_set_cc (EMsgComposerHdrs *hdrs,
- const GList *cc_list)
-{
- g_return_if_fail (hdrs != NULL);
- g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs));
-
- set_entry (BONOBO_WIDGET (hdrs->priv->cc.entry), cc_list);
-}
-
-void
-e_msg_composer_hdrs_set_bcc (EMsgComposerHdrs *hdrs,
- const GList *bcc_list)
-{
- g_return_if_fail (hdrs != NULL);
- g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs));
-
- set_entry (BONOBO_WIDGET (hdrs->priv->bcc.entry), bcc_list);
-}
-
-void
-e_msg_composer_hdrs_set_subject (EMsgComposerHdrs *hdrs,
- const char *subject)
-{
- g_return_if_fail (hdrs != NULL);
- g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs));
- g_return_if_fail (subject != NULL);
-
- gtk_object_set (GTK_OBJECT (hdrs->priv->subject.entry),
- "text", subject,
- NULL);
-}
-
-
-CamelInternetAddress *
-e_msg_composer_hdrs_get_from (EMsgComposerHdrs *hdrs)
-{
- const MailConfigAccount *account;
- CamelInternetAddress *addr;
-
- g_return_val_if_fail (hdrs != NULL, NULL);
- g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
- account = hdrs->account;
- if (!account || !account->id) {
- /* FIXME: perhaps we should try the default account? */
- return NULL;
- }
-
- addr = camel_internet_address_new ();
- camel_internet_address_add (addr, account->id->name, account->id->address);
-
- return addr;
-}
-
-CamelInternetAddress *
-e_msg_composer_hdrs_get_reply_to (EMsgComposerHdrs *hdrs)
-{
- CamelInternetAddress *addr;
- gchar *reply_to;
-
- g_return_val_if_fail (hdrs != NULL, NULL);
- g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
- gtk_object_get (GTK_OBJECT (hdrs->priv->reply_to.entry),
- "text", &reply_to, NULL);
-
- if (!reply_to || *reply_to == '\0') {
- g_free (reply_to);
- return NULL;
- }
-
- addr = camel_internet_address_new ();
- if (camel_address_unformat (CAMEL_ADDRESS (addr), reply_to) == -1) {
- g_free (reply_to);
- camel_object_unref (CAMEL_OBJECT (addr));
- return NULL;
- }
-
- g_free (reply_to);
-
- return addr;
-}
-
-/* FIXME this is currently unused and broken. */
-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);
-
- g_assert_not_reached ();
-
- return NULL;
-}
-
-/* FIXME this is currently unused and broken. */
-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);
-
- g_assert_not_reached ();
-
- return NULL;
-}
-
-/* FIXME this is currently unused and broken. */
-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);
-
- g_assert_not_reached ();
-
- return NULL;
-}
-
-char *
-e_msg_composer_hdrs_get_subject (EMsgComposerHdrs *hdrs)
-{
- gchar *subject;
-
- g_return_val_if_fail (hdrs != NULL, NULL);
- g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
- gtk_object_get (GTK_OBJECT (hdrs->priv->subject.entry),
- "text", &subject, NULL);
-
- return subject;
-}
-
-
-GtkWidget *
-e_msg_composer_hdrs_get_reply_to_entry (EMsgComposerHdrs *hdrs)
-{
- g_return_val_if_fail (hdrs != NULL, NULL);
- g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
- return hdrs->priv->reply_to.entry;
-}
-
-GtkWidget *
-e_msg_composer_hdrs_get_to_entry (EMsgComposerHdrs *hdrs)
-{
- g_return_val_if_fail (hdrs != NULL, NULL);
- g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
- return hdrs->priv->to.entry;
-}
-
-GtkWidget *
-e_msg_composer_hdrs_get_cc_entry (EMsgComposerHdrs *hdrs)
-{
- g_return_val_if_fail (hdrs != NULL, NULL);
- g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
- return hdrs->priv->cc.entry;
-}
-
-GtkWidget *
-e_msg_composer_hdrs_get_bcc_entry (EMsgComposerHdrs *hdrs)
-{
- g_return_val_if_fail (hdrs != NULL, NULL);
- g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
- return hdrs->priv->bcc.entry;
-}
-
-GtkWidget *
-e_msg_composer_hdrs_get_subject_entry (EMsgComposerHdrs *hdrs)
-{
- g_return_val_if_fail (hdrs != NULL, NULL);
- g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
- return 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 dcf2ac1d8e..0000000000
--- a/composer/e-msg-composer-hdrs.h
+++ /dev/null
@@ -1,117 +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 <gtk/gtktable.h>
-#include <camel/camel-mime-message.h>
-#include <mail/mail-config.h>
-
-#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;
-
- const MailConfigAccount *account;
-
- gboolean has_changed;
-};
-
-struct _EMsgComposerHdrsClass {
- GtkTableClass parent_class;
-
- void (* show_address_dialog) (EMsgComposerHdrs *hdrs);
-
- void (* subject_changed) (EMsgComposerHdrs *hdrs, gchar *subject);
-
- void (* hdrs_changed) (EMsgComposerHdrs *hdrs);
-};
-
-typedef enum {
- E_MSG_COMPOSER_VISIBLE_FROM = 1,
- E_MSG_COMPOSER_VISIBLE_REPLYTO = 2,
- E_MSG_COMPOSER_VISIBLE_CC = 4,
- E_MSG_COMPOSER_VISIBLE_BCC = 8,
- E_MSG_COMPOSER_VISIBLE_SUBJECT = 16
-} EMsgComposerHeaderVisibleFlags;
-
-
-GtkType e_msg_composer_hdrs_get_type (void);
-GtkWidget *e_msg_composer_hdrs_new (gint visible_flags);
-
-void e_msg_composer_hdrs_to_message (EMsgComposerHdrs *hdrs,
- CamelMimeMessage *msg);
-
-void e_msg_composer_hdrs_set_from_account (EMsgComposerHdrs *hdrs,
- const char *account_name);
-void e_msg_composer_hdrs_set_reply_to (EMsgComposerHdrs *hdrs,
- const char *reply_to);
-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);
-
-CamelInternetAddress *e_msg_composer_hdrs_get_from (EMsgComposerHdrs *hdrs);
-CamelInternetAddress *e_msg_composer_hdrs_get_reply_to (EMsgComposerHdrs *hdrs);
-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);
-char *e_msg_composer_hdrs_get_subject (EMsgComposerHdrs *hdrs);
-
-GtkWidget *e_msg_composer_hdrs_get_reply_to_entry (EMsgComposerHdrs *hdrs);
-GtkWidget *e_msg_composer_hdrs_get_to_entry (EMsgComposerHdrs *hdrs);
-GtkWidget *e_msg_composer_hdrs_get_cc_entry (EMsgComposerHdrs *hdrs);
-GtkWidget *e_msg_composer_hdrs_get_bcc_entry (EMsgComposerHdrs *hdrs);
-GtkWidget *e_msg_composer_hdrs_get_subject_entry (EMsgComposerHdrs *hdrs);
-
-gint e_msg_composer_get_hdrs_visible (EMsgComposerHdrs *hdrs);
-void e_msg_composer_set_hdrs_visible (EMsgComposerHdrs *hdrs,
- gint flags);
-
-#ifdef _cplusplus
-}
-#endif /* _cplusplus */
-
-
-#endif /* __E_MSG_COMPOSER_HDRS_H__ */
diff --git a/composer/e-msg-composer-select-file.c b/composer/e-msg-composer-select-file.c
deleted file mode 100644
index c575a6d4ad..0000000000
--- a/composer/e-msg-composer-select-file.c
+++ /dev/null
@@ -1,178 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-msg-composer-select-file.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 <gtk/gtkfilesel.h>
-#include <gtk/gtkmain.h>
-#include <gtk/gtksignal.h>
-#include "e-msg-composer-select-file.h"
-
-
-struct _FileSelectionInfo {
- GtkWidget *widget;
- char *selected_file;
-};
-typedef struct _FileSelectionInfo FileSelectionInfo;
-
-
-static void
-confirm (FileSelectionInfo *info)
-{
- const char *filename;
-
- filename = gtk_file_selection_get_filename (GTK_FILE_SELECTION (info->widget));
- info->selected_file = g_strdup (filename);
-
- gtk_widget_hide (info->widget);
-
- gtk_main_quit ();
-}
-
-static void
-cancel (FileSelectionInfo *info)
-{
- g_assert (info->selected_file == NULL);
-
- gtk_widget_hide (info->widget);
-
- gtk_main_quit ();
-}
-
-
-/* Callbacks. */
-
-static void
-ok_clicked_cb (GtkWidget *widget,
- void *data)
-{
- FileSelectionInfo *info;
-
- info = (FileSelectionInfo *) data;
- confirm (info);
-}
-
-static void
-cancel_clicked_cb (GtkWidget *widget,
- void *data)
-{
- FileSelectionInfo *info;
-
- info = (FileSelectionInfo *) data;
- cancel (info);
-}
-
-static int
-delete_event_cb (GtkWidget *widget,
- GdkEventAny *event,
- void *data)
-{
- FileSelectionInfo *info;
-
- info = (FileSelectionInfo *) data;
- cancel (info);
-
- return TRUE;
-}
-
-
-/* Setup. */
-
-static FileSelectionInfo *
-create_file_selection (EMsgComposer *composer)
-{
- FileSelectionInfo *info;
- GtkWidget *widget;
- GtkWidget *ok_button;
- GtkWidget *cancel_button;
- char *path;
-
- info = g_new (FileSelectionInfo, 1);
-
- widget = gtk_file_selection_new (NULL);
- path = g_strdup_printf ("%s/", g_get_home_dir ());
- gtk_file_selection_set_filename (GTK_FILE_SELECTION (widget), path);
- g_free (path);
- gtk_window_set_wmclass (GTK_WINDOW (widget), "fileselection",
- "Evolution:composer");
- ok_button = GTK_FILE_SELECTION (widget)->ok_button;
- cancel_button = GTK_FILE_SELECTION (widget)->cancel_button;
-
- gtk_signal_connect (GTK_OBJECT (ok_button),
- "clicked", GTK_SIGNAL_FUNC (ok_clicked_cb), info);
- gtk_signal_connect (GTK_OBJECT (cancel_button),
- "clicked", GTK_SIGNAL_FUNC (cancel_clicked_cb), info);
- gtk_signal_connect (GTK_OBJECT (widget), "delete_event",
- GTK_SIGNAL_FUNC (delete_event_cb), info);
-
- info->widget = widget;
- info->selected_file = NULL;
-
- return info;
-}
-
-static void
-file_selection_info_destroy_notify (void *data)
-{
- FileSelectionInfo *info;
-
- info = (FileSelectionInfo *) data;
-
- g_free (info->selected_file);
- g_free (info);
-}
-
-
-char *
-e_msg_composer_select_file (EMsgComposer *composer,
- const char *title)
-{
- FileSelectionInfo *info;
- char *retval;
-
- g_return_val_if_fail (composer != NULL, NULL);
- g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), NULL);
-
- info = gtk_object_get_data (GTK_OBJECT (composer),
- "e-msg-composer-file-selection-info");
-
- if (info == NULL) {
- info = create_file_selection (composer);
- gtk_object_set_data_full (GTK_OBJECT (composer),
- "e-msg-composer-file-selection-info", info,
- file_selection_info_destroy_notify);
- }
-
- if (GTK_WIDGET_VISIBLE (info->widget))
- return NULL; /* Busy! */
-
- gtk_window_set_title (GTK_WINDOW (info->widget), title);
- gtk_widget_show (info->widget);
-
- GDK_THREADS_ENTER();
- gtk_main ();
- GDK_THREADS_LEAVE();
-
- retval = info->selected_file;
- info->selected_file = NULL;
-
- return retval;
-}
diff --git a/composer/e-msg-composer-select-file.h b/composer/e-msg-composer-select-file.h
deleted file mode 100644
index 2f89bd58b4..0000000000
--- a/composer/e-msg-composer-select-file.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-msg-composer-select-file.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
- */
-
-#ifndef E_MSG_COMPOSER_SELECT_FILE_H
-#define E_MSG_COMPOSER_SELECT_FILE_H
-
-#include "e-msg-composer.h"
-
-char *e_msg_composer_select_file (EMsgComposer *composer,
- const char *title);
-
-#endif /* E_MSG_COMPOSER_SELECT_FILE_H */
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
deleted file mode 100644
index 142a71f1d7..0000000000
--- a/composer/e-msg-composer.c
+++ /dev/null
@@ -1,2801 +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.
- *
- * Authors:
- * Ettore Perazzoli (ettore@ximian.com)
- * Jeffrey Stedfast (fejj@ximian.com)
- * Miguel de Icaza (miguel@ximian.com)
- *
- */
-
-/*
-
- TODO
-
- - Somehow users should be able to see if any file(s) are attached even when
- the attachment bar is not shown.
-
- Should use EventSources to keep track of global changes made to configuration
- values. Right now it ignores the problem olympically. Miguel.
-*/
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <errno.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-config.h>
-#include <libgnomeui/gnome-app.h>
-#include <libgnomeui/gnome-uidefs.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-dialog-util.h>
-#include <libgnomeui/gnome-stock.h>
-#include <bonobo/bonobo-exception.h>
-#include <bonobo/bonobo-moniker-util.h>
-#include <bonobo/bonobo-object-client.h>
-#include <bonobo/bonobo-stream-memory.h>
-#include <bonobo/bonobo-ui-util.h>
-#include <bonobo/bonobo-widget.h>
-#include <libgnomevfs/gnome-vfs.h>
-
-#include <glade/glade.h>
-#include <gal/widgets/e-gui-utils.h>
-#include <gal/widgets/e-scroll-frame.h>
-#include <gtkhtml/gtkhtml.h>
-
-#include "camel/camel.h"
-#include "camel-charset-map.h"
-
-#include "mail/mail.h"
-#include "mail/mail-crypto.h"
-#include "mail/mail-tools.h"
-#include "mail/mail-ops.h"
-#include "mail/mail-mt.h"
-
-#include "e-util/e-html-utils.h"
-
-#include "e-msg-composer.h"
-#include "e-msg-composer-attachment-bar.h"
-#include "e-msg-composer-hdrs.h"
-#include "e-msg-composer-select-file.h"
-
-#include "Editor.h"
-#include "listener.h"
-
-#define GNOME_GTKHTML_EDITOR_CONTROL_ID "OAFIID:GNOME_GtkHTML_Editor"
-
-
-#define DEFAULT_WIDTH 600
-#define DEFAULT_HEIGHT 500
-
-enum {
- SEND,
- POSTPONE,
- LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-static GnomeAppClass *parent_class = NULL;
-
-/* local prototypes */
-static GList *add_recipients (GList *list, const char *recips, gboolean decode);
-static void free_recipients (GList *list);
-static void handle_multipart (EMsgComposer *composer, CamelMultipart *multipart, int depth);
-
-
-static char *
-get_text (Bonobo_PersistStream persist, char *format)
-{
- BonoboStream *stream;
- BonoboStreamMem *stream_mem;
- CORBA_Environment ev;
- char *text;
-
- CORBA_exception_init (&ev);
-
- stream = bonobo_stream_mem_create (NULL, 0, FALSE, TRUE);
- Bonobo_PersistStream_save (persist, (Bonobo_Stream)bonobo_object_corba_objref (BONOBO_OBJECT (stream)),
- format, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("Exception getting mail '%s'",
- bonobo_exception_get_text (&ev));
- return NULL;
- }
-
- 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;
-}
-
-#define LINE_LEN 72
-
-typedef enum {
- MSG_FORMAT_PLAIN,
- MSG_FORMAT_ALTERNATIVE,
-} MsgFormat;
-
-static gboolean
-is_8bit (const guchar *text)
-{
- guchar *c;
-
- for (c = (guchar *) text; *c; c++)
- if (*c > (guchar) 127)
- return TRUE;
-
- return FALSE;
-}
-
-static int
-best_encoding (const guchar *text)
-{
- guchar *ch;
- int count = 0;
- int total;
-
- for (ch = (guchar *) text; *ch; ch++)
- if (*ch > (guchar) 127)
- count++;
-
- total = (int) (ch - text);
-
- if ((float) count <= total * 0.17)
- return CAMEL_MIME_PART_ENCODING_QUOTEDPRINTABLE;
- else
- return CAMEL_MIME_PART_ENCODING_BASE64;
-}
-
-static char *
-best_content (gchar *plain)
-{
- char *result;
- const char *best;
-
- if ((best = camel_charset_best (plain, strlen (plain)))) {
- result = g_strdup_printf ("text/plain; charset=%s", best);
- } else {
- result = g_strdup ("text/plain");
- }
-
- return result;
-}
-
-static gboolean
-clear_inline_images (gpointer key, gpointer value, gpointer user_data)
-{
- g_free (key);
- g_free (value);
-
- return TRUE;
-}
-
-void
-e_msg_composer_clear_inlined_table (EMsgComposer *composer)
-{
- g_hash_table_foreach_remove (composer->inline_images, clear_inline_images, NULL);
-}
-
-static void
-add_inlined_image (gpointer key, gpointer value, gpointer data)
-{
- gchar *file_name = (gchar *) key;
- gchar *cid = (gchar *) value;
- gchar *id, *mime_type;
- CamelMultipart *multipart = (CamelMultipart *) data;
- CamelStream *stream;
- CamelDataWrapper *wrapper;
- CamelMimePart *part;
- struct stat statbuf;
-
- /* check for regular file */
- if (stat (file_name, &statbuf) < 0 || !S_ISREG (statbuf.st_mode))
- return;
-
- if (!(stream = camel_stream_fs_new_with_name (file_name, O_RDONLY, 0)))
- return;
-
- wrapper = camel_data_wrapper_new ();
- camel_data_wrapper_construct_from_stream (wrapper, stream);
- camel_object_unref (CAMEL_OBJECT (stream));
-
- mime_type = e_msg_composer_guess_mime_type (file_name);
- camel_data_wrapper_set_mime_type (wrapper, mime_type ? mime_type : "application/octet-stream");
- g_free (mime_type);
-
- part = camel_mime_part_new ();
- camel_medium_set_content_object (CAMEL_MEDIUM (part), wrapper);
- camel_object_unref (CAMEL_OBJECT (wrapper));
-
- id = g_strconcat ("<", cid, ">", NULL);
- camel_mime_part_set_content_id (part, id);
- g_free (id);
- /* FIXME: should this use g_basename (file_name)? */
- camel_mime_part_set_filename (part, strchr (file_name, '/') ? strrchr (file_name, '/') + 1 : file_name);
- camel_mime_part_set_encoding (part, CAMEL_MIME_PART_ENCODING_BASE64);
-
- camel_multipart_add_part (multipart, part);
- camel_object_unref (CAMEL_OBJECT (part));
-}
-
-static void
-add_inlined_images (EMsgComposer *composer, CamelMultipart *multipart)
-{
- g_hash_table_foreach (composer->inline_images, add_inlined_image, multipart);
-}
-
-/* This functions builds a CamelMimeMessage for the message that the user has
- composed in `composer'. */
-static CamelMimeMessage *
-build_message (EMsgComposer *composer)
-{
- EMsgComposerAttachmentBar *attachment_bar =
- E_MSG_COMPOSER_ATTACHMENT_BAR (composer->attachment_bar);
- MsgFormat type = MSG_FORMAT_ALTERNATIVE;
- CamelInternetAddress *from;
- CamelMimeMessage *new;
- CamelMultipart *body = NULL;
- CamelMimePart *part;
- gboolean plain_e8bit = FALSE, html_e8bit = FALSE;
- CamelException ex;
- char *html = NULL, *plain = NULL;
- char *content_type = NULL;
- int i;
-
- if (composer->persist_stream_interface == CORBA_OBJECT_NIL)
- return NULL;
-
- if (composer->send_html)
- type = MSG_FORMAT_ALTERNATIVE;
- else
- type = MSG_FORMAT_PLAIN;
-
- /* get and/or set the From field */
- from = e_msg_composer_hdrs_get_from (E_MSG_COMPOSER_HDRS (composer->hdrs));
- if (!from) {
- const MailConfigAccount *account = NULL;
-
- account = mail_config_get_default_account ();
-
- /* if !account then we have mucho problemos, amigo */
- if (!account)
- return NULL;
-
- e_msg_composer_hdrs_set_from_account (E_MSG_COMPOSER_HDRS (composer->hdrs), account->name);
- }
- camel_object_unref (CAMEL_OBJECT (from));
-
- 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]);
- }
-
- plain = get_text (composer->persist_stream_interface, "text/plain");
-
- /* the component has probably died */
- if (plain == NULL)
- return NULL;
-
- plain_e8bit = is_8bit (plain);
-
- if (type != MSG_FORMAT_PLAIN) {
- e_msg_composer_clear_inlined_table (composer);
- html = get_text (composer->persist_stream_interface, "text/html");
-
- html_e8bit = is_8bit (html);
- /* the component has probably died */
- if (html == NULL) {
- g_free (plain);
- return NULL;
- }
- }
-
- if (type == MSG_FORMAT_ALTERNATIVE) {
- body = camel_multipart_new ();
- camel_data_wrapper_set_mime_type (CAMEL_DATA_WRAPPER (body),
- "multipart/alternative");
- camel_multipart_set_boundary (body, NULL);
-
- part = camel_mime_part_new ();
-
- content_type = best_content (plain);
- camel_mime_part_set_content (part, plain, strlen (plain), content_type);
- g_free (content_type);
-
- if (plain_e8bit)
- camel_mime_part_set_encoding (part, best_encoding (plain));
-
- g_free (plain);
- camel_multipart_add_part (body, part);
- camel_object_unref (CAMEL_OBJECT (part));
-
- part = camel_mime_part_new ();
- if (g_hash_table_size (composer->inline_images)) {
- CamelMultipart *html_with_images;
- CamelMimePart *text_html;
-
- html_with_images = camel_multipart_new ();
- camel_data_wrapper_set_mime_type (CAMEL_DATA_WRAPPER (html_with_images),
- "multipart/related");
- camel_multipart_set_boundary (html_with_images, NULL);
-
- text_html = camel_mime_part_new ();
- camel_mime_part_set_content (text_html, html, strlen (html), "text/html; charset=utf-8");
-
- if (html_e8bit)
- camel_mime_part_set_encoding (text_html, best_encoding (html));
-
- camel_multipart_add_part (html_with_images, text_html);
- camel_object_unref (CAMEL_OBJECT (text_html));
-
- add_inlined_images (composer, html_with_images);
- camel_medium_set_content_object (CAMEL_MEDIUM (part),
- CAMEL_DATA_WRAPPER (html_with_images));
- } else {
- camel_mime_part_set_content (part, html, strlen (html), "text/html; charset=utf-8");
-
- if (html_e8bit)
- camel_mime_part_set_encoding (part, best_encoding (html));
- }
-
- g_free (html);
-
- camel_multipart_add_part (body, part);
- camel_object_unref (CAMEL_OBJECT (part));
- }
-
- if (e_msg_composer_attachment_bar_get_num_attachments (attachment_bar)) {
- CamelMultipart *multipart = camel_multipart_new ();
-
- /* Generate a random boundary. */
- camel_multipart_set_boundary (multipart, NULL);
-
- part = camel_mime_part_new ();
- switch (type) {
- case MSG_FORMAT_ALTERNATIVE:
- camel_medium_set_content_object (CAMEL_MEDIUM (part),
- CAMEL_DATA_WRAPPER (body));
- camel_object_unref (CAMEL_OBJECT (body));
- break;
- case MSG_FORMAT_PLAIN:
- content_type = best_content (plain);
- camel_mime_part_set_content (part, plain, strlen (plain), content_type);
- g_free (content_type);
-
- if (plain_e8bit)
- camel_mime_part_set_encoding (part, best_encoding (plain));
-
- g_free (plain);
- break;
- }
- camel_multipart_add_part (multipart, part);
- camel_object_unref (CAMEL_OBJECT (part));
-
- e_msg_composer_attachment_bar_to_multipart (attachment_bar, multipart);
-
- part = camel_mime_part_new ();
- camel_medium_set_content_object (CAMEL_MEDIUM (part), CAMEL_DATA_WRAPPER (multipart));
- camel_object_unref (CAMEL_OBJECT (multipart));
- } else {
- switch (type) {
- case MSG_FORMAT_ALTERNATIVE:
- part = camel_mime_part_new ();
-
- camel_medium_set_content_object (CAMEL_MEDIUM (part), CAMEL_DATA_WRAPPER (body));
- camel_object_unref (CAMEL_OBJECT (body));
- break;
- case MSG_FORMAT_PLAIN:
- part = camel_mime_part_new ();
-
- content_type = best_content (plain);
- camel_mime_part_set_content (CAMEL_MIME_PART (part), plain, strlen (plain), content_type);
- g_free (content_type);
-
- if (plain_e8bit)
- camel_mime_part_set_encoding (part, best_encoding (plain));
-
- g_free (plain);
-
- break;
- }
- }
-
- camel_exception_init (&ex);
-
- if (composer->pgp_sign) {
- /* FIXME: should use the PGP key id rather than email address */
- const char *pgpid;
-
- camel_exception_init (&ex);
- from = e_msg_composer_hdrs_get_from (E_MSG_COMPOSER_HDRS (composer->hdrs));
- camel_internet_address_get (from, 0, NULL, &pgpid);
- mail_crypto_pgp_mime_part_sign (&part, pgpid, CAMEL_CIPHER_HASH_SHA1,
- &ex);
- camel_object_unref (CAMEL_OBJECT (from));
- if (camel_exception_is_set (&ex))
- goto exception;
- }
-
- if (composer->pgp_encrypt) {
- /* FIXME: recipients should be an array of key ids rather than email addresses */
- const CamelInternetAddress *addr;
- const char *address;
- GPtrArray *recipients;
- int i, len;
-
- camel_exception_init (&ex);
- recipients = g_ptr_array_new ();
-
- addr = camel_mime_message_get_recipients (new, CAMEL_RECIPIENT_TYPE_TO);
- len = camel_address_length (CAMEL_ADDRESS (addr));
- for (i = 0; i < len; i++) {
- camel_internet_address_get (addr, i, NULL, &address);
- g_ptr_array_add (recipients, g_strdup (address));
- }
-
- addr = camel_mime_message_get_recipients (new, CAMEL_RECIPIENT_TYPE_CC);
- len = camel_address_length (CAMEL_ADDRESS (addr));
- for (i = 0; i < len; i++) {
- camel_internet_address_get (addr, i, NULL, &address);
- g_ptr_array_add (recipients, g_strdup (address));
- }
-
- addr = camel_mime_message_get_recipients (new, CAMEL_RECIPIENT_TYPE_BCC);
- len = camel_address_length (CAMEL_ADDRESS (addr));
- for (i = 0; i < len; i++) {
- camel_internet_address_get (addr, i, NULL, &address);
- g_ptr_array_add (recipients, g_strdup (address));
- }
-
- mail_crypto_pgp_mime_part_encrypt (&part, recipients, &ex);
- for (i = 0; i < recipients->len; i++)
- g_free (recipients->pdata[i]);
- g_ptr_array_free (recipients, TRUE);
- if (camel_exception_is_set (&ex))
- goto exception;
- }
-
- camel_medium_set_content_object (CAMEL_MEDIUM (new),
- camel_medium_get_content_object (CAMEL_MEDIUM (part)));
- camel_object_unref (CAMEL_OBJECT (part));
-
- return new;
-
- exception:
-
- camel_object_unref (CAMEL_OBJECT (part));
- camel_object_unref (CAMEL_OBJECT (new));
-
- if (camel_exception_is_set (&ex)) {
- GtkWidget *dialog;
-
- dialog = gnome_error_dialog_parented (camel_exception_get_description (&ex),
- GTK_WINDOW (composer));
- gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
- camel_exception_clear (&ex);
- }
-
- return NULL;
-}
-
-static char *
-get_signature (const char *sigfile, gboolean in_html)
-{
- GString *rawsig;
- gchar buf[1024];
- gchar *file_name;
- gchar *htmlsig = NULL;
- int fd, n;
-
- if (!sigfile || !*sigfile) {
- return NULL;
- }
-
- file_name = in_html ? g_strconcat (sigfile, ".html", NULL) : (gchar *) sigfile;
-
- fd = open (file_name, O_RDONLY);
- if (fd == -1) {
- char *msg;
-
- msg = g_strdup_printf (_("Could not open signature file %s:\n"
- "%s"), file_name, g_strerror (errno));
- gnome_error_dialog (msg);
- g_free (msg);
-
- htmlsig = NULL;
- } else {
- rawsig = g_string_new ("");
- while ((n = read (fd, buf, 1023)) > 0) {
- buf[n] = '\0';
- g_string_append (rawsig, buf);
- }
- close (fd);
-
- htmlsig = in_html ? rawsig->str : e_text_to_html (rawsig->str, 0);
- g_string_free (rawsig, !in_html);
- }
- if (in_html) g_free (file_name);
-
- return htmlsig;
-}
-
-static void
-prepare_engine (EMsgComposer *composer)
-{
- CORBA_Environment ev;
-
- g_assert (composer);
- g_assert (E_IS_MSG_COMPOSER (composer));
-
- /* printf ("prepare_engine\n"); */
-
- CORBA_exception_init (&ev);
- composer->editor_engine = (GNOME_GtkHTML_Editor_Engine) bonobo_object_client_query_interface
- (bonobo_widget_get_server (BONOBO_WIDGET (composer->editor)), "IDL:GNOME/GtkHTML/Editor/Engine:1.0", &ev);
- if (composer->editor_engine != CORBA_OBJECT_NIL) {
-
- /* printf ("trying set listener\n"); */
- composer->editor_listener = BONOBO_OBJECT (listener_new (composer));
- if (composer->editor_listener != CORBA_OBJECT_NIL)
- GNOME_GtkHTML_Editor_Engine__set_listener (composer->editor_engine,
- (GNOME_GtkHTML_Editor_Listener)
- bonobo_object_dup_ref
- (bonobo_object_corba_objref (composer->editor_listener), &ev),
- &ev);
- else
- g_warning ("Can't establish Editor Listener\n");
- } else
- g_warning ("Can't get Editor Engine\n");
- CORBA_exception_free (&ev);
-}
-
-void
-e_msg_composer_mark_text_orig (EMsgComposer *composer)
-{
- g_assert (composer);
- g_assert (E_IS_MSG_COMPOSER (composer));
-
- if (composer->editor_engine != CORBA_OBJECT_NIL) {
- CORBA_Environment ev;
- CORBA_any *flag = bonobo_arg_new (TC_boolean);
- *((CORBA_boolean *) flag->_value) = CORBA_TRUE;
-
- CORBA_exception_init (&ev);
- GNOME_GtkHTML_Editor_Engine_setObjectDataByType (composer->editor_engine, "ClueFlow", "orig", flag, &ev);
- CORBA_free (flag);
- CORBA_exception_free (&ev);
- }
-}
-
-static void
-set_editor_text (EMsgComposer *composer, const char *sig_file, const char *text)
-{
- Bonobo_PersistStream persist;
- BonoboStream *stream;
- BonoboWidget *editor;
- CORBA_Environment ev;
- char *sig, *fulltext;
- gboolean html_sig = composer->send_html;
-
- editor = BONOBO_WIDGET (composer->editor);
- sig = get_signature (sig_file, html_sig);
- /* if we tried HTML sig and it's not available, try also non HTML signature */
- if (html_sig && !sig) {
- html_sig = FALSE;
- sig = get_signature (sig_file, html_sig);
- }
-
- if (sig) {
- if (html_sig)
- fulltext = g_strdup_printf ("%s<br>%s",
- text, sig);
- else if (!strncmp ("-- \n", sig, 3))
- fulltext = g_strdup_printf ("%s<br>\n<pre>\n%s</pre>",
- text, sig);
- else
- fulltext = g_strdup_printf ("%s<br>\n<pre>\n-- \n%s</pre>",
- text, sig);
- } else {
- if (!*text)
- return;
- 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
-set_config (EMsgComposer *composer, char *key, int val)
-{
- if (composer->property_bag){
- CORBA_Environment ev;
- CORBA_exception_init (&ev);
-
- bonobo_property_bag_client_set_value_gint (
- composer->property_bag, key, val, &ev);
- CORBA_exception_free (&ev);
- return;
- } else {
- char *full_key;
-
- full_key = g_strconcat ("Evolution/Composer/", key, NULL);
- gnome_config_set_int (full_key, val);
- g_free (full_key);
- }
-}
-
-
-/* Commands. */
-
-static void
-show_attachments (EMsgComposer *composer,
- gboolean show)
-{
- if (show) {
- gtk_widget_show (composer->attachment_scroll_frame);
- gtk_widget_show (composer->attachment_bar);
- } else {
- gtk_widget_hide (composer->attachment_scroll_frame);
- 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. */
-}
-
-static void
-save (EMsgComposer *composer,
- const char *file_name)
-{
- CORBA_Environment ev;
- char *my_file_name;
-
- if (file_name != NULL)
- my_file_name = g_strdup (file_name);
- else
- my_file_name = e_msg_composer_select_file (composer, _("Save as..."));
-
- if (my_file_name == NULL)
- return;
-
- CORBA_exception_init (&ev);
-
- Bonobo_PersistFile_save (composer->persist_file_interface, my_file_name, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- e_notice (GTK_WINDOW (composer), GNOME_MESSAGE_BOX_ERROR,
- _("Error saving file: %s"), g_basename (file_name));
- }
-
- CORBA_exception_free (&ev);
-
- g_free (my_file_name);
-}
-
-static void
-load (EMsgComposer *composer,
- const char *file_name)
-{
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
-
- Bonobo_PersistFile_load (composer->persist_file_interface, file_name, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION)
- e_notice (GTK_WINDOW (composer), GNOME_MESSAGE_BOX_ERROR,
- _("Error loading file: %s"), g_basename (file_name));
-
- CORBA_exception_free (&ev);
-}
-
-/* Exit dialog. (Displays a "Save composition to 'Drafts' before exiting?" warning before actually exiting.) */
-
-enum { REPLY_YES = 0, REPLY_NO, REPLY_CANCEL };
-
-struct _save_info {
- EMsgComposer *composer;
- int quitok;
-};
-
-static void
-save_done (CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info, int ok, void *data)
-{
- struct _save_info *si = data;
-
- if (ok && si->quitok)
- gtk_widget_destroy (GTK_WIDGET (si->composer));
- else
- gtk_object_unref (GTK_OBJECT (si->composer));
-
- g_free (info);
- g_free (si);
-}
-
-extern CamelFolder *drafts_folder;
-extern char *default_drafts_folder_uri;
-
-static void
-use_default_drafts_cb (gint reply, gpointer data)
-{
- CamelFolder **folder = data;
-
- if (reply == 0)
- *folder = drafts_folder;
-}
-
-static void
-save_folder (char *uri, CamelFolder *folder, gpointer data)
-{
- CamelFolder **save = data;
-
- if (folder) {
- *save = folder;
- camel_object_ref (CAMEL_OBJECT (folder));
- }
-}
-
-static void
-save_draft (EMsgComposer *composer, int quitok)
-{
- CamelMimeMessage *msg;
- CamelMessageInfo *info;
- const MailConfigAccount *account;
- struct _save_info *si;
- gboolean old_send_html;
- CamelFolder *folder = NULL;
-
- account = e_msg_composer_get_preferred_account (composer);
- if (account && account->drafts_folder_uri &&
- strcmp (account->drafts_folder_uri, default_drafts_folder_uri) != 0) {
- int id;
-
- id = mail_get_folder (account->drafts_folder_uri, save_folder, &folder);
- mail_msg_wait (id);
-
- if (!folder) {
- GtkWidget *dialog;
-
- dialog = gnome_ok_cancel_dialog_parented (_("Unable to open the drafts folder for this account.\n"
- "Would you like to use the default drafts folder?"),
- use_default_drafts_cb, &folder, GTK_WINDOW (composer));
- gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
- if (!folder)
- return;
- }
- } else
- folder = drafts_folder;
-
- /* always save drafts as HTML to keep formatting */
- old_send_html = composer->send_html;
- composer->send_html = TRUE;
- msg = e_msg_composer_get_message (composer);
- composer->send_html = old_send_html;
-
- info = g_new0 (CamelMessageInfo, 1);
- info->flags = CAMEL_MESSAGE_DRAFT;
-
- si = g_malloc (sizeof (*si));
- si->composer = composer;
- gtk_object_ref (GTK_OBJECT (composer));
- si->quitok = quitok;
-
- mail_append_mail (folder, msg, info, save_done, si);
- camel_object_unref (CAMEL_OBJECT (msg));
-}
-
-static void
-menu_file_save_draft_cb (BonoboUIComponent *uic, void *data, const char *path)
-{
- save_draft (E_MSG_COMPOSER (data), FALSE);
-}
-
-static void
-exit_dialog_cb (int reply, EMsgComposer *composer)
-{
- switch (reply) {
- case REPLY_YES:
- /* this has to be done async */
- save_draft(composer, TRUE);
- break;
- case REPLY_NO:
- gtk_widget_destroy (GTK_WIDGET (composer));
- break;
- case REPLY_CANCEL:
- default:
- }
-}
-
-static void
-do_exit (EMsgComposer *composer)
-{
- GtkWidget *dialog;
- GtkWidget *label;
- gint button;
-
- if (composer->has_changed) {
- dialog = gnome_dialog_new (_("Evolution"),
- GNOME_STOCK_BUTTON_YES, /* Save */
- GNOME_STOCK_BUTTON_NO, /* Don't save */
- GNOME_STOCK_BUTTON_CANCEL, /* Cancel */
- NULL);
-
- label = gtk_label_new (_("This message has not been sent.\n\nDo you wish to save your changes?"));
- gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox), label, TRUE, TRUE, 0);
- gtk_widget_show (label);
- gnome_dialog_set_parent (GNOME_DIALOG (dialog), GTK_WINDOW (composer));
- gnome_dialog_set_default (GNOME_DIALOG (dialog), 0);
- button = gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
-
- exit_dialog_cb (button, composer);
- } else {
- gtk_widget_destroy (GTK_WIDGET (composer));
- }
-}
-
-/* Menu callbacks. */
-
-static void
-menu_file_open_cb (BonoboUIComponent *uic,
- void *data,
- const char *path)
-{
- EMsgComposer *composer;
- char *file_name;
-
- composer = E_MSG_COMPOSER (data);
-
- file_name = e_msg_composer_select_file (composer, _("Open file"));
- if (file_name == NULL)
- return;
-
- load (composer, file_name);
-
- g_free (file_name);
-}
-
-static void
-menu_file_save_cb (BonoboUIComponent *uic,
- void *data,
- const char *path)
-{
- EMsgComposer *composer;
- CORBA_char *file_name;
- CORBA_Environment ev;
-
- composer = E_MSG_COMPOSER (data);
-
- CORBA_exception_init (&ev);
-
- file_name = Bonobo_PersistFile_getCurrentFile (composer->persist_file_interface, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- save (composer, NULL);
- } else {
- save (composer, file_name);
- CORBA_free (file_name);
- }
-
- CORBA_exception_free (&ev);
-}
-
-static void
-menu_file_save_as_cb (BonoboUIComponent *uic,
- void *data,
- const char *path)
-{
- EMsgComposer *composer;
-
- composer = E_MSG_COMPOSER (data);
-
- save (composer, NULL);
-}
-
-static void
-menu_file_send_cb (BonoboUIComponent *uic,
- void *data,
- const char *path)
-{
- gtk_signal_emit (GTK_OBJECT (data), signals[SEND]);
-}
-
-static void
-menu_file_send_later_cb (BonoboUIComponent *uic,
- void *data,
- const char *path)
-{
- gtk_signal_emit (GTK_OBJECT (data), signals[POSTPONE]);
-}
-
-static void
-menu_file_close_cb (BonoboUIComponent *uic,
- void *data,
- const char *path)
-{
- EMsgComposer *composer;
-
- composer = E_MSG_COMPOSER (data);
- do_exit (composer);
-}
-
-static void
-menu_file_add_attachment_cb (BonoboUIComponent *uic,
- void *data,
- const char *path)
-{
- EMsgComposer *composer;
-
- composer = E_MSG_COMPOSER (data);
-
- e_msg_composer_attachment_bar_attach
- (E_MSG_COMPOSER_ATTACHMENT_BAR (composer->attachment_bar),
- NULL);
-}
-
-static void
-menu_view_attachments_activate_cb (BonoboUIComponent *component,
- const char *path,
- Bonobo_UIComponent_EventType type,
- const char *state,
- gpointer user_data)
-
-{
- gboolean new_state;
-
- if (type != Bonobo_UIComponent_STATE_CHANGED)
- return;
-
- new_state = atoi (state);
-
- e_msg_composer_show_attachments (E_MSG_COMPOSER (user_data), new_state);
-}
-
-#if 0
-static void
-insert_file_ok_cb (GtkWidget *widget, void *user_data)
-{
- GtkFileSelection *fs;
- GdkAtom selection_atom = GDK_NONE;
- char *name;
- EMsgComposer *composer;
- struct stat sb;
- int fd;
- guint8 *buffer;
- size_t bufsz, actual;
-
- fs = GTK_FILE_SELECTION (gtk_widget_get_ancestor (widget,
- GTK_TYPE_FILE_SELECTION));
- composer = E_MSG_COMPOSER (user_data);
- name = gtk_file_selection_get_filename (fs);
-
- if (stat (name, &sb) < 0) {
- GtkWidget *dlg;
-
- dlg = gnome_error_dialog_parented( _("That file does not exist."),
- GTK_WINDOW (fs));
- gnome_dialog_run_and_close (GNOME_DIALOG (dlg));
- gtk_widget_destroy (GTK_WIDGET (dlg));
- return;
- }
-
- if (!(S_ISREG (sb.st_mode))) {
- GtkWidget *dlg;
-
- dlg = gnome_error_dialog_parented (_("That is not a regular file."),
- GTK_WINDOW (fs));
- gnome_dialog_run_and_close (GNOME_DIALOG (dlg));
- gtk_widget_destroy (GTK_WIDGET (dlg));
- return;
- }
-
- if (access (name, R_OK) != 0) {
- GtkWidget *dlg;
-
- dlg = gnome_error_dialog_parented (_("That file exists but is not readable."),
- GTK_WINDOW (fs));
- gnome_dialog_run_and_close (GNOME_DIALOG (dlg));
- gtk_widget_destroy (GTK_WIDGET (dlg));
- return;
- }
-
- if ((fd = open (name, O_RDONLY)) < 0) {
- GtkWidget *dlg;
-
- dlg = gnome_error_dialog_parented (_("That file appeared accesible but open(2) failed."),
- GTK_WINDOW (fs));
- gnome_dialog_run_and_close (GNOME_DIALOG (dlg));
- gtk_widget_destroy (GTK_WIDGET (dlg));
- return;
- }
-
- buffer = NULL;
- bufsz = 0;
- actual = 0;
-#define CHUNK 5120
-
- while (TRUE) {
- ssize_t chunk;
-
- if (bufsz - actual < CHUNK) {
- bufsz += CHUNK;
-
- if (bufsz >= 102400) {
- GtkWidget *dlg;
- gint result;
-
- dlg = gnome_dialog_new (_("The file is very large (more than 100K).\n"
- "Are you sure you wish to insert it?"),
- GNOME_STOCK_BUTTON_YES,
- GNOME_STOCK_BUTTON_NO,
- NULL);
- gnome_dialog_set_parent (GNOME_DIALOG (dlg), GTK_WINDOW (fs));
- result = gnome_dialog_run_and_close (GNOME_DIALOG (dlg));
- gtk_widget_destroy (GTK_WIDGET (dlg));
-
- if (result == 1)
- goto cleanup;
- }
-
- buffer = g_realloc (buffer, bufsz * sizeof (guint8));
- }
-
- chunk = read (fd, &(buffer[actual]), CHUNK);
-
- if (chunk < 0) {
- GtkWidget *dlg;
-
- dlg = gnome_error_dialog_parented (_("An error occurred while reading the file."),
- GTK_WINDOW (fs));
- gnome_dialog_run_and_close (GNOME_DIALOG (dlg));
- gtk_widget_destroy (GTK_WIDGET (dlg));
- goto cleanup;
- }
-
- if (chunk == 0)
- break;
-
- actual += chunk;
- }
-
- buffer[actual] = '\0';
-
- if (selection_atom == GDK_NONE)
- selection_atom = gdk_atom_intern ("TEMP_PASTE", FALSE);
- gtk_object_set_data (GTK_OBJECT (fs), "ev_file_buffer", buffer);
- gtk_selection_owner_set (GTK_WIDGET (fs), selection_atom, GDK_CURRENT_TIME);
- /*gtk_html_paste (composer->send_html);*/
-
- cleanup:
- close (fd);
- g_free (buffer);
- gtk_widget_destroy (GTK_WIDGET (fs));
-}
-
-static void
-fs_selection_get (GtkWidget *widget, GtkSelectionData *sdata,
- guint info, guint time)
-{
- gchar *buffer;
- GdkAtom encoding;
- gint format;
- guchar *ctext;
- gint length;
-
- buffer = gtk_object_get_data (GTK_OBJECT (widget), "ev_file_buffer");
- if (gdk_string_to_compound_text (buffer, &encoding, &format, &ctext,
- &length) == Success)
- gtk_selection_data_set (sdata, encoding, format, ctext, length);
- g_free (buffer);
- gtk_object_remove_data (GTK_OBJECT (widget), "ev_file_buffer");
-}
-#endif
-
-static void
-menu_file_insert_file_cb (BonoboUIComponent *uic,
- void *data,
- const char *path)
-{
-#if 0
- EMsgComposer *composer;
- GtkFileSelection *fs;
-
- composer = E_MSG_COMPOSER (data);
-
- fs = GTK_FILE_SELECTION (gtk_file_selection_new ("Choose File"));
- /* FIXME: remember the location or something */
- /*gtk_file_selection_set_filename( fs, g_get_home_dir() );*/
- gtk_signal_connect (GTK_OBJECT (fs->ok_button), "clicked",
- GTK_SIGNAL_FUNC (insert_file_ok_cb), data);
- gtk_signal_connect_object (GTK_OBJECT (fs->cancel_button),
- "clicked",
- GTK_SIGNAL_FUNC (gtk_widget_destroy),
- GTK_OBJECT (fs));
- gtk_widget_show (GTK_WIDGET(fs));
-#else
- g_message ("Insert file is unimplemented! oh no!");
-#endif
-}
-
-static void
-menu_format_html_cb (BonoboUIComponent *component,
- const char *path,
- Bonobo_UIComponent_EventType type,
- const char *state,
- gpointer user_data)
-
-{
- if (type != Bonobo_UIComponent_STATE_CHANGED)
- return;
-
- e_msg_composer_set_send_html (E_MSG_COMPOSER (user_data), atoi (state));
-}
-
-static void
-menu_security_pgp_sign_cb (BonoboUIComponent *component,
- const char *path,
- Bonobo_UIComponent_EventType type,
- const char *state,
- gpointer composer)
-
-{
- if (type != Bonobo_UIComponent_STATE_CHANGED)
- return;
-
- e_msg_composer_set_pgp_sign (E_MSG_COMPOSER (composer), atoi (state));
-}
-
-static void
-menu_security_pgp_encrypt_cb (BonoboUIComponent *component,
- const char *path,
- Bonobo_UIComponent_EventType type,
- const char *state,
- gpointer composer)
-
-{
- if (type != Bonobo_UIComponent_STATE_CHANGED)
- return;
-
- e_msg_composer_set_pgp_encrypt (E_MSG_COMPOSER (composer), atoi (state));
-}
-
-static void
-menu_view_from_cb (BonoboUIComponent *component,
- const char *path,
- Bonobo_UIComponent_EventType type,
- const char *state,
- gpointer user_data)
-{
- if (type != Bonobo_UIComponent_STATE_CHANGED)
- return;
-
- e_msg_composer_set_view_from (E_MSG_COMPOSER (user_data), atoi (state));
-}
-
-static void
-menu_view_replyto_cb (BonoboUIComponent *component,
- const char *path,
- Bonobo_UIComponent_EventType type,
- const char *state,
- gpointer user_data)
-{
- if (type != Bonobo_UIComponent_STATE_CHANGED)
- return;
-
- e_msg_composer_set_view_replyto (E_MSG_COMPOSER (user_data), atoi (state));
-}
-
-static void
-menu_view_bcc_cb (BonoboUIComponent *component,
- const char *path,
- Bonobo_UIComponent_EventType type,
- const char *state,
- gpointer user_data)
-{
- if (type != Bonobo_UIComponent_STATE_CHANGED)
- return;
-
- e_msg_composer_set_view_bcc (E_MSG_COMPOSER (user_data), atoi (state));
-}
-
-static void
-menu_view_cc_cb (BonoboUIComponent *component,
- const char *path,
- Bonobo_UIComponent_EventType type,
- const char *state,
- gpointer user_data)
-{
- if (type != Bonobo_UIComponent_STATE_CHANGED)
- return;
-
- e_msg_composer_set_view_cc (E_MSG_COMPOSER (user_data), atoi (state));
-}
-
-
-static BonoboUIVerb verbs [] = {
-
- BONOBO_UI_VERB ("FileOpen", menu_file_open_cb),
- BONOBO_UI_VERB ("FileSave", menu_file_save_cb),
- BONOBO_UI_VERB ("FileSaveAs", menu_file_save_as_cb),
- BONOBO_UI_VERB ("FileSaveDraft", menu_file_save_draft_cb),
- BONOBO_UI_VERB ("FileClose", menu_file_close_cb),
-
- BONOBO_UI_VERB ("FileInsertFile", menu_file_insert_file_cb),
- BONOBO_UI_VERB ("FileAttach", menu_file_add_attachment_cb),
-
- BONOBO_UI_VERB ("FileSend", menu_file_send_cb),
- BONOBO_UI_VERB ("FileSendLater", menu_file_send_later_cb),
-
- BONOBO_UI_VERB_END
-};
-
-static void
-setup_ui (EMsgComposer *composer)
-{
- BonoboUIContainer *container;
-
- container = bonobo_ui_container_new ();
- bonobo_ui_container_set_win (container, BONOBO_WINDOW (composer));
-
- composer->uic = bonobo_ui_component_new ("evolution-message-composer");
- bonobo_ui_component_set_container (
- composer->uic, bonobo_object_corba_objref (BONOBO_OBJECT (container)));
-
- bonobo_ui_component_add_verb_list_with_data (
- composer->uic, verbs, composer);
-
- bonobo_ui_util_set_ui (composer->uic, EVOLUTION_DATADIR,
- "evolution-message-composer.xml",
- "evolution-message-composer");
-
- /* Format -> HTML */
- bonobo_ui_component_set_prop (
- composer->uic, "/commands/FormatHtml",
- "state", composer->send_html ? "1" : "0", NULL);
- bonobo_ui_component_add_listener (
- composer->uic, "FormatHtml",
- menu_format_html_cb, composer);
-
- /* View/From */
- bonobo_ui_component_set_prop (
- composer->uic, "/commands/ViewFrom",
- "state", composer->view_from ? "1" : "0", NULL);
- bonobo_ui_component_add_listener (
- composer->uic, "ViewFrom",
- menu_view_from_cb, composer);
-
- /* View/ReplyTo */
- bonobo_ui_component_set_prop (
- composer->uic, "/commands/ViewReplyTo",
- "state", composer->view_replyto ? "1" : "0", NULL);
- bonobo_ui_component_add_listener (
- composer->uic, "ViewReplyTo",
- menu_view_replyto_cb, composer);
-
- /* View/BCC */
- bonobo_ui_component_set_prop (
- composer->uic, "/commands/ViewBCC",
- "state", composer->view_bcc ? "1" : "0", NULL);
- bonobo_ui_component_add_listener (
- composer->uic, "ViewBCC",
- menu_view_bcc_cb, composer);
-
- /* View/CC */
- bonobo_ui_component_set_prop (
- composer->uic, "/commands/ViewCC",
- "state", composer->view_cc ? "1" : "0", NULL);
- bonobo_ui_component_add_listener (
- composer->uic, "ViewCC",
- menu_view_cc_cb, composer);
-
-
- /* Security -> PGP Sign */
- bonobo_ui_component_set_prop (
- composer->uic, "/commands/SecurityPGPSign",
- "state", composer->pgp_sign ? "1" : "0", NULL);
-
- bonobo_ui_component_add_listener (
- composer->uic, "SecurityPGPSign",
- menu_security_pgp_sign_cb, composer);
-
- /* Security -> PGP Encrypt */
- bonobo_ui_component_set_prop (
- composer->uic, "/commands/SecurityPGPEncrypt",
- "state", composer->pgp_encrypt ? "1" : "0", NULL);
-
- bonobo_ui_component_add_listener (
- composer->uic, "SecurityPGPEncrypt",
- menu_security_pgp_encrypt_cb, composer);
-
- /* View -> Attachments */
- bonobo_ui_component_add_listener (
- composer->uic, "ViewAttach",
- menu_view_attachments_activate_cb, composer);
-}
-
-
-/* Miscellaneous callbacks. */
-
-static void
-attachment_bar_changed_cb (EMsgComposerAttachmentBar *bar,
- void *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);
-
- /* Mark the composer as changed so it prompts about unsaved changes on close */
- e_msg_composer_set_changed (composer);
-}
-
-static void
-subject_changed_cb (EMsgComposerHdrs *hdrs,
- gchar *subject,
- void *data)
-{
- EMsgComposer *composer;
-
- composer = E_MSG_COMPOSER (data);
-
- if (strlen (subject))
- gtk_window_set_title (GTK_WINDOW (composer), subject);
- else
- gtk_window_set_title (GTK_WINDOW (composer),
- _("Compose a message"));
- g_free (subject);
-}
-
-static void
-hdrs_changed_cb (EMsgComposerHdrs *hdrs,
- void *data)
-{
- EMsgComposer *composer;
-
- composer = E_MSG_COMPOSER (data);
-
- /* Mark the composer as changed so it prompts about unsaved changes on close */
- e_msg_composer_set_changed (composer);
-}
-
-
-/* GtkObject methods. */
-
-static void
-destroy (GtkObject *object)
-{
- EMsgComposer *composer;
- CORBA_Environment ev;
-
- composer = E_MSG_COMPOSER (object);
-
- gnome_config_sync ();
-
- if (composer->uic)
- bonobo_object_unref (BONOBO_OBJECT (composer->uic));
- composer->uic = NULL;
-
- /* 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);
- }
-
- e_msg_composer_clear_inlined_table (composer);
- g_hash_table_destroy (composer->inline_images);
-
- CORBA_exception_init (&ev);
-
- if (composer->persist_stream_interface != CORBA_OBJECT_NIL) {
- Bonobo_Unknown_unref (composer->persist_stream_interface, &ev);
- CORBA_Object_release (composer->persist_stream_interface, &ev);
- }
-
- if (composer->persist_file_interface != CORBA_OBJECT_NIL) {
- Bonobo_Unknown_unref (composer->persist_file_interface, &ev);
- CORBA_Object_release (composer->persist_file_interface, &ev);
- }
-
- if (composer->editor_engine != CORBA_OBJECT_NIL) {
- Bonobo_Unknown_unref (composer->editor_engine, &ev);
- CORBA_Object_release (composer->editor_engine, &ev);
- }
-
- CORBA_exception_free (&ev);
-
- if (composer->editor_listener)
- bonobo_object_unref (composer->editor_listener);
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy != NULL)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-
-/* GtkWidget methods. */
-
-static int
-delete_event (GtkWidget *widget,
- GdkEventAny *event)
-{
- do_exit (E_MSG_COMPOSER (widget));
-
- return TRUE;
-}
-
-static void
-drag_data_received (EMsgComposer *composer,
- GdkDragContext *context,
- gint x,
- gint y,
- GtkSelectionData *selection,
- guint info,
- guint time)
-{
- gchar *temp, *filename;
-
- filename = g_strdup (selection->data);
- temp = strchr (filename, '\n');
- if (temp) {
- if (*(temp - 1) == '\r')
- *(temp - 1) = '\0';
- *temp = '\0';
- }
-
- /* Chop the file: part off */
- if (strncasecmp (filename, "file:", 5) == 0) {
- temp = g_strdup (filename + 5);
- g_free (filename);
- filename = temp;
- }
-
- e_msg_composer_attachment_bar_attach
- (E_MSG_COMPOSER_ATTACHMENT_BAR (composer->attachment_bar),
- filename);
-
- g_free (filename);
-}
-
-
-static void
-class_init (EMsgComposerClass *klass)
-{
- GtkObjectClass *object_class;
- GtkWidgetClass *widget_class;
-
- object_class = GTK_OBJECT_CLASS (klass);
- widget_class = GTK_WIDGET_CLASS (klass);
-
- object_class->destroy = destroy;
-
- widget_class->delete_event = delete_event;
-
- parent_class = gtk_type_class (bonobo_window_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->uic = 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_scroll_frame = NULL;
-
- composer->persist_file_interface = CORBA_OBJECT_NIL;
- composer->persist_stream_interface = CORBA_OBJECT_NIL;
-
- composer->editor_engine = CORBA_OBJECT_NIL;
- composer->inline_images = g_hash_table_new (g_str_hash, g_str_equal);
-
- composer->attachment_bar_visible = FALSE;
- composer->send_html = FALSE;
- composer->pgp_sign = FALSE;
- composer->pgp_encrypt = FALSE;
-
- composer->has_changed = FALSE;
-}
-
-
-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 (bonobo_window_get_type (), &info);
- }
-
- return type;
-}
-
-static int
-get_config_value (const char *key)
-{
- char *full_key = g_strconcat ("/Evolution/Composer/", key, NULL);
- int v;
-
- v = gnome_config_get_int (full_key);
- g_free (full_key);
- return v;
-}
-
-static gint
-load_with_failue_control (Bonobo_PropertyBag bag, char *key, gint default_if_fails)
-{
- CORBA_Environment ev;
- gint v;
-
- CORBA_exception_init (&ev);
- v = bonobo_property_bag_client_get_value_gint (bag, key, &ev);
- if (ev._major == CORBA_NO_EXCEPTION)
- return v;
- CORBA_exception_free (&ev);
-
- return default_if_fails;
-}
-
-static void
-load_from_property_bag (EMsgComposer *composer)
-{
- Bonobo_PropertyBag bag = composer->property_bag;
-
- composer->view_from = load_with_failue_control (bag, "ViewFrom", 1);
- composer->view_replyto = load_with_failue_control (bag, "ViewReplyTo", 0);
- composer->view_bcc = load_with_failue_control (bag, "ViewBCC", 0);
- composer->view_cc = load_with_failue_control (bag, "ViewCC", 1);
- composer->view_subject = load_with_failue_control (bag, "ViewSubject", 1);
-}
-
-static void
-load_from_gnome_config (EMsgComposer *composer)
-{
- composer->view_from = get_config_value ("ViewFrom=1");
- composer->view_replyto = get_config_value ("ViewReplyTo=0");
- composer->view_bcc = get_config_value ("ViewBCC=0");
- composer->view_cc = get_config_value ("ViewCC=1");
- composer->view_subject = get_config_value ("ViewSubject=1");
-}
-
-static void
-e_msg_composer_load_config (EMsgComposer *composer)
-{
- Bonobo_PropertyBag pbag;
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
- pbag = bonobo_get_object (
- "config:/Evolution/Mail/Composer", "IDL:Bonobo/PropertyBag:1.0",
- &ev);
- if (ev._major == CORBA_NO_EXCEPTION && pbag != CORBA_OBJECT_NIL){
- composer->property_bag = pbag;
- load_from_property_bag (composer);
- } else {
- composer->property_bag = CORBA_OBJECT_NIL;
- load_from_gnome_config (composer);
- }
- CORBA_exception_free (&ev);
-}
-
-static gint
-e_msg_composer_get_visible_flags (EMsgComposer *composer)
-{
- int flags = 0;
-
- if (composer->view_from)
- flags |= E_MSG_COMPOSER_VISIBLE_FROM;
- if (composer->view_replyto)
- flags |= E_MSG_COMPOSER_VISIBLE_REPLYTO;
- if (composer->view_cc)
- flags |= E_MSG_COMPOSER_VISIBLE_CC;
- if (composer->view_bcc)
- flags |= E_MSG_COMPOSER_VISIBLE_BCC;
- if (composer->view_subject)
- flags |= E_MSG_COMPOSER_VISIBLE_SUBJECT;
-
- /*
- * Until we have a GUI way, lets make sure that
- * even if the user screws up, we will do the right
- * thing (screws up == edit the config file manually
- * and screw up).
- */
- flags |= E_MSG_COMPOSER_VISIBLE_SUBJECT;
- return flags;
-}
-
-/**
- * e_msg_composer_construct:
- * @composer: A message composer widget
- *
- * Construct @composer.
- **/
-void
-e_msg_composer_construct (EMsgComposer *composer)
-{
- GtkWidget *vbox;
- BonoboObject *editor_server;
- gint vis;
-
- static GtkTargetEntry drop_types[] = {
- {"text/uri-list", 0, 1}
- };
-
- g_return_if_fail (gtk_main_level () > 0);
-
- gtk_window_set_default_size (GTK_WINDOW (composer),
- DEFAULT_WIDTH, DEFAULT_HEIGHT);
-
- bonobo_window_construct (BONOBO_WINDOW (composer), "e-msg-composer",
- _("Compose a message"));
-
- /* DND support */
- gtk_drag_dest_set (GTK_WIDGET (composer), GTK_DEST_DEFAULT_ALL,
- drop_types, 1, GDK_ACTION_COPY);
- gtk_signal_connect (GTK_OBJECT (composer), "drag_data_received",
- GTK_SIGNAL_FUNC (drag_data_received), NULL);
- e_msg_composer_load_config (composer);
-
- setup_ui (composer);
-
- vbox = gtk_vbox_new (FALSE, 0);
-
- vis = e_msg_composer_get_visible_flags (composer);
- composer->hdrs = e_msg_composer_hdrs_new (vis);
-
- gtk_box_pack_start (GTK_BOX (vbox), composer->hdrs, FALSE, FALSE, 0);
- gtk_signal_connect (GTK_OBJECT (composer->hdrs), "subject_changed",
- GTK_SIGNAL_FUNC (subject_changed_cb), composer);
- gtk_signal_connect (GTK_OBJECT (composer->hdrs), "hdrs_changed",
- GTK_SIGNAL_FUNC (hdrs_changed_cb), composer);
- gtk_widget_show (composer->hdrs);
-
- /* Editor component. */
- composer->editor = bonobo_widget_new_control (
- GNOME_GTKHTML_EDITOR_CONTROL_ID,
- bonobo_ui_component_get_container (composer->uic));
-
- if (!composer->editor)
- return;
-
- /* let the editor know which mode we are in */
- bonobo_widget_set_property (BONOBO_WIDGET (composer->editor),
- "FormatHTML", composer->send_html,
- NULL);
-
- editor_server = BONOBO_OBJECT (bonobo_widget_get_server (BONOBO_WIDGET (composer->editor)));
-
- composer->persist_file_interface
- = bonobo_object_query_interface (editor_server, "IDL:Bonobo/PersistFile:1.0");
- composer->persist_stream_interface
- = bonobo_object_query_interface (editor_server, "IDL:Bonobo/PersistStream:1.0");
-
- 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 an EScrollFrame. We don't
- show it for now. */
-
- composer->attachment_scroll_frame = e_scroll_frame_new (NULL, NULL);
- e_scroll_frame_set_shadow_type (E_SCROLL_FRAME (composer->attachment_scroll_frame),
- GTK_SHADOW_IN);
- e_scroll_frame_set_policy (E_SCROLL_FRAME (composer->attachment_scroll_frame),
- 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_scroll_frame),
- composer->attachment_bar);
- gtk_box_pack_start (GTK_BOX (vbox),
- composer->attachment_scroll_frame,
- FALSE, FALSE, GNOME_PAD_SMALL);
-
- gtk_signal_connect (GTK_OBJECT (composer->attachment_bar), "changed",
- GTK_SIGNAL_FUNC (attachment_bar_changed_cb), composer);
-
- bonobo_window_set_contents (BONOBO_WINDOW (composer), vbox);
- gtk_widget_show (vbox);
-
- e_msg_composer_show_attachments (composer, FALSE);
-
- /* Set focus on the `To:' field.
-
- gtk_widget_grab_focus (e_msg_composer_hdrs_get_to_entry (E_MSG_COMPOSER_HDRS (composer->hdrs)));
- GTK_WIDGET_SET_FLAGS (composer->editor, GTK_CAN_FOCUS);
- gtk_window_set_focus (GTK_WINDOW (composer), composer->editor); */
- gtk_widget_grab_focus (composer->editor);
-}
-
-static EMsgComposer *
-create_composer (void)
-{
- EMsgComposer *new;
-
- new = gtk_type_new (E_TYPE_MSG_COMPOSER);
- e_msg_composer_construct (new);
- if (!new->editor) {
- e_notice (GTK_WINDOW (new), GNOME_MESSAGE_BOX_ERROR,
- _("Could not create composer window."));
- gtk_object_unref (GTK_OBJECT (new));
- return NULL;
- }
- prepare_engine (new);
-
- return new;
-}
-
-/**
- * e_msg_composer_new:
- *
- * Create a new message composer widget.
- *
- * Return value: A pointer to the newly created widget
- **/
-EMsgComposer *
-e_msg_composer_new (void)
-{
- EMsgComposer *new;
-
- new = create_composer ();
- if (new) {
- /* Load the signature, if any. */
- set_editor_text (new, NULL, "");
- }
-
- return new;
-}
-
-/**
- * e_msg_composer_new_with_sig_file:
- *
- * Create a new message composer widget. Sets the signature file.
- *
- * Return value: A pointer to the newly created widget
- **/
-EMsgComposer *
-e_msg_composer_new_with_sig_file (const char *sig_file, gboolean send_html)
-{
- EMsgComposer *new;
-
- new = create_composer ();
- if (new) {
- e_msg_composer_set_send_html (new, send_html);
- /* Load the signature, if any. */
- set_editor_text (new, sig_file, "");
-
- e_msg_composer_set_sig_file (new, sig_file);
- }
-
- return new;
-}
-
-static void
-handle_multipart_alternative (EMsgComposer *composer, CamelMultipart *multipart)
-{
- /* Find the text/html part and set the composer body to it's contents */
- int i, nparts;
-
- nparts = camel_multipart_get_number (multipart);
-
- for (i = 0; i < nparts; i++) {
- CamelContentType *content_type;
- CamelMimePart *mime_part;
-
- mime_part = camel_multipart_get_part (multipart, i);
- content_type = camel_mime_part_get_content_type (mime_part);
-
- if (header_content_type_is (content_type, "text", "html")) {
- CamelDataWrapper *contents;
- char *text, *final_text;
- gboolean is_html;
-
- contents = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part));
- text = mail_get_message_body (contents, FALSE, &is_html);
- if (text) {
- if (is_html)
- final_text = g_strdup (text);
- else
- final_text = e_text_to_html (text, E_TEXT_TO_HTML_CONVERT_NL |
- E_TEXT_TO_HTML_CONVERT_SPACES);
- g_free (text);
-
- e_msg_composer_set_body_text (composer, final_text);
- }
-
- return;
- }
- }
-}
-
-static void
-handle_multipart (EMsgComposer *composer, CamelMultipart *multipart, int depth)
-{
- int i, nparts;
-
- nparts = camel_multipart_get_number (multipart);
-
- for (i = 0; i < nparts; i++) {
- CamelContentType *content_type;
- CamelMimePart *mime_part;
-
- mime_part = camel_multipart_get_part (multipart, i);
- content_type = camel_mime_part_get_content_type (mime_part);
-
- if (header_content_type_is (content_type, "multipart", "alternative")) {
- /* this structure contains the body */
- CamelDataWrapper *wrapper;
- CamelMultipart *mpart;
-
- wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part));
- mpart = CAMEL_MULTIPART (wrapper);
-
- handle_multipart_alternative (composer, mpart);
- } else if (header_content_type_is (content_type, "multipart", "*")) {
- /* another layer of multipartness... */
- CamelDataWrapper *wrapper;
- CamelMultipart *mpart;
-
- wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part));
- mpart = CAMEL_MULTIPART (wrapper);
-
- handle_multipart (composer, mpart, depth + 1);
- } else if (depth == 0 && i == 0) {
- /* Since the first part is not multipart/alternative, then this must be the body */
- CamelDataWrapper *contents;
- char *text, *final_text;
- gboolean is_html;
-
- contents = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part));
- text = mail_get_message_body (contents, FALSE, &is_html);
- if (text) {
- if (is_html)
- final_text = g_strdup (text);
- else
- final_text = e_text_to_html (text, E_TEXT_TO_HTML_CONVERT_NL |
- E_TEXT_TO_HTML_CONVERT_SPACES);
- g_free (text);
-
- e_msg_composer_set_body_text (composer, final_text);
- }
- } else {
- /* this is a leaf of the tree, so attach it */
- e_msg_composer_attach (composer, mime_part);
- }
- }
-}
-
-/**
- * e_msg_composer_new_with_message:
- *
- * Create a new message composer widget.
- *
- * Return value: A pointer to the newly created widget
- **/
-EMsgComposer *
-e_msg_composer_new_with_message (CamelMimeMessage *msg)
-{
- const CamelInternetAddress *to, *cc, *bcc;
- GList *To = NULL, *Cc = NULL, *Bcc = NULL;
- CamelContentType *content_type;
- const gchar *subject;
- EMsgComposer *new;
- guint len, i;
-
- g_return_val_if_fail (gtk_main_level () > 0, NULL);
-
- new = create_composer ();
- if (!new)
- return NULL;
-
- subject = camel_mime_message_get_subject (msg);
-
- to = camel_mime_message_get_recipients (msg, CAMEL_RECIPIENT_TYPE_TO);
- cc = camel_mime_message_get_recipients (msg, CAMEL_RECIPIENT_TYPE_CC);
- bcc = camel_mime_message_get_recipients (msg, CAMEL_RECIPIENT_TYPE_BCC);
-
- len = CAMEL_ADDRESS (to)->addresses->len;
- for (i = 0; i < len; i++) {
- const char *name, *addr;
-
- if (camel_internet_address_get (to, i, &name, &addr)) {
- CamelInternetAddress *cia;
-
- cia = camel_internet_address_new ();
- camel_internet_address_add (cia, name, addr);
- To = g_list_append (To, camel_address_encode (CAMEL_ADDRESS (cia)));
- camel_object_unref (CAMEL_OBJECT (cia));
- }
- }
-
- len = CAMEL_ADDRESS (cc)->addresses->len;
- for (i = 0; i < len; i++) {
- const char *name, *addr;
-
- if (camel_internet_address_get (cc, i, &name, &addr)) {
- CamelInternetAddress *cia;
-
- cia = camel_internet_address_new ();
- camel_internet_address_add (cia, name, addr);
- Cc = g_list_append (Cc, camel_address_encode (CAMEL_ADDRESS (cia)));
- camel_object_unref (CAMEL_OBJECT (cia));
- }
- }
-
- len = CAMEL_ADDRESS (bcc)->addresses->len;
- for (i = 0; i < len; i++) {
- const char *name, *addr;
-
- if (camel_internet_address_get (bcc, i, &name, &addr)) {
- CamelInternetAddress *cia;
-
- cia = camel_internet_address_new ();
- camel_internet_address_add (cia, name, addr);
- Bcc = g_list_append (Bcc, camel_address_encode (CAMEL_ADDRESS (cia)));
- camel_object_unref (CAMEL_OBJECT (cia));
- }
- }
-
- e_msg_composer_set_headers (new, NULL, To, Cc, Bcc, subject);
-
- free_recipients (To);
- free_recipients (Cc);
- free_recipients (Bcc);
-
- content_type = camel_mime_part_get_content_type (CAMEL_MIME_PART (msg));
- if (header_content_type_is (content_type, "multipart", "alternative")) {
- /* multipart/alternative contains the text/plain and text/html versions of the message body */
- CamelDataWrapper *wrapper;
- CamelMultipart *multipart;
-
- wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (CAMEL_MIME_PART (msg)));
- multipart = CAMEL_MULTIPART (wrapper);
-
- handle_multipart_alternative (new, multipart);
- } else if (header_content_type_is (content_type, "multipart", "*")) {
- /* there must be attachments... */
- CamelDataWrapper *wrapper;
- CamelMultipart *multipart;
-
- wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (CAMEL_MIME_PART (msg)));
- multipart = CAMEL_MULTIPART (wrapper);
-
- handle_multipart (new, multipart, 0);
- } else {
- /* We either have a text/plain or a text/html part */
- CamelDataWrapper *contents;
- char *text, *final_text;
- gboolean is_html;
-
- contents = camel_medium_get_content_object (CAMEL_MEDIUM (msg));
- text = mail_get_message_body (contents, FALSE, &is_html);
- if (text) {
- if (is_html)
- final_text = g_strdup (text);
- else
- final_text = e_text_to_html (text, E_TEXT_TO_HTML_CONVERT_NL |
- E_TEXT_TO_HTML_CONVERT_SPACES);
- g_free (text);
-
- e_msg_composer_set_body_text (new, final_text);
- }
- }
-
- return new;
-}
-
-#if 0
-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;
-}
-#endif
-
-static GList *
-add_recipients (GList *list, const char *recips, gboolean decode)
-{
- CamelInternetAddress *cia;
- const char *name, *addr;
- int num, i;
-
- cia = camel_internet_address_new ();
- if (decode)
- num = camel_address_decode (CAMEL_ADDRESS (cia), recips);
- else
- num = camel_address_unformat (CAMEL_ADDRESS (cia), recips);
-
- for (i = 0; i < num; i++) {
- if (camel_internet_address_get (cia, i, &name, &addr)) {
- char *str;
-
- str = camel_internet_address_format_address (name, addr);
- list = g_list_append (list, str);
- }
- }
-
- 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.
- **/
-EMsgComposer *
-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 (g_strncasecmp (url, "mailto:", 7) == 0, NULL);
-
- composer = e_msg_composer_new ();
- if (!composer)
- return 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 (!g_strncasecmp (header, "to", len))
- to = add_recipients (to, content, FALSE);
- else if (!g_strncasecmp (header, "cc", len))
- cc = add_recipients (cc, content, FALSE);
- else if (!g_strncasecmp (header, "bcc", len))
- bcc = add_recipients (bcc, content, FALSE);
- else if (!g_strncasecmp (header, "subject", len))
- subject = g_strdup (content);
- else if (!g_strncasecmp (header, "body", len))
- body = g_strdup (content);
-
- g_free (content);
- p += clen;
- if (*p == '&') {
- p++;
- if (!strcmp (p, "amp;"))
- p += 4;
- }
- }
- }
-
- 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 (composer, NULL, htmlbody);
- g_free (htmlbody);
- }
-
- return 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
- * @from: the name of the account the user will send from,
- * or %NULL for the default account
- * @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 char *from,
- 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_from_account (hdrs, from);
- 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 (composer, composer->sig_file, 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_attach:
- * @composer: a composer object
- * @attachment: the CamelMimePart to attach
- *
- * Attaches @attachment to the message being composed in the composer.
- **/
-void
-e_msg_composer_attach (EMsgComposer *composer, CamelMimePart *attachment)
-{
- EMsgComposerAttachmentBar *bar;
-
- g_return_if_fail (E_IS_MSG_COMPOSER (composer));
- g_return_if_fail (CAMEL_IS_MIME_PART (attachment));
-
- bar = E_MSG_COMPOSER_ATTACHMENT_BAR (composer->attachment_bar);
- e_msg_composer_attachment_bar_attach_mime_part (bar, attachment);
-}
-
-
-/**
- * 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);
-}
-
-
-
-/**
- * e_msg_composer_set_sig:
- * @composer: A message composer widget
- * @path: Signature file
- *
- * Set a signature
- **/
-void
-e_msg_composer_set_sig_file (EMsgComposer *composer, const char *sig_file)
-{
- g_return_if_fail (composer != NULL);
- g_return_if_fail (E_IS_MSG_COMPOSER (composer));
-
- composer->sig_file = g_strdup (sig_file);
-}
-
-/**
- * e_msg_composer_get_sig_file:
- * @composer: A message composer widget
- *
- * Get the signature file
- *
- * Return value: The signature file.
- **/
-const char *
-e_msg_composer_get_sig_file (EMsgComposer *composer)
-{
- g_return_val_if_fail (composer != NULL, NULL);
- g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), NULL);
-
- return composer->sig_file;
-}
-
-
-/**
- * e_msg_composer_set_send_html:
- * @composer: A message composer widget
- * @send_html: Whether the composer should have the "Send HTML" flag set
- *
- * Set the status of the "Send HTML" toggle item. The user can override it.
- **/
-void
-e_msg_composer_set_send_html (EMsgComposer *composer,
- gboolean send_html)
-{
- g_return_if_fail (composer != NULL);
- g_return_if_fail (E_IS_MSG_COMPOSER (composer));
-
- if (composer->send_html && send_html)
- return;
- if (! composer->send_html && ! send_html)
- return;
-
- composer->send_html = send_html;
-
- bonobo_ui_component_set_prop (
- composer->uic, "/commands/FormatHtml",
- "state", composer->send_html ? "1" : "0", NULL);
-
- /* let the editor know which mode we are in */
- bonobo_widget_set_property (BONOBO_WIDGET (composer->editor), "FormatHTML",
- composer->send_html, NULL);
-
- set_config (composer, "FormatHTML", composer->send_html);
-}
-
-/**
- * e_msg_composer_get_send_html:
- * @composer: A message composer widget
- *
- * Get the status of the "Send HTML mail" flag.
- *
- * Return value: The status of the "Send HTML mail" flag.
- **/
-gboolean
-e_msg_composer_get_send_html (EMsgComposer *composer)
-{
- g_return_val_if_fail (composer != NULL, FALSE);
- g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), FALSE);
-
- return composer->send_html;
-}
-
-
-/**
- * e_msg_composer_get_preferred_account:
- * @composer: composer
- *
- * Returns the user-specified account (from field).
- */
-const MailConfigAccount *
-e_msg_composer_get_preferred_account (EMsgComposer *composer)
-{
- EMsgComposerHdrs *hdrs;
-
- g_return_val_if_fail (composer != NULL, NULL);
- g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), NULL);
-
- hdrs = E_MSG_COMPOSER_HDRS (composer->hdrs);
-
- return hdrs->account;
-}
-
-
-/**
- * e_msg_composer_set_pgp_sign:
- * @composer: A message composer widget
- * @send_html: Whether the composer should have the "PGP Sign" flag set
- *
- * Set the status of the "PGP Sign" toggle item. The user can override it.
- **/
-void
-e_msg_composer_set_pgp_sign (EMsgComposer *composer, gboolean pgp_sign)
-{
- g_return_if_fail (composer != NULL);
- g_return_if_fail (E_IS_MSG_COMPOSER (composer));
-
- if (composer->pgp_sign && pgp_sign)
- return;
- if (!composer->pgp_sign && !pgp_sign)
- return;
-
- composer->pgp_sign = pgp_sign;
-
- bonobo_ui_component_set_prop (composer->uic, "/commands/SecurityPGPSign",
- "state", composer->pgp_sign ? "1" : "0", NULL);
-}
-
-/**
- * e_msg_composer_get_pgp_sign:
- * @composer: A message composer widget
- *
- * Get the status of the "PGP Sign" flag.
- *
- * Return value: The status of the "PGP Sign" flag.
- **/
-gboolean
-e_msg_composer_get_pgp_sign (EMsgComposer *composer)
-{
- g_return_val_if_fail (composer != NULL, FALSE);
- g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), FALSE);
-
- return composer->pgp_sign;
-}
-
-
-/**
- * e_msg_composer_set_pgp_encrypt:
- * @composer: A message composer widget
- * @send_html: Whether the composer should have the "PGP Encrypt" flag set
- *
- * Set the status of the "PGP Encrypt" toggle item. The user can override it.
- **/
-void
-e_msg_composer_set_pgp_encrypt (EMsgComposer *composer, gboolean pgp_encrypt)
-{
- g_return_if_fail (composer != NULL);
- g_return_if_fail (E_IS_MSG_COMPOSER (composer));
-
- if (composer->pgp_encrypt && pgp_encrypt)
- return;
- if (!composer->pgp_encrypt && !pgp_encrypt)
- return;
-
- composer->pgp_encrypt = pgp_encrypt;
-
- bonobo_ui_component_set_prop (composer->uic, "/commands/SecurityPGPEncrypt",
- "state", composer->pgp_encrypt ? "1" : "0", NULL);
-}
-
-
-/**
- * e_msg_composer_get_pgp_encrypt:
- * @composer: A message composer widget
- *
- * Get the status of the "PGP Encrypt" flag.
- *
- * Return value: The status of the "PGP Encrypt" flag.
- **/
-gboolean
-e_msg_composer_get_pgp_encrypt (EMsgComposer *composer)
-{
- g_return_val_if_fail (composer != NULL, FALSE);
- g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), FALSE);
-
- return composer->pgp_encrypt;
-}
-
-
-/**
- * e_msg_composer_set_view_bcc:
- * @composer: A message composer widget
- * @state: whether to show or hide the bcc view
- *
- * Controls the state of the BCC display
- */
-void
-e_msg_composer_set_view_bcc (EMsgComposer *composer, gboolean view_bcc)
-{
- g_return_if_fail (composer != NULL);
- g_return_if_fail (E_IS_MSG_COMPOSER (composer));
-
- if ((composer->view_bcc && view_bcc) ||
- (!composer->view_bcc && !view_bcc))
- return;
-
- composer->view_bcc = view_bcc;
- bonobo_ui_component_set_prop (
- composer->uic, "/commands/ViewBCC",
- "state", composer->view_bcc ? "1" : "0", NULL);
- set_config (composer, "ViewBCC", composer->view_bcc);
- e_msg_composer_set_hdrs_visible
- (E_MSG_COMPOSER_HDRS (composer->hdrs),
- e_msg_composer_get_visible_flags (composer));
-
-}
-
-/**
- * e_msg_composer_get_view_bcc:
- * @composer: A message composer widget
- *
- * Get the status of the "View BCC header" flag.
- *
- * Return value: The status of the "View BCC header" flag.
- **/
-gboolean
-e_msg_composer_get_view_bcc (EMsgComposer *composer)
-{
- g_return_val_if_fail (composer != NULL, FALSE);
- g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), FALSE);
-
- return composer->view_bcc;
-}
-
-/**
- * e_msg_composer_set_view_cc:
- * @composer: A message composer widget
- * @state: whether to show or hide the cc view
- *
- * Controls the state of the CC display
- */
-void
-e_msg_composer_set_view_cc (EMsgComposer *composer, gboolean view_cc)
-{
- g_return_if_fail (composer != NULL);
- g_return_if_fail (E_IS_MSG_COMPOSER (composer));
-
- if ((composer->view_cc && view_cc) ||
- (!composer->view_cc && !view_cc))
- return;
-
- composer->view_cc = view_cc;
- bonobo_ui_component_set_prop (
- composer->uic, "/commands/ViewCC",
- "state", composer->view_cc ? "1" : "0", NULL);
- set_config (composer, "ViewCC", composer->view_cc);
- e_msg_composer_set_hdrs_visible
- (E_MSG_COMPOSER_HDRS (composer->hdrs),
- e_msg_composer_get_visible_flags (composer));
-}
-
-/**
- * e_msg_composer_get_view_cc:
- * @composer: A message composer widget
- *
- * Get the status of the "View CC header" flag.
- *
- * Return value: The status of the "View CC header" flag.
- **/
-gboolean
-e_msg_composer_get_view_cc (EMsgComposer *composer)
-{
- g_return_val_if_fail (composer != NULL, FALSE);
- g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), FALSE);
-
- return composer->view_cc;
-}
-
-/**
- * e_msg_composer_set_view_from:
- * @composer: A message composer widget
- * @state: whether to show or hide the From selector
- *
- * Controls the state of the From selector
- */
-void
-e_msg_composer_set_view_from (EMsgComposer *composer, gboolean view_from)
-{
- g_return_if_fail (composer != NULL);
- g_return_if_fail (E_IS_MSG_COMPOSER (composer));
-
- if ((composer->view_from && view_from) ||
- (!composer->view_from && !view_from))
- return;
-
- composer->view_from = view_from;
- bonobo_ui_component_set_prop (
- composer->uic, "/commands/ViewFrom",
- "state", composer->view_from ? "1" : "0", NULL);
- set_config (composer, "ViewFrom", composer->view_from);
- e_msg_composer_set_hdrs_visible
- (E_MSG_COMPOSER_HDRS (composer->hdrs),
- e_msg_composer_get_visible_flags (composer));
-}
-
-/**
- * e_msg_composer_get_view_from:
- * @composer: A message composer widget
- *
- * Get the status of the "View From header" flag.
- *
- * Return value: The status of the "View From header" flag.
- **/
-gboolean
-e_msg_composer_get_view_from (EMsgComposer *composer)
-{
- g_return_val_if_fail (composer != NULL, FALSE);
- g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), FALSE);
-
- return composer->view_from;
-}
-
-/**
- * e_msg_composer_set_view_from:
- * @composer: A message composer widget
- * @state: whether to show or hide the From selector
- *
- * Controls the state of the From selector
- */
-void
-e_msg_composer_set_view_replyto (EMsgComposer *composer, gboolean view_replyto)
-{
- g_return_if_fail (composer != NULL);
- g_return_if_fail (E_IS_MSG_COMPOSER (composer));
-
- if ((composer->view_replyto && view_replyto) ||
- (!composer->view_replyto && !view_replyto))
- return;
-
- composer->view_replyto = view_replyto;
- bonobo_ui_component_set_prop (
- composer->uic, "/commands/ViewReplyTo",
- "state", composer->view_replyto ? "1" : "0", NULL);
- set_config (composer, "ViewReplyTo", composer->view_replyto);
- e_msg_composer_set_hdrs_visible
- (E_MSG_COMPOSER_HDRS (composer->hdrs),
- e_msg_composer_get_visible_flags (composer));
-}
-
-/**
- * e_msg_composer_get_view_replyto:
- * @composer: A message composer widget
- *
- * Get the status of the "View Reply-To header" flag.
- *
- * Return value: The status of the "View Reply-To header" flag.
- **/
-gboolean
-e_msg_composer_get_view_replyto (EMsgComposer *composer)
-{
- g_return_val_if_fail (composer != NULL, FALSE);
- g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), FALSE);
-
- return composer->view_replyto;
-}
-
-/**
- * e_msg_composer_guess_mime_type:
- * @file_name: filename
- *
- * Returns the guessed mime type of the file given by #file_name.
- **/
-gchar *
-e_msg_composer_guess_mime_type (const gchar *file_name)
-{
- GnomeVFSFileInfo info;
- GnomeVFSResult result;
-
- result = gnome_vfs_get_file_info (file_name, &info,
- GNOME_VFS_FILE_INFO_GET_MIME_TYPE |
- GNOME_VFS_FILE_INFO_FOLLOW_LINKS);
- if (result == GNOME_VFS_OK) {
- gchar *type;
-
- type = g_strdup (gnome_vfs_file_info_get_mime_type (&info));
- gnome_vfs_file_info_unref (&info);
- return type;
- } else
- return NULL;
-}
-
-/**
- * e_msg_composer_set_changed:
- * @composer: An EMsgComposer object.
- *
- * Mark the composer as changed, so before the composer gets destroyed
- * the user will be prompted about unsaved changes.
- **/
-void
-e_msg_composer_set_changed (EMsgComposer *composer)
-{
- g_return_if_fail (composer != NULL);
- g_return_if_fail (E_IS_MSG_COMPOSER (composer));
-
- composer->has_changed = TRUE;
-}
-
-/**
- * e_msg_composer_unset_changed:
- * @composer: An EMsgComposer object.
- *
- * Mark the composer as unchanged, so no prompt about unsaved changes
- * will appear before destroying the composer.
- **/
-void
-e_msg_composer_unset_changed (EMsgComposer *composer)
-{
- g_return_if_fail (composer != NULL);
- g_return_if_fail (E_IS_MSG_COMPOSER (composer));
-
- composer->has_changed = FALSE;
-}
diff --git a/composer/e-msg-composer.h b/composer/e-msg-composer.h
deleted file mode 100644
index 990be1edb4..0000000000
--- a/composer/e-msg-composer.h
+++ /dev/null
@@ -1,162 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-msg-composer.h
- *
- * Copyright (C) 1999, 2000 Ximian, 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__
-
-typedef struct _EMsgComposer EMsgComposer;
-typedef struct _EMsgComposerClass EMsgComposerClass;
-
-#include <bonobo/bonobo-win.h>
-#include <bonobo/bonobo-ui-component.h>
-
-#include "e-msg-composer-attachment-bar.h"
-#include "e-msg-composer-hdrs.h"
-#include "Editor.h"
-
-#include <mail/mail-config.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))
-
-
-
-struct _EMsgComposer {
- BonoboWindow parent;
-
- BonoboUIComponent *uic;
-
- GtkWidget *hdrs;
- GPtrArray *extra_hdr_names, *extra_hdr_values;
-
- GtkWidget *editor;
-
- GtkWidget *attachment_bar;
- GtkWidget *attachment_scroll_frame;
-
- GtkWidget *address_dialog;
-
- Bonobo_PersistFile persist_file_interface;
- Bonobo_PersistStream persist_stream_interface;
- GNOME_GtkHTML_Editor_Engine editor_engine;
- BonoboObject *editor_listener;
- GHashTable *inline_images;
-
- Bonobo_PropertyBag property_bag;
-
- char *sig_file;
-
- gboolean attachment_bar_visible : 1;
- gboolean send_html : 1;
- gboolean pgp_sign : 1;
- gboolean pgp_encrypt : 1;
- gboolean view_from : 1;
- gboolean view_replyto : 1;
- gboolean view_bcc : 1;
- gboolean view_cc : 1;
- gboolean view_subject : 1;
- gboolean has_changed : 1;
-};
-
-struct _EMsgComposerClass {
- BonoboWindowClass parent_class;
-
- void (* send) (EMsgComposer *composer);
- void (* postpone) (EMsgComposer *composer);
-};
-
-
-GtkType e_msg_composer_get_type (void);
-void e_msg_composer_construct (EMsgComposer *composer);
-EMsgComposer *e_msg_composer_new (void);
-EMsgComposer *e_msg_composer_new_with_sig_file (const char *sig_file,
- gboolean send_html);
-EMsgComposer *e_msg_composer_new_with_message (CamelMimeMessage *msg);
-EMsgComposer *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 char *from,
- 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_mark_text_orig (EMsgComposer *composer);
-void e_msg_composer_add_header (EMsgComposer *composer,
- const char *name,
- const char *value);
-void e_msg_composer_attach (EMsgComposer *composer,
- CamelMimePart *attachment);
-CamelMimeMessage *e_msg_composer_get_message (EMsgComposer *composer);
-void e_msg_composer_set_sig_file (EMsgComposer *composer,
- const char *sig_file);
-const char *e_msg_composer_get_sig_file (EMsgComposer *composer);
-gboolean e_msg_composer_get_send_html (EMsgComposer *composer);
-void e_msg_composer_set_send_html (EMsgComposer *composer,
- gboolean send_html);
-gboolean e_msg_composer_get_view_from (EMsgComposer *composer);
-void e_msg_composer_set_view_from (EMsgComposer *composer,
- gboolean view_from);
-
-gboolean e_msg_composer_get_view_replyto (EMsgComposer *composer);
-void e_msg_composer_set_view_replyto (EMsgComposer *composer,
- gboolean view_replyto);
-
-gboolean e_msg_composer_get_view_bcc (EMsgComposer *composer);
-void e_msg_composer_set_view_bcc (EMsgComposer *composer,
- gboolean view_bcc);
-gboolean e_msg_composer_get_view_cc (EMsgComposer *composer);
-void e_msg_composer_set_view_cc (EMsgComposer *composer,
- gboolean view_cc);
-
-const MailConfigAccount *e_msg_composer_get_preferred_account (EMsgComposer *composer);
-
-void e_msg_composer_set_pgp_sign (EMsgComposer *composer,
- gboolean pgp_sign);
-gboolean e_msg_composer_get_pgp_sign (EMsgComposer *composer);
-void e_msg_composer_set_pgp_encrypt (EMsgComposer *composer,
- gboolean pgp_encrypt);
-gboolean e_msg_composer_get_pgp_encrypt (EMsgComposer *composer);
-
-void e_msg_composer_clear_inlined_table (EMsgComposer *composer);
-gchar * e_msg_composer_guess_mime_type (const gchar *file_name);
-
-void e_msg_composer_set_changed (EMsgComposer *composer);
-void e_msg_composer_unset_changed (EMsgComposer *composer);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* ___E_MSG_COMPOSER_H__ */
diff --git a/composer/evolution-composer.c b/composer/evolution-composer.c
deleted file mode 100644
index abca28306b..0000000000
--- a/composer/evolution-composer.c
+++ /dev/null
@@ -1,376 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* evolution-composer.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: Dan Winship <danw@helixcode.com>
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <gtk/gtksignal.h>
-#include <bonobo/bonobo-item-handler.h>
-#include <bonobo/bonobo-generic-factory.h>
-#include <gal/util/e-util.h>
-#include <gal/widgets/e-gui-utils.h>
-#include <camel/camel.h>
-#include "evolution-composer.h"
-#include "mail/mail-config.h"
-
-#define PARENT_TYPE BONOBO_OBJECT_TYPE
-static BonoboObjectClass *parent_class = NULL;
-
-static void (*send_cb) (EMsgComposer *, gpointer);
-static void (*postpone_cb) (EMsgComposer *, gpointer);
-
-/* CORBA interface implementation. */
-
-static POA_GNOME_Evolution_Composer__vepv Composer_vepv;
-
-static GList *
-corba_recipientlist_to_glist (const GNOME_Evolution_Composer_RecipientList *cl)
-{
- GNOME_Evolution_Composer_Recipient *recip;
- GList *gl = NULL;
- char *str;
- int i;
-
- for (i = cl->_length - 1; i >= 0; i--) {
- recip = &(cl->_buffer[i]);
-
- /* Let's copy this code into yet another place! */
- if (*recip->name) {
- str = camel_internet_address_format_address (recip->name, recip->address);
- } else
- str = g_strdup (recip->address);
-
- gl = g_list_prepend (gl, str);
- }
-
- return gl;
-}
-
-static void
-free_recipient_glist (GList *gl)
-{
- GList *tmp;
-
- while (gl) {
- tmp = gl->next;
- g_free (gl->data);
- g_list_free_1 (gl);
- gl = tmp;
- }
-}
-
-static void
-impl_Composer_set_headers (PortableServer_Servant servant,
- const GNOME_Evolution_Composer_RecipientList *to,
- const GNOME_Evolution_Composer_RecipientList *cc,
- const GNOME_Evolution_Composer_RecipientList *bcc,
- const CORBA_char *subject,
- CORBA_Environment *ev)
-{
- BonoboObject *bonobo_object;
- EvolutionComposer *composer;
- GList *gto, *gcc, *gbcc;
-
- bonobo_object = bonobo_object_from_servant (servant);
- composer = EVOLUTION_COMPOSER (bonobo_object);
-
- gto = corba_recipientlist_to_glist (to);
- gcc = corba_recipientlist_to_glist (cc);
- gbcc = corba_recipientlist_to_glist (bcc);
-
- e_msg_composer_set_headers (composer->composer, NULL, gto, gcc, gbcc,
- subject);
-
- free_recipient_glist (gto);
- free_recipient_glist (gcc);
- free_recipient_glist (gbcc);
-}
-
-static void
-impl_Composer_set_body_text (PortableServer_Servant servant,
- const CORBA_char *text,
- CORBA_Environment *ev)
-{
- BonoboObject *bonobo_object;
- EvolutionComposer *composer;
-
- bonobo_object = bonobo_object_from_servant (servant);
- composer = EVOLUTION_COMPOSER (bonobo_object);
-
- e_msg_composer_set_body_text (composer->composer, text);
-}
-
-static void
-impl_Composer_attach_MIME (PortableServer_Servant servant,
- const CORBA_char *data,
- CORBA_Environment *ev)
-{
- BonoboObject *bonobo_object;
- EvolutionComposer *composer;
- CamelMimePart *attachment;
- CamelStream *mem_stream;
- int status;
-
- bonobo_object = bonobo_object_from_servant (servant);
- composer = EVOLUTION_COMPOSER (bonobo_object);
-
- mem_stream = camel_stream_mem_new_with_buffer (data, strlen (data));
- attachment = camel_mime_part_new ();
- status = camel_data_wrapper_construct_from_stream (
- CAMEL_DATA_WRAPPER (attachment), mem_stream);
- camel_object_unref (CAMEL_OBJECT (mem_stream));
-
- if (status == -1) {
- CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
- ex_GNOME_Evolution_Composer_CouldNotParse,
- NULL);
- return;
- }
-
- e_msg_composer_attach (composer->composer, attachment);
- camel_object_unref (CAMEL_OBJECT (attachment));
-}
-
-static void
-impl_Composer_attach_data (PortableServer_Servant servant,
- const CORBA_char *content_type,
- const CORBA_char *filename,
- const CORBA_char *description,
- const CORBA_boolean show_inline,
- const CORBA_char *data,
- CORBA_Environment *ev)
-{
- BonoboObject *bonobo_object;
- EvolutionComposer *composer;
- CamelMimePart *attachment;
-
- bonobo_object = bonobo_object_from_servant (servant);
- composer = EVOLUTION_COMPOSER (bonobo_object);
-
- attachment = camel_mime_part_new ();
- camel_mime_part_set_content (attachment, data, strlen (data),
- content_type);
-
- if (*filename)
- camel_mime_part_set_filename (attachment, filename);
- if (*description)
- camel_mime_part_set_description (attachment, description);
- camel_mime_part_set_disposition (attachment, show_inline ?
- "inline" : "attachment");
-
- e_msg_composer_attach (composer->composer, attachment);
- camel_object_unref (CAMEL_OBJECT (attachment));
-}
-
-static void
-impl_Composer_show (PortableServer_Servant servant,
- CORBA_Environment *ev)
-{
- BonoboObject *bonobo_object;
- EvolutionComposer *composer;
-
- bonobo_object = bonobo_object_from_servant (servant);
- composer = EVOLUTION_COMPOSER (bonobo_object);
-
- gtk_widget_show (GTK_WIDGET (composer->composer));
-}
-
-POA_GNOME_Evolution_Composer__epv *
-evolution_composer_get_epv (void)
-{
- POA_GNOME_Evolution_Composer__epv *epv;
-
- epv = g_new0 (POA_GNOME_Evolution_Composer__epv, 1);
- epv->setHeaders = impl_Composer_set_headers;
- epv->setBodyText = impl_Composer_set_body_text;
- epv->attachMIME = impl_Composer_attach_MIME;
- epv->attachData = impl_Composer_attach_data;
- epv->show = impl_Composer_show;
-
- return epv;
-}
-
-
-/* GtkObject stuff */
-
-static void
-destroy (GtkObject *object)
-{
- EvolutionComposer *composer = EVOLUTION_COMPOSER (object);
-
- if (composer->composer)
- gtk_object_unref (GTK_OBJECT (composer->composer));
-
- GTK_OBJECT_CLASS (parent_class)->destroy (object);
-}
-
-static void
-class_init (EvolutionComposerClass *klass)
-{
- GtkObjectClass *object_class;
-
- object_class = GTK_OBJECT_CLASS (klass);
- object_class->destroy = destroy;
-
- parent_class = gtk_type_class (bonobo_object_get_type ());
-
- Composer_vepv.Bonobo_Unknown_epv = bonobo_object_get_epv ();
- Composer_vepv.GNOME_Evolution_Composer_epv = evolution_composer_get_epv ();
-}
-
-static void
-init (EvolutionComposer *composer)
-{
- const MailConfigAccount *account;
- gboolean send_html;
- gchar *sig_file = NULL;
-
- account = mail_config_get_default_account ();
- send_html = mail_config_get_send_html ();
-
- if (account->id)
- sig_file = account->id->signature;
-
- if (sig_file)
- composer->composer = e_msg_composer_new_with_sig_file (sig_file, send_html);
- else
- composer->composer = e_msg_composer_new ();
-
- gtk_signal_connect (GTK_OBJECT (composer->composer), "send",
- GTK_SIGNAL_FUNC (send_cb), NULL);
- gtk_signal_connect (GTK_OBJECT (composer->composer), "postpone",
- GTK_SIGNAL_FUNC (postpone_cb), NULL);
-}
-
-#if 0
-static Bonobo_ItemContainer_ObjectNames *
-enum_objects (BonoboItemHandler *handler, gpointer data, CORBA_Environment *ev)
-{
-}
-#endif
-
-static Bonobo_Unknown
-get_object (BonoboItemHandler *h, const char *item_name, gboolean only_if_exists,
- gpointer data, CORBA_Environment *ev)
-{
- EvolutionComposer *composer = data;
- GSList *options, *l;
-
- options = bonobo_item_option_parse (item_name);
- for (l = options; l; l = l->next){
- BonoboItemOption *option = l->data;
-
- if (strcmp (option->key, "visible") == 0){
- gboolean show = 1;
-
- if (option->value)
- show = atoi (option->value);
-
- if (show)
- gtk_widget_show (GTK_WIDGET (composer->composer));
- else
- gtk_widget_hide (GTK_WIDGET (composer->composer));
- }
- }
- return bonobo_object_dup_ref (
- BONOBO_OBJECT (composer)->corba_objref, ev);
-}
-
-void
-evolution_composer_construct (EvolutionComposer *composer,
- GNOME_Evolution_Composer corba_object)
-{
- BonoboObject *item_handler;
-
- g_return_if_fail (composer != NULL);
- g_return_if_fail (EVOLUTION_IS_COMPOSER (composer));
- g_return_if_fail (corba_object != CORBA_OBJECT_NIL);
-
- bonobo_object_construct (BONOBO_OBJECT (composer), corba_object);
-
- item_handler = BONOBO_OBJECT (
- bonobo_item_handler_new (NULL, get_object, composer));
- bonobo_object_add_interface (BONOBO_OBJECT (composer), BONOBO_OBJECT (item_handler));
-}
-
-EvolutionComposer *
-evolution_composer_new (void)
-{
- EvolutionComposer *new;
- POA_GNOME_Evolution_Composer *servant;
- CORBA_Environment ev;
- GNOME_Evolution_Composer corba_object;
-
- servant = (POA_GNOME_Evolution_Composer *) g_new0 (BonoboObjectServant, 1);
- servant->vepv = &Composer_vepv;
-
- CORBA_exception_init (&ev);
- POA_GNOME_Evolution_Composer__init ((PortableServer_Servant) servant, &ev);
- if (ev._major != CORBA_NO_EXCEPTION) {
- g_free (servant);
- CORBA_exception_free (&ev);
- return NULL;
- }
- CORBA_exception_free (&ev);
-
- new = gtk_type_new (evolution_composer_get_type ());
- corba_object = bonobo_object_activate_servant (BONOBO_OBJECT (new),
- servant);
- evolution_composer_construct (new, corba_object);
-
- return new;
-}
-
-E_MAKE_TYPE (evolution_composer, "EvolutionComposer", EvolutionComposer, class_init, init, PARENT_TYPE)
-
-
-#define GNOME_EVOLUTION_MAIL_COMPOSER_FACTORY_ID "OAFIID:GNOME_Evolution_Mail_ComposerFactory"
-
-static BonoboObject *
-factory_fn (BonoboGenericFactory *factory, void *closure)
-{
- if (!mail_config_is_configured ()) {
- e_notice (NULL, GNOME_MESSAGE_BOX_ERROR,
- _("Could not create composer window, because you "
- "have not yet\nconfigured any identities in the "
- "mail component."));
- return NULL;
- }
- return BONOBO_OBJECT (evolution_composer_new ());
-}
-
-void
-evolution_composer_factory_init (void (*send) (EMsgComposer *, gpointer),
- void (*postpone) (EMsgComposer *, gpointer))
-{
- if (bonobo_generic_factory_new (GNOME_EVOLUTION_MAIL_COMPOSER_FACTORY_ID,
- factory_fn, NULL) == NULL) {
- e_notice (NULL, GNOME_MESSAGE_BOX_ERROR,
- _("Cannot initialize Evolution's composer."));
- exit (1);
- }
-
- send_cb = send;
- postpone_cb = postpone;
-}
diff --git a/composer/evolution-composer.h b/composer/evolution-composer.h
deleted file mode 100644
index 65f3f246d2..0000000000
--- a/composer/evolution-composer.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* evolution-composer.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: Dan Winship
- */
-
-#ifndef __EVOLUTION_COMPOSER_H__
-#define __EVOLUTION_COMPOSER_H__
-
-#include <bonobo/bonobo-object.h>
-
-#include "Composer.h"
-#include "e-msg-composer.h"
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#define EVOLUTION_TYPE_COMPOSER (evolution_composer_get_type ())
-#define EVOLUTION_COMPOSER(obj) (GTK_CHECK_CAST ((obj), EVOLUTION_TYPE_COMPOSER, EvolutionComposer))
-#define EVOLUTION_COMPOSER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), EVOLUTION_TYPE_COMPOSER, EvolutionComposerClass))
-#define EVOLUTION_IS_COMPOSER(obj) (GTK_CHECK_TYPE ((obj), EVOLUTION_TYPE_COMPOSER))
-#define EVOLUTION_IS_COMPOSER_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), EVOLUTION_TYPE_COMPOSER))
-
-typedef struct _EvolutionComposer EvolutionComposer;
-typedef struct _EvolutionComposerClass EvolutionComposerClass;
-
-struct _EvolutionComposer {
- BonoboObject parent;
-
- EMsgComposer *composer;
-};
-
-struct _EvolutionComposerClass {
- BonoboObjectClass parent_class;
-};
-
-POA_GNOME_Evolution_Composer__epv *evolution_composer_get_epv (void);
-
-GtkType evolution_composer_get_type (void);
-void evolution_composer_construct (EvolutionComposer *,
- GNOME_Evolution_Composer);
-EvolutionComposer *evolution_composer_new (void);
-
-void evolution_composer_factory_init (void (*send) (EMsgComposer *, gpointer),
- void (*postpone) (EMsgComposer *, gpointer));
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __EVOLUTION_COMPOSER_H__ */
diff --git a/composer/listener.c b/composer/listener.c
deleted file mode 100644
index 7ce6747885..0000000000
--- a/composer/listener.c
+++ /dev/null
@@ -1,230 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* This file is part of gnome-spell bonobo component
-
- Copyright (C) 2000 Helix Code, Inc.
- Authors: Radek Doulik <rodo@helixcode.com>
-
- 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; see the file COPYING.LIB. If not, write to
- the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
-*/
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <bonobo/bonobo-arg.h>
-#include <bonobo/bonobo-object.h>
-
-#include "listener.h"
-
-static BonoboObjectClass *listener_parent_class;
-static POA_GNOME_GtkHTML_Editor_Listener__vepv listener_vepv;
-
-inline static EditorListener *
-listener_from_servant (PortableServer_Servant servant)
-{
- return EDITOR_LISTENER (bonobo_object_from_servant (servant));
-}
-
-static CORBA_any *
-get_any_null ()
-{
- CORBA_any *rv;
-
- rv = CORBA_any__alloc ();
- rv->_type = TC_null;
-
- return rv;
-}
-
-static gchar *
-resolve_image_url (EditorListener *l, gchar *url)
-{
- gchar *cid = NULL;
-
- printf ("resolve_image_url %s\n", url);
-
- if (!strncmp (url, "file:", 5)) {
- gchar *id;
-
- id = (gchar *) g_hash_table_lookup (l->composer->inline_images, url + 5);
- if (!id) {
- id = header_msgid_generate ();
- g_hash_table_insert (l->composer->inline_images, g_strdup (url + 5), id);
- }
- cid = g_strconcat ("cid:", id, NULL);
- printf ("resolved to %s\n", cid);
- }
-
- return cid;
-}
-
-static void
-reply_indent (EditorListener *l, CORBA_Environment * ev)
-{
- if (!GNOME_GtkHTML_Editor_Engine_isParagraphEmpty (l->composer->editor_engine, ev)) {
- if (GNOME_GtkHTML_Editor_Engine_isPreviousParagraphEmpty (l->composer->editor_engine, ev))
- GNOME_GtkHTML_Editor_Engine_runCommand (l->composer->editor_engine, "cursor-backward", ev);
- else {
- GNOME_GtkHTML_Editor_Engine_runCommand (l->composer->editor_engine, "insert-paragraph", ev);
- return;
- }
-
- }
- GNOME_GtkHTML_Editor_Engine_runCommand (l->composer->editor_engine, "style-normal", ev);
- GNOME_GtkHTML_Editor_Engine_runCommand (l->composer->editor_engine, "indent-zero", ev);
- GNOME_GtkHTML_Editor_Engine_runCommand (l->composer->editor_engine, "text-default-color", ev);
- GNOME_GtkHTML_Editor_Engine_runCommand (l->composer->editor_engine, "italic-off", ev);
-}
-
-static CORBA_any *
-impl_event (PortableServer_Servant _servant,
- const CORBA_char * name, const CORBA_any * arg,
- CORBA_Environment * ev)
-{
- EditorListener *l = listener_from_servant (_servant);
- BonoboArg *data;
- CORBA_any *rv = NULL;
-
- /* printf ("impl_event\n"); */
-
- if (!strcmp (name, "command")) {
- /* FIXME check for insert-paragraph command */
- data = GNOME_GtkHTML_Editor_Engine_getParagraphData (l->composer->editor_engine, "orig", ev);
- if (ev->_major == CORBA_NO_EXCEPTION && data) {
- if (CORBA_TypeCode_equal (data->_type, TC_boolean, ev) && BONOBO_ARG_GET_BOOLEAN (data))
- reply_indent (l, ev);
- BONOBO_ARG_SET_BOOLEAN (data, CORBA_FALSE);
- GNOME_GtkHTML_Editor_Engine_setParagraphData (l->composer->editor_engine, "orig", data, ev);
- }
- } else if (!strcmp (name, "image_url")) {
- gchar *url;
-
- if ((url = resolve_image_url (l, BONOBO_ARG_GET_STRING (arg)))) {
- rv = bonobo_arg_new (TC_string);
- BONOBO_ARG_SET_STRING (rv, url);
- printf ("new url: %s\n", url);
- g_free (url);
- }
- }
-
- return rv ? rv : get_any_null ();
-}
-
-POA_GNOME_GtkHTML_Editor_Listener__epv *
-listener_get_epv (void)
-{
- POA_GNOME_GtkHTML_Editor_Listener__epv *epv;
-
- epv = g_new0 (POA_GNOME_GtkHTML_Editor_Listener__epv, 1);
-
- epv->event = impl_event;
-
- return epv;
-}
-
-static void
-init_listener_corba_class (void)
-{
- listener_vepv.Bonobo_Unknown_epv = bonobo_object_get_epv ();
- listener_vepv.GNOME_GtkHTML_Editor_Listener_epv = listener_get_epv ();
-}
-
-static void
-listener_class_init (EditorListenerClass *klass)
-{
- listener_parent_class = gtk_type_class (bonobo_object_get_type ());
-
- init_listener_corba_class ();
-}
-
-GtkType
-listener_get_type (void)
-{
- static GtkType type = 0;
-
- if (!type){
- GtkTypeInfo info = {
- "EditorListener",
- sizeof (EditorListener),
- sizeof (EditorListenerClass),
- (GtkClassInitFunc) listener_class_init,
- (GtkObjectInitFunc) NULL,
- NULL, /* reserved 1 */
- NULL, /* reserved 2 */
- (GtkClassInitFunc) NULL
- };
-
- type = gtk_type_unique (bonobo_object_get_type (), &info);
- }
-
- return type;
-}
-
-EditorListener *
-listener_construct (EditorListener *listener, GNOME_GtkHTML_Editor_Listener corba_listener)
-{
- g_return_val_if_fail (listener != NULL, NULL);
- g_return_val_if_fail (IS_EDITOR_LISTENER (listener), NULL);
- g_return_val_if_fail (corba_listener != CORBA_OBJECT_NIL, NULL);
-
- if (!bonobo_object_construct (BONOBO_OBJECT (listener), (CORBA_Object) corba_listener))
- return NULL;
-
- return listener;
-}
-
-static GNOME_GtkHTML_Editor_Listener
-create_listener (BonoboObject *listener)
-{
- POA_GNOME_GtkHTML_Editor_Listener *servant;
- CORBA_Environment ev;
-
- servant = (POA_GNOME_GtkHTML_Editor_Listener *) g_new0 (BonoboObjectServant, 1);
- servant->vepv = &listener_vepv;
-
- CORBA_exception_init (&ev);
- POA_GNOME_GtkHTML_Editor_Listener__init ((PortableServer_Servant) servant, &ev);
- ORBIT_OBJECT_KEY(servant->_private)->object = NULL;
-
- if (ev._major != CORBA_NO_EXCEPTION){
- g_free (servant);
- CORBA_exception_free (&ev);
- return CORBA_OBJECT_NIL;
- }
-
- CORBA_exception_free (&ev);
-
- return (GNOME_GtkHTML_Editor_Listener) bonobo_object_activate_servant (listener, servant);
-}
-
-EditorListener *
-listener_new (EMsgComposer *composer)
-{
- EditorListener *listener;
- GNOME_GtkHTML_Editor_Listener corba_listener;
-
- listener = gtk_type_new (EDITOR_LISTENER_TYPE);
- listener->composer = composer;
-
- corba_listener = create_listener (BONOBO_OBJECT (listener));
-
- if (corba_listener == CORBA_OBJECT_NIL) {
- bonobo_object_unref (BONOBO_OBJECT (listener));
- return NULL;
- }
-
- return listener_construct (listener, corba_listener);
-}
diff --git a/composer/listener.h b/composer/listener.h
deleted file mode 100644
index 0c50ef2111..0000000000
--- a/composer/listener.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* This file is part of gnome-spell bonobo component
-
- Copyright (C) 2000 Helix Code, Inc.
- Authors: Radek Doulik <rodo@helixcode.com>
-
- 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; 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 LISTENER_H_
-#define LISTENER_H_
-
-#include <libgnome/gnome-defs.h>
-#include <bonobo/bonobo-object.h>
-#include "Editor.h"
-#include "e-msg-composer.h"
-
-BEGIN_GNOME_DECLS
-
-#define EDITOR_LISTENER_TYPE (listener_get_type ())
-#define EDITOR_LISTENER(o) (GTK_CHECK_CAST ((o), EDITOR_LISTENER_TYPE, EditorListener))
-#define EDITOR_LISTENER_CLASS(k) (GTK_CHECK_CLASS_CAST((k), EDITOR_LISTENER_TYPE, EditorListenerClass))
-#define IS_EDITOR_LISTENER(o) (GTK_CHECK_TYPE ((o), EDITOR_LISTENER_TYPE))
-#define IS_EDITOR_LISTENER_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), EDITOR_LISTENER_TYPE))
-
-typedef struct {
- BonoboObject parent;
- EMsgComposer *composer;
-} EditorListener;
-
-typedef struct {
- BonoboObjectClass parent_class;
-} EditorListenerClass;
-
-GtkType listener_get_type (void);
-EditorListener *listener_construct (EditorListener *listener,
- GNOME_GtkHTML_Editor_Listener corba_listener);
-EditorListener *listener_new (EMsgComposer *composer);
-POA_GNOME_GtkHTML_Editor_Listener__epv *listener_get_epv (void);
-
-END_GNOME_DECLS
-
-#endif /* LISTENER_H_ */
diff --git a/configure.in b/configure.in
deleted file mode 100644
index 26665c9231..0000000000
--- a/configure.in
+++ /dev/null
@@ -1,832 +0,0 @@
-# Process this file with autoconf to produce a configure script.
-AC_INIT(camel)
-AM_CONFIG_HEADER(config.h)
-
-EVOLUTION_MAJOR_VERSION=0
-EVOLUTION_MINOR_VERSION=0
-EVOLUTION_MICRO_VERSION=10
-VERSION=$EVOLUTION_MINOR_VERSION.$EVOLUTION_MICRO_VERSION
-PACKAGE=evolution
-
-AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
-AC_SUBST(VERSION)
-
-AC_DEFUN(EVO_CHECK_LIB, [
- dispname="$1"
- dispvers="$2"
- pkgname="$3"
-
- AC_MSG_CHECKING(for $dispname >= $dispvers)
- cmpvers=`echo $dispvers | awk -F. '{ print $[]1 * 1000000 + $[]2 * 10000 + $[]3 * 100 + $[]4;}'`
- if gnome-config --libs $pkgname > /dev/null 2>&1; then
- pkgvers=`gnome-config --modversion $pkgname | sed -e 's/^[[^0-9]]*//'`
- else
- pkgvers=not
- fi
- AC_MSG_RESULT($pkgvers found)
-
- pkgvers=`echo $pkgvers | awk -F. '{ print $[]1 * 1000000 + $[]2 * 10000 + $[]3 * 100 + $[]4;}'`
- if test "$pkgvers" -lt $cmpvers; then
- AC_MSG_ERROR([
-""
-"You need $dispname $dispvers or later to build Evolution"
-"If you think you already have this installed, consult the README."])
- fi
-])
-
-
-dnl Initialize maintainer mode
-AM_MAINTAINER_MODE
-
-AC_ISC_POSIX
-AC_PROG_CC
-AC_PROG_CPP
-AM_PROG_LEX
-AC_PROG_YACC
-case $YACC in
-*yacc*)
- AC_MSG_ERROR(You need bison to build Evolution)
- ;;
-esac
-AC_STDC_HEADERS
-AC_ARG_PROGRAM
-AC_PROG_INSTALL
-AC_PROG_LN_S
-AC_PROG_MAKE_SET
-
-dnl Initialize xml-i18n-tools
-AM_PROG_XML_I18N_TOOLS
-
-dnl Initialize libtool
-AM_PROG_LIBTOOL
-
-AM_ACLOCAL_INCLUDE(macros)
-GNOME_INIT()
-GNOME_COMPILE_WARNINGS
-GNOME_X_CHECKS
-EVO_CHECK_LIB(gnome-libs, 1.2.9, gnome)
-
-ALL_LINGUAS="az ca da de el en_GB es fi fr ga gl hu it ja ko lt nl nn no pl pt pt_BR ru sk sl sv tr uk"
-AM_GNOME_GETTEXT
-localedir='$(prefix)/$(DATADIRNAME)/locale'
-AC_SUBST(localedir)
-
-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"
-
-
-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_DEFINE_UNQUOTED(SYSTEM_MAIL_DIR, "$system_mail_dir")
-
-dnl * Time zone stuff
-AC_CACHE_CHECK(for timezone variable, ac_cv_var_timezone,
- AC_TRY_COMPILE([
- #include <time.h>
- ], [
- 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 <time.h>
- ], [
- 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 mkdtemp isblank)
-
-dnl **************************************************
-dnl ctime_r prototype
-dnl **************************************************
-
-AC_CACHE_CHECK([if ctime_r wants three arguments], ac_cv_ctime_r_three_args,
-[
- AC_TRY_COMPILE([
- #include <time.h>
- ],[
- char *buf;
- time_t date;
- ctime_r( &date, buf, 100 );
- ],[
- ac_cv_ctime_r_three_args=yes
- ],[
- ac_cv_ctime_r_three_args=no
- ])
-])
-
-if test x"$ac_cv_ctime_r_three_args" = xyes ; then
- AC_DEFINE(CTIME_R_THREE_ARGS)
-fi
-
-dnl **************************************************
-dnl gethostbyname_r prototype
-dnl **************************************************
-
-AC_CACHE_CHECK([if gethostbyname_r wants five arguments], ac_cv_gethostbyname_r_five_args,
-[
- AC_TRY_COMPILE([
- #include "confdefs.h"
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
- #include <netdb.h>
-
- #define BUFSIZE (sizeof(struct hostent)+10)
- ],[
- struct hostent hent;
- char buffer[BUFSIZE];
- int bufsize=BUFSIZE;
- int h_errno;
-
- (void)gethostbyname_r( "www.ximian.com", &hent, buffer, bufsize, &h_errno);
- ],[
- ac_cv_gethostbyname_r_five_args=yes
- ],[
- ac_cv_gethostbyname_r_five_args=no
- ])
-])
-
-if test x"$ac_cv_gethostbyname_r_five_args" = xyes ; then
- AC_DEFINE(GETHOSTBYNAME_R_FIVE_ARGS)
-fi
-
-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 * Except on RH7.0, which puts db in yet another place
-dnl **************************************************
-AC_CHECK_HEADERS(db_185.h)
-AC_CHECK_HEADERS(db1/db.h)
-
-dnl **************************************************
-dnl * ldap related stuff.
-dnl **************************************************
-AC_ARG_ENABLE(ldap,
-[ --enable-ldap=[no/yes] Enable LDAP support in evolution],,enable_ldap=no)
-if test x$enable_ldap = xyes; then
- LDAP_LIBS=
- AC_CHECK_LIB(resolv, res_query, LDAP_LIBS="-lresolv")
- AC_CHECK_LIB(lber, ber_get_tag, LDAP_LIBS="-llber $LDAP_LIBS", ,$LDAP_LIBS)
- if test x$ac_cv_lib_lber_ber_get_tag = xyes; then
- AC_CHECK_LIB(ldap, ldap_open, LDAP_LIBS="-lldap $LDAP_LIBS", ,$LDAP_LIBS)
- fi
-fi
-
-
-if test x$ac_cv_lib_ldap_ldap_open = xyes; then
-dnl *
-dnl * check for openldap version 2.x, since 1.x doesn't have the schema stuff
-dnl *
- AC_MSG_CHECKING(if openldap is version 2.x)
- AC_EGREP_CPP(yes,
- [#include "ldap.h"
- #if LDAP_VENDOR_VERSION > 20000
- yes
- #endif
- ], is_2x=yes, is_2x=no)
-
- if test x$is_2x = xyes; then
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_LDAP)
- AC_SUBST(LDAP_LIBS)
- msg_ldap=yes
- else
- AC_MSG_ERROR(evolution requires OpenLDAP version >= 2)
- fi
-else
- msg_ldap=no
- enable_ldap=no
-fi
-AM_CONDITIONAL(ENABLE_LDAP, test x$enable_ldap = xyes)
-
-dnl **************************************************
-dnl NNTP support.
-dnl **************************************************
-AC_ARG_ENABLE(nntp,
-[ --enable-nntp=[no/yes] Enable NNTP support in evolution],,enable_nntp=no)
-if test "x$enable_nntp" = "xyes"; then
- AC_DEFINE(ENABLE_NNTP)
- msg_nntp=yes
-else
- msg_nntp=no
-fi
-AM_CONDITIONAL(ENABLE_NNTP, test x$enable_nntp = xyes)
-
-dnl **************************************************
-dnl * Posix thread support
-dnl **************************************************
-
-dnl Hah! Threads are no longer an option
-dnl AC_ARG_WITH(threads, [ --with-threads Include thread support],[
-dnl FIXME: support more thread types, pth at least
-
-GNOME_PTHREAD_CHECK
-
-if test "x$PTHREAD_LIB" = "x" ; then
- AC_MSG_ERROR([POSIX threads are currently required for Evolution])
-fi
-
-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
-
-THREADS_LIBS="$PTHREAD_LIB `glib-config --libs gthread`"
-THREADS_CFLAGS="`glib-config --cflags gthread`"
-
-AC_SUBST(THREADS_LIBS)
-AC_SUBST(THREADS_CFLAGS)
-AC_DEFINE(ENABLE_THREADS)
-
-dnl **************************************************
-dnl * File locking
-dnl **************************************************
-
-AC_ARG_ENABLE(dot-locking,
-[ --enable-dot-locking=[yes/no] Enable support for locking mail files with dot locking],,enable_dot_locking=yes)
-if test "x$enable_dot_locking" = "xyes"; then
- AC_DEFINE(USE_DOT)
- msg_dot=yes
-else
- msg_dot=no
-fi
-
-AC_ARG_ENABLE(file-locking,
-[ --enable-file-locking=[fcntl/flock/no] Enable support for locking mail files with file locking],,enable_file_locking=fcntl)
-if test "x$enable_file_locking" = "xfcntl"; then
- AC_DEFINE(USE_FCNTL)
- msg_file=fcntl
-else
- if test "x$enable_file_locking" = "xflock"; then
- AC_DEFINE(USE_FLOCK)
- msg_file=flock
- else
- msg_file=no
- fi
-fi
-
-
-
-dnl ***************
-dnl GNOME Libraries
-dnl ***************
-EVO_CHECK_LIB(Bonobo, 0.36, bonobox)
-EVO_CHECK_LIB(OAF, 0.6, oaf)
-EVO_CHECK_LIB(libglade, 0.14, libglade)
-EVO_CHECK_LIB(gdk-pixbuf with GNOME canvas support, 0.9.0, gnomecanvaspixbuf)
-EVO_CHECK_LIB(GAL, 0.6.99.0, gal)
-EVO_CHECK_LIB(GtkHTML, 0.8, gtkhtml)
-EVO_CHECK_LIB(GNOME-VFS, 0.4.2, vfs)
-EVO_CHECK_LIB(libxml, 1.8.10, xml)
-
-dnl **********
-dnl libunicode
-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 CFLAGS and LIBS and stuff
-dnl *************************
-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 gal` $THREADS_LIBS $UNICODE_LIBS"
-EXTRA_GNOME_CFLAGS="`gnome-config --cflags libglade gdk_pixbuf gnomecanvaspixbuf gnomeui gal` $THREADS_CFLAGS $UNICODE_CFLAGS"
-
-AC_SUBST(EXTRA_GNOME_LIBS)
-AC_SUBST(EXTRA_GNOME_CFLAGS)
-
-BONOBO_GNOME_LIBS="`gnome-config --libs bonobox_print libglade gdk_pixbuf gnomecanvaspixbuf gnomeui` $UNICODE_LIBS $OAF_LIBS"
-BONOBO_GNOME_CFLAGS="`gnome-config --cflags bonobox_print libglade gdk_pixbuf gnomecanvaspixbuf gnomeui ` $UNICODE_CFLAGS $OAF_CFLAGS"
-AC_SUBST(BONOBO_GNOME_LIBS)
-AC_SUBST(BONOBO_GNOME_CFLAGS)
-
-BONOBO_HTML_GNOME_LIBS="`gnome-config --libs bonobox_print libglade gdk_pixbuf gtkhtml gnomecanvaspixbuf gnomeui ` $THREAD_LIBS $UNICODE_LIBS"
-BONOBO_HTML_GNOME_CFLAGS="`gnome-config --cflags bonobox_print libglade gdk_pixbuf gtkhtml gnomecanvaspixbuf gnomeui ` $THREAD_CFLAGS $UNICODE_CFLAGS"
-AC_SUBST(BONOBO_HTML_GNOME_LIBS)
-AC_SUBST(BONOBO_HTML_GNOME_CFLAGS)
-
-GNOME_PRINT_LIBS=`gnome-config --libs print`
-GNOME_PRINT_CFLAGS=`gnome-config --cflags print`
-AC_SUBST(GNOME_PRINT_LIBS)
-AC_SUBST(GNOME_PRINT_CFLAGS)
-
-GTKHTML_CFLAGS="`gnome-config --cflags gtkhtml`"
-GTKHTML_LIBS="`gnome-config --libs gtkhtml`"
-AC_SUBST(GTKHTML_CFLAGS)
-AC_SUBST(GTKHTML_LIBS)
-
-if test x${prefix} = xNONE; then
- html_prefix=$ac_default_prefix
-else
- html_prefix=$prefix
-fi
-AC_MSG_CHECKING(for Editor.idl in `gnome-config --datadir`/gtkhtml or ${html_prefix}/share/gtkhtml)
-if test -f `gnome-config --datadir`/gtkhtml/Editor.idl; then
- GTK_HTML_EDITOR_IDL=`gnome-config --datadir`/gtkhtml/Editor.idl
- AC_MSG_RESULT(found)
-else
- if test -f ${html_prefix}/share/gtkhtml/Editor.idl; then
- GTK_HTML_EDITOR_IDL=${html_prefix}/share/gtkhtml/Editor.idl
- AC_MSG_RESULT(found)
- else
- AC_MSG_ERROR(Editor.idl is required to compile Evolution composer, it's included in GtkHTML
-You need GtkHTML build with html-editor-control)
- fi
-fi
-
-AC_SUBST(GTK_HTML_EDITOR_IDL)
-
-GNOME_VFS_LIBS="`gnome-config --libs vfs`"
-GNOME_VFS_CFLAGS="`gnome-config --cflags vfs`"
-AC_SUBST(GNOME_VFS_LIBS)
-AC_SUBST(GNOME_VFS_CFLAGS)
-
-BONOBO_VFS_GNOME_LIBS="`gnome-config --libs bonobox libglade gdk_pixbuf gnomecanvaspixbuf vfs gnomeui `"
-BONOBO_VFS_GNOME_CFLAGS="`gnome-config --cflags bonobox libglade gdk_pixbuf gnomecanvaspixbuf vfs gnomeui `"
-AC_SUBST(BONOBO_VFS_GNOME_LIBS)
-AC_SUBST(BONOBO_VFS_GNOME_CFLAGS)
-
-dnl ******************************
-dnl Pilot checking
-dnl ******************************
-AC_ARG_ENABLE(pilot-conduits,
-[ --enable-pilot-conduits=[no/yes] Enable support for building pilot conduits.],,enable_pilot_conduits=no)
-if test "x$enable_pilot_conduits" = "xyes"; then
-GNOME_PILOT_CHECK
-fi
-AM_CONDITIONAL(ENABLE_PILOT_CONDUITS, test "x$enable_pilot_conduits" = "xyes")
-if test x$enable_pilot_conduits = xyes; then
- msg_pilot=yes
-else
- msg_pilot=no
-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])
-msg_krb5=no
-if test ${with_krb5:=no} != no; then
- LDFLAGS_save="$LDFLAGS"
-
- mitlibs="-lkrb5 -lk5crypto -lcom_err"
- heimlibs="-lkrb5 -lcrypto -lasn1 -lcom_err -lroken"
- AC_CACHE_CHECK([for Kerberos 5], ac_cv_lib_kerberos5,
- [
- LDFLAGS="$LDFLAGS -L$with_krb5/lib $mitlibs"
- AC_TRY_LINK_FUNC(krb5_init_context, ac_cv_lib_kerberos5="$mitlibs",
- [
- LDFLAGS="$LDFLAGS_save -L$with_krb5/lib $heimlibs"
- AC_TRY_LINK_FUNC(krb5_init_context, ac_cv_lib_kerberos5="$heimlibs", ac_cv_lib_kerberos5=no)
- ])
- LDFLAGS="$LDFLAGS_save"
- ])
- if test "$ac_cv_lib_kerberos5" != no; then
- AC_DEFINE(HAVE_KRB5)
- msg_krb5=yes
- KRB5_CFLAGS="-I$with_krb5/include/krb5"
- KRB5_LDFLAGS="-L$with_krb5/lib $ac_cv_lib_kerberos5"
- fi
-else
- AC_MSG_CHECKING(for Kerberos 5)
- AC_MSG_RESULT($with_krb5)
-fi
-
-msg_krb4=no
-if test x${with_krb4:=no} != xno; then
- LDFLAGS_save="$LDFLAGS"
- AC_CACHE_CHECK(for Kerberos 4, ac_cv_lib_kerberos4,
- [
- ac_cv_lib_kerberos4=no
-
- case $ac_cv_lib_kerberos5 in
- *k5crypto*)
- # Look for MIT krb5 compat krb4
- LDFLAGS="$LDFLAGS -L$with_krb4/lib -lkrb4 -ldes425 $KRB5_LDFLAGS"
- AC_TRY_LINK_FUNC(krb_mk_req, ac_cv_lib_kerberos4="-lkrb4 -ldes425 $KRB5_LDFLAGS")
- ;;
- esac
-
- if test "$ac_cv_lib_kerberos4" = no; then
- # Look for KTH krb4
- LDFLAGS="$LDFLAGS_save -L$with_krb4/lib -lkrb -lcrypto -lcom_err -lroken"
- AC_TRY_LINK_FUNC(krb_mk_req, ac_cv_lib_kerberos4="-lkrb -lcrypto -lcom_err -lroken")
- fi
- if test "$ac_cv_lib_kerberos4" = no; then
- # Look for old MIT krb4
- LDFLAGS="$LDFLAGS_save -L$with_krb4/lib -lkrb"
- AC_TRY_LINK_FUNC(krb_mk_req, ac_cv_lib_kerberos4=-lkrb,
- [
- LDFLAGS="$LDFLAGS -ldes"
- AC_TRY_LINK_FUNC(krb_mk_req, ac_cv_lib_kerberos4="-lkrb -ldes")
- ])
- fi
- ])
- LDFLAGS="$LDFLAGS_save"
- if test "$ac_cv_lib_kerberos4" != no; then
- AC_DEFINE(HAVE_KRB4)
- msg_krb4=yes
- if test -f "$with_krb4/include/krb.h" -o -f "$with_krb4/include/port-sockets.h"; then
- KRB4_CFLAGS="-I$with_krb4/include"
- else
- KRB4_CFLAGS="-I$with_krb4/include/kerberosIV"
- fi
- KRB4_LDFLAGS="-L$with_krb4/lib $ac_cv_lib_kerberos4"
-
- CFLAGS_save="$CFLAGS"
- CFLAGS="$CFLAGS $KRB4_CFLAGS"
- AC_TRY_COMPILE([#include "krb.h"
- int krb_sendauth;
- ],[return 0],[AC_DEFINE(NEED_KRB_SENDAUTH_PROTO)],)
- CFLAGS="$CFLAGS_save"
- fi
-else
- AC_MSG_CHECKING(for Kerberos 4)
- AC_MSG_RESULT(${with_krb4})
-fi
-
-AC_SUBST(KRB5_CFLAGS)
-AC_SUBST(KRB5_LDFLAGS)
-AC_SUBST(KRB4_CFLAGS)
-AC_SUBST(KRB4_LDFLAGS)
-
-
-dnl ===============================================================================
-dnl = security extension support (SSL and S/MIME)
-dnl =
-dnl = The following voodoo does detection of mozilla libraries (nspr and nss)
-dnl = needed by Camel (SSL) and Evolution (S/MIME).
-dnl =
-dnl = The Evolution security extensions are only built if these libraries are found
-dnl ===============================================================================
-AC_ARG_WITH(nspr-includes, [ --with-nspr-includes=PREFIX Location of Mozilla nspr4 includes.],
- with_nspr_includes="$withval", with_nspr_includes="/usr/include/mozilla")
-have_nspr_includes="no"
-if test "x${with_nspr_includes}" != "xno"; then
- CPPFLAGS_save="$CPPFLAGS"
-
- AC_MSG_CHECKING(for Mozilla nspr4 includes in $with_nspr_includes)
- AC_MSG_RESULT("")
-
- CPPFLAGS="$CPPFLAGS -I$with_nspr_includes"
- AC_CHECK_HEADERS(nspr.h prio.h, [ moz_nspr_includes="yes" ])
- CPPFLAGS="$CPPFLAGS_save"
-
- if test "x{$moz_nspr_includes}" != "xno" -a "x{$moz_nspr_includes}" != "x" ; then
- have_nspr_includes="yes"
- NSPR_CFLAGS="-I$with_nspr_includes"
- fi
-else
- AC_MSG_CHECKING(for Mozilla nspr4 includes)
- AC_MSG_RESULT(no)
-fi
-
-AC_ARG_WITH(nspr-libs, [ --with-nspr-libs=PREFIX Location of Mozilla nspr4 libs.],
- with_nspr_libs="$withval")
-have_nspr_libs="no"
-if test "x${with_nspr_libs}" != "xno" -a "x${have_nspr_includes}" != "xno"; then
- CFLAGS_save="$CFLAGS"
- LDFLAGS_save="$LDFLAGS"
-
- nsprlibs="-lnspr4"
- AC_CACHE_CHECK([for Mozilla nspr libraries], moz_nspr_libs,
- [
- CFLAGS="$CFLAGS $NSPR_CFLAGS"
-
- if test "x${with_nspr_libs}" != "x"; then
- LDFLAGS="$LDFLAGS -L$with_nspr_libs $nsprlibs"
- else
- LDFLAGS="$LDFLAGS $nsprlibs"
- fi
-
- AC_TRY_LINK_FUNC(PR_Init, moz_nspr_libs="yes", moz_nspr_libs="no")
- CFLAGS="$CFLAGS_save"
- LDFLAGS="$LDFLAGS_save"
- ])
- if test "x$moz_nspr_libs" != "xno"; then
- have_nspr_libs="yes"
- NSPR_LDFLAGS="-L$with_nspr_libs $nsprlibs"
- else
- NSPR_CLFAGS=""
- fi
-else
- AC_MSG_CHECKING(for Mozilla nspr4 libraries)
- AC_MSG_RESULT(no)
-fi
-
-AC_ARG_WITH(nss-includes, [ --with-nss-includes=PREFIX Location of Mozilla nss3 includes.],
- with_nss_includes="$withval", with_nss_includes="/usr/include/mozilla")
-have_nss_includes="no"
-if test "x${with_nss_includes}" != "xno" -a "x${have_nspr_libs}" != "xno"; then
- CPPFLAGS_save="$CPPFLAGS"
-
- AC_MSG_CHECKING(for Mozilla nss3 includes in $with_nss_includes)
- AC_MSG_RESULT("")
-
- CPPFLAGS="$CPPFLAGS -I$with_nss_includes"
- AC_CHECK_HEADERS(nss.h ssl.h smime.h, [ moz_nspr_includes="yes" ])
- CPPFLAGS="$CPPFLAGS_save"
-
- if test "x{$moz_nss_includes}" != "xno" -a "x{$moz_nss_includes}" != "x"; then
- have_nss_includes="yes"
- NSS_CFLAGS="-I$with_nss_includes"
- else
- NSPR_CFLAGS=""
- NSPR_LDFLAGS=""
- fi
-else
- AC_MSG_CHECKING(for Mozilla nss3 includes)
- AC_MSG_RESULT(no)
-fi
-
-AC_ARG_WITH(nss-libs, [ --with-nss-libs=PREFIX Location of Mozilla nss3 libs/includes.],
- with_nss_libs="$withval")
-msg_nss="no"
-if test "x${with_nss_libs}" != "xno" -a "x${have_nss_includes}" != "xno"; then
- LDFLAGS_save="$LDFLAGS"
-
- nsprlibs="-lnspr4"
- nsslibs="-lnss3 -lnssckbi -lssl3 -lsmime3"
- AC_CACHE_CHECK([for Mozilla nss libraries], moz_nss_libs,
- [
- LDFLAGS="$LDFLAGS -L$with_nss_libs $nsslibs"
- AC_TRY_LINK_FUNC(NSS_Init, moz_nss_libs="yes", moz_nss_libs="no")
- LDFLAGS="$LDFLAGS_save"
- ])
- if test "$moz_nss_libs" != no; then
- AC_DEFINE(HAVE_NSS)
- msg_nss="yes"
- NSS_LDFLAGS="-L$with_nss_libs $nsslibs"
- else
- NSS_CFLAGS=""
- NSPR_CFLAGS=""
- NSPR_LDFLAGS=""
- fi
-else
- AC_MSG_CHECKING(for Mozilla nss libraries)
- AC_MSG_RESULT(no)
-fi
-
-AC_SUBST(NSPR_CFLAGS)
-AC_SUBST(NSPR_LDFLAGS)
-AC_SUBST(NSS_CFLAGS)
-AC_SUBST(NSS_LDFLAGS)
-
-dnl ====================================
-dnl = End mozilla hacks
-dnl ====================================
-
-
-dnl ******************************
-dnl gtk-doc
-dnl ******************************
-
-AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false)
-AM_CONDITIONAL(HAVE_GTK_DOC, $GTKDOC)
-AC_SUBST(HAVE_GTK_DOC)
-
-dnl Let people disable the gtk-doc stuff.
-AC_ARG_ENABLE(gtk-doc, [ --enable-gtk-doc Use gtk-doc to build documentation [default=auto]], enable_gtk_doc="$enableval", enable_gtk_doc=auto)
-
-if test x$enable_gtk_doc = xauto ; then
- if test x$GTKDOC = xtrue ; then
- enable_gtk_doc=yes
- else
- enable_gtk_doc=no
- fi
-fi
-
-dnl NOTE: We need to use a separate automake conditional for this
-dnl to make this work with the tarballs.
-AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)
-
-dnl ********
-dnl movemail
-dnl ********
-AC_ARG_WITH(movemail, [ --with-movemail=PATH Path to a movemail binary])
-AC_MSG_CHECKING(for movemail)
-if test x$with_movemail = xyes -o x$with_movemail = x; then
- with_movemail=no
-fi
-if test x$with_movemail != xno; then
- AC_DEFINE_UNQUOTED(MOVEMAIL_PATH, "$with_movemail")
- AC_MSG_RESULT($with_movemail)
-else
- emacs_exec_dir=`emacs --batch --eval '(message exec-directory)' 2>&1`
- case $emacs_exec_dir in
- /*) if test -x $emacs_exec_dir/movemail; then
- if test -u $emacs_exec_dir/movemail -o -g $emacs_exec_dir/movemail; then
- AC_MSG_RESULT($emacs_exec_dir/movemail)
- AC_DEFINE_UNQUOTED(MOVEMAIL_PATH, "$emacs_exec_dir/movemail")
- else
- AC_MSG_RESULT($emacs_exec_dir/movemail... not set-id: ignored)
- fi
- else
- AC_MSG_RESULT(no)
- fi
- ;;
- *)
- AC_MSG_RESULT(no)
- ;;
- esac
-fi
-
-dnl
-dnl Compose program
-dnl
-compose_libs="bonobo gnomeui"
-COMPOSE_LIBS="`gnome-config --libs $compose_libs`"
-COMPOSE_CFLAGS="`gnome-config --cflags $compose_libs`"
-AC_SUBST(COMPOSE_LIBS)
-AC_SUBST(COMPOSE_CFLAGS)
-
-dnl ******************
-dnl Sub-version number
-dnl ******************
-AC_ARG_WITH(sub-version, [ --with-sub-version=VERSION Specify a sub-version string])
-AC_DEFINE_UNQUOTED(SUB_VERSION, "$with_sub_version")
-
-dnl ******************************
-dnl Makefiles
-dnl ******************************
-
-AC_CONFIG_SUBDIRS(libical)
-
-EVOLUTION_DIR=`(cd $srcdir; pwd)`
-AC_SUBST(EVOLUTION_DIR)
-
-AC_OUTPUT([
-Makefile
-macros/Makefile
-intl/Makefile
-po/Makefile.in
-e-util/Makefile
-e-util/ename/Makefile
-libibex/Makefile
-executive-summary/Makefile
-executive-summary/evolution-services/Makefile
-executive-summary/widgets/Makefile
-executive-summary/idl/Makefile
-executive-summary/component/Makefile
-executive-summary/test-service/Makefile
-camel/Makefile
-camel/providers/Makefile
-camel/providers/pop3/Makefile
-camel/providers/sendmail/Makefile
-camel/providers/smtp/Makefile
-camel/providers/imap/Makefile
-camel/providers/nntp/Makefile
-camel/providers/local/Makefile
-camel/tests/Makefile
-camel/tests/lib/Makefile
-camel/tests/message/Makefile
-camel/tests/misc/Makefile
-camel/tests/folder/Makefile
-camel/tests/smime/Makefile
-camel/tests/stream/Makefile
-composer/Makefile
-widgets/Makefile
-widgets/meeting-time-sel/Makefile
-widgets/misc/Makefile
-widgets/menus/Makefile
-addressbook/Makefile
-addressbook/conduit/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/widgets/Makefile
-addressbook/gui/search/Makefile
-addressbook/gui/component/Makefile
-addressbook/gui/component/select-names/Makefile
-shell/Makefile
-shell/glade/Makefile
-shell/importer/Makefile
-mail/importers/Makefile
-mail/Makefile
-data/Makefile
-libversit/Makefile
-libibex/Makefile
-calendar/Makefile
-calendar/idl/Makefile
-calendar/cal-util/Makefile
-calendar/cal-client/Makefile
-calendar/pcs/Makefile
-calendar/gui/Makefile
-calendar/gui/alarm-notify/Makefile
-calendar/gui/dialogs/Makefile
-calendar/conduits/Makefile
-calendar/conduits/calendar/Makefile
-calendar/conduits/todo/Makefile
-filter/Makefile
-wombat/Makefile
-composer/Makefile
-art/Makefile
-ui/Makefile
-default_user/Makefile
-default_user/local/Makefile
-default_user/local/Calendar/Makefile
-default_user/local/Contacts/Makefile
-default_user/local/Drafts/Makefile
-default_user/local/Executive-Summary/Makefile
-default_user/local/Inbox/Makefile
-default_user/local/Outbox/Makefile
-default_user/local/Sent/Makefile
-default_user/local/Tasks/Makefile
-default_user/local/Trash/Makefile
-views/Makefile
-views/addressbook/Makefile
-views/mail/Makefile
-views/tasks/Makefile
-tools/Makefile
-doc/Makefile
-doc/C/Makefile
-doc/devel/Makefile
-doc/devel/calendar/Makefile
-doc/devel/calendar/cal-client/Makefile
-doc/devel/calendar/cal-util/Makefile
-doc/devel/executive-summary/Makefile
-doc/devel/importer/Makefile
-])
-
-if test "x$with_sub_version" != "x"; then
-echo "
- Evolution ($with_sub_version) has been configured as follows: "
-else
-echo "
- Evolution has been configured as follows: "
-fi
-
-echo "
- Mail Directory: $system_mail_dir
- LDAP support: $msg_ldap
- NNTP support: $msg_nntp
- Pilot conduits: $msg_pilot
- Kerberos 4/5: $msg_krb4/$msg_krb5
- SSL support: $msg_nss
- Use movemail: $with_movemail
- Dot Locking: $msg_dot
- File Locking: $msg_file
- Gtk-doc: $enable_gtk_doc"
-
-if test x$enable_gtk_doc = xyes; then
-echo "
- Programming documentation files will be built automatically.
-"
-else
-echo "
- Programming documentation files will not be built.
- You may want to install the gtk-doc package
- so that you will get the Evolution Developer's Guide.
-"
-fi
diff --git a/data/.cvsignore b/data/.cvsignore
deleted file mode 100644
index 5f6365598d..0000000000
--- a/data/.cvsignore
+++ /dev/null
@@ -1,4 +0,0 @@
-Makefile
-Makefile.in
-evolution.keys
-evolution.desktop
diff --git a/data/Makefile.am b/data/Makefile.am
deleted file mode 100644
index a782cccc46..0000000000
--- a/data/Makefile.am
+++ /dev/null
@@ -1,14 +0,0 @@
-desktopdir = $(datadir)/gnome/apps/Applications
-desktop_in_files = evolution.desktop.in
-desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
-@XML_I18N_MERGE_DESKTOP_RULE@
-
-keysdir = $(datadir)/mime-info
-keys_in_files = evolution.keys.in
-keys_DATA = $(keys_in_files:.keys.in=.keys)
-@XML_I18N_MERGE_KEYS_RULE@
-
-mimedir = $(datadir)/mime-info
-mime_DATA = evolution.mime
-
-EXTRA_DIST = $(desktop_in_files) $(keys_in_files) $(mime_DATA)
diff --git a/data/evolution.desktop.in b/data/evolution.desktop.in
deleted file mode 100644
index de3c05adb1..0000000000
--- a/data/evolution.desktop.in
+++ /dev/null
@@ -1,7 +0,0 @@
-[Desktop Entry]
-_Name=Evolution
-_Comment=The Evolution groupware suite
-Exec=evolution
-Icon=evolution.png
-Terminal=0
-Type=Application
diff --git a/data/evolution.keys.in b/data/evolution.keys.in
deleted file mode 100644
index c2c27d1af7..0000000000
--- a/data/evolution.keys.in
+++ /dev/null
@@ -1,24 +0,0 @@
-text/x-vcard
- _description=address card
- default_action_type=component
- default_component_iid=OAFIID:GNOME_Evolution_Addressbook_MiniCard_Control
- short_list_component_iids_for_novice_user_level=OAFIID:GNOME_Evolution_Addressbook_MiniCard_Control
- short_list_component_iids_for_intermediate_user_level=OAFIID:GNOME_Evolution_Addressbook_MiniCard_Control
- short_list_component_iids_for_hacker_user_level=OAFIID:GNOME_Evolution_Addressbook_MiniCard_Control
-
-text/x-calendar
- _description=calendar information
- default_action_type=component
- default_component_iid=OAFIID:GNOME_Evolution_Calendar_iTip_Control
- short_list_component_iids_for_novice_user_level=OAFIID:GNOME_Evolution_Calendar_iTip_Control
- short_list_component_iids_for_intermediate_user_level=OAFIID:GNOME_Evolution_Calendar_iTip_Control
- short_list_component_iids_for_hacker_user_level=OAFIID:GNOME_Evolution_Calendar_iTip_Control
-
-text/calendar
- _description=calendar information
- default_action_type=component
- default_component_iid=OAFIID:GNOME_Evolution_Calendar_iTip_Control
- short_list_component_iids_for_novice_user_level=OAFIID:GNOME_Evolution_Calendar_iTip_Control
- short_list_component_iids_for_intermediate_user_level=OAFIID:GNOME_Evolution_Calendar_iTip_Control
- short_list_component_iids_for_hacker_user_level=OAFIID:GNOME_Evolution_Calendar_iTip_Control
-
diff --git a/data/evolution.mime b/data/evolution.mime
deleted file mode 100644
index fe3e12f0b5..0000000000
--- a/data/evolution.mime
+++ /dev/null
@@ -1,2 +0,0 @@
-text/calendar
- ext: ics \ No newline at end of file
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 a8d60417a2..0000000000
--- a/default_user/ChangeLog
+++ /dev/null
@@ -1,173 +0,0 @@
-2001-03-22 Dan Winship <danw@ximian.com>
-
- * local/Inbox/mbox: Change the From address to "The Evolution
- Team" <evolve@ximian.com> so that we get spammed instead of hello@
-
-2001-03-08 Jeffrey Stedfast <fejj@ximian.com>
-
- * local/Trash/folder-metadata.xml: The type of this folder is now
- "vtrash" and not "mail".
-
-2001-03-01 Not Zed <NotZed@Ximian.com>
-
- * Makefile.am: Added searches.xml to default user data.
-
-2001-01-25 Christopher James Lahey <clahey@helixcode.com>
-
- * local/Contacts/Makefile.am (defaultcalendar_DATA): Added
- create-initial.
-
- * local/Contacts/create-initial: New empty file to trigger the
- contact manager to add the initial Hello contact.
-
-2001-01-08 Damon Chaplin <damon@helixcode.com>
-
- * local/Makefile.am (SUBDIRS): added Tasks subdir.
-
- * local/Tasks/Makefile.am:
- * local/Tasks/folder-metadata.xml: new files for the default Tasks
- folder.
-
- * shortcuts.xml: added Tasks folder shortcut.
-
-2000-12-29 Chris Toshok <toshok@helixcode.com>
-
- * ldap-servers.xml, addressbook-sources.xml: down with
- ldap-servers.xml, up with addressbook-sources.xml.
-
- * Makefile.am (default_DATA): same.
-
-2000-10-25 Iain Holmes <iain@helixcode.com>
-
- * local/Makefile.am: Added executive-summary again.
-
- * shortcurts.xml: In out, in out and shake it all about
- The executive summary is back in.
-
-2000-10-12 Iain Holmes <iain@helixcode.com>
-
- * local/Makefile.am: And removed it again.
-
- * shortcuts.xml: Commented out the Exec-summary.
-
-2000-10-10 Iain Holmes <iain@helixcode.com>
-
- * local/Makefile.am: Added the Executive-Summary dir.
-
-2000-10-05 Iain Holmes <iain@helixcode.com>
-
- * local/Makefile: Added Executive-Summary.
-
- * shortcuts.xml: Added the Executive-Summary
-
- * local/Executive-Summary/*: Added.
-
-2000-09-22 Chris Toshok <toshok@helixcode.com>
-
- * ldapservers.xml: added yahoo, whowhere, and infospace servers.
-
-2000-09-19 Dan Winship <danw@helixcode.com>
-
- * Makefile.am (defaultdir): Use $(datadir), not $(prefix)/share
-
-2000-09-13 JP Rosevear <jpr@helixcode.com>
-
- * local/Sent/Makefile.am (defaultcalendardir): Install the Sent
- dir in Sent, not Sentbox
-
-2000-09-12 Dan Winship <danw@helixcode.com>
-
- * local/Makefile.am: Renamed Sentbox to Sent
-
- * local/{Sent\ Mail,Sentbox}/*: removed
-
- * local/Sent/*: created
-
-2000-09-03 Jeffrey Stedfast <fejj@helixcode.com>
-
- Reversed my last change, folders with spaces in the name breaks
- configure
-
-2000-09-03 Jeffrey Stedfast <fejj@helixcode.com>
-
- * local/Makefile.am: Renamed Sentbox to Sent\ Mail
-
- * local/Sent\ Mail/*: Updated
-
-2000-09-01 Jeffrey Stedfast <fejj@helixcode.com>
-
- * local/Makefile.am: Added Sentbox
-
- * local/Sentbox/*: New folder for storing sent messages
-
-2000-07-12 Chris Toshok <toshok@helixcode.com>
-
- (install-data-hook): ignore error on mkdir.
-
-2000-07-12 Chris Toshok <toshok@helixcode.com>
-
- * Makefile.am (install-data-hook): create an empty news directory
- in $(defaultdir).
-
-2000-07-06 Chris Toshok <toshok@helixcode.com>
-
- * ldapservers.xml: break up the uri into it's component pieces. -
- don't store the uri in this file.
-
-2000-07-05 Chris Toshok <toshok@helixcode.com>
-
- * shortcuts.xml: remove the Internet Directories group.
-
- * Makefile.am (default_DATA): add ldapservers.xml.
-
- * local/Makefile.am (SUBDIRS): remove Directories.
-
- * ldapservers.xml: new ldap metadata.
-
- * local/Directories/*: remove directories.
-
-2000-06-01 Ettore Perazzoli <ettore@helixcode.com>
-
- * local/Inbox/mbox: Removed `<blockquote>' from the main text so
- that the welcome mail is all visible when loaded into Evolution at
- startup.
-
-2000-05-10 Matt Loper <matt@helixcode.com>
-
- * local/Inbox/mbox: Commented out currently unimplemented shortcut
- items.
-
-2000-05-10 Christopher James Lahey <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * local/Directories/subfolders/Bigfoot/.cvsignore: New .cvsignore
- file.
-
-2000-05-09 Christopher James Lahey <clahey@helixcode.com>
-
- * local/Contacts/Makefile.am, local/Contacts/addressbook.db:
- Removed addressbook.db since this is now handled by the pas.
-
-2000-05-08 Matt Loper <matt@helixcode.com>
-
- * shortcuts.xml: Removed unused shortcuts which point to
- unimplemented folders.
-
-2000-05-08 Christopher James Lahey <clahey@helixcode.com>
-
- * local/Contacts/Makefile.am: Install `addressbook.db'.
-
-000-05-06 Ettore Perazzoli <ettore@helixcode.com>
-
- * 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 3dabe74653..0000000000
--- a/default_user/Makefile.am
+++ /dev/null
@@ -1,9 +0,0 @@
-SUBDIRS = local
-
-defaultdir = $(datadir)/evolution/default_user
-default_DATA = addressbook-sources.xml shortcuts.xml searches.xml
-
-EXTRA_DIST = $(default_DATA)
-
-install-data-hook:
- -mkdir $(defaultdir)/news
diff --git a/default_user/addressbook-sources.xml b/default_user/addressbook-sources.xml
deleted file mode 100644
index 52a52a001c..0000000000
--- a/default_user/addressbook-sources.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0"?>
-<addressbooks>
- <contactserver>
- <name>Bigfoot</name>
- <description>Bigfoot</description>
- <host>ldap.bigfoot.com</host>
- <port>389</port>
- <rootdn></rootdn>
- <scope>one</scope>
- </contactserver>
- <contactserver>
- <name>InfoSpace</name>
- <description>Infospace</description>
- <host>ldap.infospace.com</host>
- <port>389</port>
- <rootdn></rootdn>
- <scope>one</scope>
- </contactserver>
- <contactserver>
- <name>Netcenter</name>
- <description>Netcenter Member Directory</description>
- <host>memberdir.netscape.com</host>
- <port>389</port>
- <rootdn>ou=member_directory,o=netcenter.com</rootdn>
- <scope>one</scope>
- </contactserver>
- <contactserver>
- <name>WhoWhere</name>
- <description>WhoWhere</description>
- <host>ldap.whowhere.com</host>
- <port>389</port>
- <rootdn></rootdn>
- <scope>one</scope>
- </contactserver>
- <contactserver>
- <name>Yahoo!</name>
- <description>Yahoo! People Search</description>
- <host>ldap.yahoo.com</host>
- <port>389</port>
- <rootdn></rootdn>
- <scope>one</scope>
- </contactserver>
-</addressbooks>
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 @@
-<?xml version="1.0"?>
-<efolder>
- <type>calendar</type>
- <description>Calendar items</description>
-</efolder>
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 3a30a122fe..0000000000
--- a/default_user/local/Contacts/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
-defaultcalendardir = $(datadir)/evolution/default_user/local/Contacts
-defaultcalendar_DATA = \
- folder-metadata.xml \
- create-initial
-EXTRA_DIST = $(defaultcalendar_DATA)
diff --git a/default_user/local/Contacts/create-initial b/default_user/local/Contacts/create-initial
deleted file mode 100644
index e69de29bb2..0000000000
--- a/default_user/local/Contacts/create-initial
+++ /dev/null
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 @@
-<?xml version="1.0"?>
-<efolder>
- <type>contacts</type>
- <description>Contacts</description>
-</efolder>
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 @@
-<?xml version="1.0"?>
-<efolder>
- <type>mail</type>
- <description>Drafts</description>
-</efolder>
diff --git a/default_user/local/Executive-Summary/.cvsignore b/default_user/local/Executive-Summary/.cvsignore
deleted file mode 100644
index 282522db03..0000000000
--- a/default_user/local/Executive-Summary/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/default_user/local/Executive-Summary/Makefile.am b/default_user/local/Executive-Summary/Makefile.am
deleted file mode 100644
index 6fae47d4ab..0000000000
--- a/default_user/local/Executive-Summary/Makefile.am
+++ /dev/null
@@ -1,6 +0,0 @@
-defaultcalendardir = $(datadir)/evolution/default_user/local/Executive-Summary
-
-defaultcalendar_DATA = \
- folder-metadata.xml
-
-EXTRA_DIST = $(defaultcalendar_DATA)
diff --git a/default_user/local/Executive-Summary/folder-metadata.xml b/default_user/local/Executive-Summary/folder-metadata.xml
deleted file mode 100644
index 86e9e425e4..0000000000
--- a/default_user/local/Executive-Summary/folder-metadata.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0"?>
-<efolder>
- <type>executive-summary</type>
- <description>Executive Summary folder</description>
-</efolder>
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 @@
-<?xml version="1.0"?>
-<efolder>
- <type>mail</type>
- <description>Inbox folder</description>
-</efolder>
diff --git a/default_user/local/Inbox/mbox b/default_user/local/Inbox/mbox
deleted file mode 100644
index 5b0ce660ea..0000000000
--- a/default_user/local/Inbox/mbox
+++ /dev/null
@@ -1,2225 +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 <danw@twelve-monkeys.helixcode.com>; 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 <danw@helixcode.com>; 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 <eltester@ximian.com>
-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: "The Evolution Team" <evolve@ximian.com>
-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
-
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
- <head>
- <title>Welcome to Evolution Pre-Release!</title>
- </head>
-
- <body background=3D"cid:26389.957885364.2@twelve-monkeys.helixcode.com">
- <img src=3D"cid:26389.957885364.3@twelve-monkeys.helixcode.com" align=3Dcenter><br>
- =
-
- <blockquote>
- =
-
- <p>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.</p>
- =
-
- </blockquote> =
-
-
- <h4>Getting Started</h4>
-
- <blockquote>
-
- <p>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.</p>
- =
-
- <dl> <!-- <dt><b><font color=3D"#993366">Today</font></b></dt> =
-
- <dd>This tool offers a summary of new messages and the tasks
- and appointments you have lined up for today.</dd>-->
- =
-
- <img src=3D"cid:26389.957885364.4@twelve-monkeys.helixcode.com" align=3Dright>
-
- <dt><b><font color=3D"#993366">Inbox</font></b></dt> =
-
- <dd>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.
- </dd>
- =
-
- <dt><b><font
- color=3D"#993366">Calendar</font></b></dt> <dd>Network
- and share your calendar to keep your whole
- organization on schedule and up to date. </dd>
- =
-
- <dt><b><font color=3D"#993366">Contacts</font></b></dt> =
-
- <dd>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.</dd>
- =
-
- <!-- <dt><b><font color=3D"#993366">Tasks</font></b></dt>
- <dd>The Tasks tool combines a "to do" list with
- alarms and reminders to help you keep track of
- daily events.
- </dd> -->
- =
-
- <!--<dt><b><font color=3D"#993366">Notes</font></b></dt> =
-
- <dd> Write poems, take down messages from phone conversations,
- or keep small things organized: Notes is your catch-all
- notepad.</dd> -->
-
- </dl>
- =
-
- </blockquote>
- =
-
- </body>
-</html>
-
-
-------- =_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 9a2bf358d3..0000000000
--- a/default_user/local/Makefile.am
+++ /dev/null
@@ -1,10 +0,0 @@
-SUBDIRS = \
- Calendar \
- Contacts \
- Drafts \
- Executive-Summary \
- Inbox \
- Outbox \
- Sent \
- Tasks \
- 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 @@
-<?xml version="1.0"?>
-<efolder>
- <type>mail</type>
- <description>Outbox</description>
-</efolder>
diff --git a/default_user/local/Sent/.cvsignore b/default_user/local/Sent/.cvsignore
deleted file mode 100644
index 282522db03..0000000000
--- a/default_user/local/Sent/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/default_user/local/Sent/Makefile.am b/default_user/local/Sent/Makefile.am
deleted file mode 100644
index 024f5c76eb..0000000000
--- a/default_user/local/Sent/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-defaultcalendardir = $(datadir)/evolution/default_user/local/Sent
-defaultcalendar_DATA = folder-metadata.xml
-
-EXTRA_DIST = $(defaultcalendar_DATA)
diff --git a/default_user/local/Sent/folder-metadata.xml b/default_user/local/Sent/folder-metadata.xml
deleted file mode 100644
index 87188daedb..0000000000
--- a/default_user/local/Sent/folder-metadata.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0"?>
-<efolder>
- <type>mail</type>
- <description>Sent</description>
-</efolder>
diff --git a/default_user/local/Tasks/.cvsignore b/default_user/local/Tasks/.cvsignore
deleted file mode 100644
index 282522db03..0000000000
--- a/default_user/local/Tasks/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/default_user/local/Tasks/Makefile.am b/default_user/local/Tasks/Makefile.am
deleted file mode 100644
index 10ac77fb38..0000000000
--- a/default_user/local/Tasks/Makefile.am
+++ /dev/null
@@ -1,3 +0,0 @@
-defaulttasksdir = $(datadir)/evolution/default_user/local/Tasks
-defaulttasks_DATA = folder-metadata.xml
-EXTRA_DIST = $(defaulttasks_DATA)
diff --git a/default_user/local/Tasks/folder-metadata.xml b/default_user/local/Tasks/folder-metadata.xml
deleted file mode 100644
index 32b3381af6..0000000000
--- a/default_user/local/Tasks/folder-metadata.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0"?>
-<efolder>
- <type>tasks</type>
- <description>Tasks</description>
-</efolder>
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 0ca3820f8c..0000000000
--- a/default_user/local/Trash/folder-metadata.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0"?>
-<efolder>
- <type>vtrash</type>
- <description>Trash</description>
-</efolder>
diff --git a/default_user/searches.xml b/default_user/searches.xml
deleted file mode 100644
index 2a05fb98db..0000000000
--- a/default_user/searches.xml
+++ /dev/null
@@ -1,73 +0,0 @@
-<?xml version="1.0"?>
-<filteroptions>
- <ruleset>
- <rule grouping="any" source="demand">
- <title>Body or subject contains</title>
- <partset>
- <part name="subject">
- <value name="subject-type" type="option" value="contains"/>
- <value name="subject" type="string">
- <string>crap</string>
- </value>
- </part>
- <part name="body">
- <value name="body-type" type="option" value="contains"/>
- <value name="word" type="string">
- <string>crap</string>
- </value>
- </part>
- </partset>
- <sources/>
- </rule>
- <rule grouping="any" source="demand">
- <title>Body contains</title>
- <partset>
- <part name="body">
- <value name="body-type" type="option" value="contains"/>
- <value name="word" type="string"/>
- </part>
- </partset>
- <sources/>
- </rule>
- <rule grouping="any" source="demand">
- <title>Subject contains</title>
- <partset>
- <part name="subject">
- <value name="subject-type" type="option" value="contains"/>
- <value name="subject" type="string"/>
- </part>
- </partset>
- <sources/>
- </rule>
- <rule grouping="any" source="demand">
- <title>Body does not contain</title>
- <partset>
- <part name="body">
- <value name="body-type" type="option" value="not contains"/>
- <value name="word" type="string"/>
- </part>
- </partset>
- <sources/>
- </rule>
- <rule grouping="any" source="demand">
- <title>Subject does not contain</title>
- <partset>
- <part name="subject">
- <value name="subject-type" type="option" value="not contains"/>
- <value name="subject" type="string"/>
- </part>
- </partset>
- <sources/>
- </rule>
- <rule grouping="any" source="demand">
- <title>Sender contains</title>
- <partset>
- <part name="sender">
- <value name="sender-type" type="option" value="contains"/>
- <value name="sender" type="string"/>
- </part>
- </partset>
- <sources/>
- </rule>
- </ruleset>
-</filteroptions>
diff --git a/default_user/shortcuts.xml b/default_user/shortcuts.xml
deleted file mode 100644
index 4532b0a17b..0000000000
--- a/default_user/shortcuts.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0"?>
-<shortcuts>
- <group title="Evolution shortcuts">
- <item>evolution:/local/Executive-Summary</item>
- <item>evolution:/local/Inbox</item>
-<!-- <item>evolution:/local/Outbox</item>
- <item>evolution:/local/Trash</item>
- <item>evolution:/local/Drafts</item> -->
- <item>evolution:/local/Calendar</item>
- <item>evolution:/local/Tasks</item>
- <item>evolution:/local/Contacts</item>
- </group>
-
-
-<!-- <group title="Personal shortcuts">
- </group>
--->
-</shortcuts>
-
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 @@
-<!doctype book PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [
-<!entity CamelDataWrapper SYSTEM "sgml/camel-data-wrapper.sgml">
-<!entity CamelFolder SYSTEM "sgml/camel-folder.sgml">
-<!entity CamelMimeMessage SYSTEM "sgml/camel-mime-message.sgml">
-<!entity CamelMimePart SYSTEM "sgml/camel-mime-part.sgml">
-<!entity CamelRecipient SYSTEM "sgml/camel-recipient.sgml">
-<!entity CamelService SYSTEM "sgml/camel-service.sgml">
-<!entity CamelStore SYSTEM "sgml/camel-store.sgml">
-<!entity CamelStream SYSTEM "sgml/camel-stream.sgml">
-]>
-
-<book>
- <bookinfo>
- <title>Camel Messaging Library Reference Manual</title>
- </bookinfo>
-
- <chapter id="camel-objects">
- <title>Camel Objects</title>
- &CamelMimeMessage;
- &CamelService;
- &CamelStore;
- &CamelFolder;
- &CamelMimePart;
- &CamelDataWrapper;
- &CamelRecipient;
-
- </chapter>
-</book>
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 @@
-
-<INCLUDE>gnome.h</INCLUDE>
-<INCLUDE>camel-data-wrapper.h</INCLUDE>
-
-
-<SECTION>
-<FILE>camel-data-wrapper</FILE>
-CamelDataWrapper
-<TITLE>CamelDataWrapper</TITLE>
-camel_data_wrapper_write_to_stream
-<SUBSECTION Standard>
-CAMEL_DATA_WRAPPER
-camel_data_wrapper_get_type
-CAMEL_DATA_WRAPPER_CLASS
-</SECTION>
-
-<SECTION>
-<FILE>camel-recipient</FILE>
-CamelRecipientTable
-<TITLE>CamelRecipientTable</TITLE>
-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
-</SECTION>
-
-<SECTION>
-<FILE>camel-mime-part</FILE>
-CamelMimePart
-<TITLE>CamelMimePart</TITLE>
-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
-<SUBSECTION Standard>
-CAMEL_MIME_PART
-camel_mime_part_get_type
-CAMEL_MIME_PART_CLASS
-</SECTION>
-
-
-
-<SECTION>
-<FILE>camel-mime-message</FILE>
-CamelMimeMessage
-<TITLE>CamelMimeMessage</TITLE>
-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
-<SUBSECTION Standard>
-CAMEL_MIME_MESSAGE
-camel_mime_message_get_type
-CAMEL_MIME_MESSAGE_CLASS
-</SECTION>
-
-
-<SECTION>
-<FILE>camel-folder</FILE>
-CamelFolder
-<TITLE>CamelFolder</TITLE>
-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
-<SUBSECTION Standard>
-CAMEL_FOLDER
-camel_folder_get_type
-CAMEL_FOLDER_CLASS
-</SECTION>
-
-<SECTION>
-<FILE>camel-service</FILE>
-CamelService
-<TITLE>CamelService</TITLE>
-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
-<SUBSECTION Standard>
-CAMEL_SERVICE
-camel_service_get_type
-CAMEL_SERVICE_CLASS
-</SECTION>
-
-<SECTION>
-<FILE>camel-store</FILE>
-CamelStore
-<TITLE>CamelStore</TITLE>
-camel_store_get_separator
-camel_store_get_folder
-<SUBSECTION Standard>
-CAMEL_STORE
-camel_store_get_type
-CAMEL_STORE_CLASS
-</SECTION>
-
-
-<SECTION>
-<FILE>camel-stream</FILE>
-CamelStream
-<TITLE>CamelStream</TITLE>
-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
-<SUBSECTION Standard>
-CAMEL_STREAM
-camel_stream_get_type
-CAMEL_STREAM_CLASS
-</SECTION>
-
-
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 <gtk/gtk.h>
-#include <camel/camel-data-wrapper.h>
-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 @@
-<!-- ##### SECTION Title ##### -->
-CamelDataWrapper
-
-<!-- ##### SECTION Short_Description ##### -->
-data container with streaming methods
-
-<!-- ##### SECTION Long_Description ##### -->
-<para>
-A CamelDataWrapper is wrapper around data which can save them to a stream
-and restore them from a stream.
-</para>
-
-<!-- ##### SECTION See_Also ##### -->
-<para>
-
-</para>
-
-<!-- ##### FUNCTION camel_data_wrapper_write_to_stream ##### -->
-<para>
-
-</para>
-
-@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 @@
-<!-- ##### SECTION Title ##### -->
-CamelFolder
-
-<!-- ##### SECTION Short_Description ##### -->
-Represents a folder of messages on a store.
-
-<!-- ##### SECTION Long_Description ##### -->
-<para>
-CamelFolder represents a folder in a message store.
-</para>
-
-<!-- ##### SECTION See_Also ##### -->
-<para>
-
-</para>
-
-<!-- ##### STRUCT CamelFolder ##### -->
-<para>
-
-</para>
-
-
-<!-- ##### FUNCTION camel_folder_get_folder ##### -->
-<para>
-
-</para>
-
-@folder:
-@folder_name:
-@Returns:
-
-
-<!-- ##### FUNCTION camel_folder_create ##### -->
-<para>
-
-</para>
-
-@folder:
-@Returns:
-
-
-<!-- ##### FUNCTION camel_folder_delete ##### -->
-<para>
-
-</para>
-
-@folder:
-@recurse:
-@Returns:
-
-
-<!-- ##### FUNCTION camel_folder_delete_messages ##### -->
-<para>
-
-</para>
-
-@folder:
-@Returns:
-
-
-<!-- ##### FUNCTION camel_folder_get_parent_folder ##### -->
-<para>
-
-</para>
-
-@folder:
-@Returns:
-
-
-<!-- ##### FUNCTION camel_folder_get_parent_store ##### -->
-<para>
-
-</para>
-
-@folder:
-@Returns:
-
-
-<!-- ##### FUNCTION camel_folder_get_mode ##### -->
-<para>
-
-</para>
-
-@folder:
-@Returns:
-
-
-<!-- ##### FUNCTION camel_folder_list_subfolders ##### -->
-<para>
-
-</para>
-
-@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 @@
-<!-- ##### SECTION Title ##### -->
-CamelMimeMessage
-
-<!-- ##### SECTION Short_Description ##### -->
-
-
-<!-- ##### SECTION Long_Description ##### -->
-<para>
-
-</para>
-
-<!-- ##### SECTION See_Also ##### -->
-<para>
-
-</para>
-
-<!-- ##### STRUCT CamelMimeMessage ##### -->
-<para>
-
-</para>
-
-
-<!-- ##### FUNCTION camel_mime_message_remove_recipient ##### -->
-<para>
-
-</para>
-
-@mime_message:
-@recipient_type:
-@recipient:
-
-
-<!-- ##### FUNCTION camel_mime_message_get_recipients ##### -->
-<para>
-
-</para>
-
-@mime_message:
-@recipient_type:
-@Returns:
-
-
-<!-- ##### FUNCTION camel_mime_message_set_flag ##### -->
-<para>
-
-</para>
-
-@mime_message:
-@flag:
-@value:
-
-
-<!-- ##### FUNCTION camel_mime_message_set_subject ##### -->
-<para>
-
-</para>
-
-@mime_message:
-@subject:
-
-
-<!-- ##### FUNCTION camel_mime_message_get_reply_to ##### -->
-<para>
-
-</para>
-
-@mime_message:
-@Returns:
-
-
-<!-- ##### FUNCTION camel_mime_message_get_from ##### -->
-<para>
-
-</para>
-
-@mime_message:
-@Returns:
-
-
-<!-- ##### FUNCTION camel_mime_message_set_reply_to ##### -->
-<para>
-
-</para>
-
-@mime_message:
-@reply_to:
-
-
-<!-- ##### FUNCTION camel_mime_message_get_sent_date ##### -->
-<para>
-
-</para>
-
-@mime_message:
-@Returns:
-
-
-<!-- ##### FUNCTION camel_mime_message_new_with_session ##### -->
-<para>
-
-</para>
-
-@session:
-@Returns:
-
-
-<!-- ##### FUNCTION camel_mime_message_add_recipient ##### -->
-<para>
-
-</para>
-
-@mime_message:
-@recipient_type:
-@recipient:
-
-
-<!-- ##### FUNCTION camel_mime_message_get_subject ##### -->
-<para>
-
-</para>
-
-@mime_message:
-@Returns:
-
-
-<!-- ##### FUNCTION camel_mime_message_set_from ##### -->
-<para>
-
-</para>
-
-@mime_message:
-@from:
-
-
-<!-- ##### FUNCTION camel_mime_message_get_flag ##### -->
-<para>
-
-</para>
-
-@mime_message:
-@flag:
-@Returns:
-
-
-<!-- ##### FUNCTION camel_mime_message_get_message_number ##### -->
-<para>
-
-</para>
-
-@mime_message:
-@Returns:
-
-
-<!-- ##### FUNCTION camel_mime_message_get_received_date ##### -->
-<para>
-
-</para>
-
-@mime_message:
-@Returns:
-
-
-<!-- ##### FUNCTION camel_mime_message_set_received_date ##### -->
-<para>
-
-</para>
-
-@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 @@
-<!-- ##### SECTION Title ##### -->
-CamelMimePart
-
-<!-- ##### SECTION Short_Description ##### -->
-
-
-<!-- ##### SECTION Long_Description ##### -->
-<para>
-
-</para>
-
-<!-- ##### SECTION See_Also ##### -->
-<para>
-
-</para>
-
-<!-- ##### FUNCTION camel_mime_part_set_filename ##### -->
-<para>
-
-</para>
-
-@mime_part:
-@filename:
-
-
-<!-- ##### FUNCTION camel_mime_part_get_disposition ##### -->
-<para>
-
-</para>
-
-@mime_part:
-@Returns:
-
-
-<!-- ##### FUNCTION camel_mime_part_get_content_MD5 ##### -->
-<para>
-
-</para>
-
-@mime_part:
-@Returns:
-
-
-<!-- ##### FUNCTION camel_mime_part_get_encoding ##### -->
-<para>
-
-</para>
-
-@mime_part:
-@Returns:
-
-
-<!-- ##### FUNCTION camel_mime_part_set_header_lines ##### -->
-<para>
-
-</para>
-
-@mime_part:
-@header_lines:
-
-
-<!-- ##### FUNCTION camel_mime_part_get_content_id ##### -->
-<para>
-
-</para>
-
-@mime_part:
-@Returns:
-
-
-<!-- ##### FUNCTION camel_mime_part_set_description ##### -->
-<para>
-
-</para>
-
-@mime_part:
-@description:
-
-
-<!-- ##### FUNCTION camel_mime_part_set_text ##### -->
-<para>
-
-</para>
-
-@camel_mime_part:
-@text:
-
-
-<!-- ##### FUNCTION camel_mime_part_set_encoding ##### -->
-<para>
-
-</para>
-
-@mime_part:
-@encoding:
-
-
-<!-- ##### FUNCTION camel_mime_part_set_disposition ##### -->
-<para>
-
-</para>
-
-@mime_part:
-@disposition:
-
-
-<!-- ##### FUNCTION camel_mime_part_get_filename ##### -->
-<para>
-
-</para>
-
-@mime_part:
-@Returns:
-
-
-<!-- ##### FUNCTION camel_mime_part_get_content_languages ##### -->
-<para>
-
-</para>
-
-@mime_part:
-@Returns:
-
-
-<!-- ##### FUNCTION camel_mime_part_set_content_languages ##### -->
-<para>
-
-</para>
-
-@mime_part:
-@content_languages:
-
-
-<!-- ##### FUNCTION camel_mime_part_get_header_lines ##### -->
-<para>
-
-</para>
-
-@mime_part:
-@Returns:
-
-
-<!-- ##### FUNCTION camel_mime_part_get_description ##### -->
-<para>
-
-</para>
-
-@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 @@
-<!-- ##### SECTION Title ##### -->
-CamelRecipientTable
-
-<!-- ##### SECTION Short_Description ##### -->
-
-
-<!-- ##### SECTION Long_Description ##### -->
-<para>
-
-</para>
-
-<!-- ##### SECTION See_Also ##### -->
-<para>
-
-</para>
-
-<!-- ##### STRUCT CamelRecipientTable ##### -->
-<para>
-
-</para>
-
-@recipient_hash_table:
-@ref_count:
-
-<!-- ##### FUNCTION camel_recipient_table_new ##### -->
-<para>
-
-</para>
-
-@Returns:
-
-
-<!-- ##### FUNCTION camel_recipient_table_unref ##### -->
-<para>
-
-</para>
-
-@recipient_table:
-
-
-<!-- ##### FUNCTION camel_recipient_table_get ##### -->
-<para>
-
-</para>
-
-@recipient_table:
-@recipient_type:
-@Returns:
-
-
-<!-- ##### FUNCTION camel_recipient_table_add ##### -->
-<para>
-
-</para>
-
-@recipient_table:
-@recipient_type:
-@recipient:
-
-
-<!-- ##### FUNCTION camel_recipient_table_remove ##### -->
-<para>
-
-</para>
-
-@recipient_table:
-@recipient_type:
-@recipient:
-
-
-<!-- ##### FUNCTION camel_recipient_table_add_list ##### -->
-<para>
-
-</para>
-
-@recipient_table:
-@recipient_type:
-@recipient_list:
-
-
-<!-- ##### FUNCTION camel_recipient_table_ref ##### -->
-<para>
-
-</para>
-
-@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 @@
-<!-- ##### SECTION Title ##### -->
-CamelService
-
-<!-- ##### SECTION Short_Description ##### -->
-
-
-<!-- ##### SECTION Long_Description ##### -->
-<para>
-
-</para>
-
-<!-- ##### SECTION See_Also ##### -->
-<para>
-
-</para>
-
-<!-- ##### STRUCT CamelService ##### -->
-<para>
-
-</para>
-
-@e:
-
-<!-- ##### FUNCTION camel_service_connect ##### -->
-<para>
-
-</para>
-
-@service:
-
-
-<!-- ##### FUNCTION camel_service_is_connected ##### -->
-<para>
-
-</para>
-
-@service:
-@Returns:
-
-
-<!-- ##### FUNCTION camel_service_connect_to_with_login_passwd ##### -->
-<para>
-
-</para>
-
-@service:
-@host:
-@login:
-@passwd:
-
-
-<!-- ##### FUNCTION camel_service_connect_to_with_login_passwd_port ##### -->
-<para>
-
-</para>
-
-@service:
-@host:
-@login:
-@passwd:
-@port:
-
-
-<!-- ##### FUNCTION camel_service_get_url ##### -->
-<para>
-
-</para>
-
-@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 @@
-<!-- ##### SECTION Title ##### -->
-CamelStore
-
-<!-- ##### SECTION Short_Description ##### -->
-
-A class representing a message (local or distant) repository
-
-<!-- ##### SECTION Long_Description ##### -->
-<para>
-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.
-</para>
-
-<!-- ##### SECTION See_Also ##### -->
-<para>
-
-</para>
-
-<!-- ##### STRUCT CamelStore ##### -->
-<para>
-
-</para>
-
-
-<!-- ##### FUNCTION camel_store_get_separator ##### -->
-<para>
-
-</para>
-
-@store:
-@Returns:
-
-
-<!-- ##### FUNCTION camel_store_get_folder ##### -->
-<para>
-
-</para>
-
-@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 @@
-<!-- ##### SECTION Title ##### -->
-CamelStream
-
-<!-- ##### SECTION Short_Description ##### -->
-
-
-<!-- ##### SECTION Long_Description ##### -->
-<para>
-
-</para>
-
-<!-- ##### SECTION See_Also ##### -->
-<para>
-
-</para>
-
-<!-- ##### FUNCTION camel_stream_seek ##### -->
-<para>
-
-</para>
-
-@stream:
-@offset:
-@policy:
-@Returns:
-
-
-<!-- ##### FUNCTION camel_stream_write ##### -->
-<para>
-
-</para>
-
-@stream:
-@buffer:
-@n:
-@Returns:
-
-
-<!-- ##### FUNCTION camel_stream_flush ##### -->
-<para>
-
-</para>
-
-@stream:
-
-
-<!-- ##### FUNCTION camel_stream_eos ##### -->
-<para>
-
-</para>
-
-@stream:
-@Returns:
-
-
-<!-- ##### MACRO camel_stream_write_string ##### -->
-<para>
-
-</para>
-
-@stream:
-@string:
-
-
-<!-- ##### FUNCTION camel_stream_close ##### -->
-<para>
-
-</para>
-
-@stream:
-
-
-<!-- ##### FUNCTION camel_stream_write_strings ##### -->
-<para>
-
-</para>
-
-@stream:
-@Varargs:
-
-
-<!-- ##### FUNCTION camel_stream_read ##### -->
-<para>
-
-</para>
-
-@stream:
-@buffer:
-@n:
-@Returns:
-
-
-<!-- ##### FUNCTION camel_stream_available ##### -->
-<para>
-
-</para>
-
-@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 <Bertrand.Guiheneuf@aful.org>
-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 <Bertrand.Guiheneuf@aful.org>
-
-
---
-
-[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 @@
-<!doctype article PUBLIC "-//Davenport//DTD DocBook V3.0//EN" []>
-
-<!-- SGMLized by Bertrand <Bertrand.Guiheneuf@aful.org> -->
-
-<article id="index">
- <artheader>
- <authorgroup>
- <author>
- <firstname>Giao</firstname>
- <surname>Nguyen</surname>
- </author>
- </authorgroup>
-
- <title>An in-depth look at the virtual folder mechanism</title>
- <abstract>
- <para>
- 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.
- </para>
- <para>
- 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.
- </para>
- <para>
- 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.
- </para>
- <para>
- 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.
- </para>
- <para>
- Comments, questions, rants, etc. should be directed at Giao Nguyen
- (grail@cafebabe.org) who will try to address issues in a timely
- manner.
- </para>
- </abstract>
- </artheader>
-
- <!-- Definitions -->
- <sect1 id="definitions">
- <title>Definitions</title>
- <sect2>
- <title>Store</title>
- <para>
- 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.
- </para>
- </sect2>
-
- <sect2>
- <title>Message</title>
- <para>
- An individual mail message.
- </para>
- </sect2>
- <sect2>
- <title>Vfolder</title>
- <para>
- 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.
- </para>
- </sect2>
- <sect2>
- <title>Default-vfolder</title>
- <para>
- 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)).
- </para>
- </sect2>
- <sect2>
- <title>Folder</title>
- <para>
- The classical mail folder approach: one message organization per
- store.
- </para>
- </sect2>
- <sect2>
- <title>Query</title>
- <para>
- 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.
- </para>
- </sect2>
- <sect2>
- <title>Summary file </title>
- <para>
- 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.
- </para>
- </sect2>
- </sect1>
-
- <!-- Queries -->
- <sect1>
- <title>Queries</title>
- <para>
- 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.
- </para>
- <para>
- 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.
- </para>
- <para>
- 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.
- </para>
- <para>
- The layerings can be done as boolean operations (and, or, not). Short
- circuiting should be used.
- </para>
- <para>
- Examples:
- <programlisting>
-(and (author "Giao")
- (unread))
- </programlisting>
- The (unread) query should only be evaluated on the results of (author
- "Giao").
- <programlisting>
-(or (author "Giao")
- (unread))
- </programlisting>
- Both of these queries should be evaluated. Any matches are added to the
- resulting vfolder.
- </para>
- </sect1>
-
- <!-- Summary files -->
- <sect1>
- <title>Summary files</title>
- <para>
- Summary files are only meaningful when applied to the context of the
- default-vfolder of a store.
- </para>
- <para>
- Summary files should be generated for queries of the form:
- <programlisting>
-(function "constant value")
- </programlisting>
- Summary files should never be generated for queries of the form:
- <programlisting>
- (function (function1))
-
- (and (function "value")
- (another-function "another value"))
- </programlisting>
- Given a query of the form:
- <programlisting>
- (and (function "value")
- (another-function "another value"))
- </programlisting>
- 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".
- </para>
- <para>
- 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.
- </para>
- </sect1>
-
- <!-- Incremental Indexing -->
- <sect1>
- <title>Incremental indexing</title>
- <para>
- 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.
- </para>
- </sect1>
-
- <!-- Can I have multiple stores -->
- <sect1>
- <title>Can I have multiple stores?</title>
- <para>
- 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!
- </para>
- </sect1>
-
- <!-- Why all this? -->
- <sect1>
- <title>Why all this?</title>
- <para>
- Consider the dynamic nature of the following query:
- <programlisting>
-(and (author "Giao")
- (sent-after (today-midnight)))
- </programlisting>
- today-midnight would be a function that is evaluated at run-time to
- calculate the appropriate object.
- </para>
- </sect1>
-
- <!-- Scenarios of usage and their solutions -->
- <sect1>
- <title>Scenarios of usage and their solutions</title>
- <sect2>
- <title>Mesage alterations</title>
- <para>
- 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.
- </para>
- <para>
- 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.
- </para>
- <para>
- 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.
- </para>
- </sect2>
- <sect2>
- <title>Message inclusion and exclusion</title>
- <para>
- Messages are included and excluded also with queries. The final query
- will have the form of:
- <programlisting>
- (and (author "Giao")
- (criteria value)
- (not (criteria other-value)))
- </programlisting>
- 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.
- </para>
- <para>
- The criterias and values are determined by the UI. The vfolder
- mechanism isn't concerned with such issues.
- </para>
- <para>
- 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.
- </para>
- <para>
- 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.
- </para>
- <para>
- The result is such that the rules for a given named query is:
- <programlisting>
- (and (user-query)
- (label inclusion-label)
- (not exclusion-label))
- </programlisting>
- </para>
- </sect2>
- <sect2>
- <title>Query scheduling</title>
- <para>
- Consider the following extremely dynamic queries:
- <programlisting>
- A:
- (and (author "Giao")
- (sent-after (today-midnight)))
-
- B:
- (and (sent-after (today-midnight))
- (author "Giao"))
-
- C:
- (or (author "Giao")
- (sent-after (today-midnight)))
- </programlisting>
- 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.
- </para>
- <para>
- 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.
- </para>
- <para>
- 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)
- </para>
- </sect2>
- <sect2>
- <title>Archives</title>
- <para>
- 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.
- </para>
- <para>
- 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.
- </para>
- <para>
- 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.
- </para>
- </sect2>
- </sect1>
-
- <!-- Miscellany -->
- <sect1>
- <title>Miscellany</title>
- <sect2>
- <title>Annotations</title>
- <para>
- 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.
- </para>
- <sect3>
- <title>Keywords</title>
- <para>
- 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.
- </para>
- </sect3>
- </sect2>
- <sect2>
- <title>Scope</title>
- <para>
- 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?
- </para>
- </sect2>
- </sect1>
-
- <!-- Alternatives to the above -->
- <sect1>
- <title>Alternatives to the above</title>
- <para>
- 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.
- </para>
- </sect1>
-</article>
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 <grail@cafebabe.org>
-
-* 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
-<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/doc/.cvsignore b/doc/.cvsignore
deleted file mode 100644
index 282522db03..0000000000
--- a/doc/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/doc/C/.cvsignore b/doc/C/.cvsignore
deleted file mode 100644
index 2f4c48adbf..0000000000
--- a/doc/C/.cvsignore
+++ /dev/null
@@ -1,9 +0,0 @@
-Makefile
-Makefile.in
-evolution-guide
-evolution-guide.junk
-evolution-guide.log
-evolution-guide.ps
-evolution-guide.dvi
-evolution-guide.tex
-fig/*.eps \ No newline at end of file
diff --git a/doc/C/Makefile.am b/doc/C/Makefile.am
deleted file mode 100644
index 88b71fcb0b..0000000000
--- a/doc/C/Makefile.am
+++ /dev/null
@@ -1,57 +0,0 @@
-evolution_helpdir = $(datadir)/gnome/help/evolution/C
-
-SGML_FILES = \
- apx-authors.sgml \
- apx-bugs.sgml \
- apx-gloss.sgml \
- config-prefs.sgml \
- config-setupassist.sgml \
- config-sync.sgml \
- preface.sgml \
- usage-calendar.sgml \
- usage-contact.sgml \
- usage-mail.sgml \
- usage-mainwindow.sgml \
- usage-sync.sgml
-
-
-EXTRA_DIST = \
- $(SGML_FILES)
-
-all: evolution-guide
-
-evolution-guide: $(SGML_FILES)
- -db2html evolution-guide.sgml
-
-dist-hook:
- mkdir $(distdir)/evolution-guide
- -cp evolution-guide/*.html evolution-guide/*.css $(distdir)/evolution-guide
- mkdir $(distdir)/fig
- -cp fig/*.png $(distdir)/fig
- mkdir $(distdir)/evolution-guide/stylesheet-images
- -cp evolution-guide/stylesheet-images/* $(distdir)/evolution-guide/stylesheet-images
-
-install-data-local: evolution-guide
- $(top_srcdir)/mkinstalldirs $(DESTDIR)$(evolution_helpdir)
- -for file in $(srcdir)/evolution-guide/*.html $(srcdir)/evolution-guide/*.css; do \
- basefile=`basename $$file`; \
- $(INSTALL_DATA) $$file $(DESTDIR)$(evolution_helpdir)/$$basefile; \
- done
-
- $(top_srcdir)/mkinstalldirs $(DESTDIR)$(evolution_helpdir)/fig
- -for file in $(srcdir)/fig/*.png; do \
- basefile=`basename $$file`; \
- $(INSTALL_DATA) $$file $(DESTDIR)$(evolution_helpdir)/fig/$$basefile; \
- done
-
- $(top_srcdir)/mkinstalldirs $(DESTDIR)$(evolution_helpdir)/stylesheet-images
- -for file in $(srcdir)/evolution-guide/stylesheet-images/*; do \
- basefile=`basename $$file`; \
- $(INSTALL_DATA) $$file $(DESTDIR)$(evolution_helpdir)/stylesheet-images/$$basefile; \
- done
-
-evolution.ps: evolution.sgml
- -db2ps $<
-
-evolution.rtf: evolution.sgml
- -db2rtf $<
diff --git a/doc/C/POTFILES.in b/doc/C/POTFILES.in
deleted file mode 100644
index d9393e82cc..0000000000
--- a/doc/C/POTFILES.in
+++ /dev/null
@@ -1,16 +0,0 @@
-apx-authors.sgml
-apx-bugs.sgml
-apx-gloss.sgml
-config-prefs.sgml
-config-setupassist.sgml
-config-sync.sgml
-evolution.sgml
-menuref.sgml
-preface.sgml
-usage-calendar.sgml
-usage-contact.sgml
-usage-mail.sgml
-usage-mainwindow.sgml
-usage-notes.sgml
-usage-print.sgml
-usage-sync.sgml
diff --git a/doc/C/apx-authors.sgml b/doc/C/apx-authors.sgml
deleted file mode 100644
index 89f0dd6bc5..0000000000
--- a/doc/C/apx-authors.sgml
+++ /dev/null
@@ -1,75 +0,0 @@
- <appendix id="authors">
- <title>Authors</title>
- <para>
- <application>Evolution</application> was written by:
-<simplelist>
- <member>Seth Alves: <email>alves@helixcode.com</email></member>
- <member>Anders Carlsson: <email>andersca@gnu.org</email></member>
- <member>Damon Chaplin: <email>damon@helixcode.com</email></member>
- <member>Clifford R. Conover: <email>rusty@zootweb.com</email></member>
- <member>Miguel De Icaza: <email>miguel@helixcode.com</email></member>
- <member> Radek Doulik: <email>rodo@helixcode.com</email></member>
- <member>Arturo Espinoza: <email>arturo@nucleu.unam.mx</email></member>
- <member>Larry Ewing: <email>lewing@helixcode.com</email></member>
- <member>Bertrand Guiheneuf: <email>bertrand@helixcode.com</email></member>
- <member>Tuomas Kuosmanen: <email>tigert@gimp.org</email></member>
- <member>Christopher J. Lahey: <email>clahey@helixcode.com</email></member>
- <member>Matthew Loper: <email>matt@loper.org</email></member>
- <member>Federico Mena: <email>federico@helixcode.com</email></member>
- <member>Eskil Heyn Olsen: <email>deity@eski.dk</email></member>
- <member>Nat Friedman: <email>nat@helixcode.com</email></member>
- <member>Ettore Perazzoli: <email>ettore@helixcode.com</email></member>
- <member>Jeffrey Stedfast: <email>jeff@helixcode.com</email></member>
- <member>Russell Steinthal: <email>rms39@columbia.edu</email></member>
- <member>Peter Teichman: <email>peter@helixcode.com</email></member>
- <member>Chris Toshok: <email>toshok@helixcode.com</email></member>
- <member>Peter Williams: <email>peter@newton.cx</email></member>
- <member>Dan Winship: <email>danw@helixcode.com</email></member>
- <member>Michael Zucchi: <email>notzed@helixcode.com</email></member>
-</simplelist>
-and other dedicated GNOME programmers.
-</para>
- <para>
- The <application>Evolution</application> code owes a great debt
- to the <application>GNOME-pim</application> and
- <application>GNOME-Calendar</application> applications, and to
- <application>KHTMLW</application>. The developers of
- <application>Evolution</application> acknowledge the efforts
- and contributions of all who worked on those projects.
- </para>
-
- <para>
- For more information please visit the
- <application>Evolution</application> <ulink
- url="http://www.helixcode.com/apps/evolution.php3"
- type="http">Web page</ulink>. Please send all comments,
- suggestions, and bug reports to the <ulink
- url="http://bugs.gnome.org" type="http">GNOME bug tracking
- database</ulink>. Instructions for submitting bug reports can be
- found on-line at <ulink
- url="http://bugs.gnome.org/Reporting.html" type="http">
- http://bugs.gnome.org/Reporting.html</ulink>. You can also use
- command <command>bug-buddy</command> for submitting bug reports.
- </para>
- <para>
- This manual was written by Aaron Weber
- (<email>aaron@helixcode.com</email>) and Kevin Breit
- (<email>battery841@mypad.com</email>) 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
- <email>docs@gnome.org</email>. You can also add your comments
- online by using <ulink type="http"
- url="http://www.gnome.org/gdp/doctable/">GNOME Documentation
- Status Table</ulink>.
- </para>
- <!-- For translations: uncomment this: <para> Latin translation
- was done by ME (<email>MYNAME@MYADDRESS</email>). Please send
- all comments and suggestions regarding this translation to
- SOMEWHERE. </para> -->
- </appendix>
-
-
-
-
-
diff --git a/doc/C/apx-bugs.sgml b/doc/C/apx-bugs.sgml
deleted file mode 100644
index e4a96a8155..0000000000
--- a/doc/C/apx-bugs.sgml
+++ /dev/null
@@ -1,23 +0,0 @@
- <appendix id="bugs">
-
- <title>Known bugs and limitations</title>
- <abstract>
- <para>
- This appendix describes known bugs and limitations of
- <application>Evolution</application>. Please use the GNOME
- <application>Bug Report Tool</application> (known as
- <command>bug-buddy</command> at the command line) if you find one
- we have not listed.
- </para>
- </abstract>
-
- <para>
- Evolution is still beta software, so the bug tracking is best
- left to the bugzilla system and to the programmers. However,
- there are a number of limitations that will not be addressed
- before version 1.0. The most notable are: Import of Microsoft
- Outlook .pst files, and compatibility with the Microsoft
- Exchange protocol.
- </para>
- </appendix>
-
diff --git a/doc/C/apx-gloss.sgml b/doc/C/apx-gloss.sgml
deleted file mode 100644
index 129020aa3d..0000000000
--- a/doc/C/apx-gloss.sgml
+++ /dev/null
@@ -1,459 +0,0 @@
-<glossary id="apx-gloss">
-
- <title>Glossary</title>
-
- <glossentry id="attachment">
- <glossterm>Attachment</glossterm>
- <glossdef>
- <para>
- Any file sent along with an email. Attachments may be embedded in
- a message or appended to it.
- </para>
- </glossdef>
- </glossentry>
-
-<glossentry id="automatic-indexing">
- <glossterm>Automatic Indexing</glossterm>
- <glossdef>
- <para>
- Pre-sorting procedure that allows
- <application>Evolution</application> to refer to data quickly.
- It enables faster searches and decreases memory usage for
- data displays.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="bcc">
- <glossterm>Bcc (Blind Carbon Copy)</glossterm>
- <glossdef>
- <para>
- 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.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="cc">
- <glossterm>Cc (Carbon Copy)</glossterm>
- <glossdef>
- <para>
- 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.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="conduit">
- <glossterm>Conduit</glossterm>
- <glossdef>
- <para>
- A synchronization conduit is a small application which controls
- the transfer of data between a handheld device and a desktop
- computer.
- </para>
- </glossdef>
- </glossentry>
-
-
- <glossentry id="druid">
- <glossterm>Druid</glossterm>
- <glossdef>
- <para>
- A tool which guides a user through a series of steps, usually to
- configure or set up a program. Equivalent to "Assistant" and
- "Wizard."
- </para>
- </glossdef>
- </glossentry>
-
-<glossentry id="emoticon">
- <glossterm>Emoticon</glossterm>
- <glossdef>
- <para>
- Also called "smileys," emoticons are the little sideways faces made
- of colons and parentheses which people use to convey emotion in email.
- Examples: :-) or ;( .
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="evolution">
- <glossterm>Evolution</glossterm>
- <glossdef>
- <para>
- <application>Evolution</application> is the <acronym> GNOME
- </acronym> groupware application.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="execute">
- <glossterm>Execute</glossterm>
- <glossdef>
- <para>
- To run a program. Any file that can be run is called an
- executable. <application>Evolution</application> can download
- executable attachments, but before they can be run, the files must
- be marked as executable with a shell or file manager. This
- security precaution prevents the automatic or accidental execution
- of malicious programs. For more information on executables and file
- permissions, see the documentation for your file manager or shell.
- </para>
- </glossdef>
- </glossentry>
-
-
- <glossentry id="filetree">
- <glossterm>File Tree</glossterm>
- <glossdef>
- <para>
- A way of describing a group of files on a computer. With the
- perversity typical of computer (and especially Unix and Linux)
- nomenclature, the top of the tree is called the root directory,
- and denoted by <systemitem><filename>/</filename></systemitem>.
- The rest of the "branches" spread downwards from the root. Don't
- confuse the root directory with the <systemitem>root</systemitem>
- account, or root's home directory,
- <systemitem><filename>/home/root</filename></systemitem>.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="filter">
- <glossterm>Filter</glossterm>
- <glossdef>
- <para>
- Within <application>Evolution</application>, a filter is a method
- of sorting mail automatically. You can create filters to perform
- one or more actions on a message that meets any (or all) of a wide
- range of criteria.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="forward">
- <glossterm>Forward</glossterm>
- <glossdef>
- <para>
- the user can send a third party a message
- which was sent to the user originally.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="groupware">
- <glossterm>Groupware</glossterm>
- <glossdef>
- <para>
- Groupware is a term describing an application which helps groups
- of people work together. Typically, a groupware application will
- have several productivity features built into one program.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="haiku">
- <glossterm>Haiku</glossterm>
- <glossdef>
- <para>
- A traditional Japanese form of poetry. The poems are three lines
- long, with first and last lines having five syllables, and the
- second line seven syllables.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="html">
- <glossterm>HTML</glossterm>
- <glossdef>
- <para>
- Hyper-text Markup Language(<acronym>HTML</acronym>) is a language
- for describing page layout in electronic documents like web pages,
- help files, and email messages. HTML can be used in email and
- news posts to insert images and apply text treatments.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="hot-key">
- <glossterm>Hot Key</glossterm>
- <glossdef>
- <para>
- 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.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="ical">
- <glossterm>iCal</glossterm>
- <glossdef>
- <para>
- <application>iCal</application> is the program which
- <application>Evolution</application> uses to manage the calendar
- section.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="imap">
- <glossterm>IMAP</glossterm>
- <glossdef>
- <para>
- Depending upon whom you ask, IMAP stands for the Internet Mail
- Access Protocol, or the Interim Mail Access Protocol. Whatever it
- stands for, it allows access to email which is typically (although
- not always) stored remotely on a server rather than on a local
- hard disk. Often contrasted with <glossterm>POP</glossterm>.
- This will not be on the test.
- </para>
- </glossdef>
- </glossentry>
-
-
- <glossentry id="inline">
- <glossterm>Inline</glossterm>
- <glossdef>
- <para>
- Displayed as part of a message or other document, rather than
- attached as a separate file. Contrast with <glossterm
- linkend="attachment">Attachment</glossterm>.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="ldap">
- <glossterm>LDAP</glossterm>
- <glossdef>
- <para>
- LDAP, the Lightweight Directory Access Protocol, allows a client
- to search through a large database of addresses, phone numbers,
- and people stored on a server.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="mail-client">
- <glossterm>Mail Client</glossterm>
- <glossdef>
- <para>
- A mail client is the application with which a person reads and
- sends e-mail. Its counterparts are the various types of mail
- servers, which handle user authentication and direct messages from
- sender to recipient.
- </para>
- </glossdef>
- </glossentry>
-
-
- <glossentry id="minicard">
- <glossterm>Minicard</glossterm>
- <glossdef>
- <para>
- A format for the display of contact data. Similar in appearance
- to a small business card.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="nautilus">
- <glossterm>Nautilus</glossterm>
- <glossdef>
- <para>
- <application>Nautilus</application> is the next generation file
- manager for <acronym>GNOME</acronym> being written by Eazel.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="nickname">
- <glossterm>Nickname</glossterm>
- <glossdef>
- <para>
- An alias for an e-mail address.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="pop">
- <glossterm>POP</glossterm>
- <glossdef>
- <para>
- POP, the Post Office Protocol, is a mechanism for email
- transport. In contrast to IMAP, it is used only to get mail from
- a server and store it locally on your hard disk.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="protocol">
- <glossterm>Protocol</glossterm>
- <glossdef>
- <para>
- An agreed-upon method of communication, especially one for
- sending particular types of information between computer systems.
- Examples include POP (Post Office Protocol), for email, and HTTP
- (HypterText Transfer Protocol), for web pages.
-
- </para>
- </glossdef>
- </glossentry>
-
-
- <glossentry id="regular-expression">
- <glossterm>Regular Expression</glossterm>
- <glossdef>
- <para>
- A regular expression, or "regex", is a way of describing a
- string of text using metacharacters or wild-card symbols. For
- example, the statement <userinput>fly.*so[a|u]p</userinput> means
- "any phrase beginning with 'fly' and ending in 'soup' or
- 'soap'". If you searched for that expression, you'd find both
- "fly in my soup" and "fly in my soap." There's not room here to
- go into depth, but if you want, have a look at the documentation
- for the <command>grep</command> command.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="script">
- <glossterm>Script</glossterm>
- <glossdef>
- <para>
- A program written in an interpreted (rather than compiled)
- language. Often used as a synonym for "macro," to denote a series
- of pre-recorded commands or actions within an application.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="sendmail">
- <glossterm>Sendmail</glossterm>
- <glossdef>
- <para>
- As its name implies, <application>sendmail</application> is a
- program which sends mail. <application>Evolution</application>
- can use it instead of <glossterm>SMTP</glossterm>; some people
- prefer it because it offers more flexibility, but is more
- difficult to set up.
- </para>
- </glossdef>
- </glossentry>
-
-
- <glossentry id="shortcut-bar">
- <glossterm>Shortcut Bar</glossterm>
- <glossdef>
- <para>
- A portion of <application>Evolution</application> which offers
- users fast access to the most frequently used portions of the
- application.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="signature">
- <glossterm>Signature</glossterm>
- <glossdef>
- <para>
- In email terms, a signature is a piece of text placed at the end
- of every email sent, like a hand-written signature at the bottom
- of a written letter. A signature can be anything from a favorite
- quotation to a link to a web page; courtesy dictates that it be
- fewer than four lines long.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="SMTP">
- <glossterm>SMTP</glossterm>
- <glossdef>
- <para>
- This is the most common way of transporting mail messages from
- the client's computer (you) to the server. SMTP stands for
- Simple Mail Transfer Protocol.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="spam">
- <glossterm>Spam</glossterm>
- <glossdef>
- <para>
- Useless, unsolicited e-mail. Spam normally comes in forms of
- chain letters and advertisements for unscrupulous or clueless
- companies. Messages that are merely useless are called "opt-in
- newsletters."
- </para>
- </glossdef>
- </glossentry>
-
-
- <glossentry id="tooltip">
- <glossterm>Tool-Tip</glossterm>
- <glossdef>
- <para>
- A small box of explanatory text which appears when the mouse
- pointer is held motionless over a button or other interface
- element.
- </para>
- </glossdef>
- </glossentry>
-
-
-
-
- <glossentry id="virus">
- <glossterm>Virus</glossterm>
- <glossdef>
- <para>
- A malicious program which inserts itself into others so that it will be
- executed, allowing it to spread to still more programs and other computers.
- A virus can cause substantial damage by clogging networks or disk drives,
- deleting files, or opening security holes.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="vcard">
- <glossterm>vCard</glossterm>
- <glossdef>
- <para>
- A file format for the exchange of contact information. When you
- get an address card attached to an email, it's probably in vCard
- format. Not to be confused with <glossterm
- linkend="vfolder">vFolder</glossterm>.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="vfolder">
- <glossterm>vFolder</glossterm>
- <glossdef>
- <para>
- An email organization tool. vFolders allows you to create a folder
- that contains the results of a complex search. Folder contents are
- are updated dynamically.
- </para>
- </glossdef>
- </glossentry>
-
-</glossary>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/doc/C/config-prefs.sgml b/doc/C/config-prefs.sgml
deleted file mode 100644
index 157b61e1cc..0000000000
--- a/doc/C/config-prefs.sgml
+++ /dev/null
@@ -1,646 +0,0 @@
-<!-- <!DOCTYPE Chapter PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.1//EN"> -->
-<chapter id="config-prefs">
-
- <title>Advanced Configuration</title>
- <para>
- Perhaps your mail server has changed names. Perhaps you've
- grown tired of a certain layout for your appointments.
- Whatever the reason, you want to change your
- <application>Evolution</application> settings. This chapter
- will tell you how to do just that.
- </para>
-
- <sect1 id="config-prefs-mail">
- <title>Mail Settings</title>
- <para>
- To change your mail settings, select <menuchoice>
- <guimenu>Settings</guimenu> <guimenuitem>Mail
- configuration</guimenuitem></menuchoice> in the Inbox. This
- will open the <interface>mail preferences window</interface>,
- illustrated in <xref linkend="config-prefs-mail-fig">. Mail
- preferences are separated into several categories:
- <variablelist>
- <varlistentry>
- <term><guilabel>Identities</guilabel></term>
- <listitem>
- <para>
- This allows you to create and alter one or more
- identities for your email.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>Sources</guilabel></term>
- <listitem>
- <para>
- This tab lets you tell
- <application>Evolution</application> where to get the
- mail sent to you, and how to get it.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
-
- <term><guilabel>Mail Transport</guilabel></term>
- <listitem>
- <para>
- This tab lets you tell
- <application>Evolution</application> how to send mail.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guilabel>News Servers</guilabel></term>
- <listitem>
- <para>
- If you would like to use
- <application>Evolution</application> to read newsgroups,
- you can specify your news server preferences here.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guilabel>Other</guilabel></term>
- <listitem>
- <para>
- Miscellaneous mail and news settings, such as HTML
- handling preferences, and how long
- <application>Evolution</application> should wait before
- marking a message read.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
-
- </para>
-
- <!-- ==============Figure===================== -->
- <figure id="config-prefs-mail-fig">
- <title>Mail Preferences Dialog</title>
- <screenshot>
- <screeninfo>Setting mail preferences</screeninfo>
- <graphic fileref="fig/config-mail" format="png" srccredit="Aaron Weber">
- </graphic>
- </screenshot>
- </figure>
- <!-- ==============End of Figure================-->
-
-
- <sect2 id="config-prefs-mail-identity">
- <title>Identity Settings</title>
- <para>
- If you have only one email account, or send email from only
- one address, you will only need to configure one identity. If
- you want, however, you can have multiple identities. This
- can be useful if you want to keep personal and professional
- email separate, or if you wear several hats at work.
-
- </para>
- <para>
- To add a new identity, simply click
- <guibutton>Add</guibutton>. To alter an existing identity,
- click on it in the <guilabel>Identity</guilabel> tab of the
- <interface>Preferences</interface> window, and then click
- <guibutton>Edit</guibutton>.
- </para>
-
- <para>
- <application>Evolution</application> will then present you
- with a dialog box containing four fields:
- <itemizedlist>
- <listitem>
- <para>
- <guilabel>Full Name:</guilabel> by default, this is the
- same name as the full name described in your user
- account on your computer. You can select another if you
- wish.
- </para>
- </listitem>
- <listitem>
- <para>
- <guilabel>Email address:</guilabel> Enter your email
- address in this space.
- </para>
- </listitem>
- <listitem>
- <para>
- <guilabel>Organization:</guilabel> If you send email as
- a representative of a company or other organization,
- enter its name here.
- </para>
- </listitem>
- <listitem>
- <para>
- <guilabel>Signature file:</guilabel> You may choose a
- small text file to be appended to every message that you
- send. Typically, signature files include address or
- other contact information, or a favorite quotation.
- It's good form to keep it to four lines at the maximum.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </sect2>
-
- <sect2 id="config-prefs-mail-network">
- <title>Network Settings</title>
- <para>
- In order to send mail with
- <application>Evolution</application>, 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 program, you can almost certainly use the same
- settings as you did with that program. Network-related
- settings are in the <guilabel>Mail Sources</guilabel> and
- <guilabel>Mail Transport</guilabel> tabs.
- </para>
-
- <sect3 id="config-prefs-network-sources">
- <title>Mail Sources</title>
- <para>
- The <interface>Mail Sources</interface> tab allows you to
- edit, add, or delete methods of retrieving mail from
- servers. Clicking on <guibutton>Add</guibutton> or
- <guibutton>Edit</guibutton> will bring up a dialog box to
- offer you the following options:
- <variablelist>
- <varlistentry>
- <term><guilabel>Mail source type:</guilabel></term>
- <listitem>
- <para>
- Select from <glossterm
- linkend="imap">IMAP</glossterm> or <glossterm
- linkend="pop">POP</glossterm> servers, or Unix-style
- <systemitem><filename>mbox</filename></systemitem>
- or <systemitem><filename>mh</filename></systemitem>
- files.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term> <guilabel>Server:</guilabel></term>
- <listitem>
- <para>
- Enter the name of the mail source server in this
- field. If you use an may or may not be the same as your
- <glossterm linkend="smtp">SMTP</glossterm> server.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>Username:</guilabel></term>
- <listitem>
- <para>
- Enter the user name for the account you have on the
- server-- this should the part of your email address
- before the @. If you use
- <systemitem><filename>mbox</filename></systemitem>
- or <systemitem><filename>mh</filename></systemitem>
- files as your mail source, you do not need to enter
- a username.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>Authentication:</guilabel></term>
- <listitem>
- <para>
- Tell <application>Evolution</application> how to
- verify your identity with the server. Your options
- vary depending upon the type of server you are
- using, and the ways it is configured. Given the
- name of a server,
- <application>Evolution</application> can detect what
- sorts of authentication it offers.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>Test Settings</guilabel></term>
- <listitem>
- <para>
- Click this button to have
- <application>Evolution</application> check to see if
- mail sources are configured correctly.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- <para>
- If you have several mail sources, clicking <guibutton>Get
- Mail</guibutton> will refresh any IMAP,
- <systemitem><filename>mh</filename></systemitem>, or
- <systemitem><filename>mbox</filename></systemitem>
- listings and check and download mail from all POP servers.
- In other words, <guibutton>Get Mail</guibutton> gets your
- mail, no matter how many sources you have, or what types
- they are.
- </para>
- </sect3>
-
- <sect3 id="config-prefs-mail-network-transports">
- <title>Mail Transports</title>
- <para>
- The <interface>Mail Transports</interface> tab lets you set
- how you will send mail. Evolution currently supports two
- mail transport options: <glossterm linkend="smtp">SMTP</glossterm>, which
- uses a remote mail server, and
- <glossterm linkend="sendmail">sendmail</glossterm>, which uses the
- <application>sendmail</application> program on your local
- system. <application>Sendmail</application> is more
- difficult to configure, but offers more flexibility than
- <glossterm>SMTP</glossterm>.
- </para>
- <para>
- To use <guilabel>SMTP</guilabel>, you'll need to enter the
- name of your SMTP server. It may have the same name as
- your mail source server.
- </para>
- <para>
- <application>Evolution</application> can attempt to
- determine if you have entered a valid server name. To
- have it do so, click the <guilabel>Test
- Settings</guilabel> button.
- </para>
- </sect3>
- </sect2>
- <sect2 id="config-prefs-network-news">
- <title>News Servers</title>
- <para>
- Newsgroups are so much like mailing lists that there's no
- reason not to keep them right next to your mail. When you
- first select the <guilabel>News Servers</guilabel> tab,
- you will see a blank box with the three familiar buttons
- on the right: <guibutton>Add</guibutton>,
- <guibutton>Edit</guibutton>, and
- <guibutton>Delete</guibutton>.
- </para>
- <para>
- Click <guibutton>Add</guibutton> to add a news server; you
- will be prompted for its name. Enter the name, click
- <guibutton>OK</guibutton>, and you're done. You can have
- as many mail servers as you like, of course. News servers
- will appear next to your IMAP servers in the
- <interface>folder bar</interface>.
- </para>
- </sect2>
-
- <sect2 id="config-prefs-mail-other">
- <title>Other Mail Preferences</title>
- <para>
- Not everything fits neatly into categories. This tab
- contains some miscellaneous configurations that don't have
- too much to do with each other.
- <variablelist>
-
- <varlistentry>
- <term>
- <guilabel>Send messages in HTML format</guilabel>
- </term>
- <listitem><para>
- If you check this box, you will send
- messages as HTML by default. If you leave it unchecked, your
- messages will be sent without HTML formatting unless you select
- <menuchoice> <guimenu>Format</guimenu> <guimenuitem>HTML</guimenuitem>
- </menuchoice> in the message composer.
- See <xref linkend="usage-mail-getnsend-send-html">
- for more information about HTML mail.
- </para></listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <guilabel>Mark Messages as Seen After</guilabel>
- </term>
- <listitem><para>
- When you click on a message,
- <application>Evolution</application> will wait a
- moment before marking it as seen. You can set the
- delay, in milliseconds, here.
- </para></listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <guilabel>Folder Format</guilabel>
- </term>
- <listitem> <para> By default,
- <application>Evolution</application> saves its mail
- in the
- <systemitem><filename>mbox</filename></systemitem>
- format. You can switch to the
- <systemitem><filename>mh</filename></systemitem>
- format if you like. Note that this is an advanced
- feature and may cause you to lose some messages, so
- you should probably make a backup of your
- <systemitem><filename>evolution</filename></systemitem>
- directory first. In addition, it will take quite
- some time if you have a large mailbox.
- </para></listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect2>
- </sect1>
-
- <sect1 id="config-prefs-cal">
- <title>Configuring the Calendar</title>
- <para>
- To set your calendar preferences, select
- <menuchoice><guimenu>Settings</guimenu>
- <guimenuitem>Calendar
- Configuration</guimenuitem></menuchoice> from the Calendar
- view. This will open up the
- <interface>Preferences</interface> window. It contains four
- tabs: <guilabel>Time display</guilabel>,
- <guilabel>Colors</guilabel>, <guilabel>To Do List</guilabel>
- and <guilabel>Alarms</guilabel>. The <interface>calendar
- preferences window</interface> is illustrated in <xref
- linkend="config-prefs-cal-fig">.
-
- <!-- ==============Figure===================== -->
- <figure id="config-prefs-cal-fig">
- <title>Calendar Preferences Dialog</title>
- <screenshot>
- <screeninfo>If this worked on my job as well as my calendar...</screeninfo>
- <graphic fileref="fig/config-cal" format="png" srccredit="Aaron Weber">
- </graphic>
- </screenshot>
- </figure>
- <!-- ==============End of Figure================-->
- </para>
-
- <sect2 id="config-prefs-cal-time">
- <title>Time Display Settings</title>
- <para>
- The <guilabel>Time display</guilabel> tab lets you set the
- following:
- <variablelist>
- <varlistentry>
- <term>Time format</term>
- <listitem>
- <para>You may choose between twelve-hour (AM/PM) and
- twenty-four hour time formats here by clicking the
- appropriate radio button.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Weeks start on</term>
- <listitem>
- <para>You can set weeks to start on Sunday or on Monday.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Day range</term>
- <listitem>
- <para>
- When does your work day start, and when does it end?
- In the day and week views,
- <application>Evolution</application> displays all the
- hours in the range you select here, even if there are
- no appointments for those times. Of course, you can
- still schedule an appointment outside of these hours,
- and if you do, the display will be extended to show
- it.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect2>
- <sect2 id="config-prefs-cal-color">
- <title>Calendar Colors</title>
- <para>
- The <interface>colors tab</interface> allows you to decide
- what color your calendar will be. The tab consists of a
- sample calendar on the right and a list of ten items that can
- be colored in different ways. If you click on the color
- button to the right of each item, you will bring up a
- color-selector window where you can choose to alter that
- color. By clicking <guibutton>OK</guibutton> in the color
- selection dialog, you can see the results of the color on the
- sample calendar.
- </para>
- <para>The display elements whose color you can set are:
-
- <itemizedlist>
- <listitem>
- <para>
- <guilabel>Outline:</guilabel> The lines between days
- and at the top of the display.
- </para>
- </listitem>
-
- <listitem>
- <para> <guilabel>Headings:</guilabel> Text color for day
- and month names and other headings.
- </para>
- </listitem>
-
- <listitem>
- <para> <guilabel>Empty days:</guilabel> This is the
- background color for any time slots in which you have no appointments.
- </para>
- </listitem>
-
- <listitem>
- <para>
- <guilabel>Appointments:</guilabel> This is the
- background color for any time slots in which you have appointments.
- </para>
- </listitem>
-
- <listitem>
- <para> <guilabel>Highlighted day:</guilabel> The
- background color for a selected time slot.
- </para>
- </listitem>
-
-
- <listitem>
- <para>
- <guilabel>Day numbers:</guilabel> Text color for date numbers.
- </para>
- </listitem>
-
-
- <listitem>
- <para>
- <guilabel>Current day's number:</guilabel> Text color for today's date.
- </para>
- </listitem>
-
- <listitem>
- <para> <guilabel>To-Do item that is not yet
- due:</guilabel> Text color for To-Do list items that are
- not yet due. (Or maybe background color? find out!)
- </para>
- </listitem>
-
-
- <listitem>
- <para> <guilabel>To-Do item that is due today:</guilabel>
- Text color for today's tasks.
- </para>
- </listitem>
-
- <listitem>
- <para> <guilabel>To-Do item that is overdue:</guilabel>
- Text color for overdue tasks.
- </para>
- </listitem>
-
- </itemizedlist>
- </para>
- </sect2>
-
- <sect2 id="config-prefs-cal-todo">
- <title>To Do List Settings</title>
- <para>
- You can choose what information the To Do list displays and the
- way it is displayed. The two areas of the <interface>To Do
- List</interface> tab offer several options each:
- <variablelist>
- <varlistentry>
- <term>Show on To Do List</term>
- <listitem>
- <para>
- This box contains three items. If you select the
- check boxes next to them, that information will appear
- in the To Do list for each task it contains:
- <itemizedlist>
- <listitem>
- <para><guilabel>Due Date</guilabel></para>
- </listitem>
- <listitem>
- <para><guilabel>Time Until Due</guilabel></para>
- </listitem>
- <listitem>
- <para><guilabel>Priority</guilabel></para>
- </listitem>
- </itemizedlist>
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Style Options</term>
- <listitem>
- <para>
- Select among the following checkboxes to determine
- how your To Do list will look:
- <itemizedlist>
- <listitem>
- <para><guilabel>Highlight overdue items</guilabel></para>
- </listitem>
- <listitem>
- <para><guilabel>Highlight items due today</guilabel></para>
- </listitem>
- <listitem>
- <para><guilabel>Highlight not yet due items</guilabel></para>
- </listitem>
- </itemizedlist>
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect2>
-
- <sect2 id="config-prefs-cal-alarms">
- <title>Alarms Settings</title>
- <para>
- The <interface>alarms tab</interface> enables you to select from three boxes:
- <itemizedlist>
- <listitem>
- <para><guilabel>Beep on display alarms</guilabel>: select
- this box to have <application>Evolution</application> beep
- at you for any alarms you have set. If you leave this box
- unchecked, <application>Evolution</application> will only
- alert you to events by opening a dialog box. These beeps
- are distinct from full-fledged audio alarms.
- </para>
- </listitem>
- <listitem>
- <para><guilabel>Audio alarms timeout after: </guilabel>
- Select this button to have your audio alarms stop
- automatically after a certain number of seconds. </para>
- </listitem>
- <listitem>
- <para><guilabel>Enable snoozing for:</guilabel> If you
- would like to have the option to tell
- <application>Evolution</application> to repeat an alarm in
- a few minutes, select this button and decide how long
- you'd like it to wait.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </sect2>
-
- </sect1>
-
- <sect1 id="config-prefs-contact">
- <title>Managing the Contact Manager</title>
- <para>
- To set the behavior of your Contact Manager, click on the
- <guibutton>Contact Manager</guibutton> tab in the
- <interface>Preferences</interface> window.
- </para>
- <para>
- You can set the following options: <!--insert variable list
- here-->
- </para>
-
- <sect2 id="config-prefs-contact-ldap-add">
- <title>Adding Directory Servers</title>
- <para>
- To add a new LDAP server to your available contact
- folders, select <menuchoice> <guimenu>Actions</guimenu>
- <guimenuitem>New Directory Server</guimenuitem>
- </menuchoice>. This brings up a small dialog box which
- will let you enter the following options:
- <itemizedlist>
- <listitem><para>
- <guilabel>Name</guilabel> &mdash; any name you choose for the server.
- </para></listitem>
-
- <listitem><para>
- <guilabel>Description</guilabel> &mdash; a longer description of the server.
- </para></listitem>
-
- <listitem><para>
- <guilabel>LDAP Server</guilabel> &mdash; the network address of the server.
- </para></listitem>
-
- <listitem><para>
- <guilabel>Port Number</guilabel> &mdash; by default, the port number is 389.
- </para></listitem>
-
- <listitem><para>
- <guilabel>Root DN</guilabel> &mdash; enter the root DN here.
- </para></listitem>
- </itemizedlist>
- </para>
- </sect2>
- </sect1>
-
-
-
- <sect1 id="config-prefs-general">
- <title>General Preferences</title>
- <para>
- Additional configuration options will be covered here, as
- they become available.
- </para>
- </sect1>
-</chapter>
-
-
-
-
-
-
diff --git a/doc/C/config-setupassist.sgml b/doc/C/config-setupassist.sgml
deleted file mode 100644
index b9b72b568a..0000000000
--- a/doc/C/config-setupassist.sgml
+++ /dev/null
@@ -1,213 +0,0 @@
- <chapter id="config-setupassist">
- <title>Easy Setup with the Setup Assistant</title>
- <para>
- The first time you try to use email, the mail setup assistant
- will ask you for some basic information, so
- <application>Evolution</application> can let you use email. If
- you prefer more detailed configuration, or if you want to make
- changes to an existing email setup, see <xref
- linkend="config-prefs">.
- </para>
-
- <sect1 id="config-setupassist-mail">
- <title>Mail Setup</title>
- <para>
- The first time you try to send or receive mail with
- <application>Evolution</application>, the <interface>mail
- setup assistant</interface> will pop up to help you with your
- email preferences. If you don't plan to use email, or if
- you'd rather deal with your email preferences later, click
- <guibutton>Cancel</guibutton>.
- </para>
-
-<!--
-
- Before you get it, though, you should decide where you want to
- keep it. Your options will vary a little depending on your
- network setup, but they come down to storing the mail on your
- hard disk (using <glossterm linkend="pop">POP</glossterm>), or
- storing it on the network (using <glossterm
- linkend="imap">IMAP</glossterm>). If you store your mail on
- your local hard disk, you can read it whether you're online or
- not, but you can only read it from one computer. If you store
- it on the network, you can only read it when you're online,
- but you can access it from almost any computer with a network
- connection, even if it doesn't have
- <application>Evolution</application>.
-
-
- If you choose POP, you'll be putting mail in the
- <guilabel>Inbox</guilabel> in the <guilabel>Local</guilabel>
- folder. If you choose IMAP, it's the
- <guilabel>Inbox</guilabel> of a folder with the same name as
- your mail server. That's so you can maintain several distinct
- IMAP servers if you want. See <xref
- linkend="config-prefs-mail"> for more information about mail
- servers.
--->
-
- <para>
- The setup assistant (sometimes called a
- <glossterm>Druid</glossterm>, by analogy with the "Wizards"
- that some other programs use) 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 assistant is
- pictured in <xref linkend="usage-setup-fig">.
-
-<!-- ==============Figure=================================== -->
-<!-- druid-pic should eventually become assistant-pic -->
-
- <figure id="usage-setup-fig">
- <title>Mail Setup Assistant</title>
- <screenshot>
- <screeninfo>Evolution Main Window</screeninfo>
- <graphic fileref="fig/mail-druid-pic" format="png" srccredit="Kevin Breit">
- </graphic>
- </screenshot>
- </figure>
-<!-- ==============End of Figure=================================== -->
-
-
-
- The assistant will ask you for the following information:
- <variablelist>
-
- <varlistentry>
- <term> <guilabel>Name:</guilabel> </term> <listitem>
- <para>Your full name. </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guilabel>Email address:</guilabel></term>
- <listitem><para>
- Your complete email address.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term> <guilabel>Organization:</guilabel></term>
- <listitem>
- <para>
- Any organization you represent, or the company where you
- work. Leave this blank if you wish, or type "My own bad
- self" so people know your opinions are yours alone.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guilabel>Signature File:</guilabel></term>
- <listitem>
- <para>
- A text file appended to any email you send. A signature
- file typically consists of your name and email address,
- or a quotation you like. It's good form to keep your
- "sig" on the short side: four lines is plenty. Remember,
- this is attached to every email you send.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term> <guilabel>Mail source type:</guilabel></term>
- <listitem>
- <para>
- <application>Evolution</application> supports several
- mail sources: <glossterm linkend="pop">POP</glossterm> and
- <glossterm linkend="imap">IMAP</glossterm> servers, and UNIX-style
- <systemitem><filename>mbox</filename></systemitem> and
- <systemitem><filename>mh</filename></systemitem> files.
- POP servers retrieve your mail and store it on your
- local system so you can refer to it even when not
- connected to a network; <glossterm>IMAP</glossterm>
- servers store the mail on the server so you can access
- it from multiple locations;
- <systemitem><filename>mbox</filename>></systemitem>
- files are used by your computer for internal mail, and
- may be useful if you want to switch from another email
- client such as <application>Spruce</application> or
- <application>Netscape Communicator</application>. Ask
- your system administrator which you should use, or keep
- guessing until one works. You may use multiple sources
- if you wish; see <xref
- linkend="config-prefs-mail-network"> for more
- information.
- </para>
- <para>
- If you decide not to have
- <application>Evolution</application> use any servers,
- the remaining items are not relevant; you only need to
- point to the location of the files you wish to access.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term> <guilabel>Server:</guilabel></term>
- <listitem>
- <para>
- This should be the name of the server where you get
- incoming mail. It may (or may not) be the same as the
- server where you send your outgoing mail.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guilabel>Username:</guilabel></term>
- <listitem>
- <para>
- Enter the username for your mail server account, if you
- have one. In almost all cases, this is the part of your email
- address before the @ character, and
- <application>Evolution</application> has selected that
- value as the default. If you have a different username,
- you can enter it here.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guilabel>Authentication:</guilabel></term>
- <listitem>
- <para>
- Select the type of authentication you will use. You can
- click <guibutton>Detect supported types</guibutton> to
- find out which authentication protocols your network
- allows.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guilabel>Mail Transport:</guilabel></term>
- <listitem>
- <para>
- This is the mail sending protocol you will want to use.
- <application>Evolution</application> supports both
- <glossterm linkend="smtp">SMTP</glossterm> and
- <application>sendmail</application>; SMTP is by far the
- more common.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- <para>
- To learn how to configure <application>Evolution</application>
- in greater detail, or to change preferences once you have set
- them, see <xref linkend="config-prefs">.
- </para>
- </sect1>
-
-</chapter>
-
-
-
-
-
-
-
-
-
diff --git a/doc/C/config-sync.sgml b/doc/C/config-sync.sgml
deleted file mode 100644
index 0445b474c4..0000000000
--- a/doc/C/config-sync.sgml
+++ /dev/null
@@ -1,124 +0,0 @@
- <chapter id="config-sync">
- <title>Setting up your synchronization system</title>
- <para>
- Synchronization presents you with two issues you'll need to
- deal with.
- <simplelist>
- <member>
- Your computer needs to recognize and access your handheld.
- At this time, <application>Evolution</application> only
- supports Palm-OS devices like the PalmPilot and the
- Handspring Visor.
- </member>
- <member>
- You should decide what sort of synchronization behavior you
- want.
- </member>
- </simplelist>
-
- </para>
- <para>
- If you haven't used a handheld device with your computer
- before, you'll need to run the GNOME <application>Control
- Center</application> and make sure that <application>Pilot
- Link</application> is properly configured. Then, select the
- <application>Evolution</application> <glossterm
- linkend="conduit">conduits</glossterm> under the
- <guilabel>Pilot Conduits</guilabel> section of the Control
- Center.
- </para>
- <para>
- Once your computer and your Palm-OS device are talking happily
- to each other, you'll have to decide what exactly you want
- them to do with the data they exchange. Your options may vary
- depending on the conduit, but typically they will be:
-
- <variablelist>
- <varlistentry>
- <term>Disabled </term>
- <listitem>
- <para>
- Do nothing.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Synchronize</term>
- <listitem>
- <para>
- Copy new data from the computer to the handheld, and
- from the handheld to the computer. Remove items
- that were on both systems but have been deleted on
- one.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Copy From Pilot</term>
- <listitem>
- <para>
- If there is any new data on the the handheld device,
- copy it to the computer.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Copy To Pilot</term>
- <listitem>
- <para>
- Copy new data from the computer to the handheld.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Merge From Pilot</term>
- <listitem>
- <para>
- Copy new data from the handheld to the computer, and
- remove any information from the computer that has
- been deleted on the handheld.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Merge To Pilot</term>
- <listitem>
- <para>
- Copy new data from the computer to the handheld, and
- remove any information from the handheld that has
- been deleted on the computer.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
-
- <para>
- Select a behavior for each conduit available. For the most
- part, you'll want to stick with
- <guilabel>Synchronize</guilabel>. Then, put your handheld on
- its cradle and press the synchronization button.
- </para>
-
-
- <para>
- <warning>
- <title>Data Loss Prevention</title>
- <para>
- It's always a good idea to make a backup. To do that,
- make a copy of your <systemitem>
- <filename>~/evolution</filename> </systemitem> directory.
- </para>
- </warning>
- </para>
-
- </chapter>
-
-
-
-
diff --git a/doc/C/evolution.sgml b/doc/C/evolution.sgml
deleted file mode 100644
index 114f2e87d9..0000000000
--- a/doc/C/evolution.sgml
+++ /dev/null
@@ -1,145 +0,0 @@
-<!DOCTYPE book PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.1//EN"[
-
-<!ENTITY PREFACE SYSTEM "preface.sgml">
-<!ENTITY USAGE-MAINWINDOW SYSTEM "usage-mainwindow.sgml">
-<!ENTITY USAGE-EXEC-SUMMARY SYSTEM "usage-exec-summary.sgml">
-<!ENTITY USAGE-MAIL SYSTEM "usage-mail.sgml">
-<!ENTITY USAGE-CONTACT SYSTEM "usage-contact.sgml">
-<!ENTITY USAGE-CALENDAR SYSTEM "usage-calendar.sgml">
-<!ENTITY USAGE-SYNC SYSTEM "usage-sync.sgml">
-<!ENTITY USAGE-PRINT SYSTEM "usage-print.sgml">
-<!ENTITY CONFIG-SETUPASSIST SYSTEM "config-setupassist.sgml">
-<!ENTITY CONFIG-PREFS SYSTEM "config-prefs.sgml">
-<!ENTITY CONFIG-SYNC SYSTEM "config-sync.sgml">
-<!ENTITY MENUREF SYSTEM "menuref.sgml">
-<!ENTITY APX-GLOSS SYSTEM "apx-gloss.sgml">
-<!ENTITY APX-BUGS SYSTEM "apx-bugs.sgml">
-<!ENTITY APX-AUTHORS SYSTEM "apx-authors.sgml">
-
-]>
-
-
-<!-- Almost every chapter is an entity. Files, Chapter id's, and
-entity names correspond. APX is for appendix. Note that there is no
-entity for apx-notes.sgml, which is still included in the file
-set. Reinstate the entity if and when the Notes feature is
-implemented. -->
-
-<book id="index">
- <bookinfo>
- <title>A User's Guide to Evolution</title>
- <authorgroup>
- <author><firstname>Aaron</firstname><surname>Weber</surname></author>
- <author><firstname>Kevin</firstname><surname>Breit</surname></author>
- </authorgroup>
- <copyright>
- <year>2000</year>
- <holder> Ximian, Inc., </holder>
- <holder> Kevin Breit </holder>
- </copyright>
-
- <legalnotice id="legalnotice">
-
- <para>
- Permission is granted to copy, distribute and/or modify this
- document under the terms of the <ulink type="help"
- url="gnome-help:fdl"><citetitle>GNU Free Documentation
- License</citetitle></ulink>, Version 1.1 or any later version
- published by the Free Software Foundation with no Invariant
- Sections, no Front-Cover Texts, and no Back-Cover Texts. You
- may obtain a copy of the <citetitle>GNU Free Documentation
- License</citetitle> from the Free Software Foundation by
- visiting <ulink type="http" url="http://www.fsf.org">their
- Web site</ulink> or by writing to: Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- USA.
- </para>
- <para>
- Many of the names used by companies to distinguish their
- products and services are claimed as trademarks. Where those
- names appear in any GNOME documentation, and those trademarks
- are made aware to the members of the GNOME Documentation
- Project, the names have been printed in caps or initial caps.
- </para>
- </legalnotice>
-
- <releaseinfo>
- This is version 0.9 of the Evolution manual.
- </releaseinfo>
-
- </bookinfo>
-
- &PREFACE;
-
- <part id="usage">
- <title>Using Evolution</title>
- <partintro>
- <para>
- Part one of the <application>Evolution</application> manual
- describes how to use <application>Evolution</application> for
- email, contact management, and appointment and task
- scheduling. You'll find as you go along that there's more
- than one way to do things, and you can pick whichever method
- you like best.
- </para>
- </partintro>
-
- &USAGE-MAINWINDOW;
- &USAGE-EXEC-SUMMARY;
- &USAGE-MAIL;
- &USAGE-CONTACT;
- &USAGE-CALENDAR;
-<!-- &USAGE-NOTES; -->
- &USAGE-SYNC;
- &USAGE-PRINT;
- </part>
- <part id="config">
- <title>Configuring and Managing Evolution</title>
- <partintro>
- <para>
- <application>Evolution</application> is highly configurable.
- Usually, when developers say that, they mean that they didn't
- test it out thoroughly and have left it to other programmers
- to "configure" themselves a working system. In the case of
- <application>Evolution</application>, "configurable" means
- what it ought to. It means that, while you can expect the
- program to work perfectly well in its default settings, it's
- also easy to alter its behavior in a wide variety of ways, so
- that it fits your needs exactly. This part of the book will
- describe that process, from the quickest glimpse of the Setup
- Assistant to an in-depth tour of the preferences dialogs.
- </para>
- </partintro>
-
- &CONFIG-SETUPASSIST;
- &CONFIG-PREFS;
- &CONFIG-SYNC;
- </part>
-
- <part>
- <title>Comprehensive Menu reference</title>
- <partintro>
- <para>
- The following reference covers all, or nearly all, of the
- menus and menu commands that
- <application>Evolution</application> has to offer you.
- </para>
- </partintro>
- &MENUREF;
- </part>
-
- &APX-GLOSS;
- &APX-BUGS;
- &APX-AUTHORS;
-</book>
-
-
-
-
-
-
-
-
-
-
-
diff --git a/doc/C/fig/calendar.png b/doc/C/fig/calendar.png
deleted file mode 100644
index c9703f4903..0000000000
--- a/doc/C/fig/calendar.png
+++ /dev/null
Binary files differ
diff --git a/doc/C/fig/config-cal.png b/doc/C/fig/config-cal.png
deleted file mode 100644
index 25b5b68621..0000000000
--- a/doc/C/fig/config-cal.png
+++ /dev/null
Binary files differ
diff --git a/doc/C/fig/config-mail.png b/doc/C/fig/config-mail.png
deleted file mode 100644
index cd8543d94e..0000000000
--- a/doc/C/fig/config-mail.png
+++ /dev/null
Binary files differ
diff --git a/doc/C/fig/contact-editor.png b/doc/C/fig/contact-editor.png
deleted file mode 100644
index 988ad2f918..0000000000
--- a/doc/C/fig/contact-editor.png
+++ /dev/null
Binary files differ
diff --git a/doc/C/fig/contact.png b/doc/C/fig/contact.png
deleted file mode 100644
index a9ed02251a..0000000000
--- a/doc/C/fig/contact.png
+++ /dev/null
Binary files differ
diff --git a/doc/C/fig/filter-assist-fig.png b/doc/C/fig/filter-assist-fig.png
deleted file mode 100644
index 5248e0effe..0000000000
--- a/doc/C/fig/filter-assist-fig.png
+++ /dev/null
Binary files differ
diff --git a/doc/C/fig/filter-new-fig.png b/doc/C/fig/filter-new-fig.png
deleted file mode 100644
index a8b41ca678..0000000000
--- a/doc/C/fig/filter-new-fig.png
+++ /dev/null
Binary files differ
diff --git a/doc/C/fig/mail-composer.png b/doc/C/fig/mail-composer.png
deleted file mode 100644
index 22c16365b5..0000000000
--- a/doc/C/fig/mail-composer.png
+++ /dev/null
Binary files differ
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
--- a/doc/C/fig/mail-druid-pic.png
+++ /dev/null
Binary files differ
diff --git a/doc/C/fig/mail-inbox.png b/doc/C/fig/mail-inbox.png
deleted file mode 100644
index b4f18640b4..0000000000
--- a/doc/C/fig/mail-inbox.png
+++ /dev/null
Binary files differ
diff --git a/doc/C/fig/mainwindow-pic.png b/doc/C/fig/mainwindow-pic.png
deleted file mode 100644
index 28bf487bf9..0000000000
--- a/doc/C/fig/mainwindow-pic.png
+++ /dev/null
Binary files differ
diff --git a/doc/C/fig/print-dest.png b/doc/C/fig/print-dest.png
deleted file mode 100644
index 464705711e..0000000000
--- a/doc/C/fig/print-dest.png
+++ /dev/null
Binary files differ
diff --git a/doc/C/fig/print-preview.png b/doc/C/fig/print-preview.png
deleted file mode 100644
index 7f9a8d661a..0000000000
--- a/doc/C/fig/print-preview.png
+++ /dev/null
Binary files differ
diff --git a/doc/C/fig/vfolder-createrule-fig.png b/doc/C/fig/vfolder-createrule-fig.png
deleted file mode 100644
index 162bebf48c..0000000000
--- a/doc/C/fig/vfolder-createrule-fig.png
+++ /dev/null
Binary files differ
diff --git a/doc/C/menuref.sgml b/doc/C/menuref.sgml
deleted file mode 100644
index d82191cb17..0000000000
--- a/doc/C/menuref.sgml
+++ /dev/null
@@ -1,1470 +0,0 @@
-<!--
-<!DOCTYPE Chapter PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.1//EN">
--->
-
-<chapter id="menuref">
- <title>Menu Reference</title>
- <para>
- <application>Evolution</application>'s menus may not hold the
- secret to happiness, they do hold every ability that
- <application>Evolution</application> has. This section will serve
- as a reference for all those menus, and the capabilites that they
- offer you.
- </para>
- <para>
- In addition, the editor tools for messages, appointments, and
- contacts all have menu bars of their own. From left to right, the
- menus available to you when you are reading mail are:
- <guimenu>File</guimenu>, <guimenu>Edit</guimenu>,
- <guimenu>View</guimenu>, <guimenu>Settings</guimenu>,
- <guimenu>Message</guimenu>, <guimenu>Folder</guimenu>and
- <guimenu>Help</guimenu>.
-
- </para>
- <para>
- Menus in <application>Evolution</application> are
- context-sensitive, which means that they vary depending on what
- you're doing. If you're reading your mail, you'll have
- mail-related menus; for your calendar, you'll have
- calendar-related menu items. Some menus, of course, like
- <guimenu>Help</guimenu> and <guimenu>File</guimenu> don't much, if
- at all, because they have more universal functions. But you'd
- never mark an address card as "read," or set the recurrence for an
- email message you've recieved. depending on whether you're looking
- at mail, contacts, or calendar information.
- </para>
-
-
-
- <sect1 id="menuref-universal">
- <title>Menus that are the same everywhere</title>
- <para>
- The <guimenu>File</guimenu> and <guimenu>Help</guimenu> menus in
- the main <application>Evolution</application> window do not
- change, because they refer to universal items. Other menus have
- contents that change depending on context.
- </para>
-
- <sect2 id="menuref-universal-file">
- <title>File Menu</title>
- <para>
- <variablelist>
-
- <varlistentry>
- <term><guisubmenu>New...</guisubmenu> Submenu</term>
- <listitem><para>
- <itemizedlist>
- <listitem><para>
- <guimenuitem>Folder</guimenuitem> &mdash;
- Create a new folder. See <xref
- linkend="usage-mainwindow-folderbar">
- for more information about folders.
- </para></listitem>
- <listitem><para>
- <guimenuitem>Shortcut</guimenuitem> &mdash;
- Create a new Shortcut in the Shortcut Bar.
- </para></listitem>
- <listitem><para>
- <guimenuitem>Mail Message</guimenuitem> &mdash;
- Compose a new mail message. Covered in
- <xref linkend="usage-mail-getnsend-send">.
- </para></listitem>
- <listitem><para>
- <guimenuitem>Appointment</guimenuitem> &mdash;
- Enter a new appointment in your calendar. See <xref
- linkend="usage-calendar-apts-basic"> for more information.
- </para></listitem>
- <listitem><para>
- <guimenuitem>Task</guimenuitem> &mdash;
- Enter a new to-do item in your taskpad. Covered in
- <xref linkend="usage-calendar-todo">.
- </para></listitem>
- </itemizedlist>
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Go to Folder</guimenuitem></term>
- <listitem><para>
- View the items in a particular folder.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Create New Folder</guimenuitem></term>
- <listitem><para>
- This item doesn't belong here any more.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Print Message</guimenuitem></term>
- <listitem><para>
- Print the current message.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Exit</guimenuitem></term>
- <listitem><para>
- Quit using <application>Evolution</application>.
- </para></listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect2>
-
- <sect2 id="menuref-universal-help">
- <title>The Help Menu</title>
- <para>
- <variablelist>
- <varlistentry>
- <term><guimenuitem>Help Index</guimenuitem></term>
- <listitem><para>
- Displays the table of contents for this document.
- </para></listitem>
- </varlistentry>
- <varlistentry>
- <term><guimenuitem>Getting Started</guimenuitem></term>
- <listitem><para>
- A quick look around, and a summary of the things
- <application>Evolution</application> can do for you.
- </para></listitem>
- </varlistentry>
- <varlistentry>
- <term><guimenuitem>Using the Mailer</guimenuitem></term>
- <listitem><para>
- An in-depth tour of <application>Evolution</application> Mail.
- </para></listitem>
- </varlistentry>
- <varlistentry>
- <term><guimenuitem>Using the Calendar</guimenuitem></term>
- <listitem><para>
- A step-by-step guide to using the Calendar.
- </para></listitem>
- </varlistentry>
- <varlistentry>
- <term><guimenuitem>Using the Contact Manager</guimenuitem></term>
- <listitem><para>
- Find your way around the Contact Manager.
- </para></listitem>
- </varlistentry>
- <varlistentry>
- <term><guimenuitem>Submit Bug Report</guimenuitem></term>
- <listitem><para>
- If you don't report them, they can't fix them. Select this item to let the
- developers know what's wrong.
- </para></listitem>
- </varlistentry>
- <varlistentry>
- <term><guimenuitem>About Evolution</guimenuitem></term>
- <listitem><para>
- Displays a window with information about the application and its authors.
- This has the same information as <xref linkend="authors">.
- </para></listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect2>
- </sect1>
-
- <sect1 id="menuref-exec">
- <title>Executive Summary Menus</title>
- <para>
- We'll leave this section blank until the UI stabilizes a little
- more.
- </para>
- </sect1>
-
-
-
- <sect1 id="menuref-mail">
- <title>Mail Menus</title>
- <para>
- <application>Evolution</application> Mail has more specialized
- menus, and more specialized menu items, than any other part of
- the application.
- </para>
-
- <sect2 id="menuref-mail-edit">
- <title>The Edit Menu</title>
- <para>
- This menu is currently empty.
- </para>
- </sect2>
-
- <sect2 id="menuref-mail-view">
- <title>The Mail View Menu</title>
- <para>
- This menu lets you control the way
- <application>Evolution</application> displays your information
- for you.
- <variablelist>
- <varlistentry>
- <term><guimenuitem>Show Shortcut Bar</guimenuitem></term>
- <listitem><para>
- Toggle the shortcut bar on and off with this item.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Show Folder Bar</guimenuitem></term>
- <listitem><para>
- Toggle the folder bar on and off with this item.
- See <xref linkend="usage-mainwindow-folderbar"> for
- more information about the folder bar.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Threaded Message List</guimenuitem></term>
- <listitem><para>
- This item controls whether your message list is displayed by thread
- or by other criteria. The default order is by date; see
- <xref linkend="usage-mail-listorder"> for information about the
- order of the message list.
- </para></listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect2>
-
- <sect2 id="menuref-mail-tools">
- <title>The Mail Settings Menu</title>
- <para>
- <variablelist>
- <varlistentry>
- <term><guimenuitem>Mail Filters</guimenuitem></term>
- <listitem><para>
- Edit your mail filters here.
- See <xref linkend="usage-mail-organize-filters">
- for more information about mail filtering.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Virtual Folder Editor</guimenuitem></term>
- <listitem><para>
- Create, edit, and delete Virtual Folders (<glossterm>vFolders</glossterm>)
- with this tool.
- To learn about using vFolders with mail, see
- <xref linkend="usage-mail-organize-vfolders">.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Mail Configuration</guimenuitem></term>
- <listitem><para>
- Tools for setting up all your mail account preferences.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Manage Subscriptions</guimenuitem></term>
- <listitem><para>
- Tools for newsgroup and IMAP folder subscriptions.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Forget Passwords</guimenuitem></term>
- <listitem><para>
- This item will cause <application>Evolution</application>
- to forget what your password is.
- </para></listitem>
- </varlistentry>
-
- </variablelist>
- </para>
- </sect2>
-
- <sect2 id="menuref-mail-folder">
- <title>The Mail Folder Menu</title>
- <para>
- The items in this menu relate to
- <application>Evolution</application> mail folders.
- </para>
- <para>
- You can:
- <variablelist>
-
- <varlistentry>
- <term><guimenuitem>Mark all as Read</guimenuitem></term>
- <listitem><para>
- <application>Evolution</application> keeps track of which messages
- you've seen; to mark everything in a folder as read, choose this item.
- You can mark a single message as read by right-clicking it in the message bar.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Delete All</guimenuitem></term>
- <listitem><para>
- This is a favorite item of everyone with too much junk-mail: one click, and it
- deletes every message in the current folder.
- </para></listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term><guimenuitem>Expunge</guimenuitem></term>
- <listitem><para>
- Empties the trash folder, erasing messages permanently.
- Once you've done this, they're gone for good.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Configure Folder</guimenuitem></term>
- <listitem><para>
- Use this item to set the file format in which
- <application>Evolution</application> stores mail. You
- can choose from standard UNIX-style
- <systemitem><filename>mbox</filename></systemitem>
- files, or the
- <systemitem><filename>mh</filename></systemitem> format.
- Converting large mailboxes may take a long time, and
- it's a good idea to have a backup copy beforehand.
- </para></listitem>
- </varlistentry>
-
- </variablelist>
- </para>
- </sect2>
-
- <sect2 id="menuref-mail-message">
- <title>The Mail Message Menu</title>
- <para>
- The items in this menu relate to
- <application>Evolution</application> mail messages. Most of
- them require you to have a message selected, and are also
- available by right-clicking on a message in the message
- list.
- </para>
- <para>
- <variablelist>
-
-
- <varlistentry>
- <term><guimenuitem>Open in New Window</guimenuitem></term>
- <listitem><para>
- Displays the selected message in a new window.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Edit Message</guimenuitem></term>
- <listitem><para>
- Open the selected message in the message composer. You
- can only edit a message you have written: drafts and messages in
- the <guilabel>Sent</guilabel> box.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Print Message</guimenuitem></term>
- <listitem><para>
- Displays the <interface>Print Preview</interface> window,
- ready for printing.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Reply to Sender</guimenuitem></term>
- <listitem><para>
- Opens a message composition window addressed to the
- author of the message. Covered in detail in
- <xref linkend="usage-mail-getnsend-send-reply">.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Reply to All</guimenuitem></term>
- <listitem><para>
- Opens a message composition window addressed to the
- author of the message and all known recipients.
- Covered in detail in <xref linkend="usage-mail-getnsend-send-reply">.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Forward</guimenuitem></term>
- <listitem><para>
- Appends the body of the selected message to a new message.
- Covered in detail in <xref linkend="usage-mail-getnsend-fwd">.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Delete Message</guimenuitem></term>
- <listitem><para>
- Marks a message for deletion.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Move Message</guimenuitem></term>
- <listitem><para>
- Choose a folder in which to place this message.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Copy Message</guimenuitem></term>
- <listitem><para>
- Copy the selected message to another folder.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>VFolder on Subject</guimenuitem></term>
- <listitem><para>
- This item, and the three that follow it, will create vFolders
- which you may customize further or save as-is. This one will
- create a vFolder which will display all messages that contain the
- subject line of the selected message.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>VFolder on Sender</guimenuitem></term>
- <listitem><para>
- Creates a vFolder to hold all messages from the sender of
- the selected message.
- </para></listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term><guimenuitem>VFolder on Recipients</guimenuitem></term>
- <listitem><para>
- Creates a VFolder to hold all messages addressed to the
- recipient of the selected message.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Filter on Subject</guimenuitem></term>
- <listitem><para>
- This item, and the three that follow it, will create Filters
- for which you must select actions. You may keep the criteria as
- they are, or alter them as you wish. This one will
- create a filter which will affect all messages that contain the
- subject line of the selected message.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Filter on Sender</guimenuitem></term>
- <listitem><para>
- Creates a filter which affects all messages from the sender of
- the selected message.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Filter on Recipients</guimenuitem></term>
- <listitem><para>
- Creates a filter which will affect all messages addressed to the
- recipient of the selected message.
- </para></listitem>
- </varlistentry>
-
- </variablelist>
- </para>
- </sect2>
-
- <sect2 id="menuref-mail-messagelistheader">
- <title>The Message Heading Right-Click Menu</title>
- <para>
- At the top of the message list is the message list heading
- bar; you can click on an individual heading &mdash;
- <guilabel>Subject</guilabel>, for example, to have the
- message list sorted by that attribute. However, if you right
- click on a heading, you'll get the following menu:
- </para>
-
- <para>
- <variablelist>
-
- <varlistentry>
- <term><guimenuitem>Sort Ascending</guimenuitem></term>
- <listitem><para>
- Sort the list, in ascending order, by the attribute you clicked.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Sort Descending</guimenuitem></term>
- <listitem><para>
- Sort the list in descending order.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Unsort</guimenuitem></term>
- <listitem><para>
- Undo any sorting by this attribute, and leave the message list sorted
- by the previous one.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Group by this Field</guimenuitem></term>
- <listitem><para>
- Instead of sorting the messages, group them in boxes.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Group by Box</guimenuitem></term>
- <listitem><para> If you have your messages grouped in
- boxes, you can arrange the boxes as well, by choosing
- this item. </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Remove this column</guimenuitem></term>
- <listitem><para>
- Choose this to remove the column from the message list display.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Field Chooser</guimenuitem></term>
- <listitem><para>
- Opens a palette of columns. You can drag the columns
- you want from the palette into position in the
- message list heading bar; red arrows appear
- when you get close enough to a possibile position.</para>
-
- <para>
- Your options are:
- <itemizedlist>
- <listitem><para>
- <guiicon>An Envelope</guiicon> which indicates whether a message has been read (closed for unread, open for read).
- </para></listitem>
-
- <listitem><para>
- <guiicon>An Exclamation Point</guiicon> for priority
- </para></listitem>
-
- <listitem><para>
- <guiicon>A Penguin</guiicon> which indicates something, although I'm not sure what.
- </para></listitem>
-
- <listitem><para>
- <guiicon>A Paper Clip</guiicon> which indicates that there is an attachment to the message.
- </para></listitem>
-
- <listitem><para>
- <guilabel>From</guilabel>, for the <guilabel>From</guilabel> field of a message.
- </para></listitem>
- <listitem><para>
- <guilabel>Subject</guilabel>, for the <guilabel>Subject</guilabel> field of a message.
- </para></listitem>
-
- <listitem><para>
- <guilabel>Date</guilabel>, for the date and time a message was sent.
- </para></listitem>
-
- <listitem><para>
- <guilabel>Received</guilabel>, for the date and time you got the message.
- </para></listitem>
-
- <listitem><para>
- <guilabel>To</guilabel>, for the <guilabel>To</guilabel> field.
- </para></listitem>
-
- <listitem><para>
- <guilabel>Size</guilabel>, for a message's size.
- </para></listitem>
- </itemizedlist>
- </para>
-
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Alignment</guimenuitem></term>
- <listitem><para> Use this item to decide upon the
- alignment of the message attributes within their
- columns. </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Best Fit</guimenuitem></term>
- <listitem><para>
- Alters the width of the message list columns to maximize the amount of information displayed.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Format Columns...</guimenuitem></term>
- <listitem><para>
- This item is not yet available.
- </para></listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term><guimenuitem>Customize
- Views...</guimenuitem></term> <listitem><para> Opens a
- dialog box that lets you choose a complex set of
- arrangements for your message list, so you can combine
- sorting and grouping in as many ways as you like.
- </para></listitem>
- </varlistentry>
-
- </variablelist>
- </para>
- </sect2>
- </sect1>
-
- <sect1 id="menuref-mail-editor">
- <title>The Message Composer Menus</title>
- <para>
- The message composition window has its own set of menus:
- <guimenu>File</guimenu>, which controls operations on files and
- data, <guimenu>Edit</guimenu>, for text editing,
- <guimenu>Format</guimenu>, which controls the file format of
- messages you send, <guimenu>View</guimenu>, to set how you view
- the message, and <guimenu>Insert</guimenu>, which holds tools
- for embedding files and other items in messages. Here's what's in them:
- </para>
- <sect2 id="menuref-mail-editor-file">
- <title>The Message Composer's File Menu</title>
- <para>
- <variablelist>
- <varlistentry>
- <term><guimenu>Open</guimenu></term>
- <listitem><para>
- Open a text file or a draft mail message.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenu>Save</guimenu></term>
- <listitem><para>
- Save a mail message as a text file.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenu>Save As</guimenu></term>
- <listitem><para>
- Choose a file name and location for
- a message you want to save as a text file.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenu>Save in Folder</guimenu></term>
- <listitem><para>
- Save a message as a draft, rather than
- as a separate text file.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenu>Insert Text File</guimenu></term>
- <listitem><para>
- Open a text file and insert it into
- the current message. (FIXME: belongs under "Insert").
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenu>Send Now</guimenu></term>
- <listitem><para>
- Sends the message immediately.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenu>Send Later</guimenu></term>
- <listitem><para>
- Queue
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenu>Close</guimenu></term>
- <listitem><para>
- Closes the message composer. If you have not done so,
- <application>Evolution</application>
- will ask you if you want to save your message.
- </para></listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect2>
- <sect2 id="menuref-mail-editor-edit">
- <title>The Message Composer's Edit Menu</title>
- <para>
- The <guimenu>Edit</guimenu> menu in the message composer
- contains the following items. Keyboard shortcuts are listed
- next to the items in the menus themselves.
-
- <variablelist>
-
- <varlistentry>
- <term><guimenuitem>Undo</guimenuitem></term>
- <listitem><para>
- Undoes the last action you performed.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Redo</guimenuitem></term>
- <listitem><para>
- If you change your mind about Undoing something,
- you can always use this item.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Cut</guimenuitem></term>
- <listitem><para>
- Removes the selected text from the text entry window and
- retains it in the system "clipboard" memory, ready for pasting.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Copy</guimenuitem></term>
- <listitem><para>
- Copies selected text to the system clipboard without deleting it.
- The text can then be inserted elsewhere with the
- <guimenuitem>Paste</guimenuitem> command.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Paste</guimenuitem></term>
- <listitem><para>
- Inserts the contents of the system clipboard at the
- location of the cursor.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Find</guimenuitem></term>
- <listitem><para>
- Enter a phrase and find your match in your message body.
- As with <guimenuitem>Find Regex</guimenuitem>,
- <guimenuitem>Find Again</guimenuitem>, and
- <guimenuitem>Replace</guimenuitem>, <application>Evolution</application>
- will offer you the option to search forwards or backwards.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Find Regex</guimenuitem></term>
- <listitem><para>
- If you are familiar with <glossterm>regular expressions</glossterm>,
- often called "regexes," you can search for something more complicated,
- using wildcards and boolean logic.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Find Again</guimenuitem></term>
- <listitem><para>
- Repeats your last search.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Replace</guimenuitem></term>
- <listitem><para>
- Enter a word or phrase and the word or phrase with which you'd like
- to replace it.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Properties</guimenuitem></term>
- <listitem><para>
- This item brings up the Message Composer Properties Capplet,
- a portion of the GNOME Control Center that determines the
- key bindings for the message composer. Help for this capplet is
- available directly from the Control Center.
- (FIXME: Write that help doc too) (FIXME: this is in the wrong place!)
- </para></listitem>
- </varlistentry>
-
- </variablelist>
- </para>
- </sect2>
- <sect2 id="menuref-mail-composer-format">
- <title>The Message Composer's Format Menu</title>
- <para>
- The <guimenu>Format</guimenu> menu has only one item:
- <variablelist>
- <varlistentry>
- <term><guimenuitem>HTML</guimenuitem></term>
- <listitem><para>
- Toggles HTML mode for the message composer. When selected,
- the message is displayed and sent in HTML. If you have written a
- message in HTML and turn HTML off, most formatting will be lost.
- <application>Evolution</application> will attempt to preserve spacing
- and to remove formatting gracefully, however.
- </para></listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect2>
- <sect2 id="menuref-mail-composer-view">
- <title>The Message Composer's View Menu</title>
- <para>
- The <guimenu>View</guimenu> menu controls the way messages are
- displayed, and how much of the message, its headers, and
- attachments appear. It contains:
- <variablelist>
- <varlistentry>
- <term><guimenuitem>Show Attachments</guimenuitem></term>
- <listitem><para>
- Toggles the display of attachments. When this item is selected,
- <application>Evolution</application> will create a separate pane
- of the composition window to show what attachments you are appending
- to the message.
- </para></listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect2>
- <sect2 id="menuref-mail-composer-insert">
- <title>The Message Composer's Insert Menu</title>
- <para>
- The <guimenu>Insert</guimenu> menu holds tools that allow you
- to include images, horizontal rules, and other objects
- in the body of your message. The tools are:
- <variablelist>
-
- <varlistentry>
- <term><guimenuitem>Image</guimenuitem></term>
- <listitem><para>
- This tool will prompt you to select an image file to
- insert into your HTML message. For text messages, this
- is the same as attaching an image file.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Link</guimenuitem></term>
- <listitem><para>
- Opens the <interface>link creation window</interface>,
- which lets you specify the URL and text description
- for a link in your message. This only works with HTML
- messages.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Rule</guimenuitem></term>
- <listitem><para>
- Opens the<interface> horizontal rule creation dialog</interface>, which lets you
- create an HTML horizontal rule. For more information,
- see <xref linkend="usage-mail-getnsend-send-html">.
- This tool only works with HTML messages.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Text File</guimenuitem></term>
- <listitem><para>
- Open a text file and insert it into the current message.
- This tool works with both plain text and HTML messages.
- </para></listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect2>
- </sect1>
-
- <sect1 id="menuref-cal">
- <title>The Calendar Menus</title>
- <para>
- The Main window of the calendar has the same menus as the main
- window of the mail client. However, their contents vary in a
- number of ways.
- </para>
- <sect2 id="menuref-cal-edit">
- <title>The Calendar Edit Menu</title>
- <para>
- The contents of the Edit menu are currently so borked that I
- refuse to document them right now. (That means FIXME). They
- should be:
-
- <variablelist>
- <varlistentry>
- <term><guimenuitem>Item</guimenuitem></term>
- <listitem><para>
- Description
- </para></listitem>
- </varlistentry>
- <varlistentry>
- <term><guimenuitem>Item</guimenuitem></term>
- <listitem><para>
- Description
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Item</guimenuitem></term>
- <listitem><para>
- Description
- </para></listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect2>
- <sect2 id="menuref-cal-view">
- <title>The Calendar View Menu</title>
- <para>
- The Calendar's <guimenu>View</guimenu> menu contains the following items:
-
- <variablelist>
- <varlistentry>
- <term><guimenuitem>Show Shortcut Bar</guimenuitem></term>
- <listitem><para>
- Toggle the Shortcut Bar on and off with this item.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Show Folder Bar</guimenuitem></term>
- <listitem><para>
- Toggle the folder bar on and off with this item.
- See <xref linkend="usage-mainwindow-folderbar"> for
- more information about the folder bar.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>View By Day</guimenuitem></term>
- <listitem><para>
- Switch to the day view for your calendar.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>View Five Days</guimenuitem></term>
- <listitem><para>
- View five calendar days at once.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>View by Week</guimenuitem></term>
- <listitem><para>
- Switch the calendar view to full week mode.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>View By Month</guimenuitem></term>
- <listitem><para>
- Look at a month at a time.
- </para></listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect2>
-
- <sect2 id="menuref-cal-settings">
- <title>The Calendar Settings Menu</title>
- <para>
- This menu is empty.
- </para>
- </sect2>
-
- </sect1>
-
- <sect1 id="menuref-cal-editor">
- <title>The Appointment Editor Menus</title>
- <para>
- The appointment editor has its own menus, to help you use its
- wide-ranging abilities.
- </para>
-
- <sect2 id="menuref-cal-editor-file">
- <title>The Appointment Editor's File Menu</title>
- <para>
- This menu contains several items, including a <guisubmenu>New</guisubmenu> submenu
- that is identical to that in the
- <link linkend="menuref-universal-file">main window's file menu</link>.
- Its other contents are:
- <variablelist>
-
- <varlistentry>
- <term><guimenuitem>Send</guimenuitem></term>
- <listitem><para>
- Opens a mail message with the appointment attached to it.
- </para></listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term><guimenuitem>Save</guimenuitem></term>
- <listitem><para>
- Save this appointment in the existing location and name. If you have not yet
- chosen a location and name, this is the same as <guimenuitem>Save As</guimenuitem>.
- </para></listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term><guimenuitem>Save As</guimenuitem></term>
- <listitem><para>
- Choose a location and name for this appointment, and save it.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Delete</guimenuitem></term>
- <listitem><para>
- Deletes the appointment.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Move to Folder</guimenuitem></term>
- <listitem><para>
- Chose a folder, and move the appointment into it.
- </para></listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term><guimenuitem>Copy to Folder</guimenuitem></term>
- <listitem><para>
- Chose a folder, and put a copy of the appointment into it.
- </para></listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term><guimenuitem>Page Setup Submenu</guimenuitem></term>
- <listitem><para>
- This menu contains two items:
- <itemizedlist>
- <listitem><para>
- <guimenuitem>Memo Style</guimenuitem> &mdash;
- FIXME: What does this do?
- </para></listitem>
-
- <listitem><para>
- <guimenuitem>Define Print Styles</guimenuitem> &mdash;
- FIXME: What does this do?
- </para></listitem>
- </itemizedlist>
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Print Preview</guimenuitem></term>
- <listitem><para> Shows you what your appointment will look
- like if you print it. See <xref linkend="usage-print">
- for details on printing and the Print Preview function.
- </para></listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term><guimenuitem>Print</guimenuitem></term>
- <listitem><para>
- Prints the appointment without preview.
- </para></listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term><guimenuitem>Properties</guimenuitem></term>
- <listitem><para>
- FIXME: What does this do?
- </para></listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term><guimenuitem>Close</guimenuitem></term>
- <listitem><para>
- Close the appointment editor window.
- </para></listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect2>
-
- <sect2 id="menuref-cal-editor-edit">
- <title>The Appointment Editor's Edit Menu</title>
- <para>
- FIXME: this menu is copied and pasted entirely from somewhere
- else.
- </para>
- </sect2>
-
- <sect2 id="menuref-cal-editor-view">
- <title>The Appointment Editor's View Menu</title>
- <para>
- This menu allows you to look at different appointments, and
- set the way you look at them, without having to move back to
- the <interface>Main Window</interface>. It contains:
- <variablelist>
-
- <varlistentry>
- <term><guisubmenu>Previous</guisubmenu></term>
- <listitem><para>
- The items in this submenu will take you to appointments
- prior to the current one. (FIXME: describe).
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guisubmenu>Next</guisubmenu></term>
- <listitem><para>
- The items in this submenu will take you to appointments
- scheduled to occur after the current one. (FIXME: describe).
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Calendar</guimenuitem></term>
- <listitem><para>
- FIXME: What does this item do?
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guisubmenu>Toolbars</guisubmenu></term>
- <listitem><para>
- The <guisubmenu>Toolbars</guisubmenu> submenu
- allows you to choose which toolbars
- are displayed in the
- <interface>Appointment Editor</interface>. They are:
- <itemizedlist>
- <listitem><para>
- <guimenuitem>Standard</guimenuitem> &mdash;
- Toggle the standard toolbar on and off.
- </para></listitem>
-
- <listitem><para>
- <guimenuitem>Formatting</guimenuitem> &mdash;
- Toggle the formatting toolbar on and off.
- </para></listitem>
-
- <listitem><para>
- <guimenuitem>Customize</guimenuitem> &mdash;
- Select the contents of the formatting and standard toolbars.
- </para></listitem>
- </itemizedlist>
- </para></listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect2>
-
- <sect2 id="menuref-cal-editor-insert">
- <title>The Appointment Editor's Insert Menu</title>
- <para>
- This menu contains: (FIXME: Insert Content Here)
- <variablelist>
- <varlistentry>
- <term><guimenuitem>File</guimenuitem></term>
- <listitem><para>
- Choose a file to append to your appointment or appointment request.
- </para></listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term><guimenuitem>Item</guimenuitem></term>
- <listitem><para>
- FIXME: ?
- </para></listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term><guimenuitem>Object</guimenuitem></term>
- <listitem><para>
- FIXME: ?
- </para></listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect2>
-
- <sect2 id="menuref-cal-editor-format">
- <title>The Appointment Editor's Format Menu</title>
- <para>
- This menu contains two items, neither of which
- have any functionality yet:
- <variablelist>
- <varlistentry>
- <term><guimenuitem>Font</guimenuitem></term>
- <listitem><para>
- FIXME: ?
- </para></listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term><guimenuitem>Paragraph</guimenuitem></term>
- <listitem><para>
- FIXME: ?
- </para></listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect2>
-
- <sect2 id="menuref-cal-editor-tools">
- <title>The Appointment Editor's Tools Menu</title>
- <para>
- This menu contains four items, including the
- <guisubmenu>Forms</guisubmenu> submenu, which allows you to
- alter calendar forms and create your own entries. None of
- this works yet, though.
-
- <variablelist>
-
- <varlistentry>
- <term><guimenuitem>Spelling</guimenuitem></term>
- <listitem><para>
- Checks the spelling of your calendar entry.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Check Names</guimenuitem></term>
- <listitem><para> Checks the names listed here against
- those in your address book.
- </para></listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term><guimenuitem>Address Book</guimenuitem></term>
- <listitem><para>
- FIXME: ?
- </para></listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term><guisubmenu>Forms</guisubmenu> Submenu</term>
- <listitem><para>
- The Forms submenu lets you alter the
- appearance of Calendar Forms.
- </para></listitem>
- </varlistentry>
- </variablelist>
-
- </para>
- </sect2>
-
- <sect2 id="menuref-cal-editor-actions">
- <title>The Appointment Editor's Actions Menu</title>
- <para>
- This menu contains:
-
- <variablelist>
- <varlistentry>
- <term><guimenuitem>Schedule Meeting</guimenuitem></term>
- <listitem><para>
- Brings up the <interface>Meeting Invitation</interface> window,
- described in <xref linkend="usage-calendar-apts">.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Cancel Invitation</guimenuitem></term>
- <listitem><para>
- Cancels the event, notifying all attendees. You may be prompted
- to specify an invitation message.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Forward as vCalendar</guimenuitem></term>
- <listitem><para>
- Opens the message composer with the current event attached.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Forward as Text</guimenuitem></term>
- <listitem><para>
- Opens the message composer with a text description of the current
- event included in the message body.
- </para></listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect2>
-
- <sect2 id="menuref-cal-editor-help">
- <title>The Appointment Editor's File Menu</title>
- <para>
- This menu is empty.
- </para>
- </sect2>
-
- </sect1>
-
- <sect1>
- <title>Contact Manager Menus</title>
- <para>
- The contact manager has six menus: <guimenu>File</guimenu>,
- <guimenu>Edit</guimenu>, <guimenu>View</guimenu>,
- <guimenu>Setting</guimenu>s, <guimenu>Tools</guimenu>, and
- <guimenu>Help</guimenu>.
- </para>
-
- <sect2 id="menuref-contact-edit">
- <title>Contact Manager Edit Menu</title>
- <para>
- This menu is empty.
- </para>
- </sect2>
-
-
- <sect2 id="menuref-contact-view">
- <title>Contact Manager View Menu</title>
- <para>
- This menu contains the following items:
-
- <variablelist>
- <varlistentry>
- <term><guimenuitem>Show Shortcut Bar</guimenuitem></term>
- <listitem><para>
- Toggle the Shortcut Bar on and off with this item.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Show Folder Bar</guimenuitem></term>
- <listitem><para>
- Toggle the folder bar on and off with this item.
- See <xref linkend="usage-mainwindow-folderbar"> for
- more information about the folder bar.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>As Table</guimenuitem> / <guimenuitem>As Minicards</guimenuitem></term>
- <listitem><para>
- View your contacts as a table.
- When in table-view mode, this menu item reads
- <guimenuitem>As Minicards</guimenuitem>, and changes the view
- back to the minicard format.
- </para></listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect2>
-
- <sect2 id="menuref-contact-tools">
- <title>Contact Manager Tools Menu</title>
- <para>
- This menu contains one item:
-
- <variablelist>
- <varlistentry>
- <term><guimenuitem>Search for
- Contacts</guimenuitem></term> <listitem><para> Brings up
- the in-depth search window. <xref
- linkend="contact-search"> describes how to use this
- feature. </para></listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect2>
-
-
-
- <sect2 id="menuref-contact-actions">
- <title>Contact Manager Tools Menu</title>
- <para>
- This menu contains only one item:
-
- <variablelist>
- <varlistentry>
- <term><guimenuitem>New Directory Server</guimenuitem></term> <listitem><para> Brings up
- the in-depth search window. <xref
- linkend="config-prefs-contact-ldap-add"> describes how to use this
- feature. </para></listitem>
- </varlistentry>
- </variablelist>
-
- </para>
- </sect2>
- </sect1>
-
- <sect1 id="menuref-contact-editor">
- <title>The Contact Editor Menus</title>
- <para>
- This window has only one menu: the file menu.
- </para>
-
- <sect2 id="menuref-contact-editor-file">
- <title>Contact Editor File Menu</title>
- <para>
- This menu contains five items:
- <variablelist>
-
- <varlistentry>
- <term><guimenuitem>Save</guimenuitem></term>
- <listitem><para>
-
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Save As</guimenuitem></term>
- <listitem><para>
- Allows you to save the contact as an external
- file in the <glossterm linkend="vcard">VCard</glossterm> format.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Print</guimenuitem></term>
- <listitem><para>
- Prints the current contact.
- </para></listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term><guimenuitem>Delete</guimenuitem></term>
- <listitem><para>
- Deletes the current contact.
- </para></listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term><guimenuitem>Close</guimenuitem></term>
- <listitem><para>
- Closes the Contact Editor without saving.
- </para></listitem>
- </varlistentry>
-
- </variablelist>
- </para>
- </sect2>
- </sect1>
-
-
-</chapter>
-
-
-
-
-
-
-
diff --git a/doc/C/preface.sgml b/doc/C/preface.sgml
deleted file mode 100644
index ddb6a0d2dd..0000000000
--- a/doc/C/preface.sgml
+++ /dev/null
@@ -1,438 +0,0 @@
-<!--
-<!DOCTYPE preface PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.1//EN">
--->
-
- <preface id="introduction">
-<!-- =============Introduction ============================= -->
- <title>Introduction</title>
-
- <sect1 id="what">
- <title>What is Evolution, and What Can It Do for Me?</title>
- <para>
- Information is useless unless it's organized and accessible;
- it's hardly even worth the name if you can't look at it and be
- <emphasis>informed</emphasis>.
- <application>Evolution</application>'s goal is to make the
- tasks of storing, organizing, and retrieving your personal
- information easier, so you can work and communicate with
- others. That is, it's a highly evolved <glossterm
- linkend="groupware">groupware</glossterm> program, an integral
- part of the Internet-connected desktop. On the inside, it's a
- powerful database; on the outside, it's a tool to help you get
- your work done.
- </para>
- <para>
- Because it's part of the GNOME project,
- <application>Evolution</application> is Free Software. The
- program and its source code are released under the terms of
- the GNU <ulink type="help" url="gnome-help:gpl"><citetitle>General
- Public License (GPL)</citetitle></ulink>, and the
- documentation falls under the <ulink type="help"
- url="gnome-help:fdl"><citetitle>Free Documentation
- License</citetitle></ulink> (FDL). For more information about
- the GPL and the FDL, visit the Free Software Foundation's
- website at <ulink
- url="http://www.fsf.org">http://www.fsf.org</ulink>.
- </para>
- <para>
- <note>
- <title>This is a preview release</title>
- <para>
- <application>Evolution</application> is not complete, and
- still has a lot of flaws. Please help improve it by
- letting us know about them. You should do this by
- submitting bug reports with the GNOME <application>Bug
- Report Tool</application> (known as
- <command>bug-buddy</command> at the command line).
- </para>
- </note>
- </para>
-
- <para>
- <application>Evolution</application> can help you work in a
- group by handling email, address and other contact
- information, and one or more calendars. It can do that on one
- or several computers, connected directly or over a network,
- for one person or for large groups.
- </para>
- <para>
- The <application>Evolution</application> project has four
- central goals:
-
- <itemizedlist>
- <listitem>
- <para>
- The application must be <emphasis>both powerful and easy
- to use</emphasis>. In other words, it needs a familiar
- and intuitive interface that users can customize to their
- liking, and users should have access to shortcuts for
- complex tasks.
- </para>
- </listitem>
- <listitem>
- <para>
- <application>Evolution</application> must meet and
- exceed the standards set by other groupware products.
- It must include support for major network <glossterm
- linkend="protocol">protocols</glossterm> so that it can
- integrate seamlessly with existing hardware and network
- environments.
- </para>
- </listitem>
- <listitem>
- <para>
- The project must support open standards and be open to
- expansion, so that it can become a development platform
- as well as an application. From the simplest scripting
- to the most complex network and component programming,
- <application>Evolution</application> must offer
- developers an environment for cutting-edge application
- development.
- </para>
- </listitem>
- <listitem>
- <para>
- Data must be safe: <application>Evolution</application>
- must not lose mail, corrupt mailbox files or other
- data, execute arbitrary <glossterm linkend="script">scripts</glossterm>,
- or delete files from your hard disk.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- <para>
- <application>Evolution</application> is designed to make most
- daily tasks faster. 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.
- <application>Evolution</application> 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 <link
- linkend="usage-mail-organize-vFolders">Virtual Folders</link>,
- which let you save searches as though they were ordinary mail
- folders.
- </para>
-
- </sect1>
-
- <sect1 id="aboutbook">
- <title>About This Book</title>
- <!-- ************** FOLLOWING PARAGRAPH FOR DRAFT ONLY ************* -->
- <para>
- This version of the <application>Evolution</application>
- User's Guide is a <emphasis>draft</emphasis>. It describes
- version 0.6 of the software. 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
- <email>aaron@ximian.com</email>. If you would like to work
- on the guide please contact me or see the GNOME Documentation
- project <ulink
- url="http://developer.gnome.org/projects/gdp">web
- site</ulink>. This paragraph will be removed in later
- versions of the manual.
- </para>
- <!-- ************* END DRAFT ONLY PARAGRAPH ************** -->
-
- <para>
- This book is divided into two parts, with several
- appendices. The first part is a <link linkend="usage">guided
- tour</link>&mdash; it will explain how to use
- <application>Evolution</application>. If you are new to
- <application>Evolution</application> or to groupware in
- general, this section is for you. The second section, covering
- <link linkend="config">configuration</link>, is targeted at
- more advanced users, but anyone who wants to change the way
- <application>Evolution</application> looks or acts can benefit
- from reading it. In addition, there is a comprehensive <link
- linkend="menuref">menu reference</link> which describes nearly
- every capability that <application>Evolution</application> has
- to offer.
- </para>
- <formalpara>
- <title>Typographical conventions</title>
- <para>
- Some kinds of words are marked off with special typography:
- <simplelist>
- <member><application>Applications</application></member>
- <member><command>Commands</command> typed at the command line</member>
- <member><guilabel>Labels</guilabel> for interface items</member>
-
- <member> Menu selections look like this:
- <menuchoice>
- <guimenu>Menu</guimenu>
- <guisubmenu>Submenu</guisubmenu>
- <guimenuitem>Menu Item</guimenuitem>
- </menuchoice>
- </member>
- <member><guibutton>Buttons</guibutton> you can
- click</member> <member><userinput>Anything you type
- in</userinput></member> <member><computeroutput>Text
- output from a computer</computeroutput></member>
- <member><glossterm linkend="apx-gloss">Words</glossterm>
- that are defined in the <xref linkend="apx-gloss">.</member>
- </simplelist>
- </para>
- </formalpara>
- </sect1>
- <sect1 id="commontasks">
- <title>Quick Reference for Common Tasks</title>
- <para>
- You might want to copy this section and tape it to
- the wall next to your computer: it's a very short summary of
- most of the things you'll want to do with
- <application>Evolution</application>, and pointers to the
- sections of the book where you'll find more in-depth
- description of those tasks.
- </para>
- <sect2 id="quickref-newthings">
- <title>Opening or Creating Anything</title>
- <para>
- Here are the keyboard shortcuts and menu items you're most
- likely to use:
-
- <variablelist>
-
- <varlistentry>
- <term>Create a new folder</term>
- <listitem>`
- <para>
- <menuchoice><guimenu>File</guimenu><guisubmenu>New</guisubmenu>
- <guimenuitem>Folder</guimenuitem></menuchoice> or
- <keycombo action="simul">
- <keycap>Ctrl</keycap>
- <keycap>Shift </keycap>
- <keycap>F</keycap>
- </keycombo>
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Create a new Shortcut in the Evolution Bar</term>
- <listitem>
- <para>
- <menuchoice><guimenu>File</guimenu>
- <guisubmenu>New</guisubmenu>
- <guimenuitem>Evolution Bar Shortcut</guimenuitem> </menuchoice> or
- <keycombo action="simul">
- <keycap>Ctrl</keycap>
- <keycap>Shift</keycap>
- <keycap>S</keycap>
- </keycombo>
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Create a new email message:</term>
- <listitem>
- <para>
- Use
- <menuchoice><guimenu>File</guimenu><guisubmenu>New</guisubmenu><guimenuitem>Mail
- Message</guimenuitem> </menuchoice> or
- <keycombo action="simul">
- <keycap>Ctrl</keycap>
- <keycap>Shift </keycap>
- <keycap>M</keycap>
- </keycombo>
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Create a new Appointment</term>
- <listitem>
- <para>
- <menuchoice><guimenu>File</guimenu>
- <guisubmenu>New</guisubmenu>
- <guimenuitem>Appointment</guimenuitem> </menuchoice> or
- <keycombo action="simul">
- <keycap>Ctrl</keycap>
- <keycap>Shift</keycap>
- <keycap>A</keycap>
- </keycombo>
- </para>
- </listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term>Enter a new Contact</term>
- <listitem>
- <para>
- <menuchoice><guimenu>File</guimenu>
- <guisubmenu>New</guisubmenu>
- <guimenuitem>Contact</guimenuitem> </menuchoice> or
- <keycombo action="simul">
- <keycap>Ctrl</keycap>
- <keycap>Shift</keycap>
- <keycap>C</keycap>
- </keycombo>
- </para>
- </listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term>Create a new Task</term>
- <listitem>
- <para>
- <menuchoice><guimenu>File</guimenu>
- <guisubmenu>New</guisubmenu>
- <guimenuitem>Task</guimenuitem> </menuchoice> or
- <keycombo action="simul">
- <keycap>Ctrl</keycap>
- <keycap>Shift</keycap>
- <keycap>T</keycap>
- </keycombo>
- </para>
- </listitem>
- </varlistentry>
-
- </variablelist>
- </para>
- </sect2>
- <sect2 id="quickref-mail">
- <title>Mail Tasks</title>
- <para>
- Here are the most frequent email tasks, and shortcuts for
- navigating your mailbox with the keyboard instead of the
- mouse:
- <variablelist>
- <varlistentry>
- <term>Check Mail</term>
- <listitem>
- <para>
- Click <guibutton>Get Mail</guibutton> in the
- toolbar. There is no keyboard shortcut for this task,
- but you can ask <application>Evolution</application>
- to check for new mail periodically. To do so, FIXME.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Reply to a Message</term>
- <listitem>
- <para>
- To reply to the sender of the message only:
- click <guibutton>Reply</guibutton> in the
- toolbar, or press
- <keycombo action="simul">
- <keycap>Ctrl</keycap>
- <keycap>R</keycap>
- </keycombo>
- </para>
- <para>
- To reply to the sender and all the other visible
- recipients of the message, click <guibutton>Reply to
- All</guibutton> or select the message and press
- <keycombo action="simul">
- <keycap>Shift</keycap>
- <keycap>Ctrl</keycap>
- <keycap>R</keycap>
- </keycombo>
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Forward a Message</term>
- <listitem>
- <para>
- Select the message or messages you want to forward,
- and click <guibutton>Forward</guibutton> in the
- toolbar, or press
- <keycombo action="simul">
- <keycap>Ctrl</keycap>
- <keycap>J</keycap>
- </keycombo>
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Open a Message in a New Window</term>
- <listitem>
- <para>
- Double-click the message you want to view, or select
- it and press
- <keycombo action="simul">
- <keycap>Ctrl</keycap>
- <keycap>O</keycap>
- </keycombo>
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Create Filters and Virtual Folders</term>
- <listitem>
- <para>
- You can create filters and Virtual Folders based on
- specific message attributes from the message's
- right-click menu. Alternately, select a message, and
- then choose <menuchoice> <guimenu>Settings</guimenu>
- <guimenuitem>Mail Filters</guimenuitem> </menuchoice>
- or <menuchoice> <guimenu>Settings</guimenu>
- <guimenuitem>Virtual Folder Editor</guimenuitem>
- </menuchoice>. Filters are discussed in <xref
- linkend="usage-mail-organize-filters">, and Virtual
- Folders in <xref
- linkend="usage-mail-organize-vfolders">.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
-
- </para>
- </sect2>
- <sect2 id="quickref-cal">
- <title>Calendar</title>
- <para>
- <variablelist>
- <varlistentry>
- <term></term>
- <listitem>
- <para>
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
-
- </para>
- </sect2>
- <sect2 id="quickref-contact">
- <title>Contact Manager</title>
- <para>
-
-
- <variablelist>
- <varlistentry>
- <term></term>
- <listitem>
- <para>
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
-
-
- </para>
- </sect2>
- </sect1>
- </preface>
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/doc/C/usage-calendar.sgml b/doc/C/usage-calendar.sgml
deleted file mode 100644
index a2c14e99a6..0000000000
--- a/doc/C/usage-calendar.sgml
+++ /dev/null
@@ -1,371 +0,0 @@
-<!--
-<!DOCTYPE Chapter PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.1//EN">
--->
-
-<chapter id="usage-calendar">
- <title>The Evolution Calendar</title>
- <para>
- To begin using the calendar, select
- <guibutton>Calendar</guibutton> from the <interface>shortcut
- bar</interface>. By default, the calendar starts showing today's
- schedule on a ruled background. At the upper right, there's a
- monthly calendar you can use to switch days. Below that, there's
- a <guilabel>TaskPad</guilabel>, where you can keep a list of tasks
- seperate from your calendar appointments. The calendar's daily
- view is shown in <xref linkend="usage-calendar-fig">.
-
- <!-- ============== Figure ============================= -->
- <figure id="usage-calendar-fig">
- <title>Evolution Calendar View</title>
- <screenshot>
- <screeninfo>Evolution Contact Manager Window</screeninfo>
- <graphic fileref="fig/calendar" format="png" srccredit="Aaron Weber">
- </graphic>
- </screenshot>
- </figure>
- <!-- ============== End of Figure ============================= -->
-
- </para>
- <sect1 id ="usage-calendar-view">
- <title>Ways of Looking at your Calendar</title>
-
- <para>
- The toolbar offers you four different views of your calendar:
- one day, five days, a week, or a month at once. Press the
- calendar-shaped buttons on the right side of the toolbar to
- switch between views. You can also select a range of
- days&mdash; three days, ten days, a fortnight if you want
- &mdash; in the small calendar at the upper right.
- </para>
- <para>
- The <guibutton>Prev</guibutton> and <guibutton>Next</guibutton>
- buttons will move you forward and back in your calendar pages.
- If you're looking at only one day, you'll see tomorrow's page,
- or yesterday's. If you're looking at your calendar by week,
- month, fortnight, or anything else, you'll move around by just
- that much. To come back to today's listing, click
- <guibutton>Today</guibutton>.
- </para>
- <para>
- To visit a specific date's calendar entries, click
- <guibutton>Go To</guibutton> and select the date in the dialog
- box that appears.
- </para>
-
-
-<!-- ############### FIXME FIXME FIXME ############
-Feature not yet implemented, and may not be implemented due to
-lack of time, resources, and interest.
- <para>
- In addition, <application>Evolution</application> supports
- Hebrew, Muslim, and other calendar formats. To switch to a
- different calendar format, choose
- <guimenuitem>GUIMENUITEM</guimenuitem> from the
- <guimenu>GUIMENU</guimenu>.
- </para>
-################ END FIXME AREA ################## -->
-
- </sect1>
- <sect1 id="usage-calendar-apts">
- <title>Scheduling With the Evolution Calendar</title>
- <para>
- Of course, you'll want to use the calendar to do more than find
- out what day it is. This section will tell you how to schedule
- events, set alarms, and determine event recurrence.
- </para>
- <sect2 id="usage-calendar-apts-basic">
- <title>Creating events</title>
- <para>
- To create a new calendar event, select
- <menuchoice>
- <guimenu>File</guimenu>
- <guisubmenu>New</guisubmenu>
- <guimenuitem>Appointment</guimenuitem>
- </menuchoice>
- or click the <guibutton>New</guibutton> button on the left end
- of the toolbar. The <interface>New Appointment</interface>
- dialog will pop up with the usual menu bar, tool bar, and
- window full of choices for you.
- </para>
- <tip id="new-appointment-shortcut">
- <title>Shortcut</title>
- <para>
- If you don't need to enter more information than the date
- and time of the appointment, you just click in any blank
- space in the calendar and start typing. You can enter other
- information later with the appointment editor.
- </para>
- </tip>
-
- <para>
- Your event must have a starting and ending date &mdash; by
- default, today &mdash; but you can choose whether to give it
- starting and ending times or to mark it as an <guilabel>All
- day event</guilabel>. An <guilabel>All day event</guilabel>
- appears at the top of a day's event list rather than inside
- it. That makes it easy to have events that overlap and fit
- inside each other. For example, a conference might be an all
- day event, and the meetings at the conference would be timed
- events. Of course, events with specific starting and ending
- times can also overlap. When they do they're displayed as
- multiple columns in the day view of the calendar.
- </para>
- <note>
- <title>Doing Two Things At Once</title>
- <para>
- If you create calendar events that overlap,
- <application>Evolution</application> will display them side
- by side in your calendar. However,
- <application>Evolution</application> cannot help you do
- multiple things at once.
- </para>
- </note>
- <para>
- You can have as many as four different
- <guilabel>Alarms</guilabel>, any time prior to the event
- you've scheduled. You can have one alarm of each type:
- <variablelist>
- <varlistentry>
- <term><guilabel>Display</guilabel></term>
- <listitem>
- <para>
- A window will pop up on your screen to remind you of
- your event.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>Audio</guilabel></term>
- <listitem>
- <para>
- Choose this to have your computer deliver a sound
- alarm.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>Program</guilabel></term>
- <listitem>
- <para>
- Select this if you would like to run a program as a
- reminder. You can enter its name in the text field,
- or find it with the <guibutton>Browse</guibutton>
- button.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>Mail</guilabel></term>
- <listitem>
- <para>
- <application>Evolution</application> will send an
- email reminder to the address you enter into the text
- field.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
-
- </para>
- <para>
- <guilabel>Classification</guilabel> is a little more
- complicated, and only applies to calendars on a
- network. <guilabel>Public</guilabel> is the default category,
- and a public event can be viewed by anyone on the calendar
- sharing network. <guilabel>Private</guilabel> denotes one
- level of security, and <guilabel>Confidential</guilabel> a
- higher level. <!-- FIXME --> Exact determinations and
- implementations of this feature have yet to be
- determined. <!-- FIXME -->
- </para>
- <para>
- The <guilabel>Recurrence</guilabel> tab lets you describe
- repetition in events ranging from once every day up to once
- every 100 years. You can then choose a time and date when the
- event will stop recurring, and, under
- <guilabel>Exceptions</guilabel>, pick individual days when the
- event will <emphasis>not</emphasis> recur. Make your
- selections from left to right, and you'll form a sentence:
- "Every two weeks on Monday and Friday until January 3, 2003"
- or "Every month on the first Friday for 12 occurrences."
- </para>
-
- <para>
- Once you're done with all those settings, click on the disk
- icon in the toolbar. That will save the event and close the
- event editor window. If you want, you can alter an event
- summary in the calendar view by clicking on it and typing. You
- can change other settings by right-clicking on the event then
- choosing <guimenuitem>Edit this Appointment</guimenuitem>.
- </para>
- </sect2>
-
-<!-- ############UNIMPLEMENTED FEATURES ###################
-
- <sect2 id="usage-calendar-apts-group">
- <title>Appointments for Groups</title>
- <para>
- 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.
- </para>
- <note>
- <title>Unimplemented Feature</title>
- <para>This feature is not yet implemented.</para>
- </note>
-
- <para>
- In addition, you can use <application>Evolution</application>
- to mark a meeting request on another person's calendar. To do
- it, click <guibutton>New</guibutton> in the calendar toolbar,
- or select <menuchoice> <guimenu>File</guimenu>
- <guisubmenu>New</guisubmenu>
- <guimenuitem>Appointment</guimenuitem> </menuchoice> to bring
- up the <interface>new event</interface> window. Then describe
- the event as you would any other. Before you click
- <guibutton>OK</guibutton>, (INSERT DESCRIPTION HERE...).
- <application>Evolution</application> 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.
- </para>
- <para>
- To mark a tentative event as confirmed, click once on the
- event in the <interface>calendar view</interface> to select
- it, and then choose <guimenuitem>Event
- Properties</guimenuitem> from the <guimenu>Settings</guimenu>
- menu. In the <interface>Event Properties</interface> dialog
- window, click the "tentative" button to De-select the
- event.
- </para>
- </sect2>
-
-
- <sect2 id="usage-calendar-apts-privs">
- <title>Scheduling privileges</title>
- <para>
- 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.
- </para>
- </sect2>
- ########## END UNIMPLEMENTED FEATURESET ############ -->
-
- </sect1>
-
- <sect1 id="usage-calendar-todo">
- <title>The Task Pad</title>
- <para>
- The Task Pad, located in the lower right corner of the
- calendar, lets you keep a list of tasks separate from your
- calendar events. Tasks are colored and sorted by priority and
- due-date (see <xref linkend="config-prefs"> for more
- information), and are included with calendar data during
- synchronization with a hand-held device. You can use the list
- in a larger format by choosing the <guibutton>Tasks</guibutton>
- button in the shortcut bar or in the folder tree.
- </para>
- <para>
- To record a new task, click the <guibutton>Add</guibutton>
- button below the list. <application>Evolution</application>
- will pop up a small window with five items in it:
-
- <variablelist>
- <varlistentry>
- <term> <guilabel>Summary:</guilabel></term>
- <listitem>
- <para>
- The description you enter here will appear in the To Do
- list itself.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term> <guilabel>Due Date:</guilabel></term>
- <listitem>
- <para>
- Decide when this item is
- due. You can either type in a date and time, or select one from
- the <guibutton>Calendar</guibutton> and time drop-down menus.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>Priority:</guilabel></term>
- <listitem>
- <para>
- Select a level of importance from 1 (most important) to 9
- (least important).
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term> <guilabel>Item Comments:</guilabel></term>
- <listitem>
- <para>
- If you wish, you can keep a more detailed description of
- the item here.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- <para>
- Once you've added a task to your to-do list, its summary
- appears in the <guilabel>Summary</guilabel> section of task
- list. To view or edit a detailed description of an item,
- double-click on it, or select it and click
- <guibutton>Edit</guibutton>. You can delete items by selecting
- them and clicking on the <guibutton>Delete</guibutton> button.
- </para>
- </sect1>
-
- <sect1 id="usage-calendar-multiple">
- <title>Multiple Calendars</title>
- <para>
- <application>Evolution</application> permits you to have and
- maintain multiple calendars. This is useful if you maintain
- schedules for other people, if you are responsible for resource
- or room allocation, or if you have multiple personalities.
- </para>
-
- <example>
- <title>Keeping Multiple Calendars</title>
- <para>
- Keelyn, the office manager for a small company, has one
- calendar for her own schedule. On the local network, she
- maintains one for the conference room, so people know when
- they can schedule meetings. Next to that, she maintains a
- calendar that reflects when consultants are going to be on
- site, and another that keeps track of when the Red Sox are
- playing.
- </para>
- </example>
- <para>
- To create a new calendar, select
- <menuchoice>
- <guimenu>File</guimenu> <guisubmenu>New</guisubmenu>
- <guimenuitem>Calendar</guimenuitem>
- </menuchoice>.
- You can place the calendar in any calendar folder and access it
- from the folder view. Alarms, configuration, and display for
- each calendar are separate from each other.
- </para>
-
- </sect1>
-</chapter>
-
-
-
-
-
-
-
-
-
-
diff --git a/doc/C/usage-contact.sgml b/doc/C/usage-contact.sgml
deleted file mode 100644
index 0c6b976e4d..0000000000
--- a/doc/C/usage-contact.sgml
+++ /dev/null
@@ -1,617 +0,0 @@
-<!--
-<!DOCTYPE Chapter PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.1//EN">
--->
-
-<chapter id="usage-contact">
- <title>The Evolution Address Book</title>
- <abstract>
- <para>
- The <application>Evolution</application> address book can
- handle all of the functions of an address book, phone book, or
- Rolodex. Of course, it's a lot easier to update
- <application>Evolution</application> than it is to change an
- actual paper book. <application>Evolution</application> also
- allows easy synchronization with hand-held devices. Since
- <application>Evolution</application> supports the <glossterm
- linkend="ldap">LDAP</glossterm> directory protocol, you can use
- it with almost any type of existing directory server on your
- network.
- </para>
- <para>
- Another advantage of the <application>Evolution</application>
- address book is its integration with the rest of the
- application. When you look for someone's address, you can also
- see a history of appointments with that person. Or, you can
- create address cards from emails with just a few clicks. In
- addition, searches and folders work in the same way they do in
- the rest of Evolution.
- </para>
- <para>
- This chapter will show you how to use the
- <application>Evolution</application> address book to organize
- any amount of contact information, share addresses over a
- network, and several ways to save time with everyday tasks. To
- learn about configuring the address book, see <xref
- linkend="config-prefs-contact">.
- </para>
- </abstract>
- <sect1 id="usage-contact-basic">
- <title>Getting Started With the Address Book</title>
-
- <para>
- To open up your address book, click on
- <guibutton>Contacts</guibutton> in the shortcut bar, or select
- one of your contacts folders from the folder bar. <xref
- linkend="usage-contact-fig"> shows the address book in all
- its organizational glory. By default, the address book
- shows all your cards in alphabetical order, in a <glossterm
- linkend="minicard">minicard</glossterm> format. You can select
- other views from the <guimenu>View</guimenu> menu, and adjust
- the width of the columns by clicking and dragging the grey
- column dividers.
- </para>
-
-
- <figure id="usage-contact-fig">
- <title>Evolution Address Book</title>
- <screenshot>
- <screeninfo>Evolution Address Book Window</screeninfo>
- <graphic fileref="fig/contact" format="png" srccredit="Aaron Weber">
- </graphic>
- </screenshot>
- </figure>
-
- <para>
- The toolbar for the address book is quite simple:
- <itemizedlist>
- <listitem><para>
- <guibutton>New</guibutton> creates a new card.
- </para></listitem>
-
- <listitem><para>
- <guibutton>Find</guibutton> brings up an in-depth search window.
- </para></listitem>
-
- <listitem><para>
- <guibutton>Print</guibutton> sends one or more of your cards to the printer.
- </para></listitem>
- <listitem><para>
- <guibutton>Delete</guibutton> deletes a selected card.
- </para></listitem>
-
- <listitem><para> <guibutton>View All</guibutton> displays all
- the address information in the folder. Use this button to
- refresh the display for a network folder, or to switch from
- viewing the results of a search and see the whole contents.
- </para></listitem>
-
- <listitem><para> <guibutton>Stop</guibutton> stops loading
- contact data from the network. This button is only
- relevant if you are looking at contact information on a
- network. </para></listitem>
- </itemizedlist>
- </para>
-
- <para>
- Your contact information fills the rest of the display. Move
- through the cards alphabetically with the buttons and the
- scrollbar at the right of the window. Of course, if you have
- more than a few people listed, you'll want some way of finding
- them more quickly, which is why there's a search feature.
- </para>
-
- <sect2 id="contact-search">
- <title>Searching for Contacts</title>
- <para>
- Between <guilabel>Delete</guilabel> and <guilabel>View
- All</guilabel> is a quick search field. To use it, select
- from the drop-down list which sort of search you'd like to
- perform (the whole card, just the name, or just the email
- address), then enter one or more words in the text entry
- box, and press <keycap>Enter</keycap>.
- <application>Evolution</application> will search through
- the contents of every displayed card to find one that
- matches. You can refine searches by doing several in
- succession, or start over by pressing the <guibutton>View
- All</guibutton> button.
- </para>
- <para>
- If there are no matches, the card display will be
- blank. When you'd like to see all the cards again, press
- <guilabel>Show All</guilabel>.
- </para>
- <example id="contact-quicksearch-ex">
- <title>Refining a Quick Search</title>
- <para>
- Tom comes back from lunch and finds a note on his
- keyboard: "Curtis in sales called for you, but he didn't
- leave a number, and I forgot to write down the name of the
- company he works for. He said it was important, though."
- Tom is not at all annoyed.
- </para>
- <para>
- He opens his contacts folder, and runs a quick search for
- "Curtis." There are eighteen different people with that name
- in the file. He then enters "Sales," and
- <application>Evolution</application> narrows it down to the
- right Curtis. He only becomes annoyed when he discovers that
- the call was not actually important.
- </para>
- </example>
-
- <para>
- If you prefer to perform a more complex search, press
- <guibutton>Find</guibutton> or choose
- <menuchoice><guimenu>Tools</guimenu><guimenuitem>Search for
- Contact</guimenuitem></menuchoice>. This will open the
- in-depth search window, which lets you use multiple search
- criteria in the same way that email filters and <glossterm
- linkend="vfolder">virtual folders</glossterm> do.. </para>
- <para>
- Click <guibutton>Add Criterion</guibutton> to increase the
- number of criteria you'd like to use in the search, and
- <guibutton>Remove Criterion</guibutton> to remove one from the
- bottom of the list. Your criteria may be a search within the
- <guilabel>Name</guilabel> or <guilabel>Email</guilabel>
- fields; alternately you can choose to search through all the
- fields with a regular expression. Then, you can select from
- all the familiar requirements like <guilabel>Begins
- With</guilabel> and <guilabel>Does Not Contain</guilabel>,
- decide whether to match <guilabel>All</guilabel> or
- <guilabel>Any</guilabel> of your criteria, and press
- <guibutton>Search</guibutton> to set it all off.
- </para>
-
- </sect2>
-
- </sect1>
- <sect1 id="usage-contact-cards">
- <title>Destroy, Create, and Change: The Contact Editor</title>
- <para>
- To delete a card, click on it once to select it, then press the
- <guibutton>Delete</guibutton> button. If you have multiple
- cards selected, you'll delete multiple cards.
- </para>
- <para>
- If you want to add or change cards, you'll use the contact
- editor. To change a card that already exists, double click on
- it to open the contact editor window with all the current
- information already filled in. If you want to create a new
- one, clicking the <guibutton>New</guibutton> button in the
- toolbar will open the same window, with blank entry boxes for
- you to fill in.
- </para>
-
- <para>
- The contact editor window has two tabs,
- <guilabel>General</guilabel>, for basic contact information,
- and <guilabel>Details</guilabel>, for a more specific
- description of the person. In addition, it contains a
- <guimenu>File</guimenu> menu, (see <xref
- linkend="menuref-contact-editor">) and a toolbar with three
- items: <guilabel>Save and Close</guilabel>,
- <guilabel>Print</guilabel>, and <guilabel>Delete</guilabel>.
- </para>
-
- <figure id="usage-contact-editor-fig">
- <title>Evolution Contact Editor</title>
- <screenshot>
- <screeninfo>Evolution Contact Editor</screeninfo>
- <graphic fileref="fig/contact-editor.png" format="png" srccredit="Aaron Weber">
- </graphic>
- </screenshot>
- </figure>
-
- <para> The <guilabel>General</guilabel> tab has seven sections,
- each with an icon: a face, for name and company; a telephone
- for phone numbers; an envelope for email address; a globe for
- web page address; a house for postal address; a file folder
- for contacts, and a briefcase for categories.
- </para>
- <para>
- <variablelist>
-
- <varlistentry>
- <term>Full Name</term>
- <listitem>
- <para>
- The <guilabel>Full Name</guilabel> field has two
- major features:
- <itemizedlist>
- <listitem>
- <para>
- You can enter a name into the <guibutton>Full
- Name</guibutton> field, but you can also click the
- <guibutton>Full Name</guibutton> button to bring
- up a small dialog box with a few text boxes
- <variablelist>
- <varlistentry>
- <term><guilabel>Title: </guilabel></term>
- <listitem> <para>
- Enter an honorific or select one from the menu.
- </para></listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>First: </guilabel></term>
- <listitem> <para>
- Enter the first, or given, name.
- </para></listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>Middle: </guilabel></term>
- <listitem> <para>
- Enter the middle name or initial, if any.
- </para></listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>Last: </guilabel></term>
- <listitem> <para>
- Enter the last name (surname).
- </para></listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>Suffix: </guilabel></term>
- <listitem> <para>
- Enter suffixes such as "Jr." or "III."
- </para></listitem>
- </varlistentry>
- </variablelist>
- </para>
- </listitem>
- <listitem>
- <para>
- The <guilabel>Full Name</guilabel> field also
- interacts with the <guilabel>File As</guilabel>
- box to help you organize your contacts.
- </para>
- <para>
- To see how it works, type a name in the
- <guilabel>Full Name</guilabel> field:
- <userinput>Rupert T. Monkey</userinput>. You'll
- notice that the <guilabel>File As</guilabel> field
- also fills up, but in reverse:
- <computeroutput>Monkey, Rupert</computeroutput>.
- You can pick <computeroutput>Rupert Monkey
- </computeroutput> from the drop-down, or type in
- your own, such as <userinput> T. Rupert Monkey
- </userinput>.
- </para>
- <tip>
- <title>Filing Suggestion</title>
-
- <para>
- Don't enter something entirely different from
- the actual name, since you might forget that
- you've filed Rupert's information under "F" for
- "Fictitious Ximian Employee."
- </para>
- </tip>
- </listitem>
- </itemizedlist>
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Multiple Values for Fields</term>
- <listitem>
- <para>
- If you click on the small arrow buttons next to the
- <guilabel>Primary Email</guilabel> field, you can also
- choose <guilabel>Email 2</guilabel> and
- <guilabel>Email 3</guilabel>. Although the contact
- editor will only display one of those at any given
- time, <application>Evolution</application> will
- store them all. The arrow buttons next to the
- telephone and postal address fields work in the same
- way.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- <para>
- The last item in the <guilabel>General</guilabel> tab is the
- <guilabel>Categories</guilabel> organization tool; for
- information on that, read <xref
- linkend="usage-contact-organize">.
- </para>
- <para>
- The <guilabel>Details</guilabel> tab is, fortunately, much more
- simple: three sections, all of which are more or less obvious:
- the briefcase next to the details about the contact's
- professional life; the face next to the details about their
- personal life; the globe next to a big blank space you can use
- for anything and everything else you'd like to note about them.
- If you ever wanted to have that uncanny knack for remembering
- obscure details like the date of someone's anniversary (perhaps
- your own) this is the way to develop it.
- </para>
-
-
-
-
-<!--- ############# This section isn't implemented yet either:
- <sect2>
- <title></title>
- <para>
- <tip>
- <title>Contact Shortcuts</title>
- <para>
- 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
- <guimenuitem>Create Card for this Address</guimenuitem> or
- <guimenuitem>Create Card for this Sender</guimenuitem>
- from the menu. While looking at a calendar appointment,
- right-click any email address, and choose
- <guimenuitem>Create Card for this Address</guimenuitem>.
- (NOTE that feature may change! unimplemented!)
- </para>
- </tip>
- </para>
- <para>
- You can move cards around just as you would move email
- messages: dragging and dropping works, as does right-clicking
- and choosing <guimenuitem>Move</guimenuitem> from the menu
- that appears.
- </para>
- </sect2>
-############### SHORTCUT SECTION COMMENTED OUT FOR NOW -->
-
- </sect1>
-
- <sect1 id="usage-contact-organize">
- <title>Organizing your Address Book</title>
- <para>
- Organizing your address book is a lot like organizing your
- mail. You can have folders and searches the same way you can
- with mail, but the address book does not allow vFolders. It
- does, however, allow each card to fall under several
- categories, and allow you to create your own categories. To
- learn about categories, read <xref
- linkend="usage-contact-organize-group-category">.
- </para>
-
-<!--
- <para>
- Another useful <application>Evolution</application> feature is
- its ability to recognize when people live or work together. If
- several people in your address book share an address, and you
- change the address for one of them,
- <application>Evolution</application> will ask you if you wish to
- change the address for all of them, or just for one.
- </para>
--->
-
- <sect2 id="usage-contact-organize-group">
- <title>Groups of contacts</title>
- <para>
- <application>Evolution</application> offers two ways for you
- to organize your cards. The first way is to use folders;
- this works the same way that mail folders do. For more
- flexibility, you can also mark contacts as members of
- different categories.
- </para>
-
- <sect3 id="usage-contact-organize-group-folder">
- <title>Grouping with Folders</title>
- <para>
- The simplest way to group address cards is to use folders.
- By default, cards start in the
- <guilabel>Contacts</guilabel> folder. If you've read <xref
- linkend="usage-mainwindow"> then you already know that you
- can create a new folder by selecting
- <menuchoice>
- <guimenu>File</guimenu>
- <guisubmenu>New</guisubmenu>
- <guimenuitem>Folder</guimenuitem>
- </menuchoice>
- and that you can put new folders anywhere you like. Just
- like with mail, cards must be in a card folder, and no card
- can be in two places at once. If you want more
- flexibility, try <xref
- linkend="usage-contact-organize-group-category">.
- </para>
- <para>
- To put a card into a folder, just drag it there from the
- folder view. Remember that contact cards can only go in
- contact folders, just like mail can only go in mail folders,
- and calendars in calendar folders.
- </para>
- </sect3>
-
- <sect3 id="usage-contact-organize-group-category">
- <title>Grouping with Categories</title>
- <para>
- 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.
- </para>
- <para>
- To mark a card as belonging to a category, click the
- <guibutton>Categories</guibutton> button at the lower
- right. From the dialog box that appears, you can check as
- many or as few categories as you like.
- </para>
- <para>
- Then, you can refer to all the cards in that category by:
- <!-- FIXME --> Waiting for Evolution to support the
- operation.
- </para>
-
- <!-- FIXME: Feature Not Implemented
- <para>
-
- If the master list of categories doesn't suit you, you can
- add your own. Just enter the new category's name in the
- text box, then click <guibutton>Categories</guibutton> and
- choose <guilabel>Add to Master List</guilabel> in the
- window that appears.
- </para>
- -->
-
- </sect3>
- </sect2>
- </sect1>
-
- <sect1 id="usage-contact-sharing">
- <title>Sharing your Cards</title>
- <para>
- If you keep your cards on a network using an <glossterm
- linkend="ldap">LDAP</glossterm> server, you can share access to
- them, browse other address books, or maintain a shared set of
- contact information for your company or your department. 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
- share calendars as well as address books, people can avoid
- duplicating work and keep up to date on developments within
- their work-group or across the entire company.
- </para>
-
- <example id="usage-contact-sharing-ex">
- <title>Sharing Address Cards and Calendar Data</title>
- <para>
- Ray wants to schedule a meeting with Company X, so he
- checks the network for the Company X address card so he
- knows whom to call there. Since his company also shares
- calendars, he then learns that his co-worker Deanna has
- already scheduled a meeting with Company X next Thursday.
- He can either go to the meeting himself or ask Deanna to
- discuss his concerns for him. Either way, he avoids
- scheduling an extra meeting with Company X.
- </para>
- </example>
- <para>
- Of course, you don't want to share all of your cards&mdash; why
- overload the network with a list of babysitters or tell
- everyone in the office you're talking to new job prospects? If
- you keep cards on your own computer, you can decide which items
- you want to make accessible to others.
- </para>
- <para>
- To learn how to add a remote directory to your available
- contact folders, see <xref linkend="config-prefs-contact">.
- Once you have a connection, the network contacts folder or
- folders will appear inside the <guilabel>External
- Directories</guilabel> folder in the folder bar. It will work
- exactly like a local folder of cards, with the following
- exceptions:
- <itemizedlist>
-
- <listitem>
- <para>
- Network folders are only available when you are
- connected to the network. If you use a laptop or have a
- modem connection, you may wish to copy or cache the
- network directory and then synchronize your copy with
- the networked version periodically. <!-- FIXME: HOW? -->
- </para>
- </listitem>
-
- <listitem>
- <para>
- To prevent excess network traffic,
- <application>Evolution</application> will not normally
- load the contents of LDAP folders immediately upon
- opening. You must click <guilabel>Display
- All</guilabel> before LDAP folder cards will be loaded
- from the network. You can change this behavior in the
- <interface>Contact Preferences</interface> window.
- </para>
- </listitem>
- <listitem>
- <para>
- Your ability to view, change, add, and delete contacts
- depends on the settings of the LDAP server.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </sect1>
-
- <sect1 id="usage-contact-automate">
- <title>Address Book Tools</title>
- <para>
- The address book works closely with
- <application>Evolution</application>'s mail and calendar tools.
- For example, you can use the address book to help you manage
- mailing lists, and send or recieve address cards over email.
- More tools are on the way, and when they arrive, <!-- FIXME -->
- they will be described in this section.
- </para>
-
- <sect2 id="contact-automation-basic">
- <title>Send me a Card: Adding New Cards Quickly</title>
- <para>
- As noted before, when you get information about a person 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 <guimenuitem>Add Address
- Card</guimenuitem> from the menu that appears. Of course,
- <application> Evolution</application> also adds cards from a
- hand-held device during HotSync operation. For more
- information about that, see <xref linkend="usage-sync">.
- </para>
- </sect2>
-
- <sect2 id="contact-automation-lists">
- <title>Managing a Mailing list</title>
- <para>
- You already know that when you are writing an email, you can
- address it to one or more people, and that
- <application>Evolution</application> will fill in addresses
- from your address book's address cards if you let it. In
- addition to that, you can send email to everyone in a
- particular group if you choose.
- </para>
-
-<!-- FIXME this feature not yet implemented
-
- <para>
- You can also use the address book to print postal addresses
- on mailing labels. Future versions of
- <application>Evolution</application> 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
- mailings.
- </para>
- -->
-
- </sect2>
-<!--- FIXME this feature not yet implemented
- <sect2 id="usage-contact-automation-extra">
- <title>Map It!</title>
- <para>
- Need a map or directions? Click
- <guibutton>MapIt</guibutton> from within the contact
- manager, and <application>Evolution</application> will
- map the address for you online.
- </para>
- </sect2>
--->
-
-
- </sect1>
-
-</chapter>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/doc/C/usage-exec-summary.sgml b/doc/C/usage-exec-summary.sgml
deleted file mode 100644
index 5ff67029d7..0000000000
--- a/doc/C/usage-exec-summary.sgml
+++ /dev/null
@@ -1,91 +0,0 @@
-<chapter id="usage-exec-summary">
- <title>The Executive Summary</title>
- <para>
- The Evolution Executive Summary is designed to show you a
- summary of important information: the appointments for a given
- day, important email, and so forth. To see your executive
- summary, click on the <guibutton>Executive Summary</guibutton>
- button in the shortcut bar, or select the
- <guilabel>executive-summary</guilabel> folder in the folder
- bar.
- </para>
-
- <sect1 id="exec-intro">
- <title>Introducing the Executive Summary</title>
- <para>
- The first thing you'll want to do with the executive summary
- is add a service. Click the <guibutton>Add Service</guibutton>
- button in the toolbar, then select one of the available
- services. Services may vary depending upon your system, but
- most installations will have at least the following options:
-
- <variablelist>
-
- <varlistentry>
- <term>Calendar</term>
- <listitem>
- <para>
- Pending appointments and other events.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Inbox</term>
- <listitem>
- <para>
- Information about your mail, such as the number of
- new messages you have waiting.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>To Do</term>
- <listitem>
- <para>
- A short summary of your task pad.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>RDF Summary</term>
- <listitem>
- <para>
- News headlines for any valid RDF file. The default
- is news about the GNOME project from <ulink
- url="www.gnome.org/gnome-news/">gnotices</ulink>.
- </para>
- </listitem>
- </varlistentry>
-
- </variablelist>
-
- </para>
-
- <para>
- Each service appears in a small box on the screen; you can
- remove the service by clicking the <guibutton>x</guibutton>
- button in the upper right, or bring up a settings dialog by
- clicking the little wrench icon below that.
- </para>
- </sect1>
- <sect1 id="exec-services-detail">
- <title>Services in Detail</title>
- <para>
- This section will show you how to use several
- <application>Evolution</application> services.
-
- </para>
-
- </sect1>
-
-</chapter>
-
-
-
-
-
-
-
diff --git a/doc/C/usage-mail.sgml b/doc/C/usage-mail.sgml
deleted file mode 100644
index 9ec12d9e5b..0000000000
--- a/doc/C/usage-mail.sgml
+++ /dev/null
@@ -1,1539 +0,0 @@
-<!--
-<!DOCTYPE Chapter PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.1//EN">
--->
-
-<chapter id="usage-mail">
- <title>Evolution Mail</title>
- <abstract>
- <title> An Overview of the Evolution Mailer</title>
- <para>
- <application>Evolution</application> email is like other email
- programs in all the ways you would hope:
- <itemizedlist>
- <listitem>
- <para>
- It can sort and organize your mail in a wide variety of ways with
- folders, searches, and filters.
- </para>
- </listitem>
- <listitem>
- <para>
- It can send and receive mail in HTML or as plain text, and
- permits multiple file attachments.
- </para>
- </listitem>
- <listitem>
- <para>
- It supports multiple mail sources, including <glossterm
- linkend="imap">IMAP</glossterm>, <glossterm
- linkend="pop">POP3</glossterm>, local
- <systemitem><filename>mbox</filename></systemitem> and
- <systemitem><filename>mh</filename></systemitem> files, and
- even NNTP messages (newsgroups), which aren't technically
- email.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- <para>
- However, <application>Evolution</application> has some important
- differences. First, it's built to handle very large amounts of
- mail without slowing down or crashing. Both the <link
- linkend="usage-mail-organize-filters">filtering</link> and <link
- linkend="usage-mail-organize-search">searching</link> functions
- were built for speed and efficiency on gargantuan volumes of
- mail. There's also the <application>Evolution</application>
- <link linkend="usage-mail-organize-vFolders">Virtual
- Folder</link>, 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 this feature especially useful.
- </para>
- </abstract>
-
- <sect1 id="usage-mail-getnsend">
- <title>Reading, Getting and Sending Mail</title>
-
- <sect2 id="usage-mail-getnsend-read">
- <title>Reading Mail</title>
- <para>
- You can start reading email by clicking
- <guibutton>Inbox</guibutton> in the shortcut bar. The first
- time you use <application>Evolution</application>, it will
- start with the <interface>Inbox</interface> open and show you a
- message from Ximian welcoming you to the application.
- </para>
- <para>
- Your <application>Evolution</application>
- <guilabel>Inbox</guilabel> will look something like the one in
- <xref linkend="usage-mail-intro-fig">. Just below the toolbar
- is the <interface>message list</interface>, showing message
- header information like <guilabel>Subject</guilabel> and
- <guilabel>Date</guilabel>. The message itself appears below
- that, in the <interface>view pane</interface>. If you find
- the <interface>view pane</interface> too small, you can resize
- the pane, enlarge the whole window, or double-click on the
- message in the <interface>message list</interface> to have it
- open in a new window. Just like with folders, you can
- right-click on messages in the message list and get a menu of
- possible actions.
- </para>
-
- <!-- ==============Figure=================================== -->
-
- <figure id="usage-mail-intro-fig">
- <title>Evolution Mail</title>
- <screenshot>
- <screeninfo>Inbox</screeninfo>
- <graphic fileref="fig/mail-pic" format="png" srccredit="Aaron Weber">
- </graphic>
- </screenshot>
- </figure>
-<!-- ==============End of Figure============================== -->
-
- <para>
- Most of the mail-related actions you'll want to perform are
- listed in the <guimenu>Message</guimenu> menu in the menu
- bar. The most frequently used ones, like
- <guimenuitem>Reply</guimenuitem> and
- <guimenuitem>Forward</guimenuitem>, also appear as buttons in
- the toolbar, and almost all of them are duplicated in the
- right-click menu and as keyboard shortcuts, which tend to be
- faster once you get the hang of them. You can choose
- whichever way you like best; the idea is that the software
- should work the way you want, rather than making you work the
- way the it does.
- <tip id="view-headers">
- <title>Take a look at the headers</title>
- <para>
- To look at the entire source of your email message, including
- all the header information, select
- <menuchoice><guimenu>View</guimenu><guimenuitem>Source</guimenuitem></menuchoice>
- </para>
- </tip>
- </para>
-
- <sect3 id="usage-mail-listorder">
- <title>Sorting the message list</title>
- <para>
- One of the ways <application>Evolution</application> lets
- you choose the way you work is the way it lets you sort your
- message lists. To sort by sender, subject, or date, click
- on the bars with those labels at the top of the message
- list. The direction of the arrow next to the label indicates
- the direction of the sort, and if you click again, you'll
- sort them in reverse order. For example, click once on
- <guilabel>Date</guilabel> to sort messages by date from
- oldest to newest. Click again, and
- <application>Evolution</application> sorts the list from
- newest to oldest. You can also right-click on the message
- header bars to get a set of sorting options, and add or
- remove columns from the message list. You can find detailed
- instructions on how to customize your message display
- columns in <xref linkend="usage-mail-organize-columns">.
- </para>
- <para>
- You can also choose a threaded message view. Select
- <menuchoice> <guimenu>View</guimenu>
- <guimenuitem>Threaded</guimenuitem> </menuchoice> to turn
- the threaded view on or off. When you select this option,
- <application>Evolution</application> groups the replies to a
- message with the original, so you can follow the thread of a
- conversation from one message to the next.
- </para>
- </sect3>
- <sect3 id="usage-mail-getnsend-delete">
- <title>Deleting Mail</title>
- <para>
- Once you've read your mail, you may want to get rid of
- it. To mark a message for deletion, select it in the the
- <interface>message list</interface> by clicking on it once.
- Then click on the <guibutton>Delete</guibutton> button in
- the tool bar. Or, right-click on a message and choose
- <guimenuitem>Delete</guimenuitem> from the right-click
- menu. The message will appear with a line through it, to
- show that you've marked it for deletion.
- </para>
- <para>
- If you change your mind and decide you want to keep it,
- select <menuchoice> <guimenu>Message</guimenu>
- <guimenuitem>Undelete</guimenuitem></menuchoice>. If you
- really want to get rid of it, choose
- <guimenuitem>Expunge</guimenuitem> from the
- <guimenu>Folder</guimenu> menu. That will delete it
- permanently.
- </para>
- </sect3>
- </sect2>
-
- <sect2 id="usage-mail-getnsend-get">
- <title>Checking Mail</title>
- <para>
- Now that you've had a look around the
- <interface>Inbox</interface>, it's time to check for new mail.
- Click <guibutton>Get mail</guibutton> in the toolbar to check
- your mail. If it's the first time you've done so, the
- <interface>mail setup assistant</interface> will ask you for
- the information it needs to check your mail (see <xref
- linkend="config-setupassist"> for more information).
- </para>
- <para>
- Then, you need to enter your email
- password. <application>Evolution</application> will remember
- your password until until you select <menuchoice>
- <guimenu>Settings</guimenu> <guimenuitem>Forget
- Passwords</guimenuitem> </menuchoice>.
- </para>
- <para>
- Once it's validated the password,
- <application>Evolution</application> will check your mail.
- New mail will appear in the local <interface>Inbox</interface>
- if you're using a <glossterm>POP</glossterm> account, and in
- your <glossterm>IMAP</glossterm> folders if you use IMAP. If
- you have chosen to use IMAP, and you have multiple folders on
- your IMAP server, you may need to subscribe to them. To learn
- how to use the subscription manager, read <xref
- linkend="usage-mail-subscriptions">.
- </para>
-
- <note id="badmailsettings">
- <title>Can't Check Mail?</title>
- <para>
- If you get an error message instead of mail, you probably need
- to change your network settings. To learn how to do that,
- have a look at <xref linkend="config-prefs-mail-network">, or
- ask your system administrator.
- </para>
- </note>
-
- <sect3 id="usage-mail-getnsend-get-news">
- <title>Using Evolution for News </title>
- <para>
- Newsgroups are so similar to email that there's no reason not
- to read them side by side. If you want to do that, add a
- news source to your configuration (see <xref
- linkend="config-prefs-network-news">). The news server will
- appear as a remote server, and will look quite similar to an
- IMAP folder. When you click <guibutton>Get Mail</guibutton>,
- <application>Evolution</application> will also check for news
- messages.
- </para>
- </sect3>
-
- <sect3 id="usage-mail-getnsend-get-attach">
- <title>Attachments and HTML Mail</title>
- <para>
- If someone sends you an <glossterm>attachment</glossterm>, a
- file attached to an email,
- <application>Evolution</application> will display the file
- at the bottom of the message to which it's attached. Text,
- HTML, and most images will be displayed within the message
- itself. For other files,
- <application>Evolution</application> will show an icon at
- the end of the message. Right-click on the icon to get a
- list of options which will vary depending on the type of
- attachment. You will have the option to display most files
- as part of the message, export them to a different
- application (images to Eye of GNOME, spreadsheets to
- Gnumeric, and so forth), or save them to disk.
- </para>
-
- <para>
- <application>Evolution</application> can also display
- HTML-formatted mail, complete with graphics. HTML
- formatting will display automatically, although you can
- turn it off if you prefer.
- </para>
- </sect3>
- </sect2>
-
- <sect2 id="usage-mail-getnsend-send">
- <title>Writing and Sending Mail</title>
- <para>
- You can start writing a new email message by selecting
- <menuchoice> <guimenu>File</guimenu>
- <guisubmenu>New</guisubmenu> <guimenuitem>
- Mail Message</guimenuitem></menuchoice>, or by pressing the
- <guibutton>Compose</guibutton> button in the Inbox toolbar.
- When you do so, the <interface>New Message</interface> window
- will open, as shown in <xref
- linkend="usage-mail-newmsg-fig">.
- </para>
-
-<!-- ==============Figure=================================== -->
- <figure id="usage-mail-newmsg-fig">
- <title>New Message Window</title>
- <screenshot>
- <screeninfo>Evolution Main Window</screeninfo>
- <graphic fileref="fig/newmsg-pic" format="png" srccredit="Kevin Breit">
- </graphic>
- </screenshot>
- </figure>
-<!-- ==============End of Figure=================================== -->
-
- <!-- Check the alignment of the following paragraph in the PS and
- HTML output: it's indented for no good reason -->
- <para>
- Enter an address in the <guilabel>To:</guilabel> field, a
- subject in the <guilabel>Subject:</guilabel> and a message in
- the big empty box at the bottom of the window, and press
- <guibutton>Send</guibutton>.
- </para>
-
- <sect3 id="usage-mail-getnsend-send-delay">
- <title>Saving Messages for Later</title>
- <para>
- Evolution will send mail immediately unless you tell it to
- do otherwise by selecting <menuchoice>
- <guimenu>File</guimenu> <guimenuitem>Send
- Later</guimenuitem></menuchoice>. This will add your
- messages to the <guilabel>Outbox</guilabel> queue. Then,
- when you press <guibutton>Send</guibutton> in another
- message, or <guibutton>Get Mail</guibutton> in the main
- mail window, 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.
- </para>
- <para>
- To learn more about how you can specify message queue and
- filter behavior, see <xref linkend="config-prefs-mail">.
- </para>
-
- <para>
- You can also choose to save messages as drafts or as text
- files. Choose
- <menuchoice>
- <guimenu>File</guimenu>
- <guimenuitem>Save</guimenuitem>
- </menuchoice>
- or <guimenuitem>Save As</guimenuitem> to save your message
- as a text file. If you prefer to keep your message in a
- folder (the <guilabel>Drafts</guilabel> folder would be the
- obvious place), you can select <menuchoice>
- <guimenu>File</guimenu> <guimenuitem>Save In
- Folder</guimenuitem> </menuchoice>.
- </para>
- </sect3>
- <sect3 id="usage-mail-getnsend-send-compose">
- <title>Advanced Mail Composition</title>
- <para>
- You can probably guess the purpose of the buttons labelled
- <guibutton>Cut</guibutton>, <guibutton>Copy</guibutton>,
- <guibutton>Paste</guibutton>, <guibutton>Undo</guibutton>
- and <guibutton>Redo</guibutton>, but there's a bit more to
- sending mail that's less obvious. In the next few sections,
- you'll see how <application>Evolution</application> handles
- additional features, including large recipient lists,
- attachments, and forwarding.
- </para>
- <sect4 id="usage-mail-getnsend-send-attach">
- <title>Attachments</title>
- <para>
- If you want to attach a file to your email message, you
- can drag it from your desktop into the message window, or
- click the button in the toolbar with a paper clip on it,
- labelled <guibutton>Attach</guibutton>. If you click the
- <guibutton>Attach</guibutton> button,
- <application>Evolution</application> will open a file
- selection dialog box to ask you which file you want to
- send. Select the file and click <guilabel>OK</guilabel>.
- </para>
- <para>
- To hide the display of files you've attached to the
- message, select <menuchoice>
- <guimenu>View</guimenu> <guimenuitem>Hide
- Attachments</guimenuitem> </menuchoice>; to show them
- again, choose <guimenuitem>Show Attachments</guimenuitem>.
- </para>
- <para>
- When you send the message, a copy of the attached file
- will go with it. Be aware that big attachments can take a
- long time to download.
- </para>
- </sect4>
- <sect4 id="usage-mail-getnsend-send-to-types">
- <title>Types of Recipients</title>
- <para>
- <application>Evolution</application>, like most email
- programs recognizes three types of addressee: primary
- recipients, secondary recipients, and hidden ("blind")
- recipients.
- </para>
- <para>
- The simplest way to direct a message is to put the email
- address or addresses in the <guilabel>To:</guilabel>
- field, which denotes primary recipients. To send mail to
- more than one or two people, you can use the the
- <guilabel>Cc:</guilabel> field.
- </para>
- <para>
- 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.
- <example id="ex-mail-cc">
- <title>Using the Cc: field</title>
- <para>
- When Susan sends an email to a client, she puts her
- co-worker, Tim, in the in the
- <guilabel>Cc:</guilabel> field, so that he know
- what's going on. The client can see that Tim also
- received the message, and knows that he can talk to
- Tim about the message as well.
- </para>
- </example>
- </para>
- <para>
- 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
- <guilabel>Bcc:</guilabel>. "Bcc" stands for "Blind Carbon
- Copy", and it sends messages discreetly. In other words,
- the people in the <guilabel>Bcc:</guilabel> field get the
- message, but nobody sees that they got it. Note that the
- contents of the <guilabel>To:</guilabel> and
- <guilabel>Cc:</guilabel> fields are visible to all
- recipients, even to people on the
- <guilabel>Bcc:</guilabel> list.
-
- <example id="ex-mail-bcc">
- <title>Using the Bcc: field</title>
- <para>
- Tim is sending an email announcement to all of his
- company's clients, some of whom are in competition
- with each other, and all of whom value their
- privacy. He needs to use the
- <guilabel>Bcc:</guilabel> field here. If he puts
- every address from his address book's "Clients"
- category into the <guilabel>To:</guilabel> or
- <guilabel>Cc:</guilabel> fields, he'll make the
- company's <emphasis>entire</emphasis> client list
- public. It seems like a small difference, but it can
- make a huge difference in some situations.
- </para>
- </example>
- </para>
- </sect4>
-
- <sect4 id="usage-mail-getnsend-send-to">
- <title>Choosing Recipients Quickly</title>
- <para>
- If you have created address cards in the contact manager,
- you can also enter nicknames or other portions of address
- data, and <application>Evolution</application> 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.
- <!-- (NOT YET) Also, <application>Evolution</application>
- will add a domain to any unqualified addresses. By default,
- this is your domain, but you can choose which one mail
- preferences dialog. -->
- </para>
- <para>
- Alternately, you can click on the
- <guibutton>To:</guibutton>, <guibutton>Cc:</guibutton>, or
- <guibutton>Bcc:</guibutton> buttons to get a list &mdash;
- potentially a very long one &mdash; of the email addresses
- in your contact manager. Select addresses and click on
- the arrows to move them into the appropriate address
- columns.
- </para>
- <para>
- For more information about using email together with the
- contact manager and the calendar, see <xref
- linkend="usage-contact-automate"> and <xref
- linkend="usage-calendar-apts">.
- </para>
- </sect4>
- </sect3>
-
- <sect3 id="usage-mail-getnsend-send-reply">
- <title>Replying to Messages</title>
- <para>
- To reply to a message, press the
- <guibutton>Reply</guibutton> button while it is selected,
- or choose <guimenuitem>Reply to Sender</guimenuitem> from
- the message's right-click menu. That will open the
- <interface>message composer</interface>. The
- <guilabel>To:</guilabel> and <guilabel>Subject</guilabel>
- fields will already be filled, although you can alter them
- if you wish. In addition, the full text of the old message
- is inserted into the new message, either in italics (for
- HTML display) or with the &gt; character before each line
- (in plain text mode), to indicate that it's part of the
- previous message. People often intersperse their message
- with the quoted material as shown in <xref
- linkend="usage-mail-getnsend-reply-fig">.
-
-<!-- note that this figure should have a reply message ready to send,
-with quoted materials and the relevant replies interspersed-->
- <!-- ==============Figure=================================== -->
- <figure id="usage-mail-getnsend-reply-fig">
- <title>Reply Message Window</title>
- <screenshot>
- <screeninfo>Evolution Main Window</screeninfo>
- <graphic fileref="fig/replymsg" format="png" srccredit="Aaron Weber">
- </graphic>
- </screenshot>
- </figure>
-<!-- ==============End of Figure=================================== -->
- </para>
-
- <para>
- If you're reading a message with several recipients, you may
- wish to use <guibutton>Reply to All</guibutton> instead of
- <guibutton>Reply</guibutton>. If there are large numbers
- of people in the <guilabel>Cc:</guilabel> or
- <guilabel>To:</guilabel> fields, this can save substantial
- amounts of time.
- <example>
- <title>Using the Reply to All feature</title>
- <para>
- Susan sends an email to a client and sends copies to Tim
- and to an internal company mailing list of co-workers.
- If Tim wants to make a comment for all of them to read,
- he uses <guibutton>Reply to All</guibutton>, but if he
- just wants to tell Susan that he agrees with her, he
- uses <guibutton>Reply</guibutton>. Note that his reply
- will not reach anyone that Susan put on her
- <guilabel>Bcc</guilabel> list, since that list is not
- shared with anyone.
- </para>
- </example>
- </para>
- </sect3>
- <sect3 id="usage-mail-getnsend-send-find">
- <title>Searching and Replacing with the Composer</title>
- <para>
- You're probably familiar with search and replace features,
- and if you come from a Linux or Unix background, you
- probably know what <guimenuitem>Find Regex</guimenuitem>
- does. If you aren't among the lucky who already know,
- here's a quick rundown of an important section of the
- <guimenu>Edit</guimenu> menu.
- </para>
- <para>
- <variablelist>
- <varlistentry>
- <term><guimenuitem>Find</guimenuitem></term>
- <listitem><para> Enter a word or phrase, and
- <application>Evolution</application> will find it
- in your message.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Find Regex</guimenuitem></term>
- <listitem>
- <para>
- Find a regex, also called a
- <glossterm linkend="regular-expression">regular
- expression</glossterm>, in your composer window.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Find Again</guimenuitem></term>
- <listitem><para>
- Select this item to repeat the last search you performed.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Replace</guimenuitem></term>
- <listitem><para>
- Find a word or phrase, and replace it with
- something else.
- </para></listitem>
- </varlistentry>
-
- </variablelist>
- </para>
- <para>
- For all of these menu items, you can choose whether or not
- to <guilabel>Search Backwards</guilabel> in the document
- from the point where your cursor is. For all but the
- regular expression search (which doesn't need it), you are
- offered a check box to determine whether the search is to
- be <guilabel>Case Sensitive</guilabel> when it determines
- a match.
- </para>
- </sect3>
- <sect3 id="usage-mail-getnsend-send-html">
- <title>Embellish your email with HTML</title>
- <para>
- Normally, you can't set text styles or insert pictures in
- emails, which is why you've probably seen people use far
- too many exclamation points for emphasis, or use
- <glossterm linkend="emoticon">emoticons</glossterm> to
- convey their feelings. However, most newer email programs
- can display images and text styles as well as basic
- alignment and paragraph formatting. They do this with
- <glossterm linkend="html">HTML</glossterm>, just like web
- pages do.
- </para>
- <note>
- <title>HTML Mail is not a Default Setting</title>
- <para>
- 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. <emphasis>Some</emphasis>
- people refer to HTML mail as "the root of all evil" and
- get very angry if you send them HTML mail, which is why
- <application>Evolution</application> sends plain text
- unless you explicitly ask for HTML. To send HTML mail,
- you will need to select <menuchoice>
- <guimenu>Format</guimenu> <guimenuitem>
- HTML</guimenuitem></menuchoice>. Alternately, you can set
- your default mail format preferences in the mail
- configuration dialog. See <xref
- linkend="config-prefs-mail-other"> for more information.
- </para>
- </note>
- <para>
- HTML formatting tools are located in the toolbar just above
- the space where you'll actually compose the message, and
- they also appear in the <guimenu>Insert</guimenu> and
- <guimenu>Format</guimenu> menus.
- </para>
- <para>
- The icons in the toolbar are explained in <glossterm
- linkend="tooltip">tool-tips</glossterm>, which appear when
- you hold your mouse over the buttons. The buttons fall
- into four categories:
- <variablelist>
- <varlistentry>
- <term>Headers and lists</term>
- <listitem>
- <para>
- At the left edge of the toolbar, you can choose
- <guilabel>Normal</guilabel> for a default text style
- or <guilabel>Header 1</guilabel> through
- <guilabel>Header 6</guilabel> for varying sizes of
- header from large (1) to tiny (6). Other styles
- include <guilabel>pre</guilabel>, to use the HTML
- tag for preformatted blocks of text, and three types
- of <guilabel>List Item</guilabel> for the highly
- organized.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Text style</term>
- <listitem>
- <para>
- Use these buttons to determine the way your letters
- look. If you have text selected, the style will
- apply to the selected text. If you do not have text
- selected, the style will apply to whatever you type
- next. The buttons are:
- <itemizedlist mark="none">
- <listitem><para>Push <guibutton>B</guibutton> for bold text</para></listitem>
- <listitem><para>Push <guibutton>I</guibutton> for italics</para></listitem>
- <listitem><para>Push <guibutton>U</guibutton> to underline</para></listitem>
- <listitem><para>Push <guibutton>S</guibutton> for a strikethrough.</para></listitem>
- </itemizedlist>
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Alignment</term>
- <listitem>
- <para>
- Located next to the text style buttons, these three
- paragraph icons should be familiar to users of most
- word processing software. The leftmost button will
- make your text aligned to the left, the center
- button, centered, and the right hand button,
- aligned on the right side.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Indentation rules</term>
- <listitem>
- <para>
- The button with the arrow pointing left will reduce
- a paragraph's indentation, and the right arrow will
- increase its indentation.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Color Selection</term>
- <listitem>
- <para>
- At the far right is the color section tool. The
- colored box displays the current text color; to
- choose a new one, click the arrow button just to the
- right. If you have text selected, the color will
- apply to the selected text. If you do not have text
- selected, the color will apply to whatever you type
- next.
- </para>
- </listitem>
- </varlistentry>
-
-
- </variablelist>
- </para>
- <para>
- There are three tools that you can find only in the
- <guimenu>Insert</guimenu> menu.
- <variablelist>
- <varlistentry>
- <term><guimenuitem>Insert Link</guimenuitem>:</term>
- <listitem>
- <para>
- Use this tool to put hyperlinks in your HTML
- messages. When you select it,
- <application>Evolution</application> will prompt you
- for the <guilabel>Text</guilabel> that will appear,
- and the <guilabel>Link</guilabel>, where you should
- enter the actual web address (URL). If you don't
- want special link text, you can just enter the address
- directly, and <application>Evolution</application>
- will recognize it as a link.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term> <guimenuitem>Insert Image</guimenuitem>:</term>
- <listitem>
- <para>
- Select this item to embed an image into your email, as
- was done in the welcome message. Images will appear at
- the location of the cursor. This is different from
- attaching them to a message, but not very different.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><guimenuitem>Insert Rule</guimenuitem>:</term>
- <listitem><para>
- This will insert a horizontal line, or rule, into your document.
- You'll be presented with a dialog box which gives you
- the choice of size, percentage of screen, shading, and
- alignment; if you leave everything at the default
- values you'll get a thin black rule all the way across
- the screen.</para></listitem>
- </varlistentry>
-
- </variablelist>
- </para>
- <note>
- <title>A Technical note on HTML Tags</title>
- <para>
- The composer is a WYSIWYG (What You See Is What You Get)
- editor for HTML. That means that if you enter HTML
- directly into the composer&mdash; say, <markup
- role="html">&lt;B&gt;Bold Text&lt;/B&gt</markup>, the
- the composer will assume you meant exactly that string
- of characters, and not "make this text bold," as an HTML
- composition tool or text editor would.
- </para>
- </note>
- </sect3>
-
-
-<!-- Function not implemented,
-possibly never will be due to security evil. -->
-<!--
- <sect3 id="usage-mail-getnsend-send-live">
- <title>Live Documents</title>
- <para>
- Later versions of <application>Evolution</application>
- will allow you to enliven your email with almost any
- sort of document, and even with entire
- applications. At this point, however, this feature has not
- yet been implemented.
- </para>
- </sect3>
--->
-
- <sect3 id="usage-mail-getnsend-fwd">
- <title>Forwarding Mail</title>
- <para>
- The post office forwards your mail for you when you change
- addresses, and you can forward mail when you get a letter by
- mistake. The email <guilabel>Forward</guilabel> button
- works in much the same way. It's particularly useful if you
- have received a message and you think someone else would
- like to see it. You can forward a message as an attachment
- to a new message (this is the default) or
- you can send it <glossterm linkend="inline">inline</glossterm> as a quoted
- portion of the message you are sending. Attachment
- forwarding is best if you want to send the full, unaltered
- message on to someone else. 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.
- </para>
- <para>
- To forward a message you are reading, press
- <guibutton>Forward</guibutton> on the toolbar, or select
- <menuchoice> <guimenu>Message</guimenu>
- <guimenuitem>Forward</guimenuitem> </menuchoice>. If you
- prefer to forward the message <glossterm linkend="inline">inline</glossterm>
- instead of attached, select <menuchoice>
- <guimenu>Message</guimenu> <guimenuitem>Forward
- Inline</guimenuitem> </menuchoice> from the menu. 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
- <interface>composition frame</interface>, and press
- <guibutton>Send</guibutton>.
- </para>
- </sect3>
- <sect3 id="usage-mail-getnsend-ettiquette">
- <title>Seven Tips for Email Courtesy</title>
- <para>
- I started with ten, but four were "Don't send
- <glossterm linkend="spam">spam</glossterm>."
- <itemizedlist>
-
- <listitem>
- <para>
- Don't send spam or forward chain mail. If you must,
- watch out for hoaxes and urban legends, and make sure
- the message doesn't have multiple layers of
- greater-than signs, (&gt;) indicating multiple layers
- of careless in-line forwarding.
- </para>
- </listitem>
-
- <listitem>
- <para>
- 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!
- </para>
- </listitem>
-
- <listitem>
- <para>
- ALL CAPS MEANS YOU'RE SHOUTING! Don't write a whole
- message in capital letters. It hurts people's ears.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Never write anything in email you wouldn't say in
- public. Old messages have a nasty habit of
- resurfacing when you least expect.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Check your spelling and use complete sentences.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Don't send nasty emails (flames). If you get one,
- don't write back.
- </para>
- </listitem>
-
- <listitem>
- <para>
- When you reply or forward, include just enough of
- the previous message to provide context: not too
- much, not too little.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- <para> Happy mailing! </para>
- </sect3>
- </sect2>
- </sect1>
-
- <sect1 id="usage-mail-organize">
- <title>Organizing Your Mail</title>
- <para>
- 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 <emphasis>need</emphasis> to sort and organize them.
- Fortunately, <application>Evolution</application> has the tools
- to help you do it.
- </para>
- <sect2 id="usage-mail-organize-columns">
- <title>Sorting Mail with Column Headers</title>
- <para>
- By default, the message list has columns with the following
- headings: an envelope icon indicating whether you have read
- or replied to a message (closed for unread, open for read,
- and open with an arrow on it to indicate you've sent a
- reply), an exclamation point indicating priority, and the
- <guilabel>From</guilabel>, <guilabel>Subject</guilabel>, and
- <guilabel>Date</guilabel> fields. You can change their order
- and remove them by dragging and dropping them. You can add
- new ones with the <guimenuitem>Field Chooser</guimenuitem>
- item in the right click menu for the column headings.
- </para>
- <para>
- Right-click on one of the column headers to get a list of
- options:
- <variablelist>
-
- <varlistentry>
- <term><guimenuitem>Sort Ascending</guimenuitem>,
- <guimenuitem>Sort Descending</guimenuitem>, and
- <guimenuitem>Unsort</guimenuitem></term>
- <listitem><para>Which should be pretty obvious. You
- can also set these sorts by just clicking on the
- column headers.</para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Group By this Field</guimenuitem></term>
- <listitem><para>
- Groups messages instead of sorting them. (FIXME: Explain further)
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Remove this
- Column</guimenuitem></term> <listitem><para> Remove
- this column from the display. You can also remove
- columns by dragging the header off the list and
- letting it drop. </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Field
- Chooser</guimenuitem></term> <listitem><para> A list
- of column headers; just drag and drop them into
- place between two existing headers. A red arrow will
- appear to show you where you're about to put the
- column. </para></listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect2>
-
- <sect2 id="usage-mail-organize-folders">
- <title>Getting Organized with Folders</title>
- <para>
- <application>Evolution</application> keeps mail, as well as
- address cards and calendars, in folders. You start out with a
- few, like <guilabel>Inbox</guilabel>,
- <guilabel>Outbox</guilabel>, and <guilabel>Drafts</guilabel>,
- but you can create as many as you like. Create new folders by
- selecting <guisubmenu>New</guisubmenu> and then
- <guimenuitem>Folder</guimenuitem> from the
- <guimenu>File</guimenu> menu.
- <application>Evolution</application> will as you for the name
- and the type of the folder, and will provide you with a folder
- tree so you can pick where it goes.
- </para>
- <para>
- When you click <guibutton>OK</guibutton>, your new folder will
- appear in the <interface>folder view</interface>. You can
- then put messages in it by dragging and dropping them, or by
- using the <guibutton>Move</guibutton> button in the
- toolbar. If you want to move several messages at once, click
- on the ones you want to move while holding down the
- <keycap>CTRL</keycap> key, or use <keycap>Shift</keycap> to
- select a range of messages. If you create a filter with the
- <interface>filter assistant</interface>, you can have mail
- moved to your folder automatically.
- </para>
- </sect2>
-
- <sect2 id="usage-mail-organize-search">
- <title>Searching for Messages</title>
- <para>
- Most mail clients can search through your messages for you,
- but <application>Evolution</application> does it faster. You
- can search through just the message subjects, just the message
- body, or both body and subject.
- </para>
- <para>
- To start searching, enter a word or phrase in the text area
- right below the toolbar, and choose a search type:
- <variablelist>
- <varlistentry>
- <term><guilabel>Body or subject contains:</guilabel></term>
- <listitem>
- <para>
- This will search message subjects and the messages
- themselves for the word or phrase you've entered in
- the search field.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term> <guilabel>Body contains:</guilabel> </term>
- <listitem>
- <para>
- This will search only in message text, not the subject
- lines.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>Subject contains:</guilabel></term>
- <listitem>
- <para>
- This will show you messages where the search text is
- in the subject line. It will not search in the
- message body.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>Body does not contain:</guilabel></term>
- <listitem>
- <para>
- 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.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>Subject does not contain:</guilabel></term>
- <listitem>
- <para>
- This finds every mail whose subject does not contain
- the search text.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
-
- When you've entered your search phrase, press
- <keycap>Enter</keycap>. <application>Evolution</application>
- will show your search results in the message list.
- </para>
-
- <para>
- If you think you'll want to return to a search again, you can
- save it as a virtual folder by selecting <guilabel>Store
- Search as Virtual Folder</guilabel>.
- </para>
-
- <para>
- When you're done with the search, go back to seeing all your
- messages by choosing <guimenuitem>Show All</guimenuitem> from
- the <guilabel>Search</guilabel> drop-down box. If you're
- sneaky, just enter a blank search: since every message has at
- least one space in it, you'll see every message in the
- folder.
- </para>
-
- <para>
- If you'd like to perform a more complex search, open the
- advanced search dialog by selecting
- <guilabel>Advanced...</guilabel> from the
- <guilabel>Search</guilabel> drop-down menu. Then, create your
- search criteria (each with the same options you saw in the
- regular search bar), and decide whether you want to find
- messages that match all of them, or messages that match even
- one. Then, click <guibutton>Search</guibutton> to go and find
- those messages.
- </para>
-
- <para>
- You'll see a similar approach to sorting messages when you
- create filters and virtual folders in the next few sections.
- </para>
-
- </sect2>
-
- <sect2 id="usage-mail-organize-filters">
- <title>Staying organized: Mail Filters in Evolution</title>
- <para>
- I once worked in the mail room of a large company, where my
- job was to bundle, sort, and distribute mail to the various
- mail boxes and desks throughout the building. Filters do that
- same job with email, but they lose much less mail than I did.
- In addition, you can have multiple filters performing multiple
- actions that may effect the same message in several ways. For
- example, your filters could put copies of one message into
- multiple folders, or keep a copy and send one to another
- person as well, and it can do that in under a second. Which is
- to say, it's faster and more flexible than an actual person
- with a pile of envelopes.
- </para>
- <para>
- Most often, you'll want to have
- <application>Evolution</application> put mail into different
- folders, but you can have it do almost anything you like.
- People who get lots of mail, or who often need to refer to old
- messages, find filters especially helpful, but they're good
- for anybody who gets more than a few messages a day. To
- create a filter, open the <interface>filter
- assistant</interface> by selecting
- <menuchoice>
- <guimenu>Settings</guimenu>
- <guimenuitem>Mail Filters</guimenuitem>
- </menuchoice>.
- </para>
-
- <figure id="usage-mail-filters-fig-assist">
- <title>The Filter Assistant</title>
- <screenshot>
- <screeninfo>The Filter Assistant</screeninfo>
- <graphic fileref="fig/filter-assist-fig" format="png" srccredit="Aaron Weber">
- </graphic>
- </screenshot>
- </figure>
-
- <para>
- The <interface>filter assistant</interface> window contains a
- list of your current filters, sorted by the order in which
- they are used. From the drop-down box at the top of the
- window, choose <guilabel>Incoming</guilabel> to display
- filters for incoming mail, and <guilabel>Outgoing</guilabel>
- for those which sort only outgoing mail.
- </para>
- <para>
- The <interface>filter assistant</interface> also has a set of
- buttons:
- <itemizedlist>
-
- <listitem><para>
- <guibutton>Add</guibutton> &mdash; Create a new filter.
- </para></listitem>
-
- <listitem><para>
- <guibutton>Edit</guibutton> &mdash; Edit an existing filter.
- </para></listitem>
-
- <listitem><para>
- <guibutton>Delete</guibutton> &mdash; Delete the selected filter.
- </para></listitem>
-
- <listitem><para> <guibutton>Up</guibutton> &mdash; Move the
- selected filter up in the list so it gets applied first.
- </para></listitem>
-
- <listitem><para>
- <guibutton>Down</guibutton> &mdash; Move the selected filter down
- in the list, so it comes into play later.
- </para></listitem>
- </itemizedlist>
-
- If you don't have any filters set up, the only one of those
- buttons you can click is <guibutton>Add</guibutton>, which
- will open a dialog to let you add a filter rule. If you do
- have filters, you can either add a new filter rule, or select
- one from your list and click <guibutton>Edit</guibutton>.
- </para>
- <para>
- The filter rule editor, shown in <xref
- linkend="usage-mail-filters-fig-new">, is where you'll
- actually create your filtering rule.
-
- <figure id="usage-mail-filters-fig-new">
- <title>Creating a new Filter</title>
- <screenshot>
- <screeninfo>Creating a new Filter</screeninfo>
- <graphic fileref="fig/filter-new-fig" format="png" srccredit="Aaron Weber">
- </graphic>
- </screenshot>
- </figure>
- </para>
- <para>
- Enter a name for your filter in the <guilabel>Rule
- Name</guilabel> field, and then begin choosing the criteria
- you'd like to use as you sort your mail. Choose how many
- criteria you'd like by pressing <guibutton>Add
- Criterion</guibutton> and <guibutton>Remove
- Criterion</guibutton>. If you have multiple criteria, you
- should then decide whether to have the filter do its job only
- <guilabel>if all criteria are met</guilabel>, or <guilabel>if
- any criteria are met</guilabel>.
- </para>
- <para>
- For each filter criterion, you must first select what
- part of the message you want the filter to examine:
- <variablelist>
- <varlistentry>
- <term><guilabel>Sender</guilabel></term>
- <listitem><para>
- The sender's address.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guilabel>Recipients</guilabel></term>
- <listitem><para>
- The recipients of the message.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guilabel>Subject</guilabel></term>
- <listitem><para>
- The subject line of the message.
- </para></listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term><guilabel>Specific Header</guilabel></term>
- <listitem><para>
- The filter can look at any header you
- want, even obscure or custom ones. Enter the header name
- in the first text box, and put your search text in the
- second one.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guilabel>Message Body</guilabel></term>
- <listitem><para>
- Search in the actual text of the message.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guilabel>Expression</guilabel></term>
- <listitem>
- <para>
- Enter a <glossterm linkend="regular-expression">regular
- expression</glossterm>, and
- <application>Evolution</application> will search the
- entire message, including headers, to match it for you.
- </para>
- </listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term><guilabel>Date Sent</guilabel></term>
- <listitem><para> Filter messages by when they were sent:
- First, choose the conditions you want a message to
- meet&mdash; <guilabel>before</guilabel> a given time,
- <guilabel>after</guilabel> it, and so forth. Then, choose
- the time. The filter will compare the message's time-stamp
- to the system clock when the filter is run, or to a
- specific time and date you choose from a calendar. You
- can even have it look for messages within a range of time
- relative to the filter&mdash perhaps you're looking for
- messages less than two days old. </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guilabel>Date Recieved</guilabel></term>
- <listitem><para>
- This works the same way as the <guilabel>Date Sent</guilabel>
- option, except that it compares the time you got the message
- with the dates you specify.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guilabel>Priority</guilabel></term>
- <listitem><para>
- Emails have a standard priority range from -3 (least
- important) to 3 (most important). You can have filters set the
- priority of messages you recieve, and then have other filters
- applied only to those messages which have a certain priority.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guilabel>Regex Match</guilabel></term>
- <listitem>
- <para>
- If you know your way around a <glossterm
- linkend="regular-expression">regex</glossterm>, or
- regular expression, put your knowledge to use here.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guilabel>Source</guilabel></term>
- <listitem>
- <para>
- Filter messages according the server you got them from.
- You can enter a URL or choose one from the drop-down
- list. This ability is only relevant if you use more
- than one mail source.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- <para>
- Now, tell it what to do with those messages. If you want more
- actions, click <guibutton>Add Action</guibutton>; if you want
- fewer, click <guibutton>Remove Action</guibutton>. And choose
- again:
- <variablelist>
-
- <varlistentry>
- <term><guilabel>Copy to Folder</guilabel></term>
- <listitem><para>
- If you select this item, <application>Evolution</application>
- will put the messages into a folder you specify. Click the
- <guibutton>&lt;click here to select a folder&gt;</guibutton> button
- to select a folder.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guilabel>Move to Folder</guilabel></term>
- <listitem><para>
- If you select this item, <application>Evolution</application>
- will put the messages into a folder you specify. Click the
- <guibutton>&lt;click here to select a folder&gt;</guibutton> button
- to select a folder.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guilabel>Forward to Address</guilabel></term>
- <listitem><para>
- Select this, enter an address, and the addressee will
- get a copy of the message.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guilabel>Delete</guilabel></term>
- <listitem><para>
- Marks the message for deletion. You can still get the message
- back, at least until you <guimenuitem>Expunge</guimenuitem> your
- mail yourself.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guilabel>Stop Processing</guilabel></term>
- <listitem><para>
- Select this if you want to tell all other filters to ignore
- this message, because whatever you've done with it so far
- is plenty.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guilabel>Assign Color</guilabel></term>
- <listitem><para>
- Select this item, and <application>Evolution</application>
- will mark the message with whatever color you please.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guilabel>Assign Score</guilabel></term>
- <listitem><para> If you know that all mail with
- "important" somewhere in the message body line is
- important, you can give it a high priority score. In a subsequent filter you can
- then arrange your messages by their priority score.
- </para></listitem>
- </varlistentry>
-
- </variablelist>
- </para>
- <para>
- You're done. Click <guibutton>OK</guibutton> to use this
- filter, or <guibutton>Cancel</guibutton> to close the window
- without saving any changes.
- </para>
-
-
-
- <!-- FIXME: This needs to be in there. But the feature is temporarily
- disabled and I don't know how it will be reimplemented.
-
- <itemizedlist>
- <listitem>
- <para>
- <guilabel>When mail arrives:</guilabel> Select
- this option to have messages filtered as they
- arrive.
- </para>
- </listitem>
- <listitem>
- <para>
- <guilabel>When mail is sent:</guilabel> Select
- this option to filter your outgoing mail. You
- can use this feature to keep your
- <interface>Outbox</interface> as organized as
- your <interface>Inbox</interface>.
- </para>
- </listitem>
- </itemizedlist>
- </para>
-
- -->
-
- <note>
- <title>Two Notable Filter Features</title>
- <para>
- <itemizedlist>
- <listitem><para>
- Incoming email that your filters don't move goes into the Inbox;
- outgoing mail that they don't move ends up in the Sent folder.
- </para>
- </listitem>
-
- <listitem><para>If you move a folder, your filters
- will follow it. </para></listitem>
- </itemizedlist>
- </para>
- </note>
- </sect2>
-
-
-
- <sect2 id="usage-mail-organize-vFolders">
- <title>Getting Really Organized with Virtual Folders</title>
- <para>
- If filters aren't flexible enough for you, or you find
- yourself performing the same search again and again, consider
- a virtual folder. Virtual folders, or vFolders, are an
- advanced way of viewing your email messages within
- <application>Evolution</application>. If you get a lot of
- mail or often forget where you put messages, virtual folders can help
- you stay on top of things.
- </para>
- <para>
- A virtual folder is really a hybrid of all the other organizational
- tools: it looks like a folder, it acts like a search, and you
- set it up like a filter. In other words, while a conventional
- folder actually contains messages, a virtual folder is a view of
- messages that may be in several different folders. The
- messages it contains are determined on the fly using a set of
- criteria you choose in advance.
- </para>
-
- <para>
- As messages that meet the virtual folder criteria arrive or are
- deleted, <application>Evolution</application> will
- automatically place them in and remove them from the
- virtual folder contents list. When you delete a message, it gets
- erased from the folder in which it actually exists, as well as
- any virtual folders which display it.
- </para>
-
- <para>
- 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 more mail you need to organize, the less you
- can afford the sort of confusion that stems from an
- organizational system that's not flexible enough. Virtual folders
- make for better organization because they can accept
- overlapping groups in a way that regular folders and filing
- systems can't.
- </para>
-
- <example id="usage-mail-organize-vFolders-ex">
- <title>Using Folders, Searches, and Virtual Folders</title>
- <para>
- To organize my mail box, I set up a virtual folder for
- emails from my friend and co-worker Anna. I have another
- one for messages that have "ximian.com" in the address and
- "Evolution" in the subject line, so I can keep a record of
- what people from work send me about
- <application>Evolution</application>. If Anna sends me a
- message about anything other than Evolution, it only shows
- up in the "Anna" folder. When Anna sends me mail about the
- user interface for <application>Evolution</application>, I
- can see that message both in the "Anna" virtual folder and
- in the "Internal Evolution Discussion" virtual folder.
- </para>
- </example>
-
- <!-- (INSERT SCREENSHOT HERE: virtual folders in action) -->
-
- <para>
- To create a virtual folder, select <menuchoice>
- <guimenu>Settings</guimenu> <guimenuitem>Virtual Folder
- Editor</guimenuitem> </menuchoice>. This will bring up a
- dialog box that looks suspiciously like the filter window
- (for more information on filters, see <xref
- linkend="usage-mail-organize-filters">), and which
- presents you with a list of virtual folders you have previously
- created. If you have created any virtual folders, they are listed
- here, and you can select, edit or remove them if you wish.
- If you have not created any, there will be only one available
- option: click <guibutton>Add</guibutton> to add a new
- Virtual Folder.
- </para>
- <para>
- You can enter a name for your virtual folder in the
- <guilabel>Name</guilabel>. Then, tell
- <application>Evolution</application> what messages to look
- for. This process is exactly like filter creation: decide
- between <guilabel>Match all parts</guilabel> and
- <guilabel>Match any part</guilabel>, then choose what part of
- the message to look in, what sort of matching to perform, and
- specify exactly what it is that you want to find, be it a
- line of text, a score, a regular expression, or a particular date or
- range of dates.
- </para>
- <para>
- The second part, however, is slightly different. In the
- section of the window labelled <guilabel>Virtual Folder Sources
- </guilabel> is a list of folders in which
- <application>Evolution</application> will search for the
- contents of your vFolder. Click <guibutton>Add</guibutton>
- to add a folder, or <guibutton>Remove</guibutton> to remove
- one. That way, you can have your vFolder search in
- newsgroups, or just in one of your mailboxes, or just in a
- select few folders you've already screened with filters.
- </para>
- <para>
- The vFolder creation window is shown in <xref
- linkend="usage-mail-vfolder-fig-createrule">
-
- <figure id="usage-mail-vfolder-fig-createrule">
- <title>Selecting a vFolder Rule</title>
- <screenshot>
- <screeninfo>Creating a vFolder Rule</screeninfo>
- <graphic fileref="fig/vfolder-createrule-fig" format="png" srccredit="Aaron Weber">
- </graphic>
- </screenshot>
- </figure>
- </para>
- </sect2>
- <sect2 id="usage-mail-subscriptions">
- <title>Subscription Management</title>
- <para>
- <application>Evolution</application> lets you handle your
- IMAP and newsgroup subscriptions with the same tool: the
- subscriptions manager. To start using it, choose
- <menuchoice> <guimenu>Settings</guimenu> <guimenuitem>Manage
- Subscriptions</guimenuitem> </menuchoice>.
- </para>
- <para>
- If you have configured any IMAP (mail) or NNTP (news)
- servers, you will see them listed in the left half of the
- subscription management window. Click on a server to select
- it, and you will see the folders or newsgroups available to
- you. You can then select individual folders and subscribe to
- them, or remove yourself from the subscription list.
- </para>
- <para>
- Once you have subscribed to a folder or newsgroup, your system
- will check for new messages whenever you press the
- <guibutton>Get Mail</guibutton> button.
- </para>
-
- </sect2>
- </sect1>
-</chapter>
-
-
diff --git a/doc/C/usage-mainwindow.sgml b/doc/C/usage-mainwindow.sgml
deleted file mode 100644
index bbcb2b5a39..0000000000
--- a/doc/C/usage-mainwindow.sgml
+++ /dev/null
@@ -1,453 +0,0 @@
-<!--
- <!DOCTYPE Chapter PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.1//EN">
--->
-<chapter id="usage-mainwindow">
-
- <title>The Main Window: Evolution Basics</title>
- <para>
- Start <application>Evolution</application> by selecting
- <menuchoice><guimenu>Main Panel Menu</guimenu>
- <guisubmenu>Applications</guisubmenu>
- <guimenuitem>Evolution</guimenuitem></menuchoice> or by typing
- <command>evolution</command> at the command line. The first time
- you run the program, it will create a directory called
- <filename>evolution</filename> in your home directory, where it
- will keep all your <application>Evolution</application>-related
- files.
- </para>
- <para>
- After <application>Evolution</application> starts
- up, you will see the <interface>main window</interface>, with the
- <interface>Inbox</interface> open. It should look a lot like the
- picture in <xref linkend="usage-mainwindow-fig">. On the left of
- the <interface>main window</interface> is the <interface>shortcut
- bar</interface>, with several buttons in it. Just underneath the
- title bar is a series of menus in the <interface>menu
- bar</interface>, and below that, the <interface>tool
- bar</interface> with buttons for different functions. The largest
- part of the <interface>main window</interface> is taken up by the
- actual <interface>Inbox</interface>, where messages are listed
- and displayed. If you're running the program for the first time,
- you'll have just one message: a welcome from Ximian.
-
-
-<!-- ==============Figure=================================== -->
- <figure id="usage-mainwindow-fig">
- <title>Evolution Main Window and Inbox</title>
- <screenshot>
- <screeninfo>Evolution Main Window</screeninfo>
- <graphic fileref="fig/mainwindow-pic" format="png" srccredit="Kevin Breit">
- </graphic>
- </screenshot>
- </figure>
-<!-- ==============End of Figure=================================== -->
-</para>
-
- <para>
- <note>
- <title>The Way Evolution Looks</title>
- <para>
- The appearance of both <application>Evolution</application>
- and <application>GNOME</application> is very easy to
- customize, so your screen might not look like this picture.
- You might decide to have <application>Evolution</application>
- start with the calendar and a folder bar, or with the contact
- manager occupying the entire window.
- </para>
- </note>
- </para>
-
- <sect1 id="usage-mainwindow-shortcutbar">
- <title>The Shortcut Bar</title>
- <para>
- <application>Evolution</application>'s most important job is
- to give you access to your information and help you use it
- quickly. One way it does that is through the
- <interface>shortcut bar</interface>, the column on the left
- hand side of the main window. The large buttons with names
- like <guilabel>Inbox</guilabel> and
- <guilabel>Contacts</guilabel> are the shortcuts, and you can
- select different groups of shortcuts by clicking the
- rectangular group buttons.
- </para>
- <para>
- The shortcut group buttons are <guibutton>Evolution
- Shortcuts</guibutton> and <guibutton>Internet
- Directories</guibutton>. When you click on them, they'll slide
- up and down to give you access to different sorts of shortcuts.
- When you first start <application>Evolution</application>, you
- are looking at the <guilabel>Evolution Shortcuts</guilabel>
- category. If you click <guilabel>Internet
- Directories</guilabel>, it will slide up and you'll see buttons
- for the <guilabel>Bigfoot</guilabel> and
- <guilabel>Netcenter</guilabel> directories, as well as any
- others you or your system administrator may have added. You can
- add more groups by right-clicking on the background of the
- shortcut bar and selecting <guimenuitem>Menu
- Group</guimenuitem>. Internet directories behave a lot like
- the local contact manager, which is covered in <xref
- linkend="usage-contact">.
- </para>
- <para>
- Take a look at the <guilabel>Evolution Shortcuts</guilabel>
- again. The shortcut buttons in that category are:
-
- <variablelist>
-
-<!-- NOT IMPLEMENTED!
- <varlistentry>
- <term> <guibutton>Today:</guibutton></term>
- <listitem>
- <para>
- This will bring up a summary of any new messages you've
- received, along with the tasks and appointments you have
- lined up for today.
- </para>
- </listitem>
- </varlistentry>
--->
-
-
- <varlistentry>
- <term> <guibutton>Executive Summary:</guibutton></term>
- <listitem>
- <para>
- Start your day here. The Executive summary gives you
- lists of new or important messages, daily appointments
- and urgent tasks. You can customize its appearance and
- content, and use it to access Evolution services.
- </para>
- </listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term> <guibutton>Inbox:</guibutton></term>
- <listitem>
- <para>
- Click the <guibutton>Inbox</guibutton> button to start
- reading your mail. Your Inbox is also where you can
- access Evolution's tools to filter, sort, organize, and
- search your mail.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guibutton>Calendar:</guibutton></term>
- <listitem>
- <para>
- The Calendar can store your appointments and To do lists
- for you. Connected to a network, you can use it to keep
- a group of people on schedule and up to date.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guibutton>Tasks:</guibutton></term>
- <listitem>
- <para>
- A full-size view of your calendar's task pad.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guibutton>Contacts:</guibutton></term>
- <listitem>
- <para>
- 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.
- </para>
- </listitem>
- </varlistentry>
-
-<!-- NOT IMPLEMENTED YET
-
-
- <varlistentry>
- <term> <guibutton>Notes:</guibutton></term>
- <listitem>
- <para> The note pad is your catch-all tool: use it to take
- messages from phone conversations, keep small things
- organized, write <glossterm linkend="haiku">haiku</glossterm>, or whatever
- you like. This feature is not yet implemented, but will be
- soon. See <xref linkend="usage-notes"> for more
- information.
- </para>
- </listitem>
- </varlistentry>
--->
-
- </variablelist>
- </para>
- <para>
- If you don't like the shortcut bar, you can use the folder bar
- or the menu bar to navigate the main window. Press
- <keycombo action="simul">
- <keycap>Ctrl</keycap>
- <keycap>O</keycap>
- </keycombo>
- to choose from a list of folders you'd like to visit, or use the
- drop-down folder bar. You can hide and show the folder bar and
- the shortcut bar by selecting those items in the
- <guimenu>View</guimenu> menu.
- </para>
-
- <tip>
- <title>Shortcut Bar Tricks</title>
- <para>
- To remove a shortcut from the shortcut bar, right-click on it
- and select <guimenuitem>Remove</guimenuitem>. To add one,
- select <menuchoice> <guimenu>File</guimenu>
- <guisubmenu>New</guisubmenu> <guimenuitem>Evolution Bar
- Shortcut</guimenuitem> </menuchoice>.
- </para>
- <para>
- To change the way the shortcut bar looks, right-click in an
- empty space on the shortcut bar. From the menu that appears,
- you can select icon sizes.
- </para>
- </tip>
- </sect1>
-
- <sect1 id="usage-mainwindow-folderbar">
- <title>The Folder Bar</title>
- <para>
- The <interface>folder bar</interface> is a more comprehensive
- way to view the information you've stored with
- <application>Evolution</application>. It displays all your
- appointments, address cards, and email in a tree that's a lot
- like a <glossterm linkend="filetree">file
- tree</glossterm>&mdash; it starts small at the top, and branches
- downwards. On most computers, there will be three or four
- folders at the base. First is the <guilabel>Local</guilabel>
- folder, which holds all the <application>Evolution</application>
- data that's stored on your computer. After that come
- <guilabel>Virtual Folders</guilabel>, or virtual folders, discussed in
- <xref linkend="usage-mail-organize-vfolders">, followed by any
- <glossterm linkend="imap">IMAP</glossterm> mail folders you may
- have available to you over your network. Lastly, there are
- <guilabel>External Directories</guilabel>, <glossterm
- linkend="ldap">LDAP</glossterm> contact directories stored on a
- network.
- </para>
- <para>
-
- A typical <guilabel>Local</guilabel> folder contains the following folders:
- <itemizedlist>
- <listitem>
- <para>
- <guilabel>Calendar</guilabel>, for appointments and
- event listings.
- </para>
- </listitem>
- <listitem>
- <para>
- <guilabel>Contacts</guilabel>, for address cards.
- </para>
- </listitem>
- <listitem>
- <para>
- <guilabel>Inbox</guilabel>, for incoming mail.
- </para>
- </listitem>
- <listitem>
- <para>
- <guilabel>Drafts</guilabel>, for messages you started and didn't finish.
- </para>
- </listitem>
- <listitem>
- <para>
- <guilabel>Sent</guilabel>, for sent mail.
- </para>
- </listitem>
- <listitem>
- <para>
- <guilabel>Trash</guilabel>, which is used to store
- messages you don't want, but keep around just in case you
- change your mind.
- </para>
- </listitem>
- <listitem>
- <para>
- <guilabel>Outbox</guilabel>, for messages you have written
- but not yet sent. This will be empty unless you use
- <application>Evolution</application> while offline.
- </para>
- </listitem>
-
- </itemizedlist>
-
- </para>
- <tip id="foldertips">
- <title>Navigating without the Folder Bar</title>
- <para>
- You don't need the folder bar or the shortcut bar to move
- around the main window. You can use <keycap>Tab</keycap> to
- switch from one part of the window to another, and the folder
- menu on the right side of the window just below the toolbar
- to move about the folder tree.
- </para>
- </tip>
-
- <para>
- To create a new folder, select <menuchoice>
- <guimenu>File</guimenu> <guisubmenu>New</guisubmenu>
- <guimenuitem>Folder</guimenuitem></menuchoice>. You'll be asked where you want to
- put it, and what kind of folder it should be. You can choose
- from three types: <guilabel>Mail</guilabel>, for storing mail,
- <guilabel>Calendar</guilabel> for storing calendars, and
- <guilabel>Contacts</guilabel> for storing contacts.
- </para>
-
- <note>
- <title>Folders Have Limits</title>
- <para>
- Calendars must go in calendar folders, mail in mail
- folders, and contacts in contact folders.
- </para>
- </note>
-
- <para>
- Right-clicking will bring up a menu for just about anything
- in GNOME, and <application>Evolution</application> is no
- exception. If you right-click on a folder, you'll have a
- menu with the following options:
- <itemizedlist>
- <listitem><para><guimenuitem>FIXME</guimenuitem>, for another purpose. </para></listitem>
- <listitem><para><guimenuitem>Something else</guimenuitem>, for another purpose. </para></listitem>
- </itemizedlist>.
- </para>
-
- <tip>
- <title>Context-Sensitive Help</title>
- <para>
- GNOME 2.0 will support context-sensitive help, which means 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, choosing <guimenuitem>Help</guimenuitem> from
- the right-click menu is a good way to find out.
- </para>
- </tip>
-
- <para>
- Any time new information arrives in a folder, that folder label
- is displayed in bold text.
- </para>
- <para>
- To delete a folder, right-click it and select
- <guimenuitem>Delete</guimenuitem> from the menu that pops up.
- To change the order of folders, or put one inside another, use
- drag-and-drop. To move individual
- messages, appointments, and address cards between folders, you
- can do the same thing: drag them where you want them, and
- they'll go.
- </para>
- </sect1>
- <sect1 id="usage-mainwindow-menubar">
- <title>The Menu Bar</title>
- <para>
- The <interface>menu bar</interface>'s contents will always
- provide all the possible actions for any given view of your
- data. That means that, depending on the context, menu bar items
- will change. If you're looking at your Inbox, most of the menu
- items will relate to mail; some will relate to other components
- of <application>Evolution</application> and some, especially
- those in the <guimenu>File Menu</guimenu> will relate to the
- application as a whole. The contents of the menu bar are
- described in <xref linkend="menuref">.
- </para>
- <para>
- <variablelist>
- <varlistentry>
- <term> <guimenu>File</guimenu> Menu</term>
-
- <listitem><para>
- Anything even related to a file or to the operations
- of the application generally falls under this
- menu: creating things, saving them to disk,
- printing them, and quitting the program itself.
-
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term> <guimenu>Edit</guimenu> Menu </term>
- <listitem><para>
- The <guimenu>Edit</guimenu> menu holds
- useful tools that help you edit text and move it around.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term> <guimenu>View</guimenu> Menu </term>
- <listitem><para>
- This menu lets you decide how <application>Evolution</application>
- should look. Some of the features control the appearance of
- <application>Evolution</application> as a whole, and others
- the way a particular kind of information appears.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term> <guimenu>Settings</guimenu> Menu </term>
- <listitem><para> Tools for configuring, changing, and
- setting up go here. For mail, that means things like
- <guimenuitem>Mail Configuration</guimenuitem> and the
- <guimenuitem>Virtual Folder Editor</guimenuitem>. For the
- <interface>Calendar</interface> and the <interface>Contact
- Manager</interface>, it's color, network, and layout
- configuration. </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term> <guimenu>Help</guimenu> Menu</term>
- <listitem><para>
- Select among these items to open the
- <application>Help Browser</application>
- and read the <application>Evolution</application> manual.
- </para></listitem>
- </varlistentry>
- </variablelist>
- </para>
- <para>
- Other menus, like <guilabel>Folder</guilabel>,
- <guilabel>Message</guilabel>, and <guilabel>Actions</guilabel>,
- appear only occasionally. <guilabel>Message</guilabel> and
- <guilabel>Folder</guilabel>, for example, have commands that only
- relate to email, so they're only available when you're looking at
- email.
- </para>
- <para>
- Once you've familiarized yourself with the <interface>main
- window</interface> you can start doing things with it. We'll
- start with your email inbox, since you've got a letter waiting
- for you already.
- </para>
- </sect1>
-</chapter>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/doc/C/usage-notes.sgml b/doc/C/usage-notes.sgml
deleted file mode 100644
index 1ff2283128..0000000000
--- a/doc/C/usage-notes.sgml
+++ /dev/null
@@ -1,49 +0,0 @@
-<chapter id="usage-notes">
- <title>Evolution Notes</title>
- <abstract>
- <title> An Overview of the Evolution Notes</title>
- <para>
- In the dark ages before email was invented, there were little
- scraps of people which people used for short-term information
- storage. These scraps of paper were called notes. Now, notes
- are an almost necessary part of our lives, albeit in electronic
- form. It only makes sense, then, that
- <application>Evolution</application> will eventually have a
- Notes feature. <application>Evolution</application> can help
- you take notes in the following ways:
- <itemizedlist>
- <listitem>
- <para>
- Take down phone numbers, take school notes, take phone
- messages, or even write poetry.
- </para>
- </listitem>
- <listitem>
- <para>
- Color code notes to organize them, or just to
- make them look good.
- </para>
- </listitem>
- <listitem>
- <para>
- Turn a note into an email or a text file.
- </para>
- </listitem>
- <listitem>
- <para>
- Write <glossterm>Haiku</glossterm>
- </para>
- </listitem>
- </itemizedlist>
- </para>
- <para>
- You can start writing notes by clicking
- <guibutton>Notes</guibutton> in the shortcut bar. Of course,
- it's not there yet. But when it is, it'll take you to the
- notepad.
- </para>
- </abstract>
-</chapter>
-
-
-
diff --git a/doc/C/usage-print.sgml b/doc/C/usage-print.sgml
deleted file mode 100644
index cc1ac16357..0000000000
--- a/doc/C/usage-print.sgml
+++ /dev/null
@@ -1,105 +0,0 @@
-<chapter id="usage-print">
-<title>Printing with Evolution</title>
-<para>
- This is a very short chapter, because printing with
- <application>Evolution</application> is not a complex task. Like
- most GNOME applications, <application>Evolution</application> uses
- the gnome-print system, so if you've used any other GNOME
- application to print, you should be able to print from
- <application>Evolution</application> immediately.
-</para>
-<para>
- Whether you're printing a message, a calendar page, or a selection
- of address cards, you can choose to print directly to a printer, or
- save the print output to a postscript file. You can also use the
- preview feature to see how your printed output will look.
-</para>
-
- <sect1 id="printpreview">
- <title>Print Preview</title>
- <para>
- <guibutton>Print Preview</guibutton> appears both as a button in
- the printing dialog and as an item in the
- <guimenu>File</guimenu> menu. In both places, it does the same
- thing: it opens a new window that shows you what would happen if
- you were to print the current message, calendar, appointment, or
- address card.
- </para>
- <para>
- That window allows you to select which pages you want to see,
- and how close you'd like to look at them. Zoom in or out, fit
- the page to the window (the <guibutton>Fit</guibutton> button)
- or match the width of the page and the window (the
- <guibutton>Fit Width</guibutton> button). None of these buttons
- changes the way the page will be printed, but they do let you
- get a better look. If you're satisfied with the way the things
- look, click <guibutton>Print</guibutton> to send your document
- on its way. If you'd like to change it, just close the
- <guilabel>Print Preview</guilabel> window and make the changes
- you want from the Mail, Calendar, or Contact Manager.
- </para>
-
-
- <!-- ==============Figure=================================== -->
-
- <figure id="print-preview">
- <title>Print Preview</title>
- <screenshot>
- <screeninfo>Print Preview</screeninfo>
- <graphic fileref="fig/print-preview" format="png" srccredit="Aaron Weber">
- </graphic>
- </screenshot>
- </figure>
-<!-- ==============End of Figure============================== -->
-
- </sect1>
-
- <sect1 id="print-destination">
- <title>File or Printer?</title>
- <para>
- The printer selection window, shown in <xref
- linkend="print-dest">, lets you choose the format for
- printing&mdash; at this time, only <guilabel>Generic
- Postscript</guilabel> is available&mdash; and whether to print
- to a file or to an actual printer. If you choose a printer,
- you'll be asked for the printer command (probably
- <guilabel>lpr</guilabel>) which your system uses. If you
- choose to print to a file, you'll need to decide upon a
- filename. And of course, you'll want to choose a number of
- copies, and whether to collate them.
- </para>
-
- <!-- ==============Figure=================================== -->
-
- <figure id="print-dest">
- <title>Choosing a Printer</title>
- <screenshot>
- <screeninfo>Choosing a Printer</screeninfo>
- <graphic fileref="fig/print-dest" format="png" srccredit="Aaron Weber">
- </graphic>
- </screenshot>
- </figure>
-<!-- ==============End of Figure============================== -->
-
- <para>
- If you're printing a message that's more than one page, you'll
- have the option of choosing which pages to print. If you're
- printing a calendar entry, you can decide what range of dates to
- print. And, if you're printing contact cards, you can decide
- whether to print only the selected cards, or all of them.
- </para>
- <para>
- When you're ready, click <guibutton>Print</guibutton> to print,
- <guibutton>Preview</guibutton> to have a look (or another look)
- at the preview, or <guibutton>Cancel</guibutton> to cancel the
- whole deal.
- </para>
- </sect1>
-</chapter>
-
-
-
-
-
-
-
diff --git a/doc/C/usage-sync.sgml b/doc/C/usage-sync.sgml
deleted file mode 100644
index a6b53e9526..0000000000
--- a/doc/C/usage-sync.sgml
+++ /dev/null
@@ -1,20 +0,0 @@
-
- <chapter id="usage-sync">
- <title>Synchronizing with a Hand-held Device</title>
- <para>
- This chapter covers is how to synchronize data
- installed and configured. If you need information on how to
- set up a synchronization system, consult <xref
- linkend="config-sync">.
- </para>
- <sect1 id="hotsync">
- <title>Using HotSync</title>
- <para>
- Put your hand-held device on its cradle and press the
- HotSync button.
- </para>
- <para>
- No, really. That's all there is to it.
- </para>
- </sect1>
- </chapter> \ No newline at end of file
diff --git a/doc/COPYING-DOCS b/doc/COPYING-DOCS
deleted file mode 100644
index b42936beb3..0000000000
--- a/doc/COPYING-DOCS
+++ /dev/null
@@ -1,355 +0,0 @@
- GNU Free Documentation License
- Version 1.1, March 2000
-
- Copyright (C) 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: How to use this License for your documents
-
-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 (c) 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.
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 73453c6de5..0000000000
--- a/doc/ChangeLog
+++ /dev/null
@@ -1,699 +0,0 @@
-2001-03-14 Gediminas Paulauskas <menesis@delfi.lt>
-
- * C/Makefile.am: there's no apx-fdl.sgml and evolution-guide.sgml
- anymore
-
-2001-02-23 Aaron Weber <aaron@helixcode.com>
-
- * C/usage-mail.sgml: IMAP subscriptions stuff.
-
-2001-02-21 Aaron Weber <aaron@helixcode.com>
-
- * C/usage-mail.sgml: Advanced search/show all/save search stuff.
-
- * C/evolution.sgml: This file replaces evolution-guide.sgml, for Nautilus Readiness.
-
- * C/apx-gloss.sgml: glossterm conduit.
-
- * C/config-sync.sgml: Glossterm conduit.
-
- * C/preface.sgml: Checked over for Keyboard-Shortcut and other truthfulness.
-
-2001-02-15 Aaron Weber <aaron@helixcode.com>
-
- * C/evolution-guide.sgml: Validated. Verified. Markup fixed in
- several individual files.
-
- * C/apx-gpl.sgml: cvs-removed for GNOME 1.4 compliance.
-
- * C/apx-fdl.sgml: cvs-removed for GNOME 1.4 compliance.
-
-2001-02-09 Aaron Weber <aaron@helixcode.com>
-
- * C/config-sync.sgml: Overhaul. Now accurate and truthful and clear.
-
- * C/usage-calendar.sgml: Minor Changes.
-
-2001-02-08 Aaron Weber <aaron@helixcode.com>
-
- * C/usage-contact.sgml: Minor Changes.
-
- * C/usage-mail.sgml: Minor Changes.
-
-2001-02-07 Aaron Weber <aaron@helixcode.com>
-
- * C/menuref.sgml: Added section, but left blank til UI stabilizes.
-
- * C/usage-exec-summary.sgml: A little functionality described.
-
- * C/usage-mainwindow.sgml: Added tasks and Exec-summary.
-
- * C/usage-calendar.sgml: Describe semi-autonomy of task pad.
-
-2001-02-06 Aaron Weber <aaron@ximian.com>
-
- * C/usage-contact.sgml: s/contact manager/address book/ and
- revised text.
-
- * C/usage-exec-summary.sgml: New file. Describes Executive Summary.
-
-2001-01-19 Aaron Weber <aaron@helixcode.com>
-
- * C/usage-mail.sgml: More of Megan's revisions, and Field Chooser
- functions in the Sort section.
-
- * C/apx-gloss.sgml: added "ToolTip"
-
-2001-01-18 Aaron Weber <aaron@helixcode.com>
-
- * C/preface.sgml: s/Helix Code/Ximian, and Megan's comments.
-
- * C/usage-mainwindow.sgml: s/Helix Code/Ximian/, and Megan's
- comments.
-
- * C/evolution-guide.sgml: s/Helix Code/Ximian/
-
-2000-12-13 Aaron Weber <aaron@helixcode.com>
-
- * C/usage-mail.sgml: Revisions as suggested by Dan. Especially to
- filter dialogs... which still need some renaming, IMHO.
-
- * C/usage-mainwindow.sgml: Revisions as suggested by
- Dan. Especially to the Folder Limits thing, which still upsets me
- somehow.
-
- * C/preface.sgml: Revisions as suggested by Dan.
-
-2000-11-29 Aaron Weber <aaron@helixcode.com>
-
- * C/config-setupassist.sgml: added some <glossterms>, added linkends to existing glossterms.
-
-2000-11-28 Aaron Weber <aaron@helixcode.com>
-
- * C/evolution-guide.sgml: Changed intro to Config section. Now
- defines what, exactly, "configurable" means.
-
- * C/usage-print.sgml: Stylistic revisions.
-
- * C/usage-calendar.sgml: Stylistic revisions.
-
- * C/usage-contact.sgml: Stylistic revisions.
-
-2000-11-09 Aaron Weber <aaron@helixcode.com>
-
- * C/menuref.sgml: Message heading Right-Click Menu.
-
-2000-11-03 Aaron Weber <aaron@helixcode.com>
-
- * C/apx-gloss.sgml: The regexp example was quite wrong. Props to Sasha.
-
-2000-11-02 Aaron Weber <aaron@helixcode.com>
-
- * C/usage-contact.sgml: Style and spelling.
-
-2000-11-01 Aaron Weber <aaron@helixcode.com>
-
- * C/config-prefs.sgml: Fixed validation errors.
-
- * C/apx-gloss.sgml: Fixed HTML, style stuff.
-
- * C/usage-mail.sgml: Stylistic overhaul.
-
- * C/usage-mainwindow.sgml: Fixed groups in shortcut bar, fixed
- folder navigation tips.
-
-2000-10-31 Aaron Weber <aaron@helixcode.com>
-
- * C/preface.sgml: Minor stylistic revisions.
-
-2000-10-30 Aaron Weber <aaron@helixcode.com>
-
- * COPYING-DOCS: New file. This is the official place to put the
- FDL now.
-
-
-2000-11-01 Radek Doulik <rodo@helixcode.com>
-
- * Keybindings: added composer keybindings description
-
-2000-10-25 Aaron Weber <aaron@helixcode.com>
-
- * C/menuref.sgml: Actions -> New Directory Server added.
-
- * C/config-prefs.sgml: Actions -> New Directory Server added.
-
- * C/usage-contact.sgml: Actions -> New Directory Server added.
-
- * C/menuref.sgml: Added mail Settings->Manage Subscriptions menu.
-
- * C/usage-mail.sgml: Subscriptions section added. Quite
- incomplete, though.
-
-2000-10-11 Aaron Weber <aaron@helixcode.com>
-
- * C/evolution-guide.sgml: Re-checked validity of all files. Made
- minor changes to menuref.sgml, usage-mail.sgml, usage-print.sgml to
- bring up to spec.
-
- * C/usage-mail.sgml: Redid Filter & Vfolder to match the new &
- improved functionality.
-
- * C/fig/*: Re-did remaining screenshots.
-
-2000-10-10 Aaron Weber <aaron@helixcode.com>
-
- * C/usage-print.sgml: New file, describing printing and print-preview.
-
- * C/fig/print-preview.png: New file.
-
- * C/fig/print-dest.png: New file.
-
- * C/evolution-guide.sgml: Added usage-print entity.
-
- * C/menuref.sgml: Fixed calendar menu stuff.
-
- * C/usage-mail.sgml: No more "Actions" menu, other assorted
- menu-related changes.
-
-2000-10-06 Aaron Weber <aaron@helixcode.com>
-
- * C/fig/ * replaced a whole bunch of screenshots.
-
-2000-10-05 Aaron Weber <aaron@helixcode.com>
-
- * C/usage-contact.sgml: Described Search features.
-
- * C/menuref.sgml: Contact Manager menus fixed.
-
-2000-10-04 Aaron Weber <aaron@helixcode.com>
-
- * C/usage-contact.sgml: Fixed glossterms.
-
- * C/usage-mail.sgml: Fixed glossterms, filenames, spellchecked.
-
- * C/apx-gloss.sgml: Added "Inline," "VCard".
-
- * C/usage-mainwindow.sgml: Fixed glossterms, filenames. Spellchecked.
-
- * C/usage-mail.sgml: Fixed glossterms, filenames. Spellchecked.
-
- * C/evolution-guide.sgml: New Legalnotice. Removed FDL and GPL,
- which are now included as part of the gnome-help package.
-
- * C/usage-contact.sgml: Spellcheck. Fixed some wording, and
- responded to clahey's suggestions-- notably, commented out the
- "add to master list" category feature.
-
- * C/usage-calendar.sgml: Spellcheck. Fixed wording, event overlap
- description.
-
- * C/evolution-guide.sgml: Spellcheck. Commented out Notes
- entities.
-
- * C/usage-notes.sgml: Spellchecked, then decided to comment out
- this file/chapter and all references to it, since it's unlikely to
- be implemented any time soon.
-
- * C/config-setupassist.sgml: Spellcheck. Other minor updates. May
- need more work in the near future.
-
- * C/usage-sync.sgml: Now it's really short. And spelled correctly.
-
-2000-10-03 Aaron Weber <aaron@helixcode.com>
-
- * C/config-prefs.sgml: Mostly spelling. Still needs major
- alteration.
-
- * C/menuref.sgml: s/Appintment/Appointment, fixed small errors,
- ran spellcheck. Still needs lots of work, since many menus have
- changed.
-
- * C/apx-gloss.sgml: Added Virus, Protocol, fixed vFolder,
- spellchecked.
-
-2000-09-26 Aaron Weber <aaron@helixcode.com>
-
- * C/apx-gloss.sgml: Added sendmail and SMTP.
-
-2000-09-22 Aaron Weber <aaron@helixcode.com>
-
- * C/menuref.sgml: Changed to reflect new menu layout.
-
- * C/usage-mainwindow.sgml: Changed to reflect new menu layout. Again.
-
- * C/usage-contact.sgml: Stop and Display All features.
-
-2000-09-21 Aaron Weber <aaron@helixcode.com>
-
- * C/evolution-guide.sgml: Switched to the "official" FSF markup.
- I will have to make changes to the markup-- adding ids, etc, or
- switch to another version of the markup. Pending discussion by
- GDP.
-
- * C/apx-authors.sgml: Changed Matt Loper's email address to
- loper.org; added Jeff Stedfast and Peter Williams to authors list,
- realphebetized.
-
- * C/config-prefs.sgml: Revision to reflect current options labelling.
-
- * C/evolution-guide.sgml: Changes to part intros.
-
- * C/preface.sgml: Spelling and menu fixes. Will need more work tomorrow.
-
-2000-09-20 Aaron Weber <aaron@helixcode.com>
-
- * C/config-prefs.sgml: Fixed sig stuff here and in setupassist.
-
- * C/config-sync.sgml: Fixed description of conduit usage.
-
-2000-09-18 Aaron Weber <aaron@helixcode.com>
-
- * C/preface.sgml: Spelling fixes, etc.
-
-=======
-2000-09-19 Federico Mena Quintero <federico@helixcode.com>
-
- * C/Makefile.am: Fixed to install the stylesheet-images as well.
-
->>>>>>> 1.26
-2000-09-07 Aaron Weber <aaron@helixcode.com>
-
- * C/fig/ New files: contact-editor.png, mail-composer.png,
- filter-assist-fig.png, mail-inbox.png
-
-2000-09-07 Aaron Weber <aaron@helixcode.com>
-
- * C/preface.sgml: Redid "soft" intro stuff.
-
- * C/evolution-guide.sgml: Accidentally broke docs, now valid.
-
-2000-09-06 Aaron Weber <aaron@helixcode.com>
-
- * C/usage-contact.sgml: Editing, proofing.
-
-2000-09-05 Aaron Weber <aaron@helixcode.com>
-
- * C/usage-contact.sgml: Grammar, links, screenshots.
-
- * fig/* Re-took most screenshots.
-
- * C/usage-mail.sgml: Filters, proofing.
-
-2000-09-01 Aaron Weber <aaron@helixcode.com>
-
- * C/config-prefs.sgml: Added coverage of news, clarified POP/IMAP
- distinction (there's a theme to these four log entries here).
-
- * C/usage-mail.sgml: Added coverage of news.
-
- * C/config-setupassist.sgml: Revised mail sources content for
- IMAP/POP stuff.
-
- * C/apx-gloss.sgml: Added IMAP and POP.
-
-2000-08-31 Aaron Weber <aaron@helixcode.com>
-
- * C/apx-gloss.sgml: Added regular expressions to glossary.
- Explanation should be removed from other portions of the book now.
-
- * C/usage-mainwindow.sgml: Revisions, minor.
-
- * C/apx-menuref.sgml: Now named menuref.sgml, to reflect its new
- status as a part.
-
- * C/evolution-guide.sgml: Structural alterations: Menuref is now a
- part, not an appendix.
-
- * C/apx-menuref.sgml: Added contextual menus for mail.
-
- * C/preface.sgml: Added "quickref and pointers" sections. Props to
- O'Reilly for the copy of Outlook in a Nutshell which gave me the
- idea.
-
-2000-08-30 Aaron Weber <aaron@helixcode.com>
-
- * C/usage-mainwindow.sgml: Minor fixes.
-
- * C/preface.sgml: Corrected grammar, added glossterms, described
- menuref.
-
-2000-08-25 Aaron Weber <aaron@helixcode.com>
-
- * C/usage-mail.sgml: Redid filter and vFolder assistant
- descriptions.
-
- * C/fig/filter-new-fig.png: Replaced with new assistant pic.
-
- * C/fig/filter-assist-fig.png: New file, showing only assistant.
-
-
- * C/apx-menuref.sgml: Finished message composer and calendar
- editor menus. Looked at Contact Editor menus and decided to
- document those features after implementation.
-
-2000-08-24 Aaron Weber <aaron@helixcode.com>
-
- * C/apx-menuref.sgml: Message Composer File and Edit menus.
-
-2000-08-23 Aaron Weber <aaron@helixcode.com>
-
- * C/apx-menuref.sgml: Added editor sections.
-
- * C/evolution-guide.sgml: Included Menu Reference Appendix.
-
-2000-08-22 Aaron Weber <aaron@helixcode.com>
-
- * C/usage-mail.sgml: Minor markup changes.
-
- * C/apx-menuref.sgml: New File. Menu Reference. Still needs much
- work, but not bad for an evening.
-
-2000-08-21 Aaron Weber <aaron@helixcode.com>
-
- * C/usage-mail.sgml: Kevin's diff applied, with minor changes.
-
-2000-08-09 Aaron Weber <aaron@helixcode.com>
-
- * C/evolution-guide.sgml: Fixed bugs in validation. Went home to
- sleep.
-
- * C/usage-mainwindow.sgml: Redid menubar description.
-
-
- * C/config-prefs.sgml: Added coverage of folder config, requested
- that feature be transferred to config section. Switched to
- variablelist in "Other" config section.
-
- * C/usage-mail.sgml: Added coverage of right-click on messages,
- threaded-view.
-
- * C/usage-mainwindow.sgml: Right-click on folder menu reinstated.
-
-2000-08-07 Aaron Weber <aaron@helixcode.com>
-
- * C/config-prefs.sgml: Added news server coverage. Other config
- proofing changes.
-
-
-2000-08-05 Aaron Weber <aaron@helixcode.com>
-
- * C/apx-gpl.sgml: New file. Contains contents of "COPYING",
- but marked up (probably not very well, but valid) as docbook
- (SGML).
-
- * C/evolution-guide.sgml: Subtle change to the legal notice:
- distinguished manual license from software license. Linked to
- apx-gpl.sgml above.
-
- * C/usage-calendar.sgml: I redid all the usage files.
-
-2000-07-21 Aaron Weber <aaron@helixcode.com>
-
- * C/usage-mail.sgml: Added password remembering/forgetting feature.
-
- * C/config-prefs.sgml: Mostly moved to variablelists, a few
- language changes.
-
- * C/config-setupassist.sgml: Minor changes to formatting, wording.
-
- * C/usage-notes.sgml: Changed trademark references, other minor
- changes.
-
- * C/usage-calendar.sgml: Minor fixes, added additional calendar
- section, removed references to unimplemented features. Spellcheck,
- prep for 0.3 release.
-
-2000-07-19 Aaron Weber <aaron@helixcode.com>
-
- * C/usage-mail.sgml: lots of minor fixes to language. added
- desc. of clahey's cool button-address thing.
-
- * C/usage-mainwindow.sgml: fixed itemizedlists, ch. to shortcut
- bar & folder descs, removed refs to trash.
-
-2000-07-18 Aaron Weber <aaron@helixcode.com>
-
- * C/usage-contact.sgml: Altered category addition stuff, plus
- suggestions from Kevin.
-
- * C/apx-gloss.sgml: Added ldap and signature definitions (from
- Kevin).
-
- * C/usage-mail.sgml: Move to variablelists from itemizedlists.
-
-2000-07-14 Aaron Weber <aaron@helixcode.com>
-
- * C/usage-contact.sgml: moved to variablelists from itemizedlists
- * C/usage-calendar.sgml: moved to variablelists from itemizedlists
-
-2000-06-29 Aaron Weber <aaron@helixcode.com>
-
- * C/preface.sgml: Minor fixes.
-
- * C/usage-notes.sgml: New File for feature that is yet to come.
- * C/evolution-guide.sgml: Added entity for notes chapter.
- * C/usage-mainwindow.sgml: Un-commented references to notes section.
-
- * C/apx-authors.sgml: Removed dcm from author list.
-
- * C/usage-calendar.sgml: Added to-do list features.
-
-2000-06-28 Aaron Weber <aaron@helixcode.com>
-
- * C/usage-contact.sgml: commented out future features; redid
- contact editor stuff.
-
- * C/apx-gloss.sgml: Removed "live doc" and added "minicard"
-
-2000-06-27 Aaron Weber <aaron@helixcode.com>
-
- * C/devel-action.sgml: Removed file.
- * C/devel-script.sgml: Same.
- * C/devel-component.sgml: Same.
- * C/preface.sgml: Removed references to devel section.
- * C/evolution-guide.sgml: Removed references to devel section.
-
-2000-06-23 Aaron Weber <aaron@helixcode.com>
-
- * C/evolution-guide.sgml: Made moderate to major stylistic updates
- to this, apx-gloss.sgml, and to all files beginning with "usage,"
- especially wrt HTML mail.
-
-
-2000-06-15 Aaron Weber <aaron@helixcode.com>
-
- * C/usage-contact.sgml: Category stuff improved.
-
- * C/usage-calendar.sgml: Now covers how to add an event properly.
-
-2000-07-17 Federico Mena Quintero <federico@helixcode.com>
-
- * Makefile.am (SUBDIRS): Added the devel directory.
-
-2000-06-28 Peter Williams <peterw@curious-george.helixcode.com>
-
- * C/Makefile.am (SGML_FILES): Don't depend on the newly-removed
- devel-*.sgml files.
-
-2000-06-16 Damon Chaplin <damon@helixcode.com>
-
- * C/.cvsignore: added evolution-guide and evolution-guide.junk
- so we don't get the '? doc/C/evolution-guide' messages each time we
- do a cvs update.
-
-2000-06-14 Aaron Weber <aaron@helixcode.com>
-
- * C/usage-mainwindow.sgml: added sect on menubar, other minor changes.
-
- * C/usage-mail.sgml: Improved filter and vfolder
- description, and some minor changes from me and Kevin.
-
-2000-06-07 Aaron Weber <aaron@helixcode.com>
-
- * C/config-prefs.sgml: finished adding calendar prefs. screenshots.
- * C/fig/config-cal.png: new file (screenshot for above)
- * C/fig/config-mail.png: same
-
-2000-06-05 Aaron Weber <aaron@helixcode.com>
-
- * C/usage-calendar.sgml: Incorporated chgs from Kevin.
-
- * C/config-prefs.sgml: began total overhaul of structure and added
- content reflecting new prefs items. needs LOTS more work.
-
- * C/usage-mail.sgml: changed some references to id's in the
- config-prefs section.
-
- * C/fig/config-mail.png: changed filename from config-prefs.png
-
-2000-06-01 Aaron Weber <aaron@helixcode.com>
-
- * C/config-prefs.sgml: filename was wrong, altered.
-
- * C/usage-mail.sgml: improved filter instructions, vFolder
- instructions. still need work though.
-
-
- * C/usage-contact.sgml: added screenshot.
-
- * C/usage-calendar.sgml: added screenshot.
-
- * C/config-prefs.sgml: added screenshots, and now describes the
- actual prefs dialogs.
-
- * C/fig/config-camel.png: new (screenshot) file
- * C/fig/filter-druid.png: same
- * C/fig/vfolder-druid.png: same
- * C/fig/calendar.png: same
- * C/fig/contact.png: same
- * C/fig/vfolder-createrule-fig.png: same
- * C/fig/filter-new-fig.png: same
- * C/fig/config-camel.png: same
-
-2000-06-01 Dan Winship <danw@helixcode.com>
-
- * Makefile.am: recurse into the C directory
-
- * C/Makefile.am: Rules to build and install the docs. Mostly
- stolen from gnomecal. Only works if you have GDP stuff
- (http://www.gnome.org/gdp/) set up on your machine, but won't make
- the build fail if you don't.
-
-2000-05-29 Aaron Weber <aaron@helixcode.com>
-
- * C/usage-contact.sgml: incorporated kevins notes.
- * C/usage-mainwindow.sgml: incorporated kevins notes.
-
-2000-05-27 Aaron Weber <aaron@helixcode.com>
-
- * 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 <aaron@helixcode.com>
-
- * 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 <aaron@helixcode.com>
-
- * 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 <danw@helixcode.com>
-
- * Camel-Classes: sync
-
-2000-04-16 Aaron Weber <aaron@helixcode.com>
-
- * C/evo_book_0.1.sgml: new file (doc sgml)
-
- * C/ : New directory for doc sgml & graphics
-
-2000-03-05 Christopher James Lahey <clahey@helixcode.com>
-
- * white-papers/widgets/e-table.sgml: Added Miguel to the author
- list for ETable.
-
-2000-03-03 Christopher James Lahey <clahey@helixcode.com>
-
- * 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 <danw@helixcode.com>
-
- * ibex.sgml: Ibex white paper
-
-2000-02-29 Federico Mena Quintero <federico@helixcode.com>
-
- * calendar.sgml: Sections for the calendar user agent and the
- calendar client library.
-
-2000-02-29 Dan Winship <danw@helixcode.com>
-
- * camel.sgml: Reorg a bit more, make the <PRE> 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 <federico@helixcode.com>
-
- * calendar.sgml: Section for the personal calendar server.
-
-2000-02-28 Dan Winship <danw@helixcode.com>
-
- * camel.sgml: add Bertrand to authors, edit his additions
-
-2000-02-28 bertrand <bertrand@helixcode.com>
-
- * 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 <danw@helixcode.com>
-
- * camel.sgml: Beginnings of a Camel white paper
-
-2000-02-25 Federico Mena Quintero <federico@helixcode.com>
-
- * 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/Keybindings b/doc/Keybindings
deleted file mode 100644
index f232802110..0000000000
--- a/doc/Keybindings
+++ /dev/null
@@ -1,13 +0,0 @@
-* Keybindings for the mailer
-
- Delete key: Deletes message, moves forward.
-
-* Keybindings for the composer
-
- Control-s: Saves message to file.
- Control-w: Closes composer window.
- Control-Return: Sends message now.
-
- F6: Opens find dialog.
- F7: Opens replace dialog.
-
diff --git a/doc/Makefile.am b/doc/Makefile.am
deleted file mode 100644
index 7b5420fee8..0000000000
--- a/doc/Makefile.am
+++ /dev/null
@@ -1 +0,0 @@
-SUBDIRS = C devel
diff --git a/doc/NAMESPACE b/doc/NAMESPACE
deleted file mode 100644
index 4ca7c454d1..0000000000
--- a/doc/NAMESPACE
+++ /dev/null
@@ -1,65 +0,0 @@
-
- Here is how both the Evolution implementation and IDL namespacing
-is to be organized, NB. for implementations and oafinfo filenames we replace
-'/' with '_'
-
-Files:
-
-/GNOME/Evolution/
-
- Addressbook/
- Calendar/
- Control
- gnomecal
- Composer/
- Mail/
- Notes/
- Shell/
- Summary/
- test
- rdf
- Wombat/
-
-Components:
-
- Shell components end in _ShellComponent, controls in _Control,
-executive summary components in _ExecutiveSummaryComponent and
-factories append 'Factory'.
-
-GNOME/
- Evolution/
-
- Shell
-
- Addressbook/
- MiniCard/
- Control, ControlFactory
- SelectNames, SelectNamesFactory
- Control, ControlFactory
- ShellComponent, ShellComponentFactory
- Calendar/
- iTip/
- Control, ControlFactory
- Control, ControlFactory
- ShellComponent, ShellComponentFactory
- ExecutiveSummaryComponent, ExecutiveSummaryComponentFactory
- Mail/
- Control, ControlFactory
- ShellComponent, ShellComponentFactory
- ExecutiveSummaryComponent, ExecutiveSummaryComponentFactory
- Composer, ComposerFactory
- Notes/
- control, controlFactory
- shellComponent, shellComponentFactory
- Summary/
- rdf/
- SummaryComponent, SummaryComponentFactory
- test/
- Component, ComponentFactory
-
- ShellComponent, ShellComponentFactory
-
- Wombat/
- ServerFactory
- CalendarFactory
-
diff --git a/doc/README_Translations b/doc/README_Translations
deleted file mode 100644
index e7aba84da0..0000000000
--- a/doc/README_Translations
+++ /dev/null
@@ -1,45 +0,0 @@
-The translations for evolution-guide should be placed in
-evolution/doc/<LANG_CODE>
-
-In this directory you'll find two scripts.
- - update_po.pl -- Usage: ./update_po.pl <LANG_CODE>
- Takes the sgml files from the C directory and creates sgml.po files
- in a directory called <LANG_CODE>.po
- You should translate this files as you would any other .po file, but
- you have to make sure you place all tags and don't miss anyone.
-
- - update_translation.pl -- Usage: ./update_translation.pl <LANG_CODE>
- Takes the sgml files from the C directory, the sgml.po files from the
- <LANG_CODE>.po directory and creates the translated sgml files and
- places them on the <LANG_CODE> directory.
- If a paragraph it is not translated the originial paragraph in english
- is used instead (fuzzy paragraph are considered as translated for the
- moment). Ding it this way you can make sure you didn't miss any sgml
- tag on the .po files by compiling the evolution guide.
-
-Of course, translations can be done as usual translating the .sgml files
-directly.
-But let me point out a few advantages of doing it this way.
-* You can start translating the guide as soon as you want. Doesn't matter if
- the original files changes. No more waiting for the docu to be called
- stable.
-
-* When a paragraph changes, it is marked as fuzzy, so you don't have to be
- playing with diff to find out if the original sgml file changed and where.
-
-* You don't need to keep several copies of the sgml files (usually you have
- to keep a copy of the file you are translating and an up-to-date copy to be
- able to do a diff, to find out the changes)
-
-
-If you want to make any modification to my scripts, please let me know before
-you do so and send me an explanation of the changes you want to make (this is
-only for learning purposes, I allways like to know how to make a better script)
-Of course, the scripts are under GPL, so you can do with them allmost anything
-you want.
-If you want to use this scripts in any other project different from the
-evolution guide translation, please let me know (just to make me fell good
-because people is using something I wrote ;-) )
-
-
-Héctor García Álvarez <hector@scouts-es.org>
diff --git a/doc/devel/.cvsignore b/doc/devel/.cvsignore
deleted file mode 100644
index c24a54fbcc..0000000000
--- a/doc/devel/.cvsignore
+++ /dev/null
@@ -1,4 +0,0 @@
-Makefile
-Makefile.in
-html
-evolution-devel-guide.html
diff --git a/doc/devel/ChangeLog b/doc/devel/ChangeLog
deleted file mode 100644
index d00a1df434..0000000000
--- a/doc/devel/ChangeLog
+++ /dev/null
@@ -1,159 +0,0 @@
-2001-01-26 John R. Sheets <dusk@ravendusk.org>
-
- * importer/Makefile.am: Change (nonexistant) importer.sgml
- references to evolution-importer.sgml to fix dependency problem.
-
-2001-01-17 Iain Holmes <iain@ximian.com>
-
- * Makefile.am (local_entities): Added the importer stuff.
-
- * evolution-devel-guide.sgml: Added entities for the importer documents.
-
- * reference.sgml: Added the public and private APIs for the importer.
-
- * importer/*: New directory containing all the documenation for the
- importer.
-
-2001-01-17 Federico Mena Quintero <federico@ximian.com>
-
- * evolution-devel-guide.sgml: Ximianified.
-
- * calendar/evolution-calendar.sgml: Ditto.
-
- * calendar/cal-util/evolution-cal-util-sections.txt: Updated.
-
- * calendar/cal-client/evolution-cal-client-sections.txt: Updated.
-
-2001-01-10 Federico Mena Quintero <federico@helixcode.com>
-
- * Makefile.am: Make it work when gtk-doc is not installed.
-
- * calendar/cal-client/Makefile.am: Likewise.
-
- * calendar/cal-util/Makefile.am: Likewise.
-
-2000-12-19 Federico Mena Quintero <federico@helixcode.com>
-
- Added proper dependency lists to the gtk-doc mess.
-
- * calendar/cal-client/Makefile.am (TARGET_DIR): Removed unused
- variable.
- (SOURCE_FILES): New variable with the list of source files we
- depend on.
- (IGNORED_SOURCE_HEADERS): New variable with the headers we ignore
- for the gtkdoc-scan phase.
- (scan_generated):
- (tmpl_dependencies):
- (tmpl_sources):
- (tmpl_generated);
- (sgml_dependencies):
- (sgml_generated): Lists of stuff that is generated and that other
- stuff depends on.
- (all): Added the $(sgml_generated) as the final target.
- (install-data-local): Added an installation hook; gtk-doc seems to
- want some of its generated files to be installed.
-
- * calendar/cal-client/evolution-cal-client-sections.txt: Updated.
-
- * calendar/cal-util/Makefile.am: Made the same changes as for
- calendar/cal-client/Makefile.am.
-
- * calendar/cal-util/evolution-cal-util-sections.txt: Updated.
-
- * Makefile.am (local_entities): Added alarm-generation.sgml.
- (all): Made the main target be the html/index.html.
-
-2000-12-18 Federico Mena Quintero <federico@helixcode.com>
-
- * calendar/alarm-generation.sgml: New file with a description of
- the algorithm used to generate alarm instances.
-
- * evolution-devel-guide.sgml: Added an entity for the above
- chapter.
-
- * calendar/evolution-calendar.sgml: Reference the entity here.
-
- * calendar/Makefile.am (EXTRA_DIST): Added alarm-generation.sgml.
-
-2000-12-13 Larry Ewing <lewing@helixcode.com>
-
- * calendar/Makefile.am (EXTRA_DIST): make it public-reference.sgml
- not referenc.sgml here.
-
-2000-11-29 Federico Mena Quintero <federico@helixcode.com>
-
- * calendar/architecture.sgml: Finished the calendar architecture
- chapter.
-
-2000-11-29 Federico Mena Quintero <federico@helixcode.com>
-
- * evolution-devel-guide.sgml: Added an id for the API reference <part>.
- Added the FDL <legalnotice>.
- Added the preface and toplevel reference entities.
- Added entities for Evolution, Wombat, and Camel.
- Added an appendix for the GNU FDL.
-
- * preface.sgml: New file with the introduction to the Evolution
- Developer's Guide.
-
- * reference.sgml: Split the toplevel reference part into its own
- file.
-
- * fdl.sgml: Added the GNU Free Documentation License.
-
- * calendar/evolution-calendar.sgml: Added an id for the <part>.
-
- * calendar/public-reference.sgml: Added an id for the <reference>.
- Moved this file over from calendar/reference.sgml.
-
- * Makefile.am (local_entities): Added a list of the SGML files
- that define entities for inclusion in the toplevel document. This
- way we can track documentation file dependencies down to all
- levels.
- (html/index.html): Made the toplevel document depend on
- $(local_entities). Also, removed the "html" target and put its
- contents directly here; this way we avoid having .PHONY targets.
- (EXTRA_DIST): Removed the evolution_devel_guideDATA; it made no
- sense.
- (content_files): Added preface.sgml and reference.sgml.
-
-2000-09-15 Federico Mena Quintero <federico@helixcode.com>
-
- * evolution-devel-guide.sgml: Made the toplevel <book> id be
- "index".
-
-2000-08-14 Federico Mena Quintero <federico@helixcode.com>
-
- * calendar/cal-util/*: Integrated the cal-util library into the
- documentation framework.
-
- * calendar/Makefile.am (SUBDIRS): Added the cal-util directory.
-
- * evolution-devel-guide.sgml: Added entities for the cal-util stuff.
- Added entity for libical.
-
- * calendar/reference.sgml: Added the cal-util reference entries.
-
- * calendar/cal-client/evolution-cal-client-sections.txt: Updated
- for new API.
-
-2000-08-09 Peter Williams <peterw@helixcode.com>
-
- * Makefile.am (maintainer-clean-local): Don't depend
- on 'clean'; this messes up maintainer-clean.
-
-2000-07-17 Federico Mena Quintero <federico@helixcode.com>
-
- * calendar/cal-client/tmpl/cal-client.sgml: Populated.
-
- * evolution-devel-guide.sgml: New <book> toplevel for the
- Evolution Developer's Guide.
-
- * calendar/evolution-calendar.sgml: New <part> for the calendar
- developer's documentation.
-
- * calendar/architecture.sgml: New <chapter> for the calendar
- architecture.
-
- * calendar/reference.sgml: New <reference> for the calendar API
- reference.
diff --git a/doc/devel/Makefile.am b/doc/devel/Makefile.am
deleted file mode 100644
index c5ee7a8e50..0000000000
--- a/doc/devel/Makefile.am
+++ /dev/null
@@ -1,84 +0,0 @@
-SUBDIRS = calendar importer executive-summary
-
-# The name of the module.
-DOC_MODULE=evolution-devel-guide
-
-# The top-level SGML file.
-DOC_MAIN_SGML_FILE=evolution-devel-guide.sgml
-
-HTML_DIR=$(datadir)/gnome/html
-
-TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
-
-# Add your toplevel files here
-
-content_files = \
- evolution-devel-guide.sgml \
- fdl.sgml \
- preface.sgml \
- reference.sgml
-
-# Add your module's hand-written and auto-generated files here; these
-# are used for dependency tracking.
-
-local_entities = \
- calendar/alarm-generation.sgml \
- calendar/architecture.sgml \
- calendar/evolution-calendar.sgml \
- calendar/public-reference.sgml \
- \
- calendar/cal-client/sgml/cal-client.sgml \
- \
- calendar/cal-util/sgml/cal-component.sgml \
- calendar/cal-util/sgml/cal-recur.sgml \
- calendar/cal-util/sgml/cal-util.sgml \
- calendar/cal-util/sgml/timeutil.sgml \
- \
- importer/sgml/evolution-importer.sgml \
- importer/sgml/evolution-importer-client.sgml \
- \
- executive-summary/sgml/executive-summary-component.sgml \
- executive-summary/sgml/executive-summary-component-factory.sgml \
- executive-summary/sgml/executive-summary-component-factory-client.sgml \
- executive-summary/sgml/executive-summary-html-view.sgml
-
-EXTRA_DIST = \
- $(content_files)
-
-all: html/index.html
-
-if ENABLE_GTK_DOC
-html/index.html: $(content_files) $(local_entities)
- test -d $(srcdir)/html || mkdir $(srcdir)/html
- -cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
-else
-html/index.html:
-endif
-
-clean-local:
- rm -f *~ *.bak *.signals *-unused.txt
-
-maintainer-clean-local:
- cd $(srcdir) && rm -rf html
-
-if ENABLE_GTK_DOC
-install-data-local:
- $(mkinstalldirs) $(DESTDIR)$(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 $(DESTDIR)$(TARGET_DIR); \
- done; \
- echo '-- Installing $(srcdir)/html/index.sgml' ; \
- $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR); \
- echo '-- Fixing Crossreferences' ; \
- gtkdoc-fixxref --module=$(DOC_MODULE) --html-dir=$(HTML_DIR)|| true; \
- fi)
-endif
-
-dist-hook:
- mkdir $(distdir)/html
- -cp $(srcdir)/html/*.html $(srcdir)/html/*.css $(distdir)/html
diff --git a/doc/devel/calendar/.cvsignore b/doc/devel/calendar/.cvsignore
deleted file mode 100644
index 282522db03..0000000000
--- a/doc/devel/calendar/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/doc/devel/calendar/Makefile.am b/doc/devel/calendar/Makefile.am
deleted file mode 100644
index 207672f303..0000000000
--- a/doc/devel/calendar/Makefile.am
+++ /dev/null
@@ -1,7 +0,0 @@
-SUBDIRS = cal-client cal-util
-
-EXTRA_DIST = \
- alarm-generation.sgml \
- architecture.sgml \
- evolution-calendar.sgml \
- public-reference.sgml
diff --git a/doc/devel/calendar/alarm-generation.sgml b/doc/devel/calendar/alarm-generation.sgml
deleted file mode 100644
index 77d35258da..0000000000
--- a/doc/devel/calendar/alarm-generation.sgml
+++ /dev/null
@@ -1,139 +0,0 @@
- <chapter id="calendar-alarm-generation">
- <title>How the Wombat generates alarm instances</title>
-
- <para>
- This chapter describes the algorithm that the &Wombat; uses
- internally to generate instances of a calendar component's
- alarms. You do not need to read this chapter if you are simply
- using the client-side functions.
- </para>
-
- <sect1 id="what-makes-up-an-alarm-trigger">
- <title>What makes up an alarm trigger</title>
-
- <para>
- VTODO and VEVENT calendar components can have any number of
- alarms defined for them. Each alarm has a trigger
- specification, an alarm type (display, audio, email, or
- procedure), and data corresponding to the alarm type. The
- Wombat side of things is interested only in the trigger
- specification, since this is all that the Wombat needs to
- produce alarm instances.
- </para>
-
- <para>
- An alarm trigger can be relative or absolute. Relative
- triggers occur a certain time before or after the start or end
- of a calendar component's occurrence. For example, you could
- configure a trigger to notify you 15 minutes before an
- appointment starts, so that you can get to its location on
- time; or another one to notify you 5 minutes after another
- person's meeting has ended, so that you can call that person
- on the phone after the meeting and not disturb him while
- there. Absolute triggers occur at a specific point in time;
- you can configure an alarm to trigger exactly at a particular
- date and time that has no relation to the component's
- occurrences at all.
- </para>
- </sect1>
-
- <sect1 id="generating-trigger-instances">
- <title>Generating trigger instances</title>
-
- <para>
- Generating absolute triggers is trivial; you just use the date
- and time they specify. However, relative triggers are
- associated to recurrence instances, so in order to generate
- trigger instances we must generate the corresponding
- recurrence instances and compute the trigger times based on
- those.
- </para>
-
- <para>
- Since relative triggers are specified as occurring a certain
- amount of time before or after each of a calendar component's
- recurrence instances, we can compute a trigger time by adding
- or subtracting that amount of time to the corresponding
- recurrence instance's time.
- </para>
-
- <para>
- Recurrence instances are generated by specifying a range of
- time and asking the Wombat to generate the instances that
- occur within that range. We shall see that the range of time
- in which instances occur is not necessarily the same range of
- time in which those instances' alarm triggers occur.
- </para>
-
- <para>
- Consider an alarm that is set to trigger 10 minutes before the
- start time of an event's occurrence, that is, the trigger has
- an offset of -10 minutes. Say this event recurs every hour at
- 5 minutes past the hour: it would occur at 1:05, 2:05, 3:05,
- etc.; the corresponding triggers would occur at 12:55, 1:55,
- 2:55, etc. If we wish to compute the alarm triggers that
- occur between 4:00 and 6:00 (which would be at 4:55 and 5:55),
- then we cannot just generate recurrence instances between 4:00
- and 6:00 because we will miss the 6:05 occurrence which
- corresponds to the 5:55 trigger.
- </para>
-
- <para>
- The solution is to expand the range of time on both sides to
- fit the relative triggers that have the largest time periods.
- If a trigger's offset is negative, like the -10 minutes in the
- example above, then we must expand the
- <emphasis>end</emphasis> of the time range: in the case above,
- the range's ending time of 6:00 must be grown by 10 minutes to
- 6:10 so that the last recurrence instance will be that of
- 6:05; computing the trigger's offset we will get the 5:55
- trigger, which is what we wanted. For triggers with positive
- offsets, like if an alarm were to trigger 20 minutes after an
- event's occurrence, we must expand the
- <emphasis>start</emphasis> of the time range in an analogous
- way, by subtracting the time offset from it.
- </para>
-
- <para>
- Again, absolute triggers need no special computation. We can
- just see if the trigger time is within the requested range of
- time, and if so, we take that trigger occurrence into account
- for the final result.
- </para>
- </sect1>
-
- <sect1 id="alarm-trigger-generation-code">
- <title>Alarm trigger generation code</title>
-
- <para>
- The main function to generate alarm trigger instances is
- <function>generate_alarms_for_comp()</function> in
- <filename>evolution/calendar/pcs/cal-backend-file.c</filename>.
- This function calls <function>compute_alarm_range()</function>
- to expand the specified range of time in the way described in
- the previous section. It then generates the instances for
- relative alarm triggers inside the
- <function>add_alarm_occurrences_cb()</function> callback,
- which is used by
- <function>cal_recur_generate_instances()</function> with the
- expanded range of time. The callback goes through all of the
- calendar component's relative alarm triggers and adds the
- trigger offsets to the occurrence's time; the results are
- added as <structname>CalAlarmInstance</structname> structures
- to the final list of trigger instances. Finally,
- <function>generate_alarms_for_comp()</function> calls
- <function>generate_absolute_triggers()</function>, which
- simply adds the instances for absolute alarm triggers; these
- are the absolute times that are within the time range that was
- requested originally. In the very end, the list of instances
- is sorted to produce nicer results.
- </para>
- </sect1>
- </chapter>
-
-<!--
-Local variables:
-mode: sgml
-sgml-parent-document: ("../evolution-devel-guide.sgml" "book" "part" "")
-End:
--->
diff --git a/doc/devel/calendar/architecture.sgml b/doc/devel/calendar/architecture.sgml
deleted file mode 100644
index d261f0a7f4..0000000000
--- a/doc/devel/calendar/architecture.sgml
+++ /dev/null
@@ -1,162 +0,0 @@
- <chapter id="calendar-architecture">
- <title>Architecture of the Calendar</title>
-
- <para>
- This chapter gives an overview of the &Evolution; Calendar
- architecture. It describes the model/view split of the calendar
- into a personal calendar server, or &PCS;, and the GUI clients
- that appear inside the &Evolution; Shell.
- </para>
-
- <!-- Model/View Separation -->
-
- <sect1 id="calendar-model-view">
- <title>Model/View Separation</title>
-
- <para>
- Like other base components in &Evolution;, the calendar
- separates the data model from the views or clients. This is
- done so that multiple clients can access the same calendar
- data in an orderly fashion and without clashes. For example,
- the user may be running a graphical calendar client. If he
- then wants to synchronize his calendar with a handheld device,
- then the corresponding synchronization program (e.g. a conduit
- for the <application>gnome-pilot</application> package) will
- also need to access the calendar storage. It is important
- that both the GUI client and the synchronization program keep
- a consistent view of the calendar at all times, otherwise one
- of them will be left in an inconsistent state if the
- calendar's data changes unexpectedly.
- </para>
-
- <para>
- &Evolution; puts the calendar storage in a daemon called the
- &Wombat; and completely separates it from clients who wants to
- access calendar data. This part of the &Wombat; is called the
- personal calendar server, or &PCS;. Clients must contact the
- &PCS; and ask it to open an existing calendar or create a new
- one. When a calendar component object (e.g. an appointment or
- to-do item) changes in the &PCS; it will notify all the
- clients that are using the component's parent calendar.
- </para>
- </sect1>
-
- <!-- Personal Calendar Server -->
-
- <sect1>
- <title>Personal Calendar Server</title>
-
- <para>
- The personal calendar server, or &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:
- </para>
-
- <formalpara>
- <title>Storage</title>
-
- <para>
- 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.
- </para>
- </formalpara>
-
- <formalpara>
- <title>Basic Queries</title>
-
- <para>
- 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.
- </para>
- </formalpara>
-
- <formalpara>
- <title>Recurrence and Alarm Queries</title>
-
- <para>
- Looking for the events that recur or have alarm triggers in
- a specific period of time involves scanning all the
- appointments in a calendar. To keep clients from having to
- load whole calendars at once, the &PCS; can do these
- computations and send the results to clients.
- </para>
- </formalpara>
-
- <formalpara>
- <title>Modification Log</title>
-
- <para>
- To allow multiple handheld devices to be synchronized
- against a calendar, the &PCS; keeps a log of all the
- modifications that are done to the calendar. When an
- appointment is updated or removed, the &PCS; logs this
- action in the modification log. Synchronization conduit
- programs can then use this information to do their work.
- </para>
- </formalpara>
- </sect1>
-
- <!-- Data Views -->
-
- <sect1>
- <title>Data Views</title>
-
- <para>
- &Evolution; provides a graphical calendar client inside the
- shell that is just a view onto the data stored in the personal
- calendar server. You can launch as many views of a calendar
- as you like and they will all receive notification from the
- &PCS; when changes occur. The views are then responsible for
- updating their respective displays.
- </para>
-
- <para>
- Even within a single calendar view in the &Evolution; shell
- there can be multiple clients of a single calendar. For
- example, in the day view of the &Evolution; calendar there are
- three widgets that act as three different clients of the
- &PCS;: the multi-day view, the busy days calendar, and the
- task list.
- </para>
- </sect1>
-
- <!-- Non-graphical Clients -->
-
- <sect1>
- <title>Non-graphical Clients</title>
-
- <para>
- Clients of the personal calendar server can be non-graphical,
- that is, they do not have to provide views of the data to the
- user. Examples of such clients are the synchronization
- conduit programs for handheld devices. These usually run with
- no user interface as a result of being invoked by a daemon
- that watches the connection to a handheld device. For
- example, the calendar synchronization conduit in &Evolution;
- gets run when the <application>gpilotd</application> daemon
- from the <application>gnome-pilot</application> package
- detects that the HotSync button has been pressed on a Palm
- Pilot device.
- </para>
-
- <para>
- Such clients simply take advantage of the centralized storage
- in the &PCS; without presenting any graphical display of the
- data; they just act as middlemen between the &PCS; and other
- applications.
- </para>
- </sect1>
- </chapter>
-
-<!--
-Local variables:
-mode: sgml
-sgml-parent-document: ("../evolution-devel-guide.sgml" "book" "part" "")
-End:
--->
diff --git a/doc/devel/calendar/cal-client/.cvsignore b/doc/devel/calendar/cal-client/.cvsignore
deleted file mode 100644
index 0842a93f7a..0000000000
--- a/doc/devel/calendar/cal-client/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-sgml
-Makefile
-Makefile.in
diff --git a/doc/devel/calendar/cal-client/Makefile.am b/doc/devel/calendar/cal-client/Makefile.am
deleted file mode 100644
index f3a2b39ec6..0000000000
--- a/doc/devel/calendar/cal-client/Makefile.am
+++ /dev/null
@@ -1,131 +0,0 @@
-# The name of the module.
-DOC_MODULE=evolution-cal-client
-
-# The directory containing the source code (if it contains documentation).
-DOC_SOURCE_DIR=$(EVOLUTION_DIR)/calendar/cal-client
-
-CFLAGS =" \
- -I$(top_srcdir)/calendar \
- -I$(top_srcdir) \
- -I$(top_builddir) \
- -I$(top_builddir)/libical/src/libical \
- -I$(top_srcdir)/libical/src/libical \
- $(BONOBO_VFS_GNOME_CFLAGS) \
- "
-
-LDFLAGS=" \
- $(BONOBO_VFS_GNOME_LIBS) \
- $(top_builddir)/calendar/cal-client/.libs/libcal-client.a \
- $(top_builddir)/calendar/cal-util/.libs/libcal-util.a \
- $(top_builddir)/libical/src/libical/.libs/libical.a \
- $(top_builddir)/libversit/.libs/libversit.al \
- "
-
-DOC_DIR=$(datadir)/gnome/html
-
-DOC_DIR_INSTALL_FILES = \
- evolution-cal-client.args \
- evolution-cal-client.hierarchy \
- evolution-cal-client.signals \
- evolution-cal-client.types \
- evolution-cal-client-decl.txt \
- evolution-cal-client-sections.txt
-
-SOURCE_FILES = \
- $(top_srcdir)/calendar/cal-client/cal-client.c \
- $(top_srcdir)/calendar/cal-client/cal-client.h \
- $(top_srcdir)/calendar/cal-client/cal-client-types.c \
- $(top_srcdir)/calendar/cal-client/cal-client-types.h
-
-IGNORED_HEADER_FILES = \
- cal-listener.h \
- evolution-calendar.h
-
-scan_generated = \
- evolution-cal-client-decl.txt \
- evolution-cal-client.args \
- evolution-cal-client.hierarchy \
- evolution-cal-client.signals \
- evolution-cal-client.types
-
-tmpl_dependencies = \
- evolution-cal-client-decl.txt \
- evolution-cal-client-sections.txt \
- evolution-cal-client.args \
- evolution-cal-client.hierarchy \
- evolution-cal-client.signals
-
-tmpl_sources = \
- tmpl/cal-client.sgml \
- tmpl/evolution-cal-client-unused.sgml
-
-tmpl_generated = \
- evolution-cal-client-unused.txt
-
-sgml_dependencies = \
- evolution-cal-client-decl.txt \
- evolution-cal-client-sections.txt \
- evolution-cal-client.args \
- evolution-cal-client.hierarchy \
- evolution-cal-client.signals \
- tmpl/cal-client.sgml
-
-sgml_generated = \
- sgml/cal-client.sgml \
- sgml/evolution-cal-client-doc.bottom \
- sgml/evolution-cal-client-doc.top \
- sgml/object_index.sgml \
- sgml/tree_index.sgml
-
-EXTRA_DIST = \
- evolution-cal-client.args \
- evolution-cal-client.hierarchy \
- evolution-cal-client.signals \
- evolution-cal-client.types \
- evolution-cal-client-decl.txt \
- evolution-cal-client-sections.txt
-
-all: $(sgml_generated)
-
-if ENABLE_GTK_DOC
-scan $(scan_generated): $(SOURCE_FILES)
- -(cd $(srcdir) \
- && env CFLAGS=$(CFLAGS) LDFLAGS=$(LDFLAGS) \
- gtkdoc-scanobj --module=$(DOC_MODULE) \
- && gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) \
- --ignore-headers="$(IGNORED_HEADER_FILES)" )
-
-templates $(tmpl_sources) $(tmpl_generated): $(tmpl_dependencies)
- cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE)
-
-sgml $(sgml_generated): $(sgml_dependencies)
- cd $(srcdir) \
- && gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR)
-else
-scan $(scan_generated): $(SOURCE_FILES)
-
-templates $(tmpl_sources) $(tmpl_generated): $(tmpl_dependencies)
-
-sgml $(sgml_generated): $(sgml_dependencies)
-endif
-
-clean-local:
- rm -f *~ *.bak *.signals *-unused.txt
-
-maintainer-clean-local: clean
- cd $(srcdir) && rm -rf sgml $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
-
-install-data-local:
- $(mkinstalldirs) $(DOC_DIR)
- for i in $(DOC_DIR_INSTALL_FILES); do \
- $(INSTALL_DATA) $$i $(DOC_DIR); \
- done
-
-dist-hook:
- mkdir $(distdir)/sgml
- mkdir $(distdir)/tmpl
- -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
- -cp $(srcdir)/sgml/*.sgml $(distdir)/sgml
- -cp $(srcdir)/sgml/*.bottom $(srcdir)/sgml/*.top $(distdir)/sgml
-
-.PHONY: scan templates sgml
diff --git a/doc/devel/calendar/cal-client/evolution-cal-client-decl.txt b/doc/devel/calendar/cal-client/evolution-cal-client-decl.txt
deleted file mode 100644
index 0bc30e6462..0000000000
--- a/doc/devel/calendar/cal-client/evolution-cal-client-decl.txt
+++ /dev/null
@@ -1,161 +0,0 @@
-<MACRO>
-<NAME>CAL_CLIENT_TYPE</NAME>
-#define CAL_CLIENT_TYPE (cal_client_get_type ())
-</MACRO>
-<MACRO>
-<NAME>CAL_CLIENT</NAME>
-#define CAL_CLIENT(obj) (GTK_CHECK_CAST ((obj), CAL_CLIENT_TYPE, CalClient))
-</MACRO>
-<MACRO>
-<NAME>CAL_CLIENT_CLASS</NAME>
-#define CAL_CLIENT_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), CAL_CLIENT_TYPE, CalClientClass))
-</MACRO>
-<MACRO>
-<NAME>IS_CAL_CLIENT</NAME>
-#define IS_CAL_CLIENT(obj) (GTK_CHECK_TYPE ((obj), CAL_CLIENT_TYPE))
-</MACRO>
-<MACRO>
-<NAME>IS_CAL_CLIENT_CLASS</NAME>
-#define IS_CAL_CLIENT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), CAL_CLIENT_TYPE))
-</MACRO>
-<STRUCT>
-<NAME>CalClient</NAME>
-</STRUCT>
-<STRUCT>
-<NAME>CalClientClass</NAME>
-</STRUCT>
-<STRUCT>
-<NAME>CalClientPrivate</NAME>
-</STRUCT>
-<ENUM>
-<NAME>CalClientOpenStatus</NAME>
-typedef enum {
- CAL_CLIENT_OPEN_SUCCESS,
- CAL_CLIENT_OPEN_ERROR,
- CAL_CLIENT_OPEN_NOT_FOUND,
- CAL_CLIENT_OPEN_METHOD_NOT_SUPPORTED
-} CalClientOpenStatus;
-</ENUM>
-<ENUM>
-<NAME>CalClientGetStatus</NAME>
-typedef enum {
- CAL_CLIENT_GET_SUCCESS,
- CAL_CLIENT_GET_NOT_FOUND,
- CAL_CLIENT_GET_SYNTAX_ERROR
-} CalClientGetStatus;
-</ENUM>
-<ENUM>
-<NAME>CalClientLoadState</NAME>
-typedef enum {
- CAL_CLIENT_LOAD_NOT_LOADED,
- CAL_CLIENT_LOAD_LOADING,
- CAL_CLIENT_LOAD_LOADED
-} CalClientLoadState;
-</ENUM>
-<STRUCT>
-<NAME>CalClient</NAME>
-struct CalClient {
- GtkObject object;
-
- /* Private data */
- CalClientPrivate *priv;
-};
-</STRUCT>
-<FUNCTION>
-<NAME>cal_client_get_type</NAME>
-<RETURNS>GtkType </RETURNS>
-void
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_client_construct</NAME>
-<RETURNS>CalClient *</RETURNS>
-CalClient *client
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_client_new</NAME>
-<RETURNS>CalClient *</RETURNS>
-void
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_client_open_calendar</NAME>
-<RETURNS>gboolean </RETURNS>
-CalClient *client, const char *str_uri, gboolean only_if_exists
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_client_get_load_state</NAME>
-<RETURNS>CalClientLoadState </RETURNS>
-CalClient *client
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_client_get_uri</NAME>
-<RETURNS>const char *</RETURNS>
-CalClient *client
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_client_get_n_objects</NAME>
-<RETURNS>int </RETURNS>
-CalClient *client, CalObjType type
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_client_get_object</NAME>
-<RETURNS>CalClientGetStatus </RETURNS>
-CalClient *client,const char *uid,CalComponent **comp
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_client_get_uids</NAME>
-<RETURNS>GList *</RETURNS>
-CalClient *client, CalObjType type
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_client_get_changes</NAME>
-<RETURNS>GList *</RETURNS>
-CalClient *client, CalObjType type, const char *change_id
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_client_get_objects_in_range</NAME>
-<RETURNS>GList *</RETURNS>
-CalClient *client, CalObjType type,time_t start, time_t end
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_client_generate_instances</NAME>
-<RETURNS>void </RETURNS>
-CalClient *client, CalObjType type,time_t start, time_t end,CalRecurInstanceFn cb, gpointer cb_data
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_client_get_alarms_in_range</NAME>
-<RETURNS>GSList *</RETURNS>
-CalClient *client, time_t start, time_t end
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_client_free_alarms</NAME>
-<RETURNS>void </RETURNS>
-GSList *comp_alarms
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_client_get_alarms_for_object</NAME>
-<RETURNS>gboolean </RETURNS>
-CalClient *client, const char *uid,time_t start, time_t end,CalComponentAlarms **alarms
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_client_update_object</NAME>
-<RETURNS>gboolean </RETURNS>
-CalClient *client, CalComponent *comp
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_client_remove_object</NAME>
-<RETURNS>gboolean </RETURNS>
-CalClient *client, const char *uid
-</FUNCTION>
-<ENUM>
-<NAME>CalClientChangeType</NAME>
-typedef enum {
- CAL_CLIENT_CHANGE_ADDED = 1 << 0,
- CAL_CLIENT_CHANGE_MODIFIED = 1 << 1,
- CAL_CLIENT_CHANGE_DELETED = 1 << 2
-} CalClientChangeType;
-</ENUM>
-<FUNCTION>
-<NAME>cal_client_change_list_free</NAME>
-<RETURNS>void </RETURNS>
-GList *list
-</FUNCTION>
diff --git a/doc/devel/calendar/cal-client/evolution-cal-client-sections.txt b/doc/devel/calendar/cal-client/evolution-cal-client-sections.txt
deleted file mode 100644
index 0ce8d9427d..0000000000
--- a/doc/devel/calendar/cal-client/evolution-cal-client-sections.txt
+++ /dev/null
@@ -1,44 +0,0 @@
-<INCLUDE>cal-client/cal-client.h</INCLUDE>
-
-<SECTION>
-<FILE>cal-client</FILE>
-CAL_CLIENT
-<TITLE>CalClient</TITLE>
-
-CalClientOpenStatus
-CalClientGetStatus
-CalClientLoadState
-
-CalClientChangeType
-
-cal_client_new
-cal_client_open_calendar
-cal_client_get_load_state
-cal_client_get_uri
-cal_client_get_n_objects
-cal_client_get_uids
-cal_client_get_object
-cal_client_get_changes
-cal_client_change_list_free
-cal_client_get_objects_in_range
-cal_client_generate_instances
-cal_client_get_alarms_in_range
-cal_client_free_alarms
-cal_client_get_alarms_for_object
-cal_client_update_object
-cal_client_remove_object
-
-<SUBSECTION Standard>
-
-CAL_CLIENT_TYPE
-IS_CAL_CLIENT
-CAL_CLIENT_CLASS
-IS_CAL_CLIENT_CLASS
-cal_client_get_type
-cal_client_construct
-
-<SUBSECTION Private>
-CalClient
-CalClientPrivate
-
-</SECTION>
diff --git a/doc/devel/calendar/cal-client/evolution-cal-client.args b/doc/devel/calendar/cal-client/evolution-cal-client.args
deleted file mode 100644
index e69de29bb2..0000000000
--- a/doc/devel/calendar/cal-client/evolution-cal-client.args
+++ /dev/null
diff --git a/doc/devel/calendar/cal-client/evolution-cal-client.hierarchy b/doc/devel/calendar/cal-client/evolution-cal-client.hierarchy
deleted file mode 100644
index 88efa3e673..0000000000
--- a/doc/devel/calendar/cal-client/evolution-cal-client.hierarchy
+++ /dev/null
@@ -1,2 +0,0 @@
-GtkObject
- CalClient
diff --git a/doc/devel/calendar/cal-client/evolution-cal-client.signals b/doc/devel/calendar/cal-client/evolution-cal-client.signals
deleted file mode 100644
index 65d142777a..0000000000
--- a/doc/devel/calendar/cal-client/evolution-cal-client.signals
+++ /dev/null
@@ -1,21 +0,0 @@
-<SIGNAL>
-<NAME>CalClient::cal-opened</NAME>
-<RETURNS>void</RETURNS>
-CalClient *calclient
-gint arg1
-</SIGNAL>
-
-<SIGNAL>
-<NAME>CalClient::obj-updated</NAME>
-<RETURNS>void</RETURNS>
-CalClient *calclient
-gchar *arg1
-</SIGNAL>
-
-<SIGNAL>
-<NAME>CalClient::obj-removed</NAME>
-<RETURNS>void</RETURNS>
-CalClient *calclient
-gchar *arg1
-</SIGNAL>
-
diff --git a/doc/devel/calendar/cal-client/evolution-cal-client.types b/doc/devel/calendar/cal-client/evolution-cal-client.types
deleted file mode 100644
index 84d65a6637..0000000000
--- a/doc/devel/calendar/cal-client/evolution-cal-client.types
+++ /dev/null
@@ -1,4 +0,0 @@
-#include <gnome.h>
-#include <cal-client/cal-client.h>
-
-cal_client_get_type
diff --git a/doc/devel/calendar/cal-client/tmpl/cal-client.sgml b/doc/devel/calendar/cal-client/tmpl/cal-client.sgml
deleted file mode 100644
index 06195ca454..0000000000
--- a/doc/devel/calendar/cal-client/tmpl/cal-client.sgml
+++ /dev/null
@@ -1,303 +0,0 @@
-<!-- ##### SECTION Title ##### -->
-CalClient
-
-<!-- ##### SECTION Short_Description ##### -->
-GTK+ object for communication with personal calendar server.
-
-<!-- ##### SECTION Long_Description ##### -->
- <para>
- The #CalClient object provides a nice GTK+ wrapper for the CORBA
- interfaces that are used to communicate between calendar clients
- and the personal calendar server in the user's Wombat daemon. The
- CORBA interfaces transfer calendar components in RFC 2445 text
- format; the #CalClient object automatically converts these into
- #CalComponent structures that are easier to handle.
- </para>
-
- <para>
- After a #CalClient object is created with cal_client_new(), it
- should be asked to send a request to the personal calendar server
- to load or create a calendar based on its URI. The server will
- asynchronously notify the client about completion of the request,
- and will return an appropriate result code; this should be noted
- by the client with the <link
- linkend="CalClient--cal-loaded">cal_loaded</link> signal.
- </para>
-
- <para>
- When a client asks the server to update or delete a calendar
- component from the storage, the server will do so and then notify
- all the clients about the update or removal. This is the core of
- the model/view split between calendar clients and the storage in
- the personal calendar server. Clients should watch the <link
- linkend="calclient-obj-updated">obj_updated</link> and <link
- linkend="calclient-obj-removed">obj_removed</link> signals on the
- CalClient objects they create so that they can be notified about
- changes in the storage.
- </para>
-
-<!-- ##### SECTION See_Also ##### -->
- <para>
- #CalComponent
- </para>
-
-<!-- ##### MACRO CAL_CLIENT ##### -->
- <para>
- Casts a #GtkObject to a #CalClient.
- </para>
-
-@obj: A GTK+ object.
-
-
-<!-- ##### ENUM CalClientOpenStatus ##### -->
-<para>
-
-</para>
-
-@CAL_CLIENT_OPEN_SUCCESS:
-@CAL_CLIENT_OPEN_ERROR:
-@CAL_CLIENT_OPEN_NOT_FOUND:
-@CAL_CLIENT_OPEN_METHOD_NOT_SUPPORTED:
-
-<!-- ##### ENUM CalClientGetStatus ##### -->
- <para>
- These values describe the result of the cal_client_get_object()
- function.
- </para>
-
-@CAL_CLIENT_GET_SUCCESS:
-@CAL_CLIENT_GET_NOT_FOUND:
-@CAL_CLIENT_GET_SYNTAX_ERROR:
-
-<!-- ##### ENUM CalClientLoadState ##### -->
-<para>
-
-</para>
-
-@CAL_CLIENT_LOAD_NOT_LOADED:
-@CAL_CLIENT_LOAD_LOADING:
-@CAL_CLIENT_LOAD_LOADED:
-
-<!-- ##### ENUM CalClientChangeType ##### -->
-<para>
-
-</para>
-
-@CAL_CLIENT_CHANGE_ADDED:
-@CAL_CLIENT_CHANGE_MODIFIED:
-@CAL_CLIENT_CHANGE_DELETED:
-
-<!-- ##### FUNCTION cal_client_new ##### -->
-<para>
-
-</para>
-
-@Returns:
-
-
-<!-- ##### FUNCTION cal_client_open_calendar ##### -->
-<para>
-
-</para>
-
-@client:
-@str_uri:
-@only_if_exists:
-@Returns:
-
-
-<!-- ##### FUNCTION cal_client_get_load_state ##### -->
-<para>
-
-</para>
-
-@client:
-@Returns:
-
-
-<!-- ##### FUNCTION cal_client_get_uri ##### -->
-<para>
-
-</para>
-
-@client:
-@Returns:
-
-
-<!-- ##### FUNCTION cal_client_get_n_objects ##### -->
-<para>
-
-</para>
-
-@client:
-@type:
-@Returns:
-
-
-<!-- ##### FUNCTION cal_client_get_uids ##### -->
-<para>
-
-</para>
-
-@client:
-@type:
-@Returns:
-
-
-<!-- ##### FUNCTION cal_client_get_object ##### -->
-<para>
-
-</para>
-
-@client:
-@uid:
-@comp:
-@Returns:
-<!-- # Unused Parameters # -->
-@ico:
-
-
-<!-- ##### FUNCTION cal_client_get_changes ##### -->
-<para>
-
-</para>
-
-@client:
-@type:
-@change_id:
-@Returns:
-
-
-<!-- ##### FUNCTION cal_client_change_list_free ##### -->
-<para>
-
-</para>
-
-@list:
-
-
-<!-- ##### FUNCTION cal_client_get_objects_in_range ##### -->
-<para>
-
-</para>
-
-@client:
-@type:
-@start:
-@end:
-@Returns:
-
-
-<!-- ##### FUNCTION cal_client_generate_instances ##### -->
-<para>
-
-</para>
-
-@client:
-@type:
-@start:
-@end:
-@cb:
-@cb_data:
-
-
-<!-- ##### FUNCTION cal_client_get_alarms_in_range ##### -->
-<para>
-
-</para>
-
-@client:
-@start:
-@end:
-@Returns:
-
-
-<!-- ##### FUNCTION cal_client_free_alarms ##### -->
-<para>
-
-</para>
-
-@comp_alarms:
-
-
-<!-- ##### FUNCTION cal_client_get_alarms_for_object ##### -->
-<para>
-
-</para>
-
-@client:
-@uid:
-@start:
-@end:
-@alarms:
-@Returns:
-
-
-<!-- ##### FUNCTION cal_client_update_object ##### -->
-<para>
-
-</para>
-
-@client:
-@comp:
-@Returns:
-<!-- # Unused Parameters # -->
-@ico:
-
-
-<!-- ##### FUNCTION cal_client_remove_object ##### -->
-<para>
-
-</para>
-
-@client:
-@uid:
-@Returns:
-
-
-<!-- ##### SIGNAL CalClient::cal-opened ##### -->
-<para>
-
-</para>
-
-@calclient: the object which received the signal.
-@arg1:
-
-<!-- ##### SIGNAL CalClient::obj-updated ##### -->
- <para>
- This signal is emitted when the calendar clients receives
- notification of a calendar component's data being changed in the
- personal calendar server. Graphical clients may want to get the
- new version of the object and update their display, for example.
- </para>
-
-@calclient: the object which received the signal.
-@arg1:
-<!-- # Unused Parameters # -->
-@client: Calendar client which received the notification.
-@uid: Unique identifier of the calendar component that changed in the
- personal calendar server's storage.
-
-<!-- ##### SIGNAL CalClient::obj-removed ##### -->
- <para>
- This signal is emitted when the calendar client receives
- notification for a calendar component being removed from the
- storage in the personal calendar server. Graphical clients may
- want to delete the corresponding object from their display, for
- example.
- </para>
-
-@calclient: the object which received the signal.
-@arg1:
-<!-- # Unused Parameters # -->
-@client: Calendar client which received the notification.
-@uid: Unique identifier of the calendar component that was removed
- from the personal calendar server's storage.
-
-<!--
-Local variables:
-mode: sgml
-sgml-parent-document: ("../../../evolution-devel-guide.sgml" "book" "refsect2" "")
-End:
--->
-
diff --git a/doc/devel/calendar/cal-client/tmpl/evolution-cal-client-unused.sgml b/doc/devel/calendar/cal-client/tmpl/evolution-cal-client-unused.sgml
deleted file mode 100644
index 56bcf3aff5..0000000000
--- a/doc/devel/calendar/cal-client/tmpl/evolution-cal-client-unused.sgml
+++ /dev/null
@@ -1,84 +0,0 @@
-<!-- ##### FUNCTION cal_client_update_pilot_id ##### -->
-<para>
-
-</para>
-
-@client:
-@uid:
-@pilot_id:
-@pilot_status:
-
-<!-- ##### FUNCTION cal_client_load_calendar ##### -->
-<para>
-
-</para>
-
-@client:
-@str_uri:
-@Returns:
-
-<!-- ##### ENUM CalClientLoadStatus ##### -->
- <para>
- These values describe the status of a calendar load or create
- request. After asking a calendar factory to load or create a
- calendar, the provided listener will get notification about the
- result in asynchronous fashion. Such notification is represented
- by one of these enumeration values. For values other than
- #CAL_CLIENT_LOAD_SUCCESS, the #CalClient object will not accept
- any other operations on the calendar and it should just be
- destroyed.
- </para>
-
-
-<!-- ##### FUNCTION cal_client_get_events_in_range ##### -->
-<para>
-
-</para>
-
-@client:
-@start:
-@end:
-@Returns:
-
-<!-- ##### SIGNAL CalClient::cal-loaded ##### -->
- <para>
- This signal is emitted some time after the calendar clients sends
- a load or create request to the personal calendar server. The
- server will notify the client asynchronously of the completion of
- the request. The @status parameter indicates the status of the
- request.
- </para>
-
-@calclient: the object which received the signal.
-@arg1:
-@client: Calendar client which received the notification.
-@status: Status of the request. See the description of
- #CalClientLoadStatus for more details.
-
-<!-- ##### FUNCTION cal_client_is_loaded ##### -->
-<para>
-
-</para>
-
-@client:
-@Returns:
-
-<!-- ##### FUNCTION cal_client_create_calendar ##### -->
-<para>
-
-</para>
-
-@client:
-@str_uri:
-@Returns:
-
-<!-- ##### FUNCTION cal_client_get_uid_by_pilot_id ##### -->
-<para>
-
-</para>
-
-@client:
-@pilot_id:
-@uid:
-@Returns:
-
diff --git a/doc/devel/calendar/cal-util/.cvsignore b/doc/devel/calendar/cal-util/.cvsignore
deleted file mode 100644
index 0842a93f7a..0000000000
--- a/doc/devel/calendar/cal-util/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-sgml
-Makefile
-Makefile.in
diff --git a/doc/devel/calendar/cal-util/Makefile.am b/doc/devel/calendar/cal-util/Makefile.am
deleted file mode 100644
index 7f567652ef..0000000000
--- a/doc/devel/calendar/cal-util/Makefile.am
+++ /dev/null
@@ -1,142 +0,0 @@
-# The name of the module.
-DOC_MODULE=evolution-cal-util
-
-# The directory containing the source code (if it contains documentation).
-DOC_SOURCE_DIR=$(EVOLUTION_DIR)/calendar/cal-util
-
-CFLAGS =" \
- -I$(top_srcdir)/calendar \
- -I$(top_srcdir) \
- -I$(top_builddir) \
- -I$(top_builddir)/libical/src/libical \
- -I$(top_srcdir)/libical/src/libical \
- $(BONOBO_VFS_GNOME_CFLAGS) \
- "
-
-LDFLAGS=" \
- $(BONOBO_VFS_GNOME_LIBS) \
- $(top_builddir)/calendar/cal-util/.libs/libcal-util.a \
- $(top_builddir)/libical/src/libical/.libs/libical.a \
- $(top_builddir)/libversit/.libs/libversit.al \
- "
-
-DOC_DIR=$(datadir)/gnome/html
-
-DOC_DIR_INSTALL_FILES = \
- evolution-cal-util.args \
- evolution-cal-util.hierarchy \
- evolution-cal-util.signals \
- evolution-cal-util.types \
- evolution-cal-util-decl.txt \
- evolution-cal-util-sections.txt
-
-SOURCE_FILES = \
- $(top_srcdir)/calendar/cal-util/cal-component.c \
- $(top_srcdir)/calendar/cal-util/cal-component.h \
- $(top_srcdir)/calendar/cal-util/cal-recur.c \
- $(top_srcdir)/calendar/cal-util/cal-recur.h \
- $(top_srcdir)/calendar/cal-util/cal-util.c \
- $(top_srcdir)/calendar/cal-util/cal-util.h \
- $(top_srcdir)/calendar/cal-util/timeutil.c \
- $(top_srcdir)/calendar/cal-util/timeutil.h
-
-IGNORED_HEADER_FILES = \
- calobj.h
-
-scan_generated = \
- evolution-cal-util-decl.txt \
- evolution-cal-util.args \
- evolution-cal-util.hierarchy \
- evolution-cal-util.signals \
- evolution-cal-util.types
-
-tmpl_dependencies = \
- evolution-cal-util-decl.txt \
- evolution-cal-util-sections.txt \
- evolution-cal-util.args \
- evolution-cal-util.hierarchy \
- evolution-cal-util.signals
-
-tmpl_sources = \
- tmpl/cal-component.sgml \
- tmpl/cal-recur.sgml \
- tmpl/cal-util.sgml \
- tmpl/evolution-cal-util-unused.sgml \
- tmpl/timeutil.sgml
-
-tmpl_generated = \
- evolution-cal-util-unused.txt
-
-sgml_dependencies = \
- evolution-cal-util-decl.txt \
- evolution-cal-util-sections.txt \
- evolution-cal-util.args \
- evolution-cal-util.hierarchy \
- evolution-cal-util.signals \
- tmpl/cal-component.sgml \
- tmpl/cal-recur.sgml \
- tmpl/cal-util.sgml \
- tmpl/timeutil.sgml
-
-sgml_generated = \
- sgml/cal-component.sgml \
- sgml/cal-recur.sgml \
- sgml/cal-util.sgml \
- sgml/evolution-cal-util-doc.bottom \
- sgml/evolution-cal-util-doc.top \
- sgml/object_index.sgml \
- sgml/timeutil.sgml \
- sgml/tree_index.sgml
-
-EXTRA_DIST = \
- evolution-cal-util.args \
- evolution-cal-util.hierarchy \
- evolution-cal-util.signals \
- evolution-cal-util.types \
- evolution-cal-util-decl.txt \
- evolution-cal-util-sections.txt
-
-all: $(sgml_generated)
-
-if ENABLE_GTK_DOC
-scan $(scan_generated): $(SOURCE_FILES)
- -(cd $(srcdir) \
- && env CFLAGS=$(CFLAGS) LDFLAGS=$(LDFLAGS) \
- gtkdoc-scanobj --module=$(DOC_MODULE) \
- && gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) \
- --ignore-headers="$(IGNORED_HEADER_FILES)" )
-
-templates $(tmpl_sources) $(tmpl_generated): $(tmpl_dependencies)
- cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE)
-
-sgml $(sgml_generated): $(sgml_dependencies)
- cd $(srcdir) \
- && gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR)
-else
-scan $(scan_generated): $(SOURCE_FILES)
-
-templates $(tmpl_sources) $(tmpl_generated): $(tmpl_dependencies)
-
-sgml $(sgml_generated): $(sgml_dependencies)
-endif
-
-clean-local:
- rm -f *~ *.bak *.signals *-unused.txt
-
-maintainer-clean-local: clean
- cd $(srcdir) && rm -rf sgml $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
-
-install-data-local:
- $(mkinstalldirs) $(DOC_DIR)
- for i in $(DOC_DIR_INSTALL_FILES); do \
- $(INSTALL_DATA) $$i $(DOC_DIR); \
- done
-
-dist-hook:
- mkdir $(distdir)/sgml
- mkdir $(distdir)/tmpl
- -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
- -cp $(srcdir)/sgml/*.sgml $(distdir)/sgml
- -cp $(srcdir)/sgml/*.bottom $(srcdir)/sgml/*.top $(distdir)/sgml
-
-.PHONY: scan templates sgml
diff --git a/doc/devel/calendar/cal-util/evolution-cal-util-decl.txt b/doc/devel/calendar/cal-util/evolution-cal-util-decl.txt
deleted file mode 100644
index b524235de2..0000000000
--- a/doc/devel/calendar/cal-util/evolution-cal-util-decl.txt
+++ /dev/null
@@ -1,780 +0,0 @@
-<MACRO>
-<NAME>CAL_COMPONENT_TYPE</NAME>
-#define CAL_COMPONENT_TYPE (cal_component_get_type ())
-</MACRO>
-<MACRO>
-<NAME>CAL_COMPONENT</NAME>
-#define CAL_COMPONENT(obj) (GTK_CHECK_CAST ((obj), CAL_COMPONENT_TYPE, CalComponent))
-</MACRO>
-<MACRO>
-<NAME>CAL_COMPONENT_CLASS</NAME>
-#define CAL_COMPONENT_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), CAL_COMPONENT_TYPE, \
- CalComponentClass))
-</MACRO>
-<MACRO>
-<NAME>IS_CAL_COMPONENT</NAME>
-#define IS_CAL_COMPONENT(obj) (GTK_CHECK_TYPE ((obj), CAL_COMPONENT_TYPE))
-</MACRO>
-<MACRO>
-<NAME>IS_CAL_COMPONENT_CLASS</NAME>
-#define IS_CAL_COMPONENT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), CAL_COMPONENT_TYPE))
-</MACRO>
-<ENUM>
-<NAME>CalComponentVType</NAME>
-typedef enum {
- CAL_COMPONENT_NO_TYPE,
- CAL_COMPONENT_EVENT,
- CAL_COMPONENT_TODO,
- CAL_COMPONENT_JOURNAL,
- CAL_COMPONENT_FREEBUSY,
- CAL_COMPONENT_TIMEZONE
-} CalComponentVType;
-</ENUM>
-<ENUM>
-<NAME>CalComponentField</NAME>
-typedef enum {
- CAL_COMPONENT_FIELD_CATEGORIES, /* concatenation of the categories list */
- CAL_COMPONENT_FIELD_CLASSIFICATION,
- CAL_COMPONENT_FIELD_COMPLETED,
- CAL_COMPONENT_FIELD_DTEND,
- CAL_COMPONENT_FIELD_DTSTART,
- CAL_COMPONENT_FIELD_DUE,
- CAL_COMPONENT_FIELD_GEO,
- CAL_COMPONENT_FIELD_PERCENT,
- CAL_COMPONENT_FIELD_PRIORITY,
- CAL_COMPONENT_FIELD_SUMMARY,
- CAL_COMPONENT_FIELD_TRANSPARENCY,
- CAL_COMPONENT_FIELD_URL,
- CAL_COMPONENT_FIELD_HAS_ALARMS, /* not a real field */
- CAL_COMPONENT_FIELD_ICON, /* not a real field */
- CAL_COMPONENT_FIELD_COMPLETE, /* not a real field */
- CAL_COMPONENT_FIELD_RECURRING, /* not a real field */
- CAL_COMPONENT_FIELD_OVERDUE, /* not a real field */
- CAL_COMPONENT_FIELD_COLOR, /* not a real field */
- CAL_COMPONENT_FIELD_NUM_FIELDS
-} CalComponentField;
-</ENUM>
-<ENUM>
-<NAME>CalComponentClassification</NAME>
-typedef enum {
- CAL_COMPONENT_CLASS_NONE,
- CAL_COMPONENT_CLASS_PUBLIC,
- CAL_COMPONENT_CLASS_PRIVATE,
- CAL_COMPONENT_CLASS_CONFIDENTIAL,
- CAL_COMPONENT_CLASS_UNKNOWN
-} CalComponentClassification;
-</ENUM>
-<TYPEDEF>
-<NAME>CalComponentDateTime</NAME>
-typedef struct {
- /* Actual date/time value */
- struct icaltimetype *value;
-
- /* Timezone ID */
- const char *tzid;
-} CalComponentDateTime;
-</TYPEDEF>
-<ENUM>
-<NAME>CalComponentPeriodType</NAME>
-typedef enum {
- CAL_COMPONENT_PERIOD_DATETIME,
- CAL_COMPONENT_PERIOD_DURATION
-} CalComponentPeriodType;
-</ENUM>
-<TYPEDEF>
-<NAME>CalComponentPeriod</NAME>
-typedef struct {
- CalComponentPeriodType type;
-
- struct icaltimetype start;
-
- union {
- struct icaltimetype end;
- struct icaldurationtype duration;
- } u;
-} CalComponentPeriod;
-</TYPEDEF>
-<TYPEDEF>
-<NAME>CalComponentText</NAME>
-typedef struct {
- /* Description string */
- const char *value;
-
- /* Alternate representation URI */
- const char *altrep;
-} CalComponentText;
-</TYPEDEF>
-<ENUM>
-<NAME>CalComponentTransparency</NAME>
-typedef enum {
- CAL_COMPONENT_TRANSP_NONE,
- CAL_COMPONENT_TRANSP_TRANSPARENT,
- CAL_COMPONENT_TRANSP_OPAQUE,
- CAL_COMPONENT_TRANSP_UNKNOWN
-} CalComponentTransparency;
-</ENUM>
-<STRUCT>
-<NAME>CalComponent</NAME>
-</STRUCT>
-<STRUCT>
-<NAME>CalComponentClass</NAME>
-</STRUCT>
-<STRUCT>
-<NAME>CalComponentPrivate</NAME>
-</STRUCT>
-<STRUCT>
-<NAME>CalComponent</NAME>
-struct CalComponent {
- GtkObject object;
-
- /* Private data */
- CalComponentPrivate *priv;
-};
-</STRUCT>
-<FUNCTION>
-<NAME>cal_component_get_type</NAME>
-<RETURNS>GtkType </RETURNS>
-void
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_gen_uid</NAME>
-<RETURNS>char *</RETURNS>
-void
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_new</NAME>
-<RETURNS>CalComponent *</RETURNS>
-void
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_clone</NAME>
-<RETURNS>CalComponent *</RETURNS>
-CalComponent *comp
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_set_new_vtype</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, CalComponentVType type
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_set_icalcomponent</NAME>
-<RETURNS>gboolean </RETURNS>
-CalComponent *comp, icalcomponent *icalcomp
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_get_icalcomponent</NAME>
-<RETURNS>icalcomponent *</RETURNS>
-CalComponent *comp
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_get_vtype</NAME>
-<RETURNS>CalComponentVType </RETURNS>
-CalComponent *comp
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_get_as_string</NAME>
-<RETURNS>char *</RETURNS>
-CalComponent *comp
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_commit_sequence</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_get_uid</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, const char **uid
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_set_uid</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, const char *uid
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_get_categories</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, const char **categories
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_set_categories</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, const char *categories
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_get_categories_list</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, GSList **categ_list
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_set_categories_list</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, GSList *categ_list
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_get_classification</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, CalComponentClassification *classif
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_set_classification</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, CalComponentClassification classif
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_get_comment_list</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, GSList **text_list
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_set_comment_list</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, GSList *text_list
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_get_completed</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, struct icaltimetype **t
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_set_completed</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, struct icaltimetype *t
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_get_created</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, struct icaltimetype **t
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_set_created</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, struct icaltimetype *t
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_get_description_list</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, GSList **text_list
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_set_description_list</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, GSList *text_list
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_get_dtend</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, CalComponentDateTime *dt
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_set_dtend</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, CalComponentDateTime *dt
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_get_dtstamp</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, struct icaltimetype *t
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_set_dtstamp</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, struct icaltimetype *t
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_get_dtstart</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, CalComponentDateTime *dt
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_set_dtstart</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, CalComponentDateTime *dt
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_get_due</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, CalComponentDateTime *dt
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_set_due</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, CalComponentDateTime *dt
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_get_exdate_list</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, GSList **exdate_list
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_set_exdate_list</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, GSList *exdate_list
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_has_exdates</NAME>
-<RETURNS>gboolean </RETURNS>
-CalComponent *comp
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_get_exrule_list</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, GSList **recur_list
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_get_exrule_property_list</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, GSList **recur_list
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_set_exrule_list</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, GSList *recur_list
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_has_exrules</NAME>
-<RETURNS>gboolean </RETURNS>
-CalComponent *comp
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_has_exceptions</NAME>
-<RETURNS>gboolean </RETURNS>
-CalComponent *comp
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_get_geo</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, struct icalgeotype **geo
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_set_geo</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, struct icalgeotype *geo
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_get_last_modified</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, struct icaltimetype **t
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_set_last_modified</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, struct icaltimetype *t
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_get_percent</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, int **percent
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_set_percent</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, int *percent
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_get_priority</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, int **priority
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_set_priority</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, int *priority
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_get_rdate_list</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, GSList **period_list
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_set_rdate_list</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, GSList *period_list
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_has_rdates</NAME>
-<RETURNS>gboolean </RETURNS>
-CalComponent *comp
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_get_rrule_list</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, GSList **recur_list
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_get_rrule_property_list</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, GSList **recur_list
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_set_rrule_list</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, GSList *recur_list
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_has_rrules</NAME>
-<RETURNS>gboolean </RETURNS>
-CalComponent *comp
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_has_recurrences</NAME>
-<RETURNS>gboolean </RETURNS>
-CalComponent *comp
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_get_sequence</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, int **sequence
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_set_sequence</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, int *sequence
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_get_status</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, icalproperty_status *status
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_set_status</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, icalproperty_status status
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_get_summary</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, CalComponentText *summary
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_set_summary</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, CalComponentText *summary
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_get_transparency</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, CalComponentTransparency *transp
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_set_transparency</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, CalComponentTransparency transp
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_get_url</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, const char **url
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_set_url</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, const char *url
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_event_dates_match</NAME>
-<RETURNS>gboolean </RETURNS>
-CalComponent *comp1, CalComponent *comp2
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_free_categories_list</NAME>
-<RETURNS>void </RETURNS>
-GSList *categ_list
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_free_datetime</NAME>
-<RETURNS>void </RETURNS>
-CalComponentDateTime *dt
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_free_exdate_list</NAME>
-<RETURNS>void </RETURNS>
-GSList *exdate_list
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_free_geo</NAME>
-<RETURNS>void </RETURNS>
-struct icalgeotype *geo
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_free_icaltimetype</NAME>
-<RETURNS>void </RETURNS>
-struct icaltimetype *t
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_free_percent</NAME>
-<RETURNS>void </RETURNS>
-int *percent
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_free_priority</NAME>
-<RETURNS>void </RETURNS>
-int *priority
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_free_period_list</NAME>
-<RETURNS>void </RETURNS>
-GSList *period_list
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_free_recur_list</NAME>
-<RETURNS>void </RETURNS>
-GSList *recur_list
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_free_sequence</NAME>
-<RETURNS>void </RETURNS>
-int *sequence
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_free_text_list</NAME>
-<RETURNS>void </RETURNS>
-GSList *text_list
-</FUNCTION>
-<STRUCT>
-<NAME>CalComponentAlarm</NAME>
-</STRUCT>
-<TYPEDEF>
-<NAME>CalAlarmInstance</NAME>
-typedef struct {
- /* UID of the alarm that triggered */
- const char *auid;
-
- /* Trigger time, i.e. "5 minutes before the appointment" */
- time_t trigger;
-
- /* Actual event occurrence to which this trigger corresponds */
- time_t occur;
-} CalAlarmInstance;
-</TYPEDEF>
-<TYPEDEF>
-<NAME>CalComponentAlarms</NAME>
-typedef struct {
- /* The actual component */
- CalComponent *comp;
-
- /* List of CalAlarmInstance structures */
- GSList *alarms;
-} CalComponentAlarms;
-</TYPEDEF>
-<ENUM>
-<NAME>CalAlarmAction</NAME>
-typedef enum {
- CAL_ALARM_NONE,
- CAL_ALARM_AUDIO,
- CAL_ALARM_DISPLAY,
- CAL_ALARM_EMAIL,
- CAL_ALARM_PROCEDURE,
- CAL_ALARM_UNKNOWN
-} CalAlarmAction;
-</ENUM>
-<ENUM>
-<NAME>CalAlarmTriggerType</NAME>
-typedef enum {
- CAL_ALARM_TRIGGER_NONE,
- CAL_ALARM_TRIGGER_RELATIVE_START,
- CAL_ALARM_TRIGGER_RELATIVE_END,
- CAL_ALARM_TRIGGER_ABSOLUTE
-} CalAlarmTriggerType;
-</ENUM>
-<TYPEDEF>
-<NAME>CalAlarmTrigger</NAME>
-typedef struct {
- CalAlarmTriggerType type;
-
- union {
- struct icaldurationtype rel_duration;
- struct icaltimetype abs_time;
- } u;
-} CalAlarmTrigger;
-</TYPEDEF>
-<FUNCTION>
-<NAME>cal_component_has_alarms</NAME>
-<RETURNS>gboolean </RETURNS>
-CalComponent *comp
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_add_alarm</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, CalComponentAlarm *alarm
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_remove_alarm</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp, const char *auid
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_get_alarm_uids</NAME>
-<RETURNS>GList *</RETURNS>
-CalComponent *comp
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_get_alarm</NAME>
-<RETURNS>CalComponentAlarm *</RETURNS>
-CalComponent *comp, const char *auid
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_alarms_free</NAME>
-<RETURNS>void </RETURNS>
-CalComponentAlarms *alarms
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_alarm_new</NAME>
-<RETURNS>CalComponentAlarm *</RETURNS>
-void
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_alarm_get_uid</NAME>
-<RETURNS>const char *</RETURNS>
-CalComponentAlarm *alarm
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_alarm_get_action</NAME>
-<RETURNS>void </RETURNS>
-CalComponentAlarm *alarm, CalAlarmAction *action
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_alarm_set_action</NAME>
-<RETURNS>void </RETURNS>
-CalComponentAlarm *alarm, CalAlarmAction action
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_alarm_get_trigger</NAME>
-<RETURNS>void </RETURNS>
-CalComponentAlarm *alarm, CalAlarmTrigger *trigger
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_alarm_set_trigger</NAME>
-<RETURNS>void </RETURNS>
-CalComponentAlarm *alarm, CalAlarmTrigger trigger
-</FUNCTION>
-<FUNCTION>
-<NAME>cal_component_alarm_free</NAME>
-<RETURNS>void </RETURNS>
-CalComponentAlarm *alarm
-</FUNCTION>
-<USER_FUNCTION>
-<NAME>CalRecurInstanceFn</NAME>
-<RETURNS>gboolean </RETURNS>
-CalComponent *comp,
- time_t instance_start,
- time_t instance_end,
- gpointer data
-</USER_FUNCTION>
-<FUNCTION>
-<NAME>cal_recur_generate_instances</NAME>
-<RETURNS>void </RETURNS>
-CalComponent *comp,time_t start,time_t end,CalRecurInstanceFn cb,gpointer cb_data
-</FUNCTION>
-<TYPEDEF>
-<NAME>CalObjInstance</NAME>
-typedef struct {
- char *uid; /* UID of the object */
- time_t start; /* Start time of instance */
- time_t end; /* End time of instance */
-} CalObjInstance;
-</TYPEDEF>
-<FUNCTION>
-<NAME>cal_obj_instance_list_free</NAME>
-<RETURNS>void </RETURNS>
-GList *list
-</FUNCTION>
-<ENUM>
-<NAME>CalObjType</NAME>
-typedef enum {
- CALOBJ_TYPE_EVENT = 1 << 0,
- CALOBJ_TYPE_TODO = 1 << 1,
- CALOBJ_TYPE_JOURNAL = 1 << 2,
- CALOBJ_TYPE_ANY = 0x07
-} CalObjType;
-</ENUM>
-<FUNCTION>
-<NAME>cal_obj_uid_list_free</NAME>
-<RETURNS>void </RETURNS>
-GList *list
-</FUNCTION>
-<FUNCTION>
-<NAME>isodate_from_time_t</NAME>
-<RETURNS>char *</RETURNS>
-time_t t
-</FUNCTION>
-<FUNCTION>
-<NAME>time_add_minutes</NAME>
-<RETURNS>time_t </RETURNS>
-time_t time, int minutes
-</FUNCTION>
-<FUNCTION>
-<NAME>time_add_day</NAME>
-<RETURNS>time_t </RETURNS>
-time_t time, int days
-</FUNCTION>
-<FUNCTION>
-<NAME>time_add_week</NAME>
-<RETURNS>time_t </RETURNS>
-time_t time, int weeks
-</FUNCTION>
-<FUNCTION>
-<NAME>time_add_month</NAME>
-<RETURNS>time_t </RETURNS>
-time_t time, int months
-</FUNCTION>
-<FUNCTION>
-<NAME>time_add_year</NAME>
-<RETURNS>time_t </RETURNS>
-time_t time, int years
-</FUNCTION>
-<FUNCTION>
-<NAME>time_days_in_month</NAME>
-<RETURNS>int </RETURNS>
-int year, int month
-</FUNCTION>
-<FUNCTION>
-<NAME>time_from_day</NAME>
-<RETURNS>time_t </RETURNS>
-int year, int month, int day
-</FUNCTION>
-<FUNCTION>
-<NAME>time_year_begin</NAME>
-<RETURNS>time_t </RETURNS>
-time_t t
-</FUNCTION>
-<FUNCTION>
-<NAME>time_year_end</NAME>
-<RETURNS>time_t </RETURNS>
-time_t t
-</FUNCTION>
-<FUNCTION>
-<NAME>time_month_begin</NAME>
-<RETURNS>time_t </RETURNS>
-time_t t
-</FUNCTION>
-<FUNCTION>
-<NAME>time_month_end</NAME>
-<RETURNS>time_t </RETURNS>
-time_t t
-</FUNCTION>
-<FUNCTION>
-<NAME>time_week_begin</NAME>
-<RETURNS>time_t </RETURNS>
-time_t t
-</FUNCTION>
-<FUNCTION>
-<NAME>time_week_end</NAME>
-<RETURNS>time_t </RETURNS>
-time_t t
-</FUNCTION>
-<FUNCTION>
-<NAME>time_day_begin</NAME>
-<RETURNS>time_t </RETURNS>
-time_t t
-</FUNCTION>
-<FUNCTION>
-<NAME>time_day_end</NAME>
-<RETURNS>time_t </RETURNS>
-time_t t
-</FUNCTION>
-<FUNCTION>
-<NAME>print_time_t</NAME>
-<RETURNS>void </RETURNS>
-time_t t
-</FUNCTION>
diff --git a/doc/devel/calendar/cal-util/evolution-cal-util-sections.txt b/doc/devel/calendar/cal-util/evolution-cal-util-sections.txt
deleted file mode 100644
index 1a03226591..0000000000
--- a/doc/devel/calendar/cal-util/evolution-cal-util-sections.txt
+++ /dev/null
@@ -1,161 +0,0 @@
-<SECTION>
-<FILE>cal-component</FILE>
-CAL_COMPONENT
-<TITLE>CalComponent</TITLE>
-
-CalComponentVType
-CalComponentField
-CalComponentClassification
-CalComponentDateTime
-CalComponentPeriodType
-CalComponentPeriod
-CalComponentText
-CalComponentTransparency
-
-cal_component_gen_uid
-cal_component_new
-cal_component_clone
-cal_component_set_new_vtype
-cal_component_set_icalcomponent
-cal_component_get_icalcomponent
-cal_component_get_vtype
-cal_component_get_as_string
-cal_component_commit_sequence
-cal_component_get_uid
-cal_component_set_uid
-cal_component_get_categories
-cal_component_set_categories
-cal_component_get_categories_list
-cal_component_set_categories_list
-cal_component_get_classification
-cal_component_set_classification
-cal_component_get_comment_list
-cal_component_set_comment_list
-cal_component_get_completed
-cal_component_set_completed
-cal_component_get_created
-cal_component_set_created
-cal_component_get_description_list
-cal_component_set_description_list
-cal_component_get_dtend
-cal_component_set_dtend
-cal_component_get_dtstamp
-cal_component_set_dtstamp
-cal_component_get_dtstart
-cal_component_set_dtstart
-cal_component_get_due
-cal_component_set_due
-cal_component_get_exdate_list
-cal_component_set_exdate_list
-cal_component_has_exdates
-cal_component_get_exrule_list
-cal_component_get_exrule_property_list
-cal_component_set_exrule_list
-cal_component_has_exrules
-cal_component_has_exceptions
-cal_component_get_geo
-cal_component_set_geo
-cal_component_get_last_modified
-cal_component_set_last_modified
-cal_component_get_percent
-cal_component_set_percent
-cal_component_get_priority
-cal_component_set_priority
-cal_component_get_rdate_list
-cal_component_set_rdate_list
-cal_component_has_rdates
-cal_component_get_rrule_list
-cal_component_get_rrule_property_list
-cal_component_set_rrule_list
-cal_component_has_rrules
-cal_component_has_recurrences
-cal_component_get_sequence
-cal_component_set_sequence
-cal_component_get_status
-cal_component_set_status
-cal_component_get_summary
-cal_component_set_summary
-cal_component_get_transparency
-cal_component_set_transparency
-cal_component_get_url
-cal_component_set_url
-
-<SUBSECTION Functions to free returned values>
-cal_component_free_categories_list
-cal_component_free_datetime
-cal_component_free_exdate_list
-cal_component_free_geo
-cal_component_free_icaltimetype
-cal_component_free_percent
-cal_component_free_priority
-cal_component_free_period_list
-cal_component_free_recur_list
-cal_component_free_sequence
-cal_component_free_text_list
-
-<SUBSECTION Alarms>
-CalComponentAlarm
-CalAlarmInstance
-CalComponentAlarms
-CalAlarmAction
-CalAlarmTriggerType
-CalAlarmTrigger
-
-cal_component_has_alarms
-cal_component_get_alarm_uids
-cal_component_get_alarm
-cal_component_alarm_free
-cal_component_alarms_free
-cal_component_alarm_get_uid
-cal_component_alarm_get_action
-cal_component_alarm_set_action
-cal_component_alarm_get_trigger
-cal_component_alarm_set_trigger
-
-<SUBSECTION Standard>
-CAL_COMPONENT_TYPE
-CAL_COMPONENT_CLASS
-IS_CAL_COMPONENT
-IS_CAL_COMPONENT_CLASS
-cal_component_get_type
-
-<SUBSECTION Private>
-CalComponent
-CalComponentPrivate
-
-</SECTION>
-
-<SECTION>
-<FILE>cal-recur</FILE>
-CalRecurInstanceFn
-cal_recur_generate_instances
-</SECTION>
-
-<SECTION>
-<FILE>cal-util</FILE>
-CalObjInstance
-cal_obj_instance_list_free
-CalObjType
-cal_obj_uid_list_free
-</SECTION>
-
-<SECTION>
-<FILE>timeutil</FILE>
-isodate_from_time_t
-time_add_minutes
-time_add_day
-time_add_week
-time_add_month
-time_add_year
-time_days_in_month
-time_from_day
-time_year_begin
-time_year_end
-time_month_begin
-time_month_end
-time_week_begin
-time_week_end
-time_day_begin
-time_day_end
-print_time_t
-</SECTION>
diff --git a/doc/devel/calendar/cal-util/evolution-cal-util.args b/doc/devel/calendar/cal-util/evolution-cal-util.args
deleted file mode 100644
index e69de29bb2..0000000000
--- a/doc/devel/calendar/cal-util/evolution-cal-util.args
+++ /dev/null
diff --git a/doc/devel/calendar/cal-util/evolution-cal-util.hierarchy b/doc/devel/calendar/cal-util/evolution-cal-util.hierarchy
deleted file mode 100644
index cc235653f2..0000000000
--- a/doc/devel/calendar/cal-util/evolution-cal-util.hierarchy
+++ /dev/null
@@ -1,2 +0,0 @@
-GtkObject
- CalComponent
diff --git a/doc/devel/calendar/cal-util/evolution-cal-util.signals b/doc/devel/calendar/cal-util/evolution-cal-util.signals
deleted file mode 100644
index e69de29bb2..0000000000
--- a/doc/devel/calendar/cal-util/evolution-cal-util.signals
+++ /dev/null
diff --git a/doc/devel/calendar/cal-util/evolution-cal-util.types b/doc/devel/calendar/cal-util/evolution-cal-util.types
deleted file mode 100644
index 52b2d9bf90..0000000000
--- a/doc/devel/calendar/cal-util/evolution-cal-util.types
+++ /dev/null
@@ -1,4 +0,0 @@
-#include <gnome.h>
-#include <cal-util/cal-component.h>
-
-cal_component_get_type
diff --git a/doc/devel/calendar/cal-util/tmpl/cal-component.sgml b/doc/devel/calendar/cal-util/tmpl/cal-component.sgml
deleted file mode 100644
index 0cf6089d60..0000000000
--- a/doc/devel/calendar/cal-util/tmpl/cal-component.sgml
+++ /dev/null
@@ -1,991 +0,0 @@
-<!-- ##### SECTION Title ##### -->
-CalComponent
-
-<!-- ##### SECTION Short_Description ##### -->
-RFC 2445 iCalendar component object.
-
-<!-- ##### SECTION Long_Description ##### -->
- <para>
- The #CalComponent object provides a wrapper over the &libical;
- functions for manipulating calendar components. #CalComponent
- presents a GTK+-like interface to calendar components according to
- RFC 2445.
- </para>
-
- <para>
- While &libical; supports almost all of the features of the
- iCalendar RFCs, applications are normally not interested in all
- the mindless gunk that is there. Still, applications should do
- their best not to drop extension fields from calendar components
- or any other extra information they do not support (including
- standard fields they are not interested in). The #CalComponent
- object provides a wrapper over
- <structname>icalcomponent</structname> structures from &libical;
- so that no information in them will be lost even if the
- application is not designed to handle it. Also, #CalComponent
- provides a higher-level API to many of the &libical; operations so
- as to make it less painful to deal with iCalendar components.
- </para>
-
- <para>
- A #CalComponent object starts out empty. It must be initialized
- from an existing <structname>icalcomponent</structname> structure
- by using the cal_component_set_icalcomponent() function, or from a
- completely new data by specifying the desired component type to
- the cal_component_set_new_vtype() function.
- </para>
-
- <para>
- #CalComponent will create an internal map of the properties in the
- <structname>icalcomponent</structname> structure and then allow
- random access to them via the #CalComponent API functions;
- normally the &libical; API would have to be used by creating many
- iterators and other unpleasant constructs. #CalComponent keeps
- handles to the properties it scanned from the
- <structname>icalcomponent</structname> and will let the parent
- application modify them at any time without having to do any
- iteration.
- </para>
-
- <para>
- Eventually a #CalComponent may be turned into the RFC 2445 string
- representation of an iCalendar component by using the
- cal_component_get_as_string() function. Applications can then
- transfer this interoperable
- <footnote>
- <para>
- &ldquo;Interoperable.&rdquo; Heavens, I love that word.
- </para>
- </footnote>
- string to other programs that deal with iCalendar.
- </para>
-
-<!-- ##### SECTION See_Also ##### -->
- <para>
-
- </para>
-
-<!-- ##### MACRO CAL_COMPONENT ##### -->
- <para>
- Casts a #GtkObject to a #CalComponent.
- </para>
-
-@obj: A GTK+ object.
-
-
-<!-- ##### ENUM CalComponentVType ##### -->
- <para>
- Calendar component types as defined by RFC 2445. These values can
- be used to create a new calendar component by passing them to the
- cal_component_set_new_vtype() function. They are also the return
- value of the cal_component_get_vtype() function. The only time
- the @CAL_COMPONENT_NO_TYPE value is used is when querying the
- vtype of an uninitialized #CalComponent.
- </para>
-
-@CAL_COMPONENT_NO_TYPE:
-@CAL_COMPONENT_EVENT:
-@CAL_COMPONENT_TODO:
-@CAL_COMPONENT_JOURNAL:
-@CAL_COMPONENT_FREEBUSY:
-@CAL_COMPONENT_TIMEZONE:
-
-<!-- ##### ENUM CalComponentField ##### -->
- <para>
- These values are used as identifiers for #ETable columns. These
- are used by the calendar GUI code in &Evolution;.
- </para>
-
-@CAL_COMPONENT_FIELD_CATEGORIES:
-@CAL_COMPONENT_FIELD_CLASSIFICATION:
-@CAL_COMPONENT_FIELD_COMPLETED:
-@CAL_COMPONENT_FIELD_DTEND:
-@CAL_COMPONENT_FIELD_DTSTART:
-@CAL_COMPONENT_FIELD_DUE:
-@CAL_COMPONENT_FIELD_GEO:
-@CAL_COMPONENT_FIELD_PERCENT:
-@CAL_COMPONENT_FIELD_PRIORITY:
-@CAL_COMPONENT_FIELD_SUMMARY:
-@CAL_COMPONENT_FIELD_TRANSPARENCY:
-@CAL_COMPONENT_FIELD_URL:
-@CAL_COMPONENT_FIELD_HAS_ALARMS:
-@CAL_COMPONENT_FIELD_ICON:
-@CAL_COMPONENT_FIELD_COMPLETE:
-@CAL_COMPONENT_FIELD_RECURRING:
-@CAL_COMPONENT_FIELD_OVERDUE:
-@CAL_COMPONENT_FIELD_COLOR:
-@CAL_COMPONENT_FIELD_NUM_FIELDS:
-
-<!-- ##### ENUM CalComponentClassification ##### -->
- <para>
- Values for the access classification property of a calendar
- component.
- </para>
-
-@CAL_COMPONENT_CLASS_NONE:
-@CAL_COMPONENT_CLASS_PUBLIC:
-@CAL_COMPONENT_CLASS_PRIVATE:
-@CAL_COMPONENT_CLASS_CONFIDENTIAL:
-@CAL_COMPONENT_CLASS_UNKNOWN:
-
-<!-- ##### TYPEDEF CalComponentDateTime ##### -->
- <para>
- This structure defines a date and time value.
- </para>
-
-
-<!-- ##### ENUM CalComponentPeriodType ##### -->
- <para>
- Defines how a period of time is specified.
- </para>
-
-@CAL_COMPONENT_PERIOD_DATETIME:
-@CAL_COMPONENT_PERIOD_DURATION:
-
-<!-- ##### TYPEDEF CalComponentPeriod ##### -->
- <para>
- This structure defines a period of time.
- </para>
-
-
-<!-- ##### TYPEDEF CalComponentText ##### -->
- <para>
- This structure defines the value of a text property that may have
- an alternate representation parameter.
- </para>
-
-
-<!-- ##### ENUM CalComponentTransparency ##### -->
-<para>
-
-</para>
-
-@CAL_COMPONENT_TRANSP_NONE:
-@CAL_COMPONENT_TRANSP_TRANSPARENT:
-@CAL_COMPONENT_TRANSP_OPAQUE:
-@CAL_COMPONENT_TRANSP_UNKNOWN:
-
-<!-- ##### FUNCTION cal_component_gen_uid ##### -->
-<para>
-
-</para>
-
-@Returns:
-
-
-<!-- ##### FUNCTION cal_component_new ##### -->
-<para>
-
-</para>
-
-@Returns:
-
-
-<!-- ##### FUNCTION cal_component_clone ##### -->
-<para>
-
-</para>
-
-@comp:
-@Returns:
-
-
-<!-- ##### FUNCTION cal_component_set_new_vtype ##### -->
-<para>
-
-</para>
-
-@comp:
-@type:
-
-
-<!-- ##### FUNCTION cal_component_set_icalcomponent ##### -->
-<para>
-
-</para>
-
-@comp:
-@icalcomp:
-@Returns:
-
-
-<!-- ##### FUNCTION cal_component_get_icalcomponent ##### -->
-<para>
-
-</para>
-
-@comp:
-@Returns:
-
-
-<!-- ##### FUNCTION cal_component_get_vtype ##### -->
-<para>
-
-</para>
-
-@comp:
-@Returns:
-
-
-<!-- ##### FUNCTION cal_component_get_as_string ##### -->
-<para>
-
-</para>
-
-@comp:
-@Returns:
-
-
-<!-- ##### FUNCTION cal_component_commit_sequence ##### -->
-<para>
-
-</para>
-
-@comp:
-
-
-<!-- ##### FUNCTION cal_component_get_uid ##### -->
-<para>
-
-</para>
-
-@comp:
-@uid:
-
-
-<!-- ##### FUNCTION cal_component_set_uid ##### -->
-<para>
-
-</para>
-
-@comp:
-@uid:
-
-
-<!-- ##### FUNCTION cal_component_get_categories ##### -->
-<para>
-
-</para>
-
-@comp:
-@categories:
-
-
-<!-- ##### FUNCTION cal_component_set_categories ##### -->
-<para>
-
-</para>
-
-@comp:
-@categories:
-
-
-<!-- ##### FUNCTION cal_component_get_categories_list ##### -->
-<para>
-
-</para>
-
-@comp:
-@categ_list:
-
-
-<!-- ##### FUNCTION cal_component_set_categories_list ##### -->
-<para>
-
-</para>
-
-@comp:
-@categ_list:
-
-
-<!-- ##### FUNCTION cal_component_get_classification ##### -->
-<para>
-
-</para>
-
-@comp:
-@classif:
-
-
-<!-- ##### FUNCTION cal_component_set_classification ##### -->
-<para>
-
-</para>
-
-@comp:
-@classif:
-
-
-<!-- ##### FUNCTION cal_component_get_comment_list ##### -->
-<para>
-
-</para>
-
-@comp:
-@text_list:
-
-
-<!-- ##### FUNCTION cal_component_set_comment_list ##### -->
-<para>
-
-</para>
-
-@comp:
-@text_list:
-
-
-<!-- ##### FUNCTION cal_component_get_completed ##### -->
-<para>
-
-</para>
-
-@comp:
-@t:
-
-
-<!-- ##### FUNCTION cal_component_set_completed ##### -->
-<para>
-
-</para>
-
-@comp:
-@t:
-
-
-<!-- ##### FUNCTION cal_component_get_created ##### -->
-<para>
-
-</para>
-
-@comp:
-@t:
-
-
-<!-- ##### FUNCTION cal_component_set_created ##### -->
-<para>
-
-</para>
-
-@comp:
-@t:
-
-
-<!-- ##### FUNCTION cal_component_get_description_list ##### -->
-<para>
-
-</para>
-
-@comp:
-@text_list:
-
-
-<!-- ##### FUNCTION cal_component_set_description_list ##### -->
-<para>
-
-</para>
-
-@comp:
-@text_list:
-
-
-<!-- ##### FUNCTION cal_component_get_dtend ##### -->
-<para>
-
-</para>
-
-@comp:
-@dt:
-
-
-<!-- ##### FUNCTION cal_component_set_dtend ##### -->
-<para>
-
-</para>
-
-@comp:
-@dt:
-
-
-<!-- ##### FUNCTION cal_component_get_dtstamp ##### -->
-<para>
-
-</para>
-
-@comp:
-@t:
-
-
-<!-- ##### FUNCTION cal_component_set_dtstamp ##### -->
-<para>
-
-</para>
-
-@comp:
-@t:
-
-
-<!-- ##### FUNCTION cal_component_get_dtstart ##### -->
-<para>
-
-</para>
-
-@comp:
-@dt:
-
-
-<!-- ##### FUNCTION cal_component_set_dtstart ##### -->
-<para>
-
-</para>
-
-@comp:
-@dt:
-
-
-<!-- ##### FUNCTION cal_component_get_due ##### -->
-<para>
-
-</para>
-
-@comp:
-@dt:
-
-
-<!-- ##### FUNCTION cal_component_set_due ##### -->
-<para>
-
-</para>
-
-@comp:
-@dt:
-
-
-<!-- ##### FUNCTION cal_component_get_exdate_list ##### -->
-<para>
-
-</para>
-
-@comp:
-@exdate_list:
-
-
-<!-- ##### FUNCTION cal_component_set_exdate_list ##### -->
-<para>
-
-</para>
-
-@comp:
-@exdate_list:
-
-
-<!-- ##### FUNCTION cal_component_has_exdates ##### -->
-<para>
-
-</para>
-
-@comp:
-@Returns:
-
-
-<!-- ##### FUNCTION cal_component_get_exrule_list ##### -->
-<para>
-
-</para>
-
-@comp:
-@recur_list:
-
-
-<!-- ##### FUNCTION cal_component_get_exrule_property_list ##### -->
-<para>
-
-</para>
-
-@comp:
-@recur_list:
-
-
-<!-- ##### FUNCTION cal_component_set_exrule_list ##### -->
-<para>
-
-</para>
-
-@comp:
-@recur_list:
-
-
-<!-- ##### FUNCTION cal_component_has_exrules ##### -->
-<para>
-
-</para>
-
-@comp:
-@Returns:
-
-
-<!-- ##### FUNCTION cal_component_has_exceptions ##### -->
-<para>
-
-</para>
-
-@comp:
-@Returns:
-
-
-<!-- ##### FUNCTION cal_component_get_geo ##### -->
-<para>
-
-</para>
-
-@comp:
-@geo:
-
-
-<!-- ##### FUNCTION cal_component_set_geo ##### -->
-<para>
-
-</para>
-
-@comp:
-@geo:
-
-
-<!-- ##### FUNCTION cal_component_get_last_modified ##### -->
-<para>
-
-</para>
-
-@comp:
-@t:
-
-
-<!-- ##### FUNCTION cal_component_set_last_modified ##### -->
-<para>
-
-</para>
-
-@comp:
-@t:
-
-
-<!-- ##### FUNCTION cal_component_get_percent ##### -->
-<para>
-
-</para>
-
-@comp:
-@percent:
-
-
-<!-- ##### FUNCTION cal_component_set_percent ##### -->
-<para>
-
-</para>
-
-@comp:
-@percent:
-
-
-<!-- ##### FUNCTION cal_component_get_priority ##### -->
-<para>
-
-</para>
-
-@comp:
-@priority:
-
-
-<!-- ##### FUNCTION cal_component_set_priority ##### -->
-<para>
-
-</para>
-
-@comp:
-@priority:
-
-
-<!-- ##### FUNCTION cal_component_get_rdate_list ##### -->
-<para>
-
-</para>
-
-@comp:
-@period_list:
-
-
-<!-- ##### FUNCTION cal_component_set_rdate_list ##### -->
-<para>
-
-</para>
-
-@comp:
-@period_list:
-
-
-<!-- ##### FUNCTION cal_component_has_rdates ##### -->
-<para>
-
-</para>
-
-@comp:
-@Returns:
-
-
-<!-- ##### FUNCTION cal_component_get_rrule_list ##### -->
-<para>
-
-</para>
-
-@comp:
-@recur_list:
-
-
-<!-- ##### FUNCTION cal_component_get_rrule_property_list ##### -->
-<para>
-
-</para>
-
-@comp:
-@recur_list:
-
-
-<!-- ##### FUNCTION cal_component_set_rrule_list ##### -->
-<para>
-
-</para>
-
-@comp:
-@recur_list:
-
-
-<!-- ##### FUNCTION cal_component_has_rrules ##### -->
-<para>
-
-</para>
-
-@comp:
-@Returns:
-
-
-<!-- ##### FUNCTION cal_component_has_recurrences ##### -->
-<para>
-
-</para>
-
-@comp:
-@Returns:
-
-
-<!-- ##### FUNCTION cal_component_get_sequence ##### -->
-<para>
-
-</para>
-
-@comp:
-@sequence:
-
-
-<!-- ##### FUNCTION cal_component_set_sequence ##### -->
-<para>
-
-</para>
-
-@comp:
-@sequence:
-
-
-<!-- ##### FUNCTION cal_component_get_status ##### -->
-<para>
-
-</para>
-
-@comp:
-@status:
-
-
-<!-- ##### FUNCTION cal_component_set_status ##### -->
-<para>
-
-</para>
-
-@comp:
-@status:
-
-
-<!-- ##### FUNCTION cal_component_get_summary ##### -->
-<para>
-
-</para>
-
-@comp:
-@summary:
-
-
-<!-- ##### FUNCTION cal_component_set_summary ##### -->
-<para>
-
-</para>
-
-@comp:
-@summary:
-
-
-<!-- ##### FUNCTION cal_component_get_transparency ##### -->
-<para>
-
-</para>
-
-@comp:
-@transp:
-
-
-<!-- ##### FUNCTION cal_component_set_transparency ##### -->
-<para>
-
-</para>
-
-@comp:
-@transp:
-
-
-<!-- ##### FUNCTION cal_component_get_url ##### -->
-<para>
-
-</para>
-
-@comp:
-@url:
-
-
-<!-- ##### FUNCTION cal_component_set_url ##### -->
-<para>
-
-</para>
-
-@comp:
-@url:
-
-
-<!-- ##### FUNCTION cal_component_free_categories_list ##### -->
-<para>
-
-</para>
-
-@categ_list:
-
-
-<!-- ##### FUNCTION cal_component_free_datetime ##### -->
-<para>
-
-</para>
-
-@dt:
-
-
-<!-- ##### FUNCTION cal_component_free_exdate_list ##### -->
-<para>
-
-</para>
-
-@exdate_list:
-
-
-<!-- ##### FUNCTION cal_component_free_geo ##### -->
-<para>
-
-</para>
-
-@geo:
-
-
-<!-- ##### FUNCTION cal_component_free_icaltimetype ##### -->
-<para>
-
-</para>
-
-@t:
-
-
-<!-- ##### FUNCTION cal_component_free_percent ##### -->
-<para>
-
-</para>
-
-@percent:
-
-
-<!-- ##### FUNCTION cal_component_free_priority ##### -->
-<para>
-
-</para>
-
-@priority:
-
-
-<!-- ##### FUNCTION cal_component_free_period_list ##### -->
-<para>
-
-</para>
-
-@period_list:
-
-
-<!-- ##### FUNCTION cal_component_free_recur_list ##### -->
-<para>
-
-</para>
-
-@recur_list:
-
-
-<!-- ##### FUNCTION cal_component_free_sequence ##### -->
-<para>
-
-</para>
-
-@sequence:
-
-
-<!-- ##### FUNCTION cal_component_free_text_list ##### -->
-<para>
-
-</para>
-
-@text_list:
-
-
-<!-- ##### STRUCT CalComponentAlarm ##### -->
-<para>
-
-</para>
-
-
-<!-- ##### TYPEDEF CalAlarmInstance ##### -->
-<para>
-
-</para>
-
-
-<!-- ##### TYPEDEF CalComponentAlarms ##### -->
-<para>
-
-</para>
-
-
-<!-- ##### ENUM CalAlarmAction ##### -->
-<para>
-
-</para>
-
-@CAL_ALARM_NONE:
-@CAL_ALARM_AUDIO:
-@CAL_ALARM_DISPLAY:
-@CAL_ALARM_EMAIL:
-@CAL_ALARM_PROCEDURE:
-@CAL_ALARM_UNKNOWN:
-
-<!-- ##### ENUM CalAlarmTriggerType ##### -->
-<para>
-
-</para>
-
-@CAL_ALARM_TRIGGER_NONE:
-@CAL_ALARM_TRIGGER_RELATIVE_START:
-@CAL_ALARM_TRIGGER_RELATIVE_END:
-@CAL_ALARM_TRIGGER_ABSOLUTE:
-
-<!-- ##### TYPEDEF CalAlarmTrigger ##### -->
-<para>
-
-</para>
-
-
-<!-- ##### FUNCTION cal_component_has_alarms ##### -->
-<para>
-
-</para>
-
-@comp:
-@Returns:
-
-
-<!-- ##### FUNCTION cal_component_get_alarm_uids ##### -->
-<para>
-
-</para>
-
-@comp:
-@Returns:
-
-
-<!-- ##### FUNCTION cal_component_get_alarm ##### -->
-<para>
-
-</para>
-
-@comp:
-@auid:
-@Returns:
-
-
-<!-- ##### FUNCTION cal_component_alarm_free ##### -->
-<para>
-
-</para>
-
-@alarm:
-
-
-<!-- ##### FUNCTION cal_component_alarms_free ##### -->
-<para>
-
-</para>
-
-@alarms:
-
-
-<!-- ##### FUNCTION cal_component_alarm_get_uid ##### -->
-<para>
-
-</para>
-
-@alarm:
-@Returns:
-
-
-<!-- ##### FUNCTION cal_component_alarm_get_action ##### -->
-<para>
-
-</para>
-
-@alarm:
-@action:
-
-
-<!-- ##### FUNCTION cal_component_alarm_set_action ##### -->
-<para>
-
-</para>
-
-@alarm:
-@action:
-
-
-<!-- ##### FUNCTION cal_component_alarm_get_trigger ##### -->
-<para>
-
-</para>
-
-@alarm:
-@trigger:
-
-
-<!-- ##### FUNCTION cal_component_alarm_set_trigger ##### -->
-<para>
-
-</para>
-
-@alarm:
-@trigger:
-
-
diff --git a/doc/devel/calendar/cal-util/tmpl/cal-recur.sgml b/doc/devel/calendar/cal-util/tmpl/cal-recur.sgml
deleted file mode 100644
index 092b547809..0000000000
--- a/doc/devel/calendar/cal-util/tmpl/cal-recur.sgml
+++ /dev/null
@@ -1,42 +0,0 @@
-<!-- ##### SECTION Title ##### -->
-cal-recur
-
-<!-- ##### SECTION Short_Description ##### -->
-
-
-<!-- ##### SECTION Long_Description ##### -->
-<para>
-
-</para>
-
-<!-- ##### SECTION See_Also ##### -->
-<para>
-
-</para>
-
-<!-- ##### USER_FUNCTION CalRecurInstanceFn ##### -->
-<para>
-
-</para>
-
-@comp:
-@instance_start:
-@instance_end:
-@data:
-@Returns:
-<!-- # Unused Parameters # -->
-@instace_end:
-
-
-<!-- ##### FUNCTION cal_recur_generate_instances ##### -->
-<para>
-
-</para>
-
-@comp:
-@start:
-@end:
-@cb:
-@cb_data:
-
-
diff --git a/doc/devel/calendar/cal-util/tmpl/cal-util.sgml b/doc/devel/calendar/cal-util/tmpl/cal-util.sgml
deleted file mode 100644
index ccd35fac2e..0000000000
--- a/doc/devel/calendar/cal-util/tmpl/cal-util.sgml
+++ /dev/null
@@ -1,48 +0,0 @@
-<!-- ##### SECTION Title ##### -->
-Miscellaneous utilities
-
-<!-- ##### SECTION Short_Description ##### -->
-
-
-<!-- ##### SECTION Long_Description ##### -->
-<para>
-
-</para>
-
-<!-- ##### SECTION See_Also ##### -->
-<para>
-
-</para>
-
-<!-- ##### TYPEDEF CalObjInstance ##### -->
-<para>
-
-</para>
-
-
-<!-- ##### FUNCTION cal_obj_instance_list_free ##### -->
-<para>
-
-</para>
-
-@list:
-
-
-<!-- ##### ENUM CalObjType ##### -->
-<para>
-
-</para>
-
-@CALOBJ_TYPE_EVENT:
-@CALOBJ_TYPE_TODO:
-@CALOBJ_TYPE_JOURNAL:
-@CALOBJ_TYPE_ANY:
-
-<!-- ##### FUNCTION cal_obj_uid_list_free ##### -->
-<para>
-
-</para>
-
-@list:
-
-
diff --git a/doc/devel/calendar/cal-util/tmpl/evolution-cal-util-unused.sgml b/doc/devel/calendar/cal-util/tmpl/evolution-cal-util-unused.sgml
deleted file mode 100644
index ff68fae99d..0000000000
--- a/doc/devel/calendar/cal-util/tmpl/evolution-cal-util-unused.sgml
+++ /dev/null
@@ -1,228 +0,0 @@
-<!-- ##### ENUM CalComponentAlarmTriggerRelated ##### -->
-<para>
-
-</para>
-
-@CAL_COMPONENT_ALARM_TRIGGER_RELATED_START:
-@CAL_COMPONENT_ALARM_TRIGGER_RELATED_END:
-
-<!-- ##### FUNCTION cal_recur_free ##### -->
-<para>
-
-</para>
-
-@r:
-
-<!-- ##### ENUM CalRecurType ##### -->
-<para>
-
-</para>
-
-@CAL_RECUR_YEARLY:
-@CAL_RECUR_MONTHLY:
-@CAL_RECUR_WEEKLY:
-@CAL_RECUR_DAILY:
-@CAL_RECUR_HOURLY:
-@CAL_RECUR_MINUTELY:
-@CAL_RECUR_SECONDLY:
-
-<!-- ##### TYPEDEF CalComponentAlarmTrigger ##### -->
-<para>
-
-</para>
-
-
-<!-- ##### FUNCTION cal_component_get_pilot_id ##### -->
-<para>
-
-</para>
-
-@comp:
-@pilot_id:
-
-<!-- ##### FUNCTION get_time_t_hour ##### -->
-<para>
-
-</para>
-
-@t:
-@Returns:
-
-<!-- ##### FUNCTION cal_component_alarm_free_trigger ##### -->
-<para>
-
-</para>
-
-@trigger: <!--
-Local variables:
-mode: sgml
-sgml-parent-document: ("../../../evolution-devel-guide.sgml" "book" "refsect2" "")
-End:
--->
-
-<!-- ##### FUNCTION time_day_hour ##### -->
-<para>
-
-</para>
-
-@t:
-@hour:
-@Returns:
-
-<!-- ##### FUNCTION time_from_isodate ##### -->
-<para>
-
-</para>
-
-@str:
-@Returns:
-
-<!-- ##### FUNCTION cal_component_get_pilot_status ##### -->
-<para>
-
-</para>
-
-@comp:
-@pilot_status:
-
-<!-- ##### STRUCT CalObjTime ##### -->
-<para>
-
-</para>
-
-@year:
-@month:
-@day:
-@hour:
-@minute:
-@second:
-
-<!-- ##### STRUCT CalComponentPrivate ##### -->
-<para>
-
-</para>
-
-
-<!-- ##### ENUM CalComponentAlarmTriggerType ##### -->
-<para>
-
-</para>
-
-@CAL_COMPONENT_ALARM_TRIGGER_RELATIVE:
-@CAL_COMPONENT_ALARM_TRIGGER_ABSOLUTE:
-
-<!-- ##### FUNCTION cal_recur_from_icalrecurrencetype ##### -->
-<para>
-
-</para>
-
-@ir:
-@Returns:
-
-<!-- ##### FUNCTION cal_alarm_instance_list_free ##### -->
-<para>
-
-</para>
-
-@list:
-
-<!-- ##### FUNCTION isodiff_to_secs ##### -->
-<para>
-
-</para>
-
-@str:
-@Returns:
-
-<!-- ##### FUNCTION cal_component_get_first_alarm ##### -->
-<para>
-
-</para>
-
-@comp:
-@Returns:
-
-<!-- ##### TYPEDEF CalRecurrence ##### -->
-<para>
-
-</para>
-
-
-<!-- ##### FUNCTION cal_component_get_next_alarm ##### -->
-<para>
-
-</para>
-
-@comp:
-@Returns:
-
-<!-- ##### FUNCTION time_from_icaltimetype ##### -->
-<para>
-
-</para>
-
-@itt:
-@Returns:
-
-<!-- ##### ENUM CalComponentAlarmAction ##### -->
-<para>
-
-</para>
-
-@CAL_COMPONENT_ALARM_NONE:
-@CAL_COMPONENT_ALARM_AUDIO:
-@CAL_COMPONENT_ALARM_DISPLAY:
-@CAL_COMPONENT_ALARM_EMAIL:
-@CAL_COMPONENT_ALARM_PROCEDURE:
-@CAL_COMPONENT_ALARM_UNKNOWN:
-
-<!-- ##### FUNCTION time_from_start_duration ##### -->
-<para>
-
-</para>
-
-@start:
-@duration:
-@Returns:
-
-<!-- ##### FUNCTION cal_component_set_pilot_id ##### -->
-<para>
-
-</para>
-
-@comp:
-@pilot_id:
-
-<!-- ##### FUNCTION isodiff_from_secs ##### -->
-<para>
-
-</para>
-
-@secs:
-@Returns:
-
-<!-- ##### FUNCTION format_simple_hour ##### -->
-<para>
-
-</para>
-
-@hour:
-@use_am_pm:
-@Returns:
-
-<!-- ##### FUNCTION cal_component_set_pilot_status ##### -->
-<para>
-
-</para>
-
-@comp:
-@pilot_status:
-
-<!-- ##### FUNCTION parse_date ##### -->
-<para>
-
-</para>
-
-@str:
-@Returns:
-
diff --git a/doc/devel/calendar/cal-util/tmpl/timeutil.sgml b/doc/devel/calendar/cal-util/tmpl/timeutil.sgml
deleted file mode 100644
index 2b197ad685..0000000000
--- a/doc/devel/calendar/cal-util/tmpl/timeutil.sgml
+++ /dev/null
@@ -1,176 +0,0 @@
-<!-- ##### SECTION Title ##### -->
-timeutil
-
-<!-- ##### SECTION Short_Description ##### -->
-
-
-<!-- ##### SECTION Long_Description ##### -->
-<para>
-
-</para>
-
-<!-- ##### SECTION See_Also ##### -->
-<para>
-
-</para>
-
-<!-- ##### FUNCTION isodate_from_time_t ##### -->
-<para>
-
-</para>
-
-@t:
-@Returns:
-
-
-<!-- ##### FUNCTION time_add_minutes ##### -->
-<para>
-
-</para>
-
-@time:
-@minutes:
-@Returns:
-
-
-<!-- ##### FUNCTION time_add_day ##### -->
-<para>
-
-</para>
-
-@time:
-@days:
-@Returns:
-
-
-<!-- ##### FUNCTION time_add_week ##### -->
-<para>
-
-</para>
-
-@time:
-@weeks:
-@Returns:
-
-
-<!-- ##### FUNCTION time_add_month ##### -->
-<para>
-
-</para>
-
-@time:
-@months:
-@Returns:
-
-
-<!-- ##### FUNCTION time_add_year ##### -->
-<para>
-
-</para>
-
-@time:
-@years:
-@Returns:
-
-
-<!-- ##### FUNCTION time_days_in_month ##### -->
-<para>
-
-</para>
-
-@year:
-@month:
-@Returns:
-
-
-<!-- ##### FUNCTION time_from_day ##### -->
-<para>
-
-</para>
-
-@year:
-@month:
-@day:
-@Returns:
-
-
-<!-- ##### FUNCTION time_year_begin ##### -->
-<para>
-
-</para>
-
-@t:
-@Returns:
-
-
-<!-- ##### FUNCTION time_year_end ##### -->
-<para>
-
-</para>
-
-@t:
-@Returns:
-
-
-<!-- ##### FUNCTION time_month_begin ##### -->
-<para>
-
-</para>
-
-@t:
-@Returns:
-
-
-<!-- ##### FUNCTION time_month_end ##### -->
-<para>
-
-</para>
-
-@t:
-@Returns:
-
-
-<!-- ##### FUNCTION time_week_begin ##### -->
-<para>
-
-</para>
-
-@t:
-@Returns:
-
-
-<!-- ##### FUNCTION time_week_end ##### -->
-<para>
-
-</para>
-
-@t:
-@Returns:
-
-
-<!-- ##### FUNCTION time_day_begin ##### -->
-<para>
-
-</para>
-
-@t:
-@Returns:
-
-
-<!-- ##### FUNCTION time_day_end ##### -->
-<para>
-
-</para>
-
-@t:
-@Returns:
-
-
-<!-- ##### FUNCTION print_time_t ##### -->
-<para>
-
-</para>
-
-@t:
-
-
diff --git a/doc/devel/calendar/evolution-calendar.sgml b/doc/devel/calendar/evolution-calendar.sgml
deleted file mode 100644
index ea0d8c7127..0000000000
--- a/doc/devel/calendar/evolution-calendar.sgml
+++ /dev/null
@@ -1,52 +0,0 @@
- <part id="evolution-calendar">
- <docinfo>
- <authorgroup>
- <author>
- <firstname>Federico</firstname>
- <surname>Mena Quintero</surname>
- <affiliation>
- <address>
- <email>federico@ximian.com</email>
- </address>
- </affiliation>
- </author>
- </authorgroup>
- </docinfo>
-
- <title>Developing Applications with the &Evolution; Calendar</title>
-
- <partintro>
- <para>
- This part of the &Evolution; Developer's Guide describes how
- to write applications for the &Evolution; Calendar by using
- its public interfaces. The &Evolution; Calendar exports its
- functionality through a number of interfaces, including CORBA,
- GTK+ wrappers for Bonobo objects, and other utility libraries.
- This part also describes the internals of the calendar so that
- it will be easy for you to make changes to &Evolution;'s core
- code.
- </para>
-
- <para>
- You should read this part of the &Evolution; Developer's guide
- if you intend to write client applications that use the
- functionality of the &Evolution; Calendar, such as its storage
- interfaces and generic recurrence engine. If you intend to
- make changes to the calendar's core code, it will be useful to
- read the sections on the calendar internals as well. Even if
- you do not intend to modify the core code of the calendar, it
- may be useful to know a few things about the way it works so
- that you can make better use of the public interfaces.
- </para>
- </partintro>
-
- &calendar-architecture;
- &calendar-alarm-generation;
- </part>
-
-<!--
-Local variables:
-mode: sgml
-sgml-parent-document: ("../evolution-devel-guide.sgml" "book" "book" "")
-End:
--->
diff --git a/doc/devel/calendar/public-reference.sgml b/doc/devel/calendar/public-reference.sgml
deleted file mode 100644
index b880bd2972..0000000000
--- a/doc/devel/calendar/public-reference.sgml
+++ /dev/null
@@ -1,24 +0,0 @@
- <reference id="calendar-public-reference">
- <title>Calendar Public API Reference</title>
-
- <partintro>
- <para>
- This part presents the class and function reference for the
- public APIs of the different components of the &Evolution;
- Calendar.
- </para>
- </partintro>
-
- &CalClient;
- &CalComponent;
- &cal-util;
- &cal-recur;
- &timeutil;
- </reference>
-
-<!--
-Local variables:
-mode: sgml
-sgml-parent-document: ("../evolution-devel-guide.sgml" "book" "part" "")
-End:
--->
diff --git a/doc/devel/evolution-devel-guide.sgml b/doc/devel/evolution-devel-guide.sgml
deleted file mode 100644
index 4a88261da4..0000000000
--- a/doc/devel/evolution-devel-guide.sgml
+++ /dev/null
@@ -1,97 +0,0 @@
-<!DOCTYPE book PUBLIC "-//Davenport//DTD DocBook V3.0//EN"[
-<!ENTITY preface SYSTEM "preface.sgml">
-<!ENTITY evolution-reference SYSTEM "reference.sgml">
-<!ENTITY FDL SYSTEM "fdl.sgml">
-
-<!ENTITY evolution-calendar SYSTEM "calendar/evolution-calendar.sgml">
-<!ENTITY calendar-architecture SYSTEM "calendar/architecture.sgml">
-<!ENTITY calendar-alarm-generation SYSTEM "calendar/alarm-generation.sgml">
-<!ENTITY calendar-public-reference SYSTEM "calendar/public-reference.sgml">
-<!ENTITY CalClient SYSTEM "calendar/cal-client/sgml/cal-client.sgml">
-<!ENTITY CalComponent SYSTEM "calendar/cal-util/sgml/cal-component.sgml">
-<!ENTITY cal-recur SYSTEM "calendar/cal-util/sgml/cal-recur.sgml">
-<!ENTITY cal-util SYSTEM "calendar/cal-util/sgml/cal-util.sgml">
-<!ENTITY timeutil SYSTEM "calendar/cal-util/sgml/timeutil.sgml">
-
-<!ENTITY importer-public-reference SYSTEM "importer/public-reference.sgml">
-<!ENTITY importer-private-reference SYSTEM "importer/private-reference.sgml">
-<!ENTITY EvolutionImporter SYSTEM "importer/sgml/evolution-importer.sgml">
-<!ENTITY EvolutionImporterClient SYSTEM "importer/sgml/evolution-importer-client.sgml">
-<!ENTITY EvolutionImporterListener SYSTEM "importer/sgml/evolution-importer-listener.sgml">
-
-<!ENTITY evolution-services-public-reference SYSTEM "executive-summary/public-reference.sgml">
-<!ENTITY evolution-services-private-reference SYSTEM "executive-summary/private-reference.sgml">
-<!ENTITY ExecutiveSummaryComponent SYSTEM "executive-summary/sgml/executive-summary-component.sgml">
-<!ENTITY ExecutiveSummaryComponentFactory SYSTEM "executive-summary/sgml/executive-summary-component-factory.sgml">
-<!ENTITY ExecutiveSummaryComponentFactoryClient SYSTEM "executive-summary/sgml/executive-summary-component-factory-client.sgml">
-<!ENTITY ExecutiveSummaryHtmlView SYSTEM "executive-summary/sgml/executive-summary-html-view.sgml">
-
-<!ENTITY Evolution "<application>Evolution</application>">
-<!ENTITY Wombat "<application>Wombat</application>">
-<!ENTITY Camel "<application>Camel</application>">
-<!ENTITY PCS "<acronym>PCS</acronym>">
-<!ENTITY libical "<application>libical</application>">
-<!ENTITY Executive-Summary "<application>Executive Summary</application>">
-]>
-
-<book id="index">
- <bookinfo>
- <title>&Evolution; Developer's Guide</title>
-
- <authorgroup>
- <corpauthor>
- Ximian, Inc.
- </corpauthor>
- </authorgroup>
-
- <copyright>
- <year>2000</year>
- <holder>Helix Code, Inc.</holder>
- </copyright>
-
- <copyright>
- <year>2001</year>
- <holder>Ximian, Inc.</holder>
- </copyright>
-
- <legalnotice id="legalnotice">
- <para>
- Permission is granted to copy, distribute and/or modify this
- document under the terms of the <ulink type="help"
- url="gnome-help:fdl"><citetitle>GNU Free Documentation
- License</citetitle></ulink>, Version 1.1 or any later version
- published by the Free Software Foundation with no Invariant
- Sections, no Front-Cover Texts, and no Back-Cover Texts. You
- may obtain a copy of the <citetitle>GNU Free Documentation
- License</citetitle> from the Free Software Foundation by
- visiting <ulink type="http" url="http://www.fsf.org">their Web
- site</ulink> or by writing to: Free Software Foundation, Inc.,
- 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- </para>
-
- <para>
- Many of the names used by companies to distinguish their
- products and services are claimed as trademarks. Where those
- names appear in any GNOME documentation, and those trademarks
- are made aware to the members of the GNOME Documentation
- Project, the names have been printed in caps or initial caps.
- </para>
- </legalnotice>
- </bookinfo>
-
- <!-- Introduction -->
-
- &preface;
-
- <!-- DocBook parts for each individual component -->
-
- &evolution-calendar;
-
- <!-- API Reference part -->
-
- &evolution-reference;
-
- <!-- Appendices -->
-
- &FDL;
-</book>
diff --git a/doc/devel/executive-summary/.cvsignore b/doc/devel/executive-summary/.cvsignore
deleted file mode 100644
index 282522db03..0000000000
--- a/doc/devel/executive-summary/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/doc/devel/executive-summary/Makefile.am b/doc/devel/executive-summary/Makefile.am
deleted file mode 100644
index 9aa53af4ec..0000000000
--- a/doc/devel/executive-summary/Makefile.am
+++ /dev/null
@@ -1,125 +0,0 @@
-# The name of the module.
-DOC_MODULE=evolution-services
-
-# The directory containing the source code
-DOC_SOURCE_DIR=$(EVOLUTION_DIR)/executive-summary/evolution-services
-
-CFLAGS =" \
- -I$(top_srcdir)/executive-summary/evolution-services \
- -I$(top_srcdir)/executive-summary \
- -I$(top_srcdir) \
- -I$(top_builddir) \
- $(BONOBO_VFS_GNOME_CFLAGS) \
- "
-
-LDFLAGS=" \
- $(BONOBO_VFS_GNOME_LIBS) \
- $(top_builddir)/executive-summary/evolution-services/.libs/libevolution-services.a \
- "
-
-DOC_DIR=$(datadir)/gnome/html
-
-DOC_DIR_INSTALL_FILES = \
- evolution-services.args \
- evolution-services.hierarchy \
- evolution-services.signals \
- evolution-services.types \
- evolution-services-decl.txt \
- evolution-services-sections.txt
-
-SOURCE_FILES = \
- $(top_srcdir)/executive-summary/evolution-services/executive-summary-component.c \
- $(top_srcdir)/executive-summary/evolution-services/executive-summary-component-factory-client.c \
- $(top_srcdir)/executive-summary/evolution-services/executive-summary-html-view.c
-
-IGNORED_HEADER_FILES = \
- Executive-Summary.h
-
-scan_generated = \
- evolution-services-decl.txt \
- evolution-services.args \
- evolution-services.hierarchy \
- evolution-services.signals \
- evolution-services.types
-
-tmpl_dependencies = \
- evolution-services-decl.txt \
- evolution-services-sections.txt \
- evolution-services.args \
- evolution-services.hierarchy \
- evolution-services.signals
-
-tmpl_sources = \
- tmpl/evolution-services.sgml \
- tmpl/evolution-services-unused.sgml
-
-tmpl_generated = \
- evolution-services-unused.txt
-
-sgml_dependencies = \
- evolution-services-decl.txt \
- evolution-services-sections.txt \
- evolution-services.args \
- evolution-services.hierarchy \
- evolution-services.signals \
- tmpl/evolution-services.sgml
-
-sgml_generated = \
- sgml/evolution-services.sgml \
- sgml/evolution-services-doc.bottom \
- sgml/evolution-services-doc.top \
- sgml/object_index.sgml \
- sgml/tree_index.sgml
-
-EXTRA_DIST = \
- evolution-services.args \
- evolution-services.hierarchy \
- evolution-services.signals \
- evolution-services.types \
- evolution-services-decl.txt \
- evolution-services-sections.txt
-
-all: $(sgml_generated)
-
-if ENABLE_GTK_DOC
-scan $(scan_generated): $(SOURCE_FILES)
- -(cd $(srcdir) \
- && env CFLAGS=$(CFLAGS) LDFLAGS=$(LDFLAGS) \
- gtkdoc-scanobj --module=$(DOC_MODULE) \
- && gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) \
- --ignore-headers="$(IGNORED_HEADER_FILES)" )
-
-templates $(tmpl_sources) $(tmpl_generated): $(tmpl_dependencies)
- cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE)
-
-sgml $(sgml_generated): $(sgml_dependencies)
- cd $(srcdir) \
- && gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR)
-else
-scan $(scan_generated): $(SOURCE_FILE)
-
-templates $(tmpl_sources) $(tmpl_generated): $(tmpl_dependencies)
-
-sgml $(sgml_generated): $(sgml_dependencies)
-endif
-
-clean-local:
- rm -f *~ *.bak *.signals *-unused.txt
-
-maintainer-clean-local: clean
- cd $(srcdir) && rm -rf sgml $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
-
-install-data-local:
- $(mkinstalldirs) $(DOC_DIR)
- for i in $(DOC_DIR_INSTALL_FILES); do \
- $(INSTALL_DATA) $$i $(DOC_DIR); \
- done
-
-dist-hook:
- mkdir $(distdir)/sgml
- mkdir $(distdir)/tmpl
- -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
- -cp $(srcdir)/sgml/*.sgml $(distdir)/sgml
- -cp $(srcdir)/sgml/*.bottom $(srcdir)/sgml/*.top $(distdir)/sgml
-
-.PHONY: scan templates sgml
diff --git a/doc/devel/executive-summary/evolution-services-decl.txt b/doc/devel/executive-summary/evolution-services-decl.txt
deleted file mode 100644
index df84080700..0000000000
--- a/doc/devel/executive-summary/evolution-services-decl.txt
+++ /dev/null
@@ -1,599 +0,0 @@
-<MACRO>
-<NAME>EXECUTIVE_SUMMARY_CLIENT_TYPE</NAME>
-#define EXECUTIVE_SUMMARY_CLIENT_TYPE (executive_summary_client_get_type ())
-</MACRO>
-<MACRO>
-<NAME>EXECUTIVE_SUMMARY_CLIENT</NAME>
-#define EXECUTIVE_SUMMARY_CLIENT(obj) (GTK_CHECK_CAST ((obj), EXECUTIVE_SUMMARY_CLIENT_TYPE, ExecutiveSummaryClient))
-</MACRO>
-<MACRO>
-<NAME>EXECUTIVE_SUMMARY_CLIENT_CLASS</NAME>
-#define EXECUTIVE_SUMMARY_CLIENT_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), EXECUTIVE_SUMMARY_CLIENT_TYPE, ExecutiveSummaryClientClass))
-</MACRO>
-<MACRO>
-<NAME>IS_EXECUTIVE_SUMMARY_CLIENT</NAME>
-#define IS_EXECUTIVE_SUMMARY_CLIENT(obj) (GTK_CHECK_TYPE ((obj), EXECUTIVE_SUMMARY_CLIENT_TYPE))
-</MACRO>
-<MACRO>
-<NAME>IS_EXECUTIVE_SUMMARY_CLIENT_CLASS</NAME>
-#define IS_EXECUTIVE_SUMMARY_CLIENT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), EXECUTIVE_SUMMARY_CLIENT_TYPE))
-</MACRO>
-<STRUCT>
-<NAME>ExecutiveSummaryClientPrivate</NAME>
-</STRUCT>
-<STRUCT>
-<NAME>ExecutiveSummaryClient</NAME>
-</STRUCT>
-<STRUCT>
-<NAME>ExecutiveSummaryClientClass</NAME>
-</STRUCT>
-<STRUCT>
-<NAME>ExecutiveSummaryClient</NAME>
-struct ExecutiveSummaryClient {
- BonoboObjectClient parent;
-
- ExecutiveSummaryClientPrivate *private;
-};
-</STRUCT>
-<STRUCT>
-<NAME>ExecutiveSummaryClientClass</NAME>
-struct ExecutiveSummaryClientClass {
- BonoboObjectClientClass parent_class;
-};
-</STRUCT>
-<FUNCTION>
-<NAME>executive_summary_client_get_type</NAME>
-<RETURNS>GtkType </RETURNS>
-void
-</FUNCTION>
-<FUNCTION>
-<NAME>executive_summary_client_construct</NAME>
-<RETURNS>void </RETURNS>
-ExecutiveSummaryClient *client,CORBA_Object object
-</FUNCTION>
-<FUNCTION>
-<NAME>executive_summary_client_set_title</NAME>
-<RETURNS>void </RETURNS>
-ExecutiveSummaryClient *client,int id,const char *title
-</FUNCTION>
-<FUNCTION>
-<NAME>executive_summary_client_set_icon</NAME>
-<RETURNS>void </RETURNS>
-ExecutiveSummaryClient *client,int id,const char *icon
-</FUNCTION>
-<FUNCTION>
-<NAME>executive_summary_client_flash</NAME>
-<RETURNS>void </RETURNS>
-ExecutiveSummaryClient *client,int id
-</FUNCTION>
-<FUNCTION>
-<NAME>executive_summary_client_update</NAME>
-<RETURNS>void </RETURNS>
-ExecutiveSummaryClient *client,int id,const char *html
-</FUNCTION>
-<MACRO>
-<NAME>EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLIENT_TYPE</NAME>
-#define EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLIENT_TYPE (executive_summary_component_factory_client_get_type ())
-</MACRO>
-<MACRO>
-<NAME>EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLIENT</NAME>
-#define EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLIENT(obj) (GTK_CHECK_CAST ((obj), EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLIENT_TYPE, ExecutiveSummaryComponentFactoryClient))
-</MACRO>
-<MACRO>
-<NAME>EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLIENT_CLASS</NAME>
-#define EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLIENT_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLIENT_TYPE, ExecutiveSummaryComponentFactoryClientClass))
-</MACRO>
-<MACRO>
-<NAME>IS_EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLIENT</NAME>
-#define IS_EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLIENT(obj) (GTK_CHECK_TYPE ((obj), EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLIENT_TYPE))
-</MACRO>
-<MACRO>
-<NAME>IS_EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLIENT_CLASS</NAME>
-#define IS_EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLIENT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLIENT_TYPE))
-</MACRO>
-<STRUCT>
-<NAME>ExecutiveSummaryComponentFactoryClientPrivate</NAME>
-</STRUCT>
-<STRUCT>
-<NAME>ExecutiveSummaryComponentFactoryClient</NAME>
-</STRUCT>
-<STRUCT>
-<NAME>ExecutiveSummaryComponentFactoryClientClass</NAME>
-</STRUCT>
-<STRUCT>
-<NAME>ExecutiveSummaryComponentFactoryClient</NAME>
-struct ExecutiveSummaryComponentFactoryClient {
- BonoboObjectClient parent;
-
- ExecutiveSummaryComponentFactoryClientPrivate *private;
-};
-</STRUCT>
-<STRUCT>
-<NAME>ExecutiveSummaryComponentFactoryClientClass</NAME>
-struct ExecutiveSummaryComponentFactoryClientClass {
- BonoboObjectClientClass parent_class;
-};
-</STRUCT>
-<FUNCTION>
-<NAME>executive_summary_component_factory_client_get_type</NAME>
-<RETURNS>GtkType </RETURNS>
-void
-</FUNCTION>
-<FUNCTION>
-<NAME>executive_summary_component_factory_client_construct</NAME>
-<RETURNS>void </RETURNS>
-ExecutiveSummaryComponentFactoryClient *client,CORBA_Object corba_object
-</FUNCTION>
-<FUNCTION>
-<NAME>executive_summary_component_factory_client_new</NAME>
-<RETURNS>ExecutiveSummaryComponentFactoryClient *</RETURNS>
-const char *id
-</FUNCTION>
-<FUNCTION>
-<NAME>executive_summary_component_factory_client_create_view</NAME>
-<RETURNS>CORBA_Object </RETURNS>
-ExecutiveSummaryComponentFactoryClient *client
-</FUNCTION>
-<MACRO>
-<NAME>EXECUTIVE_SUMMARY_COMPONENT_TYPE</NAME>
-#define EXECUTIVE_SUMMARY_COMPONENT_TYPE (executive_summary_component_get_type ())
-</MACRO>
-<MACRO>
-<NAME>EXECUTIVE_SUMMARY_COMPONENT</NAME>
-#define EXECUTIVE_SUMMARY_COMPONENT(obj) (GTK_CHECK_CAST ((obj), EXECUTIVE_SUMMARY_COMPONENT_TYPE, ExecutiveSummaryComponent))
-</MACRO>
-<MACRO>
-<NAME>EXECUTIVE_SUMMARY_COMPONENT_CLASS</NAME>
-#define EXECUTIVE_SUMMARY_COMPONENT_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), EXECUTIVE_SUMMARY_COMPONENT_TYPE, ExecutiveSummaryComponentClass))
-</MACRO>
-<MACRO>
-<NAME>IS_EXECUTIVE_SUMMARY_COMPONENT</NAME>
-#define IS_EXECUTIVE_SUMMARY_COMPONENT(obj) (GTK_CHECK_TYPE ((obj), EXECUTIVE_SUMMARY_COMPONENT_TYPE))
-</MACRO>
-<MACRO>
-<NAME>IS_EXECUTIVE_SUMMARY_COMPONENT_CLASS</NAME>
-#define IS_EXECUTIVE_SUMMARY_COMPONENT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), EXECUTIVE_SUMMARY_COMPONENT_TYPE))
-</MACRO>
-<STRUCT>
-<NAME>ExecutiveSummaryComponentPrivate</NAME>
-</STRUCT>
-<STRUCT>
-<NAME>ExecutiveSummaryComponent</NAME>
-</STRUCT>
-<STRUCT>
-<NAME>ExecutiveSummaryComponentClass</NAME>
-</STRUCT>
-<STRUCT>
-<NAME>ExecutiveSummaryComponent</NAME>
-struct ExecutiveSummaryComponent {
- BonoboObject parent;
-
- ExecutiveSummaryComponentPrivate *private;
-};
-</STRUCT>
-<STRUCT>
-<NAME>ExecutiveSummaryComponentClass</NAME>
-struct ExecutiveSummaryComponentClass {
- BonoboObjectClass parent_class;
-};
-</STRUCT>
-<FUNCTION>
-<NAME>executive_summary_component_get_type</NAME>
-<RETURNS>GtkType </RETURNS>
-void
-</FUNCTION>
-<FUNCTION>
-<NAME>executive_summary_component_new</NAME>
-<RETURNS>BonoboObject *</RETURNS>
-void
-</FUNCTION>
-<MACRO>
-<NAME>EXECUTIVE_SUMMARY_COMPONENT_FACTORY_TYPE</NAME>
-#define EXECUTIVE_SUMMARY_COMPONENT_FACTORY_TYPE (executive_summary_component_factory_get_type ())
-</MACRO>
-<MACRO>
-<NAME>EXECUTIVE_SUMMARY_COMPONENT_FACTORY</NAME>
-#define EXECUTIVE_SUMMARY_COMPONENT_FACTORY(obj) (GTK_CHECK_CAST ((obj), EXECUTIVE_SUMMARY_COMPONENT_FACTORY_TYPE, ExecutiveSummaryComponentFactory))
-</MACRO>
-<MACRO>
-<NAME>EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLASS</NAME>
-#define EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), EXECUTIVE_SUMMARY_COMPONENT_FACTORY_TYPE, ExecutiveSummaryComponentFactoryClass))
-</MACRO>
-<MACRO>
-<NAME>IS_EXECUTIVE_SUMMARY_COMPONENT_FACTORY</NAME>
-#define IS_EXECUTIVE_SUMMARY_COMPONENT_FACTORY(obj) (GTK_CHECK_TYPE ((obj), EXECUTIVE_SUMMARY_COMPONENT_FACTORY_TYPE))
-</MACRO>
-<MACRO>
-<NAME>IS_EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLASS</NAME>
-#define IS_EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), EXECUTIVE_SUMMARY_COMPONENT_FACTORY_TYPE))
-</MACRO>
-<STRUCT>
-<NAME>ExecutiveSummaryComponentFactoryPrivate</NAME>
-</STRUCT>
-<STRUCT>
-<NAME>ExecutiveSummaryComponentFactory</NAME>
-</STRUCT>
-<STRUCT>
-<NAME>ExecutiveSummaryComponentFactoryClass</NAME>
-</STRUCT>
-<USER_FUNCTION>
-<NAME>EvolutionServicesCreateViewFn</NAME>
-<RETURNS>BonoboObject *</RETURNS>
-ExecutiveSummaryComponentFactory *factory,
- void *closure
-</USER_FUNCTION>
-<STRUCT>
-<NAME>ExecutiveSummaryComponentFactory</NAME>
-struct ExecutiveSummaryComponentFactory {
- BonoboObject parent;
-
- ExecutiveSummaryComponentFactoryPrivate *private;
-};
-</STRUCT>
-<STRUCT>
-<NAME>ExecutiveSummaryComponentFactoryClass</NAME>
-struct ExecutiveSummaryComponentFactoryClass {
- BonoboObjectClass parent_class;
-};
-</STRUCT>
-<FUNCTION>
-<NAME>executive_summary_component_factory_get_type</NAME>
-<RETURNS>GtkType </RETURNS>
-void
-</FUNCTION>
-<FUNCTION>
-<NAME>executive_summary_component_factory_new</NAME>
-<RETURNS>BonoboObject *</RETURNS>
-EvolutionServicesCreateViewFn create_view,void *closure
-</FUNCTION>
-<MACRO>
-<NAME>EXECUTIVE_SUMMARY_HTML_VIEW_HTML_CHANGED</NAME>
-#define EXECUTIVE_SUMMARY_HTML_VIEW_HTML_CHANGED "GNOME:Evolution:Summary:HTMLView:html_changed"
-</MACRO>
-<MACRO>
-<NAME>EXECUTIVE_SUMMARY_HTML_VIEW_TYPE</NAME>
-#define EXECUTIVE_SUMMARY_HTML_VIEW_TYPE (executive_summary_html_view_get_type ())
-</MACRO>
-<MACRO>
-<NAME>EXECUTIVE_SUMMARY_HTML_VIEW</NAME>
-#define EXECUTIVE_SUMMARY_HTML_VIEW(obj) (GTK_CHECK_CAST ((obj), EXECUTIVE_SUMMARY_HTML_VIEW_TYPE, ExecutiveSummaryHtmlView))
-</MACRO>
-<MACRO>
-<NAME>EXECUTIVE_SUMMARY_HTML_VIEW_CLASS</NAME>
-#define EXECUTIVE_SUMMARY_HTML_VIEW_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), EXECUTIVE_SUMMARY_HTML_VIEW_TYPE, ExecutiveSummaryHtmlViewClass))
-</MACRO>
-<MACRO>
-<NAME>IS_EXECUTIVE_SUMMARY_HTML_VIEW</NAME>
-#define IS_EXECUTIVE_SUMMARY_HTML_VIEW(obj) (GTK_CHECK_TYPE ((obj), EXECUTIVE_SUMMARY_HTML_VIEW_TYPE))
-</MACRO>
-<MACRO>
-<NAME>IS_EXECUTIVE_SUMMARY_HTML_VIEW_CLASS</NAME>
-#define IS_EXECUTIVE_SUMMARY_HTML_VIEW_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), EXECUTIVE_SUMMARY_HTML_VIEW_TYPE))
-</MACRO>
-<STRUCT>
-<NAME>ExecutiveSummaryHtmlViewPrivate</NAME>
-</STRUCT>
-<STRUCT>
-<NAME>ExecutiveSummaryHtmlView</NAME>
-</STRUCT>
-<STRUCT>
-<NAME>ExecutiveSummaryHtmlViewClass</NAME>
-</STRUCT>
-<STRUCT>
-<NAME>ExecutiveSummaryHtmlView</NAME>
-struct ExecutiveSummaryHtmlView {
- BonoboObject parent;
-
- ExecutiveSummaryHtmlViewPrivate *private;
-};
-</STRUCT>
-<STRUCT>
-<NAME>ExecutiveSummaryHtmlViewClass</NAME>
-struct ExecutiveSummaryHtmlViewClass {
- BonoboObjectClass parent_class;
-};
-</STRUCT>
-<FUNCTION>
-<NAME>executive_summary_html_view_get_type</NAME>
-<RETURNS>GtkType </RETURNS>
-void
-</FUNCTION>
-<FUNCTION>
-<NAME>executive_summary_html_view_new_full</NAME>
-<RETURNS>BonoboObject *</RETURNS>
-BonoboEventSource *event_source
-</FUNCTION>
-<FUNCTION>
-<NAME>executive_summary_html_view_new</NAME>
-<RETURNS>BonoboObject *</RETURNS>
-void
-</FUNCTION>
-<FUNCTION>
-<NAME>executive_summary_html_view_set_html</NAME>
-<RETURNS>void </RETURNS>
-ExecutiveSummaryHtmlView *view,const char *html
-</FUNCTION>
-<FUNCTION>
-<NAME>executive_summary_html_view_get_html</NAME>
-<RETURNS>const char *</RETURNS>
-ExecutiveSummaryHtmlView *view
-</FUNCTION>
-<FUNCTION>
-<NAME>executive_summary_html_view_get_event_source</NAME>
-<RETURNS>BonoboEventSource *</RETURNS>
-ExecutiveSummaryHtmlView *view
-</FUNCTION>
-<MACRO>
-<NAME>EXECUTIVE_SUMMARY_COMPONENT_CLIENT_TYPE</NAME>
-#define EXECUTIVE_SUMMARY_COMPONENT_CLIENT_TYPE (executive_summary_component_client_get_type ())
-</MACRO>
-<MACRO>
-<NAME>EXECUTIVE_SUMMARY_COMPONENT_CLIENT</NAME>
-#define EXECUTIVE_SUMMARY_COMPONENT_CLIENT(obj) (GTK_CHECK_CAST ((obj), EXECUTIVE_SUMMARY_COMPONENT_CLIENT_TYPE, ExecutiveSummaryComponentClient))
-</MACRO>
-<MACRO>
-<NAME>EXECUTIVE_SUMMARY_COMPONENT_CLIENT_CLASS</NAME>
-#define EXECUTIVE_SUMMARY_COMPONENT_CLIENT_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), EXECUTIVE_SUMMARY_COMPONENT_CLIENT_TYPE, ExecutiveSummaryComponentClientClass))
-</MACRO>
-<MACRO>
-<NAME>IS_EXECUTIVE_SUMMARY_COMPONENT_CLIENT</NAME>
-#define IS_EXECUTIVE_SUMMARY_COMPONENT_CLIENT(obj) (GTK_CHECK_TYPE ((obj), EXECUTIVE_SUMMARY_COMPONENT_CLIENT_TYPE))
-</MACRO>
-<MACRO>
-<NAME>IS_EXECUTIVE_SUMMARY_COMPONENT_CLIENT_CLASS</NAME>
-#define IS_EXECUTIVE_SUMMARY_COMPONENT_CLIENT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), EXECUTIVE_SUMMARY_COMPONENT_CLIENT_TYPE))
-</MACRO>
-<STRUCT>
-<NAME>ExecutiveSummaryComponentClientPrivate</NAME>
-</STRUCT>
-<STRUCT>
-<NAME>ExecutiveSummaryComponentClient</NAME>
-</STRUCT>
-<STRUCT>
-<NAME>ExecutiveSummaryComponentClientClass</NAME>
-</STRUCT>
-<STRUCT>
-<NAME>ExecutiveSummaryComponentClient</NAME>
-struct ExecutiveSummaryComponentClient {
- BonoboObjectClient parent;
-
- ExecutiveSummaryComponentClientPrivate *private;
-};
-</STRUCT>
-<STRUCT>
-<NAME>ExecutiveSummaryComponentClientClass</NAME>
-struct ExecutiveSummaryComponentClientClass {
- BonoboObjectClientClass parent_class;
-};
-</STRUCT>
-<FUNCTION>
-<NAME>executive_summary_component_client_get_type</NAME>
-<RETURNS>GtkType </RETURNS>
-void
-</FUNCTION>
-<FUNCTION>
-<NAME>executive_summary_component_client_new</NAME>
-<RETURNS>ExecutiveSummaryComponentClient *</RETURNS>
-const char *id
-</FUNCTION>
-<FUNCTION>
-<NAME>executive_summary_component_client_set_owner</NAME>
-<RETURNS>void </RETURNS>
-ExecutiveSummaryComponentClient *client,ExecutiveSummary *summary
-</FUNCTION>
-<FUNCTION>
-<NAME>executive_summary_component_client_unset_owner</NAME>
-<RETURNS>void </RETURNS>
-ExecutiveSummaryComponentClient *client
-</FUNCTION>
-<FUNCTION>
-<NAME>executive_summary_component_client_supports</NAME>
-<RETURNS>void </RETURNS>
-ExecutiveSummaryComponentClient *client,gboolean *bonobo,gboolean *html
-</FUNCTION>
-<FUNCTION>
-<NAME>executive_summary_component_client_configure</NAME>
-<RETURNS>void </RETURNS>
-ExecutiveSummaryComponentClient *client,ExecutiveSummaryComponentView *view
-</FUNCTION>
-<FUNCTION>
-<NAME>executive_summary_component_client_destroy_view</NAME>
-<RETURNS>void </RETURNS>
-ExecutiveSummaryComponentClient *client,ExecutiveSummaryComponentView *view
-</FUNCTION>
-<MACRO>
-<NAME>EXECUTIVE_SUMMARY_TYPE</NAME>
-#define EXECUTIVE_SUMMARY_TYPE (executive_summary_get_type ())
-</MACRO>
-<MACRO>
-<NAME>EXECUTIVE_SUMMARY</NAME>
-#define EXECUTIVE_SUMMARY(obj) (GTK_CHECK_CAST ((obj), EXECUTIVE_SUMMARY_TYPE, ExecutiveSummary))
-</MACRO>
-<MACRO>
-<NAME>EXECUTIVE_SUMMARY_CLASS</NAME>
-#define EXECUTIVE_SUMMARY_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), EXECUTIVE_SUMMARY_TYPE, ExecutiveSummaryClass))
-</MACRO>
-<MACRO>
-<NAME>IS_EXECUTIVE_SUMMARY</NAME>
-#define IS_EXECUTIVE_SUMMARY(obj) (GTK_CHECK_TYPE ((obj), EXECUTIVE_SUMMARY_TYPE))
-</MACRO>
-<MACRO>
-<NAME>IS_EXECUTIVE_SUMMARY_CLASS</NAME>
-#define IS_EXECUTIVE_SUMMARY_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), EXECUTIVE_SUMMARY_TYPE))
-</MACRO>
-<STRUCT>
-<NAME>ExecutiveSummaryPrivate</NAME>
-</STRUCT>
-<STRUCT>
-<NAME>ExecutiveSummary</NAME>
-</STRUCT>
-<STRUCT>
-<NAME>ExecutiveSummaryClass</NAME>
-</STRUCT>
-<STRUCT>
-<NAME>ExecutiveSummary</NAME>
-struct ExecutiveSummary {
- BonoboObject parent;
-
- ExecutiveSummaryPrivate *private;
-};
-</STRUCT>
-<STRUCT>
-<NAME>ExecutiveSummaryClass</NAME>
-struct ExecutiveSummaryClass {
- BonoboObjectClass parent_class;
-
- void (* update) (ExecutiveSummary *summary,
- const GNOME_Evolution_Summary_Component component,
- const char *html);
- void (* set_title) (ExecutiveSummary *summary,
- const GNOME_Evolution_Summary_Component component,
- const char *title);
- void (* set_icon) (ExecutiveSummary *summary,
- const GNOME_Evolution_Summary_Component component,
- const char *icon);
- void (* flash) (ExecutiveSummary *summary,
- const GNOME_Evolution_Summary_Component component);
-};
-</STRUCT>
-<FUNCTION>
-<NAME>executive_summary_get_type</NAME>
-<RETURNS>GtkType </RETURNS>
-void
-</FUNCTION>
-<FUNCTION>
-<NAME>executive_summary_construct</NAME>
-<RETURNS>void </RETURNS>
-ExecutiveSummary *es,GNOME_Evolution_Summary_ViewFrame corba_object
-</FUNCTION>
-<FUNCTION>
-<NAME>executive_summary_new</NAME>
-<RETURNS>BonoboObject *</RETURNS>
-void
-</FUNCTION>
-<MACRO>
-<NAME>EXECUTIVE_SUMMARY_COMPONENT_VIEW_TYPE</NAME>
-#define EXECUTIVE_SUMMARY_COMPONENT_VIEW_TYPE (executive_summary_component_view_get_type ())
-</MACRO>
-<MACRO>
-<NAME>EXECUTIVE_SUMMARY_COMPONENT_VIEW</NAME>
-#define EXECUTIVE_SUMMARY_COMPONENT_VIEW(obj) (GTK_CHECK_CAST ((obj), EXECUTIVE_SUMMARY_COMPONENT_VIEW_TYPE, ExecutiveSummaryComponentView))
-</MACRO>
-<MACRO>
-<NAME>EXECUTIVE_SUMMARY_COMPONENT_VIEW_CLASS</NAME>
-#define EXECUTIVE_SUMMARY_COMPONENT_VIEW_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), EXECUTIVE_SUMMARY_COMPONENT_VIEW_TYPE, ExecutiveSummaryComponentClass))
-</MACRO>
-<MACRO>
-<NAME>IS_EXECUTIVE_SUMMARY_COMPONENT_VIEW</NAME>
-#define IS_EXECUTIVE_SUMMARY_COMPONENT_VIEW(obj) (GTK_CHECK_TYPE ((obj), EXECUTIVE_SUMMARY_COMPONENT_VIEW_TYPE))
-</MACRO>
-<MACRO>
-<NAME>IS_EXECUTIVE_SUMMARY_COMPONENT_VIEW_CLASS</NAME>
-#define IS_EXECUTIVE_SUMMARY_COMPONENT_VIEW_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), EXECUTIVE_SUMMARY_COMPONENT_VIEW_CLASS_TYPE))
-</MACRO>
-<STRUCT>
-<NAME>ExecutiveSummaryComponentViewPrivate</NAME>
-</STRUCT>
-<STRUCT>
-<NAME>ExecutiveSummaryComponentView</NAME>
-</STRUCT>
-<STRUCT>
-<NAME>ExecutiveSummaryComponentViewClass</NAME>
-</STRUCT>
-<STRUCT>
-<NAME>ExecutiveSummaryComponentView</NAME>
-struct ExecutiveSummaryComponentView {
- GtkObject object;
-
- ExecutiveSummaryComponentViewPrivate *private;
-};
-</STRUCT>
-<STRUCT>
-<NAME>ExecutiveSummaryComponentViewClass</NAME>
-struct ExecutiveSummaryComponentViewClass {
- GtkObjectClass parent_class;
-
- /* Signals */
- void (* configure) (ExecutiveSummaryComponentView *view);
-};
-</STRUCT>
-<FUNCTION>
-<NAME>executive_summary_component_view_get_type</NAME>
-<RETURNS>GtkType </RETURNS>
-void
-</FUNCTION>
-<FUNCTION>
-<NAME>executive_summary_component_view_construct</NAME>
-<RETURNS>void</RETURNS>
-ExecutiveSummaryComponentView *view,ExecutiveSummaryComponent *component,BonoboControl *control,const char *html,const char *title,const char *icon
-</FUNCTION>
-<FUNCTION>
-<NAME>executive_summary_component_view_new</NAME>
-<RETURNS>ExecutiveSummaryComponentView *</RETURNS>
-ExecutiveSummaryComponent *component,BonoboControl *control,const char *html,const char *title,const char *icon
-</FUNCTION>
-<FUNCTION>
-<NAME>executive_summary_component_view_set_title</NAME>
-<RETURNS>void </RETURNS>
-ExecutiveSummaryComponentView *view,const char *title
-</FUNCTION>
-<FUNCTION>
-<NAME>executive_summary_component_view_get_title</NAME>
-<RETURNS>const char *</RETURNS>
-ExecutiveSummaryComponentView *view
-</FUNCTION>
-<FUNCTION>
-<NAME>executive_summary_component_view_set_icon</NAME>
-<RETURNS>void </RETURNS>
-ExecutiveSummaryComponentView *view,const char *icon
-</FUNCTION>
-<FUNCTION>
-<NAME>executive_summary_component_view_get_icon</NAME>
-<RETURNS>const char *</RETURNS>
-ExecutiveSummaryComponentView *view
-</FUNCTION>
-<FUNCTION>
-<NAME>executive_summary_component_view_flash</NAME>
-<RETURNS>void </RETURNS>
-ExecutiveSummaryComponentView *view
-</FUNCTION>
-<FUNCTION>
-<NAME>executive_summary_component_view_set_html</NAME>
-<RETURNS>void </RETURNS>
-ExecutiveSummaryComponentView *view,const char *html
-</FUNCTION>
-<FUNCTION>
-<NAME>executive_summary_component_view_get_html</NAME>
-<RETURNS>const char *</RETURNS>
-ExecutiveSummaryComponentView *view
-</FUNCTION>
-<FUNCTION>
-<NAME>executive_summary_component_view_get_control</NAME>
-<RETURNS>BonoboObject *</RETURNS>
-ExecutiveSummaryComponentView *view
-</FUNCTION>
-<FUNCTION>
-<NAME>executive_summary_component_view_get_id</NAME>
-<RETURNS>int </RETURNS>
-ExecutiveSummaryComponentView *view
-</FUNCTION>
-<FUNCTION>
-<NAME>executive_summary_component_view_set_id</NAME>
-<RETURNS>void </RETURNS>
-ExecutiveSummaryComponentView *view,int id
-</FUNCTION>
-<FUNCTION>
-<NAME>executive_summary_component_view_configure</NAME>
-<RETURNS>void </RETURNS>
-ExecutiveSummaryComponentView *view
-</FUNCTION>
-<FUNCTION>
-<NAME>executive_summary_component_view_set_objref</NAME>
-<RETURNS>void </RETURNS>
-ExecutiveSummaryComponentView *view,Bonobo_Control objref
-</FUNCTION>
-<FUNCTION>
-<NAME>executive_summary_component_view_get_widget</NAME>
-<RETURNS>GtkWidget *</RETURNS>
-ExecutiveSummaryComponentView *view
-</FUNCTION>
diff --git a/doc/devel/executive-summary/evolution-services-sections.txt b/doc/devel/executive-summary/evolution-services-sections.txt
deleted file mode 100644
index 8ba2b42317..0000000000
--- a/doc/devel/executive-summary/evolution-services-sections.txt
+++ /dev/null
@@ -1,95 +0,0 @@
-<INCLUDE>executive-summary-component.h</INCLUDE>
-<SECTION>
-<FILE>executive-summary-component</FILE>
-EXECUTIVE_SUMMARY_COMPONENT
-<TITLE>ExecutiveSummaryComponent</TITLE>
-
-executive_summary_component_new
-
-<SUBSECTION Standard>
-EXECUTIVE_SUMMARY_COMPONENT_TYPE
-EXECUTIVE_SUMMARY_COMPONENT
-EXECUTIVE_SUMMARY_COMPONENT_CLASS
-IS_EXECUTIVE_SUMMARY_COMPONENT
-IS_EXECUTIVE_SUMMARY_COMPONENT_CLASS
-executive_summary_component_get_type
-
-<SUBSECTION Private>
-ExecutiveSummaryComponent
-ExecutiveSummaryComponentPrivate
-
-</SECTION>
-
-<SECTION>
-<FILE>executive-summary-component-factory</FILE>
-EXECUTIVE_SUMMARY_COMPONENT_FACTORY
-<TITLE>ExecutiveSummaryComponentFactory</TITLE>
-
-EvolutionServicesCreateViewFn
-
-executive_summary_component_factory_new
-
-<SUBSECTION Standard>
-EXECUTIVE_SUMMARY_COMPONENT_FACTORY_TYPE
-EXECUTIVE_SUMMARY_COMPONENT_FACTORY
-EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLASS
-IS_EXECUTIVE_SUMMARY_COMPONENT_FACTORY
-IS_EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLASS
-executive_summary_component_factory_get_type
-
-<SUBSECTION Private>
-ExecutiveSummaryComponentFactory
-ExecutiveSummaryComponentFactoryPrivate
-
-</SECTION>
-
-<INCLUDE>executive-summary-component-factory-client.h</INCLUDE>
-<SECTION>
-<FILE>executive-summary-component-factory-client</FILE>
-EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLIENT
-<TITLE>ExecutiveSummaryComponentFactoryClient</TITLE>
-
-executive_summary_component_factory_client_construct
-executive_summary_component_factory_client_new
-executive_summary_component_factory_client_create_view
-
-<SUBSECTION Standard>
-EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLIENT_TYPE
-EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLIENT
-EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLIENT_CLASS
-IS_EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLIENT
-IS_EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLIENT_CLASS
-executive_summary_component_factory_client_get_type
-
-<SUBSECTION Private>
-ExecutiveSummaryComponentFactoryClient
-ExecutiveSummaryComponentFactoryClientPrivate
-
-</SECTION>
-
-<INCLUDE>executive-summary-html-view.h</INCLUDE>
-<SECTION>
-<FILE>executive-summary-html-view</FILE>
-EXECUTIVE_SUMMARY_HTML_VIEW
-<TITLE>ExecutiveSummaryHtmlView</TITLE>
-
-EXECUTIVE_SUMMARY_HTML_VIEW_HTML_CHANGED
-
-executive_summary_html_view_new_full
-executive_summary_html_view_new
-executive_summary_html_view_set_html
-executive_summary_html_view_get_html
-executive_summary_html_view_get_event_source
-
-<SUBSECTION Standard>
-EXECUTIVE_SUMMARY_HTML_VIEW_TYPE
-EXECUTIVE_SUMMARY_HTML_VIEW
-IS_EXECUTIVE_SUMMARY_HTML_VIEW
-EXECUTIVE_SUMMARY_HTML_VIEW_CLASS
-IS_EXECUTIVE_SUMMARY_HTML_VIEW_CLASS
-executive_summary_html_view_get_type
-
-<SUBSECTION Private>
-ExecutiveSummaryHtmlView
-ExecutiveSummaryHtmlViewPrivate
-</SECTION>
diff --git a/doc/devel/executive-summary/evolution-services.args b/doc/devel/executive-summary/evolution-services.args
deleted file mode 100644
index e69de29bb2..0000000000
--- a/doc/devel/executive-summary/evolution-services.args
+++ /dev/null
diff --git a/doc/devel/executive-summary/evolution-services.hierarchy b/doc/devel/executive-summary/evolution-services.hierarchy
deleted file mode 100644
index 07e7aad6ff..0000000000
--- a/doc/devel/executive-summary/evolution-services.hierarchy
+++ /dev/null
@@ -1,15 +0,0 @@
-GtkObject
- GtkWidget
- GtkRange
- GtkScale
- GtkContainer
- GtkBin
- GtkButton
- GtkToggleButton
- GtkCheckButton
- BonoboObject
- ExecutiveSummaryComponent
- ExecutiveSummaryComponentFactory
- Handle to remote Bonobo::Unknown
- ExecutiveSummaryComponentFactoryClient
- ExecutiveSummaryHtmlView
diff --git a/doc/devel/executive-summary/evolution-services.signals b/doc/devel/executive-summary/evolution-services.signals
deleted file mode 100644
index e69de29bb2..0000000000
--- a/doc/devel/executive-summary/evolution-services.signals
+++ /dev/null
diff --git a/doc/devel/executive-summary/evolution-services.types b/doc/devel/executive-summary/evolution-services.types
deleted file mode 100644
index b7ac05b89c..0000000000
--- a/doc/devel/executive-summary/evolution-services.types
+++ /dev/null
@@ -1,10 +0,0 @@
-#include <gnome.h>
-#include <bonobo.h>
-#include <evolution-services/executive-summary-component.h>
-#include <evolution-services/executive-summary-component-factory-client.h>
-#include <evolution-services/executive-summary-html-view.h>
-
-executive_summary_component_get_type
-executive_summary_component_factory_get_type
-executive_summary_component_factory_client_get_type
-executive_summary_html_view_get_type
diff --git a/doc/devel/executive-summary/private-reference.sgml b/doc/devel/executive-summary/private-reference.sgml
deleted file mode 100644
index e06d7c1690..0000000000
--- a/doc/devel/executive-summary/private-reference.sgml
+++ /dev/null
@@ -1,20 +0,0 @@
- <reference id="evolution-services-private-reference">
- <title>Evolution Services Private API Reference</title>
-
- <partintro>
- <para>
- This part presents the class and function reference for the
- private APIs of the different components of the &Evolution;
- Executive Summary Services Framework.
- </para>
- </partintro>
-
- &ExecutiveSummaryComponentFactoryClient;
- </reference>
-
-<!--
-Local variables:
-mode: sgml
-sml-parent-document: ("../evolution-devel-guide.sgml" "book" "part" "")
-End:
--->
diff --git a/doc/devel/executive-summary/public-reference.sgml b/doc/devel/executive-summary/public-reference.sgml
deleted file mode 100644
index 7758a9a5c8..0000000000
--- a/doc/devel/executive-summary/public-reference.sgml
+++ /dev/null
@@ -1,22 +0,0 @@
- <reference id="evolution-services-public-reference">
- <title>Evolution Services Public API Reference</title>
-
- <partintro>
- <para>
- This part presents the class and function reference for the
- public APIs of the different components of the &Evolution;
- Executive Summary Services Framework.
- </para>
- </partintro>
-
- &ExecutiveSummaryComponent;
- &ExecutiveSummaryComponentFactory;
- &ExecutiveSummaryHtmlView;
- </reference>
-
-<!--
-Local variables:
-mode: sgml
-sml-parent-document: ("../evolution-devel-guide.sgml" "book" "part" "")
-End:
--->
diff --git a/doc/devel/executive-summary/tmpl/evolution-services-unused.sgml b/doc/devel/executive-summary/tmpl/evolution-services-unused.sgml
deleted file mode 100644
index e69de29bb2..0000000000
--- a/doc/devel/executive-summary/tmpl/evolution-services-unused.sgml
+++ /dev/null
diff --git a/doc/devel/executive-summary/tmpl/executive-summary-component-factory-client.sgml b/doc/devel/executive-summary/tmpl/executive-summary-component-factory-client.sgml
deleted file mode 100644
index ee8ef25689..0000000000
--- a/doc/devel/executive-summary/tmpl/executive-summary-component-factory-client.sgml
+++ /dev/null
@@ -1,53 +0,0 @@
-<!-- ##### SECTION Title ##### -->
-ExecutiveSummaryComponentFactoryClient
-
-<!-- ##### SECTION Short_Description ##### -->
-GtkObject client to simplfy use of GNOME_Evolution_Summary_ComponentFactory
-
-<!-- ##### SECTION Long_Description ##### -->
-<para>
-This object provides an easy wrapper around the CORBA object that represents the
- GNOME_Evolution_Summary_ComponentFactory interface. It handles conversion from
-normal types to CORBA types and has error checking.
-</para>
-
-<!-- ##### SECTION See_Also ##### -->
-<para>
-
-</para>
-
-<!-- ##### MACRO EXECUTIVE_SUMMARY_COMPONENT_FACTORY_CLIENT ##### -->
-<para>
-Casts a #GtkObject into an #ExecutiveSummaryComponentFactoryClient
-</para>
-
-@obj:
-
-
-<!-- ##### FUNCTION executive_summary_component_factory_client_construct ##### -->
-<para>
-
-</para>
-
-@client:
-@corba_object:
-
-
-<!-- ##### FUNCTION executive_summary_component_factory_client_new ##### -->
-<para>
-
-</para>
-
-@id:
-@Returns:
-
-
-<!-- ##### FUNCTION executive_summary_component_factory_client_create_view ##### -->
-<para>
-
-</para>
-
-@client:
-@Returns:
-
-
diff --git a/doc/devel/executive-summary/tmpl/executive-summary-component-factory.sgml b/doc/devel/executive-summary/tmpl/executive-summary-component-factory.sgml
deleted file mode 100644
index 7069eea9d0..0000000000
--- a/doc/devel/executive-summary/tmpl/executive-summary-component-factory.sgml
+++ /dev/null
@@ -1,46 +0,0 @@
-<!-- ##### SECTION Title ##### -->
-ExecutiveSummaryComponentFactory
-
-<!-- ##### SECTION Short_Description ##### -->
-GtkObject wrapper for GNOME/Evolution/Summary/ComponentFactory.
-
-<!-- ##### SECTION Long_Description ##### -->
-<para>
-An ExecutiveSummaryComponentFactory simplifies the creation of a
-GNOME_Evolution_Summary_ComponentFactory object. It also allows error checking
-and all the standard #GtkObject signals.
-</para>
-
-<!-- ##### SECTION See_Also ##### -->
-<para>
-
-</para>
-
-<!-- ##### MACRO EXECUTIVE_SUMMARY_COMPONENT_FACTORY ##### -->
-<para>
-Casts a #GtkObject to an #ExecutiveSummaryComponentFactory.
-</para>
-
-@obj: A #GtkObject.
-
-
-<!-- ##### USER_FUNCTION EvolutionServicesCreateViewFn ##### -->
-<para>
-The type of function that is called when the factory has to create a new view.
-</para>
-
-@factory: The #ExecutiveSummaryComponent that is creating the view.
-@closure: The data that was passed into executive_summary_factory_new ().
-@Returns: An #ExecutiveSummaryComponent.
-
-
-<!-- ##### FUNCTION executive_summary_component_factory_new ##### -->
-<para>
-
-</para>
-
-@create_view:
-@closure:
-@Returns:
-
-
diff --git a/doc/devel/executive-summary/tmpl/executive-summary-component.sgml b/doc/devel/executive-summary/tmpl/executive-summary-component.sgml
deleted file mode 100644
index 04768b1b1c..0000000000
--- a/doc/devel/executive-summary/tmpl/executive-summary-component.sgml
+++ /dev/null
@@ -1,37 +0,0 @@
-<!-- ##### SECTION Title ##### -->
-ExecutiveSummaryComponent
-
-<!-- ##### SECTION Short_Description ##### -->
-The base #BonoboObject that implements GNOME/Evolution/Summary/Component.
-
-<!-- ##### SECTION Long_Description ##### -->
-<para>
-This #GtkObject wrapper around the GNOME/Evolution/Summary/Component, is the
-base object that has all the other interfaces aggregated onto it. These
-interfaces are: GNOME/Evolution/HTMLView, Bonobo/Control, Bonobo/EventSource,
-Bonobo/PropertyBag, Bonobo/PropertyControl and Bonobo/PersistStream. Each of
-the aggregated interfaces performs a specific job in the creation of the service.
-</para>
-
-<!-- ##### SECTION See_Also ##### -->
-<para>
-#ExecutiveSummaryHtmlView, #BonoboControl, #BonoboEventSource, #BonoboPropertyBag,
-#BonoboPropertyControl, #BonoboPersistStream.
-</para>
-
-<!-- ##### MACRO EXECUTIVE_SUMMARY_COMPONENT ##### -->
-<para>
-Casts a #GtkObject to an #ExecutiveSummaryComponent.
-</para>
-
-@obj: A #GtkObject.
-
-
-<!-- ##### FUNCTION executive_summary_component_new ##### -->
-<para>
-
-</para>
-
-@Returns:
-
-
diff --git a/doc/devel/executive-summary/tmpl/executive-summary-html-view.sgml b/doc/devel/executive-summary/tmpl/executive-summary-html-view.sgml
deleted file mode 100644
index 2fb66a2035..0000000000
--- a/doc/devel/executive-summary/tmpl/executive-summary-html-view.sgml
+++ /dev/null
@@ -1,75 +0,0 @@
-<!-- ##### SECTION Title ##### -->
-ExecutiveSummaryHtmlView
-
-<!-- ##### SECTION Short_Description ##### -->
-A Bonobo component used to implement HTML based services.
-
-<!-- ##### SECTION Long_Description ##### -->
-<para>
-When writing HTML services, this component is aggregated onto an #ExecutiveSummaryComponent, to allow the Executive Summary to be able to find the HTML.
-</para>
-
-<!-- ##### SECTION See_Also ##### -->
-<para>
-#ExecutiveSummaryComponent, #BonoboEventSource
-</para>
-
-<!-- ##### MACRO EXECUTIVE_SUMMARY_HTML_VIEW ##### -->
-<para>
- Casts a #GtkObject into an #ExecutiveSummaryHtmlView
-</para>
-
-@obj: A #GtkObject
-
-
-<!-- ##### MACRO EXECUTIVE_SUMMARY_HTML_VIEW_HTML_CHANGED ##### -->
-<para>
-This is the event that is emitted on the BonoboEventSource when the HTML is changed.
-</para>
-
-
-
-<!-- ##### FUNCTION executive_summary_html_view_new_full ##### -->
-<para>
-
-</para>
-
-@event_source:
-@Returns:
-
-
-<!-- ##### FUNCTION executive_summary_html_view_new ##### -->
-<para>
-
-</para>
-
-@Returns:
-
-
-<!-- ##### FUNCTION executive_summary_html_view_set_html ##### -->
-<para>
-
-</para>
-
-@view:
-@html:
-
-
-<!-- ##### FUNCTION executive_summary_html_view_get_html ##### -->
-<para>
-
-</para>
-
-@view:
-@Returns:
-
-
-<!-- ##### FUNCTION executive_summary_html_view_get_event_source ##### -->
-<para>
-
-</para>
-
-@view:
-@Returns:
-
-
diff --git a/doc/devel/fdl.sgml b/doc/devel/fdl.sgml
deleted file mode 100644
index 817adbdbb7..0000000000
--- a/doc/devel/fdl.sgml
+++ /dev/null
@@ -1,671 +0,0 @@
-<!--
- The GNU Free Documentation License 1.1 in DocBook
- Markup by Eric Baudais <baudais@okstate.edu>
- Maintained by the GNOME Documentation Project
- http://developer.gnome.org/projects/gdp
- Version: 1.0.1
- Last Modified: Nov 16, 2000
--->
-
-<appendix id="fdl">
- <docinfo>
- <releaseinfo>
- Version 1.1, March 2000
- </releaseinfo>
- <copyright>
- <year>2000</year><holder>Free Software Foundation, Inc.</holder>
- </copyright>
- <legalnotice id="fdl-legalnotice">
- <para>
- <address>Free Software Foundation, Inc. <street>59 Temple Place,
- Suite 330</street>, <city>Boston</city>, <state>MA</state>
- <postcode>02111-1307</postcode> <country>USA</country></address>
- Everyone is permitted to copy and distribute verbatim copies of this
- license document, but changing it is not allowed.
- </para>
- </legalnotice>
- </docinfo>
- <title>GNU Free Documentation License</title>
-
- <sect1 id="fdl-preamble">
- <title>0. PREAMBLE</title>
- <para>
- The purpose of this License is to make a manual, textbook, or
- other written document <quote>free</quote> 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.
- </para>
-
- <para>
- This License is a kind of <quote>copyleft</quote>, 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.
- </para>
-
- <para>
- 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.
- </para>
- </sect1>
- <sect1 id="fdl-section1">
- <title>1. APPLICABILITY AND DEFINITIONS</title>
- <para id="fdl-document">
- 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
- <quote>Document</quote>, below, refers to any such manual or
- work. Any member of the public is a licensee, and is addressed
- as <quote>you</quote>.
- </para>
-
- <para id="fdl-modified">
- A <quote>Modified Version</quote> 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.
- </para>
-
- <para id="fdl-secondary">
- A <quote>Secondary Section</quote> is a named appendix or a
- front-matter section of the <link
- linkend="fdl-document">Document</link> 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.
- </para>
-
- <para id="fdl-invariant">
- The <quote>Invariant Sections</quote> are certain <link
- linkend="fdl-secondary"> Secondary Sections</link> whose titles
- are designated, as being those of Invariant Sections, in the
- notice that says that the <link
- linkend="fdl-document">Document</link> is released under this
- License.
- </para>
-
- <para id="fdl-cover-texts">
- The <quote>Cover Texts</quote> are certain short passages of
- text that are listed, as Front-Cover Texts or Back-Cover Texts,
- in the notice that says that the <link
- linkend="fdl-document">Document</link> is released under this
- License.
- </para>
-
- <para id="fdl-transparent">
- A <quote>Transparent</quote> copy of the <link
- linkend="fdl-document"> Document</link> 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 <quote>Transparent</quote> is called
- <quote>Opaque</quote>.
- </para>
-
- <para>
- 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.
- </para>
-
- <para id="fdl-title-page">
- The <quote>Title Page</quote> 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, <quote>Title Page</quote> means the text near the
- most prominent appearance of the work's title, preceding the
- beginning of the body of the text.
- </para>
- </sect1>
-
- <sect1 id="fdl-section2">
- <title>2. VERBATIM COPYING</title>
- <para>
- You may copy and distribute the <link
- linkend="fdl-document">Document</link> 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 <link
- linkend="fdl-section3">section 3</link>.
- </para>
-
- <para>
- You may also lend copies, under the same conditions stated
- above, and you may publicly display copies.
- </para>
- </sect1>
-
- <sect1 id="fdl-section3">
- <title>3. COPYING IN QUANTITY</title>
- <para>
- If you publish printed copies of the <link
- linkend="fdl-document">Document</link> numbering more than 100,
- and the Document's license notice requires <link
- linkend="fdl-cover-texts">Cover Texts</link>, 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
- <link linkend="fdl-document">Document</link> and satisfy these
- conditions, can be treated as verbatim copying in other
- respects.
- </para>
-
- <para>
- 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.
- </para>
-
- <para>
- If you publish or distribute <link
- linkend="fdl-transparent">Opaque</link> copies of the <link
- linkend="fdl-document">Document</link> numbering more than 100,
- you must either include a machine-readable <link
- linkend="fdl-transparent">Transparent</link> 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.
- </para>
-
- <para>
- It is requested, but not required, that you contact the authors
- of the <link linkend="fdl-document">Document</link> well before
- redistributing any large number of copies, to give them a chance
- to provide you with an updated version of the Document.
- </para>
- </sect1>
-
- <sect1 id="fdl-section4">
- <title>4. MODIFICATIONS</title>
- <para>
- You may copy and distribute a <link
- linkend="fdl-modified">Modified Version</link> of the <link
- linkend="fdl-document">Document</link> under the conditions of
- sections <link linkend="fdl-section2">2</link> and <link
- linkend="fdl-section3">3</link> 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:
- </para>
-
- <itemizedlist mark="opencircle">
- <listitem>
- <formalpara>
- <title>A</title>
- <para>
- Use in the <link linkend="fdl-title-page">Title
- Page</link> (and on the covers, if any) a title distinct
- from that of the <link
- linkend="fdl-document">Document</link>, 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.
- </para>
- </formalpara>
- </listitem>
-
- <listitem>
- <formalpara>
- <title>B</title>
- <para>
- List on the <link linkend="fdl-title-page">Title
- Page</link>, as authors, one or more persons or entities
- responsible for authorship of the modifications in the
- <link linkend="fdl-modified">Modified Version</link>,
- together with at least five of the principal authors of
- the <link linkend="fdl-document">Document</link> (all of
- its principal authors, if it has less than five).
- </para>
- </formalpara>
- </listitem>
-
- <listitem>
- <formalpara>
- <title>C</title>
- <para>
- State on the <link linkend="fdl-title-page">Title
- Page</link> the name of the publisher of the <link
- linkend="fdl-modified">Modified Version</link>, as the
- publisher.
- </para>
- </formalpara>
- </listitem>
-
- <listitem>
- <formalpara>
- <title>D</title>
- <para>
- Preserve all the copyright notices of the <link
- linkend="fdl-document">Document</link>.
- </para>
- </formalpara>
- </listitem>
-
- <listitem>
- <formalpara>
- <title>E</title>
- <para>
- Add an appropriate copyright notice for your modifications
- adjacent to the other copyright notices.
- </para>
- </formalpara>
- </listitem>
-
- <listitem>
- <formalpara>
- <title>F</title>
- <para>
- Include, immediately after the copyright notices, a
- license notice giving the public permission to use the
- <link linkend="fdl-modified">Modified Version</link> under
- the terms of this License, in the form shown in the
- Addendum below.
- </para>
- </formalpara>
- </listitem>
-
- <listitem>
- <formalpara>
- <title>G</title>
- <para>
- Preserve in that license notice the full lists of <link
- linkend="fdl-invariant"> Invariant Sections</link> and
- required <link linkend="fdl-cover-texts">Cover
- Texts</link> given in the <link
- linkend="fdl-document">Document's</link> license notice.
- </para>
- </formalpara>
- </listitem>
-
- <listitem>
- <formalpara>
- <title>H</title>
- <para>
- Include an unaltered copy of this License.
- </para>
- </formalpara>
- </listitem>
-
- <listitem>
- <formalpara>
- <title>I</title>
- <para>
- Preserve the section entitled <quote>History</quote>, and
- its title, and add to it an item stating at least the
- title, year, new authors, and publisher of the <link
- linkend="fdl-modified">Modified Version </link>as given on
- the <link linkend="fdl-title-page">Title Page</link>. If
- there is no section entitled <quote>History</quote> in the
- <link linkend="fdl-document">Document</link>, 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.
- </para>
- </formalpara>
- </listitem>
-
- <listitem>
- <formalpara>
- <title>J</title>
- <para>
- Preserve the network location, if any, given in the <link
- linkend="fdl-document">Document</link> for public access
- to a <link linkend="fdl-transparent">Transparent</link>
- 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 <quote>History</quote>
- 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.
- </para>
- </formalpara>
- </listitem>
-
- <listitem>
- <formalpara>
- <title>K</title>
- <para>
- In any section entitled <quote>Acknowledgements</quote> or
- <quote>Dedications</quote>, 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.
- </para>
- </formalpara>
- </listitem>
-
- <listitem>
- <formalpara>
- <title>L</title>
- <para>
- Preserve all the <link linkend="fdl-invariant">Invariant
- Sections</link> of the <link
- linkend="fdl-document">Document</link>, unaltered in their
- text and in their titles. Section numbers or the
- equivalent are not considered part of the section titles.
- </para>
- </formalpara>
- </listitem>
-
- <listitem>
- <formalpara>
- <title>M</title>
- <para>
- Delete any section entitled
- <quote>Endorsements</quote>. Such a section may not be
- included in the <link linkend="fdl-modified">Modified
- Version</link>.
- </para>
- </formalpara>
- </listitem>
-
- <listitem>
- <formalpara>
- <title>N</title>
- <para>
- Do not retitle any existing section as
- <quote>Endorsements</quote> or to conflict in title with
- any <link linkend="fdl-invariant">Invariant
- Section</link>.
- </para>
- </formalpara>
- </listitem>
- </itemizedlist>
-
- <para>
- If the <link linkend="fdl-modified">Modified Version</link>
- includes new front-matter sections or appendices that qualify as
- <link linkend="fdl-secondary">Secondary Sections</link> 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 <link
- linkend="fdl-invariant">Invariant Sections</link> in the
- Modified Version's license notice. These titles must be
- distinct from any other section titles.
- </para>
-
- <para>
- You may add a section entitled <quote>Endorsements</quote>,
- provided it contains nothing but endorsements of your <link
- linkend="fdl-modified">Modified Version</link> 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.
- </para>
-
- <para>
- You may add a passage of up to five words as a <link
- linkend="fdl-cover-texts">Front-Cover Text</link>, and a passage
- of up to 25 words as a <link
- linkend="fdl-cover-texts">Back-Cover Text</link>, to the end of
- the list of <link linkend="fdl-cover-texts">Cover Texts</link>
- in the <link linkend="fdl-modified">Modified Version</link>.
- 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 <link linkend="fdl-document">Document</link>
- 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.
- </para>
-
- <para>
- The author(s) and publisher(s) of the <link
- linkend="fdl-document">Document</link> do not by this License
- give permission to use their names for publicity for or to
- assert or imply endorsement of any <link
- linkend="fdl-modified">Modified Version </link>.
- </para>
- </sect1>
-
- <sect1 id="fdl-section5">
- <title>5. COMBINING DOCUMENTS</title>
- <para>
- You may combine the <link linkend="fdl-document">Document</link>
- with other documents released under this License, under the
- terms defined in <link linkend="fdl-section4">section 4</link>
- above for modified versions, provided that you include in the
- combination all of the <link linkend="fdl-invariant">Invariant
- Sections</link> of all of the original documents, unmodified,
- and list them all as Invariant Sections of your combined work in
- its license notice.
- </para>
-
- <para>
- The combined work need only contain one copy of this License,
- and multiple identical <link linkend="fdl-invariant">Invariant
- Sections</link> 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.
- </para>
-
- <para>
- In the combination, you must combine any sections entitled
- <quote>History</quote> in the various original documents,
- forming one section entitled <quote>History</quote>; likewise
- combine any sections entitled <quote>Acknowledgements</quote>,
- and any sections entitled <quote>Dedications</quote>. You must
- delete all sections entitled <quote>Endorsements.</quote>
- </para>
- </sect1>
-
- <sect1 id="fdl-section6">
- <title>6. COLLECTIONS OF DOCUMENTS</title>
- <para>
- You may make a collection consisting of the <link
- linkend="fdl-document">Document</link> 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.
- </para>
-
- <para>
- You may extract a single document from such a collection, and
- dispbibute 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.
- </para>
- </sect1>
-
- <sect1 id="fdl-section7">
- <title>7. AGGREGATION WITH INDEPENDENT WORKS</title>
- <para>
- A compilation of the <link
- linkend="fdl-document">Document</link> 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 <link linkend="fdl-modified">Modified Version</link>
- of the Document, provided no compilation copyright is claimed
- for the compilation. Such a compilation is called an
- <quote>aggregate</quote>, 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 <link
- linkend="fdl-cover-texts">Cover Text</link> requirement of <link
- linkend="fdl-section3">section 3</link> 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.
- </para>
- </sect1>
-
- <sect1 id="fdl-section8">
- <title>8. TRANSLATION</title>
- <para>
- Translation is considered a kind of modification, so you may
- distribute translations of the <link
- linkend="fdl-document">Document</link> under the terms of <link
- linkend="fdl-section4">section 4</link>. Replacing <link
- linkend="fdl-invariant"> Invariant Sections</link> 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.
- </para>
- </sect1>
-
- <sect1 id="fdl-section9">
- <title>9. TERMINATION</title>
- <para>
- You may not copy, modify, sublicense, or distribute the <link
- linkend="fdl-document">Document</link> 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.
- </para>
- </sect1>
-
- <sect1 id="fdl-section10">
- <title>10. FUTURE REVISIONS OF THIS LICENSE</title>
- <para>
- The <ulink type="http"
- url="http://www.gnu.org/fsf/fsf.html">Free Software
- Foundation</ulink> 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 <ulink
- type="http"
- url="http://www.gnu.org/copyleft">http://www.gnu.org/copyleft/</ulink>.
- </para>
-
- <para>
- Each version of the License is given a distinguishing version
- number. If the <link linkend="fdl-document">Document</link>
- specifies that a particular numbered version of this License
- <quote>or any later version</quote> 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.
- </para>
- </sect1>
-
- <sect1 id="fdl-using">
- <title>Addendum</title>
- <para>
- 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:
- </para>
-
- <blockquote>
- <para>
- Copyright &copy; YEAR YOUR NAME.
- </para>
- <para>
- 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 <link
- linkend="fdl-invariant">Invariant Sections</link> being LIST
- THEIR TITLES, with the <link
- linkend="fdl-cover-texts">Front-Cover Texts</link> being LIST,
- and with the <link linkend="fdl-cover-texts">Back-Cover
- Texts</link> being LIST. A copy of the license is included in
- the section entitled <quote>GNU Free Documentation
- License</quote>.
- </para>
- </blockquote>
-
- <para>
- If you have no <link linkend="fdl-invariant">Invariant
- Sections</link>, write <quote>with no Invariant Sections</quote>
- instead of saying which ones are invariant. If you have no
- <link linkend="fdl-cover-texts">Front-Cover Texts</link>, write
- <quote>no Front-Cover Texts</quote> instead of
- <quote>Front-Cover Texts being LIST</quote>; likewise for <link
- linkend="fdl-cover-texts">Back-Cover Texts</link>.
- </para>
-
- <para>
- 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 <ulink type="http"
- url="http://www.gnu.org/copyleft/gpl.html"> GNU General Public
- License</ulink>, to permit their use in free software.
- </para>
- </sect1>
-</appendix>
-
-
-
-
-
-
diff --git a/doc/devel/importer/.cvsignore b/doc/devel/importer/.cvsignore
deleted file mode 100644
index 0842a93f7a..0000000000
--- a/doc/devel/importer/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-sgml
-Makefile
-Makefile.in
diff --git a/doc/devel/importer/Makefile.am b/doc/devel/importer/Makefile.am
deleted file mode 100644
index ef3b2b98ee..0000000000
--- a/doc/devel/importer/Makefile.am
+++ /dev/null
@@ -1,127 +0,0 @@
-# The name of the module.
-DOC_MODULE=evolution-shell-importer
-
-# The directory containing the source code
-DOC_SOURCE_DIR=$(EVOLUTION_DIR)/shell/importer
-
-CFLAGS =" \
- -I$(top_srcdir)/shell/importer \
- -I$(top_srcdir)/shell \
- -I$(top_srcdir) \
- -I$(top_builddir) \
- $(BONOBO_VFS_GNOME_CFLAGS) \
- "
-
-LDFLAGS=" \
- $(BONOBO_VFS_GNOME_LIBS) \
- $(top_builddir)/shell/importer/.libs/libevolution-importer.a \
- "
-
-DOC_DIR=$(datadir)/gnome/html
-
-DOC_DIR_INSTALL_FILES = \
- evolution-shell-importer.args \
- evolution-shell-importer.hierarchy \
- evolution-shell-importer.signals \
- evolution-shell-importer.types \
- evolution-shell-importer-decl.txt \
- evolution-shell-importer-sections.txt
-
-SOURCE_FILES = \
- $(top_srcdir)/shell/importer/evolution-importer.c \
- $(top_srcdir)/shell/importer/evolution-importer.h \
- $(top_srcdir)/shell/importer/evolution-importer-client.c \
- $(top_srcdir)/shell/importer/evolution-importer-client.h
-
-IGNORED_HEADER_FILES = \
- GNOME_Evolution_Importer.h \
- importer.h
-
-scan_generated = \
- evolution-shell-importer-decl.txt \
- evolution-shell-importer.args \
- evolution-shell-importer.hierarchy \
- evolution-shell-importer.signals \
- evolution-shell-importer.types
-
-tmpl_dependencies = \
- evolution-shell-importer-decl.txt \
- evolution-shell-importer-sections.txt \
- evolution-shell-importer.args \
- evolution-shell-importer.hierarchy \
- evolution-shell-importer.signals
-
-tmpl_sources = \
- tmpl/evolution-importer.sgml \
- tmpl/evolution-shell-importer-unused.sgml
-
-tmpl_generated = \
- evolution-shell-importer-unused.txt
-
-sgml_dependencies = \
- evolution-shell-importer-decl.txt \
- evolution-shell-importer-sections.txt \
- evolution-shell-importer.args \
- evolution-shell-importer.hierarchy \
- evolution-shell-importer.signals \
- tmpl/evolution-importer.sgml
-
-sgml_generated = \
- sgml/evolution-importer.sgml \
- sgml/evolution-shell-importer-doc.bottom \
- sgml/evolution-shell-importer-doc.top \
- sgml/object_index.sgml \
- sgml/tree_index.sgml
-
-EXTRA_DIST = \
- evolution-shell-importer.args \
- evolution-shell-importer.hierarchy \
- evolution-shell-importer.signals \
- evolution-shell-importer.types \
- evolution-shell-importer-decl.txt \
- evolution-shell-importer-sections.txt
-
-all: $(sgml_generated)
-
-if ENABLE_GTK_DOC
-scan $(scan_generated): $(SOURCE_FILES)
- -(cd $(srcdir) \
- && env CFLAGS=$(CFLAGS) LDFLAGS=$(LDFLAGS) \
- gtkdoc-scanobj --module=$(DOC_MODULE) \
- && gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) \
- --ignore-headers="$(IGNORED_HEADER_FILES)" )
-
-templates $(tmpl_sources) $(tmpl_generated): $(tmpl_dependencies)
- cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE)
-
-sgml $(sgml_generated): $(sgml_dependencies)
- cd $(srcdir) \
- && gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR)
-else
-scan $(scan_generated): $(SOURCE_FILE)
-
-templates $(tmpl_sources) $(tmpl_generated): $(tmpl_dependencies)
-
-sgml $(sgml_generated): $(sgml_dependencies)
-endif
-
-clean-local:
- rm -f *~ *.bak *.signals *-unused.txt
-
-maintainer-clean-local: clean
- cd $(srcdir) && rm -rf sgml $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
-
-install-data-local:
- $(mkinstalldirs) $(DOC_DIR)
- for i in $(DOC_DIR_INSTALL_FILES); do \
- $(INSTALL_DATA) $$i $(DOC_DIR); \
- done
-
-dist-hook:
- mkdir $(distdir)/sgml
- mkdir $(distdir)/tmpl
- -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
- -cp $(srcdir)/sgml/*.sgml $(distdir)/sgml
- -cp $(srcdir)/sgml/*.bottom $(srcdir)/sgml/*.top $(distdir)/sgml
-
-.PHONY: scan templates sgml
diff --git a/doc/devel/importer/evolution-shell-importer-sections.txt b/doc/devel/importer/evolution-shell-importer-sections.txt
deleted file mode 100644
index e2474f6375..0000000000
--- a/doc/devel/importer/evolution-shell-importer-sections.txt
+++ /dev/null
@@ -1,79 +0,0 @@
-<INCLUDE>evolution-importer.h</INCLUDE>
-
-<SECTION>
-<FILE>evolution-importer</FILE>
-EVOLUTION_IMPORTER
-<TITLE>EvolutionImporter</TITLE>
-
-EvolutionImporterSupportFormatFn
-EvolutionImporterLoadFileFn
-EvolutionImporterProcessItemFn
-EvolutionImporterGetErrorFn
-
-EvolutionImporterResult
-
-evolution_importer_new
-
-<SUBSECTION Standard>
-EVOLUTION_TYPE_IMPORTER
-EVOLUTION_IMPORTER
-EVOLUTION_IS_IMPORTER
-EVOLUTION_IMPORTER_CLASS
-EVOLUTION_IS_IMPORTER_CLASS
-evolution_importer_get_type
-
-<SUBSECTION Private>
-EvolutionImporter
-EvolutionImporterPrivate
-
-</SECTION>
-
-<INCLUDE>evolution-importer-listener.h</INCLUDE>
-<SECTION>
-<FILE>evolution-importer-listener</FILE>
-EVOLUTION_IMPORTER_LISTENER
-<TITLE>EvolutionImporterListener</TITLE>
-
-EvolutionImporterListenerCallback
-
-evolution_importer_listener_new
-
-<SUBSECTION Standard>
-EVOLUTION_TYPE_IMPORTER_LISTENER
-EVOLUTION_IMPORTER_LISTENER
-EVOLUTION_IMPORTER_LISTENER_CLASS
-EVOLUTION_IS_IMPORTER_LISTENER
-EVOLUTION_IS_IMPORTER_LISTENER_CLASS
-evolution_importer_listener_get_type
-
-<SUBSECTION Private>
-EvolutionImporterListener
-EvolutionImporterListenerPrivate
-
-</SECTION>
-
-<INCLUDE>evolution-importer-client.h</INCLUDE>
-<SECTION>
-<FILE>evolution-importer-client</FILE>
-EVOLUTION_IMPORTER_CLIENT
-<TITLE>EvolutionImporterClient</TITLE>
-
-evolution_importer_client_new
-evolution_importer_client_new_from_id
-evolution_importer_client_support_format
-evolution_importer_client_load_file
-evolution_importer_client_process_item
-evolution_importer_client_get_error
-
-<SUBSECTION Standard>
-EVOLUTION_TYPE_IMPORTER_CLIENT
-EVOLUTION_IMPORTER_CLIENT
-EVOLUTION_IMPORTER_CLIENT_CLASS
-EVOLUTION_IS_IMPORTER_CLIENT
-EVOLUTION_IS_IMPORTER_CLIENT_CLASS
-evolution_importer_client_get_type
-
-<SUBSECTION Private>
-EvolutionImporterClient
-
-</SECTION>
diff --git a/doc/devel/importer/evolution-shell-importer.args b/doc/devel/importer/evolution-shell-importer.args
deleted file mode 100644
index e69de29bb2..0000000000
--- a/doc/devel/importer/evolution-shell-importer.args
+++ /dev/null
diff --git a/doc/devel/importer/evolution-shell-importer.heirarchy b/doc/devel/importer/evolution-shell-importer.heirarchy
deleted file mode 100644
index 78e430d311..0000000000
--- a/doc/devel/importer/evolution-shell-importer.heirarchy
+++ /dev/null
@@ -1,5 +0,0 @@
-GtkObject
- BonoboObject
- EvolutionImporter
- BonoboObjectClient
- EvolutionImporterClient
diff --git a/doc/devel/importer/evolution-shell-importer.hierarchy b/doc/devel/importer/evolution-shell-importer.hierarchy
deleted file mode 100644
index 5f1b55c709..0000000000
--- a/doc/devel/importer/evolution-shell-importer.hierarchy
+++ /dev/null
@@ -1,14 +0,0 @@
-GtkObject
- GtkWidget
- GtkRange
- GtkScale
- GtkContainer
- GtkBin
- GtkButton
- GtkToggleButton
- GtkCheckButton
- BonoboObject
- EvolutionImporter
- Handle to remote Bonobo::Unknown
- EvolutionImporterClient
- EvolutionImporterListener
diff --git a/doc/devel/importer/evolution-shell-importer.types b/doc/devel/importer/evolution-shell-importer.types
deleted file mode 100644
index 9dcdf5f0f1..0000000000
--- a/doc/devel/importer/evolution-shell-importer.types
+++ /dev/null
@@ -1,9 +0,0 @@
-#include <gnome.h>
-#include <bonobo.h>
-#include <evolution/importer/evolution-importer.h>
-#include <evolution/importer/evolution-importer-client.h>
-#include <evolution/importer/evolution-importer-listener.h>
-
-evolution_importer_get_type
-evolution_importer_client_get_type
-evolution_importer_listener_get_type
diff --git a/doc/devel/importer/private-reference.sgml b/doc/devel/importer/private-reference.sgml
deleted file mode 100644
index d28c7b8591..0000000000
--- a/doc/devel/importer/private-reference.sgml
+++ /dev/null
@@ -1,21 +0,0 @@
- <reference id="importer-private-reference">
- <title>Importer Private API Reference</title>
-
- <partintro>
- <para>
- This part presents the class and function reference for the
- private APIs of the different components of the &Evolution;
- Import Framework.
- </para>
- </partintro>
-
- &EvolutionImporterListener;
- &EvolutionImporterClient;
- </reference>
-
-<!--
-Local variables:
-mode: sgml
-sml-parent-document: ("../evolution-devel-guide.sgml" "book" "part" "")
-End:
--->
diff --git a/doc/devel/importer/public-reference.sgml b/doc/devel/importer/public-reference.sgml
deleted file mode 100644
index ba99c9b309..0000000000
--- a/doc/devel/importer/public-reference.sgml
+++ /dev/null
@@ -1,20 +0,0 @@
- <reference id="importer-public-reference">
- <title>Importer Public API Reference</title>
-
- <partintro>
- <para>
- This part presents the class and function reference for the
- public APIs of the different components of the &Evolution;
- Import Framework.
- </para>
- </partintro>
-
- &EvolutionImporter;
- </reference>
-
-<!--
-Local variables:
-mode: sgml
-sml-parent-document: ("../evolution-devel-guide.sgml" "book" "part" "")
-End:
--->
diff --git a/doc/devel/importer/tmpl/evolution-importer-client.sgml b/doc/devel/importer/tmpl/evolution-importer-client.sgml
deleted file mode 100644
index 8122e4fb2d..0000000000
--- a/doc/devel/importer/tmpl/evolution-importer-client.sgml
+++ /dev/null
@@ -1,83 +0,0 @@
-<!-- ##### SECTION Title ##### -->
-EvolutionImporterClient
-
-<!-- ##### SECTION Short_Description ##### -->
-A #GtkObject based client to simplify use of a GNOME_Evolution_Importer object.
-
-<!-- ##### SECTION Long_Description ##### -->
-<para>
-This #GtkObject provides a convience wrapper to the GNOME_Evolution_Importer object, providing error checking and hiding all the CORBA internals from the user.
-</para>
-
-<!-- ##### SECTION See_Also ##### -->
-<para>
-
-</para>
-
-<!-- ##### MACRO EVOLUTION_IMPORTER_CLIENT ##### -->
-<para>
-Casts a #GtkObject into an #EvolutionImporterClient
-</para>
-
-@obj: A #GtkObject
-
-
-<!-- ##### FUNCTION evolution_importer_client_new ##### -->
-<para>
-
-</para>
-
-@objref:
-@Returns:
-
-
-<!-- ##### FUNCTION evolution_importer_client_new_from_id ##### -->
-<para>
-
-</para>
-
-@id:
-@Returns:
-
-
-<!-- ##### FUNCTION evolution_importer_client_support_format ##### -->
-<para>
-
-</para>
-
-@client:
-@filename:
-@Returns:
-
-
-<!-- ##### FUNCTION evolution_importer_client_load_file ##### -->
-<para>
-
-</para>
-
-@client:
-@filename:
-@Returns:
-
-
-<!-- ##### FUNCTION evolution_importer_client_process_item ##### -->
-<para>
-
-</para>
-
-@client:
-@listener:
-<!-- # Unused Parameters # -->
-@callback:
-@closure:
-
-
-<!-- ##### FUNCTION evolution_importer_client_get_error ##### -->
-<para>
-
-</para>
-
-@client:
-@Returns:
-
-
diff --git a/doc/devel/importer/tmpl/evolution-importer.sgml b/doc/devel/importer/tmpl/evolution-importer.sgml
deleted file mode 100644
index 8d8351aed2..0000000000
--- a/doc/devel/importer/tmpl/evolution-importer.sgml
+++ /dev/null
@@ -1,86 +0,0 @@
-<!-- ##### SECTION Title ##### -->
-EvolutionImporter
-
-<!-- ##### SECTION Short_Description ##### -->
-A #BonoboObject that implements the GNOME/Evolution/Importer interface.
-
-<!-- ##### SECTION Long_Description ##### -->
-<para>
-A #BonoboObject wrapper around the GNOME/Evolution/Importer interface, providing error checking and reference counting, hiding the CORBA internals from the user and providing a simple way to create a GNOME_Evolution_Importer object.
-</para>
-
-<!-- ##### SECTION See_Also ##### -->
-<para>
-
-</para>
-
-<!-- ##### MACRO EVOLUTION_IMPORTER ##### -->
-<para>
-Casts a #GtkObject into an #EvolutionImporter.
-</para>
-
-@obj: A #GtkObject.
-
-
-<!-- ##### USER_FUNCTION EvolutionImporterSupportFormatFn ##### -->
-<para>
-The type of function that is called when the importer wishes to find out if the importing component can support the file given in @filename.
-</para>
-
-@importer: The #EvolutionImporter.
-@filename: The filename of the file to check.
-@closure: The data passed into evolution_importer_new ().
-@Returns: A #gboolean. TRUE if the importing component can import the file, FALSE otherwise.
-
-
-<!-- ##### USER_FUNCTION EvolutionImporterLoadFileFn ##### -->
-<para>
-The type of function that is called when the importer wishes the importing component to load the file given in @filename, and initialise itself.
-</para>
-
-@importer: The #EvolutionImporter.
-@filename: The filename of the file to load.
-@closure: The data passed into evolution_importer_new ().
-@Returns: A #gboolean. TRUE if the load and initialisation was successful, FALSE otherwise.
-
-
-<!-- ##### USER_FUNCTION EvolutionImporterProcessItemFn ##### -->
-<para>
-The type of function that is called when the importer wants the importing component to process the next item (or items) in a file.
-</para>
-
-@importer: The #EvolutionImporter
-@listener: A GNOME_Evolution_Importer_Listener CORBA object.
-@closure: The data passed into evolution_importer_new ().
-@ev: A #CORBA_Environment for returning any CORBA exceptions.
-
-
-<!-- ##### USER_FUNCTION EvolutionImporterGetErrorFn ##### -->
-<para>
-The type of function that is called when the importer wants to get a string version of an error. Not all importing components support this function.
-</para>
-
-@importer: The #EvolutionImporter.
-@closure: The data passed to evolution_importer_new ().
-@Returns: A string representation of the error, or NULL if there was no error, or the importing component does not support the getError method.
-
-
-<!-- ##### ENUM EvolutionImporterResult ##### -->
-<para>
-
-</para>
-
-
-<!-- ##### FUNCTION evolution_importer_new ##### -->
-<para>
-
-</para>
-
-@support_format_fn:
-@load_file_fn:
-@process_item_fn:
-@get_error_fn:
-@closure:
-@Returns:
-
-
diff --git a/doc/devel/importer/tmpl/evolution-shell-importer-unused.sgml b/doc/devel/importer/tmpl/evolution-shell-importer-unused.sgml
deleted file mode 100644
index 7a9a98034b..0000000000
--- a/doc/devel/importer/tmpl/evolution-shell-importer-unused.sgml
+++ /dev/null
@@ -1,10 +0,0 @@
-<!-- ##### USER_FUNCTION EvolutionImporterClientCallback ##### -->
-<para>
-
-</para>
-
-@client:
-@result:
-@more_items:
-@data:
-
diff --git a/doc/devel/preface.sgml b/doc/devel/preface.sgml
deleted file mode 100644
index fdaa824a8b..0000000000
--- a/doc/devel/preface.sgml
+++ /dev/null
@@ -1,113 +0,0 @@
- <preface id="introduction">
- <title>Introduction</title>
-
- <para>
- This is the &Evolution; Developer's Guide or programming guide
- for the &Evolution; groupware suite. If you are a programmer
- and you wish to use &Evolution;'s functionality from your own
- applications or if you wish to modify the &Evolution; core code,
- you should read this guide.
- </para>
-
- <para>
- If you are an end-user of &Evolution; you do not need to read
- this guide; please read the &Evolution; User's Guide instead.
- </para>
-
- <para>
- This guide contains the information you need to know to do the
- following:
-
- <itemizedlist>
- <listitem>
- <para>
- Write applications that use &Evolution;'s data
- repositories via the &Wombat; personal information server.
- Examples of this would be a <application>GNOME
- Panel</application> applet that displays today's
- appointments, or a telephone dialer application that uses
- the contents of the &Evolution; Addressbook.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Write applications that use the &Camel; mail library.
- This includes extending &Evolution;'s own mail component
- to perform additional functions.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Write new components for the &Evolution; Shell. Instead
- of writing a stand-alone application, you can provide your
- users with the benefit of having integrated views of their
- data from within Evolution.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Write new modules for the &Evolution; Executive Summary.
- This allows you to present commonly-accessed information
- in a convenient fashion directly in the &Evolution; Shell.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Modify the core &Evolution; code to add new features or
- change its architecture.
- </para>
- </listitem>
- </itemizedlist>
- </para>
-
- <sect1 id="organization">
- <title>Organization of this Guide</title>
-
- <para>
- This guide is organized in two big sections. The first is a
- programming guide, which consists of one part for each one of
- &Evolution;'s components: there are separate parts for the
- calendar, the addressbook, the mailer, the executive summary,
- and the shell. Each part gives a description of the
- architecture of its corresponding component, and also gives
- information about the component's internal architecture and
- some implementation details.
- </para>
-
- <para>
- The second section of this guide is a reference guide for
- &Evolution;'s programming interfaces. We have separated these
- into public and private interfaces. The public ones are those
- that most people will need to use when writing extensions or
- third-party components; the private interfaces are those used
- internally in &Evolution;. Even if you do not intend to
- modify the &Evolution; core code, it may be useful to know a
- bit about the way it is organized internally.
- </para>
-
- <para>
- &Evolution; is free software, and we want you as a programmer
- to make the most of it. We have provided many useful
- interfaces that you can use in your own applications. Still,
- we want you to view &Evolution; as a framework for building
- groupware applications, and this may occasionally involve
- making changes to its core code. We want you to learn from
- &Evolution;'s design because we think it marks an important
- milestone in the development of large-scale free software
- applications. We want you to modify it as you see fit. Free
- software gives you this freedom, and we want the whole world
- to benefit from it.
- </para>
- </sect1>
- </preface>
-
-<!--
-Local variables:
-mode: sgml
-sgml-parent-document: ("evolution-devel-guide.sgml" "book" "book" "")
-End:
--->
diff --git a/doc/devel/reference.sgml b/doc/devel/reference.sgml
deleted file mode 100644
index b0c81de77f..0000000000
--- a/doc/devel/reference.sgml
+++ /dev/null
@@ -1,49 +0,0 @@
- <part id="evolution-api-reference">
- <title>&Evolution; API Reference</title>
-
- <partintro>
- <para>
- This part presents the class and function reference for the
- different libraries and interfaces that &Evolution; provides.
- Classes are described together with their methods; individual
- functions are grouped by functional group.
- </para>
-
- <para>
- &Evolution; provides two kinds of interfaces, public and
- private. The public interfaces are those designed to be used
- from third-party applications or components; if you wanted to
- write an application that uses &Evolution;'s data repositories
- to display data in a particular way, you would use the public
- interfaces. The private interfaces are those used inside
- &Evolution; itself; these are generally not interesting unless
- you intend to make modifications to the &Evolution; code base.
- </para>
-
- <para>
- While the public and private interfaces are described in
- separate reference sections, we have decided to put them
- together in the same book, this guide, because we want to
- encourage you to regard &Evolution; as something more than a
- black box that stores and dispatches personal information. We
- want you to make modifications to the &Evolution; core if
- these would allow you to present or store your data in better
- ways. &Evolution; is free software; we want you to learn from
- its design and implementation details so that you can make it
- even better for the whole world to use.
- </para>
- </partintro>
-
- &calendar-public-reference;
- &importer-public-reference;
- &evolution-services-public-reference;
- &importer-private-reference;
- &evolution-services-private-reference;
- </part>
-
-<!--
-Local variables:
-mode: sgml
-sgml-parent-document: ("evolution-devel-guide.sgml" "book" "book" "")
-End:
--->
diff --git a/doc/es.po/apx-authors.sgml.po b/doc/es.po/apx-authors.sgml.po
deleted file mode 100644
index 081b41f811..0000000000
--- a/doc/es.po/apx-authors.sgml.po
+++ /dev/null
@@ -1,178 +0,0 @@
-# Translation into Spanish of Evolution docs.
-# Copyright (C) 2000 Free Software Foundation, Inc.
-# Héctor García Álvarez <hector@scouts-es.org>, 2000.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: evolution-docs\n"
-"POT-Creation-Date: 2001-03-13 16:30+0100\n"
-"PO-Revision-Date: 2000-12-28 15:38+0100\n"
-"Last-Translator: Héctor García Álvarez <hector@scouts-es.org>\n"
-"Language-Team: Spanish <es@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=iso-8859-1\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: tmp/apx-authors.sgml.h:1
-msgid ""
-" <para>\n"
-" <application>Evolution</application> was written by:\n"
-"<simplelist>\n"
-" <member>Seth Alves: <email>alves@helixcode.com</email></member>\n"
-" <member>Anders Carlsson: <email>andersca@gnu.org</email></member>\n"
-" <member>Damon Chaplin: <email>damon@helixcode.com</email></member>\n"
-" <member>Clifford R. Conover: <email>rusty@zootweb.com</email></member>\n"
-" <member>Miguel De Icaza: <email>miguel@helixcode.com</email></member>\n"
-" <member> Radek Doulik: <email>rodo@helixcode.com</email></member>\n"
-" <member>Arturo Espinoza: <email>arturo@nucleu.unam.mx</email></member>\n"
-" <member>Larry Ewing: <email>lewing@helixcode.com</email></member>\n"
-" <member>Bertrand Guiheneuf: "
-"<email>bertrand@helixcode.com</email></member>\n"
-" <member>Tuomas Kuosmanen: <email>tigert@gimp.org</email></member>\n"
-" <member>Christopher J. Lahey: "
-"<email>clahey@helixcode.com</email></member>\n"
-" <member>Matthew Loper: <email>matt@loper.org</email></member>\n"
-" <member>Federico Mena: <email>federico@helixcode.com</email></member>\n"
-" <member>Eskil Heyn Olsen: <email>deity@eski.dk</email></member>\n"
-" <member>Nat Friedman: <email>nat@helixcode.com</email></member>\n"
-" <member>Ettore Perazzoli: <email>ettore@helixcode.com</email></member>\n"
-" <member>Jeffrey Stedfast: <email>jeff@helixcode.com</email></member>\n"
-" <member>Russell Steinthal: <email>rms39@columbia.edu</email></member> "
-" \n"
-" <member>Peter Teichman: <email>peter@helixcode.com</email></member> "
-"\n"
-" <member>Chris Toshok: <email>toshok@helixcode.com</email></member>\n"
-" <member>Peter Williams: <email>peter@newton.cx</email></member>\n"
-" <member>Dan Winship: <email>danw@helixcode.com</email></member>\n"
-" <member>Michael Zucchi: <email>notzed@helixcode.com</email></member>\n"
-"</simplelist>\n"
-"and other dedicated GNOME programmers. \n"
-"</para>\n"
-msgstr ""
-" <para>\n"
-" <application>Evolution</application> ha sido escrita por:\n"
-"<simplelist>\n"
-" <member>Seth Alves: <email>alves@helixcode.com</email></member>\n"
-" <member>Anders Carlsson: <email>andersca@gnu.org</email></member>\n"
-" <member>Damon Chaplin: <email>damon@helixcode.com</email></member>\n"
-" <member>Clifford R. Conover: <email>rusty@zootweb.com</email></member>\n"
-" <member>Miguel De Icaza: <email>miguel@helixcode.com</email></member>\n"
-" <member> Radek Doulik: <email>rodo@helixcode.com</email></member>\n"
-" <member>Arturo Espinoza: <email>arturo@nucleu.unam.mx</email></member>\n"
-" <member>Larry Ewing: <email>lewing@helixcode.com</email></member>\n"
-" <member>Bertrand Guiheneuf: "
-"<email>bertrand@helixcode.com</email></member>\n"
-" <member>Tuomas Kuosmanen: <email>tigert@gimp.org</email></member>\n"
-" <member>Christopher J. Lahey: "
-"<email>clahey@helixcode.com</email></member>\n"
-" <member>Matthew Loper: <email>matt@loper.org</email></member>\n"
-" <member>Federico Mena: <email>federico@helixcode.com</email></member>\n"
-" <member>Eskil Heyn Olsen: <email>deity@eski.dk</email></member>\n"
-" <member>Nat Friedman: <email>nat@helixcode.com</email></member>\n"
-" <member>Ettore Perazzoli: <email>ettore@helixcode.com</email></member>\n"
-" <member>Jeffrey Stedfast: <email>jeff@helixcode.com</email></member>\n"
-" <member>Russell Steinthal: <email>rms39@columbia.edu</email></member> "
-" \n"
-" <member>Peter Teichman: <email>peter@helixcode.com</email></member> "
-"\n"
-" <member>Chris Toshok: <email>toshok@helixcode.com</email></member>\n"
-" <member>Peter Williams: <email>peter@newton.cx</email></member>\n"
-" <member>Dan Winship: <email>danw@helixcode.com</email></member>\n"
-" <member>Michael Zucchi: <email>notzed@helixcode.com</email></member>\n"
-"</simplelist>\n"
-"y otros dedicados programadores de GNOME. \n"
-"</para>\n"
-
-#: tmp/apx-authors.sgml.h:31
-msgid ""
-" <!-- For translations: uncomment this: <para> Latin translation\n"
-" was done by ME (<email>MYNAME@MYADDRESS</email>). Please send\n"
-" all comments and suggestions regarding this translation to\n"
-" SOMEWHERE. </para> -->\n"
-msgstr ""
-" <para> Traducción al español realizada por\n"
-" Héctor García Álvarez (<email>hector@scouts-es.org</email>). \n"
-" Por favor envíe todos los comentarios y sugerencias sobre esta \n"
-" traducción a <email>hector@debian.org</email>. </para>\n"
-
-#: tmp/apx-authors.sgml.h:36
-msgid ""
-" <para>\n"
-" The <application>Evolution</application> code owes a great debt\n"
-" to the <application>GNOME-pim</application> and\n"
-" <application>GNOME-Calendar</application> applications, and to\n"
-" <application>KHTMLW</application>. The developers of\n"
-" <application>Evolution</application> acknowledge the efforts\n"
-" and contributions of all who worked on those projects.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" El código de <application>Evolution</application> debe mucho a las\n"
-" aplicaciones <application>GNOME-pim</application> y\n"
-" <application>GNOME-Calendar</application>, y a\n"
-" <application>KHTMLW</application>. Los desarrolladores de\n"
-" <application>Evolution</application> reconocen los esfuerzos y\n"
-" contribuciones de todos los que ha trabajado en dichos proyectos.\n"
-" </para>\n"
-
-#: tmp/apx-authors.sgml.h:45
-msgid ""
-" <para>\n"
-" This manual was written by Aaron Weber\n"
-" (<email>aaron@helixcode.com</email>) and Kevin Breit\n"
-" (<email>battery841@mypad.com</email>) with the help of the\n"
-" application programmers and the GNOME Documentation Project.\n"
-" Please send all comments and suggestions regarding the manual to\n"
-" the GNOME Documentation Project at\n"
-" <email>docs@gnome.org</email>. You can also add your comments\n"
-" online by using <ulink type=\"http\"\n"
-" url=\"http://www.gnome.org/gdp/doctable/\">GNOME Documentation\n"
-" Status Table</ulink>.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Este manual ha sido escrito por Aaron Weber\n"
-" (<email>aaron@helixcode.com</email>) y Kevin Breit\n"
-" (<email>battery841@mypad.com</email>) con la ayuda de los\n"
-" programadores de la aplicación y el proyecto de documentación de\n"
-" GNOME. Por favor envíe todos sus comentarios y sugerencias acerca de\n"
-" este manual al proyecto de documentación de GNOME a\n"
-" <email>docs@gnome.org</email>. También puede enviar comentarios a\n"
-" del web usando la <ulink type=\"http\"\n"
-" url=\"http://www.gnome.org/gdp/doctable/\">Tabla de Estado de la\n"
-" Documentación de GNOME</ulink> (está en ingles).\n"
-" </para>\n"
-
-#: tmp/apx-authors.sgml.h:58
-msgid " <title>Authors</title>\n"
-msgstr " <title>Autores</title>\n"
-
-#: tmp/apx-authors.sgml.h:60
-msgid ""
-" <para>\n"
-" For more information please visit the\n"
-" <application>Evolution</application> <ulink\n"
-" url=\"http://www.helixcode.com/apps/evolution.php3\"\n"
-" type=\"http\">Web page</ulink>. Please send all comments,\n"
-" suggestions, and bug reports to the <ulink\n"
-" url=\"http://bugs.gnome.org\" type=\"http\">GNOME bug tracking\n"
-" database</ulink>. Instructions for submitting bug reports can be\n"
-" found on-line at <ulink\n"
-" url=\"http://bugs.gnome.org/Reporting.html\" type=\"http\">\n"
-" http://bugs.gnome.org/Reporting.html</ulink>. You can also use\n"
-" command <command>bug-buddy</command> for submitting bug reports.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Para más información por favor visite la \n"
-" <ulink url=\"http://www.helixcode.com/apps/evolution.php3\"\n"
-" type=\"http\">página web</ulink> de <application>Evolution\n"
-" </application>. Por favor envíe todos los comentarios,\n"
-" sugerencias, y reportes de fallo al <ulink\n"
-" url=\"http://bugs.gnome.org\" type=\"http\">sistema de seguimiento de\n"
-" fallos de GNOME</ulink>. Las instrucciones para hacer reportes de\n"
-" fallos se pueden encontrar en línea en <ulink\n"
-" url=\"http://bugs.gnome.org/Reporting.html\" type=\"http\">\n"
-" http://bugs.gnome.org/Reporting.html</ulink>. También puede usar el\n"
-" comando <command>bug-buddy</command> para enviar reportes de fallo.\n"
-" </para>\n"
diff --git a/doc/es.po/apx-bugs.sgml.po b/doc/es.po/apx-bugs.sgml.po
deleted file mode 100644
index 0b3dfe146c..0000000000
--- a/doc/es.po/apx-bugs.sgml.po
+++ /dev/null
@@ -1,56 +0,0 @@
-# Translation into Spanish of Evolution docs.
-# Copyright (C) 2000 Free Software Foundation, Inc.
-# Héctor García Álvarez <hector@scouts-es.org>, 2000.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: evolution-docs\n"
-"POT-Creation-Date: 2001-03-13 16:30+0100\n"
-"PO-Revision-Date: 2000-12-28 15:38+0100\n"
-"Last-Translator: Héctor García Álvarez <hector@scouts-es.org>\n"
-"Language-Team: Spanish <es@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=iso-8859-1\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: tmp/apx-bugs.sgml.h:1
-msgid ""
-" <para>\n"
-" Evolution is still beta software, so the bug tracking is best\n"
-" left to the bugzilla system and to the programmers. However,\n"
-" there are a number of limitations that will not be addressed\n"
-" before version 1.0. The most notable are: Import of Microsoft\n"
-" Outlook .pst files, and compatibility with the Microsoft\n"
-" Exchange protocol.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Evolution todavía es software en fase beta, así que el seguimiento\n"
-" de errores es mejor dejárselo al sistema bugzilla y a los \n"
-" programadores. Eso sí, hay cierto número de limitaciones que\n"
-" no serán corregidas antes de la versión 1.0. Las más notables son: \n"
-" Importación de los archivos .pst de Microsoft Outlook, y la\n"
-" compatibilidad con el protocolo de Microsoft Exchange.\n"
-" </para>\n"
-
-#: tmp/apx-bugs.sgml.h:10
-msgid ""
-" <para>\n"
-" This appendix describes known bugs and limitations of\n"
-" <application>Evolution</application>. Please use the GNOME\n"
-" <application>Bug Report Tool</application> (known as\n"
-" <command>bug-buddy</command> at the command line) if you find one\n"
-" we have not listed.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Este apéndice describe errores y limitaciones conocidas de\n"
-" <application>Evolution</application>. Por favor use la\n"
-" <application>Herramienta de reporte de fallos</application> de GNOME\n"
-" (<command>bug-buddy</command> en la línea de comandos) si encuentra\n"
-" algún error que no este en esta lista.\n"
-" </para>\n"
-
-#: tmp/apx-bugs.sgml.h:18
-msgid " <title>Known bugs and limitations</title>\n"
-msgstr " <title>Errores y limitaciones conocidas</title>\n"
diff --git a/doc/es.po/apx-gloss.sgml.po b/doc/es.po/apx-gloss.sgml.po
deleted file mode 100644
index 2cacc8752b..0000000000
--- a/doc/es.po/apx-gloss.sgml.po
+++ /dev/null
@@ -1,745 +0,0 @@
-# Translation into Spanish of Evolution docs.
-# Copyright (C) 2000 Free Software Foundation, Inc.
-# Héctor García Álvarez <hector@scouts-es.org>, 2000.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: evolution-docs\n"
-"POT-Creation-Date: 2001-03-13 16:30+0100\n"
-"PO-Revision-Date: 2000-12-28 15:38+0100\n"
-"Last-Translator: Héctor García Álvarez <hector@scouts-es.org>\n"
-"Language-Team: Spanish <es@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=iso-8859-1\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: tmp/apx-gloss.sgml.h:1
-msgid ""
-" <para>\n"
-" This is the most common way of transporting mail messages from\n"
-" the client's computer (you) to the server. SMTP stands for\n"
-" Simple Mail Transfer Protocol.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Esta es la manera más común de transportar mensajes desde el\n"
-" ordenador cliente (el suyo) al servidor. SMTP significa Protocolo\n"
-" Simple de Transferencia de Correo.\n"
-" </para>\n"
-
-#: tmp/apx-gloss.sgml.h:7
-msgid ""
-" <para>\n"
-" In email terms, a signature is a piece of text placed at the end\n"
-" of every email sent, like a hand-written signature at the bottom\n"
-" of a written letter. A signature can be anything from a favorite\n"
-" quotation to a link to a web page; courtesy dictates that it be\n"
-" fewer than four lines long.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" En términos de un correo electrónico, una firma es un texto situado\n"
-" al final de todos los mensajes que usted mande, como una firma hecha\n"
-" a mano al final de una carta escrita. Una firma puede ser cualquier\n"
-" cosa desde su cita preferida hasta un enlace a una página web. La\n"
-" cortesía dicta que debe tener una longitud inferior a cuatro líneas.\n"
-" </para>\n"
-
-#: tmp/apx-gloss.sgml.h:15
-msgid ""
-" <para>\n"
-" LDAP, the Lightweight Directory Access Protocol, allows a client\n"
-" to search through a large database of addresses, phone numbers,\n"
-" and people stored on a server.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" LDAP, el Protocolo Ligero de Acceso a Directorio, permite a un cliente\n"
-" buscar en una gran base de datos de direcciones, números de teléfono y\n"
-" y personas que se encuentra en un servidor.\n"
-" </para>\n"
-
-#: tmp/apx-gloss.sgml.h:21
-msgid " <glossterm>LDAP</glossterm>\n"
-msgstr " <glossterm>LDAP</glossterm>\n"
-
-#: tmp/apx-gloss.sgml.h:23
-msgid " <glossterm>SMTP</glossterm>\n"
-msgstr " <glossterm>SMTP</glossterm>\n"
-
-#: tmp/apx-gloss.sgml.h:25
-msgid " <glossterm>Signature</glossterm>\n"
-msgstr " <glossterm>Firma</glossterm>\n"
-
-#: tmp/apx-gloss.sgml.h:27
-msgid ""
-" <para>\n"
-" the user can send a third party a message\n"
-" which was sent to the user originally.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" el usuario puede enviar un mensaje a una tercera persona que "
-"originalmente le fue enviado a el.\n"
-" </para>\n"
-
-#: tmp/apx-gloss.sgml.h:32
-msgid ""
-" <para>\n"
-" A format for the display of contact data. Similar in appearance\n"
-" to a small business card.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Un formato para mostrar la información de contacto. Similar en\n"
-" apariencia a una pequeña tarjeta de visita.\n"
-" </para>\n"
-
-#: tmp/apx-gloss.sgml.h:37
-msgid ""
-" <para>\n"
-" A regular expression, or \"regex\", is a way of describing a\n"
-" string of text using metacharacters or wild-card symbols. For\n"
-" example, the statement <userinput>fly.*so[a|u]p</userinput> means\n"
-" \"any phrase beginning with 'fly' and ending in 'soup' or\n"
-" 'soap'\". If you searched for that expression, you'd find both\n"
-" \"fly in my soup\" and \"fly in my soap.\" There's not room here to\n"
-" go into depth, but if you want, have a look at the documentation\n"
-" for the <command>grep</command> command.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Una expresión regular, o \"regex\", es una forma de describir una\n"
-" cadena de texto usando meta caracteres o símbolos wild-card. Por\n"
-" ejemplo, la frase <userinput>tener.*pat[a|o]</userinput> significa\n"
-" \"cualquier frase que comience por 'tener' y que acabe en 'pata' o\n"
-" 'pato'\". Si usted busca esta expresión, encontrará entre otras\n"
-" \"tener mala pata\" y \"tener un pato\". No hay sitio aquí para\n"
-" entrar en profundidad, pero si lo desea, puede echar un vistazo a la\n"
-" documentación del comando <command>grep</command>.\n"
-" </para>\n"
-
-#: tmp/apx-gloss.sgml.h:48
-msgid ""
-" <para>\n"
-" A small box of explanatory text which appears when the mouse\n"
-" pointer is held motionless over a button or other interface\n"
-" element.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Una paqueña caja con texto explicatorio que aparece cuando el puntero\n"
-" del ratón permanece sin moverse sobre un botón o cualquier otro\n"
-" elemento de la interfaz.\n"
-" </para>\n"
-
-#: tmp/apx-gloss.sgml.h:54
-msgid ""
-" <para>\n"
-" As its name implies, <application>sendmail</application> is a\n"
-" program which sends mail. <application>Evolution</application>\n"
-" can use it instead of <glossterm>SMTP</glossterm>; some people\n"
-" prefer it because it offers more flexibility, but is more\n"
-" difficult to set up.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Como su nombre indica, <application>sendmail</application> es un\n"
-" programa que envía correo. <application>Evolution</application>\n"
-" puede usarlo en lugar de <glossterm>SMTP</glossterm>; algunas\n"
-" personas lo prefieren porque permite más flexibilidad, pero es más\n"
-" difícil de configurar.\n"
-" </para>\n"
-
-#: tmp/apx-gloss.sgml.h:62
-msgid ""
-" <para>\n"
-" A portion of <application>Evolution</application> which offers\n"
-" users fast access to the most frequently used portions of the\n"
-" application.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Una parte de <application>Evolution</application> que ofrece\n"
-" a los usuarios un rápido acceso a la partes de la aplicación\n"
-" usadas más frecuentemente.\n"
-" </para>\n"
-
-#: tmp/apx-gloss.sgml.h:68
-msgid ""
-" <para>\n"
-" A synchronization conduit is a small application which controls\n"
-" the transfer of data between a handheld device and a desktop\n"
-" computer.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Un enlaze de sincronización es una pequeña aplicación que controla la\n"
-" transferencia de información entre un dispositivo de mano y un\n"
-" ordenador.\n"
-" </para>\n"
-
-#: tmp/apx-gloss.sgml.h:74
-msgid ""
-" <para>\n"
-" A traditional Japanese form of poetry. The poems are three lines\n"
-" long, with first and last lines having five syllables, and the\n"
-" second line seven syllables.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Una forma de poesía tradicional japonesa. Los poemas son de tres\n"
-" líneas, donde la primera y la última tienen cinco sílabas, y la\n"
-" segunda línea tiene siete sílabas.\n"
-" </para>\n"
-
-#: tmp/apx-gloss.sgml.h:80
-msgid ""
-" <para>\n"
-" A way of describing a group of files on a computer. With the\n"
-" perversity typical of computer (and especially Unix and Linux)\n"
-" nomenclature, the top of the tree is called the root directory,\n"
-" and denoted by <systemitem><filename>/</filename></systemitem>.\n"
-" The rest of the \"branches\" spread downwards from the root. Don't\n"
-" confuse the root directory with the <systemitem>root</systemitem>\n"
-" account, or root's home directory,\n"
-" <systemitem><filename>/home/root</filename></systemitem>.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Un forma de describir un conjunto de archivos en un ordenador. Con\n"
-" la especial perversión de la típica nomenclatura de ordenadores\n"
-" (y especialmente en Unix y Linux), la parte más alta del árbol se\n"
-" llama el directorio raíz, y se denota por <systemitem><filename>/\n"
-" </filename></systemitem>. El resto de las \"ramas\" se extienden\n"
-" desde la raíz. No confundir el directorio raíz (root en ingles) con\n"
-" la cuenta <systemitem>root</systemitem>, o con el directorio del\n"
-" usuario root, "
-"<systemitem><filename>/home/root</filename></systemitem>.\n"
-" </para>\n"
-
-#: tmp/apx-gloss.sgml.h:91
-msgid ""
-" <para>\n"
-" Also called \"smileys,\" emoticons are the little sideways faces made\n"
-" of colons and parentheses which people use to convey emotion in email.\n"
-" Examples: :-) or ;( .\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" También llamados \"smileys\", los emoticones son pequeñas caras "
-"puestas\n"
-" de lado echas de puntos y paréntesis que la gente usa para expresar\n"
-" emociones en los correos electrónicos. Ejemplos: :-) ó ;( .\n"
-" </para>\n"
-
-#: tmp/apx-gloss.sgml.h:97
-msgid ""
-" <para>\n"
-" An agreed-upon method of communication, especially one for\n"
-" sending particular types of information between computer systems.\n"
-" Examples include POP (Post Office Protocol), for email, and HTTP\n"
-" (HypterText Transfer Protocol), for web pages.\n"
-"\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Un método de comunicación acordado, especialmente uno acordado para\n"
-" enviar tipos particulares de información entre ordenadores\n"
-" Ejemplos son POP (Protocolo de Oficina de Correo), para el correo, y\n"
-" HTTP (Protocolo de Transferencia de Hipertexto), para páginas web.\n"
-"\n"
-" </para>\n"
-
-#: tmp/apx-gloss.sgml.h:105
-msgid ""
-" <para>\n"
-" Displayed as part of a message or other document, rather than\n"
-" attached as a separate file. Contrast with <glossterm\n"
-" linkend=\"attachment\">Attachment</glossterm>.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Mostrados como para de una mensaje u otro documento, en lugar de\n"
-" incluido como un archivo separado. Contrasta con <glossterm\n"
-" linkend=\"attachment\">Adjunto</glossterm>.\n"
-" </para>\n"
-
-#: tmp/apx-gloss.sgml.h:111
-msgid ""
-" <para>\n"
-" POP, the Post Office Protocol, is a mechanism for email\n"
-" transport. In contrast to IMAP, it is used only to get mail from\n"
-" a server and store it locally on your hard disk.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" POP, el Protocolo de Oficina de Correos, es un mecanismo para el\n"
-" transporte de correo. En contraste con IMAP, solo se usa para obtener\n"
-" el correo del servidor y almacenarlo localmente en el disco duro.\n"
-" </para>\n"
-
-#: tmp/apx-gloss.sgml.h:117
-msgid ""
-" <para>\n"
-" Pre-sorting procedure that allows\n"
-" <application>Evolution</application> to refer to data quickly.\n"
-" It enables faster searches and decreases memory usage for\n"
-" data displays.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" El procedimiento de pre-ordenado que permite a\n"
-" <application>Evolution</application> encontrar la información\n"
-" rápidamente. Permite búsquedas más rápidas y disminuye el uso de la\n"
-" memoria para mostrar datos.\n"
-" </para>\n"
-
-#: tmp/apx-gloss.sgml.h:124
-msgid ""
-" <para>\n"
-" <application>Evolution</application> is the <acronym> GNOME\n"
-" </acronym> groupware application.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" <application>Evolution</application> es la aplicación de trabajo en\n"
-" grupo de <acronym>GNOME</acronym>.\n"
-" </para>\n"
-
-#: tmp/apx-gloss.sgml.h:129
-msgid ""
-" <para>\n"
-" <application>Nautilus</application> is the next generation file\n"
-" manager for <acronym>GNOME</acronym> being written by Eazel.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" <application>Nautilus</application> es la próxima generación del\n"
-" gestor de archivos de <acronym>GNOME</acronym> que está desarrollando\n"
-" la compañía Eazel.\n"
-" </para>\n"
-
-#: tmp/apx-gloss.sgml.h:134
-msgid ""
-" <para>\n"
-" <application>iCal</application> is the program which\n"
-" <application>Evolution</application> uses to manage the calendar\n"
-" section.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" <application>iCal</application> es el programa que usa\n"
-" <application>Evolution</application> para manejar la sección del\n"
-" calendario.\n"
-" </para>\n"
-
-#: tmp/apx-gloss.sgml.h:140
-msgid ""
-" <para>\n"
-" A file format for the exchange of contact information. When you\n"
-" get an address card attached to an email, it's probably in vCard\n"
-" format. Not to be confused with <glossterm\n"
-" linkend=\"vfolder\">vFolder</glossterm>.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Un formato de archivo para el intercambio de información de contactos.\n"
-" Cuando recibe una tarjeta adjunta a un correo, esta probablemente en el\n"
-" formato vCard. No confundir con <glossterm\n"
-" linkend=\"vfolder\">vFolder</glossterm>.\n"
-" </para>\n"
-
-#: tmp/apx-gloss.sgml.h:147
-msgid ""
-" <para>\n"
-" A mail client is the application with which a person reads and\n"
-" sends e-mail. Its counterparts are the various types of mail\n"
-" servers, which handle user authentication and direct messages from\n"
-" sender to recipient.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Un cliente de correo es la aplicación con la que una persona lee y\n"
-" envía correos electrónicos. En el otro lado están los distintos tipos\n"
-" de servidores de correo, que se encargan de autentificar al usuario\n"
-" y dirigir los mensajes desde el remitente hasta el destinatario.\n"
-" </para>\n"
-
-#: tmp/apx-gloss.sgml.h:154
-msgid ""
-" <para>\n"
-" A malicious program which inserts itself into others so that it will be "
-"\n"
-" executed, allowing it to spread to still more programs and other "
-"computers.\n"
-" A virus can cause substantial damage by clogging networks or disk "
-"drives, \n"
-" deleting files, or opening security holes.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Un programa malicioso que se inserta a si mismo en otros para así ser \n"
-" ejecutado, permitiéndole expandirse a más programas y a otros "
-"ordenadores.\n"
-" Un virus puede causar daños sustanciales colapsando redes y unidades de "
-"disco, \n"
-" borrando archivos, o abriendo agujeros de seguridad.\n"
-" </para>\n"
-
-#: tmp/apx-gloss.sgml.h:161
-msgid ""
-" <para>\n"
-" A program written in an interpreted (rather than compiled)\n"
-" language. Often used as a synonym for \"macro,\" to denote a series\n"
-" of pre-recorded commands or actions within an application.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Un programa escrito en un lenguaje interpretado (en lugar de\n"
-" compilado). A menudo usado como sinónimo de \"macro,\" para denotar\n"
-" una serie de comando o acciones pre grabados en una aplicación.\n"
-" </para>\n"
-
-#: tmp/apx-gloss.sgml.h:167
-msgid ""
-" <para>\n"
-" A tool which guides a user through a series of steps, usually to\n"
-" configure or set up a program. Equivalent to \"Assistant\" and\n"
-" \"Wizard.\"\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Una herramienta que guía al usuario a través de una serie de pasos,\n"
-" normalmente para configurar un programa. Equivalente a \"Asistente\"\n"
-" y \"Wizard\".\n"
-" </para>\n"
-
-#: tmp/apx-gloss.sgml.h:173
-msgid ""
-" <para>\n"
-" A way of addressing a message. Bcc is used to send a group of\n"
-" people an e-mail, while hiding their names and addresses from each\n"
-" other.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Una manera de dirigir un mensaje. Bcc es usado para enviar un mensaje\n"
-" a un grupo de personas, a la vez que se ocultan los nombres y\n"
-" direcciones de unos a los otros.\n"
-" </para>\n"
-
-#: tmp/apx-gloss.sgml.h:179
-msgid ""
-" <para>\n"
-" An alias for an e-mail address.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Un alias para una dirección de correo electrónico.\n"
-" </para>\n"
-
-#: tmp/apx-gloss.sgml.h:183
-msgid ""
-" <para>\n"
-" An email organization tool. vFolders allows you to create a folder\n"
-" that contains the results of a complex search. Folder contents are\n"
-" are updated dynamically.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Una herramienta para organizar mensajes. vFolders le permite crear una\n"
-" carpeta que contiene los resultados de una búsqueda compleja. Los\n"
-" contenidos de la carpeta se actualizan dinámicamente.\n"
-" </para>\n"
-
-#: tmp/apx-gloss.sgml.h:189
-msgid ""
-" <para>\n"
-" Any file sent along with an email. Attachments may be embedded in\n"
-" a message or appended to it.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Cualquier archivo enviado junto con el mensaje de correo. Los adjuntos\n"
-" pueden estar insertados dentro del mensaje o añadidos a el.\n"
-" </para>\n"
-
-#: tmp/apx-gloss.sgml.h:194
-msgid ""
-" <para>\n"
-" Carbon-copies are used to send a 3rd party a copy of the e-mail,\n"
-" so they an keep up to date on a conversation, without being in the\n"
-" To: list.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Con-Copia es usado para enviar una copia del mensaje a una 3º persona,\n"
-" para que puedan enterarse de la conversación, sin estar en la lista de\n"
-" A:\n"
-" </para>\n"
-
-#: tmp/apx-gloss.sgml.h:200
-msgid ""
-" <para>\n"
-" Depending upon whom you ask, IMAP stands for the Internet Mail\n"
-" Access Protocol, or the Interim Mail Access Protocol. Whatever it\n"
-" stands for, it allows access to email which is typically (although\n"
-" not always) stored remotely on a server rather than on a local\n"
-" hard disk. Often contrasted with <glossterm>POP</glossterm>.\n"
-" This will not be on the test.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Dependiendo a quien pregunte, IMAP significa Protocolo de Acceso al\n"
-" Correo de Internet, o Protocolo de Acceso a Correo Interinamente.\n"
-" Lo que sea que signifique, permite acceder al correo que está\n"
-" típicamente (aunque no siempre) guardado remotamente en el servidor en\n"
-" lugar de en el disco duro local. Algunas veces contrasta con\n"
-" <glossterm>POP</glossterm>.\n"
-" Esto no estará en la prueba.\n"
-" </para>\n"
-
-#: tmp/apx-gloss.sgml.h:209
-msgid ""
-" <para>\n"
-" Groupware is a term describing an application which helps groups\n"
-" of people work together. Typically, a groupware application will\n"
-" have several productivity features built into one program.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Trabajo en Grupo es un término que describe la aplicación que ayuda a\n"
-" grupos de persones a trabajar juntas. Típicamente, esta aplicación\n"
-" varias herramientas de productividad integradas en un mismo programa.\n"
-" </para>\n"
-
-#: tmp/apx-gloss.sgml.h:215
-msgid ""
-" <para>\n"
-" Hot-keys are keyboard combinations used to do actions on a\n"
-" computer instead of using the mouse to do the same action.\n"
-" Hot-keys can speed up computer usage.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Teclas rápidas son combinaciones de teclado usadas para realizar\n"
-" acciones en el ordenador en lugar de usar el ratón para la misma\n"
-" acción. Las teclas rápidas pueden acelerar el uso del ordenador.\n"
-" </para>\n"
-
-#: tmp/apx-gloss.sgml.h:221
-msgid ""
-" <para>\n"
-" Hyper-text Markup Language(<acronym>HTML</acronym>) is a language\n"
-" for describing page layout in electronic documents like web pages,\n"
-" help files, and email messages. HTML can be used in email and\n"
-" news posts to insert images and apply text treatments.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Lenguaje de Marcas de Hyper-texto (<acronym>HTML</acronym>) es un\n"
-" lenguaje para describir la forma de la página en documentos "
-"electrónicos\n"
-" como páginas web, archivos de ayuda, y mensajes de correo. El HTML se\n"
-" puede usar en el correo electrónico y en los grupos de noticias para\n"
-" insertar imágenes o formatear el texto\n"
-" </para>\n"
-
-#: tmp/apx-gloss.sgml.h:228
-msgid ""
-" <para>\n"
-" To run a program. Any file that can be run is called an\n"
-" executable. <application>Evolution</application> can download\n"
-" executable attachments, but before they can be run, the files must\n"
-" be marked as executable with a shell or file manager. This\n"
-" security precaution prevents the automatic or accidental execution\n"
-" of malicious programs. For more information on executables and file\n"
-" permissions, see the documentation for your file manager or shell.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Para ejecutar un programa. Cualquier archivo que se puede ejecutar\n"
-" se llama ejecutable. <application>Evolution</application> puede\n"
-" descargar ejecutables adjuntos, pero antes de poder ejecutarlos, el\n"
-" archivo debe ser marcado como ejecutable a través de una shell o un\n"
-" administrador de archivos. Esta precaución de seguridad previene "
-"contra\n"
-" la ejecución automática o accidental de programas maliciosos. Para más\n"
-" información acerca de archivos ejecutables y permisos de archivos,\n"
-" consulte la documentación de su administrador de archivos o de su "
-"shell.\n"
-" </para>\n"
-
-#: tmp/apx-gloss.sgml.h:238
-msgid ""
-" <para>\n"
-" Useless, unsolicited e-mail. Spam normally comes in forms of\n"
-" chain letters and advertisements for unscrupulous or clueless\n"
-" companies. Messages that are merely useless are called \"opt-in\n"
-" newsletters.\"\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Correo no deseado ó inútil. El spam normalmente aparece como cartas\n"
-" encadenadas y publicidad de compañías sin escrúpulos o sin sentido.\n"
-" Los mensajes que no valen para nada se conocen como \"boletínes\n"
-" opt-in\"\n"
-". </para>\n"
-
-#: tmp/apx-gloss.sgml.h:245
-msgid ""
-" <para>\n"
-" Within <application>Evolution</application>, a filter is a method\n"
-" of sorting mail automatically. You can create filters to perform\n"
-" one or more actions on a message that meets any (or all) of a wide\n"
-" range of criteria.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Dentro de <application>Evolution</application>, un filtro es un método\n"
-" para ordenar el correo automáticamente. Puede crear filtros para\n"
-" realizar una o más acciones sobre un mensaje que cumple alguno (o "
-"todos)\n"
-" de los requisitos de un amplio rango de criterios.\n"
-" </para>\n"
-
-#: tmp/apx-gloss.sgml.h:252
-msgid " <glossterm>Attachment</glossterm>\n"
-msgstr " <glossterm>Adjunto</glossterm>\n"
-
-#: tmp/apx-gloss.sgml.h:254
-msgid " <glossterm>Automatic Indexing</glossterm>\n"
-msgstr " <glossterm>Indexado Automático</glossterm>\n"
-
-#: tmp/apx-gloss.sgml.h:256
-msgid " <glossterm>Bcc (Blind Carbon Copy)</glossterm>\n"
-msgstr " <glossterm>Cco (Con Copia Oculta)</glossterm>\n"
-
-#: tmp/apx-gloss.sgml.h:258
-msgid " <glossterm>Cc (Carbon Copy)</glossterm>\n"
-msgstr " <glossterm>Cc (Con Copia)</glossterm>\n"
-
-#: tmp/apx-gloss.sgml.h:260
-msgid " <glossterm>Conduit</glossterm>\n"
-msgstr " <glossterm>Enlaze</glossterm>\n"
-
-#: tmp/apx-gloss.sgml.h:262
-msgid " <glossterm>Druid</glossterm>\n"
-msgstr " <glossterm>Ayudante</glossterm>\n"
-
-#: tmp/apx-gloss.sgml.h:264
-msgid " <glossterm>Emoticon</glossterm>\n"
-msgstr " <glossterm>Emoticon</glossterm>\n"
-
-#: tmp/apx-gloss.sgml.h:266
-msgid " <glossterm>Evolution</glossterm>\n"
-msgstr " <glossterm>Evolution</glossterm>\n"
-
-#: tmp/apx-gloss.sgml.h:268
-msgid " <glossterm>Execute</glossterm>\n"
-msgstr " <glossterm>Ejecutar</glossterm>\n"
-
-#: tmp/apx-gloss.sgml.h:270
-msgid " <glossterm>File Tree</glossterm>\n"
-msgstr " <glossterm>Árbol de Archivos</glossterm>\n"
-
-#: tmp/apx-gloss.sgml.h:272
-msgid " <glossterm>Filter</glossterm>\n"
-msgstr " <glossterm>Filtro</glossterm>\n"
-
-#: tmp/apx-gloss.sgml.h:274
-msgid " <glossterm>Forward</glossterm>\n"
-msgstr " <glossterm>Reenviar</glossterm>\n"
-
-#: tmp/apx-gloss.sgml.h:276
-msgid " <glossterm>HTML</glossterm>\n"
-msgstr " <glossterm>HTML</glossterm>\n"
-
-#: tmp/apx-gloss.sgml.h:278
-msgid " <glossterm>Haiku</glossterm>\n"
-msgstr " <glossterm>Haiku</glossterm>\n"
-
-#: tmp/apx-gloss.sgml.h:280
-msgid " <glossterm>Hot Key</glossterm>\n"
-msgstr " <glossterm>Tecla Rápida</glossterm>\n"
-
-#: tmp/apx-gloss.sgml.h:282
-msgid " <glossterm>IMAP</glossterm>\n"
-msgstr " <glossterm>IMAP</glossterm>\n"
-
-#: tmp/apx-gloss.sgml.h:284
-msgid " <glossterm>Inline</glossterm>\n"
-msgstr " <glossterm>En línea</glossterm>\n"
-
-#: tmp/apx-gloss.sgml.h:286
-msgid " <glossterm>Mail Client</glossterm>\n"
-msgstr " <glossterm>Cliente de Correo</glossterm>\n"
-
-#: tmp/apx-gloss.sgml.h:288
-msgid " <glossterm>Minicard</glossterm>\n"
-msgstr " <glossterm>Minitarjeta</glossterm>\n"
-
-#: tmp/apx-gloss.sgml.h:290
-msgid " <glossterm>Nautilus</glossterm>\n"
-msgstr " <glossterm>Nautilus</glossterm>\n"
-
-#: tmp/apx-gloss.sgml.h:292
-msgid " <glossterm>Nickname</glossterm>\n"
-msgstr " <glossterm>Apodo</glossterm>\n"
-
-#: tmp/apx-gloss.sgml.h:294
-msgid " <glossterm>POP</glossterm>\n"
-msgstr " <glossterm>POP</glossterm>\n"
-
-#: tmp/apx-gloss.sgml.h:296
-msgid " <glossterm>Protocol</glossterm>\n"
-msgstr " <glossterm>Protocolo</glossterm>\n"
-
-#: tmp/apx-gloss.sgml.h:298
-msgid " <glossterm>Regular Expression</glossterm>\n"
-msgstr " <glossterm>Expresión Regular</glossterm>\n"
-
-#: tmp/apx-gloss.sgml.h:300
-msgid " <glossterm>Script</glossterm>\n"
-msgstr " <glossterm>Script</glossterm>\n"
-
-#: tmp/apx-gloss.sgml.h:302
-msgid " <glossterm>Sendmail</glossterm>\n"
-msgstr " <glossterm>Sendmail</glossterm>\n"
-
-#: tmp/apx-gloss.sgml.h:304
-msgid " <glossterm>Shortcut Bar</glossterm>\n"
-msgstr " <glossterm>Barra de Atajos</glossterm>\n"
-
-#: tmp/apx-gloss.sgml.h:306
-msgid " <glossterm>Spam</glossterm>\n"
-msgstr " <glossterm>Spam</glossterm>\n"
-
-#: tmp/apx-gloss.sgml.h:308
-msgid " <glossterm>Tool-Tip</glossterm>\n"
-msgstr " <glossterm>Mensaje de Ayuda</glossterm>\n"
-
-#: tmp/apx-gloss.sgml.h:310
-msgid " <glossterm>Virus</glossterm>\n"
-msgstr " <glossterm>Virus</glossterm>\n"
-
-#: tmp/apx-gloss.sgml.h:312
-msgid " <glossterm>iCal</glossterm>\n"
-msgstr " <glossterm>iCal</glossterm>\n"
-
-#: tmp/apx-gloss.sgml.h:314
-msgid " <glossterm>vCard</glossterm>\n"
-msgstr " <glossterm>vCard</glossterm>\n"
-
-#: tmp/apx-gloss.sgml.h:316
-msgid " <glossterm>vFolder</glossterm>\n"
-msgstr " <glossterm>vFolder</glossterm>\n"
-
-#: tmp/apx-gloss.sgml.h:318
-msgid " <glossterm>Groupware</glossterm>\n"
-msgstr " <glossterm>Trabajo en Grupo</glossterm>\n"
-
-#: tmp/apx-gloss.sgml.h:320
-msgid " <title>Glossary</title>\n"
-msgstr " <title>Glosario</title>\n"
diff --git a/doc/es.po/config-prefs.sgml.po b/doc/es.po/config-prefs.sgml.po
deleted file mode 100644
index 3ca21670b2..0000000000
--- a/doc/es.po/config-prefs.sgml.po
+++ /dev/null
@@ -1,1364 +0,0 @@
-# Translation into Spanish of Evolution docs.
-# Copyright (C) 2000 Free Software Foundation, Inc.
-# Héctor García Álvarez <hector@scouts-es.org>, 2000.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: evolution-docs\n"
-"POT-Creation-Date: 2001-03-13 16:30+0100\n"
-"PO-Revision-Date: 2000-12-28 15:38+0100\n"
-"Last-Translator: Héctor García Álvarez <hector@scouts-es.org>\n"
-"Language-Team: Spanish <es@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=iso-8859-1\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: tmp/config-prefs.sgml.h:1
-msgid ""
-"\t<para>\n"
-" To use <guilabel>SMTP</guilabel>, you'll need to enter the\n"
-" name of your SMTP server. It may have the same name as\n"
-" your mail source server.\n"
-" </para>\n"
-msgstr ""
-"\t<para>\n"
-" Para usar <guilabel>SMTP</guilabel>, necesitará introducir\n"
-" el nombre de su servidor SMTP. Puede que sea el mismo nombre\n"
-" que el del servidor de su fuente de correo.\n"
-" </para>\n"
-
-#: tmp/config-prefs.sgml.h:7
-msgid ""
-"\t<para>\n"
-" The <interface>Mail Transports</interface> tab lets you set\n"
-" how you will send mail. Evolution currently supports two\n"
-" mail transport options: <glossterm "
-"linkend=\"smtp\">SMTP</glossterm>, which\n"
-" uses a remote mail server, and\n"
-" <glossterm linkend=\"sendmail\">sendmail</glossterm>, which uses "
-"the\n"
-" <application>sendmail</application> program on your local\n"
-" system. <application>Sendmail</application> is more\n"
-" difficult to configure, but offers more flexibility than\n"
-" <glossterm>SMTP</glossterm>.\n"
-" </para>\n"
-msgstr ""
-"\t<para>\n"
-" La pestaña <interface>Transporte del Correo</interface> le\n"
-" permite especificar como enviará el correo. Evolution\n"
-" actualmente soporta dos tipos de transporte: <glossterm "
-"linkend=\"smtp\">SMTP</glossterm>, el cual usa un\n"
-" servidor de correo remoto, y\n"
-" <glossterm linkend=\"sendmail\">sendmail</glossterm>, el cual usa "
-"el\n"
-" programa <application>sendmail</application> de su sistema "
-"local.\n"
-" <application>Sendmail</application> es más difícil de "
-"configurar,\n"
-" pero ofrece más flexibilidad que\n"
-" <glossterm>SMTP</glossterm>.\n"
-" </para>\n"
-
-#: tmp/config-prefs.sgml.h:19
-msgid ""
-"\t<para>\n"
-" Not everything fits neatly into categories. This tab\n"
-" contains some miscellaneous configurations that don't have\n"
-" too much to do with each other.\n"
-" <variablelist>\n"
-"\n"
-" <varlistentry>\n"
-" <term> \n"
-" <guilabel>Send messages in HTML format</guilabel>\n"
-" </term>\n"
-" <listitem><para>\n"
-" If you check this box, you will send\n"
-" messages as HTML by default. If you leave it unchecked, "
-"your\n"
-" messages will be sent without HTML formatting unless you "
-"select \n"
-" <menuchoice> <guimenu>Format</guimenu> "
-"<guimenuitem>HTML</guimenuitem>\n"
-" </menuchoice> in the message composer.\n"
-" See <xref linkend=\"usage-mail-getnsend-send-html\">\n"
-" for more information about HTML mail.\n"
-" </para></listitem>\n"
-" </varlistentry>\n"
-" <varlistentry>\n"
-" <term> \n"
-" <guilabel>Mark Messages as Seen After</guilabel>\n"
-" </term>\n"
-" <listitem><para> \n"
-" When you click on a message,\n"
-" <application>Evolution</application> will wait a\n"
-" moment before marking it as seen. You can set the\n"
-" delay, in milliseconds, here.\n"
-" </para></listitem>\n"
-" </varlistentry>\n"
-" <varlistentry>\n"
-" <term>\n"
-" <guilabel>Folder Format</guilabel>\n"
-" </term>\n"
-" <listitem> <para> By default,\n"
-" <application>Evolution</application> saves its mail\n"
-" in the\n"
-" <systemitem><filename>mbox</filename></systemitem>\n"
-" format. You can switch to the\n"
-" <systemitem><filename>mh</filename></systemitem>\n"
-" format if you like. Note that this is an advanced\n"
-" feature and may cause you to lose some messages, so\n"
-" you should probably make a backup of your\n"
-" <systemitem><filename>evolution</filename></systemitem>\n"
-" directory first. In addition, it will take quite\n"
-" some time if you have a large mailbox.\n"
-" </para></listitem>\n"
-" </varlistentry>\n"
-" </variablelist>\n"
-" </para>\n"
-msgstr ""
-"\t<para>\n"
-" No todo encaja bien en categorías. Esta parte contiene\n"
-" una miscelánea de configuraciones que no tienen demasiado que ver\n"
-" unas con otras.\n"
-" <variablelist>\n"
-"\n"
-" <varlistentry>\n"
-" <term> \n"
-" <guilabel>Enviar mensajes en formato HMTL</guilabel>\n"
-" </term>\n"
-" <listitem><para>\n"
-" Si selecciona esta opción, enviará sus\n"
-" mensajes en HTML por defecto. Si no la selecciona, sus\n"
-" mensajes se enviarán sin formato HTML a menos que "
-"seleccione \n"
-" <menuchoice> <guimenu>Formato</guimenu> "
-"<guimenuitem>HTML</guimenuitem>\n"
-" </menuchoice> en la ventana de composición de mensajes.\n"
-" Vea <xref linkend=\"usage-mail-getnsend-send-html\">\n"
-" para más información acerca del correo en HTML.\n"
-" </para></listitem>\n"
-" </varlistentry>\n"
-" <varlistentry>\n"
-" <term> \n"
-" <guilabel>Marcar Mensajes como Leídos Pasados</guilabel>\n"
-" </term>\n"
-" <listitem><para> \n"
-" Cuando selecciona un mensaje,\n"
-" <application>Evolution</application> esperará un\n"
-" momento antes de marcarlo como leído. Puede poner el\n"
-" tiempo de espera, en milisegundos, aquí.\n"
-" </para></listitem>\n"
-" </varlistentry>\n"
-" <varlistentry>\n"
-" <term>\n"
-" <guilabel>Formato de Carpeta</guilabel>\n"
-" </term>\n"
-" <listitem> <para> Por defecto,\n"
-" <application>Evolution</application> guarda el correo\n"
-" en el formato\n"
-" <systemitem><filename>mbox</filename></systemitem>.\n"
-" Si quiere puede cambiar al formato\n"
-" <systemitem><filename>mh</filename></systemitem>. Sepa\n"
-" que esta en una característica avanzada y que puede "
-"hacer\n"
-" que pierda algunos mensajes, así que probablemente\n"
-" primero debería hacer una copia de seguridad de su\n"
-" directorio <systemitem><filename>evolution</filename> "
-" </systemitem>\n"
-". Además, llevará bastante tiempo si tiene\n"
-" un mailbox grande.\n"
-" </para></listitem>\n"
-" </varlistentry>\n"
-" </variablelist>\n"
-" </para>\n"
-
-#: tmp/config-prefs.sgml.h:71
-msgid ""
-"\t<para>\n"
-" The <interface>Mail Sources</interface> tab allows you to\n"
-" edit, add, or delete methods of retrieving mail from\n"
-" servers. Clicking on <guibutton>Add</guibutton> or\n"
-" <guibutton>Edit</guibutton> will bring up a dialog box to\n"
-" offer you the following options:\n"
-" <variablelist>\n"
-"\t <varlistentry>\n"
-"\t <term><guilabel>Mail source type:</guilabel></term>\n"
-"\t <listitem>\n"
-"\t\t<para>\n"
-" Select from <glossterm\n"
-" linkend=\"imap\">IMAP</glossterm> or <glossterm\n"
-" linkend=\"pop\">POP</glossterm> servers, or Unix-style\n"
-" <systemitem><filename>mbox</filename></systemitem>\n"
-" or <systemitem><filename>mh</filename></systemitem>\n"
-" files.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\t <varlistentry>\n"
-"\t <term> <guilabel>Server:</guilabel></term>\n"
-"\t <listitem>\n"
-"\t\t<para>\n"
-" Enter the name of the mail source server in this\n"
-" field. If you use an may or may not be the same as your\n"
-" <glossterm linkend=\"smtp\">SMTP</glossterm> server.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\t <varlistentry>\n"
-"\t <term><guilabel>Username:</guilabel></term>\n"
-"\t <listitem>\n"
-"\t\t<para>\n"
-" Enter the user name for the account you have on the\n"
-" server-- this should the part of your email address\n"
-" before the @. If you use\n"
-" <systemitem><filename>mbox</filename></systemitem>\n"
-" or <systemitem><filename>mh</filename></systemitem>\n"
-" files as your mail source, you do not need to enter\n"
-" a username.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\t <varlistentry>\n"
-"\t <term><guilabel>Authentication:</guilabel></term>\n"
-"\t <listitem>\n"
-"\t\t<para>\n"
-" Tell <application>Evolution</application> how to\n"
-" verify your identity with the server. Your options\n"
-" vary depending upon the type of server you are\n"
-" using, and the ways it is configured. Given the\n"
-" name of a server,\n"
-" <application>Evolution</application> can detect what\n"
-" sorts of authentication it offers.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\t <varlistentry>\n"
-"\t <term><guilabel>Test Settings</guilabel></term>\n"
-"\t <listitem>\n"
-"\t\t<para>\n"
-" Click this button to have\n"
-" <application>Evolution</application> check to see if\n"
-" mail sources are configured correctly.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\t </variablelist>\n"
-" </para>\n"
-msgstr ""
-"\t<para>\n"
-" La pestaña <interface>Fuentes de Correo</interface> le permite\n"
-" editar, añadir, o borrar métodos de obtener el correo de los\n"
-" servidores. Pulsando en <guibutton>Añadir</guibutton> o\n"
-" <guibutton>Editar</guibutton> aparecerá una caja de diálogo que\n"
-" le ofrecerá las siguientes opciones:\n"
-" <variablelist>\n"
-"\t <varlistentry>\n"
-"\t <term><guilabel>Tipo de Fuente de Correo:</guilabel></term>\n"
-"\t <listitem>\n"
-"\t\t<para>\n"
-" Seleccione entre servidores <glossterm\n"
-" linkend=\"imap\">IMAP</glossterm> o <glossterm\n"
-" linkend=\"pop\">POP</glossterm>, o archivos tipo\n"
-" <systemitem><filename>mbox</filename></systemitem>\n"
-" o <systemitem><filename>mh</filename></systemitem>\n"
-" al estilo Unix.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\t <varlistentry>\n"
-"\t <term> <guilabel>Servidores:</guilabel></term>\n"
-"\t <listitem>\n"
-"\t\t<para>\n"
-" Introduzca el nombre del servidor de su fuente de correo\n"
-" en este campo. Si usa puede o no que sea el mismo que su\n"
-" servidor <glossterm linkend=\"smtp\">SMTP</glossterm>.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\t <varlistentry>\n"
-"\t <term><guilabel>Nombre de usuario:</guilabel></term>\n"
-"\t <listitem>\n"
-"\t\t<para>\n"
-" Introduzca el nombre para la cuenta que tiene en el\n"
-" servidor-- este debería ser la parte de delante de la @\n"
-" de su dirección de correo. Si usa archivos\n"
-" <systemitem><filename>mbox</filename></systemitem>\n"
-" o <systemitem><filename>mh</filename></systemitem>\n"
-" como fuentes de correo, no necesita escribir un nombre de\n"
-" usuario.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\t <varlistentry>\n"
-"\t <term><guilabel>Autentificación:</guilabel></term>\n"
-"\t <listitem>\n"
-"\t\t<para>\n"
-" Diga a <application>Evolution</application> como\n"
-" verificar su identidad con el servidor. Sus opciones\n"
-" varían dependiendo del tipo de servidor que esté usando,\n"
-" y de la forma en que esté configurado. Dado el nombre "
-"del\n"
-" servidor,\n"
-" <application>Evolution</application> puede detectar que\n"
-" tipos de autentificación ofrece.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\t <varlistentry>\n"
-"\t <term><guilabel>Probar Configuración</guilabel></term>\n"
-"\t <listitem>\n"
-"\t\t<para>\n"
-" Pulse este botón para que\n"
-" <application>Evolution</application> compruebe si sus\n"
-" fuentes de correo están configuradas correctamente.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\t </variablelist>\n"
-" </para>\n"
-
-#: tmp/config-prefs.sgml.h:142
-msgid ""
-"\t<para>\n"
-" To set the behavior of your Contact Manager, click on the\n"
-" <guibutton>Contact Manager</guibutton> tab in the\n"
-" <interface>Preferences</interface> window.\n"
-" </para>\n"
-msgstr ""
-"\t<para>\n"
-" Para fijar el comportamiento de su Administrador de Contactos,\n"
-" pulse en la pestaña\n"
-" <guibutton>Administrador de Contactos</guibutton> en la ventana "
-"de\n"
-" <interface>Preferencias</interface>.\n"
-" </para>\n"
-
-#: tmp/config-prefs.sgml.h:148
-msgid ""
-"\t<para>\n"
-" You can set the following options: <!--insert variable list\n"
-" here-->\n"
-" </para>\n"
-msgstr ""
-"\t<para>\n"
-" Ha definido las siguientes opciones: <!--insertar aquí una lista\n"
-" de variables-->\n"
-" </para>\n"
-
-#: tmp/config-prefs.sgml.h:153
-msgid "\t<title>Mail Preferences Dialog</title>\n"
-msgstr "\t<title>Dialogo de Preferencias del Correo</title>\n"
-
-#: tmp/config-prefs.sgml.h:155
-msgid "\t<title>Mail Sources</title>\n"
-msgstr "\t<title>Fuentes del Correo</title>\n"
-
-#: tmp/config-prefs.sgml.h:157
-msgid "\t<title>Mail Transports</title>\n"
-msgstr "\t<title>Transportes del Correo</title>\n"
-
-#: tmp/config-prefs.sgml.h:159
-msgid "\t<title>Other Mail Preferences</title>\n"
-msgstr "\t<title>Otras Preferencias del Correo</title>\n"
-
-#: tmp/config-prefs.sgml.h:161
-msgid ""
-" <para>\n"
-" To add a new LDAP server to your available contact\n"
-" folders, select <menuchoice> <guimenu>Actions</guimenu>\n"
-" <guimenuitem>New Directory Server</guimenuitem>\n"
-" </menuchoice>. This brings up a small dialog box which\n"
-" will let you enter the following options:\n"
-" <itemizedlist>\n"
-"\t <listitem><para>\n"
-" <guilabel>Name</guilabel> &mdash; any name you choose "
-"for the server.\n"
-" </para></listitem>\n"
-"\n"
-" <listitem><para>\n"
-" <guilabel>Description</guilabel> &mdash; a longer "
-"description of the server.\n"
-" </para></listitem>\n"
-"\n"
-" <listitem><para>\n"
-" <guilabel>LDAP Server</guilabel> &mdash; the network "
-"address of the server.\n"
-" </para></listitem> \n"
-" \n"
-" <listitem><para>\n"
-" <guilabel>Port Number</guilabel> &mdash; by default, the "
-"port number is 389.\n"
-" </para></listitem>\n"
-"\n"
-" <listitem><para>\n"
-" <guilabel>Root DN</guilabel> &mdash; enter the root DN "
-"here.\n"
-" </para></listitem>\n"
-" </itemizedlist>\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Para añadir un nuevo servidor LDAP a su carpeta de contactos\n"
-" disponibles, selección "
-"<menuchoice><guimenu>Acciones</guimenu>\n"
-" <guimenuitem>Nuevo Servidor de Directorio</guimenuitem>\n"
-" </menuchoice>. Esto mostrará una pequeña caja de diálogo que\n"
-" le permitirá introducir los siguientes datos:\n"
-" <itemizedlist>\n"
-"\t <listitem><para>\n"
-" <guilabel>Nombre</guilabel> &mdash; cualquier nombre que "
-"elija para el servidor.\n"
-" </para></listitem>\n"
-"\n"
-" <listitem><para>\n"
-" <guilabel>Descripción</guilabel> &mdash; un descripción "
-"larga del servidor.\n"
-" </para></listitem>\n"
-"\n"
-" <listitem><para>\n"
-" <guilabel>Servidor LDAP</guilabel> &mdash; la dirección "
-"de red del servidor.\n"
-" </para></listitem> \n"
-" \n"
-" <listitem><para>\n"
-" <guilabel>Puerto</guilabel> &mdash; por defecto, el "
-"puerto es el 389.\n"
-" </para></listitem>\n"
-"\n"
-" <listitem><para>\n"
-" <guilabel>DN Raíz</guilabel> &mdash; entre el DN raíz "
-"aquí.\n"
-" </para></listitem>\n"
-" </itemizedlist>\n"
-" </para>\n"
-
-#: tmp/config-prefs.sgml.h:190
-msgid " <title>Adding Directory Servers</title>\n"
-msgstr " <title>Añadiendo Servidores de Directorio</title>\n"
-
-#: tmp/config-prefs.sgml.h:192
-msgid ""
-" <para>\n"
-" Click <guibutton>Add</guibutton> to add a news server; you\n"
-" will be prompted for its name. Enter the name, click\n"
-" <guibutton>OK</guibutton>, and you're done. You can have\n"
-" as many mail servers as you like, of course. News servers\n"
-" will appear next to your IMAP servers in the\n"
-" <interface>folder bar</interface>.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Pulse <guibutton>Añadir</guibutton> para añadir un servidor de\n"
-" noticias, será preguntado por su nombre. Introduzca el nombre,\n"
-" pulse <guibutton>ACEPTAR</guibutton>, y ya está. Naturalmente, "
-"puede\n"
-" tener tantos servidores de noticias como desee. Los servidores\n"
-" de noticias aparecerán detrás de sus servidores IMAP en la\n"
-" <interface>barra de carpetas</interface>.\n"
-" </para>\n"
-
-#: tmp/config-prefs.sgml.h:201
-msgid ""
-" <para>\n"
-" If you have several mail sources, clicking <guibutton>Get\n"
-" Mail</guibutton> will refresh any IMAP,\n"
-" <systemitem><filename>mh</filename></systemitem>, or\n"
-" <systemitem><filename>mbox</filename></systemitem>\n"
-" listings and check and download mail from all POP servers.\n"
-" In other words, <guibutton>Get Mail</guibutton> gets your\n"
-" mail, no matter how many sources you have, or what types\n"
-" they are.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Si tiene varias fuentes de correo, pulsando <guibutton>\n"
-" Obtener</guibutton> actualizará cualquier carpeta IMAP,\n"
-" <systemitem><filename>mh</filename></systemitem>, o\n"
-" <systemitem><filename>mbox</filename></systemitem>\n"
-" y comprobará y descargará el correo de todos los servidores "
-"POP.\n"
-" En otras palabras, <guibutton>Obtener</guibutton> obtiene su\n"
-" correo, sin importar cuantas fuentes tenga, o de que tipo sean.\n"
-" </para>\n"
-
-#: tmp/config-prefs.sgml.h:212
-msgid ""
-" <para>\n"
-" Newsgroups are so much like mailing lists that there's no\n"
-" reason not to keep them right next to your mail. When you\n"
-" first select the <guilabel>News Servers</guilabel> tab,\n"
-" you will see a blank box with the three familiar buttons\n"
-" on the right: <guibutton>Add</guibutton>,\n"
-" <guibutton>Edit</guibutton>, and\n"
-" <guibutton>Delete</guibutton>.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Los grupos de noticias se parecen tanto a listas de correo que\n"
-" no hay ninguna razón para no tenerlos al lado de su correo. La\n"
-" primera vez que seleccione la pestaña <guilabel>Servidor de\n"
-" Noticias</guilabel>, verá una caja vacía con tres botones ya\n"
-" familiares a la derecha: <guibutton>Añadir</guibutton>,\n"
-" <guibutton>Editar</guibutton>, y\n"
-" <guibutton>Borrar</guibutton>.\n"
-" </para>\n"
-
-#: tmp/config-prefs.sgml.h:222
-msgid " <title>News Servers</title>\n"
-msgstr " <title>Servidores de Noticias</title>\n"
-
-#: tmp/config-prefs.sgml.h:224
-msgid ""
-" <para>\n"
-" <application>Evolution</application> can attempt to\n"
-" determine if you have entered a valid server name. To\n"
-" have it do so, click the <guilabel>Test\n"
-" Settings</guilabel> button.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" <application>Evolution</application> puede intentar\n"
-" determinar si ha introducido un nombre de servidor válido. "
-"Para\n"
-" que lo haga, pulse el botón <guilabel>Comprobar\n"
-" Configuración</guilabel>.\n"
-" </para>\n"
-
-#: tmp/config-prefs.sgml.h:231
-msgid " <title>Mail Settings</title>\n"
-msgstr " <title>Configuración del Correo</title>\n"
-
-#: tmp/config-prefs.sgml.h:233
-msgid ""
-" <para>\n"
-" To change your mail settings, select <menuchoice>\n"
-" <guimenu>Settings</guimenu> <guimenuitem>Mail\n"
-" configuration</guimenuitem></menuchoice> in the Inbox. This\n"
-" will open the <interface>mail preferences window</interface>,\n"
-" illustrated in <xref linkend=\"config-prefs-mail-fig\">. Mail\n"
-" preferences are separated into several categories:\n"
-" <variablelist>\n"
-"\t<varlistentry>\n"
-" <term><guilabel>Identities</guilabel></term>\n"
-" <listitem>\n"
-"\t <para>\n"
-" This allows you to create and alter one or more\n"
-" identities for your email.\n"
-"\t </para>\n"
-"\t </listitem>\n"
-"\t</varlistentry>\n"
-"\t<varlistentry>\n"
-"\t <term><guilabel>Sources</guilabel></term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" This tab lets you tell\n"
-" <application>Evolution</application> where to get the\n"
-" mail sent to you, and how to get it.\n"
-" </para>\n"
-" </listitem>\n"
-"\t</varlistentry>\n"
-"\t<varlistentry>\n"
-"\n"
-"\t <term><guilabel>Mail Transport</guilabel></term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" This tab lets you tell\n"
-" <application>Evolution</application> how to send mail.\n"
-" </para>\n"
-" </listitem>\n"
-"\t</varlistentry>\n"
-"\n"
-"\t<varlistentry>\n"
-"\t <term><guilabel>News Servers</guilabel></term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" If you would like to use\n"
-" <application>Evolution</application> to read newsgroups,\n"
-" you can specify your news server preferences here.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t</varlistentry>\n"
-"\n"
-"\t<varlistentry>\n"
-"\t <term><guilabel>Other</guilabel></term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" Miscellaneous mail and news settings, such as HTML\n"
-" handling preferences, and how long\n"
-" <application>Evolution</application> should wait before\n"
-" marking a message read.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t</varlistentry>\n"
-" </variablelist>\n"
-"\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Para cambiar su configuración de correo, seleccione <menuchoice>\n"
-" <guimenu>Configuración</guimenu> <guimenuitem>Configuración\n"
-" de correo</guimenuitem></menuchoice> estando en Inbox. Esto\n"
-" abrirá la <interface>ventana de preferencias del "
-"correo</interface>,\n"
-" ilustrada en <xref linkend=\"config-prefs-mail-fig\">. Las\n"
-" preferencias de correo están separadas en varias categorías:\n"
-" <variablelist>\n"
-"\t<varlistentry>\n"
-" <term><guilabel>Identidades</guilabel></term>\n"
-" <listitem>\n"
-"\t <para>\n"
-" Esto le permite crear o alterar una o más identidades para\n"
-" su correo electrónico.\n"
-"\t </para>\n"
-"\t </listitem>\n"
-"\t</varlistentry>\n"
-"\t<varlistentry>\n"
-"\t <term><guilabel>Fuentes</guilabel></term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" Esta pestaña le permite indicar a\n"
-" <application>Evolution</application> de donde obtener el\n"
-" correo que le envíen y como obtenerlo.\n"
-" </para>\n"
-" </listitem>\n"
-"\t</varlistentry>\n"
-"\t<varlistentry>\n"
-"\n"
-"\t <term><guilabel>Transporte de Correo</guilabel></term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" Esta pestaña le permite indicar a\n"
-" <application>Evolution</application> como enviar su correo.\n"
-" </para>\n"
-" </listitem>\n"
-"\t</varlistentry>\n"
-"\n"
-"\t<varlistentry>\n"
-"\t <term><guilabel>Servidores de Noticias</guilabel></term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" Si quisiera usar <application>Evolution</application> para\n"
-" leer los grupos de noticias, puede especificar aquí las\n"
-" características de su servidor de noticias..\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t</varlistentry>\n"
-"\n"
-"\t<varlistentry>\n"
-"\t <term><guilabel>Otros</guilabel></term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" Configuración miscelánea para el correo y las noticias, como\n"
-" el uso de HTML, y cuanto tiempo debe esperar\n"
-" <application>Evolution</application> antes de marcar un\n"
-" mensaje como leído.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t</varlistentry>\n"
-" </variablelist>\n"
-"\n"
-" </para>\n"
-
-#: tmp/config-prefs.sgml.h:297
-msgid ""
-" <para>\n"
-" To set your calendar preferences, select\n"
-" <menuchoice><guimenu>Settings</guimenu>\n"
-" <guimenuitem>Calendar\n"
-" Configuration</guimenuitem></menuchoice> from the Calendar\n"
-" view. This will open up the\n"
-" <interface>Preferences</interface> window. It contains four\n"
-" tabs: <guilabel>Time display</guilabel>,\n"
-" <guilabel>Colors</guilabel>, <guilabel>To Do List</guilabel>\n"
-" and <guilabel>Alarms</guilabel>. The <interface>calendar\n"
-" preferences window</interface> is illustrated in <xref\n"
-" linkend=\"config-prefs-cal-fig\">.\n"
-"\n"
-" <!-- ==============Figure===================== -->\n"
-" <figure id=\"config-prefs-cal-fig\">\n"
-"\t<title>Calendar Preferences Dialog</title>\n"
-"\t<screenshot>\n"
-"\t <screeninfo>If this worked on my job as well as my "
-"calendar...</screeninfo>\n"
-"\t <graphic fileref=\"fig/config-cal\" format=\"png\" srccredit=\"Aaron "
-"Weber\">\n"
-"\t </graphic>\n"
-"\t</screenshot>\n"
-" </figure>\n"
-" <!-- ==============End of Figure================-->\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Para especificar sus preferencias sobre el calendario, selección\n"
-" <menuchoice><guimenu>Configuraciones</guimenu>\n"
-" <guimenuitem>Configuración del\n"
-" Calendario</guimenuitem></menuchoice> desde la vista del\n"
-" calendario. Esto abrirá la ventana de\n"
-" <interface>Preferencias</interface>. Contiene cuatro pestañas:\n"
-" <guilabel>Vista del tiempo</guilabel>,\n"
-" <guilabel>Colores</guilabel>, <guilabel>Lista de "
-"Tareas</guilabel>\n"
-" y <guilabel>Alarmas</guilabel>. La <interface>ventana de\n"
-" preferencias del calendario</interface> está ilustrada en <xref\n"
-" linkend=\"config-prefs-cal-fig\">.\n"
-"\n"
-" <!-- ==============Figure===================== -->\n"
-" <figure id=\"config-prefs-cal-fig\">\n"
-"\t<title>Diálogo de Preferencias del Calendario</title>\n"
-"\t<screenshot>\n"
-"\t <screeninfo>Si esto funcionase en mi trabajo también como en mi "
-"calendario...</screeninfo>\n"
-"\t <graphic fileref=\"fig/config-cal\" format=\"png\" srccredit=\"Aaron "
-"Weber\">\n"
-"\t </graphic>\n"
-"\t</screenshot>\n"
-" </figure>\n"
-" <!-- ==============End of Figure================-->\n"
-" </para>\n"
-
-#: tmp/config-prefs.sgml.h:322
-msgid ""
-" <para>\n"
-" To add a new identity, simply click\n"
-" <guibutton>Add</guibutton>. To alter an existing identity,\n"
-" click on it in the <guilabel>Identity</guilabel> tab of the\n"
-" <interface>Preferences</interface> window, and then click\n"
-" <guibutton>Edit</guibutton>.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Para añadir una nueva identidad, simplemente pulse\n"
-" <guibutton>Añadir</guibutton>. Para modificar una identidad\n"
-" ya existente, seleccione la de la pestaña\n"
-" <guilabel>Identidad</guilabel> de la ventana de\n"
-" <interface>Preferencias</interface>, y pulse\n"
-" <guibutton>Editar</guibutton>.\n"
-" </para>\n"
-
-#: tmp/config-prefs.sgml.h:330
-msgid " <title>Configuring the Calendar</title>\n"
-msgstr " <title>Configuración del Calendario</title>\n"
-
-#: tmp/config-prefs.sgml.h:332
-msgid " <!-- ==============End of Figure================-->\n"
-msgstr " <!-- ==============End of Figure================-->\n"
-
-#: tmp/config-prefs.sgml.h:334
-msgid " <!-- ==============Figure===================== -->\n"
-msgstr " <!-- ==============Figure===================== -->\n"
-
-#: tmp/config-prefs.sgml.h:336
-msgid ""
-" <para>\n"
-" <application>Evolution</application> will then present you\n"
-" with a dialog box containing four fields:\n"
-" <itemizedlist>\n"
-" <listitem>\n"
-"\t <para>\n"
-" <guilabel>Full Name:</guilabel> by default, this is the\n"
-" same name as the full name described in your user\n"
-" account on your computer. You can select another if you\n"
-" wish.\n"
-" </para>\n"
-"\t </listitem>\n"
-" <listitem>\n"
-"\t <para>\n"
-" <guilabel>Email address:</guilabel> Enter your email\n"
-" address in this space.\n"
-" </para>\n"
-"\t </listitem>\n"
-" <listitem>\n"
-"\t <para>\n"
-" <guilabel>Organization:</guilabel> If you send email as\n"
-" a representative of a company or other organization,\n"
-" enter its name here.\n"
-" </para>\n"
-"\t </listitem>\n"
-" <listitem>\n"
-"\t <para>\n"
-" <guilabel>Signature file:</guilabel> You may choose a\n"
-" small text file to be appended to every message that you\n"
-" send. Typically, signature files include address or\n"
-" other contact information, or a favorite quotation.\n"
-" It's good form to keep it to four lines at the maximum.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t</itemizedlist>\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" <application>Evolution</application> le presentará una caja de\n"
-" dialogo que contiene cuatro campos:\n"
-" <itemizedlist>\n"
-" <listitem>\n"
-"\t <para>\n"
-" <guilabel>Nombre Completo:</guilabel> por defecto, este es el\n"
-" mismo nombre que el nombre completo descrito en su cuenta de\n"
-" usuario en su ordenador. Puede seleccionar otro si lo desea.\n"
-" </para>\n"
-"\t </listitem>\n"
-" <listitem>\n"
-"\t <para>\n"
-" <guilabel>Dirección de Correo:</guilabel> Escriba su "
-"dirección\n"
-" de correo en este espacio.\n"
-" </para>\n"
-"\t </listitem>\n"
-" <listitem>\n"
-"\t <para>\n"
-" <guilabel>Organización:</guilabel> Si envía mensajes en\n"
-" representación de una compañía u otra organización,\n"
-" escriba aquí el nombre de la misma.\n"
-" </para>\n"
-"\t </listitem>\n"
-" <listitem>\n"
-"\t <para>\n"
-" <guilabel>Archivo de Firma:</guilabel> Puede elegir un\n"
-" pequeño archivo de texto para que sea añadido a todos los\n"
-" mensajes que mande. Típicamente, los archivos de firma\n"
-" incluyen la dirección u otra información de contacto, o su\n"
-" cita preferida. Es una buena costumbre hacer que no tenga\n"
-" más de cuatro líneas.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t</itemizedlist>\n"
-" </para>\n"
-
-#: tmp/config-prefs.sgml.h:373
-msgid ""
-" <para>\n"
-" If you have only one email account, or send email from only\n"
-" one address, you will only need to configure one identity. If\n"
-" you want, however, you can have multiple identities. This\n"
-" can be useful if you want to keep personal and professional\n"
-" email separate, or if you wear several hats at work.\n"
-" \n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Si solo tiene una cuenta de correo, o envía el correo desde una\n"
-" sola dirección, tan solo deberá configurar una identidad. De todos\n"
-" modos, si quiere puede tener múltiples identidades. Esto puede\n"
-" resultar útil si quiere mantener separados su correo personal y\n"
-" profesional, o si tiene varios puestos en su trabajo.\n"
-" \n"
-" </para>\n"
-
-#: tmp/config-prefs.sgml.h:382
-msgid ""
-" <para>\n"
-" In order to send mail with\n"
-" <application>Evolution</application>, you need to connect to\n"
-" your network. To do that, you'll need to know your user name\n"
-" and password, what sort of mail sending and receiving\n"
-" protocols your network uses, and the names of the servers\n"
-" you'll be using. If you're switching from another groupware\n"
-" or email program, you can almost certainly use the same\n"
-" settings as you did with that program. Network-related\n"
-" settings are in the <guilabel>Mail Sources</guilabel> and\n"
-" <guilabel>Mail Transport</guilabel> tabs.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Para enviar correo con\n"
-" <application>Evolution</application>, deberá conectarse a la red.\n"
-" Para hacer esto deberá conocer su nombre de usuario y su clave, que\n"
-" tipo de protocolos de recepción y envío usa su red, y los nombres\n"
-" de los servidores que va a usar. Si está migrando desde otro\n"
-" programa de trabajo en grupo o de correo, casi con toda seguridad\n"
-" podrá usar la misma configuración que en dicho programa. La\n"
-" configuración relacionada con la Red se encuentra en las pestañas\n"
-" <guilabel>Fuentes de Correo</guilabel> y\n"
-" <guilabel>Transportes de Correo</guilabel>.\n"
-" </para>\n"
-
-#: tmp/config-prefs.sgml.h:395
-msgid ""
-" <para>\n"
-" Perhaps your mail server has changed names. Perhaps you've\n"
-" grown tired of a certain layout for your appointments.\n"
-" Whatever the reason, you want to change your\n"
-" <application>Evolution</application> settings. This chapter\n"
-" will tell you how to do just that.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Quizá su servidor de correo ha cambiado de nombre. Quizá se ha\n"
-" cansado de cierto aspecto de la configuración de sus citas.\n"
-" Cualquiera que sea la razón, usted quiere cambiar su configuración\n"
-" de <application>Evolution</application>. Este capítulo le\n"
-" dirá como hacer exactamente eso.\n"
-" </para>\n"
-
-#: tmp/config-prefs.sgml.h:403
-msgid ""
-" <para>\n"
-" The <guilabel>Time display</guilabel> tab lets you set the\n"
-" following:\n"
-" <variablelist>\n"
-"\t <varlistentry>\n"
-"\t <term>Time format</term>\n"
-"\t <listitem>\n"
-"\t <para>You may choose between twelve-hour (AM/PM) and\n"
-"\t twenty-four hour time formats here by clicking the\n"
-"\t appropriate radio button.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\t <varlistentry>\n"
-"\t <term>Weeks start on</term>\n"
-"\t <listitem>\n"
-"\t <para>You can set weeks to start on Sunday or on Monday.</para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\t <varlistentry>\n"
-"\t <term>Day range</term>\n"
-"\t <listitem>\n"
-" <para>\n"
-" When does your work day start, and when does it end?\n"
-" In the day and week views,\n"
-" <application>Evolution</application> displays all the\n"
-" hours in the range you select here, even if there are\n"
-" no appointments for those times. Of course, you can\n"
-" still schedule an appointment outside of these hours,\n"
-" and if you do, the display will be extended to show\n"
-" it.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\t</variablelist>\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" La pestaña <guilabel>mostrar el Tiempo</guilabel> le permite\n"
-" configurar lo siguiente:\n"
-" <variablelist>\n"
-"\t <varlistentry>\n"
-"\t <term>Formato del tiempo</term>\n"
-"\t <listitem>\n"
-"\t <para>Puede elegir aquí entre los formatos de doce horas (AM/PM) y\n"
-"\t de veinticuatro horas simplemente pulsando sobre el botón "
-"apropiado.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\t <varlistentry>\n"
-"\t <term>La semana comienza</term>\n"
-"\t <listitem>\n"
-"\t <para>Puede fijar que las semanas comiencen en Domingos o en "
-" Lunes.</para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\t <varlistentry>\n"
-"\t <term>Rango diario</term>\n"
-"\t <listitem>\n"
-" <para>\n"
-" ¿Cuando comienza u jornada laboral y cuando termina?\n"
-" En la vista diaria y semanal,\n"
-" <application>Evolution</application> muestra todas las\n"
-" horas del rango que seleccione aquí, incluso si no hay\n"
-" citas a esas horas. Naturalmente, podrá poner una cita\n"
-" fuera de estas horas, y si lo hace, la vista se extenderá\n"
-" para mostrarla.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\t</variablelist>\n"
-" </para>\n"
-
-#: tmp/config-prefs.sgml.h:440
-msgid ""
-" <para>\n"
-" The <interface>colors tab</interface> allows you to decide\n"
-" what color your calendar will be. The tab consists of a\n"
-" sample calendar on the right and a list of ten items that can\n"
-" be colored in different ways. If you click on the color\n"
-" button to the right of each item, you will bring up a\n"
-" color-selector window where you can choose to alter that\n"
-" color. By clicking <guibutton>OK</guibutton> in the color\n"
-" selection dialog, you can see the results of the color on the\n"
-" sample calendar.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" La pestaña de <interface>colores</interface> le permite decidir\n"
-" de que color será su calendario. La pestaña consiste en un\n"
-" calendario de ejemplo a la derecha y de una lista de diez elementos\n"
-" que pueden ser coloreados en diferentes formas. Si pulsa en botón\n"
-" de color a la derecha de cada elemento, mostrará una ventana de\n"
-" selección de color donde podrá elegir a que color cambiar el\n"
-" elemento. Pulsando <guibutton>ACEPTAR</guibutton> en el diálogo de\n"
-" selección de colores, puede ver os resultados de los colores en el\n"
-" calendario de ejemplo.\n"
-" </para>\n"
-
-#: tmp/config-prefs.sgml.h:452
-msgid ""
-" <para> \n"
-" The <interface>alarms tab</interface> enables you to select from "
-"three boxes:\n"
-" <itemizedlist>\n"
-"\t <listitem>\n"
-"\t <para><guilabel>Beep on display alarms</guilabel>: select\n"
-"\t this box to have <application>Evolution</application> beep\n"
-"\t at you for any alarms you have set. If you leave this box\n"
-"\t unchecked, <application>Evolution</application> will only\n"
-"\t alert you to events by opening a dialog box. These beeps\n"
-"\t are distinct from full-fledged audio alarms.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t <listitem>\n"
-"\t <para><guilabel>Audio alarms timeout after: </guilabel>\n"
-"\t Select this button to have your audio alarms stop\n"
-"\t automatically after a certain number of seconds. </para>\n"
-"\t </listitem>\n"
-"\t <listitem>\n"
-"\t <para><guilabel>Enable snoozing for:</guilabel> If you\n"
-"\t would like to have the option to tell\n"
-"\t <application>Evolution</application> to repeat an alarm in\n"
-"\t a few minutes, select this button and decide how long\n"
-"\t you'd like it to wait.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t</itemizedlist> \n"
-" </para>\n"
-msgstr ""
-" <para> \n"
-" La pestaña de <interface>alarmas</interface> le da la posibilidad de "
-"elegir entre tres opciones:\n"
-" <itemizedlist>\n"
-"\t <listitem>\n"
-"\t <para><guilabel>Pitar al mostrar las alarmas</guilabel>: seleccione\n"
-"\t esta opción para que <application>Evolution</application> emita un\n"
-"\t pitido para la alarma que haya fijado. Si deja esta opción sin\n"
-"\t marcar, <application>Evolution</application> tan solo le alertará de\n"
-"\t los sucesos abriendo un ventana de diálogo. Estos pitidos son\n"
-"\t distintos a los de las alarmas auditivas.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t <listitem>\n"
-"\t <para><guilabel>Las alarmas auditivas cesan tras: </guilabel>\n"
-"\t Seleccione esta opción para que las alarmas auditivas cesen\n"
-"\t automáticamente pasados un número determinado de segundos. </para>\n"
-"\t </listitem>\n"
-"\t <listitem>\n"
-"\t <para><guilabel>Activar recordatorio para:</guilabel> Si quiere\n"
-"\t tener la posibilidad de decirle a\n"
-"\t <application>Evolution</application> que repita la alarma en unos\n"
-"\t minutos, elija esta opción y decida cuanto tiempo quiere que espere\n"
-"\t antes de repetirla.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t</itemizedlist> \n"
-" </para>\n"
-
-#: tmp/config-prefs.sgml.h:480
-msgid " <title>Advanced Configuration</title>\n"
-msgstr " <title>Configuración Avanzada</title>\n"
-
-#: tmp/config-prefs.sgml.h:482
-msgid " <title>Alarms Settings</title>\n"
-msgstr " <title>Colocación de Alarmas</title>\n"
-
-#: tmp/config-prefs.sgml.h:484
-msgid " <title>Calendar Colors</title>\n"
-msgstr " <title>Colores del Calendario</title>\n"
-
-#: tmp/config-prefs.sgml.h:486
-msgid " <title>Identity Settings</title> \n"
-msgstr " <title>Configuración de Identidades</title> \n"
-
-#: tmp/config-prefs.sgml.h:488
-msgid " <title>Managing the Contact Manager</title>\n"
-msgstr " <title>Administrando el Administrador de Contactos</title>\n"
-
-#: tmp/config-prefs.sgml.h:490
-msgid " <title>Network Settings</title> \n"
-msgstr " <title>Configuración de la Red</title> \n"
-
-#: tmp/config-prefs.sgml.h:492
-msgid " <title>Time Display Settings</title>\n"
-msgstr " <title>Configuración de las Vistas del Tiempo</title>\n"
-
-#: tmp/config-prefs.sgml.h:494
-msgid " <title>To Do List Settings</title>\n"
-msgstr " <title>Configuración de la Lista de Tareas Por-Hacer</title>\n"
-
-#: tmp/config-prefs.sgml.h:496
-msgid ""
-" <para>\n"
-" You can choose what information the To Do list displays and the\n"
-" way it is displayed. The two areas of the <interface>To Do\n"
-" List</interface> tab offer several options each:\n"
-" <variablelist>\n"
-"\t <varlistentry>\n"
-"\t <term>Show on To Do List</term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" This box contains three items. If you select the\n"
-" check boxes next to them, that information will appear\n"
-" in the To Do list for each task it contains:\n"
-" <itemizedlist>\n"
-" <listitem>\n"
-"\t\t <para><guilabel>Due Date</guilabel></para>\n"
-" </listitem>\n"
-" <listitem>\n"
-"\t\t <para><guilabel>Time Until Due</guilabel></para>\n"
-" </listitem>\n"
-" <listitem>\n"
-"\t\t <para><guilabel>Priority</guilabel></para>\n"
-" </listitem>\n"
-" </itemizedlist>\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\t <varlistentry>\n"
-"\t <term>Style Options</term>\n"
-"\t <listitem>\n"
-" <para>\n"
-" Select among the following checkboxes to determine\n"
-" how your To Do list will look:\n"
-" <itemizedlist>\n"
-" <listitem>\n"
-"\t\t <para><guilabel>Highlight overdue items</guilabel></para>\n"
-" </listitem>\n"
-" <listitem>\n"
-"\t\t <para><guilabel>Highlight items due today</guilabel></para>\n"
-" </listitem>\n"
-" <listitem>\n"
-"\t\t <para><guilabel>Highlight not yet due items</guilabel></para>\n"
-" </listitem>\n"
-" </itemizedlist> \n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\t</variablelist>\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Puede elegir que información muestra la lista Por Hacer y la manera\n"
-" como la muestra. Las dos áreas de la pestaña <interface>Lista Por\n"
-" Hacer</interface> ofrecen varias opciones cada una:\n"
-" <variablelist>\n"
-"\t <varlistentry>\n"
-"\t <term>Mostrar en la Lista Por Hacer</term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" Esta opción contiene tres elementos. Si marca las casillas\n"
-" a su lado, esa información aparecerá en la lista Por Hacer\n"
-" para cada tarea que contenga:\n"
-" <itemizedlist>\n"
-" <listitem>\n"
-"\t\t <para><guilabel>Fecha de Plazo</guilabel></para>\n"
-" </listitem>\n"
-" <listitem>\n"
-"\t\t <para><guilabel>Tiempo hasta el Plazo</guilabel></para>\n"
-" </listitem>\n"
-" <listitem>\n"
-"\t\t <para><guilabel>Prioridad</guilabel></para>\n"
-" </listitem>\n"
-" </itemizedlist>\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\t <varlistentry>\n"
-"\t <term>Opciones de Estilo</term>\n"
-"\t <listitem>\n"
-" <para>\n"
-" Seleccione entre las siguientes casillas para determinar\n"
-" que aspecto tendrá la lista Por Hacer:\n"
-" <itemizedlist>\n"
-" <listitem>\n"
-"\t\t <para><guilabel>Resaltar elementos fuera de plazo</guilabel></para>\n"
-" </listitem>\n"
-" <listitem>\n"
-"\t\t <para><guilabel>Resaltar elementos de plazo hoy</guilabel></para>\n"
-" </listitem>\n"
-" <listitem>\n"
-"\t\t <para><guilabel>Resaltar elementos dentro del "
-"plazo</guilabel></para>\n"
-" </listitem>\n"
-" </itemizedlist> \n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\t</variablelist>\n"
-" </para>\n"
-
-#: tmp/config-prefs.sgml.h:545
-msgid ""
-" <para>The display elements whose color you can set are:\n"
-"\n"
-" <itemizedlist>\n"
-" <listitem>\n"
-" <para>\n"
-" <guilabel>Outline:</guilabel> The lines between days\n"
-" and at the top of the display.\n"
-" </para>\n"
-" </listitem>\n"
-"\n"
-" <listitem>\n"
-" <para> <guilabel>Headings:</guilabel> Text color for day\n"
-" and month names and other headings.\n"
-" </para>\n"
-" </listitem>\n"
-"\n"
-" <listitem>\n"
-" <para> <guilabel>Empty days:</guilabel> This is the\n"
-" background color for any time slots in which you have no "
-"appointments.\n"
-" </para>\n"
-" </listitem> \n"
-"\n"
-" <listitem>\n"
-" <para> \n"
-" <guilabel>Appointments:</guilabel> This is the\n"
-" background color for any time slots in which you have "
-"appointments.\n"
-" </para>\n"
-" </listitem>\n"
-" \n"
-"\t <listitem>\n"
-"\t <para> <guilabel>Highlighted day:</guilabel> The\n"
-" background color for a selected time slot.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\n"
-" \n"
-"\t <listitem>\n"
-"\t <para> \n"
-" <guilabel>Day numbers:</guilabel> Text color for date "
-"numbers.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\n"
-" \n"
-"\t <listitem>\n"
-"\t <para>\n"
-" <guilabel>Current day's number:</guilabel> Text color for "
-"today's date.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\n"
-"\t <listitem>\n"
-"\t <para> <guilabel>To-Do item that is not yet\n"
-" due:</guilabel> Text color for To-Do list items that are\n"
-" not yet due. (Or maybe background color? find out!)\n"
-" </para>\n"
-"\t </listitem>\n"
-"\n"
-"\n"
-"\t <listitem>\n"
-"\t <para> <guilabel>To-Do item that is due today:</guilabel>\n"
-" Text color for today's tasks.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\n"
-"\t <listitem>\n"
-"\t <para> <guilabel>To-Do item that is overdue:</guilabel>\n"
-" Text color for overdue tasks.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\n"
-" </itemizedlist>\n"
-" </para>\n"
-msgstr ""
-" <para>Los elementos a mostrar cuyos colores puede fijar son:\n"
-"\n"
-" <itemizedlist>\n"
-" <listitem>\n"
-" <para>\n"
-" <guilabel>Marco:</guilabel> Las líneas entre los días y la\n"
-" parte de arriba de la vista.\n"
-" </para>\n"
-" </listitem>\n"
-"\n"
-" <listitem>\n"
-" <para> <guilabel>Títulos:</guilabel> Color del texto para los\n"
-" nombres de los días y los meses y para otros títulos.\n"
-" </para>\n"
-" </listitem>\n"
-"\n"
-" <listitem>\n"
-" <para> <guilabel>Días vacíos:</guilabel> Este es el color de\n"
-" fondo para cualquier espacio de tiempo en el que no tiene "
-"citas.\n"
-" </para>\n"
-" </listitem> \n"
-"\n"
-" <listitem>\n"
-" <para> \n"
-" <guilabel>Citas:</guilabel> Este es el color de fondo para\n"
-" cualquier espacio de tiempo en el que tenga citas.\n"
-" </para>\n"
-" </listitem>\n"
-" \n"
-"\t <listitem>\n"
-"\t <para> <guilabel>Día resaltado:</guilabel> El color de fondo\n"
-" para un espacio de tiempo seleccionado.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\n"
-" \n"
-"\t <listitem>\n"
-"\t <para> \n"
-" <guilabel>Números de los días:</guilabel> Color del texto para "
-"los números de las fechas.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\n"
-" \n"
-"\t <listitem>\n"
-"\t <para>\n"
-" <guilabel>Número del día actual:</guilabel> Color del texto "
-"para la fecha del día de hoy.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\n"
-"\t <listitem>\n"
-"\t <para> <guilabel>Elementos Por Hacer que dentro de plazo:\n"
-" </guilabel> Color del texto para los elementos de la lista Por\n"
-" Hacer que están aún dentro del plazo.\n"
-" (¿Quizá sea el color de fondo? ¡averígualo!)\n"
-" </para>\n"
-"\t </listitem>\n"
-"\n"
-"\n"
-"\t <listitem>\n"
-"\t <para> <guilabel>Elementos Por Hacer de plazo hoy:</guilabel>\n"
-" Color del texto para las tareas de hoy.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\n"
-"\t <listitem>\n"
-"\t <para> <guilabel>Elementos Por Hacer fuera de plazo:</guilabel>\n"
-" Color del texto para las tareas fuera de plazo.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\n"
-" </itemizedlist>\n"
-" </para>\n"
-
-#: tmp/config-prefs.sgml.h:617
-msgid ""
-" <para>\n"
-" Additional configuration options will be covered here, as\n"
-" they become available.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Las opciones adicionales de configuración se cubrirán aquí,\n"
-" según vayan estando disponibles.\n"
-" </para>\n"
-
-#: tmp/config-prefs.sgml.h:622
-msgid " <title>General Preferences</title> \n"
-msgstr " <title>Preferencias Generales</title> \n"
-
-#: tmp/config-prefs.sgml.h:624
-msgid ""
-"<!-- <!DOCTYPE Chapter PUBLIC \"-//GNOME//DTD DocBook PNG Variant "
-"V1.1//EN\"> -->\n"
-msgstr ""
-"<!-- <!DOCTYPE Chapter PUBLIC \"-//GNOME//DTD DocBook PNG Variant "
-"V1.1//EN\"> -->\n"
diff --git a/doc/es.po/config-setupassist.sgml.po b/doc/es.po/config-setupassist.sgml.po
deleted file mode 100644
index e09d797052..0000000000
--- a/doc/es.po/config-setupassist.sgml.po
+++ /dev/null
@@ -1,445 +0,0 @@
-# Translation into Spanish of Evolution docs.
-# Copyright (C) 2000 Free Software Foundation, Inc.
-# Héctor García Álvarez <hector@scouts-es.org>, 2000.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: evolution-docs\n"
-"POT-Creation-Date: 2001-03-13 16:30+0100\n"
-"PO-Revision-Date: 2000-12-28 15:38+0100\n"
-"Last-Translator: Héctor García Álvarez <hector@scouts-es.org>\n"
-"Language-Team: Spanish <es@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=iso-8859-1\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: tmp/config-setupassist.sgml.h:1
-msgid ""
-" <para>\n"
-" The setup assistant (sometimes called a\n"
-"\t <glossterm>Druid</glossterm>, by analogy with the \"Wizards\"\n"
-"\t that some other programs use) will guide you through the\n"
-"\t network configuration process. It will ask you for some\n"
-"\t basic information; your system administrator or ISP should\n"
-"\t have the answers you'll need. The mail setup assistant is\n"
-"\t pictured in <xref linkend=\"usage-setup-fig\">.\n"
-"\n"
-"<!-- ==============Figure=================================== -->\n"
-"<!-- druid-pic should eventually become assistant-pic -->\n"
-"\n"
-"\t<figure id=\"usage-setup-fig\">\n"
-"\t<title>Mail Setup Assistant</title>\n"
-"\t<screenshot>\n"
-"\t <screeninfo>Evolution Main Window</screeninfo>\n"
-"\t <graphic fileref=\"fig/mail-druid-pic\" format=\"png\" srccredit=\"Kevin "
-"Breit\">\n"
-"\t </graphic>\n"
-"\t</screenshot>\n"
-"\t</figure>\n"
-"<!-- ==============End of Figure=================================== -->\n"
-"\n"
-"\n"
-"\n"
-" The assistant will ask you for the following information:\n"
-" <variablelist>\n"
-"\n"
-" <varlistentry>\n"
-" <term> <guilabel>Name:</guilabel> </term> <listitem>\n"
-"\t <para>Your full name. </para></listitem>\n"
-" </varlistentry>\n"
-"\n"
-" <varlistentry>\n"
-" <term><guilabel>Email address:</guilabel></term>\n"
-"\t <listitem><para>\n"
-" Your complete email address.\n"
-" </para></listitem>\n"
-" </varlistentry>\n"
-"\n"
-" <varlistentry>\n"
-" <term> <guilabel>Organization:</guilabel></term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" Any organization you represent, or the company where you\n"
-" work. Leave this blank if you wish, or type \"My own bad\n"
-" self\" so people know your opinions are yours alone.\n"
-" </para>\n"
-"\t </listitem>\n"
-" </varlistentry>\n"
-"\n"
-" <varlistentry>\n"
-"\t <term><guilabel>Signature File:</guilabel></term>\n"
-" <listitem>\n"
-" <para>\n"
-" A text file appended to any email you send. A signature\n"
-" file typically consists of your name and email address,\n"
-" or a quotation you like. It's good form to keep your\n"
-" \"sig\" on the short side: four lines is plenty. Remember,\n"
-" this is attached to every email you send.\n"
-" </para>\n"
-" </listitem>\n"
-" </varlistentry>\n"
-"\n"
-" <varlistentry>\n"
-" <term> <guilabel>Mail source type:</guilabel></term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" <application>Evolution</application> supports several\n"
-" mail sources: <glossterm linkend=\"pop\">POP</glossterm> and\n"
-" <glossterm linkend=\"imap\">IMAP</glossterm> servers, and "
-"UNIX-style\n"
-" <systemitem><filename>mbox</filename></systemitem> and\n"
-" <systemitem><filename>mh</filename></systemitem> files.\n"
-" POP servers retrieve your mail and store it on your\n"
-" local system so you can refer to it even when not\n"
-" connected to a network; <glossterm>IMAP</glossterm>\n"
-" servers store the mail on the server so you can access\n"
-" it from multiple locations;\n"
-" <systemitem><filename>mbox</filename>></systemitem>\n"
-" files are used by your computer for internal mail, and\n"
-" may be useful if you want to switch from another email\n"
-" client such as <application>Spruce</application> or\n"
-" <application>Netscape Communicator</application>. Ask\n"
-" your system administrator which you should use, or keep\n"
-" guessing until one works. You may use multiple sources\n"
-" if you wish; see <xref\n"
-" linkend=\"config-prefs-mail-network\"> for more\n"
-" information.\n"
-" </para>\n"
-" <para>\n"
-" If you decide not to have\n"
-" <application>Evolution</application> use any servers,\n"
-" the remaining items are not relevant; you only need to\n"
-" point to the location of the files you wish to access.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-" \n"
-" <varlistentry>\n"
-" <term> <guilabel>Server:</guilabel></term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" This should be the name of the server where you get\n"
-" incoming mail. It may (or may not) be the same as the\n"
-" server where you send your outgoing mail.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t</varlistentry>\n"
-"\n"
-" <varlistentry>\n"
-"\t <term><guilabel>Username:</guilabel></term>\n"
-"\t<listitem>\n"
-" <para>\n"
-" Enter the username for your mail server account, if you\n"
-" have one. In almost all cases, this is the part of your email\n"
-" address before the @ character, and\n"
-" <application>Evolution</application> has selected that\n"
-" value as the default. If you have a different username,\n"
-" you can enter it here.\n"
-" </para>\n"
-"\t </listitem>\n"
-" </varlistentry>\n"
-" \n"
-" <varlistentry>\n"
-" <term><guilabel>Authentication:</guilabel></term> \n"
-"\t <listitem>\n"
-"\t <para>\n"
-" Select the type of authentication you will use. You can\n"
-" click <guibutton>Detect supported types</guibutton> to\n"
-" find out which authentication protocols your network\n"
-" allows.\n"
-" </para>\n"
-"\t </listitem>\n"
-" </varlistentry>\n"
-"\n"
-" <varlistentry> \n"
-" <term><guilabel>Mail Transport:</guilabel></term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" This is the mail sending protocol you will want to use.\n"
-" <application>Evolution</application> supports both\n"
-" <glossterm linkend=\"smtp\">SMTP</glossterm> and\n"
-" <application>sendmail</application>; SMTP is by far the\n"
-" more common.\n"
-" </para>\n"
-"\t </listitem>\n"
-" </varlistentry>\n"
-" </variablelist>\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" El asistente para la configuración (algunas veces llamado \n"
-"\t <glossterm>Druida</glossterm>, por analogía con los \"Magos\"\n"
-"\t que usan otros programas) le guiará a través del proceso de "
-"configuración\n"
-"\t de la red. Le preguntará acerca de alguna información básica. Su\n"
-"\t administrador de sistemas o su proveedor de Internet debería tener\n"
-"\t las respuestas que necesitará. El asistente para la configuración del\n"
-"\t correo está representado en <xref linkend=\"usage-setup-fig\">.\n"
-"\n"
-"<!-- ==============Figure=================================== -->\n"
-"<!-- druid-pic should eventually become assistant-pic -->\n"
-"\n"
-"\t<figure id=\"usage-setup-fig\">\n"
-"\t<title>Asistente para la Configuración del Correo</title>\n"
-"\t<screenshot>\n"
-"\t <screeninfo>Ventana del Correo de Evolution</screeninfo>\n"
-"\t <graphic fileref=\"fig/mail-druid-pic\" format=\"png\" srccredit=\"Kevin "
-"Breit\">\n"
-"\t </graphic>\n"
-"\t</screenshot>\n"
-"\t</figure>\n"
-"<!-- ==============End of Figure=================================== -->\n"
-"\n"
-"\n"
-"\n"
-" El asistente le pedirá la siguiente información:\n"
-" <variablelist>\n"
-"\n"
-" <varlistentry>\n"
-" <term> <guilabel>Nombre:</guilabel> </term> <listitem>\n"
-"\t <para>Su nombre completo. </para></listitem>\n"
-" </varlistentry>\n"
-"\n"
-" <varlistentry>\n"
-" <term><guilabel>Dirección de correo "
-"electrónico:</guilabel></term>\n"
-"\t <listitem><para>\n"
-" Su dirección de correo completa.\n"
-" </para></listitem>\n"
-" </varlistentry>\n"
-"\n"
-" <varlistentry>\n"
-" <term> <guilabel>Organización:</guilabel></term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" Cualquier organización a la que represente, o la compañía para\n"
-" la que trabaja. Deje esto en blanco si lo prefiere, o ponga\n"
-" \"Yo mismo\" así la gente sabrá que sus opiniones son solo "
-"suyas.\n"
-" </para>\n"
-"\t </listitem>\n"
-" </varlistentry>\n"
-"\n"
-" <varlistentry>\n"
-"\t <term><guilabel>Archivo de Firma:</guilabel></term>\n"
-" <listitem>\n"
-" <para>\n"
-" Un archivo de texto añadido a cualquier mensaje que envíe. Una\n"
-" firma típica consiste en su nombre y su dirección de correo,\n"
-" o una cita que le guste. Es una buena medida mantener su\n"
-" \"firma\" corta: cuatro líneas son suficientes. Recuerde,\n"
-" que esto se adjuntará a todos los mensajes que envíe.\n"
-" </para>\n"
-" </listitem>\n"
-" </varlistentry>\n"
-"\n"
-" <varlistentry>\n"
-" <term> <guilabel>Tipo de fuente del correo:</guilabel></term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" <application>Evolution</application> soporta varias fuentes\n"
-" para el correo: servidores <glossterm \n"
-" linkend=\"pop\">POP</glossterm> e <glossterm \n"
-" linkend=\"imap\">IMAP</glossterm>, y archivos \n"
-" <systemitem><filename>mbox</filename></systemitem> y\n"
-" <systemitem><filename>mh</filename></systemitem> al estilo "
-"UNIX.\n"
-" Los servidores POP le permiten obtener su correo y guardarlo\n"
-" localmente para que pueda consultarlo incluso cuando no esté\n"
-" conectado a la red; los servidores "
-"<glossterm>IMAP</glossterm>\n"
-" guardan el correo en el servidor para que puede acceder a el\n"
-" desde varios sitios; los\n"
-" archivos <systemitem><filename>mbox</filename></systemitem>\n"
-" son usados por su ordenador para el correo interno, y pueden\n"
-" ser útiles si quiere cambiar desde otro cliente de correo "
-"como\n"
-" <application>Spruce</application> o\n"
-" <application>Netscape Communicator</application>. Pregunte\n"
-" a su administrador de sistemas cual debe usar, o intente\n"
-" hasta que alguno funcione. Puede usar múltiples fuentes si "
-"lo\n"
-" desea; vea <xref\n"
-" linkend=\"config-prefs-mail-network\"> para más\n"
-" información.\n"
-" </para>\n"
-" <para>\n"
-" Si decide que <application>Evolution</application>\n"
-" no use ningún servidor, los siguientes elementos no son\n"
-" relevantes; tan solo debe indicar donde se encuentran los\n"
-" archivos a los que desea acceder.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-" \n"
-" <varlistentry>\n"
-" <term> <guilabel>Servidor:</guilabel></term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" Este debe ser el nombre del servidor de donde obtiene el\n"
-" correo entrante. Puede (o puede no) ser el mismo servidor\n"
-" al que envía su correo saliente.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t</varlistentry>\n"
-"\n"
-" <varlistentry>\n"
-"\t <term><guilabel>Nombre de usuario:</guilabel></term>\n"
-"\t<listitem>\n"
-" <para>\n"
-" Introduzca el nombre de usuario de la cuenta de su servidor de\n"
-" correo, si tiene una. En casi todos los casos, esta es la "
-"parte\n"
-" de su correo de antes del carácter @, y\n"
-" <application>Evolution</application> elige ese valor como\n"
-" valor por defecto. Si tiene un nombre de usuario distinto,\n"
-" puede escribirlo aquí.\n"
-" </para>\n"
-"\t </listitem>\n"
-" </varlistentry>\n"
-" \n"
-" <varlistentry>\n"
-" <term><guilabel>Autentificación:</guilabel></term> \n"
-"\t <listitem>\n"
-"\t <para>\n"
-" Selección el tipo de autentificación que usará. Puede "
-" pulsar <guibutton>Detectar tipos soportados</guibutton> para\n"
-" averiguar que protocolos de autentificación admite su "
-"sistema.\n"
-" </para>\n"
-"\t </listitem>\n"
-" </varlistentry>\n"
-"\n"
-" <varlistentry> \n"
-" <term><guilabel>Transporte de Correo:</guilabel></term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" Este es el protocolo de envío de correo que quiera usar.\n"
-" <application>Evolution</application> soporta ambos\n"
-" <glossterm linkend=\"smtp\">SMTP</glossterm> y\n"
-" <application>sendmail</application>; SMTP es de lejos el más\n"
-" común.\n"
-" </para>\n"
-"\t </listitem>\n"
-" </varlistentry>\n"
-" </variablelist>\n"
-" </para>\n"
-
-#: tmp/config-setupassist.sgml.h:150
-msgid ""
-" <para>\n"
-" The first time you try to send or receive mail with\n"
-"\t<application>Evolution</application>, the <interface>mail\n"
-"\tsetup assistant</interface> will pop up to help you with your\n"
-"\temail preferences. If you don't plan to use email, or if\n"
-"\tyou'd rather deal with your email preferences later, click\n"
-"\t<guibutton>Cancel</guibutton>.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" La primera vez que intente enviar o recibir correo con\n"
-"\t<application>Evolution</application>, aparecerá el <interface>asistente "
-"de\n"
-"\tconfiguración del correo</interface> para ayudarle con la configuración "
-"de\n"
-"\tsu correo. Si no piensa usar el correo electrónico, o si prefiere\n"
-"\tocuparse de la configuración de su correo más tarde, pulse\n"
-"\t<guibutton>Cancelar</guibutton>.\n"
-" </para>\n"
-
-#: tmp/config-setupassist.sgml.h:159
-msgid ""
-" <para>\n"
-" The first time you try to use email, the mail setup assistant\n"
-" will ask you for some basic information, so\n"
-" <application>Evolution</application> can let you use email. If\n"
-" you prefer more detailed configuration, or if you want to make\n"
-" changes to an existing email setup, see <xref\n"
-" linkend=\"config-prefs\">.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" La primera vez que intente usar el correo, el asistente de\n"
-" configuración del correo le pedirá algunos datos básicos, para que\n"
-" <application>Evolution</application> le deje usar el correo. Si\n"
-" prefiere una configuración más detallada, o si quiere realizar\n"
-" cambios en una configuración ya existente, vea <xref\n"
-" linkend=\"config-prefs\">.\n"
-" </para>\n"
-
-#: tmp/config-setupassist.sgml.h:168
-msgid ""
-" <para>\n"
-" To learn how to configure <application>Evolution</application>\n"
-" in greater detail, or to change preferences once you have set\n"
-" them, see <xref linkend=\"config-prefs\">.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Para aprender a configurar <application>Evolution</application>\n"
-" con todo detalle, o para cambiar las preferencias una vez que las\n"
-" ha fijado, mire <xref linkend=\"config-prefs\">.\n"
-" </para>\n"
-
-#: tmp/config-setupassist.sgml.h:174
-msgid " <title>Easy Setup with the Setup Assistant</title>\n"
-msgstr " <title>Configuración Fácil con el Asistente</title>\n"
-
-#: tmp/config-setupassist.sgml.h:176
-msgid " <title>Mail Setup</title>\n"
-msgstr " <title>Configuración del Correo</title>\n"
-
-#: tmp/config-setupassist.sgml.h:178
-msgid ""
-"<!-- \n"
-"\n"
-" Before you get it, though, you should decide where you want to\n"
-"\tkeep it. Your options will vary a little depending on your\n"
-"\tnetwork setup, but they come down to storing the mail on your\n"
-"\thard disk (using <glossterm linkend=\"pop\">POP</glossterm>), or\n"
-"\tstoring it on the network (using <glossterm\n"
-"\tlinkend=\"imap\">IMAP</glossterm>). If you store your mail on\n"
-"\tyour local hard disk, you can read it whether you're online or\n"
-"\tnot, but you can only read it from one computer. If you store\n"
-"\tit on the network, you can only read it when you're online,\n"
-"\tbut you can access it from almost any computer with a network\n"
-"\tconnection, even if it doesn't have\n"
-"\t<application>Evolution</application>.\n"
-"\n"
-"\n"
-" If you choose POP, you'll be putting mail in the\n"
-" <guilabel>Inbox</guilabel> in the <guilabel>Local</guilabel>\n"
-" folder. If you choose IMAP, it's the\n"
-" <guilabel>Inbox</guilabel> of a folder with the same name as\n"
-" your mail server. That's so you can maintain several distinct\n"
-" IMAP servers if you want. See <xref\n"
-" linkend=\"config-prefs-mail\"> for more information about mail\n"
-" servers.\n"
-"-->\n"
-msgstr ""
-"<!-- \n"
-"\n"
-" Antes de obtenerlo, eso si, debe decidir donde lo quiere conservar.\n"
-"\tSus opciones variarán ligeramente dependiendo de la configuración de su\n"
-"\tred, pero quedan simplificadas a guardar su correo en su disco duro\n"
-"\t(usando <glossterm linkend=\"pop\">POP</glossterm>), o guardarlo en\n"
-"\tla red (usando <glossterm linkend=\"imap\">IMAP</glossterm>).\n"
-"\tSi guarda el correo en su disco duro local, podrá leerlo tanto si\n"
-"\testá conectado o como si no, pero tan solo podrá leerlo desde un\n"
-"\tordenador. Si lo guarda en la red, solo podrá leerlo cuando esté\n"
-"\tconectado, pero podrá leerlo desde casi cualquier ordenador con conexión\n"
-"\ta la red, incluso si no tiene\n"
-"\t<application>Evolution</application>.\n"
-"\n"
-"\n"
-" Si elige POP, pondrá el correo en el\n"
-" <guilabel>Inbox</guilabel> en la carpeta "
-"<guilabel>Local</guilabel>.\n"
-" Si elige IMAP, es el\n"
-" <guilabel>Inbox</guilabel> de una carpeta con el mismo nombre que "
-"su\n"
-" servidor de correo. Esto es así para que pueda tener varios\n"
-" servidores IMAP distintos si quiere. Vea <xref\n"
-" linkend=\"config-prefs-mail\"> para más información acerca de los\n"
-" servidores de correo.\n"
-"-->\n"
diff --git a/doc/es.po/config-sync.sgml.po b/doc/es.po/config-sync.sgml.po
deleted file mode 100644
index 23b3d15b6a..0000000000
--- a/doc/es.po/config-sync.sgml.po
+++ /dev/null
@@ -1,264 +0,0 @@
-# Translation into Spanish of Evolution docs.
-# Copyright (C) 2000 Free Software Foundation, Inc.
-# Héctor García Álvarez <hector@scouts-es.org>, 2000.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: evolution-docs\n"
-"POT-Creation-Date: 2001-03-13 16:30+0100\n"
-"PO-Revision-Date: 2000-12-28 15:38+0100\n"
-"Last-Translator: Héctor García Álvarez <hector@scouts-es.org>\n"
-"Language-Team: Spanish <es@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=iso-8859-1\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: tmp/config-sync.sgml.h:1
-msgid ""
-" <para> \n"
-" <warning> \n"
-"\t <title>Data Loss Prevention</title> \n"
-"\t <para>\n"
-"\t It's always a good idea to make a backup. To do that,\n"
-"\t make a copy of your <systemitem>\n"
-"\t <filename>~/evolution</filename> </systemitem> directory.\n"
-" </para>\n"
-"\t</warning>\n"
-" </para>\n"
-msgstr ""
-" <para> \n"
-" <warning> \n"
-"\t <title>Prevención de Pérdida de Datos</title> \n"
-"\t <para>\n"
-"\t Siempre es una buena idea hacer una copia de seguridad. Para "
-"hacerla,\n"
-"\t haga una copia de su directorio\n"
-"\t <systemitem><filename>~/evolution</filename></systemitem>.\n"
-" </para>\n"
-"\t</warning>\n"
-" </para>\n"
-
-#: tmp/config-sync.sgml.h:12
-msgid ""
-" <para>\n"
-" Once your computer and your Palm-OS device are talking happily\n"
-" to each other, you'll have to decide what exactly you want\n"
-" them to do with the data they exchange. Your options may vary\n"
-" depending on the conduit, but typically they will be:\n"
-"\n"
-" <variablelist>\n"
-" <varlistentry>\n"
-" <term>Disabled </term>\n"
-" <listitem> \n"
-" <para>\n"
-" Do nothing.\n"
-" </para>\n"
-" </listitem>\n"
-" </varlistentry>\n"
-"\n"
-" <varlistentry>\n"
-" <term>Synchronize</term>\n"
-" <listitem> \n"
-" <para>\n"
-" Copy new data from the computer to the handheld, and\n"
-" from the handheld to the computer. Remove items\n"
-" that were on both systems but have been deleted on\n"
-" one.\n"
-" </para>\n"
-" </listitem>\n"
-" </varlistentry>\n"
-"\n"
-" <varlistentry>\n"
-" <term>Copy From Pilot</term>\n"
-" <listitem> \n"
-" <para>\n"
-" If there is any new data on the the handheld device,\n"
-" copy it to the computer.\n"
-" </para>\n"
-" </listitem>\n"
-" </varlistentry>\n"
-"\n"
-" <varlistentry>\n"
-" <term>Copy To Pilot</term>\n"
-" <listitem> \n"
-" <para>\n"
-" Copy new data from the computer to the handheld. \n"
-" </para>\n"
-" </listitem>\n"
-" </varlistentry>\n"
-"\n"
-" <varlistentry>\n"
-" <term>Merge From Pilot</term>\n"
-" <listitem> \n"
-" <para>\n"
-" Copy new data from the handheld to the computer, and\n"
-" remove any information from the computer that has\n"
-" been deleted on the handheld.\n"
-" </para>\n"
-" </listitem>\n"
-" </varlistentry>\n"
-"\n"
-" <varlistentry>\n"
-" <term>Merge To Pilot</term>\n"
-" <listitem> \n"
-" <para>\n"
-" Copy new data from the computer to the handheld, and\n"
-" remove any information from the handheld that has\n"
-" been deleted on the computer.\n"
-" </para>\n"
-" </listitem>\n"
-" </varlistentry>\n"
-" </variablelist>\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Una vez que su ordenador y su dispositivo con Palm-OS se hablan el\n"
-" uno al otro, debe decidir que quiere que hagan exactamente con los\n"
-" datos que se intercambian. Sus opciones pueden variar dependiendo\n"
-" del enlaze, pero tipicamente serán:\n"
-"\n"
-" <variablelist>\n"
-" <varlistentry>\n"
-" <term>Desactivar </term>\n"
-" <listitem> \n"
-" <para>\n"
-" No hace nada.\n"
-" </para>\n"
-" </listitem>\n"
-" </varlistentry>\n"
-"\n"
-" <varlistentry>\n"
-" <term>Sincronizar</term>\n"
-" <listitem> \n"
-" <para>\n"
-" Copia los datos nuevos del ordenador al dispositivo de\n"
-" mano, y del dispositivo de mano al ordenador. Elimina\n"
-" elementos que estaban en ambos sistemas pero han sido\n"
-" borrados en uno de ellos.\n"
-" </para>\n"
-" </listitem>\n"
-" </varlistentry>\n"
-"\n"
-" <varlistentry>\n"
-" <term>Copiar desde Pilot</term>\n"
-" <listitem> \n"
-" <para>\n"
-" Si hay datos nuevos en el dispositivo de mano, los copia\n"
-" al ordenador.\n"
-" </para>\n"
-" </listitem>\n"
-" </varlistentry>\n"
-"\n"
-" <varlistentry>\n"
-" <term>Copiar a Pilot</term>\n"
-" <listitem> \n"
-" <para>\n"
-" Copia datos nuevos del ordenador al dispositivo de mano. \n"
-" </para>\n"
-" </listitem>\n"
-" </varlistentry>\n"
-"\n"
-" <varlistentry>\n"
-" <term>Sincronizar desde Pilot</term>\n"
-" <listitem> \n"
-" <para>\n"
-" Copia los datos nuevos del dispositivo de mano al\n"
-" ordenador, y elimina cualquier información del ordenador\n"
-" que haya sido borrada del dispositivo de mano.\n"
-" </para>\n"
-" </listitem>\n"
-" </varlistentry>\n"
-"\n"
-" <varlistentry>\n"
-" <term>Sincronizar en el Pilot</term>\n"
-" <listitem> \n"
-" <para>\n"
-" Copia los datos nuevos del ordenador al dispositivo de\n"
-" mano, y elimina cualquier información del dispositivo\n"
-" de mano que haya sido borrada del ordenador.\n"
-" </para>\n"
-" </listitem>\n"
-" </varlistentry>\n"
-" </variablelist>\n"
-" </para>\n"
-
-#: tmp/config-sync.sgml.h:83
-msgid ""
-" <para>\n"
-" Synchronization presents you with two issues you'll need to\n"
-" deal with. \n"
-" <simplelist>\n"
-" <member>\n"
-" Your computer needs to recognize and access your handheld.\n"
-" At this time, <application>Evolution</application> only\n"
-" supports Palm-OS devices like the PalmPilot and the\n"
-" Handspring Visor.\n"
-" </member>\n"
-" <member>\n"
-" You should decide what sort of synchronization behavior you\n"
-" want.\n"
-" </member>\n"
-" </simplelist>\n"
-"\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" La sincronización le presenta dos temas de los que se tendrá que\n"
-" ocupar. \n"
-" <simplelist>\n"
-" <member>\n"
-" Su ordenador deberá reconocer y acceder a su dispositivo de\n"
-" mano. En este momento, <application>Evolution</application> "
-"solo\n"
-" soporta dispositivos con Palm-OS como el PalmPilot y el\n"
-" Handspring Visor.\n"
-" </member>\n"
-" <member>\n"
-" Debe decidir que estilo de sincronización quiere.\n"
-" </member>\n"
-" </simplelist>\n"
-"\n"
-" </para>\n"
-
-#: tmp/config-sync.sgml.h:101
-msgid " <title>Setting up your synchronization system</title> \n"
-msgstr " <title>Configurando su sistema de sincronización</title> \n"
-
-#: tmp/config-sync.sgml.h:103
-msgid ""
-" <para>\n"
-" If you haven't used a handheld device with your computer\n"
-" before, you'll need to run the GNOME <application>Control\n"
-" Center</application> and make sure that <application>Pilot\n"
-" Link</application> is properly configured. Then, select the\n"
-" <application>Evolution</application> <glossterm\n"
-" linkend=\"conduit\">conduits</glossterm> under the\n"
-" <guilabel>Pilot Conduits</guilabel> section of the Control\n"
-" Center.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Si no ha usado antes un dispositivo de mano con su ordenador, debe\n"
-" ejecutar el <application>Centro de Control</application> de GNOME\n"
-" y asegurarse que <application>Enlaze con Pilot</application> está\n"
-" configurado apropiadamente. Entonces, seleccione el <glossterm\n"
-" linkend=\"conduit\">enlaze</glossterm> de\n"
-" <application>Evolution</application> bajo la sección\n"
-" <guilabel>Enlazes de Pilot</guilabel> del Centro de Control.\n"
-" </para>\n"
-
-#: tmp/config-sync.sgml.h:114
-msgid ""
-" <para>\n"
-" Select a behavior for each conduit available. For the most\n"
-" part, you'll want to stick with\n"
-" <guilabel>Synchronize</guilabel>. Then, put your handheld on\n"
-" its cradle and press the synchronization button.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Seleccione un comportamiento para cada enlaze disponible. Para la\n"
-" mayoría, querra quedarse con <guilabel>Sincronizar</guilabel>.\n"
-" Entoces, ponga el dispositivo de mano en su cuna y presione el\n"
-" botón de sincronización.\n"
-" </para>\n"
diff --git a/doc/es.po/evolution.sgml.po b/doc/es.po/evolution.sgml.po
deleted file mode 100644
index e171084a64..0000000000
--- a/doc/es.po/evolution.sgml.po
+++ /dev/null
@@ -1,165 +0,0 @@
-# Translation into Spanish of Evolution docs.
-# Copyright (C) 2000 Free Software Foundation, Inc.
-# Héctor García Álvarez <hector@scouts-es.org>, 2000.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: evolution-docs\n"
-"POT-Creation-Date: 2001-03-13 16:30+0100\n"
-"PO-Revision-Date: 2000-12-28 15:38+0100\n"
-"Last-Translator: Héctor García Álvarez <hector@scouts-es.org>\n"
-"Language-Team: Spanish <es@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=iso-8859-1\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: tmp/evolution.sgml.h:1
-msgid ""
-" <para>\n"
-" Many of the names used by companies to distinguish their\n"
-" products and services are claimed as trademarks. Where those\n"
-" names appear in any GNOME documentation, and those trademarks\n"
-" are made aware to the members of the GNOME Documentation\n"
-" Project, the names have been printed in caps or initial caps.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Muchos de los nombres que usan las compañías para distinguir sus\n"
-" productos y servicios están registrados como marcas. Cuando\n"
-" aparecen esos nombres en la documentación de GNOME, y el Proyecto\n"
-" de Documentación de GNOME tiene conocimiento de dichas marcas,\n"
-" estos han sido escritos en mayúsculas o empiezan con mayúsculas.\n"
-" </para>\n"
-
-#: tmp/evolution.sgml.h:9
-msgid ""
-" <para>\n"
-" <application>Evolution</application> is highly configurable.\n"
-" Usually, when developers say that, they mean that they didn't\n"
-" test it out thoroughly and have left it to other programmers\n"
-" to \"configure\" themselves a working system. In the case of\n"
-" <application>Evolution</application>, \"configurable\" means\n"
-" what it ought to. It means that, while you can expect the\n"
-" program to work perfectly well in its default settings, it's\n"
-" also easy to alter its behavior in a wide variety of ways, so\n"
-" that it fits your needs exactly. This part of the book will\n"
-" describe that process, from the quickest glimpse of the Setup\n"
-" Assistant to an in-depth tour of the preferences dialogs.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" <application>Evolution</application> es altamente configurable.\n"
-" Normalmente, cuando los desarrolladores dicen esto, significa que\n"
-" no lo han probado a fondo y que dejan a otros programadores que se\n"
-" \"configuren\" ellos mismos un sistema que funcione. En el caso de\n"
-" <application>Evolution</application>, \"configurable\" significa\n"
-" lo que debe. Significa que, aunque puede esperar que el programa\n"
-" funcione perfectamente bien con sus opciones por defecto, además\n"
-" es sencillo alterar su comportamiento entre una amplia gama, para\n"
-" que encaje exactamente con sus necesidades. Esta parte del libro\n"
-" describirá ese proceso, desde la vista superficial del Asistente\n"
-" de Configuración hasta una visión a fondo de los diálogos de\n"
-" preferencias.\n"
-" </para>\n"
-
-#: tmp/evolution.sgml.h:23
-msgid ""
-" <para>\n"
-" Part one of the <application>Evolution</application> manual\n"
-" describes how to use <application>Evolution</application> for\n"
-" email, contact management, and appointment and task\n"
-" scheduling. You'll find as you go along that there's more\n"
-" than one way to do things, and you can pick whichever method\n"
-" you like best.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" La primera parte del manual de\n"
-" <application>Evolution</application> describe como usar\n"
-" <application>Evolution</application> para el correo, el\n"
-" administrador de contactos y como fijar citas y tareas.\n"
-" Según vaya utilizando estas cosas descubrirá que hay más de\n"
-" una manera de hacer las cosas, y puede puede elegir el método\n"
-" que más le guste.\n"
-" </para>\n"
-
-#: tmp/evolution.sgml.h:32
-msgid ""
-" <para>\n"
-" The following reference covers all, or nearly all, of the\n"
-" menus and menu commands that\n"
-" <application>Evolution</application> has to offer you.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" La siguiente referencia cubre todos, o casi todos, los menús y los\n"
-" comandos de los menús que le ofrece\n"
-" <application>Evolution</application>.\n"
-" </para>\n"
-
-#: tmp/evolution.sgml.h:38
-msgid ""
-" <para>\n"
-" Permission is granted to copy, distribute and/or modify this\n"
-" document under the terms of the <ulink type=\"help\"\n"
-" url=\"gnome-help:fdl\"><citetitle>GNU Free Documentation\n"
-" License</citetitle></ulink>, Version 1.1 or any later version\n"
-" published by the Free Software Foundation with no Invariant\n"
-" Sections, no Front-Cover Texts, and no Back-Cover Texts. You\n"
-" may obtain a copy of the <citetitle>GNU Free Documentation\n"
-" License</citetitle> from the Free Software Foundation by\n"
-" visiting <ulink type=\"http\" url=\"http://www.fsf.org\">their\n"
-" Web site</ulink> or by writing to: Free Software Foundation,\n"
-" Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,\n"
-" USA.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Se garantiza permiso para copiar, distribuir y/o modificar este\n"
-" documento bajo los términos de la <ulink type=\"help\"\n"
-" url=\"gnome-help:fdl\"><citetitle>Licencia de Documentación Libre\n"
-" de GNU</citetitle></ulink>, Versión 1.1 o posteriores versiones\n"
-" publicadas por la Fundación para el Software Libre (Free Software\n"
-" Foundation) sin Secciones Invariantes, sin Textos de Portada y sin\n"
-" Textos de Contraportada. Puede obtener una copia de la\n"
-" <citetitle>Licencia de Documentación Libre de GNU</citetitle>n "
-" de la Fundación para el Software Libre visitando su\n"
-" <ulink type=\"http\" url=\"http://www.fsf.org\">sitio Web</ulink>\n"
-" o escribiendo a: Free Software Foundation,\n"
-" Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,\n"
-" USA.\n"
-" </para>\n"
-
-#: tmp/evolution.sgml.h:53
-msgid " <title>A User's Guide to Evolution</title>\n"
-msgstr " <title>Una guía para el usuario de Evolution</title>\n"
-
-#: tmp/evolution.sgml.h:55
-msgid " <title>Comprehensive Menu reference</title>\n"
-msgstr " <title>Referencia extensa de los Menus</title>\n"
-
-#: tmp/evolution.sgml.h:57
-msgid " <title>Using Evolution</title>\n"
-msgstr " <title>Usando Evolution</title>\n"
-
-#: tmp/evolution.sgml.h:59
-msgid " <title>Configuring and Managing Evolution</title>\n"
-msgstr " <title>Configurando y administrando Evolution</title>\n"
-
-#: tmp/evolution.sgml.h:61
-msgid "<!-- &USAGE-NOTES; -->\n"
-msgstr "<!-- &USAGE-NOTES; -->\n"
-
-#: tmp/evolution.sgml.h:63
-msgid ""
-"<!-- Almost every chapter is an entity. Files, Chapter id's, and\n"
-"entity names correspond. APX is for appendix. Note that there is no\n"
-"entity for apx-notes.sgml, which is still included in the file\n"
-"set. Reinstate the entity if and when the Notes feature is\n"
-"implemented. -->\n"
-msgstr ""
-"<!-- Almost every chapter is an entity. Files, Chapter id's, and\n"
-"entity names correspond. APX is for appendix. Note that there is no\n"
-"entity for apx-notes.sgml, which is still included in the file\n"
-"set. Reinstate the entity if and when the Notes feature is\n"
-"implemented. -->\n"
diff --git a/doc/es.po/menuref.sgml.po b/doc/es.po/menuref.sgml.po
deleted file mode 100644
index 20c656c958..0000000000
--- a/doc/es.po/menuref.sgml.po
+++ /dev/null
@@ -1,3062 +0,0 @@
-# Translation into Spanish of Evolution docs.
-# Copyright (C) 2000 Free Software Foundation, Inc.
-# Héctor García Álvarez <hector@scouts-es.org>, 2000.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: evolution-docs\n"
-"POT-Creation-Date: 2001-03-13 16:30+0100\n"
-"PO-Revision-Date: 2000-12-28 15:38+0100\n"
-"Last-Translator: Héctor García Álvarez <hector@scouts-es.org>\n"
-"Language-Team: Spanish <es@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=iso-8859-1\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: tmp/menuref.sgml.h:1
-msgid ""
-" <para>\n"
-"\t<variablelist>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guisubmenu>New...</guisubmenu> Submenu</term>\n"
-"\t <listitem><para>\n"
-"\t\t<itemizedlist>\n"
-"\t\t <listitem><para>\n"
-"\t\t <guimenuitem>Folder</guimenuitem> &mdash;\n"
-"\t\t Create a new folder. See <xref \n"
-"\t\t linkend=\"usage-mainwindow-folderbar\">\n"
-"\t\t for more information about folders.\n"
-"\t\t </para></listitem>\n"
-"\t\t <listitem><para>\n"
-"\t\t <guimenuitem>Shortcut</guimenuitem> &mdash;\n"
-"\t\t Create a new Shortcut in the Shortcut Bar.\n"
-"\t\t </para></listitem>\n"
-"\t\t <listitem><para>\n"
-"\t\t <guimenuitem>Mail Message</guimenuitem> &mdash;\n"
-"\t\t Compose a new mail message. Covered in\n"
-"\t\t <xref linkend=\"usage-mail-getnsend-send\">.\n"
-"\t\t </para></listitem>\n"
-"\t\t <listitem><para>\n"
-"\t\t <guimenuitem>Appointment</guimenuitem> &mdash;\n"
-"\t\t Enter a new appointment in your calendar. See <xref\n"
-"\t\t\tlinkend=\"usage-calendar-apts-basic\"> for more information.\n"
-"\t\t </para></listitem>\n"
-"\t\t <listitem><para>\n"
-"\t\t <guimenuitem>Task</guimenuitem> &mdash;\n"
-"\t\t Enter a new to-do item in your taskpad. Covered in \n"
-"\t\t <xref linkend=\"usage-calendar-todo\">.\n"
-"\t\t </para></listitem>\n"
-"\t\t</itemizedlist>\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Go to Folder</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" View the items in a particular folder.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Create New Folder</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t\t This item doesn't belong here any more.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t \n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Print Message</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t\t Print the current message.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t \n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Exit</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t\t Quit using <application>Evolution</application>.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t</variablelist>\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-"\t<variablelist>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guisubmenu>Nuevo...</guisubmenu> Submenu</term>\n"
-"\t <listitem><para>\n"
-"\t\t<itemizedlist>\n"
-"\t\t <listitem><para>\n"
-"\t\t <guimenuitem>Carpeta</guimenuitem> &mdash;\n"
-"\t\t Crear una nueva carpeta. Vea <xref \n"
-"\t\t linkend=\"usage-mainwindow-folderbar\">\n"
-"\t\t para más información acerca de las carpetas.\n"
-"\t\t </para></listitem>\n"
-"\t\t <listitem><para>\n"
-"\t\t <guimenuitem>Atajo</guimenuitem> &mdash;\n"
-"\t\t Crear un nuevo Atajo en la Barra de Atajos.\n"
-"\t\t </para></listitem>\n"
-"\t\t <listitem><para>\n"
-"\t\t <guimenuitem>Mensaje de Correo</guimenuitem> &mdash;\n"
-"\t\t Escribir un nuevo mensaje de correo. Cubierto en\n"
-"\t\t <xref linkend=\"usage-mail-getnsend-send\">.\n"
-"\t\t </para></listitem>\n"
-"\t\t <listitem><para>\n"
-"\t\t <guimenuitem>Cita</guimenuitem> &mdash;\n"
-"\t\t Concertar una nueva cita en su calendario. Vea <xref\n"
-"\t\t\tlinkend=\"usage-calendar-apts-basic\"> para más información.\n"
-"\t\t </para></listitem>\n"
-"\t\t <listitem><para>\n"
-"\t\t <guimenuitem>Tarea</guimenuitem> &mdash;\n"
-"\t\t Escriba un nuevo elemento para-hacer en su lista de tareas.\n"
-"\t\t Cubierto en \n"
-"\t\t <xref linkend=\"usage-calendar-todo\">.\n"
-"\t\t </para></listitem>\n"
-"\t\t</itemizedlist>\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Ir a Carpeta</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Ver los elementos de una carpeta en particular.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Crear Nueva Carpeta</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t\t Este elemento ya no pertenece aquí.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t \n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Imprimir Mensaje</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t\t Imprime el mensaje actual.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t \n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Salir</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t\t Parar de usar <application>Evolution</application>.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t</variablelist>\n"
-" </para>\n"
-
-#: tmp/menuref.sgml.h:67
-msgid ""
-" <para>\n"
-" <variablelist>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Sort Ascending</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t\t Sort the list, in ascending order, by the attribute you clicked.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Sort Descending</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t\t Sort the list in descending order.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-" \n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Unsort</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t\t Undo any sorting by this attribute, and leave the message list sorted \n"
-" by the previous one.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Group by this Field</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t\t Instead of sorting the messages, group them in boxes. \n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Group by Box</guimenuitem></term>\n"
-"\t <listitem><para> If you have your messages grouped in\n"
-"\t boxes, you can arrange the boxes as well, by choosing\n"
-"\t this item. </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Remove this column</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t\t Choose this to remove the column from the message list display.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Field Chooser</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t\t Opens a palette of columns. You can drag the columns\n"
-"\t\t you want from the palette into position in the\n"
-"\t\t message list heading bar; red arrows appear\n"
-"\t\t when you get close enough to a possibile position.</para>\n"
-" \n"
-" <para>\n"
-" Your options are: \n"
-" <itemizedlist>\n"
-" <listitem><para>\n"
-" <guiicon>An Envelope</guiicon> which indicates "
-"whether a message has been read (closed for unread, open for read).\n"
-" </para></listitem>\n"
-"\n"
-" <listitem><para>\n"
-" <guiicon>An Exclamation Point</guiicon> for "
-"priority\n"
-" </para></listitem>\n"
-"\n"
-" <listitem><para>\n"
-" <guiicon>A Penguin</guiicon> which indicates "
-"something, although I'm not sure what.\n"
-" </para></listitem>\n"
-"\n"
-" <listitem><para>\n"
-" <guiicon>A Paper Clip</guiicon> which indicates "
-"that there is an attachment to the message.\n"
-" </para></listitem>\n"
-"\n"
-" <listitem><para>\n"
-" <guilabel>From</guilabel>, for the "
-"<guilabel>From</guilabel> field of a message.\n"
-" </para></listitem>\n"
-" <listitem><para>\n"
-" <guilabel>Subject</guilabel>, for the "
-"<guilabel>Subject</guilabel> field of a message.\n"
-" </para></listitem>\n"
-"\n"
-" <listitem><para>\n"
-" <guilabel>Date</guilabel>, for the date and time a "
-"message was sent.\n"
-" </para></listitem>\n"
-"\n"
-" <listitem><para>\n"
-" <guilabel>Received</guilabel>, for the date and "
-"time you got the message. \n"
-" </para></listitem>\n"
-"\n"
-" <listitem><para>\n"
-" <guilabel>To</guilabel>, for the "
-"<guilabel>To</guilabel> field.\n"
-" </para></listitem>\n"
-"\n"
-" <listitem><para>\n"
-" <guilabel>Size</guilabel>, for a message's size.\n"
-" </para></listitem>\n"
-"\t\t </itemizedlist>\n"
-" </para> \n"
-"\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Alignment</guimenuitem></term>\n"
-"\t <listitem><para> Use this item to decide upon the\n"
-"\t alignment of the message attributes within their\n"
-"\t columns. </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Best Fit</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t\t Alters the width of the message list columns to maximize the amount of "
-"information displayed.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Format Columns...</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t\t This item is not yet available.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Customize\n"
-"\t Views...</guimenuitem></term> <listitem><para> Opens a\n"
-"\t dialog box that lets you choose a complex set of\n"
-"\t arrangements for your message list, so you can combine\n"
-"\t sorting and grouping in as many ways as you like.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-" </variablelist>\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" <variablelist>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Ordenar Ascendentemente</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t\t Ordenar la lista, en orden ascendente, según el atributo sobre el que\n"
-" pulsó.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Ordenar Descendentemente</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t\t Ordenar la lista en orden descendente.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-" \n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Desordenar</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t\t Deshacer cualquier ordenación mediante este atributo, y dejar la lista\n"
-" según el orden anterior.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Agrupar según este Campo</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t\t En lugar de ordenar los mensajes, los agrupa en cajas. \n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Agrupar por Caja</guimenuitem></term>\n"
-"\t <listitem><para> Si tiene los mensajes agrupados en cajas,\n"
-"\t puede agrupar del mismo modo las cajas, eligiendo este\n"
-"\t elemento. </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Quitar esta columna</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t\t Elija esto para quitar una columna de la vista de la lista de "
-"mensajes.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Selector de Campos</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t\t Abre una paleta de columnas. Usted puede arrastra las columnas\n"
-"\t\t que quiera desde la paleta hasta la posición en la barra de cabecera\n"
-"\t\t de la lista de mensajes; aparecen flechas rojas cunado se acerca los\n"
-"\t\t suficiente a una posición posible.</para>\n"
-" \n"
-" <para>\n"
-" Sus opciones son: \n"
-" <itemizedlist>\n"
-" <listitem><para>\n"
-" <guiicon>Un Sobre</guiicon> el cual indica cuando "
-"un mensaje a sido leído (cerrado para no leído, abierto para leído).\n"
-" </para></listitem>\n"
-"\n"
-" <listitem><para>\n"
-" <guiicon>Un Signo de Exclamación</guiicon> para la "
-"prioridad\n"
-" </para></listitem>\n"
-"\n"
-" <listitem><para>\n"
-" <guiicon>Un Pingüino</guiicon> el cual indica algo, "
-"aunque no estoy seguro de que.\n"
-" </para></listitem>\n"
-"\n"
-" <listitem><para>\n"
-" <guiicon>Un Clip</guiicon> el cual indica que hay "
-"un adjunto en el mensaje.\n"
-" </para></listitem>\n"
-"\n"
-" <listitem><para>\n"
-" <guilabel>De</guilabel>, para el campo "
-"<guilabel>De</guilabel> del mensaje.\n"
-" </para></listitem>\n"
-" <listitem><para>\n"
-" <guilabel>Asunto</guilabel>, para el campo "
-"<guilabel>Asunto</guilabel> del mensaje.\n"
-" </para></listitem>\n"
-"\n"
-" <listitem><para>\n"
-" <guilabel>Fecha</guilabel>, para la fecha y la hora "
-"en que se mandó el mensaje.\n"
-" </para></listitem>\n"
-"\n"
-" <listitem><para>\n"
-" <guilabel>Recibido</guilabel>, para la fecha y la "
-"hora en la que recibió en mensaje. \n"
-" </para></listitem>\n"
-"\n"
-" <listitem><para>\n"
-" <guilabel>A</guilabel>, para el campo "
-"<guilabel>A</guilabel>.\n"
-" </para></listitem>\n"
-"\n"
-" <listitem><para>\n"
-" <guilabel>Tamaño</guilabel>, para el tamaño del "
-"mensaje.\n"
-" </para></listitem>\n"
-"\t\t </itemizedlist>\n"
-" </para> \n"
-"\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Alineación</guimenuitem></term>\n"
-"\t <listitem><para> Use este elemento para decidir sobre la alineación\n"
-"\t de los atributos de los mensajes en sus columnas.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Mejor Colocación</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t\t Modifica el ancho de las columnas de la lista de mensajes para\n"
-"maximizar la cantidad de información mostrada.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Formato de las Columnas...</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t\t Este elemento no está disponible todavía.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Personalizar\n"
-"\t Vistas...</guimenuitem></term> <listitem><para> Abre una\n"
-"\t caja de diálogo que le permite elegir una ordenación compleja para\n"
-"\t su lista de mensajes, así puede combinar ordenar y agrupar de "
-"tantas\n"
-"\t maneras como quiera.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-" </variablelist>\n"
-" </para>\n"
-
-#: tmp/menuref.sgml.h:202
-msgid ""
-" <para>\n"
-" <variablelist>\n"
-"\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Open in New Window</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t Displays the selected message in a new window.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Edit Message</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t Open the selected message in the message composer. You\n"
-" can only edit a message you have written: drafts and messages "
-"in \n"
-" the <guilabel>Sent</guilabel> box. \n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Print Message</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t Displays the <interface>Print Preview</interface> window, \n"
-" ready for printing.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Reply to Sender</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t Opens a message composition window addressed to the\n"
-" author of the message. Covered in detail in \n"
-" <xref linkend=\"usage-mail-getnsend-send-reply\">.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Reply to All</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t Opens a message composition window addressed to the\n"
-" author of the message and all known recipients.\n"
-" Covered in detail in <xref "
-"linkend=\"usage-mail-getnsend-send-reply\">.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Forward</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t Appends the body of the selected message to a new message.\n"
-" Covered in detail in <xref "
-"linkend=\"usage-mail-getnsend-fwd\">. \n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Delete Message</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t Marks a message for deletion.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Move Message</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t Choose a folder in which to place this message.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Copy Message</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t Copy the selected message to another folder.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>VFolder on Subject</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t This item, and the three that follow it, will create vFolders \n"
-" which you may customize further or save as-is. This one will\n"
-" create a vFolder which will display all messages that contain "
-"the \n"
-" subject line of the selected message. \n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>VFolder on Sender</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t Creates a vFolder to hold all messages from the sender of\n"
-" the selected message.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>VFolder on Recipients</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t Creates a VFolder to hold all messages addressed to the \n"
-" recipient of the selected message.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Filter on Subject</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t This item, and the three that follow it, will create Filters \n"
-" for which you must select actions. You may keep the criteria "
-"as \n"
-" they are, or alter them as you wish. This one will\n"
-" create a filter which will affect all messages that contain "
-"the \n"
-" subject line of the selected message. \n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Filter on Sender</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t Creates a filter which affects all messages from the sender of\n"
-" the selected message.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Filter on Recipients</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t Creates a filter which will affect all messages addressed to the \n"
-" recipient of the selected message.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t</variablelist>\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" <variablelist>\n"
-"\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Abrir en una Nueva Ventana</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t Muestra el mensaje seleccionado en una nueva ventana.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Editar Mensaje</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t Abre el mensaje seleccionado en el compositor de mensajes. Solo\n"
-" puede editar mensajes que haya escrito usted: drafts y "
-"mensajes en \n"
-" la carpeta <guilabel>Enviados</guilabel>.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Imprimir Mensaje</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t Muestra la ventana de <interface>Vista Previa</interface>, \n"
-" lista para imprimir.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Responder al Remitente</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t Abre una ventana con el compositor de mensajes con la dirección\n"
-" puesta al autor del mensaje. Cubierto en detalle en \n"
-" <xref linkend=\"usage-mail-getnsend-send-reply\">.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Responder a Todos</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t Abre una ventana con el compositor de mensajes con la dirección\n"
-" puesta al autor del mensaje y a todos los destinatarios conocidos.\n"
-" Cubierto en detalle en <xref "
-"linkend=\"usage-mail-getnsend-send-reply\">.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Reenviar</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t Adjunta el cuerpo del mensaje seleccionado a un nuevo mensaje.\n"
-" Cubierto en detalle en <xref "
-"linkend=\"usage-mail-getnsend-fwd\">. \n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Borrar Mensaje</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t Marca un mensaje para borrar.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Mover Mensaje</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t Elije una carpeta a la cual enviar este mensaje.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Copiar Mensaje</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t Copia el mensaje seleccionado a otra carpeta.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>VFolder según el Asunto</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t Este elemento, y los tres que le siguen, crearán carpetas \n"
-" virtuales que podrá personalizar más o guardar tal cual. Este creará una\n"
-" carpeta virtual que mostrará todos los mensajes que contengan "
-"la \n"
-" línea del asunto del mensaje seleccionado. \n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>VFolder según el Remitente</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t Crea una carpeta virtual para poner en ella todos los mensajes del\n"
-" remitente del mensaje seleccionado.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>VFolder según Destinatarios</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t Crea una carpeta virtaul para poner en ella todos enviados a los \n"
-" destinatarios del mensaje seleccionado.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Filtro según el Asunto</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t Este elemento, y los tres siguientes, crearán filtros para los que "
-"\n"
-" debe elegir una acción. Puede conservar el criterio como \n"
-" está, o modificarla como quiera. Este creará un filtro que\n"
-" afectará a todos los mensajes que contengan la línea del \n"
-" asunto del mensaje seleccionado. \n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Filtrar según Remitente</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t Crea un filtro que afectará a todos los mensajes del remitente del\n"
-" mensaje seleccionado.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Filtrar según Destinatarios</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t Crea un filtro que afectará a todos los mensajes dirigidos a los \n"
-" destinatarios del mensaje seleccionado.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t</variablelist>\n"
-" </para>\n"
-
-#: tmp/menuref.sgml.h:334
-msgid ""
-" <para>\n"
-" The <guimenu>Edit</guimenu> menu in the message composer\n"
-" contains the following items. Keyboard shortcuts are listed\n"
-" next to the items in the menus themselves.\n"
-"\n"
-" <variablelist>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Undo</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Undoes the last action you performed.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-" \t <varlistentry>\n"
-"\t <term><guimenuitem>Redo</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" If you change your mind about Undoing something, \n"
-" you can always use this item.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Cut</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Removes the selected text from the text entry window and \n"
-" retains it in the system \"clipboard\" memory, ready for "
-"pasting.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Copy</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Copies selected text to the system clipboard without deleting "
-"it.\n"
-" The text can then be inserted elsewhere with the \n"
-" <guimenuitem>Paste</guimenuitem> command.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Paste</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Inserts the contents of the system clipboard at the \n"
-" location of the cursor.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Find</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Enter a phrase and find your match in your message body.\n"
-" As with <guimenuitem>Find Regex</guimenuitem>, \n"
-" <guimenuitem>Find Again</guimenuitem>, and\n"
-" <guimenuitem>Replace</guimenuitem>, "
-"<application>Evolution</application>\n"
-" will offer you the option to search forwards or backwards.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Find Regex</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" If you are familiar with <glossterm>regular "
-"expressions</glossterm>,\n"
-" often called \"regexes,\" you can search for something more "
-"complicated, \n"
-" using wildcards and boolean logic.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Find Again</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Repeats your last search.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Replace</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Enter a word or phrase and the word or phrase with which "
-"you'd like\n"
-" to replace it. \n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Properties</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" This item brings up the Message Composer Properties Capplet, "
-"\n"
-" a portion of the GNOME Control Center that determines the \n"
-" key bindings for the message composer. Help for this capplet "
-"is \n"
-" available directly from the Control Center.\n"
-" (FIXME: Write that help doc too) (FIXME: this is in the wrong "
-"place!)\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t</variablelist>\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" El menú <guimenu>Editar</guimenu> en el compositor de mensajes\n"
-" contiene los siguientes elementos. Los atajos de teclado están\n"
-" al lado de los elementos en los propios menús.\n"
-"\n"
-" <variablelist>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Deshacer</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Deshace la última acción realizada.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-" \t <varlistentry>\n"
-"\t <term><guimenuitem>Rehacer</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Si cambia de idea sobre Deshacer algo, \n"
-" siempre puede usar esta opción.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Cotar</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Elimina el texto seleccionado de la ventana de edición y lo "
-"\n"
-" guarda en la memoria del \"portapapeles\" del sistema, listo "
-"para pegarlo.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Copia</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Copia el texto seleccionado al portapapeles del sistema sin "
-"borrarlo.\n"
-" Entoces el texto puede ser insertado en otra parte con el \n"
-" comando <guimenuitem>Pegar</guimenuitem>.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Pegar</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Inserta el contenido del portapapeles del sistema en la \n"
-" posición del cursor.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Buscar</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Escriba una frase y encuantra las coincidencias en el cuerpo "
-"\n"
-" del mensaje. Como con \n"
-" <guimenuitem>Buscar Expresión</guimenuitem>, \n"
-" <guimenuitem>Buscar de nuevo</guimenuitem>, y\n"
-" <guimenuitem>Remplazar</guimenuitem>, "
-"<application>Evolution</application>\n"
-" le ofrecerá la opción de buscar hacia adelante o hacia "
-"atras.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Buscar Expresión</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Si esta familiarizado con las <glossterm>expresiones "
-"regulares</glossterm>,\n"
-" ha veces llamadas \"regexes\", puede buscar cosas más "
-"complicadas, \n"
-" usando comodines y lógica booleana.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Buscar de nuevo</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Repite la última búsqueda.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Remplazar</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Escriba una palabra o frase y la palabra o frase por la que "
-"le gustaría\n"
-" reemplazarla. \n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Propiedades</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Esta opción muestra el Capplet de Propiedades del Compositor "
-"de Mensajes,\n"
-" una parte del Centro de Control de GNOME ue determina la \n"
-" asociación de teclas en el compositor de mensajes. La ayuda "
-"para este capplet está \n"
-" disponible directamente en el Centro de Control.\n"
-" (FIXME: Write that help doc too) (FIXME: this is in the wrong "
-"place!)\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t</variablelist>\n"
-" </para>\n"
-
-#: tmp/menuref.sgml.h:430
-msgid ""
-" <para>\n"
-" The items in this menu relate to\n"
-" <application>Evolution</application> mail messages. Most of\n"
-" them require you to have a message selected, and are also\n"
-" available by right-clicking on a message in the message\n"
-" list.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Las opciones de este menú se refieren a los mensajes de correo de\n"
-" <application>Evolution</application>. La mayoría de ellos\n"
-" requieren que haya un mensaje seleccionado, y están tambien\n"
-" disponibles pulsando con el botón derecho sobre un mensaje de la\n"
-" lista de mensajes.\n"
-" </para>\n"
-
-#: tmp/menuref.sgml.h:438
-msgid ""
-" <para>\n"
-" The items in this menu relate to \n"
-" <application>Evolution</application> mail folders.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Estos elementos de este menú se refieren a las carpetas de \n"
-" correo de <application>Evolution</application>.\n"
-" </para>\n"
-
-#: tmp/menuref.sgml.h:443
-msgid ""
-" <para>\n"
-" You can:\n"
-" <variablelist>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Mark all as Read</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t <application>Evolution</application> keeps track of which messages \n"
-"\t you've seen; to mark everything in a folder as read, choose this "
-"item.\n"
-"\t You can mark a single message as read by right-clicking it in the "
-"message bar.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Delete All</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t This is a favorite item of everyone with too much junk-mail: one "
-"click, and it \n"
-"\t deletes every message in the current folder. \n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Expunge</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Empties the trash folder, erasing messages permanently. \n"
-" Once you've done this, they're gone for good.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Configure Folder</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Use this item to set the file format in which\n"
-" <application>Evolution</application> stores mail. You\n"
-" can choose from standard UNIX-style\n"
-" <systemitem><filename>mbox</filename></systemitem>\n"
-" files, or the\n"
-" <systemitem><filename>mh</filename></systemitem> format.\n"
-" Converting large mailboxes may take a long time, and\n"
-" it's a good idea to have a backup copy beforehand.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t</variablelist>\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Usted puede:\n"
-" <variablelist>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Marcar todos como Leídos</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t <application>Evolution</application> se acuerda de que mensajes ha \n"
-"\t leído; para marcar todos los mensajes de una carpeta como leídos "
-"elija esta opción.\n"
-"\t Puede marcar un solo mensaje como leído pulsando con el botón "
-"derecho en la barra de mensajes.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Borrar Todos</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t Esta es la opción favorita de todo aquel con demasiado correo "
-"basura: un click, y borra \n"
-"\t todos los mensajes de la carpeta actual. \n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Comprimir</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Vacia la carpeta de la papelera, borrando los mensajes "
-"permanentemente. \n"
-" Un vez que ha echo esto, son eliminados para siempre.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Configurar Carpeta</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Use esta opción para seleccionar el formato de archivo en el\n"
-" que <application>Evolution</application> guarda el correo.\n"
-" Puede elegir entre archivos tipo\n"
-" <systemitem><filename>mbox</filename></systemitem> estandar\n"
-" al estilo UNIX, o el formato\n"
-" <systemitem><filename>mh</filename></systemitem>.\n"
-" Convertir buzones grandes tarda mucho tiempo, y es una buena\n"
-" idea tener una copia de seguridad antes de la conversión.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t</variablelist>\n"
-" </para>\n"
-
-#: tmp/menuref.sgml.h:490
-msgid ""
-" <para>\n"
-" At the top of the message list is the message list heading\n"
-" bar; you can click on an individual heading &mdash;\n"
-" <guilabel>Subject</guilabel>, for example, to have the\n"
-" message list sorted by that attribute. However, if you right\n"
-" click on a heading, you'll get the following menu:\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" En la parte superior de la lista de mensajes está la cabecera de\n"
-" la lista de mensajes. Puede pulsar en cualquiera de los títulos\n"
-" individuales &mdash;\n"
-" <guilabel>Asunto</guilabel>, por ejemplo, para ordenar la lista\n"
-" de mensajes por ese atributo. Eso si, si pulsa el botón derecho\n"
-" sobre uno de los títulos, obtendrá el siguiente menú:\n"
-" </para>\n"
-
-#: tmp/menuref.sgml.h:498
-msgid ""
-" <para>\n"
-" FIXME: this menu is copied and pasted entirely from somewhere\n"
-" else.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" ARREGLAME: este menú esta copiado y pegado completamente de otro\n"
-" sitio.\n"
-" </para>\n"
-
-#: tmp/menuref.sgml.h:503
-msgid ""
-" <para>\n"
-" The contents of the Edit menu are currently so borked that I\n"
-" refuse to document them right now. (That means FIXME). They\n"
-" should be:\n"
-"\n"
-" <variablelist>\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Item</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Description\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Item</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Description\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t \n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Item</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Description\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t</variablelist>\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" El contenido del menu Editar no esta todavía fijo, así que no lo\n"
-" voy a documentar todavía. (Esto significa ARREGLAME). Deberian\n"
-" ser:\n"
-"\n"
-" <variablelist>\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Elemento</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Descripción\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Elemento</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Descripción\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t \n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Elemento</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Descripción\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t</variablelist>\n"
-" </para>\n"
-
-#: tmp/menuref.sgml.h:531
-msgid ""
-" <para>\n"
-" This menu allows you to look at different appointments, and\n"
-" set the way you look at them, without having to move back to\n"
-" the <interface>Main Window</interface>. It contains:\n"
-" <variablelist>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guisubmenu>Previous</guisubmenu></term>\n"
-"\t <listitem><para>\n"
-" The items in this submenu will take you to appointments\n"
-" prior to the current one. (FIXME: describe).\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guisubmenu>Next</guisubmenu></term>\n"
-"\t <listitem><para>\n"
-" The items in this submenu will take you to appointments\n"
-" scheduled to occur after the current one. (FIXME: describe).\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Calendar</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" FIXME: What does this item do?\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guisubmenu>Toolbars</guisubmenu></term>\n"
-"\t <listitem><para>\n"
-" The <guisubmenu>Toolbars</guisubmenu> submenu \n"
-" allows you to choose which toolbars\n"
-" are displayed in the \n"
-" <interface>Appointment Editor</interface>. They are:\n"
-" <itemizedlist>\n"
-"\t\t <listitem><para>\n"
-" <guimenuitem>Standard</guimenuitem> &mdash;\n"
-" Toggle the standard toolbar on and off.\n"
-" </para></listitem>\n"
-"\n"
-"\t\t <listitem><para>\n"
-" <guimenuitem>Formatting</guimenuitem> &mdash;\n"
-" Toggle the formatting toolbar on and off.\n"
-" </para></listitem>\n"
-"\t\n"
-"\t\t <listitem><para>\n"
-" <guimenuitem>Customize</guimenuitem> &mdash;\n"
-" Select the contents of the formatting and standard "
-"toolbars.\n"
-" </para></listitem>\n"
-"\t\t</itemizedlist>\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t</variablelist>\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Este menú le permite ver distintas citas, y configurar la forma de\n"
-" verlas, sin tener que volver a la <interface>Ventana \n"
-" Principal</interface>. Contiene:\n"
-" <variablelist>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guisubmenu>Previa</guisubmenu></term>\n"
-"\t <listitem><para>\n"
-" La opción de este sub-menú le llevará a la cita anterior a\n"
-" la actual. (FIXME: describe).\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guisubmenu>Suiguiente</guisubmenu></term>\n"
-"\t <listitem><para>\n"
-" La opción de este sub-menú le llevará a la cita programada\n"
-" para despues de la actual. (FIXME: describe).\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Calendario</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" FIXME: What does this item do?\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guisubmenu>Barras de Herramientas</guisubmenu></term>\n"
-"\t <listitem><para>\n"
-" El sub-menú <guisubmenu>Barras de Herramientas</guisubmenu> \n"
-" le permite elegir que barras de herramientas son mostradas en\n"
-" el <interface>Editor de Citas</interface>. Estas son:\n"
-" <itemizedlist>\n"
-"\t\t <listitem><para>\n"
-" <guimenuitem>Estandar</guimenuitem> &mdash;\n"
-" Activa y desactiva la barra de herramientas estandar.\n"
-" </para></listitem>\n"
-"\n"
-"\t\t <listitem><para>\n"
-" <guimenuitem>Formato</guimenuitem> &mdash;\n"
-" Activa y desactiva la barra de herramientas de formato.\n"
-" </para></listitem>\n"
-"\t\n"
-"\t\t <listitem><para>\n"
-" <guimenuitem>Personalizada</guimenuitem> &mdash;\n"
-" Selecciona los contenidos de las barras de herramientas "
-"de formato y de la estandar.\n"
-" </para></listitem>\n"
-"\t\t</itemizedlist>\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t</variablelist>\n"
-" </para>\n"
-
-#: tmp/menuref.sgml.h:588
-msgid ""
-" <para>\n"
-" This menu contains five items:\n"
-" <variablelist>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Save</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" \n"
-" </para></listitem>\n"
-"\t </varlistentry>\t\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Save As</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Allows you to save the contact as an external \n"
-" file in the <glossterm linkend=\"vcard\">VCard</glossterm> "
-"format. \n"
-" </para></listitem>\n"
-"\t </varlistentry>\t\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Print</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Prints the current contact.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\t\n"
-"\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Delete</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Deletes the current contact.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\t\n"
-"\n"
-" \n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Close</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Closes the Contact Editor without saving.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\t\n"
-"\n"
-"\t</variablelist> \n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Este menú contiene cinco opciones:\n"
-" <variablelist>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Guardar</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" \n"
-" </para></listitem>\n"
-"\t </varlistentry>\t\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Guardar como</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Le permite guardar el contacto como un archivo externo en el \n"
-" formato <glossterm linkend=\"vcard\">VCard</glossterm>. \n"
-" </para></listitem>\n"
-"\t </varlistentry>\t\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Imprimir</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Imprime el contacto actual.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\t\n"
-"\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Borrar</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Borra el contacto actual.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\t\n"
-"\n"
-" \n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Cerrar</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Cierra el Editor de Contactos sin guardar.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\t\n"
-"\n"
-"\t</variablelist> \n"
-" </para>\n"
-
-#: tmp/menuref.sgml.h:633
-msgid ""
-" <para>\n"
-" This menu contains four items, including the\n"
-" <guisubmenu>Forms</guisubmenu> submenu, which allows you to\n"
-" alter calendar forms and create your own entries. None of\n"
-" this works yet, though.\n"
-"\n"
-" <variablelist>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Spelling</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Checks the spelling of your calendar entry.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Check Names</guimenuitem></term>\n"
-"\t <listitem><para> Checks the names listed here against\n"
-"\t those in your address book.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Address Book</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" FIXME: ?\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guisubmenu>Forms</guisubmenu> Submenu</term>\n"
-"\t <listitem><para>\n"
-" The Forms submenu lets you alter the\n"
-"\t appearance of Calendar Forms. \n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t</variablelist>\n"
-"\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Este menú contiene cuatro opciones, incluyendo el sub-menú\n"
-" <guisubmenu>Formularios</guisubmenu>, el caul le permite modificar\n"
-" los formularios de los calendararios y crear sus propias entradas.\n"
-" Esto todavia no funciona.\n"
-"\n"
-" <variablelist>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Corrector Ortográfico</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Comprueba la ortografía en las entradas del calendario.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Comprobar Nombres</guimenuitem></term>\n"
-"\t <listitem><para> Comprueba los nombres aquí enumerados contra los de\n"
-"\t su agenda de direcciones.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Agenda de Direcciones</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" FIXME: ?\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guisubmenu>Formularios</guisubmenu> Sub-menú</term>\n"
-"\t <listitem><para>\n"
-" El sub-menú Formularios le permite modificar la apariencia "
-"de\n"
-"\t de los Formularios del Calendario. \n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t</variablelist>\n"
-"\n"
-" </para>\n"
-
-#: tmp/menuref.sgml.h:675
-msgid ""
-" <para>\n"
-" This menu contains one item:\n"
-"\n"
-" <variablelist>\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Search for\n"
-"\t Contacts</guimenuitem></term> <listitem><para> Brings up\n"
-"\t the in-depth search window. <xref\n"
-"\t linkend=\"contact-search\"> describes how to use this\n"
-"\t feature. </para></listitem>\n"
-" </varlistentry>\n"
-" </variablelist>\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Este menú contiene una opción:\n"
-"\n"
-" <variablelist>\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Buscar un\n"
-"\t Contacto</guimenuitem></term> <listitem><para> Abre una ventana\n"
-"\t para una busqueda en profundidad. <xref\n"
-"\t linkend=\"contact-search\"> describe como usar esta característica.\n"
-"\t </para></listitem>\n"
-" </varlistentry>\n"
-" </variablelist>\n"
-" </para>\n"
-
-#: tmp/menuref.sgml.h:689
-msgid ""
-" <para>\n"
-" This menu contains only one item:\n"
-"\n"
-" <variablelist>\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>New Directory Server</guimenuitem></term> "
-"<listitem><para> Brings up\n"
-"\t the in-depth search window. <xref\n"
-"\t linkend=\"config-prefs-contact-ldap-add\"> describes how to use this\n"
-"\t feature. </para></listitem>\n"
-" </varlistentry>\n"
-" </variablelist>\n"
-"\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Este menú contiene unia sola opción:\n"
-"\n"
-" <variablelist>\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Nuevo Servidor de Directorio</guimenuitem></term> "
-"<listitem><para> Muestra una ventana\n"
-"\t de búsqueda en profundidad. <xref\n"
-"\t linkend=\"config-prefs-contact-ldap-add\"> describe como usar esta\n"
-"\t característica. </para></listitem>\n"
-" </varlistentry>\n"
-" </variablelist>\n"
-"\n"
-" </para>\n"
-
-#: tmp/menuref.sgml.h:703
-msgid ""
-" <para>\n"
-" This menu contains several items, including a "
-"<guisubmenu>New</guisubmenu> submenu\n"
-" that is identical to that in the \n"
-" <link linkend=\"menuref-universal-file\">main window's file "
-"menu</link>.\n"
-" Its other contents are:\n"
-" <variablelist>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Send</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Opens a mail message with the appointment attached to it.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Save</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Save this appointment in the existing location and name. If "
-"you have not yet\n"
-" chosen a location and name, this is the same as "
-"<guimenuitem>Save As</guimenuitem>.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Save As</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Choose a location and name for this appointment, and save it.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Delete</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Deletes the appointment.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Move to Folder</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Chose a folder, and move the appointment into it.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Copy to Folder</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Chose a folder, and put a copy of the appointment into it.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Page Setup Submenu</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" This menu contains two items:\n"
-" <itemizedlist>\n"
-"\t\t <listitem><para>\n"
-" <guimenuitem>Memo Style</guimenuitem> &mdash;\n"
-" FIXME: What does this do?\n"
-" </para></listitem>\n"
-"\n"
-"\t\t <listitem><para>\n"
-" <guimenuitem>Define Print Styles</guimenuitem> &mdash;\n"
-" FIXME: What does this do?\n"
-" </para></listitem>\n"
-"\t\t</itemizedlist>\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Print Preview</guimenuitem></term>\n"
-"\t <listitem><para> Shows you what your appointment will look\n"
-"\t like if you print it. See <xref linkend=\"usage-print\">\n"
-"\t for details on printing and the Print Preview function.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Print</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Prints the appointment without preview.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Properties</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" FIXME: What does this do?\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Close</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Close the appointment editor window.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t</variablelist>\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Este menú contiene varias opciones, incluyendo un sub-menú "
-"<guisubmenu>Nuevo</guisubmenu> que es identico al del \n"
-" <link linkend=\"menuref-universal-file\">menú archivo de la ventana "
-"principal</link>.\n"
-" Sus otros contenidos son:\n"
-" <variablelist>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Enviar</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Abre un mensaje de correo con la cita adjunta a el.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Guardar</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Guarda esta cita en la posición y nombre actual. Si todavía no "
-"ha elegido\n"
-" una posición y un nombre, esto es lo mismo que "
-"<guimenuitem>Guardar Como</guimenuitem>.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Guaradar Como</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Eliga una posición y un nombre para esta cita, y guardela.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Borrar</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Borra la cita.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Mover a una Carpeta</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Elija una carpeta, y mueva a ella la cita.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Copiar a una Carpeta</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Elija una carpeta, y ponga en ella una copia de la cita.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Sub-menú de Configuración de "
-"Página</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Este menú contiene dos opciones:\n"
-" <itemizedlist>\n"
-"\t\t <listitem><para>\n"
-" <guimenuitem>Estilo del Memorando</guimenuitem> &mdash;\n"
-" FIXME: What does this do?\n"
-" </para></listitem>\n"
-"\n"
-"\t\t <listitem><para>\n"
-" <guimenuitem>Definir Estilos de Impresión</guimenuitem> "
-"&mdash;\n"
-" FIXME: What does this do?\n"
-" </para></listitem>\n"
-"\t\t</itemizedlist>\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Vista Previa</guimenuitem></term>\n"
-"\t <listitem><para> Muestra el aspecto que tendrán su cita si la\n"
-" imprime. Vea <xref linkend=\"usage-print\">\n"
-"\t para más detalles sobre imprimir y la función de Vista Previa.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Imprimir</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Imprime la cita sin vista previa.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Propiedades</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" FIXME: What does this do?\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Cerrar</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Cierra la ventana del editor de citas.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t</variablelist>\n"
-" </para>\n"
-
-#: tmp/menuref.sgml.h:809
-msgid ""
-" <para>\n"
-" This menu contains two items, neither of which\n"
-" have any functionality yet:\n"
-" <variablelist>\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Font</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" FIXME: ?\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Paragraph</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" FIXME: ?\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t</variablelist>\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Thite menú contiene dos opciones, ninguna de las cuales tiene\n"
-" funcionalidad alguna todavía:\n"
-" <variablelist>\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Fente</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" FIXME: ?\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Parrafo</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" FIXME: ?\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t</variablelist>\n"
-" </para>\n"
-
-#: tmp/menuref.sgml.h:830
-msgid ""
-" <para>\n"
-" This menu is empty.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Este menú está vacío.\n"
-" </para>\n"
-
-#: tmp/menuref.sgml.h:834
-msgid ""
-" <para>\n"
-" <variablelist>\n"
-"\t <varlistentry>\n"
-"\t <term><guimenu>Open</guimenu></term>\n"
-"\t <listitem><para>\n"
-"\t\t Open a text file or a draft mail message.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenu>Save</guimenu></term>\n"
-"\t <listitem><para>\n"
-"\t\t Save a mail message as a text file.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenu>Save As</guimenu></term>\n"
-"\t <listitem><para> \n"
-"\t\tChoose a file name and location for\n"
-"\t\ta message you want to save as a text file.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenu>Save in Folder</guimenu></term>\n"
-"\t <listitem><para>\n"
-"\t\t Save a message as a draft, rather than \n"
-"\t\t as a separate text file.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenu>Insert Text File</guimenu></term>\n"
-"\t <listitem><para>\n"
-"\t\t Open a text file and insert it into \n"
-"\t\t the current message. (FIXME: belongs under \"Insert\").\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t \n"
-"\t <varlistentry>\n"
-"\t <term><guimenu>Send Now</guimenu></term>\n"
-"\t <listitem><para>\n"
-"\t\t Sends the message immediately.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenu>Send Later</guimenu></term>\n"
-"\t <listitem><para>\n"
-"\t\t Queue \n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenu>Close</guimenu></term>\n"
-"\t <listitem><para>\n"
-"\t\t Closes the message composer. If you have not done so, \n"
-"\t\t <application>Evolution</application>\n"
-"\t\t will ask you if you want to save your message.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t</variablelist>\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" <variablelist>\n"
-"\t <varlistentry>\n"
-"\t <term><guimenu>Abrir</guimenu></term>\n"
-"\t <listitem><para>\n"
-"\t\t Abre un archivo de texto o el borrador de un mensaje.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenu>Guardar</guimenu></term>\n"
-"\t <listitem><para>\n"
-"\t\t Guarda un mensaje de correo como un archivo de texto.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenu>Guardar Como</guimenu></term>\n"
-"\t <listitem><para> \n"
-"\t\tElija un nombre de archivo y un lugar para\n"
-"\t\tel mensaje que quiere guardar como un archivo de texto.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenu>Guardar en una Carpeta</guimenu></term>\n"
-"\t <listitem><para>\n"
-"\t\t Guarda un mensaje como un borrador, en lugar de como \n"
-"\t\t un archivo de texto independiente.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenu>Insertar Archivo de Texto</guimenu></term>\n"
-"\t <listitem><para>\n"
-"\t\t Abre un archivo de texto y lo inserta en el mensaje \n"
-"\t\t actual. (FIXME: belongs under \"Insert\").\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t \n"
-"\t <varlistentry>\n"
-"\t <term><guimenu>Enviar Ahora</guimenu></term>\n"
-"\t <listitem><para>\n"
-"\t\t Envia el mensaje inmediatamente.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenu>Enviar más Tarde</guimenu></term>\n"
-"\t <listitem><para>\n"
-"\t\t Lo pone en la cola de mensajes \n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenu>Cerrar</guimenu></term>\n"
-"\t <listitem><para>\n"
-"\t\t Cierra el compositor de mensajes. Si no lo ha echo ya, \n"
-"\t\t <application>Evolution</application>\n"
-"\t\t le preguntará si quiere guardar su mensaje.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t</variablelist>\n"
-" </para>\n"
-
-#: tmp/menuref.sgml.h:899
-msgid ""
-" <para>\n"
-" The <guimenu>Insert</guimenu> menu holds tools that allow you\n"
-" to include images, horizontal rules, and other objects\n"
-" in the body of your message. The tools are:\n"
-" <variablelist>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Image</guimenuitem></term>\n"
-"\t <listitem><para> \n"
-" This tool will prompt you to select an image file to \n"
-" insert into your HTML message. For text messages, this\n"
-" is the same as attaching an image file.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Link</guimenuitem></term>\n"
-"\t <listitem><para> \n"
-" Opens the <interface>link creation window</interface>, \n"
-" which lets you specify the URL and text description\n"
-" for a link in your message. This only works with HTML \n"
-" messages.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Rule</guimenuitem></term>\n"
-"\t <listitem><para> \n"
-" Opens the<interface> horizontal rule creation "
-"dialog</interface>, which lets you\n"
-"\t create an HTML horizontal rule. For more information,\n"
-"\t see <xref linkend=\"usage-mail-getnsend-send-html\">.\n"
-" This tool only works with HTML messages.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Text File</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t Open a text file and insert it into the current message.\n"
-" This tool works with both plain text and HTML messages.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t</variablelist>\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" El menú <guimenu>Insertar</guimenu> contiene herramientas que le\n"
-" permiten incluir imágenes, reglas horizontales, y otros objetos en\n"
-" el cuerpo del mensaje. Las herramientas son:\n"
-" <variablelist>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Imagen</guimenuitem></term>\n"
-"\t <listitem><para> \n"
-" Esta herramienta le pedirá que seleccione una imagen para\n"
-" insertarla en su mensaje en HTML. Para mensajes de texto,\n"
-" esto es lo mismo que adjuntar la imagen.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Enlace</guimenuitem></term>\n"
-"\t <listitem><para> \n"
-" Abre la <interface>ventana de creación de "
-"enlaces</interface>,\n"
-" que le permite especificar la URL y un descripción para el\n"
-" enlace de su mensaje. Tan solo funciona con mensajes en\n"
-" HMTLs.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Regla</guimenuitem></term>\n"
-"\t <listitem><para> \n"
-" Abre el <interface>diálogo de creación de reglas "
-"horizontales</interface>, el cual le permite\n"
-"\t crear una regla horizontal en HTML. Para más información, vea\n"
-"\t <xref linkend=\"usage-mail-getnsend-send-html\">.\n"
-" Esta herramienta solo funciona con mensajes en HTML.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Archivo de Texto</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-"\t Abre un archivo de texto y lo inserta en el mensaje actual.\n"
-" Esta herramienta funciona tanto con mensajes de texto como\n"
-" mensajes en HTML.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t</variablelist>\n"
-" </para>\n"
-
-#: tmp/menuref.sgml.h:944
-msgid ""
-" <para>\n"
-" The <guimenu>View</guimenu> menu controls the way messages are\n"
-" displayed, and how much of the message, its headers, and\n"
-" attachments appear. It contains:\n"
-" <variablelist>\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Show Attachments</guimenuitem></term>\n"
-"\t <listitem><para> \n"
-" Toggles the display of attachments. When this item is "
-"selected,\n"
-" <application>Evolution</application> will create a separate "
-"pane\n"
-" of the composition window to show what attachments you are "
-"appending\n"
-" to the message. \n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t</variablelist>\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" El menú <guimenu>Vista</guimenu> controla la manera en que se\n"
-" muestran sus mensajes, y cuanto del mensaje, de su cabecera y de "
-"los\n"
-" adjuntos se muestra. Contiene:\n"
-" <variablelist>\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Mostrar Adjuntos</guimenuitem></term>\n"
-"\t <listitem><para> \n"
-" Activa el mostrar los adjuntos. Cuando esta opción está "
-"seleccionada,\n"
-" <application>Evolution</application> creará una caja separada\n"
-"de la ventana\n"
-" del compositor de mensajes para mostrar que archivos adjuntos "
-"está añadiendo\n"
-" al mensaje. \n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t</variablelist>\n"
-" </para>\n"
-
-#: tmp/menuref.sgml.h:961
-msgid ""
-" <para>\n"
-" The Calendar's <guimenu>View</guimenu> menu contains the following "
-"items:\n"
-"\n"
-" <variablelist>\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Show Shortcut Bar</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Toggle the Shortcut Bar on and off with this item. "
-" \n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Show Folder Bar</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Toggle the folder bar on and off with this item. \n"
-" See <xref linkend=\"usage-mainwindow-folderbar\"> for \n"
-" more information about the folder bar. \n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t\t \n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>View By Day</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Switch to the day view for your calendar.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\t \n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>View Five Days</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" View five calendar days at once. \n"
-" </para></listitem>\n"
-"\t </varlistentry>\t \n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>View by Week</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Switch the calendar view to full week mode.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-" \n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>View By Month</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Look at a month at a time.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t</variablelist>\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" El menú <guimenu>Vista</guimenu> del calendario contiene las "
-"siguientesins opciones:\n"
-"\n"
-" <variablelist>\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Mostrar la Barra de Atajos</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Active y desactive la barra de atajos con esta opción. \n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Mostrar la Barra de Carpetas</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Active y desactive la barra de carpetas con esta opción. \n"
-" Vea <xref linkend=\"usage-mainwindow-folderbar\"> para \n"
-" más información acerca de la barra de carpetas. \n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t\t \n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Vista por Días</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Cambia el calendario a la vista diaria.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\t \n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Vista Cinco Días</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Muestra cinco días del calendario de una vez. \n"
-" </para></listitem>\n"
-"\t </varlistentry>\t \n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Vista por Semanas</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Cambia el calendario a la vista semanal.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-" \n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Vista por meses</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Vea todo un mes al tiempo.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t</variablelist>\n"
-" </para>\n"
-
-#: tmp/menuref.sgml.h:1011
-msgid ""
-" <para>\n"
-" This menu contains the following items:\n"
-"\n"
-" <variablelist>\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Show Shortcut Bar</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Toggle the Shortcut Bar on and off with this item. "
-" \n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Show Folder Bar</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Toggle the folder bar on and off with this item. \n"
-" See <xref linkend=\"usage-mainwindow-folderbar\"> for \n"
-" more information about the folder bar. \n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t\t \n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>As Table</guimenuitem> / <guimenuitem>As "
-"Minicards</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" View your contacts as a table. \n"
-" When in table-view mode, this menu item reads \n"
-" <guimenuitem>As Minicards</guimenuitem>, and changes the view\n"
-" back to the minicard format.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\t \n"
-"\t</variablelist> \n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Este menú contiene las siguiente opciones:\n"
-"\n"
-" <variablelist>\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Mostrar Barra de Atajos</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Active y desactive la barra de atajos con esta opción. "
-" \n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Muestra la Barra de Carpetas</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Active y descative la barra de carpetas con esta opción. \n"
-" Vea <xref linkend=\"usage-mainwindow-folderbar\"> para \n"
-" más información acerca de la barra de carpetas. \n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t\t \n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Como un Tabla</guimenuitem> / <guimenuitem>As "
-"Minicards</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Vea sus contactos como una tabla. \n"
-" Cuando esta en el modo tabla, está opción del menú aparece\n"
-" como <guimenuitem>Como Minitarjetas</guimenuitem>, y vuelve a\n"
-" cambiar la vista al formato minitarjetas.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\t \n"
-"\t</variablelist> \n"
-" </para>\n"
-
-#: tmp/menuref.sgml.h:1043
-msgid ""
-" <para>\n"
-" This menu contains:\n"
-"\n"
-" <variablelist>\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Schedule Meeting</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Brings up the <interface>Meeting Invitation</interface> "
-"window, \n"
-" described in <xref linkend=\"usage-calendar-apts\">.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Cancel Invitation</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Cancels the event, notifying all attendees. You may be "
-"prompted \n"
-" to specify an invitation message.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Forward as vCalendar</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Opens the message composer with the current event attached.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Forward as Text</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Opens the message composer with a text description of the "
-"current\n"
-" event included in the message body.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t</variablelist>\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Este menú contiene:\n"
-"\n"
-" <variablelist>\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Fijar una Reunión</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Aparece la ventana de <interface>Invitación de "
-"Reunión</interface>, \n"
-" descrita en <xref linkend=\"usage-calendar-apts\">.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Cancelar Invitación</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Cancela el evento, notificandoselo a todos los asistentes. "
-"Puede que le pida que \n"
-" especifique un mensaje.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Reenviar como vCalendar</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Abre el compositor de mensajes con el evento actual adjunto.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Reenviar como Texto</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Abre el compositor de mensajes con una descripción en texto "
-"del evento actual\n"
-" incluida en el cuerpo del mensaje.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t</variablelist>\n"
-" </para>\n"
-
-#: tmp/menuref.sgml.h:1080
-msgid ""
-" <para>\n"
-" This menu contains: (FIXME: Insert Content Here)\n"
-" <variablelist>\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>File</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Choose a file to append to your appointment or appointment "
-"request.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Item</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" FIXME: ?\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Object</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" FIXME: ?\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t</variablelist>\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Este menú contiene: (FIXME: Insert Content Here)\n"
-" <variablelist>\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Archivo</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Elija un archivo para incluir a la cita o al petición de cita.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Elemento</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" FIXME: ?\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Objeto</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" FIXME: ?\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t</variablelist>\n"
-" </para>\n"
-
-#: tmp/menuref.sgml.h:1108
-msgid ""
-" <para>\n"
-" This menu is currently empty.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Este menú está actualmente vacio.\n"
-" </para>\n"
-
-#: tmp/menuref.sgml.h:1112
-msgid ""
-" <para>\n"
-" This menu lets you control the way\n"
-" <application>Evolution</application> displays your information\n"
-" for you.\n"
-" <variablelist>\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Show Shortcut Bar</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Toggle the shortcut bar on and off with this item. "
-"\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Show Folder Bar</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Toggle the folder bar on and off with this item. \n"
-" See <xref linkend=\"usage-mainwindow-folderbar\"> for \n"
-" more information about the folder bar. \n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Threaded Message List</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" This item controls whether your message list is displayed by "
-"thread \n"
-" or by other criteria. The default order is by date; see\n"
-" <xref linkend=\"usage-mail-listorder\"> for information about "
-"the\n"
-" order of the message list.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t</variablelist>\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Este menú le permite controlar el modo en que\n"
-" <application>Evolution</application> le muestra su información.\n"
-" <variablelist>\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Mostrar Barra de Atajos</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Active y desactive la barra de atajos con esta opción. \n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Mostrar Barra de Carpetas</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Active y desactive la barra de carpetas con esta opción. \n"
-" Vea <xref linkend=\"usage-mainwindow-folderbar\"> para \n"
-" más información acerca de la barra de carpetas. \n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Lista de Mensajes Encadenados</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Esta opción controla si la lista de sus mensajes se muestra "
-"siguiendo la cadena de la discusión \n"
-" o por otro criterio. La ordenación por defecto es por "
-"fecha.\n"
-" Vea <xref linkend=\"usage-mail-listorder\"> para más\n"
-"información acerca de \n"
-" como ordenar la lista de mensajes.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t</variablelist>\n"
-" </para>\n"
-
-#: tmp/menuref.sgml.h:1145
-msgid ""
-" <para>\n"
-" <variablelist>\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Mail Filters</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Edit your mail filters here. \n"
-" See <xref linkend=\"usage-mail-organize-filters\">\n"
-" for more information about mail filtering.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t \n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Virtual Folder Editor</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Create, edit, and delete Virtual Folders "
-"(<glossterm>vFolders</glossterm>)\n"
-" with this tool. \n"
-" To learn about using vFolders with mail, see \n"
-" <xref linkend=\"usage-mail-organize-vfolders\">.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t \n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Mail Configuration</guimenuitem></term>\n"
-"\t <listitem><para> \n"
-" Tools for setting up all your mail account preferences.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Manage Subscriptions</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Tools for newsgroup and IMAP folder subscriptions.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Forget Passwords</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" This item will cause <application>Evolution</application>\n"
-"\t to forget what your password is.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t \n"
-"\t</variablelist>\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" <variablelist>\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Filtros de Correo</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Edite aqui sus filtros de correo. \n"
-" Vea <xref linkend=\"usage-mail-organize-filters\">\n"
-" para más información acerca de los filtrar correo.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t \n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Editor de Carpetas Virtuales</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Cree, edite, y borre carpetas virtuales "
-"(<glossterm>vFolders</glossterm>)\n"
-" con esta herramienta. \n"
-" Para aprender acerca de como usar carpetas virtuales con su \n"
-" correo, vea <xref linkend=\"usage-mail-organize-vfolders\">.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t \n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Configuración del Correo</guimenuitem></term>\n"
-"\t <listitem><para> \n"
-" Herramientas para configurar las preferencias de sus cuentas "
-"de correo.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Administrar Suscripciones</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Herramientas para suscribirse a grupos de noticias y para las "
-"carpetas IMAP.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Olvidar Contraseña</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Esta opción hara que <application>Evolution</application>\n"
-"\t olvide sus contraseñas.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t \n"
-"\t</variablelist>\n"
-" </para>\n"
-
-#: tmp/menuref.sgml.h:1191
-msgid ""
-" <para>\n"
-" <variablelist>\n"
-"\t<varlistentry>\n"
-"\t <term><guimenuitem>Help Index</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Displays the table of contents for this document.\n"
-" </para></listitem>\n"
-"\t</varlistentry>\n"
-"\t<varlistentry>\n"
-"\t <term><guimenuitem>Getting Started</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" A quick look around, and a summary of the things\n"
-" <application>Evolution</application> can do for you.\n"
-" </para></listitem>\n"
-"\t</varlistentry>\n"
-"\t<varlistentry>\n"
-"\t <term><guimenuitem>Using the Mailer</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" An in-depth tour of <application>Evolution</application> "
-"Mail.\n"
-" </para></listitem>\n"
-"\t</varlistentry>\n"
-"\t<varlistentry>\n"
-"\t <term><guimenuitem>Using the Calendar</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" A step-by-step guide to using the Calendar.\n"
-" </para></listitem>\n"
-"\t</varlistentry>\n"
-"\t<varlistentry>\n"
-"\t <term><guimenuitem>Using the Contact Manager</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Find your way around the Contact Manager.\n"
-" </para></listitem>\n"
-"\t</varlistentry>\n"
-"\t<varlistentry>\n"
-"\t <term><guimenuitem>Submit Bug Report</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" If you don't report them, they can't fix them. Select this "
-"item to let the \n"
-" developers know what's wrong.\n"
-" </para></listitem>\n"
-"\t</varlistentry>\n"
-"\t<varlistentry>\n"
-"\t <term><guimenuitem>About Evolution</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Displays a window with information about the application and "
-"its authors.\n"
-" This has the same information as <xref linkend=\"authors\">.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t</variablelist>\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" <variablelist>\n"
-"\t<varlistentry>\n"
-"\t <term><guimenuitem>Índice de la Ayuda</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Muestra la tabla de contenidos de este documento.\n"
-" </para></listitem>\n"
-"\t</varlistentry>\n"
-"\t<varlistentry>\n"
-"\t <term><guimenuitem>Comenzando</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Una vista rápida, y un resumen de las cosas que\n"
-" <application>Evolution</application> puede hacer por usted.\n"
-" </para></listitem>\n"
-"\t</varlistentry>\n"
-"\t<varlistentry>\n"
-"\t <term><guimenuitem>Usando el Correo</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Una vista en profundidad del correo de "
-"<application>Evolution</application>.\n"
-" </para></listitem>\n"
-"\t</varlistentry>\n"
-"\t<varlistentry>\n"
-"\t <term><guimenuitem>Usando el Calendario</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Una guía paso a paso sobre como usar el calendario.\n"
-" </para></listitem>\n"
-"\t</varlistentry>\n"
-"\t<varlistentry>\n"
-"\t <term><guimenuitem>Usando el Administrador de "
-"Contactos</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Manejese con el administrador de contactos.\n"
-" </para></listitem>\n"
-"\t</varlistentry>\n"
-"\t<varlistentry>\n"
-"\t <term><guimenuitem>Enviar Reportes de Fallo</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Si usted no se los dice, no podrán arreglarlos. Selececion "
-"esta opción para hacer saber a\n"
-" los desarrolladores lo que falla.\n"
-" </para></listitem>\n"
-"\t</varlistentry>\n"
-"\t<varlistentry>\n"
-"\t <term><guimenuitem>Acerca de Evolution</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Muestra una ventana con información sobre la aplicación y sus "
-"autores.\n"
-" Tiene la misma información que <xref linkend=\"authors\">.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t</variablelist>\n"
-" </para>\n"
-
-#: tmp/menuref.sgml.h:1241
-msgid ""
-" <para> \n"
-" The <guimenu>Format</guimenu> menu has only one item:\n"
-" <variablelist>\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>HTML</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Toggles HTML mode for the message composer. When selected, "
-"\n"
-" the message is displayed and sent in HTML. If you have "
-"written a \n"
-" message in HTML and turn HTML off, most formatting will be "
-"lost.\n"
-" <application>Evolution</application> will attempt to "
-"preserve spacing\n"
-" and to remove formatting gracefully, however.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t</variablelist>\n"
-" </para>\n"
-msgstr ""
-" <para> \n"
-" El menú <guimenu>Formato</guimenu> solo tiene una opción:\n"
-" <variablelist>\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>HTML</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Activa el modo HTML para el compositor de mensajes. Cuando "
-"esta seleccionado, \n"
-" los mensajes se muestran y se envian en HTML. Si ha "
-"escrito un mensaje\n"
-" en HTML y desactiva la opción HTML, se perderá la mayor "
-"parte del formato.\n"
-" Eso si, <application>Evolution</application> intentará "
-"consevar los\n"
-" espacios y eliminar el formato con cuidado.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t</variablelist>\n"
-" </para>\n"
-
-#: tmp/menuref.sgml.h:1257
-msgid " <title>Contact Editor File Menu</title>\n"
-msgstr " <title>Menú Archivo del Editor de Contactos</title>\n"
-
-#: tmp/menuref.sgml.h:1259
-msgid " <title>Contact Manager Edit Menu</title>\n"
-msgstr " <title>Menú Editar del Administrador de Contactos</title>\n"
-
-#: tmp/menuref.sgml.h:1261
-msgid " <title>Contact Manager Tools Menu</title>\n"
-msgstr ""
-" <title>Menú Herramientas del Administrador de Contactos</title>\n"
-
-#: tmp/menuref.sgml.h:1263
-msgid " <title>Contact Manager View Menu</title>\n"
-msgstr " <title>Menú Ver del Administrador de Contactos</title>\n"
-
-#: tmp/menuref.sgml.h:1265
-msgid " <title>File Menu</title>\n"
-msgstr " <title>Menú Archivo</title>\n"
-
-#: tmp/menuref.sgml.h:1267
-msgid " <title>The Appointment Editor's Actions Menu</title>\n"
-msgstr " <title>El Menú Acciones del Editor de Citas</title>\n"
-
-#: tmp/menuref.sgml.h:1269
-msgid " <title>The Appointment Editor's Edit Menu</title>\n"
-msgstr " <title>El Menú Editar del Editor de Citas</title>\n"
-
-#: tmp/menuref.sgml.h:1271
-msgid " <title>The Appointment Editor's File Menu</title>\n"
-msgstr " <title>El Menú Archivo del Editor de Citas</title>\n"
-
-#: tmp/menuref.sgml.h:1273
-msgid " <title>The Appointment Editor's Format Menu</title>\n"
-msgstr " <title>El Menú Formato del Editor de Citas</title>\n"
-
-#: tmp/menuref.sgml.h:1275
-msgid " <title>The Appointment Editor's Insert Menu</title>\n"
-msgstr " <title>El Menú Insertar del Editor de Citas</title>\n"
-
-#: tmp/menuref.sgml.h:1277
-msgid " <title>The Appointment Editor's Tools Menu</title>\n"
-msgstr " <title>El Menú Herramientas del Editor de Citas</title>\n"
-
-#: tmp/menuref.sgml.h:1279
-msgid " <title>The Appointment Editor's View Menu</title>\n"
-msgstr " <title>El Menú Ver del Editor de Citas</title>\n"
-
-#: tmp/menuref.sgml.h:1281
-msgid " <title>The Calendar Edit Menu</title>\n"
-msgstr " <title>El Menú Editar del Calendario</title>\n"
-
-#: tmp/menuref.sgml.h:1283
-msgid " <title>The Calendar Settings Menu</title>\n"
-msgstr " <title>El Menú Configuración del Calendario</title>\n"
-
-#: tmp/menuref.sgml.h:1285
-msgid " <title>The Calendar View Menu</title>\n"
-msgstr " <title>El Menú Ver del Calendario</title>\n"
-
-#: tmp/menuref.sgml.h:1287
-msgid " <title>The Edit Menu</title>\n"
-msgstr " <title>El Menú Edición</title>\n"
-
-#: tmp/menuref.sgml.h:1289
-msgid " <title>The Help Menu</title>\n"
-msgstr " <title>El Menú Ayuda</title>\n"
-
-#: tmp/menuref.sgml.h:1291
-msgid " <title>The Mail Folder Menu</title>\n"
-msgstr " <title>El Menú Carpetas del Correo</title>\n"
-
-#: tmp/menuref.sgml.h:1293
-msgid " <title>The Mail Message Menu</title>\n"
-msgstr " <title>El Menú Mensajes del Correo</title>\n"
-
-#: tmp/menuref.sgml.h:1295
-msgid " <title>The Mail Settings Menu</title>\n"
-msgstr " <title>El Menú Configuración del Correo</title>\n"
-
-#: tmp/menuref.sgml.h:1297
-msgid " <title>The Mail View Menu</title>\n"
-msgstr " <title>El Menú Ver del Correo</title>\n"
-
-#: tmp/menuref.sgml.h:1299
-msgid " <title>The Message Composer's Edit Menu</title>\n"
-msgstr " <title>El Menú Editar del Compositor de Mensajes</title>\n"
-
-#: tmp/menuref.sgml.h:1301
-msgid " <title>The Message Composer's File Menu</title>\n"
-msgstr " <title>El Menú Archivo del Compositor de Mensajes</title>\n"
-
-#: tmp/menuref.sgml.h:1303
-msgid " <title>The Message Composer's Format Menu</title>\n"
-msgstr " <title>El Menú Formato del Compositor de Mensajes</title>\n"
-
-#: tmp/menuref.sgml.h:1305
-msgid " <title>The Message Composer's Insert Menu</title>\n"
-msgstr " <title>El Menú Insertar del Compositor de Mensajes</title>\n"
-
-#: tmp/menuref.sgml.h:1307
-msgid " <title>The Message Composer's View Menu</title>\n"
-msgstr " <title>El Menú Ver del Compositor de Mensajes</title>\n"
-
-#: tmp/menuref.sgml.h:1309
-msgid " <title>The Message Heading Right-Click Menu</title>\n"
-msgstr " <title>El Menú del Botón Derecho en la Cabecera</title>\n"
-
-#: tmp/menuref.sgml.h:1311
-msgid ""
-" <para>\n"
-" <application>Evolution</application> Mail has more specialized\n"
-" menus, and more specialized menu items, than any other part of\n"
-" the application.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" El Correo de <application>Evolution</application> tiene más menús\n"
-" especializados, y más opciones de menú especializadas, que cualquier\n"
-" otra parte de la aplicación.\n"
-" </para>\n"
-
-#: tmp/menuref.sgml.h:1317
-msgid ""
-" <para>\n"
-" This window has only one menu: the file menu.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Esta ventana solo tiene un menú: el menú archivo.\n"
-" </para>\n"
-
-#: tmp/menuref.sgml.h:1321
-msgid ""
-" <para>\n"
-" The <guimenu>File</guimenu> and <guimenu>Help</guimenu> menus in\n"
-" the main <application>Evolution</application> window do not\n"
-" change, because they refer to universal items. Other menus have\n"
-" contents that change depending on context.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Los menús <guimenu>Archivo</guimenu> y <guimenu>Ayuda</guimenu> de la\n"
-" ventana principal de <application>Evolution</application> no cambian,\n"
-" porque se refieren a elementos globales. Otros menús tienen\n"
-" contenidos que cambian dependiendo del contexto.\n"
-" </para>\n"
-
-#: tmp/menuref.sgml.h:1328
-msgid ""
-" <para>\n"
-" The Main window of the calendar has the same menus as the main\n"
-" window of the mail client. However, their contents vary in a\n"
-" number of ways.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" La ventana principal del calendario tiene los mismos menús que la\n"
-" ventana principal del cliente de correo. Aunque, sus contenidos\n"
-" varian de varios modos.\n"
-" </para>\n"
-
-#: tmp/menuref.sgml.h:1334
-msgid ""
-" <para>\n"
-" The message composition window has its own set of menus:\n"
-" <guimenu>File</guimenu>, which controls operations on files and\n"
-" data, <guimenu>Edit</guimenu>, for text editing,\n"
-" <guimenu>Format</guimenu>, which controls the file format of\n"
-" messages you send, <guimenu>View</guimenu>, to set how you view\n"
-" the message, and <guimenu>Insert</guimenu>, which holds tools\n"
-" for embedding files and other items in messages. Here's what's in "
-"them:\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" La ventana de composición de mensajes tiene su propio juego de menús:\n"
-" <guimenu>Archivo</guimenu>, que controla las operaciones sobre los\n"
-" archivos y los datos, <guimenu>Editar</guimenu>, para la edición de\n"
-" textos, <guimenu>Formato</guimenu>, que controla el formato de los\n"
-" mensajes que envía, <guimenu>Vista</guimenu>, que determina como ve "
-"el\n"
-" mensaje, y <guimenu>Insertar</guimenu>, que tiene herramientas para\n"
-" incluir archivos y otros objetos en los mensajes. Aquí esta lo que\n"
-"hay en ellos:\n"
-" </para>\n"
-
-#: tmp/menuref.sgml.h:1344
-msgid ""
-" <para>\n"
-" The contact manager has six menus: <guimenu>File</guimenu>,\n"
-" <guimenu>Edit</guimenu>, <guimenu>View</guimenu>,\n"
-" <guimenu>Setting</guimenu>s, <guimenu>Tools</guimenu>, and\n"
-" <guimenu>Help</guimenu>.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" El administrador de contactos tiene seis menús:\n"
-" <guimenu>Archivo</guimenu>, <guimenu>Editar</guimenu>,\n"
-" <guimenu>Vista</guimenu>, <guimenu>Configuración</guimenu>,\n"
-" <guimenu>Herramientas</guimenu>, y\n"
-" <guimenu>Ayuda</guimenu>.\n"
-" </para>\n"
-
-#: tmp/menuref.sgml.h:1351
-msgid ""
-" <para>\n"
-" The appointment editor has its own menus, to help you use its\n"
-" wide-ranging abilities.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" El editor de citas tiene sus propios menús, para ayudarle a usar sus\n"
-" amplias posibilidades.\n"
-" </para>\n"
-
-#: tmp/menuref.sgml.h:1356
-msgid " <title>Contact Manager Menus</title>\n"
-msgstr " <title>Menús del Administrador de Contactos</title>\n"
-
-#: tmp/menuref.sgml.h:1358
-msgid " <title>Mail Menus</title>\n"
-msgstr " <title>Menús del Correo</title>\n"
-
-#: tmp/menuref.sgml.h:1360
-msgid " <title>Menus that are the same everywhere</title>\n"
-msgstr " <title>Menús que son iguales en todas partes</title>\n"
-
-#: tmp/menuref.sgml.h:1362
-msgid " <title>The Appointment Editor Menus</title>\n"
-msgstr " <title>Los Menús del Editor de Citas</title>\n"
-
-#: tmp/menuref.sgml.h:1364
-msgid " <title>The Calendar Menus</title>\n"
-msgstr " <title>Los Menús del Calendario</title>\n"
-
-#: tmp/menuref.sgml.h:1366
-msgid " <title>The Contact Editor Menus</title>\n"
-msgstr " <title>Los Menús del Editor de Contactos</title>\n"
-
-#: tmp/menuref.sgml.h:1368
-msgid " <title>The Message Composer Menus</title>\n"
-msgstr " <title>Los Menús del Compositor de Mensajes</title>\n"
-
-#: tmp/menuref.sgml.h:1370
-msgid ""
-" <para>\n"
-" We'll leave this section blank until the UI stabilizes a little\n"
-" more.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Dejaremos esta sección en blanco hasta que la UI se estabilize un\n"
-" poco más.\n"
-" </para>\n"
-
-#: tmp/menuref.sgml.h:1375
-msgid " <title>Executive Summary Menus</title>\n"
-msgstr " <title>Menús del Resumen de Trabajo</title>\n"
-
-#: tmp/menuref.sgml.h:1377
-msgid ""
-" <para>\n"
-" <application>Evolution</application>'s menus may not hold the\n"
-" secret to happiness, they do hold every ability that\n"
-" <application>Evolution</application> has. This section will serve\n"
-" as a reference for all those menus, and the capabilites that they\n"
-" offer you.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Los menús de <application>Evolution</application> puede que no tengan "
-"el\n"
-" secreto de la felicidad, pero lo que contienen son todas las\n"
-" posibilidades de <application>Evolution</application>. Esta sección\n"
-" servirá como referencia de todos esos menús, y las posibilidades que le\n"
-" ofrecen.\n"
-" </para>\n"
-
-#: tmp/menuref.sgml.h:1385
-msgid ""
-" <para>\n"
-" In addition, the editor tools for messages, appointments, and\n"
-" contacts all have menu bars of their own. From left to right, the\n"
-" menus available to you when you are reading mail are:\n"
-" <guimenu>File</guimenu>, <guimenu>Edit</guimenu>,\n"
-" <guimenu>View</guimenu>, <guimenu>Settings</guimenu>,\n"
-" <guimenu>Message</guimenu>, <guimenu>Folder</guimenu>and\n"
-" <guimenu>Help</guimenu>.\n"
-"\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Ademas, las herramientas de edición de mensajes, citas, y\n"
-" contactos todas tienen barras de herramientas propias. De izquierda a\n"
-" derecha, los menús que tiene disponible cuando está leyendo el correo\n"
-" son: <guimenu>Archivo</guimenu>, <guimenu>Editar</guimenu>,\n"
-" <guimenu>Vista</guimenu>, <guimenu>Configuración</guimenu>,\n"
-" <guimenu>Mensaje</guimenu>, <guimenu>Carpeta</guimenu>and\n"
-" <guimenu>Ayuda</guimenu>.\n"
-"\n"
-" </para>\n"
-
-#: tmp/menuref.sgml.h:1396
-msgid ""
-" <para>\n"
-" Menus in <application>Evolution</application> are\n"
-" context-sensitive, which means that they vary depending on what\n"
-" you're doing. If you're reading your mail, you'll have\n"
-" mail-related menus; for your calendar, you'll have\n"
-" calendar-related menu items. Some menus, of course, like\n"
-" <guimenu>Help</guimenu> and <guimenu>File</guimenu> don't much, if\n"
-" at all, because they have more universal functions. But you'd\n"
-" never mark an address card as \"read,\" or set the recurrence for an\n"
-" email message you've recieved. depending on whether you're looking\n"
-" at mail, contacts, or calendar information. \n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Los menús en <application>Evolution</application> son sensitivos al\n"
-" contexto, lo que significa que varian dependiendo de lo que esté\n"
-" haciendo. Si está leyendo su correo, tendrá menús relacionados con el\n"
-" correo; para su calendario, tendrá opciones relacionadas con\n"
-" calendarios. Algunos menús, naturalmente, como\n"
-" <guimenu>Ayuda</guimenu> y <guimenu>Archivo</guimenu> no cambian mucho,\n"
-" si es que lo hacen, porque son funciones más universales. Pero usted\n"
-" nunca marcará una tarjeta de dirección como \"leidao\", o pondra\n"
-" recurrencia a un mensaje que ha recivido. Dependiendo de si esta "
-"mirando\n"
-" el correo, los contactos, o la información del calendario. \n"
-" </para>\n"
-
-#: tmp/menuref.sgml.h:1409
-msgid " <title>Menu Reference</title>\n"
-msgstr " <title>Referencias de los Menús</title>\n"
-
-#: tmp/menuref.sgml.h:1411
-msgid ""
-"<!--\n"
-"<!DOCTYPE Chapter PUBLIC \"-//GNOME//DTD DocBook PNG Variant V1.1//EN\">\n"
-"-->\n"
-msgstr ""
-"<!--\n"
-"<!DOCTYPE Chapter PUBLIC \"-//GNOME//DTD DocBook PNG Variant V1.1//EN\">\n"
-"-->\n"
diff --git a/doc/es.po/preface.sgml.po b/doc/es.po/preface.sgml.po
deleted file mode 100644
index 59f89169b0..0000000000
--- a/doc/es.po/preface.sgml.po
+++ /dev/null
@@ -1,934 +0,0 @@
-# Translation into Spanish of Evolution docs.
-# Copyright (C) 2000 Free Software Foundation, Inc.
-# Héctor García Álvarez <hector@scouts-es.org>, 2000.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: evolution-docs\n"
-"POT-Creation-Date: 2001-03-13 16:30+0100\n"
-"PO-Revision-Date: 2000-12-28 15:38+0100\n"
-"Last-Translator: Héctor García Álvarez <hector@scouts-es.org>\n"
-"Language-Team: Spanish <es@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=iso-8859-1\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: tmp/preface.sgml.h:1
-msgid ""
-"\t<para>\n"
-" Some kinds of words are marked off with special typography:\n"
-" <simplelist>\n"
-"\t <member><application>Applications</application></member>\n"
-"\t <member><command>Commands</command> typed at the command "
-"line</member>\n"
-"\t <member><guilabel>Labels</guilabel> for interface items</member>\n"
-"\n"
-" <member> Menu selections look like this:\n"
-" <menuchoice>\n"
-" <guimenu>Menu</guimenu>\n"
-" <guisubmenu>Submenu</guisubmenu> \n"
-" <guimenuitem>Menu Item</guimenuitem>\n"
-" </menuchoice>\n"
-" </member>\n"
-"\t <member><guibutton>Buttons</guibutton> you can\n"
-" click</member> <member><userinput>Anything you type\n"
-" in</userinput></member> <member><computeroutput>Text\n"
-" output from a computer</computeroutput></member>\n"
-" <member><glossterm linkend=\"apx-gloss\">Words</glossterm>\n"
-" that are defined in the <xref linkend=\"apx-gloss\">.</member>\n"
-"\t </simplelist>\n"
-" </para>\n"
-msgstr ""
-"\t<para>\n"
-" Algunas clases de palabras están escritas con una tipografía "
-"especial:\n"
-" <simplelist>\n"
-"\t <member><application>Aplicaciones</application></member>\n"
-"\t <member><command>Comandos</command> escritos en la línea de "
-"comandos</member>\n"
-"\t <member><guilabel>Etiquetas</guilabel> de elementos de la "
-"interfaz</member>\n"
-"\n"
-" <member> La opcciones de los menús aparecen así:\n"
-" <menuchoice>\n"
-" <guimenu>Menú</guimenu>\n"
-" <guisubmenu>Sub-menú</guisubmenu> \n"
-" <guimenuitem>Opción del Menú</guimenuitem>\n"
-" </menuchoice>\n"
-" </member>\n"
-"\t <member><guibutton>Butones</guibutton> que puede pulsar</member>\n"
-" <member><userinput>Cualquier cosa que\n"
-" escribe</userinput></member> <member><computeroutput>Salida\n"
-" del ordenador en texto</computeroutput></member>\n"
-" <member><glossterm linkend=\"apx-gloss\">Palabras</glossterm>\n"
-" que están definidas en el <xref "
-"linkend=\"apx-gloss\">.</member>\n"
-"\t </simplelist>\n"
-" </para>\n"
-
-#: tmp/preface.sgml.h:24
-msgid ""
-" <para>\n"
-"\n"
-"\n"
-" <variablelist>\n"
-"\t <varlistentry>\n"
-"\t <term></term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\t </variablelist>\n"
-"\n"
-"\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-"\n"
-"\n"
-" <variablelist>\n"
-"\t <varlistentry>\n"
-"\t <term></term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\t </variablelist>\n"
-"\n"
-"\n"
-" </para>\n"
-
-#: tmp/preface.sgml.h:40
-msgid ""
-" <para>\n"
-" <variablelist>\n"
-"\t <varlistentry>\n"
-"\t <term></term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\t </variablelist>\n"
-"\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" <variablelist>\n"
-"\t <varlistentry>\n"
-"\t <term></term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\t </variablelist>\n"
-"\n"
-" </para>\n"
-
-#: tmp/preface.sgml.h:53
-msgid " <title>Calendar</title>\n"
-msgstr " <title>Calendario</title>\n"
-
-#: tmp/preface.sgml.h:55
-msgid " <title>Contact Manager</title>\n"
-msgstr " <title>Administrador de Contactos</title>\n"
-
-#: tmp/preface.sgml.h:57
-msgid " <title>Typographical conventions</title>\n"
-msgstr " <title>Convenios Tipográficos</title>\n"
-
-#: tmp/preface.sgml.h:59
-msgid ""
-" <para>\n"
-" Here are the keyboard shortcuts and menu items you're most\n"
-" likely to use:\n"
-" \n"
-" <variablelist>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term>Create a new folder</term>\n"
-"\t <listitem>`\n"
-"\t <para>\n"
-" "
-"<menuchoice><guimenu>File</guimenu><guisubmenu>New</guisubmenu>\n"
-" <guimenuitem>Folder</guimenuitem></menuchoice> or\n"
-" <keycombo action=\"simul\">\n"
-"\t\t <keycap>Ctrl</keycap>\n"
-"\t\t <keycap>Shift </keycap>\n"
-"\t\t <keycap>F</keycap>\n"
-" </keycombo>\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term>Create a new Shortcut in the Evolution Bar</term>\n"
-"\t <listitem>\n"
-"\t <para> \n"
-" <menuchoice><guimenu>File</guimenu>\n"
-"\t\t <guisubmenu>New</guisubmenu>\n"
-"\t\t <guimenuitem>Evolution Bar Shortcut</guimenuitem> </menuchoice> or \n"
-" <keycombo action=\"simul\">\n"
-"\t\t <keycap>Ctrl</keycap>\n"
-"\t\t <keycap>Shift</keycap>\n"
-"\t\t <keycap>S</keycap>\n"
-" </keycombo>\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term>Create a new email message:</term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" Use\n"
-" "
-"<menuchoice><guimenu>File</guimenu><guisubmenu>New</guisubmenu><guimenuitem>M"
-"ail\n"
-" Message</guimenuitem> </menuchoice> or \n"
-" <keycombo action=\"simul\">\n"
-"\t\t <keycap>Ctrl</keycap>\n"
-"\t\t <keycap>Shift </keycap>\n"
-"\t\t <keycap>M</keycap>\n"
-" </keycombo>\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term>Create a new Appointment</term>\n"
-"\t <listitem>\n"
-"\t <para> \n"
-" <menuchoice><guimenu>File</guimenu>\n"
-"\t\t <guisubmenu>New</guisubmenu>\n"
-"\t\t <guimenuitem>Appointment</guimenuitem> </menuchoice> or \n"
-" <keycombo action=\"simul\">\n"
-"\t\t <keycap>Ctrl</keycap>\n"
-"\t\t <keycap>Shift</keycap>\n"
-"\t\t <keycap>A</keycap>\n"
-" </keycombo>\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term>Enter a new Contact</term>\n"
-"\t <listitem>\n"
-"\t <para> \n"
-" <menuchoice><guimenu>File</guimenu>\n"
-"\t\t <guisubmenu>New</guisubmenu>\n"
-"\t\t <guimenuitem>Contact</guimenuitem> </menuchoice> or \n"
-" <keycombo action=\"simul\">\n"
-"\t\t <keycap>Ctrl</keycap>\n"
-"\t\t <keycap>Shift</keycap>\n"
-"\t\t <keycap>C</keycap>\n"
-" </keycombo>\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term>Create a new Task</term>\n"
-"\t <listitem>\n"
-"\t <para> \n"
-" <menuchoice><guimenu>File</guimenu>\n"
-"\t\t <guisubmenu>New</guisubmenu>\n"
-"\t\t <guimenuitem>Task</guimenuitem> </menuchoice> or \n"
-" <keycombo action=\"simul\">\n"
-"\t\t <keycap>Ctrl</keycap>\n"
-"\t\t <keycap>Shift</keycap>\n"
-"\t\t <keycap>T</keycap>\n"
-" </keycombo>\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t</variablelist>\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Aquí están los atajos de teclado y las opciones del menú que\n"
-" probablemente sean las que mas use:\n"
-" \n"
-" <variablelist>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term>Crear una nueva carpeta</term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" "
-"<menuchoice><guimenu>Archivo</guimenu><guisubmenu>Nuevo</guisubmenu>\n"
-" <guimenuitem>Carpeta</guimenuitem></menuchoice> o\n"
-" <keycombo action=\"simul\">\n"
-"\t\t <keycap>Ctrl</keycap>\n"
-"\t\t <keycap>Shift </keycap>\n"
-"\t\t <keycap>C</keycap>\n"
-" </keycombo>\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term>Crear un nuevo Atajo en la Barra de Evolution</term>\n"
-"\t <listitem>\n"
-"\t <para> \n"
-" <menuchoice><guimenu>Archivo</guimenu>\n"
-"\t\t <guisubmenu>Nuevo</guisubmenu>\n"
-"\t\t <guimenuitem>Atajo de Evolution</guimenuitem> </menuchoice> o \n"
-" <keycombo action=\"simul\">\n"
-"\t\t <keycap>Ctrl</keycap>\n"
-"\t\t <keycap>Shift</keycap>\n"
-"\t\t <keycap>A</keycap>\n"
-" </keycombo>\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term>Crear un nuevo mensaje de correo:</term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" Use\n"
-" "
-"<menuchoice><guimenu>Archivo</guimenu><guisubmenu>Nuevo</guisubmenu><guimenui"
-"tem>Mensaje de \n"
-" Correo</guimenuitem> </menuchoice> o \n"
-" <keycombo action=\"simul\">\n"
-"\t\t <keycap>Ctrl</keycap>\n"
-"\t\t <keycap>Shift </keycap>\n"
-"\t\t <keycap>M</keycap>\n"
-" </keycombo>\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term>Crear una nueva Cita</term>\n"
-"\t <listitem>\n"
-"\t <para> \n"
-" <menuchoice><guimenu>Archivo</guimenu>\n"
-"\t\t <guisubmenu>Nuevo</guisubmenu>\n"
-"\t\t <guimenuitem>Cita</guimenuitem> </menuchoice> o \n"
-" <keycombo action=\"simul\">\n"
-"\t\t <keycap>Ctrl</keycap>\n"
-"\t\t <keycap>Shift</keycap>\n"
-"\t\t <keycap>T</keycap>\n"
-" </keycombo>\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term>Introducir un nuevo Contacto</term>\n"
-"\t <listitem>\n"
-"\t <para> \n"
-" <menuchoice><guimenu>Archivo</guimenu>\n"
-"\t\t <guisubmenu>Nuevo</guisubmenu>\n"
-"\t\t <guimenuitem>Contacto</guimenuitem> </menuchoice> o \n"
-" <keycombo action=\"simul\">\n"
-"\t\t <keycap>Ctrl</keycap>\n"
-"\t\t <keycap>Shift</keycap>\n"
-"\t\t <keycap>C</keycap>\n"
-" </keycombo>\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term>Crear una nueva Tarea</term>\n"
-"\t <listitem>\n"
-"\t <para> \n"
-" <menuchoice><guimenu>Archivo</guimenu>\n"
-"\t\t <guisubmenu>Nuevo</guisubmenu>\n"
-"\t\t <guimenuitem>Tarea</guimenuitem> </menuchoice> o \n"
-" <keycombo action=\"simul\">\n"
-"\t\t <keycap>Ctrl</keycap>\n"
-"\t\t <keycap>Shift</keycap>\n"
-"\t\t <keycap>T</keycap>\n"
-" </keycombo>\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t</variablelist>\n"
-" </para>\n"
-
-#: tmp/preface.sgml.h:165
-msgid ""
-" <para>\n"
-" <application>Evolution</application> can help you work in a\n"
-" group by handling email, address and other contact\n"
-" information, and one or more calendars. It can do that on one\n"
-" or several computers, connected directly or over a network,\n"
-" for one person or for large groups.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" <application>Evolution</application> le puede ayudar a trabajar en\n"
-" grupo encargandose del correo, direcciones y otra información\n"
-" de contacto, y uno o más calendarios. Puede hacerlo en uno o "
-"varios\n"
-" ordenadores, conectados directamente o a traves de una red, para "
-"una\n"
-" persona o para grandes grupos.\n"
-" </para>\n"
-
-#: tmp/preface.sgml.h:173
-msgid ""
-" <para>\n"
-" <application>Evolution</application> is designed to make most\n"
-" daily tasks faster. For example, it takes only one or two\n"
-" clicks to enter an appointment or an address card sent to you\n"
-" by email, or to send email to a contact or appointment.\n"
-" <application>Evolution</application> makes displays faster and\n"
-" more efficient, so searches are faster and memory usage is\n"
-" lower. People who get lots of mail will appreciate advanced\n"
-" features like <link\n"
-" linkend=\"usage-mail-organize-vFolders\">Virtual Folders</link>,\n"
-" which let you save searches as though they were ordinary mail\n"
-" folders.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" <application>Evolution</application> está diseñada para hacer la\n"
-" mayoría de las tareas diarias más rápido. Por ejemplo, solo\n"
-" requiere una o dos pulsaciones introducir una nueva cita o una\n"
-" tarjeta que le hayan enviado por correo, o enviar un correo a un\n"
-" contacto o a una cita. <application>Evolution</application>\n"
-" hace las vistas más rápidas y eficientes, para que las búsquedas\n"
-" sean más rápidas y el uso de la memoria sea menor. Las personas\n"
-" que reciben mucho correo apreciarán las características avanzadas\n"
-" como las <link\n"
-" linkend=\"usage-mail-organize-vFolders\">Carpetas Virtuales</link>,\n"
-" que le permiten guardar búsquedas como si fueran carpetas de correo\n"
-" normales.\n"
-" </para>\n"
-
-#: tmp/preface.sgml.h:187
-msgid ""
-" <para>\n"
-" <note>\n"
-" <title>This is a preview release</title>\n"
-" <para>\n"
-" <application>Evolution</application> is not complete, and\n"
-" still has a lot of flaws. Please help improve it by\n"
-" letting us know about them. You should do this by\n"
-" submitting bug reports with the GNOME <application>Bug\n"
-" Report Tool</application> (known as\n"
-" <command>bug-buddy</command> at the command line).\n"
-" </para>\n"
-" </note>\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" <note>\n"
-" <title>Esta es una liberación de prueba</title>\n"
-" <para>\n"
-" <application>Evolution</application> no esta completa, y\n"
-" todavía tiene muchos fallos. Por favor ayúdenos a mejorarla\n"
-" informandonos acerca de ellos. Debe hacerlo enviando reportes\n"
-" de fallo con la <application>Herramienta de Reportes de\n"
-" Fallo</application> de GNOME (conocida como\n"
-" <command>bug-buddy</command> en la línea de comandos).\n"
-" </para>\n"
-" </note>\n"
-" </para>\n"
-
-#: tmp/preface.sgml.h:201
-msgid ""
-" <para>\n"
-" Because it's part of the GNOME project,\n"
-" <application>Evolution</application> is Free Software. The\n"
-" program and its source code are released under the terms of\n"
-" the GNU <ulink type=\"help\" "
-"url=\"gnome-help:gpl\"><citetitle>General\n"
-" Public License (GPL)</citetitle></ulink>, and the\n"
-" documentation falls under the <ulink type=\"help\"\n"
-" url=\"gnome-help:fdl\"><citetitle>Free Documentation\n"
-" License</citetitle></ulink> (FDL). For more information about\n"
-" the GPL and the FDL, visit the Free Software Foundation's\n"
-" website at <ulink\n"
-" url=\"http://www.fsf.org\">http://www.fsf.org</ulink>.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Como parte de proyecto GNOME,\n"
-" <application>Evolution</application> is Software Libre. El\n"
-" programa y su código fuente están liberados bajo los términos de\n"
-" la <ulink type=\"help\" url=\"gnome-help:gpl\"><citetitle>General "
-"Public License \"Licencia Pública\n"
-" General\" (GPL)</citetitle></ulink> de GNU, y la\n"
-" documentación está bajo la <ulink type=\"help\"\n"
-" url=\"gnome-help:fdl\"><citetitle>Free Documentation\n"
-" License \"Licencia Libre de Documentación\"</citetitle></ulink>\n"
-" (FDL). Para más información acerca de la GPL y de la FDL,\n"
-" visite el sitio web de la Free Software Foundation \"Fundación para\n"
-" el Software Libre\" en <ulink\n"
-" url=\"http://www.fsf.org\">http://www.fsf.org</ulink>.\n"
-" </para>\n"
-
-#: tmp/preface.sgml.h:215
-msgid ""
-" <para>\n"
-" Here are the most frequent email tasks, and shortcuts for\n"
-" navigating your mailbox with the keyboard instead of the\n"
-" mouse:\n"
-" <variablelist>\n"
-"\t <varlistentry>\n"
-"\t <term>Check Mail</term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" Click <guibutton>Get Mail</guibutton> in the\n"
-" toolbar. There is no keyboard shortcut for this task,\n"
-" but you can ask <application>Evolution</application>\n"
-" to check for new mail periodically. To do so, FIXME.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-" <varlistentry>\n"
-"\t <term>Reply to a Message</term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" To reply to the sender of the message only:\n"
-" click <guibutton>Reply</guibutton> in the\n"
-" toolbar, or press\n"
-" <keycombo action=\"simul\">\n"
-"\t\t <keycap>Ctrl</keycap>\n"
-"\t\t <keycap>R</keycap>\n"
-" </keycombo>\n"
-" </para>\n"
-"\t <para>\n"
-" To reply to the sender and all the other visible\n"
-" recipients of the message, click <guibutton>Reply to\n"
-" All</guibutton> or select the message and press\n"
-" <keycombo action=\"simul\">\n"
-"\t\t <keycap>Shift</keycap>\n"
-"\t\t <keycap>Ctrl</keycap>\n"
-"\t\t <keycap>R</keycap>\n"
-" </keycombo>\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\t \n"
-" <varlistentry>\n"
-"\t <term>Forward a Message</term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" Select the message or messages you want to forward,\n"
-" and click <guibutton>Forward</guibutton> in the\n"
-" toolbar, or press\n"
-" <keycombo action=\"simul\">\n"
-"\t\t <keycap>Ctrl</keycap>\n"
-"\t\t <keycap>J</keycap>\n"
-" </keycombo>\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-" <varlistentry>\n"
-"\t <term>Open a Message in a New Window</term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" Double-click the message you want to view, or select\n"
-" it and press\n"
-" <keycombo action=\"simul\">\n"
-"\t\t <keycap>Ctrl</keycap>\n"
-"\t\t <keycap>O</keycap>\n"
-" </keycombo>\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-" <varlistentry>\n"
-"\t <term>Create Filters and Virtual Folders</term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" You can create filters and Virtual Folders based on\n"
-" specific message attributes from the message's\n"
-" right-click menu. Alternately, select a message, and\n"
-" then choose <menuchoice> <guimenu>Settings</guimenu>\n"
-" <guimenuitem>Mail Filters</guimenuitem> </menuchoice>\n"
-" or <menuchoice> <guimenu>Settings</guimenu>\n"
-" <guimenuitem>Virtual Folder Editor</guimenuitem>\n"
-" </menuchoice>. Filters are discussed in <xref\n"
-" linkend=\"usage-mail-organize-filters\">, and Virtual\n"
-" Folders in <xref\n"
-" linkend=\"usage-mail-organize-vfolders\">.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t</varlistentry>\n"
-"\t</variablelist>\n"
-"\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Aquí están las tareas más comunes con el correo, y los\n"
-" atajos para manejarse por su buzón con el teclado en lugar\n"
-" de con el ratón:\n"
-" <variablelist>\n"
-"\t <varlistentry>\n"
-"\t <term>Comprobar Correo</term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" Pulse <guibutton>Obtener</guibutton> en la barra de\n"
-" herramientas. No hay atajo de taclado para esto,\n"
-" pero puede pedir a <application>Evolution</application>\n"
-" que obtenga los nuevos mensajes periodicamente. Para\n"
-" hacerlo, FIXME.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-" <varlistentry>\n"
-"\t <term>Responder a un Mensaje</term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" Para responder al remitente de un mensaje tan solo debe:\n"
-" pulsar <guibutton>Responder</guibutton> en la barra de\n"
-" herramientas, o pulsar\n"
-" <keycombo action=\"simul\">\n"
-"\t\t <keycap>Ctrl</keycap>\n"
-"\t\t <keycap>R</keycap>\n"
-" </keycombo>\n"
-" </para>\n"
-"\t <para>\n"
-" Para responder al remitente y a todos los destinatarios\n"
-" visibles del mensaje, pulse <guibutton>Responder a\n"
-" Todos</guibutton> o seleccione el mensaje y pulse\n"
-" <keycombo action=\"simul\">\n"
-"\t\t <keycap>Shift</keycap>\n"
-"\t\t <keycap>Ctrl</keycap>\n"
-"\t\t <keycap>R</keycap>\n"
-" </keycombo>\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\t \n"
-" <varlistentry>\n"
-"\t <term>Reenviar un Mensaje</term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" Sleccione el mensaje o mensajes que quiere reenviar,\n"
-" y pulse <guibutton>Reenviar</guibutton> en la barra de\n"
-" herramientas, o pulse\n"
-" <keycombo action=\"simul\">\n"
-"\t\t <keycap>Ctrl</keycap>\n"
-"\t\t <keycap>J</keycap>\n"
-" </keycombo>\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-" <varlistentry>\n"
-"\t <term>Abrir un Mensaje en una Nueva Ventana</term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" Pulse dos veces sobre el mensaje que quiere ver, o\n"
-" seleccionelo y pulse\n"
-" <keycombo action=\"simul\">\n"
-"\t\t <keycap>Ctrl</keycap>\n"
-"\t\t <keycap>O</keycap>\n"
-" </keycombo>\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-" <varlistentry>\n"
-"\t <term>Crear Filtros y Carpetas Virtuales</term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" Puede crear filtros y carpetas virtuales basados en las\n"
-" caracteristicas de un mensaje específico desde el menú que\n"
-" aparece al pulsar el botón derecho del ratón. \n"
-" Alternativamente, seleccion un mensaje, y elija\n"
-" <menuchoice><guimenu>Configuración</guimenu>\n"
-" <guimenuitem>Filtros de Correo</guimenuitem> </menuchoice>\n"
-" o <menuchoice> <guimenu>Configuración</guimenu>\n"
-" <guimenuitem>Editor de Carpetas Virtuales</guimenuitem>\n"
-" </menuchoice>. Los filtros se discuten en <xref\n"
-" linkend=\"usage-mail-organize-filters\">, y las carpetas\n"
-" virtuales en <xref\n"
-" linkend=\"usage-mail-organize-vfolders\">.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t</varlistentry>\n"
-"\t</variablelist>\n"
-"\n"
-" </para>\n"
-
-#: tmp/preface.sgml.h:308
-msgid ""
-" <para>\n"
-" Information is useless unless it's organized and accessible;\n"
-" it's hardly even worth the name if you can't look at it and be\n"
-" <emphasis>informed</emphasis>.\n"
-" <application>Evolution</application>'s goal is to make the\n"
-" tasks of storing, organizing, and retrieving your personal\n"
-" information easier, so you can work and communicate with\n"
-" others. That is, it's a highly evolved <glossterm\n"
-" linkend=\"groupware\">groupware</glossterm> program, an integral\n"
-" part of the Internet-connected desktop. On the inside, it's a\n"
-" powerful database; on the outside, it's a tool to help you get\n"
-" your work done.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" La información no sirve a menos que este organizada y sea accesible.\n"
-" Ni si quiera se merece ese nombre si no puede mirarla y estar\n"
-" <emphasis>informado</emphasis>.\n"
-" El objetivo de <application>Evolution</application> es hacer que las\n"
-" tareas de guardar, organizar, y obtener su información personal sean\n"
-" más fáciles, para que pueda trabajar y comunicarse con otros. Esto\n"
-" es, programa de <glossterm\n"
-" linkend=\"groupware\">trabajo en grupo</glossterm> altamente\n"
-" evolucionado, una parte integral del escritorio conectado a "
-"Internet.\n"
-" Por dentro, es una potente base de datos. Por fuera, es una\n"
-" herramienta para ayudarle ha hacer su trabajo.\n"
-" </para>\n"
-
-#: tmp/preface.sgml.h:322
-msgid ""
-" <para>\n"
-" The <application>Evolution</application> project has four\n"
-" central goals:\n"
-"\n"
-" <itemizedlist>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" The application must be <emphasis>both powerful and easy\n"
-" to use</emphasis>. In other words, it needs a familiar\n"
-" and intuitive interface that users can customize to their\n"
-" liking, and users should have access to shortcuts for\n"
-" complex tasks.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" <application>Evolution</application> must meet and\n"
-" exceed the standards set by other groupware products.\n"
-" It must include support for major network <glossterm\n"
-" linkend=\"protocol\">protocols</glossterm> so that it can\n"
-" integrate seamlessly with existing hardware and network\n"
-" environments.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" The project must support open standards and be open to\n"
-" expansion, so that it can become a development platform\n"
-" as well as an application. From the simplest scripting\n"
-" to the most complex network and component programming,\n"
-" <application>Evolution</application> must offer\n"
-" developers an environment for cutting-edge application\n"
-" development.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" Data must be safe: <application>Evolution</application>\n"
-" must not lose mail, corrupt mailbox files or other\n"
-" data, execute arbitrary <glossterm "
-"linkend=\"script\">scripts</glossterm>,\n"
-" or delete files from your hard disk.\n"
-" </para>\n"
-" </listitem>\n"
-"\t</itemizedlist>\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" El proyecto de <application>Evolution</application> tiene cuatro\n"
-" objetivos principales:\n"
-"\n"
-" <itemizedlist>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" La aplicación debe ser <emphasis>al mismo tiempo potente\n"
-" y facil de usar</emphasis>. En otras palabras, necesita una\n"
-" interfaz familiar e intuitiva que los usuarios puedan\n"
-" personalizar a su gusto, y los usuarios deben tener acceso a\n"
-" atajos para tareas complicadas.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" <application>Evolution</application> debe cumplir y\n"
-" sobrepasar los estandares impuestos por otros programas de\n"
-" trabajo en grupo. Debe tener soporte para la mayor parte de\n"
-" los <glossterm linkend=\"protocol\">protocolos</glossterm>\n"
-" de red para poder integrarse sin problemas con el hardware\n"
-" y los entornos de red existentes.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" El proyecto debe apoyar a los estandares abiertos y estar\n"
-" abierto a la expansion, para que se pueda convertir en una\n"
-" plataforma de desarollo tanto como en una aplicación.\n"
-" Desde los guiones más simples a la programación de red y\n"
-" componentes más compleja,\n"
-" <application>Evolution</application> debe ofrecer a los\n"
-" desarrolladores un entorno para el desarrollo de "
-"aplicaciones\n"
-" de vanguardia.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" Los datos deben ser seguros:\n"
-" <application>Evolution</application> no debe perder correo,\n"
-" corromper buzones u otra información, ejecutar\n"
-" <glossterm linkend=\"script\">guiones</glossterm> de\n"
-" instruciones arbitrarios o borrar archivos de su disco duro.\n"
-" </para>\n"
-" </listitem>\n"
-"\t</itemizedlist>\n"
-" </para>\n"
-
-#: tmp/preface.sgml.h:368
-msgid ""
-" <para>\n"
-" This book is divided into two parts, with several\n"
-" appendices. The first part is a <link linkend=\"usage\">guided\n"
-" tour</link>&mdash; it will explain how to use\n"
-" <application>Evolution</application>. If you are new to\n"
-" <application>Evolution</application> or to groupware in\n"
-" general, this section is for you. The second section, covering\n"
-" <link linkend=\"config\">configuration</link>, is targeted at\n"
-" more advanced users, but anyone who wants to change the way\n"
-" <application>Evolution</application> looks or acts can benefit\n"
-" from reading it. In addition, there is a comprehensive <link\n"
-" linkend=\"menuref\">menu reference</link> which describes nearly\n"
-" every capability that <application>Evolution</application> has\n"
-" to offer.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Thite libro está dividido en dos partes, con varios apendices.\n"
-" La primera parte es una <link linkend=\"usage\">visita\n"
-" guiada</link>&mdash; le explicará como usar\n"
-" <application>Evolution</application>. Si es nuevo en el uso de\n"
-" <application>Evolution</application> o de los programas de trabajo\n"
-" en grupo en general, esta sección es para usted. La segunda "
-"sección,\n"
-" cubriendo la <link linkend=\"config\">configuración</link>, está\n"
-" dirijida a usuarios más avanzados, pero cualquiera que quiera\n"
-" cambiar el aspecto o el comportamiento de\n"
-" <application>Evolution</application> se beneficiará de su lectura.\n"
-" Ademas, hay una <link linkend=\"menuref\">referencia de "
-"menús</link>\n"
-" que describe casi todas las posibilidades que ofrece\n"
-" <application>Evolution</application>.\n"
-" </para>\n"
-
-#: tmp/preface.sgml.h:384
-msgid ""
-" <para>\n"
-" This version of the <application>Evolution</application>\n"
-" User's Guide is a <emphasis>draft</emphasis>. It describes\n"
-" version 0.6 of the software. It is missing huge\n"
-" chunks of information, and many of the features it describes\n"
-" are unimplemented. All the content is subject to change,\n"
-" especially if you help. Please send comments on the guide to\n"
-" <email>aaron@ximian.com</email>. If you would like to work\n"
-" on the guide please contact me or see the GNOME Documentation\n"
-" project <ulink\n"
-" url=\"http://developer.gnome.org/projects/gdp\">web\n"
-" site</ulink>. This paragraph will be removed in later\n"
-" versions of the manual.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Esta versión de la Guía de Usuario de\n"
-" <application>Evolution</application> es un\n"
-" <emphasis>borrador</emphasis>. Describe la versión 0.6 del\n"
-" programa. Le faltan grandes piezas de información, y muchas de\n"
-" las arecteristicas que describe no están implementadas.\n"
-" Todo el contenido esta sujeto a cambios, especialmente si usted\n"
-" colabora. Por favor ebvie comentarios sobre la guía a\n"
-" <email>aaron@ximian.com</email> y sobre la traducción a\n"
-" <email>hector@scouts-es.org</email>. Si le gustaría colaborar en la\n"
-" guía por favor pongase en contacto conmigo o vea el <ulink\n"
-" url=\"http://developer.gnome.org/projects/gdp\">sitio\n"
-" web</ulink> del proyecto de Documentación de GNOME. Este párrafo\n"
-" será eliminado en futuras versiones del manual.\n"
-" </para>\n"
-
-#: tmp/preface.sgml.h:399
-msgid " <title>About This Book</title>\n"
-msgstr " <title>Acerca de este Libro</title>\n"
-
-#: tmp/preface.sgml.h:401
-msgid " <title>Mail Tasks</title>\n"
-msgstr " <title>Enviar Tareas por Correo</title>\n"
-
-#: tmp/preface.sgml.h:403
-msgid " <title>Opening or Creating Anything</title>\n"
-msgstr " <title>Abriendo o Creando algo</title>\n"
-
-#: tmp/preface.sgml.h:405
-msgid " <title>What is Evolution, and What Can It Do for Me?</title>\n"
-msgstr " <title>¿Qué es Evolution, y qué puede hacer por mi?</title>\n"
-
-#: tmp/preface.sgml.h:407
-msgid " <!-- ************* END DRAFT ONLY PARAGRAPH ************** -->\n"
-msgstr " <!-- ************* END DRAFT ONLY PARAGRAPH ************** -->\n"
-
-#: tmp/preface.sgml.h:409
-msgid ""
-" <!-- ************** FOLLOWING PARAGRAPH FOR DRAFT ONLY ************* "
-"-->\n"
-msgstr ""
-" <!-- ************** FOLLOWING PARAGRAPH FOR DRAFT ONLY ************* "
-"-->\n"
-
-#: tmp/preface.sgml.h:411
-msgid ""
-" <para>\n"
-" You might want to copy this section and tape it to\n"
-" the wall next to your computer: it's a very short summary of\n"
-" most of the things you'll want to do with\n"
-" <application>Evolution</application>, and pointers to the\n"
-" sections of the book where you'll find more in-depth\n"
-" description of those tasks.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Puede que quiera copiar esta sección y pegarla a la pared de al "
-"lado\n"
-" de su ordenador: es un resumen muy corto de la mayoría de las cosas\n"
-" que querrá hacer con <application>Evolution</application>, y \n"
-" referencias a las secciones del libro donde encontrará "
-"descripciones\n"
-" más profundas de dichas tareas.\n"
-" </para>\n"
-
-#: tmp/preface.sgml.h:420
-msgid " <title>Introduction</title> \n"
-msgstr " <title>Introducción</title> \n"
-
-#: tmp/preface.sgml.h:422
-msgid " <title>Quick Reference for Common Tasks</title>\n"
-msgstr " <title>Referencia Rápida para Tareas Comunes</title>\n"
-
-#: tmp/preface.sgml.h:424
-msgid ""
-"<!--\n"
-"<!DOCTYPE preface PUBLIC \"-//GNOME//DTD DocBook PNG Variant V1.1//EN\">\n"
-"-->\n"
-msgstr ""
-"<!--\n"
-"<!DOCTYPE preface PUBLIC \"-//GNOME//DTD DocBook PNG Variant V1.1//EN\">\n"
-"-->\n"
-
-#: tmp/preface.sgml.h:428
-msgid "<!-- =============Introduction ============================= -->\n"
-msgstr "<!-- =============Introduction ============================= -->\n"
diff --git a/doc/es.po/usage-calendar.sgml.po b/doc/es.po/usage-calendar.sgml.po
deleted file mode 100644
index 824341ded9..0000000000
--- a/doc/es.po/usage-calendar.sgml.po
+++ /dev/null
@@ -1,812 +0,0 @@
-# Translation into Spanish of Evolution docs.
-# Copyright (C) 2000 Free Software Foundation, Inc.
-# Héctor García Álvarez <hector@scouts-es.org>, 2000.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: evolution-docs\n"
-"POT-Creation-Date: 2001-03-13 16:30+0100\n"
-"PO-Revision-Date: 2000-12-28 15:38+0100\n"
-"Last-Translator: Héctor García Álvarez <hector@scouts-es.org>\n"
-"Language-Team: Spanish <es@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=iso-8859-1\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: tmp/usage-calendar.sgml.h:1
-msgid ""
-" <para>\n"
-" If you create calendar events that overlap,\n"
-" <application>Evolution</application> will display them side\n"
-" by side in your calendar. However,\n"
-" <application>Evolution</application> cannot help you do\n"
-" multiple things at once.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Si crea eventos de calendario que se superponen,\n"
-" <application>Evolution</application> los mostrará uno al lado "
-"del\n"
-" otro en su calendario. Eso si,\n"
-" <application>Evolution</application> no puede ayudarle ha hacer\n"
-" varias cosas al mismo tiempo.\n"
-" </para>\n"
-
-#: tmp/usage-calendar.sgml.h:9
-msgid ""
-" <para>\n"
-" If you don't need to enter more information than the date\n"
-" and time of the appointment, you just click in any blank\n"
-" space in the calendar and start typing. You can enter other\n"
-" information later with the appointment editor.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Si no necesita poner más información que la fecha y la hora de\n"
-" la cita, puede pichar simplemente en cualquier espacio en blanco\n"
-" del calendario y comenzar a escribir. Puede incluir otra\n"
-" información más tarde con el editor de citas.\n"
-" </para>\n"
-
-#: tmp/usage-calendar.sgml.h:16
-msgid " <title>Shortcut</title>\n"
-msgstr " <title>Atajo</title>\n"
-
-#: tmp/usage-calendar.sgml.h:18
-msgid " <title>Doing Two Things At Once</title>\n"
-msgstr " <title>Haciendo Dos Cosas A La Vez</title>\n"
-
-#: tmp/usage-calendar.sgml.h:20
-msgid ""
-" <para>\n"
-"\tOnce you're done with all those settings, click on the disk\n"
-"\ticon in the toolbar. That will save the event and close the\n"
-"\tevent editor window. If you want, you can alter an event\n"
-"\tsummary in the calendar view by clicking on it and typing. You\n"
-"\tcan change other settings by right-clicking on the event then\n"
-"\tchoosing <guimenuitem>Edit this Appointment</guimenuitem>.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-"\tUna vez que haya acabado con toda la configuración, pulse en el icono\n"
-"\tdel disco en la barra de herramientas. Esto guardará el evento y cerrará\n"
-"\tla ventana de edición de eventos. Si quiere, puede alterar el resumen del\n"
-"\ten la vista del calendario pulsando sobre ela y escribiendo. Puede\n"
-"\tcambiar otros valores pulsando con el botón derecho del ratón sobre el\n"
-"\tevento y eligiendo <guimenuitem>Editar esta cita</guimenuitem>.\n"
-" </para>\n"
-
-#: tmp/usage-calendar.sgml.h:29
-msgid ""
-" <para>\n"
-"\tTo create a new calendar event, select\n"
-" <menuchoice>\n"
-"\t <guimenu>File</guimenu>\n"
-"\t <guisubmenu>New</guisubmenu> \n"
-"\t <guimenuitem>Appointment</guimenuitem>\n"
-"\t</menuchoice>\n"
-"\tor click the <guibutton>New</guibutton> button on the left end\n"
-"\tof the toolbar. The <interface>New Appointment</interface>\n"
-"\tdialog will pop up with the usual menu bar, tool bar, and\n"
-"\twindow full of choices for you.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-"\tPara crear un nuevo evento de calendario, seleccione\n"
-" <menuchoice>\n"
-"\t <guimenu>Archivo</guimenu>\n"
-"\t <guisubmenu>Nuevo</guisubmenu> \n"
-"\t <guimenuitem>Cita</guimenuitem>\n"
-"\t</menuchoice>\n"
-"\to pulse el botón <guibutton>Nuevo</guibutton> a la izquierda de la barra\n"
-"\tde herramientas. El diálogo de <interface>Nueva Cita</interface>\n"
-"\taparecerá con la habitual barra de menú, barra de herramientas, y ventana\n"
-"\tllenas de opciones.\n"
-" </para>\n"
-
-#: tmp/usage-calendar.sgml.h:42
-msgid ""
-" <para>\n"
-" <guilabel>Classification</guilabel> is a little more\n"
-" complicated, and only applies to calendars on a\n"
-" network. <guilabel>Public</guilabel> is the default category,\n"
-" and a public event can be viewed by anyone on the calendar\n"
-" sharing network. <guilabel>Private</guilabel> denotes one\n"
-" level of security, and <guilabel>Confidential</guilabel> a\n"
-" higher level. <!-- FIXME --> Exact determinations and\n"
-" implementations of this feature have yet to be\n"
-" determined. <!-- FIXME -->\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" <guilabel>Clasificación</guilabel> es un poco más complicado,\n"
-" y solo afecta a los calendarios en red.\n"
-" <guilabel>Público</guilabel> es la categoría por defecto,\n"
-" y un evento público puede ser visto por cualquiera en la red de\n"
-" conpartición del calendario. <guilabel>Privado</guilabel> indica\n"
-" un nivel de seguridad, y <guilabel>Confidencial</guilabel> un\n"
-" nivel mayor. <!-- FIXME --> El significado y la implementecion de "
-" estas caracteristicas\n"
-" todavia no se han determinado. <!-- FIXME -->\n"
-" </para>\n"
-
-#: tmp/usage-calendar.sgml.h:54
-msgid ""
-" <para>\n"
-" You can have as many as four different\n"
-" <guilabel>Alarms</guilabel>, any time prior to the event\n"
-" you've scheduled. You can have one alarm of each type:\n"
-" <variablelist>\n"
-" <varlistentry>\n"
-"\t <term><guilabel>Display</guilabel></term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-"\t A window will pop up on your screen to remind you of\n"
-"\t your event.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\t <varlistentry> \n"
-"\t <term><guilabel>Audio</guilabel></term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-"\t Choose this to have your computer deliver a sound\n"
-"\t alarm.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\t <varlistentry>\n"
-"\t <term><guilabel>Program</guilabel></term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-"\t Select this if you would like to run a program as a\n"
-"\t reminder. You can enter its name in the text field,\n"
-"\t or find it with the <guibutton>Browse</guibutton>\n"
-"\t button.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\t <varlistentry>\n"
-"\t <term><guilabel>Mail</guilabel></term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-"\t <application>Evolution</application> will send an\n"
-"\t email reminder to the address you enter into the text\n"
-"\t field.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\t</variablelist>\n"
-"\t \n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Puede tener hasta cuatro <guilabel>Alarmas</guilabel>\n"
-" distintas, para cualquier momento antes de la hora que ha fijado\n"
-" para el evento. Puede tener una alarma de cada tipo:\n"
-" <variablelist>\n"
-" <varlistentry>\n"
-"\t <term><guilabel>Mostrar</guilabel></term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-"\t Aparecerá una ventana en la pantalla para recordarle el evento.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\t <varlistentry> \n"
-"\t <term><guilabel>Auditiva</guilabel></term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-"\t Eliga esta opción para que el ordenador emita una alarma\n"
-"\t auditiva.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\t <varlistentry>\n"
-"\t <term><guilabel>Programa</guilabel></term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-"\t Seleccione esto si quiere que alguna aplicación adicional se\n"
-"\t ejecute como recordatorio. Puede escribir su nombre en el campo\n"
-"\t de texto, o buscarla con el botón\n"
-"\t <guibutton>Buscar</guibutton>.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\t <varlistentry>\n"
-"\t <term><guilabel>Correo</guilabel></term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-"\t <application>Evolution</application> enviará un mensaje\n"
-"\t recordatorio a la dirección que haya escrito en el campo de\n"
-"\t texto.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\t</variablelist>\n"
-"\t \n"
-" </para>\n"
-
-#: tmp/usage-calendar.sgml.h:102
-msgid ""
-" <para>\n"
-" Keelyn, the office manager for a small company, has one\n"
-" calendar for her own schedule. On the local network, she\n"
-" maintains one for the conference room, so people know when\n"
-" they can schedule meetings. Next to that, she maintains a\n"
-" calendar that reflects when consultants are going to be on\n"
-" site, and another that keeps track of when the Red Sox are\n"
-" playing.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Keelyn, la encargada de oficina de una pequeña compañía, tiene\n"
-" un calendario para su propio horario. En la red local, mantiene\n"
-" uno para la sala de reuniones, para que la gente sepa cuando pueden\n"
-" concertar citas. Ademas de eso, mantiene un calendario que refleja\n"
-" cuando van a estar disponibles los consultores, y otro donde\n"
-" sigue los días en los que juegan los Red Sox.\n"
-" </para>\n"
-
-#: tmp/usage-calendar.sgml.h:112
-msgid ""
-" <para>\n"
-" The <guilabel>Recurrence</guilabel> tab lets you describe\n"
-" repetition in events ranging from once every day up to once\n"
-" every 100 years. You can then choose a time and date when the\n"
-" event will stop recurring, and, under\n"
-" <guilabel>Exceptions</guilabel>, pick individual days when the\n"
-" event will <emphasis>not</emphasis> recur. Make your\n"
-" selections from left to right, and you'll form a sentence:\n"
-" \"Every two weeks on Monday and Friday until January 3, 2003\"\n"
-" or \"Every month on the first Friday for 12 occurrences.\"\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" La pestaña <guilabel>Recurrencia</guilabel> le permite describir\n"
-" repeticiones en eventos que van desde una vez cada día a una vez\n"
-" cada 100 años. Puede tambien elegir cuando cesarán las\n"
-" repeticiones, y, bajo <guilabel>Excepciones</guilabel>, elegir\n"
-" días individuales en los que el evento <emphasis>no</emphasis> se\n"
-" realizará. Haga sus selecciones de izquierda a derecha, y formará\n"
-" una frase: \"Cada dos semanas los lunes y los viernes hasta el 3 de\n"
-" enero de 2003\" o \"Cada mes el primer viernes durante 12\n"
-" ocurrencias\".\n"
-" </para>\n"
-
-#: tmp/usage-calendar.sgml.h:124
-msgid ""
-" <para>\n"
-" Your event must have a starting and ending date &mdash; by\n"
-" default, today &mdash; but you can choose whether to give it\n"
-" starting and ending times or to mark it as an <guilabel>All\n"
-" day event</guilabel>. An <guilabel>All day event</guilabel>\n"
-" appears at the top of a day's event list rather than inside\n"
-" it. That makes it easy to have events that overlap and fit\n"
-" inside each other. For example, a conference might be an all\n"
-" day event, and the meetings at the conference would be timed\n"
-" events. Of course, events with specific starting and ending\n"
-" times can also overlap. When they do they're displayed as\n"
-" multiple columns in the day view of the calendar.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Su evento debe tener una fecha de inicio y de fin &mdash; por\n"
-" defecto, hoy &mdash; pero puede elegir entre darle una hora de\n"
-" inicio y de fin o marcarlo como un <guilabel>Evento de todo\n"
-" el día</guilabel>. Un <guilabel>Evento de todo el día</guilabel>\n"
-" aparece arriba en una lista de eventos diarios en lugar de dentro\n"
-" del día. Eso hace que sea más facil tener eventos que se solapen y\n"
-" que esten unos dentro de otros. Por ejemplo, una conferencia puede\n"
-" ser un evento de todo el día, y los encuentros en la conferencia\n"
-" serian eventos parciales. Naturalmente, los eventos con horarios\n"
-" específicos de inicio y fin tambien pueden solaparse. Cuenado lo\n"
-" hacen son mostrados como multiples columnas en la vista diaria del\n"
-" calendario.\n"
-" </para>\n"
-
-#: tmp/usage-calendar.sgml.h:138
-msgid " <title>Creating events</title>\n"
-msgstr " <title>Creando eventos</title>\n"
-
-#: tmp/usage-calendar.sgml.h:140
-msgid " <title>Keeping Multiple Calendars</title>\n"
-msgstr " <title>Manteniendo Múltiples Calendarios</title>\n"
-
-#: tmp/usage-calendar.sgml.h:142
-msgid ""
-" <para>\n"
-" <application>Evolution</application> permits you to have and\n"
-" maintain multiple calendars. This is useful if you maintain\n"
-" schedules for other people, if you are responsible for resource\n"
-" or room allocation, or if you have multiple personalities.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" <application>Evolution</application> le permite tener y mantener\n"
-" múltiples calendarios. Esto es útil si mantiene horarios para otras\n"
-" personas, si es el responsable de la búsqueda de recursos o\n"
-" habitaciones, o si tiene múltiples personalidades.\n"
-" </para>\n"
-
-#: tmp/usage-calendar.sgml.h:149
-msgid ""
-" <para>\n"
-" Once you've added a task to your to-do list, its summary\n"
-" appears in the <guilabel>Summary</guilabel> section of task\n"
-" list. To view or edit a detailed description of an item,\n"
-" double-click on it, or select it and click\n"
-" <guibutton>Edit</guibutton>. You can delete items by selecting\n"
-" them and clicking on the <guibutton>Delete</guibutton> button.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Una vez que ha añadido una tarea a su lista \"por hacer\", su resumen\n"
-" aparece en la sección <guilabel>Resumen</guilabel> de la lista de\n"
-" tareas. Para ver o editar una descripción detallada en un\n"
-" elemento, pulse dos veces sobre el, o seleccionelo y pulse\n"
-" <guibutton>Editar</guibutton>. Puede borrar un elemento\n"
-" seleccionandolo y pulsandolo en el botón "
-"<guibutton>Borrar</guibutton>.\n"
-" </para>\n"
-
-#: tmp/usage-calendar.sgml.h:158
-msgid ""
-" <para>\n"
-" The <guibutton>Prev</guibutton> and <guibutton>Next</guibutton>\n"
-" buttons will move you forward and back in your calendar pages.\n"
-" If you're looking at only one day, you'll see tomorrow's page,\n"
-" or yesterday's. If you're looking at your calendar by week,\n"
-" month, fortnight, or anything else, you'll move around by just\n"
-" that much. To come back to today's listing, click\n"
-" <guibutton>Today</guibutton>.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Los botones <guibutton>Previo</guibutton> y <guibutton>\n"
-" Siguiente</guibutton> le moverán hacia alante y hacia atrás en las\n"
-" páginas de su calendario. Si está viendo solo a un día, verá la\n"
-" página de mañana o la de ayer. Si esta viendo su calendario por\n"
-" semanas, meses, quincenas, o cualquier otra cosa, se movera esa\n"
-" cantidad de tiempo. Para volver al día de hoy, pulse\n"
-" <guibutton>Hoy</guibutton>.\n"
-" </para>\n"
-
-#: tmp/usage-calendar.sgml.h:168
-msgid ""
-" <para>\n"
-" The Task Pad, located in the lower right corner of the\n"
-" calendar, lets you keep a list of tasks separate from your\n"
-" calendar events. Tasks are colored and sorted by priority and\n"
-" due-date (see <xref linkend=\"config-prefs\"> for more\n"
-" information), and are included with calendar data during\n"
-" synchronization with a hand-held device. You can use the list\n"
-" in a larger format by choosing the <guibutton>Tasks</guibutton>\n"
-" button in the shortcut bar or in the folder tree.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" La lista de tareas, situada en la esquina inferior derecha del\n"
-" calendario, le permite mantener una lista de tareas separada de sus\n"
-" eventos de calendario. Las tareas son coloreadas y ordenadas por\n"
-" prioridad y fecha de vencimiento (vea <xref "
-"linkend=\"config-prefs\">\n"
-" para más inforación), y son incluidas con la información del\n"
-" calendario cuando se sincroniza con dispositivo de mano. Puede usar\n"
-" la lista en un formato más grande eligiendo el botón\n"
-" <guibutton>Tareas</guibutton> de la barra de atajos o del arbol de\n"
-" carpetas.\n"
-" </para>\n"
-
-#: tmp/usage-calendar.sgml.h:179
-msgid ""
-" <para>\n"
-" The toolbar offers you four different views of your calendar:\n"
-" one day, five days, a week, or a month at once. Press the\n"
-" calendar-shaped buttons on the right side of the toolbar to\n"
-" switch between views. You can also select a range of\n"
-" days&mdash; three days, ten days, a fortnight if you want\n"
-" &mdash; in the small calendar at the upper right.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" La barra de herramientas le ofrece cuatro vistas distintas de su\n"
-" calendario: un día, cinco días, una semana, o un mes. Pulse sobre\n"
-" los botones con forma de calendario a la derecha de la barra de\n"
-" herramientas para alternar entre las distintas vistas. Tambien puede\n"
-" seleccionar un rango de días&mdash; tres días, diez días, quinzenas\n"
-" si quiere&mdash; en el pequeño calendario en la esquina superior\n"
-" derecha.\n"
-" </para>\n"
-
-#: tmp/usage-calendar.sgml.h:188
-msgid ""
-" <para>\n"
-" To record a new task, click the <guibutton>Add</guibutton>\n"
-" button below the list. <application>Evolution</application>\n"
-" will pop up a small window with five items in it:\n"
-" \n"
-" <variablelist>\n"
-"\t <varlistentry>\n"
-"\t <term> <guilabel>Summary:</guilabel></term>\n"
-"\t <listitem>\n"
-" <para>\n"
-" The description you enter here will appear in the To Do\n"
-" list itself.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\t\n"
-"\t<varlistentry>\n"
-"\t <term> <guilabel>Due Date:</guilabel></term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" Decide when this item is\n"
-" due. You can either type in a date and time, or select one "
-"from\n"
-" the <guibutton>Calendar</guibutton> and time drop-down menus.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t</varlistentry>\n"
-"\t<varlistentry>\n"
-"\t <term><guilabel>Priority:</guilabel></term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" Select a level of importance from 1 (most important) to 9\n"
-" (least important).\n"
-" </para>\n"
-"\t </listitem> \n"
-"\t</varlistentry>\n"
-"\t<varlistentry>\n"
-"\t <term> <guilabel>Item Comments:</guilabel></term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" If you wish, you can keep a more detailed description of\n"
-" the item here.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t</varlistentry>\n"
-" </variablelist>\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Para guardar una nueva tarea, pulse sobre el botón\n"
-" <guibutton>Añadir</guibutton>. <application>Evolution</application>\n"
-" mostrará una pequeña ventana con cinco elementos en ella:\n"
-" \n"
-" <variablelist>\n"
-"\t <varlistentry>\n"
-"\t <term> <guilabel>Resumen:</guilabel></term>\n"
-"\t <listitem>\n"
-" <para>\n"
-" La descripción que escriba aquí aparecerá en la lista Por\n"
-" Hacer.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\t\n"
-"\t<varlistentry>\n"
-"\t <term> <guilabel>Fecha de Plazo:</guilabel></term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" Decida cuando vence el plazo para este elemnto.\n"
-" Puede escribir una fecha y una hora, o seleccionar una del\n"
-" <guibutton>Calendario</guibutton> y la hora de los menus "
-"desplegables.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t</varlistentry>\n"
-"\t<varlistentry>\n"
-"\t <term><guilabel>Prioridad:</guilabel></term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" Seleccione un nivel de importancia desde 1 (más importante) a "
-"9\n"
-" (menos importante).\n"
-" </para>\n"
-"\t </listitem> \n"
-"\t</varlistentry>\n"
-"\t<varlistentry>\n"
-"\t <term> <guilabel>Comentarios sobre el elemento:</guilabel></term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" Si lo desea, puede escribir aquí una descripción más "
-"detallada\n"
-" del elemento.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t</varlistentry>\n"
-" </variablelist>\n"
-" </para>\n"
-
-#: tmp/usage-calendar.sgml.h:235
-msgid ""
-" <para>\n"
-" To visit a specific date's calendar entries, click\n"
-" <guibutton>Go To</guibutton> and select the date in the dialog\n"
-" box that appears.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Para ver una fecha espefica del calendario, pulse\n"
-" <guibutton>Ir A</guibutton> y seleccione la fecha en la ventana\n"
-" de diálogo que aparece.\n"
-" </para>\n"
-
-#: tmp/usage-calendar.sgml.h:241
-msgid ""
-" <para>\n"
-" Of course, you'll want to use the calendar to do more than find\n"
-" out what day it is. This section will tell you how to schedule\n"
-" events, set alarms, and determine event recurrence.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Naturalmente, querra usar el calendario para hacer algo más que\n"
-" saber que día es. Esta sección le contará como fijar eventos, poner\n"
-" alarmas, y especificar recurrencias en los eventos.\n"
-" </para>\n"
-
-#: tmp/usage-calendar.sgml.h:247
-msgid ""
-" <para>\n"
-" To create a new calendar, select \n"
-" <menuchoice>\n"
-"\t<guimenu>File</guimenu> <guisubmenu>New</guisubmenu>\n"
-"\t<guimenuitem>Calendar</guimenuitem>\n"
-" </menuchoice>.\n"
-" You can place the calendar in any calendar folder and access it\n"
-" from the folder view. Alarms, configuration, and display for\n"
-" each calendar are separate from each other.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Para crear un nuevo calendario, seleccione\n"
-" <menuchoice>\n"
-"\t<guimenu>Archivo</guimenu> <guisubmenu>Nuevo</guisubmenu>\n"
-"\t<guimenuitem>Calendario</guimenuitem>\n"
-" </menuchoice>.\n"
-" Puede colocar el calendario en cualquier carpeta de calendario y\n"
-" acceder a el desde la vista de carpetas. Las alarmas, la\n"
-" configuración, y las vistas de cada calendario se mantienen "
-"separadas\n"
-" unas de otras.\n"
-" </para>\n"
-
-#: tmp/usage-calendar.sgml.h:258
-msgid " <title>Multiple Calendars</title>\n"
-msgstr " <title>Múltiples Calendarios</title>\n"
-
-#: tmp/usage-calendar.sgml.h:260
-msgid " <title>Scheduling With the Evolution Calendar</title>\n"
-msgstr " <title>Programando Citas con el Calendario de Evolution</title>\n"
-
-#: tmp/usage-calendar.sgml.h:262
-msgid " <title>Ways of Looking at your Calendar</title>\n"
-msgstr " <title>Maneras de ver su calendario</title>\n"
-
-#: tmp/usage-calendar.sgml.h:264
-msgid " <title>The Task Pad</title>\n"
-msgstr " <title>La lista de tareas</title>\n"
-
-#: tmp/usage-calendar.sgml.h:266
-msgid ""
-" <para>\n"
-" To begin using the calendar, select\n"
-" <guibutton>Calendar</guibutton> from the <interface>shortcut\n"
-" bar</interface>. By default, the calendar starts showing today's\n"
-" schedule on a ruled background. At the upper right, there's a\n"
-" monthly calendar you can use to switch days. Below that, there's\n"
-" a <guilabel>TaskPad</guilabel>, where you can keep a list of tasks\n"
-" seperate from your calendar appointments. The calendar's daily\n"
-" view is shown in <xref linkend=\"usage-calendar-fig\">.\n"
-"\n"
-" <!-- ============== Figure ============================= -->\n"
-" <figure id=\"usage-calendar-fig\">\n"
-" <title>Evolution Calendar View</title>\n"
-" <screenshot>\n"
-"\t<screeninfo>Evolution Contact Manager Window</screeninfo>\n"
-"\t<graphic fileref=\"fig/calendar\" format=\"png\" srccredit=\"Aaron "
-"Weber\">\n"
-"\t</graphic>\n"
-" </screenshot>\n"
-" </figure>\n"
-" <!-- ============== End of Figure ============================= --> \n"
-"\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Para comenzar a usar el calendario, seleccione\n"
-" <guibutton>Calendario</guibutton> de la <interface>barra de\n"
-" atajos</interface>. Por defecto, el calendario empieza mostrando el\n"
-" horario para hoy sobre un fondo reglado. Arriba a la derecha, hay un\n"
-" calendario mensual que puede usar para cambiar de día. Debajo de eso,\n"
-" hay una <guilabel>Lista de Tareas</guilabel>, donde puede tener una\n"
-" lista de tareas separada de sus citas del calendario. La vista diaria\n"
-" del calendario se muestra en <xref linkend=\"usage-calendar-fig\">.\n"
-"\n"
-" <!-- ============== Figure ============================= -->\n"
-" <figure id=\"usage-calendar-fig\">\n"
-" <title>Vista del Calendario de Evolution</title>\n"
-" <screenshot>\n"
-"\t<screeninfo>Vista del Administrador de Contactos de "
-"Evolution</screeninfo>\n"
-"\t<graphic fileref=\"fig/calendar\" format=\"png\" srccredit=\"Aaron "
-"Weber\">\n"
-"\t</graphic>\n"
-" </screenshot>\n"
-" </figure>\n"
-" <!-- ============== End of Figure ============================= --> \n"
-"\n"
-" </para>\n"
-
-#: tmp/usage-calendar.sgml.h:289
-msgid " <title>The Evolution Calendar</title>\n"
-msgstr " <title>El calendario de Evolution</title>\n"
-
-#: tmp/usage-calendar.sgml.h:291
-msgid ""
-"<!--\n"
-"<!DOCTYPE Chapter PUBLIC \"-//GNOME//DTD DocBook PNG Variant V1.1//EN\">\n"
-"-->\n"
-msgstr ""
-"<!--\n"
-"<!DOCTYPE Chapter PUBLIC \"-//GNOME//DTD DocBook PNG Variant V1.1//EN\">\n"
-"-->\n"
-
-#: tmp/usage-calendar.sgml.h:295
-msgid ""
-"<!-- ############### FIXME FIXME FIXME ############\n"
-"Feature not yet implemented, and may not be implemented due to\n"
-"lack of time, resources, and interest.\n"
-" <para>\n"
-" In addition, <application>Evolution</application> supports\n"
-" Hebrew, Muslim, and other calendar formats. To switch to a\n"
-" different calendar format, choose\n"
-" <guimenuitem>GUIMENUITEM</guimenuitem> from the\n"
-" <guimenu>GUIMENU</guimenu>.\n"
-" </para>\n"
-"################ END FIXME AREA ################## -->\n"
-msgstr ""
-"<!-- ############### FIXME FIXME FIXME ############\n"
-"Caracteristica no implementada y que puede que no se implemente por falta\n"
-"de tiempo, recursos, e interes.\n"
-" <para>\n"
-" In addition, <application>Evolution</application> supports\n"
-" Hebrew, Muslim, and other calendar formats. To switch to a\n"
-" different calendar format, choose\n"
-" <guimenuitem>GUIMENUITEM</guimenuitem> from the\n"
-" <guimenu>GUIMENU</guimenu>.\n"
-" </para>\n"
-"################ END FIXME AREA ################## -->\n"
-
-#: tmp/usage-calendar.sgml.h:307
-msgid ""
-"<!-- ############UNIMPLEMENTED FEATURES ###################\n"
-"\n"
-" <sect2 id=\"usage-calendar-apts-group\">\n"
-" <title>Appointments for Groups</title>\n"
-" <para>\n"
-"\tIf you have your calendar set up to work with other\n"
-"\tcalendars over a network, you can see when others are\n"
-"\tavailable to meet with you. \n"
-" </para>\n"
-" <note>\n"
-"\t<title>Unimplemented Feature</title>\n"
-"\t<para>This feature is not yet implemented.</para>\n"
-" </note>\n"
-"\n"
-" <para>\n"
-"\tIn addition, you can use <application>Evolution</application>\n"
-"\tto mark a meeting request on another person's calendar. To do\n"
-"\tit, click <guibutton>New</guibutton> in the calendar toolbar,\n"
-"\tor select <menuchoice> <guimenu>File</guimenu>\n"
-"\t<guisubmenu>New</guisubmenu>\n"
-"\t<guimenuitem>Appointment</guimenuitem> </menuchoice> to bring\n"
-"\tup the <interface>new event</interface> window. Then describe\n"
-"\tthe event as you would any other. Before you click\n"
-"\t<guibutton>OK</guibutton>, (INSERT DESCRIPTION HERE...).\n"
-"\t<application>Evolution</application> will automatically send\n"
-"\temail to each person on the request list, notifying of the\n"
-"\ttime and date of the meeting you have requested with them. In\n"
-"\taddition, it will mark the event on your calendar and on\n"
-"\ttheirs as tentative, rather than a confirmed, event.\n"
-" </para>\n"
-" <para>\n"
-"\tTo mark a tentative event as confirmed, click once on the\n"
-"\tevent in the <interface>calendar view</interface> to select\n"
-"\tit, and then choose <guimenuitem>Event\n"
-"\tProperties</guimenuitem> from the <guimenu>Settings</guimenu>\n"
-"\tmenu. In the <interface>Event Properties</interface> dialog\n"
-"\twindow, click the \"tentative\" button to De-select the\n"
-"\tevent.\n"
-" </para>\n"
-" </sect2>\n"
-"\n"
-"\n"
-" <sect2 id=\"usage-calendar-apts-privs\">\n"
-" <title>Scheduling privileges</title>\n"
-" <para>\n"
-"\tThere are several levels of scheduling privileges. You\n"
-"\tcan set whether people can see your calendar, whether they\n"
-"\tcan request meetings or appointments, and whether they can\n"
-"\tcreate appointments. This section may have to be deleted,\n"
-"\tbecause I don't know if we are going to support privileges\n"
-"\tat all.\n"
-" </para>\n"
-" </sect2>\n"
-" ########## END UNIMPLEMENTED FEATURESET ############ -->\n"
-msgstr ""
-"<!-- ############UNIMPLEMENTED FEATURES ###################\n"
-" ################## NO LO VOY A TRADUCIR PORQUE NO SE MUESTRA ######\n"
-"\n"
-" <sect2 id=\"usage-calendar-apts-group\">\n"
-" <title>Appointments for Groups</title>\n"
-" <para>\n"
-"\tIf you have your calendar set up to work with other\n"
-"\tcalendars over a network, you can see when others are\n"
-"\tavailable to meet with you. \n"
-" </para>\n"
-" <note>\n"
-"\t<title>Unimplemented Feature</title>\n"
-"\t<para>This feature is not yet implemented.</para>\n"
-" </note>\n"
-"\n"
-" <para>\n"
-"\tIn addition, you can use <application>Evolution</application>\n"
-"\tto mark a meeting request on another person's calendar. To do\n"
-"\tit, click <guibutton>New</guibutton> in the calendar toolbar,\n"
-"\tor select <menuchoice> <guimenu>File</guimenu>\n"
-"\t<guisubmenu>New</guisubmenu>\n"
-"\t<guimenuitem>Appointment</guimenuitem> </menuchoice> to bring\n"
-"\tup the <interface>new event</interface> window. Then describe\n"
-"\tthe event as you would any other. Before you click\n"
-"\t<guibutton>OK</guibutton>, (INSERT DESCRIPTION HERE...).\n"
-"\t<application>Evolution</application> will automatically send\n"
-"\temail to each person on the request list, notifying of the\n"
-"\ttime and date of the meeting you have requested with them. In\n"
-"\taddition, it will mark the event on your calendar and on\n"
-"\ttheirs as tentative, rather than a confirmed, event.\n"
-" </para>\n"
-" <para>\n"
-"\tTo mark a tentative event as confirmed, click once on the\n"
-"\tevent in the <interface>calendar view</interface> to select\n"
-"\tit, and then choose <guimenuitem>Event\n"
-"\tProperties</guimenuitem> from the <guimenu>Settings</guimenu>\n"
-"\tmenu. In the <interface>Event Properties</interface> dialog\n"
-"\twindow, click the \"tentative\" button to De-select the\n"
-"\tevent.\n"
-" </para>\n"
-" </sect2>\n"
-"\n"
-"\n"
-" <sect2 id=\"usage-calendar-apts-privs\">\n"
-" <title>Scheduling privileges</title>\n"
-" <para>\n"
-"\tThere are several levels of scheduling privileges. You\n"
-"\tcan set whether people can see your calendar, whether they\n"
-"\tcan request meetings or appointments, and whether they can\n"
-"\tcreate appointments. This section may have to be deleted,\n"
-"\tbecause I don't know if we are going to support privileges\n"
-"\tat all.\n"
-" </para>\n"
-" </sect2>\n"
-" ########## END UNIMPLEMENTED FEATURESET ############ -->\n"
-
-#~ msgid ""
-#~ " <para>\n"
-#~ " To view yesterday's appointments, &mdash;last week's, if you're in\n"
-#~ " the weekly view, and last month's for the monthly view&mdash; click\n"
-#~ " the <guibutton>Prev</guibutton> button. For tomorrow, next week,\n"
-#~ " or next month, click <guibutton>Next</guibutton>, and of course,\n"
-#~ " click <guibutton>Today</guibutton> for today.\n"
-#~ " </para>\n"
-#~ msgstr ""
-#~ " <para>\n"
-#~ " Para ver las citas de ayer, &mdash;de la semana pasada, si esta en\n"
-#~ " la vista semanal, y del mes pasado en la vista mensual&mdash; pulse\n"
-#~ " el botón <guibutton>Anterior</guibutton>. Para mañana, la semana "
-#~ "que\n"
-#~ " viene o el mes próximo, pulse <guibutton>Siguiente</guibutton>, y\n"
-#~ " naturalmente, pulse <guibutton>Hoy</guibutton> para hoy.\n"
-#~ " </para>\n"
diff --git a/doc/es.po/usage-contact.sgml.po b/doc/es.po/usage-contact.sgml.po
deleted file mode 100644
index a09054862a..0000000000
--- a/doc/es.po/usage-contact.sgml.po
+++ /dev/null
@@ -1,1119 +0,0 @@
-# Translation into Spanish of Evolution docs.
-# Copyright (C) 2000 Free Software Foundation, Inc.
-# Héctor García Álvarez <hector@scouts-es.org>, 2000.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: evolution-docs\n"
-"POT-Creation-Date: 2001-03-21 23:37+0100\n"
-"PO-Revision-Date: 2000-12-28 15:38+0100\n"
-"Last-Translator: Héctor García Álvarez <hector@scouts-es.org>\n"
-"Language-Team: Spanish <es@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=iso-8859-1\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: tmp/usage-contact.sgml.h:1
-msgid ""
-"\t <para>\n"
-"\t Ray wants to schedule a meeting with Company X, so he\n"
-"\t checks the network for the Company X address card so he\n"
-"\t knows whom to call there. Since his company also shares\n"
-"\t calendars, he then learns that his co-worker Deanna has\n"
-"\t already scheduled a meeting with Company X next Thursday.\n"
-"\t He can either go to the meeting himself or ask Deanna to\n"
-"\t discuss his concerns for him. Either way, he avoids\n"
-"\t scheduling an extra meeting with Company X. \n"
-"\t </para>\n"
-msgstr ""
-"\t <para>\n"
-"\t Raul quiere concertar una reunión con la Compañía X, así que\n"
-"\t busca en la red la tarjeta de la Compañía X para saber a quien tiene\n"
-"\t que llamar. Dado que su compañia comparte un calendario, ve que su\n"
-"\t compañera Diana ya ha concertado una reunión con la Compañía X para "
-"el\n"
-"\t próximo jueves. Puede ir el mismo a la reunión o pedir a Diana que\n"
-"\t trate el tema por el. De cualquier modo, evita concertar otra cita\n"
-"\t co la Compañía X. \n"
-"\t </para>\n"
-
-#: tmp/usage-contact.sgml.h:12
-msgid "\t <title>Evolution Contact Editor</title>\n"
-msgstr "\t <title>Editor de contactos de Evolution</title>\n"
-
-#: tmp/usage-contact.sgml.h:14
-msgid ""
-"\t <para>\n"
-"\t He opens his contacts folder, and runs a quick search for\n"
-"\t \"Curtis.\" There are eighteen different people with that name\n"
-"\t in the file. He then enters \"Sales,\" and\n"
-"\t <application>Evolution</application> narrows it down to the\n"
-"\t right Curtis. He only becomes annoyed when he discovers that\n"
-"\t the call was not actually important.\n"
-" </para>\n"
-msgstr ""
-"\t <para>\n"
-"\t Abre la carpeta de contactos, y realiza una busqueda rápida por\n"
-"\t \"Curtis\". Hay dieciocho personas diferentes con ese nombre en el\n"
-"\t archivo. Entonces escribe \"Ventas\", y\n"
-"\t <application>Evolution</application> lo reduce al Curtis correcto.\n"
-"\t Tan solo se siente molesto cuando descubre que la llamada no era\n"
-"\t realmente importante.\n"
-" </para>\n"
-
-#: tmp/usage-contact.sgml.h:23
-msgid ""
-"\t<para>\n"
-"\t Tom comes back from lunch and finds a note on his\n"
-"\t keyboard: \"Curtis in sales called for you, but he didn't\n"
-"\t leave a number, and I forgot to write down the name of the\n"
-"\t company he works for. He said it was important, though.\"\n"
-"\t Tom is not at all annoyed.\n"
-" </para>\n"
-msgstr ""
-"\t<para>\n"
-"\t Tom vuelve de almorzar y se encuantra una nota en su teclado:\n"
-"\t \"Le ha llamado Curtis de ventas, pero no dejo un teléfono,\n"
-"\t y se me olvidó anotar la compañía para la que trabaja. Eso si, dijo\n"
-"\t que era importante.\"\n"
-"\t Tom no está molesto en absoluto.\n"
-" </para>\n"
-
-#: tmp/usage-contact.sgml.h:31
-msgid ""
-"\t<para>\n"
-"\t The simplest way to group address cards is to use folders.\n"
-"\t By default, cards start in the\n"
-"\t <guilabel>Contacts</guilabel> folder. If you've read <xref\n"
-"\t linkend=\"usage-mainwindow\"> then you already know that you\n"
-"\t can create a new folder by selecting \n"
-" <menuchoice>\n"
-" <guimenu>File</guimenu>\n"
-"\t <guisubmenu>New</guisubmenu>\n"
-"\t <guimenuitem>Folder</guimenuitem>\n"
-" </menuchoice>\n"
-" and that you can put new folders anywhere you like. Just\n"
-"\t like with mail, cards must be in a card folder, and no card\n"
-"\t can be in two places at once. If you want more\n"
-"\t flexibility, try <xref\n"
-"\t linkend=\"usage-contact-organize-group-category\">.\n"
-"\t </para>\n"
-msgstr ""
-"\t<para>\n"
-"\t La manera más sencilla de agrupar tarjetas de direcciones es usar\n"
-"\t carpetas. Por defecto, las tarjetas están en la carpeta\n"
-"\t <guilabel>Contactos</guilabel>. Si ha leido <xref\n"
-"\t linkend=\"usage-mainwindow\"> entonces sabrá que puede crear una nueva\n"
-"\t carpeta seleccionando \n"
-" <menuchoice>\n"
-" <guimenu>Archivo</guimenu>\n"
-"\t <guisubmenu>Nuevo</guisubmenu>\n"
-"\t <guimenuitem>Carpeta</guimenuitem>\n"
-" </menuchoice>\n"
-" y que puede poner nuevas carpetas en cualquier sitio que quiera.\n"
-"\t Exactamente como con el correo, las tarjetas deben estar en una "
-"carpeta\n"
-"\t de tarjetas, y ninguna tarjeta puede estar en dos sitios a la vez. Si\n"
-"\t quiere más flexibilidad, pruebe <xref\n"
-"\t linkend=\"usage-contact-organize-group-category\">.\n"
-"\t </para>\n"
-
-#: tmp/usage-contact.sgml.h:49
-msgid ""
-"\t<para>\n"
-" The other way to group cards is to mark them as belonging\n"
-" to different categories. The difference between folders\n"
-" and categories is that folders contain cards, but category\n"
-" membership is a property of each card. That means that you\n"
-" can mark a card as being in several categories or no\n"
-" category at all. For example, I put my friend Matthew's\n"
-" card in the \"Business\" category, because he works with me,\n"
-" the \"Friends\" category, because he's also my friend, and\n"
-" the \"Frequent\" category, because I call him all the time\n"
-" and can never remember his phone number. \n"
-" </para>\n"
-msgstr ""
-"\t<para>\n"
-" La otra manera de agrupar tarjetas es marcarlas como\n"
-" pertenecientes a distintas categorias. La diferencia entre\n"
-" carpetas y categorias es que las carpetas contienen las "
-"tarjetas,\n"
-" pero pertenecer a una categoría es una propiedad de cada "
-"tarjeta.\n"
-" Lo que significa que puede marcar una tarjeta como perteneciente\n"
-" a varias categorias o a ninguna. Por ejemplo, yo pongo la\n"
-" tarjeta de mi amigo Matthew en la categoría \"Negocios\", porque\n"
-" trabaja conmigo, en la categoría \"Amigos\", porque tambien es "
-"mi\n"
-" amigo, y en la categoría \"Frecuente\", porque le llamo\n"
-" continuamente y nunca me acuerdo de su número de teléfono.\n"
-" </para>\n"
-
-#: tmp/usage-contact.sgml.h:62
-msgid ""
-"\t<para>\n"
-" Then, you can refer to all the cards in that category by:\n"
-" <!-- FIXME --> Waiting for Evolution to support the\n"
-" operation.\n"
-" </para>\n"
-msgstr ""
-"\t<para>\n"
-" Entonces, puede referirse a todas las tarjetas en esa categoría\n"
-" haciendo: <!-- ARREGLAME --> Esperando a que Evolution soporte\n"
-" la operación.\n"
-" </para>\n"
-
-#: tmp/usage-contact.sgml.h:68
-msgid ""
-"\t<para>\n"
-" To mark a card as belonging to a category, click the\n"
-" <guibutton>Categories</guibutton> button at the lower\n"
-" right. From the dialog box that appears, you can check as\n"
-" many or as few categories as you like.\n"
-" </para>\n"
-msgstr ""
-"\t<para>\n"
-" Para marcar una tarjeta como perteneciente a una categoría, "
-"pulse\n"
-" botón <guibutton>Categorias</guibutton> abajo a la derecha.\n"
-" De la ventana de diálogo que aparece, puede marcar tantas\n"
-" categorías como quiera.\n"
-" </para>\n"
-
-#: tmp/usage-contact.sgml.h:75
-msgid ""
-"\t<para>\n"
-" To put a card into a folder, just drag it there from the\n"
-" folder view. Remember that contact cards can only go in\n"
-" contact folders, just like mail can only go in mail folders,\n"
-" and calendars in calendar folders.\n"
-" </para>\n"
-msgstr ""
-"\t<para>\n"
-" Para poner una tarjeta en una carpeta, simplemente arrastrela "
-"allí\n"
-" desde la vista de carpetas. Recuerde que las tarjetas de\n"
-" contactos solo pueden estar en carpetas de contactos, como el\n"
-" correo solo puede estar en carpetas de correo, y los calendarios\n"
-" en carpetas de calendarios.\n"
-" </para>\n"
-
-#: tmp/usage-contact.sgml.h:82
-msgid "\t<title>Grouping with Categories</title>\n"
-msgstr "\t<title>Agrupando con Categorías</title>\n"
-
-#: tmp/usage-contact.sgml.h:84
-msgid "\t<title>Grouping with Folders</title>\n"
-msgstr "\t<title>Agrupando con Carpatas</title>\n"
-
-#: tmp/usage-contact.sgml.h:86
-msgid "\t<title>Refining a Quick Search</title>\n"
-msgstr "\t<title>Refinando una Búsqueda Rápida</title>\n"
-
-#: tmp/usage-contact.sgml.h:88
-msgid "\t<title>Sharing Address Cards and Calendar Data</title>\n"
-msgstr ""
-"\t<title>Conpartiendo Tarjetas de Direcciones y Datos del "
-"Calendario</title>\n"
-
-#: tmp/usage-contact.sgml.h:90
-msgid ""
-" <!-- FIXME: Feature Not Implemented\n"
-"\t<para>\n"
-"\n"
-" If the master list of categories doesn't suit you, you can\n"
-" add your own. Just enter the new category's name in the\n"
-" text box, then click <guibutton>Categories</guibutton> and\n"
-" choose <guilabel>Add to Master List</guilabel> in the\n"
-" window that appears. \n"
-" </para>\n"
-" -->\n"
-msgstr ""
-" <!-- ARREGLAME: Caracteristica no implementeada\n"
-"\t<para>\n"
-"\n"
-" Si la lista principal de categorías no le es suficiente, puede\n"
-" añadir las suyas propias. Simplemente escriba el nombre de la\n"
-" nueva categoría en la caja de texto, entonces pulse\n"
-" <guibutton>Categorias</guibutton> y elija\n"
-" <guilabel>Añadir a la Lista Principal</guilabel> en la ventana\n"
-" aparece. \n"
-" </para>\n"
-" -->\n"
-
-#: tmp/usage-contact.sgml.h:101
-msgid ""
-" <para>\n"
-"\t Between <guilabel>Delete</guilabel> and <guilabel>View\n"
-" \t All</guilabel> is a quick search field. To use it, select\n"
-" \t from the drop-down list which sort of search you'd like to\n"
-" \t perform (the whole card, just the name, or just the email\n"
-" \t address), then enter one or more words in the text entry\n"
-" \t box, and press <keycap>Enter</keycap>.\n"
-" \t <application>Evolution</application> will search through\n"
-" \t the contents of every displayed card to find one that\n"
-" \t matches. You can refine searches by doing several in\n"
-" \t succession, or start over by pressing the <guibutton>View\n"
-" \t All</guibutton> button.\n"
-"\t</para>\n"
-msgstr ""
-" <para>\n"
-"\t Entre <guilabel>Borrar</guilabel> y <guilabel>Ver\n"
-" \t Todo</guilabel> hay un campo de búsqueda rápida. Para usarlo,\n"
-" \t elija de la lista descendente que clase de búsqueda quiere hacer\n"
-" \t (toda la tarjeta, solo el nombre, o solo la dirección de correo),\n"
-" \t entonces escriba una o más palabras en la caja de entrada de "
-"texto,\n"
-" \t y pulse <keycap>Enter</keycap>.\n"
-" \t <application>Evolution</application> buscará en los contenidos\n"
-" \t de todas las tarjetas mostradas para encontrar una que concuerde.\n"
-" \t Puede refinar las búsquedas haciendo varias búsquedas sucesivas,\n"
-" \t o empezar de nuevo pulsando el botón <guibutton>Ver\n"
-" \t Todas</guibutton>.\n"
-"\t</para>\n"
-
-#: tmp/usage-contact.sgml.h:115
-msgid ""
-" <para>\n"
-"\t If there are no matches, the card display will be\n"
-"\t blank. When you'd like to see all the cards again, press\n"
-"\t <guilabel>Show All</guilabel>.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-"\t Si no hay coincidencias, la tarjeta mostrada estará en blanco.\n"
-"\t Cuando quiera volver a ver todas las tarjetas de nuevo, pulse\n"
-"\t <guilabel>Mostrar Todas</guilabel>.\n"
-" </para>\n"
-
-#: tmp/usage-contact.sgml.h:121
-msgid ""
-" <para>\n"
-"\t You already know that when you are writing an email, you can\n"
-"\t address it to one or more people, and that\n"
-"\t <application>Evolution</application> will fill in addresses\n"
-"\t from your address book's address cards if you let it. In\n"
-"\t addition to that, you can send email to everyone in a\n"
-"\t particular group if you choose.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-"\t Ya sabe que cuando escribe un mensaje, puede dirigirlo a una o más\n"
-"\t personas, y que <application>Evolution</application> rellenará las\n"
-"\t direcciones con las direcciones de las tarjetas de su agenda si le\n"
-"\t deja. Ademas, si quiere puede enviar mensajes a todos los de un\n"
-"\t grupo en particular.\n"
-" </para>\n"
-
-#: tmp/usage-contact.sgml.h:130
-msgid ""
-" <para>\n"
-"\tAs noted before, when you get information about a person in\n"
-"\tthe mail or in a calendar entry, you can add it to an address\n"
-"\tcard. To do so, right click on any email address or email\n"
-"\tmessage, and select <guimenuitem>Add Address\n"
-"\tCard</guimenuitem> from the menu that appears. Of course,\n"
-"\t<application> Evolution</application> also adds cards from a\n"
-"\thand-held device during HotSync operation. For more\n"
-"\tinformation about that, see <xref linkend=\"usage-sync\">.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-"\tComo se ha visto antes, cuando obtiene información acerca de una\n"
-"\tpersona en el correo o en una entrada del calendario, puede añadirla\n"
-"\ta una tarjeta de direcciones. Para hacerlo, pulse con el botón\n"
-"\tderecho en cualquier dirección de correo o mensaje de correo, y\n"
-"\tseleccione <guimenuitem>Añadir Tarjeta de Direcciones</guimenuitem>\n"
-"\tdel menú que aparece. Naturalmente,\n"
-"\t<application>Evolution</application> tambien añade tarjetas desde un\n"
-"\tdispositivo de mano durante la operación de sincronización. Para más\n"
-"\tinformación acerca de eso, vea <xref linkend=\"usage-sync\">.\n"
-" </para>\n"
-
-#: tmp/usage-contact.sgml.h:141
-msgid ""
-" <para>\n"
-"\tThe contact editor window has two tabs,\n"
-" \t<guilabel>General</guilabel>, for basic contact information,\n"
-" \tand <guilabel>Details</guilabel>, for a more specific\n"
-" \tdescription of the person. In addition, it contains a\n"
-" \t<guimenu>File</guimenu> menu, (see <xref\n"
-" \tlinkend=\"menuref-contact-editor\">) and a toolbar with three\n"
-" \titems: <guilabel>Save and Close</guilabel>,\n"
-" \t<guilabel>Print</guilabel>, and <guilabel>Delete</guilabel>.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-"\tLa ventana del editor de contactos tiene dos pestañas,\n"
-" \t<guilabel>General</guilabel>, para información contacto básica,\n"
-" \ty <guilabel>Detalles</guilabel>, para una descripción más específica\n"
-" \tde la persona. Ademas, contiene un menú\n"
-" \t<guimenu>Archivo</guimenu>, (ver <xref\n"
-" \tlinkend=\"menuref-contact-editor\">) y una barra de herramientas con\n"
-" \ttres elementos: <guilabel>Guardar y Cerrar</guilabel>,\n"
-" \t<guilabel>Imprimir</guilabel>, y <guilabel>Borrar</guilabel>.\n"
-" </para>\n"
-
-#: tmp/usage-contact.sgml.h:152
-msgid ""
-" <para>\n"
-" <application>Evolution</application> offers two ways for you\n"
-" to organize your cards. The first way is to use folders;\n"
-" this works the same way that mail folders do. For more\n"
-" flexibility, you can also mark contacts as members of\n"
-" different categories.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" <application>Evolution</application> le ofrece dos maneras de\n"
-" organizar sus tarjetas. La primera es usando carpetas.\n"
-" Esto funciona igual que las carpetas de correo. Para más\n"
-" flexibilidad, puede marcar los contactos como miembros de\n"
-" diferentes categorías.\n"
-" </para>\n"
-
-#: tmp/usage-contact.sgml.h:160
-msgid ""
-" <para>\n"
-" Click <guibutton>Add Criterion</guibutton> to increase the\n"
-" number of criteria you'd like to use in the search, and\n"
-" <guibutton>Remove Criterion</guibutton> to remove one from the\n"
-" bottom of the list. Your criteria may be a search within the\n"
-" <guilabel>Name</guilabel> or <guilabel>Email</guilabel>\n"
-" fields; alternately you can choose to search through all the\n"
-" fields with a regular expression. Then, you can select from\n"
-" all the familiar requirements like <guilabel>Begins\n"
-" With</guilabel> and <guilabel>Does Not Contain</guilabel>,\n"
-" decide whether to match <guilabel>All</guilabel> or\n"
-" <guilabel>Any</guilabel> of your criteria, and press\n"
-" <guibutton>Search</guibutton> to set it all off.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Pulse <guibutton>Añadir Criterio</guibutton> para aumentar el\n"
-" número de criterios que quiere usar en la búsqueda, y\n"
-" <guibutton>Eliminar Criterio</guibutton> para eliminar uno del la\n"
-" parte inferior de la lista. Su criterio puede ser una búsqueda en\n"
-" los campos <guilabel>Nombre</guilabel> o\n"
-" <guilabel>Correo</guilabel>. Alternativamente puede elegir buscar "
-"en\n"
-" todos los campos con una expresión regular. Entonces, puede\n"
-" seleccionar entre los requisistos <guilabel>Comienza con</guilabel>\n"
-" y <guilabel>No contiene</guilabel>, decidir si deben conincidir\n"
-" <guilabel>Todos</guilabel> o <guilabel>Alguno</guilabel> de sus\n"
-" criterios, y pulsar <guibutton>Buscar</guibutton> para ejecutar\n"
-" todo.\n"
-" </para>\n"
-
-#: tmp/usage-contact.sgml.h:175
-msgid ""
-" <para>\n"
-" If you prefer to perform a more complex search, press\n"
-" <guibutton>Find</guibutton> or choose\n"
-" <menuchoice><guimenu>Tools</guimenu><guimenuitem>Search for\n"
-" Contact</guimenuitem></menuchoice>. This will open the\n"
-" in-depth search window, which lets you use multiple search\n"
-" criteria in the same way that email filters and <glossterm\n"
-" linkend=\"vfolder\">virtual folders</glossterm> do.. </para>\n"
-msgstr ""
-" <para>\n"
-" Si prefiere realizar una búsqueda más compleja, pulse\n"
-" <guibutton>Buscar</guibutton> o elija\n"
-" <menuchoice><guimenu>Herramientas</guimenu><guimenuitem>Buscar\n"
-" Contacto</guimenuitem></menuchoice>. Esto abrirá la ventana de\n"
-" búsqueda a fondo, que le permitirá usar multiples criterios de\n"
-" búsqueda de la misma manera que en los filtros de correo y las\n"
-" <glossterm linkend=\"vfolder\">carpetas virtuales</glossterm>.\n"
-" </para>\n"
-
-#: tmp/usage-contact.sgml.h:184
-msgid ""
-" <para> The <guilabel>General</guilabel> tab has seven sections,\n"
-" each with an icon: a face, for name and company; a telephone\n"
-" for phone numbers; an envelope for email address; a globe for\n"
-" web page address; a house for postal address; a file folder\n"
-" for contacts, and a briefcase for categories. \n"
-" </para>\n"
-msgstr ""
-" <para> La pestaña <guilabel>General</guilabel> tiene siete secciones,\n"
-" cada una con un icono, una cara, para el nombre y la compañía, un\n"
-" teléfono para números de teléfono, un sobre para direcciones de\n"
-" correo, un globo terraqueo para direcciones de páginas web, una\n"
-" casa para dirección postal, un archivador para contactos, y una\n"
-" cartera para categorías. \n"
-" </para>\n"
-
-#: tmp/usage-contact.sgml.h:191
-msgid " <title>Evolution Address Book</title>\n"
-msgstr " <title>Agenda de Direcciones de Evolution</title>\n"
-
-#: tmp/usage-contact.sgml.h:193
-msgid " <title>Groups of contacts</title>\n"
-msgstr " <title>Grupos de contactos</title>\n"
-
-#: tmp/usage-contact.sgml.h:195
-msgid " <title>Managing a Mailing list</title>\n"
-msgstr " <title>Administrando una Lista de Correo</title>\n"
-
-#: tmp/usage-contact.sgml.h:197
-msgid " <title>Searching for Contacts</title>\n"
-msgstr " <title>Buscando Contactos</title>\n"
-
-#: tmp/usage-contact.sgml.h:199
-msgid " <title>Send me a Card: Adding New Cards Quickly</title>\n"
-msgstr ""
-" <title>Envíame una Tarjeta: Añadiendo Tarjetas Rápidamente</title>\n"
-
-#: tmp/usage-contact.sgml.h:201
-msgid ""
-" <para>\n"
-" The <guilabel>Details</guilabel> tab is, fortunately, much more\n"
-" simple: three sections, all of which are more or less obvious:\n"
-" the briefcase next to the details about the contact's\n"
-" professional life; the face next to the details about their\n"
-" personal life; the globe next to a big blank space you can use\n"
-" for anything and everything else you'd like to note about them.\n"
-" If you ever wanted to have that uncanny knack for remembering\n"
-" obscure details like the date of someone's anniversary (perhaps\n"
-" your own) this is the way to develop it.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" La pestaña de <guilabel>Detalles</guilabel> es, afortunadamente,\n"
-" mucho más simple: tres secciones, las cuales son más o menos obvias:\n"
-" la cartera al lado de los detalles acerca de la vida profesional del\n"
-" contacto, la cara al lado de los detalles de su vida personal,\n"
-" el globo terraqueo al lado de un gran espacio en blanco que puede\n"
-" usar para cualquier cosa que quiera anotar.\n"
-" Si alguna vez quiso tener ese poder sobrenatural de recordar oscuros\n"
-" detalles como la fecha del aniversario de alguien (quiza del suyo\n"
-" propio) esta es la manera de desarrollarlo.\n"
-" </para>\n"
-
-#: tmp/usage-contact.sgml.h:213
-msgid ""
-" <para>\n"
-" The last item in the <guilabel>General</guilabel> tab is the\n"
-" <guilabel>Categories</guilabel> organization tool; for\n"
-" information on that, read <xref\n"
-" linkend=\"usage-contact-organize\">.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" El último elemento en la pestaña <guilabel>General</guilabel> es la\n"
-" herramienta de organización de <guilabel>Categorias</guilabel>, para\n"
-" ver información acerca de ella, lea <xref\n"
-" linkend=\"usage-contact-organize\">.\n"
-" </para>\n"
-
-#: tmp/usage-contact.sgml.h:220
-msgid ""
-" <para>\n"
-" If you keep your cards on a network using an <glossterm\n"
-" linkend=\"ldap\">LDAP</glossterm> server, you can share access to\n"
-" them, browse other address books, or maintain a shared set of\n"
-" contact information for your company or your department. This\n"
-" is the sort of feature you'll want to use if your company has a\n"
-" list of vendors and clients that needs constant updating. If\n"
-" share calendars as well as address books, people can avoid\n"
-" duplicating work and keep up to date on developments within\n"
-" their work-group or across the entire company.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Si tiene sus tarjetas en una red usando un servidor <glossterm\n"
-" linkend=\"ldap\">LDAP</glossterm>, puede compartir el acceso a "
-"ellas,\n"
-" ver otras agendas, o mantener información de contacto compartida\n"
-" para su compañía o su departamento. Esta es la clase de\n"
-" características que querrá si su compañía tiene una lista de\n"
-" vendedores y clientes que necesita ser actualizada constantemente.\n"
-" Si se comparten calendarios al igual que agendas, la gente puede\n"
-" evitar duplicar trabajo y mantenerse al día en los desarrollos de su\n"
-" grupo de trabajo o de la compañía entera.\n"
-" </para>\n"
-
-#: tmp/usage-contact.sgml.h:232
-msgid ""
-" <para>\n"
-" If you want to add or change cards, you'll use the contact\n"
-" editor. To change a card that already exists, double click on\n"
-" it to open the contact editor window with all the current\n"
-" information already filled in. If you want to create a new\n"
-" one, clicking the <guibutton>New</guibutton> button in the\n"
-" toolbar will open the same window, with blank entry boxes for\n"
-" you to fill in.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Si quiere añadir o cambiar tarjetas, usará el editor de contactos.\n"
-" Para cambiar una tarjeta que ya existe, pulse dos veces sobre ella\n"
-" para abrir la ventana del editor de contactos con toda la "
-"información\n"
-" actual. Si quiere crear una nueva, pulsando el botón\n"
-" <guibutton>Nuevo</guibutton> el la barra de herramientas abrirá la\n"
-" misma ventana, con los campos en blanco para que los rellene.\n"
-" </para>\n"
-
-#: tmp/usage-contact.sgml.h:242
-msgid ""
-" <para>\n"
-" Of course, you don't want to share all of your cards&mdash; why\n"
-" overload the network with a list of babysitters or tell\n"
-" everyone in the office you're talking to new job prospects? If\n"
-" you keep cards on your own computer, you can decide which items\n"
-" you want to make accessible to others.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Naturalmente, no quiere compartir todas sus tarjetas&mdash; ¿porque\n"
-" sobrecargar la red con una lista de niñeras o decir a todos\n"
-" en la oficina que esta buscando un nuevos trabajo? Si mantiene\n"
-" sus tarjetas en su propio ordenador, puede decidir que elementos\n"
-" quiere hacer accesibles a otros.\n"
-" </para>\n"
-
-#: tmp/usage-contact.sgml.h:250
-msgid ""
-" <para>\n"
-" Organizing your address book is a lot like organizing your\n"
-" mail. You can have folders and searches the same way you can\n"
-" with mail, but the address book does not allow vFolders. It\n"
-" does, however, allow each card to fall under several\n"
-" categories, and allow you to create your own categories. To\n"
-" learn about categories, read <xref\n"
-" linkend=\"usage-contact-organize-group-category\">.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Organizar su agenda de direcciones es muy parecido a organizar su\n"
-" correo. Puede tener carpetas y búsquedas de la misma manera que\n"
-" con el correo, pero la agenda no admite carpetas virtuales. Lo\n"
-" que si hace, es permitir a cada tarjeta estar en varias categorías,\n"
-" y le permite crear sus propias categorías. Para aprender acerca de\n"
-" las categorías, lea <xref\n"
-" linkend=\"usage-contact-organize-group-category\">.\n"
-" </para>\n"
-
-#: tmp/usage-contact.sgml.h:260
-msgid ""
-" <para>\n"
-" The address book works closely with\n"
-" <application>Evolution</application>'s mail and calendar tools.\n"
-" For example, you can use the address book to help you manage\n"
-" mailing lists, and send or recieve address cards over email.\n"
-" More tools are on the way, and when they arrive, <!-- FIXME -->\n"
-" they will be described in this section.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" La agenda de direcciones trabaja bien con las herramientas\n"
-" de correo y calendario de <application>Evolution</application>.\n"
-" Por ejemplo, puede usar la agenda de direcciones para ayudarle a\n"
-" administrar listas de correo, y enviar o recivir tarjetas por "
-"correo.\n"
-" Hay más herramientas en camino, y cuando llegen, <!-- ARREGLAME -->\n"
-" serán descritas en esta sección.\n"
-" </para>\n"
-
-#: tmp/usage-contact.sgml.h:269
-msgid ""
-" <para>\n"
-" The toolbar for the address book is quite simple:\n"
-" <itemizedlist>\n"
-"\t<listitem><para>\n"
-" <guibutton>New</guibutton> creates a new card.\n"
-"\t</para></listitem>\n"
-"\n"
-"\t<listitem><para>\n"
-" <guibutton>Find</guibutton> brings up an in-depth search window.\n"
-" </para></listitem>\n"
-"\t\n"
-"\t<listitem><para>\n"
-"\t <guibutton>Print</guibutton> sends one or more of your cards to the "
-"printer.\n"
-"\t</para></listitem>\n"
-" <listitem><para>\n"
-" <guibutton>Delete</guibutton> deletes a selected card.\n"
-" </para></listitem>\n"
-"\n"
-" <listitem><para> <guibutton>View All</guibutton> displays all\n"
-" the address information in the folder. Use this button to\n"
-" refresh the display for a network folder, or to switch from\n"
-" viewing the results of a search and see the whole contents.\n"
-" </para></listitem>\n"
-"\n"
-" <listitem><para> <guibutton>Stop</guibutton> stops loading\n"
-" contact data from the network. This button is only\n"
-" relevant if you are looking at contact information on a\n"
-" network. </para></listitem>\n"
-" </itemizedlist>\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" La barra de herramientas para la agenda de direcciones en bastante\n"
-" simple:\n"
-" <itemizedlist>\n"
-"\t<listitem><para>\n"
-" <guibutton>Nueva</guibutton> crea una nueva tarjeta.\n"
-"\t</para></listitem>\n"
-"\n"
-"\t<listitem><para>\n"
-" <guibutton>Buscar</guibutton> aparece una ventana de búsqueda.\n"
-" </para></listitem>\n"
-"\t\n"
-"\t<listitem><para>\n"
-"\t <guibutton>Imprimir</guibutton> envía una o más tarjetas a la "
-"impresora.\n"
-"\t</para></listitem>\n"
-" <listitem><para>\n"
-" <guibutton>Borrar</guibutton> borra la tarjeta seleccionada.\n"
-" </para></listitem>\n"
-"\n"
-" <listitem><para> <guibutton>Ver Todo</guibutton> muestra la\n"
-" información de todas las direcciones en la carpeta. Use este\n"
-" botón para actualizar una carpeta de red, o para cambiar de\n"
-" ver los resultados de una búsqueda a ver todos los contenidos.\n"
-" </para></listitem>\n"
-"\n"
-" <listitem><para> <guibutton>Para</guibutton> detiene la carga\n"
-" de la información de contacto de la red. Este botón solo es\n"
-" relevante si está buscando información de contacto en una red.\n"
-" </para></listitem>\n"
-" </itemizedlist>\n"
-" </para>\n"
-
-#: tmp/usage-contact.sgml.h:300
-msgid ""
-" <para>\n"
-" To delete a card, click on it once to select it, then press the\n"
-" <guibutton>Delete</guibutton> button. If you have multiple\n"
-" cards selected, you'll delete multiple cards.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Para borrar una tarjeta, pulse sobre ella una vez para "
-"seleccionarla,\n"
-" entonces pulse el botón <guibutton>Borrar</guibutton>. Si tiene\n"
-" varias tarjetas seleccionadas, borrará varias tarjetas.\n"
-" </para>\n"
-
-#: tmp/usage-contact.sgml.h:306
-msgid ""
-" <para>\n"
-" To learn how to add a remote directory to your available\n"
-" contact folders, see <xref linkend=\"config-prefs-contact\">.\n"
-" Once you have a connection, the network contacts folder or\n"
-" folders will appear inside the <guilabel>External\n"
-" Directories</guilabel> folder in the folder bar. It will work\n"
-" exactly like a local folder of cards, with the following\n"
-" exceptions:\n"
-" <itemizedlist>\n"
-"\n"
-" <listitem>\n"
-"\t <para>\n"
-" Network folders are only available when you are\n"
-" connected to the network. If you use a laptop or have a\n"
-" modem connection, you may wish to copy or cache the\n"
-" network directory and then synchronize your copy with\n"
-" the networked version periodically. <!-- FIXME: HOW? -->\n"
-"\t </para>\n"
-"\t </listitem>\n"
-"\n"
-" <listitem>\n"
-"\t <para>\n"
-" To prevent excess network traffic,\n"
-" <application>Evolution</application> will not normally\n"
-" load the contents of LDAP folders immediately upon\n"
-" opening. You must click <guilabel>Display\n"
-" All</guilabel> before LDAP folder cards will be loaded\n"
-" from the network. You can change this behavior in the\n"
-" <interface>Contact Preferences</interface> window.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" Your ability to view, change, add, and delete contacts\n"
-" depends on the settings of the LDAP server. \n"
-" </para>\n"
-"\t </listitem>\n"
-" </itemizedlist>\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Para aprender a añadir un directorio remoto a sus carpetas de\n"
-" contactos disponibles, vea <xref linkend=\"config-prefs-contact\">.\n"
-" Una vez que ha conectado, la carpeta o carpetas de contactos de la\n"
-" red aparecerán dentro de la carpeta <guilabel>Directorios\n"
-" Externos</guilabel>. Funcionará exactamente igual que una carpeta\n"
-" de tarjetas local, con las siguientes excepciones:\n"
-" <itemizedlist>\n"
-"\n"
-" <listitem>\n"
-"\t <para>\n"
-" Las carpetas de red solo están disponibles cueando está\n"
-" conectado a la red. Si usa un portatil o tiene una conexión\n"
-" por modem, puede que quiera copiar o cachear el directorio en\n"
-" red y sincronizar periodicamente su copia con la versión en\n"
-" la red. <!-- ARREGLAME: ¿COMO? -->\n"
-"\t </para>\n"
-"\t </listitem>\n"
-"\n"
-" <listitem>\n"
-"\t <para>\n"
-" Para prevenir el tráfico de red excesivo,\n"
-" <application>Evolution</application> no cargará normalmente\n"
-" los contenidos de las carpetas LDAP inmediatamente despues de\n"
-" abrirlas. Debe pulsar <guilabel>Mostrar Todo</guilabel> para\n"
-" las carpetas LDAP sean cargadas de la red. Puede cambiar este\n"
-" comportamiento en las\n"
-" <interface>Preferencias de Contactos</interface> window.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" Las posibilidades de ver, cambiar, añadir, y borrar contactos\n"
-" dependen de la configuración del servidor LDAP. \n"
-" </para>\n"
-"\t </listitem>\n"
-" </itemizedlist>\n"
-" </para>\n"
-
-#: tmp/usage-contact.sgml.h:346
-msgid ""
-" <para>\n"
-" To open up your address book, click on\n"
-" <guibutton>Contacts</guibutton> in the shortcut bar, or select\n"
-" one of your contacts folders from the folder bar. <xref\n"
-" linkend=\"usage-contact-fig\"> shows the address book in all\n"
-" its organizational glory. By default, the address book\n"
-" shows all your cards in alphabetical order, in a <glossterm\n"
-" linkend=\"minicard\">minicard</glossterm> format. You can select\n"
-" other views from the <guimenu>View</guimenu> menu, and adjust\n"
-" the width of the columns by clicking and dragging the grey\n"
-" column dividers.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Para abrir su agenda de direcciones, pulse en\n"
-" <guibutton>Contactos</guibutton> en la barra de atajos, o seleccion\n"
-" una de sus carpetas de contactos de la barra de carpetas. <xref\n"
-" linkend=\"usage-contact-fig\"> muestra la agenda de direcciones en\n"
-" la cima de la organizabilidad. Por defecto, la agenda de "
-"direcciones\n"
-" muestra todas las tarjetas en orden alfabético, en un formato de\n"
-" <glossterm linkend=\"minicard\">minitarjeta</glossterm>. Puede\n"
-" seleccionar otras vistas del menú <guimenu>Vista</guimenu>, y\n"
-" ajustar el ancho de las columnas pulsando y arrastrando los\n"
-" divisores de columnas grises.\n"
-" </para>\n"
-
-#: tmp/usage-contact.sgml.h:359
-msgid ""
-" <para>\n"
-" Your contact information fills the rest of the display. Move\n"
-" through the cards alphabetically with the buttons and the\n"
-" scrollbar at the right of the window. Of course, if you have\n"
-" more than a few people listed, you'll want some way of finding\n"
-" them more quickly, which is why there's a search feature.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Su información de contacto rellena el resto de la vista. Muevase\n"
-" por las tarjetas alfabéticamente con los botonrd y la barra de\n"
-" desplazamiento a la derecha de la ventana. Naturalemnte, si tiene\n"
-" listadas más de unas pocas personas, querrá una manera de\n"
-" encontrarlas más rápidamente, que es para lo que está la función de\n"
-" búsqueda.\n"
-" </para>\n"
-
-#: tmp/usage-contact.sgml.h:367
-msgid ""
-" <para>\n"
-" Another advantage of the <application>Evolution</application>\n"
-" address book is its integration with the rest of the\n"
-" application. When you look for someone's address, you can also\n"
-" see a history of appointments with that person. Or, you can\n"
-" create address cards from emails with just a few clicks. In\n"
-" addition, searches and folders work in the same way they do in\n"
-" the rest of Evolution.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Otra ventaja de la agenda de <application>Evolution</application>\n"
-" es su integración con el resto de la aplicación. Cuando busca la\n"
-" dirección de alguien, también puede ver un historial de las citas con\n"
-" esa persona. O, puede crear tarjetas de direcciones de mensajes de\n"
-" correo electrónico con unas pocas pulsaciones. En suma, las\n"
-" búsquedas y las carpetas funcionan de la misma manera que en el resto\n"
-" de Evolution.\n"
-" </para>\n"
-
-#: tmp/usage-contact.sgml.h:377
-msgid ""
-" <para>\n"
-" The <application>Evolution</application> address book can\n"
-" handle all of the functions of an address book, phone book, or\n"
-" Rolodex. Of course, it's a lot easier to update\n"
-" <application>Evolution</application> than it is to change an\n"
-" actual paper book. <application>Evolution</application> also\n"
-" allows easy synchronization with hand-held devices. Since\n"
-" <application>Evolution</application> supports the <glossterm\n"
-" linkend=\"ldap\">LDAP</glossterm> directory protocol, you can use\n"
-" it with almost any type of existing directory server on your\n"
-" network.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" La agenda de <application>Evolution</application> puede hacerse\n"
-" cargo de toda la funcionalidad de una agenda de direcciones, de\n"
-" una agenda de telefonos o de un Rolodex. Naturalmente, es mucho\n"
-" más facil actualizar <application>Evolution</application> que\n"
-" cambiar una hoja de papel. <application>Evolution</application>\n"
-" también permite una facil sincronización con dispositivos de\n"
-" mano. Dado que <application>Evolution</application> soporta el\n"
-" protocolo de directirio <glossterm\n"
-" linkend=\"ldap\">LDAP</glossterm>, puede usarlo con casi todos\n"
-" servidores de directorio de su red.\n"
-" </para>\n"
-
-#: tmp/usage-contact.sgml.h:390
-msgid ""
-" <para>\n"
-" This chapter will show you how to use the\n"
-" <application>Evolution</application> address book to organize\n"
-" any amount of contact information, share addresses over a\n"
-" network, and several ways to save time with everyday tasks. To\n"
-" learn about configuring the address book, see <xref\n"
-" linkend=\"config-prefs-contact\">.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Este capítulo le mostrará como puede usar la agenda de\n"
-" <application>Evolution</application> para organizar cualquier\n"
-" cantidad de información, compartir direcciones a traves de una\n"
-" red, y varias formas de ahorrar tiempo con las tareas de todos\n"
-" los días. Para aprender a configurar la agenda, vea <xref\n"
-" linkend=\"config-prefs-contact\">.\n"
-" </para>\n"
-
-#: tmp/usage-contact.sgml.h:399
-msgid ""
-" <para>\n"
-" <variablelist>\n"
-"\n"
-"\t<varlistentry>\n"
-"\t <term>Full Name</term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" The <guilabel>Full Name</guilabel> field has two\n"
-" major features:\n"
-" <itemizedlist>\n"
-"\t\t<listitem>\n"
-"\t\t <para>\n"
-" You can enter a name into the <guibutton>Full\n"
-" Name</guibutton> field, but you can also click the\n"
-" <guibutton>Full Name</guibutton> button to bring\n"
-" up a small dialog box with a few text boxes\n"
-" <variablelist>\n"
-"\t\t <varlistentry>\n"
-"\t\t\t<term><guilabel>Title: </guilabel></term>\n"
-"\t\t\t<listitem> <para>\n"
-"\t Enter an honorific or select one from the menu.\n"
-"\t </para></listitem>\n"
-"\t\t </varlistentry>\n"
-"\t\t <varlistentry>\n"
-"\t\t\t<term><guilabel>First: </guilabel></term>\n"
-"\t\t\t<listitem> <para>\n"
-"\t\t Enter the first, or given, name.\n"
-"\t\t\t </para></listitem> \n"
-"\t\t </varlistentry>\n"
-"\t\t <varlistentry>\n"
-"\t\t\t<term><guilabel>Middle: </guilabel></term>\n"
-"\t\t\t<listitem> <para>\n"
-"\t\t\t Enter the middle name or initial, if any.\n"
-"\t\t\t</para></listitem>\n"
-"\t\t </varlistentry>\n"
-"\t\t <varlistentry>\n"
-"\t\t\t<term><guilabel>Last: </guilabel></term>\n"
-"\t\t\t<listitem> <para>\n"
-"\t\t\t Enter the last name (surname).\n"
-"\t\t\t </para></listitem>\n"
-"\t\t </varlistentry>\n"
-"\t\t <varlistentry>\n"
-"\t\t\t<term><guilabel>Suffix: </guilabel></term>\n"
-"\t\t\t<listitem> <para>\n"
-"\t\t\t Enter suffixes such as \"Jr.\" or \"III.\"\n"
-"\t\t\t</para></listitem>\n"
-"\t\t </varlistentry>\n"
-"\t\t </variablelist>\n"
-" </para>\n"
-"\t\t</listitem>\n"
-"\t <listitem>\n"
-"\t\t <para>\n"
-" The <guilabel>Full Name</guilabel> field also\n"
-" interacts with the <guilabel>File As</guilabel>\n"
-" box to help you organize your contacts.\n"
-" </para>\n"
-" <para>\n"
-" To see how it works, type a name in the\n"
-" <guilabel>Full Name</guilabel> field:\n"
-" <userinput>Rupert T. Monkey</userinput>. You'll\n"
-" notice that the <guilabel>File As</guilabel> field\n"
-" also fills up, but in reverse:\n"
-" <computeroutput>Monkey, Rupert</computeroutput>.\n"
-" You can pick <computeroutput>Rupert Monkey\n"
-" </computeroutput> from the drop-down, or type in\n"
-" your own, such as <userinput> T. Rupert Monkey\n"
-" </userinput>.\n"
-" </para>\n"
-"\t\t <tip>\n"
-"\t\t <title>Filing Suggestion</title>\n"
-"\t\t \n"
-"\t\t <para>\n"
-" Don't enter something entirely different from\n"
-" the actual name, since you might forget that\n"
-" you've filed Rupert's information under \"F\" for\n"
-" \"Fictitious Ximian Employee.\"\n"
-" </para>\n"
-"\t\t </tip>\n"
-"\t\t</listitem>\n"
-"\t </itemizedlist>\n"
-" </para>\n"
-" </listitem>\n"
-"\t</varlistentry>\n"
-"\t<varlistentry>\n"
-" <term>Multiple Values for Fields</term>\n"
-" <listitem>\n"
-"\t <para>\n"
-" If you click on the small arrow buttons next to the\n"
-" <guilabel>Primary Email</guilabel> field, you can also\n"
-" choose <guilabel>Email 2</guilabel> and\n"
-" <guilabel>Email 3</guilabel>. Although the contact\n"
-" editor will only display one of those at any given\n"
-" time, <application>Evolution</application> will\n"
-" store them all. The arrow buttons next to the\n"
-" telephone and postal address fields work in the same\n"
-" way.\n"
-" </para>\n"
-" </listitem>\n"
-"\t</varlistentry>\n"
-" </variablelist>\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-contact.sgml.h:501
-msgid " <title>Address Book Tools</title>\n"
-msgstr " <title>Herramientas de la Agenda de Direcciones</title>\n"
-
-#: tmp/usage-contact.sgml.h:503
-msgid " <title>Destroy, Create, and Change: The Contact Editor</title>\n"
-msgstr ""
-" <title>Destruir, Crear, y Cambiar: El Editor de Contactos</title>\n"
-
-#: tmp/usage-contact.sgml.h:505
-msgid " <title>Getting Started With the Address Book</title>\t\n"
-msgstr " <title>Empezando con la Agenda de Direcciones</title>\t\n"
-
-#: tmp/usage-contact.sgml.h:507
-msgid " <title>Organizing your Address Book</title>\n"
-msgstr " <title>Organizando su Agenda de Direcciones</title>\n"
-
-#: tmp/usage-contact.sgml.h:509
-msgid " <title>Sharing your Cards</title>\n"
-msgstr " <title>Compartiendo sus Tarjetas</title>\n"
-
-#: tmp/usage-contact.sgml.h:511
-msgid " <title>The Evolution Address Book</title>\n"
-msgstr " <title>La Agenda de Direcciones de Evolution</title>\n"
-
-#: tmp/usage-contact.sgml.h:513
-msgid ""
-"<!--\n"
-" <para>\n"
-" Another useful <application>Evolution</application> feature is\n"
-" its ability to recognize when people live or work together. If\n"
-" several people in your address book share an address, and you\n"
-" change the address for one of them,\n"
-" <application>Evolution</application> will ask you if you wish to\n"
-" change the address for all of them, or just for one.\n"
-" </para>\n"
-"-->\n"
-msgstr ""
-
-#: tmp/usage-contact.sgml.h:524
-msgid ""
-"<!--\n"
-"<!DOCTYPE Chapter PUBLIC \"-//GNOME//DTD DocBook PNG Variant V1.1//EN\">\n"
-"-->\n"
-msgstr ""
-"<!--\n"
-"<!DOCTYPE Chapter PUBLIC \"-//GNOME//DTD DocBook PNG Variant V1.1//EN\">\n"
-"-->\n"
-
-#: tmp/usage-contact.sgml.h:528
-msgid ""
-"<!-- FIXME this feature not yet implemented \n"
-"\n"
-" <para>\n"
-" You can also use the address book to print postal addresses\n"
-"\t on mailing labels. Future versions of\n"
-"\t <application>Evolution</application> will allow you to you\n"
-"\t export a group of cards to a spreadsheet, database, or word\n"
-"\t processor so you can print address labels or prepare large\n"
-"\t mailings.\n"
-" </para>\n"
-" -->\n"
-msgstr ""
-
-#: tmp/usage-contact.sgml.h:540
-msgid ""
-"<!--- FIXME this feature not yet implemented \n"
-" <sect2 id=\"usage-contact-automation-extra\">\n"
-" <title>Map It!</title>\n"
-" <para>\n"
-"\t Need a map or directions? Click\n"
-"\t <guibutton>MapIt</guibutton> from within the contact\n"
-"\t manager, and <application>Evolution</application> will\n"
-"\t map the address for you online.\n"
-" </para>\n"
-" </sect2>\n"
-"-->\n"
-msgstr ""
-
-#: tmp/usage-contact.sgml.h:552
-msgid ""
-"<!--- ############# This section isn't implemented yet either:\n"
-" <sect2>\n"
-" <title></title>\n"
-" <para>\n"
-" <tip>\n"
-"\t <title>Contact Shortcuts</title>\n"
-"\t <para>\n"
-" You can add cards from within an email message or calendar\n"
-" appointment. While looking at an email, right-click on\n"
-" any email address or message, and choose\n"
-" <guimenuitem>Create Card for this Address</guimenuitem> or\n"
-" <guimenuitem>Create Card for this Sender</guimenuitem>\n"
-" from the menu. While looking at a calendar appointment,\n"
-" right-click any email address, and choose\n"
-" <guimenuitem>Create Card for this Address</guimenuitem>.\n"
-" (NOTE that feature may change! unimplemented!)\n"
-" </para>\n"
-"\t</tip>\n"
-" </para>\n"
-" <para>\n"
-" You can move cards around just as you would move email\n"
-" messages: dragging and dropping works, as does right-clicking\n"
-" and choosing <guimenuitem>Move</guimenuitem> from the menu\n"
-" that appears.\n"
-" </para>\n"
-" </sect2>\n"
-"############### SHORTCUT SECTION COMMENTED OUT FOR NOW -->\n"
-msgstr ""
-
-#~ msgid " <title>Contact Manager Tools</title>\n"
-#~ msgstr " <title>Herramientas de Administración de Contactos</title>\n"
-
-#~ msgid " <!-- FIXME this feature not yet implemented -->\n"
-#~ msgstr " <!-- FIXME this feature not yet implemented -->\n"
diff --git a/doc/es.po/usage-mail.sgml.po b/doc/es.po/usage-mail.sgml.po
deleted file mode 100644
index c03a2dffc0..0000000000
--- a/doc/es.po/usage-mail.sgml.po
+++ /dev/null
@@ -1,2302 +0,0 @@
-# Translation into Spanish of Evolution docs.
-# Copyright (C) 2000 Free Software Foundation, Inc.
-# Héctor García Álvarez <hector@scouts-es.org>, 2000.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: evolution-docs\n"
-"POT-Creation-Date: 2001-03-13 16:30+0100\n"
-"PO-Revision-Date: 2000-12-28 15:38+0100\n"
-"Last-Translator: Héctor García Álvarez <hector@scouts-es.org>\n"
-"Language-Team: Spanish <es@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=iso-8859-1\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: tmp/usage-mail.sgml.h:1
-msgid ""
-"\t <para>\n"
-"\t The composer is a WYSIWYG (What You See Is What You Get)\n"
-"\t editor for HTML. That means that if you enter HTML\n"
-"\t directly into the composer&mdash; say, <markup\n"
-"\t role=\"html\">&lt;B&gt;Bold Text&lt;/B&gt</markup>, the\n"
-"\t the composer will assume you meant exactly that string\n"
-"\t of characters, and not \"make this text bold,\" as an HTML\n"
-"\t composition tool or text editor would.\n"
-"\t </para>\n"
-msgstr ""
-"\t <para>\n"
-"\t El compositor de correo en un editor WYSIWYG (What You See Is What\n"
-"\t You Get \"Lo Que Ve Es Lo Que Obtiene\") de HTML. Esto significa "
-"que\n"
-"\t si escribe directamente HTML en el editor&mdash; digamos, \n"
-"\t <markup role=\"html\">&lt;B&gt;Bold Text&lt;/B&gt</markup>, el\n"
-"\t editor asumirá que quiere escribir exactamente esa cada de\n"
-"\t caracteres, y no \"hacer poner texto en Negrita,\" como haría una\n"
-"\t herramienta de composición de HTML o un editor de texto.\n"
-"\t </para>\n"
-
-#: tmp/usage-mail.sgml.h:11
-msgid "\t <title>A Technical note on HTML Tags</title>\n"
-msgstr "\t <title>Una nota Técnica sobre las Etiquetas HTML</title>\n"
-
-#: tmp/usage-mail.sgml.h:13
-msgid ""
-"\t <para>\n"
-"\t Hearkening back to the dark ages when people used\n"
-"\t typewriters and there were no copy machines, \"Cc\" stands\n"
-"\t for \"Carbon Copy.\" Use it whenever you want to share a\n"
-"\t message you've written to someone else.\n"
-"\t <example id=\"ex-mail-cc\">\n"
-"\t <title>Using the Cc: field</title>\n"
-"\t <para>\n"
-"\t When Susan sends an email to a client, she puts her\n"
-"\t co-worker, Tim, in the in the\n"
-"\t <guilabel>Cc:</guilabel> field, so that he know\n"
-"\t what's going on. The client can see that Tim also\n"
-"\t received the message, and knows that he can talk to\n"
-"\t Tim about the message as well.\n"
-"\t </para>\n"
-"\t </example>\n"
-"\t </para>\n"
-msgstr ""
-"\t <para>\n"
-"\t Volviendo la vista a las edades oscuras cuando la gente usaba "
-"máquinas\n"
-"\t de escribir y no habia fotocopiadoras, \"Cc\" significa\n"
-"\t \"Copia de Carbón\". Uselo cuando quiera compartir un mensaje que ha\n"
-"\t escrito a otra persona.\n"
-"\t <example id=\"ex-mail-cc\">\n"
-"\t <title>Usando el campo Cc:</title>\n"
-"\t <para>\n"
-"\t Cuando Susan envia un mensaje a un cliente, pone a su compañero,\n"
-"\t Tim, en el campo <guilabel>Cc:</guilabel>, para que sepa como "
-"van\n"
-"\t las cosas. El cliente puede ver que Tim también recivió el\n"
-"\t mensaje, y sabe que también puede hablar con Tim acerca del\n"
-"\t mensaje.\n"
-"\t </para>\n"
-"\t </example>\n"
-"\t </para>\n"
-
-#: tmp/usage-mail.sgml.h:31
-msgid ""
-"\t <para>\n"
-"\t If you have a large number of recipients, or if you want\n"
-"\t to send mail to several people without sharing the\n"
-"\t recipient list, you should use\n"
-"\t <guilabel>Bcc:</guilabel>. \"Bcc\" stands for \"Blind Carbon\n"
-"\t Copy\", and it sends messages discreetly. In other words,\n"
-"\t the people in the <guilabel>Bcc:</guilabel> field get the\n"
-"\t message, but nobody sees that they got it. Note that the\n"
-"\t contents of the <guilabel>To:</guilabel> and\n"
-"\t <guilabel>Cc:</guilabel> fields are visible to all\n"
-"\t recipients, even to people on the\n"
-"\t <guilabel>Bcc:</guilabel> list.\n"
-"\n"
-"\t <example id=\"ex-mail-bcc\">\n"
-"\t <title>Using the Bcc: field</title>\n"
-"\t <para>\n"
-"\t Tim is sending an email announcement to all of his\n"
-"\t company's clients, some of whom are in competition\n"
-"\t with each other, and all of whom value their\n"
-"\t privacy. He needs to use the\n"
-"\t <guilabel>Bcc:</guilabel> field here. If he puts\n"
-"\t every address from his address book's \"Clients\"\n"
-"\t category into the <guilabel>To:</guilabel> or\n"
-"\t <guilabel>Cc:</guilabel> fields, he'll make the\n"
-"\t company's <emphasis>entire</emphasis> client list\n"
-"\t public. It seems like a small difference, but it can\n"
-"\t make a huge difference in some situations.\n"
-"\t </para>\n"
-"\t </example>\n"
-"\t </para>\n"
-msgstr ""
-"\t <para>\n"
-"\t Si tiene un gran número de destinatarios, o si quiere mandar mensajes\n"
-"\t a varias personas sin mostrar la lista de destinatarios, debe usar\n"
-"\t <guilabel>Cco:</guilabel>. \"Cco\" significa \"Con Copia Oculta\",\n"
-"\t y envía los mensajes discretamente. En otras palabras,\n"
-"\t las personas en el campo <guilabel>Cco:</guilabel> reciven el "
-"mensaje,\n"
-"\t pero nadie vee que lo recibieron. Note que el contenido de los "
-"campos\n"
-"\t <guilabel>A:</guilabel> y <guilabel>Cc:</guilabel> son visibles para\n"
-"\t todos los destinatarios, incluso para las personas en la lista\n"
-"\t <guilabel>Cco:</guilabel>.\n"
-"\n"
-"\t <example id=\"ex-mail-bcc\">\n"
-"\t <title>Usando el campo Cco:</title>\n"
-"\t <para>\n"
-"\t Tim está enviando un anuncio por correo a todos los clientes\n"
-"\t de su compañía, algunos de los cuales son competidores entre si,\n"
-"\t y todos ellos valoran su privacidad. En este caso necesita usar\n"
-"\t el campo <guilabel>Cco:</guilabel>. Si pone todas las\n"
-"\t direcciones de su agenda de direcciones de \"Clientes\" en el\n"
-"\t campo <guilabel>A:</guilabel> o en el campo\n"
-"\t <guilabel>Cc:</guilabel>, hara que <emphasis>toda</emphasis>\n"
-"\t la lista de clientes de la compañía sea pública.\n"
-"\t Parece una pequeña diferencia, pero en ocasiones puede tener\n"
-"\t una gran importancia.\n"
-"\t </para>\n"
-"\t </example>\n"
-"\t </para>\n"
-
-#: tmp/usage-mail.sgml.h:62
-msgid ""
-"\t <para>\n"
-"\t Some people do not have HTML-capable mail clients, or\n"
-"\t prefer not to receive HTML-enhanced mail because it is\n"
-"\t slower to download and display. <emphasis>Some</emphasis>\n"
-"\t people refer to HTML mail as \"the root of all evil\" and\n"
-"\t get very angry if you send them HTML mail, which is why\n"
-"\t <application>Evolution</application> sends plain text\n"
-"\t unless you explicitly ask for HTML. To send HTML mail,\n"
-"\t you will need to select <menuchoice>\n"
-"\t <guimenu>Format</guimenu> <guimenuitem>\n"
-"\t HTML</guimenuitem></menuchoice>. Alternately, you can set\n"
-"\t your default mail format preferences in the mail\n"
-"\t configuration dialog. See <xref\n"
-"\t linkend=\"config-prefs-mail-other\"> for more information.\n"
-" </para>\n"
-msgstr ""
-"\t <para>\n"
-"\t Algunas personas no tienen clientes con capacidad para mostrar HMTL, "
-"o\n"
-"\t prefieren no recibir mensajes con HTML porque tarda más en descargar\n"
-"\t y en ser mostrado. <emphasis>Algunas</emphasis> personas se hablan\n"
-"\t correo con HTML como \"la raíz de todos los males\" y se enfadan\n"
-"\t mucho si les envia correo con HTML, por lo cual\n"
-"\t <application>Evolution</application> envía texto plano a menos que\n"
-"\t pida explicitamente HTML. Para enviar correo con HTML, necesitará\n"
-"\t seleccionar <menuchoice> <guimenu>Formato</guimenu>\n"
-"\t <guimenuitem>HTML</guimenuitem></menuchoice>.\n"
-"\t Alternativamente, puede elegir el formato por defecto de sus mensajes\n"
-"\t en el diálogo de configuración del correo.\n"
-"\t Vea <xref linkend=\"config-prefs-mail-other\"> para más información.\n"
-" </para>\n"
-
-#: tmp/usage-mail.sgml.h:78
-msgid ""
-"\t <para>\n"
-" Alternately, you can click on the\n"
-" <guibutton>To:</guibutton>, <guibutton>Cc:</guibutton>, or\n"
-" <guibutton>Bcc:</guibutton> buttons to get a list &mdash;\n"
-" potentially a very long one &mdash; of the email addresses\n"
-" in your contact manager. Select addresses and click on\n"
-" the arrows to move them into the appropriate address\n"
-" columns.\n"
-" </para>\n"
-msgstr ""
-"\t <para>\n"
-" Alternativamente, puede pulsar en los botones\n"
-" <guibutton>A:</guibutton>, <guibutton>Cc:</guibutton>, o\n"
-" <guibutton>Cco:</guibutton> para obtener una lista &mdash;\n"
-" potencialmente muy larga &mdash; de las direcciones de correo\n"
-" de su administrador de contactos. Seleccione las direcciones y\n"
-" pulse sobre las flechas para moverlas a la columna de "
-"direcciones\n"
-" apropiada.\n"
-" </para>\n"
-
-#: tmp/usage-mail.sgml.h:88
-msgid ""
-"\t <para>\n"
-" For more information about using email together with the\n"
-"\t contact manager and the calendar, see <xref\n"
-"\t linkend=\"usage-contact-automate\"> and <xref\n"
-"\t linkend=\"usage-calendar-apts\">.\n"
-"\t </para>\n"
-msgstr ""
-"\t <para>\n"
-" Para más información acerca de usar el correo junto con el\n"
-"\t administrador de contactos y el calendario, vea <xref\n"
-"\t linkend=\"usage-contact-automate\"> y <xref\n"
-"\t linkend=\"usage-calendar-apts\">.\n"
-"\t </para>\n"
-
-#: tmp/usage-mail.sgml.h:95
-msgid ""
-"\t <para>\n"
-" The icons in the toolbar are explained in <glossterm\n"
-" linkend=\"tooltip\">tool-tips</glossterm>, which appear when\n"
-" you hold your mouse over the buttons. The buttons fall\n"
-" into four categories:\n"
-" <variablelist>\n"
-" <varlistentry>\n"
-" <term>Headers and lists</term>\n"
-"\t <listitem>\n"
-"\t\t<para>\n"
-" At the left edge of the toolbar, you can choose\n"
-" <guilabel>Normal</guilabel> for a default text style\n"
-" or <guilabel>Header 1</guilabel> through\n"
-" <guilabel>Header 6</guilabel> for varying sizes of\n"
-" header from large (1) to tiny (6). Other styles\n"
-" include <guilabel>pre</guilabel>, to use the HTML\n"
-" tag for preformatted blocks of text, and three types\n"
-" of <guilabel>List Item</guilabel> for the highly\n"
-" organized.\n"
-" </para>\n"
-"\t </listitem>\n"
-" </varlistentry>\n"
-" <varlistentry>\n"
-" <term>Text style</term>\n"
-"\t <listitem>\n"
-"\t\t<para>\n"
-" Use these buttons to determine the way your letters\n"
-" look. If you have text selected, the style will\n"
-" apply to the selected text. If you do not have text\n"
-" selected, the style will apply to whatever you type\n"
-" next. The buttons are:\n"
-" <itemizedlist mark=\"none\"> \n"
-"\t\t <listitem><para>Push <guibutton>B</guibutton> for bold "
-"text</para></listitem> \n"
-" <listitem><para>Push <guibutton>I</guibutton> for "
-"italics</para></listitem>\n"
-"\t\t <listitem><para>Push <guibutton>U</guibutton> to "
-"underline</para></listitem>\n"
-"\t\t <listitem><para>Push <guibutton>S</guibutton> for a "
-"strikethrough.</para></listitem>\n"
-" </itemizedlist>\n"
-" </para> \n"
-"\t </listitem> \n"
-"\t </varlistentry>\n"
-"\t <varlistentry>\n"
-"\t <term>Alignment</term>\n"
-"\t <listitem>\n"
-"\t\t<para>\n"
-" Located next to the text style buttons, these three\n"
-" paragraph icons should be familiar to users of most\n"
-" word processing software. The leftmost button will\n"
-" make your text aligned to the left, the center\n"
-" button, centered, and the right hand button,\n"
-" aligned on the right side.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term>Indentation rules</term>\n"
-"\t <listitem>\n"
-"\t\t<para>\n"
-" The button with the arrow pointing left will reduce\n"
-" a paragraph's indentation, and the right arrow will\n"
-" increase its indentation.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term>Color Selection</term>\n"
-"\t <listitem>\n"
-"\t\t<para>\n"
-" At the far right is the color section tool. The\n"
-" colored box displays the current text color; to\n"
-" choose a new one, click the arrow button just to the\n"
-" right. If you have text selected, the color will\n"
-" apply to the selected text. If you do not have text\n"
-" selected, the color will apply to whatever you type\n"
-" next.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\n"
-"\t </variablelist>\n"
-" </para>\n"
-msgstr ""
-"\t <para>\n"
-" Los iconos de la barra de herramientas estan explicados en "
-"<glossterm\n"
-" linkend=\"tooltip\">Mensajes de Ayuda</glossterm>, los cuales "
-"aparecen\n"
-" cuando detiene el ratón sobre los botónes. Los botones entran "
-"en cuatro\n"
-" categorías:\n"
-" <variablelist>\n"
-" <varlistentry>\n"
-" <term>Cabeceras y listas</term>\n"
-"\t <listitem>\n"
-"\t\t<para>\n"
-" En el lado izquierdo de la barra de herramientas, puede "
-"elegir entre\n"
-" <guilabel>Normal</guilabel> para un estilo de texto por "
-"defecto\n"
-" o <guilabel>Cabecera 1</guilabel> a\n"
-" <guilabel>Cabecera 6</guilabel> para variar los tamaños de "
-"las\n"
-" cabeceras desde grande (1) hasta pequeño (6). Otros "
-"estilos\n"
-" incluyen <guilabel>pre</guilabel>, para usar etiquetas "
-"HTML\n"
-" para preformatear los bloques de texto, y tres tipos de\n"
-" <guilabel>Elementos de Lista</guilabel> para los más\n"
-" organizados.\n"
-" </para>\n"
-"\t </listitem>\n"
-" </varlistentry>\n"
-" <varlistentry>\n"
-" <term>Estilo del texto</term>\n"
-"\t <listitem>\n"
-"\t\t<para>\n"
-" Use estos botones para determinar el aspecto de sus "
-"cartas.\n"
-" Si tiene un texto seleccionado, el estilo se aplicará al "
-"texto\n"
-" seleccionado. Si no tiene texto seleccionado el estilo "
-"se\n"
-" aplicará a lo siguiente que escriba. Los botones son:\n"
-" <itemizedlist mark=\"none\"> \n"
-"\t\t <listitem><para>Presione <guibutton>B</guibutton> para texto en "
-"negrita</para></listitem> \n"
-" <listitem><para>Presione <guibutton>I</guibutton> para "
-"itálicas</para></listitem>\n"
-"\t\t <listitem><para>Presione <guibutton>U</guibutton> para "
-"subrayado</para></listitem>\n"
-"\t\t <listitem><para>Presione <guibutton>S</guibutton> para "
-"tachado.</para></listitem>\n"
-" </itemizedlist>\n"
-" </para> \n"
-"\t </listitem> \n"
-"\t </varlistentry>\n"
-"\t <varlistentry>\n"
-"\t <term>Alineación</term>\n"
-"\t <listitem>\n"
-"\t\t<para>\n"
-" Localizado al lado de los botones de estilo del texto, "
-"estos tres\n"
-" iconos de párrafo deberian ser familiares para aquellos "
-"usuarios de\n"
-" la mayoría de los procesadores de texto. El botón más a "
-"la izquierda\n"
-" hará que su texto se alinee a la izquierda, el botón "
-"central, lo\n"
-" centrará, y el botón a la derecha, lo alinerá al lado "
-"derecho.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term>Reglas de indentación</term>\n"
-"\t <listitem>\n"
-"\t\t<para>\n"
-" El botón con la flecha hacia la izquierda reducirá\n"
-" la indentación de un párrafo, y la flecha a la derecha\n"
-" incrementará su indentación.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term>Selección de colores</term>\n"
-"\t <listitem>\n"
-"\t\t<para>\n"
-" En la parte derecha esta la herramienta de selección de "
-"color.\n"
-" La caja coloreada muestra el color actual del texto. Para\n"
-" elegir uno nuevo, pulse el botón con la flecha justo a su "
-"derecha.\n"
-" Si tiene texto seleccionado, el color será aplicado al "
-"texto\n"
-" seleccionado. Si no tiene texto seleccionado, el color "
-"será aplicado\n"
-" a lo que escriba a continuación.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\n"
-"\t </variablelist>\n"
-" </para>\n"
-
-#: tmp/usage-mail.sgml.h:179
-msgid "\t <title>Evolution Mail</title>\n"
-msgstr "\t <title>Correo de Evolution</title>\n"
-
-#: tmp/usage-mail.sgml.h:181
-msgid "\t <title>HTML Mail is not a Default Setting</title>\n"
-msgstr ""
-"\t <title>El correo con HTML no está seleccionado por defecto</title>\n"
-
-#: tmp/usage-mail.sgml.h:183
-msgid "\t <title>The Filter Assistant</title>\n"
-msgstr "\t <title>El Asistente de Filtros</title>\n"
-
-#: tmp/usage-mail.sgml.h:185
-msgid "\t<!-- (INSERT SCREENSHOT HERE: virtual folders in action) -->\n"
-msgstr "\t<!-- (INSERT SCREENSHOT HERE: virtual folders in action) -->\n"
-
-#: tmp/usage-mail.sgml.h:187
-msgid ""
-"\t<para>\n"
-"\t If you want to attach a file to your email message, you\n"
-"\t can drag it from your desktop into the message window, or\n"
-"\t click the button in the toolbar with a paper clip on it,\n"
-"\t labelled <guibutton>Attach</guibutton>. If you click the\n"
-"\t <guibutton>Attach</guibutton> button,\n"
-"\t <application>Evolution</application> will open a file\n"
-"\t selection dialog box to ask you which file you want to\n"
-"\t send. Select the file and click <guilabel>OK</guilabel>.\n"
-" </para>\n"
-msgstr ""
-"\t<para>\n"
-"\t Si quiere adjuntar un archivo a su mensaje de correo, puede\n"
-"\t arrastrarlo desde su escritorio hasta la ventana del mensaje, o\n"
-"\t pulsar el botón con un clip de la barra de herramientas,\n"
-"\t con el título <guibutton>Adjuntar</guibutton>. Si presiona el\n"
-"\t botón <guibutton>Adjuntar</guibutton>,\n"
-"\t <application>Evolution</application> abrirá una ventana de selección\n"
-"\t de archivos para preguntarle que archivo quiere enviar.\n"
-"\t Seleccione el archivo y pulse <guilabel>Aceptar</guilabel>.\n"
-" </para>\n"
-
-#: tmp/usage-mail.sgml.h:198
-msgid ""
-"\t<para>\n"
-"\t <application>Evolution</application> can also display\n"
-"\t HTML-formatted mail, complete with graphics. HTML\n"
-"\t formatting will display automatically, although you can\n"
-"\t turn it off if you prefer.\n"
-"\t</para>\n"
-msgstr ""
-"\t<para>\n"
-"\t <application>Evolution</application> tambien puede mostrar\n"
-"\t correo formateado en HTML, completo con gráficos. El formateado\n"
-"\t en HTML se mostrará automaticamente, aunque puede deshabilitarlo\n"
-"\t si lo prefiere.\n"
-"\t</para>\n"
-
-#: tmp/usage-mail.sgml.h:205
-msgid ""
-"\t<para>\n"
-"\t Evolution will send mail immediately unless you tell it to\n"
-"\t do otherwise by selecting <menuchoice>\n"
-"\t <guimenu>File</guimenu> <guimenuitem>Send\n"
-"\t Later</guimenuitem></menuchoice>. This will add your\n"
-"\t messages to the <guilabel>Outbox</guilabel> queue. Then,\n"
-"\t when you press <guibutton>Send</guibutton> in another\n"
-"\t message, or <guibutton>Get Mail</guibutton> in the main\n"
-"\t mail window, all your unsent messages will go out at once.\n"
-"\t I like to use \"Send Later\" because it gives me a chance to\n"
-"\t change my mind about a message before it goes out. That\n"
-"\t way, I don't send anything I'll regret the next day.\n"
-"\t</para>\n"
-msgstr ""
-"\t<para>\n"
-"\t Evolution enviará el mensaje inmediatamente a menos que le diga lo\n"
-"\t contrario seleccionando <menuchoice>\n"
-"\t <guimenu>Archivo</guimenu> <guimenuitem>Enviar más\n"
-"\t Tarde</guimenuitem></menuchoice>. Esto añadirá sus mensajes\n"
-"\t a la cola de <guilabel>Outbox</guilabel>. Esntonces,\n"
-"\t cuando pulse <guibutton>Enviar</guibutton> en otro\n"
-"\t mensaje, u <guibutton>Obtener</guibutton> en la ventana principal\n"
-"\t del correo, todos los mensajes no enviados se enviarán en ese momento.\n"
-"\t Me gusta usar \"Enviar más Tarde\" porque me permite tener la "
-"oportunidad\n"
-"\t de cambiar de opinión acerca de un mensaje antes de enviarlo. De esa "
-"forma\n"
-"\t no envio nada de lo que me arrepentiré al día siguiente.\n"
-"\t</para>\n"
-
-#: tmp/usage-mail.sgml.h:219
-msgid ""
-"\t<para>\n"
-"\t To learn more about how you can specify message queue and\n"
-"\t filter behavior, see <xref linkend=\"config-prefs-mail\">.\n"
-"\t</para>\n"
-msgstr ""
-"\t Para aprender más acerca de como puede especificar el comportamiento "
-"de\n"
-"\t la cola de mensajes y de los filtros, vea <xref "
-"linkend=\"config-prefs-mail\">.\n"
-"\t</para>\n"
-
-#: tmp/usage-mail.sgml.h:224
-msgid ""
-"\t<para>\n"
-"\t To organize my mail box, I set up a virtual folder for\n"
-"\t emails from my friend and co-worker Anna. I have another\n"
-"\t one for messages that have \"ximian.com\" in the address and\n"
-"\t \"Evolution\" in the subject line, so I can keep a record of\n"
-"\t what people from work send me about\n"
-"\t <application>Evolution</application>. If Anna sends me a\n"
-"\t message about anything other than Evolution, it only shows\n"
-"\t up in the \"Anna\" folder. When Anna sends me mail about the\n"
-"\t user interface for <application>Evolution</application>, I\n"
-"\t can see that message both in the \"Anna\" virtual folder and\n"
-"\t in the \"Internal Evolution Discussion\" virtual folder.\n"
-"\t</para>\n"
-msgstr ""
-"\t<para>\n"
-"\t Para organizar el correo en mi buzón, defino una carpeta virtual para\n"
-"\t los mensajes de mi amiga y compañera Anna. Tengo otra para los\n"
-"\t los mensajes que tienen \"ximian.com\" en la dirección y \"Evolution\"\n"
-"\t en el asunto, así puedo registrar que personas del trabajo me escriben\n"
-"\t acerca de <application>Evolution</application>. Si Anna me envía un\n"
-"\t mensaje acerca de cualquier cosa excepto Evolution, solo aparece\n"
-"\t en la carpeta \"Anna\". Cuando Anna me escribe acerca de la interfaz\n"
-"\t de usuario de <application>Evolution</application>, puedo ver ese\n"
-"\t mensaje en la carpeta virtual \"Anna\" y en la carpeta virtual\n"
-"\t \"Discusión Interna sobre Evolution\".\n"
-"\t</para>\n"
-
-#: tmp/usage-mail.sgml.h:238
-msgid ""
-"\t<para>\n"
-"\t To reply to a message, press the\n"
-"\t <guibutton>Reply</guibutton> button while it is selected,\n"
-"\t or choose <guimenuitem>Reply to Sender</guimenuitem> from\n"
-"\t the message's right-click menu. That will open the\n"
-"\t <interface>message composer</interface>. The\n"
-"\t <guilabel>To:</guilabel> and <guilabel>Subject</guilabel>\n"
-"\t fields will already be filled, although you can alter them\n"
-"\t if you wish. In addition, the full text of the old message\n"
-"\t is inserted into the new message, either in italics (for\n"
-"\t HTML display) or with the &gt; character before each line\n"
-"\t (in plain text mode), to indicate that it's part of the\n"
-"\t previous message. People often intersperse their message\n"
-"\t with the quoted material as shown in <xref\n"
-"\t linkend=\"usage-mail-getnsend-reply-fig\">.\n"
-"\n"
-"<!-- note that this figure should have a reply message ready to send,\n"
-"with quoted materials and the relevant replies interspersed-->\n"
-" <!-- ==============Figure=================================== -->\n"
-" <figure id=\"usage-mail-getnsend-reply-fig\">\n"
-"\t <title>Reply Message Window</title>\n"
-"\t <screenshot>\n"
-"\t <screeninfo>Evolution Main Window</screeninfo>\n"
-"\t <graphic fileref=\"fig/replymsg\" format=\"png\" srccredit=\"Aaron "
-"Weber\">\n"
-"\t</graphic>\n"
-"\t</screenshot>\n"
-" </figure>\n"
-"<!-- ==============End of Figure=================================== -->\n"
-"\t</para>\n"
-msgstr ""
-"\t<para>\n"
-"\t Para resonder a un mensaje, pulse el botón\n"
-"\t <guibutton>Responder</guibutton> mientras está seleccionado,\n"
-"\t o elija <guimenuitem>Responder al Remitente</guimenuitem> del menu\n"
-"\t del botón derecho del mensaje. Esto abrirá el\n"
-"\t <interface>compositor de mensajes</interface>. Los campos\n"
-"\t <guilabel>A:</guilabel> y <guilabel>Asunto</guilabel>\n"
-"\t ya estarán escritos, aunque puede alterarlos si lo desea.\n"
-"\t Ademas, el texto completo del antiguo mensaje es insertado en el\n"
-"\t nuevo mensaje, bien sea con itálicas (para vista en HTML) o con el\n"
-"\t caracter &gt; precediendo cada línea (en modo texto plano), para\n"
-"\t indicar que es parte del mensaje previo. Habitualmente la gente\n"
-"\t escribe su mensaje intercalado con el mensaje anterior, como se\n"
-"\t muestra en <xref linkend=\"usage-mail-getnsend-reply-fig\">.\n"
-"\n"
-"<!-- note que esta imagen debe tener un mensaje de respuesta listo para ser\n"
-"enviado con partes quoteadas y las respuestas relevante intercaladas-->\n"
-" <!-- ==============Imagen=================================== -->\n"
-" <figure id=\"usage-mail-getnsend-reply-fig\">\n"
-"\t <title>Ventana de Respuesta de Mensajes</title>\n"
-"\t <screenshot>\n"
-"\t <screeninfo>Ventana Principal de Evolution</screeninfo>\n"
-"\t <graphic fileref=\"fig/replymsg\" format=\"png\" srccredit=\"Aaron "
-"Weber\">\n"
-"\t</graphic>\n"
-"\t</screenshot>\n"
-" </figure>\n"
-"<!-- ==============Fin de la Imagen=================================== -->\n"
-"\t</para>\n"
-
-#: tmp/usage-mail.sgml.h:268
-msgid ""
-"\t<para>\n"
-"\t <itemizedlist>\n"
-"\t <listitem><para>\n"
-" Incoming email that your filters don't move goes into the "
-"Inbox; \n"
-" outgoing mail that they don't move ends up in the Sent "
-"folder.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\n"
-"\t <listitem><para>If you move a folder, your filters\n"
-"\t will follow it. </para></listitem>\n"
-"\t </itemizedlist>\n"
-"\t</para>\n"
-msgstr ""
-"\t<para>\n"
-"\t <itemizedlist>\n"
-"\t <listitem><para>\n"
-" El correo de entrada que sus filtros no mueven va a la carpeta "
-"Inbox; \n"
-" el correo de salida que no mueven acaba en la carpeta Sent.\n"
-" </para>\n"
-"\t </listitem>\n"
-"\n"
-"\t <listitem><para>Si mueve una carpeta, sus filtros\n"
-"\t la seguirán. </para></listitem>\n"
-"\t </itemizedlist>\n"
-"\t</para>\n"
-
-#: tmp/usage-mail.sgml.h:281
-msgid ""
-"\t<para>\n"
-"\t I started with ten, but four were \"Don't send\n"
-"\t <glossterm linkend=\"spam\">spam</glossterm>.\"\n"
-"\t <itemizedlist>\n"
-"\n"
-"\t <listitem>\n"
-"\t <para>\n"
-"\t\t Don't send spam or forward chain mail. If you must,\n"
-"\t\t watch out for hoaxes and urban legends, and make sure\n"
-"\t\t the message doesn't have multiple layers of\n"
-"\t\t greater-than signs, (&gt;) indicating multiple layers\n"
-"\t\t of careless in-line forwarding.\n"
-"\t </para>\n"
-"\t </listitem>\n"
-"\n"
-"\t <listitem>\n"
-"\t <para>\n"
-"\t\tAlways begin and close with a salutation. Say \"please\"\n"
-"\t\tand \"thank you,\" just like you do in real life. You\n"
-"\t\tcan keep your pleasantries short, but be pleasant!\n"
-"\t </para>\n"
-"\t </listitem>\n"
-"\n"
-"\t <listitem>\n"
-"\t <para>\n"
-"\t\tALL CAPS MEANS YOU'RE SHOUTING! Don't write a whole\n"
-"\t\tmessage in capital letters. It hurts people's ears.\n"
-"\t </para>\n"
-"\t </listitem>\n"
-"\n"
-"\t <listitem>\n"
-"\t <para>\n"
-"\t\t Never write anything in email you wouldn't say in\n"
-"\t\t public. Old messages have a nasty habit of\n"
-"\t\t resurfacing when you least expect.\n"
-"\t </para>\n"
-"\t </listitem>\n"
-"\n"
-"\t <listitem>\n"
-"\t <para>\n"
-"\t Check your spelling and use complete sentences.\n"
-"\t </para>\n"
-"\t </listitem>\n"
-"\n"
-"\t <listitem>\n"
-"\t <para>\n"
-"\t\tDon't send nasty emails (flames). If you get one,\n"
-"\t\tdon't write back.\n"
-"\t </para>\n"
-"\t </listitem>\n"
-"\n"
-"\t <listitem>\n"
-"\t <para>\n"
-"\t\t When you reply or forward, include just enough of\n"
-"\t\t the previous message to provide context: not too\n"
-"\t\t much, not too little.\n"
-"\t </para>\n"
-"\t </listitem>\n"
-"\t </itemizedlist>\n"
-"\t</para>\n"
-msgstr ""
-"\t<para>\n"
-"\t Comenze con diez, pero cuatro eran \"No envie\n"
-"\t <glossterm linkend=\"spam\">spam</glossterm>.\"\n"
-"\t <itemizedlist>\n"
-"\n"
-"\t <listitem>\n"
-"\t <para>\n"
-"\t\t No envie spam ni reenvie cartas encadenadas. Si debe hacerlo,\n"
-"\t\t tenga cuidado con los timos y las leyendas urbanas, y asegurese\n"
-"\t\t que el mensaje no tiene múltiples capas de signos mayor que, (&gt;)\n"
-"\t\t indicando multiples capas de reenvios desconsiderados.\n"
-"\t </para>\n"
-"\t </listitem>\n"
-"\n"
-"\t <listitem>\n"
-"\t <para>\n"
-"\t\tSiempre comienze y acabe con un saludo. Diga \"por favor\"\n"
-"\t\ty \"gracias\", tal como hace en la vida real. Puede mantener\n"
-"\t\tsu cortesía excasa, pero ¡sea cortes!\n"
-"\t </para>\n"
-"\t </listitem>\n"
-"\n"
-"\t <listitem>\n"
-"\t <para>\n"
-"\t\t¡TODO EN MAYUSCULAS SIGNIFICA QUE ESTÁ GRITANDO! No escriba todo el\n"
-"\t\tmensaje en mayusculas. Hace daño a los oidos de la gente.\n"
-"\t </para>\n"
-"\t </listitem>\n"
-"\n"
-"\t <listitem>\n"
-"\t <para>\n"
-"\t\t Nunca escriba en un mensaje electrónico nada que no diría en público.\n"
-"\t\t Los mensajes antiguos tienen la mala costumbre de reaparecer cuando\n"
-"\t\t menos se lo espera.\n"
-"\t </para>\n"
-"\t </listitem>\n"
-"\n"
-"\t <listitem>\n"
-"\t <para>\n"
-"\t Compruebe su ortografía y use frases completas.\n"
-"\t </para>\n"
-"\t </listitem>\n"
-"\n"
-"\t <listitem>\n"
-"\t <para>\n"
-"\t\tNo envie mensajes desagradebles (broncas). Si recive uno,\n"
-"\t\tno lo conteste.\n"
-"\t </para>\n"
-"\t </listitem>\n"
-"\n"
-"\t <listitem>\n"
-"\t <para>\n"
-"\t\t Cuando responde o reenvía, incluya justo lo suficiente del mensaje\n"
-"\t\t anterior para tener un contexto: no incluya demasiado,\n"
-"\t\t ni demasiado poco.\n"
-"\t </para>\n"
-"\t </listitem>\n"
-"\t </itemizedlist>\n"
-"\t</para>\n"
-
-#: tmp/usage-mail.sgml.h:342
-msgid ""
-"\t<para>\n"
-"\t If someone sends you an <glossterm>attachment</glossterm>, a\n"
-"\t file attached to an email,\n"
-"\t <application>Evolution</application> will display the file\n"
-"\t at the bottom of the message to which it's attached. Text,\n"
-"\t HTML, and most images will be displayed within the message\n"
-"\t itself. For other files,\n"
-"\t <application>Evolution</application> will show an icon at\n"
-"\t the end of the message. Right-click on the icon to get a\n"
-"\t list of options which will vary depending on the type of\n"
-"\t attachment. You will have the option to display most files\n"
-"\t as part of the message, export them to a different\n"
-"\t application (images to Eye of GNOME, spreadsheets to\n"
-"\t Gnumeric, and so forth), or save them to disk.\n"
-" </para>\n"
-msgstr ""
-"\t<para>\n"
-"\t Si alguien le envía un <glossterm>adjunto</glossterm>, un\n"
-"\t archivo adjunto aun mensaje,\n"
-"\t <application>Evolution</application> mostrará en archivo en la\n"
-"\t parte de abajo del mensaje al que está adjuntado. Texto,\n"
-"\t HTML, y la mayoría de imágenes se mostrarán dentro del mensaje.\n"
-"\t Para otros archivos,\n"
-"\t <application>Evolution</application> mostrará un icono al final\n"
-"\t del mensaje. Pulse con el botón derecho sobre el icono para obtener\n"
-"\t una lista de opciones que variarán dependiendo del tipo de adjunto.\n"
-"\t Tendrá la opción de mostrar la mayoría de los archivos como parte del\n"
-"\t mensaje, exportarlos a otra aplicación (imágenes a Eye of GNOME, hojas\n"
-"\t de cálculo a Gnumeric, y así sucesivamente), o guardarlo en el disco.\n"
-" </para>\n"
-
-#: tmp/usage-mail.sgml.h:358
-msgid ""
-"\t<para>\n"
-"\t If you have created address cards in the contact manager,\n"
-"\t you can also enter nicknames or other portions of address\n"
-"\t data, and <application>Evolution</application> will complete\n"
-"\t the address for you. <!-- (INSERT description of UI for this\n"
-"\t feature, once it is decided upon). --> If you enter a name\n"
-"\t or nickname that can go with more than one card, Evolution\n"
-"\t will open a dialog box to ask you which person you meant.\n"
-"\t <!-- (NOT YET) Also, <application>Evolution</application>\n"
-"\t will add a domain to any unqualified addresses. By default,\n"
-"\t this is your domain, but you can choose which one mail\n"
-"\t preferences dialog. -->\n"
-" </para>\n"
-msgstr ""
-"\t<para>\n"
-"\t Si ha creado tarjetas de direcciones en el administrador de contactos,\n"
-"\t puede escribir apodos o otras porciones de los datos de la dirección, y\n"
-"\t <application>Evolution</application> completará la dirección por usted\n"
-"\t <!-- (INSERTAR descripción de la IU para esta caracteristica,\n"
-"\t una vez que se decida). --> Si escribe un nombre oun apodo\n"
-"\t puede coincidir con más de una tarjeta, Evolution abrirá una ventana de\n"
-"\t diálogo y le preguntará a quien se refiere.\n"
-"\t <!-- (TODAVIA NO) Tambien, <application>Evolution</application>\n"
-"\t añadirá un dominio a cualquier direccion incompleta. Por defecto, será\n"
-"\t su dominio, pero puede elegirlo en el diálogo de preferencias del\n"
-"\t correo. -->\n"
-" </para>\n"
-
-#: tmp/usage-mail.sgml.h:372
-msgid ""
-"\t<para>\n"
-"\t If you're reading a message with several recipients, you may\n"
-"\t wish to use <guibutton>Reply to All</guibutton> instead of\n"
-"\t <guibutton>Reply</guibutton>. If there are large numbers\n"
-"\t of people in the <guilabel>Cc:</guilabel> or\n"
-"\t <guilabel>To:</guilabel> fields, this can save substantial\n"
-"\t amounts of time. \n"
-"\t <example>\n"
-"\t <title>Using the Reply to All feature</title>\n"
-"\t <para>\n"
-"\t Susan sends an email to a client and sends copies to Tim\n"
-"\t and to an internal company mailing list of co-workers.\n"
-"\t If Tim wants to make a comment for all of them to read,\n"
-"\t he uses <guibutton>Reply to All</guibutton>, but if he\n"
-"\t just wants to tell Susan that he agrees with her, he\n"
-"\t uses <guibutton>Reply</guibutton>. Note that his reply\n"
-"\t will not reach anyone that Susan put on her\n"
-"\t <guilabel>Bcc</guilabel> list, since that list is not\n"
-"\t shared with anyone.\n"
-"\t </para>\n"
-"\t </example>\n"
-"\t</para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:395
-msgid ""
-"\t<para>\n"
-"\t The post office forwards your mail for you when you change\n"
-"\t addresses, and you can forward mail when you get a letter by\n"
-"\t mistake. The email <guilabel>Forward</guilabel> button\n"
-"\t works in much the same way. It's particularly useful if you\n"
-"\t have received a message and you think someone else would\n"
-"\t like to see it. You can forward a message as an attachment\n"
-"\t to a new message (this is the default) or\n"
-"\t you can send it <glossterm linkend=\"inline\">inline</glossterm> as a "
-"quoted\n"
-"\t portion of the message you are sending. Attachment\n"
-"\t forwarding is best if you want to send the full, unaltered\n"
-"\t message on to someone else. Inline forwarding is best if\n"
-"\t you want to send portions of a message, or if you have a\n"
-"\t large number of comments on different sections of the\n"
-"\t message you are forwarding. Remember to note from whom the\n"
-"\t message came, and where, if at all, you have removed or\n"
-"\t altered content.\n"
-"\t</para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:414
-msgid ""
-"\t<para>\n"
-"\t To forward a message you are reading, press\n"
-"\t <guibutton>Forward</guibutton> on the toolbar, or select\n"
-"\t <menuchoice> <guimenu>Message</guimenu>\n"
-"\t <guimenuitem>Forward</guimenuitem> </menuchoice>. If you\n"
-"\t prefer to forward the message <glossterm "
-"linkend=\"inline\">inline</glossterm>\n"
-"\t instead of attached, select <menuchoice>\n"
-"\t <guimenu>Message</guimenu> <guimenuitem>Forward\n"
-"\t Inline</guimenuitem> </menuchoice> from the menu. Choose an\n"
-"\t addressee as you would when sending a new message; the\n"
-"\t subject will already be entered, but you can alter it.\n"
-"\t Enter your comments on the message in the\n"
-"\t <interface>composition frame</interface>, and press\n"
-"\t <guibutton>Send</guibutton>.\n"
-"\t</para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:430
-msgid ""
-"\t<para>\n"
-" For all of these menu items, you can choose whether or not\n"
-" to <guilabel>Search Backwards</guilabel> in the document\n"
-" from the point where your cursor is. For all but the\n"
-" regular expression search (which doesn't need it), you are\n"
-" offered a check box to determine whether the search is to\n"
-" be <guilabel>Case Sensitive</guilabel> when it determines\n"
-" a match.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:440
-msgid ""
-"\t<para>\n"
-" Normally, you can't set text styles or insert pictures in\n"
-" emails, which is why you've probably seen people use far\n"
-" too many exclamation points for emphasis, or use\n"
-" <glossterm linkend=\"emoticon\">emoticons</glossterm> to\n"
-" convey their feelings. However, most newer email programs\n"
-" can display images and text styles as well as basic\n"
-" alignment and paragraph formatting. They do this with\n"
-" <glossterm linkend=\"html\">HTML</glossterm>, just like web\n"
-" pages do.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:452
-msgid ""
-"\t<para>\n"
-" To hide the display of files you've attached to the\n"
-" message, select <menuchoice>\n"
-" <guimenu>View</guimenu> <guimenuitem>Hide\n"
-" Attachments</guimenuitem> </menuchoice>; to show them\n"
-" again, choose <guimenuitem>Show Attachments</guimenuitem>.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:460
-msgid ""
-"\t<para>\n"
-" When you send the message, a copy of the attached file\n"
-"\t will go with it. Be aware that big attachments can take a\n"
-"\t long time to download.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:466
-msgid ""
-"\t<para>\n"
-" <variablelist>\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Find</guimenuitem></term>\n"
-"\t <listitem><para> Enter a word or phrase, and\n"
-"\t <application>Evolution</application> will find it\n"
-" in your message.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\t \n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Find Regex</guimenuitem></term>\n"
-"\t <listitem>\n"
-"\t\t<para>\n"
-" Find a regex, also called a\n"
-" <glossterm linkend=\"regular-expression\">regular\n"
-" expression</glossterm>, in your composer window.\n"
-" </para>\n"
-" </listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Find Again</guimenuitem></term>\n"
-"\t <listitem><para>\n"
-" Select this item to repeat the last search you "
-"performed.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guimenuitem>Replace</guimenuitem></term>\n"
-"\t <listitem><para> \n"
-" Find a word or phrase, and replace it with\n"
-"\t something else. \n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t </variablelist>\n"
-" </para> \n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:505
-msgid ""
-"\t<para>\n"
-" HTML formatting tools are located in the toolbar just above\n"
-"\t the space where you'll actually compose the message, and\n"
-"\t they also appear in the <guimenu>Insert</guimenu> and\n"
-"\t <guimenu>Format</guimenu> menus. \n"
-"\t </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:512
-msgid ""
-"\t<para>\n"
-" There are three tools that you can find only in the\n"
-" <guimenu>Insert</guimenu> menu.\n"
-" <variablelist>\n"
-" <varlistentry>\n"
-" <term><guimenuitem>Insert Link</guimenuitem>:</term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" Use this tool to put hyperlinks in your HTML\n"
-" messages. When you select it,\n"
-" <application>Evolution</application> will prompt you\n"
-" for the <guilabel>Text</guilabel> that will appear,\n"
-" and the <guilabel>Link</guilabel>, where you should\n"
-" enter the actual web address (URL). If you don't\n"
-" want special link text, you can just enter the address\n"
-" directly, and <application>Evolution</application>\n"
-" will recognize it as a link.\n"
-" </para>\n"
-"\t </listitem>\n"
-" </varlistentry>\n"
-" <varlistentry>\n"
-" <term> <guimenuitem>Insert Image</guimenuitem>:</term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-" Select this item to embed an image into your email, as\n"
-" was done in the welcome message. Images will appear at\n"
-" the location of the cursor. This is different from\n"
-" attaching them to a message, but not very different.\n"
-" </para>\n"
-"\t </listitem>\n"
-" </varlistentry>\n"
-" <varlistentry>\n"
-" <term><guimenuitem>Insert Rule</guimenuitem>:</term>\n"
-" <listitem><para>\n"
-" This will insert a horizontal line, or rule, into your "
-"document.\n"
-" You'll be presented with a dialog box which gives you\n"
-" the choice of size, percentage of screen, shading, and\n"
-" alignment; if you leave everything at the default\n"
-" values you'll get a thin black rule all the way across\n"
-" the screen.</para></listitem>\n"
-"\t</varlistentry>\n"
-"\n"
-"\t </variablelist>\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:557
-msgid ""
-"\t<para>\n"
-" You can also choose to save messages as drafts or as text\n"
-" files. Choose\n"
-" <menuchoice>\n"
-" <guimenu>File</guimenu>\n"
-" <guimenuitem>Save</guimenuitem>\n"
-"\t </menuchoice>\n"
-" or <guimenuitem>Save As</guimenuitem> to save your message\n"
-" as a text file. If you prefer to keep your message in a\n"
-" folder (the <guilabel>Drafts</guilabel> folder would be the\n"
-" obvious place), you can select <menuchoice>\n"
-" <guimenu>File</guimenu> <guimenuitem>Save In\n"
-" Folder</guimenuitem> </menuchoice>. \n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:572
-msgid ""
-"\t<para>\n"
-" You're probably familiar with search and replace features,\n"
-" and if you come from a Linux or Unix background, you\n"
-" probably know what <guimenuitem>Find Regex</guimenuitem>\n"
-" does. If you aren't among the lucky who already know,\n"
-" here's a quick rundown of an important section of the\n"
-" <guimenu>Edit</guimenu> menu.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:581
-msgid ""
-"\t<para>\n"
-" One of the ways <application>Evolution</application> lets\n"
-" you choose the way you work is the way it lets you sort your\n"
-" message lists. To sort by sender, subject, or date, click\n"
-" on the bars with those labels at the top of the message\n"
-" list. The direction of the arrow next to the label indicates\n"
-" the direction of the sort, and if you click again, you'll\n"
-" sort them in reverse order. For example, click once on\n"
-" <guilabel>Date</guilabel> to sort messages by date from\n"
-" oldest to newest. Click again, and\n"
-" <application>Evolution</application> sorts the list from\n"
-" newest to oldest. You can also right-click on the message\n"
-" header bars to get a set of sorting options, and add or\n"
-" remove columns from the message list. You can find detailed\n"
-" instructions on how to customize your message display\n"
-" columns in <xref linkend=\"usage-mail-organize-columns\">.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:599
-msgid ""
-"\t<para>\n"
-" You can also choose a threaded message view. Select\n"
-" <menuchoice> <guimenu>View</guimenu>\n"
-" <guimenuitem>Threaded</guimenuitem> </menuchoice> to turn\n"
-" the threaded view on or off. When you select this option,\n"
-" <application>Evolution</application> groups the replies to a\n"
-" message with the original, so you can follow the thread of a\n"
-" conversation from one message to the next.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:609
-msgid "\t<para> Happy mailing! </para>\n"
-msgstr "\t<para> ¡Feliz envío de correo! </para>\n"
-
-#: tmp/usage-mail.sgml.h:611
-msgid "\t<title>Attachments and HTML Mail</title>\n"
-msgstr "\t<title>Adjuntos y correo en HTML</title>\n"
-
-#: tmp/usage-mail.sgml.h:613
-msgid "\t<title>Attachments</title>\n"
-msgstr "\t<title>Adjuntos</title>\n"
-
-#: tmp/usage-mail.sgml.h:615
-msgid "\t<title>Choosing Recipients Quickly</title>\n"
-msgstr "\t<title>Eligiendo Rápidamente a los Destinatarios</title>\n"
-
-#: tmp/usage-mail.sgml.h:617
-msgid "\t<title>Embellish your email with HTML</title>\n"
-msgstr "\t<title>Embelleciendo su correo con HTML</title>\n"
-
-#: tmp/usage-mail.sgml.h:619
-msgid "\t<title>Forwarding Mail</title> \n"
-msgstr "\t<title>Reenviando Correo</title> \n"
-
-#: tmp/usage-mail.sgml.h:621
-msgid "\t<title>New Message Window</title>\n"
-msgstr "\t<title>Ventana de Nuevo Mensaje</title>\n"
-
-#: tmp/usage-mail.sgml.h:623
-msgid "\t<title>Replying to Messages</title>\n"
-msgstr "\t<title>Respondiendo Mensajes</title>\n"
-
-#: tmp/usage-mail.sgml.h:625
-msgid "\t<title>Saving Messages for Later</title>\n"
-msgstr "\t<title>Guardando Mensajes para más tarde</title>\n"
-
-#: tmp/usage-mail.sgml.h:627
-msgid "\t<title>Seven Tips for Email Courtesy</title>\n"
-msgstr "\t<title>Siete Consejos de Cortesía en el Correo</title>\n"
-
-#: tmp/usage-mail.sgml.h:629
-msgid "\t<title>Sorting the message list</title>\n"
-msgstr "\t<title>Ordenando la lista de mensajes</title>\n"
-
-#: tmp/usage-mail.sgml.h:631
-msgid "\t<title>Two Notable Filter Features</title>\n"
-msgstr "\t<title>Dos Características Notables de los Filtros</title>\n"
-
-#: tmp/usage-mail.sgml.h:633
-msgid "\t<title>Using Folders, Searches, and Virtual Folders</title>\n"
-msgstr "\t<title>Usando Carpetas, Búsquedas, y Carpetas Virtuales</title>\n"
-
-#: tmp/usage-mail.sgml.h:635
-msgid ""
-" <para>\n"
-"\t The simplest way to direct a message is to put the email\n"
-" address or addresses in the <guilabel>To:</guilabel>\n"
-" field, which denotes primary recipients. To send mail to\n"
-" more than one or two people, you can use the the\n"
-" <guilabel>Cc:</guilabel> field.\n"
-"\t </para>\n"
-msgstr ""
-" <para>\n"
-"\t La manera más simple de dirigir un mensaje es poner la dirección\n"
-" o direcciones de correo en el campo <guilabel>A:</guilabel>,\n"
-" el cual denota a los destinatarios principales. Para enviar\n"
-" correo a más de una o dos personas, puede usar el campo\n"
-" <guilabel>Cc:</guilabel>.\n"
-"\t </para>\n"
-
-#: tmp/usage-mail.sgml.h:643
-msgid " <title>Types of Recipients</title>\n"
-msgstr " <title>Tipos de Destinatarios</title>\n"
-
-#: tmp/usage-mail.sgml.h:645
-msgid " <title>Using Evolution for News </title>\n"
-msgstr " <title>Usando Evolution para las Noticias </title>\n"
-
-#: tmp/usage-mail.sgml.h:647
-msgid ""
-" <para>\n"
-"\t <application>Evolution</application>, like most email\n"
-"\t programs recognizes three types of addressee: primary\n"
-"\t recipients, secondary recipients, and hidden (\"blind\")\n"
-"\t recipients.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-"\t <application>Evolution</application>, como la mayoría de\n"
-"\t los programas de correo reconoce tres tipos de direcciones\n"
-"\t destinatarios principales, destinatarios secundarios, y\n"
-"\t destinatarios escondidos (\"oculto\").\n"
-" </para>\n"
-
-#: tmp/usage-mail.sgml.h:654
-msgid ""
-" <para>\n"
-"\t You can probably guess the purpose of the buttons labelled\n"
-"\t <guibutton>Cut</guibutton>, <guibutton>Copy</guibutton>,\n"
-"\t <guibutton>Paste</guibutton>, <guibutton>Undo</guibutton>\n"
-"\t and <guibutton>Redo</guibutton>, but there's a bit more to\n"
-"\t sending mail that's less obvious. In the next few sections,\n"
-"\t you'll see how <application>Evolution</application> handles\n"
-"\t additional features, including large recipient lists,\n"
-"\t attachments, and forwarding.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:665
-msgid ""
-" <para>\n"
-" If you change your mind and decide you want to keep it,\n"
-" select <menuchoice> <guimenu>Message</guimenu>\n"
-" <guimenuitem>Undelete</guimenuitem></menuchoice>. If you\n"
-" really want to get rid of it, choose\n"
-" <guimenuitem>Expunge</guimenuitem> from the\n"
-" <guimenu>Folder</guimenu> menu. That will delete it\n"
-" permanently.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:675
-msgid ""
-" <para>\n"
-" Once you've read your mail, you may want to get rid of\n"
-" it. To mark a message for deletion, select it in the the\n"
-" <interface>message list</interface> by clicking on it once.\n"
-" Then click on the <guibutton>Delete</guibutton> button in\n"
-" the tool bar. Or, right-click on a message and choose\n"
-" <guimenuitem>Delete</guimenuitem> from the right-click\n"
-" menu. The message will appear with a line through it, to\n"
-" show that you've marked it for deletion.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:686
-msgid ""
-" <para>\n"
-" Now, tell it what to do with those messages. If you want more\n"
-" actions, click <guibutton>Add Action</guibutton>; if you want\n"
-" fewer, click <guibutton>Remove Action</guibutton>. And choose\n"
-" again:\n"
-" <variablelist>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guilabel>Copy to Folder</guilabel></term>\n"
-"\t <listitem><para>\n"
-" If you select this item, "
-"<application>Evolution</application>\n"
-" will put the messages into a folder you specify. Click the \n"
-" <guibutton>&lt;click here to select a folder&gt;</guibutton> "
-"button\n"
-" to select a folder. \n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guilabel>Move to Folder</guilabel></term>\n"
-"\t <listitem><para>\n"
-" If you select this item, "
-"<application>Evolution</application>\n"
-" will put the messages into a folder you specify. Click the \n"
-" <guibutton>&lt;click here to select a folder&gt;</guibutton> "
-"button\n"
-" to select a folder. \n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guilabel>Forward to Address</guilabel></term>\n"
-"\t <listitem><para>\n"
-" Select this, enter an address, and the addressee will\n"
-" get a copy of the message.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guilabel>Delete</guilabel></term>\n"
-"\t <listitem><para>\n"
-" Marks the message for deletion. You can still get the "
-"message\n"
-" back, at least until you <guimenuitem>Expunge</guimenuitem> "
-"your\n"
-" mail yourself.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guilabel>Stop Processing</guilabel></term>\n"
-"\t <listitem><para>\n"
-" Select this if you want to tell all other filters to ignore \n"
-" this message, because whatever you've done with it so far\n"
-" is plenty.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guilabel>Assign Color</guilabel></term>\n"
-"\t <listitem><para>\n"
-" Select this item, and <application>Evolution</application>\n"
-" will mark the message with whatever color you please.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guilabel>Assign Score</guilabel></term>\n"
-"\t <listitem><para> If you know that all mail with\n"
-"\t \"important\" somewhere in the message body line is\n"
-"\t important, you can give it a high priority score. In a subsequent "
-"filter you can \n"
-" then arrange your messages by their priority score.\n"
-"\t </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t</variablelist>\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:759
-msgid " <title>Advanced Mail Composition</title>\n"
-msgstr " <title>Composición Avanzada de Correo</title>\n"
-
-#: tmp/usage-mail.sgml.h:761
-msgid " <title>Deleting Mail</title>\n"
-msgstr " <title>Borrando Correo</title>\n"
-
-#: tmp/usage-mail.sgml.h:763
-msgid " <title>Searching and Replacing with the Composer</title>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:765
-msgid ""
-" <para>\n"
-" Newsgroups are so similar to email that there's no reason not\n"
-" to read them side by side. If you want to do that, add a\n"
-" news source to your configuration (see <xref\n"
-" linkend=\"config-prefs-network-news\">). The news server will\n"
-" appear as a remote server, and will look quite similar to an\n"
-" IMAP folder. When you click <guibutton>Get Mail</guibutton>,\n"
-" <application>Evolution</application> will also check for news\n"
-" messages.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:776
-msgid ""
-" <para>\n"
-" The second part, however, is slightly different. In the\n"
-" section of the window labelled <guilabel>Virtual Folder Sources\n"
-" </guilabel> is a list of folders in which\n"
-" <application>Evolution</application> will search for the\n"
-" contents of your vFolder. Click <guibutton>Add</guibutton>\n"
-" to add a folder, or <guibutton>Remove</guibutton> to remove\n"
-" one. That way, you can have your vFolder search in\n"
-" newsgroups, or just in one of your mailboxes, or just in a\n"
-" select few folders you've already screened with filters.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:788
-msgid ""
-" <para>\n"
-" The vFolder creation window is shown in <xref\n"
-"\tlinkend=\"usage-mail-vfolder-fig-createrule\">\n"
-"\n"
-" <figure id=\"usage-mail-vfolder-fig-createrule\">\n"
-"\t <title>Selecting a vFolder Rule</title>\n"
-"\t <screenshot>\n"
-"\t <screeninfo>Creating a vFolder Rule</screeninfo>\n"
-"\t <graphic fileref=\"fig/vfolder-createrule-fig\" format=\"png\" "
-"srccredit=\"Aaron Weber\">\n"
-"\t</graphic>\n"
-"\t</screenshot>\n"
-" </figure>\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:802
-msgid ""
-" <para>\n"
-"\t Enter an address in the <guilabel>To:</guilabel> field, a\n"
-"\t subject in the <guilabel>Subject:</guilabel> and a message in\n"
-"\t the big empty box at the bottom of the window, and press\n"
-"\t <guibutton>Send</guibutton>.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:809
-msgid ""
-" <para>\n"
-"\t To create a virtual folder, select <menuchoice>\n"
-"\t <guimenu>Settings</guimenu> <guimenuitem>Virtual Folder\n"
-"\t Editor</guimenuitem> </menuchoice>. This will bring up a\n"
-"\t dialog box that looks suspiciously like the filter window\n"
-"\t (for more information on filters, see <xref\n"
-"\t linkend=\"usage-mail-organize-filters\">), and which\n"
-"\t presents you with a list of virtual folders you have previously\n"
-"\t created. If you have created any virtual folders, they are listed\n"
-"\t here, and you can select, edit or remove them if you wish.\n"
-"\t If you have not created any, there will be only one available\n"
-"\t option: click <guibutton>Add</guibutton> to add a new\n"
-"\t Virtual Folder.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:824
-msgid ""
-" <para>\n"
-"\t You can enter a name for your virtual folder in the\n"
-"\t <guilabel>Name</guilabel>. Then, tell\n"
-"\t <application>Evolution</application> what messages to look\n"
-"\t for. This process is exactly like filter creation: decide\n"
-"\t between <guilabel>Match all parts</guilabel> and\n"
-"\t <guilabel>Match any part</guilabel>, then choose what part of\n"
-"\t the message to look in, what sort of matching to perform, and\n"
-"\t specify exactly what it is that you want to find, be it a\n"
-"\t line of text, a score, a regular expression, or a particular date or\n"
-"\t range of dates.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:837
-msgid ""
-" <para>\n"
-"\t You can start writing a new email message by selecting\n"
-"\t <menuchoice> <guimenu>File</guimenu>\n"
-"\t <guisubmenu>New</guisubmenu> <guimenuitem>\n"
-"\t Mail Message</guimenuitem></menuchoice>, or by pressing the\n"
-"\t <guibutton>Compose</guibutton> button in the Inbox toolbar.\n"
-"\t When you do so, the <interface>New Message</interface> window\n"
-"\t will open, as shown in <xref\n"
-"\t linkend=\"usage-mail-newmsg-fig\">.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:848
-msgid ""
-" <para>\n"
-"\t<application>Evolution</application> keeps mail, as well as\n"
-"\taddress cards and calendars, in folders. You start out with a\n"
-"\tfew, like <guilabel>Inbox</guilabel>,\n"
-"\t<guilabel>Outbox</guilabel>, and <guilabel>Drafts</guilabel>,\n"
-"\tbut you can create as many as you like. Create new folders by\n"
-"\tselecting <guisubmenu>New</guisubmenu> and then\n"
-"\t<guimenuitem>Folder</guimenuitem> from the\n"
-"\t<guimenu>File</guimenu> menu.\n"
-"\t<application>Evolution</application> will as you for the name\n"
-"\tand the type of the folder, and will provide you with a folder\n"
-"\ttree so you can pick where it goes.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:862
-msgid ""
-" <para>\n"
-"\tA virtual folder is really a hybrid of all the other organizational\n"
-"\ttools: it looks like a folder, it acts like a search, and you\n"
-"\tset it up like a filter. In other words, while a conventional\n"
-"\tfolder actually contains messages, a virtual folder is a view of\n"
-"\tmessages that may be in several different folders. The\n"
-"\tmessages it contains are determined on the fly using a set of\n"
-"\tcriteria you choose in advance.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:872
-msgid ""
-" <para>\n"
-"\tAs messages that meet the virtual folder criteria arrive or are\n"
-"\tdeleted, <application>Evolution</application> will\n"
-"\tautomatically place them in and remove them from the\n"
-"\tvirtual folder contents list. When you delete a message, it gets\n"
-"\terased from the folder in which it actually exists, as well as\n"
-"\tany virtual folders which display it.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:881
-msgid ""
-" <para>\n"
-"\tIf filters aren't flexible enough for you, or you find\n"
-"\tyourself performing the same search again and again, consider\n"
-"\ta virtual folder. Virtual folders, or vFolders, are an\n"
-"\tadvanced way of viewing your email messages within\n"
-"\t<application>Evolution</application>. If you get a lot of\n"
-"\tmail or often forget where you put messages, virtual folders can help\n"
-"\tyou stay on top of things.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:891
-msgid ""
-" <para>\n"
-"\tImagine a business trying to keep track of mail from hundreds\n"
-"\tof vendors and clients, or a university with overlapping and\n"
-"\tchanging groups of faculty, staff, administrators and\n"
-"\tstudents. The more mail you need to organize, the less you\n"
-"\tcan afford the sort of confusion that stems from an\n"
-"\torganizational system that's not flexible enough. Virtual folders\n"
-"\tmake for better organization because they can accept\n"
-"\toverlapping groups in a way that regular folders and filing\n"
-"\tsystems can't.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:903
-msgid ""
-" <para>\n"
-"\tMost mail clients can search through your messages for you,\n"
-"\tbut <application>Evolution</application> does it faster. You\n"
-"\tcan search through just the message subjects, just the message\n"
-"\tbody, or both body and subject.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:910
-msgid ""
-" <para>\n"
-"\tNow that you've had a look around the\n"
-"\t<interface>Inbox</interface>, it's time to check for new mail.\n"
-"\tClick <guibutton>Get mail</guibutton> in the toolbar to check\n"
-"\tyour mail. If it's the first time you've done so, the\n"
-"\t<interface>mail setup assistant</interface> will ask you for\n"
-"\tthe information it needs to check your mail (see <xref\n"
-"\tlinkend=\"config-setupassist\"> for more information). \n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:920
-msgid ""
-" <para>\n"
-"\tTo start searching, enter a word or phrase in the text area\n"
-"\tright below the toolbar, and choose a search type:\n"
-"\t<variablelist>\n"
-"\t <varlistentry>\n"
-"\t <term><guilabel>Body or subject contains:</guilabel></term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-"\t This will search message subjects and the messages\n"
-"\t themselves for the word or phrase you've entered in\n"
-"\t the search field.\n"
-" \t </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\t <varlistentry>\n"
-"\t <term> <guilabel>Body contains:</guilabel> </term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-"\t This will search only in message text, not the subject\n"
-"\t lines.\n"
-"\t </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\t <varlistentry>\n"
-"\t <term><guilabel>Subject contains:</guilabel></term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-"\t This will show you messages where the search text is\n"
-"\t in the subject line. It will not search in the\n"
-"\t message body.\n"
-"\t </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\t <varlistentry>\n"
-"\t <term><guilabel>Body does not contain:</guilabel></term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-"\t This finds every email message that does not have the\n"
-"\t search text in the message body. It will still show\n"
-"\t messages that have the search text in the subject\n"
-"\t line, if it is not also in the body.\n"
-"\t </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\t <varlistentry>\n"
-"\t <term><guilabel>Subject does not contain:</guilabel></term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-"\t This finds every mail whose subject does not contain\n"
-"\t the search text.\n"
-"\t </para>\n"
-"\t </listitem>\n"
-"\t </varlistentry>\n"
-"\t</variablelist>\n"
-"\n"
-" When you've entered your search phrase, press\n"
-" <keycap>Enter</keycap>. <application>Evolution</application>\n"
-" will show your search results in the message list.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:980
-msgid ""
-" <para>\n"
-"\tYour <application>Evolution</application>\n"
-"\t<guilabel>Inbox</guilabel> will look something like the one in\n"
-"\t<xref linkend=\"usage-mail-intro-fig\">. Just below the toolbar\n"
-"\tis the <interface>message list</interface>, showing message\n"
-"\theader information like <guilabel>Subject</guilabel> and\n"
-"\t<guilabel>Date</guilabel>. The message itself appears below\n"
-"\tthat, in the <interface>view pane</interface>. If you find\n"
-"\tthe <interface>view pane</interface> too small, you can resize\n"
-"\tthe pane, enlarge the whole window, or double-click on the\n"
-"\tmessage in the <interface>message list</interface> to have it\n"
-"\topen in a new window. Just like with folders, you can\n"
-"\tright-click on messages in the message list and get a menu of\n"
-"\tpossible actions.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:996
-msgid ""
-" <para>\n"
-" <application>Evolution</application> lets you handle your\n"
-" IMAP and newsgroup subscriptions with the same tool: the\n"
-" subscriptions manager. To start using it, choose\n"
-" <menuchoice> <guimenu>Settings</guimenu> <guimenuitem>Manage\n"
-" Subscriptions</guimenuitem> </menuchoice>.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:1004
-msgid ""
-" <para>\n"
-" By default, the message list has columns with the following\n"
-" headings: an envelope icon indicating whether you have read\n"
-" or replied to a message (closed for unread, open for read,\n"
-" and open with an arrow on it to indicate you've sent a\n"
-" reply), an exclamation point indicating priority, and the\n"
-" <guilabel>From</guilabel>, <guilabel>Subject</guilabel>, and\n"
-" <guilabel>Date</guilabel> fields. You can change their order\n"
-" and remove them by dragging and dropping them. You can add\n"
-" new ones with the <guimenuitem>Field Chooser</guimenuitem>\n"
-" item in the right click menu for the column headings.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:1017
-msgid ""
-" <para>\n"
-" If you have configured any IMAP (mail) or NNTP (news)\n"
-" servers, you will see them listed in the left half of the\n"
-" subscription management window. Click on a server to select\n"
-" it, and you will see the folders or newsgroups available to\n"
-" you. You can then select individual folders and subscribe to\n"
-" them, or remove yourself from the subscription list.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:1026
-msgid ""
-" <para>\n"
-" If you think you'll want to return to a search again, you can\n"
-" save it as a virtual folder by selecting <guilabel>Store\n"
-" Search as Virtual Folder</guilabel>.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:1032
-msgid ""
-" <para>\n"
-" Most of the mail-related actions you'll want to perform are\n"
-" listed in the <guimenu>Message</guimenu> menu in the menu\n"
-" bar. The most frequently used ones, like\n"
-" <guimenuitem>Reply</guimenuitem> and\n"
-" <guimenuitem>Forward</guimenuitem>, also appear as buttons in\n"
-" the toolbar, and almost all of them are duplicated in the\n"
-" right-click menu and as keyboard shortcuts, which tend to be\n"
-" faster once you get the hang of them. You can choose\n"
-" whichever way you like best; the idea is that the software\n"
-" should work the way you want, rather than making you work the\n"
-" way the it does.\n"
-"\t <tip id=\"view-headers\">\n"
-"\t <title>Take a look at the headers</title>\n"
-"\t <para>\n"
-"\t To look at the entire source of your email message, including\n"
-"\t all the header information, select\n"
-"\t "
-"<menuchoice><guimenu>View</guimenu><guimenuitem>Source</guimenuitem></menucho"
-"ice>\n"
-"\t </para>\n"
-"\t </tip>\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:1054
-msgid ""
-" <para>\n"
-" Right-click on one of the column headers to get a list of\n"
-" options:\n"
-" <variablelist>\n"
-"\n"
-" <varlistentry>\n"
-" <term><guimenuitem>Sort Ascending</guimenuitem>,\n"
-" <guimenuitem>Sort Descending</guimenuitem>, and\n"
-" <guimenuitem>Unsort</guimenuitem></term>\n"
-" <listitem><para>Which should be pretty obvious. You\n"
-" can also set these sorts by just clicking on the\n"
-" column headers.</para></listitem>\n"
-" </varlistentry>\n"
-"\n"
-" <varlistentry>\n"
-" <term><guimenuitem>Group By this "
-"Field</guimenuitem></term>\n"
-" <listitem><para>\n"
-" Groups messages instead of sorting them. (FIXME: "
-"Explain further) \n"
-" </para></listitem>\n"
-" </varlistentry>\n"
-"\n"
-" <varlistentry>\n"
-" <term><guimenuitem>Remove this\n"
-" Column</guimenuitem></term> <listitem><para> Remove\n"
-" this column from the display. You can also remove\n"
-" columns by dragging the header off the list and\n"
-" letting it drop. </para></listitem>\n"
-" </varlistentry>\n"
-"\n"
-" <varlistentry>\n"
-" <term><guimenuitem>Field\n"
-" Chooser</guimenuitem></term> <listitem><para> A list\n"
-" of column headers; just drag and drop them into\n"
-" place between two existing headers. A red arrow will\n"
-" appear to show you where you're about to put the\n"
-" column. </para></listitem>\n"
-" </varlistentry>\n"
-" </variablelist>\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:1094
-msgid ""
-" <para>\n"
-" The <interface>filter assistant</interface> also has a set of\n"
-" buttons:\n"
-" <itemizedlist>\n"
-"\n"
-" <listitem><para>\n"
-" <guibutton>Add</guibutton> &mdash; Create a new filter.\n"
-" </para></listitem>\n"
-"\n"
-" <listitem><para>\n"
-" <guibutton>Edit</guibutton> &mdash; Edit an existing filter.\n"
-" </para></listitem>\n"
-"\n"
-" <listitem><para>\n"
-" <guibutton>Delete</guibutton> &mdash; Delete the selected "
-"filter.\n"
-" </para></listitem>\n"
-"\n"
-" <listitem><para> <guibutton>Up</guibutton> &mdash; Move the\n"
-" selected filter up in the list so it gets applied first.\n"
-" </para></listitem>\n"
-"\n"
-" <listitem><para>\n"
-" <guibutton>Down</guibutton> &mdash; Move the selected filter "
-"down \n"
-" in the list, so it comes into play later.\n"
-" </para></listitem>\n"
-" </itemizedlist>\n"
-"\n"
-" If you don't have any filters set up, the only one of those\n"
-" buttons you can click is <guibutton>Add</guibutton>, which\n"
-" will open a dialog to let you add a filter rule. If you do\n"
-" have filters, you can either add a new filter rule, or select\n"
-" one from your list and click <guibutton>Edit</guibutton>.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:1128
-msgid ""
-" <para>\n"
-" When you're done with the search, go back to seeing all your\n"
-" messages by choosing <guimenuitem>Show All</guimenuitem> from\n"
-" the <guilabel>Search</guilabel> drop-down box. If you're\n"
-" sneaky, just enter a blank search: since every message has at\n"
-" least one space in it, you'll see every message in the\n"
-" folder.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:1137
-msgid ""
-" <para>\n"
-" Enter a name for your filter in the <guilabel>Rule\n"
-" Name</guilabel> field, and then begin choosing the criteria\n"
-" you'd like to use as you sort your mail. Choose how many\n"
-" criteria you'd like by pressing <guibutton>Add\n"
-" Criterion</guibutton> and <guibutton>Remove\n"
-" Criterion</guibutton>. If you have multiple criteria, you\n"
-" should then decide whether to have the filter do its job only\n"
-" <guilabel>if all criteria are met</guilabel>, or <guilabel>if\n"
-" any criteria are met</guilabel>.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:1149
-msgid ""
-" <para>\n"
-" I once worked in the mail room of a large company, where my\n"
-" job was to bundle, sort, and distribute mail to the various\n"
-" mail boxes and desks throughout the building. Filters do that\n"
-" same job with email, but they lose much less mail than I did.\n"
-" In addition, you can have multiple filters performing multiple\n"
-" actions that may effect the same message in several ways. For\n"
-" example, your filters could put copies of one message into\n"
-" multiple folders, or keep a copy and send one to another\n"
-" person as well, and it can do that in under a second. Which is\n"
-" to say, it's faster and more flexible than an actual person\n"
-" with a pile of envelopes.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:1163
-msgid ""
-" <para>\n"
-" If you'd like to perform a more complex search, open the\n"
-" advanced search dialog by selecting\n"
-" <guilabel>Advanced...</guilabel> from the\n"
-" <guilabel>Search</guilabel> drop-down menu. Then, create your\n"
-" search criteria (each with the same options you saw in the\n"
-" regular search bar), and decide whether you want to find\n"
-" messages that match all of them, or messages that match even\n"
-" one. Then, click <guibutton>Search</guibutton> to go and find\n"
-" those messages.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:1175
-msgid ""
-" <para>\n"
-" Most often, you'll want to have\n"
-" <application>Evolution</application> put mail into different\n"
-" folders, but you can have it do almost anything you like.\n"
-" People who get lots of mail, or who often need to refer to old\n"
-" messages, find filters especially helpful, but they're good\n"
-" for anybody who gets more than a few messages a day. To\n"
-" create a filter, open the <interface>filter\n"
-" assistant</interface> by selecting\n"
-"\t<menuchoice>\n"
-"\t <guimenu>Settings</guimenu> \n"
-" <guimenuitem>Mail Filters</guimenuitem>\n"
-" </menuchoice>.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:1190
-msgid ""
-" <para>\n"
-" Once it's validated the password,\n"
-"\t<application>Evolution</application> will check your mail.\n"
-"\tNew mail will appear in the local <interface>Inbox</interface>\n"
-"\tif you're using a <glossterm>POP</glossterm> account, and in\n"
-"\tyour <glossterm>IMAP</glossterm> folders if you use IMAP. If\n"
-"\tyou have chosen to use IMAP, and you have multiple folders on\n"
-"\tyour IMAP server, you may need to subscribe to them. To learn\n"
-"\thow to use the subscription manager, read <xref\n"
-"\tlinkend=\"usage-mail-subscriptions\">.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:1202
-msgid ""
-" <para>\n"
-" Once you have subscribed to a folder or newsgroup, your system\n"
-" will check for new messages whenever you press the\n"
-" <guibutton>Get Mail</guibutton> button.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:1208
-msgid ""
-" <para>\n"
-" The <interface>filter assistant</interface> window contains a\n"
-" list of your current filters, sorted by the order in which\n"
-" they are used. From the drop-down box at the top of the\n"
-" window, choose <guilabel>Incoming</guilabel> to display\n"
-" filters for incoming mail, and <guilabel>Outgoing</guilabel>\n"
-" for those which sort only outgoing mail.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:1217
-msgid ""
-" <para>\n"
-" The filter rule editor, shown in <xref\n"
-" linkend=\"usage-mail-filters-fig-new\">, is where you'll\n"
-" actually create your filtering rule.\n"
-"\n"
-" <figure id=\"usage-mail-filters-fig-new\">\n"
-"\t <title>Creating a new Filter</title>\n"
-"\t <screenshot>\n"
-"\t <screeninfo>Creating a new Filter</screeninfo>\n"
-"\t <graphic fileref=\"fig/filter-new-fig\" format=\"png\" srccredit=\"Aaron "
-"Weber\">\n"
-"\t</graphic>\n"
-"\t</screenshot>\n"
-" </figure>\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:1232
-msgid ""
-" <para>\n"
-" When you click <guibutton>OK</guibutton>, your new folder will\n"
-"\tappear in the <interface>folder view</interface>. You can\n"
-"\tthen put messages in it by dragging and dropping them, or by\n"
-"\tusing the <guibutton>Move</guibutton> button in the\n"
-"\ttoolbar. If you want to move several messages at once, click\n"
-"\ton the ones you want to move while holding down the\n"
-"\t<keycap>CTRL</keycap> key, or use <keycap>Shift</keycap> to\n"
-"\tselect a range of messages. If you create a filter with the\n"
-"\t<interface>filter assistant</interface>, you can have mail\n"
-"\tmoved to your folder automatically.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:1245
-msgid ""
-" <para>\n"
-" You're done. Click <guibutton>OK</guibutton> to use this\n"
-" filter, or <guibutton>Cancel</guibutton> to close the window\n"
-" without saving any changes.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:1251
-msgid ""
-" <para>\n"
-" You can start reading email by clicking\n"
-" <guibutton>Inbox</guibutton> in the shortcut bar. The first\n"
-" time you use <application>Evolution</application>, it will\n"
-" start with the <interface>Inbox</interface> open and show you a\n"
-" message from Ximian welcoming you to the application.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:1259
-msgid " <title>Checking Mail</title>\n"
-msgstr " <title>Comprobando el Correo</title>\n"
-
-#: tmp/usage-mail.sgml.h:1261
-msgid " <title>Getting Organized with Folders</title>\n"
-msgstr " <title>Estar Organizando con Carpetas</title>\n"
-
-#: tmp/usage-mail.sgml.h:1263
-msgid " <title>Getting Really Organized with Virtual Folders</title>\n"
-msgstr ""
-" <title>Estar Realmente Organizado con Carpetas Virtuales</title>\n"
-
-#: tmp/usage-mail.sgml.h:1265
-msgid " <title>Reading Mail</title>\n"
-msgstr " <title>Leyendo el Correo</title>\n"
-
-#: tmp/usage-mail.sgml.h:1267
-msgid " <title>Searching for Messages</title>\n"
-msgstr " <title>Buscando Mensajes</title>\n"
-
-#: tmp/usage-mail.sgml.h:1269
-msgid " <title>Sorting Mail with Column Headers</title>\n"
-msgstr " <title>Ordenando el Correo según las Columnas</title>\n"
-
-#: tmp/usage-mail.sgml.h:1271
-msgid " <title>Staying organized: Mail Filters in Evolution</title>\n"
-msgstr ""
-" <title>Estar organizado: Filtros de correo en Evolution</title>\n"
-
-#: tmp/usage-mail.sgml.h:1273
-msgid " <title>Subscription Management</title>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:1275
-msgid " <title>Writing and Sending Mail</title>\n"
-msgstr " <title>Escribiendo y Enviando Correo</title>\n"
-
-#: tmp/usage-mail.sgml.h:1277
-msgid ""
-" <para>\n"
-"\tIf you get an error message instead of mail, you probably need\n"
-"\tto change your network settings. To learn how to do that,\n"
-"\thave a look at <xref linkend=\"config-prefs-mail-network\">, or\n"
-"\task your system administrator.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:1284
-msgid ""
-" <para>\n"
-" For each filter criterion, you must first select what\n"
-" part of the message you want the filter to examine:\n"
-" <variablelist>\n"
-"\t <varlistentry>\n"
-"\t <term><guilabel>Sender</guilabel></term>\n"
-"\t <listitem><para>\n"
-" The sender's address.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guilabel>Recipients</guilabel></term>\n"
-"\t <listitem><para>\n"
-" The recipients of the message.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guilabel>Subject</guilabel></term>\n"
-"\t <listitem><para>\n"
-" The subject line of the message.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guilabel>Specific Header</guilabel></term>\n"
-"\t <listitem><para>\n"
-" The filter can look at any header you\n"
-"\t want, even obscure or custom ones. Enter the header name\n"
-"\t in the first text box, and put your search text in the\n"
-"\t second one.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guilabel>Message Body</guilabel></term>\n"
-"\t <listitem><para>\n"
-" Search in the actual text of the message.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guilabel>Expression</guilabel></term>\n"
-"\t <listitem>\n"
-" <para>\n"
-" Enter a <glossterm linkend=\"regular-expression\">regular\n"
-"\t expression</glossterm>, and\n"
-"\t <application>Evolution</application> will search the\n"
-"\t entire message, including headers, to match it for you.\n"
-"\t </para>\n"
-" </listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guilabel>Date Sent</guilabel></term>\n"
-"\t <listitem><para> Filter messages by when they were sent:\n"
-"\t First, choose the conditions you want a message to\n"
-"\t meet&mdash; <guilabel>before</guilabel> a given time,\n"
-"\t <guilabel>after</guilabel> it, and so forth. Then, choose\n"
-"\t the time. The filter will compare the message's time-stamp\n"
-"\t to the system clock when the filter is run, or to a\n"
-"\t specific time and date you choose from a calendar. You\n"
-"\t can even have it look for messages within a range of time\n"
-"\t relative to the filter&mdash perhaps you're looking for\n"
-"\t messages less than two days old. </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guilabel>Date Recieved</guilabel></term>\n"
-"\t <listitem><para>\n"
-" This works the same way as the <guilabel>Date "
-"Sent</guilabel> \n"
-" option, except that it compares the time you got the message "
-"\n"
-" with the dates you specify.\n"
-" </para></listitem>\n"
-"\t </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guilabel>Priority</guilabel></term>\n"
-"\t <listitem><para>\n"
-" Emails have a standard priority range from -3 (least\n"
-" important) to 3 (most important). You can have filters set "
-"the\n"
-" priority of messages you recieve, and then have other filters "
-"\n"
-" applied only to those messages which have a certain "
-"priority.\n"
-" </para></listitem>\n"
-" </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guilabel>Regex Match</guilabel></term>\n"
-"\t <listitem>\n"
-" <para>\n"
-" If you know your way around a <glossterm\n"
-" \t linkend=\"regular-expression\">regex</glossterm>, or\n"
-" \t regular expression, put your knowledge to use here.\n"
-" \t </para>\n"
-" </listitem>\n"
-" </varlistentry>\n"
-"\n"
-"\t <varlistentry>\n"
-"\t <term><guilabel>Source</guilabel></term>\n"
-"\t <listitem>\n"
-" <para>\n"
-" Filter messages according the server you got them from.\n"
-" You can enter a URL or choose one from the drop-down\n"
-" list. This ability is only relevant if you use more\n"
-" than one mail source.\n"
-" </para>\n"
-" </listitem>\n"
-"\t </varlistentry>\n"
-"\t</variablelist>\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:1398
-msgid ""
-" <para>\n"
-" Then, you need to enter your email\n"
-" password. <application>Evolution</application> will remember\n"
-" your password until until you select <menuchoice>\n"
-" <guimenu>Settings</guimenu> <guimenuitem>Forget\n"
-" Passwords</guimenuitem> </menuchoice>.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:1406
-msgid ""
-" <para>\n"
-" You'll see a similar approach to sorting messages when you\n"
-" create filters and virtual folders in the next few sections.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:1411
-msgid " <title>Can't Check Mail?</title> \n"
-msgstr " <title>¿No Puede Leer su Correo?</title> \n"
-
-#: tmp/usage-mail.sgml.h:1413
-msgid ""
-" <para>\n"
-" <application>Evolution</application> email is like other email\n"
-" programs in all the ways you would hope:\n"
-" <itemizedlist>\n"
-" <listitem>\n"
-"\t <para>\n"
-"\t It can sort and organize your mail in a wide variety of ways with\n"
-"\t folders, searches, and filters.\n"
-"\t </para>\n"
-" </listitem>\n"
-" <listitem>\n"
-"\t <para>\n"
-"\t It can send and receive mail in HTML or as plain text, and\n"
-"\t permits multiple file attachments.\n"
-"\t </para>\n"
-" </listitem>\n"
-" <listitem>\n"
-"\t <para>\n"
-"\t It supports multiple mail sources, including <glossterm\n"
-"\t linkend=\"imap\">IMAP</glossterm>, <glossterm\n"
-"\t linkend=\"pop\">POP3</glossterm>, local\n"
-"\t <systemitem><filename>mbox</filename></systemitem> and\n"
-"\t <systemitem><filename>mh</filename></systemitem> files, and\n"
-"\t even NNTP messages (newsgroups), which aren't technically\n"
-"\t email.\n"
-"\t </para>\n"
-" </listitem>\n"
-" </itemizedlist>\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:1443
-msgid ""
-" <para>\n"
-" Even if you only get a few email messages a day, you probably\n"
-" want to sort and organize them. When you get a hundred a day\n"
-" and you want to refer to a message you received six weeks ago,\n"
-" you <emphasis>need</emphasis> to sort and organize them.\n"
-" Fortunately, <application>Evolution</application> has the tools\n"
-" to help you do it.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:1452
-msgid ""
-" <para>\n"
-" However, <application>Evolution</application> has some important\n"
-" differences. First, it's built to handle very large amounts of\n"
-" mail without slowing down or crashing. Both the <link\n"
-" linkend=\"usage-mail-organize-filters\">filtering</link> and <link\n"
-" linkend=\"usage-mail-organize-search\">searching</link> functions\n"
-" were built for speed and efficiency on gargantuan volumes of\n"
-" mail. There's also the <application>Evolution</application>\n"
-" <link linkend=\"usage-mail-organize-vFolders\">Virtual\n"
-" Folder</link>, an advanced organizational feature not found in\n"
-" other mail clients. If you get a lot of mail, or if you keep\n"
-" every message you get in case you need to refer to it later,\n"
-" you'll find this feature especially useful.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:1467
-msgid " <title> An Overview of the Evolution Mailer</title>\n"
-msgstr " <title> Una Vista General del Correo en Evolution</title>\n"
-
-#: tmp/usage-mail.sgml.h:1469
-msgid " <title>Organizing Your Mail</title>\n"
-msgstr " <title>Organizando Su Correo</title>\n"
-
-#: tmp/usage-mail.sgml.h:1471
-msgid " <title>Reading, Getting and Sending Mail</title>\n"
-msgstr " <title>Leyendo, Obteniendo y Enviando Correo</title>\n"
-
-#: tmp/usage-mail.sgml.h:1473
-msgid ""
-" <!-- FIXME: This needs to be in there. But the feature is temporarily\n"
-" disabled and I don't know how it will be reimplemented.\n"
-"\n"
-"\t <itemizedlist>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-"\t\t <guilabel>When mail arrives:</guilabel> Select\n"
-"\t\t this option to have messages filtered as they\n"
-"\t\t arrive.\n"
-"\t </para>\n"
-"\t </listitem>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-"\t\t <guilabel>When mail is sent:</guilabel> Select\n"
-"\t\t this option to filter your outgoing mail. You\n"
-"\t\t can use this feature to keep your\n"
-"\t\t <interface>Outbox</interface> as organized as\n"
-"\t\t your <interface>Inbox</interface>.\n"
-"\t </para>\n"
-"\t </listitem>\n"
-"\t</itemizedlist>\n"
-" </para>\n"
-"\n"
-" -->\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:1498
-msgid " <title>Evolution Mail</title>\n"
-msgstr " <title>Correo en Evolution</title>\n"
-
-#: tmp/usage-mail.sgml.h:1500
-msgid " <!-- ==============Figure=================================== -->\n"
-msgstr " <!-- ==============Figure=================================== -->\n"
-
-#: tmp/usage-mail.sgml.h:1502
-msgid ""
-" <!-- Check the alignment of the following paragraph in the PS and\n"
-" HTML output: it's indented for no good reason -->\n"
-msgstr ""
-" <!-- Check the alignment of the following paragraph in the PS and\n"
-" HTML output: it's indented for no good reason -->\n"
-
-#: tmp/usage-mail.sgml.h:1505
-msgid ""
-"<!--\n"
-"\t<sect3 id=\"usage-mail-getnsend-send-live\">\n"
-"\t <title>Live Documents</title>\n"
-"\t <para>\n"
-"\t Later versions of <application>Evolution</application>\n"
-"\t will allow you to enliven your email with almost any\n"
-"\t sort of document, and even with entire\n"
-"\t applications. At this point, however, this feature has not \n"
-"\t yet been implemented.\n"
-"\t </para>\n"
-"\t</sect3>\n"
-"-->\n"
-msgstr ""
-
-#: tmp/usage-mail.sgml.h:1518
-msgid ""
-"<!--\n"
-"<!DOCTYPE Chapter PUBLIC \"-//GNOME//DTD DocBook PNG Variant V1.1//EN\">\n"
-"-->\n"
-msgstr ""
-"<!--\n"
-"<!DOCTYPE Chapter PUBLIC \"-//GNOME//DTD DocBook PNG Variant V1.1//EN\">\n"
-"-->\n"
-
-#: tmp/usage-mail.sgml.h:1522
-msgid "<!-- ==============Figure=================================== -->\n"
-msgstr "<!-- ==============Figure=================================== -->\n"
-
-#: tmp/usage-mail.sgml.h:1524
-msgid "<!-- ==============End of Figure============================== -->\n"
-msgstr "<!-- ==============End of Figure============================== -->\n"
-
-#: tmp/usage-mail.sgml.h:1526
-msgid ""
-"<!-- ==============End of Figure=================================== -->\n"
-msgstr ""
-"<!-- ==============End of Figure=================================== -->\n"
-
-#: tmp/usage-mail.sgml.h:1528
-msgid ""
-"<!-- Function not implemented, \n"
-"possibly never will be due to security evil. -->\n"
-msgstr ""
-"<!-- Function not implemented, \n"
-"possibly never will be due to security evil. -->\n"
diff --git a/doc/es.po/usage-mainwindow.sgml.po b/doc/es.po/usage-mainwindow.sgml.po
deleted file mode 100644
index c3535e67ae..0000000000
--- a/doc/es.po/usage-mainwindow.sgml.po
+++ /dev/null
@@ -1,746 +0,0 @@
-# Translation into Spanish of Evolution docs.
-# Copyright (C) 2000 Free Software Foundation, Inc.
-# Héctor García Álvarez <hector@scouts-es.org>, 2000.
-# Héctor García Álvarez <hector@scouts-es.org>, 2001.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: evolution-docs\n"
-"POT-Creation-Date: 2001-03-21 23:37+0100\n"
-"PO-Revision-Date: 2000-12-28 15:38+0100\n"
-"Last-Translator: Héctor García Álvarez <hector@scouts-es.org>\n"
-"Language-Team: Spanish <es@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=iso-8859-1\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: tmp/usage-mainwindow.sgml.h:1
-msgid ""
-"\t <para>\n"
-" Calendars must go in calendar folders, mail in mail\n"
-"\t folders, and contacts in contact folders.\n"
-" </para>\n"
-msgstr ""
-"\t <para>\n"
-" Los calendarios deben ir en carpetas de calendarios, el "
-"correo\n"
-"\t en carpetas de correo, y los contactos en carpetas de contactos.\n"
-" </para>\n"
-
-#: tmp/usage-mainwindow.sgml.h:6
-msgid "\t <title>Folders Have Limits</title>\n"
-msgstr "\t <title>Las Carpetas Tienen Limitaciones</title>\n"
-
-#: tmp/usage-mainwindow.sgml.h:8
-msgid ""
-" <para>\n"
-" To change the way the shortcut bar looks, right-click in an\n"
-" empty space on the shortcut bar. From the menu that appears,\n"
-" you can select icon sizes.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Para cambiar el aspecto de la barra de atajos, pulse con el botón\n"
-" derecho en cualquier espacio vacío de la barra de atajos. Del "
-"menú\n"
-" que aparece, puede elegir el tamaño de los iconos.\n"
-" </para>\n"
-
-#: tmp/usage-mainwindow.sgml.h:14
-msgid ""
-" <para>\n"
-" To remove a shortcut from the shortcut bar, right-click on it\n"
-" and select <guimenuitem>Remove</guimenuitem>. To add one,\n"
-" select <menuchoice> <guimenu>File</guimenu>\n"
-" <guisubmenu>New</guisubmenu> <guimenuitem>Evolution Bar\n"
-" Shortcut</guimenuitem> </menuchoice>.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Para quitar un atajo de la barra de atajos, pulse con el botón\n"
-" derecho sobre el y seleccione <guimenuitem>Quitar</guimenuitem>.\n"
-" Para añadir uno, seleccione <menuchoice> "
-"<guimenu>Archivo</guimenu>\n"
-" <guisubmenu>Nuevo</guisubmenu> <guimenuitem>atajo de la barra de\n"
-" atajos de Evolution</guimenuitem> </menuchoice>.\n"
-" </para>\n"
-
-#: tmp/usage-mainwindow.sgml.h:22
-msgid ""
-" <para>\n"
-" You don't need the folder bar or the shortcut bar to move\n"
-" around the main window. You can use <keycap>Tab</keycap> to\n"
-" switch from one part of the window to another, and the folder\n"
-" menu on the right side of the window just below the toolbar\n"
-" to move about the folder tree.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" No necesita la barra de carpetas o la barra de atajos para moverse\n"
-" por la ventana principal. Puede usar el <keycap>Tabulador</keycap>\n"
-" para cambiar de una parte de la ventana a otra, y al menú de\n"
-" carpetas en la parte derecha de la ventana debajo de la barra de\n"
-" herramientas para moverse por el arbol de carpetas.\n"
-" </para>\n"
-
-#: tmp/usage-mainwindow.sgml.h:30
-msgid " <title>Shortcut Bar Tricks</title>\n"
-msgstr " <title>Trucos de la Barra de Atajos</title>\n"
-
-#: tmp/usage-mainwindow.sgml.h:32
-msgid ""
-" <para>\n"
-"\tGNOME 2.0 will support context-sensitive help, which means you\n"
-"\tcan almost always get help on an item by right-clicking it.\n"
-"\tIf you're not sure what something is, or don't know what you\n"
-"\tcan do with it, choosing <guimenuitem>Help</guimenuitem> from\n"
-"\tthe right-click menu is a good way to find out.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-"\tGNOME 2.0 soportará ayuda contextual, lo que significa que casi\n"
-"\tsiempre puede obtener ayuda acerca de un elemento pulsando sobre él\n"
-"\tcon el botón derecho. Si no está seguro acerca de algo, o no sabe lo\n"
-"\tlo que puede hacer con ello, eligir <guimenuitem>Ayuda</guimenuitem>\n"
-"\tdel menú del botón derecho es una buena manera de averiguarlo.\n"
-" </para>\n"
-
-#: tmp/usage-mainwindow.sgml.h:40
-msgid " <title>Context-Sensitive Help</title>\n"
-msgstr " <title>Ayuda Sensible al Contexto</title>\n"
-
-#: tmp/usage-mainwindow.sgml.h:42
-msgid ""
-" <para>\n"
-" \n"
-" A typical <guilabel>Local</guilabel> folder contains the following "
-"folders:\n"
-" <itemizedlist>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-"\t <guilabel>Calendar</guilabel>, for appointments and\n"
-"\t event listings.\n"
-"\t </para>\n"
-"\t </listitem> \n"
-"\t <listitem>\n"
-"\t <para>\n"
-"\t <guilabel>Contacts</guilabel>, for address cards.\n"
-"\t </para>\n"
-"\t </listitem>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-"\t <guilabel>Inbox</guilabel>, for incoming mail. \n"
-"\t </para>\n"
-"\t </listitem>\n"
-" <listitem>\n"
-"\t <para>\n"
-"\t <guilabel>Drafts</guilabel>, for messages you started and didn't "
-"finish.\n"
-"\t </para>\n"
-"\t </listitem>\n"
-"\t<listitem>\n"
-"\t <para>\n"
-"\t <guilabel>Sent</guilabel>, for sent mail.\n"
-"\t </para>\n"
-"\t </listitem>\n"
-"\t<listitem>\n"
-"\t <para>\n"
-"\t <guilabel>Trash</guilabel>, which is used to store\n"
-"\t messages you don't want, but keep around just in case you\n"
-"\t change your mind.\n"
-"\t </para>\n"
-"\t </listitem>\n"
-"\t<listitem>\n"
-"\t <para>\n"
-"\t <guilabel>Outbox</guilabel>, for messages you have written\n"
-"\t but not yet sent. This will be empty unless you use\n"
-"\t <application>Evolution</application> while offline.\n"
-"\t </para>\n"
-"\t </listitem>\n"
-"\n"
-" </itemizedlist>\n"
-"\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" \n"
-" Una carpeta <guilabel>Local</guilabel> típica contiene las siguientes "
-"carpetas:\n"
-" <itemizedlist>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-"\t <guilabel>Calendario</guilabel>, para citas y\n"
-"\t listas de eventos.\n"
-"\t </para>\n"
-"\t </listitem> \n"
-"\t <listitem>\n"
-"\t <para>\n"
-"\t <guilabel>Contactos</guilabel>, para tarjetas de direcciones.\n"
-"\t </para>\n"
-"\t </listitem>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-"\t <guilabel>Inbox</guilabel>, para el correo de entrada. \n"
-"\t </para>\n"
-"\t </listitem>\n"
-" <listitem>\n"
-"\t <para>\n"
-"\t <guilabel>Drafts</guilabel>, para mensajes que comenzó y no terminó.\n"
-"\t </para>\n"
-"\t </listitem>\n"
-"\t<listitem>\n"
-"\t <para>\n"
-"\t <guilabel>Sent</guilabel>, para los mensajes enviados.\n"
-"\t </para>\n"
-"\t </listitem>\n"
-"\t<listitem>\n"
-"\t <para>\n"
-"\t <guilabel>Trash</guilabel>, se usa para guardar mensajes que no\n"
-"\t quiere, pero que se deján aquí por si cambia de idea.\n"
-"\t </para>\n"
-"\t </listitem>\n"
-"\t<listitem>\n"
-"\t <para>\n"
-"\t <guilabel>Outbox</guilabel>, para mensajes que ha escrito pero no\n"
-"\t han sido enviados todavía. Estará vacía a menos que use\n"
-"\t <application>Evolution</application> mientras está desconectado.\n"
-"\t </para>\n"
-"\t </listitem>\n"
-"\n"
-" </itemizedlist>\n"
-"\n"
-" </para>\n"
-
-#: tmp/usage-mainwindow.sgml.h:91
-msgid ""
-" <para>\n"
-" <application>Evolution</application>'s most important job is\n"
-" to give you access to your information and help you use it\n"
-" quickly. One way it does that is through the\n"
-" <interface>shortcut bar</interface>, the column on the left\n"
-" hand side of the main window. The large buttons with names\n"
-" like <guilabel>Inbox</guilabel> and\n"
-" <guilabel>Contacts</guilabel> are the shortcuts, and you can\n"
-" select different groups of shortcuts by clicking the\n"
-" rectangular group buttons.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" El trabajo más importante de <application>Evolution</application> "
-"es\n"
-" darle acceso a su información y ayudarle a usarla rapidamente. Una\n"
-" de las maneras en las que hace esto es atraves de la\n"
-" <interface>barra de atajos</interface>, la columna a la izquierda "
-"de\n"
-" la ventana principal. Los botones grandes con nombres como\n"
-" <guilabel>Inbox</guilabel> y <guilabel>Contactos</guilabel> son\n"
-" los atajos, y puede seleccionar distintos grupos de atajos\n"
-" pulsando los grupos de botones rectangulares.\n"
-" </para>\n"
-
-#: tmp/usage-mainwindow.sgml.h:103
-msgid ""
-" <para>\n"
-" Take a look at the <guilabel>Evolution Shortcuts</guilabel>\n"
-" again. The shortcut buttons in that category are:\n"
-"\n"
-" <variablelist>\n"
-"\n"
-"<!-- NOT IMPLEMENTED! \n"
-"\t<varlistentry>\n"
-"\t<term> <guibutton>Today:</guibutton></term>\n"
-"\t<listitem>\n"
-"\t <para>\n"
-"\tThis will bring up a summary of any new messages you've\n"
-"\treceived, along with the tasks and appointments you have\n"
-"\tlined up for today.\n"
-" </para>\n"
-" </listitem>\n"
-" </varlistentry>\n"
-"-->\n"
-"\n"
-"\n"
-"\t<varlistentry>\n"
-"\t <term> <guibutton>Executive Summary:</guibutton></term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-"\t Start your day here. The Executive summary gives you\n"
-" lists of new or important messages, daily appointments\n"
-" and urgent tasks. You can customize its appearance and\n"
-" content, and use it to access Evolution services.\n"
-"\t </para>\n"
-"\t </listitem>\n"
-"\t</varlistentry>\n"
-"\n"
-"\n"
-"\t<varlistentry>\n"
-"\t <term> <guibutton>Inbox:</guibutton></term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-"\t Click the <guibutton>Inbox</guibutton> button to start\n"
-"\t reading your mail. Your Inbox is also where you can\n"
-"\t access Evolution's tools to filter, sort, organize, and\n"
-"\t search your mail.\n"
-"\t </para>\n"
-"\t </listitem>\n"
-"\t</varlistentry>\n"
-"\n"
-"\t<varlistentry>\n"
-"\t <term><guibutton>Calendar:</guibutton></term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-"\t The Calendar can store your appointments and To do lists\n"
-"\t for you. Connected to a network, you can use it to keep\n"
-"\t a group of people on schedule and up to date.\n"
-"\t </para>\n"
-"\t </listitem>\n"
-"\t</varlistentry>\n"
-"\n"
-" <varlistentry>\n"
-" <term><guibutton>Tasks:</guibutton></term>\n"
-"\t<listitem>\n"
-"\t <para>\n"
-"\t A full-size view of your calendar's task pad.\n"
-"\t </para>\n"
-"\t</listitem>\n"
-" </varlistentry>\n"
-"\n"
-"\t<varlistentry>\n"
-"\t <term><guibutton>Contacts:</guibutton></term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-"\t The Contact Manager holds your addresses, phone numbers,\n"
-"\t and contact information. Like calendar information,\n"
-"\t contact data can be synchronized with hand-held devices\n"
-"\t and shared over a network.\n"
-"\t </para>\n"
-"\t </listitem>\n"
-"\t</varlistentry>\n"
-"\n"
-"<!-- NOT IMPLEMENTED YET\n"
-"\n"
-"\n"
-"\t<varlistentry>\n"
-"\t <term> <guibutton>Notes:</guibutton></term>\n"
-"\t<listitem>\n"
-"\t <para> The note pad is your catch-all tool: use it to take\n"
-"\t messages from phone conversations, keep small things\n"
-"\t organized, write <glossterm linkend=\"haiku\">haiku</glossterm>, or "
-"whatever\n"
-"\t you like. This feature is not yet implemented, but will be\n"
-"\t soon. See <xref linkend=\"usage-notes\"> for more\n"
-"\t information.\n"
-"\t </para>\n"
-"\t</listitem>\n"
-"\t</varlistentry>\n"
-"-->\n"
-"\n"
-" </variablelist>\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Vuelva a echar un vistazo a los <guilabel>Atajos de\n"
-" Evolution</guilabel>. Los atajos en esa categoría son:\n"
-"\n"
-" <variablelist>\n"
-"\n"
-"<!-- ¡SIN IMPLEMENTAR! \n"
-"\t<varlistentry>\n"
-"\t<term> <guibutton>Today:</guibutton></term>\n"
-"\t<listitem>\n"
-"\t <para>\n"
-"\tThis will bring up a summary of any new messages you've\n"
-"\treceived, along with the tasks and appointments you have\n"
-"\tlined up for today.\n"
-" </para>\n"
-" </listitem>\n"
-" </varlistentry>\n"
-"-->\n"
-"\n"
-"\n"
-"\t<varlistentry>\n"
-"\t <term> <guibutton>Resumen de Trabajo:</guibutton></term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-"\t Comienze aquí su día. El resumen de trabajo le muestra la lista\n"
-" de mensajes nuevos o importantes, las citas diarias y las\n"
-" tareas urgentes. Puede personalizar su apariencia y\n"
-" contenido, y usarlo para acceder a los servicios de "
-"Evolution.\n"
-"\t </para>\n"
-"\t </listitem>\n"
-"\t</varlistentry>\n"
-"\n"
-"\n"
-"\t<varlistentry>\n"
-"\t <term> <guibutton>Inbox:</guibutton></term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-"\t Pulse el botón <guibutton>Inbox</guibutton> para comenzar a leer\n"
-"\t su correo. Su Inbox es tambien donde puede acceder a las\n"
-"\t herramientas de Evolution para filtrar, ordenar, organizar, y\n"
-"\t buscar su correo.\n"
-"\t </para>\n"
-"\t </listitem>\n"
-"\t</varlistentry>\n"
-"\n"
-"\t<varlistentry>\n"
-"\t <term><guibutton>Calendario:</guibutton></term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-"\t El calendario puede guardar sus citas y su lista de tareas por\n"
-"\t hacer. Conectado a una red, puede usarlo para mantener el horario\n"
-"\t de un grupo de personas y tenerlo al día.\n"
-"\t </para>\n"
-"\t </listitem>\n"
-"\t</varlistentry>\n"
-"\n"
-" <varlistentry>\n"
-" <term><guibutton>Tareas:</guibutton></term>\n"
-"\t<listitem>\n"
-"\t <para>\n"
-"\t Una vista a pantalla completa de la parte de tareas de su calendario\n"
-"\t </para>\n"
-"\t</listitem>\n"
-" </varlistentry>\n"
-"\n"
-"\t<varlistentry>\n"
-"\t <term><guibutton>Contactos:</guibutton></term>\n"
-"\t <listitem>\n"
-"\t <para>\n"
-"\t El Administrador de Contactos guarda su información de direcciones,\n"
-"\t números de teléfono, e información de contacto. Al igual que la\n"
-"\t información del calendario, los datos de contactos pueden\n"
-"\t sicronizarse con dispositivos de mano y ser compartidos a traves de\n"
-"\t una red.\n"
-"\t </para>\n"
-"\t </listitem>\n"
-"\t</varlistentry>\n"
-"\n"
-"<!-- NOT IMPLEMENTED YET\n"
-"\n"
-"\n"
-"\t<varlistentry>\n"
-"\t <term> <guibutton>Notes:</guibutton></term>\n"
-"\t<listitem>\n"
-"\t <para> The note pad is your catch-all tool: use it to take\n"
-"\t messages from phone conversations, keep small things\n"
-"\t organized, write <glossterm linkend=\"haiku\">haiku</glossterm>, or "
-"whatever\n"
-"\t you like. This feature is not yet implemented, but will be\n"
-"\t soon. See <xref linkend=\"usage-notes\"> for more\n"
-"\t information.\n"
-"\t </para>\n"
-"\t</listitem>\n"
-"\t</varlistentry>\n"
-"-->\n"
-"\n"
-" </variablelist>\n"
-" </para>\n"
-
-#: tmp/usage-mainwindow.sgml.h:200
-msgid ""
-" <para>\n"
-" The shortcut group buttons are <guibutton>Evolution\n"
-" Shortcuts</guibutton> and <guibutton>Internet\n"
-" Directories</guibutton>. When you click on them, they'll slide\n"
-" up and down to give you access to different sorts of shortcuts.\n"
-" When you first start <application>Evolution</application>, you\n"
-" are looking at the <guilabel>Evolution Shortcuts</guilabel>\n"
-" category. If you click <guilabel>Internet\n"
-" Directories</guilabel>, it will slide up and you'll see buttons\n"
-" for the <guilabel>Bigfoot</guilabel> and\n"
-" <guilabel>Netcenter</guilabel> directories, as well as any\n"
-" others you or your system administrator may have added. You can\n"
-" add more groups by right-clicking on the background of the\n"
-" shortcut bar and selecting <guimenuitem>Menu\n"
-" Group</guimenuitem>. Internet directories behave a lot like\n"
-" the local contact manager, which is covered in <xref\n"
-" linkend=\"usage-contact\">.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mainwindow.sgml.h:219
-msgid ""
-" <para>\n"
-" To create a new folder, select <menuchoice>\n"
-" <guimenu>File</guimenu> <guisubmenu>New</guisubmenu>\n"
-" <guimenuitem>Folder</guimenuitem></menuchoice>. You'll be asked "
-"where you want to\n"
-" put it, and what kind of folder it should be. You can choose\n"
-" from three types: <guilabel>Mail</guilabel>, for storing mail,\n"
-" <guilabel>Calendar</guilabel> for storing calendars, and\n"
-" <guilabel>Contacts</guilabel> for storing contacts.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mainwindow.sgml.h:229
-msgid ""
-" <para>\n"
-" Any time new information arrives in a folder, that folder label\n"
-" is displayed in bold text.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Cuando llega información nueva a una carpeta, el nombre de esa\n"
-" carpeta se escribe en negrita.\n"
-" </para>\n"
-
-#: tmp/usage-mainwindow.sgml.h:234
-msgid ""
-" <para>\n"
-" If you don't like the shortcut bar, you can use the folder bar\n"
-" or the menu bar to navigate the main window. Press \n"
-" <keycombo action=\"simul\">\n"
-" <keycap>Ctrl</keycap> \n"
-" <keycap>O</keycap> \n"
-" </keycombo>\n"
-" to choose from a list of folders you'd like to visit, or use the\n"
-" drop-down folder bar. You can hide and show the folder bar and\n"
-" the shortcut bar by selecting those items in the\n"
-" <guimenu>View</guimenu> menu.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mainwindow.sgml.h:247
-msgid ""
-" <para>\n"
-" Right-clicking will bring up a menu for just about anything\n"
-" in GNOME, and <application>Evolution</application> is no\n"
-" exception. If you right-click on a folder, you'll have a\n"
-" menu with the following options:\n"
-" <itemizedlist>\n"
-"\t<listitem><para><guimenuitem>FIXME</guimenuitem>, for another purpose. "
-"</para></listitem>\n"
-"\t<listitem><para><guimenuitem>Something else</guimenuitem>, for another "
-"purpose. </para></listitem>\n"
-" </itemizedlist>.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mainwindow.sgml.h:258
-msgid ""
-" <para>\n"
-" The <interface>folder bar</interface> is a more comprehensive\n"
-" way to view the information you've stored with\n"
-" <application>Evolution</application>. It displays all your\n"
-" appointments, address cards, and email in a tree that's a lot\n"
-" like a <glossterm linkend=\"filetree\">file\n"
-" tree</glossterm>&mdash; it starts small at the top, and branches\n"
-" downwards. On most computers, there will be three or four\n"
-" folders at the base. First is the <guilabel>Local</guilabel>\n"
-" folder, which holds all the <application>Evolution</application>\n"
-" data that's stored on your computer. After that come\n"
-" <guilabel>Virtual Folders</guilabel>, or virtual folders, discussed "
-"in\n"
-" <xref linkend=\"usage-mail-organize-vfolders\">, followed by any\n"
-" <glossterm linkend=\"imap\">IMAP</glossterm> mail folders you may\n"
-" have available to you over your network. Lastly, there are\n"
-" <guilabel>External Directories</guilabel>, <glossterm\n"
-" linkend=\"ldap\">LDAP</glossterm> contact directories stored on a\n"
-" network.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mainwindow.sgml.h:278
-msgid ""
-" <para>\n"
-" The <interface>menu bar</interface>'s contents will always\n"
-" provide all the possible actions for any given view of your\n"
-" data. That means that, depending on the context, menu bar items\n"
-" will change. If you're looking at your Inbox, most of the menu\n"
-" items will relate to mail; some will relate to other components\n"
-" of <application>Evolution</application> and some, especially\n"
-" those in the <guimenu>File Menu</guimenu> will relate to the\n"
-" application as a whole. The contents of the menu bar are\n"
-" described in <xref linkend=\"menuref\">.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mainwindow.sgml.h:290
-msgid ""
-" <para>\n"
-" To delete a folder, right-click it and select\n"
-" <guimenuitem>Delete</guimenuitem> from the menu that pops up.\n"
-" To change the order of folders, or put one inside another, use\n"
-" drag-and-drop. To move individual\n"
-" messages, appointments, and address cards between folders, you\n"
-" can do the same thing: drag them where you want them, and\n"
-" they'll go.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mainwindow.sgml.h:300
-msgid " <title>Navigating without the Folder Bar</title>\n"
-msgstr " <title>Navegando sin la Barra de Carpetas</title>\n"
-
-#: tmp/usage-mainwindow.sgml.h:302
-msgid " <title>The Folder Bar</title>\n"
-msgstr " <title>La Barra de Carpetas</title>\n"
-
-#: tmp/usage-mainwindow.sgml.h:304
-msgid " <title>The Menu Bar</title>\n"
-msgstr " <title>La Barra de Menú</title>\n"
-
-#: tmp/usage-mainwindow.sgml.h:306
-msgid " <title>The Shortcut Bar</title>\n"
-msgstr " <title>La Barra de Atajos</title>\n"
-
-#: tmp/usage-mainwindow.sgml.h:308
-msgid ""
-" <para>\n"
-" <variablelist>\n"
-" <varlistentry>\n"
-" <term> <guimenu>File</guimenu> Menu</term>\n"
-"\n"
-" <listitem><para> \n"
-" Anything even related to a file or to the operations\n"
-" of the application generally falls under this\n"
-" menu: creating things, saving them to disk, \n"
-" printing them, and quitting the program itself. \n"
-"\n"
-" </para></listitem>\n"
-" </varlistentry>\n"
-"\n"
-" <varlistentry>\n"
-" <term> <guimenu>Edit</guimenu> Menu </term>\n"
-" <listitem><para>\n"
-" The <guimenu>Edit</guimenu> menu holds\n"
-" useful tools that help you edit text and move it around.\n"
-" </para></listitem>\n"
-" </varlistentry>\n"
-"\n"
-" <varlistentry>\n"
-" <term> <guimenu>View</guimenu> Menu </term>\n"
-" <listitem><para>\n"
-" This menu lets you decide how "
-"<application>Evolution</application> \n"
-" should look. Some of the features control the appearance of \n"
-" <application>Evolution</application> as a whole, and others \n"
-" the way a particular kind of information appears.\n"
-" </para></listitem>\n"
-" </varlistentry>\n"
-"\n"
-" <varlistentry>\n"
-" <term> <guimenu>Settings</guimenu> Menu </term>\n"
-" <listitem><para> Tools for configuring, changing, and\n"
-" setting up go here. For mail, that means things like\n"
-" <guimenuitem>Mail Configuration</guimenuitem> and the\n"
-" <guimenuitem>Virtual Folder Editor</guimenuitem>. For the\n"
-" <interface>Calendar</interface> and the <interface>Contact\n"
-" Manager</interface>, it's color, network, and layout\n"
-" configuration. </para></listitem>\n"
-" </varlistentry>\n"
-"\n"
-" <varlistentry>\n"
-" <term> <guimenu>Help</guimenu> Menu</term>\n"
-" <listitem><para>\n"
-" Select among these items to open the \n"
-" <application>Help Browser</application> \n"
-" and read the <application>Evolution</application> manual.\n"
-" </para></listitem>\n"
-" </varlistentry>\n"
-" </variablelist>\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mainwindow.sgml.h:362
-msgid ""
-" <para>\n"
-" Once you've familiarized yourself with the <interface>main\n"
-" window</interface> you can start doing things with it. We'll\n"
-" start with your email inbox, since you've got a letter waiting\n"
-" for you already.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mainwindow.sgml.h:369
-msgid ""
-" <para>\n"
-" After <application>Evolution</application> starts\n"
-" up, you will see the <interface>main window</interface>, with the\n"
-" <interface>Inbox</interface> open. It should look a lot like the\n"
-" picture in <xref linkend=\"usage-mainwindow-fig\">. On the left of\n"
-" the <interface>main window</interface> is the <interface>shortcut\n"
-" bar</interface>, with several buttons in it. Just underneath the\n"
-" title bar is a series of menus in the <interface>menu\n"
-" bar</interface>, and below that, the <interface>tool\n"
-" bar</interface> with buttons for different functions. The largest\n"
-" part of the <interface>main window</interface> is taken up by the\n"
-" actual <interface>Inbox</interface>, where messages are listed\n"
-" and displayed. If you're running the program for the first time,\n"
-" you'll have just one message: a welcome from Ximian.\n"
-"\n"
-"\n"
-"<!-- ==============Figure=================================== -->\n"
-" <figure id=\"usage-mainwindow-fig\">\n"
-" <title>Evolution Main Window and Inbox</title>\n"
-" <screenshot>\n"
-" <screeninfo>Evolution Main Window</screeninfo>\n"
-" <graphic fileref=\"fig/mainwindow-pic\" format=\"png\" "
-"srccredit=\"Kevin Breit\">\n"
-"\t</graphic>\n"
-" </screenshot>\n"
-" </figure>\n"
-"<!-- ==============End of Figure=================================== -->\n"
-"</para>\n"
-msgstr ""
-
-#: tmp/usage-mainwindow.sgml.h:397
-msgid ""
-" <para>\n"
-" Other menus, like <guilabel>Folder</guilabel>,\n"
-" <guilabel>Message</guilabel>, and <guilabel>Actions</guilabel>,\n"
-" appear only occasionally. <guilabel>Message</guilabel> and\n"
-" <guilabel>Folder</guilabel>, for example, have commands that only\n"
-" relate to email, so they're only available when you're looking at\n"
-" email.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mainwindow.sgml.h:406
-msgid ""
-" <para>\n"
-" <note>\n"
-" <title>The Way Evolution Looks</title>\n"
-" <para>\n"
-"\tThe appearance of both <application>Evolution</application>\n"
-"\tand <application>GNOME</application> is very easy to\n"
-"\tcustomize, so your screen might not look like this picture.\n"
-"\tYou might decide to have <application>Evolution</application>\n"
-"\tstart with the calendar and a folder bar, or with the contact\n"
-"\tmanager occupying the entire window.\n"
-" </para>\n"
-" </note>\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mainwindow.sgml.h:420
-msgid ""
-" <para>\n"
-" Start <application>Evolution</application> by selecting\n"
-" <menuchoice><guimenu>Main Panel Menu</guimenu>\n"
-" <guisubmenu>Applications</guisubmenu>\n"
-" <guimenuitem>Evolution</guimenuitem></menuchoice> or by typing\n"
-" <command>evolution</command> at the command line. The first time\n"
-" you run the program, it will create a directory called\n"
-" <filename>evolution</filename> in your home directory, where it\n"
-" will keep all your <application>Evolution</application>-related\n"
-" files.\n"
-" </para>\n"
-msgstr ""
-
-#: tmp/usage-mainwindow.sgml.h:432
-msgid " <title>The Main Window: Evolution Basics</title>\n"
-msgstr ""
-" <title>La Ventana Principal: Conceptos Básicos de Evolution</title>\n"
-
-#: tmp/usage-mainwindow.sgml.h:434
-msgid ""
-"<!--\n"
-" <!DOCTYPE Chapter PUBLIC \"-//GNOME//DTD DocBook PNG Variant V1.1//EN\">\n"
-"-->\n"
-msgstr ""
-"<!--\n"
-" <!DOCTYPE Chapter PUBLIC \"-//GNOME//DTD DocBook PNG Variant V1.1//EN\">\n"
-"-->\n"
diff --git a/doc/es.po/usage-notes.sgml.po b/doc/es.po/usage-notes.sgml.po
deleted file mode 100644
index 8ac9d74ce1..0000000000
--- a/doc/es.po/usage-notes.sgml.po
+++ /dev/null
@@ -1,111 +0,0 @@
-# Translation into Spanish of Evolution docs.
-# Copyright (C) 2000 Free Software Foundation, Inc.
-# Héctor García Álvarez <hector@scouts-es.org>, 2000.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: evolution-docs\n"
-"POT-Creation-Date: 2001-03-13 16:30+0100\n"
-"PO-Revision-Date: 2000-12-28 15:38+0100\n"
-"Last-Translator: Héctor García Álvarez <hector@scouts-es.org>\n"
-"Language-Team: Spanish <es@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=iso-8859-1\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: tmp/usage-notes.sgml.h:1
-msgid ""
-" <para>\n"
-" In the dark ages before email was invented, there were little\n"
-" scraps of people which people used for short-term information\n"
-" storage. These scraps of paper were called notes. Now, notes\n"
-" are an almost necessary part of our lives, albeit in electronic\n"
-" form. It only makes sense, then, that\n"
-" <application>Evolution</application> will eventually have a\n"
-" Notes feature. <application>Evolution</application> can help\n"
-" you take notes in the following ways:\n"
-" <itemizedlist>\n"
-" <listitem>\n"
-" <para>\n"
-" Take down phone numbers, take school notes, take phone\n"
-"\t messages, or even write poetry.\n"
-" </para>\n"
-" </listitem>\n"
-" <listitem>\n"
-" <para>\n"
-" Color code notes to organize them, or just to\n"
-" make them look good.\n"
-" </para>\n"
-" </listitem>\n"
-" <listitem>\n"
-" <para>\n"
-" Turn a note into an email or a text file.\n"
-" </para>\n"
-" </listitem>\n"
-" <listitem>\n"
-" <para>\n"
-" Write <glossterm>Haiku</glossterm>\n"
-" </para>\n"
-" </listitem>\n"
-" </itemizedlist>\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" En la edad oscura antes de que el correo electrónico fuera inventado,\n"
-" habia pequeños trozos de papel que la gente usaba para guardar\n"
-" información que se necesitaba durante poco tiempo. A estos trozos de\n"
-" papel se les llamó notas. Ahora, las notas son casi una parte\n"
-" necesaria de nuestras vidas, aunque ahora en formato electrónico.\n"
-" Tiene sentido, entonces, que <application>Evolution</application>\n"
-" eventualmente tenga una función de notas.\n"
-" <application>Evolution</application> le ayuda a tomar notas de la\n"
-" siguientes formas:\n"
-" <itemizedlist>\n"
-" <listitem>\n"
-" <para>\n"
-" Apunte números de teléfono, notas de la escuela, tome notas de\n"
-"\t mensajes telefónicos, o incluso escriba poesía.\n"
-" </para>\n"
-" </listitem>\n"
-" <listitem>\n"
-" <para>\n"
-" Un código de colores para las notas pra poder organizarlas, o\n"
-" simplemente para que tengan una apariencia bonita.\n"
-" </para>\n"
-" </listitem>\n"
-" <listitem>\n"
-" <para>\n"
-" Convierta una nota en un mensaje electrónico o en un archivo de "
-"texto.\n"
-" </para>\n"
-" </listitem>\n"
-" <listitem>\n"
-" <para>\n"
-" Escriba <glossterm>Haiku</glossterm>\n"
-" </para>\n"
-" </listitem>\n"
-" </itemizedlist>\n"
-" </para>\n"
-
-#: tmp/usage-notes.sgml.h:36
-msgid " <title> An Overview of the Evolution Notes</title>\n"
-msgstr " <title> Una Vista General de las Notas de Evolution</title>\n"
-
-#: tmp/usage-notes.sgml.h:38
-msgid ""
-" <para>\n"
-" You can start writing notes by clicking\n"
-" <guibutton>Notes</guibutton> in the shortcut bar. Of course,\n"
-" it's not there yet. But when it is, it'll take you to the\n"
-" notepad.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Puede comenzar a escribir notas pulsando sobre\n"
-" <guibutton>Notas</guibutton> en la barra de atajos. Naturalmente,\n"
-" todavia no está ahí. Pero cuando esté, le llevara al editor.\n"
-" </para>\n"
-
-#: tmp/usage-notes.sgml.h:45
-msgid " <title>Evolution Notes</title>\n"
-msgstr " <title>Notas de Evolution</title>\n"
diff --git a/doc/es.po/usage-print.sgml.po b/doc/es.po/usage-print.sgml.po
deleted file mode 100644
index 3637daac35..0000000000
--- a/doc/es.po/usage-print.sgml.po
+++ /dev/null
@@ -1,196 +0,0 @@
-# Translation into Spanish of Evolution docs.
-# Copyright (C) 2000 Free Software Foundation, Inc.
-# Héctor García Álvarez <hector@scouts-es.org>, 2000.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: evolution-docs\n"
-"POT-Creation-Date: 2001-03-13 16:30+0100\n"
-"PO-Revision-Date: 2000-12-28 15:38+0100\n"
-"Last-Translator: Héctor García Álvarez <hector@scouts-es.org>\n"
-"Language-Team: Spanish <es@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=iso-8859-1\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: tmp/usage-print.sgml.h:1
-msgid "\t <title>Choosing a Printer</title>\n"
-msgstr "\t <title>Eligiendo una Impresora</title>\n"
-
-#: tmp/usage-print.sgml.h:3
-msgid "\t <title>Print Preview</title>\n"
-msgstr "\t <title>Vista Previa de la Impresión</title>\n"
-
-#: tmp/usage-print.sgml.h:5
-msgid ""
-" <para>\n"
-" The printer selection window, shown in <xref\n"
-" linkend=\"print-dest\">, lets you choose the format for\n"
-" printing&mdash; at this time, only <guilabel>Generic\n"
-" Postscript</guilabel> is available&mdash; and whether to print\n"
-" to a file or to an actual printer. If you choose a printer,\n"
-" you'll be asked for the printer command (probably\n"
-" <guilabel>lpr</guilabel>) which your system uses. If you\n"
-" choose to print to a file, you'll need to decide upon a\n"
-" filename. And of course, you'll want to choose a number of\n"
-" copies, and whether to collate them.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" La ventana de selección de impresora, mostrada en <xref\n"
-" linkend=\"print-dest\">, le permite elegir el formato de\n"
-" impresión&mdash; en estos momentos, solo está disponible\n"
-" <guilabel>Postscript Genérico</guilabel>&mdash; y si imprimir a un\n"
-" archivo o a una impresora. Si elige una impresora,\n"
-" le pedirá el comando que use su sistema para la impresora\n"
-" (probablemente <guilabel>lpr</guilabel>). Si decide imprimir en un\n"
-" archivo, debe decidir el nombre. Y naturalmente, debe decidor el\n"
-" número de copias, y si deben ir o no intercaladas.\n"
-" </para>\n"
-
-#: tmp/usage-print.sgml.h:18
-msgid ""
-" <para>\n"
-" <guibutton>Print Preview</guibutton> appears both as a button in\n"
-" the printing dialog and as an item in the\n"
-" <guimenu>File</guimenu> menu. In both places, it does the same\n"
-" thing: it opens a new window that shows you what would happen if\n"
-" you were to print the current message, calendar, appointment, or\n"
-" address card.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" <guibutton>Vista Previa</guibutton> aparece como un botón en\n"
-" el diálogo de impresión y como una opción en el menú\n"
-" <guimenu>Archivo</guimenu>. En ambos sitios, hace lo mismo:\n"
-" abre una nueva ventana que le muestra que pasaría si imprimiese\n"
-" el mensaje, el calendario, la cita, o la tarjeta de actual.\n"
-" </para>\n"
-
-#: tmp/usage-print.sgml.h:27
-msgid ""
-" <para>\n"
-" That window allows you to select which pages you want to see,\n"
-" and how close you'd like to look at them. Zoom in or out, fit\n"
-" the page to the window (the <guibutton>Fit</guibutton> button)\n"
-" or match the width of the page and the window (the\n"
-" <guibutton>Fit Width</guibutton> button). None of these buttons\n"
-" changes the way the page will be printed, but they do let you\n"
-" get a better look. If you're satisfied with the way the things\n"
-" look, click <guibutton>Print</guibutton> to send your document\n"
-" on its way. If you'd like to change it, just close the\n"
-" <guilabel>Print Preview</guilabel> window and make the changes\n"
-" you want from the Mail, Calendar, or Contact Manager.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Esa ventana le permite sleccionar que páginas quiere ver,\n"
-" y como de cerca quiere verlas. Aumentar o disminuir el zoom,\n"
-" ajustar la página a la ventana (el botón "
-"<guibutton>Ajustar</guibutton>)\n"
-" o igualar el ancho del papel con el de la ventana (el botón\n"
-" <guibutton>Ajustar Ancho</guibutton>). Ninguno de estos botones\n"
-" modifica la manera en que se imprimen las páginas, pero le permiten\n"
-" verlas mejor. Si está satisfecho con el aspecto que tienen, pulse\n"
-" <guibutton>Imprimir</guibutton> para enviar su documento a su "
-"destino.\n"
-" Si quisiera cambiarlo, cierre la ventana de la\n"
-" <guilabel>Vista Previa</guilabel> y haga los cambios que quiera\n"
-" en el Correo, el Calendario, o el Administrador de Contactos.\n"
-" </para>\n"
-
-#: tmp/usage-print.sgml.h:41
-msgid ""
-" <para>\n"
-" When you're ready, click <guibutton>Print</guibutton> to print,\n"
-" <guibutton>Preview</guibutton> to have a look (or another look)\n"
-" at the preview, or <guibutton>Cancel</guibutton> to cancel the\n"
-" whole deal.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Cuando este listo, pulse <guibutton>Imprimir</guibutton> para "
-"imprimir,\n"
-" <guibutton>Vista Previa</guibutton> para echar un vistazo (u otro más)\n"
-" a la vista previa, o <guibutton>Cancelar</guibutton> para cancelarlo\n"
-" todo.\n"
-" </para>\n"
-
-#: tmp/usage-print.sgml.h:48
-msgid " <title>File or Printer?</title>\n"
-msgstr " <title>¿Archivo o Impresora?</title>\n"
-
-#: tmp/usage-print.sgml.h:50
-msgid " <title>Print Preview</title>\n"
-msgstr " <title>Vista Previa de la Impresión</title>\n"
-
-#: tmp/usage-print.sgml.h:52
-msgid ""
-" <para>\n"
-" If you're printing a message that's more than one page, you'll\n"
-" have the option of choosing which pages to print. If you're\n"
-" printing a calendar entry, you can decide what range of dates to\n"
-" print. And, if you're printing contact cards, you can decide\n"
-" whether to print only the selected cards, or all of them.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Si está imprimiendo un mensaje que ocupa más de una página, tiene la\n"
-" opción de elegir que páginas imprimir. Si está imprimiendo las\n"
-" entradas de un calendario, puede decidir el rango de fechas a "
-"imprimir.\n"
-" Y, si está imprimiendo tarjetas, puede decidir si imprimir solo las\n"
-" seleccionadas, o todas ellas.\n"
-" </para>\n"
-
-#: tmp/usage-print.sgml.h:60
-msgid " <!-- ==============Figure=================================== -->\n"
-msgstr " <!-- ==============Figure=================================== -->\n"
-
-#: tmp/usage-print.sgml.h:62
-msgid "<!-- ==============End of Figure============================== -->\n"
-msgstr "<!-- ==============End of Figure============================== -->\n"
-
-#: tmp/usage-print.sgml.h:64
-msgid ""
-"<para>\n"
-" This is a very short chapter, because printing with\n"
-" <application>Evolution</application> is not a complex task. Like\n"
-" most GNOME applications, <application>Evolution</application> uses\n"
-" the gnome-print system, so if you've used any other GNOME\n"
-" application to print, you should be able to print from\n"
-" <application>Evolution</application> immediately.\n"
-"</para>\n"
-msgstr ""
-"<para>\n"
-" Este es un capítulo muy corto, porque imprimir con\n"
-" <application>Evolution</application> no es unatarea complicada. Como\n"
-" la mayoría de las aplicaciones GNOME, "
-"<application>Evolution</application>\n"
-" usa el sistema gnome-print, así que si ha usado otra aplicación GNOME\n"
-" para imprimir, debería sera capaz de imprimir inmeditamente en\n"
-" <application>Evolution</application>.\n"
-"</para>\n"
-
-#: tmp/usage-print.sgml.h:73
-msgid ""
-"<para>\n"
-" Whether you're printing a message, a calendar page, or a selection\n"
-" of address cards, you can choose to print directly to a printer, or\n"
-" save the print output to a postscript file. You can also use the\n"
-" preview feature to see how your printed output will look.\n"
-"</para>\n"
-msgstr ""
-"<para>\n"
-" Tanto si esta imprimiendo un mensaje, una pagina del calendario, o una\n"
-" selección de tarjetas de visita, puede elegir entre imprimirlo "
-"directamente\n"
-" en la impresora, o guardar la salida de la impresión en un archivo\n"
-" postscript. También puede usar la característica de vista previa para "
-"ver\n"
-" como será la salida.\n"
-"</para>\n"
-
-#: tmp/usage-print.sgml.h:80
-msgid "<title>Printing with Evolution</title>\n"
-msgstr "<title>Imprimiendo con Evolution</title>\n"
diff --git a/doc/es.po/usage-sync.sgml.po b/doc/es.po/usage-sync.sgml.po
deleted file mode 100644
index f5331ad6ea..0000000000
--- a/doc/es.po/usage-sync.sgml.po
+++ /dev/null
@@ -1,60 +0,0 @@
-# Translation into Spanish of Evolution docs.
-# Copyright (C) 2000 Free Software Foundation, Inc.
-# Héctor García Álvarez <hector@scouts-es.org>, 2000.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: evolution-docs\n"
-"POT-Creation-Date: 2001-03-13 16:30+0100\n"
-"PO-Revision-Date: 2000-12-28 15:38+0100\n"
-"Last-Translator: Héctor García Álvarez <hector@scouts-es.org>\n"
-"Language-Team: Spanish <es@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=iso-8859-1\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: tmp/usage-sync.sgml.h:1
-msgid ""
-" <para>\n"
-" Put your hand-held device on its cradle and press the\n"
-" HotSync button.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Ponga su dispositivo de mano en su cuna y apriete el botón\n"
-" de sincronización.\n"
-" </para>\n"
-
-#: tmp/usage-sync.sgml.h:6
-msgid ""
-" <para>\n"
-" No, really. That's all there is to it.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" No, de verdad. Esto es todo lo que hay que hacer.\n"
-" </para>\n"
-
-#: tmp/usage-sync.sgml.h:10
-msgid " <title>Using HotSync</title>\n"
-msgstr " <title>Usando la Sincronización</title>\n"
-
-#: tmp/usage-sync.sgml.h:12
-msgid ""
-" <para>\n"
-" This chapter covers is how to synchronize data \n"
-" installed and configured. If you need information on how to\n"
-" set up a synchronization system, consult <xref\n"
-" linkend=\"config-sync\">.\n"
-" </para>\n"
-msgstr ""
-" <para>\n"
-" Este capítulo cubre como sincronizar datos una vez instalado y \n"
-" configurado. Si necesita información sobre como preparar un\n"
-" sistema de sincronización, consulte <xref\n"
-" linkend=\"config-sync\">.\n"
-" </para>\n"
-
-#: tmp/usage-sync.sgml.h:19
-msgid " <title>Synchronizing with a Hand-held Device</title>\n"
-msgstr " <title>Sincronizando con un Dispositivo de mano</title>\n"
diff --git a/doc/es/Makefile.in b/doc/es/Makefile.in
deleted file mode 100644
index dee738f8c3..0000000000
--- a/doc/es/Makefile.in
+++ /dev/null
@@ -1,321 +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@
-AS = @AS@
-BONOBO_GNOME_CFLAGS = @BONOBO_GNOME_CFLAGS@
-BONOBO_GNOME_LIBS = @BONOBO_GNOME_LIBS@
-BONOBO_HTML_GNOME_CFLAGS = @BONOBO_HTML_GNOME_CFLAGS@
-BONOBO_HTML_GNOME_LIBS = @BONOBO_HTML_GNOME_LIBS@
-BONOBO_VFS_GNOME_CFLAGS = @BONOBO_VFS_GNOME_CFLAGS@
-BONOBO_VFS_GNOME_LIBS = @BONOBO_VFS_GNOME_LIBS@
-CAPPLET_LIBS = @CAPPLET_LIBS@
-CATALOGS = @CATALOGS@
-CATOBJEXT = @CATOBJEXT@
-CC = @CC@
-CPP = @CPP@
-DATADIRNAME = @DATADIRNAME@
-DLLTOOL = @DLLTOOL@
-EVOLUTION_DIR = @EVOLUTION_DIR@
-EXTRA_GNOME_CFLAGS = @EXTRA_GNOME_CFLAGS@
-EXTRA_GNOME_LIBS = @EXTRA_GNOME_LIBS@
-GENCAT = @GENCAT@
-GLIB_CFLAGS = @GLIB_CFLAGS@
-GLIB_LIBS = @GLIB_LIBS@
-GMOFILES = @GMOFILES@
-GMSGFMT = @GMSGFMT@
-GNOMEGNORBA_LIBS = @GNOMEGNORBA_LIBS@
-GNOMEUI_LIBS = @GNOMEUI_LIBS@
-GNOME_APPLETS_LIBS = @GNOME_APPLETS_LIBS@
-GNOME_CAPPLET_LIBS = @GNOME_CAPPLET_LIBS@
-GNOME_CONFIG = @GNOME_CONFIG@
-GNOME_DOCKLETS_LIBS = @GNOME_DOCKLETS_LIBS@
-GNOME_INCLUDEDIR = @GNOME_INCLUDEDIR@
-GNOME_LIBDIR = @GNOME_LIBDIR@
-GNOME_LIBS = @GNOME_LIBS@
-GNOME_PILOT_CFLAGS = @GNOME_PILOT_CFLAGS@
-GNOME_PILOT_LIBS = @GNOME_PILOT_LIBS@
-GNOME_PRINT_CFLAGS = @GNOME_PRINT_CFLAGS@
-GNOME_PRINT_LIBS = @GNOME_PRINT_LIBS@
-GNOME_VFS_CFLAGS = @GNOME_VFS_CFLAGS@
-GNOME_VFS_LIBS = @GNOME_VFS_LIBS@
-GNOME_XML_CFLAGS = @GNOME_XML_CFLAGS@
-GNOME_XML_LIB = @GNOME_XML_LIB@
-GNORBA_CFLAGS = @GNORBA_CFLAGS@
-GNORBA_LIBS = @GNORBA_LIBS@
-GPG = @GPG@
-GTKDOC = @GTKDOC@
-GTKHTML_CFLAGS = @GTKHTML_CFLAGS@
-GTKHTML_LIBS = @GTKHTML_LIBS@
-GTKXMHTML_LIBS = @GTKXMHTML_LIBS@
-GTK_CFLAGS = @GTK_CFLAGS@
-GTK_CONFIG = @GTK_CONFIG@
-GTK_HTML_EDITOR_IDL = @GTK_HTML_EDITOR_IDL@
-GTK_LIBS = @GTK_LIBS@
-GT_NO = @GT_NO@
-GT_YES = @GT_YES@
-HAVE_GTK_DOC = @HAVE_GTK_DOC@
-INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
-INSTOBJEXT = @INSTOBJEXT@
-INTLDEPS = @INTLDEPS@
-INTLLIBS = @INTLLIBS@
-INTLOBJS = @INTLOBJS@
-KRB4_CFLAGS = @KRB4_CFLAGS@
-KRB4_LDFLAGS = @KRB4_LDFLAGS@
-KRB5_CFLAGS = @KRB5_CFLAGS@
-KRB5_LDFLAGS = @KRB5_LDFLAGS@
-LDAP_LIBS = @LDAP_LIBS@
-LEX = @LEX@
-LIBTOOL = @LIBTOOL@
-LN_S = @LN_S@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-MKINSTALLDIRS = @MKINSTALLDIRS@
-OAF_CFLAGS = @OAF_CFLAGS@
-OAF_CONFIG = @OAF_CONFIG@
-OAF_LIBS = @OAF_LIBS@
-OBJDUMP = @OBJDUMP@
-ORBIT_CFLAGS = @ORBIT_CFLAGS@
-ORBIT_CONFIG = @ORBIT_CONFIG@
-ORBIT_IDL = @ORBIT_IDL@
-ORBIT_LIBS = @ORBIT_LIBS@
-PACKAGE = @PACKAGE@
-PGP = @PGP@
-PGP5 = @PGP5@
-PILOT_BINS = @PILOT_BINS@
-PILOT_LIBS = @PILOT_LIBS@
-PISOCK_INCLUDEDIR = @PISOCK_INCLUDEDIR@
-PISOCK_LIBDIR = @PISOCK_LIBDIR@
-PISOCK_LIBS = @PISOCK_LIBS@
-POFILES = @POFILES@
-POSUB = @POSUB@
-PTHREAD_LIB = @PTHREAD_LIB@
-PURIFY = @PURIFY@
-RANLIB = @RANLIB@
-SENDMAIL = @SENDMAIL@
-THREADS_CFLAGS = @THREADS_CFLAGS@
-THREADS_LIBS = @THREADS_LIBS@
-UNICODE_CFLAGS = @UNICODE_CFLAGS@
-UNICODE_LIBS = @UNICODE_LIBS@
-USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
-USE_NLS = @USE_NLS@
-VERSION = @VERSION@
-XPM_LIBS = @XPM_LIBS@
-YACC = @YACC@
-ZVT_LIBS = @ZVT_LIBS@
-cflags_set = @cflags_set@
-cxxflags_set = @cxxflags_set@
-l = @l@
-localedir = @localedir@
-
-evolution_helpdir = $(datadir)/gnome/help/evolution/C
-
-SGML_FILES = apx-authors.sgml apx-bugs.sgml apx-fdl.sgml apx-gloss.sgml config-prefs.sgml config-setupassist.sgml config-sync.sgml evolution-guide.sgml preface.sgml usage-calendar.sgml usage-contact.sgml usage-mail.sgml usage-mainwindow.sgml usage-sync.sgml
-
-
-EXTRA_DIST = $(SGML_FILES)
-
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = ../../config.h
-CONFIG_CLEAN_FILES =
-DIST_COMMON = Makefile.am Makefile.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = tar
-GZIP_ENV = --best
-all: all-redirect
-.SUFFIXES:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/C/Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
- cd $(top_builddir) \
- && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-tags: TAGS
-TAGS:
-
-
-distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
-
-subdir = doc/C
-
-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 doc/C/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
- $(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-hook
-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-local
-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
-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-generic
-
-mostlyclean: mostlyclean-am
-
-clean-am: clean-generic mostlyclean-am
-
-clean: clean-am
-
-distclean-am: distclean-generic clean-am
- -rm -f libtool
-
-distclean: distclean-am
-
-maintainer-clean-am: 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: tags distdir info-am info dvi-am dvi check check-am \
-installcheck-am installcheck install-exec-am install-exec \
-install-data-local 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
-
-
-all: evolution-guide
-
-evolution-guide: $(SGML_FILES)
- -db2html evolution-guide.sgml
-
-dist-hook:
- mkdir $(distdir)/evolution-guide
- -cp evolution-guide/*.html evolution-guide/*.css $(distdir)/evolution-guide
- mkdir $(distdir)/fig
- -cp fig/*.png $(distdir)/fig
- mkdir $(distdir)/evolution-guide/stylesheet-images
- -cp evolution-guide/stylesheet-images/* $(distdir)/evolution-guide/stylesheet-images
-
-install-data-local: evolution-guide
- $(top_srcdir)/mkinstalldirs $(DESTDIR)$(evolution_helpdir)
- -for file in $(srcdir)/evolution-guide/*.html $(srcdir)/evolution-guide/*.css; do \
- basefile=`basename $$file`; \
- $(INSTALL_DATA) $$file $(DESTDIR)$(evolution_helpdir)/$$basefile; \
- done
-
- $(top_srcdir)/mkinstalldirs $(DESTDIR)$(evolution_helpdir)/fig
- -for file in $(srcdir)/fig/*.png; do \
- basefile=`basename $$file`; \
- $(INSTALL_DATA) $$file $(DESTDIR)$(evolution_helpdir)/fig/$$basefile; \
- done
-
- $(top_srcdir)/mkinstalldirs $(DESTDIR)$(evolution_helpdir)/stylesheet-images
- -for file in $(srcdir)/evolution-guide/stylesheet-images/*; do \
- basefile=`basename $$file`; \
- $(INSTALL_DATA) $$file $(DESTDIR)$(evolution_helpdir)/stylesheet-images/$$basefile; \
- done
-
-evolution.ps: evolution.sgml
- -db2ps $<
-
-evolution.rtf: evolution.sgml
- -db2rtf $<
-
-# 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/doc/es/apx-authors.sgml b/doc/es/apx-authors.sgml
deleted file mode 100644
index 8af980555f..0000000000
--- a/doc/es/apx-authors.sgml
+++ /dev/null
@@ -1,75 +0,0 @@
- <appendix id="authors">
- <title>Autores</title>
- <para>
- <application>Evolution</application> ha sido escrita por:
-<simplelist>
- <member>Seth Alves: <email>alves@helixcode.com</email></member>
- <member>Anders Carlsson: <email>andersca@gnu.org</email></member>
- <member>Damon Chaplin: <email>damon@helixcode.com</email></member>
- <member>Clifford R. Conover: <email>rusty@zootweb.com</email></member>
- <member>Miguel De Icaza: <email>miguel@helixcode.com</email></member>
- <member> Radek Doulik: <email>rodo@helixcode.com</email></member>
- <member>Arturo Espinoza: <email>arturo@nucleu.unam.mx</email></member>
- <member>Larry Ewing: <email>lewing@helixcode.com</email></member>
- <member>Bertrand Guiheneuf: <email>bertrand@helixcode.com</email></member>
- <member>Tuomas Kuosmanen: <email>tigert@gimp.org</email></member>
- <member>Christopher J. Lahey: <email>clahey@helixcode.com</email></member>
- <member>Matthew Loper: <email>matt@loper.org</email></member>
- <member>Federico Mena: <email>federico@helixcode.com</email></member>
- <member>Eskil Heyn Olsen: <email>deity@eski.dk</email></member>
- <member>Nat Friedman: <email>nat@helixcode.com</email></member>
- <member>Ettore Perazzoli: <email>ettore@helixcode.com</email></member>
- <member>Jeffrey Stedfast: <email>jeff@helixcode.com</email></member>
- <member>Russell Steinthal: <email>rms39@columbia.edu</email></member>
- <member>Peter Teichman: <email>peter@helixcode.com</email></member>
- <member>Chris Toshok: <email>toshok@helixcode.com</email></member>
- <member>Peter Williams: <email>peter@newton.cx</email></member>
- <member>Dan Winship: <email>danw@helixcode.com</email></member>
- <member>Michael Zucchi: <email>notzed@helixcode.com</email></member>
-</simplelist>
-y otros dedicados programadores de GNOME.
-</para>
- <para>
- El código de <application>Evolution</application> debe mucho a las
- aplicaciones <application>GNOME-pim</application> y
- <application>GNOME-Calendar</application>, y a
- <application>KHTMLW</application>. Los desarrolladores de
- <application>Evolution</application> reconocen los esfuerzos y
- contribuciones de todos los que ha trabajado en dichos proyectos.
- </para>
-
- <para>
- Para más información por favor visite la
- <ulink url="http://www.helixcode.com/apps/evolution.php3"
- type="http">página web</ulink> de <application>Evolution
- </application>. Por favor envíe todos los comentarios,
- sugerencias, y reportes de fallo al <ulink
- url="http://bugs.gnome.org" type="http">sistema de seguimiento de
- fallos de GNOME</ulink>. Las instrucciones para hacer reportes de
- fallos se pueden encontrar en línea en <ulink
- url="http://bugs.gnome.org/Reporting.html" type="http">
- http://bugs.gnome.org/Reporting.html</ulink>. También puede usar el
- comando <command>bug-buddy</command> para enviar reportes de fallo.
- </para>
- <para>
- Este manual ha sido escrito por Aaron Weber
- (<email>aaron@helixcode.com</email>) y Kevin Breit
- (<email>battery841@mypad.com</email>) con la ayuda de los
- programadores de la aplicación y el proyecto de documentación de
- GNOME. Por favor envíe todos sus comentarios y sugerencias acerca de
- este manual al proyecto de documentación de GNOME a
- <email>docs@gnome.org</email>. También puede enviar comentarios a
- del web usando la <ulink type="http"
- url="http://www.gnome.org/gdp/doctable/">Tabla de Estado de la
- Documentación de GNOME</ulink> (está en ingles).
- </para>
- <para> Traducción al español realizada por
- Héctor García Álvarez (<email>hector@scouts-es.org</email>).
- Por favor envíe todos los comentarios y sugerencias sobre esta
- traducción a <email>hector@debian.org</email>. </para>
- </appendix>
-
-
-
-
-
diff --git a/doc/es/apx-bugs.sgml b/doc/es/apx-bugs.sgml
deleted file mode 100644
index 544387481e..0000000000
--- a/doc/es/apx-bugs.sgml
+++ /dev/null
@@ -1,23 +0,0 @@
- <appendix id="bugs">
-
- <title>Errores y limitaciones conocidas</title>
- <abstract>
- <para>
- Este apéndice describe errores y limitaciones conocidas de
- <application>Evolution</application>. Por favor use la
- <application>Herramienta de reporte de fallos</application> de GNOME
- (<command>bug-buddy</command> en la línea de comandos) si encuentra
- algún error que no este en esta lista.
- </para>
- </abstract>
-
- <para>
- Evolution todavía es software en fase beta, así que el seguimiento
- de errores es mejor dejárselo al sistema bugzilla y a los
- programadores. Eso sí, hay cierto número de limitaciones que
- no serán corregidas antes de la versión 1.0. Las más notables son:
- Importación de los archivos .pst de Microsoft Outlook, y la
- compatibilidad con el protocolo de Microsoft Exchange.
- </para>
- </appendix>
-
diff --git a/doc/es/apx-gloss.sgml b/doc/es/apx-gloss.sgml
deleted file mode 100644
index dd7c1b50e1..0000000000
--- a/doc/es/apx-gloss.sgml
+++ /dev/null
@@ -1,462 +0,0 @@
-<glossary id="apx-gloss">
-
- <title>Glosario</title>
-
- <glossentry id="attachment">
- <glossterm>Adjunto</glossterm>
- <glossdef>
- <para>
- Cualquier archivo enviado junto con el mensaje de correo. Los adjuntos
- pueden estar insertados dentro del mensaje o añadidos a el.
- </para>
- </glossdef>
- </glossentry>
-
-<glossentry id="automatic-indexing">
- <glossterm>Indexado Automático</glossterm>
- <glossdef>
- <para>
- El procedimiento de pre-ordenado que permite a
- <application>Evolution</application> encontrar la información
- rápidamente. Permite búsquedas más rápidas y disminuye el uso de la
- memoria para mostrar datos.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="bcc">
- <glossterm>Cco (Con Copia Oculta)</glossterm>
- <glossdef>
- <para>
- Una manera de dirigir un mensaje. Bcc es usado para enviar un mensaje
- a un grupo de personas, a la vez que se ocultan los nombres y
- direcciones de unos a los otros.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="cc">
- <glossterm>Cc (Con Copia)</glossterm>
- <glossdef>
- <para>
- Con-Copia es usado para enviar una copia del mensaje a una 3º persona,
- para que puedan enterarse de la conversación, sin estar en la lista de
- A:
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="conduit">
- <glossterm>Enlaze</glossterm>
- <glossdef>
- <para>
- Un enlaze de sincronización es una pequeña aplicación que controla la
- transferencia de información entre un dispositivo de mano y un
- ordenador.
- </para>
- </glossdef>
- </glossentry>
-
-
- <glossentry id="druid">
- <glossterm>Ayudante</glossterm>
- <glossdef>
- <para>
- Una herramienta que guía al usuario a través de una serie de pasos,
- normalmente para configurar un programa. Equivalente a "Asistente"
- y "Wizard".
- </para>
- </glossdef>
- </glossentry>
-
-<glossentry id="emoticon">
- <glossterm>Emoticon</glossterm>
- <glossdef>
- <para>
- También llamados "smileys", los emoticones son pequeñas caras puestas
- de lado echas de puntos y paréntesis que la gente usa para expresar
- emociones en los correos electrónicos. Ejemplos: :-) ó ;( .
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="evolution">
- <glossterm>Evolution</glossterm>
- <glossdef>
- <para>
- <application>Evolution</application> es la aplicación de trabajo en
- grupo de <acronym>GNOME</acronym>.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="execute">
- <glossterm>Ejecutar</glossterm>
- <glossdef>
- <para>
- Para ejecutar un programa. Cualquier archivo que se puede ejecutar
- se llama ejecutable. <application>Evolution</application> puede
- descargar ejecutables adjuntos, pero antes de poder ejecutarlos, el
- archivo debe ser marcado como ejecutable a través de una shell o un
- administrador de archivos. Esta precaución de seguridad previene contra
- la ejecución automática o accidental de programas maliciosos. Para más
- información acerca de archivos ejecutables y permisos de archivos,
- consulte la documentación de su administrador de archivos o de su shell.
- </para>
- </glossdef>
- </glossentry>
-
-
- <glossentry id="filetree">
- <glossterm>Árbol de Archivos</glossterm>
- <glossdef>
- <para>
- Un forma de describir un conjunto de archivos en un ordenador. Con
- la especial perversión de la típica nomenclatura de ordenadores
- (y especialmente en Unix y Linux), la parte más alta del árbol se
- llama el directorio raíz, y se denota por <systemitem><filename>/
- </filename></systemitem>. El resto de las "ramas" se extienden
- desde la raíz. No confundir el directorio raíz (root en ingles) con
- la cuenta <systemitem>root</systemitem>, o con el directorio del
- usuario root, <systemitem><filename>/home/root</filename></systemitem>.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="filter">
- <glossterm>Filtro</glossterm>
- <glossdef>
- <para>
- Dentro de <application>Evolution</application>, un filtro es un método
- para ordenar el correo automáticamente. Puede crear filtros para
- realizar una o más acciones sobre un mensaje que cumple alguno (o todos)
- de los requisitos de un amplio rango de criterios.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="forward">
- <glossterm>Reenviar</glossterm>
- <glossdef>
- <para>
- el usuario puede enviar un mensaje a una tercera persona que originalmente le fue enviado a el.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="groupware">
- <glossterm>Trabajo en Grupo</glossterm>
- <glossdef>
- <para>
- Trabajo en Grupo es un término que describe la aplicación que ayuda a
- grupos de persones a trabajar juntas. Típicamente, esta aplicación
- varias herramientas de productividad integradas en un mismo programa.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="haiku">
- <glossterm>Haiku</glossterm>
- <glossdef>
- <para>
- Una forma de poesía tradicional japonesa. Los poemas son de tres
- líneas, donde la primera y la última tienen cinco sílabas, y la
- segunda línea tiene siete sílabas.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="html">
- <glossterm>HTML</glossterm>
- <glossdef>
- <para>
- Lenguaje de Marcas de Hyper-texto (<acronym>HTML</acronym>) es un
- lenguaje para describir la forma de la página en documentos electrónicos
- como páginas web, archivos de ayuda, y mensajes de correo. El HTML se
- puede usar en el correo electrónico y en los grupos de noticias para
- insertar imágenes o formatear el texto
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="hot-key">
- <glossterm>Tecla Rápida</glossterm>
- <glossdef>
- <para>
- Teclas rápidas son combinaciones de teclado usadas para realizar
- acciones en el ordenador en lugar de usar el ratón para la misma
- acción. Las teclas rápidas pueden acelerar el uso del ordenador.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="ical">
- <glossterm>iCal</glossterm>
- <glossdef>
- <para>
- <application>iCal</application> es el programa que usa
- <application>Evolution</application> para manejar la sección del
- calendario.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="imap">
- <glossterm>IMAP</glossterm>
- <glossdef>
- <para>
- Dependiendo a quien pregunte, IMAP significa Protocolo de Acceso al
- Correo de Internet, o Protocolo de Acceso a Correo Interinamente.
- Lo que sea que signifique, permite acceder al correo que está
- típicamente (aunque no siempre) guardado remotamente en el servidor en
- lugar de en el disco duro local. Algunas veces contrasta con
- <glossterm>POP</glossterm>.
- Esto no estará en la prueba.
- </para>
- </glossdef>
- </glossentry>
-
-
- <glossentry id="inline">
- <glossterm>En línea</glossterm>
- <glossdef>
- <para>
- Mostrados como para de una mensaje u otro documento, en lugar de
- incluido como un archivo separado. Contrasta con <glossterm
- linkend="attachment">Adjunto</glossterm>.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="ldap">
- <glossterm>LDAP</glossterm>
- <glossdef>
- <para>
- LDAP, el Protocolo Ligero de Acceso a Directorio, permite a un cliente
- buscar en una gran base de datos de direcciones, números de teléfono y
- y personas que se encuentra en un servidor.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="mail-client">
- <glossterm>Cliente de Correo</glossterm>
- <glossdef>
- <para>
- Un cliente de correo es la aplicación con la que una persona lee y
- envía correos electrónicos. En el otro lado están los distintos tipos
- de servidores de correo, que se encargan de autentificar al usuario
- y dirigir los mensajes desde el remitente hasta el destinatario.
- </para>
- </glossdef>
- </glossentry>
-
-
- <glossentry id="minicard">
- <glossterm>Minitarjeta</glossterm>
- <glossdef>
- <para>
- Un formato para mostrar la información de contacto. Similar en
- apariencia a una pequeña tarjeta de visita.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="nautilus">
- <glossterm>Nautilus</glossterm>
- <glossdef>
- <para>
- <application>Nautilus</application> es la próxima generación del
- gestor de archivos de <acronym>GNOME</acronym> que está desarrollando
- la compañía Eazel.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="nickname">
- <glossterm>Apodo</glossterm>
- <glossdef>
- <para>
- Un alias para una dirección de correo electrónico.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="pop">
- <glossterm>POP</glossterm>
- <glossdef>
- <para>
- POP, el Protocolo de Oficina de Correos, es un mecanismo para el
- transporte de correo. En contraste con IMAP, solo se usa para obtener
- el correo del servidor y almacenarlo localmente en el disco duro.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="protocol">
- <glossterm>Protocolo</glossterm>
- <glossdef>
- <para>
- Un método de comunicación acordado, especialmente uno acordado para
- enviar tipos particulares de información entre ordenadores
- Ejemplos son POP (Protocolo de Oficina de Correo), para el correo, y
- HTTP (Protocolo de Transferencia de Hipertexto), para páginas web.
-
- </para>
- </glossdef>
- </glossentry>
-
-
- <glossentry id="regular-expression">
- <glossterm>Expresión Regular</glossterm>
- <glossdef>
- <para>
- Una expresión regular, o "regex", es una forma de describir una
- cadena de texto usando meta caracteres o símbolos wild-card. Por
- ejemplo, la frase <userinput>tener.*pat[a|o]</userinput> significa
- "cualquier frase que comience por 'tener' y que acabe en 'pata' o
- 'pato'". Si usted busca esta expresión, encontrará entre otras
- "tener mala pata" y "tener un pato". No hay sitio aquí para
- entrar en profundidad, pero si lo desea, puede echar un vistazo a la
- documentación del comando <command>grep</command>.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="script">
- <glossterm>Script</glossterm>
- <glossdef>
- <para>
- Un programa escrito en un lenguaje interpretado (en lugar de
- compilado). A menudo usado como sinónimo de "macro," para denotar
- una serie de comando o acciones pre grabados en una aplicación.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="sendmail">
- <glossterm>Sendmail</glossterm>
- <glossdef>
- <para>
- Como su nombre indica, <application>sendmail</application> es un
- programa que envía correo. <application>Evolution</application>
- puede usarlo en lugar de <glossterm>SMTP</glossterm>; algunas
- personas lo prefieren porque permite más flexibilidad, pero es más
- difícil de configurar.
- </para>
- </glossdef>
- </glossentry>
-
-
- <glossentry id="shortcut-bar">
- <glossterm>Barra de Atajos</glossterm>
- <glossdef>
- <para>
- Una parte de <application>Evolution</application> que ofrece
- a los usuarios un rápido acceso a la partes de la aplicación
- usadas más frecuentemente.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="signature">
- <glossterm>Firma</glossterm>
- <glossdef>
- <para>
- En términos de un correo electrónico, una firma es un texto situado
- al final de todos los mensajes que usted mande, como una firma hecha
- a mano al final de una carta escrita. Una firma puede ser cualquier
- cosa desde su cita preferida hasta un enlace a una página web. La
- cortesía dicta que debe tener una longitud inferior a cuatro líneas.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="SMTP">
- <glossterm>SMTP</glossterm>
- <glossdef>
- <para>
- Esta es la manera más común de transportar mensajes desde el
- ordenador cliente (el suyo) al servidor. SMTP significa Protocolo
- Simple de Transferencia de Correo.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="spam">
- <glossterm>Spam</glossterm>
- <glossdef>
- <para>
- Correo no deseado ó inútil. El spam normalmente aparece como cartas
- encadenadas y publicidad de compañías sin escrúpulos o sin sentido.
- Los mensajes que no valen para nada se conocen como "boletínes
- opt-in"
-. </para>
- </glossdef>
- </glossentry>
-
-
- <glossentry id="tooltip">
- <glossterm>Mensaje de Ayuda</glossterm>
- <glossdef>
- <para>
- Una paqueña caja con texto explicatorio que aparece cuando el puntero
- del ratón permanece sin moverse sobre un botón o cualquier otro
- elemento de la interfaz.
- </para>
- </glossdef>
- </glossentry>
-
-
-
-
- <glossentry id="virus">
- <glossterm>Virus</glossterm>
- <glossdef>
- <para>
- Un programa malicioso que se inserta a si mismo en otros para así ser
- ejecutado, permitiéndole expandirse a más programas y a otros ordenadores.
- Un virus puede causar daños sustanciales colapsando redes y unidades de disco,
- borrando archivos, o abriendo agujeros de seguridad.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="vcard">
- <glossterm>vCard</glossterm>
- <glossdef>
- <para>
- Un formato de archivo para el intercambio de información de contactos.
- Cuando recibe una tarjeta adjunta a un correo, esta probablemente en el
- formato vCard. No confundir con <glossterm
- linkend="vfolder">vFolder</glossterm>.
- </para>
- </glossdef>
- </glossentry>
-
- <glossentry id="vfolder">
- <glossterm>vFolder</glossterm>
- <glossdef>
- <para>
- Una herramienta para organizar mensajes. vFolders le permite crear una
- carpeta que contiene los resultados de una búsqueda compleja. Los
- contenidos de la carpeta se actualizan dinámicamente.
- </para>
- </glossdef>
- </glossentry>
-
-</glossary>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/doc/es/config-prefs.sgml b/doc/es/config-prefs.sgml
deleted file mode 100644
index ba159f51d5..0000000000
--- a/doc/es/config-prefs.sgml
+++ /dev/null
@@ -1,646 +0,0 @@
-<!-- <!DOCTYPE Chapter PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.1//EN"> -->
-<chapter id="config-prefs">
-
- <title>Configuración Avanzada</title>
- <para>
- Quizá su servidor de correo ha cambiado de nombre. Quizá se ha
- cansado de cierto aspecto de la configuración de sus citas.
- Cualquiera que sea la razón, usted quiere cambiar su configuración
- de <application>Evolution</application>. Este capítulo le
- dirá como hacer exactamente eso.
- </para>
-
- <sect1 id="config-prefs-mail">
- <title>Configuración del Correo</title>
- <para>
- Para cambiar su configuración de correo, seleccione <menuchoice>
- <guimenu>Configuración</guimenu> <guimenuitem>Configuración
- de correo</guimenuitem></menuchoice> estando en Inbox. Esto
- abrirá la <interface>ventana de preferencias del correo</interface>,
- ilustrada en <xref linkend="config-prefs-mail-fig">. Las
- preferencias de correo están separadas en varias categorías:
- <variablelist>
- <varlistentry>
- <term><guilabel>Identidades</guilabel></term>
- <listitem>
- <para>
- Esto le permite crear o alterar una o más identidades para
- su correo electrónico.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>Fuentes</guilabel></term>
- <listitem>
- <para>
- Esta pestaña le permite indicar a
- <application>Evolution</application> de donde obtener el
- correo que le envíen y como obtenerlo.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
-
- <term><guilabel>Transporte de Correo</guilabel></term>
- <listitem>
- <para>
- Esta pestaña le permite indicar a
- <application>Evolution</application> como enviar su correo.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guilabel>Servidores de Noticias</guilabel></term>
- <listitem>
- <para>
- Si quisiera usar <application>Evolution</application> para
- leer los grupos de noticias, puede especificar aquí las
- características de su servidor de noticias..
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guilabel>Otros</guilabel></term>
- <listitem>
- <para>
- Configuración miscelánea para el correo y las noticias, como
- el uso de HTML, y cuanto tiempo debe esperar
- <application>Evolution</application> antes de marcar un
- mensaje como leído.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
-
- </para>
-
- <!-- ==============Figure===================== -->
- <figure id="config-prefs-mail-fig">
- <title>Dialogo de Preferencias del Correo</title>
- <screenshot>
- <screeninfo>Setting mail preferences</screeninfo>
- <graphic fileref="fig/config-mail" format="png" srccredit="Aaron Weber">
- </graphic>
- </screenshot>
- </figure>
- <!-- ==============End of Figure================-->
-
-
- <sect2 id="config-prefs-mail-identity">
- <title>Configuración de Identidades</title>
- <para>
- Si solo tiene una cuenta de correo, o envía el correo desde una
- sola dirección, tan solo deberá configurar una identidad. De todos
- modos, si quiere puede tener múltiples identidades. Esto puede
- resultar útil si quiere mantener separados su correo personal y
- profesional, o si tiene varios puestos en su trabajo.
-
- </para>
- <para>
- Para añadir una nueva identidad, simplemente pulse
- <guibutton>Añadir</guibutton>. Para modificar una identidad
- ya existente, seleccione la de la pestaña
- <guilabel>Identidad</guilabel> de la ventana de
- <interface>Preferencias</interface>, y pulse
- <guibutton>Editar</guibutton>.
- </para>
-
- <para>
- <application>Evolution</application> le presentará una caja de
- dialogo que contiene cuatro campos:
- <itemizedlist>
- <listitem>
- <para>
- <guilabel>Nombre Completo:</guilabel> por defecto, este es el
- mismo nombre que el nombre completo descrito en su cuenta de
- usuario en su ordenador. Puede seleccionar otro si lo desea.
- </para>
- </listitem>
- <listitem>
- <para>
- <guilabel>Dirección de Correo:</guilabel> Escriba su dirección
- de correo en este espacio.
- </para>
- </listitem>
- <listitem>
- <para>
- <guilabel>Organización:</guilabel> Si envía mensajes en
- representación de una compañía u otra organización,
- escriba aquí el nombre de la misma.
- </para>
- </listitem>
- <listitem>
- <para>
- <guilabel>Archivo de Firma:</guilabel> Puede elegir un
- pequeño archivo de texto para que sea añadido a todos los
- mensajes que mande. Típicamente, los archivos de firma
- incluyen la dirección u otra información de contacto, o su
- cita preferida. Es una buena costumbre hacer que no tenga
- más de cuatro líneas.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </sect2>
-
- <sect2 id="config-prefs-mail-network">
- <title>Configuración de la Red</title>
- <para>
- Para enviar correo con
- <application>Evolution</application>, deberá conectarse a la red.
- Para hacer esto deberá conocer su nombre de usuario y su clave, que
- tipo de protocolos de recepción y envío usa su red, y los nombres
- de los servidores que va a usar. Si está migrando desde otro
- programa de trabajo en grupo o de correo, casi con toda seguridad
- podrá usar la misma configuración que en dicho programa. La
- configuración relacionada con la Red se encuentra en las pestañas
- <guilabel>Fuentes de Correo</guilabel> y
- <guilabel>Transportes de Correo</guilabel>.
- </para>
-
- <sect3 id="config-prefs-network-sources">
- <title>Fuentes del Correo</title>
- <para>
- La pestaña <interface>Fuentes de Correo</interface> le permite
- editar, añadir, o borrar métodos de obtener el correo de los
- servidores. Pulsando en <guibutton>Añadir</guibutton> o
- <guibutton>Editar</guibutton> aparecerá una caja de diálogo que
- le ofrecerá las siguientes opciones:
- <variablelist>
- <varlistentry>
- <term><guilabel>Tipo de Fuente de Correo:</guilabel></term>
- <listitem>
- <para>
- Seleccione entre servidores <glossterm
- linkend="imap">IMAP</glossterm> o <glossterm
- linkend="pop">POP</glossterm>, o archivos tipo
- <systemitem><filename>mbox</filename></systemitem>
- o <systemitem><filename>mh</filename></systemitem>
- al estilo Unix.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term> <guilabel>Servidores:</guilabel></term>
- <listitem>
- <para>
- Introduzca el nombre del servidor de su fuente de correo
- en este campo. Si usa puede o no que sea el mismo que su
- servidor <glossterm linkend="smtp">SMTP</glossterm>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>Nombre de usuario:</guilabel></term>
- <listitem>
- <para>
- Introduzca el nombre para la cuenta que tiene en el
- servidor-- este debería ser la parte de delante de la @
- de su dirección de correo. Si usa archivos
- <systemitem><filename>mbox</filename></systemitem>
- o <systemitem><filename>mh</filename></systemitem>
- como fuentes de correo, no necesita escribir un nombre de
- usuario.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>Autentificación:</guilabel></term>
- <listitem>
- <para>
- Diga a <application>Evolution</application> como
- verificar su identidad con el servidor. Sus opciones
- varían dependiendo del tipo de servidor que esté usando,
- y de la forma en que esté configurado. Dado el nombre del
- servidor,
- <application>Evolution</application> puede detectar que
- tipos de autentificación ofrece.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>Probar Configuración</guilabel></term>
- <listitem>
- <para>
- Pulse este botón para que
- <application>Evolution</application> compruebe si sus
- fuentes de correo están configuradas correctamente.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- <para>
- Si tiene varias fuentes de correo, pulsando <guibutton>
- Obtener</guibutton> actualizará cualquier carpeta IMAP,
- <systemitem><filename>mh</filename></systemitem>, o
- <systemitem><filename>mbox</filename></systemitem>
- y comprobará y descargará el correo de todos los servidores POP.
- En otras palabras, <guibutton>Obtener</guibutton> obtiene su
- correo, sin importar cuantas fuentes tenga, o de que tipo sean.
- </para>
- </sect3>
-
- <sect3 id="config-prefs-mail-network-transports">
- <title>Transportes del Correo</title>
- <para>
- La pestaña <interface>Transporte del Correo</interface> le
- permite especificar como enviará el correo. Evolution
- actualmente soporta dos tipos de transporte: <glossterm linkend="smtp">SMTP</glossterm>, el cual usa un
- servidor de correo remoto, y
- <glossterm linkend="sendmail">sendmail</glossterm>, el cual usa el
- programa <application>sendmail</application> de su sistema local.
- <application>Sendmail</application> es más difícil de configurar,
- pero ofrece más flexibilidad que
- <glossterm>SMTP</glossterm>.
- </para>
- <para>
- Para usar <guilabel>SMTP</guilabel>, necesitará introducir
- el nombre de su servidor SMTP. Puede que sea el mismo nombre
- que el del servidor de su fuente de correo.
- </para>
- <para>
- <application>Evolution</application> puede intentar
- determinar si ha introducido un nombre de servidor válido. Para
- que lo haga, pulse el botón <guilabel>Comprobar
- Configuración</guilabel>.
- </para>
- </sect3>
- </sect2>
- <sect2 id="config-prefs-network-news">
- <title>Servidores de Noticias</title>
- <para>
- Los grupos de noticias se parecen tanto a listas de correo que
- no hay ninguna razón para no tenerlos al lado de su correo. La
- primera vez que seleccione la pestaña <guilabel>Servidor de
- Noticias</guilabel>, verá una caja vacía con tres botones ya
- familiares a la derecha: <guibutton>Añadir</guibutton>,
- <guibutton>Editar</guibutton>, y
- <guibutton>Borrar</guibutton>.
- </para>
- <para>
- Pulse <guibutton>Añadir</guibutton> para añadir un servidor de
- noticias, será preguntado por su nombre. Introduzca el nombre,
- pulse <guibutton>ACEPTAR</guibutton>, y ya está. Naturalmente, puede
- tener tantos servidores de noticias como desee. Los servidores
- de noticias aparecerán detrás de sus servidores IMAP en la
- <interface>barra de carpetas</interface>.
- </para>
- </sect2>
-
- <sect2 id="config-prefs-mail-other">
- <title>Otras Preferencias del Correo</title>
- <para>
- No todo encaja bien en categorías. Esta parte contiene
- una miscelánea de configuraciones que no tienen demasiado que ver
- unas con otras.
- <variablelist>
-
- <varlistentry>
- <term>
- <guilabel>Enviar mensajes en formato HMTL</guilabel>
- </term>
- <listitem><para>
- Si selecciona esta opción, enviará sus
- mensajes en HTML por defecto. Si no la selecciona, sus
- mensajes se enviarán sin formato HTML a menos que seleccione
- <menuchoice> <guimenu>Formato</guimenu> <guimenuitem>HTML</guimenuitem>
- </menuchoice> en la ventana de composición de mensajes.
- Vea <xref linkend="usage-mail-getnsend-send-html">
- para más información acerca del correo en HTML.
- </para></listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <guilabel>Marcar Mensajes como Leídos Pasados</guilabel>
- </term>
- <listitem><para>
- Cuando selecciona un mensaje,
- <application>Evolution</application> esperará un
- momento antes de marcarlo como leído. Puede poner el
- tiempo de espera, en milisegundos, aquí.
- </para></listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <guilabel>Formato de Carpeta</guilabel>
- </term>
- <listitem> <para> Por defecto,
- <application>Evolution</application> guarda el correo
- en el formato
- <systemitem><filename>mbox</filename></systemitem>.
- Si quiere puede cambiar al formato
- <systemitem><filename>mh</filename></systemitem>. Sepa
- que esta en una característica avanzada y que puede hacer
- que pierda algunos mensajes, así que probablemente
- primero debería hacer una copia de seguridad de su
- directorio <systemitem><filename>evolution</filename> </systemitem>
-. Además, llevará bastante tiempo si tiene
- un mailbox grande.
- </para></listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect2>
- </sect1>
-
- <sect1 id="config-prefs-cal">
- <title>Configuración del Calendario</title>
- <para>
- Para especificar sus preferencias sobre el calendario, selección
- <menuchoice><guimenu>Configuraciones</guimenu>
- <guimenuitem>Configuración del
- Calendario</guimenuitem></menuchoice> desde la vista del
- calendario. Esto abrirá la ventana de
- <interface>Preferencias</interface>. Contiene cuatro pestañas:
- <guilabel>Vista del tiempo</guilabel>,
- <guilabel>Colores</guilabel>, <guilabel>Lista de Tareas</guilabel>
- y <guilabel>Alarmas</guilabel>. La <interface>ventana de
- preferencias del calendario</interface> está ilustrada en <xref
- linkend="config-prefs-cal-fig">.
-
- <!-- ==============Figure===================== -->
- <figure id="config-prefs-cal-fig">
- <title>Diálogo de Preferencias del Calendario</title>
- <screenshot>
- <screeninfo>Si esto funcionase en mi trabajo también como en mi calendario...</screeninfo>
- <graphic fileref="fig/config-cal" format="png" srccredit="Aaron Weber">
- </graphic>
- </screenshot>
- </figure>
- <!-- ==============End of Figure================-->
- </para>
-
- <sect2 id="config-prefs-cal-time">
- <title>Configuración de las Vistas del Tiempo</title>
- <para>
- La pestaña <guilabel>mostrar el Tiempo</guilabel> le permite
- configurar lo siguiente:
- <variablelist>
- <varlistentry>
- <term>Formato del tiempo</term>
- <listitem>
- <para>Puede elegir aquí entre los formatos de doce horas (AM/PM) y
- de veinticuatro horas simplemente pulsando sobre el botón apropiado.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>La semana comienza</term>
- <listitem>
- <para>Puede fijar que las semanas comiencen en Domingos o en Lunes.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Rango diario</term>
- <listitem>
- <para>
- ¿Cuando comienza u jornada laboral y cuando termina?
- En la vista diaria y semanal,
- <application>Evolution</application> muestra todas las
- horas del rango que seleccione aquí, incluso si no hay
- citas a esas horas. Naturalmente, podrá poner una cita
- fuera de estas horas, y si lo hace, la vista se extenderá
- para mostrarla.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect2>
- <sect2 id="config-prefs-cal-color">
- <title>Colores del Calendario</title>
- <para>
- La pestaña de <interface>colores</interface> le permite decidir
- de que color será su calendario. La pestaña consiste en un
- calendario de ejemplo a la derecha y de una lista de diez elementos
- que pueden ser coloreados en diferentes formas. Si pulsa en botón
- de color a la derecha de cada elemento, mostrará una ventana de
- selección de color donde podrá elegir a que color cambiar el
- elemento. Pulsando <guibutton>ACEPTAR</guibutton> en el diálogo de
- selección de colores, puede ver os resultados de los colores en el
- calendario de ejemplo.
- </para>
- <para>Los elementos a mostrar cuyos colores puede fijar son:
-
- <itemizedlist>
- <listitem>
- <para>
- <guilabel>Marco:</guilabel> Las líneas entre los días y la
- parte de arriba de la vista.
- </para>
- </listitem>
-
- <listitem>
- <para> <guilabel>Títulos:</guilabel> Color del texto para los
- nombres de los días y los meses y para otros títulos.
- </para>
- </listitem>
-
- <listitem>
- <para> <guilabel>Días vacíos:</guilabel> Este es el color de
- fondo para cualquier espacio de tiempo en el que no tiene citas.
- </para>
- </listitem>
-
- <listitem>
- <para>
- <guilabel>Citas:</guilabel> Este es el color de fondo para
- cualquier espacio de tiempo en el que tenga citas.
- </para>
- </listitem>
-
- <listitem>
- <para> <guilabel>Día resaltado:</guilabel> El color de fondo
- para un espacio de tiempo seleccionado.
- </para>
- </listitem>
-
-
- <listitem>
- <para>
- <guilabel>Números de los días:</guilabel> Color del texto para los números de las fechas.
- </para>
- </listitem>
-
-
- <listitem>
- <para>
- <guilabel>Número del día actual:</guilabel> Color del texto para la fecha del día de hoy.
- </para>
- </listitem>
-
- <listitem>
- <para> <guilabel>Elementos Por Hacer que dentro de plazo:
- </guilabel> Color del texto para los elementos de la lista Por
- Hacer que están aún dentro del plazo.
- (¿Quizá sea el color de fondo? ¡averígualo!)
- </para>
- </listitem>
-
-
- <listitem>
- <para> <guilabel>Elementos Por Hacer de plazo hoy:</guilabel>
- Color del texto para las tareas de hoy.
- </para>
- </listitem>
-
- <listitem>
- <para> <guilabel>Elementos Por Hacer fuera de plazo:</guilabel>
- Color del texto para las tareas fuera de plazo.
- </para>
- </listitem>
-
- </itemizedlist>
- </para>
- </sect2>
-
- <sect2 id="config-prefs-cal-todo">
- <title>Configuración de la Lista de Tareas Por-Hacer</title>
- <para>
- Puede elegir que información muestra la lista Por Hacer y la manera
- como la muestra. Las dos áreas de la pestaña <interface>Lista Por
- Hacer</interface> ofrecen varias opciones cada una:
- <variablelist>
- <varlistentry>
- <term>Mostrar en la Lista Por Hacer</term>
- <listitem>
- <para>
- Esta opción contiene tres elementos. Si marca las casillas
- a su lado, esa información aparecerá en la lista Por Hacer
- para cada tarea que contenga:
- <itemizedlist>
- <listitem>
- <para><guilabel>Fecha de Plazo</guilabel></para>
- </listitem>
- <listitem>
- <para><guilabel>Tiempo hasta el Plazo</guilabel></para>
- </listitem>
- <listitem>
- <para><guilabel>Prioridad</guilabel></para>
- </listitem>
- </itemizedlist>
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Opciones de Estilo</term>
- <listitem>
- <para>
- Seleccione entre las siguientes casillas para determinar
- que aspecto tendrá la lista Por Hacer:
- <itemizedlist>
- <listitem>
- <para><guilabel>Resaltar elementos fuera de plazo</guilabel></para>
- </listitem>
- <listitem>
- <para><guilabel>Resaltar elementos de plazo hoy</guilabel></para>
- </listitem>
- <listitem>
- <para><guilabel>Resaltar elementos dentro del plazo</guilabel></para>
- </listitem>
- </itemizedlist>
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect2>
-
- <sect2 id="config-prefs-cal-alarms">
- <title>Colocación de Alarmas</title>
- <para>
- La pestaña de <interface>alarmas</interface> le da la posibilidad de elegir entre tres opciones:
- <itemizedlist>
- <listitem>
- <para><guilabel>Pitar al mostrar las alarmas</guilabel>: seleccione
- esta opción para que <application>Evolution</application> emita un
- pitido para la alarma que haya fijado. Si deja esta opción sin
- marcar, <application>Evolution</application> tan solo le alertará de
- los sucesos abriendo un ventana de diálogo. Estos pitidos son
- distintos a los de las alarmas auditivas.
- </para>
- </listitem>
- <listitem>
- <para><guilabel>Las alarmas auditivas cesan tras: </guilabel>
- Seleccione esta opción para que las alarmas auditivas cesen
- automáticamente pasados un número determinado de segundos. </para>
- </listitem>
- <listitem>
- <para><guilabel>Activar recordatorio para:</guilabel> Si quiere
- tener la posibilidad de decirle a
- <application>Evolution</application> que repita la alarma en unos
- minutos, elija esta opción y decida cuanto tiempo quiere que espere
- antes de repetirla.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </sect2>
-
- </sect1>
-
- <sect1 id="config-prefs-contact">
- <title>Administrando el Administrador de Contactos</title>
- <para>
- Para fijar el comportamiento de su Administrador de Contactos,
- pulse en la pestaña
- <guibutton>Administrador de Contactos</guibutton> en la ventana de
- <interface>Preferencias</interface>.
- </para>
- <para>
- Ha definido las siguientes opciones: <!--insertar aquí una lista
- de variables-->
- </para>
-
- <sect2 id="config-prefs-contact-ldap-add">
- <title>Añadiendo Servidores de Directorio</title>
- <para>
- Para añadir un nuevo servidor LDAP a su carpeta de contactos
- disponibles, selección <menuchoice><guimenu>Acciones</guimenu>
- <guimenuitem>Nuevo Servidor de Directorio</guimenuitem>
- </menuchoice>. Esto mostrará una pequeña caja de diálogo que
- le permitirá introducir los siguientes datos:
- <itemizedlist>
- <listitem><para>
- <guilabel>Nombre</guilabel> &mdash; cualquier nombre que elija para el servidor.
- </para></listitem>
-
- <listitem><para>
- <guilabel>Descripción</guilabel> &mdash; un descripción larga del servidor.
- </para></listitem>
-
- <listitem><para>
- <guilabel>Servidor LDAP</guilabel> &mdash; la dirección de red del servidor.
- </para></listitem>
-
- <listitem><para>
- <guilabel>Puerto</guilabel> &mdash; por defecto, el puerto es el 389.
- </para></listitem>
-
- <listitem><para>
- <guilabel>DN Raíz</guilabel> &mdash; entre el DN raíz aquí.
- </para></listitem>
- </itemizedlist>
- </para>
- </sect2>
- </sect1>
-
-
-
- <sect1 id="config-prefs-general">
- <title>Preferencias Generales</title>
- <para>
- Las opciones adicionales de configuración se cubrirán aquí,
- según vayan estando disponibles.
- </para>
- </sect1>
-</chapter>
-
-
-
-
-
-
diff --git a/doc/es/config-setupassist.sgml b/doc/es/config-setupassist.sgml
deleted file mode 100644
index f557b6e02a..0000000000
--- a/doc/es/config-setupassist.sgml
+++ /dev/null
@@ -1,211 +0,0 @@
- <chapter id="config-setupassist">
- <title>Configuración Fácil con el Asistente</title>
- <para>
- La primera vez que intente usar el correo, el asistente de
- configuración del correo le pedirá algunos datos básicos, para que
- <application>Evolution</application> le deje usar el correo. Si
- prefiere una configuración más detallada, o si quiere realizar
- cambios en una configuración ya existente, vea <xref
- linkend="config-prefs">.
- </para>
-
- <sect1 id="config-setupassist-mail">
- <title>Configuración del Correo</title>
- <para>
- La primera vez que intente enviar o recibir correo con
- <application>Evolution</application>, aparecerá el <interface>asistente de
- configuración del correo</interface> para ayudarle con la configuración de
- su correo. Si no piensa usar el correo electrónico, o si prefiere
- ocuparse de la configuración de su correo más tarde, pulse
- <guibutton>Cancelar</guibutton>.
- </para>
-
-<!--
-
- Antes de obtenerlo, eso si, debe decidir donde lo quiere conservar.
- Sus opciones variarán ligeramente dependiendo de la configuración de su
- red, pero quedan simplificadas a guardar su correo en su disco duro
- (usando <glossterm linkend="pop">POP</glossterm>), o guardarlo en
- la red (usando <glossterm linkend="imap">IMAP</glossterm>).
- Si guarda el correo en su disco duro local, podrá leerlo tanto si
- está conectado o como si no, pero tan solo podrá leerlo desde un
- ordenador. Si lo guarda en la red, solo podrá leerlo cuando esté
- conectado, pero podrá leerlo desde casi cualquier ordenador con conexión
- a la red, incluso si no tiene
- <application>Evolution</application>.
-
-
- Si elige POP, pondrá el correo en el
- <guilabel>Inbox</guilabel> en la carpeta <guilabel>Local</guilabel>.
- Si elige IMAP, es el
- <guilabel>Inbox</guilabel> de una carpeta con el mismo nombre que su
- servidor de correo. Esto es así para que pueda tener varios
- servidores IMAP distintos si quiere. Vea <xref
- linkend="config-prefs-mail"> para más información acerca de los
- servidores de correo.
--->
-
- <para>
- El asistente para la configuración (algunas veces llamado
- <glossterm>Druida</glossterm>, por analogía con los "Magos"
- que usan otros programas) le guiará a través del proceso de configuración
- de la red. Le preguntará acerca de alguna información básica. Su
- administrador de sistemas o su proveedor de Internet debería tener
- las respuestas que necesitará. El asistente para la configuración del
- correo está representado en <xref linkend="usage-setup-fig">.
-
-<!-- ==============Figure=================================== -->
-<!-- druid-pic should eventually become assistant-pic -->
-
- <figure id="usage-setup-fig">
- <title>Asistente para la Configuración del Correo</title>
- <screenshot>
- <screeninfo>Ventana del Correo de Evolution</screeninfo>
- <graphic fileref="fig/mail-druid-pic" format="png" srccredit="Kevin Breit">
- </graphic>
- </screenshot>
- </figure>
-<!-- ==============End of Figure=================================== -->
-
-
-
- El asistente le pedirá la siguiente información:
- <variablelist>
-
- <varlistentry>
- <term> <guilabel>Nombre:</guilabel> </term> <listitem>
- <para>Su nombre completo. </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guilabel>Dirección de correo electrónico:</guilabel></term>
- <listitem><para>
- Su dirección de correo completa.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term> <guilabel>Organización:</guilabel></term>
- <listitem>
- <para>
- Cualquier organización a la que represente, o la compañía para
- la que trabaja. Deje esto en blanco si lo prefiere, o ponga
- "Yo mismo" así la gente sabrá que sus opiniones son solo suyas.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guilabel>Archivo de Firma:</guilabel></term>
- <listitem>
- <para>
- Un archivo de texto añadido a cualquier mensaje que envíe. Una
- firma típica consiste en su nombre y su dirección de correo,
- o una cita que le guste. Es una buena medida mantener su
- "firma" corta: cuatro líneas son suficientes. Recuerde,
- que esto se adjuntará a todos los mensajes que envíe.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term> <guilabel>Tipo de fuente del correo:</guilabel></term>
- <listitem>
- <para>
- <application>Evolution</application> soporta varias fuentes
- para el correo: servidores <glossterm
- linkend="pop">POP</glossterm> e <glossterm
- linkend="imap">IMAP</glossterm>, y archivos
- <systemitem><filename>mbox</filename></systemitem> y
- <systemitem><filename>mh</filename></systemitem> al estilo UNIX.
- Los servidores POP le permiten obtener su correo y guardarlo
- localmente para que pueda consultarlo incluso cuando no esté
- conectado a la red; los servidores <glossterm>IMAP</glossterm>
- guardan el correo en el servidor para que puede acceder a el
- desde varios sitios; los
- archivos <systemitem><filename>mbox</filename></systemitem>
- son usados por su ordenador para el correo interno, y pueden
- ser útiles si quiere cambiar desde otro cliente de correo como
- <application>Spruce</application> o
- <application>Netscape Communicator</application>. Pregunte
- a su administrador de sistemas cual debe usar, o intente
- hasta que alguno funcione. Puede usar múltiples fuentes si lo
- desea; vea <xref
- linkend="config-prefs-mail-network"> para más
- información.
- </para>
- <para>
- Si decide que <application>Evolution</application>
- no use ningún servidor, los siguientes elementos no son
- relevantes; tan solo debe indicar donde se encuentran los
- archivos a los que desea acceder.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term> <guilabel>Servidor:</guilabel></term>
- <listitem>
- <para>
- Este debe ser el nombre del servidor de donde obtiene el
- correo entrante. Puede (o puede no) ser el mismo servidor
- al que envía su correo saliente.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guilabel>Nombre de usuario:</guilabel></term>
- <listitem>
- <para>
- Introduzca el nombre de usuario de la cuenta de su servidor de
- correo, si tiene una. En casi todos los casos, esta es la parte
- de su correo de antes del carácter @, y
- <application>Evolution</application> elige ese valor como
- valor por defecto. Si tiene un nombre de usuario distinto,
- puede escribirlo aquí.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guilabel>Autentificación:</guilabel></term>
- <listitem>
- <para>
- Selección el tipo de autentificación que usará. Puede pulsar <guibutton>Detectar tipos soportados</guibutton> para
- averiguar que protocolos de autentificación admite su sistema.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guilabel>Transporte de Correo:</guilabel></term>
- <listitem>
- <para>
- Este es el protocolo de envío de correo que quiera usar.
- <application>Evolution</application> soporta ambos
- <glossterm linkend="smtp">SMTP</glossterm> y
- <application>sendmail</application>; SMTP es de lejos el más
- común.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- <para>
- Para aprender a configurar <application>Evolution</application>
- con todo detalle, o para cambiar las preferencias una vez que las
- ha fijado, mire <xref linkend="config-prefs">.
- </para>
- </sect1>
-
-</chapter>
-
-
-
-
-
-
-
-
-
diff --git a/doc/es/config-sync.sgml b/doc/es/config-sync.sgml
deleted file mode 100644
index aeec2fba92..0000000000
--- a/doc/es/config-sync.sgml
+++ /dev/null
@@ -1,122 +0,0 @@
- <chapter id="config-sync">
- <title>Configurando su sistema de sincronización</title>
- <para>
- La sincronización le presenta dos temas de los que se tendrá que
- ocupar.
- <simplelist>
- <member>
- Su ordenador deberá reconocer y acceder a su dispositivo de
- mano. En este momento, <application>Evolution</application> solo
- soporta dispositivos con Palm-OS como el PalmPilot y el
- Handspring Visor.
- </member>
- <member>
- Debe decidir que estilo de sincronización quiere.
- </member>
- </simplelist>
-
- </para>
- <para>
- Si no ha usado antes un dispositivo de mano con su ordenador, debe
- ejecutar el <application>Centro de Control</application> de GNOME
- y asegurarse que <application>Enlaze con Pilot</application> está
- configurado apropiadamente. Entonces, seleccione el <glossterm
- linkend="conduit">enlaze</glossterm> de
- <application>Evolution</application> bajo la sección
- <guilabel>Enlazes de Pilot</guilabel> del Centro de Control.
- </para>
- <para>
- Una vez que su ordenador y su dispositivo con Palm-OS se hablan el
- uno al otro, debe decidir que quiere que hagan exactamente con los
- datos que se intercambian. Sus opciones pueden variar dependiendo
- del enlaze, pero tipicamente serán:
-
- <variablelist>
- <varlistentry>
- <term>Desactivar </term>
- <listitem>
- <para>
- No hace nada.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Sincronizar</term>
- <listitem>
- <para>
- Copia los datos nuevos del ordenador al dispositivo de
- mano, y del dispositivo de mano al ordenador. Elimina
- elementos que estaban en ambos sistemas pero han sido
- borrados en uno de ellos.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Copiar desde Pilot</term>
- <listitem>
- <para>
- Si hay datos nuevos en el dispositivo de mano, los copia
- al ordenador.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Copiar a Pilot</term>
- <listitem>
- <para>
- Copia datos nuevos del ordenador al dispositivo de mano.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Sincronizar desde Pilot</term>
- <listitem>
- <para>
- Copia los datos nuevos del dispositivo de mano al
- ordenador, y elimina cualquier información del ordenador
- que haya sido borrada del dispositivo de mano.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Sincronizar en el Pilot</term>
- <listitem>
- <para>
- Copia los datos nuevos del ordenador al dispositivo de
- mano, y elimina cualquier información del dispositivo
- de mano que haya sido borrada del ordenador.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
-
- <para>
- Seleccione un comportamiento para cada enlaze disponible. Para la
- mayoría, querra quedarse con <guilabel>Sincronizar</guilabel>.
- Entoces, ponga el dispositivo de mano en su cuna y presione el
- botón de sincronización.
- </para>
-
-
- <para>
- <warning>
- <title>Prevención de Pérdida de Datos</title>
- <para>
- Siempre es una buena idea hacer una copia de seguridad. Para hacerla,
- haga una copia de su directorio
- <systemitem><filename>~/evolution</filename></systemitem>.
- </para>
- </warning>
- </para>
-
- </chapter>
-
-
-
-
diff --git a/doc/es/evolution.sgml b/doc/es/evolution.sgml
deleted file mode 100644
index 869e9df781..0000000000
--- a/doc/es/evolution.sgml
+++ /dev/null
@@ -1,147 +0,0 @@
-<!DOCTYPE book PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.1//EN"[
-
-<!ENTITY PREFACE SYSTEM "preface.sgml">
-<!ENTITY USAGE-MAINWINDOW SYSTEM "usage-mainwindow.sgml">
-<!ENTITY USAGE-EXEC-SUMMARY SYSTEM "usage-exec-summary.sgml">
-<!ENTITY USAGE-MAIL SYSTEM "usage-mail.sgml">
-<!ENTITY USAGE-CONTACT SYSTEM "usage-contact.sgml">
-<!ENTITY USAGE-CALENDAR SYSTEM "usage-calendar.sgml">
-<!ENTITY USAGE-SYNC SYSTEM "usage-sync.sgml">
-<!ENTITY USAGE-PRINT SYSTEM "usage-print.sgml">
-<!ENTITY CONFIG-SETUPASSIST SYSTEM "config-setupassist.sgml">
-<!ENTITY CONFIG-PREFS SYSTEM "config-prefs.sgml">
-<!ENTITY CONFIG-SYNC SYSTEM "config-sync.sgml">
-<!ENTITY MENUREF SYSTEM "menuref.sgml">
-<!ENTITY APX-GLOSS SYSTEM "apx-gloss.sgml">
-<!ENTITY APX-BUGS SYSTEM "apx-bugs.sgml">
-<!ENTITY APX-AUTHORS SYSTEM "apx-authors.sgml">
-
-]>
-
-
-<!-- Almost every chapter is an entity. Files, Chapter id's, and
-entity names correspond. APX is for appendix. Note that there is no
-entity for apx-notes.sgml, which is still included in the file
-set. Reinstate the entity if and when the Notes feature is
-implemented. -->
-
-<book id="index">
- <bookinfo>
- <title>Una guía para el usuario de Evolution</title>
- <authorgroup>
- <author><firstname>Aaron</firstname><surname>Weber</surname></author>
- <author><firstname>Kevin</firstname><surname>Breit</surname></author>
- </authorgroup>
- <copyright>
- <year>2000</year>
- <holder> Ximian, Inc., </holder>
- <holder> Kevin Breit </holder>
- </copyright>
-
- <legalnotice id="legalnotice">
-
- <para>
- Se garantiza permiso para copiar, distribuir y/o modificar este
- documento bajo los términos de la <ulink type="help"
- url="gnome-help:fdl"><citetitle>Licencia de Documentación Libre
- de GNU</citetitle></ulink>, Versión 1.1 o posteriores versiones
- publicadas por la Fundación para el Software Libre (Free Software
- Foundation) sin Secciones Invariantes, sin Textos de Portada y sin
- Textos de Contraportada. Puede obtener una copia de la
- <citetitle>Licencia de Documentación Libre de GNU</citetitle>n de la Fundación para el Software Libre visitando su
- <ulink type="http" url="http://www.fsf.org">sitio Web</ulink>
- o escribiendo a: Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- USA.
- </para>
- <para>
- Muchos de los nombres que usan las compañías para distinguir sus
- productos y servicios están registrados como marcas. Cuando
- aparecen esos nombres en la documentación de GNOME, y el Proyecto
- de Documentación de GNOME tiene conocimiento de dichas marcas,
- estos han sido escritos en mayúsculas o empiezan con mayúsculas.
- </para>
- </legalnotice>
-
- <releaseinfo>
- This is version 0.9 of the Evolution manual.
- </releaseinfo>
-
- </bookinfo>
-
- &PREFACE;
-
- <part id="usage">
- <title>Usando Evolution</title>
- <partintro>
- <para>
- La primera parte del manual de
- <application>Evolution</application> describe como usar
- <application>Evolution</application> para el correo, el
- administrador de contactos y como fijar citas y tareas.
- Según vaya utilizando estas cosas descubrirá que hay más de
- una manera de hacer las cosas, y puede puede elegir el método
- que más le guste.
- </para>
- </partintro>
-
- &USAGE-MAINWINDOW;
- &USAGE-EXEC-SUMMARY;
- &USAGE-MAIL;
- &USAGE-CONTACT;
- &USAGE-CALENDAR;
-<!-- &USAGE-NOTES; -->
- &USAGE-SYNC;
- &USAGE-PRINT;
- </part>
- <part id="config">
- <title>Configurando y administrando Evolution</title>
- <partintro>
- <para>
- <application>Evolution</application> es altamente configurable.
- Normalmente, cuando los desarrolladores dicen esto, significa que
- no lo han probado a fondo y que dejan a otros programadores que se
- "configuren" ellos mismos un sistema que funcione. En el caso de
- <application>Evolution</application>, "configurable" significa
- lo que debe. Significa que, aunque puede esperar que el programa
- funcione perfectamente bien con sus opciones por defecto, además
- es sencillo alterar su comportamiento entre una amplia gama, para
- que encaje exactamente con sus necesidades. Esta parte del libro
- describirá ese proceso, desde la vista superficial del Asistente
- de Configuración hasta una visión a fondo de los diálogos de
- preferencias.
- </para>
- </partintro>
-
- &CONFIG-SETUPASSIST;
- &CONFIG-PREFS;
- &CONFIG-SYNC;
- </part>
-
- <part>
- <title>Referencia extensa de los Menus</title>
- <partintro>
- <para>
- La siguiente referencia cubre todos, o casi todos, los menús y los
- comandos de los menús que le ofrece
- <application>Evolution</application>.
- </para>
- </partintro>
- &MENUREF;
- </part>
-
- &APX-GLOSS;
- &APX-BUGS;
- &APX-AUTHORS;
-</book>
-
-
-
-
-
-
-
-
-
-
-
diff --git a/doc/es/menuref.sgml b/doc/es/menuref.sgml
deleted file mode 100644
index 4e13032213..0000000000
--- a/doc/es/menuref.sgml
+++ /dev/null
@@ -1,1477 +0,0 @@
-<!--
-<!DOCTYPE Chapter PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.1//EN">
--->
-
-<chapter id="menuref">
- <title>Referencias de los Menús</title>
- <para>
- Los menús de <application>Evolution</application> puede que no tengan el
- secreto de la felicidad, pero lo que contienen son todas las
- posibilidades de <application>Evolution</application>. Esta sección
- servirá como referencia de todos esos menús, y las posibilidades que le
- ofrecen.
- </para>
- <para>
- Ademas, las herramientas de edición de mensajes, citas, y
- contactos todas tienen barras de herramientas propias. De izquierda a
- derecha, los menús que tiene disponible cuando está leyendo el correo
- son: <guimenu>Archivo</guimenu>, <guimenu>Editar</guimenu>,
- <guimenu>Vista</guimenu>, <guimenu>Configuración</guimenu>,
- <guimenu>Mensaje</guimenu>, <guimenu>Carpeta</guimenu>and
- <guimenu>Ayuda</guimenu>.
-
- </para>
- <para>
- Los menús en <application>Evolution</application> son sensitivos al
- contexto, lo que significa que varian dependiendo de lo que esté
- haciendo. Si está leyendo su correo, tendrá menús relacionados con el
- correo; para su calendario, tendrá opciones relacionadas con
- calendarios. Algunos menús, naturalmente, como
- <guimenu>Ayuda</guimenu> y <guimenu>Archivo</guimenu> no cambian mucho,
- si es que lo hacen, porque son funciones más universales. Pero usted
- nunca marcará una tarjeta de dirección como "leidao", o pondra
- recurrencia a un mensaje que ha recivido. Dependiendo de si esta mirando
- el correo, los contactos, o la información del calendario.
- </para>
-
-
-
- <sect1 id="menuref-universal">
- <title>Menús que son iguales en todas partes</title>
- <para>
- Los menús <guimenu>Archivo</guimenu> y <guimenu>Ayuda</guimenu> de la
- ventana principal de <application>Evolution</application> no cambian,
- porque se refieren a elementos globales. Otros menús tienen
- contenidos que cambian dependiendo del contexto.
- </para>
-
- <sect2 id="menuref-universal-file">
- <title>Menú Archivo</title>
- <para>
- <variablelist>
-
- <varlistentry>
- <term><guisubmenu>Nuevo...</guisubmenu> Submenu</term>
- <listitem><para>
- <itemizedlist>
- <listitem><para>
- <guimenuitem>Carpeta</guimenuitem> &mdash;
- Crear una nueva carpeta. Vea <xref
- linkend="usage-mainwindow-folderbar">
- para más información acerca de las carpetas.
- </para></listitem>
- <listitem><para>
- <guimenuitem>Atajo</guimenuitem> &mdash;
- Crear un nuevo Atajo en la Barra de Atajos.
- </para></listitem>
- <listitem><para>
- <guimenuitem>Mensaje de Correo</guimenuitem> &mdash;
- Escribir un nuevo mensaje de correo. Cubierto en
- <xref linkend="usage-mail-getnsend-send">.
- </para></listitem>
- <listitem><para>
- <guimenuitem>Cita</guimenuitem> &mdash;
- Concertar una nueva cita en su calendario. Vea <xref
- linkend="usage-calendar-apts-basic"> para más información.
- </para></listitem>
- <listitem><para>
- <guimenuitem>Tarea</guimenuitem> &mdash;
- Escriba un nuevo elemento para-hacer en su lista de tareas.
- Cubierto en
- <xref linkend="usage-calendar-todo">.
- </para></listitem>
- </itemizedlist>
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Ir a Carpeta</guimenuitem></term>
- <listitem><para>
- Ver los elementos de una carpeta en particular.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Crear Nueva Carpeta</guimenuitem></term>
- <listitem><para>
- Este elemento ya no pertenece aquí.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Imprimir Mensaje</guimenuitem></term>
- <listitem><para>
- Imprime el mensaje actual.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Salir</guimenuitem></term>
- <listitem><para>
- Parar de usar <application>Evolution</application>.
- </para></listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect2>
-
- <sect2 id="menuref-universal-help">
- <title>El Menú Ayuda</title>
- <para>
- <variablelist>
- <varlistentry>
- <term><guimenuitem>Índice de la Ayuda</guimenuitem></term>
- <listitem><para>
- Muestra la tabla de contenidos de este documento.
- </para></listitem>
- </varlistentry>
- <varlistentry>
- <term><guimenuitem>Comenzando</guimenuitem></term>
- <listitem><para>
- Una vista rápida, y un resumen de las cosas que
- <application>Evolution</application> puede hacer por usted.
- </para></listitem>
- </varlistentry>
- <varlistentry>
- <term><guimenuitem>Usando el Correo</guimenuitem></term>
- <listitem><para>
- Una vista en profundidad del correo de <application>Evolution</application>.
- </para></listitem>
- </varlistentry>
- <varlistentry>
- <term><guimenuitem>Usando el Calendario</guimenuitem></term>
- <listitem><para>
- Una guía paso a paso sobre como usar el calendario.
- </para></listitem>
- </varlistentry>
- <varlistentry>
- <term><guimenuitem>Usando el Administrador de Contactos</guimenuitem></term>
- <listitem><para>
- Manejese con el administrador de contactos.
- </para></listitem>
- </varlistentry>
- <varlistentry>
- <term><guimenuitem>Enviar Reportes de Fallo</guimenuitem></term>
- <listitem><para>
- Si usted no se los dice, no podrán arreglarlos. Selececion esta opción para hacer saber a
- los desarrolladores lo que falla.
- </para></listitem>
- </varlistentry>
- <varlistentry>
- <term><guimenuitem>Acerca de Evolution</guimenuitem></term>
- <listitem><para>
- Muestra una ventana con información sobre la aplicación y sus autores.
- Tiene la misma información que <xref linkend="authors">.
- </para></listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect2>
- </sect1>
-
- <sect1 id="menuref-exec">
- <title>Menús del Resumen de Trabajo</title>
- <para>
- Dejaremos esta sección en blanco hasta que la UI se estabilize un
- poco más.
- </para>
- </sect1>
-
-
-
- <sect1 id="menuref-mail">
- <title>Menús del Correo</title>
- <para>
- El Correo de <application>Evolution</application> tiene más menús
- especializados, y más opciones de menú especializadas, que cualquier
- otra parte de la aplicación.
- </para>
-
- <sect2 id="menuref-mail-edit">
- <title>El Menú Edición</title>
- <para>
- Este menú está actualmente vacio.
- </para>
- </sect2>
-
- <sect2 id="menuref-mail-view">
- <title>El Menú Ver del Correo</title>
- <para>
- Este menú le permite controlar el modo en que
- <application>Evolution</application> le muestra su información.
- <variablelist>
- <varlistentry>
- <term><guimenuitem>Mostrar Barra de Atajos</guimenuitem></term>
- <listitem><para>
- Active y desactive la barra de atajos con esta opción.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Mostrar Barra de Carpetas</guimenuitem></term>
- <listitem><para>
- Active y desactive la barra de carpetas con esta opción.
- Vea <xref linkend="usage-mainwindow-folderbar"> para
- más información acerca de la barra de carpetas.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Lista de Mensajes Encadenados</guimenuitem></term>
- <listitem><para>
- Esta opción controla si la lista de sus mensajes se muestra siguiendo la cadena de la discusión
- o por otro criterio. La ordenación por defecto es por fecha.
- Vea <xref linkend="usage-mail-listorder"> para más
-información acerca de
- como ordenar la lista de mensajes.
- </para></listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect2>
-
- <sect2 id="menuref-mail-tools">
- <title>El Menú Configuración del Correo</title>
- <para>
- <variablelist>
- <varlistentry>
- <term><guimenuitem>Filtros de Correo</guimenuitem></term>
- <listitem><para>
- Edite aqui sus filtros de correo.
- Vea <xref linkend="usage-mail-organize-filters">
- para más información acerca de los filtrar correo.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Editor de Carpetas Virtuales</guimenuitem></term>
- <listitem><para>
- Cree, edite, y borre carpetas virtuales (<glossterm>vFolders</glossterm>)
- con esta herramienta.
- Para aprender acerca de como usar carpetas virtuales con su
- correo, vea <xref linkend="usage-mail-organize-vfolders">.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Configuración del Correo</guimenuitem></term>
- <listitem><para>
- Herramientas para configurar las preferencias de sus cuentas de correo.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Administrar Suscripciones</guimenuitem></term>
- <listitem><para>
- Herramientas para suscribirse a grupos de noticias y para las carpetas IMAP.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Olvidar Contraseña</guimenuitem></term>
- <listitem><para>
- Esta opción hara que <application>Evolution</application>
- olvide sus contraseñas.
- </para></listitem>
- </varlistentry>
-
- </variablelist>
- </para>
- </sect2>
-
- <sect2 id="menuref-mail-folder">
- <title>El Menú Carpetas del Correo</title>
- <para>
- Estos elementos de este menú se refieren a las carpetas de
- correo de <application>Evolution</application>.
- </para>
- <para>
- Usted puede:
- <variablelist>
-
- <varlistentry>
- <term><guimenuitem>Marcar todos como Leídos</guimenuitem></term>
- <listitem><para>
- <application>Evolution</application> se acuerda de que mensajes ha
- leído; para marcar todos los mensajes de una carpeta como leídos elija esta opción.
- Puede marcar un solo mensaje como leído pulsando con el botón derecho en la barra de mensajes.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Borrar Todos</guimenuitem></term>
- <listitem><para>
- Esta es la opción favorita de todo aquel con demasiado correo basura: un click, y borra
- todos los mensajes de la carpeta actual.
- </para></listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term><guimenuitem>Comprimir</guimenuitem></term>
- <listitem><para>
- Vacia la carpeta de la papelera, borrando los mensajes permanentemente.
- Un vez que ha echo esto, son eliminados para siempre.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Configurar Carpeta</guimenuitem></term>
- <listitem><para>
- Use esta opción para seleccionar el formato de archivo en el
- que <application>Evolution</application> guarda el correo.
- Puede elegir entre archivos tipo
- <systemitem><filename>mbox</filename></systemitem> estandar
- al estilo UNIX, o el formato
- <systemitem><filename>mh</filename></systemitem>.
- Convertir buzones grandes tarda mucho tiempo, y es una buena
- idea tener una copia de seguridad antes de la conversión.
- </para></listitem>
- </varlistentry>
-
- </variablelist>
- </para>
- </sect2>
-
- <sect2 id="menuref-mail-message">
- <title>El Menú Mensajes del Correo</title>
- <para>
- Las opciones de este menú se refieren a los mensajes de correo de
- <application>Evolution</application>. La mayoría de ellos
- requieren que haya un mensaje seleccionado, y están tambien
- disponibles pulsando con el botón derecho sobre un mensaje de la
- lista de mensajes.
- </para>
- <para>
- <variablelist>
-
-
- <varlistentry>
- <term><guimenuitem>Abrir en una Nueva Ventana</guimenuitem></term>
- <listitem><para>
- Muestra el mensaje seleccionado en una nueva ventana.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Editar Mensaje</guimenuitem></term>
- <listitem><para>
- Abre el mensaje seleccionado en el compositor de mensajes. Solo
- puede editar mensajes que haya escrito usted: drafts y mensajes en
- la carpeta <guilabel>Enviados</guilabel>.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Imprimir Mensaje</guimenuitem></term>
- <listitem><para>
- Muestra la ventana de <interface>Vista Previa</interface>,
- lista para imprimir.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Responder al Remitente</guimenuitem></term>
- <listitem><para>
- Abre una ventana con el compositor de mensajes con la dirección
- puesta al autor del mensaje. Cubierto en detalle en
- <xref linkend="usage-mail-getnsend-send-reply">.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Responder a Todos</guimenuitem></term>
- <listitem><para>
- Abre una ventana con el compositor de mensajes con la dirección
- puesta al autor del mensaje y a todos los destinatarios conocidos.
- Cubierto en detalle en <xref linkend="usage-mail-getnsend-send-reply">.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Reenviar</guimenuitem></term>
- <listitem><para>
- Adjunta el cuerpo del mensaje seleccionado a un nuevo mensaje.
- Cubierto en detalle en <xref linkend="usage-mail-getnsend-fwd">.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Borrar Mensaje</guimenuitem></term>
- <listitem><para>
- Marca un mensaje para borrar.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Mover Mensaje</guimenuitem></term>
- <listitem><para>
- Elije una carpeta a la cual enviar este mensaje.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Copiar Mensaje</guimenuitem></term>
- <listitem><para>
- Copia el mensaje seleccionado a otra carpeta.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>VFolder según el Asunto</guimenuitem></term>
- <listitem><para>
- Este elemento, y los tres que le siguen, crearán carpetas
- virtuales que podrá personalizar más o guardar tal cual. Este creará una
- carpeta virtual que mostrará todos los mensajes que contengan la
- línea del asunto del mensaje seleccionado.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>VFolder según el Remitente</guimenuitem></term>
- <listitem><para>
- Crea una carpeta virtual para poner en ella todos los mensajes del
- remitente del mensaje seleccionado.
- </para></listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term><guimenuitem>VFolder según Destinatarios</guimenuitem></term>
- <listitem><para>
- Crea una carpeta virtaul para poner en ella todos enviados a los
- destinatarios del mensaje seleccionado.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Filtro según el Asunto</guimenuitem></term>
- <listitem><para>
- Este elemento, y los tres siguientes, crearán filtros para los que
- debe elegir una acción. Puede conservar el criterio como
- está, o modificarla como quiera. Este creará un filtro que
- afectará a todos los mensajes que contengan la línea del
- asunto del mensaje seleccionado.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Filtrar según Remitente</guimenuitem></term>
- <listitem><para>
- Crea un filtro que afectará a todos los mensajes del remitente del
- mensaje seleccionado.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Filtrar según Destinatarios</guimenuitem></term>
- <listitem><para>
- Crea un filtro que afectará a todos los mensajes dirigidos a los
- destinatarios del mensaje seleccionado.
- </para></listitem>
- </varlistentry>
-
- </variablelist>
- </para>
- </sect2>
-
- <sect2 id="menuref-mail-messagelistheader">
- <title>El Menú del Botón Derecho en la Cabecera</title>
- <para>
- En la parte superior de la lista de mensajes está la cabecera de
- la lista de mensajes. Puede pulsar en cualquiera de los títulos
- individuales &mdash;
- <guilabel>Asunto</guilabel>, por ejemplo, para ordenar la lista
- de mensajes por ese atributo. Eso si, si pulsa el botón derecho
- sobre uno de los títulos, obtendrá el siguiente menú:
- </para>
-
- <para>
- <variablelist>
-
- <varlistentry>
- <term><guimenuitem>Ordenar Ascendentemente</guimenuitem></term>
- <listitem><para>
- Ordenar la lista, en orden ascendente, según el atributo sobre el que
- pulsó.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Ordenar Descendentemente</guimenuitem></term>
- <listitem><para>
- Ordenar la lista en orden descendente.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Desordenar</guimenuitem></term>
- <listitem><para>
- Deshacer cualquier ordenación mediante este atributo, y dejar la lista
- según el orden anterior.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Agrupar según este Campo</guimenuitem></term>
- <listitem><para>
- En lugar de ordenar los mensajes, los agrupa en cajas.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Agrupar por Caja</guimenuitem></term>
- <listitem><para> Si tiene los mensajes agrupados en cajas,
- puede agrupar del mismo modo las cajas, eligiendo este
- elemento. </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Quitar esta columna</guimenuitem></term>
- <listitem><para>
- Elija esto para quitar una columna de la vista de la lista de mensajes.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Selector de Campos</guimenuitem></term>
- <listitem><para>
- Abre una paleta de columnas. Usted puede arrastra las columnas
- que quiera desde la paleta hasta la posición en la barra de cabecera
- de la lista de mensajes; aparecen flechas rojas cunado se acerca los
- suficiente a una posición posible.</para>
-
- <para>
- Sus opciones son:
- <itemizedlist>
- <listitem><para>
- <guiicon>Un Sobre</guiicon> el cual indica cuando un mensaje a sido leído (cerrado para no leído, abierto para leído).
- </para></listitem>
-
- <listitem><para>
- <guiicon>Un Signo de Exclamación</guiicon> para la prioridad
- </para></listitem>
-
- <listitem><para>
- <guiicon>Un Pingüino</guiicon> el cual indica algo, aunque no estoy seguro de que.
- </para></listitem>
-
- <listitem><para>
- <guiicon>Un Clip</guiicon> el cual indica que hay un adjunto en el mensaje.
- </para></listitem>
-
- <listitem><para>
- <guilabel>De</guilabel>, para el campo <guilabel>De</guilabel> del mensaje.
- </para></listitem>
- <listitem><para>
- <guilabel>Asunto</guilabel>, para el campo <guilabel>Asunto</guilabel> del mensaje.
- </para></listitem>
-
- <listitem><para>
- <guilabel>Fecha</guilabel>, para la fecha y la hora en que se mandó el mensaje.
- </para></listitem>
-
- <listitem><para>
- <guilabel>Recibido</guilabel>, para la fecha y la hora en la que recibió en mensaje.
- </para></listitem>
-
- <listitem><para>
- <guilabel>A</guilabel>, para el campo <guilabel>A</guilabel>.
- </para></listitem>
-
- <listitem><para>
- <guilabel>Tamaño</guilabel>, para el tamaño del mensaje.
- </para></listitem>
- </itemizedlist>
- </para>
-
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Alineación</guimenuitem></term>
- <listitem><para> Use este elemento para decidir sobre la alineación
- de los atributos de los mensajes en sus columnas.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Mejor Colocación</guimenuitem></term>
- <listitem><para>
- Modifica el ancho de las columnas de la lista de mensajes para
-maximizar la cantidad de información mostrada.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Formato de las Columnas...</guimenuitem></term>
- <listitem><para>
- Este elemento no está disponible todavía.
- </para></listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term><guimenuitem>Personalizar
- Vistas...</guimenuitem></term> <listitem><para> Abre una
- caja de diálogo que le permite elegir una ordenación compleja para
- su lista de mensajes, así puede combinar ordenar y agrupar de tantas
- maneras como quiera.
- </para></listitem>
- </varlistentry>
-
- </variablelist>
- </para>
- </sect2>
- </sect1>
-
- <sect1 id="menuref-mail-editor">
- <title>Los Menús del Compositor de Mensajes</title>
- <para>
- La ventana de composición de mensajes tiene su propio juego de menús:
- <guimenu>Archivo</guimenu>, que controla las operaciones sobre los
- archivos y los datos, <guimenu>Editar</guimenu>, para la edición de
- textos, <guimenu>Formato</guimenu>, que controla el formato de los
- mensajes que envía, <guimenu>Vista</guimenu>, que determina como ve el
- mensaje, y <guimenu>Insertar</guimenu>, que tiene herramientas para
- incluir archivos y otros objetos en los mensajes. Aquí esta lo que
-hay en ellos:
- </para>
- <sect2 id="menuref-mail-editor-file">
- <title>El Menú Archivo del Compositor de Mensajes</title>
- <para>
- <variablelist>
- <varlistentry>
- <term><guimenu>Abrir</guimenu></term>
- <listitem><para>
- Abre un archivo de texto o el borrador de un mensaje.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenu>Guardar</guimenu></term>
- <listitem><para>
- Guarda un mensaje de correo como un archivo de texto.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenu>Guardar Como</guimenu></term>
- <listitem><para>
- Elija un nombre de archivo y un lugar para
- el mensaje que quiere guardar como un archivo de texto.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenu>Guardar en una Carpeta</guimenu></term>
- <listitem><para>
- Guarda un mensaje como un borrador, en lugar de como
- un archivo de texto independiente.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenu>Insertar Archivo de Texto</guimenu></term>
- <listitem><para>
- Abre un archivo de texto y lo inserta en el mensaje
- actual. (FIXME: belongs under "Insert").
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenu>Enviar Ahora</guimenu></term>
- <listitem><para>
- Envia el mensaje inmediatamente.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenu>Enviar más Tarde</guimenu></term>
- <listitem><para>
- Lo pone en la cola de mensajes
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenu>Cerrar</guimenu></term>
- <listitem><para>
- Cierra el compositor de mensajes. Si no lo ha echo ya,
- <application>Evolution</application>
- le preguntará si quiere guardar su mensaje.
- </para></listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect2>
- <sect2 id="menuref-mail-editor-edit">
- <title>El Menú Editar del Compositor de Mensajes</title>
- <para>
- El menú <guimenu>Editar</guimenu> en el compositor de mensajes
- contiene los siguientes elementos. Los atajos de teclado están
- al lado de los elementos en los propios menús.
-
- <variablelist>
-
- <varlistentry>
- <term><guimenuitem>Deshacer</guimenuitem></term>
- <listitem><para>
- Deshace la última acción realizada.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Rehacer</guimenuitem></term>
- <listitem><para>
- Si cambia de idea sobre Deshacer algo,
- siempre puede usar esta opción.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Cotar</guimenuitem></term>
- <listitem><para>
- Elimina el texto seleccionado de la ventana de edición y lo
- guarda en la memoria del "portapapeles" del sistema, listo para pegarlo.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Copia</guimenuitem></term>
- <listitem><para>
- Copia el texto seleccionado al portapapeles del sistema sin borrarlo.
- Entoces el texto puede ser insertado en otra parte con el
- comando <guimenuitem>Pegar</guimenuitem>.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Pegar</guimenuitem></term>
- <listitem><para>
- Inserta el contenido del portapapeles del sistema en la
- posición del cursor.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Buscar</guimenuitem></term>
- <listitem><para>
- Escriba una frase y encuantra las coincidencias en el cuerpo
- del mensaje. Como con
- <guimenuitem>Buscar Expresión</guimenuitem>,
- <guimenuitem>Buscar de nuevo</guimenuitem>, y
- <guimenuitem>Remplazar</guimenuitem>, <application>Evolution</application>
- le ofrecerá la opción de buscar hacia adelante o hacia atras.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Buscar Expresión</guimenuitem></term>
- <listitem><para>
- Si esta familiarizado con las <glossterm>expresiones regulares</glossterm>,
- ha veces llamadas "regexes", puede buscar cosas más complicadas,
- usando comodines y lógica booleana.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Buscar de nuevo</guimenuitem></term>
- <listitem><para>
- Repite la última búsqueda.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Remplazar</guimenuitem></term>
- <listitem><para>
- Escriba una palabra o frase y la palabra o frase por la que le gustaría
- reemplazarla.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Propiedades</guimenuitem></term>
- <listitem><para>
- Esta opción muestra el Capplet de Propiedades del Compositor de Mensajes,
- una parte del Centro de Control de GNOME ue determina la
- asociación de teclas en el compositor de mensajes. La ayuda para este capplet está
- disponible directamente en el Centro de Control.
- (FIXME: Write that help doc too) (FIXME: this is in the wrong place!)
- </para></listitem>
- </varlistentry>
-
- </variablelist>
- </para>
- </sect2>
- <sect2 id="menuref-mail-composer-format">
- <title>El Menú Formato del Compositor de Mensajes</title>
- <para>
- El menú <guimenu>Formato</guimenu> solo tiene una opción:
- <variablelist>
- <varlistentry>
- <term><guimenuitem>HTML</guimenuitem></term>
- <listitem><para>
- Activa el modo HTML para el compositor de mensajes. Cuando esta seleccionado,
- los mensajes se muestran y se envian en HTML. Si ha escrito un mensaje
- en HTML y desactiva la opción HTML, se perderá la mayor parte del formato.
- Eso si, <application>Evolution</application> intentará consevar los
- espacios y eliminar el formato con cuidado.
- </para></listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect2>
- <sect2 id="menuref-mail-composer-view">
- <title>El Menú Ver del Compositor de Mensajes</title>
- <para>
- El menú <guimenu>Vista</guimenu> controla la manera en que se
- muestran sus mensajes, y cuanto del mensaje, de su cabecera y de los
- adjuntos se muestra. Contiene:
- <variablelist>
- <varlistentry>
- <term><guimenuitem>Mostrar Adjuntos</guimenuitem></term>
- <listitem><para>
- Activa el mostrar los adjuntos. Cuando esta opción está seleccionada,
- <application>Evolution</application> creará una caja separada
-de la ventana
- del compositor de mensajes para mostrar que archivos adjuntos está añadiendo
- al mensaje.
- </para></listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect2>
- <sect2 id="menuref-mail-composer-insert">
- <title>El Menú Insertar del Compositor de Mensajes</title>
- <para>
- El menú <guimenu>Insertar</guimenu> contiene herramientas que le
- permiten incluir imágenes, reglas horizontales, y otros objetos en
- el cuerpo del mensaje. Las herramientas son:
- <variablelist>
-
- <varlistentry>
- <term><guimenuitem>Imagen</guimenuitem></term>
- <listitem><para>
- Esta herramienta le pedirá que seleccione una imagen para
- insertarla en su mensaje en HTML. Para mensajes de texto,
- esto es lo mismo que adjuntar la imagen.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Enlace</guimenuitem></term>
- <listitem><para>
- Abre la <interface>ventana de creación de enlaces</interface>,
- que le permite especificar la URL y un descripción para el
- enlace de su mensaje. Tan solo funciona con mensajes en
- HMTLs.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Regla</guimenuitem></term>
- <listitem><para>
- Abre el <interface>diálogo de creación de reglas horizontales</interface>, el cual le permite
- crear una regla horizontal en HTML. Para más información, vea
- <xref linkend="usage-mail-getnsend-send-html">.
- Esta herramienta solo funciona con mensajes en HTML.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Archivo de Texto</guimenuitem></term>
- <listitem><para>
- Abre un archivo de texto y lo inserta en el mensaje actual.
- Esta herramienta funciona tanto con mensajes de texto como
- mensajes en HTML.
- </para></listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect2>
- </sect1>
-
- <sect1 id="menuref-cal">
- <title>Los Menús del Calendario</title>
- <para>
- La ventana principal del calendario tiene los mismos menús que la
- ventana principal del cliente de correo. Aunque, sus contenidos
- varian de varios modos.
- </para>
- <sect2 id="menuref-cal-edit">
- <title>El Menú Editar del Calendario</title>
- <para>
- El contenido del menu Editar no esta todavía fijo, así que no lo
- voy a documentar todavía. (Esto significa ARREGLAME). Deberian
- ser:
-
- <variablelist>
- <varlistentry>
- <term><guimenuitem>Elemento</guimenuitem></term>
- <listitem><para>
- Descripción
- </para></listitem>
- </varlistentry>
- <varlistentry>
- <term><guimenuitem>Elemento</guimenuitem></term>
- <listitem><para>
- Descripción
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Elemento</guimenuitem></term>
- <listitem><para>
- Descripción
- </para></listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect2>
- <sect2 id="menuref-cal-view">
- <title>El Menú Ver del Calendario</title>
- <para>
- El menú <guimenu>Vista</guimenu> del calendario contiene las siguientesins opciones:
-
- <variablelist>
- <varlistentry>
- <term><guimenuitem>Mostrar la Barra de Atajos</guimenuitem></term>
- <listitem><para>
- Active y desactive la barra de atajos con esta opción.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Mostrar la Barra de Carpetas</guimenuitem></term>
- <listitem><para>
- Active y desactive la barra de carpetas con esta opción.
- Vea <xref linkend="usage-mainwindow-folderbar"> para
- más información acerca de la barra de carpetas.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Vista por Días</guimenuitem></term>
- <listitem><para>
- Cambia el calendario a la vista diaria.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Vista Cinco Días</guimenuitem></term>
- <listitem><para>
- Muestra cinco días del calendario de una vez.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Vista por Semanas</guimenuitem></term>
- <listitem><para>
- Cambia el calendario a la vista semanal.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Vista por meses</guimenuitem></term>
- <listitem><para>
- Vea todo un mes al tiempo.
- </para></listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect2>
-
- <sect2 id="menuref-cal-settings">
- <title>El Menú Configuración del Calendario</title>
- <para>
- Este menú está vacío.
- </para>
- </sect2>
-
- </sect1>
-
- <sect1 id="menuref-cal-editor">
- <title>Los Menús del Editor de Citas</title>
- <para>
- El editor de citas tiene sus propios menús, para ayudarle a usar sus
- amplias posibilidades.
- </para>
-
- <sect2 id="menuref-cal-editor-file">
- <title>El Menú Archivo del Editor de Citas</title>
- <para>
- Este menú contiene varias opciones, incluyendo un sub-menú <guisubmenu>Nuevo</guisubmenu> que es identico al del
- <link linkend="menuref-universal-file">menú archivo de la ventana principal</link>.
- Sus otros contenidos son:
- <variablelist>
-
- <varlistentry>
- <term><guimenuitem>Enviar</guimenuitem></term>
- <listitem><para>
- Abre un mensaje de correo con la cita adjunta a el.
- </para></listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term><guimenuitem>Guardar</guimenuitem></term>
- <listitem><para>
- Guarda esta cita en la posición y nombre actual. Si todavía no ha elegido
- una posición y un nombre, esto es lo mismo que <guimenuitem>Guardar Como</guimenuitem>.
- </para></listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term><guimenuitem>Guaradar Como</guimenuitem></term>
- <listitem><para>
- Eliga una posición y un nombre para esta cita, y guardela.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Borrar</guimenuitem></term>
- <listitem><para>
- Borra la cita.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Mover a una Carpeta</guimenuitem></term>
- <listitem><para>
- Elija una carpeta, y mueva a ella la cita.
- </para></listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term><guimenuitem>Copiar a una Carpeta</guimenuitem></term>
- <listitem><para>
- Elija una carpeta, y ponga en ella una copia de la cita.
- </para></listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term><guimenuitem>Sub-menú de Configuración de Página</guimenuitem></term>
- <listitem><para>
- Este menú contiene dos opciones:
- <itemizedlist>
- <listitem><para>
- <guimenuitem>Estilo del Memorando</guimenuitem> &mdash;
- FIXME: What does this do?
- </para></listitem>
-
- <listitem><para>
- <guimenuitem>Definir Estilos de Impresión</guimenuitem> &mdash;
- FIXME: What does this do?
- </para></listitem>
- </itemizedlist>
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Vista Previa</guimenuitem></term>
- <listitem><para> Muestra el aspecto que tendrán su cita si la
- imprime. Vea <xref linkend="usage-print">
- para más detalles sobre imprimir y la función de Vista Previa.
- </para></listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term><guimenuitem>Imprimir</guimenuitem></term>
- <listitem><para>
- Imprime la cita sin vista previa.
- </para></listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term><guimenuitem>Propiedades</guimenuitem></term>
- <listitem><para>
- FIXME: What does this do?
- </para></listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term><guimenuitem>Cerrar</guimenuitem></term>
- <listitem><para>
- Cierra la ventana del editor de citas.
- </para></listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect2>
-
- <sect2 id="menuref-cal-editor-edit">
- <title>El Menú Editar del Editor de Citas</title>
- <para>
- ARREGLAME: este menú esta copiado y pegado completamente de otro
- sitio.
- </para>
- </sect2>
-
- <sect2 id="menuref-cal-editor-view">
- <title>El Menú Ver del Editor de Citas</title>
- <para>
- Este menú le permite ver distintas citas, y configurar la forma de
- verlas, sin tener que volver a la <interface>Ventana
- Principal</interface>. Contiene:
- <variablelist>
-
- <varlistentry>
- <term><guisubmenu>Previa</guisubmenu></term>
- <listitem><para>
- La opción de este sub-menú le llevará a la cita anterior a
- la actual. (FIXME: describe).
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guisubmenu>Suiguiente</guisubmenu></term>
- <listitem><para>
- La opción de este sub-menú le llevará a la cita programada
- para despues de la actual. (FIXME: describe).
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Calendario</guimenuitem></term>
- <listitem><para>
- FIXME: What does this item do?
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guisubmenu>Barras de Herramientas</guisubmenu></term>
- <listitem><para>
- El sub-menú <guisubmenu>Barras de Herramientas</guisubmenu>
- le permite elegir que barras de herramientas son mostradas en
- el <interface>Editor de Citas</interface>. Estas son:
- <itemizedlist>
- <listitem><para>
- <guimenuitem>Estandar</guimenuitem> &mdash;
- Activa y desactiva la barra de herramientas estandar.
- </para></listitem>
-
- <listitem><para>
- <guimenuitem>Formato</guimenuitem> &mdash;
- Activa y desactiva la barra de herramientas de formato.
- </para></listitem>
-
- <listitem><para>
- <guimenuitem>Personalizada</guimenuitem> &mdash;
- Selecciona los contenidos de las barras de herramientas de formato y de la estandar.
- </para></listitem>
- </itemizedlist>
- </para></listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect2>
-
- <sect2 id="menuref-cal-editor-insert">
- <title>El Menú Insertar del Editor de Citas</title>
- <para>
- Este menú contiene: (FIXME: Insert Content Here)
- <variablelist>
- <varlistentry>
- <term><guimenuitem>Archivo</guimenuitem></term>
- <listitem><para>
- Elija un archivo para incluir a la cita o al petición de cita.
- </para></listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term><guimenuitem>Elemento</guimenuitem></term>
- <listitem><para>
- FIXME: ?
- </para></listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term><guimenuitem>Objeto</guimenuitem></term>
- <listitem><para>
- FIXME: ?
- </para></listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect2>
-
- <sect2 id="menuref-cal-editor-format">
- <title>El Menú Formato del Editor de Citas</title>
- <para>
- Thite menú contiene dos opciones, ninguna de las cuales tiene
- funcionalidad alguna todavía:
- <variablelist>
- <varlistentry>
- <term><guimenuitem>Fente</guimenuitem></term>
- <listitem><para>
- FIXME: ?
- </para></listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term><guimenuitem>Parrafo</guimenuitem></term>
- <listitem><para>
- FIXME: ?
- </para></listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect2>
-
- <sect2 id="menuref-cal-editor-tools">
- <title>El Menú Herramientas del Editor de Citas</title>
- <para>
- Este menú contiene cuatro opciones, incluyendo el sub-menú
- <guisubmenu>Formularios</guisubmenu>, el caul le permite modificar
- los formularios de los calendararios y crear sus propias entradas.
- Esto todavia no funciona.
-
- <variablelist>
-
- <varlistentry>
- <term><guimenuitem>Corrector Ortográfico</guimenuitem></term>
- <listitem><para>
- Comprueba la ortografía en las entradas del calendario.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Comprobar Nombres</guimenuitem></term>
- <listitem><para> Comprueba los nombres aquí enumerados contra los de
- su agenda de direcciones.
- </para></listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term><guimenuitem>Agenda de Direcciones</guimenuitem></term>
- <listitem><para>
- FIXME: ?
- </para></listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term><guisubmenu>Formularios</guisubmenu> Sub-menú</term>
- <listitem><para>
- El sub-menú Formularios le permite modificar la apariencia de
- de los Formularios del Calendario.
- </para></listitem>
- </varlistentry>
- </variablelist>
-
- </para>
- </sect2>
-
- <sect2 id="menuref-cal-editor-actions">
- <title>El Menú Acciones del Editor de Citas</title>
- <para>
- Este menú contiene:
-
- <variablelist>
- <varlistentry>
- <term><guimenuitem>Fijar una Reunión</guimenuitem></term>
- <listitem><para>
- Aparece la ventana de <interface>Invitación de Reunión</interface>,
- descrita en <xref linkend="usage-calendar-apts">.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Cancelar Invitación</guimenuitem></term>
- <listitem><para>
- Cancela el evento, notificandoselo a todos los asistentes. Puede que le pida que
- especifique un mensaje.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Reenviar como vCalendar</guimenuitem></term>
- <listitem><para>
- Abre el compositor de mensajes con el evento actual adjunto.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Reenviar como Texto</guimenuitem></term>
- <listitem><para>
- Abre el compositor de mensajes con una descripción en texto del evento actual
- incluida en el cuerpo del mensaje.
- </para></listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect2>
-
- <sect2 id="menuref-cal-editor-help">
- <title>El Menú Archivo del Editor de Citas</title>
- <para>
- Este menú está vacío.
- </para>
- </sect2>
-
- </sect1>
-
- <sect1>
- <title>Menús del Administrador de Contactos</title>
- <para>
- El administrador de contactos tiene seis menús:
- <guimenu>Archivo</guimenu>, <guimenu>Editar</guimenu>,
- <guimenu>Vista</guimenu>, <guimenu>Configuración</guimenu>,
- <guimenu>Herramientas</guimenu>, y
- <guimenu>Ayuda</guimenu>.
- </para>
-
- <sect2 id="menuref-contact-edit">
- <title>Menú Editar del Administrador de Contactos</title>
- <para>
- Este menú está vacío.
- </para>
- </sect2>
-
-
- <sect2 id="menuref-contact-view">
- <title>Menú Ver del Administrador de Contactos</title>
- <para>
- Este menú contiene las siguiente opciones:
-
- <variablelist>
- <varlistentry>
- <term><guimenuitem>Mostrar Barra de Atajos</guimenuitem></term>
- <listitem><para>
- Active y desactive la barra de atajos con esta opción.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Muestra la Barra de Carpetas</guimenuitem></term>
- <listitem><para>
- Active y descative la barra de carpetas con esta opción.
- Vea <xref linkend="usage-mainwindow-folderbar"> para
- más información acerca de la barra de carpetas.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Como un Tabla</guimenuitem> / <guimenuitem>As Minicards</guimenuitem></term>
- <listitem><para>
- Vea sus contactos como una tabla.
- Cuando esta en el modo tabla, está opción del menú aparece
- como <guimenuitem>Como Minitarjetas</guimenuitem>, y vuelve a
- cambiar la vista al formato minitarjetas.
- </para></listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect2>
-
- <sect2 id="menuref-contact-tools">
- <title>Menú Herramientas del Administrador de Contactos</title>
- <para>
- Este menú contiene una opción:
-
- <variablelist>
- <varlistentry>
- <term><guimenuitem>Buscar un
- Contacto</guimenuitem></term> <listitem><para> Abre una ventana
- para una busqueda en profundidad. <xref
- linkend="contact-search"> describe como usar esta característica.
- </para></listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect2>
-
-
-
- <sect2 id="menuref-contact-actions">
- <title>Menú Herramientas del Administrador de Contactos</title>
- <para>
- Este menú contiene unia sola opción:
-
- <variablelist>
- <varlistentry>
- <term><guimenuitem>Nuevo Servidor de Directorio</guimenuitem></term> <listitem><para> Muestra una ventana
- de búsqueda en profundidad. <xref
- linkend="config-prefs-contact-ldap-add"> describe como usar esta
- característica. </para></listitem>
- </varlistentry>
- </variablelist>
-
- </para>
- </sect2>
- </sect1>
-
- <sect1 id="menuref-contact-editor">
- <title>Los Menús del Editor de Contactos</title>
- <para>
- Esta ventana solo tiene un menú: el menú archivo.
- </para>
-
- <sect2 id="menuref-contact-editor-file">
- <title>Menú Archivo del Editor de Contactos</title>
- <para>
- Este menú contiene cinco opciones:
- <variablelist>
-
- <varlistentry>
- <term><guimenuitem>Guardar</guimenuitem></term>
- <listitem><para>
-
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Guardar como</guimenuitem></term>
- <listitem><para>
- Le permite guardar el contacto como un archivo externo en el
- formato <glossterm linkend="vcard">VCard</glossterm>.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Imprimir</guimenuitem></term>
- <listitem><para>
- Imprime el contacto actual.
- </para></listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term><guimenuitem>Borrar</guimenuitem></term>
- <listitem><para>
- Borra el contacto actual.
- </para></listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term><guimenuitem>Cerrar</guimenuitem></term>
- <listitem><para>
- Cierra el Editor de Contactos sin guardar.
- </para></listitem>
- </varlistentry>
-
- </variablelist>
- </para>
- </sect2>
- </sect1>
-
-
-</chapter>
-
-
-
-
-
-
-
diff --git a/doc/es/preface.sgml b/doc/es/preface.sgml
deleted file mode 100644
index 82b5856eb0..0000000000
--- a/doc/es/preface.sgml
+++ /dev/null
@@ -1,444 +0,0 @@
-<!--
-<!DOCTYPE preface PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.1//EN">
--->
-
- <preface id="introduction">
-<!-- =============Introduction ============================= -->
- <title>Introducción</title>
-
- <sect1 id="what">
- <title>¿Qué es Evolution, y qué puede hacer por mi?</title>
- <para>
- La información no sirve a menos que este organizada y sea accesible.
- Ni si quiera se merece ese nombre si no puede mirarla y estar
- <emphasis>informado</emphasis>.
- El objetivo de <application>Evolution</application> es hacer que las
- tareas de guardar, organizar, y obtener su información personal sean
- más fáciles, para que pueda trabajar y comunicarse con otros. Esto
- es, programa de <glossterm
- linkend="groupware">trabajo en grupo</glossterm> altamente
- evolucionado, una parte integral del escritorio conectado a Internet.
- Por dentro, es una potente base de datos. Por fuera, es una
- herramienta para ayudarle ha hacer su trabajo.
- </para>
- <para>
- Como parte de proyecto GNOME,
- <application>Evolution</application> is Software Libre. El
- programa y su código fuente están liberados bajo los términos de
- la <ulink type="help" url="gnome-help:gpl"><citetitle>General Public License "Licencia Pública
- General" (GPL)</citetitle></ulink> de GNU, y la
- documentación está bajo la <ulink type="help"
- url="gnome-help:fdl"><citetitle>Free Documentation
- License "Licencia Libre de Documentación"</citetitle></ulink>
- (FDL). Para más información acerca de la GPL y de la FDL,
- visite el sitio web de la Free Software Foundation "Fundación para
- el Software Libre" en <ulink
- url="http://www.fsf.org">http://www.fsf.org</ulink>.
- </para>
- <para>
- <note>
- <title>Esta es una liberación de prueba</title>
- <para>
- <application>Evolution</application> no esta completa, y
- todavía tiene muchos fallos. Por favor ayúdenos a mejorarla
- informandonos acerca de ellos. Debe hacerlo enviando reportes
- de fallo con la <application>Herramienta de Reportes de
- Fallo</application> de GNOME (conocida como
- <command>bug-buddy</command> en la línea de comandos).
- </para>
- </note>
- </para>
-
- <para>
- <application>Evolution</application> le puede ayudar a trabajar en
- grupo encargandose del correo, direcciones y otra información
- de contacto, y uno o más calendarios. Puede hacerlo en uno o varios
- ordenadores, conectados directamente o a traves de una red, para una
- persona o para grandes grupos.
- </para>
- <para>
- El proyecto de <application>Evolution</application> tiene cuatro
- objetivos principales:
-
- <itemizedlist>
- <listitem>
- <para>
- La aplicación debe ser <emphasis>al mismo tiempo potente
- y facil de usar</emphasis>. En otras palabras, necesita una
- interfaz familiar e intuitiva que los usuarios puedan
- personalizar a su gusto, y los usuarios deben tener acceso a
- atajos para tareas complicadas.
- </para>
- </listitem>
- <listitem>
- <para>
- <application>Evolution</application> debe cumplir y
- sobrepasar los estandares impuestos por otros programas de
- trabajo en grupo. Debe tener soporte para la mayor parte de
- los <glossterm linkend="protocol">protocolos</glossterm>
- de red para poder integrarse sin problemas con el hardware
- y los entornos de red existentes.
- </para>
- </listitem>
- <listitem>
- <para>
- El proyecto debe apoyar a los estandares abiertos y estar
- abierto a la expansion, para que se pueda convertir en una
- plataforma de desarollo tanto como en una aplicación.
- Desde los guiones más simples a la programación de red y
- componentes más compleja,
- <application>Evolution</application> debe ofrecer a los
- desarrolladores un entorno para el desarrollo de aplicaciones
- de vanguardia.
- </para>
- </listitem>
- <listitem>
- <para>
- Los datos deben ser seguros:
- <application>Evolution</application> no debe perder correo,
- corromper buzones u otra información, ejecutar
- <glossterm linkend="script">guiones</glossterm> de
- instruciones arbitrarios o borrar archivos de su disco duro.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- <para>
- <application>Evolution</application> está diseñada para hacer la
- mayoría de las tareas diarias más rápido. Por ejemplo, solo
- requiere una o dos pulsaciones introducir una nueva cita o una
- tarjeta que le hayan enviado por correo, o enviar un correo a un
- contacto o a una cita. <application>Evolution</application>
- hace las vistas más rápidas y eficientes, para que las búsquedas
- sean más rápidas y el uso de la memoria sea menor. Las personas
- que reciben mucho correo apreciarán las características avanzadas
- como las <link
- linkend="usage-mail-organize-vFolders">Carpetas Virtuales</link>,
- que le permiten guardar búsquedas como si fueran carpetas de correo
- normales.
- </para>
-
- </sect1>
-
- <sect1 id="aboutbook">
- <title>Acerca de este Libro</title>
- <!-- ************** FOLLOWING PARAGRAPH FOR DRAFT ONLY ************* -->
- <para>
- Esta versión de la Guía de Usuario de
- <application>Evolution</application> es un
- <emphasis>borrador</emphasis>. Describe la versión 0.6 del
- programa. Le faltan grandes piezas de información, y muchas de
- las arecteristicas que describe no están implementadas.
- Todo el contenido esta sujeto a cambios, especialmente si usted
- colabora. Por favor ebvie comentarios sobre la guía a
- <email>aaron@ximian.com</email> y sobre la traducción a
- <email>hector@scouts-es.org</email>. Si le gustaría colaborar en la
- guía por favor pongase en contacto conmigo o vea el <ulink
- url="http://developer.gnome.org/projects/gdp">sitio
- web</ulink> del proyecto de Documentación de GNOME. Este párrafo
- será eliminado en futuras versiones del manual.
- </para>
- <!-- ************* END DRAFT ONLY PARAGRAPH ************** -->
-
- <para>
- Thite libro está dividido en dos partes, con varios apendices.
- La primera parte es una <link linkend="usage">visita
- guiada</link>&mdash; le explicará como usar
- <application>Evolution</application>. Si es nuevo en el uso de
- <application>Evolution</application> o de los programas de trabajo
- en grupo en general, esta sección es para usted. La segunda sección,
- cubriendo la <link linkend="config">configuración</link>, está
- dirijida a usuarios más avanzados, pero cualquiera que quiera
- cambiar el aspecto o el comportamiento de
- <application>Evolution</application> se beneficiará de su lectura.
- Ademas, hay una <link linkend="menuref">referencia de menús</link>
- que describe casi todas las posibilidades que ofrece
- <application>Evolution</application>.
- </para>
- <formalpara>
- <title>Convenios Tipográficos</title>
- <para>
- Algunas clases de palabras están escritas con una tipografía especial:
- <simplelist>
- <member><application>Aplicaciones</application></member>
- <member><command>Comandos</command> escritos en la línea de comandos</member>
- <member><guilabel>Etiquetas</guilabel> de elementos de la interfaz</member>
-
- <member> La opcciones de los menús aparecen así:
- <menuchoice>
- <guimenu>Menú</guimenu>
- <guisubmenu>Sub-menú</guisubmenu>
- <guimenuitem>Opción del Menú</guimenuitem>
- </menuchoice>
- </member>
- <member><guibutton>Butones</guibutton> que puede pulsar</member>
- <member><userinput>Cualquier cosa que
- escribe</userinput></member> <member><computeroutput>Salida
- del ordenador en texto</computeroutput></member>
- <member><glossterm linkend="apx-gloss">Palabras</glossterm>
- que están definidas en el <xref linkend="apx-gloss">.</member>
- </simplelist>
- </para>
- </formalpara>
- </sect1>
- <sect1 id="commontasks">
- <title>Referencia Rápida para Tareas Comunes</title>
- <para>
- Puede que quiera copiar esta sección y pegarla a la pared de al lado
- de su ordenador: es un resumen muy corto de la mayoría de las cosas
- que querrá hacer con <application>Evolution</application>, y
- referencias a las secciones del libro donde encontrará descripciones
- más profundas de dichas tareas.
- </para>
- <sect2 id="quickref-newthings">
- <title>Abriendo o Creando algo</title>
- <para>
- Aquí están los atajos de teclado y las opciones del menú que
- probablemente sean las que mas use:
-
- <variablelist>
-
- <varlistentry>
- <term>Crear una nueva carpeta</term>
- <listitem>
- <para>
- <menuchoice><guimenu>Archivo</guimenu><guisubmenu>Nuevo</guisubmenu>
- <guimenuitem>Carpeta</guimenuitem></menuchoice> o
- <keycombo action="simul">
- <keycap>Ctrl</keycap>
- <keycap>Shift </keycap>
- <keycap>C</keycap>
- </keycombo>
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Crear un nuevo Atajo en la Barra de Evolution</term>
- <listitem>
- <para>
- <menuchoice><guimenu>Archivo</guimenu>
- <guisubmenu>Nuevo</guisubmenu>
- <guimenuitem>Atajo de Evolution</guimenuitem> </menuchoice> o
- <keycombo action="simul">
- <keycap>Ctrl</keycap>
- <keycap>Shift</keycap>
- <keycap>A</keycap>
- </keycombo>
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Crear un nuevo mensaje de correo:</term>
- <listitem>
- <para>
- Use
- <menuchoice><guimenu>Archivo</guimenu><guisubmenu>Nuevo</guisubmenu><guimenuitem>Mensaje de
- Correo</guimenuitem> </menuchoice> o
- <keycombo action="simul">
- <keycap>Ctrl</keycap>
- <keycap>Shift </keycap>
- <keycap>M</keycap>
- </keycombo>
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Crear una nueva Cita</term>
- <listitem>
- <para>
- <menuchoice><guimenu>Archivo</guimenu>
- <guisubmenu>Nuevo</guisubmenu>
- <guimenuitem>Cita</guimenuitem> </menuchoice> o
- <keycombo action="simul">
- <keycap>Ctrl</keycap>
- <keycap>Shift</keycap>
- <keycap>T</keycap>
- </keycombo>
- </para>
- </listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term>Introducir un nuevo Contacto</term>
- <listitem>
- <para>
- <menuchoice><guimenu>Archivo</guimenu>
- <guisubmenu>Nuevo</guisubmenu>
- <guimenuitem>Contacto</guimenuitem> </menuchoice> o
- <keycombo action="simul">
- <keycap>Ctrl</keycap>
- <keycap>Shift</keycap>
- <keycap>C</keycap>
- </keycombo>
- </para>
- </listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term>Crear una nueva Tarea</term>
- <listitem>
- <para>
- <menuchoice><guimenu>Archivo</guimenu>
- <guisubmenu>Nuevo</guisubmenu>
- <guimenuitem>Tarea</guimenuitem> </menuchoice> o
- <keycombo action="simul">
- <keycap>Ctrl</keycap>
- <keycap>Shift</keycap>
- <keycap>T</keycap>
- </keycombo>
- </para>
- </listitem>
- </varlistentry>
-
- </variablelist>
- </para>
- </sect2>
- <sect2 id="quickref-mail">
- <title>Enviar Tareas por Correo</title>
- <para>
- Aquí están las tareas más comunes con el correo, y los
- atajos para manejarse por su buzón con el teclado en lugar
- de con el ratón:
- <variablelist>
- <varlistentry>
- <term>Comprobar Correo</term>
- <listitem>
- <para>
- Pulse <guibutton>Obtener</guibutton> en la barra de
- herramientas. No hay atajo de taclado para esto,
- pero puede pedir a <application>Evolution</application>
- que obtenga los nuevos mensajes periodicamente. Para
- hacerlo, FIXME.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Responder a un Mensaje</term>
- <listitem>
- <para>
- Para responder al remitente de un mensaje tan solo debe:
- pulsar <guibutton>Responder</guibutton> en la barra de
- herramientas, o pulsar
- <keycombo action="simul">
- <keycap>Ctrl</keycap>
- <keycap>R</keycap>
- </keycombo>
- </para>
- <para>
- Para responder al remitente y a todos los destinatarios
- visibles del mensaje, pulse <guibutton>Responder a
- Todos</guibutton> o seleccione el mensaje y pulse
- <keycombo action="simul">
- <keycap>Shift</keycap>
- <keycap>Ctrl</keycap>
- <keycap>R</keycap>
- </keycombo>
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Reenviar un Mensaje</term>
- <listitem>
- <para>
- Sleccione el mensaje o mensajes que quiere reenviar,
- y pulse <guibutton>Reenviar</guibutton> en la barra de
- herramientas, o pulse
- <keycombo action="simul">
- <keycap>Ctrl</keycap>
- <keycap>J</keycap>
- </keycombo>
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Abrir un Mensaje en una Nueva Ventana</term>
- <listitem>
- <para>
- Pulse dos veces sobre el mensaje que quiere ver, o
- seleccionelo y pulse
- <keycombo action="simul">
- <keycap>Ctrl</keycap>
- <keycap>O</keycap>
- </keycombo>
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Crear Filtros y Carpetas Virtuales</term>
- <listitem>
- <para>
- Puede crear filtros y carpetas virtuales basados en las
- caracteristicas de un mensaje específico desde el menú que
- aparece al pulsar el botón derecho del ratón.
- Alternativamente, seleccion un mensaje, y elija
- <menuchoice><guimenu>Configuración</guimenu>
- <guimenuitem>Filtros de Correo</guimenuitem> </menuchoice>
- o <menuchoice> <guimenu>Configuración</guimenu>
- <guimenuitem>Editor de Carpetas Virtuales</guimenuitem>
- </menuchoice>. Los filtros se discuten en <xref
- linkend="usage-mail-organize-filters">, y las carpetas
- virtuales en <xref
- linkend="usage-mail-organize-vfolders">.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
-
- </para>
- </sect2>
- <sect2 id="quickref-cal">
- <title>Calendario</title>
- <para>
- <variablelist>
- <varlistentry>
- <term></term>
- <listitem>
- <para>
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
-
- </para>
- </sect2>
- <sect2 id="quickref-contact">
- <title>Administrador de Contactos</title>
- <para>
-
-
- <variablelist>
- <varlistentry>
- <term></term>
- <listitem>
- <para>
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
-
-
- </para>
- </sect2>
- </sect1>
- </preface>
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/doc/es/usage-calendar.sgml b/doc/es/usage-calendar.sgml
deleted file mode 100644
index 1abbace951..0000000000
--- a/doc/es/usage-calendar.sgml
+++ /dev/null
@@ -1,373 +0,0 @@
-<!--
-<!DOCTYPE Chapter PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.1//EN">
--->
-
-<chapter id="usage-calendar">
- <title>El calendario de Evolution</title>
- <para>
- Para comenzar a usar el calendario, seleccione
- <guibutton>Calendario</guibutton> de la <interface>barra de
- atajos</interface>. Por defecto, el calendario empieza mostrando el
- horario para hoy sobre un fondo reglado. Arriba a la derecha, hay un
- calendario mensual que puede usar para cambiar de día. Debajo de eso,
- hay una <guilabel>Lista de Tareas</guilabel>, donde puede tener una
- lista de tareas separada de sus citas del calendario. La vista diaria
- del calendario se muestra en <xref linkend="usage-calendar-fig">.
-
- <!-- ============== Figure ============================= -->
- <figure id="usage-calendar-fig">
- <title>Vista del Calendario de Evolution</title>
- <screenshot>
- <screeninfo>Vista del Administrador de Contactos de Evolution</screeninfo>
- <graphic fileref="fig/calendar" format="png" srccredit="Aaron Weber">
- </graphic>
- </screenshot>
- </figure>
- <!-- ============== End of Figure ============================= -->
-
- </para>
- <sect1 id ="usage-calendar-view">
- <title>Maneras de ver su calendario</title>
-
- <para>
- La barra de herramientas le ofrece cuatro vistas distintas de su
- calendario: un día, cinco días, una semana, o un mes. Pulse sobre
- los botones con forma de calendario a la derecha de la barra de
- herramientas para alternar entre las distintas vistas. Tambien puede
- seleccionar un rango de días&mdash; tres días, diez días, quinzenas
- si quiere&mdash; en el pequeño calendario en la esquina superior
- derecha.
- </para>
- <para>
- Los botones <guibutton>Previo</guibutton> y <guibutton>
- Siguiente</guibutton> le moverán hacia alante y hacia atrás en las
- páginas de su calendario. Si está viendo solo a un día, verá la
- página de mañana o la de ayer. Si esta viendo su calendario por
- semanas, meses, quincenas, o cualquier otra cosa, se movera esa
- cantidad de tiempo. Para volver al día de hoy, pulse
- <guibutton>Hoy</guibutton>.
- </para>
- <para>
- Para ver una fecha espefica del calendario, pulse
- <guibutton>Ir A</guibutton> y seleccione la fecha en la ventana
- de diálogo que aparece.
- </para>
-
-
-<!-- ############### FIXME FIXME FIXME ############
-Caracteristica no implementada y que puede que no se implemente por falta
-de tiempo, recursos, e interes.
- <para>
- In addition, <application>Evolution</application> supports
- Hebrew, Muslim, and other calendar formats. To switch to a
- different calendar format, choose
- <guimenuitem>GUIMENUITEM</guimenuitem> from the
- <guimenu>GUIMENU</guimenu>.
- </para>
-################ END FIXME AREA ################## -->
-
- </sect1>
- <sect1 id="usage-calendar-apts">
- <title>Programando Citas con el Calendario de Evolution</title>
- <para>
- Naturalmente, querra usar el calendario para hacer algo más que
- saber que día es. Esta sección le contará como fijar eventos, poner
- alarmas, y especificar recurrencias en los eventos.
- </para>
- <sect2 id="usage-calendar-apts-basic">
- <title>Creando eventos</title>
- <para>
- Para crear un nuevo evento de calendario, seleccione
- <menuchoice>
- <guimenu>Archivo</guimenu>
- <guisubmenu>Nuevo</guisubmenu>
- <guimenuitem>Cita</guimenuitem>
- </menuchoice>
- o pulse el botón <guibutton>Nuevo</guibutton> a la izquierda de la barra
- de herramientas. El diálogo de <interface>Nueva Cita</interface>
- aparecerá con la habitual barra de menú, barra de herramientas, y ventana
- llenas de opciones.
- </para>
- <tip id="new-appointment-shortcut">
- <title>Atajo</title>
- <para>
- Si no necesita poner más información que la fecha y la hora de
- la cita, puede pichar simplemente en cualquier espacio en blanco
- del calendario y comenzar a escribir. Puede incluir otra
- información más tarde con el editor de citas.
- </para>
- </tip>
-
- <para>
- Su evento debe tener una fecha de inicio y de fin &mdash; por
- defecto, hoy &mdash; pero puede elegir entre darle una hora de
- inicio y de fin o marcarlo como un <guilabel>Evento de todo
- el día</guilabel>. Un <guilabel>Evento de todo el día</guilabel>
- aparece arriba en una lista de eventos diarios en lugar de dentro
- del día. Eso hace que sea más facil tener eventos que se solapen y
- que esten unos dentro de otros. Por ejemplo, una conferencia puede
- ser un evento de todo el día, y los encuentros en la conferencia
- serian eventos parciales. Naturalmente, los eventos con horarios
- específicos de inicio y fin tambien pueden solaparse. Cuenado lo
- hacen son mostrados como multiples columnas en la vista diaria del
- calendario.
- </para>
- <note>
- <title>Haciendo Dos Cosas A La Vez</title>
- <para>
- Si crea eventos de calendario que se superponen,
- <application>Evolution</application> los mostrará uno al lado del
- otro en su calendario. Eso si,
- <application>Evolution</application> no puede ayudarle ha hacer
- varias cosas al mismo tiempo.
- </para>
- </note>
- <para>
- Puede tener hasta cuatro <guilabel>Alarmas</guilabel>
- distintas, para cualquier momento antes de la hora que ha fijado
- para el evento. Puede tener una alarma de cada tipo:
- <variablelist>
- <varlistentry>
- <term><guilabel>Mostrar</guilabel></term>
- <listitem>
- <para>
- Aparecerá una ventana en la pantalla para recordarle el evento.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>Auditiva</guilabel></term>
- <listitem>
- <para>
- Eliga esta opción para que el ordenador emita una alarma
- auditiva.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>Programa</guilabel></term>
- <listitem>
- <para>
- Seleccione esto si quiere que alguna aplicación adicional se
- ejecute como recordatorio. Puede escribir su nombre en el campo
- de texto, o buscarla con el botón
- <guibutton>Buscar</guibutton>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>Correo</guilabel></term>
- <listitem>
- <para>
- <application>Evolution</application> enviará un mensaje
- recordatorio a la dirección que haya escrito en el campo de
- texto.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
-
- </para>
- <para>
- <guilabel>Clasificación</guilabel> es un poco más complicado,
- y solo afecta a los calendarios en red.
- <guilabel>Público</guilabel> es la categoría por defecto,
- y un evento público puede ser visto por cualquiera en la red de
- conpartición del calendario. <guilabel>Privado</guilabel> indica
- un nivel de seguridad, y <guilabel>Confidencial</guilabel> un
- nivel mayor. <!-- FIXME --> El significado y la implementecion de estas caracteristicas
- todavia no se han determinado. <!-- FIXME -->
- </para>
- <para>
- La pestaña <guilabel>Recurrencia</guilabel> le permite describir
- repeticiones en eventos que van desde una vez cada día a una vez
- cada 100 años. Puede tambien elegir cuando cesarán las
- repeticiones, y, bajo <guilabel>Excepciones</guilabel>, elegir
- días individuales en los que el evento <emphasis>no</emphasis> se
- realizará. Haga sus selecciones de izquierda a derecha, y formará
- una frase: "Cada dos semanas los lunes y los viernes hasta el 3 de
- enero de 2003" o "Cada mes el primer viernes durante 12
- ocurrencias".
- </para>
-
- <para>
- Una vez que haya acabado con toda la configuración, pulse en el icono
- del disco en la barra de herramientas. Esto guardará el evento y cerrará
- la ventana de edición de eventos. Si quiere, puede alterar el resumen del
- en la vista del calendario pulsando sobre ela y escribiendo. Puede
- cambiar otros valores pulsando con el botón derecho del ratón sobre el
- evento y eligiendo <guimenuitem>Editar esta cita</guimenuitem>.
- </para>
- </sect2>
-
-<!-- ############UNIMPLEMENTED FEATURES ###################
- ################## NO LO VOY A TRADUCIR PORQUE NO SE MUESTRA ######
-
- <sect2 id="usage-calendar-apts-group">
- <title>Appointments for Groups</title>
- <para>
- 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.
- </para>
- <note>
- <title>Unimplemented Feature</title>
- <para>This feature is not yet implemented.</para>
- </note>
-
- <para>
- In addition, you can use <application>Evolution</application>
- to mark a meeting request on another person's calendar. To do
- it, click <guibutton>New</guibutton> in the calendar toolbar,
- or select <menuchoice> <guimenu>File</guimenu>
- <guisubmenu>New</guisubmenu>
- <guimenuitem>Appointment</guimenuitem> </menuchoice> to bring
- up the <interface>new event</interface> window. Then describe
- the event as you would any other. Before you click
- <guibutton>OK</guibutton>, (INSERT DESCRIPTION HERE...).
- <application>Evolution</application> 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.
- </para>
- <para>
- To mark a tentative event as confirmed, click once on the
- event in the <interface>calendar view</interface> to select
- it, and then choose <guimenuitem>Event
- Properties</guimenuitem> from the <guimenu>Settings</guimenu>
- menu. In the <interface>Event Properties</interface> dialog
- window, click the "tentative" button to De-select the
- event.
- </para>
- </sect2>
-
-
- <sect2 id="usage-calendar-apts-privs">
- <title>Scheduling privileges</title>
- <para>
- 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.
- </para>
- </sect2>
- ########## END UNIMPLEMENTED FEATURESET ############ -->
-
- </sect1>
-
- <sect1 id="usage-calendar-todo">
- <title>La lista de tareas</title>
- <para>
- La lista de tareas, situada en la esquina inferior derecha del
- calendario, le permite mantener una lista de tareas separada de sus
- eventos de calendario. Las tareas son coloreadas y ordenadas por
- prioridad y fecha de vencimiento (vea <xref linkend="config-prefs">
- para más inforación), y son incluidas con la información del
- calendario cuando se sincroniza con dispositivo de mano. Puede usar
- la lista en un formato más grande eligiendo el botón
- <guibutton>Tareas</guibutton> de la barra de atajos o del arbol de
- carpetas.
- </para>
- <para>
- Para guardar una nueva tarea, pulse sobre el botón
- <guibutton>Añadir</guibutton>. <application>Evolution</application>
- mostrará una pequeña ventana con cinco elementos en ella:
-
- <variablelist>
- <varlistentry>
- <term> <guilabel>Resumen:</guilabel></term>
- <listitem>
- <para>
- La descripción que escriba aquí aparecerá en la lista Por
- Hacer.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term> <guilabel>Fecha de Plazo:</guilabel></term>
- <listitem>
- <para>
- Decida cuando vence el plazo para este elemnto.
- Puede escribir una fecha y una hora, o seleccionar una del
- <guibutton>Calendario</guibutton> y la hora de los menus desplegables.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>Prioridad:</guilabel></term>
- <listitem>
- <para>
- Seleccione un nivel de importancia desde 1 (más importante) a 9
- (menos importante).
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term> <guilabel>Comentarios sobre el elemento:</guilabel></term>
- <listitem>
- <para>
- Si lo desea, puede escribir aquí una descripción más detallada
- del elemento.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- <para>
- Una vez que ha añadido una tarea a su lista "por hacer", su resumen
- aparece en la sección <guilabel>Resumen</guilabel> de la lista de
- tareas. Para ver o editar una descripción detallada en un
- elemento, pulse dos veces sobre el, o seleccionelo y pulse
- <guibutton>Editar</guibutton>. Puede borrar un elemento
- seleccionandolo y pulsandolo en el botón <guibutton>Borrar</guibutton>.
- </para>
- </sect1>
-
- <sect1 id="usage-calendar-multiple">
- <title>Múltiples Calendarios</title>
- <para>
- <application>Evolution</application> le permite tener y mantener
- múltiples calendarios. Esto es útil si mantiene horarios para otras
- personas, si es el responsable de la búsqueda de recursos o
- habitaciones, o si tiene múltiples personalidades.
- </para>
-
- <example>
- <title>Manteniendo Múltiples Calendarios</title>
- <para>
- Keelyn, la encargada de oficina de una pequeña compañía, tiene
- un calendario para su propio horario. En la red local, mantiene
- uno para la sala de reuniones, para que la gente sepa cuando pueden
- concertar citas. Ademas de eso, mantiene un calendario que refleja
- cuando van a estar disponibles los consultores, y otro donde
- sigue los días en los que juegan los Red Sox.
- </para>
- </example>
- <para>
- Para crear un nuevo calendario, seleccione
- <menuchoice>
- <guimenu>Archivo</guimenu> <guisubmenu>Nuevo</guisubmenu>
- <guimenuitem>Calendario</guimenuitem>
- </menuchoice>.
- Puede colocar el calendario en cualquier carpeta de calendario y
- acceder a el desde la vista de carpetas. Las alarmas, la
- configuración, y las vistas de cada calendario se mantienen separadas
- unas de otras.
- </para>
-
- </sect1>
-</chapter>
-
-
-
-
-
-
-
-
-
-
diff --git a/doc/es/usage-contact.sgml b/doc/es/usage-contact.sgml
deleted file mode 100644
index c419b2e6b1..0000000000
--- a/doc/es/usage-contact.sgml
+++ /dev/null
@@ -1,619 +0,0 @@
-<!--
-<!DOCTYPE Chapter PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.1//EN">
--->
-
-<chapter id="usage-contact">
- <title>La Agenda de Direcciones de Evolution</title>
- <abstract>
- <para>
- The <application>Evolution</application> address book can
- handle all of the functions of an address book, phone book, or
- Rolodex. Of course, it's a lot easier to update
- <application>Evolution</application> than it is to change an
- actual paper book. <application>Evolution</application> also
- allows easy synchronization with hand-held devices. Since
- <application>Evolution</application> supports the <glossterm
- linkend="ldap">LDAP</glossterm> directory protocol, you can use
- it with almost any type of existing directory server on your
- network.
- </para>
- <para>
- Another advantage of the <application>Evolution</application>
- address book is its integration with the rest of the
- application. When you look for someone's address, you can also
- see a history of appointments with that person. Or, you can
- create address cards from emails with just a few clicks. In
- addition, searches and folders work in the same way they do in
- the rest of Evolution.
- </para>
- <para>
- This chapter will show you how to use the
- <application>Evolution</application> address book to organize
- any amount of contact information, share addresses over a
- network, and several ways to save time with everyday tasks. To
- learn about configuring the address book, see <xref
- linkend="config-prefs-contact">.
- </para>
- </abstract>
- <sect1 id="usage-contact-basic">
- <title>Empezando con la Agenda de Direcciones</title>
-
- <para>
- To open up your address book, click on
- <guibutton>Contacts</guibutton> in the shortcut bar, or select
- one of your contacts folders from the folder bar. <xref
- linkend="usage-contact-fig"> shows the address book in all
- its organizational glory. By default, the address book
- shows all your cards in alphabetical order, in a <glossterm
- linkend="minicard">minicard</glossterm> format. You can select
- other views from the <guimenu>View</guimenu> menu, and adjust
- the width of the columns by clicking and dragging the grey
- column dividers.
- </para>
-
-
- <figure id="usage-contact-fig">
- <title>Agenda de Direcciones de Evolution</title>
- <screenshot>
- <screeninfo>Evolution Address Book Window</screeninfo>
- <graphic fileref="fig/contact" format="png" srccredit="Aaron Weber">
- </graphic>
- </screenshot>
- </figure>
-
- <para>
- The toolbar for the address book is quite simple:
- <itemizedlist>
- <listitem><para>
- <guibutton>New</guibutton> creates a new card.
- </para></listitem>
-
- <listitem><para>
- <guibutton>Find</guibutton> brings up an in-depth search window.
- </para></listitem>
-
- <listitem><para>
- <guibutton>Print</guibutton> sends one or more of your cards to the printer.
- </para></listitem>
- <listitem><para>
- <guibutton>Delete</guibutton> deletes a selected card.
- </para></listitem>
-
- <listitem><para> <guibutton>View All</guibutton> displays all
- the address information in the folder. Use this button to
- refresh the display for a network folder, or to switch from
- viewing the results of a search and see the whole contents.
- </para></listitem>
-
- <listitem><para> <guibutton>Stop</guibutton> stops loading
- contact data from the network. This button is only
- relevant if you are looking at contact information on a
- network. </para></listitem>
- </itemizedlist>
- </para>
-
- <para>
- Your contact information fills the rest of the display. Move
- through the cards alphabetically with the buttons and the
- scrollbar at the right of the window. Of course, if you have
- more than a few people listed, you'll want some way of finding
- them more quickly, which is why there's a search feature.
- </para>
-
- <sect2 id="contact-search">
- <title>Buscando Contactos</title>
- <para>
- Entre <guilabel>Borrar</guilabel> y <guilabel>Ver
- Todo</guilabel> hay un campo de búsqueda rápida. Para usarlo,
- elija de la lista descendente que clase de búsqueda quiere hacer
- (toda la tarjeta, solo el nombre, o solo la dirección de correo),
- entonces escriba una o más palabras en la caja de entrada de texto,
- y pulse <keycap>Enter</keycap>.
- <application>Evolution</application> buscará en los contenidos
- de todas las tarjetas mostradas para encontrar una que concuerde.
- Puede refinar las búsquedas haciendo varias búsquedas sucesivas,
- o empezar de nuevo pulsando el botón <guibutton>Ver
- Todas</guibutton>.
- </para>
- <para>
- Si no hay coincidencias, la tarjeta mostrada estará en blanco.
- Cuando quiera volver a ver todas las tarjetas de nuevo, pulse
- <guilabel>Mostrar Todas</guilabel>.
- </para>
- <example id="contact-quicksearch-ex">
- <title>Refinando una Búsqueda Rápida</title>
- <para>
- Tom vuelve de almorzar y se encuantra una nota en su teclado:
- "Le ha llamado Curtis de ventas, pero no dejo un teléfono,
- y se me olvidó anotar la compañía para la que trabaja. Eso si, dijo
- que era importante."
- Tom no está molesto en absoluto.
- </para>
- <para>
- Abre la carpeta de contactos, y realiza una busqueda rápida por
- "Curtis". Hay dieciocho personas diferentes con ese nombre en el
- archivo. Entonces escribe "Ventas", y
- <application>Evolution</application> lo reduce al Curtis correcto.
- Tan solo se siente molesto cuando descubre que la llamada no era
- realmente importante.
- </para>
- </example>
-
- <para>
- Si prefiere realizar una búsqueda más compleja, pulse
- <guibutton>Buscar</guibutton> o elija
- <menuchoice><guimenu>Herramientas</guimenu><guimenuitem>Buscar
- Contacto</guimenuitem></menuchoice>. Esto abrirá la ventana de
- búsqueda a fondo, que le permitirá usar multiples criterios de
- búsqueda de la misma manera que en los filtros de correo y las
- <glossterm linkend="vfolder">carpetas virtuales</glossterm>.
- </para>
- <para>
- Pulse <guibutton>Añadir Criterio</guibutton> para aumentar el
- número de criterios que quiere usar en la búsqueda, y
- <guibutton>Eliminar Criterio</guibutton> para eliminar uno del la
- parte inferior de la lista. Su criterio puede ser una búsqueda en
- los campos <guilabel>Nombre</guilabel> o
- <guilabel>Correo</guilabel>. Alternativamente puede elegir buscar en
- todos los campos con una expresión regular. Entonces, puede
- seleccionar entre los requisistos <guilabel>Comienza con</guilabel>
- y <guilabel>No contiene</guilabel>, decidir si deben conincidir
- <guilabel>Todos</guilabel> o <guilabel>Alguno</guilabel> de sus
- criterios, y pulsar <guibutton>Buscar</guibutton> para ejecutar
- todo.
- </para>
-
- </sect2>
-
- </sect1>
- <sect1 id="usage-contact-cards">
- <title>Destruir, Crear, y Cambiar: El Editor de Contactos</title>
- <para>
- To delete a card, click on it once to select it, then press the
- <guibutton>Delete</guibutton> button. If you have multiple
- cards selected, you'll delete multiple cards.
- </para>
- <para>
- Si quiere añadir o cambiar tarjetas, usará el editor de contactos.
- Para cambiar una tarjeta que ya existe, pulse dos veces sobre ella
- para abrir la ventana del editor de contactos con toda la información
- actual. Si quiere crear una nueva, pulsando el botón
- <guibutton>Nuevo</guibutton> el la barra de herramientas abrirá la
- misma ventana, con los campos en blanco para que los rellene.
- </para>
-
- <para>
- La ventana del editor de contactos tiene dos pestañas,
- <guilabel>General</guilabel>, para información contacto básica,
- y <guilabel>Detalles</guilabel>, para una descripción más específica
- de la persona. Ademas, contiene un menú
- <guimenu>Archivo</guimenu>, (ver <xref
- linkend="menuref-contact-editor">) y una barra de herramientas con
- tres elementos: <guilabel>Guardar y Cerrar</guilabel>,
- <guilabel>Imprimir</guilabel>, y <guilabel>Borrar</guilabel>.
- </para>
-
- <figure id="usage-contact-editor-fig">
- <title>Editor de contactos de Evolution</title>
- <screenshot>
- <screeninfo>Evolution Contact Editor</screeninfo>
- <graphic fileref="fig/contact-editor.png" format="png" srccredit="Aaron Weber">
- </graphic>
- </screenshot>
- </figure>
-
- <para> La pestaña <guilabel>General</guilabel> tiene siete secciones,
- cada una con un icono, una cara, para el nombre y la compañía, un
- teléfono para números de teléfono, un sobre para direcciones de
- correo, un globo terraqueo para direcciones de páginas web, una
- casa para dirección postal, un archivador para contactos, y una
- cartera para categorías.
- </para>
- <para>
- <variablelist>
-
- <varlistentry>
- <term>Full Name</term>
- <listitem>
- <para>
- The <guilabel>Full Name</guilabel> field has two
- major features:
- <itemizedlist>
- <listitem>
- <para>
- You can enter a name into the <guibutton>Full
- Name</guibutton> field, but you can also click the
- <guibutton>Full Name</guibutton> button to bring
- up a small dialog box with a few text boxes
- <variablelist>
- <varlistentry>
- <term><guilabel>Title: </guilabel></term>
- <listitem> <para>
- Enter an honorific or select one from the menu.
- </para></listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>First: </guilabel></term>
- <listitem> <para>
- Enter the first, or given, name.
- </para></listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>Middle: </guilabel></term>
- <listitem> <para>
- Enter the middle name or initial, if any.
- </para></listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>Last: </guilabel></term>
- <listitem> <para>
- Enter the last name (surname).
- </para></listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>Suffix: </guilabel></term>
- <listitem> <para>
- Enter suffixes such as "Jr." or "III."
- </para></listitem>
- </varlistentry>
- </variablelist>
- </para>
- </listitem>
- <listitem>
- <para>
- The <guilabel>Full Name</guilabel> field also
- interacts with the <guilabel>File As</guilabel>
- box to help you organize your contacts.
- </para>
- <para>
- To see how it works, type a name in the
- <guilabel>Full Name</guilabel> field:
- <userinput>Rupert T. Monkey</userinput>. You'll
- notice that the <guilabel>File As</guilabel> field
- also fills up, but in reverse:
- <computeroutput>Monkey, Rupert</computeroutput>.
- You can pick <computeroutput>Rupert Monkey
- </computeroutput> from the drop-down, or type in
- your own, such as <userinput> T. Rupert Monkey
- </userinput>.
- </para>
- <tip>
- <title>Filing Suggestion</title>
-
- <para>
- Don't enter something entirely different from
- the actual name, since you might forget that
- you've filed Rupert's information under "F" for
- "Fictitious Ximian Employee."
- </para>
- </tip>
- </listitem>
- </itemizedlist>
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Multiple Values for Fields</term>
- <listitem>
- <para>
- If you click on the small arrow buttons next to the
- <guilabel>Primary Email</guilabel> field, you can also
- choose <guilabel>Email 2</guilabel> and
- <guilabel>Email 3</guilabel>. Although the contact
- editor will only display one of those at any given
- time, <application>Evolution</application> will
- store them all. The arrow buttons next to the
- telephone and postal address fields work in the same
- way.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- <para>
- El último elemento en la pestaña <guilabel>General</guilabel> es la
- herramienta de organización de <guilabel>Categorias</guilabel>, para
- ver información acerca de ella, lea <xref
- linkend="usage-contact-organize">.
- </para>
- <para>
- La pestaña de <guilabel>Detalles</guilabel> es, afortunadamente,
- mucho más simple: tres secciones, las cuales son más o menos obvias:
- la cartera al lado de los detalles acerca de la vida profesional del
- contacto, la cara al lado de los detalles de su vida personal,
- el globo terraqueo al lado de un gran espacio en blanco que puede
- usar para cualquier cosa que quiera anotar.
- Si alguna vez quiso tener ese poder sobrenatural de recordar oscuros
- detalles como la fecha del aniversario de alguien (quiza del suyo
- propio) esta es la manera de desarrollarlo.
- </para>
-
-
-
-
-<!--- ############# This section isn't implemented yet either:
- <sect2>
- <title></title>
- <para>
- <tip>
- <title>Contact Shortcuts</title>
- <para>
- 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
- <guimenuitem>Create Card for this Address</guimenuitem> or
- <guimenuitem>Create Card for this Sender</guimenuitem>
- from the menu. While looking at a calendar appointment,
- right-click any email address, and choose
- <guimenuitem>Create Card for this Address</guimenuitem>.
- (NOTE that feature may change! unimplemented!)
- </para>
- </tip>
- </para>
- <para>
- You can move cards around just as you would move email
- messages: dragging and dropping works, as does right-clicking
- and choosing <guimenuitem>Move</guimenuitem> from the menu
- that appears.
- </para>
- </sect2>
-############### SHORTCUT SECTION COMMENTED OUT FOR NOW -->
-
- </sect1>
-
- <sect1 id="usage-contact-organize">
- <title>Organizando su Agenda de Direcciones</title>
- <para>
- Organizing your address book is a lot like organizing your
- mail. You can have folders and searches the same way you can
- with mail, but the address book does not allow vFolders. It
- does, however, allow each card to fall under several
- categories, and allow you to create your own categories. To
- learn about categories, read <xref
- linkend="usage-contact-organize-group-category">.
- </para>
-
-<!--
- <para>
- Another useful <application>Evolution</application> feature is
- its ability to recognize when people live or work together. If
- several people in your address book share an address, and you
- change the address for one of them,
- <application>Evolution</application> will ask you if you wish to
- change the address for all of them, or just for one.
- </para>
--->
-
- <sect2 id="usage-contact-organize-group">
- <title>Grupos de contactos</title>
- <para>
- <application>Evolution</application> le ofrece dos maneras de
- organizar sus tarjetas. La primera es usando carpetas.
- Esto funciona igual que las carpetas de correo. Para más
- flexibilidad, puede marcar los contactos como miembros de
- diferentes categorías.
- </para>
-
- <sect3 id="usage-contact-organize-group-folder">
- <title>Agrupando con Carpatas</title>
- <para>
- La manera más sencilla de agrupar tarjetas de direcciones es usar
- carpetas. Por defecto, las tarjetas están en la carpeta
- <guilabel>Contactos</guilabel>. Si ha leido <xref
- linkend="usage-mainwindow"> entonces sabrá que puede crear una nueva
- carpeta seleccionando
- <menuchoice>
- <guimenu>Archivo</guimenu>
- <guisubmenu>Nuevo</guisubmenu>
- <guimenuitem>Carpeta</guimenuitem>
- </menuchoice>
- y que puede poner nuevas carpetas en cualquier sitio que quiera.
- Exactamente como con el correo, las tarjetas deben estar en una carpeta
- de tarjetas, y ninguna tarjeta puede estar en dos sitios a la vez. Si
- quiere más flexibilidad, pruebe <xref
- linkend="usage-contact-organize-group-category">.
- </para>
- <para>
- Para poner una tarjeta en una carpeta, simplemente arrastrela allí
- desde la vista de carpetas. Recuerde que las tarjetas de
- contactos solo pueden estar en carpetas de contactos, como el
- correo solo puede estar en carpetas de correo, y los calendarios
- en carpetas de calendarios.
- </para>
- </sect3>
-
- <sect3 id="usage-contact-organize-group-category">
- <title>Agrupando con Categorías</title>
- <para>
- La otra manera de agrupar tarjetas es marcarlas como
- pertenecientes a distintas categorias. La diferencia entre
- carpetas y categorias es que las carpetas contienen las tarjetas,
- pero pertenecer a una categoría es una propiedad de cada tarjeta.
- Lo que significa que puede marcar una tarjeta como perteneciente
- a varias categorias o a ninguna. Por ejemplo, yo pongo la
- tarjeta de mi amigo Matthew en la categoría "Negocios", porque
- trabaja conmigo, en la categoría "Amigos", porque tambien es mi
- amigo, y en la categoría "Frecuente", porque le llamo
- continuamente y nunca me acuerdo de su número de teléfono.
- </para>
- <para>
- Para marcar una tarjeta como perteneciente a una categoría, pulse
- botón <guibutton>Categorias</guibutton> abajo a la derecha.
- De la ventana de diálogo que aparece, puede marcar tantas
- categorías como quiera.
- </para>
- <para>
- Entonces, puede referirse a todas las tarjetas en esa categoría
- haciendo: <!-- ARREGLAME --> Esperando a que Evolution soporte
- la operación.
- </para>
-
- <!-- ARREGLAME: Caracteristica no implementeada
- <para>
-
- Si la lista principal de categorías no le es suficiente, puede
- añadir las suyas propias. Simplemente escriba el nombre de la
- nueva categoría en la caja de texto, entonces pulse
- <guibutton>Categorias</guibutton> y elija
- <guilabel>Añadir a la Lista Principal</guilabel> en la ventana
- aparece.
- </para>
- -->
-
- </sect3>
- </sect2>
- </sect1>
-
- <sect1 id="usage-contact-sharing">
- <title>Compartiendo sus Tarjetas</title>
- <para>
- Si tiene sus tarjetas en una red usando un servidor <glossterm
- linkend="ldap">LDAP</glossterm>, puede compartir el acceso a ellas,
- ver otras agendas, o mantener información de contacto compartida
- para su compañía o su departamento. Esta es la clase de
- características que querrá si su compañía tiene una lista de
- vendedores y clientes que necesita ser actualizada constantemente.
- Si se comparten calendarios al igual que agendas, la gente puede
- evitar duplicar trabajo y mantenerse al día en los desarrollos de su
- grupo de trabajo o de la compañía entera.
- </para>
-
- <example id="usage-contact-sharing-ex">
- <title>Conpartiendo Tarjetas de Direcciones y Datos del Calendario</title>
- <para>
- Raul quiere concertar una reunión con la Compañía X, así que
- busca en la red la tarjeta de la Compañía X para saber a quien tiene
- que llamar. Dado que su compañia comparte un calendario, ve que su
- compañera Diana ya ha concertado una reunión con la Compañía X para el
- próximo jueves. Puede ir el mismo a la reunión o pedir a Diana que
- trate el tema por el. De cualquier modo, evita concertar otra cita
- co la Compañía X.
- </para>
- </example>
- <para>
- Of course, you don't want to share all of your cards&mdash; why
- overload the network with a list of babysitters or tell
- everyone in the office you're talking to new job prospects? If
- you keep cards on your own computer, you can decide which items
- you want to make accessible to others.
- </para>
- <para>
- To learn how to add a remote directory to your available
- contact folders, see <xref linkend="config-prefs-contact">.
- Once you have a connection, the network contacts folder or
- folders will appear inside the <guilabel>External
- Directories</guilabel> folder in the folder bar. It will work
- exactly like a local folder of cards, with the following
- exceptions:
- <itemizedlist>
-
- <listitem>
- <para>
- Network folders are only available when you are
- connected to the network. If you use a laptop or have a
- modem connection, you may wish to copy or cache the
- network directory and then synchronize your copy with
- the networked version periodically. <!-- FIXME: HOW? -->
- </para>
- </listitem>
-
- <listitem>
- <para>
- To prevent excess network traffic,
- <application>Evolution</application> will not normally
- load the contents of LDAP folders immediately upon
- opening. You must click <guilabel>Display
- All</guilabel> before LDAP folder cards will be loaded
- from the network. You can change this behavior in the
- <interface>Contact Preferences</interface> window.
- </para>
- </listitem>
- <listitem>
- <para>
- Your ability to view, change, add, and delete contacts
- depends on the settings of the LDAP server.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </sect1>
-
- <sect1 id="usage-contact-automate">
- <title>Herramientas de la Agenda de Direcciones</title>
- <para>
- The address book works closely with
- <application>Evolution</application>'s mail and calendar tools.
- For example, you can use the address book to help you manage
- mailing lists, and send or recieve address cards over email.
- More tools are on the way, and when they arrive, <!-- FIXME -->
- they will be described in this section.
- </para>
-
- <sect2 id="contact-automation-basic">
- <title>Envíame una Tarjeta: Añadiendo Tarjetas Rápidamente</title>
- <para>
- Como se ha visto antes, cuando obtiene información acerca de una
- persona en el correo o en una entrada del calendario, puede añadirla
- a una tarjeta de direcciones. Para hacerlo, pulse con el botón
- derecho en cualquier dirección de correo o mensaje de correo, y
- seleccione <guimenuitem>Añadir Tarjeta de Direcciones</guimenuitem>
- del menú que aparece. Naturalmente,
- <application>Evolution</application> tambien añade tarjetas desde un
- dispositivo de mano durante la operación de sincronización. Para más
- información acerca de eso, vea <xref linkend="usage-sync">.
- </para>
- </sect2>
-
- <sect2 id="contact-automation-lists">
- <title>Administrando una Lista de Correo</title>
- <para>
- Ya sabe que cuando escribe un mensaje, puede dirigirlo a una o más
- personas, y que <application>Evolution</application> rellenará las
- direcciones con las direcciones de las tarjetas de su agenda si le
- deja. Ademas, si quiere puede enviar mensajes a todos los de un
- grupo en particular.
- </para>
-
-<!-- FIXME this feature not yet implemented
-
- <para>
- You can also use the address book to print postal addresses
- on mailing labels. Future versions of
- <application>Evolution</application> 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
- mailings.
- </para>
- -->
-
- </sect2>
-<!--- FIXME this feature not yet implemented
- <sect2 id="usage-contact-automation-extra">
- <title>Map It!</title>
- <para>
- Need a map or directions? Click
- <guibutton>MapIt</guibutton> from within the contact
- manager, and <application>Evolution</application> will
- map the address for you online.
- </para>
- </sect2>
--->
-
-
- </sect1>
-
-</chapter>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/doc/es/usage-mail.sgml b/doc/es/usage-mail.sgml
deleted file mode 100644
index e1e02327fc..0000000000
--- a/doc/es/usage-mail.sgml
+++ /dev/null
@@ -1,1526 +0,0 @@
-<!--
-<!DOCTYPE Chapter PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.1//EN">
--->
-
-<chapter id="usage-mail">
- <title>Correo en Evolution</title>
- <abstract>
- <title> Una Vista General del Correo en Evolution</title>
- <para>
- <application>Evolution</application> email is like other email
- programs in all the ways you would hope:
- <itemizedlist>
- <listitem>
- <para>
- It can sort and organize your mail in a wide variety of ways with
- folders, searches, and filters.
- </para>
- </listitem>
- <listitem>
- <para>
- It can send and receive mail in HTML or as plain text, and
- permits multiple file attachments.
- </para>
- </listitem>
- <listitem>
- <para>
- It supports multiple mail sources, including <glossterm
- linkend="imap">IMAP</glossterm>, <glossterm
- linkend="pop">POP3</glossterm>, local
- <systemitem><filename>mbox</filename></systemitem> and
- <systemitem><filename>mh</filename></systemitem> files, and
- even NNTP messages (newsgroups), which aren't technically
- email.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- <para>
- However, <application>Evolution</application> has some important
- differences. First, it's built to handle very large amounts of
- mail without slowing down or crashing. Both the <link
- linkend="usage-mail-organize-filters">filtering</link> and <link
- linkend="usage-mail-organize-search">searching</link> functions
- were built for speed and efficiency on gargantuan volumes of
- mail. There's also the <application>Evolution</application>
- <link linkend="usage-mail-organize-vFolders">Virtual
- Folder</link>, 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 this feature especially useful.
- </para>
- </abstract>
-
- <sect1 id="usage-mail-getnsend">
- <title>Leyendo, Obteniendo y Enviando Correo</title>
-
- <sect2 id="usage-mail-getnsend-read">
- <title>Leyendo el Correo</title>
- <para>
- You can start reading email by clicking
- <guibutton>Inbox</guibutton> in the shortcut bar. The first
- time you use <application>Evolution</application>, it will
- start with the <interface>Inbox</interface> open and show you a
- message from Ximian welcoming you to the application.
- </para>
- <para>
- Your <application>Evolution</application>
- <guilabel>Inbox</guilabel> will look something like the one in
- <xref linkend="usage-mail-intro-fig">. Just below the toolbar
- is the <interface>message list</interface>, showing message
- header information like <guilabel>Subject</guilabel> and
- <guilabel>Date</guilabel>. The message itself appears below
- that, in the <interface>view pane</interface>. If you find
- the <interface>view pane</interface> too small, you can resize
- the pane, enlarge the whole window, or double-click on the
- message in the <interface>message list</interface> to have it
- open in a new window. Just like with folders, you can
- right-click on messages in the message list and get a menu of
- possible actions.
- </para>
-
- <!-- ==============Figure=================================== -->
-
- <figure id="usage-mail-intro-fig">
- <title>Correo de Evolution</title>
- <screenshot>
- <screeninfo>Inbox</screeninfo>
- <graphic fileref="fig/mail-pic" format="png" srccredit="Aaron Weber">
- </graphic>
- </screenshot>
- </figure>
-<!-- ==============End of Figure============================== -->
-
- <para>
- Most of the mail-related actions you'll want to perform are
- listed in the <guimenu>Message</guimenu> menu in the menu
- bar. The most frequently used ones, like
- <guimenuitem>Reply</guimenuitem> and
- <guimenuitem>Forward</guimenuitem>, also appear as buttons in
- the toolbar, and almost all of them are duplicated in the
- right-click menu and as keyboard shortcuts, which tend to be
- faster once you get the hang of them. You can choose
- whichever way you like best; the idea is that the software
- should work the way you want, rather than making you work the
- way the it does.
- <tip id="view-headers">
- <title>Take a look at the headers</title>
- <para>
- To look at the entire source of your email message, including
- all the header information, select
- <menuchoice><guimenu>View</guimenu><guimenuitem>Source</guimenuitem></menuchoice>
- </para>
- </tip>
- </para>
-
- <sect3 id="usage-mail-listorder">
- <title>Ordenando la lista de mensajes</title>
- <para>
- One of the ways <application>Evolution</application> lets
- you choose the way you work is the way it lets you sort your
- message lists. To sort by sender, subject, or date, click
- on the bars with those labels at the top of the message
- list. The direction of the arrow next to the label indicates
- the direction of the sort, and if you click again, you'll
- sort them in reverse order. For example, click once on
- <guilabel>Date</guilabel> to sort messages by date from
- oldest to newest. Click again, and
- <application>Evolution</application> sorts the list from
- newest to oldest. You can also right-click on the message
- header bars to get a set of sorting options, and add or
- remove columns from the message list. You can find detailed
- instructions on how to customize your message display
- columns in <xref linkend="usage-mail-organize-columns">.
- </para>
- <para>
- You can also choose a threaded message view. Select
- <menuchoice> <guimenu>View</guimenu>
- <guimenuitem>Threaded</guimenuitem> </menuchoice> to turn
- the threaded view on or off. When you select this option,
- <application>Evolution</application> groups the replies to a
- message with the original, so you can follow the thread of a
- conversation from one message to the next.
- </para>
- </sect3>
- <sect3 id="usage-mail-getnsend-delete">
- <title>Borrando Correo</title>
- <para>
- Once you've read your mail, you may want to get rid of
- it. To mark a message for deletion, select it in the the
- <interface>message list</interface> by clicking on it once.
- Then click on the <guibutton>Delete</guibutton> button in
- the tool bar. Or, right-click on a message and choose
- <guimenuitem>Delete</guimenuitem> from the right-click
- menu. The message will appear with a line through it, to
- show that you've marked it for deletion.
- </para>
- <para>
- If you change your mind and decide you want to keep it,
- select <menuchoice> <guimenu>Message</guimenu>
- <guimenuitem>Undelete</guimenuitem></menuchoice>. If you
- really want to get rid of it, choose
- <guimenuitem>Expunge</guimenuitem> from the
- <guimenu>Folder</guimenu> menu. That will delete it
- permanently.
- </para>
- </sect3>
- </sect2>
-
- <sect2 id="usage-mail-getnsend-get">
- <title>Comprobando el Correo</title>
- <para>
- Now that you've had a look around the
- <interface>Inbox</interface>, it's time to check for new mail.
- Click <guibutton>Get mail</guibutton> in the toolbar to check
- your mail. If it's the first time you've done so, the
- <interface>mail setup assistant</interface> will ask you for
- the information it needs to check your mail (see <xref
- linkend="config-setupassist"> for more information).
- </para>
- <para>
- Then, you need to enter your email
- password. <application>Evolution</application> will remember
- your password until until you select <menuchoice>
- <guimenu>Settings</guimenu> <guimenuitem>Forget
- Passwords</guimenuitem> </menuchoice>.
- </para>
- <para>
- Once it's validated the password,
- <application>Evolution</application> will check your mail.
- New mail will appear in the local <interface>Inbox</interface>
- if you're using a <glossterm>POP</glossterm> account, and in
- your <glossterm>IMAP</glossterm> folders if you use IMAP. If
- you have chosen to use IMAP, and you have multiple folders on
- your IMAP server, you may need to subscribe to them. To learn
- how to use the subscription manager, read <xref
- linkend="usage-mail-subscriptions">.
- </para>
-
- <note id="badmailsettings">
- <title>¿No Puede Leer su Correo?</title>
- <para>
- If you get an error message instead of mail, you probably need
- to change your network settings. To learn how to do that,
- have a look at <xref linkend="config-prefs-mail-network">, or
- ask your system administrator.
- </para>
- </note>
-
- <sect3 id="usage-mail-getnsend-get-news">
- <title>Usando Evolution para las Noticias </title>
- <para>
- Newsgroups are so similar to email that there's no reason not
- to read them side by side. If you want to do that, add a
- news source to your configuration (see <xref
- linkend="config-prefs-network-news">). The news server will
- appear as a remote server, and will look quite similar to an
- IMAP folder. When you click <guibutton>Get Mail</guibutton>,
- <application>Evolution</application> will also check for news
- messages.
- </para>
- </sect3>
-
- <sect3 id="usage-mail-getnsend-get-attach">
- <title>Adjuntos y correo en HTML</title>
- <para>
- Si alguien le envía un <glossterm>adjunto</glossterm>, un
- archivo adjunto aun mensaje,
- <application>Evolution</application> mostrará en archivo en la
- parte de abajo del mensaje al que está adjuntado. Texto,
- HTML, y la mayoría de imágenes se mostrarán dentro del mensaje.
- Para otros archivos,
- <application>Evolution</application> mostrará un icono al final
- del mensaje. Pulse con el botón derecho sobre el icono para obtener
- una lista de opciones que variarán dependiendo del tipo de adjunto.
- Tendrá la opción de mostrar la mayoría de los archivos como parte del
- mensaje, exportarlos a otra aplicación (imágenes a Eye of GNOME, hojas
- de cálculo a Gnumeric, y así sucesivamente), o guardarlo en el disco.
- </para>
-
- <para>
- <application>Evolution</application> tambien puede mostrar
- correo formateado en HTML, completo con gráficos. El formateado
- en HTML se mostrará automaticamente, aunque puede deshabilitarlo
- si lo prefiere.
- </para>
- </sect3>
- </sect2>
-
- <sect2 id="usage-mail-getnsend-send">
- <title>Escribiendo y Enviando Correo</title>
- <para>
- You can start writing a new email message by selecting
- <menuchoice> <guimenu>File</guimenu>
- <guisubmenu>New</guisubmenu> <guimenuitem>
- Mail Message</guimenuitem></menuchoice>, or by pressing the
- <guibutton>Compose</guibutton> button in the Inbox toolbar.
- When you do so, the <interface>New Message</interface> window
- will open, as shown in <xref
- linkend="usage-mail-newmsg-fig">.
- </para>
-
-<!-- ==============Figure=================================== -->
- <figure id="usage-mail-newmsg-fig">
- <title>Ventana de Nuevo Mensaje</title>
- <screenshot>
- <screeninfo>Evolution Main Window</screeninfo>
- <graphic fileref="fig/newmsg-pic" format="png" srccredit="Kevin Breit">
- </graphic>
- </screenshot>
- </figure>
-<!-- ==============End of Figure=================================== -->
-
- <!-- Check the alignment of the following paragraph in the PS and
- HTML output: it's indented for no good reason -->
- <para>
- Enter an address in the <guilabel>To:</guilabel> field, a
- subject in the <guilabel>Subject:</guilabel> and a message in
- the big empty box at the bottom of the window, and press
- <guibutton>Send</guibutton>.
- </para>
-
- <sect3 id="usage-mail-getnsend-send-delay">
- <title>Guardando Mensajes para más tarde</title>
- <para>
- Evolution enviará el mensaje inmediatamente a menos que le diga lo
- contrario seleccionando <menuchoice>
- <guimenu>Archivo</guimenu> <guimenuitem>Enviar más
- Tarde</guimenuitem></menuchoice>. Esto añadirá sus mensajes
- a la cola de <guilabel>Outbox</guilabel>. Esntonces,
- cuando pulse <guibutton>Enviar</guibutton> en otro
- mensaje, u <guibutton>Obtener</guibutton> en la ventana principal
- del correo, todos los mensajes no enviados se enviarán en ese momento.
- Me gusta usar "Enviar más Tarde" porque me permite tener la oportunidad
- de cambiar de opinión acerca de un mensaje antes de enviarlo. De esa forma
- no envio nada de lo que me arrepentiré al día siguiente.
- </para>
- Para aprender más acerca de como puede especificar el comportamiento de
- la cola de mensajes y de los filtros, vea <xref linkend="config-prefs-mail">.
- </para>
-
- <para>
- You can also choose to save messages as drafts or as text
- files. Choose
- <menuchoice>
- <guimenu>File</guimenu>
- <guimenuitem>Save</guimenuitem>
- </menuchoice>
- or <guimenuitem>Save As</guimenuitem> to save your message
- as a text file. If you prefer to keep your message in a
- folder (the <guilabel>Drafts</guilabel> folder would be the
- obvious place), you can select <menuchoice>
- <guimenu>File</guimenu> <guimenuitem>Save In
- Folder</guimenuitem> </menuchoice>.
- </para>
- </sect3>
- <sect3 id="usage-mail-getnsend-send-compose">
- <title>Composición Avanzada de Correo</title>
- <para>
- You can probably guess the purpose of the buttons labelled
- <guibutton>Cut</guibutton>, <guibutton>Copy</guibutton>,
- <guibutton>Paste</guibutton>, <guibutton>Undo</guibutton>
- and <guibutton>Redo</guibutton>, but there's a bit more to
- sending mail that's less obvious. In the next few sections,
- you'll see how <application>Evolution</application> handles
- additional features, including large recipient lists,
- attachments, and forwarding.
- </para>
- <sect4 id="usage-mail-getnsend-send-attach">
- <title>Adjuntos</title>
- <para>
- Si quiere adjuntar un archivo a su mensaje de correo, puede
- arrastrarlo desde su escritorio hasta la ventana del mensaje, o
- pulsar el botón con un clip de la barra de herramientas,
- con el título <guibutton>Adjuntar</guibutton>. Si presiona el
- botón <guibutton>Adjuntar</guibutton>,
- <application>Evolution</application> abrirá una ventana de selección
- de archivos para preguntarle que archivo quiere enviar.
- Seleccione el archivo y pulse <guilabel>Aceptar</guilabel>.
- </para>
- <para>
- To hide the display of files you've attached to the
- message, select <menuchoice>
- <guimenu>View</guimenu> <guimenuitem>Hide
- Attachments</guimenuitem> </menuchoice>; to show them
- again, choose <guimenuitem>Show Attachments</guimenuitem>.
- </para>
- <para>
- When you send the message, a copy of the attached file
- will go with it. Be aware that big attachments can take a
- long time to download.
- </para>
- </sect4>
- <sect4 id="usage-mail-getnsend-send-to-types">
- <title>Tipos de Destinatarios</title>
- <para>
- <application>Evolution</application>, como la mayoría de
- los programas de correo reconoce tres tipos de direcciones
- destinatarios principales, destinatarios secundarios, y
- destinatarios escondidos ("oculto").
- </para>
- <para>
- La manera más simple de dirigir un mensaje es poner la dirección
- o direcciones de correo en el campo <guilabel>A:</guilabel>,
- el cual denota a los destinatarios principales. Para enviar
- correo a más de una o dos personas, puede usar el campo
- <guilabel>Cc:</guilabel>.
- </para>
- <para>
- Volviendo la vista a las edades oscuras cuando la gente usaba máquinas
- de escribir y no habia fotocopiadoras, "Cc" significa
- "Copia de Carbón". Uselo cuando quiera compartir un mensaje que ha
- escrito a otra persona.
- <example id="ex-mail-cc">
- <title>Usando el campo Cc:</title>
- <para>
- Cuando Susan envia un mensaje a un cliente, pone a su compañero,
- Tim, en el campo <guilabel>Cc:</guilabel>, para que sepa como van
- las cosas. El cliente puede ver que Tim también recivió el
- mensaje, y sabe que también puede hablar con Tim acerca del
- mensaje.
- </para>
- </example>
- </para>
- <para>
- Si tiene un gran número de destinatarios, o si quiere mandar mensajes
- a varias personas sin mostrar la lista de destinatarios, debe usar
- <guilabel>Cco:</guilabel>. "Cco" significa "Con Copia Oculta",
- y envía los mensajes discretamente. En otras palabras,
- las personas en el campo <guilabel>Cco:</guilabel> reciven el mensaje,
- pero nadie vee que lo recibieron. Note que el contenido de los campos
- <guilabel>A:</guilabel> y <guilabel>Cc:</guilabel> son visibles para
- todos los destinatarios, incluso para las personas en la lista
- <guilabel>Cco:</guilabel>.
-
- <example id="ex-mail-bcc">
- <title>Usando el campo Cco:</title>
- <para>
- Tim está enviando un anuncio por correo a todos los clientes
- de su compañía, algunos de los cuales son competidores entre si,
- y todos ellos valoran su privacidad. En este caso necesita usar
- el campo <guilabel>Cco:</guilabel>. Si pone todas las
- direcciones de su agenda de direcciones de "Clientes" en el
- campo <guilabel>A:</guilabel> o en el campo
- <guilabel>Cc:</guilabel>, hara que <emphasis>toda</emphasis>
- la lista de clientes de la compañía sea pública.
- Parece una pequeña diferencia, pero en ocasiones puede tener
- una gran importancia.
- </para>
- </example>
- </para>
- </sect4>
-
- <sect4 id="usage-mail-getnsend-send-to">
- <title>Eligiendo Rápidamente a los Destinatarios</title>
- <para>
- Si ha creado tarjetas de direcciones en el administrador de contactos,
- puede escribir apodos o otras porciones de los datos de la dirección, y
- <application>Evolution</application> completará la dirección por usted
- <!-- (INSERTAR descripción de la IU para esta caracteristica,
- una vez que se decida). --> Si escribe un nombre oun apodo
- puede coincidir con más de una tarjeta, Evolution abrirá una ventana de
- diálogo y le preguntará a quien se refiere.
- <!-- (TODAVIA NO) Tambien, <application>Evolution</application>
- añadirá un dominio a cualquier direccion incompleta. Por defecto, será
- su dominio, pero puede elegirlo en el diálogo de preferencias del
- correo. -->
- </para>
- <para>
- Alternativamente, puede pulsar en los botones
- <guibutton>A:</guibutton>, <guibutton>Cc:</guibutton>, o
- <guibutton>Cco:</guibutton> para obtener una lista &mdash;
- potencialmente muy larga &mdash; de las direcciones de correo
- de su administrador de contactos. Seleccione las direcciones y
- pulse sobre las flechas para moverlas a la columna de direcciones
- apropiada.
- </para>
- <para>
- Para más información acerca de usar el correo junto con el
- administrador de contactos y el calendario, vea <xref
- linkend="usage-contact-automate"> y <xref
- linkend="usage-calendar-apts">.
- </para>
- </sect4>
- </sect3>
-
- <sect3 id="usage-mail-getnsend-send-reply">
- <title>Respondiendo Mensajes</title>
- <para>
- Para resonder a un mensaje, pulse el botón
- <guibutton>Responder</guibutton> mientras está seleccionado,
- o elija <guimenuitem>Responder al Remitente</guimenuitem> del menu
- del botón derecho del mensaje. Esto abrirá el
- <interface>compositor de mensajes</interface>. Los campos
- <guilabel>A:</guilabel> y <guilabel>Asunto</guilabel>
- ya estarán escritos, aunque puede alterarlos si lo desea.
- Ademas, el texto completo del antiguo mensaje es insertado en el
- nuevo mensaje, bien sea con itálicas (para vista en HTML) o con el
- caracter &gt; precediendo cada línea (en modo texto plano), para
- indicar que es parte del mensaje previo. Habitualmente la gente
- escribe su mensaje intercalado con el mensaje anterior, como se
- muestra en <xref linkend="usage-mail-getnsend-reply-fig">.
-
-<!-- note que esta imagen debe tener un mensaje de respuesta listo para ser
-enviado con partes quoteadas y las respuestas relevante intercaladas-->
- <!-- ==============Imagen=================================== -->
- <figure id="usage-mail-getnsend-reply-fig">
- <title>Ventana de Respuesta de Mensajes</title>
- <screenshot>
- <screeninfo>Ventana Principal de Evolution</screeninfo>
- <graphic fileref="fig/replymsg" format="png" srccredit="Aaron Weber">
- </graphic>
- </screenshot>
- </figure>
-<!-- ==============Fin de la Imagen=================================== -->
- </para>
-
- <para>
- If you're reading a message with several recipients, you may
- wish to use <guibutton>Reply to All</guibutton> instead of
- <guibutton>Reply</guibutton>. If there are large numbers
- of people in the <guilabel>Cc:</guilabel> or
- <guilabel>To:</guilabel> fields, this can save substantial
- amounts of time.
- <example>
- <title>Using the Reply to All feature</title>
- <para>
- Susan sends an email to a client and sends copies to Tim
- and to an internal company mailing list of co-workers.
- If Tim wants to make a comment for all of them to read,
- he uses <guibutton>Reply to All</guibutton>, but if he
- just wants to tell Susan that he agrees with her, he
- uses <guibutton>Reply</guibutton>. Note that his reply
- will not reach anyone that Susan put on her
- <guilabel>Bcc</guilabel> list, since that list is not
- shared with anyone.
- </para>
- </example>
- </para>
- </sect3>
- <sect3 id="usage-mail-getnsend-send-find">
- <title>Searching and Replacing with the Composer</title>
- <para>
- You're probably familiar with search and replace features,
- and if you come from a Linux or Unix background, you
- probably know what <guimenuitem>Find Regex</guimenuitem>
- does. If you aren't among the lucky who already know,
- here's a quick rundown of an important section of the
- <guimenu>Edit</guimenu> menu.
- </para>
- <para>
- <variablelist>
- <varlistentry>
- <term><guimenuitem>Find</guimenuitem></term>
- <listitem><para> Enter a word or phrase, and
- <application>Evolution</application> will find it
- in your message.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Find Regex</guimenuitem></term>
- <listitem>
- <para>
- Find a regex, also called a
- <glossterm linkend="regular-expression">regular
- expression</glossterm>, in your composer window.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Find Again</guimenuitem></term>
- <listitem><para>
- Select this item to repeat the last search you performed.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Replace</guimenuitem></term>
- <listitem><para>
- Find a word or phrase, and replace it with
- something else.
- </para></listitem>
- </varlistentry>
-
- </variablelist>
- </para>
- <para>
- For all of these menu items, you can choose whether or not
- to <guilabel>Search Backwards</guilabel> in the document
- from the point where your cursor is. For all but the
- regular expression search (which doesn't need it), you are
- offered a check box to determine whether the search is to
- be <guilabel>Case Sensitive</guilabel> when it determines
- a match.
- </para>
- </sect3>
- <sect3 id="usage-mail-getnsend-send-html">
- <title>Embelleciendo su correo con HTML</title>
- <para>
- Normally, you can't set text styles or insert pictures in
- emails, which is why you've probably seen people use far
- too many exclamation points for emphasis, or use
- <glossterm linkend="emoticon">emoticons</glossterm> to
- convey their feelings. However, most newer email programs
- can display images and text styles as well as basic
- alignment and paragraph formatting. They do this with
- <glossterm linkend="html">HTML</glossterm>, just like web
- pages do.
- </para>
- <note>
- <title>El correo con HTML no está seleccionado por defecto</title>
- <para>
- Algunas personas no tienen clientes con capacidad para mostrar HMTL, o
- prefieren no recibir mensajes con HTML porque tarda más en descargar
- y en ser mostrado. <emphasis>Algunas</emphasis> personas se hablan
- correo con HTML como "la raíz de todos los males" y se enfadan
- mucho si les envia correo con HTML, por lo cual
- <application>Evolution</application> envía texto plano a menos que
- pida explicitamente HTML. Para enviar correo con HTML, necesitará
- seleccionar <menuchoice> <guimenu>Formato</guimenu>
- <guimenuitem>HTML</guimenuitem></menuchoice>.
- Alternativamente, puede elegir el formato por defecto de sus mensajes
- en el diálogo de configuración del correo.
- Vea <xref linkend="config-prefs-mail-other"> para más información.
- </para>
- </note>
- <para>
- HTML formatting tools are located in the toolbar just above
- the space where you'll actually compose the message, and
- they also appear in the <guimenu>Insert</guimenu> and
- <guimenu>Format</guimenu> menus.
- </para>
- <para>
- Los iconos de la barra de herramientas estan explicados en <glossterm
- linkend="tooltip">Mensajes de Ayuda</glossterm>, los cuales aparecen
- cuando detiene el ratón sobre los botónes. Los botones entran en cuatro
- categorías:
- <variablelist>
- <varlistentry>
- <term>Cabeceras y listas</term>
- <listitem>
- <para>
- En el lado izquierdo de la barra de herramientas, puede elegir entre
- <guilabel>Normal</guilabel> para un estilo de texto por defecto
- o <guilabel>Cabecera 1</guilabel> a
- <guilabel>Cabecera 6</guilabel> para variar los tamaños de las
- cabeceras desde grande (1) hasta pequeño (6). Otros estilos
- incluyen <guilabel>pre</guilabel>, para usar etiquetas HTML
- para preformatear los bloques de texto, y tres tipos de
- <guilabel>Elementos de Lista</guilabel> para los más
- organizados.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Estilo del texto</term>
- <listitem>
- <para>
- Use estos botones para determinar el aspecto de sus cartas.
- Si tiene un texto seleccionado, el estilo se aplicará al texto
- seleccionado. Si no tiene texto seleccionado el estilo se
- aplicará a lo siguiente que escriba. Los botones son:
- <itemizedlist mark="none">
- <listitem><para>Presione <guibutton>B</guibutton> para texto en negrita</para></listitem>
- <listitem><para>Presione <guibutton>I</guibutton> para itálicas</para></listitem>
- <listitem><para>Presione <guibutton>U</guibutton> para subrayado</para></listitem>
- <listitem><para>Presione <guibutton>S</guibutton> para tachado.</para></listitem>
- </itemizedlist>
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Alineación</term>
- <listitem>
- <para>
- Localizado al lado de los botones de estilo del texto, estos tres
- iconos de párrafo deberian ser familiares para aquellos usuarios de
- la mayoría de los procesadores de texto. El botón más a la izquierda
- hará que su texto se alinee a la izquierda, el botón central, lo
- centrará, y el botón a la derecha, lo alinerá al lado derecho.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Reglas de indentación</term>
- <listitem>
- <para>
- El botón con la flecha hacia la izquierda reducirá
- la indentación de un párrafo, y la flecha a la derecha
- incrementará su indentación.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Selección de colores</term>
- <listitem>
- <para>
- En la parte derecha esta la herramienta de selección de color.
- La caja coloreada muestra el color actual del texto. Para
- elegir uno nuevo, pulse el botón con la flecha justo a su derecha.
- Si tiene texto seleccionado, el color será aplicado al texto
- seleccionado. Si no tiene texto seleccionado, el color será aplicado
- a lo que escriba a continuación.
- </para>
- </listitem>
- </varlistentry>
-
-
- </variablelist>
- </para>
- <para>
- There are three tools that you can find only in the
- <guimenu>Insert</guimenu> menu.
- <variablelist>
- <varlistentry>
- <term><guimenuitem>Insert Link</guimenuitem>:</term>
- <listitem>
- <para>
- Use this tool to put hyperlinks in your HTML
- messages. When you select it,
- <application>Evolution</application> will prompt you
- for the <guilabel>Text</guilabel> that will appear,
- and the <guilabel>Link</guilabel>, where you should
- enter the actual web address (URL). If you don't
- want special link text, you can just enter the address
- directly, and <application>Evolution</application>
- will recognize it as a link.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term> <guimenuitem>Insert Image</guimenuitem>:</term>
- <listitem>
- <para>
- Select this item to embed an image into your email, as
- was done in the welcome message. Images will appear at
- the location of the cursor. This is different from
- attaching them to a message, but not very different.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><guimenuitem>Insert Rule</guimenuitem>:</term>
- <listitem><para>
- This will insert a horizontal line, or rule, into your document.
- You'll be presented with a dialog box which gives you
- the choice of size, percentage of screen, shading, and
- alignment; if you leave everything at the default
- values you'll get a thin black rule all the way across
- the screen.</para></listitem>
- </varlistentry>
-
- </variablelist>
- </para>
- <note>
- <title>Una nota Técnica sobre las Etiquetas HTML</title>
- <para>
- El compositor de correo en un editor WYSIWYG (What You See Is What
- You Get "Lo Que Ve Es Lo Que Obtiene") de HTML. Esto significa que
- si escribe directamente HTML en el editor&mdash; digamos,
- <markup role="html">&lt;B&gt;Bold Text&lt;/B&gt</markup>, el
- editor asumirá que quiere escribir exactamente esa cada de
- caracteres, y no "hacer poner texto en Negrita," como haría una
- herramienta de composición de HTML o un editor de texto.
- </para>
- </note>
- </sect3>
-
-
-<!-- Function not implemented,
-possibly never will be due to security evil. -->
-<!--
- <sect3 id="usage-mail-getnsend-send-live">
- <title>Live Documents</title>
- <para>
- Later versions of <application>Evolution</application>
- will allow you to enliven your email with almost any
- sort of document, and even with entire
- applications. At this point, however, this feature has not
- yet been implemented.
- </para>
- </sect3>
--->
-
- <sect3 id="usage-mail-getnsend-fwd">
- <title>Reenviando Correo</title>
- <para>
- The post office forwards your mail for you when you change
- addresses, and you can forward mail when you get a letter by
- mistake. The email <guilabel>Forward</guilabel> button
- works in much the same way. It's particularly useful if you
- have received a message and you think someone else would
- like to see it. You can forward a message as an attachment
- to a new message (this is the default) or
- you can send it <glossterm linkend="inline">inline</glossterm> as a quoted
- portion of the message you are sending. Attachment
- forwarding is best if you want to send the full, unaltered
- message on to someone else. 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.
- </para>
- <para>
- To forward a message you are reading, press
- <guibutton>Forward</guibutton> on the toolbar, or select
- <menuchoice> <guimenu>Message</guimenu>
- <guimenuitem>Forward</guimenuitem> </menuchoice>. If you
- prefer to forward the message <glossterm linkend="inline">inline</glossterm>
- instead of attached, select <menuchoice>
- <guimenu>Message</guimenu> <guimenuitem>Forward
- Inline</guimenuitem> </menuchoice> from the menu. 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
- <interface>composition frame</interface>, and press
- <guibutton>Send</guibutton>.
- </para>
- </sect3>
- <sect3 id="usage-mail-getnsend-ettiquette">
- <title>Siete Consejos de Cortesía en el Correo</title>
- <para>
- Comenze con diez, pero cuatro eran "No envie
- <glossterm linkend="spam">spam</glossterm>."
- <itemizedlist>
-
- <listitem>
- <para>
- No envie spam ni reenvie cartas encadenadas. Si debe hacerlo,
- tenga cuidado con los timos y las leyendas urbanas, y asegurese
- que el mensaje no tiene múltiples capas de signos mayor que, (&gt;)
- indicando multiples capas de reenvios desconsiderados.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Siempre comienze y acabe con un saludo. Diga "por favor"
- y "gracias", tal como hace en la vida real. Puede mantener
- su cortesía excasa, pero ¡sea cortes!
- </para>
- </listitem>
-
- <listitem>
- <para>
- ¡TODO EN MAYUSCULAS SIGNIFICA QUE ESTÁ GRITANDO! No escriba todo el
- mensaje en mayusculas. Hace daño a los oidos de la gente.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Nunca escriba en un mensaje electrónico nada que no diría en público.
- Los mensajes antiguos tienen la mala costumbre de reaparecer cuando
- menos se lo espera.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Compruebe su ortografía y use frases completas.
- </para>
- </listitem>
-
- <listitem>
- <para>
- No envie mensajes desagradebles (broncas). Si recive uno,
- no lo conteste.
- </para>
- </listitem>
-
- <listitem>
- <para>
- Cuando responde o reenvía, incluya justo lo suficiente del mensaje
- anterior para tener un contexto: no incluya demasiado,
- ni demasiado poco.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- <para> ¡Feliz envío de correo! </para>
- </sect3>
- </sect2>
- </sect1>
-
- <sect1 id="usage-mail-organize">
- <title>Organizando Su Correo</title>
- <para>
- 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 <emphasis>need</emphasis> to sort and organize them.
- Fortunately, <application>Evolution</application> has the tools
- to help you do it.
- </para>
- <sect2 id="usage-mail-organize-columns">
- <title>Ordenando el Correo según las Columnas</title>
- <para>
- By default, the message list has columns with the following
- headings: an envelope icon indicating whether you have read
- or replied to a message (closed for unread, open for read,
- and open with an arrow on it to indicate you've sent a
- reply), an exclamation point indicating priority, and the
- <guilabel>From</guilabel>, <guilabel>Subject</guilabel>, and
- <guilabel>Date</guilabel> fields. You can change their order
- and remove them by dragging and dropping them. You can add
- new ones with the <guimenuitem>Field Chooser</guimenuitem>
- item in the right click menu for the column headings.
- </para>
- <para>
- Right-click on one of the column headers to get a list of
- options:
- <variablelist>
-
- <varlistentry>
- <term><guimenuitem>Sort Ascending</guimenuitem>,
- <guimenuitem>Sort Descending</guimenuitem>, and
- <guimenuitem>Unsort</guimenuitem></term>
- <listitem><para>Which should be pretty obvious. You
- can also set these sorts by just clicking on the
- column headers.</para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Group By this Field</guimenuitem></term>
- <listitem><para>
- Groups messages instead of sorting them. (FIXME: Explain further)
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Remove this
- Column</guimenuitem></term> <listitem><para> Remove
- this column from the display. You can also remove
- columns by dragging the header off the list and
- letting it drop. </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guimenuitem>Field
- Chooser</guimenuitem></term> <listitem><para> A list
- of column headers; just drag and drop them into
- place between two existing headers. A red arrow will
- appear to show you where you're about to put the
- column. </para></listitem>
- </varlistentry>
- </variablelist>
- </para>
- </sect2>
-
- <sect2 id="usage-mail-organize-folders">
- <title>Estar Organizando con Carpetas</title>
- <para>
- <application>Evolution</application> keeps mail, as well as
- address cards and calendars, in folders. You start out with a
- few, like <guilabel>Inbox</guilabel>,
- <guilabel>Outbox</guilabel>, and <guilabel>Drafts</guilabel>,
- but you can create as many as you like. Create new folders by
- selecting <guisubmenu>New</guisubmenu> and then
- <guimenuitem>Folder</guimenuitem> from the
- <guimenu>File</guimenu> menu.
- <application>Evolution</application> will as you for the name
- and the type of the folder, and will provide you with a folder
- tree so you can pick where it goes.
- </para>
- <para>
- When you click <guibutton>OK</guibutton>, your new folder will
- appear in the <interface>folder view</interface>. You can
- then put messages in it by dragging and dropping them, or by
- using the <guibutton>Move</guibutton> button in the
- toolbar. If you want to move several messages at once, click
- on the ones you want to move while holding down the
- <keycap>CTRL</keycap> key, or use <keycap>Shift</keycap> to
- select a range of messages. If you create a filter with the
- <interface>filter assistant</interface>, you can have mail
- moved to your folder automatically.
- </para>
- </sect2>
-
- <sect2 id="usage-mail-organize-search">
- <title>Buscando Mensajes</title>
- <para>
- Most mail clients can search through your messages for you,
- but <application>Evolution</application> does it faster. You
- can search through just the message subjects, just the message
- body, or both body and subject.
- </para>
- <para>
- To start searching, enter a word or phrase in the text area
- right below the toolbar, and choose a search type:
- <variablelist>
- <varlistentry>
- <term><guilabel>Body or subject contains:</guilabel></term>
- <listitem>
- <para>
- This will search message subjects and the messages
- themselves for the word or phrase you've entered in
- the search field.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term> <guilabel>Body contains:</guilabel> </term>
- <listitem>
- <para>
- This will search only in message text, not the subject
- lines.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>Subject contains:</guilabel></term>
- <listitem>
- <para>
- This will show you messages where the search text is
- in the subject line. It will not search in the
- message body.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>Body does not contain:</guilabel></term>
- <listitem>
- <para>
- 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.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><guilabel>Subject does not contain:</guilabel></term>
- <listitem>
- <para>
- This finds every mail whose subject does not contain
- the search text.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
-
- When you've entered your search phrase, press
- <keycap>Enter</keycap>. <application>Evolution</application>
- will show your search results in the message list.
- </para>
-
- <para>
- If you think you'll want to return to a search again, you can
- save it as a virtual folder by selecting <guilabel>Store
- Search as Virtual Folder</guilabel>.
- </para>
-
- <para>
- When you're done with the search, go back to seeing all your
- messages by choosing <guimenuitem>Show All</guimenuitem> from
- the <guilabel>Search</guilabel> drop-down box. If you're
- sneaky, just enter a blank search: since every message has at
- least one space in it, you'll see every message in the
- folder.
- </para>
-
- <para>
- If you'd like to perform a more complex search, open the
- advanced search dialog by selecting
- <guilabel>Advanced...</guilabel> from the
- <guilabel>Search</guilabel> drop-down menu. Then, create your
- search criteria (each with the same options you saw in the
- regular search bar), and decide whether you want to find
- messages that match all of them, or messages that match even
- one. Then, click <guibutton>Search</guibutton> to go and find
- those messages.
- </para>
-
- <para>
- You'll see a similar approach to sorting messages when you
- create filters and virtual folders in the next few sections.
- </para>
-
- </sect2>
-
- <sect2 id="usage-mail-organize-filters">
- <title>Estar organizado: Filtros de correo en Evolution</title>
- <para>
- I once worked in the mail room of a large company, where my
- job was to bundle, sort, and distribute mail to the various
- mail boxes and desks throughout the building. Filters do that
- same job with email, but they lose much less mail than I did.
- In addition, you can have multiple filters performing multiple
- actions that may effect the same message in several ways. For
- example, your filters could put copies of one message into
- multiple folders, or keep a copy and send one to another
- person as well, and it can do that in under a second. Which is
- to say, it's faster and more flexible than an actual person
- with a pile of envelopes.
- </para>
- <para>
- Most often, you'll want to have
- <application>Evolution</application> put mail into different
- folders, but you can have it do almost anything you like.
- People who get lots of mail, or who often need to refer to old
- messages, find filters especially helpful, but they're good
- for anybody who gets more than a few messages a day. To
- create a filter, open the <interface>filter
- assistant</interface> by selecting
- <menuchoice>
- <guimenu>Settings</guimenu>
- <guimenuitem>Mail Filters</guimenuitem>
- </menuchoice>.
- </para>
-
- <figure id="usage-mail-filters-fig-assist">
- <title>El Asistente de Filtros</title>
- <screenshot>
- <screeninfo>The Filter Assistant</screeninfo>
- <graphic fileref="fig/filter-assist-fig" format="png" srccredit="Aaron Weber">
- </graphic>
- </screenshot>
- </figure>
-
- <para>
- The <interface>filter assistant</interface> window contains a
- list of your current filters, sorted by the order in which
- they are used. From the drop-down box at the top of the
- window, choose <guilabel>Incoming</guilabel> to display
- filters for incoming mail, and <guilabel>Outgoing</guilabel>
- for those which sort only outgoing mail.
- </para>
- <para>
- The <interface>filter assistant</interface> also has a set of
- buttons:
- <itemizedlist>
-
- <listitem><para>
- <guibutton>Add</guibutton> &mdash; Create a new filter.
- </para></listitem>
-
- <listitem><para>
- <guibutton>Edit</guibutton> &mdash; Edit an existing filter.
- </para></listitem>
-
- <listitem><para>
- <guibutton>Delete</guibutton> &mdash; Delete the selected filter.
- </para></listitem>
-
- <listitem><para> <guibutton>Up</guibutton> &mdash; Move the
- selected filter up in the list so it gets applied first.
- </para></listitem>
-
- <listitem><para>
- <guibutton>Down</guibutton> &mdash; Move the selected filter down
- in the list, so it comes into play later.
- </para></listitem>
- </itemizedlist>
-
- If you don't have any filters set up, the only one of those
- buttons you can click is <guibutton>Add</guibutton>, which
- will open a dialog to let you add a filter rule. If you do
- have filters, you can either add a new filter rule, or select
- one from your list and click <guibutton>Edit</guibutton>.
- </para>
- <para>
- The filter rule editor, shown in <xref
- linkend="usage-mail-filters-fig-new">, is where you'll
- actually create your filtering rule.
-
- <figure id="usage-mail-filters-fig-new">
- <title>Creating a new Filter</title>
- <screenshot>
- <screeninfo>Creating a new Filter</screeninfo>
- <graphic fileref="fig/filter-new-fig" format="png" srccredit="Aaron Weber">
- </graphic>
- </screenshot>
- </figure>
- </para>
- <para>
- Enter a name for your filter in the <guilabel>Rule
- Name</guilabel> field, and then begin choosing the criteria
- you'd like to use as you sort your mail. Choose how many
- criteria you'd like by pressing <guibutton>Add
- Criterion</guibutton> and <guibutton>Remove
- Criterion</guibutton>. If you have multiple criteria, you
- should then decide whether to have the filter do its job only
- <guilabel>if all criteria are met</guilabel>, or <guilabel>if
- any criteria are met</guilabel>.
- </para>
- <para>
- For each filter criterion, you must first select what
- part of the message you want the filter to examine:
- <variablelist>
- <varlistentry>
- <term><guilabel>Sender</guilabel></term>
- <listitem><para>
- The sender's address.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guilabel>Recipients</guilabel></term>
- <listitem><para>
- The recipients of the message.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guilabel>Subject</guilabel></term>
- <listitem><para>
- The subject line of the message.
- </para></listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term><guilabel>Specific Header</guilabel></term>
- <listitem><para>
- The filter can look at any header you
- want, even obscure or custom ones. Enter the header name
- in the first text box, and put your search text in the
- second one.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guilabel>Message Body</guilabel></term>
- <listitem><para>
- Search in the actual text of the message.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guilabel>Expression</guilabel></term>
- <listitem>
- <para>
- Enter a <glossterm linkend="regular-expression">regular
- expression</glossterm>, and
- <application>Evolution</application> will search the
- entire message, including headers, to match it for you.
- </para>
- </listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term><guilabel>Date Sent</guilabel></term>
- <listitem><para> Filter messages by when they were sent:
- First, choose the conditions you want a message to
- meet&mdash; <guilabel>before</guilabel> a given time,
- <guilabel>after</guilabel> it, and so forth. Then, choose
- the time. The filter will compare the message's time-stamp
- to the system clock when the filter is run, or to a
- specific time and date you choose from a calendar. You
- can even have it look for messages within a range of time
- relative to the filter&mdash perhaps you're looking for
- messages less than two days old. </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guilabel>Date Recieved</guilabel></term>
- <listitem><para>
- This works the same way as the <guilabel>Date Sent</guilabel>
- option, except that it compares the time you got the message
- with the dates you specify.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guilabel>Priority</guilabel></term>
- <listitem><para>
- Emails have a standard priority range from -3 (least
- important) to 3 (most important). You can have filters set the
- priority of messages you recieve, and then have other filters
- applied only to those messages which have a certain priority.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guilabel>Regex Match</guilabel></term>
- <listitem>
- <para>
- If you know your way around a <glossterm
- linkend="regular-expression">regex</glossterm>, or
- regular expression, put your knowledge to use here.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guilabel>Source</guilabel></term>
- <listitem>
- <para>
- Filter messages according the server you got them from.
- You can enter a URL or choose one from the drop-down
- list. This ability is only relevant if you use more
- than one mail source.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- <para>
- Now, tell it what to do with those messages. If you want more
- actions, click <guibutton>Add Action</guibutton>; if you want
- fewer, click <guibutton>Remove Action</guibutton>. And choose
- again:
- <variablelist>
-
- <varlistentry>
- <term><guilabel>Copy to Folder</guilabel></term>
- <listitem><para>
- If you select this item, <application>Evolution</application>
- will put the messages into a folder you specify. Click the
- <guibutton>&lt;click here to select a folder&gt;</guibutton> button
- to select a folder.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guilabel>Move to Folder</guilabel></term>
- <listitem><para>
- If you select this item, <application>Evolution</application>
- will put the messages into a folder you specify. Click the
- <guibutton>&lt;click here to select a folder&gt;</guibutton> button
- to select a folder.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guilabel>Forward to Address</guilabel></term>
- <listitem><para>
- Select this, enter an address, and the addressee will
- get a copy of the message.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guilabel>Delete</guilabel></term>
- <listitem><para>
- Marks the message for deletion. You can still get the message
- back, at least until you <guimenuitem>Expunge</guimenuitem> your
- mail yourself.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guilabel>Stop Processing</guilabel></term>
- <listitem><para>
- Select this if you want to tell all other filters to ignore
- this message, because whatever you've done with it so far
- is plenty.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guilabel>Assign Color</guilabel></term>
- <listitem><para>
- Select this item, and <application>Evolution</application>
- will mark the message with whatever color you please.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guilabel>Assign Score</guilabel></term>
- <listitem><para> If you know that all mail with
- "important" somewhere in the message body line is
- important, you can give it a high priority score. In a subsequent filter you can
- then arrange your messages by their priority score.
- </para></listitem>
- </varlistentry>
-
- </variablelist>
- </para>
- <para>
- You're done. Click <guibutton>OK</guibutton> to use this
- filter, or <guibutton>Cancel</guibutton> to close the window
- without saving any changes.
- </para>
-
-
-
- <!-- FIXME: This needs to be in there. But the feature is temporarily
- disabled and I don't know how it will be reimplemented.
-
- <itemizedlist>
- <listitem>
- <para>
- <guilabel>When mail arrives:</guilabel> Select
- this option to have messages filtered as they
- arrive.
- </para>
- </listitem>
- <listitem>
- <para>
- <guilabel>When mail is sent:</guilabel> Select
- this option to filter your outgoing mail. You
- can use this feature to keep your
- <interface>Outbox</interface> as organized as
- your <interface>Inbox</interface>.
- </para>
- </listitem>
- </itemizedlist>
- </para>
-
- -->
-
- <note>
- <title>Dos Características Notables de los Filtros</title>
- <para>
- <itemizedlist>
- <listitem><para>
- El correo de entrada que sus filtros no mueven va a la carpeta Inbox;
- el correo de salida que no mueven acaba en la carpeta Sent.
- </para>
- </listitem>
-
- <listitem><para>Si mueve una carpeta, sus filtros
- la seguirán. </para></listitem>
- </itemizedlist>
- </para>
- </note>
- </sect2>
-
-
-
- <sect2 id="usage-mail-organize-vFolders">
- <title>Estar Realmente Organizado con Carpetas Virtuales</title>
- <para>
- If filters aren't flexible enough for you, or you find
- yourself performing the same search again and again, consider
- a virtual folder. Virtual folders, or vFolders, are an
- advanced way of viewing your email messages within
- <application>Evolution</application>. If you get a lot of
- mail or often forget where you put messages, virtual folders can help
- you stay on top of things.
- </para>
- <para>
- A virtual folder is really a hybrid of all the other organizational
- tools: it looks like a folder, it acts like a search, and you
- set it up like a filter. In other words, while a conventional
- folder actually contains messages, a virtual folder is a view of
- messages that may be in several different folders. The
- messages it contains are determined on the fly using a set of
- criteria you choose in advance.
- </para>
-
- <para>
- As messages that meet the virtual folder criteria arrive or are
- deleted, <application>Evolution</application> will
- automatically place them in and remove them from the
- virtual folder contents list. When you delete a message, it gets
- erased from the folder in which it actually exists, as well as
- any virtual folders which display it.
- </para>
-
- <para>
- 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 more mail you need to organize, the less you
- can afford the sort of confusion that stems from an
- organizational system that's not flexible enough. Virtual folders
- make for better organization because they can accept
- overlapping groups in a way that regular folders and filing
- systems can't.
- </para>
-
- <example id="usage-mail-organize-vFolders-ex">
- <title>Usando Carpetas, Búsquedas, y Carpetas Virtuales</title>
- <para>
- Para organizar el correo en mi buzón, defino una carpeta virtual para
- los mensajes de mi amiga y compañera Anna. Tengo otra para los
- los mensajes que tienen "ximian.com" en la dirección y "Evolution"
- en el asunto, así puedo registrar que personas del trabajo me escriben
- acerca de <application>Evolution</application>. Si Anna me envía un
- mensaje acerca de cualquier cosa excepto Evolution, solo aparece
- en la carpeta "Anna". Cuando Anna me escribe acerca de la interfaz
- de usuario de <application>Evolution</application>, puedo ver ese
- mensaje en la carpeta virtual "Anna" y en la carpeta virtual
- "Discusión Interna sobre Evolution".
- </para>
- </example>
-
- <!-- (INSERT SCREENSHOT HERE: virtual folders in action) -->
-
- <para>
- To create a virtual folder, select <menuchoice>
- <guimenu>Settings</guimenu> <guimenuitem>Virtual Folder
- Editor</guimenuitem> </menuchoice>. This will bring up a
- dialog box that looks suspiciously like the filter window
- (for more information on filters, see <xref
- linkend="usage-mail-organize-filters">), and which
- presents you with a list of virtual folders you have previously
- created. If you have created any virtual folders, they are listed
- here, and you can select, edit or remove them if you wish.
- If you have not created any, there will be only one available
- option: click <guibutton>Add</guibutton> to add a new
- Virtual Folder.
- </para>
- <para>
- You can enter a name for your virtual folder in the
- <guilabel>Name</guilabel>. Then, tell
- <application>Evolution</application> what messages to look
- for. This process is exactly like filter creation: decide
- between <guilabel>Match all parts</guilabel> and
- <guilabel>Match any part</guilabel>, then choose what part of
- the message to look in, what sort of matching to perform, and
- specify exactly what it is that you want to find, be it a
- line of text, a score, a regular expression, or a particular date or
- range of dates.
- </para>
- <para>
- The second part, however, is slightly different. In the
- section of the window labelled <guilabel>Virtual Folder Sources
- </guilabel> is a list of folders in which
- <application>Evolution</application> will search for the
- contents of your vFolder. Click <guibutton>Add</guibutton>
- to add a folder, or <guibutton>Remove</guibutton> to remove
- one. That way, you can have your vFolder search in
- newsgroups, or just in one of your mailboxes, or just in a
- select few folders you've already screened with filters.
- </para>
- <para>
- The vFolder creation window is shown in <xref
- linkend="usage-mail-vfolder-fig-createrule">
-
- <figure id="usage-mail-vfolder-fig-createrule">
- <title>Selecting a vFolder Rule</title>
- <screenshot>
- <screeninfo>Creating a vFolder Rule</screeninfo>
- <graphic fileref="fig/vfolder-createrule-fig" format="png" srccredit="Aaron Weber">
- </graphic>
- </screenshot>
- </figure>
- </para>
- </sect2>
- <sect2 id="usage-mail-subscriptions">
- <title>Subscription Management</title>
- <para>
- <application>Evolution</application> lets you handle your
- IMAP and newsgroup subscriptions with the same tool: the
- subscriptions manager. To start using it, choose
- <menuchoice> <guimenu>Settings</guimenu> <guimenuitem>Manage
- Subscriptions</guimenuitem> </menuchoice>.
- </para>
- <para>
- If you have configured any IMAP (mail) or NNTP (news)
- servers, you will see them listed in the left half of the
- subscription management window. Click on a server to select
- it, and you will see the folders or newsgroups available to
- you. You can then select individual folders and subscribe to
- them, or remove yourself from the subscription list.
- </para>
- <para>
- Once you have subscribed to a folder or newsgroup, your system
- will check for new messages whenever you press the
- <guibutton>Get Mail</guibutton> button.
- </para>
-
- </sect2>
- </sect1>
-</chapter>
-
-
diff --git a/doc/es/usage-mainwindow.sgml b/doc/es/usage-mainwindow.sgml
deleted file mode 100644
index 44dd90350a..0000000000
--- a/doc/es/usage-mainwindow.sgml
+++ /dev/null
@@ -1,453 +0,0 @@
-<!--
- <!DOCTYPE Chapter PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.1//EN">
--->
-<chapter id="usage-mainwindow">
-
- <title>La Ventana Principal: Conceptos Básicos de Evolution</title>
- <para>
- Start <application>Evolution</application> by selecting
- <menuchoice><guimenu>Main Panel Menu</guimenu>
- <guisubmenu>Applications</guisubmenu>
- <guimenuitem>Evolution</guimenuitem></menuchoice> or by typing
- <command>evolution</command> at the command line. The first time
- you run the program, it will create a directory called
- <filename>evolution</filename> in your home directory, where it
- will keep all your <application>Evolution</application>-related
- files.
- </para>
- <para>
- After <application>Evolution</application> starts
- up, you will see the <interface>main window</interface>, with the
- <interface>Inbox</interface> open. It should look a lot like the
- picture in <xref linkend="usage-mainwindow-fig">. On the left of
- the <interface>main window</interface> is the <interface>shortcut
- bar</interface>, with several buttons in it. Just underneath the
- title bar is a series of menus in the <interface>menu
- bar</interface>, and below that, the <interface>tool
- bar</interface> with buttons for different functions. The largest
- part of the <interface>main window</interface> is taken up by the
- actual <interface>Inbox</interface>, where messages are listed
- and displayed. If you're running the program for the first time,
- you'll have just one message: a welcome from Ximian.
-
-
-<!-- ==============Figure=================================== -->
- <figure id="usage-mainwindow-fig">
- <title>Evolution Main Window and Inbox</title>
- <screenshot>
- <screeninfo>Evolution Main Window</screeninfo>
- <graphic fileref="fig/mainwindow-pic" format="png" srccredit="Kevin Breit">
- </graphic>
- </screenshot>
- </figure>
-<!-- ==============End of Figure=================================== -->
-</para>
-
- <para>
- <note>
- <title>The Way Evolution Looks</title>
- <para>
- The appearance of both <application>Evolution</application>
- and <application>GNOME</application> is very easy to
- customize, so your screen might not look like this picture.
- You might decide to have <application>Evolution</application>
- start with the calendar and a folder bar, or with the contact
- manager occupying the entire window.
- </para>
- </note>
- </para>
-
- <sect1 id="usage-mainwindow-shortcutbar">
- <title>La Barra de Atajos</title>
- <para>
- <application>Evolution</application>'s most important job is
- to give you access to your information and help you use it
- quickly. One way it does that is through the
- <interface>shortcut bar</interface>, the column on the left
- hand side of the main window. The large buttons with names
- like <guilabel>Inbox</guilabel> and
- <guilabel>Contacts</guilabel> are the shortcuts, and you can
- select different groups of shortcuts by clicking the
- rectangular group buttons.
- </para>
- <para>
- The shortcut group buttons are <guibutton>Evolution
- Shortcuts</guibutton> and <guibutton>Internet
- Directories</guibutton>. When you click on them, they'll slide
- up and down to give you access to different sorts of shortcuts.
- When you first start <application>Evolution</application>, you
- are looking at the <guilabel>Evolution Shortcuts</guilabel>
- category. If you click <guilabel>Internet
- Directories</guilabel>, it will slide up and you'll see buttons
- for the <guilabel>Bigfoot</guilabel> and
- <guilabel>Netcenter</guilabel> directories, as well as any
- others you or your system administrator may have added. You can
- add more groups by right-clicking on the background of the
- shortcut bar and selecting <guimenuitem>Menu
- Group</guimenuitem>. Internet directories behave a lot like
- the local contact manager, which is covered in <xref
- linkend="usage-contact">.
- </para>
- <para>
- Take a look at the <guilabel>Evolution Shortcuts</guilabel>
- again. The shortcut buttons in that category are:
-
- <variablelist>
-
-<!-- NOT IMPLEMENTED!
- <varlistentry>
- <term> <guibutton>Today:</guibutton></term>
- <listitem>
- <para>
- This will bring up a summary of any new messages you've
- received, along with the tasks and appointments you have
- lined up for today.
- </para>
- </listitem>
- </varlistentry>
--->
-
-
- <varlistentry>
- <term> <guibutton>Executive Summary:</guibutton></term>
- <listitem>
- <para>
- Start your day here. The Executive summary gives you
- lists of new or important messages, daily appointments
- and urgent tasks. You can customize its appearance and
- content, and use it to access Evolution services.
- </para>
- </listitem>
- </varlistentry>
-
-
- <varlistentry>
- <term> <guibutton>Inbox:</guibutton></term>
- <listitem>
- <para>
- Click the <guibutton>Inbox</guibutton> button to start
- reading your mail. Your Inbox is also where you can
- access Evolution's tools to filter, sort, organize, and
- search your mail.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guibutton>Calendar:</guibutton></term>
- <listitem>
- <para>
- The Calendar can store your appointments and To do lists
- for you. Connected to a network, you can use it to keep
- a group of people on schedule and up to date.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guibutton>Tasks:</guibutton></term>
- <listitem>
- <para>
- A full-size view of your calendar's task pad.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><guibutton>Contacts:</guibutton></term>
- <listitem>
- <para>
- 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.
- </para>
- </listitem>
- </varlistentry>
-
-<!-- NOT IMPLEMENTED YET
-
-
- <varlistentry>
- <term> <guibutton>Notes:</guibutton></term>
- <listitem>
- <para> The note pad is your catch-all tool: use it to take
- messages from phone conversations, keep small things
- organized, write <glossterm linkend="haiku">haiku</glossterm>, or whatever
- you like. This feature is not yet implemented, but will be
- soon. See <xref linkend="usage-notes"> for more
- information.
- </para>
- </listitem>
- </varlistentry>
--->
-
- </variablelist>
- </para>
- <para>
- If you don't like the shortcut bar, you can use the folder bar
- or the menu bar to navigate the main window. Press
- <keycombo action="simul">
- <keycap>Ctrl</keycap>
- <keycap>O</keycap>
- </keycombo>
- to choose from a list of folders you'd like to visit, or use the
- drop-down folder bar. You can hide and show the folder bar and
- the shortcut bar by selecting those items in the
- <guimenu>View</guimenu> menu.
- </para>
-
- <tip>
- <title>Trucos de la Barra de Atajos</title>
- <para>
- To remove a shortcut from the shortcut bar, right-click on it
- and select <guimenuitem>Remove</guimenuitem>. To add one,
- select <menuchoice> <guimenu>File</guimenu>
- <guisubmenu>New</guisubmenu> <guimenuitem>Evolution Bar
- Shortcut</guimenuitem> </menuchoice>.
- </para>
- <para>
- To change the way the shortcut bar looks, right-click in an
- empty space on the shortcut bar. From the menu that appears,
- you can select icon sizes.
- </para>
- </tip>
- </sect1>
-
- <sect1 id="usage-mainwindow-folderbar">
- <title>La Barra de Carpetas</title>
- <para>
- The <interface>folder bar</interface> is a more comprehensive
- way to view the information you've stored with
- <application>Evolution</application>. It displays all your
- appointments, address cards, and email in a tree that's a lot
- like a <glossterm linkend="filetree">file
- tree</glossterm>&mdash; it starts small at the top, and branches
- downwards. On most computers, there will be three or four
- folders at the base. First is the <guilabel>Local</guilabel>
- folder, which holds all the <application>Evolution</application>
- data that's stored on your computer. After that come
- <guilabel>Virtual Folders</guilabel>, or virtual folders, discussed in
- <xref linkend="usage-mail-organize-vfolders">, followed by any
- <glossterm linkend="imap">IMAP</glossterm> mail folders you may
- have available to you over your network. Lastly, there are
- <guilabel>External Directories</guilabel>, <glossterm
- linkend="ldap">LDAP</glossterm> contact directories stored on a
- network.
- </para>
- <para>
-
- A typical <guilabel>Local</guilabel> folder contains the following folders:
- <itemizedlist>
- <listitem>
- <para>
- <guilabel>Calendar</guilabel>, for appointments and
- event listings.
- </para>
- </listitem>
- <listitem>
- <para>
- <guilabel>Contacts</guilabel>, for address cards.
- </para>
- </listitem>
- <listitem>
- <para>
- <guilabel>Inbox</guilabel>, for incoming mail.
- </para>
- </listitem>
- <listitem>
- <para>
- <guilabel>Drafts</guilabel>, for messages you started and didn't finish.
- </para>
- </listitem>
- <listitem>
- <para>
- <guilabel>Sent</guilabel>, for sent mail.
- </para>
- </listitem>
- <listitem>
- <para>
- <guilabel>Trash</guilabel>, which is used to store
- messages you don't want, but keep around just in case you
- change your mind.
- </para>
- </listitem>
- <listitem>
- <para>
- <guilabel>Outbox</guilabel>, for messages you have written
- but not yet sent. This will be empty unless you use
- <application>Evolution</application> while offline.
- </para>
- </listitem>
-
- </itemizedlist>
-
- </para>
- <tip id="foldertips">
- <title>Navegando sin la Barra de Carpetas</title>
- <para>
- You don't need the folder bar or the shortcut bar to move
- around the main window. You can use <keycap>Tab</keycap> to
- switch from one part of the window to another, and the folder
- menu on the right side of the window just below the toolbar
- to move about the folder tree.
- </para>
- </tip>
-
- <para>
- To create a new folder, select <menuchoice>
- <guimenu>File</guimenu> <guisubmenu>New</guisubmenu>
- <guimenuitem>Folder</guimenuitem></menuchoice>. You'll be asked where you want to
- put it, and what kind of folder it should be. You can choose
- from three types: <guilabel>Mail</guilabel>, for storing mail,
- <guilabel>Calendar</guilabel> for storing calendars, and
- <guilabel>Contacts</guilabel> for storing contacts.
- </para>
-
- <note>
- <title>Las Carpetas Tienen Limitaciones</title>
- <para>
- Los calendarios deben ir en carpetas de calendarios, el correo
- en carpetas de correo, y los contactos en carpetas de contactos.
- </para>
- </note>
-
- <para>
- Right-clicking will bring up a menu for just about anything
- in GNOME, and <application>Evolution</application> is no
- exception. If you right-click on a folder, you'll have a
- menu with the following options:
- <itemizedlist>
- <listitem><para><guimenuitem>FIXME</guimenuitem>, for another purpose. </para></listitem>
- <listitem><para><guimenuitem>Something else</guimenuitem>, for another purpose. </para></listitem>
- </itemizedlist>.
- </para>
-
- <tip>
- <title>Ayuda Sensible al Contexto</title>
- <para>
- GNOME 2.0 will support context-sensitive help, which means 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, choosing <guimenuitem>Help</guimenuitem> from
- the right-click menu is a good way to find out.
- </para>
- </tip>
-
- <para>
- Any time new information arrives in a folder, that folder label
- is displayed in bold text.
- </para>
- <para>
- To delete a folder, right-click it and select
- <guimenuitem>Delete</guimenuitem> from the menu that pops up.
- To change the order of folders, or put one inside another, use
- drag-and-drop. To move individual
- messages, appointments, and address cards between folders, you
- can do the same thing: drag them where you want them, and
- they'll go.
- </para>
- </sect1>
- <sect1 id="usage-mainwindow-menubar">
- <title>La Barra de Menú</title>
- <para>
- The <interface>menu bar</interface>'s contents will always
- provide all the possible actions for any given view of your
- data. That means that, depending on the context, menu bar items
- will change. If you're looking at your Inbox, most of the menu
- items will relate to mail; some will relate to other components
- of <application>Evolution</application> and some, especially
- those in the <guimenu>File Menu</guimenu> will relate to the
- application as a whole. The contents of the menu bar are
- described in <xref linkend="menuref">.
- </para>
- <para>
- <variablelist>
- <varlistentry>
- <term> <guimenu>File</guimenu> Menu</term>
-
- <listitem><para>
- Anything even related to a file or to the operations
- of the application generally falls under this
- menu: creating things, saving them to disk,
- printing them, and quitting the program itself.
-
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term> <guimenu>Edit</guimenu> Menu </term>
- <listitem><para>
- The <guimenu>Edit</guimenu> menu holds
- useful tools that help you edit text and move it around.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term> <guimenu>View</guimenu> Menu </term>
- <listitem><para>
- This menu lets you decide how <application>Evolution</application>
- should look. Some of the features control the appearance of
- <application>Evolution</application> as a whole, and others
- the way a particular kind of information appears.
- </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term> <guimenu>Settings</guimenu> Menu </term>
- <listitem><para> Tools for configuring, changing, and
- setting up go here. For mail, that means things like
- <guimenuitem>Mail Configuration</guimenuitem> and the
- <guimenuitem>Virtual Folder Editor</guimenuitem>. For the
- <interface>Calendar</interface> and the <interface>Contact
- Manager</interface>, it's color, network, and layout
- configuration. </para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term> <guimenu>Help</guimenu> Menu</term>
- <listitem><para>
- Select among these items to open the
- <application>Help Browser</application>
- and read the <application>Evolution</application> manual.
- </para></listitem>
- </varlistentry>
- </variablelist>
- </para>
- <para>
- Other menus, like <guilabel>Folder</guilabel>,
- <guilabel>Message</guilabel>, and <guilabel>Actions</guilabel>,
- appear only occasionally. <guilabel>Message</guilabel> and
- <guilabel>Folder</guilabel>, for example, have commands that only
- relate to email, so they're only available when you're looking at
- email.
- </para>
- <para>
- Once you've familiarized yourself with the <interface>main
- window</interface> you can start doing things with it. We'll
- start with your email inbox, since you've got a letter waiting
- for you already.
- </para>
- </sect1>
-</chapter>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/doc/es/usage-notes.sgml b/doc/es/usage-notes.sgml
deleted file mode 100644
index fb4e3289b2..0000000000
--- a/doc/es/usage-notes.sgml
+++ /dev/null
@@ -1,49 +0,0 @@
-<chapter id="usage-notes">
- <title>Notas de Evolution</title>
- <abstract>
- <title> Una Vista General de las Notas de Evolution</title>
- <para>
- En la edad oscura antes de que el correo electrónico fuera inventado,
- habia pequeños trozos de papel que la gente usaba para guardar
- información que se necesitaba durante poco tiempo. A estos trozos de
- papel se les llamó notas. Ahora, las notas son casi una parte
- necesaria de nuestras vidas, aunque ahora en formato electrónico.
- Tiene sentido, entonces, que <application>Evolution</application>
- eventualmente tenga una función de notas.
- <application>Evolution</application> le ayuda a tomar notas de la
- siguientes formas:
- <itemizedlist>
- <listitem>
- <para>
- Apunte números de teléfono, notas de la escuela, tome notas de
- mensajes telefónicos, o incluso escriba poesía.
- </para>
- </listitem>
- <listitem>
- <para>
- Un código de colores para las notas pra poder organizarlas, o
- simplemente para que tengan una apariencia bonita.
- </para>
- </listitem>
- <listitem>
- <para>
- Convierta una nota en un mensaje electrónico o en un archivo de texto.
- </para>
- </listitem>
- <listitem>
- <para>
- Escriba <glossterm>Haiku</glossterm>
- </para>
- </listitem>
- </itemizedlist>
- </para>
- <para>
- Puede comenzar a escribir notas pulsando sobre
- <guibutton>Notas</guibutton> en la barra de atajos. Naturalmente,
- todavia no está ahí. Pero cuando esté, le llevara al editor.
- </para>
- </abstract>
-</chapter>
-
-
-
diff --git a/doc/es/usage-print.sgml b/doc/es/usage-print.sgml
deleted file mode 100644
index ef5b501f8e..0000000000
--- a/doc/es/usage-print.sgml
+++ /dev/null
@@ -1,104 +0,0 @@
-<chapter id="usage-print">
-<title>Imprimiendo con Evolution</title>
-<para>
- Este es un capítulo muy corto, porque imprimir con
- <application>Evolution</application> no es unatarea complicada. Como
- la mayoría de las aplicaciones GNOME, <application>Evolution</application>
- usa el sistema gnome-print, así que si ha usado otra aplicación GNOME
- para imprimir, debería sera capaz de imprimir inmeditamente en
- <application>Evolution</application>.
-</para>
-<para>
- Tanto si esta imprimiendo un mensaje, una pagina del calendario, o una
- selección de tarjetas de visita, puede elegir entre imprimirlo directamente
- en la impresora, o guardar la salida de la impresión en un archivo
- postscript. También puede usar la característica de vista previa para ver
- como será la salida.
-</para>
-
- <sect1 id="printpreview">
- <title>Vista Previa de la Impresión</title>
- <para>
- <guibutton>Vista Previa</guibutton> aparece como un botón en
- el diálogo de impresión y como una opción en el menú
- <guimenu>Archivo</guimenu>. En ambos sitios, hace lo mismo:
- abre una nueva ventana que le muestra que pasaría si imprimiese
- el mensaje, el calendario, la cita, o la tarjeta de actual.
- </para>
- <para>
- Esa ventana le permite sleccionar que páginas quiere ver,
- y como de cerca quiere verlas. Aumentar o disminuir el zoom,
- ajustar la página a la ventana (el botón <guibutton>Ajustar</guibutton>)
- o igualar el ancho del papel con el de la ventana (el botón
- <guibutton>Ajustar Ancho</guibutton>). Ninguno de estos botones
- modifica la manera en que se imprimen las páginas, pero le permiten
- verlas mejor. Si está satisfecho con el aspecto que tienen, pulse
- <guibutton>Imprimir</guibutton> para enviar su documento a su destino.
- Si quisiera cambiarlo, cierre la ventana de la
- <guilabel>Vista Previa</guilabel> y haga los cambios que quiera
- en el Correo, el Calendario, o el Administrador de Contactos.
- </para>
-
-
- <!-- ==============Figure=================================== -->
-
- <figure id="print-preview">
- <title>Vista Previa de la Impresión</title>
- <screenshot>
- <screeninfo>Print Preview</screeninfo>
- <graphic fileref="fig/print-preview" format="png" srccredit="Aaron Weber">
- </graphic>
- </screenshot>
- </figure>
-<!-- ==============End of Figure============================== -->
-
- </sect1>
-
- <sect1 id="print-destination">
- <title>¿Archivo o Impresora?</title>
- <para>
- La ventana de selección de impresora, mostrada en <xref
- linkend="print-dest">, le permite elegir el formato de
- impresión&mdash; en estos momentos, solo está disponible
- <guilabel>Postscript Genérico</guilabel>&mdash; y si imprimir a un
- archivo o a una impresora. Si elige una impresora,
- le pedirá el comando que use su sistema para la impresora
- (probablemente <guilabel>lpr</guilabel>). Si decide imprimir en un
- archivo, debe decidir el nombre. Y naturalmente, debe decidor el
- número de copias, y si deben ir o no intercaladas.
- </para>
-
- <!-- ==============Figure=================================== -->
-
- <figure id="print-dest">
- <title>Eligiendo una Impresora</title>
- <screenshot>
- <screeninfo>Choosing a Printer</screeninfo>
- <graphic fileref="fig/print-dest" format="png" srccredit="Aaron Weber">
- </graphic>
- </screenshot>
- </figure>
-<!-- ==============End of Figure============================== -->
-
- <para>
- Si está imprimiendo un mensaje que ocupa más de una página, tiene la
- opción de elegir que páginas imprimir. Si está imprimiendo las
- entradas de un calendario, puede decidir el rango de fechas a imprimir.
- Y, si está imprimiendo tarjetas, puede decidir si imprimir solo las
- seleccionadas, o todas ellas.
- </para>
- <para>
- Cuando este listo, pulse <guibutton>Imprimir</guibutton> para imprimir,
- <guibutton>Vista Previa</guibutton> para echar un vistazo (u otro más)
- a la vista previa, o <guibutton>Cancelar</guibutton> para cancelarlo
- todo.
- </para>
- </sect1>
-</chapter>
-
-
-
-
-
-
-
diff --git a/doc/es/usage-sync.sgml b/doc/es/usage-sync.sgml
deleted file mode 100644
index 878406c4b6..0000000000
--- a/doc/es/usage-sync.sgml
+++ /dev/null
@@ -1,20 +0,0 @@
-
- <chapter id="usage-sync">
- <title>Sincronizando con un Dispositivo de mano</title>
- <para>
- Este capítulo cubre como sincronizar datos una vez instalado y
- configurado. Si necesita información sobre como preparar un
- sistema de sincronización, consulte <xref
- linkend="config-sync">.
- </para>
- <sect1 id="hotsync">
- <title>Usando la Sincronización</title>
- <para>
- Ponga su dispositivo de mano en su cuna y apriete el botón
- de sincronización.
- </para>
- <para>
- No, de verdad. Esto es todo lo que hay que hacer.
- </para>
- </sect1>
- </chapter> \ No newline at end of file
diff --git a/doc/update_po.pl b/doc/update_po.pl
deleted file mode 100755
index 0cc236318b..0000000000
--- a/doc/update_po.pl
+++ /dev/null
@@ -1,203 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Script for translators that extract .sgml files into .sgml.po ones
-#
-# Copyright (C) 2001 Héctor García Álvarez.
-#
-# 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 script is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-#
-# Authors: Héctor García Álvarez <hector@scouts-es.org>
-
-## Loaded modules
-use strict;
-use File::Basename;
-use Getopt::Long;
-
-my $LANG = $ARGV[0];
-#my $OUTFILE = "./tmp/$FILE.h";
-
-my %string = ();
-my @elements;
-my @items;
-my $n=0;
-
-if (! $LANG){
- print "Usage: update_po.pl LANGCODE\n";
- exit;
-} else { $LANG .=".po"; }
-
-chdir ("./C");
-if ( !(-d "./tmp") ) { mkdir ("./tmp", 0755) ; }
-my $comand="";
-
-open FILES, "<POTFILES.in" ;
-#open POTFILE, ">POTFILES.in.h";
-while (<FILES>) {
- undef (%string);
- s/\n//g;
- my $Original_file = $_ ;
- s/.\///g;
- my $Converted_file = "./tmp/".$_.".h";
- # print $Original_file."\n";
- # print $Translated_file."\n";
- print "Converting ".$Original_file."\n" ;
- system "rm -f $Converted_file";
- &Convert ($Original_file);
- open OUT, ">>$Converted_file";
- &addMessages;
- close OUT;
- $comand = "xgettext --default-domain=$Original_file ";
- $comand .="--directory=. --add-comments --keyword=_ --keyword=N_ ";
- $comand .="$Converted_file ";
- system ( $comand );
- print ("Updating $Original_file.po\n");
- system ("mv $Original_file.po ../$LANG/$Original_file.pot");
- system ("cp ../$LANG/$Original_file.po ../$LANG/$Original_file.po.old");
- system ("msgmerge ../$LANG/$Original_file.po.old ../$LANG/$Original_file.pot -o ../$LANG/$Original_file.po");
- system ("msgfmt --statistics ../$LANG/$Original_file.po");
- system ("rm -f ../$LANG/$Original_file.pot");
-# print POTFILE $Converted_file."\n";
- print ".\n";
-}
-close FILES;
-
-system ("rm -rf ./tmp ");
-exit 0;
-
-
-sub Convert() {
-
- ## Reading the file
- open (IN, "<$_[0]") || die "can't open $_[0]: $!";
-
- ### For translatable Sgml files ###
- while (<IN>) {
- if ( /<!--/ ) {
- my $Salida = $_ ;
- if ( (/-->/) ) {
- $string{$Salida} = [];
- } else {
- while (<IN>) {
- $Salida .= $_ ;
- if ( /-->/ ) { last ; }
- }
- $string{$Salida} = [];
- }
- }
- elsif ( /<para>/ ) {
- my $number_of_para = 1;
- my $Salida = $_ ;
- if ( /<\/para>/ ) {
- $string{$Salida} = [];
- } else {
- while (<IN>) {
- if ( /<para>/ ) { $number_of_para++; }
- $Salida .= $_ ;
- if ( /<\/para>/ ) {
- $number_of_para--;
- if ( $number_of_para==0) {last ; }
- }
- }
- $string{$Salida} = [];
- }
- }
- elsif ( /<title>/ ) {
- my $Salida = $_ ;
- if ( /<\/title>/ ) {
- $string{$Salida} = [];
- } else {
- while (<IN>) {
- $Salida .= $_ ;
- if ( /<\/title>/ ) { last ; }
- }
- $string{$Salida} = [];
- }
- }
- elsif ( /<glossterm>/ ) {
- my $Salida = $_ ;
- if ( /<\/glossterm>/ ) {
- $string{$Salida} = [];
- } else {
- while (<IN>) {
- $Salida .= $_ ;
- if ( /<\/glossterm>/ ) { last ; }
- }
- $string{$Salida} = [];
- }
- }
- elsif ( /<guilabel>/ ) {
- my $Salida = $_ ;
- if ( /<\/guilabel>/ ) {
- $string{$Salida} = [];
- } else {
- while (<IN>) {
- $Salida .= $_ ;
- if ( /<\/guilabel>/ ) { last ; }
- }
- $string{$Salida} = [];
- }
- }
- }
- close (IN);
-}
-
-sub addMessages{
-
- foreach my $theMessage (sort keys %string) {
-
- my ($tag) = $string{$theMessage} ;
-
- # Replace XML codes for special chars to
- # geniune gettext syntax
- #---------------------------------------
- $theMessage =~ s/"/\\"/mg;
- $theMessage =~ s/\n/\\n\n/mg;
-
-# $theMessage =~ s/&lt;/</mg;
-# $theMessage =~ s/&gt;/>/mg;
-
- if ($theMessage =~ /\n/) {
- #if ($tag) { print OUT "/* $tag */\n"; }
- @elements = split (/\n/, $theMessage);
- for ($n = 0; $n < @elements; $n++) {
-
- if ($n == 0) {
- print OUT "gchar *s = N_";
- print OUT "(\"$elements[$n]\"";
- if ($n == @elements - 1) { print OUT ");\n"; }
- print OUT "\n";
- }
-
- elsif ($n == @elements - 1) {
- print OUT " ";
- print OUT "\"$elements[$n]\");\n\n";
- }
-
- elsif ($n > 0) {
- print OUT " ";
- print OUT "\"$elements[$n]\"\n";
- }
- }
-
- } else {
-
-# if ($tag) { print OUT "/* $tag */\n"; }
- print OUT "gchar *s = N_(\"$theMessage\");\n";
- }
-
- }
-}
-
diff --git a/doc/update_translation.pl b/doc/update_translation.pl
deleted file mode 100755
index 0023b069d1..0000000000
--- a/doc/update_translation.pl
+++ /dev/null
@@ -1,240 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Script that translates .sgml files using the .po files generated from
-# the script update_po.pl
-#
-# Copyright (C) 2001 Héctor García Álvarez.
-#
-# 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 script is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 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., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-#
-# Authors: Héctor García Álvarez <hector@scouts-es.org>
-
-## Loaded modules
-use File::Basename;
-use Getopt::Long;
-
-my $LANG = $ARGV[0];
-
-my %string;
-my $texto_original="";
-my $texto_traducido="";
-
-if (! $LANG){
- print "Usage: update_translation.pl LANGCODE\n";
- exit;
-}
-
-chdir ("./C");
-
-## Reading the po file
-#print "Loading ".$LANG.".po\n";
-#&load_translated_strings ($LANG.".po");
-
-## Checking for the lang dir
-if ( !(-d "../".$LANG) ) { mkdir ("../".$LANG, 0755) ; }
-
-open FILES, "<POTFILES.in" ;
-while (<FILES>) {
- undef %string;
- s/\n//g;
- $Original_file = $_ ;
- s/.\///g;
- $Translated_file = "../".$LANG."/".$_;
-# print $Original_file."\n";
-# print $Translated_file."\n";
- &load_translated_strings ("../".$LANG.".po/".$_.".po");
- print "Translating ".$Original_file ;
- system "rm -f $Translated_file";
- &translate_file ($Translated_file , $Original_file);
- print ".\n";
-}
-close FILES;
-
-exit 0;
-
-
-
-
-sub load_translated_strings ()
-{
- my $FILE=$_[0];
- open (IN, "<$FILE") || die "I can't find $FILE";
-
- while (<IN>) {
- if ( /#: /) {
- &original;
- &traduccion;
-# print "Original \n##".$texto_original."##\n";
-# print "Traducción \n##".$texto_traducido."##\n";
- $string{$texto_original} = $texto_traducido;
- }
- }
- close (IN);
-}
-
-sub translate_file ()
-{
- my $OUTFILE=$_[0];
- my $INFILE=$_[1];
-
- open OUT, ">>$OUTFILE";
- open (IN, "<$INFILE") || die "can't open $INFILE: $!";
-
- while (<IN>) {
- my $imprimir = 0;
- if ( /<!--/ ) {
- $Salida = $_ ;
- if ( !(/-->/) ) {
- while (<IN>) {
- $Salida .= $_ ;
- if ( /-->/ ) { last ; }
- }
- }
- $imprimir = 1;
- }
- elsif ( /<para>/ ) {
- my $number_of_para = 1;
- $Salida = $_ ;
- if ( !(/<\/para>/) ) {
- while (<IN>) {
- if ( /<para>/ ) { $number_of_para++; }
- $Salida .= $_ ;
- if ( /<\/para>/ ) {
- $number_of_para--;
- if ( $number_of_para==0) {last ; }
- }
- }
- }
- $imprimir = 1;
- }
- elsif ( /<title>/ ) {
- $Salida = $_ ;
- if ( !(/<\/title>/) ) {
- while (<IN>) {
- $Salida .= $_ ;
- if ( /<\/title>/ ) { last ; }
- }
- }
- $imprimir = 1;
- }
- elsif ( /<glossterm>/ ) {
- $Salida = $_ ;
- if ( !(/<\/glossterm>/) ) {
- while (<IN>) {
- $Salida .= $_ ;
- if ( /<\/glossterm>/ ) { last ; }
- }
- }
- $imprimir = 1;
- }
- elsif ( /<guilabel>/ ) {
- $Salida = $_ ;
- if ( !(/<\/guilabel>/) ) {
- while (<IN>) {
- $Salida .= $_ ;
- if ( /<\/guilabel>/ ) { last ; }
- }
- }
- $imprimir = 1;
- }
- if ( $imprimir == 0 ) { print (OUT $_); }
- else {
- my $impreso=0;
- foreach my $theMessage (sort keys %string) {
- if (!($theMessage cmp $Salida)) {
- my $tag = $string{$Salida} ;
-
- if ( $tag cmp "") {
- $tag =~ s/\\"/"/mg ;
- print (OUT $tag);
- }
- else {
- print (OUT $Salida);
- }
- $impreso=1;
- }
- }
- if ( $impreso == 0) {
- print "No lo encuentro\n##".$Salida."##\n";
- $impreso=0;
- }
- $imprimir = 0;
- }
- }
- close IN;
- close OUT;
-}
-#exit 0;
-
-sub original ()
-{
- my $tmp = "";
- while (<IN>) {
- if ( !(/^#: /) ) {
- if ( /msgid ""/) { s/msgid ""\n//; }
- if ( /msgstr/) {
- $tmp =~ s/\\n/\n/sg ;
- $tmp =~ s/\\t/\t/sg ;
- $tmp =~ s/\\"/"/sg ;
- $texto_original = $tmp;
- last ;
- }
- s/msgid "//;
- s/\s*"// ;
- s/"\n// ;
- s/\n// ;
- $tmp .= $_;
- }
- }
-}
-
-sub traduccion ()
-{
- my $tmp = "";
- my $first = 0;
- if ( /msgstr "/) {
- if ( /msgstr ""/) {
- $tmp = "";
- $first = 1;
- } else {
- $tmp = $_;
- $tmp =~ s/msgstr "//;
- $tmp =~ s/"\n// ;
- }
- }
- while (<IN>) {
-
- if ( !($_ cmp "\n") ) {
- $tmp =~ s/\\n/\n/sg ;
- $tmp =~ s/\\t/\t/sg ;
- $tmp =~ s/\"/"/sg ;
- if ( $first == 1 ) { $texto_traducido = "" ; }
- else { $texto_traducido = $tmp; }
- last ;
- }
- $first = 0;
- s/msgstr "//;
- s/"\n// ;
- s/\s*"// ;
- $tmp .= $_;
- }
- if ( eof IN ) {
- $tmp =~ s/\\n/\n/sg ;
- $tmp =~ s/\\t/\t/sg ;
- $tmp =~ s/\"/"/sg ;
- $texto_traducido = $tmp;
- }
-}
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 @@
-<!doctype article PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [
-<!entity Evolution "<application>Evolution</application>">
-<!entity CUA "<acronym>CUA</acronym>">
-<!entity PCS "<acronym>PCS</acronym>">
-<!entity Bonobo "<application>Bonobo</application>">
-<!entity CORBA "<acronym>CORBA</acronym>">
-<!entity GTK "<acronym>GTK+</acronym>">
-]>
-
-<article class="whitepaper" id="calendar">
-
- <artheader>
- <title>&Evolution; Calendaring Framework</title>
-
- <authorgroup>
- <author>
- <firstname>Federico</firstname>
- <surname>Mena Quintero</surname>
- <affiliation>
- <address>
- <email>federico@helixcode.com</email>
- </address>
- </affiliation>
- </author>
- </authorgroup>
-
- <copyright>
- <year>2000</year>
- <holder>Helix Code, Inc.</holder>
- </copyright>
-
- <abstract>
- <para>
- 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.
- </para>
- </abstract>
- </artheader>
-
- <!-- Introduction -->
-
- <sect1 id="introduction">
- <title>Introduction</title>
-
- <para>
- 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
- <productname>Palm Pilot</productname> 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, &ldquo;I will
- attend&rdquo;, or &ldquo;I will attend only if the proposed time
- is changed&rdquo;.
- </para>
-
- <para>
- 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;).
- </para>
-
- <para>
- 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.
- </para>
- </sect1>
-
- <!-- Personal Calendar Server -->
-
- <sect1 id="pcs">
- <title>Personal Calendar Server</title>
-
- <para>
- 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:
- </para>
-
- <formalpara>
- <title>Storage</title>
-
- <para>
- 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.
- </para>
- </formalpara>
-
- <formalpara>
- <title>Basic Queries</title>
-
- <para>
- 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.
- </para>
- </formalpara>
-
- <formalpara>
- <title>Recurrence and Alarm Queries</title>
-
- <para>
- 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 &ldquo;a 1-hour meeting that occurs on
- every Tuesday and Thursday&rdquo; 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.
- </para>
- </formalpara>
-
- <formalpara>
- <title>Notification of Changes</title>
-
- <para>
- 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 &ldquo;the server is always
- right&rdquo;; clients can act as dumb views onto the
- calendar's data and they will be notified by the &PCS; when
- something changes.
- </para>
- </formalpara>
- </sect1>
-
- <!-- Calenar User Agent -->
-
- <sect1 id="cua">
- <title>Calendar User Agent</title>
-
- <para>
- 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.
- </para>
-
- <para>
- 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.
- </para>
- </sect1>
-
- <!-- Calendar Client Library -->
-
- <sect1 id="client-lib">
- <title>Calendar Client Library</title>
-
- <para>
- 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
- <classname>Listener</classname> interface, which defines the
- notification callbacks that the PCS uses to inform clients about
- changes to the calendar.
- </para>
-
- <para>
- As a convenience for &GTK; programmers, &Evolution; also
- includes a library which provides a
- <classname>CalClient</classname> class which can be used for
- communication with the personal calendar server. Objects of
- this class automatically contact the PCS when they are created.
- <classname>CalClient</classname> 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
- &GTK;.
- </para>
-
- <para>
- The implementation of the <classname>CalClient</classname> class
- simply wraps the &Evolution; &CORBA; interfaces for calendaring
- with a familiar-looking &GTK; object. Calls to the
- <classname>Listener</classname> interface get translated to
- signal emissions from the <classname>CalClient</classname>, thus
- shielding programmers from the details of the &CORBA;
- interfaces.
- </para>
- </sect1>
-</article>
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 @@
-<!doctype article PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [
-<!entity Evolution "<application>Evolution</application>">
-<!entity Camel "Camel">
-]>
-
-<article class="whitepaper" id="camel">
-
- <artheader>
- <title>The &Camel; Messaging Library</title>
-
- <authorgroup>
- <author>
- <firstname>Dan</firstname>
- <surname>Winship</surname>
- <affiliation>
- <address>
- <email>danw@helixcode.com</email>
- </address>
- </affiliation>
- </author>
-
- <author>
- <firstname>Bertrand</firstname>
- <surname>Guiheneuf</surname>
- <affiliation>
- <address>
- <email>bertrand@helixcode.com</email>
- </address>
- </affiliation>
- </author>
- </authorgroup>
-
- <copyright>
- <year>2000</year>
- <holder>Helix Code, Inc.</holder>
- </copyright>
-
- </artheader>
-
- <sect1 id="introduction">
- <title>Introduction</title>
-
- <para>
- &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.
- </para>
-
- <para>
- &Camel;'s initial design is heavily based on Sun's
- <trademark>JavaMail</trademark> 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.
- </para>
-
- <para>
- &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.
- </para>
-
- <para>
- 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.
- </para>
-
- <para>
- 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.
- </para>
- </sect1>
-
- <sect1 id="overview">
- <title>Overview</title>
-
- <graphic format="gif" fileref="camel"></graphic>
-
- <para>
- To begin using &Camel;, an application first creates a
- <classname>CamelSession</classname> object. This object is used
- to store application defaults, and to coordinate communication
- between providers and the application.
- </para>
-
- <para>
- A <classname>CamelProvider</classname> 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.
- </para>
-
- <para>
- <classname>CamelService</classname> is an abstract class for
- describing a connection to a local or remote service. It
- currently has two subclasses: <classname>CamelStore</classname>,
- for services that store messages (such as IMAP servers and mbox
- files), and <classname>CamelTransport</classname>, 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.
- </para>
-
- <para>
- A <classname>CamelStore</classname> contains some number of
- <classname>CamelFolder</classname> objects, which in turn
- contain messages. A <classname>CamelFolder</classname> provides
- a <classname>CamelFolderSummary</classname> 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 <classname>CamelMedium</classname>.
- </para>
-
- <para>
- Email messages are represented by the
- <classname>CamelMimeMessage</classname> class, a subclass of
- <classname>CamelMedium</classname>. This class includes
- operations for accessing RFC822 and MIME headers, accessing
- subparts of MIME messages, encoding and decoding Base64 and
- Quoted-Printable, etc.
- </para>
-
- <para>
- <classname>CamelTransport</classname> includes methods for
- delivering messages. While the abstract
- <function>CamelTransport::send</function> method takes a
- <classname>CamelMedium</classname>, its subclasses may only be
- able to deliver messages of specific
- <classname>CamelMedium</classname> subclasses. For instance,
- <classname>CamelSendmailTransport</classname> requires a
- <classname>CamelMimeMessage</classname>, because it needs a
- message that includes a "To:" header. A hypothetical
- <classname>CamelNNTPTransport</classname> would need a
- <classname>CamelNewsMessage</classname>, which would have a
- "Newsgroups:" header.
- </para>
-
- <para>
- The content of messages are referred to using
- <classname>CamelStream</classname> and its subclasses. In the
- case of an mbox-based store, the
- <classname>CamelStream</classname> would abstract the operation
- of reading the correct section of the mbox file. For IMAP,
- reading off the <classname>CamelStream</classname> might result
- in commands being issued to the remote IMAP server and data
- being read off a socket.
- </para>
-
- <para>
- The final major class in &Camel; is
- <classname>CamelException</classname>, which is used to
- propagate information about errors. Many methods take a
- <classname>CamelException</classname> 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.
- </para>
- </sect1>
-
- <sect1 id="classes">
- <title>Major Subcomponents</title>
-
- <sect2 id="store">
- <title>The Message Store</title>
-
- <para>
- A <classname>CamelStore</classname> inherits the ability to
- connect and authenticate to a service from its parent class,
- <classname>CamelService</classname>. It then adds the ability
- to retrieve folders. A store must contain at least one folder,
- which can be retrieved with
- <function>CamelStore::get_default_folder</function>. There are
- also methods to retrieve the "top-level" folder (for
- hieararchical stores), and to retrieve an arbitrary folder by
- name.
- </para>
-
- <para>
- All <classname>CamelFolder</classname>s must implement certain
- core operations, most notably generating a summary and
- retrieving and deleting messages. A
- <classname>CamelFolder</classname> must assign a permanently
- unique identifier to each message it contains. Messages can
- then be retrieved via
- <function>CamelFolder::get_message_by_uid</function>. Alternately,
- within a single mail-reading session, messages can be referred
- to by their linear position within the store using
- <function>CamelFolder::get_message_by_number</function>.
- </para>
-
- <para>
- Folders must also implement the
- <function>get_parent_folder</function> and
- <function>list_subfolders</function> 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).
- </para>
-
- <para>
- Folders that support searching can define the
- <function>search_by_expression</function> 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.
- </para>
- </sect2>
-
- <sect2 id="messages">
- <title>Messages</title>
-
- <para>
- As mentioned before, messages are represented by subclasses of
- <classname>CamelMedium</classname>.
- <classname>CamelMedium</classname> itself is a subclass of
- <classname>CamelDataWrapper</classname>, a generic class for
- connecting a typed data source to a data sink.
- <classname>CamelMedium</classname> adds the concept of message
- headers versus message body.
- (<classname>CamelDataWrapper</classname> has one other
- important subclass, <classname>CamelMultipart</classname>,
- which is used to provide separate access to the multiple
- independent parts of a multipart MIME type.)
- <classname>CamelMedium</classname>'s subclasses provide more
- specialized handling of various headers:
- <classname>CamelMimePart</classname> adds special handling for
- the &ldquot;Content-*&rdquot; headers in MIME messages, and
- its subclass <classname>CamelMimeMessage</classname> adds
- handling for the RFC822 headers.
- </para>
-
- <graphic format="gif" fileref="mimemessage"></graphic>
-
- <para>
- Consider a message with two parts: a text part (in both plain
- text and HTML), and an attached image:
-
- <programlisting>
-
- From: Dan Winship &lt;danw@helixcode.com&gt;
- To: Matt Loper &lt;matt@helixcode.com&gt;
- 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&lt;br&gt;
- &lt;br&gt;
- Check out this graphic...&lt;br&gt;
- &lt;br&gt;
- -- Dan&lt;br&gt;
- &lt;br&gt;
- --sFSenbAFDSgDfg--
-
- --jhTYrnsRrdhDFGa
- Content-Type: image/png
- Content-Transfer-Encoding: base64
-
- F4JLw0ORrkRa8AwAMQJLAaI3UDIGsco9RAaB92...
- --jhTYrnsRrdhDFGa--
- </programlisting>
-
- <para>
- In &Camel;, this would be represented as follows:
- </para>
-
- <graphic fileref="samplemsg"></graphic>
- </sect2>
-
- <sect2 id="streams">
- <title>Streams</title>
-
- <para>
- Streams are a generic data transport layer. Two basic stream
- classes are <classname>CamelStreamFs</classname>, for
- reading and writing files, and
- <classname>CamelStreamMem</classname>, for reading from and
- writing to objects that are already in memory.
- </para>
-
- <para>
- 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.
- </para>
- </sect2>
-
-</article>
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 @@
-<!doctype article PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [
-<!entity Evolution "<application>Evolution</application>">
-<!entity Camel "Camel">
-<!entity Ibex "Ibex">
-]>
-
-<article class="whitepaper" id="ibex">
-
- <artheader>
- <title>Ibex: an Indexing System</title>
-
- <authorgroup>
- <author>
- <firstname>Dan</firstname>
- <surname>Winship</surname>
- <affiliation>
- <address>
- <email>danw@helixcode.com</email>
- </address>
- </affiliation>
- </author>
- </authorgroup>
-
- <copyright>
- <year>2000</year>
- <holder>Helix Code, Inc.</holder>
- </copyright>
-
- </artheader>
-
- <sect1 id="introduction">
- <title>Introduction</title>
-
- <para>
- &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.
- </para>
- </sect1>
-
- <sect1 id="goals">
- <title>Design Goals and Requirements for Ibex</title>
-
- <para>
- The design of &Ibex; is based on a number of requirements.
-
- <itemizedlist>
- <listitem>
- <para>
- 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.
- </para>
- </listitem>
-
- <listitem>
- <para>
- 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.
- </para>
-
- <para>
- 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.
- </para>
- </listitem>
-
- <listitem>
- <para>
- 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.
- </para>
- </listitem>
-
- <listitem>
- <para>
- 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.
- </para>
- </listitem>
-
- <listitem>
- <para>
- 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.
- </para>
- </listitem>
- </itemizedlist>
-
- <para>
- While there are a number of existing indexing systems, none of
- them met all (or even most) of our requirements.
- </para>
- </sect1>
-
- <sect1 id="implementation">
- <title>The Implementation</title>
-
- <para>
- &Ibex; is still young, and many of the details of the current
- implementation are not yet finalized.
- </para>
-
- <para>
- With the current index file format, 13 megabytes of Info files
- can be indexed into a 371 kilobyte index file&mdash;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 <application>gzip</application> can compress an
- index file to about half its size, so we can clearly do better.)
- </para>
-
- <para>
- 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.
- </para>
-
- <para>
- 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.
- </para>
-
- <para>
- 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.
- </para>
- </sect1>
-</article>
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 @@
-<!doctype article PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [
-<!entity Evolution "<application>Evolution</application>">
-<!entity ETable "<classname>ETable</classname>">
-<!entity ETableModel "<classname>ETableModel</classname>">
-<!entity ETableSimple "<classname>ETableSimple</classname>">
-<!entity ETableHeader "<classname>ETableHeader</classname>">
-<!entity ETableSpecification "<classname>ETableSpecification</classname>">
-<!entity ETableCol "<classname>ETableCol</classname>">
-]>
-
-<article class="whitepaper" id="e-table">
-
- <artheader>
- <title>The ETable Widget</title>
-
- <authorgroup>
- <author>
- <firstname>Chris</firstname>
- <surname>Lahey</surname>
- <affiliation>
- <address>
- <email>clahey@helixcode.com</email>
- </address>
- </affiliation>
- </author>
- <author>
- <firstname>Miguel</firstname>
- <surname>de Icaza</surname>
- <affiliation>
- <address>
- <email>miguel@helixcode.com</email>
- </address>
- </affiliation>
- </author>
- </authorgroup>
-
- <copyright>
- <year>2000</year>
- <holder>Helix Code, Inc.</holder>
- </copyright>
-
- </artheader>
-
- <sect1 id="introduction">
- <title>Introduction</title>
-
- <para>
- &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.
- </para>
-
- <para>
- &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.
- </para>
-
- <para>
- &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.
- </para>
-
- <para>
- &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.
- </para>
-
- <para>
- &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.
- </para>
-
- </sect1>
-
- <sect1 id="model">
- <title>ETableModel</title>
-
- <para>
- 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.
- </para>
-
- <para>
- To use &ETable; you have to create a subclass of the abstract
- &ETableModel; class. However, to save you the work of defining
- a new <classname>GtkClass</classname> 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.
- </para>
-
- </sect1>
-
- <sect1 id="columns">
- <title>Columns</title>
-
- <para>
- 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).
- </para>
-
- <para>
- &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.
- </para>
-
- <para>
- 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
- </para>
-
- <para>
- 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".
- </para>
-
- <para>
- 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.
- </para>
-
- <para>
- 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.
- </para>
- </sect1>
-
- <sect1 id="header">
- <title>Header</title>
-
- <para>
- The &ETableHeader; represents the header information for the
- table. The &ETableHeader; is used in two different ways. The
- first is the in the <structfield>full_header</structfield>
- 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;.
- </para>
-
- <para>
- 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
- <function>e_table_header_new</function> and
- <function>e_table_header_add_col</function>.
- </para>
- </sect1>
-
- <sect1 id="layout">
- <title>Layout Specification</title>
-
- <para>
- &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.
- </para>
-
- <para>
- 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.
- </para>
-
- <para>
- 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.
- </para>
-
- <para>
- 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.
- </para>
-
- <para>
- 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.
- </para>
-
- <para>
- An example &ETableSpecification; follows.
- </para>
-
- <programlisting>
- &lt;ETableSpecification&gt;
- &lt;columns-shown frozen_columns="2"&gt;
- &lt;column&gt; 0 &lt;/column&gt;
- &lt;column&gt; 1 &lt;/column&gt;
- &lt;column&gt; 2 &lt;/column&gt;
- &lt;column&gt; 3 &lt;/column&gt;
- &lt;column&gt; 4 &lt;/column&gt;
- &lt;/columns-shown&gt;
- &lt;grouping&gt;
- &lt;group column="3" ascending="1"&gt;
- &lt;group column="4" ascending="0"&gt;
- &lt;leaf column="2" ascending="1"/&gt;
- &lt;/group&gt;
- &lt;/group&gt;
- &lt;/grouping&gt;
- &lt;/ETableSpecification&gt;
- </programlisting>
-
- <para>
- 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.
- </para>
- </sect1>
-
- <sect1 id="conclusion">
- <title>Conclusion</title>
-
- <para>
- 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.
- </para>
- </sect1>
-</article>
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 e2ec41daa4..0000000000
--- a/e-util/ChangeLog
+++ /dev/null
@@ -1,1125 +0,0 @@
-2001-04-15 Federico Mena Quintero <federico@ximian.com>
-
- * e-sexp.c (e_sexp_parse): Start parsing the sexp with
- parse_value(), not parse_list(), because we may have immediate
- values (e.g. "#f") as the whole sexp.
-
-2001-04-08 JP Rosevear <jpr@ximian.com>
-
- * Makefile.am: Setup up the conduit library building better so the
- files get disted
-
-2001-04-06 Federico Mena Quintero <federico@ximian.com>
-
- * e-sexp.c (scanner_config): Added a question mark to the set of
- valid characters for symbol names.
- (parse_value): Fixed parsing of boolean values.
- (parse_term_free): Added missing clause for ESEXP_TERM_BOOL.
-
-2001-04-04 Kjartan Maraas <kmaraas@gnome.org>
-
- * ename/test-ename-western-gtk.c: Fix headers.
-
-2001-04-03 Federico Mena Quintero <federico@ximian.com>
-
- * e-sexp.h (ESExpResultType): Added ESEXP_RES_TIME for time
- values.
- (ESExpResult): Added a "time_t value.time" field.
- (ESExpTermType): Added ESEXP_TERM_TIME.
- (ESExpTerm): Added a "time_t value.time" field.
-
- * e-sexp.c (e_sexp_result_free): Deal with time values. Also, be
- more paranoid; added a default clause with g_assert_not_reached().
- (term_eval_lt): Deal with time values.
- (term_eval_gt): Likewise.
- (term_eval_eq): Likewise.
- (term_eval_plus): Likewise.
- (term_eval_sub): Likewise.
- (e_sexp_term_eval): Likewise.
- (eval_dump_result): Likewise.
- (parse_dump_term): Likewise.
- (parse_term_free): Likewise.
-
-2001-04-01 Gediminas Paulauskas <menesis@delfi.lt>
-
- * e-gui-utils.h: new type EPixmap, which is used to cache pixmaps for
- bonobo components. use e_pixmaps_update to load icons into ui
- component.
- * e-gui-utils.c: implementation of EPixmap cache, moved here from
- mail/folder-browser-factory.c.
-
-2001-03-31 Jon Trowbridge <trow@ximian.com>
-
- * e-url.c (e_url_shroud): Check that first_colon < last_at,
- to prevent horrible things from happening. Removed spew.
- (e_url_equal): Removed spew.
-
-2001-03-30 Jon Trowbridge <trow@ximian.com>
-
- * e-html-utils.c (e_text_to_html_full): Add support for converting
- e-mail addresses to links.
- (is_email_address): Added. Identifies e-mail addresses.
- (email_address_extract): Added. Extracts a copy of the e-mail
- address from the text.
-
- * e-html-utils.h (E_TEXT_TO_HTML_CONVERT_ADDRESSES): Added.
-
- * e-url.c (e_url_shroud): Added. Copy a url, replacing
- any plaintext passwords with a single *.
- (e_url_equal): Compare two urls, taking into account that
- they may or may not be shrouded.
-
-2001-03-29 Kjartan Maraas <kmaraas@gnome.org>
-
- * e-corba-utils.h: Remove #include <glib.h>
- * e-dialog-widgets.c: Shuffle some headers.
- * e-dialog-widgets.h: Remove #include <libgnomeui/gnome-propertybox.h>
- * e-gtk-utils.c: #include <gtk/gtksignal.h>
- * e-gtk-utils.h: Replace #include <gtk/gtk.h>
- * e-gui-utils.c: Replace #include <gnome.h>
- * e-html-utils.c: Shuffle headers.
- * e-iterator.c: Replace #include <gtk/gtk.h>
- * e-iterator.h: Replace #include <gtk/gtk.h>
- * e-list-iterator.c: Remove #include <gtk/gtk.h>
- * e-list-iterator.h: Replace #include <gtk/gtk.h>
- * e-list.c: Remove #include <gtk/gtk.h>
- * e-list.h: Replace #include <gtk/gtk.h>
- * e-memory.c: #include <string.h> and <stdlib.h>
- * e-msgport.c: Move around some includes. s/%d/%ld/g in a printf()
- call to fix a warning.
- * e-pilot-map.c: #include <string.h>. Replace #include <gnome.h>
- * e-pilot-util.c: Remove #include <gnome.h>
- * e-sexp.c: Remove #include <glib.h>
- * e-sexp.h: Replace #include <gtk/gtk.h>
- * e-time-utils.c: #include <string.h>
- * md5-utils.c: Shuffle headers.
- * test-ename-western-gtk.c: Replace #include <gnome.h>
- * test-ename-western.c: Same here.
-
-2001-03-20 Radek Doulik <rodo@ximian.com>
-
- * e-html-utils.c (e_text_to_html_full): new function, extracted
- from e_text_to_html, added color parameter
-
-2001-03-19 Radek Doulik <rodo@ximian.com>
-
- * e-html-utils.c (e_text_to_html): support mark citation
-
- * e-html-utils.h (E_TEXT_TO_HTML_MARK_CITATION): added
- E_TEXT_TO_HTML_MARK_CITATION
-
-2001-03-18 Damon Chaplin <damon@ximian.com>
-
- * e-time-utils.c (e_time_format_time): added function to format just
- the time.
-
-2001-03-16 Dan Winship <danw@ximian.com>
-
- * e-path.c (e_path_to_physical): Fix a bug noticed by kmaraas
-
-2001-03-15 Dan Winship <danw@ximian.com>
-
- * e-html-utils.c (url_extract): Fix a bit: [mailto:foo] shouldn't
- grab the ']'
-
-2001-03-12 JP Rosevear <jpr@ximian.com>
-
- * Makefile.am: update cflag macros
-
-2001-03-07 Dan Winship <danw@ximian.com>
-
- * e-html-utils.c (url_extract): Fix an off-by-one in the "is this
- for real?" check so that "http:// " won't get URLified
-
-2001-03-04 Damon Chaplin <damon@ximian.com>
-
- * e-time-utils.[hc]: new files to contain functions to parse and
- format dates and times for various calendar widgets.
-
-2001-03-01 Dan Winship <danw@ximian.com>
-
- * e-path.c (e_path_to_physical): New function to turn foo/bar into
- foo/subfolders/bar. The inverse function doesn't exist yet because
- I didn't need it. Also, if the shell were going to use this, we'd
- need a few more tools...
-
- * Makefile.am (libeutil_la_SOURCES): Add e-path.[ch]
-
-2001-03-01 Not Zed <NotZed@Ximian.com>
-
- * e-sexp.c (e_sexp_encode_string): Make it handle a NULL string as
- an empty string.
-
-2001-02-23 Not Zed <NotZed@Ximian.com>
-
- * e-msgport.c (e_thread_destroy): Wait a lot lot longer for
- threads to finish.
- : Turned off some of the debug.
-
-2001-02-08 Not Zed <NotZed@Ximian.com>
-
- * e-memory.c (EMemChunk): Changed to allocate raw blocks for the
- data, and keep track of them with an array, this is so the native
- malloc alignment is not lost at the allocation stage.
-
-2001-01-30 Not Zed <NotZed@Ximian.com>
-
- * e-msgport.c (e_thread_destroy): Turn on joining of cancelled threads.
- (e_msgport_wait): Put a cleanup handler to clear the mp lock if it
- happens in cond_wait, since it will be locked again.
-
-2001-01-29 Not Zed <NotZed@Ximian.com>
-
- * e-msgport.c (e_thread_put): If we have waiting threads, then
- dont start a new one for the NEW case.
- (thread_dispatch): For the NEW case, dont exit, just keep running,
- waiting for a new message to come along.
- (e_thread_destroy): When cleaning up NEW threads, cancel any
- non-busy threads.
-
-2001-01-24 Not Zed <NotZed@Ximian.com>
-
- * e-sexp.h (ESExp): Add chunk allocators.
-
- * e-sexp.c: Removed some redundant debug printfs.
- (e_sexp_term_eval): Dont allocate result till we have it. so we
- can have a fatal error, and not leak it.
- (term_eval_plus): If we have to abort, free our arguments.
- (term_eval_sub): Same.
- (parse_new_term): Renamed to parse_term_new for consistency.
- Fixed callers.
- (e_sexp_result_new): Add the esexp as an argument. Ouch, lots of
- code to change for this. Allocate blocks from an ememchunk.
- Fixed all callers.
- (e_sexp_result_free): Same as above, free blocks from the
- ememchunk. Fixed all callers.
- (parse_term_new):
- (parse_term_free): Similarly, add the esexp to the argument, and
- alloc/free from memchunks. Fixed all local callers.
- (e_sexp_init): Setup the memory chunk allocators.
- (e_sexp_finalise): Destroy memchunk allocators.
-
-2001-01-23 Not Zed <NotZed@Ximian.com>
-
- * e-sexp.c (e_sexp_parse): Setup error return and return error on
- parse error.
- (parse_list): Fail if we have a problem.
- (parse_value): Here too.
- (fatal_error): Fatal error handling function, jumps back to the
- top caller.
- (term_eval_and):
- (e_sexp_term_eval):
- (term_eval_sub):
- (term_eval_plus):
- (term_eval_gt):
- (term_eval_lt):
- (term_eval_or): Fail on error.
- (e_sexp_term_eval): Added a comment about where this can be
- called, which is only from inside e_sexp_eval().
- (e_sexp_eval): Setup setjmp error handler.
- (e_sexp_error): Error accessor function.
-
- * e-sexp.h: Added a longjmp environment to the structure, and an
- error return to parse.
-
-2001-01-22 JP Rosevear <jpr@ximian.com>
-
- * e-dbhash.c (md5_to_dbt): New function, can't use strlen on the md5
- hash because it might have null chars in it.
- (e_dbhash_add): use md5_to_dbt
-
-2001-01-19 JP Rosevear <jpr@ximian.com>
-
- * e-pilot-map.c (e_pilot_map_remove_by_pid): Remove an item by pid
- (e_pilot_map_remove_by_uid): ditto for uid
-
- * e-pilot-map.h: new protos
-
-2001-01-17 Jason Leach <jasonleach@usa.net>
-
- * e-gtk-utils.c (gtk_radio_button_get_nth_selected): New function,
- name describes it well.
- (gtk_radio_button_select_nth): New function.
-
-2001-01-17 Federico Mena Quintero <federico@ximian.com>
-
- * e-dialog-widgets.[ch]: Ximianified.
-
-2001-01-15 JP Roseveaer <jpr@ximian.com>
-
- * e-pilot-util.c (e_pilot_utf8_from_pchar): Dup the string passed
- in, not the temporary string. d'oh.
-
-2001-01-04 Dan Winship <danw@helixcode.com>
-
- * e-msgport.c: #define E_THREAD_NONE as ((pthread_t)~0) and use
- that instead of ~0 throughout. (pthread_t is a pointer type on my
- system, so there are lots of warnings without the cast.)
-
-2000-12-24 Not Zed <NotZed@HelixCode.com>
-
- * Merge from camel-mt-branch.
-
-2000-12-20 JP Rosevear <jpr@helixcode.com>
-
- * e-pilot-util.c (e_pilot_utf8_to_pchar): Check for null strings
- (e_pilot_utf8_from_pchar): ditto
-
-2000-12-19 JP Rosevear <jpr@helixcode.com>
-
- * e-pilot-util.c (e_pilot_utf8_to_pchar): Convert utf8 strings to
- pilot character set
- (e_pilot_utf8_from_pchar): vice versa
-
- * Makefile.am: Conditionally build e-pilot-util.[hc] because
- they depend on pilot-link stuff
-
-2000-12-23 Not Zed <NotZed@HelixCode.com>
-
- * e-msgport.c (e_dlist_length): Util function.
- (e_thread_new): Another new thread primitive. This one is a
- re-usable 'server thread' thingy.
-
-2000-12-21 Not Zed <NotZed@HelixCode.com>
-
- * Makefile.am (libeutil_la_SOURCES): Added msgport stuff.
-
- * e-msgport.[ch]: Some thread primitives. e_dlist, a
- double-linked list (ok, not a thread primitive, but used in ...),
- e_msgport - an asynchronous, non-copying message passing
- rendesvous port, and e_mutex, a portably configurable mutex.
-
-2000-12-19 Not Zed <NotZed@HelixCode.com>
-
- * e-sexp.c: Make the code compile without being a gtk object (the
- old code can still be built as a gtk object if required). Also
- removed some dead code.
- (e_sexp_ref): New function to ref if we're not a gkt object.
- (e_sexp_unref): Same for unref.
-
-2000-12-13 Larry Ewing <lewing@helixcode.com>
-
- * e-html-utils.c (e_text_to_html): make sure we actually make
- enough space for "&nbsp;".
-
-2000-12-08 Federico Mena Quintero <federico@helixcode.com>
-
- * e-dialog-widgets.c (e_dialog_editable_get): Updated
- documentation comment.
-
-2000-12-04 Ettore Perazzoli <ettore@helixcode.com>
-
- * e-corba-utils.h: New.
-
- * e-corba-utils.c: New.
- (e_safe_corba_string): New.
-
-2000-11-30 Not Zed <NotZed@HelixCode.com>
-
- * e-memory.c (e_strv_new): Fix typename of args (for all funcs).
- (e_strv_set_ref): Assert the index is in range.
- (e_strv_set_ref_free): "
- (e_strv_set): "
- (e_strv_get): "
-
-2000-11-29 Not Zed <NotZed@HelixCode.com>
-
- * e-sexp.c (term_eval_lt): Plug a memleak, need to free results
- from term_eval().
- (term_eval_gt):
- (term_eval_eq):
-
-2000-11-27 Not Zed <NotZed@HelixCode.com>
-
- * e-memory.c (e_mempool_new): Added some locking to global data.
- This should make the interfaces mt-safe, although each object is
- only per-thread safe.
-
-2000-11-22 Not Zed <NotZed@HelixCode.com>
-
- * e-memory.c (e_mempool_alloc): If we dont get a big enough chunk
- in the first node, give up. Otherwise we spend too much time
- searching.
- (e_mempool_strdup): Doh, and allocate enough for the terminating
- NUL at that.
- (e_strv_set_ref_free): New function, set a reference to a string
- that is then owned/free'd by the strv.
- (e_strv_destroy): If there are any strings to destroy, free them
- here.
-
-2000-11-21 Not Zed <NotZed@HelixCode.com>
-
- * e-memory.c (e_memchunk_alloc0): New function to allocate a
- zero'd out chunk.
- (e_mempool_strdup): New function to strdup into a mempool.
-
-2000-11-20 Not Zed <NotZed@HelixCode.com>
-
- * e-memory.[ch]: New routines for fast memory management and
- compact string array storage.
-
- * Makefile.am (libeutil_la_SOURCES): Added e-memory.[ch].
-
-2000-11-09 JP Rosevear <jpr@helixcode.com>
-
- * e-dbhash.h: oops thats func not *func
-
- * e-dbhash.c (e_dbhash_foreach_key): Memset the data DBT to 0
-
-2000-11-07 JP Rosevear <jpr@helixcode.com>
-
- * Makefile.am: Build e-dbhash.[hc]
-
- * e-dbhash.[hc]: New routines to manage a db database on disk that
- contains md5 hashed data and indexed by uids. Provides comparison
- functions and such so the caller does not have to do the md5 bits.
-
-200-10-30 Kjartan Maraas <kmaraas@gnome.org>
-
- * e-dialog-widgets.c: #include <string.h> to quench warning.
- * e-sexp.c: #include <stdlib.h> for same reason.
-
-2000-10-27 <jpr@helixcode.com>
-
- * Makefile.am: build md5-utils
-
- * md5-utils.c: Make part of util, get rid of camel stream util
- function include string.h
-
- * md5-utils.h: ditto
-
-2000-10-27 <jpr@helixcode.com>
-
- * e-pilot-map.c (e_pilot_map_lookup_uid): Return null if no
- pnode was found.
-
-2000-10-27 JP Rosevear <jpr@helixcode.com>
-
- * e-pilot-map.c (map_sax_start_element): Get archive field while
- parsing
- (map_write_foreach): Write out archive field
- (e_pilot_map_pid_is_archived): implement
- (e_pilot_map_uid_is_archived): ditto
- (e_pilot_map_insert): Insert new node structures
- (e_pilot_map_lookup_pid): Take into account the list is now
- a list of structures
- (e_pilot_map_lookup_uid): ditto
-
-2000-10-26 Michael Meeks <michael@helixcode.com>
-
- * ename/e-address-western.c (e_address_western_is_postal):
- unsigned chars.
-
- * ename/e-name-western.c (e_name_western_get_one_prefix_at_str):
- cast to unsigned char.
-
-2000-10-25 Dan Winship <danw@helixcode.com>
-
- * e-html-utils.c (e_text_to_html): Deal properly with URLs at the
- end of the buffer. (The old code would append a "&#0;" to the
- text.)
-
-2000-10-23 JP Rosevear <jpr@helixcode.com>
-
- * e-pilot-map.c (e_pilot_map_lookup_pid): Lookup a pid by uid.
- (e_pilot_map_lookup_uid): Lookup a uid by pid.
- Now this is wrapped, we can store archive info internally
-
- * e-pilot-map.h: New accessor prototypes
-
-2000-10-23 Dan Winship <danw@helixcode.com>
-
- * ename/Makefile.am (INCLUDES): Remove unused GNOMELOCALEDIR
- setting.
-
-2000-10-23 JP Rosevear <jpr@helixcode.com>
-
- * e-pilot-map.c: Operate with EPilotMap structure so things are
- abstract to the caller
- (e_pilot_map_pid_is_archived): Infrastructure for marking records
- as archived
- (e_pilot_map_uid_is_archived): ditto
-
- * e-pilot-map.h: Add more to public interface, including EPilotMap
- structure
-
-2000-10-23 JP Rosevear <jpr@helixcode.com>
-
- * e-pilot-map.c: Pilot map functions grabbed from existing conduits
-
- * e-pilot-map.h (e_pilot_map_write): Header
-
-2000-10-18 Dan Winship <danw@helixcode.com>
-
- * e-html-utils.c (e_text_to_html): If unicode_get_utf8 returns -1,
- assume it was actually undeclared iso-8859-1 text.
-
-2000-10-17 Jesse Pavel <jpavel@helixcode.com>
-
- * ename/e-address-western.c: made the routines use the stardard
- e_strstrcase instead of the included function that existed
- earlier.
-
-2000-10-11 Iain Holmes <iain@helixcode.com>
-
- * ename/e-address-western.c (e_address_western_parse): g_strconcat
- needs to be NULL terminated or it goes funny.
-
-Tue Sep 26 16:48:49 2000 Christopher James Lahey <clahey@helixcode.com>
-
- * Makefile.am: Added $(EXTRA_GNOME_CFLAGS).
-
-2000-09-25 Jeffrey Stedfast <fejj@helixcode.com>
-
- * Makefile.am: add ename as a SUBDIR
-
-2000-09-18 Christopher James Lahey <clahey@helixcode.com>
-
- * e-list-iterator.c, e-list.c, e-list.h: Made e_list a bit more
- reentrant. If a iterator gets its data pulled out from under it
- while in a loop, it goes back one so that loops will be able to
- continue.
-
-2000-09-18 Christopher James Lahey <clahey@helixcode.com>
-
- * Makefile.am: Removed all the files moved to gal.
-
- * e-dialog-widgets.c: Fixed the #include lines to deal properly
- with gal.
-
- * e-gui-utils.c, e-gui-utils.h: Removed all of the functionality
- that was moved to gal.
-
- * e-canvas-utils.c, e-canvas-utils.h, e-canvas-vbox.c,
- e-canvas-vbox.h, e-canvas.c, e-canvas.h, e-cursors.c, e-cursors.h,
- e-font.c, e-font.h, e-popup-menu.c, e-popup-menu.h, e-printable.c,
- e-printable.h, e-unicode.c, e-unicode.h, e-util.c, e-util.h,
- e-xml-utils.c, e-xml-utils.h: Moved to gal.
-
-2000-09-13 Christopher James Lahey <clahey@helixcode.com>
-
- * e-font.c: Fixed an uninitialized variable.
-
-2000-09-12 Lauris Kaplinski <lauris@helixcode.com>
-
- * e-unicode.c (e_utf8_to_gtk_string_sized): Use underscores
- for untranslatable characters
- (e_utf8_from_gtk_string_sized): Ditto
-
-2000-09-12 Dan Winship <danw@helixcode.com>
-
- * e-font.c (e_font_from_gdk_font): Change this a bit so that if
- you pass it a bold font, it puts that in font->bold and finds a
- lighter font for font->font (if it can). This is for themes like
- Metal where the default font is bold.
- (find_variants): renamed from find_best_bold
-
-2000-09-11 Dan Winship <danw@helixcode.com>
-
- * e-font.c (find_best_bold): Thou shalt leave space for the
- trailing \0.
-
- * e-util.c (e_strstrcase): The return value should not be
- const. (Well, unless the input was, but you can't know that.)
-
-2000-09-11 Christopher James Lahey <clahey@helixcode.com>
-
- * e-unicode.c, e-unicode.h: Added e_utf8_gtk_editable_get_text and
- e_utf8_gtk_editable_set_text.
-
-2000-09-11 Lauris Kaplinski <lauris@helixcode.com>
-
- * e-font.c: Try to find real bold variant of X font, fall
- to double stroke only if not found
-
-2000-09-10 Ettore Perazzoli <ettore@helixcode.com>
-
- * e-gtk-utils.c: New.
- (e_gtk_signal_connect_full_while_alive): New.
-
- * e-gtk-utils.h: New.
-
-2000-09-08 Lauris Kaplinski <lauris@helixcode.com>
-
- * e-font.c: Use experimental 16-bit font stuff for EFonts
-
-2000-09-08 Dan Winship <danw@helixcode.com>
-
- * e-popup-menu.h: remove consts from the EPopupMenu structure: the
- caller may want to modify its own EPopupMenu before calling
- e_popup_menu_run.
-
-2000-09-07 Lauris Kaplinski <lauris@helixcode.com>
-
- * e-dialog-widgets.c (e_dialog_editable_get): Use UTF-8
- (e_dialog_editable_set): Use UTF-8
-
- * e-font.c (translate_encoding): More encodings
- (e_gdk_font_encoding): Use experimental stuff
-
- * e-unicode.* (e_utf8_gtk_editable_insert_text): New wrapper
-
-2000-09-07 Federico Mena Quintero <federico@helixcode.com>
-
- * e-canvas.c (emit_event): Remove incorrect optimization. Events
- are read-only!
-
-2000-09-04 Lauris Kaplinski <lauris@helixcode.com>
-
- * e-unicode.c: Added new font code, but comment it out now
- * e-font.h, e-font.c: Test code for font analyzing
-
-2000-09-02 Lauris Kaplinski <lauris@helixcode.com>
-
- * e-unicode.h, e-unicode.c: New functions
- e_utf8_gtk_clist_append, e_utf8_gtk_clist_set_text
- e_unicode_init
-
-2000-08-31 Lauris Kaplinski <lauris@helixcode.com>
-
- * e-html-utils.c (e_text_to_html): Use UTF-8
-
- * e-unicode.h:
- * e-unicode.c (g_unichar_to_utf8): glib 1.3 function
- (gdk_keyval_to_unicode): gdk 1.3 function
- (e_utf8_from_gdk_event_key): Use keyval, not string
-
-2000-08-30 Lauris Kaplinski <lauris@helixcode.com>
-
- * e-unicode.h: #define gnome_font_get_size and
- gnome_font_get_width, and gnome_font_lookup_default,
- if compiling with gnome-print 0.20
-
-2000-08-30 Dan Winship <danw@helixcode.com>
-
- * Makefile.am (libeutil_la_LIBADD): make e-util depend on
- libunicode
-
- * e-popup-menu.c (make_item): Use GtkMenuItem rather than
- GtkPixmapMenuItem for items with no pixmaps, so that if the whole
- menu is pixmapless, you don't get a column of blank pixmaps.
-
-2000-08-24 Lauris Kaplinski <lauris@helixcode.com>
-
- * e-unicode.h:
- * e-unicode.c (e_utf8_gtk_menu_item_new_with_label): New wrapper
-
-2000-08-23 Lauris Kaplinski <lauris@helixcode.com>
-
- * e-unicode.h:
- * e-unicode.c (e_utf8_strstrcase): New function
-
-2000-08-23 Federico Mena Quintero <federico@helixcode.com>
-
- * e-dialog-widgets.c (e_dialog_editable_set): Constify.
-
-2000-08-22 Lauris Kaplinski <lauris@helixcode.com>
-
- * e-unicode.h:
- * e-unicode.c: e_utf8_gtk_editable_get_chars
- e_utf8_gtk_entry_get_text
- e_utf8_gtk_entry_set_text
- e_utf8_to_gtk_string: New convenience functions
-
-2000-08-22 Lauris Kaplinski <lauris@helixcode.com>
-
- * e-unicode.h:
- * e-unicode.c: Some convenience functions to deal with Gtk+ and UTF-8
-
- * Makefile.am: Added e-unicode.h, e-unicode.c
-
-2000-08-21 Lauris Kaplinski <lauris@helixcode.com>
-
- * e-font.h:
- * e-font.c: Changed UTF-8 syntax from char-based to byte-based
-
-2000-08-21 Peter Williams <peterw@helixcode.com>
-
- * e-html-utils.c (e_text_to_html): Fix a booboo in the tab
- expansion code (didn't use the new value of 'out').
-
-2000-08-19 Lauris Kaplinski lauris@helixcode.com
-
- * e-font.h: #define e_font_height(f) to save some space
-
-2000-08-19 Lauris Kaplinski lauris@helixcode.com
-
- * e-font.h:
- * e-font.c: Thin wrapper around GdkFont to deal with UTF-8 directly
- Also handles bold/italic styling
-
-2000-08-14 Peter Williams <peterw@helixcode.com>
-
- * e-sexp.c (scanner_config): Add "-" to be an acceptable
- first character for an operation -- yaaay subtraction!
-
-2000-08-11 Peter Williams <peterw@helixcode.com>
-
- * e-html-utils.c (e_text_to_html): Fix the tab expansion
- for when the length would exceed the ten characters that
- we allocated.
-
-2000-08-10 Dan Winship <danw@helixcode.com>
-
- * e-setup.[ch]: Remove. The shell tells the components where
- the evolution homedir is now.
-
- * Makefile.am (libeutil_la_SOURCES): Remove e-setup.c
-
- * e-html-utils.c (e_text_to_html): If converting both spaces and
- newlines, then convert tabs too. The joys of pseudo-<PRE>.
-
-2000-08-09 Christopher James Lahey <clahey@helixcode.com>
-
- * e-popup-menu.c: Fix the bug where it truncates the last item
-
-2000-08-09 Christopher James Lahey <clahey@helixcode.com>
-
- * e-popup-menu.c: Ooops.
-
-2000-08-09 Christopher James Lahey <clahey@helixcode.com>
-
- * e-util.c, e-util.h: Added uncompiled e_read_uri function.
-
-2000-08-09 Christopher James Lahey <clahey@helixcode.com>
-
- * e-popup-menu.c, e-popup-menu.h: Added a hide_mask argument to
- the two popup menu functions.
-
-2000-08-07 Christopher James Lahey <clahey@helixcode.com>
-
- * e-gui-utils.c, e-gui-utils.c: Added
- e_container_change_tab_order.
-
-2000-07-27 Peter Williams <peterw@helixcode.com>
-
- * e-canvas.c (e_canvas_destroy): Chain the
- destroy handler.
-
-2000-07-25 Peter Williams <peterw@helixcode.com>
-
- * e-canvas.c (emit_event): Don't bother with
- dereferencing the event pointer.
- (e_canvas_item_set_cursor): Reference our selection
- item; print a debug message. Deref when destroying
- (e_canvas_item_add_selection): Same.
- (e_canvas_item_remove_selection): Same.
-
-2000-07-25 Peter Williams <peterw@helixcode.com>
-
- * Makefile.am (libeutil_static_la_LDFLAGS): Build both libraries
- (a typo didn't build libeutil.la, only -static.)
-
-2000-07-25 Seth Alves <alves@hungry.com>
-
- * Makefile.am (libeutil_static_la_LDFLAGS): build static version
- of library for conduit to use
-
-2000-07-25 Christopher James Lahey <clahey@helixcode.com>
-
- * e-util.c, e-util.h: Added a bunch of e_marshal functions.
-
-2000-07-12 Christopher James Lahey <clahey@helixcode.com>
-
- * e-util.c, e-util.h: Added e_strstrcase function.
-
-2000-07-11 Christopher James Lahey <clahey@helixcode.com>
-
- * e-canvas-vbox.c: Removed some debugging printfs.
-
- * e-canvas.c (e_canvas_unrealize): Call parent unrealize method.
-
-2000-07-10 Ettore Perazzoli <ettore@helixcode.com>
-
- * e-sexp.c (eval_dump_result): `#if 0'ed out.
-
- * e-popup-menu.h (e_popup_menu_create): New prototype.
-
-2000-07-10 Dan Winship <danw@helixcode.com>
-
- * e-html-utils.c: Fix warnings.
-
-2000-07-08 Christopher James Lahey <clahey@helixcode.com>
-
- * e-list.c, e-list.h: Added e_list_duplicate.
-
-2000-07-07 Christopher James Lahey <clahey@helixcode.com>
-
- * e-util.c, e-util.h: Added e_strsplit to work around a bug in
- g_strsplit.
-
-2000-07-07 Christopher James Lahey <clahey@helixcode.com>
-
- * e-iterator.c, e-iterator.h, e-list-iterator.c,
- e-list-iterator.h: Added last and insert functions.
-
-2000-07-06 Federico Mena Quintero <federico@helixcode.com>
-
- * e-dialog-widgets.c: Added docstrings. This file did not have
- them at all. EEEEEEK!
-
-2000-07-05 Dan Winship <danw@helixcode.com>
-
- * e-sexp.c (e_sexp_parse): Kill debugging message
-
-2000-07-03 Christopher James Lahey <clahey@helixcode.com>
-
- * e-iterator.c, e-iterator.h, e-list-iterator.c,
- e-list-iterator.h, e-list.c, e-list.h: New list class with
- iterators.
-
- * e-canvas.c: Made it so that you don't get the same selection in
- the selection list more than once.
-
-2000-07-01 Ettore Perazzoli <ettore@helixcode.com>
-
- * e-gui-utils.h: #include <libgnomeui/gnome-messagebox.h>. It's
- needed to be able to pass an appropriate @type arg to
- `e_notice()'.
-
-2000-06-29 Jody Goldberg <jgoldberg@home.com>
-
- * e-canvas.c (e_canvas_init) : Init the InputContext members
- (e_canvas_class_init) : Add a handler for unrealize.
- (e_canvas_focus_in) : enable the input context.
- (e_canvas_focus_out) : enable the input context.
- (e_canvas_realize) : Create an input context.
- (e_canvas_unrealize) : New function to release the input context.
-
-2000-06-28 Dan Winship <danw@helixcode.com>
-
- * e-html-utils.c (url_extract): add ")" to the set of characters
- to back up over at the end of a potential URL.
-
-2000-06-27 Ettore Perazzoli <ettore@helixcode.com>
-
- * e-dialog-widgets.c (get_toggle_value): Use `value_var', not
- `value'.
-
-2000-06-27 Ettore Perazzoli <ettore@helixcode.com>
-
- * Makefile.am (INCLUDES): `-I$(top_srcdir)' to fix compilation
- with builddir != srcdir.
-
-2000-06-26 Christopher James Lahey <clahey@helixcode.com>
-
- * Makefile.am: Added e-canvas-vbox.c and e-canvas-vbox.h.
-
- * e-canvas-vbox.c, e-canvas-vbox.h: New canvas object to act like
- a vbox using the reflow system.
-
-2000-06-20 Christopher James Lahey <clahey@helixcode.com>
-
- * e-canvas.c, e-canvas.h: Added a variable to keep track of the
- cursor. Set the cursor when selection_add is called. Properly
- unset the cursor at the right times.
-
-2000-06-20 Christopher James Lahey <clahey@helixcode.com>
-
- * e-canvas.c: Grab the focus when setting the cursor.
-
-2000-06-20 Christopher James Lahey <clahey@helixcode.com>
-
- * e-canvas.c, e-canvas.h: Built a system for doing selections
- and/or a cursor in canvas.
-
-2000-06-13 Christopher James Lahey <clahey@helixcode.com>
-
- * e-util.c, e-util.h: Changed the needed e_marshal functions.
-
- * e-printable.c, e-printable.h: Added a quantize parameter to
- e_printable_height. Also, added a e_printable_will_fit function.
-
-2000-06-10 Christopher James Lahey <clahey@helixcode.com>
-
- * Makefile.am: Added e-printable.c and e-printable.h.
-
- * e-printable.c, e-printable.h: This new class is a printing
- context. Other classes return an EPrintable which represents a
- context for printing that object.
-
- * e-util.c, e-util.h: Added
- e_marshal_NONE__OBJECT_DOUBLE_DOUBLE_BOOL and
- e_marshal_DOUBLE__OBJECT_DOUBLE_DOUBLE.
-
-2000-06-01 Christopher James Lahey <clahey@helixcode.com>
-
- * e-util.c: Fixed e_marshal_INT__INT_INT_POINTER.
-
-2000-06-01 Christopher James Lahey <clahey@helixcode.com>
-
- * e-util.c, e-util.h: Added e_marshal_INT__INT_INT_POINTER.
-
-2000-06-01 Dan Winship <danw@helixcode.com>
-
- * e-util.c (g_int_compare): Duh! -1 != 1. :)
-
-2000-06-01 Christopher James Lahey <clahey@helixcode.com>
-
- * e-sexp.c (e_sexp_term_eval): g_return_val_if_fail to prevent a crash.
-
-2000-05-30 Not Zed <NotZed@HelixCode.com>
-
- * e-sexp.c (e_sexp_encode_bool): Utility function to build a bool
- as part of an expression string.
- (e_sexp_encode_string): Likewise for strings.
-
-2000-05-30 Christopher James Lahey <clahey@helixcode.com>
-
- * e-canvas-utils.c, e-canvas-utils.h: Added
- e_canvas_item_show_area which makes sure that a particular area of
- a given item is in the scroll area.
-
-2000-05-30 Federico Mena Quintero <federico@helixcode.com>
-
- * e-dialog-widgets.c (hook_radio): Use the exported function to
- set the value.
- (get_radio_value): Likewise.
- (hook_option_menu): Likewise.
- (get_option_menu_value): Likewise.
- (hook_toggle): Likewise.
- (get_toggle_value): Likewise.
- (hook_spin_button): Likewise.
- (get_spin_button_value): Likewise.
- (hook_editable): Likewise.
- (get_editable_value): Likewise.
- (e_dialog_radio_set): Radio buttons are prepended to their parent
- group's list, so we need to flip the index around when
- getting/setting the value.
- (e_dialog_radio_get): Likewise.
-
-2000-05-27 Federico Mena Quintero <federico@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * e-paned.c, e-paned.h: Removed.
-
-2000-05-23 Federico Mena Quintero <federico@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * e-util.c, e-util.h: Added e_write_file.
-
-2000-05-19 Federico Mena Quintero <federico@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * e-gui-utils.c, e-gui-utils.h: Added e_container_foreach_leaf.
-
-2000-05-18 Christopher James Lahey <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * e-xml-utils.c: xmlGetProp appears to return malloced memory.
- Thus we must free it.
-
-2000-05-15 Ettore Perazzoli <ettore@helixcode.com>
-
- * e-util.c (e_free_string_list): New function.
-
-2000-05-14 Christopher James Lahey <clahey@helixcode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * 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 <clahey@helixcode.com>
-
- * e-canvas.c: Remove reflow idle when being destroyed.
-
-2000-05-06 Christopher James Lahey <clahey@helixcode.com>
-
- * 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 <ettore@helixcode.com>
-
- * e-util.h: #include <glib.h> and <gtk/gtktypeutils.h>.
-
- * e-util.c (e_free_object_list): New utility function.
-
-2000-05-02 Damon Chaplin <damon@helixcode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * 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 <matt@helixcode.com>
-
- * Makefile.am: set G_LOG_DOMAIN.
-
-2000-05-01 Ettore Perazzoli <ettore@helixcode.com>
-
- * e-xml-utils.c, e-xml-utils.h: Constified all the functions.
-
-2000-04-27 Dan Winship <danw@helixcode.com>
-
- * 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 <miguel@helixcode.com>
-
- * e-popup-menu.c: New file. Implements easy to use popup menus.
-
-2000-04-24 Matt Loper <matt@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * e-xml-utils.c, e-xml-utils.h: Added
- e_xml_get_child_by_name_by_lang.
-
-2000-04-16 Anders Carlsson <andersca@gnu.org>
-
- * 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 <clahey@helixcode.com>
-
- * e-xml-utils.c: Fixing a warning.
-
-2000-04-14 Christopher James Lahey <clahey@helixcode.com>
-
- * e-xml-utils.c: Add g_return_if_fails.
-
-2000-04-12 Miguel de Icaza <miguel@gnu.org>
-
- * e-cursors.c (e_cursor_get): Prevent next hacker to get bitten by this.
-
-2000-04-10 Christopher James Lahey <clahey@helixcode.com>
-
- * e-canvas.c: Added proper keyboard focus handling.
-
-2000-04-06 Matt Loper <matt@helixcode.com>
-
- * 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 <NotZed@HelixCode.com>
-
- * e-util/e-sexp.h: Formatting cleanup.
-
-2000-03-07 NotZed <NotZed@HelixCode.com>
-
- * e-util/Makefile.am (libeutil_la_SOURCES): s-sexp.h -> e-sexp.h.
-
-2000-03-12 Christopher James Lahey <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * e-util/e-xml-utils.c: Fixed e_xml_set_integer_prop_by_name.
-
-2000-03-04 Christopher James Lahey <clahey@helixcode.com>
-
- * e-util/e-xml-utils.c, e-util/e-xml-utils.h: Added
- e_xml_set_integer_prop_by_name.
-
-2000-02-28 NotZed <NotZed@HelixCode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 <danw@helixcode.com>
-
- * 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 <clahey@helixcode.com>
-
- * 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 6050a8b049..0000000000
--- a/e-util/Makefile.am
+++ /dev/null
@@ -1,74 +0,0 @@
-SUBDIRS = . ename
-
-imagesdir = $(datadir)/images/evolution
-
-INCLUDES = \
- -I$(top_srcdir) \
- $(GNOME_INCLUDEDIR) \
- $(EXTRA_GNOME_CFLAGS) \
- $(UNICODE_CFLAGS) \
- $(PISOCK_CFLAGS) \
- -DEVOLUTION_IMAGES=\""$(imagesdir)"\" \
- -DG_LOG_DOMAIN=\"e-utils\"
-
-noinst_LTLIBRARIES = libeutil.la libeutil-static.la \
- libeconduit.la libeconduit-static.la
-
-libeutil_la_SOURCES = \
- e-corba-utils.c \
- e-corba-utils.h \
- e-dialog-widgets.c \
- e-dialog-widgets.h \
- e-gtk-utils.c \
- e-gtk-utils.h \
- e-gui-utils.c \
- e-gui-utils.h \
- e-html-utils.c \
- e-html-utils.h \
- e-iterator.c \
- e-iterator.h \
- e-list-iterator.c \
- e-list-iterator.h \
- e-list.c \
- e-list.h \
- e-memory.c \
- e-memory.h \
- e-msgport.c \
- e-msgport.h \
- e-path.c \
- e-path.h \
- e-sexp.c \
- e-sexp.h \
- e-time-utils.c \
- e-time-utils.h \
- e-url.c \
- e-url.h \
- e-dbhash.c \
- e-dbhash.h \
- md5-utils.c \
- md5-utils.h
-
-libeutil_la_LIBADD = $(UNICODE_LIBS)
-
-libeutil_static_la_SOURCES = $(libeutil_la_SOURCES)
-libeutil_static_la_LDFLAGS = --all-static
-
-pilot_sources = \
- e-pilot-map.c \
- e-pilot-map.h \
- e-pilot-util.c \
- e-pilot-util.h
-
-if ENABLE_PILOT_CONDUITS
-pilot_compile = $(pilot_sources)
-else
-pilot_compile =
-endif
-
-libeconduit_la_SOURCES = $(pilot_compile)
-
-libeconduit_static_la_SOURCES = $(libeconduit_la_SOURCES)
-libeconduit_static_la_LDFLAGS = --all-static
-
-EXTRA_DIST = $(pilot_sources)
-
diff --git a/e-util/e-bit-array.c b/e-util/e-bit-array.c
deleted file mode 100644
index f8934f8b4e..0000000000
--- a/e-util/e-bit-array.c
+++ /dev/null
@@ -1,412 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-selection-model-array.c: a Selection Model
- *
- * Author:
- * Christopher James Lahey <clahey@ximian.com>
- *
- * (C) 2000, 2001 Ximian, Inc.
- */
-#include <config.h>
-#include <gtk/gtksignal.h>
-#include "e-bit-array.h"
-#include "gal/util/e-util.h"
-
-#define EBA_CLASS(e) ((EBitArrayClass *)((GtkObject *)e)->klass)
-
-#define PARENT_TYPE (gtk_object_get_type ())
-
-#define ONES ((guint32) 0xffffffff)
-
-#define BOX(n) ((n) / 32)
-#define OFFSET(n) (31 - ((n) % 32))
-#define BITMASK(n) ((guint32)(((guint32) 0x1) << OFFSET((n))))
-#define BITMASK_LEFT(n) ((((n) % 32) == 0) ? 0 : (ONES << (32 - ((n) % 32))))
-#define BITMASK_RIGHT(n) ((guint32)(((guint32) ONES) >> ((n) % 32)))
-
-static GtkObjectClass *parent_class;
-
-static void
-e_bit_array_insert_real(EBitArray *eba, int row)
-{
- int box;
- int i;
- if(eba->bit_count >= 0) {
- /* Add another word if needed. */
- if ((eba->bit_count & 0x1f) == 0) {
- eba->data = g_renew(gint, eba->data, (eba->bit_count >> 5) + 1);
- eba->data[eba->bit_count >> 5] = 0;
- }
-
- /* The box is the word that our row is in. */
- box = BOX(row);
- /* Shift all words to the right of our box right one bit. */
- for (i = eba->bit_count >> 5; i > box; i--) {
- eba->data[i] = (eba->data[i] >> 1) | (eba->data[i - 1] << 31);
- }
-
- /* Shift right half of box one bit to the right. */
- eba->data[box] = (eba->data[box] & BITMASK_LEFT(row)) | ((eba->data[box] & BITMASK_RIGHT(row)) >> 1);
- eba->bit_count ++;
- }
-}
-
-static void
-e_bit_array_delete_real(EBitArray *eba, int row, gboolean move_selection_mode)
-{
- int box;
- int i;
- int last;
- int selected = FALSE;
- if(eba->bit_count >= 0) {
- guint32 bitmask;
- box = row >> 5;
- last = eba->bit_count >> 5;
-
- /* Build bitmasks for the left and right half of the box */
- bitmask = BITMASK_RIGHT(row) >> 1;
- if (move_selection_mode)
- selected = e_bit_array_value_at(eba, row);
- /* Shift right half of box one bit to the left. */
- eba->data[box] = (eba->data[box] & BITMASK_LEFT(row))| ((eba->data[box] & bitmask) << 1);
-
- /* Shift all words to the right of our box left one bit. */
- if (box < last) {
- eba->data[box] &= eba->data[box + 1] >> 31;
-
- for (i = box + 1; i < last; i++) {
- eba->data[i] = (eba->data[i] << 1) | (eba->data[i + 1] >> 31);
- }
- /* this over-runs our memory! */
- /*eba->data[i] = eba->data[i] << 1; */
- }
- eba->bit_count --;
- /* Remove the last word if not needed. */
- if ((eba->bit_count & 0x1f) == 0) {
- eba->data = g_renew(gint, eba->data, eba->bit_count >> 5);
- }
- if (move_selection_mode && selected) {
- e_bit_array_select_single_row (eba, row > 0 ? row - 1 : 0);
- }
- }
-}
-
-/* FIXME : Improve efficiency here. */
-void
-e_bit_array_delete(EBitArray *eba, int row, int count)
-{
- int i;
- for (i = 0; i < count; i++)
- e_bit_array_delete_real(eba, row, FALSE);
-}
-
-/* FIXME : Improve efficiency here. */
-void
-e_bit_array_delete_single_mode(EBitArray *eba, int row, int count)
-{
- int i;
- for (i = 0; i < count; i++)
- e_bit_array_delete_real(eba, row, TRUE);
-}
-
-/* FIXME : Improve efficiency here. */
-void
-e_bit_array_insert(EBitArray *eba, int row, int count)
-{
- int i;
- for (i = 0; i < count; i++)
- e_bit_array_insert_real(eba, row);
-}
-
-/* FIXME: Implement this more efficiently. */
-void
-e_bit_array_move_row(EBitArray *eba, int old_row, int new_row)
-{
- e_bit_array_delete_real(eba, old_row, FALSE);
- e_bit_array_insert_real(eba, new_row);
-}
-
-static void
-eba_destroy (GtkObject *object)
-{
- EBitArray *eba;
-
- eba = E_BIT_ARRAY (object);
-
- g_free(eba->data);
-}
-
-/**
- * e_selection_model_is_row_selected
- * @selection: #EBitArray to check
- * @n: The row to check
- *
- * This routine calculates whether the given row is selected.
- *
- * Returns: %TRUE if the given row is selected
- */
-gboolean
-e_bit_array_value_at (EBitArray *eba,
- gint n)
-{
- if (eba->bit_count < n || eba->bit_count == 0)
- return 0;
- else
- return (eba->data[BOX(n)] >> OFFSET(n)) & 0x1;
-}
-
-/**
- * e_selection_model_foreach
- * @selection: #EBitArray to traverse
- * @callback: The callback function to call back.
- * @closure: The closure
- *
- * This routine calls the given callback function once for each
- * selected row, passing closure as the closure.
- */
-void
-e_bit_array_foreach (EBitArray *eba,
- EForeachFunc callback,
- gpointer closure)
-{
- int i;
- int last = (eba->bit_count + 31) / 32;
- for (i = 0; i < last; i++) {
- if (eba->data[i]) {
- int j;
- guint32 value = eba->data[i];
- for (j = 0; j < 32; j++) {
- if (value & 0x80000000) {
- callback(i * 32 + j, closure);
- }
- value <<= 1;
- }
- }
- }
-}
-
-/**
- * e_selection_model_clear
- * @selection: #EBitArray to clear
- *
- * This routine clears the selection to no rows selected.
- */
-void
-e_bit_array_clear(EBitArray *eba)
-{
- g_free(eba->data);
- eba->data = NULL;
- eba->bit_count = 0;
-}
-
-#define PART(x,n) (((x) & (0x01010101 << n)) >> n)
-#define SECTION(x, n) (((x) >> (n * 8)) & 0xff)
-
-/**
- * e_selection_model_selected_count
- * @selection: #EBitArray to count
- *
- * This routine calculates the number of rows selected.
- *
- * Returns: The number of rows selected in the given model.
- */
-gint
-e_bit_array_selected_count (EBitArray *eba)
-{
- gint count;
- int i;
- int last;
-
- if (!eba->data)
- return 0;
-
- count = 0;
-
- last = BOX(eba->bit_count - 1);
-
- for (i = 0; i <= last; i++) {
- int j;
- guint32 thiscount = 0;
- for (j = 0; j < 8; j++)
- thiscount += PART(eba->data[i], j);
- for (j = 0; j < 4; j++)
- count += SECTION(thiscount, j);
- }
-
- return count;
-}
-
-/**
- * e_selection_model_select_all
- * @selection: #EBitArray to select all
- *
- * This routine selects all the rows in the given
- * #EBitArray.
- */
-void
-e_bit_array_select_all (EBitArray *eba)
-{
- int i;
-
- if (!eba->data)
- eba->data = g_new0 (gint, (eba->bit_count + 31) / 32);
-
- for (i = 0; i < (eba->bit_count + 31) / 32; i ++) {
- eba->data[i] = ONES;
- }
-
- /* need to zero out the bits corresponding to the rows not
- selected in the last full 32 bit mask */
- if (eba->bit_count % 32) {
- int unselected_mask = 0;
- int num_unselected_in_last_byte = 32 - eba->bit_count % 32;
-
- for (i = 0; i < num_unselected_in_last_byte; i ++)
- unselected_mask |= 1 << i;
-
- eba->data[(eba->bit_count + 31) / 32 - 1] &= ~unselected_mask;
- }
-}
-
-/**
- * e_selection_model_invert_selection
- * @selection: #EBitArray to invert
- *
- * This routine inverts all the rows in the given
- * #EBitArray.
- */
-void
-e_bit_array_invert_selection (EBitArray *eba)
-{
- int i;
-
- if (!eba->data)
- eba->data = g_new0 (gint, (eba->bit_count + 31) / 32);
-
- for (i = 0; i < (eba->bit_count + 31) / 32; i ++) {
- eba->data[i] = ~eba->data[i];
- }
-}
-
-int
-e_bit_array_bit_count (EBitArray *eba)
-{
- return eba->bit_count;
-}
-
-gboolean
-e_bit_array_cross_and (EBitArray *eba)
-{
- int i;
- for (i = 0; i < eba->bit_count / 32; i++) {
- if (eba->data[i] != ONES)
- return FALSE;
- }
- if ((eba->bit_count % 32) && ((eba->data[i] & BITMASK_LEFT(eba->bit_count)) != BITMASK_LEFT(eba->bit_count)))
- return FALSE;
- return TRUE;
-}
-
-gboolean
-e_bit_array_cross_or (EBitArray *eba)
-{
- int i;
- for (i = 0; i < eba->bit_count / 32; i++) {
- if (eba->data[i] != 0)
- return TRUE;
- }
- if ((eba->bit_count % 32) && ((eba->data[i] & BITMASK_LEFT(eba->bit_count)) != 0))
- return TRUE;
- return FALSE;
-}
-
-#define OPERATE(object, i,mask,grow) ((grow) ? (((object)->data[(i)]) |= ((guint32) ~(mask))) : (((object)->data[(i)]) &= (mask)))
-
-void
-e_bit_array_change_one_row(EBitArray *eba, int row, gboolean grow)
-{
- int i;
- i = BOX(row);
-
- OPERATE(eba, i, ~BITMASK(row), grow);
-}
-
-void
-e_bit_array_change_range(EBitArray *eba, int start, int end, gboolean grow)
-{
- int i, last;
- if (start != end) {
- i = BOX(start);
- last = BOX(end);
-
- if (i == last) {
- OPERATE(eba, i, BITMASK_LEFT(start) | BITMASK_RIGHT(end), grow);
- } else {
- OPERATE(eba, i, BITMASK_LEFT(start), grow);
- if (grow)
- for (i ++; i < last; i++)
- eba->data[i] = ONES;
- else
- for (i ++; i < last; i++)
- eba->data[i] = 0;
- OPERATE(eba, i, BITMASK_RIGHT(end), grow);
- }
- }
-}
-
-void
-e_bit_array_select_single_row (EBitArray *eba, int row)
-{
- int i;
- for (i = 0; i < ((eba->bit_count + 31) / 32); i++) {
- if (!((i == BOX(row) && eba->data[i] == BITMASK(row)) ||
- (i != BOX(row) && eba->data[i] == 0))) {
- g_free(eba->data);
- eba->data = g_new0(gint, (eba->bit_count + 31) / 32);
- eba->data[BOX(row)] = BITMASK(row);
-
- break;
- }
- }
-}
-
-void
-e_bit_array_toggle_single_row (EBitArray *eba, int row)
-{
- if (eba->data[BOX(row)] & BITMASK(row))
- eba->data[BOX(row)] &= ~BITMASK(row);
- else
- eba->data[BOX(row)] |= BITMASK(row);
-}
-
-
-static void
-e_bit_array_init (EBitArray *eba)
-{
- eba->data = NULL;
- eba->bit_count = 0;
-}
-
-static void
-e_bit_array_class_init (EBitArrayClass *klass)
-{
- GtkObjectClass *object_class;
-
- parent_class = gtk_type_class (PARENT_TYPE);
-
- object_class = GTK_OBJECT_CLASS(klass);
-
- object_class->destroy = eba_destroy;
-}
-
-E_MAKE_TYPE(e_bit_array, "EBitArray", EBitArray,
- e_bit_array_class_init, e_bit_array_init, PARENT_TYPE);
-
-EBitArray *
-e_bit_array_new (int count)
-{
- EBitArray *eba = gtk_type_new (e_bit_array_get_type ());
- eba->bit_count = count;
- eba->data = g_new0(gint, (eba->bit_count + 31) / 32);
- return eba;
-}
diff --git a/e-util/e-bit-array.h b/e-util/e-bit-array.h
deleted file mode 100644
index 7469413be3..0000000000
--- a/e-util/e-bit-array.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-#ifndef _E_BIT_ARRAY_H_
-#define _E_BIT_ARRAY_H_
-
-#include <gtk/gtkobject.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#define E_BIT_ARRAY_TYPE (e_bit_array_get_type ())
-#define E_BIT_ARRAY(o) (GTK_CHECK_CAST ((o), E_BIT_ARRAY_TYPE, EBitArray))
-#define E_BIT_ARRAY_CLASS(k) (GTK_CHECK_CLASS_CAST((k), E_BIT_ARRAY_TYPE, EBitArrayClass))
-#define E_IS_BIT_ARRAY(o) (GTK_CHECK_TYPE ((o), E_BIT_ARRAY_TYPE))
-#define E_IS_BIT_ARRAY_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_BIT_ARRAY_TYPE))
-
-#ifndef _E_FOREACH_FUNC_H_
-#define _E_FOREACH_FUNC_H_
-typedef void (*EForeachFunc) (int model_row,
- gpointer closure);
-#endif
-
-typedef struct {
- GtkObject base;
-
- gint bit_count;
- guint32 *data;
-} EBitArray;
-
-typedef struct {
- GtkObjectClass parent_class;
-} EBitArrayClass;
-
-
-GtkType e_bit_array_get_type (void);
-EBitArray *e_bit_array_new (int count);
-
-gboolean e_bit_array_value_at (EBitArray *selection,
- gint n);
-void e_bit_array_foreach (EBitArray *selection,
- EForeachFunc callback,
- gpointer closure);
-void e_bit_array_clear (EBitArray *selection);
-gint e_bit_array_selected_count (EBitArray *selection);
-void e_bit_array_select_all (EBitArray *selection);
-void e_bit_array_invert_selection (EBitArray *selection);
-int e_bit_array_bit_count (EBitArray *selection);
-void e_bit_array_change_one_row (EBitArray *selection,
- int row,
- gboolean grow);
-void e_bit_array_change_range (EBitArray *selection,
- int start,
- int end,
- gboolean grow);
-void e_bit_array_select_single_row (EBitArray *eba,
- int row);
-void e_bit_array_toggle_single_row (EBitArray *eba,
- int row);
-
-void e_bit_array_insert (EBitArray *esm,
- int row,
- int count);
-void e_bit_array_delete (EBitArray *esm,
- int row,
- int count);
-void e_bit_array_delete_single_mode (EBitArray *esm,
- int row,
- int count);
-void e_bit_array_move_row (EBitArray *esm,
- int old_row,
- int new_row);
-gint e_bit_array_bit_count (EBitArray *esm);
-
-gboolean e_bit_array_cross_and (EBitArray *esm);
-gboolean e_bit_array_cross_or (EBitArray *esm);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-#endif /* _E_BIT_ARRAY_H_ */
diff --git a/e-util/e-corba-utils.c b/e-util/e-corba-utils.c
deleted file mode 100644
index 893a1f9dce..0000000000
--- a/e-util/e-corba-utils.c
+++ /dev/null
@@ -1,37 +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: Ettore Perazzoli <ettore@helixcode.com>
- *
- * 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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "e-corba-utils.h"
-
-
-const CORBA_char *
-e_safe_corba_string (const char *s)
-{
- if (s == NULL)
- return (CORBA_char *) "";
-
- return s;
-}
diff --git a/e-util/e-corba-utils.h b/e-util/e-corba-utils.h
deleted file mode 100644
index 2147b8df37..0000000000
--- a/e-util/e-corba-utils.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* e-corba-utils.h
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Author: Ettore Perazzoli <ettore@helixcode.com>
- *
- * 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_CORBA_UTILS_H
-#define E_CORBA_UTILS_H
-
-#include <orb/orbit.h>
-
-const CORBA_char *e_safe_corba_string (const char *s);
-
-#endif
diff --git a/e-util/e-dbhash.c b/e-util/e-dbhash.c
deleted file mode 100644
index e286500066..0000000000
--- a/e-util/e-dbhash.c
+++ /dev/null
@@ -1,200 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author:
- * JP Rosevear (jpr@helixcode.com)
- *
- * Copyright 2000, Helix Code, Inc.
- */
-
-#include <config.h>
-#include <string.h>
-#include <fcntl.h>
-#ifdef HAVE_DB_185_H
-#include <db_185.h>
-#else
-#ifdef HAVE_DB1_DB_H
-#include <db1/db.h>
-#else
-#include <db.h>
-#endif
-#endif
-#include "md5-utils.h"
-#include "e-dbhash.h"
-
-struct _EDbHashPrivate
-{
- DB *db;
-};
-
-EDbHash *
-e_dbhash_new (const char *filename)
-{
- EDbHash *edbh;
- DB *db;
-
- /* Attempt to open the database */
- db = dbopen (filename, O_RDWR, 0666, DB_HASH, NULL);
- if (db == NULL) {
- db = dbopen (filename, O_RDWR | O_CREAT, 0666, DB_HASH, NULL);
-
- if (db == NULL)
- return NULL;
- }
-
- edbh = g_new (EDbHash, 1);
- edbh->priv = g_new (EDbHashPrivate, 1);
- edbh->priv->db = db;
-
- return edbh;
-}
-
-static void
-string_to_dbt(const char *str, DBT *dbt)
-{
- dbt->data = (void*)str;
- dbt->size = strlen (str) + 1;
-}
-
-static void
-md5_to_dbt(const char str[16], DBT *dbt)
-{
- dbt->data = (void*)str;
- dbt->size = 16;
-}
-
-void
-e_dbhash_add (EDbHash *edbh, const gchar *key, const gchar *data)
-{
- DB *db;
- DBT dkey;
- DBT ddata;
- guchar local_hash[16];
-
- g_return_if_fail (edbh != NULL);
- g_return_if_fail (edbh->priv != NULL);
- g_return_if_fail (edbh->priv->db != NULL);
- g_return_if_fail (key != NULL);
- g_return_if_fail (data != NULL);
-
- db = edbh->priv->db;
-
- /* Key dbt */
- string_to_dbt (key, &dkey);
-
- /* Data dbt */
- md5_get_digest (data, strlen (data), local_hash);
- md5_to_dbt (local_hash, &ddata);
-
- /* Add to database */
- db->put (db, &dkey, &ddata, 0);
-}
-
-void
-e_dbhash_remove (EDbHash *edbh, const char *key)
-{
- DB *db;
- DBT dkey;
-
- g_return_if_fail (edbh != NULL);
- g_return_if_fail (edbh->priv != NULL);
- g_return_if_fail (key != NULL);
-
- db = edbh->priv->db;
-
- /* Key dbt */
- string_to_dbt (key, &dkey);
-
- /* Remove from database */
- db->del (db, &dkey, 0);
-}
-
-void
-e_dbhash_foreach_key (EDbHash *edbh, EDbHashFunc func, gpointer user_data)
-{
- DB *db;
- DBT dkey;
- DBT ddata;
- int db_error = 0;
-
- g_return_if_fail (edbh != NULL);
- g_return_if_fail (edbh->priv != NULL);
- g_return_if_fail (func != NULL);
-
- db = edbh->priv->db;
-
- db_error = db->seq(db, &dkey, &ddata, R_FIRST);
-
- while (db_error == 0) {
- (*func) ((const char *)dkey.data, user_data);
-
- db_error = db->seq(db, &dkey, &ddata, R_NEXT);
- }
-}
-
-EDbHashStatus
-e_dbhash_compare (EDbHash *edbh, const char *key, const char *compare_data)
-{
- DB *db;
- DBT dkey;
- DBT ddata;
- guchar compare_hash[16];
-
- g_return_val_if_fail (edbh != NULL, FALSE);
- g_return_val_if_fail (edbh->priv != NULL, FALSE);
- g_return_val_if_fail (key != NULL, FALSE);
- g_return_val_if_fail (compare_hash != NULL, FALSE);
-
- db = edbh->priv->db;
-
- /* Key dbt */
- string_to_dbt (key, &dkey);
-
- /* Lookup in database */
- memset (&ddata, 0, sizeof (DBT));
- db->get (db, &dkey, &ddata, 0);
-
- /* Compare */
- if (ddata.data) {
- md5_get_digest (compare_data, strlen (compare_data), compare_hash);
-
- if (memcmp (ddata.data, compare_hash, sizeof (guchar) * 16))
- return E_DBHASH_STATUS_DIFFERENT;
- } else {
- return E_DBHASH_STATUS_NOT_FOUND;
- }
-
- return E_DBHASH_STATUS_SAME;
-}
-
-void
-e_dbhash_write (EDbHash *edbh)
-{
- DB *db;
-
- g_return_if_fail (edbh != NULL);
- g_return_if_fail (edbh->priv != NULL);
-
- db = edbh->priv->db;
-
- /* Flush database to disk */
- db->sync (db, 0);
-}
-
-void
-e_dbhash_destroy (EDbHash *edbh)
-{
- DB *db;
-
- g_return_if_fail (edbh != NULL);
- g_return_if_fail (edbh->priv != NULL);
-
- db = edbh->priv->db;
-
- /* Close datbase */
- db->close (db);
-
- g_free (edbh->priv);
- g_free (edbh);
-}
-
-
diff --git a/e-util/e-dbhash.h b/e-util/e-dbhash.h
deleted file mode 100644
index ac0b28d6a8..0000000000
--- a/e-util/e-dbhash.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Writes hashes that go to/from disk in db form. Hash keys are strings
- *
- * Author:
- * JP Rosevear (jpr@helixcode.com)
- *
- * Copyright 2000, Helix Code, Inc.
- */
-
-#ifndef __E_DBHASH_H__
-#define __E_DBHASH_H__
-
-#include <glib.h>
-
-typedef enum {
- E_DBHASH_STATUS_SAME,
- E_DBHASH_STATUS_DIFFERENT,
- E_DBHASH_STATUS_NOT_FOUND,
-} EDbHashStatus;
-
-typedef struct _EDbHash EDbHash;
-typedef struct _EDbHashPrivate EDbHashPrivate;
-
-struct _EDbHash
-{
- EDbHashPrivate *priv;
-};
-
-typedef void (*EDbHashFunc) (const char *key, gpointer user_data);
-
-EDbHash *e_dbhash_new (const char *filename);
-
-void e_dbhash_add (EDbHash *edbh, const char *key, const char *data);
-void e_dbhash_remove (EDbHash *edbh, const char *key);
-
-EDbHashStatus e_dbhash_compare (EDbHash *edbh, const char *key, const char *compare_data);
-void e_dbhash_foreach_key (EDbHash *edbh, EDbHashFunc func, gpointer user_data);
-
-void e_dbhash_write (EDbHash *edbh);
-
-void e_dbhash_destroy (EDbHash *edbh);
-
-#endif /* ! __E_DBHASH_H__ */
-
diff --git a/e-util/e-dialog-widgets.c b/e-util/e-dialog-widgets.c
deleted file mode 100644
index 570a7e7882..0000000000
--- a/e-util/e-dialog-widgets.c
+++ /dev/null
@@ -1,832 +0,0 @@
-/* Evolution internal utilities - Glade dialog widget utilities
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Author: Federico Mena-Quintero <federico@ximian.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 <math.h>
-#include <string.h>
-#include <time.h>
-#include <gtk/gtkmenu.h>
-#include <gtk/gtkmenuitem.h>
-#include <gtk/gtkoptionmenu.h>
-#include <gtk/gtkradiobutton.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtkspinbutton.h>
-#include <libgnomeui/gnome-dateedit.h>
-#include <libgnomeui/gnome-propertybox.h>
-#include <gal/widgets/e-unicode.h>
-
-#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;
- GSList *l;
- int *value;
- const int *value_map;
-
- group = gtk_radio_button_group (radio);
-
- /* Set the value */
-
- value = (int *) value_var;
- value_map = (const int *) info;
-
- e_dialog_radio_set (GTK_WIDGET (radio), *value, value_map);
-
- /* 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)
-{
- int *value;
- const int *value_map;
-
- value = (int *) value_var;
- value_map = (const int *) info;
-
- *value = e_dialog_radio_get (GTK_WIDGET (radio), value_map);
-}
-
-/* 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;
- const int *value_map;
-
- /* Set the value */
-
- value = (int *) value_var;
- value_map = (const int *) info;
-
- e_dialog_option_menu_set (GTK_WIDGET (omenu), *value, value_map);
-
- /* 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)
-{
- int *value;
- const int *value_map;
-
- value = (int *) value_var;
- value_map = (const int *) info;
-
- *value = e_dialog_option_menu_get (GTK_WIDGET (omenu), value_map);
-}
-
-/* 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;
- e_dialog_toggle_set (GTK_WIDGET (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_var;
- *value = e_dialog_toggle_get (GTK_WIDGET (toggle));
-}
-
-/* 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;
- e_dialog_spin_set (GTK_WIDGET (spin), *value);
-
- /* Hook to changed */
-
- adj = gtk_spin_button_get_adjustment (spin);
-
- 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;
-
- value = (double *) value_var;
- *value = e_dialog_spin_get_double (GTK_WIDGET (spin));
-}
-
-/* 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;
-
- /* Set the value */
-
- value = (char **) value_var;
-
- e_dialog_editable_set (GTK_WIDGET (editable), *value);
-
- /* 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 = e_dialog_editable_get (GTK_WIDGET (editable));
-}
-
-/**
- * e_dialog_editable_set:
- * @widget: A #GtkEditable widget.
- * @value: String value.
- *
- * Sets the string value inside a #GtkEditable-derived widget.
- **/
-void
-e_dialog_editable_set (GtkWidget *widget, const 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;
- e_utf8_gtk_editable_insert_text (GTK_EDITABLE (widget), value, strlen (value), &pos);
- }
-}
-
-/**
- * e_dialog_editable_get:
- * @widget: A #GtkEditable widget.
- *
- * Queries the string value inside a #GtkEditable-derived widget.
- *
- * Return value: String value. You should free it when you are done with it.
- * This function can return NULL if the string could not be converted from
- * GTK+'s encoding into UTF8.
- **/
-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 e_utf8_gtk_editable_get_chars (GTK_EDITABLE (widget), 0, -1);
-}
-
-/**
- * e_dialog_radio_set:
- * @widget: A #GtkRadioButton in a radio button group.
- * @value: Enumerated value.
- * @value_map: Map from enumeration values to array indices.
- *
- * Sets the selected item in a radio group. The specified @widget can be any of
- * the #GtkRadioButtons in the group. Each radio button should correspond to an
- * enumeration value; the specified @value will be mapped to an integer from
- * zero to the number of items in the group minus 1 by using a mapping table
- * specified in @value_map. The last element in this table should be -1. Thus
- * a table to map three possible interpolation values to integers could be
- * specified as { NEAREST_NEIGHBOR, BILINEAR, HYPERBOLIC, -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) {
- /* Groups are built by prepending items, so the list ends up in reverse
- * order; we need to flip the index around.
- */
- i = g_slist_length (group) - 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);
-}
-
-/**
- * e_dialog_radio_get:
- * @widget: A #GtkRadioButton in a radio button group.
- * @value_map: Map from enumeration values to array indices.
- *
- * Queries the selected item in a #GtkRadioButton group. Please read the
- * description of e_dialog_radio_set() to see how @value_map maps enumeration
- * values to button indices.
- *
- * Return value: Enumeration value which corresponds to the selected item in the
- * radio group.
- **/
-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, i++) {
- widget = GTK_WIDGET (l->data);
-
- if (GTK_TOGGLE_BUTTON (widget)->active)
- break;
- }
-
- if (!l)
- g_assert_not_reached ();
-
- /* Groups are built by prepending items, so the list ends up in reverse
- * order; we need to flip the index around.
- */
- i = g_slist_length (group) - i - 1;
-
- 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;
-}
-
-/**
- * e_dialog_toggle_set:
- * @widget: A #GtkToggleButton.
- * @value: Toggle value.
- *
- * Sets the value of a #GtkToggleButton-derived widget. This should not be used
- * for radio buttons; it is more convenient to use use e_dialog_radio_set()
- * instead.
- **/
-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);
-}
-
-/**
- * e_dialog_toggle_get:
- * @widget: A #GtkToggleButton.
- *
- * Queries the value of a #GtkToggleButton-derived widget. This should not be
- * used for radio buttons; it is more convenient to use e_dialog_radio_get()
- * instead.
- *
- * Return value: Toggle 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;
-}
-
-/**
- * e_dialog_spin_set:
- * @widget: A #GtkSpinButton.
- * @value: Numeric value.
- *
- * Sets the value of a #GtkSpinButton widget.
- **/
-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");
-}
-
-/**
- * e_dialog_spin_get_double:
- * @widget: A #GtkSpinButton.
- *
- * Queries the floating-point value of a #GtkSpinButton widget.
- *
- * Return value: Numeric value.
- **/
-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;
-}
-
-/**
- * e_dialog_spin_get_int:
- * @widget: A #GtkSpinButton.
- *
- * Queries the integer value of a #GtkSpinButton widget.
- *
- * Return value: Numeric 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);
-}
-
-/**
- * e_dialog_option_menu_set:
- * @widget: A #GtkOptionMenu.
- * @value: Enumerated value.
- * @value_map: Map from enumeration values to array indices.
- *
- * Sets the selected item in a #GtkOptionMenu. Please read the description of
- * e_dialog_radio_set() to see how @value_map maps enumeration values to item
- * indices.
- **/
-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);
-}
-
-/**
- * e_dialog_option_menu_get:
- * @widget: A #GtkOptionMenu.
- * @value_map: Map from enumeration values to array indices.
- *
- * Queries the selected item in a #GtkOptionMenu. Please read the description
- * of e_dialog_radio_set() to see how @value_map maps enumeration values to item
- * indices.
- *
- * Return value: Enumeration value which corresponds to the selected item in the
- * option menu.
- **/
-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, i++) {
- 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;
-}
-
-/**
- * e_dialog_dateedit_set:
- * @widget: A #GnomeDateEdit widget.
- * @t: Date/time value.
- *
- * Sets the value of a #GnomeDateEdit widget.
- **/
-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);
-}
-
-/**
- * e_dialog_dateedit_get:
- * @widget: A #GnomeDateEdit widget.
- *
- * Queries the value of a #GnomeDateEdit widget.
- *
- * Return value: Date/time value.
- **/
-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));
-}
-
-/**
- * e_dialog_widget_hook_value:
- * @dialog: Dialog box in which the @widget lives in.
- * @widget: A widget that will control a variable.
- * @value_var: Pointer to the variable that the @widget will control.
- * @info: NULL for most widgets, or an integer value map array (see
- * e_dialog_radio_set() for details).
- *
- * Hooks a widget from a dialog box to the variable it will modify. Supported
- * widgets are: #GtkEditable (char *), #GtkRadioButton (int/value_map pair; see
- * e_dialog_radio_set() for more information), #GtkTogglebutton (gboolean),
- * #GtkSpinButton (double), #GtkOptionMenu (int/value_map pair), and
- * #GnomeDateEdit (time_t).
- *
- * A pointer to the appropriate variable to modify should be passed in @value_var.
- * For values that take a value_map array as well, it should be passed in @info.
- *
- * The widgets within a dialog that are hooked with this function will set their
- * respective variables only when e_dialog_get_values() is called. The typical
- * use is to call that function in the handler for the "OK" button of a dialog
- * box.
- *
- * In addition, if the specified @dialog is a #GnomePropertyBox, the widgets wil
- * automatically turn on the "Apply" button of the property box when they are
- * modified by the user.
- *
- * Return value: TRUE if the type of the specified @widget is supported, FALSE
- * otherwise.
- **/
-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;
-}
-
-/**
- * e_dialog_get_values:
- * @dialog: A dialog box whose widgets have been hooked to the appropriate
- * variables with e_dialog_widget_hook_value().
- *
- * Makes every widget in a @dialog that was hooked with
- * e_dialog_widget_hook_value() apply its value to its corresponding variable.
- * The typical usage is to call this function in the handler for the "OK" button
- * of a dialog box.
- **/
-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 ();
- }
-}
-
-/**
- * e_dialog_xml_widget_hook_value:
- * @xml: Glade XML description of a dialog box.
- * @dialog: Dialog box in which the widget lives in.
- * @widget_name: Name of the widget in the Glade XML data.
- * @value_var: Pointer to the variable that the widget will control.
- * @info: NULL for most widgets, or an integer value map array (see
- * e_dialog_radio_set() for details).
- *
- * Similar to e_dialog_widget_hook_value(), but uses the widget from a #GladeXML
- * data structure.
- *
- * Return value: TRUE if the type of the specified widget is supported, FALSE
- * otherwise.
- **/
-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 15ed8ab24e..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.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Author: Federico Mena-Quintero <federico@ximian.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 E_DIALOG_WIDGETS_H
-#define E_DIALOG_WIDGETS_H
-
-#include <time.h>
-#include <glade/glade.h>
-
-
-
-void e_dialog_editable_set (GtkWidget *widget, const 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-gtk-utils.c b/e-util/e-gtk-utils.c
deleted file mode 100644
index c1a258ea14..0000000000
--- a/e-util/e-gtk-utils.c
+++ /dev/null
@@ -1,161 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-gtk-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 <config.h>
-#endif
-
-#include <gtk/gtksignal.h>
-#include "e-gtk-utils.h"
-
-
-/* (Cut and pasted from Gtk.) */
-
-typedef struct DisconnectInfo {
- unsigned int signal_handler;
-
- GtkObject *object1;
- unsigned int disconnect_handler1;
-
- GtkObject *object2;
- unsigned int disconnect_handler2;
-} DisconnectInfo;
-
-static unsigned int
-alive_disconnecter (GtkObject *object,
- DisconnectInfo *info)
-{
- g_assert (info != NULL);
-
- gtk_signal_disconnect (info->object1, info->disconnect_handler1);
- gtk_signal_disconnect (info->object1, info->signal_handler);
- gtk_signal_disconnect (info->object2, info->disconnect_handler2);
-
- g_free (info);
-
- return 0;
-}
-
-/**
- * e_gtk_signal_connect_full_while_alive:
- * @object:
- * @name:
- * @func:
- * @marshal:
- * @data:
- * @destroy_func:
- * @object_signal:
- * @after:
- * @alive_object:
- *
- * Connect a signal like `gtk_signal_connect_while_alive()', but with full
- * params like `gtk_signal_connect_full()'.
- **/
-void
-e_gtk_signal_connect_full_while_alive (GtkObject *object,
- const char *name,
- GtkSignalFunc func,
- GtkCallbackMarshal marshal,
- void *data,
- GtkDestroyNotify destroy_func,
- gboolean object_signal,
- gboolean after,
- GtkObject *alive_object)
-{
- DisconnectInfo *info;
-
- g_return_if_fail (GTK_IS_OBJECT (object));
- g_return_if_fail (name != NULL);
- g_return_if_fail (func != NULL);
- g_return_if_fail (GTK_IS_OBJECT (alive_object));
-
- info = g_new (DisconnectInfo, 1);
-
- info->signal_handler = gtk_signal_connect_full (object, name,
- func, marshal, data,
- destroy_func,
- object_signal, after);
-
- info->object1 = object;
- info->disconnect_handler1 = gtk_signal_connect (object, "destroy",
- GTK_SIGNAL_FUNC (alive_disconnecter), info);
-
- info->object2 = alive_object;
- info->disconnect_handler2 = gtk_signal_connect (alive_object, "destroy",
- GTK_SIGNAL_FUNC (alive_disconnecter), info);
-}
-
-/**
- * gtk_radio_button_get_nth_selected:
- * @button: A GtkRadioButton
- *
- * Returns an int indicating which button in the radio group is
- * toggled active. NOTE: radio group item numbering starts at zero.
- **/
-int
-gtk_radio_button_get_nth_selected (GtkRadioButton *button)
-{
- GSList *l;
- int i, c;
-
- g_return_val_if_fail (button != NULL, 0);
- g_return_val_if_fail (GTK_IS_RADIO_BUTTON (button), 0);
-
- c = g_slist_length (button->group);
-
- for (i = 0, l = button->group; l; l = l->next, i++) {
- GtkRadioButton *tmp = l->data;
-
- if (GTK_TOGGLE_BUTTON (tmp)->active)
- return c - i - 1;
- }
-
- return 0;
-}
-
-/**
- * gtk_radio_button_select_nth:
- * @button: A GtkRadioButton
- * @n: Which button to select from the group
- *
- * Select the Nth item of a radio group. NOTE: radio group items
- * start numbering from zero
- **/
-void
-gtk_radio_button_select_nth (GtkRadioButton *button, int n)
-{
- GSList *l;
- int len;
-
- g_return_if_fail (button != NULL);
- g_return_if_fail (GTK_IS_RADIO_BUTTON (button));
-
- len = g_slist_length (button->group);
-
- if ((n <= len) && (n > 0)) {
- l = g_slist_nth (button->group, len - n - 1);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (l->data), TRUE);
- }
-
-}
diff --git a/e-util/e-gtk-utils.h b/e-util/e-gtk-utils.h
deleted file mode 100644
index d56d8a9000..0000000000
--- a/e-util/e-gtk-utils.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* e-gtk-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
- */
-
-#ifndef E_GTK_UTILS_H
-#define E_GTK_UTILS_H
-
-#include <gtk/gtkobject.h>
-#include <gtk/gtkradiobutton.h>
-
-void e_gtk_signal_connect_full_while_alive (GtkObject *object,
- const char *name,
- GtkSignalFunc func,
- GtkCallbackMarshal marshal,
- void *data,
- GtkDestroyNotify destroy_func,
- gboolean object_signal,
- gboolean after,
- GtkObject *alive_object);
-
-
-/* GtkRadioButton API extensions */
-void gtk_radio_button_select_nth (GtkRadioButton *button, int n);
-int gtk_radio_button_get_nth_selected (GtkRadioButton *button);
-
-#endif
diff --git a/e-util/e-gui-utils.c b/e-util/e-gui-utils.c
deleted file mode 100644
index 2ed26448f3..0000000000
--- a/e-util/e-gui-utils.c
+++ /dev/null
@@ -1,120 +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 <config.h>
-
-#include "e-gui-utils.h"
-
-#include <gtk/gtksignal.h>
-#include <gtk/gtkalignment.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-util.h>
-#include <gdk-pixbuf/gdk-pixbuf.h>
-#include <gdk-pixbuf/gnome-canvas-pixbuf.h>
-#include <bonobo/bonobo-ui-util.h>
-
-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;
-}
-
-static GSList *inited_arrays=NULL;
-
-static void
-free_pixmaps (void)
-{
- int i;
- GSList *li;
-
- for (li = inited_arrays; li != NULL; li = li->next) {
- EPixmap *pixcache = li->data;
- for (i = 0; pixcache [i].path; i++)
- g_free (pixcache [i].pixbuf);
- }
-
- g_slist_free(inited_arrays);
-}
-
-void e_pixmaps_update (BonoboUIComponent *uic, EPixmap *pixcache)
-{
- static int done_init = 0;
- int i;
-
- if (!done_init) {
- g_atexit (free_pixmaps);
- done_init = 1;
- }
-
- if (g_slist_find(inited_arrays, pixcache) == NULL)
- inited_arrays = g_slist_prepend (inited_arrays, pixcache);
-
- for (i = 0; pixcache [i].path; i++) {
- if (!pixcache [i].pixbuf) {
- char *path;
- GdkPixbuf *pixbuf;
-
- path = g_concat_dir_and_file (EVOLUTION_IMAGES,
- pixcache [i].fname);
-
- pixbuf = gdk_pixbuf_new_from_file (path);
- if (pixbuf == NULL) {
- g_warning ("Cannot load image -- %s", path);
- } else {
- pixcache [i].pixbuf = bonobo_ui_util_pixbuf_to_xml (pixbuf);
- gdk_pixbuf_unref (pixbuf);
- }
-
- g_free (path);
- }
- bonobo_ui_component_set_prop (uic, pixcache [i].path, "pixname",
- pixcache [i].pixbuf, NULL);
- }
-}
-
diff --git a/e-util/e-gui-utils.h b/e-util/e-gui-utils.h
deleted file mode 100644
index 95df438915..0000000000
--- a/e-util/e-gui-utils.h
+++ /dev/null
@@ -1,23 +0,0 @@
-#ifndef E_GUI_UTILS_H
-#define E_GUI_UTILS_H
-
-#include <gtk/gtkwidget.h>
-#include <bonobo/bonobo-ui-component.h>
-
-GtkWidget *e_create_image_widget (gchar *name, gchar *string1, gchar *string2, gint int1, gint int2);
-
-typedef struct _EPixmap EPixmap;
-
-struct _EPixmap {
- const char *path;
- const char *fname;
- char *pixbuf;
-};
-
-#define E_PIXMAP(path,fname) { (path), (fname), NULL }
-#define E_PIXMAP_END { NULL, NULL, NULL }
-
-/* Takes an array of pixmaps, terminated by (NULL, NULL), and loads into uic */
-void e_pixmaps_update (BonoboUIComponent *uic, EPixmap *pixcache);
-
-#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 0a1938f0fa..0000000000
--- a/e-util/e-html-utils.c
+++ /dev/null
@@ -1,381 +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 <danw@helixcode.com>
- *
- * 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 <ctype.h>
-#include <stdio.h>
-#include <string.h>
-#include <glib.h>
-#include <unicode.h>
-
-#include "e-html-utils.h"
-
-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 unsigned char **text, gboolean check)
-{
- const unsigned char *end = *text, *p;
- char *out;
-
- while (*end && !isspace (*end) && (*end != '"') && (*end < 0x80))
- 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 < 4)
- return NULL;
- }
-
- out = g_strndup (*text, end - *text);
- *text = end;
- return out;
-}
-
-/* FIXME */
-static gboolean
-is_email_address (const unsigned char *c)
-{
- gboolean seen_at = FALSE, seen_postat = FALSE;
-
- if (*c == '<')
- ++c;
-
- while (*c && (isalnum ((gint) *c)
- || *c == '-'
- || *c == '_'
- || *c == (seen_at ? '.' : '@'))) {
-
- if (seen_at && !seen_postat) {
- if (*c == '.')
- return FALSE;
- seen_postat = TRUE;
- }
-
- if (*c == '@')
- seen_at = TRUE;
-
- ++c;
- }
-
- return seen_at && seen_postat && (isspace ((gint) *c) || *c == '>' || !*c);
-}
-
-static gchar *
-email_address_extract (const unsigned char **text)
-{
- const unsigned char *end = *text;
- char *out;
-
- while (*end && !isspace (*end) && (*end != '>') && (*end < 0x80))
- ++end;
-
- out = g_strndup (*text, end - *text);
- if (!is_email_address (out)) {
- g_free (out);
- return NULL;
- }
-
- *text = end;
- return out;
-}
-
-static gboolean
-is_citation (const unsigned char *c)
-{
- unicode_char_t u;
- gint i;
-
- for (i = 0; c && *c && i < 10; i ++, c = unicode_next_utf8 (c)) {
- unicode_get_utf8 (c, &u);
- if (u == '>')
- return TRUE;
- if (!unicode_isalnum (u))
- return FALSE;
- }
- return FALSE;
-}
-
-/**
- * e_text_to_html_full:
- * @input: a NUL-terminated input buffer
- * @flags: some combination of the E_TEXT_TO_HTML_* flags defined
- * in e-html-utils.h
- * @color: color for citation highlighting
- *
- * 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 <PRE> and </PRE>.
- * 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 <PRE> yourself.
- *
- * - E_TEXT_TO_HTML_CONVERT_NL: convert "\n" to "<BR>\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.
- *
- * If E_TEXT_TO_HTML_CONVERT_NL and E_TEXT_TO_HTML_CONVERT_SPACES
- * are both defined, then TABs will also be converted to spaces.
- *
- * - E_TEXT_TO_HTML_CONVERT_URLS: wrap <a href="..."> </a> around
- * strings that look like URLs.
- *
- * - E_TEXT_TO_HTML_CONVERT_ADDRESSES: wrap <a href="mailto:..."> </a> around
- * strings that look like mail addresses.
- *
- * - E_TEXT_TO_HTML_MARK_CITATION: wrap <font color="blue"> </font> around
- * citations (lines beginning with "> ").
- **/
-char *
-e_text_to_html_full (const char *input, unsigned int flags, guint32 color)
-{
- const unsigned char *cur = input;
- char *buffer = NULL;
- char *out = NULL;
- int buffer_size = 0, col;
- gboolean colored = FALSE;
-
- /* 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, "<PRE>\n");
-
- col = 0;
-
- for (cur = input; cur && *cur; cur = unicode_next_utf8 (cur)) {
- unicode_char_t u;
-
- unicode_get_utf8 (cur, &u);
- if (flags & E_TEXT_TO_HTML_MARK_CITATION && col == 0) {
- if (is_citation (cur)) {
- if (!colored) {
- gchar font [25];
-
- g_snprintf (font, 25, "<FONT COLOR=\"#%06x\">", color);
-
- check_size (&buffer, &buffer_size, out, 25);
- out += sprintf (out, "%s", font);
- colored = TRUE;
- }
- } else if (colored) {
- gchar *no_font = "</FONT>";
-
- check_size (&buffer, &buffer_size, out, 9);
- out += sprintf (out, "%s", no_font);
- colored = FALSE;
- }
- }
-
- if (unicode_isalpha (u) &&
- (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) &&
- (*(cur + 4) < 0x80) &&
- unicode_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,
- "<a href=\"%s\">%s</a>",
- refurl, dispurl);
- col += strlen (tmpurl);
- g_free (tmpurl);
- g_free (refurl);
- g_free (dispurl);
- }
-
- if (!*cur)
- break;
- unicode_get_utf8 (cur, &u);
- }
-
- if (unicode_isalpha (u)
- && (flags & E_TEXT_TO_HTML_CONVERT_ADDRESSES)
- && is_email_address (cur)) {
- gchar *addr = NULL, *dispaddr = NULL;
-
- addr = email_address_extract (&cur);
- dispaddr = e_text_to_html (addr, 0);
-
- if (addr) {
- gchar *outaddr = g_strdup_printf ("<a href=\"mailto:%s\">"
- "<!--+GtkHTML:<DATA class=\"Text\" key=\"email\" value=\"%s\">-->"
- "%s"
- "<!--+GtkHTML:<DATA class=\"Text\" clear=\"email\">--> "
- "</a>",
- addr, addr, dispaddr);
- out = check_size (&buffer, &buffer_size, out, strlen(outaddr));
- out += sprintf (out, "%s", outaddr);
- col += strlen (addr);
- g_free (addr);
- g_free (dispaddr);
- g_free (outaddr);
- }
-
- if (!*cur)
- break;
- unicode_get_utf8 (cur, &u);
-
- }
-
- if (u == (unicode_char_t)-1) {
- /* Sigh. Someone sent undeclared 8-bit data.
- * Assume it's iso-8859-1.
- */
- u = *cur;
- }
-
- out = check_size (&buffer, &buffer_size, out, 10);
-
- switch (u) {
- case '<':
- strcpy (out, "&lt;");
- out += 4;
- col++;
- break;
-
- case '>':
- strcpy (out, "&gt;");
- out += 4;
- col++;
- break;
-
- case '&':
- strcpy (out, "&amp;");
- out += 5;
- col++;
- break;
-
- case '"':
- strcpy (out, "&quot;");
- out += 6;
- col++;
- break;
-
- case '\n':
- if (flags & E_TEXT_TO_HTML_CONVERT_NL) {
- strcpy (out, "<br>");
- out += 4;
- }
- *out++ = *cur;
- col = 0;
- break;
-
- case '\t':
- if (flags & (E_TEXT_TO_HTML_CONVERT_SPACES |
- E_TEXT_TO_HTML_CONVERT_NL)) {
- do {
- out = check_size (&buffer, &buffer_size,
- out, 7);
- strcpy (out, "&nbsp;");
- out += 6;
- col++;
- } while (col % 8);
- break;
- }
- /* otherwise, FALL THROUGH */
-
- case ' ':
- if (flags & E_TEXT_TO_HTML_CONVERT_SPACES) {
- if (cur == (const unsigned char *)input ||
- *(cur + 1) == ' ' || *(cur + 1) == '\t') {
- strcpy (out, "&nbsp;");
- out += 6;
- col++;
- break;
- }
- }
- /* otherwise, FALL THROUGH */
-
- default:
- if ((u >= 0x20 && u < 0x80) ||
- (u == '\r' || u == '\t')) {
- /* Default case, just copy. */
- *out++ = u;
- } else {
- out += g_snprintf(out, 9, "&#%d;", u);
- }
- col++;
- break;
- }
- }
-
- out = check_size (&buffer, &buffer_size, out, 7);
- if (flags & E_TEXT_TO_HTML_PRE)
- strcpy (out, "</PRE>");
- else
- *out = '\0';
-
- return buffer;
-}
-
-char *
-e_text_to_html (const char *input, unsigned int flags)
-{
- return e_text_to_html_full (input, flags, 0);
-}
diff --git a/e-util/e-html-utils.h b/e-util/e-html-utils.h
deleted file mode 100644
index e95ca6e24a..0000000000
--- a/e-util/e-html-utils.h
+++ /dev/null
@@ -1,38 +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 <danw@helixcode.com>
- *
- * 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__
-
-#include <glib.h>
-
-#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)
-#define E_TEXT_TO_HTML_MARK_CITATION (1 << 4)
-#define E_TEXT_TO_HTML_CONVERT_ADDRESSES (1 << 5)
-
-char *e_text_to_html_full (const char *input, unsigned int flags, guint32 color);
-char *e_text_to_html (const char *input, unsigned int flags);
-
-#endif /* __E_HTML_UTILS__ */
diff --git a/e-util/e-i18n.h b/e-util/e-i18n.h
deleted file mode 100644
index 58d3420be3..0000000000
--- a/e-util/e-i18n.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copied from gnome-i18nP.h, because this header is typically not installed
- *
- * This file has to be included before any file from the GNOME libraries
- * to have this override the definitions that are pulled from the gnome-i18n.h
- *
- * the difference is that gnome-i18n.h is used for applications, and this is
- * used by libraries (because libraries have to use dcgettext instead of
- * gettext and they need to provide the translation domain, unlike apps).
- *
- * So you can just put this after you include config.h
- */
-
-#ifndef __E_I18N_H__
-#define __E_I18N_H__
-
-#include <glib.h>
-#include "libgnome/gnome-defs.h"
-
-BEGIN_GNOME_DECLS
-
-#ifdef ENABLE_NLS
-# include <libintl.h>
-# undef _
-# define _(String) dgettext (PACKAGE, String)
-# ifdef gettext_noop
-# define N_(String) gettext_noop (String)
-# else
-# define N_(String) (String)
-# endif
-#else
-/* Stubs that do something close enough. */
-# define textdomain(String) (String)
-# define gettext(String) (String)
-# define dgettext(Domain,Message) (Message)
-# define dcgettext(Domain,Message,Type) (Message)
-# define bindtextdomain(Domain,Directory) (Domain)
-# define _(String) (String)
-# define N_(String) (String)
-#endif
-
-/*
- * Do not remove the following define, nor do surround it with ifdefs.
- *
- * If you get any `redefined' errors, it means that you are including
- * -incorrectly- a header file provided by gnome-libs before this file.
- * To correctly solve this issue include this file before any libgnome/
- * libgnomeui headers
- */
-
-#define __GNOME_I18N_H__ 1
-
-
-/* This is copied staight out of the prototypes for gnome-i18n.h */
-const char *gnome_i18n_get_language(void);
-GList *gnome_i18n_get_language_list (const gchar *category_name);
-void gnome_i18n_set_preferred_language (const char *val);
-const char *gnome_i18n_get_preferred_language (void);
-void gnome_i18n_init (void);
-
-END_GNOME_DECLS
-
-#endif /* __E_I18N_H__ */
diff --git a/e-util/e-iterator.c b/e-util/e-iterator.c
deleted file mode 100644
index fb0b3142c8..0000000000
--- a/e-util/e-iterator.c
+++ /dev/null
@@ -1,186 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Christopher James Lahey <clahey@umich.edu>
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 1999 The Free Software Foundation
- */
-
-#include <config.h>
-
-#include <gtk/gtksignal.h>
-#include "e-iterator.h"
-
-#define ECI_CLASS(object) (E_ITERATOR_CLASS(GTK_OBJECT((object))->klass))
-
-static void e_iterator_init (EIterator *card);
-static void e_iterator_class_init (EIteratorClass *klass);
-
-#define PARENT_TYPE (gtk_object_get_type ())
-
-static GtkObjectClass *parent_class;
-
-enum {
- INVALIDATE,
- LAST_SIGNAL
-};
-
-static guint e_iterator_signals [LAST_SIGNAL] = { 0, };
-
-/**
- * e_iterator_get_type:
- * @void:
- *
- * Registers the &EIterator class if necessary, and returns the type ID
- * associated to it.
- *
- * Return value: The type ID of the &EIterator class.
- **/
-GtkType
-e_iterator_get_type (void)
-{
- static GtkType type = 0;
-
- if (!type) {
- GtkTypeInfo info = {
- "EIterator",
- sizeof (EIterator),
- sizeof (EIteratorClass),
- (GtkClassInitFunc) e_iterator_class_init,
- (GtkObjectInitFunc) e_iterator_init,
- NULL, /* reserved_1 */
- NULL, /* reserved_2 */
- (GtkClassInitFunc) NULL
- };
-
- type = gtk_type_unique (PARENT_TYPE, &info);
- }
-
- return type;
-}
-
-static void
-e_iterator_class_init (EIteratorClass *klass)
-{
- GtkObjectClass *object_class;
-
- object_class = GTK_OBJECT_CLASS(klass);
-
- parent_class = gtk_type_class (PARENT_TYPE);
-
- e_iterator_signals [INVALIDATE] =
- gtk_signal_new ("invalidate",
- GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (EIteratorClass, invalidate),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
-
- gtk_object_class_add_signals (object_class, e_iterator_signals, LAST_SIGNAL);
-
- klass->invalidate = NULL;
- klass->get = NULL;
- klass->reset = NULL;
- klass->last = NULL;
- klass->next = NULL;
- klass->prev = NULL;
- klass->delete = NULL;
- klass->insert = NULL;
- klass->set = NULL;
- klass->is_valid = NULL;
-}
-
-/**
- * e_iterator_init:
- */
-static void
-e_iterator_init (EIterator *card)
-{
-}
-
-/*
- * Virtual functions:
- */
-const void *
-e_iterator_get (EIterator *iterator)
-{
- if (ECI_CLASS(iterator)->get)
- return ECI_CLASS(iterator)->get(iterator);
- else
- return NULL;
-}
-
-void
-e_iterator_reset (EIterator *iterator)
-{
- if (ECI_CLASS(iterator)->reset)
- ECI_CLASS(iterator)->reset(iterator);
-}
-
-void
-e_iterator_last (EIterator *iterator)
-{
- if (ECI_CLASS(iterator)->last)
- ECI_CLASS(iterator)->last(iterator);
-}
-
-gboolean
-e_iterator_next (EIterator *iterator)
-{
- if (ECI_CLASS(iterator)->next)
- return ECI_CLASS(iterator)->next(iterator);
- else
- return FALSE;
-}
-
-gboolean
-e_iterator_prev (EIterator *iterator)
-{
- if (ECI_CLASS(iterator)->prev)
- return ECI_CLASS(iterator)->prev(iterator);
- else
- return FALSE;
-}
-
-void
-e_iterator_delete (EIterator *iterator)
-{
- if (ECI_CLASS(iterator)->delete)
- ECI_CLASS(iterator)->delete(iterator);
-}
-
-void e_iterator_insert (EIterator *iterator,
- const void *object,
- gboolean before)
-{
- if (ECI_CLASS(iterator)->insert)
- ECI_CLASS(iterator)->insert(iterator, object, before);
-}
-
-void
-e_iterator_set (EIterator *iterator,
- const void *object)
-{
- if (ECI_CLASS(iterator)->set)
- ECI_CLASS(iterator)->set(iterator, object);
-}
-
-gboolean
-e_iterator_is_valid (EIterator *iterator)
-{
- if (ECI_CLASS(iterator)->is_valid)
- return ECI_CLASS(iterator)->is_valid(iterator);
- else
- return FALSE;
-}
-
-void
-e_iterator_invalidate (EIterator *iterator)
-{
- g_return_if_fail (iterator != NULL);
- g_return_if_fail (E_IS_ITERATOR (iterator));
-
- gtk_signal_emit (GTK_OBJECT (iterator),
- e_iterator_signals [INVALIDATE]);
-}
diff --git a/e-util/e-iterator.h b/e-util/e-iterator.h
deleted file mode 100644
index 667e141686..0000000000
--- a/e-util/e-iterator.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Chris Lahey <clahey@helixcode.com>
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 1999 The Free Software Foundation
- */
-
-#ifndef __E_ITERATOR_H__
-#define __E_ITERATOR_H__
-
-#include <stdio.h>
-#include <time.h>
-#include <gtk/gtkobject.h>
-
-#define E_TYPE_ITERATOR (e_iterator_get_type ())
-#define E_ITERATOR(obj) (GTK_CHECK_CAST ((obj), E_TYPE_ITERATOR, EIterator))
-#define E_ITERATOR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_ITERATOR, EIteratorClass))
-#define E_IS_ITERATOR(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_ITERATOR))
-#define E_IS_ITERATOR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), E_TYPE_ITERATOR))
-
-typedef struct _EIterator EIterator;
-typedef struct _EIteratorClass EIteratorClass;
-
-struct _EIterator {
- GtkObject object;
-};
-
-struct _EIteratorClass {
- GtkObjectClass parent_class;
-
- /* Signals */
- void (*invalidate) (EIterator *iterator);
-
- /* Virtual functions */
- const void * (*get) (EIterator *iterator);
- void (*reset) (EIterator *iterator);
- void (*last) (EIterator *iterator);
- gboolean (*next) (EIterator *iterator);
- gboolean (*prev) (EIterator *iterator);
- void (*delete) (EIterator *iterator);
- void (*insert) (EIterator *iterator,
- const void *object,
- gboolean before);
- void (*set) (EIterator *iterator,
- const void *object);
- gboolean (*is_valid) (EIterator *iterator);
-};
-
-const void *e_iterator_get (EIterator *iterator);
-void e_iterator_reset (EIterator *iterator);
-void e_iterator_last (EIterator *iterator);
-gboolean e_iterator_next (EIterator *iterator);
-gboolean e_iterator_prev (EIterator *iterator);
-void e_iterator_delete (EIterator *iterator);
-void e_iterator_insert (EIterator *iterator,
- const void *object,
- gboolean before);
-void e_iterator_set (EIterator *iterator,
- const void *object);
-gboolean e_iterator_is_valid (EIterator *iterator);
-
-void e_iterator_invalidate (EIterator *iterator);
-
-/* Standard Gtk function */
-GtkType e_iterator_get_type (void);
-
-#endif /* ! __E_ITERATOR_H__ */
diff --git a/e-util/e-list-iterator.c b/e-util/e-list-iterator.c
deleted file mode 100644
index b6e5a7018a..0000000000
--- a/e-util/e-list-iterator.c
+++ /dev/null
@@ -1,242 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Christopher James Lahey <clahey@umich.edu>
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 1999 The Free Software Foundation
- */
-
-#include <config.h>
-
-#include "e-list-iterator.h"
-#include "e-list.h"
-
-
-static void e_list_iterator_init (EListIterator *list);
-static void e_list_iterator_class_init (EListIteratorClass *klass);
-
-static void e_list_iterator_invalidate (EIterator *iterator);
-static gboolean e_list_iterator_is_valid (EIterator *iterator);
-static void e_list_iterator_set (EIterator *iterator,
- const void *object);
-static void e_list_iterator_delete (EIterator *iterator);
-static void e_list_iterator_insert (EIterator *iterator,
- const void *object,
- gboolean before);
-static gboolean e_list_iterator_prev (EIterator *iterator);
-static gboolean e_list_iterator_next (EIterator *iterator);
-static void e_list_iterator_reset (EIterator *iterator);
-static void e_list_iterator_last (EIterator *iterator);
-static const void *e_list_iterator_get (EIterator *iterator);
-static void e_list_iterator_destroy (GtkObject *object);
-
-#define PARENT_TYPE (e_iterator_get_type ())
-
-static GtkObjectClass *parent_class;
-#define PARENT_CLASS (E_ITERATOR_CLASS(parent_class))
-
-/**
- * e_list_iterator_get_type:
- * @void:
- *
- * Registers the &EListIterator class if necessary, and returns the type ID
- * associated to it.
- *
- * Return value: The type ID of the &EListIterator class.
- **/
-GtkType
-e_list_iterator_get_type (void)
-{
- static GtkType type = 0;
-
- if (!type) {
- GtkTypeInfo info = {
- "EListIterator",
- sizeof (EListIterator),
- sizeof (EListIteratorClass),
- (GtkClassInitFunc) e_list_iterator_class_init,
- (GtkObjectInitFunc) e_list_iterator_init,
- NULL, /* reserved_1 */
- NULL, /* reserved_2 */
- (GtkClassInitFunc) NULL
- };
-
- type = gtk_type_unique (PARENT_TYPE, &info);
- }
-
- return type;
-}
-
-static void
-e_list_iterator_class_init (EListIteratorClass *klass)
-{
- GtkObjectClass *object_class;
- EIteratorClass *iterator_class;
-
- object_class = GTK_OBJECT_CLASS(klass);
- iterator_class = E_ITERATOR_CLASS(klass);
-
- parent_class = gtk_type_class (PARENT_TYPE);
-
- object_class->destroy = e_list_iterator_destroy;
-
- iterator_class->invalidate = e_list_iterator_invalidate;
- iterator_class->get = e_list_iterator_get;
- iterator_class->reset = e_list_iterator_reset;
- iterator_class->last = e_list_iterator_last;
- iterator_class->next = e_list_iterator_next;
- iterator_class->prev = e_list_iterator_prev;
- iterator_class->delete = e_list_iterator_delete;
- iterator_class->insert = e_list_iterator_insert;
- iterator_class->set = e_list_iterator_set;
- iterator_class->is_valid = e_list_iterator_is_valid;
-}
-
-
-
-/**
- * e_list_iterator_init:
- */
-static void
-e_list_iterator_init (EListIterator *list)
-{
-}
-
-EIterator *
-e_list_iterator_new (EList *list)
-{
- EListIterator *iterator = gtk_type_new(e_list_iterator_get_type());
-
- iterator->list = list;
- gtk_object_ref(GTK_OBJECT(list));
- iterator->iterator = list->list;
-
- return E_ITERATOR(iterator);
-}
-
-/*
- * Virtual functions:
- */
-static void
-e_list_iterator_destroy (GtkObject *object)
-{
- EListIterator *iterator = E_LIST_ITERATOR(object);
- e_list_remove_iterator(iterator->list, E_ITERATOR(iterator));
- gtk_object_unref(GTK_OBJECT(iterator->list));
-}
-
-static const void *
-e_list_iterator_get (EIterator *_iterator)
-{
- EListIterator *iterator = E_LIST_ITERATOR(_iterator);
- if (iterator->iterator)
- return iterator->iterator->data;
- else
- return NULL;
-}
-
-static void
-e_list_iterator_reset (EIterator *_iterator)
-{
- EListIterator *iterator = E_LIST_ITERATOR(_iterator);
- iterator->iterator = iterator->list->list;
-}
-
-static void
-e_list_iterator_last (EIterator *_iterator)
-{
- EListIterator *iterator = E_LIST_ITERATOR(_iterator);
- iterator->iterator = g_list_last(iterator->list->list);
-}
-
-static gboolean
-e_list_iterator_next (EIterator *_iterator)
-{
- EListIterator *iterator = E_LIST_ITERATOR(_iterator);
- if (iterator->iterator)
- iterator->iterator = g_list_next(iterator->iterator);
- return (iterator->iterator != NULL);
-}
-
-static gboolean
-e_list_iterator_prev (EIterator *_iterator)
-{
- EListIterator *iterator = E_LIST_ITERATOR(_iterator);
- if (iterator->iterator)
- iterator->iterator = g_list_previous(iterator->iterator);
- return (iterator->iterator != NULL);
-}
-
-static void
-e_list_iterator_insert (EIterator *_iterator,
- const void *object,
- gboolean before)
-{
- EListIterator *iterator = E_LIST_ITERATOR(_iterator);
- void *data;
- if (iterator->list->copy)
- data = iterator->list->copy(object, iterator->list->closure);
- else
- data = (void *) object;
- if (iterator->iterator) {
- if (before) {
- iterator->list->list = g_list_first(g_list_prepend(iterator->iterator, data));
- iterator->iterator = iterator->iterator->prev;
- } else {
- if (iterator->iterator->next)
- g_list_prepend(iterator->iterator->next, data);
- else
- g_list_append(iterator->iterator, data);
- iterator->iterator = iterator->iterator->next;
- }
- e_list_invalidate_iterators(iterator->list, E_ITERATOR(iterator));
- } else {
- if (before) {
- iterator->list->list = g_list_append(iterator->list->list, data);
- iterator->iterator = g_list_last(iterator->list->list);
- } else {
- iterator->list->list = g_list_prepend(iterator->list->list, data);
- iterator->iterator = iterator->list->list;
- }
- e_list_invalidate_iterators(iterator->list, E_ITERATOR(iterator));
- }
-}
-
-static void
-e_list_iterator_delete (EIterator *_iterator)
-{
- EListIterator *iterator = E_LIST_ITERATOR(_iterator);
- if (iterator->iterator) {
- e_list_remove_link (iterator->list, iterator->iterator);
- }
-}
-
-static void
-e_list_iterator_set (EIterator *_iterator,
- const void *object)
-{
- EListIterator *iterator = E_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_list_iterator_is_valid (EIterator *_iterator)
-{
- EListIterator *iterator = E_LIST_ITERATOR(_iterator);
- return iterator->iterator != NULL;
-}
-
-static void
-e_list_iterator_invalidate (EIterator *_iterator)
-{
- EListIterator *iterator = E_LIST_ITERATOR(_iterator);
- iterator->iterator = NULL;
-}
diff --git a/e-util/e-list-iterator.h b/e-util/e-list-iterator.h
deleted file mode 100644
index 1c6f7c6ca8..0000000000
--- a/e-util/e-list-iterator.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Chris Lahey <clahey@helixcode.com>
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 1999 The Free Software Foundation
- */
-
-#ifndef __E_LIST_ITERATOR_H__
-#define __E_LIST_ITERATOR_H__
-
-typedef struct _EListIterator EListIterator;
-typedef struct _EListIteratorClass EListIteratorClass;
-
-#include <stdio.h>
-#include <time.h>
-#include <gtk/gtkobject.h>
-
-#include <e-util/e-iterator.h>
-#include <e-util/e-list.h>
-
-#define E_TYPE_LIST_ITERATOR (e_list_iterator_get_type ())
-#define E_LIST_ITERATOR(obj) (GTK_CHECK_CAST ((obj), E_TYPE_LIST_ITERATOR, EListIterator))
-#define E_LIST_ITERATOR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_LIST_ITERATOR, EListIteratorClass))
-#define E_IS_LIST_ITERATOR(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_LIST_ITERATOR))
-#define E_IS_LIST_ITERATOR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), E_TYPE_LIST_ITERATOR))
-
-struct _EListIterator {
- EIterator parent;
-
- EList *list;
- GList *iterator;
-};
-
-struct _EListIteratorClass {
- EIteratorClass parent_class;
-};
-
-EIterator *e_list_iterator_new (EList *list);
-
-/* Standard Gtk function */
-GtkType e_list_iterator_get_type (void);
-
-#endif /* ! __E_LIST_ITERATOR_H__ */
diff --git a/e-util/e-list.c b/e-util/e-list.c
deleted file mode 100644
index 9efe4503f7..0000000000
--- a/e-util/e-list.c
+++ /dev/null
@@ -1,176 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Christopher James Lahey <clahey@umich.edu>
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 1999 The Free Software Foundation
- */
-
-#include <config.h>
-
-#include "e-list.h"
-#include "e-list-iterator.h"
-
-#define ECL_CLASS(object) (E_LIST_CLASS(GTK_OBJECT((object))->klass))
-
-static void e_list_init (EList *list);
-static void e_list_class_init (EListClass *klass);
-static void e_list_destroy (GtkObject *object);
-
-#define PARENT_TYPE (gtk_object_get_type ())
-
-static GtkObjectClass *parent_class;
-
-/**
- * e_list_get_type:
- * @void:
- *
- * Registers the &EList class if necessary, and returns the type ID
- * associated to it.
- *
- * Return value: The type ID of the &EList class.
- **/
-GtkType
-e_list_get_type (void)
-{
- static GtkType type = 0;
-
- if (!type) {
- GtkTypeInfo info = {
- "EList",
- sizeof (EList),
- sizeof (EListClass),
- (GtkClassInitFunc) e_list_class_init,
- (GtkObjectInitFunc) e_list_init,
- NULL, /* reserved_1 */
- NULL, /* reserved_2 */
- (GtkClassInitFunc) NULL
- };
-
- type = gtk_type_unique (PARENT_TYPE, &info);
- }
-
- return type;
-}
-
-static void
-e_list_class_init (EListClass *klass)
-{
- GtkObjectClass *object_class;
-
- object_class = GTK_OBJECT_CLASS(klass);
-
- parent_class = gtk_type_class (PARENT_TYPE);
-
- object_class->destroy = e_list_destroy;
-}
-
-/**
- * e_list_init:
- */
-static void
-e_list_init (EList *list)
-{
- list->list = NULL;
- list->iterators = NULL;
-}
-
-EList *
-e_list_new (EListCopyFunc copy, EListFreeFunc free, void *closure)
-{
- EList *list = gtk_type_new(e_list_get_type());
- list->copy = copy;
- list->free = free;
- list->closure = closure;
- return list;
-}
-
-EList *
-e_list_duplicate (EList *old)
-{
- EList *list = gtk_type_new(e_list_get_type());
-
- list->copy = old->copy;
- list->free = old->free;
- list->closure = old->closure;
- list->list = g_list_copy(old->list);
- if (list->copy) {
- GList *listlist;
- for (listlist = list->list; listlist; listlist = listlist->next) {
- listlist->data = list->copy (listlist->data, list->closure);
- }
- }
- return list;
-}
-
-EIterator *
-e_list_get_iterator (EList *list)
-{
- EIterator *iterator = e_list_iterator_new(list);
- list->iterators = g_list_append(list->iterators, iterator);
- return iterator;
-}
-
-int
-e_list_length (EList *list)
-{
- return g_list_length(list->list);
-}
-
-void
-e_list_append (EList *list, const void *data)
-{
- e_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_list_invalidate_iterators (EList *list, EIterator *skip)
-{
- GList *iterators = list->iterators;
- for (; iterators; iterators = iterators->next) {
- if (iterators->data != skip) {
- e_iterator_invalidate(E_ITERATOR(iterators->data));
- }
- }
-}
-
-/* FIXME: This doesn't work properly if the iterator is the first
- iterator in the list. Well, the iterator doesn't continue on after
- the next time next is called, at least. */
-void
-e_list_remove_link (EList *list, GList *link)
-{
- GList *iterators = list->iterators;
- for (; iterators; iterators = iterators->next) {
- if (((EListIterator *)iterators->data)->iterator == link) {
- e_iterator_prev(iterators->data);
- }
- }
- if (list->free)
- list->free(link->data, list->closure);
- list->list = g_list_remove_link(list->list, link);
- g_list_free_1(link);
-}
-
-void
-e_list_remove_iterator (EList *list, EIterator *iterator)
-{
- list->iterators = g_list_remove(list->iterators, iterator);
-}
-
-/*
- * Virtual functions
- */
-static void
-e_list_destroy (GtkObject *object)
-{
- EList *list = E_LIST(object);
- g_list_foreach(list->list, (GFunc) list->free, list->closure);
- g_list_free(list->list);
-}
-
diff --git a/e-util/e-list.h b/e-util/e-list.h
deleted file mode 100644
index 75a701dcf5..0000000000
--- a/e-util/e-list.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Chris Lahey <clahey@helixcode.com>
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 1999 The Free Software Foundation
- */
-
-#ifndef __E_LIST_H__
-#define __E_LIST_H__
-
-typedef struct _EList EList;
-typedef struct _EListClass EListClass;
-
-#include <stdio.h>
-#include <time.h>
-#include <gtk/gtkobject.h>
-#include <e-util/e-list-iterator.h>
-
-#define E_TYPE_LIST (e_list_get_type ())
-#define E_LIST(obj) (GTK_CHECK_CAST ((obj), E_TYPE_LIST, EList))
-#define E_LIST_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_LIST, EListClass))
-#define E_IS_LIST(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_LIST))
-#define E_IS_LIST_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), E_TYPE_LIST))
-
-typedef void *(*EListCopyFunc) (const void *data, void *closure);
-typedef void (*EListFreeFunc) (void *data, void *closure);
-
-struct _EList {
- GtkObject object;
- GList *list;
- GList *iterators;
- EListCopyFunc copy;
- EListFreeFunc free;
- void *closure;
-};
-
-struct _EListClass {
- GtkObjectClass parent_class;
-};
-
-EList *e_list_new (EListCopyFunc copy,
- EListFreeFunc free,
- void *closure);
-EList *e_list_duplicate (EList *list);
-EIterator *e_list_get_iterator (EList *list);
-void e_list_append (EList *list,
- const void *data);
-int e_list_length (EList *list);
-
-/* For iterators to call. */
-void e_list_remove_link (EList *list,
- GList *link);
-void e_list_remove_iterator (EList *list,
- EIterator *iterator);
-void e_list_invalidate_iterators (EList *list,
- EIterator *skip);
-
-/* Standard Gtk function */
-GtkType e_list_get_type (void);
-
-#endif /* ! __E_LIST_H__ */
diff --git a/e-util/e-memory.c b/e-util/e-memory.c
deleted file mode 100644
index 0265088297..0000000000
--- a/e-util/e-memory.c
+++ /dev/null
@@ -1,891 +0,0 @@
-/*
- * Copyright (c) 2000 Helix Code Inc.
- *
- * Author: Michael Zucchi <notzed@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 <string.h> /* memset() */
-#include <stdlib.h> /* alloca() */
-#include <glib.h>
-
-#include "e-memory.h"
-
-#define s(x) /* strv debug */
-
-/*#define TIMEIT*/
-
-#ifdef TIMEIT
-#include <sys/time.h>
-#include <unistd.h>
-
-struct timeval timeit_start;
-
-static time_start(const char *desc)
-{
- gettimeofday(&timeit_start, NULL);
- printf("starting: %s\n", desc);
-}
-
-static time_end(const char *desc)
-{
- unsigned long diff;
- struct timeval end;
-
- gettimeofday(&end, NULL);
- diff = end.tv_sec * 1000 + end.tv_usec/1000;
- diff -= timeit_start.tv_sec * 1000 + timeit_start.tv_usec/1000;
- printf("%s took %ld.%03ld seconds\n",
- desc, diff / 1000, diff % 1000);
-}
-#else
-#define time_start(x)
-#define time_end(x)
-#endif
-
-/* mempool class */
-
-#define STRUCT_ALIGN (4)
-
-typedef struct _MemChunkFreeNode {
- struct _MemChunkFreeNode *next;
- unsigned int atoms;
-} MemChunkFreeNode;
-
-typedef struct _EMemChunk {
- unsigned int blocksize; /* number of atoms in a block */
- unsigned int atomsize; /* size of each atom */
- GPtrArray *blocks; /* blocks of raw memory */
- struct _MemChunkFreeNode *free;
-} MemChunk;
-
-/**
- * e_memchunk_new:
- * @atomcount: The number of atoms stored in a single malloc'd block of memory.
- * @atomsize: The size of each allocation.
- *
- * Create a new memchunk header. Memchunks are an efficient way to allocate
- * and deallocate identical sized blocks of memory quickly, and space efficiently.
- *
- * e_memchunks are effectively the same as gmemchunks, only faster (much), and
- * they use less memory overhead for housekeeping.
- *
- * Return value: The new header.
- **/
-MemChunk *e_memchunk_new(int atomcount, int atomsize)
-{
- MemChunk *m = g_malloc(sizeof(*m));
-
- m->blocksize = atomcount;
- m->atomsize = MAX(atomsize, sizeof(MemChunkFreeNode));
- m->blocks = g_ptr_array_new();
- m->free = NULL;
-
- return m;
-}
-
-/**
- * memchunk_alloc:
- * @m:
- *
- * Allocate a new atom size block of memory from a memchunk.
- **/
-void *e_memchunk_alloc(MemChunk *m)
-{
- char *b;
- MemChunkFreeNode *f;
- void *mem;
-
- f = m->free;
- if (f) {
- f->atoms--;
- if (f->atoms > 0) {
- mem = ((char *)f) + (f->atoms*m->atomsize);
- } else {
- mem = f;
- m->free = m->free->next;
- }
- return mem;
- } else {
- b = g_malloc(m->blocksize * m->atomsize);
- g_ptr_array_add(m->blocks, b);
- f = (MemChunkFreeNode *)&b[m->atomsize];
- f->atoms = m->blocksize-1;
- f->next = NULL;
- m->free = f;
- return b;
- }
-}
-
-void *e_memchunk_alloc0(EMemChunk *m)
-{
- void *mem;
-
- mem = e_memchunk_alloc(m);
- memset(mem, 0, m->atomsize);
-
- return mem;
-}
-
-/**
- * e_memchunk_free:
- * @m:
- * @mem: Address of atom to free.
- *
- * Free a single atom back to the free pool of atoms in the given
- * memchunk.
- **/
-void
-e_memchunk_free(MemChunk *m, void *mem)
-{
- MemChunkFreeNode *f;
-
- /* put the location back in the free list. If we knew if the preceeding or following
- cells were free, we could merge the free nodes, but it doesn't really add much */
- f = mem;
- f->next = m->free;
- m->free = f;
- f->atoms = 1;
-
- /* we could store the free list sorted - we could then do the above, and also
- probably improve the locality of reference properties for the allocator */
- /* and it would simplify some other algorithms at that, but slow this one down
- significantly */
-}
-
-/**
- * e_memchunk_empty:
- * @m:
- *
- * Clean out the memchunk buffers. Marks all allocated memory as free blocks,
- * but does not give it back to the system. Can be used if the memchunk
- * is to be used repeatedly.
- **/
-void
-e_memchunk_empty(MemChunk *m)
-{
- int i;
- MemChunkFreeNode *f, *h = NULL;
-
- for (i=0;i<m->blocks->len;i++) {
- f = (MemChunkFreeNode *)m->blocks->pdata[i];
- f->atoms = m->blocksize;
- f->next = h;
- h = f;
- }
- m->free = h;
-}
-
-struct _cleaninfo {
- struct _cleaninfo *next;
- char *base;
- int count;
- int size; /* just so tree_search has it, sigh */
-};
-
-static int tree_compare(struct _cleaninfo *a, struct _cleaninfo *b)
-{
- if (a->base < b->base)
- return -1;
- else if (a->base > b->base)
- return 1;
- return 0;
-}
-
-static int tree_search(struct _cleaninfo *a, char *mem)
-{
- if (a->base <= mem) {
- if (mem < &a->base[a->size])
- return 0;
- return 1;
- }
- return -1;
-}
-
-/**
- * e_memchunk_clean:
- * @m:
- *
- * Scan all empty blocks and check for blocks which can be free'd
- * back to the system.
- *
- * This routine may take a while to run if there are many allocated
- * memory blocks (if the total number of allocations is many times
- * greater than atomcount).
- **/
-void
-e_memchunk_clean(MemChunk *m)
-{
- GTree *tree;
- int i;
- MemChunkFreeNode *f;
- struct _cleaninfo *ci, *hi = NULL;
-
- f = m->free;
- if (m->blocks->len == 0 || f == NULL)
- return;
-
- /* first, setup the tree/list so we can map free block addresses to block addresses */
- tree = g_tree_new((GCompareFunc)tree_compare);
- for (i=0;i<m->blocks->len;i++) {
- ci = alloca(sizeof(*ci));
- ci->count = 0;
- ci->base = m->blocks->pdata[i];
- ci->size = m->blocksize * m->atomsize;
- g_tree_insert(tree, ci, ci);
- ci->next = hi;
- hi = ci;
- }
-
- /* now, scan all free nodes, and count them in their tree node */
- while (f) {
- ci = g_tree_search(tree, (GSearchFunc)tree_search, f);
- if (ci) {
- ci->count += f->atoms;
- } else {
- g_warning("error, can't find free node in memory block\n");
- }
- f = f->next;
- }
-
- /* if any nodes are all free, free & unlink them */
- ci = hi;
- while (ci) {
- if (ci->count == m->blocksize) {
- g_ptr_array_remove_fast(m->blocks, ci->base);
- g_free(ci->base);
- }
- ci = ci->next;
- }
-
- g_tree_destroy(tree);
-}
-
-/**
- * e_memchunk_destroy:
- * @m:
- *
- * Free the memchunk header, and all associated memory.
- **/
-void
-e_memchunk_destroy(MemChunk *m)
-{
- int i;
-
- if (m == NULL)
- return;
-
- for (i=0;i<m->blocks->len;i++)
- g_free(m->blocks->pdata[i]);
- g_ptr_array_free(m->blocks, TRUE);
- g_free(m);
-}
-
-typedef struct _MemPoolNode {
- struct _MemPoolNode *next;
-
- int free;
- char data[1];
-} MemPoolNode;
-
-typedef struct _MemPoolThresholdNode {
- struct _MemPoolThresholdNode *next;
- char data[1];
-} MemPoolThresholdNode;
-
-typedef struct _EMemPool {
- int blocksize;
- int threshold;
- unsigned int align;
- struct _MemPoolNode *blocks;
- struct _MemPoolThresholdNode *threshold_blocks;
-} MemPool;
-
-/* a pool of mempool header blocks */
-static MemChunk *mempool_memchunk;
-#ifdef G_THREADS_ENABLED
-static GStaticMutex mempool_mutex = G_STATIC_MUTEX_INIT;
-#endif
-
-/**
- * e_mempool_new:
- * @blocksize: The base blocksize to use for all system alocations.
- * @threshold: If the allocation exceeds the threshold, then it is
- * allocated separately and stored in a separate list.
- * @flags: Alignment options: E_MEMPOOL_ALIGN_STRUCT uses native
- * struct alignment, E_MEMPOOL_ALIGN_WORD aligns to 16 bits (2 bytes),
- * and E_MEMPOOL_ALIGN_BYTE aligns to the nearest byte. The default
- * is to align to native structures.
- *
- * Create a new mempool header. Mempools can be used to efficiently
- * allocate data which can then be freed as a whole.
- *
- * Mempools can also be used to efficiently allocate arbitrarily
- * aligned data (such as strings) without incurring the space overhead
- * of aligning each allocation (which is not required for strings).
- *
- * However, each allocation cannot be freed individually, only all
- * or nothing.
- *
- * Return value:
- **/
-MemPool *e_mempool_new(int blocksize, int threshold, EMemPoolFlags flags)
-{
- MemPool *pool;
-
-#ifdef G_THREADS_ENABLED
- g_static_mutex_lock(&mempool_mutex);
-#endif
- if (mempool_memchunk == NULL) {
- mempool_memchunk = e_memchunk_new(8, sizeof(MemPool));
- }
- pool = e_memchunk_alloc(mempool_memchunk);
-#ifdef G_THREADS_ENABLED
- g_static_mutex_unlock(&mempool_mutex);
-#endif
- if (threshold >= blocksize)
- threshold = blocksize * 2 / 3;
- pool->blocksize = blocksize;
- pool->threshold = threshold;
- pool->blocks = NULL;
- pool->threshold_blocks = NULL;
-
- switch (flags & E_MEMPOOL_ALIGN_MASK) {
- case E_MEMPOOL_ALIGN_STRUCT:
- default:
- pool->align = STRUCT_ALIGN-1;
- break;
- case E_MEMPOOL_ALIGN_WORD:
- pool->align = 2-1;
- break;
- case E_MEMPOOL_ALIGN_BYTE:
- pool->align = 1-1;
- }
- return pool;
-}
-
-/**
- * e_mempool_alloc:
- * @pool:
- * @size:
- *
- * Allocate a new data block in the mempool. Size will
- * be rounded up to the mempool's alignment restrictions
- * before being used.
- **/
-void *e_mempool_alloc(MemPool *pool, register int size)
-{
- size = (size + pool->align) & (~(pool->align));
- 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 {
- register MemPoolNode *n;
-
- n = pool->blocks;
- if (n && n->free >= size) {
- n->free -= size;
- return &n->data[n->free];
- }
-
- /* maybe we could do some sort of the free blocks based on size, but
- it doubt its worth it at all */
-
- 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];
- }
-}
-
-char *e_mempool_strdup(EMemPool *pool, const char *str)
-{
- char *out;
-
- out = e_mempool_alloc(pool, strlen(str)+1);
- strcpy(out, str);
-
- return out;
-}
-
-/**
- * e_mempool_flush:
- * @pool:
- * @freeall: Free all system allocated blocks as well.
- *
- * Flush used memory and mark allocated blocks as free.
- *
- * If @freeall is #TRUE, then all allocated blocks are free'd
- * as well. Otherwise only blocks above the threshold are
- * actually freed, and the others are simply marked as empty.
- **/
-void e_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;
- }
- }
-}
-
-/**
- * e_mempool_destroy:
- * @pool:
- *
- * Free all memory associated with a mempool.
- **/
-void e_mempool_destroy(MemPool *pool)
-{
- if (pool) {
- e_mempool_flush(pool, 1);
- e_memchunk_free(mempool_memchunk, pool);
- }
-}
-
-
-/*
- string array classes
-*/
-
-#define STRV_UNPACKED ((unsigned char)(~0))
-
-struct _EStrv {
- unsigned char length; /* how many entries we have (or the token STRV_UNPACKED) */
- char data[1]; /* data follows */
-};
-
-struct _s_strv_string {
- char *string; /* the string to output */
- char *free; /* a string to free, if we referenced it */
-};
-
-struct _e_strvunpacked {
- unsigned char type; /* we overload last to indicate this is unpacked */
- MemPool *pool; /* pool of memory for strings */
- struct _EStrv *source; /* if we were converted from a packed one, keep the source around for a while */
- unsigned int length;
- struct _s_strv_string strings[1]; /* the string array data follows */
-};
-
-/**
- * e_strv_new:
- * @size: The number of elements in the strv. Currently this is limited
- * to 254 elements.
- *
- * Create a new strv (string array) header. strv's can be used to
- * create and work with arrays of strings that can then be compressed
- * into a space-efficient static structure. This is useful
- * where a number of strings are to be stored for lookup, and not
- * generally edited afterwards.
- *
- * The size limit is currently 254 elements. This will probably not
- * change as arrays of this size suffer significant performance
- * penalties when looking up strings with high indices.
- *
- * Return value:
- **/
-struct _EStrv *
-e_strv_new(int size)
-{
- struct _e_strvunpacked *s;
-
- g_assert(size<255);
-
- s = g_malloc(sizeof(*s) + (size-1)*sizeof(s->strings[0]));
- s(printf("new strv=%p, size = %d bytes\n", s, sizeof(*s) + (size-1)*sizeof(char *)));
- s->type = STRV_UNPACKED;
- s->pool = NULL;
- s->length = size;
- s->source = NULL;
- memset(s->strings, 0, size*sizeof(s->strings[0]));
-
- return (struct _EStrv *)s;
-}
-
-static struct _e_strvunpacked *
-strv_unpack(struct _EStrv *strv)
-{
- struct _e_strvunpacked *s;
- register char *p;
- int i;
-
- s(printf("unpacking\n"));
-
- s = (struct _e_strvunpacked *)e_strv_new(strv->length);
- p = strv->data;
- for (i=0;i<s->length;i++) {
- if (i>0)
- while (*p++)
- ;
- s->strings[i].string = p;
- }
- s->source = strv;
- s->type = STRV_UNPACKED;
-
- return s;
-}
-
-/**
- * e_strv_set_ref:
- * @strv:
- * @index:
- * @str:
- *
- * Set a string array element by reference. The string
- * is not copied until the array is packed.
- *
- * If @strv has been packed, then it is unpacked ready
- * for more inserts, and should be packed again once finished with.
- * The memory used by the original @strv is not freed until
- * the new strv is packed, or freed itself.
- *
- * Return value: A new EStrv if the strv has already
- * been packed, otherwise @strv.
- **/
-struct _EStrv *
-e_strv_set_ref(struct _EStrv *strv, int index, char *str)
-{
- struct _e_strvunpacked *s;
-
- s(printf("set ref %d '%s'\n ", index, str));
-
- if (strv->length != STRV_UNPACKED)
- s = strv_unpack(strv);
- else
- s = (struct _e_strvunpacked *)strv;
-
- g_assert(index>=0 && index < s->length);
-
- s->strings[index].string = str;
-
- return (struct _EStrv *)s;
-}
-
-/**
- * e_strv_set_ref_free:
- * @strv:
- * @index:
- * @str:
- *
- * Set a string by reference, similar to set_ref, but also
- * free the string when finished with it. The string
- * is not copied until the strv is packed, and not at
- * all if the index is overwritten.
- *
- * Return value: @strv if already unpacked, otherwise an packed
- * EStrv.
- **/
-struct _EStrv *
-e_strv_set_ref_free(struct _EStrv *strv, int index, char *str)
-{
- struct _e_strvunpacked *s;
-
- s(printf("set ref %d '%s'\n ", index, str));
-
- if (strv->length != STRV_UNPACKED)
- s = strv_unpack(strv);
- else
- s = (struct _e_strvunpacked *)strv;
-
- g_assert(index>=0 && index < s->length);
-
- s->strings[index].string = str;
- if (s->strings[index].free)
- g_free(s->strings[index].free);
- s->strings[index].free = str;
-
- return (struct _EStrv *)s;
-}
-
-/**
- * e_strv_set:
- * @strv:
- * @index:
- * @str:
- *
- * Set a string array reference. The string @str is copied
- * into the string array at location @index.
- *
- * If @strv has been packed, then it is unpacked ready
- * for more inserts, and should be packed again once finished with.
- *
- * Return value: A new EStrv if the strv has already
- * been packed, otherwise @strv.
- **/
-struct _EStrv *
-e_strv_set(struct _EStrv *strv, int index, const char *str)
-{
- struct _e_strvunpacked *s;
-
- s(printf("set %d '%s'\n", index, str));
-
- if (strv->length != STRV_UNPACKED)
- s = strv_unpack(strv);
- else
- s = (struct _e_strvunpacked *)strv;
-
- g_assert(index>=0 && index < s->length);
-
- if (s->pool == NULL)
- s->pool = e_mempool_new(1024, 512, E_MEMPOOL_ALIGN_BYTE);
-
- s->strings[index].string = e_mempool_alloc(s->pool, strlen(str)+1);
- strcpy(s->strings[index].string, str);
-
- return (struct _EStrv *)s;
-}
-
-/**
- * e_strv_pack:
- * @strv:
- *
- * Pack the @strv into a space efficient structure for later lookup.
- *
- * All strings are packed into a single allocated block, separated
- * by single \0 characters, together with a count byte.
- *
- * Return value:
- **/
-struct _EStrv *
-e_strv_pack(struct _EStrv *strv)
-{
- struct _e_strvunpacked *s;
- int len, i;
- register char *src, *dst;
-
- if (strv->length == STRV_UNPACKED) {
- s = (struct _e_strvunpacked *)strv;
-
- s(printf("packing string\n"));
-
- len = 0;
- for (i=0;i<s->length;i++)
- len += s->strings[i].string?strlen(s->strings[i].string)+1:1;
-
- strv = g_malloc(sizeof(*strv) + len);
- s(printf("allocating strv=%p, size = %d\n", strv, sizeof(*strv)+len));
- strv->length = s->length;
- dst = strv->data;
- for (i=0;i<s->length;i++) {
- if ((src = s->strings[i].string)) {
- while ((*dst++ = *src++))
- ;
- } else {
- *dst++ = 0;
- }
- }
- e_strv_destroy((struct _EStrv *)s);
- }
- return strv;
-}
-
-/**
- * e_strv_get:
- * @strv:
- * @index:
- *
- * Retrieve a string by index. This function works
- * identically on both packed and unpacked strv's, although
- * may be much slower on a packed strv.
- *
- * Return value:
- **/
-char *
-e_strv_get(struct _EStrv *strv, int index)
-{
- struct _e_strvunpacked *s;
- char *p;
-
- if (strv->length != STRV_UNPACKED) {
- g_assert(index>=0 && index < strv->length);
- p = strv->data;
- while (index > 0) {
- while (*p++ != 0)
- ;
- index--;
- }
- return p;
- } else {
- s = (struct _e_strvunpacked *)strv;
- g_assert(index>=0 && index < s->length);
- return s->strings[index].string?s->strings[index].string:"";
- }
-}
-
-/**
- * e_strv_destroy:
- * @strv:
- *
- * Free a strv and all associated memory. Works on packed
- * or unpacked strv's.
- **/
-void
-e_strv_destroy(struct _EStrv *strv)
-{
- struct _e_strvunpacked *s;
- int i;
-
- s(printf("freeing strv\n"));
-
- if (strv->length == STRV_UNPACKED) {
- s = (struct _e_strvunpacked *)strv;
- if (s->pool)
- e_mempool_destroy(s->pool);
- if (s->source)
- e_strv_destroy(s->source);
- for (i=0;i<s->length;i++) {
- if (s->strings[i].free)
- g_free(s->strings[i].free);
- }
- }
-
- s(printf("freeing strv=%p\n", strv));
-
- g_free(strv);
-}
-
-#if 0
-
-#define CHUNK_SIZE (20)
-#define CHUNK_COUNT (32)
-
-#define s(x)
-
-main()
-{
- int i;
- MemChunk *mc;
- void *mem, *last;
- GMemChunk *gmc;
- struct _EStrv *s;
-
- s = strv_new(8);
- s = strv_set(s, 1, "Testing 1");
- s = strv_set(s, 2, "Testing 2");
- s = strv_set(s, 3, "Testing 3");
- s = strv_set(s, 4, "Testing 4");
- s = strv_set(s, 5, "Testing 5");
- s = strv_set(s, 6, "Testing 7");
-
- for (i=0;i<8;i++) {
- printf("s[%d] = %s\n", i, strv_get(s, i));
- }
-
- s(sleep(5));
-
- printf("packing ...\n");
- s = strv_pack(s);
-
- for (i=0;i<8;i++) {
- printf("s[%d] = %s\n", i, strv_get(s, i));
- }
-
- printf("setting ...\n");
-
- s = strv_set_ref(s, 1, "Testing 1 x");
-
- for (i=0;i<8;i++) {
- printf("s[%d] = %s\n", i, strv_get(s, i));
- }
-
- printf("packing ...\n");
- s = strv_pack(s);
-
- for (i=0;i<8;i++) {
- printf("s[%d] = %s\n", i, strv_get(s, i));
- }
-
- strv_free(s);
-
-#if 0
- time_start("Using memchunks");
- mc = memchunk_new(CHUNK_COUNT, CHUNK_SIZE);
- for (i=0;i<1000000;i++) {
- mem = memchunk_alloc(mc);
- if ((i & 1) == 0)
- memchunk_free(mc, mem);
- }
- s(sleep(10));
- memchunk_destroy(mc);
- time_end("allocating 1000000 memchunks, freeing 500k");
-
- time_start("Using gmemchunks");
- gmc = g_mem_chunk_new("memchunk", CHUNK_SIZE, CHUNK_SIZE*CHUNK_COUNT, G_ALLOC_AND_FREE);
- for (i=0;i<1000000;i++) {
- mem = g_mem_chunk_alloc(gmc);
- if ((i & 1) == 0)
- g_mem_chunk_free(gmc, mem);
- }
- s(sleep(10));
- g_mem_chunk_destroy(gmc);
- time_end("allocating 1000000 gmemchunks, freeing 500k");
-
- time_start("Using memchunks");
- mc = memchunk_new(CHUNK_COUNT, CHUNK_SIZE);
- for (i=0;i<1000000;i++) {
- mem = memchunk_alloc(mc);
- }
- s(sleep(10));
- memchunk_destroy(mc);
- time_end("allocating 1000000 memchunks");
-
- time_start("Using gmemchunks");
- gmc = g_mem_chunk_new("memchunk", CHUNK_SIZE, CHUNK_COUNT*CHUNK_SIZE, G_ALLOC_ONLY);
- for (i=0;i<1000000;i++) {
- mem = g_mem_chunk_alloc(gmc);
- }
- s(sleep(10));
- g_mem_chunk_destroy(gmc);